mirror of
https://github.com/orionprotocol/sdk.git
synced 2026-03-14 06:02:36 +03:00
Merge branch 'main' into feature/cross-dex-support
# Conflicts: # package-lock.json # package.json
This commit is contained in:
4
package-lock.json
generated
4
package-lock.json
generated
@@ -1,12 +1,12 @@
|
||||
{
|
||||
"name": "@orionprotocol/sdk",
|
||||
"version": "0.19.89",
|
||||
"version": "0.19.91",
|
||||
"lockfileVersion": 3,
|
||||
"requires": true,
|
||||
"packages": {
|
||||
"": {
|
||||
"name": "@orionprotocol/sdk",
|
||||
"version": "0.19.89",
|
||||
"version": "0.19.91",
|
||||
"hasInstallScript": true,
|
||||
"license": "ISC",
|
||||
"dependencies": {
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@orionprotocol/sdk",
|
||||
"version": "0.19.89-rc0",
|
||||
"version": "0.19.92-rc0",
|
||||
"description": "Orion Protocol SDK",
|
||||
"main": "./lib/index.cjs",
|
||||
"module": "./lib/index.js",
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
"label": "Ethereum",
|
||||
"shortName": "ETH",
|
||||
"code": "eth",
|
||||
"rpc": "https://trade.orionprotocol.io/eth-mainnet/rpc",
|
||||
"rpc": "https://trade.orion.xyz/eth-mainnet/rpc",
|
||||
"baseCurrencyName": "ETH",
|
||||
"contracts": {
|
||||
"WETH": "0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2",
|
||||
@@ -44,7 +44,7 @@
|
||||
"label": "Ropsten",
|
||||
"shortName": "ETH-Ropsten",
|
||||
"code": "eth",
|
||||
"rpc": "https://testing.orionprotocol.io/eth-ropsten/rpc",
|
||||
"rpc": "https://testing.orion.xyz/eth-ropsten/rpc",
|
||||
"baseCurrencyName": "ETH",
|
||||
"contracts": {
|
||||
"WETH": "",
|
||||
@@ -57,7 +57,7 @@
|
||||
"label": "Goerli",
|
||||
"shortName": "ETH-Goerli",
|
||||
"code": "eth",
|
||||
"rpc": "https://testing.orionprotocol.io/eth-goerli/rpc",
|
||||
"rpc": "https://testing.orion.xyz/eth-goerli/rpc",
|
||||
"baseCurrencyName": "ETH",
|
||||
"contracts": {
|
||||
"WETH": "",
|
||||
|
||||
@@ -1,10 +1,10 @@
|
||||
{
|
||||
"production": {
|
||||
"analyticsAPI": "https://trade.orionprotocol.io/api/stats",
|
||||
"referralAPI": "https://trade.orionprotocol.io/referral-api",
|
||||
"analyticsAPI": "https://trade.orion.xyz/api/stats",
|
||||
"referralAPI": "https://trade.orion.xyz/referral-api",
|
||||
"networks": {
|
||||
"1": {
|
||||
"api": "https://trade.orionprotocol.io/eth-mainnet",
|
||||
"api": "https://trade.orion.xyz/eth-mainnet",
|
||||
"services": {
|
||||
"aggregator": {
|
||||
"http": "/backend",
|
||||
@@ -20,7 +20,7 @@
|
||||
"liquidityMigratorAddress": "0x23a1820a47BcD022E29f6058a5FD224242F50D1A"
|
||||
},
|
||||
"56": {
|
||||
"api": "https://trade.orionprotocol.io/bsc-mainnet",
|
||||
"api": "https://trade.orion.xyz/bsc-mainnet",
|
||||
"services": {
|
||||
"aggregator": {
|
||||
"http": "/backend",
|
||||
@@ -35,7 +35,7 @@
|
||||
}
|
||||
},
|
||||
"250": {
|
||||
"api": "https://trade.orionprotocol.io/ftm-mainnet",
|
||||
"api": "https://trade.orion.xyz/ftm-mainnet",
|
||||
"services": {
|
||||
"aggregator": {
|
||||
"http": "/backend",
|
||||
@@ -50,7 +50,7 @@
|
||||
}
|
||||
},
|
||||
"137": {
|
||||
"api": "https://trade.orionprotocol.io/polygon-mainnet",
|
||||
"api": "https://trade.orion.xyz/polygon-mainnet",
|
||||
"services": {
|
||||
"aggregator": {
|
||||
"http": "/backend",
|
||||
@@ -65,7 +65,7 @@
|
||||
}
|
||||
},
|
||||
"66": {
|
||||
"api": "https://trade.orionprotocol.io/okc-mainnet",
|
||||
"api": "https://trade.orion.xyz/okc-mainnet",
|
||||
"services": {
|
||||
"aggregator": {
|
||||
"http": "/backend",
|
||||
@@ -82,11 +82,11 @@
|
||||
}
|
||||
},
|
||||
"testing": {
|
||||
"analyticsAPI": "https://trade.orionprotocol.io/api/stats",
|
||||
"referralAPI": "https://testing.orionprotocol.io/referral-api",
|
||||
"analyticsAPI": "https://trade.orion.xyz/api/stats",
|
||||
"referralAPI": "https://testing.orion.xyz/referral-api",
|
||||
"networks": {
|
||||
"97": {
|
||||
"api": "https://testing.orionprotocol.io/bsc-testnet",
|
||||
"api": "https://testing.orion.xyz/bsc-testnet",
|
||||
"services": {
|
||||
"aggregator": {
|
||||
"http": "/backend",
|
||||
@@ -102,7 +102,7 @@
|
||||
"liquidityMigratorAddress": "0x01b10dds12478C88A5E18e2707E729906bC25CfF6"
|
||||
},
|
||||
"5": {
|
||||
"api": "https://testing.orionprotocol.io/eth-goerli",
|
||||
"api": "https://testing.orion.xyz/eth-goerli",
|
||||
"services": {
|
||||
"aggregator": {
|
||||
"http": "/backend",
|
||||
@@ -117,7 +117,7 @@
|
||||
}
|
||||
},
|
||||
"421613": {
|
||||
"api": "https://testing.orionprotocol.io/arbitrum-goerli",
|
||||
"api": "https://testing.orion.xyz/arbitrum-goerli",
|
||||
"services": {
|
||||
"aggregator": {
|
||||
"http": "/backend",
|
||||
@@ -132,7 +132,7 @@
|
||||
}
|
||||
},
|
||||
"4002": {
|
||||
"api": "https://testing.orionprotocol.io/ftm-testnet",
|
||||
"api": "https://testing.orion.xyz/ftm-testnet",
|
||||
"services": {
|
||||
"aggregator": {
|
||||
"http": "/backend",
|
||||
@@ -147,7 +147,7 @@
|
||||
}
|
||||
},
|
||||
"80001": {
|
||||
"api": "https://testing.orionprotocol.io/polygon-mumbai",
|
||||
"api": "https://testing.orion.xyz/polygon-mumbai",
|
||||
"services": {
|
||||
"aggregator": {
|
||||
"http": "/backend",
|
||||
@@ -162,7 +162,7 @@
|
||||
}
|
||||
},
|
||||
"56303": {
|
||||
"api": "https://testing.orionprotocol.io/drip-testnet",
|
||||
"api": "https://testing.orion.xyz/drip-testnet",
|
||||
"services": {
|
||||
"aggregator": {
|
||||
"http": "/backend",
|
||||
@@ -179,11 +179,11 @@
|
||||
}
|
||||
},
|
||||
"staging": {
|
||||
"analyticsAPI": "https://trade.orionprotocol.io/api/stats",
|
||||
"referralAPI": "https://staging.orionprotocol.io/referral-api",
|
||||
"analyticsAPI": "https://trade.orion.xyz/api/stats",
|
||||
"referralAPI": "https://staging.orion.xyz/referral-api",
|
||||
"networks": {
|
||||
"1": {
|
||||
"api": "https://staging.orionprotocol.io/eth-mainnet",
|
||||
"api": "https://staging.orion.xyz/eth-mainnet",
|
||||
"services": {
|
||||
"aggregator": {
|
||||
"http": "/backend",
|
||||
@@ -198,7 +198,7 @@
|
||||
}
|
||||
},
|
||||
"56": {
|
||||
"api": "https://staging.orionprotocol.io/bsc-mainnet",
|
||||
"api": "https://staging.orion.xyz/bsc-mainnet",
|
||||
"services": {
|
||||
"aggregator": {
|
||||
"http": "/backend",
|
||||
@@ -213,7 +213,7 @@
|
||||
}
|
||||
},
|
||||
"250": {
|
||||
"api": "https://staging.orionprotocol.io/ftm-mainnet",
|
||||
"api": "https://staging.orion.xyz/ftm-mainnet",
|
||||
"services": {
|
||||
"aggregator": {
|
||||
"http": "/backend",
|
||||
@@ -228,7 +228,7 @@
|
||||
}
|
||||
},
|
||||
"137": {
|
||||
"api": "https://staging.orionprotocol.io/polygon-mainnet",
|
||||
"api": "https://staging.orion.xyz/polygon-mainnet",
|
||||
"services": {
|
||||
"aggregator": {
|
||||
"http": "/backend",
|
||||
@@ -243,7 +243,7 @@
|
||||
}
|
||||
},
|
||||
"66": {
|
||||
"api": "https://staging.orionprotocol.io/okc-mainnet",
|
||||
"api": "https://staging.orion.xyz/okc-mainnet",
|
||||
"services": {
|
||||
"aggregator": {
|
||||
"http": "/backend",
|
||||
@@ -260,11 +260,11 @@
|
||||
}
|
||||
},
|
||||
"experimental": {
|
||||
"analyticsAPI": "https://trade.orionprotocol.io/api/stats",
|
||||
"referralAPI": "https://testing.orionprotocol.io/referral-api",
|
||||
"analyticsAPI": "https://trade.orion.xyz/api/stats",
|
||||
"referralAPI": "https://testing.orion.xyz/referral-api",
|
||||
"networks": {
|
||||
"97": {
|
||||
"api": "https://dn-dev.orionprotocol.io/bsc-testnet",
|
||||
"api": "https://dn-dev.orion.xyz/bsc-testnet",
|
||||
"services": {
|
||||
"aggregator": {
|
||||
"http": "/backend",
|
||||
@@ -279,7 +279,7 @@
|
||||
}
|
||||
},
|
||||
"3": {
|
||||
"api": "https://dn-dev.orionprotocol.io/eth-ropsten",
|
||||
"api": "https://dn-dev.orion.xyz/eth-ropsten",
|
||||
"services": {
|
||||
"aggregator": {
|
||||
"http": "/backend",
|
||||
@@ -296,11 +296,11 @@
|
||||
}
|
||||
},
|
||||
"kucoin-production": {
|
||||
"analyticsAPI": "https://trade.orionprotocol.io/api/stats",
|
||||
"referralAPI": "https://trade.orionprotocol.io/referral-api",
|
||||
"analyticsAPI": "https://trade.orion.xyz/api/stats",
|
||||
"referralAPI": "https://trade.orion.xyz/referral-api",
|
||||
"networks": {
|
||||
"1": {
|
||||
"api": "https://trade.orionprotocol.io/eth-mainnet",
|
||||
"api": "https://trade.orion.xyz/eth-mainnet",
|
||||
"services": {
|
||||
"aggregator": {
|
||||
"http": "/backend",
|
||||
@@ -316,7 +316,7 @@
|
||||
"liquidityMigratorAddress": "0x23a1820a47BcD022E29f6058a5FD224242F50D1A"
|
||||
},
|
||||
"56": {
|
||||
"api": "https://trade.orionprotocol.io/bsc-mainnet",
|
||||
"api": "https://trade.orion.xyz/bsc-mainnet",
|
||||
"services": {
|
||||
"aggregator": {
|
||||
"http": "/backend",
|
||||
@@ -331,7 +331,7 @@
|
||||
}
|
||||
},
|
||||
"250": {
|
||||
"api": "https://trade.orionprotocol.io/ftm-mainnet",
|
||||
"api": "https://trade.orion.xyz/ftm-mainnet",
|
||||
"services": {
|
||||
"aggregator": {
|
||||
"http": "/backend",
|
||||
@@ -346,7 +346,7 @@
|
||||
}
|
||||
},
|
||||
"137": {
|
||||
"api": "https://trade.orionprotocol.io/polygon-mainnet",
|
||||
"api": "https://trade.orion.xyz/polygon-mainnet",
|
||||
"services": {
|
||||
"aggregator": {
|
||||
"http": "/backend",
|
||||
@@ -361,7 +361,7 @@
|
||||
}
|
||||
},
|
||||
"66": {
|
||||
"api": "https://trade.orionprotocol.io/okc-mainnet",
|
||||
"api": "https://trade.orion.xyz/okc-mainnet",
|
||||
"services": {
|
||||
"aggregator": {
|
||||
"http": "/backend",
|
||||
@@ -377,4 +377,4 @@
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -87,6 +87,7 @@ const subOrderSchema = baseOrderSchema.extend({
|
||||
message: `subOrder.parentOrderId must be a hex string, got ${value}`,
|
||||
})),
|
||||
exchange: z.string(),
|
||||
exchanges: z.string().array().optional(),
|
||||
brokerAddress: brokerAddressSchema,
|
||||
tradesInfo: z.record(
|
||||
z.string().uuid(),
|
||||
|
||||
@@ -23,6 +23,7 @@ const subOrderSchema = z.object({
|
||||
A: z.number(), // settled amount
|
||||
p: z.number(), // avg weighed settlement price
|
||||
e: z.string(), // exchange
|
||||
es: z.string().array().optional(), // exchanges
|
||||
b: z.string(), // broker address
|
||||
S: z.enum(subOrderStatuses), // status
|
||||
o: z.boolean(), // internal only
|
||||
@@ -52,6 +53,7 @@ export const orderUpdateSchema = z.object({
|
||||
subOrders: o.c.map((so) => ({
|
||||
pair: so.P,
|
||||
exchange: so.e,
|
||||
exchanges: so.es,
|
||||
id: so.i,
|
||||
amount: so.a,
|
||||
settledAmount: so.A,
|
||||
@@ -106,6 +108,7 @@ export const fullOrderSchema = z.object({
|
||||
subOrders: o.c.map((so) => ({
|
||||
pair: so.P,
|
||||
exchange: so.e,
|
||||
exchangs: so.es,
|
||||
id: so.i,
|
||||
amount: so.a,
|
||||
settledAmount: so.A,
|
||||
|
||||
Reference in New Issue
Block a user