mirror of
https://github.com/orionprotocol/sdk.git
synced 2026-03-15 22:52:36 +03:00
update orderTypes.ts
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-rc6",
|
||||
"version": "0.22.0-rc7",
|
||||
"lockfileVersion": 2,
|
||||
"requires": true,
|
||||
"packages": {
|
||||
"": {
|
||||
"name": "@orionprotocol/sdk",
|
||||
"version": "0.22.0-rc6",
|
||||
"version": "0.22.0-rc7",
|
||||
"hasInstallScript": true,
|
||||
"license": "ISC",
|
||||
"dependencies": {
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@orionprotocol/sdk",
|
||||
"version": "0.22.0-rc6",
|
||||
"version": "0.22.0-rc7",
|
||||
"description": "Orion Protocol SDK",
|
||||
"main": "./lib/index.cjs",
|
||||
"module": "./lib/index.js",
|
||||
|
||||
@@ -1,10 +1,23 @@
|
||||
const ORDER_TYPES = {
|
||||
export const ORDER_TYPES = {
|
||||
CrossChainOrder: [
|
||||
{ name: 'limitOrder', type: 'bytes32' },
|
||||
{ name: 'limitOrder', type: 'Order' },
|
||||
{ name: 'chainId', type: 'uint24' },
|
||||
{ name: 'secretHash', type: 'bytes32' },
|
||||
{ name: 'lockOrderExpiration', type: 'uint64' },
|
||||
],
|
||||
};
|
||||
Order: [
|
||||
{ name: 'senderAddress', type: 'address' },
|
||||
{ name: 'matcherAddress', type: 'address' },
|
||||
{ name: 'baseAsset', type: 'address' },
|
||||
{ name: 'quoteAsset', type: 'address' },
|
||||
{ name: 'matcherFeeAsset', type: 'address' },
|
||||
{ name: 'amount', type: 'uint64' },
|
||||
{ name: 'price', type: 'uint64' },
|
||||
{ name: 'matcherFee', type: 'uint64' },
|
||||
{ name: 'nonce', type: 'uint64' },
|
||||
{ name: 'expiration', type: 'uint64' },
|
||||
{ name: 'buySide', type: 'uint8' },
|
||||
]
|
||||
}
|
||||
|
||||
export default ORDER_TYPES;
|
||||
|
||||
@@ -98,7 +98,7 @@ export const signOrder = async ({
|
||||
)));
|
||||
|
||||
const crossChainOrder = {
|
||||
limitOrder: limitOrderHash,
|
||||
limitOrder: order,
|
||||
chainId: Number(chainId),
|
||||
secretHash,
|
||||
lockOrderExpiration: expiration // TODO: change to fillAndLockAtomic data
|
||||
@@ -115,8 +115,7 @@ export const signOrder = async ({
|
||||
getDomainData(chainId),
|
||||
ORDER_TYPES,
|
||||
{
|
||||
order,
|
||||
...crossChainOrder,
|
||||
crossChainOrder,
|
||||
}
|
||||
);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user