mirror of
https://github.com/orionprotocol/sdk.git
synced 2026-03-22 21:59:44 +03:00
fix: zod
This commit is contained in:
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "@orionprotocol/sdk",
|
"name": "@orionprotocol/sdk",
|
||||||
"version": "0.20.24-rc3",
|
"version": "0.20.24-rc4",
|
||||||
"description": "Orion Protocol SDK",
|
"description": "Orion Protocol SDK",
|
||||||
"main": "./lib/index.cjs",
|
"main": "./lib/index.cjs",
|
||||||
"module": "./lib/index.js",
|
"module": "./lib/index.js",
|
||||||
|
|||||||
@@ -41,9 +41,9 @@ const swapInfoBase = z.object({
|
|||||||
}).array(),
|
}).array(),
|
||||||
assetNameMapping: z.record(z.string()).optional(), // address to ERC20 names
|
assetNameMapping: z.record(z.string()).optional(), // address to ERC20 names
|
||||||
usd: z.object({ // USD info of this swap, nullable
|
usd: z.object({ // USD info of this swap, nullable
|
||||||
aa: z.number(), // available amount in, USD
|
aa: z.number().optional(), // available amount in, USD
|
||||||
aao: z.number().optional(), // available amount out, USD
|
aao: z.number().optional(), // available amount out, USD
|
||||||
mo: z.number(), // market amount out, USD
|
mo: z.number().optional(), // market amount out, USD
|
||||||
mi: z.number().optional(), // market amount in, USD
|
mi: z.number().optional(), // market amount in, USD
|
||||||
d: z.string().optional(), // difference in available amount in/out (USD) and market amount out/in (USD) in percentage
|
d: z.string().optional(), // difference in available amount in/out (USD) and market amount out/in (USD) in percentage
|
||||||
}).optional(),
|
}).optional(),
|
||||||
|
|||||||
@@ -42,9 +42,9 @@ const swapInfoSchemaBase = baseMessageSchema.extend({
|
|||||||
f: factorySchema, // factory
|
f: factorySchema, // factory
|
||||||
})),
|
})),
|
||||||
usd: z.object({ // USD info of this swap, nullable
|
usd: z.object({ // USD info of this swap, nullable
|
||||||
aa: z.number(), // available amount in, USD
|
aa: z.number().optional(), // available amount in, USD
|
||||||
aao: z.number().optional(), // available amount out, USD
|
aao: z.number().optional(), // available amount out, USD
|
||||||
mo: z.number(), // market amount out, USD
|
mo: z.number().optional(), // market amount out, USD
|
||||||
mi: z.number().optional(), // market amount in, USD
|
mi: z.number().optional(), // market amount in, USD
|
||||||
d: z.string().optional(), // difference in available amount in/out (USD) and market amount out/in (USD) in percentage
|
d: z.string().optional(), // difference in available amount in/out (USD) and market amount out/in (USD) in percentage
|
||||||
}).optional(),
|
}).optional(),
|
||||||
|
|||||||
@@ -198,9 +198,9 @@ export type SwapInfoBase = {
|
|||||||
alternatives: SwapInfoAlternative[]
|
alternatives: SwapInfoAlternative[]
|
||||||
assetsNameMapping?: Partial<Record<string, string>> | undefined
|
assetsNameMapping?: Partial<Record<string, string>> | undefined
|
||||||
usdInfo: {
|
usdInfo: {
|
||||||
availableAmountIn: number
|
availableAmountIn: number | undefined
|
||||||
availableAmountOut: number | undefined
|
availableAmountOut: number | undefined
|
||||||
marketAmountOut: number
|
marketAmountOut: number | undefined
|
||||||
marketAmountIn: number | undefined
|
marketAmountIn: number | undefined
|
||||||
difference: string | undefined
|
difference: string | undefined
|
||||||
} | undefined
|
} | undefined
|
||||||
|
|||||||
Reference in New Issue
Block a user