Fixed some schema issues

This commit is contained in:
Aleksandr Kraiz
2023-08-21 18:42:06 +04:00
parent cd1f34bbae
commit ae0f5cd00d
2 changed files with 8 additions and 7 deletions

View File

@@ -1,6 +1,6 @@
{
"name": "@orionprotocol/sdk",
"version": "0.19.54",
"version": "0.19.55",
"description": "Orion Protocol SDK",
"main": "./lib/index.cjs",
"module": "./lib/index.js",

View File

@@ -22,14 +22,15 @@ const swapInfoBase = z.object({
minAmountOut: z.number(),
minAmountIn: z.number(),
marketPrice: z.number().nullable(), // spending asset market price
exchangeContractPaths: z.array(z.object({
pool: z.string(),
assetIn: z.string(),
assetOut: z.string(),
factory: z.string(),
})),
alternatives: z.object({ // execution alternatives
exchanges: z.array(z.string()),
path: z.object({
units: z.object({
assetPair: z.string().toUpperCase(),
action: z.string(),
}).array(),
}),
path: z.string().array(),
marketAmountOut: z.number().nullable(),
marketAmountIn: z.number().nullable(),
marketPrice: z.number(),