@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.
Files changed (241) hide show
  1. package/LICENSE +103 -0
  2. package/README.md +584 -0
  3. package/dist/abi/SwapVM.abi.d.mts +403 -0
  4. package/dist/abi/SwapVM.abi.d.ts +403 -0
  5. package/dist/abi/index.d.mts +1 -0
  6. package/dist/abi/index.d.ts +1 -0
  7. package/dist/index.d.mts +4 -0
  8. package/dist/index.d.ts +4 -0
  9. package/dist/index.js +3842 -0
  10. package/dist/index.mjs +3777 -0
  11. package/dist/swap-vm/index.d.mts +6 -0
  12. package/dist/swap-vm/index.d.ts +6 -0
  13. package/dist/swap-vm/instructions/balances/balances-args-coder.d.mts +7 -0
  14. package/dist/swap-vm/instructions/balances/balances-args-coder.d.ts +7 -0
  15. package/dist/swap-vm/instructions/balances/balances-args.d.mts +17 -0
  16. package/dist/swap-vm/instructions/balances/balances-args.d.ts +17 -0
  17. package/dist/swap-vm/instructions/balances/index.d.mts +3 -0
  18. package/dist/swap-vm/instructions/balances/index.d.ts +3 -0
  19. package/dist/swap-vm/instructions/balances/opcodes.d.mts +12 -0
  20. package/dist/swap-vm/instructions/balances/opcodes.d.ts +12 -0
  21. package/dist/swap-vm/instructions/balances/types.d.mts +5 -0
  22. package/dist/swap-vm/instructions/balances/types.d.ts +5 -0
  23. package/dist/swap-vm/instructions/base-fee-adjuster/base-fee-adjuster-args-coder.d.mts +7 -0
  24. package/dist/swap-vm/instructions/base-fee-adjuster/base-fee-adjuster-args-coder.d.ts +7 -0
  25. package/dist/swap-vm/instructions/base-fee-adjuster/base-fee-adjuster-args.d.mts +40 -0
  26. package/dist/swap-vm/instructions/base-fee-adjuster/base-fee-adjuster-args.d.ts +40 -0
  27. package/dist/swap-vm/instructions/base-fee-adjuster/index.d.mts +2 -0
  28. package/dist/swap-vm/instructions/base-fee-adjuster/index.d.ts +2 -0
  29. package/dist/swap-vm/instructions/base-fee-adjuster/opcodes.d.mts +5 -0
  30. package/dist/swap-vm/instructions/base-fee-adjuster/opcodes.d.ts +5 -0
  31. package/dist/swap-vm/instructions/concentrate/concentrate-grow-liquidity-2d-args-coder.d.mts +7 -0
  32. package/dist/swap-vm/instructions/concentrate/concentrate-grow-liquidity-2d-args-coder.d.ts +7 -0
  33. package/dist/swap-vm/instructions/concentrate/concentrate-grow-liquidity-2d-args.d.mts +21 -0
  34. package/dist/swap-vm/instructions/concentrate/concentrate-grow-liquidity-2d-args.d.ts +21 -0
  35. package/dist/swap-vm/instructions/concentrate/concentrate-grow-liquidity-xd-args-coder.d.mts +7 -0
  36. package/dist/swap-vm/instructions/concentrate/concentrate-grow-liquidity-xd-args-coder.d.ts +7 -0
  37. package/dist/swap-vm/instructions/concentrate/concentrate-grow-liquidity-xd-args.d.mts +17 -0
  38. package/dist/swap-vm/instructions/concentrate/concentrate-grow-liquidity-xd-args.d.ts +17 -0
  39. package/dist/swap-vm/instructions/concentrate/index.d.mts +5 -0
  40. package/dist/swap-vm/instructions/concentrate/index.d.ts +5 -0
  41. package/dist/swap-vm/instructions/concentrate/opcodes.d.mts +10 -0
  42. package/dist/swap-vm/instructions/concentrate/opcodes.d.ts +10 -0
  43. package/dist/swap-vm/instructions/concentrate/types.d.mts +5 -0
  44. package/dist/swap-vm/instructions/concentrate/types.d.ts +5 -0
  45. package/dist/swap-vm/instructions/concentrate/utils.d.mts +4 -0
  46. package/dist/swap-vm/instructions/concentrate/utils.d.ts +4 -0
  47. package/dist/swap-vm/instructions/controls/deadline-args-coder.d.mts +7 -0
  48. package/dist/swap-vm/instructions/controls/deadline-args-coder.d.ts +7 -0
  49. package/dist/swap-vm/instructions/controls/deadline-args.d.mts +9 -0
  50. package/dist/swap-vm/instructions/controls/deadline-args.d.ts +9 -0
  51. package/dist/swap-vm/instructions/controls/index.d.mts +8 -0
  52. package/dist/swap-vm/instructions/controls/index.d.ts +8 -0
  53. package/dist/swap-vm/instructions/controls/jump-args-coder.d.mts +7 -0
  54. package/dist/swap-vm/instructions/controls/jump-args-coder.d.ts +7 -0
  55. package/dist/swap-vm/instructions/controls/jump-args.d.mts +16 -0
  56. package/dist/swap-vm/instructions/controls/jump-args.d.ts +16 -0
  57. package/dist/swap-vm/instructions/controls/jump-if-token-args-coder.d.mts +7 -0
  58. package/dist/swap-vm/instructions/controls/jump-if-token-args-coder.d.ts +7 -0
  59. package/dist/swap-vm/instructions/controls/jump-if-token-args.d.mts +10 -0
  60. package/dist/swap-vm/instructions/controls/jump-if-token-args.d.ts +10 -0
  61. package/dist/swap-vm/instructions/controls/only-taker-token-balance-gte-args-coder.d.mts +7 -0
  62. package/dist/swap-vm/instructions/controls/only-taker-token-balance-gte-args-coder.d.ts +7 -0
  63. package/dist/swap-vm/instructions/controls/only-taker-token-balance-gte-args.d.mts +17 -0
  64. package/dist/swap-vm/instructions/controls/only-taker-token-balance-gte-args.d.ts +17 -0
  65. package/dist/swap-vm/instructions/controls/only-taker-token-balance-non-zero-args-coder.d.mts +7 -0
  66. package/dist/swap-vm/instructions/controls/only-taker-token-balance-non-zero-args-coder.d.ts +7 -0
  67. package/dist/swap-vm/instructions/controls/only-taker-token-balance-non-zero-args.d.mts +16 -0
  68. package/dist/swap-vm/instructions/controls/only-taker-token-balance-non-zero-args.d.ts +16 -0
  69. package/dist/swap-vm/instructions/controls/only-taker-token-supply-share-gte-args-coder.d.mts +7 -0
  70. package/dist/swap-vm/instructions/controls/only-taker-token-supply-share-gte-args-coder.d.ts +7 -0
  71. package/dist/swap-vm/instructions/controls/only-taker-token-supply-share-gte-args.d.mts +18 -0
  72. package/dist/swap-vm/instructions/controls/only-taker-token-supply-share-gte-args.d.ts +18 -0
  73. package/dist/swap-vm/instructions/controls/opcodes.d.mts +36 -0
  74. package/dist/swap-vm/instructions/controls/opcodes.d.ts +36 -0
  75. package/dist/swap-vm/instructions/controls/salt-args-coder.d.mts +7 -0
  76. package/dist/swap-vm/instructions/controls/salt-args-coder.d.ts +7 -0
  77. package/dist/swap-vm/instructions/controls/salt-args.d.mts +16 -0
  78. package/dist/swap-vm/instructions/controls/salt-args.d.ts +16 -0
  79. package/dist/swap-vm/instructions/debug/debug-args.d.mts +8 -0
  80. package/dist/swap-vm/instructions/debug/debug-args.d.ts +8 -0
  81. package/dist/swap-vm/instructions/debug/debug-empty-args.d.mts +19 -0
  82. package/dist/swap-vm/instructions/debug/debug-empty-args.d.ts +19 -0
  83. package/dist/swap-vm/instructions/debug/opcodes.d.mts +18 -0
  84. package/dist/swap-vm/instructions/debug/opcodes.d.ts +18 -0
  85. package/dist/swap-vm/instructions/debug/print-amount-for-swap.d.mts +16 -0
  86. package/dist/swap-vm/instructions/debug/print-amount-for-swap.d.ts +16 -0
  87. package/dist/swap-vm/instructions/debug/print-context.d.mts +16 -0
  88. package/dist/swap-vm/instructions/debug/print-context.d.ts +16 -0
  89. package/dist/swap-vm/instructions/debug/print-free-memory-pointer.d.mts +16 -0
  90. package/dist/swap-vm/instructions/debug/print-free-memory-pointer.d.ts +16 -0
  91. package/dist/swap-vm/instructions/debug/print-gas-left.d.mts +16 -0
  92. package/dist/swap-vm/instructions/debug/print-gas-left.d.ts +16 -0
  93. package/dist/swap-vm/instructions/debug/print-swap-query.d.mts +16 -0
  94. package/dist/swap-vm/instructions/debug/print-swap-query.d.ts +16 -0
  95. package/dist/swap-vm/instructions/debug/print-swap-registers.d.mts +16 -0
  96. package/dist/swap-vm/instructions/debug/print-swap-registers.d.ts +16 -0
  97. package/dist/swap-vm/instructions/decay/decay-xd-args-coder.d.mts +7 -0
  98. package/dist/swap-vm/instructions/decay/decay-xd-args-coder.d.ts +7 -0
  99. package/dist/swap-vm/instructions/decay/decay-xd-args.d.mts +16 -0
  100. package/dist/swap-vm/instructions/decay/decay-xd-args.d.ts +16 -0
  101. package/dist/swap-vm/instructions/decay/index.d.mts +2 -0
  102. package/dist/swap-vm/instructions/decay/index.d.ts +2 -0
  103. package/dist/swap-vm/instructions/decay/opcodes.d.mts +5 -0
  104. package/dist/swap-vm/instructions/decay/opcodes.d.ts +5 -0
  105. package/dist/swap-vm/instructions/dutch-auction/dutch-auction-args-coder.d.mts +7 -0
  106. package/dist/swap-vm/instructions/dutch-auction/dutch-auction-args-coder.d.ts +7 -0
  107. package/dist/swap-vm/instructions/dutch-auction/dutch-auction-args.d.mts +44 -0
  108. package/dist/swap-vm/instructions/dutch-auction/dutch-auction-args.d.ts +44 -0
  109. package/dist/swap-vm/instructions/dutch-auction/index.d.mts +2 -0
  110. package/dist/swap-vm/instructions/dutch-auction/index.d.ts +2 -0
  111. package/dist/swap-vm/instructions/dutch-auction/opcodes.d.mts +10 -0
  112. package/dist/swap-vm/instructions/dutch-auction/opcodes.d.ts +10 -0
  113. package/dist/swap-vm/instructions/empty.d.mts +13 -0
  114. package/dist/swap-vm/instructions/empty.d.ts +13 -0
  115. package/dist/swap-vm/instructions/extruction/extruction-args-coder.d.mts +7 -0
  116. package/dist/swap-vm/instructions/extruction/extruction-args-coder.d.ts +7 -0
  117. package/dist/swap-vm/instructions/extruction/extruction-args.d.mts +21 -0
  118. package/dist/swap-vm/instructions/extruction/extruction-args.d.ts +21 -0
  119. package/dist/swap-vm/instructions/extruction/index.d.mts +2 -0
  120. package/dist/swap-vm/instructions/extruction/index.d.ts +2 -0
  121. package/dist/swap-vm/instructions/extruction/opcodes.d.mts +5 -0
  122. package/dist/swap-vm/instructions/extruction/opcodes.d.ts +5 -0
  123. package/dist/swap-vm/instructions/fee/flat-fee-args-coder.d.mts +7 -0
  124. package/dist/swap-vm/instructions/fee/flat-fee-args-coder.d.ts +7 -0
  125. package/dist/swap-vm/instructions/fee/flat-fee-args.d.mts +28 -0
  126. package/dist/swap-vm/instructions/fee/flat-fee-args.d.ts +28 -0
  127. package/dist/swap-vm/instructions/fee/index.d.mts +3 -0
  128. package/dist/swap-vm/instructions/fee/index.d.ts +3 -0
  129. package/dist/swap-vm/instructions/fee/opcodes.d.mts +30 -0
  130. package/dist/swap-vm/instructions/fee/opcodes.d.ts +30 -0
  131. package/dist/swap-vm/instructions/fee/protocol-fee-args-coder.d.mts +7 -0
  132. package/dist/swap-vm/instructions/fee/protocol-fee-args-coder.d.ts +7 -0
  133. package/dist/swap-vm/instructions/fee/protocol-fee-args.d.mts +35 -0
  134. package/dist/swap-vm/instructions/fee/protocol-fee-args.d.ts +35 -0
  135. package/dist/swap-vm/instructions/index.d.mts +29 -0
  136. package/dist/swap-vm/instructions/index.d.ts +29 -0
  137. package/dist/swap-vm/instructions/instruction.d.mts +7 -0
  138. package/dist/swap-vm/instructions/instruction.d.ts +7 -0
  139. package/dist/swap-vm/instructions/invalidators/index.d.mts +4 -0
  140. package/dist/swap-vm/instructions/invalidators/index.d.ts +4 -0
  141. package/dist/swap-vm/instructions/invalidators/invalidate-bit-1d-args-coder.d.mts +7 -0
  142. package/dist/swap-vm/instructions/invalidators/invalidate-bit-1d-args-coder.d.ts +7 -0
  143. package/dist/swap-vm/instructions/invalidators/invalidate-bit-1d-args.d.mts +16 -0
  144. package/dist/swap-vm/instructions/invalidators/invalidate-bit-1d-args.d.ts +16 -0
  145. package/dist/swap-vm/instructions/invalidators/invalidate-token-in-1d-args-coder.d.mts +7 -0
  146. package/dist/swap-vm/instructions/invalidators/invalidate-token-in-1d-args-coder.d.ts +7 -0
  147. package/dist/swap-vm/instructions/invalidators/invalidate-token-in-1d-args.d.mts +8 -0
  148. package/dist/swap-vm/instructions/invalidators/invalidate-token-in-1d-args.d.ts +8 -0
  149. package/dist/swap-vm/instructions/invalidators/invalidate-token-out-1d-args-coder.d.mts +7 -0
  150. package/dist/swap-vm/instructions/invalidators/invalidate-token-out-1d-args-coder.d.ts +7 -0
  151. package/dist/swap-vm/instructions/invalidators/invalidate-token-out-1d-args.d.mts +8 -0
  152. package/dist/swap-vm/instructions/invalidators/invalidate-token-out-1d-args.d.ts +8 -0
  153. package/dist/swap-vm/instructions/invalidators/opcodes.d.mts +15 -0
  154. package/dist/swap-vm/instructions/invalidators/opcodes.d.ts +15 -0
  155. package/dist/swap-vm/instructions/limit-swap/index.d.mts +2 -0
  156. package/dist/swap-vm/instructions/limit-swap/index.d.ts +2 -0
  157. package/dist/swap-vm/instructions/limit-swap/limit-swap-direction-args-coder.d.mts +7 -0
  158. package/dist/swap-vm/instructions/limit-swap/limit-swap-direction-args-coder.d.ts +7 -0
  159. package/dist/swap-vm/instructions/limit-swap/limit-swap-direction-args.d.mts +24 -0
  160. package/dist/swap-vm/instructions/limit-swap/limit-swap-direction-args.d.ts +24 -0
  161. package/dist/swap-vm/instructions/limit-swap/opcodes.d.mts +10 -0
  162. package/dist/swap-vm/instructions/limit-swap/opcodes.d.ts +10 -0
  163. package/dist/swap-vm/instructions/min-rate/index.d.mts +2 -0
  164. package/dist/swap-vm/instructions/min-rate/index.d.ts +2 -0
  165. package/dist/swap-vm/instructions/min-rate/min-rate-args-coder.d.mts +7 -0
  166. package/dist/swap-vm/instructions/min-rate/min-rate-args-coder.d.ts +7 -0
  167. package/dist/swap-vm/instructions/min-rate/min-rate-args.d.mts +22 -0
  168. package/dist/swap-vm/instructions/min-rate/min-rate-args.d.ts +22 -0
  169. package/dist/swap-vm/instructions/min-rate/opcodes.d.mts +10 -0
  170. package/dist/swap-vm/instructions/min-rate/opcodes.d.ts +10 -0
  171. package/dist/swap-vm/instructions/opcode.d.mts +8 -0
  172. package/dist/swap-vm/instructions/opcode.d.ts +8 -0
  173. package/dist/swap-vm/instructions/oracle-price-adjuster/index.d.mts +2 -0
  174. package/dist/swap-vm/instructions/oracle-price-adjuster/index.d.ts +2 -0
  175. package/dist/swap-vm/instructions/oracle-price-adjuster/opcodes.d.mts +5 -0
  176. package/dist/swap-vm/instructions/oracle-price-adjuster/opcodes.d.ts +5 -0
  177. package/dist/swap-vm/instructions/oracle-price-adjuster/oracle-price-adjuster-args-coder.d.mts +7 -0
  178. package/dist/swap-vm/instructions/oracle-price-adjuster/oracle-price-adjuster-args-coder.d.ts +7 -0
  179. package/dist/swap-vm/instructions/oracle-price-adjuster/oracle-price-adjuster-args.d.mts +41 -0
  180. package/dist/swap-vm/instructions/oracle-price-adjuster/oracle-price-adjuster-args.d.ts +41 -0
  181. package/dist/swap-vm/instructions/stable-swap/index.d.mts +2 -0
  182. package/dist/swap-vm/instructions/stable-swap/index.d.ts +2 -0
  183. package/dist/swap-vm/instructions/stable-swap/opcodes.d.mts +4 -0
  184. package/dist/swap-vm/instructions/stable-swap/opcodes.d.ts +4 -0
  185. package/dist/swap-vm/instructions/stable-swap/stable-swap-2d-args-coder.d.mts +7 -0
  186. package/dist/swap-vm/instructions/stable-swap/stable-swap-2d-args-coder.d.ts +7 -0
  187. package/dist/swap-vm/instructions/stable-swap/stable-swap-2d-args.d.mts +25 -0
  188. package/dist/swap-vm/instructions/stable-swap/stable-swap-2d-args.d.ts +25 -0
  189. package/dist/swap-vm/instructions/twap-swap/index.d.mts +2 -0
  190. package/dist/swap-vm/instructions/twap-swap/index.d.ts +2 -0
  191. package/dist/swap-vm/instructions/twap-swap/opcodes.d.mts +5 -0
  192. package/dist/swap-vm/instructions/twap-swap/opcodes.d.ts +5 -0
  193. package/dist/swap-vm/instructions/twap-swap/twap-swap-args-coder.d.mts +7 -0
  194. package/dist/swap-vm/instructions/twap-swap/twap-swap-args-coder.d.ts +7 -0
  195. package/dist/swap-vm/instructions/twap-swap/twap-swap-args.d.mts +71 -0
  196. package/dist/swap-vm/instructions/twap-swap/twap-swap-args.d.ts +71 -0
  197. package/dist/swap-vm/instructions/types.d.mts +18 -0
  198. package/dist/swap-vm/instructions/types.d.ts +18 -0
  199. package/dist/swap-vm/instructions/xyc-swap/index.d.mts +2 -0
  200. package/dist/swap-vm/instructions/xyc-swap/index.d.ts +2 -0
  201. package/dist/swap-vm/instructions/xyc-swap/opcodes.d.mts +5 -0
  202. package/dist/swap-vm/instructions/xyc-swap/opcodes.d.ts +5 -0
  203. package/dist/swap-vm/instructions/xyc-swap/xyc-swap-xd-args-coder.d.mts +7 -0
  204. package/dist/swap-vm/instructions/xyc-swap/xyc-swap-xd-args-coder.d.ts +7 -0
  205. package/dist/swap-vm/instructions/xyc-swap/xyc-swap-xd-args.d.mts +15 -0
  206. package/dist/swap-vm/instructions/xyc-swap/xyc-swap-xd-args.d.ts +15 -0
  207. package/dist/swap-vm/maker-traits.d.mts +206 -0
  208. package/dist/swap-vm/maker-traits.d.ts +206 -0
  209. package/dist/swap-vm/order.d.mts +84 -0
  210. package/dist/swap-vm/order.d.ts +84 -0
  211. package/dist/swap-vm/programs/aqua-program-builder.d.mts +118 -0
  212. package/dist/swap-vm/programs/aqua-program-builder.d.ts +118 -0
  213. package/dist/swap-vm/programs/index.d.mts +4 -0
  214. package/dist/swap-vm/programs/index.d.ts +4 -0
  215. package/dist/swap-vm/programs/program-builder.d.mts +26 -0
  216. package/dist/swap-vm/programs/program-builder.d.ts +26 -0
  217. package/dist/swap-vm/programs/regular-program-builder.d.mts +187 -0
  218. package/dist/swap-vm/programs/regular-program-builder.d.ts +187 -0
  219. package/dist/swap-vm/programs/swap-vm-program.d.mts +6 -0
  220. package/dist/swap-vm/programs/swap-vm-program.d.ts +6 -0
  221. package/dist/swap-vm/strategies/aqua-amm-strategy.d.mts +32 -0
  222. package/dist/swap-vm/strategies/aqua-amm-strategy.d.ts +32 -0
  223. package/dist/swap-vm/strategies/index.d.mts +1 -0
  224. package/dist/swap-vm/strategies/index.d.ts +1 -0
  225. package/dist/swap-vm/taker-traits.d.mts +214 -0
  226. package/dist/swap-vm/taker-traits.d.ts +214 -0
  227. package/dist/swap-vm/types.d.mts +22 -0
  228. package/dist/swap-vm/types.d.ts +22 -0
  229. package/dist/swap-vm-contract/constants.d.mts +13 -0
  230. package/dist/swap-vm-contract/constants.d.ts +13 -0
  231. package/dist/swap-vm-contract/events/index.d.mts +1 -0
  232. package/dist/swap-vm-contract/events/index.d.ts +1 -0
  233. package/dist/swap-vm-contract/events/swapped-event.d.mts +19 -0
  234. package/dist/swap-vm-contract/events/swapped-event.d.ts +19 -0
  235. package/dist/swap-vm-contract/index.d.mts +4 -0
  236. package/dist/swap-vm-contract/index.d.ts +4 -0
  237. package/dist/swap-vm-contract/swap-vm-contract.d.mts +38 -0
  238. package/dist/swap-vm-contract/swap-vm-contract.d.ts +38 -0
  239. package/dist/swap-vm-contract/types.d.mts +22 -0
  240. package/dist/swap-vm-contract/types.d.ts +22 -0
  241. package/package.json +72 -0
@@ -0,0 +1,5 @@
1
+ /**
2
+ * Applies time-based decay to balance adjustments
3
+ * @see https://github.com/1inch/swap-vm/blob/main/src/instructions/Decay.sol#L79
4
+ **/
5
+ export declare const decayXD: any;
@@ -0,0 +1,7 @@
1
+ import { HexString } from '@1inch/sdk-core';
2
+ import { DutchAuctionArgs } from './dutch-auction-args';
3
+ import type { IArgsCoder } from '../types';
4
+ export declare class DutchAuctionArgsCoder implements IArgsCoder<DutchAuctionArgs> {
5
+ encode(args: DutchAuctionArgs): HexString;
6
+ decode(data: HexString): DutchAuctionArgs;
7
+ }
@@ -0,0 +1,7 @@
1
+ import { HexString } from '@1inch/sdk-core';
2
+ import { DutchAuctionArgs } from './dutch-auction-args';
3
+ import type { IArgsCoder } from '../types';
4
+ export declare class DutchAuctionArgsCoder implements IArgsCoder<DutchAuctionArgs> {
5
+ encode(args: DutchAuctionArgs): HexString;
6
+ decode(data: HexString): DutchAuctionArgs;
7
+ }
@@ -0,0 +1,44 @@
1
+ import type { HexString } from '@1inch/sdk-core';
2
+ import type { IArgsData } from '../types';
3
+ /**
4
+ * @notice Dutch Auction instruction for time-based price decay with deadline
5
+ * @dev Implements an exponential decay auction mechanism that works after any swap:
6
+ * - Designed to be used after any swap instruction (LimitSwap, XYCSwap, etc.) which sets amounts
7
+ * - Applies time-based decay to the amounts calculated by the previous swap
8
+ * - Maker sells token0 and receives token1
9
+ * - Price improves for taker over time through exponential decay until deadline
10
+ * - Reverts if current time exceeds deadline
11
+ * - Only works for 1=>0 swaps (token1 to token0)
12
+ *
13
+ * The decay factor determines the price reduction rate:
14
+ * - 1.0e18 = no decay (constant price)
15
+ * - 0.999e18 = 0.1% decay per second
16
+ * - 0.99e18 = 1% decay per second
17
+ * - 0.9e18 = 10% decay per second
18
+ *
19
+ * Example usage:
20
+ * 1. Any swap instruction sets: 100 token1 → 1000 token0
21
+ * 2. DutchAuction with decayFactor = 0.99e18, after 100 seconds:
22
+ * - exactIn: Taker gets ~2.73x more token0 for the same token1
23
+ * - exactOut: Taker needs only ~36.6% of initial token1
24
+ * 3. After deadline, the auction expires and cannot be executed
25
+ *
26
+ * @see https://github.com/1inch/swap-vm/blob/main/src/instructions/DutchAuction.sol#L66
27
+ */
28
+ export declare class DutchAuctionArgs implements IArgsData {
29
+ readonly startTime: bigint;
30
+ readonly duration: bigint;
31
+ readonly decayFactor: bigint;
32
+ static readonly CODER: any;
33
+ /**
34
+ * startTime - auction start time (uint40)
35
+ * duration - auction duration in seconds (uint16)
36
+ * decayFactor - price decay per second, 1e18 = no decay (uint32)
37
+ **/
38
+ constructor(startTime: bigint, duration: bigint, decayFactor: bigint);
39
+ /**
40
+ * Decodes hex data into DutchAuctionArgs instance
41
+ **/
42
+ static decode(data: HexString): DutchAuctionArgs;
43
+ toJSON(): Record<string, unknown>;
44
+ }
@@ -0,0 +1,44 @@
1
+ import type { HexString } from '@1inch/sdk-core';
2
+ import type { IArgsData } from '../types';
3
+ /**
4
+ * @notice Dutch Auction instruction for time-based price decay with deadline
5
+ * @dev Implements an exponential decay auction mechanism that works after any swap:
6
+ * - Designed to be used after any swap instruction (LimitSwap, XYCSwap, etc.) which sets amounts
7
+ * - Applies time-based decay to the amounts calculated by the previous swap
8
+ * - Maker sells token0 and receives token1
9
+ * - Price improves for taker over time through exponential decay until deadline
10
+ * - Reverts if current time exceeds deadline
11
+ * - Only works for 1=>0 swaps (token1 to token0)
12
+ *
13
+ * The decay factor determines the price reduction rate:
14
+ * - 1.0e18 = no decay (constant price)
15
+ * - 0.999e18 = 0.1% decay per second
16
+ * - 0.99e18 = 1% decay per second
17
+ * - 0.9e18 = 10% decay per second
18
+ *
19
+ * Example usage:
20
+ * 1. Any swap instruction sets: 100 token1 → 1000 token0
21
+ * 2. DutchAuction with decayFactor = 0.99e18, after 100 seconds:
22
+ * - exactIn: Taker gets ~2.73x more token0 for the same token1
23
+ * - exactOut: Taker needs only ~36.6% of initial token1
24
+ * 3. After deadline, the auction expires and cannot be executed
25
+ *
26
+ * @see https://github.com/1inch/swap-vm/blob/main/src/instructions/DutchAuction.sol#L66
27
+ */
28
+ export declare class DutchAuctionArgs implements IArgsData {
29
+ readonly startTime: bigint;
30
+ readonly duration: bigint;
31
+ readonly decayFactor: bigint;
32
+ static readonly CODER: any;
33
+ /**
34
+ * startTime - auction start time (uint40)
35
+ * duration - auction duration in seconds (uint16)
36
+ * decayFactor - price decay per second, 1e18 = no decay (uint32)
37
+ **/
38
+ constructor(startTime: bigint, duration: bigint, decayFactor: bigint);
39
+ /**
40
+ * Decodes hex data into DutchAuctionArgs instance
41
+ **/
42
+ static decode(data: HexString): DutchAuctionArgs;
43
+ toJSON(): Record<string, unknown>;
44
+ }
@@ -0,0 +1,2 @@
1
+ export * from './opcodes';
2
+ export { DutchAuctionArgs } from './dutch-auction-args';
@@ -0,0 +1,2 @@
1
+ export * from './opcodes';
2
+ export { DutchAuctionArgs } from './dutch-auction-args';
@@ -0,0 +1,10 @@
1
+ /**
2
+ * Dutch auction with time-based decay on amountIn
3
+ * @see https://github.com/1inch/swap-vm/blob/main/src/instructions/DutchAuction.sol#L75
4
+ **/
5
+ export declare const dutchAuctionBalanceIn1D: any;
6
+ /**
7
+ * Dutch auction with time-based decay on amountOut
8
+ * @see https://github.com/1inch/swap-vm/blob/main/src/instructions/DutchAuction.sol#L85
9
+ **/
10
+ export declare const dutchAuctionBalanceOut1D: any;
@@ -0,0 +1,10 @@
1
+ /**
2
+ * Dutch auction with time-based decay on amountIn
3
+ * @see https://github.com/1inch/swap-vm/blob/main/src/instructions/DutchAuction.sol#L75
4
+ **/
5
+ export declare const dutchAuctionBalanceIn1D: any;
6
+ /**
7
+ * Dutch auction with time-based decay on amountOut
8
+ * @see https://github.com/1inch/swap-vm/blob/main/src/instructions/DutchAuction.sol#L85
9
+ **/
10
+ export declare const dutchAuctionBalanceOut1D: any;
@@ -0,0 +1,13 @@
1
+ import { HexString } from '@1inch/sdk-core';
2
+ import type { IArgsCoder, IArgsData } from './types';
3
+ import { Opcode } from './opcode';
4
+ declare class EmptyCoder implements IArgsCoder<EmptyArgs> {
5
+ encode(_: EmptyArgs): HexString;
6
+ decode(_: HexString): EmptyArgs;
7
+ }
8
+ declare class EmptyArgs implements IArgsData {
9
+ static readonly CODER: EmptyCoder;
10
+ toJSON(): null;
11
+ }
12
+ export declare const EMPTY_OPCODE: Opcode<EmptyArgs>;
13
+ export {};
@@ -0,0 +1,13 @@
1
+ import { HexString } from '@1inch/sdk-core';
2
+ import type { IArgsCoder, IArgsData } from './types';
3
+ import { Opcode } from './opcode';
4
+ declare class EmptyCoder implements IArgsCoder<EmptyArgs> {
5
+ encode(_: EmptyArgs): HexString;
6
+ decode(_: HexString): EmptyArgs;
7
+ }
8
+ declare class EmptyArgs implements IArgsData {
9
+ static readonly CODER: EmptyCoder;
10
+ toJSON(): null;
11
+ }
12
+ export declare const EMPTY_OPCODE: Opcode<EmptyArgs>;
13
+ export {};
@@ -0,0 +1,7 @@
1
+ import { HexString } from '@1inch/sdk-core';
2
+ import { ExtructionArgs } from './extruction-args';
3
+ import type { IArgsCoder } from '../types';
4
+ export declare class ExtructionArgsCoder implements IArgsCoder<ExtructionArgs> {
5
+ encode(args: ExtructionArgs): HexString;
6
+ decode(data: HexString): ExtructionArgs;
7
+ }
@@ -0,0 +1,7 @@
1
+ import { HexString } from '@1inch/sdk-core';
2
+ import { ExtructionArgs } from './extruction-args';
3
+ import type { IArgsCoder } from '../types';
4
+ export declare class ExtructionArgsCoder implements IArgsCoder<ExtructionArgs> {
5
+ encode(args: ExtructionArgs): HexString;
6
+ decode(data: HexString): ExtructionArgs;
7
+ }
@@ -0,0 +1,21 @@
1
+ import type { Address, HexString } from '@1inch/sdk-core';
2
+ import type { IArgsData } from '../types';
3
+ /**
4
+ * Arguments for extruction instruction to call external contract logic
5
+ * @see https://github.com/1inch/swap-vm/blob/main/src/instructions/Extruction.sol#L33
6
+ **/
7
+ export declare class ExtructionArgs implements IArgsData {
8
+ readonly target: Address;
9
+ readonly extructionArgs: HexString;
10
+ static readonly CODER: any;
11
+ /**
12
+ * target - External contract address (20 bytes)
13
+ * extructionArgs - Arguments to pass to external contract (variable)
14
+ **/
15
+ constructor(target: Address, extructionArgs: HexString);
16
+ /**
17
+ * Decodes hex data into ExtructionArgs instance
18
+ **/
19
+ static decode(data: HexString): ExtructionArgs;
20
+ toJSON(): Record<string, unknown>;
21
+ }
@@ -0,0 +1,21 @@
1
+ import type { Address, HexString } from '@1inch/sdk-core';
2
+ import type { IArgsData } from '../types';
3
+ /**
4
+ * Arguments for extruction instruction to call external contract logic
5
+ * @see https://github.com/1inch/swap-vm/blob/main/src/instructions/Extruction.sol#L33
6
+ **/
7
+ export declare class ExtructionArgs implements IArgsData {
8
+ readonly target: Address;
9
+ readonly extructionArgs: HexString;
10
+ static readonly CODER: any;
11
+ /**
12
+ * target - External contract address (20 bytes)
13
+ * extructionArgs - Arguments to pass to external contract (variable)
14
+ **/
15
+ constructor(target: Address, extructionArgs: HexString);
16
+ /**
17
+ * Decodes hex data into ExtructionArgs instance
18
+ **/
19
+ static decode(data: HexString): ExtructionArgs;
20
+ toJSON(): Record<string, unknown>;
21
+ }
@@ -0,0 +1,2 @@
1
+ export * from './opcodes';
2
+ export { ExtructionArgs } from './extruction-args';
@@ -0,0 +1,2 @@
1
+ export * from './opcodes';
2
+ export { ExtructionArgs } from './extruction-args';
@@ -0,0 +1,5 @@
1
+ /**
2
+ * Calls external contract to perform custom logic, potentially modifying swap state
3
+ * @see https://github.com/1inch/swap-vm/blob/main/src/instructions/Extruction.sol#L33
4
+ **/
5
+ export declare const extruction: any;
@@ -0,0 +1,5 @@
1
+ /**
2
+ * Calls external contract to perform custom logic, potentially modifying swap state
3
+ * @see https://github.com/1inch/swap-vm/blob/main/src/instructions/Extruction.sol#L33
4
+ **/
5
+ export declare const extruction: any;
@@ -0,0 +1,7 @@
1
+ import { HexString } from '@1inch/sdk-core';
2
+ import { FlatFeeArgs } from './flat-fee-args';
3
+ import type { IArgsCoder } from '../types';
4
+ export declare class FlatFeeArgsCoder implements IArgsCoder<FlatFeeArgs> {
5
+ encode(args: FlatFeeArgs): HexString;
6
+ decode(data: HexString): FlatFeeArgs;
7
+ }
@@ -0,0 +1,7 @@
1
+ import { HexString } from '@1inch/sdk-core';
2
+ import { FlatFeeArgs } from './flat-fee-args';
3
+ import type { IArgsCoder } from '../types';
4
+ export declare class FlatFeeArgsCoder implements IArgsCoder<FlatFeeArgs> {
5
+ encode(args: FlatFeeArgs): HexString;
6
+ decode(data: HexString): FlatFeeArgs;
7
+ }
@@ -0,0 +1,28 @@
1
+ import type { HexString } from '@1inch/sdk-core';
2
+ import type { IArgsData } from '../types';
3
+ /**
4
+ * Arguments for flat fee instructions (flatFeeXD, flatFeeAmountInXD, flatFeeAmountOutXD, progressiveFeeXD)
5
+ * @see https://github.com/1inch/swap-vm/blob/main/src/instructions/Fee.sol#L66
6
+ **/
7
+ export declare class FlatFeeArgs implements IArgsData {
8
+ readonly fee: bigint;
9
+ static readonly CODER: any;
10
+ constructor(fee: bigint);
11
+ /**
12
+ * Decodes hex data into FlatFeeArgs instance
13
+ **/
14
+ static decode(data: HexString): FlatFeeArgs;
15
+ /**
16
+ * Creates a FlatFeeArgs instance from percentage
17
+ * @param percent - Fee as percentage (e.g., 1 for 1%, 0.1 for 0.1%)
18
+ * @returns FlatFeeArgs instance
19
+ */
20
+ static fromPercent(percent: number): FlatFeeArgs;
21
+ /**
22
+ * Creates a FlatFeeArgs instance from basis points
23
+ * @param bps - Fee in basis points (10000 bps = 100%)
24
+ * @returns FlatFeeArgs instance
25
+ */
26
+ static fromBps(bps: number): FlatFeeArgs;
27
+ toJSON(): Record<string, unknown>;
28
+ }
@@ -0,0 +1,28 @@
1
+ import type { HexString } from '@1inch/sdk-core';
2
+ import type { IArgsData } from '../types';
3
+ /**
4
+ * Arguments for flat fee instructions (flatFeeXD, flatFeeAmountInXD, flatFeeAmountOutXD, progressiveFeeXD)
5
+ * @see https://github.com/1inch/swap-vm/blob/main/src/instructions/Fee.sol#L66
6
+ **/
7
+ export declare class FlatFeeArgs implements IArgsData {
8
+ readonly fee: bigint;
9
+ static readonly CODER: any;
10
+ constructor(fee: bigint);
11
+ /**
12
+ * Decodes hex data into FlatFeeArgs instance
13
+ **/
14
+ static decode(data: HexString): FlatFeeArgs;
15
+ /**
16
+ * Creates a FlatFeeArgs instance from percentage
17
+ * @param percent - Fee as percentage (e.g., 1 for 1%, 0.1 for 0.1%)
18
+ * @returns FlatFeeArgs instance
19
+ */
20
+ static fromPercent(percent: number): FlatFeeArgs;
21
+ /**
22
+ * Creates a FlatFeeArgs instance from basis points
23
+ * @param bps - Fee in basis points (10000 bps = 100%)
24
+ * @returns FlatFeeArgs instance
25
+ */
26
+ static fromBps(bps: number): FlatFeeArgs;
27
+ toJSON(): Record<string, unknown>;
28
+ }
@@ -0,0 +1,3 @@
1
+ export * from './opcodes';
2
+ export { FlatFeeArgs } from './flat-fee-args';
3
+ export { ProtocolFeeArgs } from './protocol-fee-args';
@@ -0,0 +1,3 @@
1
+ export * from './opcodes';
2
+ export { FlatFeeArgs } from './flat-fee-args';
3
+ export { ProtocolFeeArgs } from './protocol-fee-args';
@@ -0,0 +1,30 @@
1
+ /**
2
+ * Applies fee to amountIn
3
+ * @see https://github.com/1inch/swap-vm/blob/main/src/instructions/Fee.sol#L66
4
+ **/
5
+ export declare const flatFeeAmountInXD: any;
6
+ /**
7
+ * Applies fee to amountOut
8
+ * @see https://github.com/1inch/swap-vm/blob/main/src/instructions/Fee.sol#L72
9
+ **/
10
+ export declare const flatFeeAmountOutXD: any;
11
+ /**
12
+ * Applies progressive fee to amountIn
13
+ * @see https://github.com/1inch/swap-vm/blob/main/src/instructions/Fee.sol#L78
14
+ **/
15
+ export declare const progressiveFeeInXD: any;
16
+ /**
17
+ * Applies progressive fee to amountOut
18
+ * @see https://github.com/1inch/swap-vm/blob/main/src/instructions/Fee.sol#L106
19
+ **/
20
+ export declare const progressiveFeeOutXD: any;
21
+ /**
22
+ * Applies protocol fee to amountOut with direct transfer
23
+ * @see https://github.com/1inch/swap-vm/blob/main/src/instructions/Fee.sol#L102
24
+ **/
25
+ export declare const protocolFeeAmountOutXD: any;
26
+ /**
27
+ * Applies protocol fee to amountOut through Aqua protocol
28
+ * @see https://github.com/1inch/swap-vm/blob/main/src/instructions/Fee.sol#L110
29
+ **/
30
+ export declare const aquaProtocolFeeAmountOutXD: any;
@@ -0,0 +1,30 @@
1
+ /**
2
+ * Applies fee to amountIn
3
+ * @see https://github.com/1inch/swap-vm/blob/main/src/instructions/Fee.sol#L66
4
+ **/
5
+ export declare const flatFeeAmountInXD: any;
6
+ /**
7
+ * Applies fee to amountOut
8
+ * @see https://github.com/1inch/swap-vm/blob/main/src/instructions/Fee.sol#L72
9
+ **/
10
+ export declare const flatFeeAmountOutXD: any;
11
+ /**
12
+ * Applies progressive fee to amountIn
13
+ * @see https://github.com/1inch/swap-vm/blob/main/src/instructions/Fee.sol#L78
14
+ **/
15
+ export declare const progressiveFeeInXD: any;
16
+ /**
17
+ * Applies progressive fee to amountOut
18
+ * @see https://github.com/1inch/swap-vm/blob/main/src/instructions/Fee.sol#L106
19
+ **/
20
+ export declare const progressiveFeeOutXD: any;
21
+ /**
22
+ * Applies protocol fee to amountOut with direct transfer
23
+ * @see https://github.com/1inch/swap-vm/blob/main/src/instructions/Fee.sol#L102
24
+ **/
25
+ export declare const protocolFeeAmountOutXD: any;
26
+ /**
27
+ * Applies protocol fee to amountOut through Aqua protocol
28
+ * @see https://github.com/1inch/swap-vm/blob/main/src/instructions/Fee.sol#L110
29
+ **/
30
+ export declare const aquaProtocolFeeAmountOutXD: any;
@@ -0,0 +1,7 @@
1
+ import { HexString } from '@1inch/sdk-core';
2
+ import { ProtocolFeeArgs } from './protocol-fee-args';
3
+ import type { IArgsCoder } from '../types';
4
+ export declare class ProtocolFeeArgsCoder implements IArgsCoder<ProtocolFeeArgs> {
5
+ encode(args: ProtocolFeeArgs): HexString;
6
+ decode(data: HexString): ProtocolFeeArgs;
7
+ }
@@ -0,0 +1,7 @@
1
+ import { HexString } from '@1inch/sdk-core';
2
+ import { ProtocolFeeArgs } from './protocol-fee-args';
3
+ import type { IArgsCoder } from '../types';
4
+ export declare class ProtocolFeeArgsCoder implements IArgsCoder<ProtocolFeeArgs> {
5
+ encode(args: ProtocolFeeArgs): HexString;
6
+ decode(data: HexString): ProtocolFeeArgs;
7
+ }
@@ -0,0 +1,35 @@
1
+ import type { Address, HexString } from '@1inch/sdk-core';
2
+ import type { IArgsData } from '../types';
3
+ /**
4
+ * Arguments for protocol fee instructions (protocolFeeAmountOutXD, aquaProtocolFeeAmountOutXD)
5
+ * @see https://github.com/1inch/swap-vm/blob/main/src/instructions/Fee.sol#L102
6
+ **/
7
+ export declare class ProtocolFeeArgs implements IArgsData {
8
+ readonly fee: bigint;
9
+ readonly to: Address;
10
+ static readonly CODER: any;
11
+ /**
12
+ * fee - 1e9 = 100% (uint32)
13
+ * to - address to send pulled tokens to (20 bytes)
14
+ **/
15
+ constructor(fee: bigint, to: Address);
16
+ /**
17
+ * Decodes hex data into ProtocolFeeArgs instance
18
+ **/
19
+ static decode(data: HexString): ProtocolFeeArgs;
20
+ /**
21
+ * Creates a ProtocolFeeArgs instance from percentage
22
+ * @param percent - Fee as percentage (e.g., 1 for 1%, 0.1 for 0.1%)
23
+ * @param to - Address to receive the protocol fee
24
+ * @returns ProtocolFeeArgs instance
25
+ */
26
+ static fromPercent(percent: number, to: Address): ProtocolFeeArgs;
27
+ /**
28
+ * Creates a ProtocolFeeArgs instance from basis points
29
+ * @param bps - Fee in basis points (10000 bps = 100%)
30
+ * @param to - Address to receive the protocol fee
31
+ * @returns ProtocolFeeArgs instance
32
+ */
33
+ static fromBps(bps: number, to: Address): ProtocolFeeArgs;
34
+ toJSON(): Record<string, unknown>;
35
+ }
@@ -0,0 +1,35 @@
1
+ import type { Address, HexString } from '@1inch/sdk-core';
2
+ import type { IArgsData } from '../types';
3
+ /**
4
+ * Arguments for protocol fee instructions (protocolFeeAmountOutXD, aquaProtocolFeeAmountOutXD)
5
+ * @see https://github.com/1inch/swap-vm/blob/main/src/instructions/Fee.sol#L102
6
+ **/
7
+ export declare class ProtocolFeeArgs implements IArgsData {
8
+ readonly fee: bigint;
9
+ readonly to: Address;
10
+ static readonly CODER: any;
11
+ /**
12
+ * fee - 1e9 = 100% (uint32)
13
+ * to - address to send pulled tokens to (20 bytes)
14
+ **/
15
+ constructor(fee: bigint, to: Address);
16
+ /**
17
+ * Decodes hex data into ProtocolFeeArgs instance
18
+ **/
19
+ static decode(data: HexString): ProtocolFeeArgs;
20
+ /**
21
+ * Creates a ProtocolFeeArgs instance from percentage
22
+ * @param percent - Fee as percentage (e.g., 1 for 1%, 0.1 for 0.1%)
23
+ * @param to - Address to receive the protocol fee
24
+ * @returns ProtocolFeeArgs instance
25
+ */
26
+ static fromPercent(percent: number, to: Address): ProtocolFeeArgs;
27
+ /**
28
+ * Creates a ProtocolFeeArgs instance from basis points
29
+ * @param bps - Fee in basis points (10000 bps = 100%)
30
+ * @param to - Address to receive the protocol fee
31
+ * @returns ProtocolFeeArgs instance
32
+ */
33
+ static fromBps(bps: number, to: Address): ProtocolFeeArgs;
34
+ toJSON(): Record<string, unknown>;
35
+ }
@@ -0,0 +1,29 @@
1
+ import type { Opcode } from './opcode';
2
+ import type { IArgsData } from './types';
3
+ export * from './types';
4
+ export { EMPTY_OPCODE } from './empty';
5
+ export * as balances from './balances';
6
+ export * as controls from './controls';
7
+ export * as invalidators from './invalidators';
8
+ export * as xycSwap from './xyc-swap';
9
+ export * as concentrate from './concentrate';
10
+ export * as decay from './decay';
11
+ export * as limitSwap from './limit-swap';
12
+ export * as minRate from './min-rate';
13
+ export * as dutchAuction from './dutch-auction';
14
+ export * as oraclePriceAdjuster from './oracle-price-adjuster';
15
+ export * as baseFeeAdjuster from './base-fee-adjuster';
16
+ export * as twapSwap from './twap-swap';
17
+ export * as stableSwap from './stable-swap';
18
+ export * as fee from './fee';
19
+ export * as extruction from './extruction';
20
+ /**
21
+ * Regular opcodes array - matching SwapVM contract exactly (44 opcodes)
22
+ * @see https://github.com/1inch/swap-vm/blob/main/src/opcodes/Opcodes.sol#L46
23
+ */
24
+ export declare const _allInstructions: Opcode<IArgsData>[];
25
+ /**
26
+ * Aqua opcodes array - matching AquaSwapVM contract (29 opcodes)
27
+ * @see https://github.com/1inch/swap-vm/blob/main/src/opcodes/AquaOpcodes.sol#L28
28
+ */
29
+ export declare const aquaInstructions: Opcode<IArgsData>[];
@@ -0,0 +1,29 @@
1
+ import type { Opcode } from './opcode';
2
+ import type { IArgsData } from './types';
3
+ export * from './types';
4
+ export { EMPTY_OPCODE } from './empty';
5
+ export * as balances from './balances';
6
+ export * as controls from './controls';
7
+ export * as invalidators from './invalidators';
8
+ export * as xycSwap from './xyc-swap';
9
+ export * as concentrate from './concentrate';
10
+ export * as decay from './decay';
11
+ export * as limitSwap from './limit-swap';
12
+ export * as minRate from './min-rate';
13
+ export * as dutchAuction from './dutch-auction';
14
+ export * as oraclePriceAdjuster from './oracle-price-adjuster';
15
+ export * as baseFeeAdjuster from './base-fee-adjuster';
16
+ export * as twapSwap from './twap-swap';
17
+ export * as stableSwap from './stable-swap';
18
+ export * as fee from './fee';
19
+ export * as extruction from './extruction';
20
+ /**
21
+ * Regular opcodes array - matching SwapVM contract exactly (44 opcodes)
22
+ * @see https://github.com/1inch/swap-vm/blob/main/src/opcodes/Opcodes.sol#L46
23
+ */
24
+ export declare const _allInstructions: Opcode<IArgsData>[];
25
+ /**
26
+ * Aqua opcodes array - matching AquaSwapVM contract (29 opcodes)
27
+ * @see https://github.com/1inch/swap-vm/blob/main/src/opcodes/AquaOpcodes.sol#L28
28
+ */
29
+ export declare const aquaInstructions: Opcode<IArgsData>[];
@@ -0,0 +1,7 @@
1
+ import type { IArgsData, IInstruction, IOpcode } from './types';
2
+ export declare class Instruction<T extends IArgsData> implements IInstruction<T> {
3
+ readonly opcode: IOpcode<T>;
4
+ readonly args: T;
5
+ constructor(opcode: IOpcode<T>, args: T);
6
+ toJSON(): Record<string | number, unknown>;
7
+ }
@@ -0,0 +1,7 @@
1
+ import type { IArgsData, IInstruction, IOpcode } from './types';
2
+ export declare class Instruction<T extends IArgsData> implements IInstruction<T> {
3
+ readonly opcode: IOpcode<T>;
4
+ readonly args: T;
5
+ constructor(opcode: IOpcode<T>, args: T);
6
+ toJSON(): Record<string | number, unknown>;
7
+ }
@@ -0,0 +1,4 @@
1
+ export * from './opcodes';
2
+ export { InvalidateBit1DArgs } from './invalidate-bit-1d-args';
3
+ export { InvalidateTokenIn1DArgs } from './invalidate-token-in-1d-args';
4
+ export { InvalidateTokenOut1DArgs } from './invalidate-token-out-1d-args';
@@ -0,0 +1,4 @@
1
+ export * from './opcodes';
2
+ export { InvalidateBit1DArgs } from './invalidate-bit-1d-args';
3
+ export { InvalidateTokenIn1DArgs } from './invalidate-token-in-1d-args';
4
+ export { InvalidateTokenOut1DArgs } from './invalidate-token-out-1d-args';
@@ -0,0 +1,7 @@
1
+ import { HexString } from '@1inch/sdk-core';
2
+ import { InvalidateBit1DArgs } from './invalidate-bit-1d-args';
3
+ import type { IArgsCoder } from '../types';
4
+ export declare class InvalidateBit1DArgsCoder implements IArgsCoder<InvalidateBit1DArgs> {
5
+ encode(args: InvalidateBit1DArgs): HexString;
6
+ decode(data: HexString): InvalidateBit1DArgs;
7
+ }
@@ -0,0 +1,7 @@
1
+ import { HexString } from '@1inch/sdk-core';
2
+ import { InvalidateBit1DArgs } from './invalidate-bit-1d-args';
3
+ import type { IArgsCoder } from '../types';
4
+ export declare class InvalidateBit1DArgsCoder implements IArgsCoder<InvalidateBit1DArgs> {
5
+ encode(args: InvalidateBit1DArgs): HexString;
6
+ decode(data: HexString): InvalidateBit1DArgs;
7
+ }
@@ -0,0 +1,16 @@
1
+ import type { HexString } from '@1inch/sdk-core';
2
+ import type { IArgsData } from '../types';
3
+ /**
4
+ * Arguments for invalidateBit1D instruction to invalidate a specific bit index
5
+ * @see https://github.com/1inch/swap-vm/blob/main/src/instructions/Invalidators.sol#L75
6
+ **/
7
+ export declare class InvalidateBit1DArgs implements IArgsData {
8
+ readonly bitIndex: bigint;
9
+ static readonly CODER: any;
10
+ constructor(bitIndex: bigint);
11
+ /**
12
+ * Decodes hex data into InvalidateBit1DArgs instance
13
+ **/
14
+ static decode(data: HexString): InvalidateBit1DArgs;
15
+ toJSON(): Record<string, unknown>;
16
+ }
@@ -0,0 +1,16 @@
1
+ import type { HexString } from '@1inch/sdk-core';
2
+ import type { IArgsData } from '../types';
3
+ /**
4
+ * Arguments for invalidateBit1D instruction to invalidate a specific bit index
5
+ * @see https://github.com/1inch/swap-vm/blob/main/src/instructions/Invalidators.sol#L75
6
+ **/
7
+ export declare class InvalidateBit1DArgs implements IArgsData {
8
+ readonly bitIndex: bigint;
9
+ static readonly CODER: any;
10
+ constructor(bitIndex: bigint);
11
+ /**
12
+ * Decodes hex data into InvalidateBit1DArgs instance
13
+ **/
14
+ static decode(data: HexString): InvalidateBit1DArgs;
15
+ toJSON(): Record<string, unknown>;
16
+ }