mirror of
https://github.com/orionprotocol/sdk.git
synced 2026-03-17 08:41:38 +03:00
update swapinfo schema
This commit is contained in:
4
package-lock.json
generated
4
package-lock.json
generated
@@ -1,12 +1,12 @@
|
||||
{
|
||||
"name": "@orionprotocol/sdk",
|
||||
"version": "0.21.0-rc3",
|
||||
"version": "0.21.0-rc4",
|
||||
"lockfileVersion": 2,
|
||||
"requires": true,
|
||||
"packages": {
|
||||
"": {
|
||||
"name": "@orionprotocol/sdk",
|
||||
"version": "0.21.0-rc3",
|
||||
"version": "0.21.0-rc4",
|
||||
"hasInstallScript": true,
|
||||
"license": "ISC",
|
||||
"dependencies": {
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@orionprotocol/sdk",
|
||||
"version": "0.21.0-rc3",
|
||||
"version": "0.21.0-rc4",
|
||||
"description": "Orion Protocol SDK",
|
||||
"main": "./lib/index.cjs",
|
||||
"module": "./lib/index.js",
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
import { z } from 'zod';
|
||||
import uppercasedNetworkCodes from '../../../constants/uppercasedNetworkCodes';
|
||||
|
||||
const orderInfoSchema = z.object({
|
||||
assetPair: z.string().toUpperCase(),
|
||||
@@ -50,6 +51,8 @@ const swapInfoBase = z.object({
|
||||
d: z.string().optional(), // difference in available amount in/out (USD) and market amount out/in (USD) in percentage
|
||||
}).optional(),
|
||||
autoSlippage: z.number().optional(),
|
||||
sourceChain: z.enum(uppercasedNetworkCodes).optional(),
|
||||
targetChain: z.enum(uppercasedNetworkCodes).optional(),
|
||||
});
|
||||
|
||||
const swapInfoByAmountIn = swapInfoBase.extend({
|
||||
|
||||
Reference in New Issue
Block a user