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