@1inch/swap-vm-sdk 0.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +103 -0
- package/README.md +584 -0
- package/dist/abi/SwapVM.abi.d.mts +403 -0
- package/dist/abi/SwapVM.abi.d.ts +403 -0
- package/dist/abi/index.d.mts +1 -0
- package/dist/abi/index.d.ts +1 -0
- package/dist/index.d.mts +4 -0
- package/dist/index.d.ts +4 -0
- package/dist/index.js +3842 -0
- package/dist/index.mjs +3777 -0
- package/dist/swap-vm/index.d.mts +6 -0
- package/dist/swap-vm/index.d.ts +6 -0
- package/dist/swap-vm/instructions/balances/balances-args-coder.d.mts +7 -0
- package/dist/swap-vm/instructions/balances/balances-args-coder.d.ts +7 -0
- package/dist/swap-vm/instructions/balances/balances-args.d.mts +17 -0
- package/dist/swap-vm/instructions/balances/balances-args.d.ts +17 -0
- package/dist/swap-vm/instructions/balances/index.d.mts +3 -0
- package/dist/swap-vm/instructions/balances/index.d.ts +3 -0
- package/dist/swap-vm/instructions/balances/opcodes.d.mts +12 -0
- package/dist/swap-vm/instructions/balances/opcodes.d.ts +12 -0
- package/dist/swap-vm/instructions/balances/types.d.mts +5 -0
- package/dist/swap-vm/instructions/balances/types.d.ts +5 -0
- package/dist/swap-vm/instructions/base-fee-adjuster/base-fee-adjuster-args-coder.d.mts +7 -0
- package/dist/swap-vm/instructions/base-fee-adjuster/base-fee-adjuster-args-coder.d.ts +7 -0
- package/dist/swap-vm/instructions/base-fee-adjuster/base-fee-adjuster-args.d.mts +40 -0
- package/dist/swap-vm/instructions/base-fee-adjuster/base-fee-adjuster-args.d.ts +40 -0
- package/dist/swap-vm/instructions/base-fee-adjuster/index.d.mts +2 -0
- package/dist/swap-vm/instructions/base-fee-adjuster/index.d.ts +2 -0
- package/dist/swap-vm/instructions/base-fee-adjuster/opcodes.d.mts +5 -0
- package/dist/swap-vm/instructions/base-fee-adjuster/opcodes.d.ts +5 -0
- package/dist/swap-vm/instructions/concentrate/concentrate-grow-liquidity-2d-args-coder.d.mts +7 -0
- package/dist/swap-vm/instructions/concentrate/concentrate-grow-liquidity-2d-args-coder.d.ts +7 -0
- package/dist/swap-vm/instructions/concentrate/concentrate-grow-liquidity-2d-args.d.mts +21 -0
- package/dist/swap-vm/instructions/concentrate/concentrate-grow-liquidity-2d-args.d.ts +21 -0
- package/dist/swap-vm/instructions/concentrate/concentrate-grow-liquidity-xd-args-coder.d.mts +7 -0
- package/dist/swap-vm/instructions/concentrate/concentrate-grow-liquidity-xd-args-coder.d.ts +7 -0
- package/dist/swap-vm/instructions/concentrate/concentrate-grow-liquidity-xd-args.d.mts +17 -0
- package/dist/swap-vm/instructions/concentrate/concentrate-grow-liquidity-xd-args.d.ts +17 -0
- package/dist/swap-vm/instructions/concentrate/index.d.mts +5 -0
- package/dist/swap-vm/instructions/concentrate/index.d.ts +5 -0
- package/dist/swap-vm/instructions/concentrate/opcodes.d.mts +10 -0
- package/dist/swap-vm/instructions/concentrate/opcodes.d.ts +10 -0
- package/dist/swap-vm/instructions/concentrate/types.d.mts +5 -0
- package/dist/swap-vm/instructions/concentrate/types.d.ts +5 -0
- package/dist/swap-vm/instructions/concentrate/utils.d.mts +4 -0
- package/dist/swap-vm/instructions/concentrate/utils.d.ts +4 -0
- package/dist/swap-vm/instructions/controls/deadline-args-coder.d.mts +7 -0
- package/dist/swap-vm/instructions/controls/deadline-args-coder.d.ts +7 -0
- package/dist/swap-vm/instructions/controls/deadline-args.d.mts +9 -0
- package/dist/swap-vm/instructions/controls/deadline-args.d.ts +9 -0
- package/dist/swap-vm/instructions/controls/index.d.mts +8 -0
- package/dist/swap-vm/instructions/controls/index.d.ts +8 -0
- package/dist/swap-vm/instructions/controls/jump-args-coder.d.mts +7 -0
- package/dist/swap-vm/instructions/controls/jump-args-coder.d.ts +7 -0
- package/dist/swap-vm/instructions/controls/jump-args.d.mts +16 -0
- package/dist/swap-vm/instructions/controls/jump-args.d.ts +16 -0
- package/dist/swap-vm/instructions/controls/jump-if-token-args-coder.d.mts +7 -0
- package/dist/swap-vm/instructions/controls/jump-if-token-args-coder.d.ts +7 -0
- package/dist/swap-vm/instructions/controls/jump-if-token-args.d.mts +10 -0
- package/dist/swap-vm/instructions/controls/jump-if-token-args.d.ts +10 -0
- package/dist/swap-vm/instructions/controls/only-taker-token-balance-gte-args-coder.d.mts +7 -0
- package/dist/swap-vm/instructions/controls/only-taker-token-balance-gte-args-coder.d.ts +7 -0
- package/dist/swap-vm/instructions/controls/only-taker-token-balance-gte-args.d.mts +17 -0
- package/dist/swap-vm/instructions/controls/only-taker-token-balance-gte-args.d.ts +17 -0
- package/dist/swap-vm/instructions/controls/only-taker-token-balance-non-zero-args-coder.d.mts +7 -0
- package/dist/swap-vm/instructions/controls/only-taker-token-balance-non-zero-args-coder.d.ts +7 -0
- package/dist/swap-vm/instructions/controls/only-taker-token-balance-non-zero-args.d.mts +16 -0
- package/dist/swap-vm/instructions/controls/only-taker-token-balance-non-zero-args.d.ts +16 -0
- package/dist/swap-vm/instructions/controls/only-taker-token-supply-share-gte-args-coder.d.mts +7 -0
- package/dist/swap-vm/instructions/controls/only-taker-token-supply-share-gte-args-coder.d.ts +7 -0
- package/dist/swap-vm/instructions/controls/only-taker-token-supply-share-gte-args.d.mts +18 -0
- package/dist/swap-vm/instructions/controls/only-taker-token-supply-share-gte-args.d.ts +18 -0
- package/dist/swap-vm/instructions/controls/opcodes.d.mts +36 -0
- package/dist/swap-vm/instructions/controls/opcodes.d.ts +36 -0
- package/dist/swap-vm/instructions/controls/salt-args-coder.d.mts +7 -0
- package/dist/swap-vm/instructions/controls/salt-args-coder.d.ts +7 -0
- package/dist/swap-vm/instructions/controls/salt-args.d.mts +16 -0
- package/dist/swap-vm/instructions/controls/salt-args.d.ts +16 -0
- package/dist/swap-vm/instructions/debug/debug-args.d.mts +8 -0
- package/dist/swap-vm/instructions/debug/debug-args.d.ts +8 -0
- package/dist/swap-vm/instructions/debug/debug-empty-args.d.mts +19 -0
- package/dist/swap-vm/instructions/debug/debug-empty-args.d.ts +19 -0
- package/dist/swap-vm/instructions/debug/opcodes.d.mts +18 -0
- package/dist/swap-vm/instructions/debug/opcodes.d.ts +18 -0
- package/dist/swap-vm/instructions/debug/print-amount-for-swap.d.mts +16 -0
- package/dist/swap-vm/instructions/debug/print-amount-for-swap.d.ts +16 -0
- package/dist/swap-vm/instructions/debug/print-context.d.mts +16 -0
- package/dist/swap-vm/instructions/debug/print-context.d.ts +16 -0
- package/dist/swap-vm/instructions/debug/print-free-memory-pointer.d.mts +16 -0
- package/dist/swap-vm/instructions/debug/print-free-memory-pointer.d.ts +16 -0
- package/dist/swap-vm/instructions/debug/print-gas-left.d.mts +16 -0
- package/dist/swap-vm/instructions/debug/print-gas-left.d.ts +16 -0
- package/dist/swap-vm/instructions/debug/print-swap-query.d.mts +16 -0
- package/dist/swap-vm/instructions/debug/print-swap-query.d.ts +16 -0
- package/dist/swap-vm/instructions/debug/print-swap-registers.d.mts +16 -0
- package/dist/swap-vm/instructions/debug/print-swap-registers.d.ts +16 -0
- package/dist/swap-vm/instructions/decay/decay-xd-args-coder.d.mts +7 -0
- package/dist/swap-vm/instructions/decay/decay-xd-args-coder.d.ts +7 -0
- package/dist/swap-vm/instructions/decay/decay-xd-args.d.mts +16 -0
- package/dist/swap-vm/instructions/decay/decay-xd-args.d.ts +16 -0
- package/dist/swap-vm/instructions/decay/index.d.mts +2 -0
- package/dist/swap-vm/instructions/decay/index.d.ts +2 -0
- package/dist/swap-vm/instructions/decay/opcodes.d.mts +5 -0
- package/dist/swap-vm/instructions/decay/opcodes.d.ts +5 -0
- package/dist/swap-vm/instructions/dutch-auction/dutch-auction-args-coder.d.mts +7 -0
- package/dist/swap-vm/instructions/dutch-auction/dutch-auction-args-coder.d.ts +7 -0
- package/dist/swap-vm/instructions/dutch-auction/dutch-auction-args.d.mts +44 -0
- package/dist/swap-vm/instructions/dutch-auction/dutch-auction-args.d.ts +44 -0
- package/dist/swap-vm/instructions/dutch-auction/index.d.mts +2 -0
- package/dist/swap-vm/instructions/dutch-auction/index.d.ts +2 -0
- package/dist/swap-vm/instructions/dutch-auction/opcodes.d.mts +10 -0
- package/dist/swap-vm/instructions/dutch-auction/opcodes.d.ts +10 -0
- package/dist/swap-vm/instructions/empty.d.mts +13 -0
- package/dist/swap-vm/instructions/empty.d.ts +13 -0
- package/dist/swap-vm/instructions/extruction/extruction-args-coder.d.mts +7 -0
- package/dist/swap-vm/instructions/extruction/extruction-args-coder.d.ts +7 -0
- package/dist/swap-vm/instructions/extruction/extruction-args.d.mts +21 -0
- package/dist/swap-vm/instructions/extruction/extruction-args.d.ts +21 -0
- package/dist/swap-vm/instructions/extruction/index.d.mts +2 -0
- package/dist/swap-vm/instructions/extruction/index.d.ts +2 -0
- package/dist/swap-vm/instructions/extruction/opcodes.d.mts +5 -0
- package/dist/swap-vm/instructions/extruction/opcodes.d.ts +5 -0
- package/dist/swap-vm/instructions/fee/flat-fee-args-coder.d.mts +7 -0
- package/dist/swap-vm/instructions/fee/flat-fee-args-coder.d.ts +7 -0
- package/dist/swap-vm/instructions/fee/flat-fee-args.d.mts +28 -0
- package/dist/swap-vm/instructions/fee/flat-fee-args.d.ts +28 -0
- package/dist/swap-vm/instructions/fee/index.d.mts +3 -0
- package/dist/swap-vm/instructions/fee/index.d.ts +3 -0
- package/dist/swap-vm/instructions/fee/opcodes.d.mts +30 -0
- package/dist/swap-vm/instructions/fee/opcodes.d.ts +30 -0
- package/dist/swap-vm/instructions/fee/protocol-fee-args-coder.d.mts +7 -0
- package/dist/swap-vm/instructions/fee/protocol-fee-args-coder.d.ts +7 -0
- package/dist/swap-vm/instructions/fee/protocol-fee-args.d.mts +35 -0
- package/dist/swap-vm/instructions/fee/protocol-fee-args.d.ts +35 -0
- package/dist/swap-vm/instructions/index.d.mts +29 -0
- package/dist/swap-vm/instructions/index.d.ts +29 -0
- package/dist/swap-vm/instructions/instruction.d.mts +7 -0
- package/dist/swap-vm/instructions/instruction.d.ts +7 -0
- package/dist/swap-vm/instructions/invalidators/index.d.mts +4 -0
- package/dist/swap-vm/instructions/invalidators/index.d.ts +4 -0
- package/dist/swap-vm/instructions/invalidators/invalidate-bit-1d-args-coder.d.mts +7 -0
- package/dist/swap-vm/instructions/invalidators/invalidate-bit-1d-args-coder.d.ts +7 -0
- package/dist/swap-vm/instructions/invalidators/invalidate-bit-1d-args.d.mts +16 -0
- package/dist/swap-vm/instructions/invalidators/invalidate-bit-1d-args.d.ts +16 -0
- package/dist/swap-vm/instructions/invalidators/invalidate-token-in-1d-args-coder.d.mts +7 -0
- package/dist/swap-vm/instructions/invalidators/invalidate-token-in-1d-args-coder.d.ts +7 -0
- package/dist/swap-vm/instructions/invalidators/invalidate-token-in-1d-args.d.mts +8 -0
- package/dist/swap-vm/instructions/invalidators/invalidate-token-in-1d-args.d.ts +8 -0
- package/dist/swap-vm/instructions/invalidators/invalidate-token-out-1d-args-coder.d.mts +7 -0
- package/dist/swap-vm/instructions/invalidators/invalidate-token-out-1d-args-coder.d.ts +7 -0
- package/dist/swap-vm/instructions/invalidators/invalidate-token-out-1d-args.d.mts +8 -0
- package/dist/swap-vm/instructions/invalidators/invalidate-token-out-1d-args.d.ts +8 -0
- package/dist/swap-vm/instructions/invalidators/opcodes.d.mts +15 -0
- package/dist/swap-vm/instructions/invalidators/opcodes.d.ts +15 -0
- package/dist/swap-vm/instructions/limit-swap/index.d.mts +2 -0
- package/dist/swap-vm/instructions/limit-swap/index.d.ts +2 -0
- package/dist/swap-vm/instructions/limit-swap/limit-swap-direction-args-coder.d.mts +7 -0
- package/dist/swap-vm/instructions/limit-swap/limit-swap-direction-args-coder.d.ts +7 -0
- package/dist/swap-vm/instructions/limit-swap/limit-swap-direction-args.d.mts +24 -0
- package/dist/swap-vm/instructions/limit-swap/limit-swap-direction-args.d.ts +24 -0
- package/dist/swap-vm/instructions/limit-swap/opcodes.d.mts +10 -0
- package/dist/swap-vm/instructions/limit-swap/opcodes.d.ts +10 -0
- package/dist/swap-vm/instructions/min-rate/index.d.mts +2 -0
- package/dist/swap-vm/instructions/min-rate/index.d.ts +2 -0
- package/dist/swap-vm/instructions/min-rate/min-rate-args-coder.d.mts +7 -0
- package/dist/swap-vm/instructions/min-rate/min-rate-args-coder.d.ts +7 -0
- package/dist/swap-vm/instructions/min-rate/min-rate-args.d.mts +22 -0
- package/dist/swap-vm/instructions/min-rate/min-rate-args.d.ts +22 -0
- package/dist/swap-vm/instructions/min-rate/opcodes.d.mts +10 -0
- package/dist/swap-vm/instructions/min-rate/opcodes.d.ts +10 -0
- package/dist/swap-vm/instructions/opcode.d.mts +8 -0
- package/dist/swap-vm/instructions/opcode.d.ts +8 -0
- package/dist/swap-vm/instructions/oracle-price-adjuster/index.d.mts +2 -0
- package/dist/swap-vm/instructions/oracle-price-adjuster/index.d.ts +2 -0
- package/dist/swap-vm/instructions/oracle-price-adjuster/opcodes.d.mts +5 -0
- package/dist/swap-vm/instructions/oracle-price-adjuster/opcodes.d.ts +5 -0
- package/dist/swap-vm/instructions/oracle-price-adjuster/oracle-price-adjuster-args-coder.d.mts +7 -0
- package/dist/swap-vm/instructions/oracle-price-adjuster/oracle-price-adjuster-args-coder.d.ts +7 -0
- package/dist/swap-vm/instructions/oracle-price-adjuster/oracle-price-adjuster-args.d.mts +41 -0
- package/dist/swap-vm/instructions/oracle-price-adjuster/oracle-price-adjuster-args.d.ts +41 -0
- package/dist/swap-vm/instructions/stable-swap/index.d.mts +2 -0
- package/dist/swap-vm/instructions/stable-swap/index.d.ts +2 -0
- package/dist/swap-vm/instructions/stable-swap/opcodes.d.mts +4 -0
- package/dist/swap-vm/instructions/stable-swap/opcodes.d.ts +4 -0
- package/dist/swap-vm/instructions/stable-swap/stable-swap-2d-args-coder.d.mts +7 -0
- package/dist/swap-vm/instructions/stable-swap/stable-swap-2d-args-coder.d.ts +7 -0
- package/dist/swap-vm/instructions/stable-swap/stable-swap-2d-args.d.mts +25 -0
- package/dist/swap-vm/instructions/stable-swap/stable-swap-2d-args.d.ts +25 -0
- package/dist/swap-vm/instructions/twap-swap/index.d.mts +2 -0
- package/dist/swap-vm/instructions/twap-swap/index.d.ts +2 -0
- package/dist/swap-vm/instructions/twap-swap/opcodes.d.mts +5 -0
- package/dist/swap-vm/instructions/twap-swap/opcodes.d.ts +5 -0
- package/dist/swap-vm/instructions/twap-swap/twap-swap-args-coder.d.mts +7 -0
- package/dist/swap-vm/instructions/twap-swap/twap-swap-args-coder.d.ts +7 -0
- package/dist/swap-vm/instructions/twap-swap/twap-swap-args.d.mts +71 -0
- package/dist/swap-vm/instructions/twap-swap/twap-swap-args.d.ts +71 -0
- package/dist/swap-vm/instructions/types.d.mts +18 -0
- package/dist/swap-vm/instructions/types.d.ts +18 -0
- package/dist/swap-vm/instructions/xyc-swap/index.d.mts +2 -0
- package/dist/swap-vm/instructions/xyc-swap/index.d.ts +2 -0
- package/dist/swap-vm/instructions/xyc-swap/opcodes.d.mts +5 -0
- package/dist/swap-vm/instructions/xyc-swap/opcodes.d.ts +5 -0
- package/dist/swap-vm/instructions/xyc-swap/xyc-swap-xd-args-coder.d.mts +7 -0
- package/dist/swap-vm/instructions/xyc-swap/xyc-swap-xd-args-coder.d.ts +7 -0
- package/dist/swap-vm/instructions/xyc-swap/xyc-swap-xd-args.d.mts +15 -0
- package/dist/swap-vm/instructions/xyc-swap/xyc-swap-xd-args.d.ts +15 -0
- package/dist/swap-vm/maker-traits.d.mts +206 -0
- package/dist/swap-vm/maker-traits.d.ts +206 -0
- package/dist/swap-vm/order.d.mts +84 -0
- package/dist/swap-vm/order.d.ts +84 -0
- package/dist/swap-vm/programs/aqua-program-builder.d.mts +118 -0
- package/dist/swap-vm/programs/aqua-program-builder.d.ts +118 -0
- package/dist/swap-vm/programs/index.d.mts +4 -0
- package/dist/swap-vm/programs/index.d.ts +4 -0
- package/dist/swap-vm/programs/program-builder.d.mts +26 -0
- package/dist/swap-vm/programs/program-builder.d.ts +26 -0
- package/dist/swap-vm/programs/regular-program-builder.d.mts +187 -0
- package/dist/swap-vm/programs/regular-program-builder.d.ts +187 -0
- package/dist/swap-vm/programs/swap-vm-program.d.mts +6 -0
- package/dist/swap-vm/programs/swap-vm-program.d.ts +6 -0
- package/dist/swap-vm/strategies/aqua-amm-strategy.d.mts +32 -0
- package/dist/swap-vm/strategies/aqua-amm-strategy.d.ts +32 -0
- package/dist/swap-vm/strategies/index.d.mts +1 -0
- package/dist/swap-vm/strategies/index.d.ts +1 -0
- package/dist/swap-vm/taker-traits.d.mts +214 -0
- package/dist/swap-vm/taker-traits.d.ts +214 -0
- package/dist/swap-vm/types.d.mts +22 -0
- package/dist/swap-vm/types.d.ts +22 -0
- package/dist/swap-vm-contract/constants.d.mts +13 -0
- package/dist/swap-vm-contract/constants.d.ts +13 -0
- package/dist/swap-vm-contract/events/index.d.mts +1 -0
- package/dist/swap-vm-contract/events/index.d.ts +1 -0
- package/dist/swap-vm-contract/events/swapped-event.d.mts +19 -0
- package/dist/swap-vm-contract/events/swapped-event.d.ts +19 -0
- package/dist/swap-vm-contract/index.d.mts +4 -0
- package/dist/swap-vm-contract/index.d.ts +4 -0
- package/dist/swap-vm-contract/swap-vm-contract.d.mts +38 -0
- package/dist/swap-vm-contract/swap-vm-contract.d.ts +38 -0
- package/dist/swap-vm-contract/types.d.mts +22 -0
- package/dist/swap-vm-contract/types.d.ts +22 -0
- package/package.json +72 -0
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { HexString } from '@1inch/sdk-core';
|
|
2
|
+
import { InvalidateTokenIn1DArgs } from './invalidate-token-in-1d-args';
|
|
3
|
+
import type { IArgsCoder } from '../types';
|
|
4
|
+
export declare class InvalidateTokenIn1DArgsCoder implements IArgsCoder<InvalidateTokenIn1DArgs> {
|
|
5
|
+
encode(_args: InvalidateTokenIn1DArgs): HexString;
|
|
6
|
+
decode(_data: HexString): InvalidateTokenIn1DArgs;
|
|
7
|
+
}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { HexString } from '@1inch/sdk-core';
|
|
2
|
+
import { InvalidateTokenIn1DArgs } from './invalidate-token-in-1d-args';
|
|
3
|
+
import type { IArgsCoder } from '../types';
|
|
4
|
+
export declare class InvalidateTokenIn1DArgsCoder implements IArgsCoder<InvalidateTokenIn1DArgs> {
|
|
5
|
+
encode(_args: InvalidateTokenIn1DArgs): HexString;
|
|
6
|
+
decode(_data: HexString): InvalidateTokenIn1DArgs;
|
|
7
|
+
}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import type { HexString } from '@1inch/sdk-core';
|
|
2
|
+
import type { IArgsData } from '../types';
|
|
3
|
+
export declare class InvalidateTokenIn1DArgs implements IArgsData {
|
|
4
|
+
static readonly CODER: any;
|
|
5
|
+
constructor();
|
|
6
|
+
static decode(data: HexString): InvalidateTokenIn1DArgs;
|
|
7
|
+
toJSON(): Record<string, unknown>;
|
|
8
|
+
}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import type { HexString } from '@1inch/sdk-core';
|
|
2
|
+
import type { IArgsData } from '../types';
|
|
3
|
+
export declare class InvalidateTokenIn1DArgs implements IArgsData {
|
|
4
|
+
static readonly CODER: any;
|
|
5
|
+
constructor();
|
|
6
|
+
static decode(data: HexString): InvalidateTokenIn1DArgs;
|
|
7
|
+
toJSON(): Record<string, unknown>;
|
|
8
|
+
}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { HexString } from '@1inch/sdk-core';
|
|
2
|
+
import { InvalidateTokenOut1DArgs } from './invalidate-token-out-1d-args';
|
|
3
|
+
import type { IArgsCoder } from '../types';
|
|
4
|
+
export declare class InvalidateTokenOut1DArgsCoder implements IArgsCoder<InvalidateTokenOut1DArgs> {
|
|
5
|
+
encode(_args: InvalidateTokenOut1DArgs): HexString;
|
|
6
|
+
decode(_data: HexString): InvalidateTokenOut1DArgs;
|
|
7
|
+
}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { HexString } from '@1inch/sdk-core';
|
|
2
|
+
import { InvalidateTokenOut1DArgs } from './invalidate-token-out-1d-args';
|
|
3
|
+
import type { IArgsCoder } from '../types';
|
|
4
|
+
export declare class InvalidateTokenOut1DArgsCoder implements IArgsCoder<InvalidateTokenOut1DArgs> {
|
|
5
|
+
encode(_args: InvalidateTokenOut1DArgs): HexString;
|
|
6
|
+
decode(_data: HexString): InvalidateTokenOut1DArgs;
|
|
7
|
+
}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import type { HexString } from '@1inch/sdk-core';
|
|
2
|
+
import type { IArgsData } from '../types';
|
|
3
|
+
export declare class InvalidateTokenOut1DArgs implements IArgsData {
|
|
4
|
+
static readonly CODER: any;
|
|
5
|
+
constructor();
|
|
6
|
+
static decode(data: HexString): InvalidateTokenOut1DArgs;
|
|
7
|
+
toJSON(): Record<string, unknown>;
|
|
8
|
+
}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import type { HexString } from '@1inch/sdk-core';
|
|
2
|
+
import type { IArgsData } from '../types';
|
|
3
|
+
export declare class InvalidateTokenOut1DArgs implements IArgsData {
|
|
4
|
+
static readonly CODER: any;
|
|
5
|
+
constructor();
|
|
6
|
+
static decode(data: HexString): InvalidateTokenOut1DArgs;
|
|
7
|
+
toJSON(): Record<string, unknown>;
|
|
8
|
+
}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Invalidates a specific bit index for order uniqueness
|
|
3
|
+
* @see https://github.com/1inch/swap-vm/blob/main/src/instructions/Invalidators.sol#L75
|
|
4
|
+
**/
|
|
5
|
+
export declare const invalidateBit1D: any;
|
|
6
|
+
/**
|
|
7
|
+
* Invalidates order by token input to prevent re-use
|
|
8
|
+
* @see https://github.com/1inch/swap-vm/blob/main/src/instructions/Invalidators.sol#L85
|
|
9
|
+
**/
|
|
10
|
+
export declare const invalidateTokenIn1D: any;
|
|
11
|
+
/**
|
|
12
|
+
* Invalidates order by token output to prevent re-use
|
|
13
|
+
* @see https://github.com/1inch/swap-vm/blob/main/src/instructions/Invalidators.sol#L103
|
|
14
|
+
**/
|
|
15
|
+
export declare const invalidateTokenOut1D: any;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Invalidates a specific bit index for order uniqueness
|
|
3
|
+
* @see https://github.com/1inch/swap-vm/blob/main/src/instructions/Invalidators.sol#L75
|
|
4
|
+
**/
|
|
5
|
+
export declare const invalidateBit1D: any;
|
|
6
|
+
/**
|
|
7
|
+
* Invalidates order by token input to prevent re-use
|
|
8
|
+
* @see https://github.com/1inch/swap-vm/blob/main/src/instructions/Invalidators.sol#L85
|
|
9
|
+
**/
|
|
10
|
+
export declare const invalidateTokenIn1D: any;
|
|
11
|
+
/**
|
|
12
|
+
* Invalidates order by token output to prevent re-use
|
|
13
|
+
* @see https://github.com/1inch/swap-vm/blob/main/src/instructions/Invalidators.sol#L103
|
|
14
|
+
**/
|
|
15
|
+
export declare const invalidateTokenOut1D: any;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { HexString } from '@1inch/sdk-core';
|
|
2
|
+
import { LimitSwapDirectionArgs } from './limit-swap-direction-args';
|
|
3
|
+
import type { IArgsCoder } from '../types';
|
|
4
|
+
export declare class LimitSwapDirectionArgsCoder implements IArgsCoder<LimitSwapDirectionArgs> {
|
|
5
|
+
encode(args: LimitSwapDirectionArgs): HexString;
|
|
6
|
+
decode(data: HexString): LimitSwapDirectionArgs;
|
|
7
|
+
}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { HexString } from '@1inch/sdk-core';
|
|
2
|
+
import { LimitSwapDirectionArgs } from './limit-swap-direction-args';
|
|
3
|
+
import type { IArgsCoder } from '../types';
|
|
4
|
+
export declare class LimitSwapDirectionArgsCoder implements IArgsCoder<LimitSwapDirectionArgs> {
|
|
5
|
+
encode(args: LimitSwapDirectionArgs): HexString;
|
|
6
|
+
decode(data: HexString): LimitSwapDirectionArgs;
|
|
7
|
+
}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import type { Address, HexString } from '@1inch/sdk-core';
|
|
2
|
+
import type { IArgsData } from '../types';
|
|
3
|
+
/**
|
|
4
|
+
* Arguments for limit swap instructions (limitSwap1D, limitSwapOnlyFull1D)
|
|
5
|
+
* @see https://github.com/1inch/swap-vm/blob/main/src/instructions/LimitSwap.sol#L27
|
|
6
|
+
**/
|
|
7
|
+
export declare class LimitSwapDirectionArgs implements IArgsData {
|
|
8
|
+
/**
|
|
9
|
+
* true if tokenIn < tokenOut
|
|
10
|
+
**/
|
|
11
|
+
readonly makerDirectionLt: boolean;
|
|
12
|
+
static readonly CODER: any;
|
|
13
|
+
constructor(
|
|
14
|
+
/**
|
|
15
|
+
* true if tokenIn < tokenOut
|
|
16
|
+
**/
|
|
17
|
+
makerDirectionLt: boolean);
|
|
18
|
+
static fromTokens(tokenIn: Address, tokenOut: Address): LimitSwapDirectionArgs;
|
|
19
|
+
/**
|
|
20
|
+
* Decodes hex data into LimitSwapDirectionArgs instance
|
|
21
|
+
**/
|
|
22
|
+
static decode(data: HexString): LimitSwapDirectionArgs;
|
|
23
|
+
toJSON(): Record<string, unknown>;
|
|
24
|
+
}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import type { Address, HexString } from '@1inch/sdk-core';
|
|
2
|
+
import type { IArgsData } from '../types';
|
|
3
|
+
/**
|
|
4
|
+
* Arguments for limit swap instructions (limitSwap1D, limitSwapOnlyFull1D)
|
|
5
|
+
* @see https://github.com/1inch/swap-vm/blob/main/src/instructions/LimitSwap.sol#L27
|
|
6
|
+
**/
|
|
7
|
+
export declare class LimitSwapDirectionArgs implements IArgsData {
|
|
8
|
+
/**
|
|
9
|
+
* true if tokenIn < tokenOut
|
|
10
|
+
**/
|
|
11
|
+
readonly makerDirectionLt: boolean;
|
|
12
|
+
static readonly CODER: any;
|
|
13
|
+
constructor(
|
|
14
|
+
/**
|
|
15
|
+
* true if tokenIn < tokenOut
|
|
16
|
+
**/
|
|
17
|
+
makerDirectionLt: boolean);
|
|
18
|
+
static fromTokens(tokenIn: Address, tokenOut: Address): LimitSwapDirectionArgs;
|
|
19
|
+
/**
|
|
20
|
+
* Decodes hex data into LimitSwapDirectionArgs instance
|
|
21
|
+
**/
|
|
22
|
+
static decode(data: HexString): LimitSwapDirectionArgs;
|
|
23
|
+
toJSON(): Record<string, unknown>;
|
|
24
|
+
}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Limit order swap with proportional execution
|
|
3
|
+
* @see https://github.com/1inch/swap-vm/blob/main/src/instructions/LimitSwap.sol#L27
|
|
4
|
+
**/
|
|
5
|
+
export declare const limitSwap1D: any;
|
|
6
|
+
/**
|
|
7
|
+
* Limit order swap requiring full amount execution
|
|
8
|
+
* @see https://github.com/1inch/swap-vm/blob/main/src/instructions/LimitSwap.sol#L44
|
|
9
|
+
**/
|
|
10
|
+
export declare const limitSwapOnlyFull1D: any;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Limit order swap with proportional execution
|
|
3
|
+
* @see https://github.com/1inch/swap-vm/blob/main/src/instructions/LimitSwap.sol#L27
|
|
4
|
+
**/
|
|
5
|
+
export declare const limitSwap1D: any;
|
|
6
|
+
/**
|
|
7
|
+
* Limit order swap requiring full amount execution
|
|
8
|
+
* @see https://github.com/1inch/swap-vm/blob/main/src/instructions/LimitSwap.sol#L44
|
|
9
|
+
**/
|
|
10
|
+
export declare const limitSwapOnlyFull1D: any;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { HexString } from '@1inch/sdk-core';
|
|
2
|
+
import { MinRateArgs } from './min-rate-args';
|
|
3
|
+
import type { IArgsCoder } from '../types';
|
|
4
|
+
export declare class MinRateArgsCoder implements IArgsCoder<MinRateArgs> {
|
|
5
|
+
encode(args: MinRateArgs): HexString;
|
|
6
|
+
decode(data: HexString): MinRateArgs;
|
|
7
|
+
}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { HexString } from '@1inch/sdk-core';
|
|
2
|
+
import { MinRateArgs } from './min-rate-args';
|
|
3
|
+
import type { IArgsCoder } from '../types';
|
|
4
|
+
export declare class MinRateArgsCoder implements IArgsCoder<MinRateArgs> {
|
|
5
|
+
encode(args: MinRateArgs): HexString;
|
|
6
|
+
decode(data: HexString): MinRateArgs;
|
|
7
|
+
}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import type { Address, HexString } from '@1inch/sdk-core';
|
|
2
|
+
import type { IArgsData } from '../types';
|
|
3
|
+
/**
|
|
4
|
+
* Arguments for min rate instructions (requireMinRate1D, adjustMinRate1D)
|
|
5
|
+
* @see https://github.com/1inch/swap-vm/blob/main/src/instructions/MinRate.sol#L36
|
|
6
|
+
**/
|
|
7
|
+
export declare class MinRateArgs implements IArgsData {
|
|
8
|
+
readonly rateLt: bigint;
|
|
9
|
+
readonly rateGt: bigint;
|
|
10
|
+
static readonly CODER: any;
|
|
11
|
+
/**
|
|
12
|
+
* rateLt - minimum acceptable rate for token with lower address (uint64)
|
|
13
|
+
* rateGt - minimum acceptable rate for token with higher address (uint64)
|
|
14
|
+
**/
|
|
15
|
+
constructor(rateLt: bigint, rateGt: bigint);
|
|
16
|
+
static fromTokens(tokenA: Address, tokenB: Address, rateA: bigint, rateB: bigint): MinRateArgs;
|
|
17
|
+
/**
|
|
18
|
+
* Decodes hex data into MinRateArgs instance
|
|
19
|
+
**/
|
|
20
|
+
static decode(data: HexString): MinRateArgs;
|
|
21
|
+
toJSON(): Record<string, unknown>;
|
|
22
|
+
}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import type { Address, HexString } from '@1inch/sdk-core';
|
|
2
|
+
import type { IArgsData } from '../types';
|
|
3
|
+
/**
|
|
4
|
+
* Arguments for min rate instructions (requireMinRate1D, adjustMinRate1D)
|
|
5
|
+
* @see https://github.com/1inch/swap-vm/blob/main/src/instructions/MinRate.sol#L36
|
|
6
|
+
**/
|
|
7
|
+
export declare class MinRateArgs implements IArgsData {
|
|
8
|
+
readonly rateLt: bigint;
|
|
9
|
+
readonly rateGt: bigint;
|
|
10
|
+
static readonly CODER: any;
|
|
11
|
+
/**
|
|
12
|
+
* rateLt - minimum acceptable rate for token with lower address (uint64)
|
|
13
|
+
* rateGt - minimum acceptable rate for token with higher address (uint64)
|
|
14
|
+
**/
|
|
15
|
+
constructor(rateLt: bigint, rateGt: bigint);
|
|
16
|
+
static fromTokens(tokenA: Address, tokenB: Address, rateA: bigint, rateB: bigint): MinRateArgs;
|
|
17
|
+
/**
|
|
18
|
+
* Decodes hex data into MinRateArgs instance
|
|
19
|
+
**/
|
|
20
|
+
static decode(data: HexString): MinRateArgs;
|
|
21
|
+
toJSON(): Record<string, unknown>;
|
|
22
|
+
}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Enforces minimum exchange rate or reverts
|
|
3
|
+
* @see https://github.com/1inch/swap-vm/blob/main/src/instructions/MinRate.sol#L36
|
|
4
|
+
**/
|
|
5
|
+
export declare const requireMinRate1D: any;
|
|
6
|
+
/**
|
|
7
|
+
* Adjusts swap amounts to meet minimum rate if needed
|
|
8
|
+
* @see https://github.com/1inch/swap-vm/blob/main/src/instructions/MinRate.sol#L50
|
|
9
|
+
**/
|
|
10
|
+
export declare const adjustMinRate1D: any;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Enforces minimum exchange rate or reverts
|
|
3
|
+
* @see https://github.com/1inch/swap-vm/blob/main/src/instructions/MinRate.sol#L36
|
|
4
|
+
**/
|
|
5
|
+
export declare const requireMinRate1D: any;
|
|
6
|
+
/**
|
|
7
|
+
* Adjusts swap amounts to meet minimum rate if needed
|
|
8
|
+
* @see https://github.com/1inch/swap-vm/blob/main/src/instructions/MinRate.sol#L50
|
|
9
|
+
**/
|
|
10
|
+
export declare const adjustMinRate1D: any;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import type { IArgsCoder, IArgsData, IInstruction, IOpcode } from './types';
|
|
2
|
+
export declare class Opcode<T extends IArgsData> implements IOpcode<T> {
|
|
3
|
+
readonly id: symbol;
|
|
4
|
+
readonly coder: IArgsCoder<T>;
|
|
5
|
+
constructor(id: symbol, coder: IArgsCoder<T>);
|
|
6
|
+
argsCoder(): IArgsCoder<T>;
|
|
7
|
+
createIx(args: T): IInstruction<T>;
|
|
8
|
+
}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import type { IArgsCoder, IArgsData, IInstruction, IOpcode } from './types';
|
|
2
|
+
export declare class Opcode<T extends IArgsData> implements IOpcode<T> {
|
|
3
|
+
readonly id: symbol;
|
|
4
|
+
readonly coder: IArgsCoder<T>;
|
|
5
|
+
constructor(id: symbol, coder: IArgsCoder<T>);
|
|
6
|
+
argsCoder(): IArgsCoder<T>;
|
|
7
|
+
createIx(args: T): IInstruction<T>;
|
|
8
|
+
}
|
package/dist/swap-vm/instructions/oracle-price-adjuster/oracle-price-adjuster-args-coder.d.mts
ADDED
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { HexString } from '@1inch/sdk-core';
|
|
2
|
+
import { OraclePriceAdjusterArgs } from './oracle-price-adjuster-args';
|
|
3
|
+
import type { IArgsCoder } from '../types';
|
|
4
|
+
export declare class OraclePriceAdjusterArgsCoder implements IArgsCoder<OraclePriceAdjusterArgs> {
|
|
5
|
+
encode(args: OraclePriceAdjusterArgs): HexString;
|
|
6
|
+
decode(data: HexString): OraclePriceAdjusterArgs;
|
|
7
|
+
}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { HexString } from '@1inch/sdk-core';
|
|
2
|
+
import { OraclePriceAdjusterArgs } from './oracle-price-adjuster-args';
|
|
3
|
+
import type { IArgsCoder } from '../types';
|
|
4
|
+
export declare class OraclePriceAdjusterArgsCoder implements IArgsCoder<OraclePriceAdjusterArgs> {
|
|
5
|
+
encode(args: OraclePriceAdjusterArgs): HexString;
|
|
6
|
+
decode(data: HexString): OraclePriceAdjusterArgs;
|
|
7
|
+
}
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
import type { Address, HexString } from '@1inch/sdk-core';
|
|
2
|
+
import type { IArgsData } from '../types';
|
|
3
|
+
/**
|
|
4
|
+
* @notice Oracle Price Adjuster instruction for dynamic price adjustment based on Chainlink price feeds
|
|
5
|
+
* @dev Adjusts swap prices to match Chainlink oracle prices within safe bounds:
|
|
6
|
+
* - Works only for 1=>0 swaps (token1 to token0), compatible with LimitSwap and other swap instructions
|
|
7
|
+
* - Fetches current market price from a Chainlink oracle (AggregatorV3Interface)
|
|
8
|
+
* - Adjusts the swap price towards the oracle price within maxPriceDecay limits
|
|
9
|
+
* - Ensures the adjustment is always favorable for the taker
|
|
10
|
+
* - Handles different decimal places from Chainlink oracles (e.g., 8 decimals for USD prices)
|
|
11
|
+
*
|
|
12
|
+
* This creates adaptive orders that automatically track market prices while maintaining
|
|
13
|
+
* safety bounds to prevent excessive slippage or manipulation.
|
|
14
|
+
*
|
|
15
|
+
* Example usage:
|
|
16
|
+
* 1. LimitSwap sets base price: 1 ETH for 3000 USDC
|
|
17
|
+
* 2. OraclePriceAdjuster with Chainlink ETH/USD oracle: 1 ETH = 3100 USD, maxPriceDecay=0.95e18 (5% max)
|
|
18
|
+
* 3. exactIn: Taker gets more ETH (up to 5% improvement)
|
|
19
|
+
* 4. exactOut: Taker pays less USDC (up to 5% discount)
|
|
20
|
+
*
|
|
21
|
+
* @see https://github.com/1inch/swap-vm/blob/main/src/instructions/OraclePriceAdjuster.sol#L84
|
|
22
|
+
*/
|
|
23
|
+
export declare class OraclePriceAdjusterArgs implements IArgsData {
|
|
24
|
+
readonly maxPriceDecay: bigint;
|
|
25
|
+
readonly maxStaleness: bigint;
|
|
26
|
+
readonly oracleDecimals: bigint;
|
|
27
|
+
readonly oracleAddress: Address;
|
|
28
|
+
static readonly CODER: any;
|
|
29
|
+
/**
|
|
30
|
+
* maxPriceDecay - maximum price decay coefficient (uint64)
|
|
31
|
+
* maxStaleness - maximum allowed oracle data staleness in seconds (uint16
|
|
32
|
+
* oracleDecimals - decimals used by the oracle (uint8)
|
|
33
|
+
* oracleAddress - address of the Chainlink price oracle contract
|
|
34
|
+
**/
|
|
35
|
+
constructor(maxPriceDecay: bigint, maxStaleness: bigint, oracleDecimals: bigint, oracleAddress: Address);
|
|
36
|
+
/**
|
|
37
|
+
* Decodes hex data into OraclePriceAdjusterArgs instance
|
|
38
|
+
**/
|
|
39
|
+
static decode(data: HexString): OraclePriceAdjusterArgs;
|
|
40
|
+
toJSON(): Record<string, unknown>;
|
|
41
|
+
}
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
import type { Address, HexString } from '@1inch/sdk-core';
|
|
2
|
+
import type { IArgsData } from '../types';
|
|
3
|
+
/**
|
|
4
|
+
* @notice Oracle Price Adjuster instruction for dynamic price adjustment based on Chainlink price feeds
|
|
5
|
+
* @dev Adjusts swap prices to match Chainlink oracle prices within safe bounds:
|
|
6
|
+
* - Works only for 1=>0 swaps (token1 to token0), compatible with LimitSwap and other swap instructions
|
|
7
|
+
* - Fetches current market price from a Chainlink oracle (AggregatorV3Interface)
|
|
8
|
+
* - Adjusts the swap price towards the oracle price within maxPriceDecay limits
|
|
9
|
+
* - Ensures the adjustment is always favorable for the taker
|
|
10
|
+
* - Handles different decimal places from Chainlink oracles (e.g., 8 decimals for USD prices)
|
|
11
|
+
*
|
|
12
|
+
* This creates adaptive orders that automatically track market prices while maintaining
|
|
13
|
+
* safety bounds to prevent excessive slippage or manipulation.
|
|
14
|
+
*
|
|
15
|
+
* Example usage:
|
|
16
|
+
* 1. LimitSwap sets base price: 1 ETH for 3000 USDC
|
|
17
|
+
* 2. OraclePriceAdjuster with Chainlink ETH/USD oracle: 1 ETH = 3100 USD, maxPriceDecay=0.95e18 (5% max)
|
|
18
|
+
* 3. exactIn: Taker gets more ETH (up to 5% improvement)
|
|
19
|
+
* 4. exactOut: Taker pays less USDC (up to 5% discount)
|
|
20
|
+
*
|
|
21
|
+
* @see https://github.com/1inch/swap-vm/blob/main/src/instructions/OraclePriceAdjuster.sol#L84
|
|
22
|
+
*/
|
|
23
|
+
export declare class OraclePriceAdjusterArgs implements IArgsData {
|
|
24
|
+
readonly maxPriceDecay: bigint;
|
|
25
|
+
readonly maxStaleness: bigint;
|
|
26
|
+
readonly oracleDecimals: bigint;
|
|
27
|
+
readonly oracleAddress: Address;
|
|
28
|
+
static readonly CODER: any;
|
|
29
|
+
/**
|
|
30
|
+
* maxPriceDecay - maximum price decay coefficient (uint64)
|
|
31
|
+
* maxStaleness - maximum allowed oracle data staleness in seconds (uint16
|
|
32
|
+
* oracleDecimals - decimals used by the oracle (uint8)
|
|
33
|
+
* oracleAddress - address of the Chainlink price oracle contract
|
|
34
|
+
**/
|
|
35
|
+
constructor(maxPriceDecay: bigint, maxStaleness: bigint, oracleDecimals: bigint, oracleAddress: Address);
|
|
36
|
+
/**
|
|
37
|
+
* Decodes hex data into OraclePriceAdjusterArgs instance
|
|
38
|
+
**/
|
|
39
|
+
static decode(data: HexString): OraclePriceAdjusterArgs;
|
|
40
|
+
toJSON(): Record<string, unknown>;
|
|
41
|
+
}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { HexString } from '@1inch/sdk-core';
|
|
2
|
+
import { StableSwap2DArgs } from './stable-swap-2d-args';
|
|
3
|
+
import type { IArgsCoder } from '../types';
|
|
4
|
+
export declare class StableSwap2DArgsCoder implements IArgsCoder<StableSwap2DArgs> {
|
|
5
|
+
encode(args: StableSwap2DArgs): HexString;
|
|
6
|
+
decode(data: HexString): StableSwap2DArgs;
|
|
7
|
+
}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { HexString } from '@1inch/sdk-core';
|
|
2
|
+
import { StableSwap2DArgs } from './stable-swap-2d-args';
|
|
3
|
+
import type { IArgsCoder } from '../types';
|
|
4
|
+
export declare class StableSwap2DArgsCoder implements IArgsCoder<StableSwap2DArgs> {
|
|
5
|
+
encode(args: StableSwap2DArgs): HexString;
|
|
6
|
+
decode(data: HexString): StableSwap2DArgs;
|
|
7
|
+
}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import type { Address, HexString } from '@1inch/sdk-core';
|
|
2
|
+
import type { IArgsData } from '../types';
|
|
3
|
+
/**
|
|
4
|
+
* Arguments for stableSwap2D instruction for stablecoin optimized swaps
|
|
5
|
+
**/
|
|
6
|
+
export declare class StableSwap2DArgs implements IArgsData {
|
|
7
|
+
readonly fee: bigint;
|
|
8
|
+
readonly A: bigint;
|
|
9
|
+
readonly rateLt: bigint;
|
|
10
|
+
readonly rateGt: bigint;
|
|
11
|
+
static readonly CODER: any;
|
|
12
|
+
/**
|
|
13
|
+
* fee - swap fee in 1e10 (uint32)
|
|
14
|
+
* A - amplification coefficient (uint32)
|
|
15
|
+
* rateLt - rate for token with lower address (uint256)
|
|
16
|
+
* rateGt - rate for token with higher address (uint256)
|
|
17
|
+
**/
|
|
18
|
+
constructor(fee: bigint, A: bigint, rateLt: bigint, rateGt: bigint);
|
|
19
|
+
static fromTokens(fee: bigint, a: bigint, tokenA: Address, tokenB: Address, rateA: bigint, rateB: bigint): StableSwap2DArgs;
|
|
20
|
+
/**
|
|
21
|
+
* Decodes hex data into StableSwap2DArgs instance
|
|
22
|
+
**/
|
|
23
|
+
static decode(data: HexString): StableSwap2DArgs;
|
|
24
|
+
toJSON(): Record<string, unknown>;
|
|
25
|
+
}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import type { Address, HexString } from '@1inch/sdk-core';
|
|
2
|
+
import type { IArgsData } from '../types';
|
|
3
|
+
/**
|
|
4
|
+
* Arguments for stableSwap2D instruction for stablecoin optimized swaps
|
|
5
|
+
**/
|
|
6
|
+
export declare class StableSwap2DArgs implements IArgsData {
|
|
7
|
+
readonly fee: bigint;
|
|
8
|
+
readonly A: bigint;
|
|
9
|
+
readonly rateLt: bigint;
|
|
10
|
+
readonly rateGt: bigint;
|
|
11
|
+
static readonly CODER: any;
|
|
12
|
+
/**
|
|
13
|
+
* fee - swap fee in 1e10 (uint32)
|
|
14
|
+
* A - amplification coefficient (uint32)
|
|
15
|
+
* rateLt - rate for token with lower address (uint256)
|
|
16
|
+
* rateGt - rate for token with higher address (uint256)
|
|
17
|
+
**/
|
|
18
|
+
constructor(fee: bigint, A: bigint, rateLt: bigint, rateGt: bigint);
|
|
19
|
+
static fromTokens(fee: bigint, a: bigint, tokenA: Address, tokenB: Address, rateA: bigint, rateB: bigint): StableSwap2DArgs;
|
|
20
|
+
/**
|
|
21
|
+
* Decodes hex data into StableSwap2DArgs instance
|
|
22
|
+
**/
|
|
23
|
+
static decode(data: HexString): StableSwap2DArgs;
|
|
24
|
+
toJSON(): Record<string, unknown>;
|
|
25
|
+
}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { HexString } from '@1inch/sdk-core';
|
|
2
|
+
import { TWAPSwapArgs } from './twap-swap-args';
|
|
3
|
+
import type { IArgsCoder } from '../types';
|
|
4
|
+
export declare class TWAPSwapArgsCoder implements IArgsCoder<TWAPSwapArgs> {
|
|
5
|
+
encode(args: TWAPSwapArgs): HexString;
|
|
6
|
+
decode(data: HexString): TWAPSwapArgs;
|
|
7
|
+
}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { HexString } from '@1inch/sdk-core';
|
|
2
|
+
import { TWAPSwapArgs } from './twap-swap-args';
|
|
3
|
+
import type { IArgsCoder } from '../types';
|
|
4
|
+
export declare class TWAPSwapArgsCoder implements IArgsCoder<TWAPSwapArgs> {
|
|
5
|
+
encode(args: TWAPSwapArgs): HexString;
|
|
6
|
+
decode(data: HexString): TWAPSwapArgs;
|
|
7
|
+
}
|