mirror of
https://github.com/orionprotocol/sdk.git
synced 2026-03-14 06:02:36 +03:00
auto slippage
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@orionprotocol/sdk",
|
||||
"version": "0.20.83",
|
||||
"version": "0.20.84-rc1",
|
||||
"description": "Orion Protocol SDK",
|
||||
"main": "./lib/index.cjs",
|
||||
"module": "./lib/index.js",
|
||||
|
||||
@@ -49,6 +49,7 @@ const swapInfoBase = z.object({
|
||||
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(),
|
||||
autoSlippage: z.number().optional(),
|
||||
});
|
||||
|
||||
const swapInfoByAmountIn = swapInfoBase.extend({
|
||||
|
||||
@@ -541,6 +541,7 @@ class AggregatorWS {
|
||||
marketAmountIn: json.usd.mi,
|
||||
difference: json.usd.d,
|
||||
},
|
||||
autoSlippage: json.sl,
|
||||
};
|
||||
|
||||
switch (json.k) { // kind
|
||||
|
||||
@@ -48,6 +48,7 @@ const swapInfoSchemaBase = baseMessageSchema.extend({
|
||||
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(),
|
||||
sl: z.number().optional(),
|
||||
});
|
||||
|
||||
const swapInfoSchemaByAmountIn = swapInfoSchemaBase.extend({
|
||||
|
||||
@@ -210,6 +210,7 @@ export type SwapInfoBase = {
|
||||
marketAmountIn: number | undefined
|
||||
difference: string | undefined
|
||||
} | undefined
|
||||
autoSlippage: number | undefined
|
||||
}
|
||||
|
||||
export type SwapInfoByAmountIn = SwapInfoBase & {
|
||||
|
||||
Reference in New Issue
Block a user