mirror of
https://github.com/orionprotocol/sdk.git
synced 2026-03-14 06:02:36 +03:00
update signOrder types
This commit is contained in:
4
package-lock.json
generated
4
package-lock.json
generated
@@ -1,12 +1,12 @@
|
||||
{
|
||||
"name": "@orionprotocol/sdk",
|
||||
"version": "0.22.0-rc3",
|
||||
"version": "0.22.0-rc5",
|
||||
"lockfileVersion": 2,
|
||||
"requires": true,
|
||||
"packages": {
|
||||
"": {
|
||||
"name": "@orionprotocol/sdk",
|
||||
"version": "0.22.0-rc3",
|
||||
"version": "0.22.0-rc5",
|
||||
"hasInstallScript": true,
|
||||
"license": "ISC",
|
||||
"dependencies": {
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@orionprotocol/sdk",
|
||||
"version": "0.22.0-rc4",
|
||||
"version": "0.22.0-rc5",
|
||||
"description": "Orion Protocol SDK",
|
||||
"main": "./lib/index.cjs",
|
||||
"module": "./lib/index.js",
|
||||
|
||||
@@ -101,7 +101,7 @@ export const signOrder = async ({
|
||||
limitOrder: limitOrderHash,
|
||||
chainId: Number(chainId),
|
||||
secretHash,
|
||||
lockOrderExpiration: expiration
|
||||
lockOrderExpiration: expiration // TODO: change to fillAndLockAtomic data
|
||||
}
|
||||
|
||||
// Generate the full crossChainOrder hash
|
||||
@@ -131,7 +131,7 @@ export const signOrder = async ({
|
||||
...order,
|
||||
id: limitOrderHash, // TODO: change to orderHash
|
||||
signature: fixedSignature,
|
||||
...(isCrossChain ? { secret, secretHash, targetChainId: Number(targetChainId) } : {})
|
||||
...(isCrossChain ? { secret, secretHash, targetChainId: Number(targetChainId), lockOrderExpiration: expiration } : {})
|
||||
};
|
||||
return signedOrder;
|
||||
};
|
||||
|
||||
@@ -51,8 +51,9 @@ export type Order = {
|
||||
buySide: 0 | 1 // uint8, 1=buy, 0=sell
|
||||
}
|
||||
export type CrossOrder = Order & {
|
||||
secretHash: string // uint64
|
||||
targetChainId: SupportedChainId // uint64
|
||||
secretHash: string // bytes32
|
||||
targetChainId: number // uint24
|
||||
lockOrderExpiration: number // uint64
|
||||
}
|
||||
|
||||
export type LockOrder = {
|
||||
|
||||
Reference in New Issue
Block a user