@typemove/iota 1.10.0-rc.1

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 (134) hide show
  1. package/LICENSE +201 -0
  2. package/Readme.md +161 -0
  3. package/builtin/0x1/package.json +5 -0
  4. package/builtin/0x2/package.json +5 -0
  5. package/builtin/0x3/package.json +5 -0
  6. package/builtin/package.json +5 -0
  7. package/codegen/package.json +5 -0
  8. package/dist/cjs/builtin/0x1.d.ts +778 -0
  9. package/dist/cjs/builtin/0x1.d.ts.map +1 -0
  10. package/dist/cjs/builtin/0x1.js +4297 -0
  11. package/dist/cjs/builtin/0x1.js.map +1 -0
  12. package/dist/cjs/builtin/0x2.d.ts +4256 -0
  13. package/dist/cjs/builtin/0x2.d.ts.map +1 -0
  14. package/dist/cjs/builtin/0x2.js +16540 -0
  15. package/dist/cjs/builtin/0x2.js.map +1 -0
  16. package/dist/cjs/builtin/0x3.d.ts +1978 -0
  17. package/dist/cjs/builtin/0x3.d.ts.map +1 -0
  18. package/dist/cjs/builtin/0x3.js +6120 -0
  19. package/dist/cjs/builtin/0x3.js.map +1 -0
  20. package/dist/cjs/builtin/index.d.ts +4 -0
  21. package/dist/cjs/builtin/index.d.ts.map +1 -0
  22. package/dist/cjs/builtin/index.js +11 -0
  23. package/dist/cjs/builtin/index.js.map +1 -0
  24. package/dist/cjs/codegen/codegen.d.ts +20 -0
  25. package/dist/cjs/codegen/codegen.d.ts.map +1 -0
  26. package/dist/cjs/codegen/codegen.js +253 -0
  27. package/dist/cjs/codegen/codegen.js.map +1 -0
  28. package/dist/cjs/codegen/index.d.ts +2 -0
  29. package/dist/cjs/codegen/index.d.ts.map +1 -0
  30. package/dist/cjs/codegen/index.js +5 -0
  31. package/dist/cjs/codegen/index.js.map +1 -0
  32. package/dist/cjs/index.d.ts +4 -0
  33. package/dist/cjs/index.d.ts.map +1 -0
  34. package/dist/cjs/index.js +11 -0
  35. package/dist/cjs/index.js.map +1 -0
  36. package/dist/cjs/models.d.ts +18 -0
  37. package/dist/cjs/models.d.ts.map +1 -0
  38. package/dist/cjs/models.js +5 -0
  39. package/dist/cjs/models.js.map +1 -0
  40. package/dist/cjs/move-coder.d.ts +27 -0
  41. package/dist/cjs/move-coder.d.ts.map +1 -0
  42. package/dist/cjs/move-coder.js +274 -0
  43. package/dist/cjs/move-coder.js.map +1 -0
  44. package/dist/cjs/package.json +3 -0
  45. package/dist/cjs/sui-chain-adapter.d.ts +15 -0
  46. package/dist/cjs/sui-chain-adapter.d.ts.map +1 -0
  47. package/dist/cjs/sui-chain-adapter.js +88 -0
  48. package/dist/cjs/sui-chain-adapter.js.map +1 -0
  49. package/dist/cjs/to-internal.d.ts +4 -0
  50. package/dist/cjs/to-internal.d.ts.map +1 -0
  51. package/dist/cjs/to-internal.js +99 -0
  52. package/dist/cjs/to-internal.js.map +1 -0
  53. package/dist/cjs/transaction.d.ts +15 -0
  54. package/dist/cjs/transaction.d.ts.map +1 -0
  55. package/dist/cjs/transaction.js +98 -0
  56. package/dist/cjs/transaction.js.map +1 -0
  57. package/dist/esm/builtin/0x1.d.ts +778 -0
  58. package/dist/esm/builtin/0x1.d.ts.map +1 -0
  59. package/dist/esm/builtin/0x1.js +4293 -0
  60. package/dist/esm/builtin/0x1.js.map +1 -0
  61. package/dist/esm/builtin/0x2.d.ts +4256 -0
  62. package/dist/esm/builtin/0x2.d.ts.map +1 -0
  63. package/dist/esm/builtin/0x2.js +16534 -0
  64. package/dist/esm/builtin/0x2.js.map +1 -0
  65. package/dist/esm/builtin/0x3.d.ts +1978 -0
  66. package/dist/esm/builtin/0x3.d.ts.map +1 -0
  67. package/dist/esm/builtin/0x3.js +6115 -0
  68. package/dist/esm/builtin/0x3.js.map +1 -0
  69. package/dist/esm/builtin/index.d.ts +4 -0
  70. package/dist/esm/builtin/index.d.ts.map +1 -0
  71. package/dist/esm/builtin/index.js +7 -0
  72. package/dist/esm/builtin/index.js.map +1 -0
  73. package/dist/esm/codegen/codegen.d.ts +20 -0
  74. package/dist/esm/codegen/codegen.d.ts.map +1 -0
  75. package/dist/esm/codegen/codegen.js +247 -0
  76. package/dist/esm/codegen/codegen.js.map +1 -0
  77. package/dist/esm/codegen/index.d.ts +2 -0
  78. package/dist/esm/codegen/index.d.ts.map +1 -0
  79. package/dist/esm/codegen/index.js +2 -0
  80. package/dist/esm/codegen/index.js.map +1 -0
  81. package/dist/esm/codegen/run.d.ts +3 -0
  82. package/dist/esm/codegen/run.d.ts.map +1 -0
  83. package/dist/esm/codegen/run.js +49 -0
  84. package/dist/esm/codegen/run.js.map +1 -0
  85. package/dist/esm/index.d.ts +4 -0
  86. package/dist/esm/index.d.ts.map +1 -0
  87. package/dist/esm/index.js +4 -0
  88. package/dist/esm/index.js.map +1 -0
  89. package/dist/esm/models.d.ts +18 -0
  90. package/dist/esm/models.d.ts.map +1 -0
  91. package/dist/esm/models.js +2 -0
  92. package/dist/esm/models.js.map +1 -0
  93. package/dist/esm/move-coder.d.ts +27 -0
  94. package/dist/esm/move-coder.d.ts.map +1 -0
  95. package/dist/esm/move-coder.js +268 -0
  96. package/dist/esm/move-coder.js.map +1 -0
  97. package/dist/esm/sui-chain-adapter.d.ts +15 -0
  98. package/dist/esm/sui-chain-adapter.d.ts.map +1 -0
  99. package/dist/esm/sui-chain-adapter.js +84 -0
  100. package/dist/esm/sui-chain-adapter.js.map +1 -0
  101. package/dist/esm/to-internal.d.ts +4 -0
  102. package/dist/esm/to-internal.d.ts.map +1 -0
  103. package/dist/esm/to-internal.js +96 -0
  104. package/dist/esm/to-internal.js.map +1 -0
  105. package/dist/esm/transaction.d.ts +15 -0
  106. package/dist/esm/transaction.d.ts.map +1 -0
  107. package/dist/esm/transaction.js +83 -0
  108. package/dist/esm/transaction.js.map +1 -0
  109. package/package.json +63 -0
  110. package/src/abis/0x1.json +4213 -0
  111. package/src/abis/0x2.json +26692 -0
  112. package/src/abis/0x3.json +10598 -0
  113. package/src/builtin/0x1.ts +6110 -0
  114. package/src/builtin/0x2.ts +24700 -0
  115. package/src/builtin/0x3.ts +9680 -0
  116. package/src/builtin/index.ts +6 -0
  117. package/src/codegen/codegen.ts +290 -0
  118. package/src/codegen/index.ts +1 -0
  119. package/src/codegen/run.ts +57 -0
  120. package/src/index.ts +4 -0
  121. package/src/models.ts +21 -0
  122. package/src/move-coder.ts +318 -0
  123. package/src/sui-chain-adapter.ts +113 -0
  124. package/src/tests/abis/testnet/0x1e2b124f746a339b3cf99b9f969393a96594519aafb1d06517aacfeeae20e7a5.json +265 -0
  125. package/src/tests/abis/testnet/0x6c4a21e3e7e6b6d51c4604021633e1d97e24e37a696f8c082cd48f37503e602a.json +2429 -0
  126. package/src/tests/abis/testnet/0x7f7a37c826c88bcfe9aecc042453395ddfa9df6f29cb7c97590bf86cf2b0a75e.json +1356 -0
  127. package/src/tests/abis/testnet/0xebaa2ad3eacc230f309cd933958cc52684df0a41ae7ac214d186b80f830867d2.json +10060 -0
  128. package/src/tests/types/testnet/0x1e2b124f746a339b3cf99b9f969393a96594519aafb1d06517aacfeeae20e7a5.ts +291 -0
  129. package/src/tests/types/testnet/0x6c4a21e3e7e6b6d51c4604021633e1d97e24e37a696f8c082cd48f37503e602a.ts +2468 -0
  130. package/src/tests/types/testnet/0x7f7a37c826c88bcfe9aecc042453395ddfa9df6f29cb7c97590bf86cf2b0a75e.ts +1389 -0
  131. package/src/tests/types/testnet/0xebaa2ad3eacc230f309cd933958cc52684df0a41ae7ac214d186b80f830867d2.ts +9522 -0
  132. package/src/tests/types/testnet/index.ts +7 -0
  133. package/src/to-internal.ts +127 -0
  134. package/src/transaction.ts +127 -0
@@ -0,0 +1,2468 @@
1
+ /* Autogenerated file. Do not edit manually. */
2
+ /* tslint:disable */
3
+ /* eslint-disable */
4
+
5
+ /* Generated types for 0x6c4a21e3e7e6b6d51c4604021633e1d97e24e37a696f8c082cd48f37503e602a, original address 0x6c4a21e3e7e6b6d51c4604021633e1d97e24e37a696f8c082cd48f37503e602a */
6
+
7
+ import { TypeDescriptor, ANY_TYPE } from "@typemove/move";
8
+ import { MoveCoder, TypedEventInstance } from "@typemove/iota";
9
+
10
+ import { defaultMoveCoder } from "@typemove/iota";
11
+
12
+ import {
13
+ ZERO_ADDRESS,
14
+ TypedDevInspectResults,
15
+ getMoveCoder,
16
+ } from "@typemove/iota";
17
+ import {
18
+ Transaction,
19
+ TransactionArgument,
20
+ TransactionObjectArgument,
21
+ } from "@iota/iota-sdk/transactions";
22
+ import { IotaClient } from "@iota/iota-sdk/client";
23
+ import {
24
+ transactionArgumentOrObject,
25
+ transactionArgumentOrVec,
26
+ transactionArgumentOrPure,
27
+ transactionArgumentOrPureU8,
28
+ transactionArgumentOrPureU16,
29
+ transactionArgumentOrPureU32,
30
+ transactionArgumentOrPureU64,
31
+ transactionArgumentOrPureU128,
32
+ transactionArgumentOrPureU256,
33
+ transactionArgumentOrPureBool,
34
+ transactionArgumentOrPureString,
35
+ transactionArgumentOrPureAddress,
36
+ } from "@typemove/iota";
37
+
38
+ import * as _0x2 from "@typemove/iota/builtin/0x2";
39
+ import * as _0x1 from "@typemove/iota/builtin/0x1";
40
+
41
+ export namespace comparator {
42
+ export interface Result {
43
+ inner: number;
44
+ }
45
+
46
+ export namespace Result {
47
+ export const TYPE_QNAME =
48
+ "0x6c4a21e3e7e6b6d51c4604021633e1d97e24e37a696f8c082cd48f37503e602a::comparator::Result";
49
+
50
+ const TYPE = new TypeDescriptor<Result>(Result.TYPE_QNAME);
51
+
52
+ export function type(): TypeDescriptor<Result> {
53
+ return TYPE.apply();
54
+ }
55
+ }
56
+
57
+ export namespace builder {
58
+ export function compare<T0 = any>(
59
+ tx: Transaction,
60
+ args: [
61
+ string | TransactionObjectArgument | TransactionArgument,
62
+ string | TransactionObjectArgument | TransactionArgument,
63
+ ],
64
+ typeArguments: [TypeDescriptor<T0> | string],
65
+ ): TransactionArgument & [TransactionArgument, TransactionArgument] {
66
+ const _args: any[] = [];
67
+ _args.push(transactionArgumentOrObject(args[0], tx));
68
+ _args.push(transactionArgumentOrObject(args[1], tx));
69
+
70
+ // @ts-ignore
71
+ return tx.moveCall({
72
+ target:
73
+ "0x6c4a21e3e7e6b6d51c4604021633e1d97e24e37a696f8c082cd48f37503e602a::comparator::compare",
74
+ arguments: _args,
75
+ typeArguments: [
76
+ typeof typeArguments[0] === "string"
77
+ ? typeArguments[0]
78
+ : typeArguments[0].getSignature(),
79
+ ],
80
+ });
81
+ }
82
+ export function compareU8Vector(
83
+ tx: Transaction,
84
+ args: [
85
+ (string | TransactionObjectArgument)[] | TransactionArgument,
86
+ (string | TransactionObjectArgument)[] | TransactionArgument,
87
+ ],
88
+ ): TransactionArgument & [TransactionArgument, TransactionArgument] {
89
+ const _args: any[] = [];
90
+ _args.push(transactionArgumentOrVec(args[0], tx));
91
+ _args.push(transactionArgumentOrVec(args[1], tx));
92
+
93
+ // @ts-ignore
94
+ return tx.moveCall({
95
+ target:
96
+ "0x6c4a21e3e7e6b6d51c4604021633e1d97e24e37a696f8c082cd48f37503e602a::comparator::compare_u8_vector",
97
+ arguments: _args,
98
+ });
99
+ }
100
+ export function isEqual(
101
+ tx: Transaction,
102
+ args: [string | TransactionObjectArgument | TransactionArgument],
103
+ ): TransactionArgument & [TransactionArgument] {
104
+ const _args: any[] = [];
105
+ _args.push(transactionArgumentOrObject(args[0], tx));
106
+
107
+ // @ts-ignore
108
+ return tx.moveCall({
109
+ target:
110
+ "0x6c4a21e3e7e6b6d51c4604021633e1d97e24e37a696f8c082cd48f37503e602a::comparator::is_equal",
111
+ arguments: _args,
112
+ });
113
+ }
114
+ export function isGreaterThan(
115
+ tx: Transaction,
116
+ args: [string | TransactionObjectArgument | TransactionArgument],
117
+ ): TransactionArgument & [TransactionArgument] {
118
+ const _args: any[] = [];
119
+ _args.push(transactionArgumentOrObject(args[0], tx));
120
+
121
+ // @ts-ignore
122
+ return tx.moveCall({
123
+ target:
124
+ "0x6c4a21e3e7e6b6d51c4604021633e1d97e24e37a696f8c082cd48f37503e602a::comparator::is_greater_than",
125
+ arguments: _args,
126
+ });
127
+ }
128
+ export function isSmallerThan(
129
+ tx: Transaction,
130
+ args: [string | TransactionObjectArgument | TransactionArgument],
131
+ ): TransactionArgument & [TransactionArgument] {
132
+ const _args: any[] = [];
133
+ _args.push(transactionArgumentOrObject(args[0], tx));
134
+
135
+ // @ts-ignore
136
+ return tx.moveCall({
137
+ target:
138
+ "0x6c4a21e3e7e6b6d51c4604021633e1d97e24e37a696f8c082cd48f37503e602a::comparator::is_smaller_than",
139
+ arguments: _args,
140
+ });
141
+ }
142
+ }
143
+ export namespace view {
144
+ export async function compare<T0 = any>(
145
+ client: IotaClient,
146
+ args: [string, string],
147
+ typeArguments: [TypeDescriptor<T0> | string],
148
+ ): Promise<TypedDevInspectResults<[comparator.Result]>> {
149
+ const tx = new Transaction();
150
+ builder.compare(tx, args, typeArguments);
151
+ const inspectRes = await client.devInspectTransactionBlock({
152
+ transactionBlock: tx,
153
+ sender: ZERO_ADDRESS,
154
+ });
155
+
156
+ return (await getMoveCoder(client)).decodeDevInspectResult<
157
+ [comparator.Result]
158
+ >(inspectRes);
159
+ }
160
+ export async function compareU8Vector(
161
+ client: IotaClient,
162
+ args: [string[], string[]],
163
+ ): Promise<TypedDevInspectResults<[comparator.Result]>> {
164
+ const tx = new Transaction();
165
+ builder.compareU8Vector(tx, args);
166
+ const inspectRes = await client.devInspectTransactionBlock({
167
+ transactionBlock: tx,
168
+ sender: ZERO_ADDRESS,
169
+ });
170
+
171
+ return (await getMoveCoder(client)).decodeDevInspectResult<
172
+ [comparator.Result]
173
+ >(inspectRes);
174
+ }
175
+ export async function isEqual(
176
+ client: IotaClient,
177
+ args: [string],
178
+ ): Promise<TypedDevInspectResults<[boolean]>> {
179
+ const tx = new Transaction();
180
+ builder.isEqual(tx, args);
181
+ const inspectRes = await client.devInspectTransactionBlock({
182
+ transactionBlock: tx,
183
+ sender: ZERO_ADDRESS,
184
+ });
185
+
186
+ return (await getMoveCoder(client)).decodeDevInspectResult<[boolean]>(
187
+ inspectRes,
188
+ );
189
+ }
190
+ export async function isGreaterThan(
191
+ client: IotaClient,
192
+ args: [string],
193
+ ): Promise<TypedDevInspectResults<[boolean]>> {
194
+ const tx = new Transaction();
195
+ builder.isGreaterThan(tx, args);
196
+ const inspectRes = await client.devInspectTransactionBlock({
197
+ transactionBlock: tx,
198
+ sender: ZERO_ADDRESS,
199
+ });
200
+
201
+ return (await getMoveCoder(client)).decodeDevInspectResult<[boolean]>(
202
+ inspectRes,
203
+ );
204
+ }
205
+ export async function isSmallerThan(
206
+ client: IotaClient,
207
+ args: [string],
208
+ ): Promise<TypedDevInspectResults<[boolean]>> {
209
+ const tx = new Transaction();
210
+ builder.isSmallerThan(tx, args);
211
+ const inspectRes = await client.devInspectTransactionBlock({
212
+ transactionBlock: tx,
213
+ sender: ZERO_ADDRESS,
214
+ });
215
+
216
+ return (await getMoveCoder(client)).decodeDevInspectResult<[boolean]>(
217
+ inspectRes,
218
+ );
219
+ }
220
+ }
221
+ }
222
+
223
+ export namespace math_utils {
224
+ export namespace builder {
225
+ export function max(
226
+ tx: Transaction,
227
+ args: [bigint | TransactionArgument, bigint | TransactionArgument],
228
+ ): TransactionArgument & [TransactionArgument, TransactionArgument] {
229
+ const _args: any[] = [];
230
+ _args.push(transactionArgumentOrPureU128(args[0], tx));
231
+ _args.push(transactionArgumentOrPureU128(args[1], tx));
232
+
233
+ // @ts-ignore
234
+ return tx.moveCall({
235
+ target:
236
+ "0x6c4a21e3e7e6b6d51c4604021633e1d97e24e37a696f8c082cd48f37503e602a::math_utils::max",
237
+ arguments: _args,
238
+ });
239
+ }
240
+ export function maxU64(
241
+ tx: Transaction,
242
+ args: [bigint | TransactionArgument, bigint | TransactionArgument],
243
+ ): TransactionArgument & [TransactionArgument, TransactionArgument] {
244
+ const _args: any[] = [];
245
+ _args.push(transactionArgumentOrPureU64(args[0], tx));
246
+ _args.push(transactionArgumentOrPureU64(args[1], tx));
247
+
248
+ // @ts-ignore
249
+ return tx.moveCall({
250
+ target:
251
+ "0x6c4a21e3e7e6b6d51c4604021633e1d97e24e37a696f8c082cd48f37503e602a::math_utils::max_u64",
252
+ arguments: _args,
253
+ });
254
+ }
255
+ export function min(
256
+ tx: Transaction,
257
+ args: [bigint | TransactionArgument, bigint | TransactionArgument],
258
+ ): TransactionArgument & [TransactionArgument, TransactionArgument] {
259
+ const _args: any[] = [];
260
+ _args.push(transactionArgumentOrPureU128(args[0], tx));
261
+ _args.push(transactionArgumentOrPureU128(args[1], tx));
262
+
263
+ // @ts-ignore
264
+ return tx.moveCall({
265
+ target:
266
+ "0x6c4a21e3e7e6b6d51c4604021633e1d97e24e37a696f8c082cd48f37503e602a::math_utils::min",
267
+ arguments: _args,
268
+ });
269
+ }
270
+ export function pow(
271
+ tx: Transaction,
272
+ args: [bigint | TransactionArgument, number | TransactionArgument],
273
+ ): TransactionArgument & [TransactionArgument, TransactionArgument] {
274
+ const _args: any[] = [];
275
+ _args.push(transactionArgumentOrPureU128(args[0], tx));
276
+ _args.push(transactionArgumentOrPureU8(args[1], tx));
277
+
278
+ // @ts-ignore
279
+ return tx.moveCall({
280
+ target:
281
+ "0x6c4a21e3e7e6b6d51c4604021633e1d97e24e37a696f8c082cd48f37503e602a::math_utils::pow",
282
+ arguments: _args,
283
+ });
284
+ }
285
+ export function sqrt(
286
+ tx: Transaction,
287
+ args: [bigint | TransactionArgument],
288
+ ): TransactionArgument & [TransactionArgument] {
289
+ const _args: any[] = [];
290
+ _args.push(transactionArgumentOrPureU128(args[0], tx));
291
+
292
+ // @ts-ignore
293
+ return tx.moveCall({
294
+ target:
295
+ "0x6c4a21e3e7e6b6d51c4604021633e1d97e24e37a696f8c082cd48f37503e602a::math_utils::sqrt",
296
+ arguments: _args,
297
+ });
298
+ }
299
+ export function sqrtU256(
300
+ tx: Transaction,
301
+ args: [bigint | TransactionArgument],
302
+ ): TransactionArgument & [TransactionArgument] {
303
+ const _args: any[] = [];
304
+ _args.push(transactionArgumentOrPureU256(args[0], tx));
305
+
306
+ // @ts-ignore
307
+ return tx.moveCall({
308
+ target:
309
+ "0x6c4a21e3e7e6b6d51c4604021633e1d97e24e37a696f8c082cd48f37503e602a::math_utils::sqrt_u256",
310
+ arguments: _args,
311
+ });
312
+ }
313
+ }
314
+ export namespace view {
315
+ export async function max(
316
+ client: IotaClient,
317
+ args: [bigint, bigint],
318
+ ): Promise<TypedDevInspectResults<[bigint]>> {
319
+ const tx = new Transaction();
320
+ builder.max(tx, args);
321
+ const inspectRes = await client.devInspectTransactionBlock({
322
+ transactionBlock: tx,
323
+ sender: ZERO_ADDRESS,
324
+ });
325
+
326
+ return (await getMoveCoder(client)).decodeDevInspectResult<[bigint]>(
327
+ inspectRes,
328
+ );
329
+ }
330
+ export async function maxU64(
331
+ client: IotaClient,
332
+ args: [bigint, bigint],
333
+ ): Promise<TypedDevInspectResults<[bigint]>> {
334
+ const tx = new Transaction();
335
+ builder.maxU64(tx, args);
336
+ const inspectRes = await client.devInspectTransactionBlock({
337
+ transactionBlock: tx,
338
+ sender: ZERO_ADDRESS,
339
+ });
340
+
341
+ return (await getMoveCoder(client)).decodeDevInspectResult<[bigint]>(
342
+ inspectRes,
343
+ );
344
+ }
345
+ export async function min(
346
+ client: IotaClient,
347
+ args: [bigint, bigint],
348
+ ): Promise<TypedDevInspectResults<[bigint]>> {
349
+ const tx = new Transaction();
350
+ builder.min(tx, args);
351
+ const inspectRes = await client.devInspectTransactionBlock({
352
+ transactionBlock: tx,
353
+ sender: ZERO_ADDRESS,
354
+ });
355
+
356
+ return (await getMoveCoder(client)).decodeDevInspectResult<[bigint]>(
357
+ inspectRes,
358
+ );
359
+ }
360
+ export async function pow(
361
+ client: IotaClient,
362
+ args: [bigint, number],
363
+ ): Promise<TypedDevInspectResults<[bigint]>> {
364
+ const tx = new Transaction();
365
+ builder.pow(tx, args);
366
+ const inspectRes = await client.devInspectTransactionBlock({
367
+ transactionBlock: tx,
368
+ sender: ZERO_ADDRESS,
369
+ });
370
+
371
+ return (await getMoveCoder(client)).decodeDevInspectResult<[bigint]>(
372
+ inspectRes,
373
+ );
374
+ }
375
+ export async function sqrt(
376
+ client: IotaClient,
377
+ args: [bigint],
378
+ ): Promise<TypedDevInspectResults<[bigint]>> {
379
+ const tx = new Transaction();
380
+ builder.sqrt(tx, args);
381
+ const inspectRes = await client.devInspectTransactionBlock({
382
+ transactionBlock: tx,
383
+ sender: ZERO_ADDRESS,
384
+ });
385
+
386
+ return (await getMoveCoder(client)).decodeDevInspectResult<[bigint]>(
387
+ inspectRes,
388
+ );
389
+ }
390
+ export async function sqrtU256(
391
+ client: IotaClient,
392
+ args: [bigint],
393
+ ): Promise<TypedDevInspectResults<[bigint]>> {
394
+ const tx = new Transaction();
395
+ builder.sqrtU256(tx, args);
396
+ const inspectRes = await client.devInspectTransactionBlock({
397
+ transactionBlock: tx,
398
+ sender: ZERO_ADDRESS,
399
+ });
400
+
401
+ return (await getMoveCoder(client)).decodeDevInspectResult<[bigint]>(
402
+ inspectRes,
403
+ );
404
+ }
405
+ }
406
+ }
407
+
408
+ export namespace pool {
409
+ export interface ControllerCap {
410
+ id: _0x2.object$.UID;
411
+ }
412
+
413
+ export namespace ControllerCap {
414
+ export const TYPE_QNAME =
415
+ "0x6c4a21e3e7e6b6d51c4604021633e1d97e24e37a696f8c082cd48f37503e602a::pool::ControllerCap";
416
+
417
+ const TYPE = new TypeDescriptor<ControllerCap>(ControllerCap.TYPE_QNAME);
418
+
419
+ export function type(): TypeDescriptor<ControllerCap> {
420
+ return TYPE.apply();
421
+ }
422
+ }
423
+
424
+ export interface FeeToSet {
425
+ fee_to: string;
426
+ caller: string;
427
+ }
428
+
429
+ export namespace FeeToSet {
430
+ export const TYPE_QNAME =
431
+ "0x6c4a21e3e7e6b6d51c4604021633e1d97e24e37a696f8c082cd48f37503e602a::pool::FeeToSet";
432
+
433
+ const TYPE = new TypeDescriptor<FeeToSet>(FeeToSet.TYPE_QNAME);
434
+
435
+ export function type(): TypeDescriptor<FeeToSet> {
436
+ return TYPE.apply();
437
+ }
438
+ }
439
+
440
+ export type FeeToSetInstance = TypedEventInstance<FeeToSet> & {
441
+ data_decoded: FeeToSet;
442
+ type_arguments: [];
443
+ };
444
+
445
+ export interface LiquidityAdded<T0, T1> {
446
+ user: string;
447
+ first_amount: bigint;
448
+ second_amount: bigint;
449
+ first_reserve: bigint;
450
+ second_reserve: bigint;
451
+ wisp_lp_amount: bigint;
452
+ fee_amount: bigint;
453
+ }
454
+
455
+ export namespace LiquidityAdded {
456
+ export const TYPE_QNAME =
457
+ "0x6c4a21e3e7e6b6d51c4604021633e1d97e24e37a696f8c082cd48f37503e602a::pool::LiquidityAdded";
458
+
459
+ const TYPE = new TypeDescriptor<LiquidityAdded<any, any>>(
460
+ LiquidityAdded.TYPE_QNAME,
461
+ );
462
+
463
+ export function type<T0, T1>(
464
+ arg0: TypeDescriptor<T0> = ANY_TYPE,
465
+ arg1: TypeDescriptor<T1> = ANY_TYPE,
466
+ ): TypeDescriptor<LiquidityAdded<T0, T1>> {
467
+ return TYPE.apply(arg0, arg1);
468
+ }
469
+ }
470
+
471
+ export type LiquidityAddedInstance = TypedEventInstance<
472
+ LiquidityAdded<any, any>
473
+ > & {
474
+ data_decoded: LiquidityAdded<any, any>;
475
+ type_arguments: [string, string];
476
+ };
477
+
478
+ export interface LiquidityRemoved<T0, T1> {
479
+ user: string;
480
+ first_amount: bigint;
481
+ second_amount: bigint;
482
+ first_reserve: bigint;
483
+ second_reserve: bigint;
484
+ wisp_lp_amount: bigint;
485
+ fee_amount: bigint;
486
+ }
487
+
488
+ export namespace LiquidityRemoved {
489
+ export const TYPE_QNAME =
490
+ "0x6c4a21e3e7e6b6d51c4604021633e1d97e24e37a696f8c082cd48f37503e602a::pool::LiquidityRemoved";
491
+
492
+ const TYPE = new TypeDescriptor<LiquidityRemoved<any, any>>(
493
+ LiquidityRemoved.TYPE_QNAME,
494
+ );
495
+
496
+ export function type<T0, T1>(
497
+ arg0: TypeDescriptor<T0> = ANY_TYPE,
498
+ arg1: TypeDescriptor<T1> = ANY_TYPE,
499
+ ): TypeDescriptor<LiquidityRemoved<T0, T1>> {
500
+ return TYPE.apply(arg0, arg1);
501
+ }
502
+ }
503
+
504
+ export type LiquidityRemovedInstance = TypedEventInstance<
505
+ LiquidityRemoved<any, any>
506
+ > & {
507
+ data_decoded: LiquidityRemoved<any, any>;
508
+ type_arguments: [string, string];
509
+ };
510
+
511
+ export interface Pool<T0, T1> {
512
+ id: _0x2.object$.UID;
513
+ first_token: _0x2.balance.Balance<T0>;
514
+ second_token: _0x2.balance.Balance<T1>;
515
+ wisp_lp_supply: _0x2.balance.Supply<pool.WISPLP<T0, T1>>;
516
+ k_last: bigint;
517
+ }
518
+
519
+ export namespace Pool {
520
+ export const TYPE_QNAME =
521
+ "0x6c4a21e3e7e6b6d51c4604021633e1d97e24e37a696f8c082cd48f37503e602a::pool::Pool";
522
+
523
+ const TYPE = new TypeDescriptor<Pool<any, any>>(Pool.TYPE_QNAME);
524
+
525
+ export function type<T0, T1>(
526
+ arg0: TypeDescriptor<T0> = ANY_TYPE,
527
+ arg1: TypeDescriptor<T1> = ANY_TYPE,
528
+ ): TypeDescriptor<Pool<T0, T1>> {
529
+ return TYPE.apply(arg0, arg1);
530
+ }
531
+ }
532
+
533
+ export interface PoolCreated<T0, T1> {
534
+ pool: string;
535
+ first_amount: bigint;
536
+ second_amount: bigint;
537
+ wisp_lp_amount: bigint;
538
+ }
539
+
540
+ export namespace PoolCreated {
541
+ export const TYPE_QNAME =
542
+ "0x6c4a21e3e7e6b6d51c4604021633e1d97e24e37a696f8c082cd48f37503e602a::pool::PoolCreated";
543
+
544
+ const TYPE = new TypeDescriptor<PoolCreated<any, any>>(
545
+ PoolCreated.TYPE_QNAME,
546
+ );
547
+
548
+ export function type<T0, T1>(
549
+ arg0: TypeDescriptor<T0> = ANY_TYPE,
550
+ arg1: TypeDescriptor<T1> = ANY_TYPE,
551
+ ): TypeDescriptor<PoolCreated<T0, T1>> {
552
+ return TYPE.apply(arg0, arg1);
553
+ }
554
+ }
555
+
556
+ export type PoolCreatedInstance = TypedEventInstance<
557
+ PoolCreated<any, any>
558
+ > & {
559
+ data_decoded: PoolCreated<any, any>;
560
+ type_arguments: [string, string];
561
+ };
562
+
563
+ export interface PoolName {
564
+ first_type: _0x1.type_name.TypeName;
565
+ second_type: _0x1.type_name.TypeName;
566
+ }
567
+
568
+ export namespace PoolName {
569
+ export const TYPE_QNAME =
570
+ "0x6c4a21e3e7e6b6d51c4604021633e1d97e24e37a696f8c082cd48f37503e602a::pool::PoolName";
571
+
572
+ const TYPE = new TypeDescriptor<PoolName>(PoolName.TYPE_QNAME);
573
+
574
+ export function type(): TypeDescriptor<PoolName> {
575
+ return TYPE.apply();
576
+ }
577
+ }
578
+
579
+ export type PoolNameInstance = TypedEventInstance<PoolName> & {
580
+ data_decoded: PoolName;
581
+ type_arguments: [];
582
+ };
583
+
584
+ export interface PoolRegistry {
585
+ id: _0x2.object$.UID;
586
+ fee_to: string;
587
+ pools: _0x2.object_bag.ObjectBag;
588
+ }
589
+
590
+ export namespace PoolRegistry {
591
+ export const TYPE_QNAME =
592
+ "0x6c4a21e3e7e6b6d51c4604021633e1d97e24e37a696f8c082cd48f37503e602a::pool::PoolRegistry";
593
+
594
+ const TYPE = new TypeDescriptor<PoolRegistry>(PoolRegistry.TYPE_QNAME);
595
+
596
+ export function type(): TypeDescriptor<PoolRegistry> {
597
+ return TYPE.apply();
598
+ }
599
+ }
600
+
601
+ export interface TokenSwapped<T0, T1> {
602
+ user: string;
603
+ first_amount_in: bigint;
604
+ second_amount_in: bigint;
605
+ first_amount_out: bigint;
606
+ second_amount_out: bigint;
607
+ first_reserve: bigint;
608
+ second_reserve: bigint;
609
+ }
610
+
611
+ export namespace TokenSwapped {
612
+ export const TYPE_QNAME =
613
+ "0x6c4a21e3e7e6b6d51c4604021633e1d97e24e37a696f8c082cd48f37503e602a::pool::TokenSwapped";
614
+
615
+ const TYPE = new TypeDescriptor<TokenSwapped<any, any>>(
616
+ TokenSwapped.TYPE_QNAME,
617
+ );
618
+
619
+ export function type<T0, T1>(
620
+ arg0: TypeDescriptor<T0> = ANY_TYPE,
621
+ arg1: TypeDescriptor<T1> = ANY_TYPE,
622
+ ): TypeDescriptor<TokenSwapped<T0, T1>> {
623
+ return TYPE.apply(arg0, arg1);
624
+ }
625
+ }
626
+
627
+ export type TokenSwappedInstance = TypedEventInstance<
628
+ TokenSwapped<any, any>
629
+ > & {
630
+ data_decoded: TokenSwapped<any, any>;
631
+ type_arguments: [string, string];
632
+ };
633
+
634
+ export interface WISPLP<T0, T1> {
635
+ dummy_field: boolean;
636
+ }
637
+
638
+ export namespace WISPLP {
639
+ export const TYPE_QNAME =
640
+ "0x6c4a21e3e7e6b6d51c4604021633e1d97e24e37a696f8c082cd48f37503e602a::pool::WISPLP";
641
+
642
+ const TYPE = new TypeDescriptor<WISPLP<any, any>>(WISPLP.TYPE_QNAME);
643
+
644
+ export function type<T0, T1>(
645
+ arg0: TypeDescriptor<T0> = ANY_TYPE,
646
+ arg1: TypeDescriptor<T1> = ANY_TYPE,
647
+ ): TypeDescriptor<WISPLP<T0, T1>> {
648
+ return TYPE.apply(arg0, arg1);
649
+ }
650
+ }
651
+
652
+ export namespace builder {
653
+ export function addLiquidity<T0 = any, T1 = any>(
654
+ tx: Transaction,
655
+ args: [
656
+ string | TransactionObjectArgument | TransactionArgument,
657
+ string | TransactionObjectArgument | TransactionArgument,
658
+ string | TransactionObjectArgument | TransactionArgument,
659
+ bigint | TransactionArgument,
660
+ bigint | TransactionArgument,
661
+ bigint | TransactionArgument,
662
+ bigint | TransactionArgument,
663
+ ],
664
+ typeArguments: [TypeDescriptor<T0> | string, TypeDescriptor<T1> | string],
665
+ ): TransactionArgument &
666
+ [
667
+ TransactionArgument,
668
+ TransactionArgument,
669
+ TransactionArgument,
670
+ TransactionArgument,
671
+ TransactionArgument,
672
+ TransactionArgument,
673
+ TransactionArgument,
674
+ ] {
675
+ const _args: any[] = [];
676
+ _args.push(transactionArgumentOrObject(args[0], tx));
677
+ _args.push(transactionArgumentOrObject(args[1], tx));
678
+ _args.push(transactionArgumentOrObject(args[2], tx));
679
+ _args.push(transactionArgumentOrPureU64(args[3], tx));
680
+ _args.push(transactionArgumentOrPureU64(args[4], tx));
681
+ _args.push(transactionArgumentOrPureU64(args[5], tx));
682
+ _args.push(transactionArgumentOrPureU64(args[6], tx));
683
+
684
+ // @ts-ignore
685
+ return tx.moveCall({
686
+ target:
687
+ "0x6c4a21e3e7e6b6d51c4604021633e1d97e24e37a696f8c082cd48f37503e602a::pool::add_liquidity",
688
+ arguments: _args,
689
+ typeArguments: [
690
+ typeof typeArguments[0] === "string"
691
+ ? typeArguments[0]
692
+ : typeArguments[0].getSignature(),
693
+ typeof typeArguments[1] === "string"
694
+ ? typeArguments[1]
695
+ : typeArguments[1].getSignature(),
696
+ ],
697
+ });
698
+ }
699
+ export function borrowMutPool<T0 = any, T1 = any>(
700
+ tx: Transaction,
701
+ args: [string | TransactionObjectArgument | TransactionArgument],
702
+ typeArguments: [TypeDescriptor<T0> | string, TypeDescriptor<T1> | string],
703
+ ): TransactionArgument & [TransactionArgument] {
704
+ const _args: any[] = [];
705
+ _args.push(transactionArgumentOrObject(args[0], tx));
706
+
707
+ // @ts-ignore
708
+ return tx.moveCall({
709
+ target:
710
+ "0x6c4a21e3e7e6b6d51c4604021633e1d97e24e37a696f8c082cd48f37503e602a::pool::borrow_mut_pool",
711
+ arguments: _args,
712
+ typeArguments: [
713
+ typeof typeArguments[0] === "string"
714
+ ? typeArguments[0]
715
+ : typeArguments[0].getSignature(),
716
+ typeof typeArguments[1] === "string"
717
+ ? typeArguments[1]
718
+ : typeArguments[1].getSignature(),
719
+ ],
720
+ });
721
+ }
722
+ export function borrowPool<T0 = any, T1 = any>(
723
+ tx: Transaction,
724
+ args: [string | TransactionObjectArgument | TransactionArgument],
725
+ typeArguments: [TypeDescriptor<T0> | string, TypeDescriptor<T1> | string],
726
+ ): TransactionArgument & [TransactionArgument] {
727
+ const _args: any[] = [];
728
+ _args.push(transactionArgumentOrObject(args[0], tx));
729
+
730
+ // @ts-ignore
731
+ return tx.moveCall({
732
+ target:
733
+ "0x6c4a21e3e7e6b6d51c4604021633e1d97e24e37a696f8c082cd48f37503e602a::pool::borrow_pool",
734
+ arguments: _args,
735
+ typeArguments: [
736
+ typeof typeArguments[0] === "string"
737
+ ? typeArguments[0]
738
+ : typeArguments[0].getSignature(),
739
+ typeof typeArguments[1] === "string"
740
+ ? typeArguments[1]
741
+ : typeArguments[1].getSignature(),
742
+ ],
743
+ });
744
+ }
745
+ export function createPool<T0 = any, T1 = any>(
746
+ tx: Transaction,
747
+ args: [
748
+ string | TransactionObjectArgument | TransactionArgument,
749
+ string | TransactionObjectArgument | TransactionArgument,
750
+ string | TransactionObjectArgument | TransactionArgument,
751
+ bigint | TransactionArgument,
752
+ bigint | TransactionArgument,
753
+ ],
754
+ typeArguments: [TypeDescriptor<T0> | string, TypeDescriptor<T1> | string],
755
+ ): TransactionArgument &
756
+ [
757
+ TransactionArgument,
758
+ TransactionArgument,
759
+ TransactionArgument,
760
+ TransactionArgument,
761
+ TransactionArgument,
762
+ ] {
763
+ const _args: any[] = [];
764
+ _args.push(transactionArgumentOrObject(args[0], tx));
765
+ _args.push(transactionArgumentOrObject(args[1], tx));
766
+ _args.push(transactionArgumentOrObject(args[2], tx));
767
+ _args.push(transactionArgumentOrPureU64(args[3], tx));
768
+ _args.push(transactionArgumentOrPureU64(args[4], tx));
769
+
770
+ // @ts-ignore
771
+ return tx.moveCall({
772
+ target:
773
+ "0x6c4a21e3e7e6b6d51c4604021633e1d97e24e37a696f8c082cd48f37503e602a::pool::create_pool",
774
+ arguments: _args,
775
+ typeArguments: [
776
+ typeof typeArguments[0] === "string"
777
+ ? typeArguments[0]
778
+ : typeArguments[0].getSignature(),
779
+ typeof typeArguments[1] === "string"
780
+ ? typeArguments[1]
781
+ : typeArguments[1].getSignature(),
782
+ ],
783
+ });
784
+ }
785
+ export function createPoolName(
786
+ tx: Transaction,
787
+ args: [
788
+ _0x1.type_name.TypeName | TransactionArgument,
789
+ _0x1.type_name.TypeName | TransactionArgument,
790
+ ],
791
+ ): TransactionArgument & [TransactionArgument, TransactionArgument] {
792
+ const _args: any[] = [];
793
+ _args.push(transactionArgumentOrPure(args[0], tx));
794
+ _args.push(transactionArgumentOrPure(args[1], tx));
795
+
796
+ // @ts-ignore
797
+ return tx.moveCall({
798
+ target:
799
+ "0x6c4a21e3e7e6b6d51c4604021633e1d97e24e37a696f8c082cd48f37503e602a::pool::create_pool_name",
800
+ arguments: _args,
801
+ });
802
+ }
803
+ export function getAmounts<T0 = any, T1 = any>(
804
+ tx: Transaction,
805
+ args: [string | TransactionObjectArgument | TransactionArgument],
806
+ typeArguments: [TypeDescriptor<T0> | string, TypeDescriptor<T1> | string],
807
+ ): TransactionArgument & [TransactionArgument] {
808
+ const _args: any[] = [];
809
+ _args.push(transactionArgumentOrObject(args[0], tx));
810
+
811
+ // @ts-ignore
812
+ return tx.moveCall({
813
+ target:
814
+ "0x6c4a21e3e7e6b6d51c4604021633e1d97e24e37a696f8c082cd48f37503e602a::pool::get_amounts",
815
+ arguments: _args,
816
+ typeArguments: [
817
+ typeof typeArguments[0] === "string"
818
+ ? typeArguments[0]
819
+ : typeArguments[0].getSignature(),
820
+ typeof typeArguments[1] === "string"
821
+ ? typeArguments[1]
822
+ : typeArguments[1].getSignature(),
823
+ ],
824
+ });
825
+ }
826
+ export function getInputAmount<T0 = any, T1 = any>(
827
+ tx: Transaction,
828
+ args: [
829
+ string | TransactionObjectArgument | TransactionArgument,
830
+ bigint | TransactionArgument,
831
+ boolean | TransactionArgument,
832
+ ],
833
+ typeArguments: [TypeDescriptor<T0> | string, TypeDescriptor<T1> | string],
834
+ ): TransactionArgument &
835
+ [TransactionArgument, TransactionArgument, TransactionArgument] {
836
+ const _args: any[] = [];
837
+ _args.push(transactionArgumentOrObject(args[0], tx));
838
+ _args.push(transactionArgumentOrPureU64(args[1], tx));
839
+ _args.push(transactionArgumentOrPureBool(args[2], tx));
840
+
841
+ // @ts-ignore
842
+ return tx.moveCall({
843
+ target:
844
+ "0x6c4a21e3e7e6b6d51c4604021633e1d97e24e37a696f8c082cd48f37503e602a::pool::get_input_amount",
845
+ arguments: _args,
846
+ typeArguments: [
847
+ typeof typeArguments[0] === "string"
848
+ ? typeArguments[0]
849
+ : typeArguments[0].getSignature(),
850
+ typeof typeArguments[1] === "string"
851
+ ? typeArguments[1]
852
+ : typeArguments[1].getSignature(),
853
+ ],
854
+ });
855
+ }
856
+ export function getOutputAmount<T0 = any, T1 = any>(
857
+ tx: Transaction,
858
+ args: [
859
+ string | TransactionObjectArgument | TransactionArgument,
860
+ bigint | TransactionArgument,
861
+ boolean | TransactionArgument,
862
+ ],
863
+ typeArguments: [TypeDescriptor<T0> | string, TypeDescriptor<T1> | string],
864
+ ): TransactionArgument &
865
+ [TransactionArgument, TransactionArgument, TransactionArgument] {
866
+ const _args: any[] = [];
867
+ _args.push(transactionArgumentOrObject(args[0], tx));
868
+ _args.push(transactionArgumentOrPureU64(args[1], tx));
869
+ _args.push(transactionArgumentOrPureBool(args[2], tx));
870
+
871
+ // @ts-ignore
872
+ return tx.moveCall({
873
+ target:
874
+ "0x6c4a21e3e7e6b6d51c4604021633e1d97e24e37a696f8c082cd48f37503e602a::pool::get_output_amount",
875
+ arguments: _args,
876
+ typeArguments: [
877
+ typeof typeArguments[0] === "string"
878
+ ? typeArguments[0]
879
+ : typeArguments[0].getSignature(),
880
+ typeof typeArguments[1] === "string"
881
+ ? typeArguments[1]
882
+ : typeArguments[1].getSignature(),
883
+ ],
884
+ });
885
+ }
886
+ export function getPoolData<T0 = any, T1 = any>(
887
+ tx: Transaction,
888
+ args: [string | TransactionObjectArgument | TransactionArgument],
889
+ typeArguments: [TypeDescriptor<T0> | string, TypeDescriptor<T1> | string],
890
+ ): TransactionArgument & [TransactionArgument] {
891
+ const _args: any[] = [];
892
+ _args.push(transactionArgumentOrObject(args[0], tx));
893
+
894
+ // @ts-ignore
895
+ return tx.moveCall({
896
+ target:
897
+ "0x6c4a21e3e7e6b6d51c4604021633e1d97e24e37a696f8c082cd48f37503e602a::pool::get_pool_data",
898
+ arguments: _args,
899
+ typeArguments: [
900
+ typeof typeArguments[0] === "string"
901
+ ? typeArguments[0]
902
+ : typeArguments[0].getSignature(),
903
+ typeof typeArguments[1] === "string"
904
+ ? typeArguments[1]
905
+ : typeArguments[1].getSignature(),
906
+ ],
907
+ });
908
+ }
909
+ export function isPoolCreated<T0 = any, T1 = any>(
910
+ tx: Transaction,
911
+ args: [string | TransactionObjectArgument | TransactionArgument],
912
+ typeArguments: [TypeDescriptor<T0> | string, TypeDescriptor<T1> | string],
913
+ ): TransactionArgument & [TransactionArgument] {
914
+ const _args: any[] = [];
915
+ _args.push(transactionArgumentOrObject(args[0], tx));
916
+
917
+ // @ts-ignore
918
+ return tx.moveCall({
919
+ target:
920
+ "0x6c4a21e3e7e6b6d51c4604021633e1d97e24e37a696f8c082cd48f37503e602a::pool::is_pool_created",
921
+ arguments: _args,
922
+ typeArguments: [
923
+ typeof typeArguments[0] === "string"
924
+ ? typeArguments[0]
925
+ : typeArguments[0].getSignature(),
926
+ typeof typeArguments[1] === "string"
927
+ ? typeArguments[1]
928
+ : typeArguments[1].getSignature(),
929
+ ],
930
+ });
931
+ }
932
+ export function isPoolCreatedSorted<T0 = any, T1 = any>(
933
+ tx: Transaction,
934
+ args: [string | TransactionObjectArgument | TransactionArgument],
935
+ typeArguments: [TypeDescriptor<T0> | string, TypeDescriptor<T1> | string],
936
+ ): TransactionArgument & [TransactionArgument] {
937
+ const _args: any[] = [];
938
+ _args.push(transactionArgumentOrObject(args[0], tx));
939
+
940
+ // @ts-ignore
941
+ return tx.moveCall({
942
+ target:
943
+ "0x6c4a21e3e7e6b6d51c4604021633e1d97e24e37a696f8c082cd48f37503e602a::pool::is_pool_created_sorted",
944
+ arguments: _args,
945
+ typeArguments: [
946
+ typeof typeArguments[0] === "string"
947
+ ? typeArguments[0]
948
+ : typeArguments[0].getSignature(),
949
+ typeof typeArguments[1] === "string"
950
+ ? typeArguments[1]
951
+ : typeArguments[1].getSignature(),
952
+ ],
953
+ });
954
+ }
955
+ export function processSwapExactInput<T0 = any, T1 = any>(
956
+ tx: Transaction,
957
+ args: [
958
+ string | TransactionObjectArgument | TransactionArgument,
959
+ string | TransactionObjectArgument | TransactionArgument,
960
+ string | TransactionObjectArgument | TransactionArgument,
961
+ bigint | TransactionArgument,
962
+ boolean | TransactionArgument,
963
+ ],
964
+ typeArguments: [TypeDescriptor<T0> | string, TypeDescriptor<T1> | string],
965
+ ): TransactionArgument &
966
+ [
967
+ TransactionArgument,
968
+ TransactionArgument,
969
+ TransactionArgument,
970
+ TransactionArgument,
971
+ TransactionArgument,
972
+ ] {
973
+ const _args: any[] = [];
974
+ _args.push(transactionArgumentOrObject(args[0], tx));
975
+ _args.push(transactionArgumentOrObject(args[1], tx));
976
+ _args.push(transactionArgumentOrObject(args[2], tx));
977
+ _args.push(transactionArgumentOrPureU64(args[3], tx));
978
+ _args.push(transactionArgumentOrPureBool(args[4], tx));
979
+
980
+ // @ts-ignore
981
+ return tx.moveCall({
982
+ target:
983
+ "0x6c4a21e3e7e6b6d51c4604021633e1d97e24e37a696f8c082cd48f37503e602a::pool::process_swap_exact_input",
984
+ arguments: _args,
985
+ typeArguments: [
986
+ typeof typeArguments[0] === "string"
987
+ ? typeArguments[0]
988
+ : typeArguments[0].getSignature(),
989
+ typeof typeArguments[1] === "string"
990
+ ? typeArguments[1]
991
+ : typeArguments[1].getSignature(),
992
+ ],
993
+ });
994
+ }
995
+ export function processSwapExactOutput<T0 = any, T1 = any>(
996
+ tx: Transaction,
997
+ args: [
998
+ string | TransactionObjectArgument | TransactionArgument,
999
+ string | TransactionObjectArgument | TransactionArgument,
1000
+ string | TransactionObjectArgument | TransactionArgument,
1001
+ bigint | TransactionArgument,
1002
+ boolean | TransactionArgument,
1003
+ ],
1004
+ typeArguments: [TypeDescriptor<T0> | string, TypeDescriptor<T1> | string],
1005
+ ): TransactionArgument &
1006
+ [
1007
+ TransactionArgument,
1008
+ TransactionArgument,
1009
+ TransactionArgument,
1010
+ TransactionArgument,
1011
+ TransactionArgument,
1012
+ ] {
1013
+ const _args: any[] = [];
1014
+ _args.push(transactionArgumentOrObject(args[0], tx));
1015
+ _args.push(transactionArgumentOrObject(args[1], tx));
1016
+ _args.push(transactionArgumentOrObject(args[2], tx));
1017
+ _args.push(transactionArgumentOrPureU64(args[3], tx));
1018
+ _args.push(transactionArgumentOrPureBool(args[4], tx));
1019
+
1020
+ // @ts-ignore
1021
+ return tx.moveCall({
1022
+ target:
1023
+ "0x6c4a21e3e7e6b6d51c4604021633e1d97e24e37a696f8c082cd48f37503e602a::pool::process_swap_exact_output",
1024
+ arguments: _args,
1025
+ typeArguments: [
1026
+ typeof typeArguments[0] === "string"
1027
+ ? typeArguments[0]
1028
+ : typeArguments[0].getSignature(),
1029
+ typeof typeArguments[1] === "string"
1030
+ ? typeArguments[1]
1031
+ : typeArguments[1].getSignature(),
1032
+ ],
1033
+ });
1034
+ }
1035
+ export function removeLiquidity<T0 = any, T1 = any>(
1036
+ tx: Transaction,
1037
+ args: [
1038
+ string | TransactionObjectArgument | TransactionArgument,
1039
+ string | TransactionObjectArgument | TransactionArgument,
1040
+ bigint | TransactionArgument,
1041
+ bigint | TransactionArgument,
1042
+ bigint | TransactionArgument,
1043
+ ],
1044
+ typeArguments: [TypeDescriptor<T0> | string, TypeDescriptor<T1> | string],
1045
+ ): TransactionArgument &
1046
+ [
1047
+ TransactionArgument,
1048
+ TransactionArgument,
1049
+ TransactionArgument,
1050
+ TransactionArgument,
1051
+ TransactionArgument,
1052
+ ] {
1053
+ const _args: any[] = [];
1054
+ _args.push(transactionArgumentOrObject(args[0], tx));
1055
+ _args.push(transactionArgumentOrObject(args[1], tx));
1056
+ _args.push(transactionArgumentOrPureU64(args[2], tx));
1057
+ _args.push(transactionArgumentOrPureU64(args[3], tx));
1058
+ _args.push(transactionArgumentOrPureU64(args[4], tx));
1059
+
1060
+ // @ts-ignore
1061
+ return tx.moveCall({
1062
+ target:
1063
+ "0x6c4a21e3e7e6b6d51c4604021633e1d97e24e37a696f8c082cd48f37503e602a::pool::remove_liquidity",
1064
+ arguments: _args,
1065
+ typeArguments: [
1066
+ typeof typeArguments[0] === "string"
1067
+ ? typeArguments[0]
1068
+ : typeArguments[0].getSignature(),
1069
+ typeof typeArguments[1] === "string"
1070
+ ? typeArguments[1]
1071
+ : typeArguments[1].getSignature(),
1072
+ ],
1073
+ });
1074
+ }
1075
+ export function setFeeTo_(
1076
+ tx: Transaction,
1077
+ args: [
1078
+ string | TransactionObjectArgument | TransactionArgument,
1079
+ string | TransactionObjectArgument | TransactionArgument,
1080
+ string | TransactionArgument,
1081
+ ],
1082
+ ): TransactionArgument &
1083
+ [TransactionArgument, TransactionArgument, TransactionArgument] {
1084
+ const _args: any[] = [];
1085
+ _args.push(transactionArgumentOrObject(args[0], tx));
1086
+ _args.push(transactionArgumentOrObject(args[1], tx));
1087
+ _args.push(transactionArgumentOrPureAddress(args[2], tx));
1088
+
1089
+ // @ts-ignore
1090
+ return tx.moveCall({
1091
+ target:
1092
+ "0x6c4a21e3e7e6b6d51c4604021633e1d97e24e37a696f8c082cd48f37503e602a::pool::set_fee_to_",
1093
+ arguments: _args,
1094
+ });
1095
+ }
1096
+ export function swapExactFirstToSecond<T0 = any, T1 = any>(
1097
+ tx: Transaction,
1098
+ args: [
1099
+ string | TransactionObjectArgument | TransactionArgument,
1100
+ string | TransactionObjectArgument | TransactionArgument,
1101
+ bigint | TransactionArgument,
1102
+ bigint | TransactionArgument,
1103
+ ],
1104
+ typeArguments: [TypeDescriptor<T0> | string, TypeDescriptor<T1> | string],
1105
+ ): TransactionArgument &
1106
+ [
1107
+ TransactionArgument,
1108
+ TransactionArgument,
1109
+ TransactionArgument,
1110
+ TransactionArgument,
1111
+ ] {
1112
+ const _args: any[] = [];
1113
+ _args.push(transactionArgumentOrObject(args[0], tx));
1114
+ _args.push(transactionArgumentOrObject(args[1], tx));
1115
+ _args.push(transactionArgumentOrPureU64(args[2], tx));
1116
+ _args.push(transactionArgumentOrPureU64(args[3], tx));
1117
+
1118
+ // @ts-ignore
1119
+ return tx.moveCall({
1120
+ target:
1121
+ "0x6c4a21e3e7e6b6d51c4604021633e1d97e24e37a696f8c082cd48f37503e602a::pool::swap_exact_first_to_second",
1122
+ arguments: _args,
1123
+ typeArguments: [
1124
+ typeof typeArguments[0] === "string"
1125
+ ? typeArguments[0]
1126
+ : typeArguments[0].getSignature(),
1127
+ typeof typeArguments[1] === "string"
1128
+ ? typeArguments[1]
1129
+ : typeArguments[1].getSignature(),
1130
+ ],
1131
+ });
1132
+ }
1133
+ export function swapExactSecondToFirst<T0 = any, T1 = any>(
1134
+ tx: Transaction,
1135
+ args: [
1136
+ string | TransactionObjectArgument | TransactionArgument,
1137
+ string | TransactionObjectArgument | TransactionArgument,
1138
+ bigint | TransactionArgument,
1139
+ bigint | TransactionArgument,
1140
+ ],
1141
+ typeArguments: [TypeDescriptor<T0> | string, TypeDescriptor<T1> | string],
1142
+ ): TransactionArgument &
1143
+ [
1144
+ TransactionArgument,
1145
+ TransactionArgument,
1146
+ TransactionArgument,
1147
+ TransactionArgument,
1148
+ ] {
1149
+ const _args: any[] = [];
1150
+ _args.push(transactionArgumentOrObject(args[0], tx));
1151
+ _args.push(transactionArgumentOrObject(args[1], tx));
1152
+ _args.push(transactionArgumentOrPureU64(args[2], tx));
1153
+ _args.push(transactionArgumentOrPureU64(args[3], tx));
1154
+
1155
+ // @ts-ignore
1156
+ return tx.moveCall({
1157
+ target:
1158
+ "0x6c4a21e3e7e6b6d51c4604021633e1d97e24e37a696f8c082cd48f37503e602a::pool::swap_exact_second_to_first",
1159
+ arguments: _args,
1160
+ typeArguments: [
1161
+ typeof typeArguments[0] === "string"
1162
+ ? typeArguments[0]
1163
+ : typeArguments[0].getSignature(),
1164
+ typeof typeArguments[1] === "string"
1165
+ ? typeArguments[1]
1166
+ : typeArguments[1].getSignature(),
1167
+ ],
1168
+ });
1169
+ }
1170
+ export function swapFirstToExactSecond<T0 = any, T1 = any>(
1171
+ tx: Transaction,
1172
+ args: [
1173
+ string | TransactionObjectArgument | TransactionArgument,
1174
+ string | TransactionObjectArgument | TransactionArgument,
1175
+ bigint | TransactionArgument,
1176
+ bigint | TransactionArgument,
1177
+ ],
1178
+ typeArguments: [TypeDescriptor<T0> | string, TypeDescriptor<T1> | string],
1179
+ ): TransactionArgument &
1180
+ [
1181
+ TransactionArgument,
1182
+ TransactionArgument,
1183
+ TransactionArgument,
1184
+ TransactionArgument,
1185
+ ] {
1186
+ const _args: any[] = [];
1187
+ _args.push(transactionArgumentOrObject(args[0], tx));
1188
+ _args.push(transactionArgumentOrObject(args[1], tx));
1189
+ _args.push(transactionArgumentOrPureU64(args[2], tx));
1190
+ _args.push(transactionArgumentOrPureU64(args[3], tx));
1191
+
1192
+ // @ts-ignore
1193
+ return tx.moveCall({
1194
+ target:
1195
+ "0x6c4a21e3e7e6b6d51c4604021633e1d97e24e37a696f8c082cd48f37503e602a::pool::swap_first_to_exact_second",
1196
+ arguments: _args,
1197
+ typeArguments: [
1198
+ typeof typeArguments[0] === "string"
1199
+ ? typeArguments[0]
1200
+ : typeArguments[0].getSignature(),
1201
+ typeof typeArguments[1] === "string"
1202
+ ? typeArguments[1]
1203
+ : typeArguments[1].getSignature(),
1204
+ ],
1205
+ });
1206
+ }
1207
+ export function swapSecondToExactFirst<T0 = any, T1 = any>(
1208
+ tx: Transaction,
1209
+ args: [
1210
+ string | TransactionObjectArgument | TransactionArgument,
1211
+ string | TransactionObjectArgument | TransactionArgument,
1212
+ bigint | TransactionArgument,
1213
+ bigint | TransactionArgument,
1214
+ ],
1215
+ typeArguments: [TypeDescriptor<T0> | string, TypeDescriptor<T1> | string],
1216
+ ): TransactionArgument &
1217
+ [
1218
+ TransactionArgument,
1219
+ TransactionArgument,
1220
+ TransactionArgument,
1221
+ TransactionArgument,
1222
+ ] {
1223
+ const _args: any[] = [];
1224
+ _args.push(transactionArgumentOrObject(args[0], tx));
1225
+ _args.push(transactionArgumentOrObject(args[1], tx));
1226
+ _args.push(transactionArgumentOrPureU64(args[2], tx));
1227
+ _args.push(transactionArgumentOrPureU64(args[3], tx));
1228
+
1229
+ // @ts-ignore
1230
+ return tx.moveCall({
1231
+ target:
1232
+ "0x6c4a21e3e7e6b6d51c4604021633e1d97e24e37a696f8c082cd48f37503e602a::pool::swap_second_to_exact_first",
1233
+ arguments: _args,
1234
+ typeArguments: [
1235
+ typeof typeArguments[0] === "string"
1236
+ ? typeArguments[0]
1237
+ : typeArguments[0].getSignature(),
1238
+ typeof typeArguments[1] === "string"
1239
+ ? typeArguments[1]
1240
+ : typeArguments[1].getSignature(),
1241
+ ],
1242
+ });
1243
+ }
1244
+ export function zapInFirst<T0 = any, T1 = any>(
1245
+ tx: Transaction,
1246
+ args: [
1247
+ string | TransactionObjectArgument | TransactionArgument,
1248
+ string | TransactionObjectArgument | TransactionArgument,
1249
+ bigint | TransactionArgument,
1250
+ ],
1251
+ typeArguments: [TypeDescriptor<T0> | string, TypeDescriptor<T1> | string],
1252
+ ): TransactionArgument &
1253
+ [TransactionArgument, TransactionArgument, TransactionArgument] {
1254
+ const _args: any[] = [];
1255
+ _args.push(transactionArgumentOrObject(args[0], tx));
1256
+ _args.push(transactionArgumentOrObject(args[1], tx));
1257
+ _args.push(transactionArgumentOrPureU64(args[2], tx));
1258
+
1259
+ // @ts-ignore
1260
+ return tx.moveCall({
1261
+ target:
1262
+ "0x6c4a21e3e7e6b6d51c4604021633e1d97e24e37a696f8c082cd48f37503e602a::pool::zap_in_first",
1263
+ arguments: _args,
1264
+ typeArguments: [
1265
+ typeof typeArguments[0] === "string"
1266
+ ? typeArguments[0]
1267
+ : typeArguments[0].getSignature(),
1268
+ typeof typeArguments[1] === "string"
1269
+ ? typeArguments[1]
1270
+ : typeArguments[1].getSignature(),
1271
+ ],
1272
+ });
1273
+ }
1274
+ export function zapInSecond<T0 = any, T1 = any>(
1275
+ tx: Transaction,
1276
+ args: [
1277
+ string | TransactionObjectArgument | TransactionArgument,
1278
+ string | TransactionObjectArgument | TransactionArgument,
1279
+ bigint | TransactionArgument,
1280
+ ],
1281
+ typeArguments: [TypeDescriptor<T0> | string, TypeDescriptor<T1> | string],
1282
+ ): TransactionArgument &
1283
+ [TransactionArgument, TransactionArgument, TransactionArgument] {
1284
+ const _args: any[] = [];
1285
+ _args.push(transactionArgumentOrObject(args[0], tx));
1286
+ _args.push(transactionArgumentOrObject(args[1], tx));
1287
+ _args.push(transactionArgumentOrPureU64(args[2], tx));
1288
+
1289
+ // @ts-ignore
1290
+ return tx.moveCall({
1291
+ target:
1292
+ "0x6c4a21e3e7e6b6d51c4604021633e1d97e24e37a696f8c082cd48f37503e602a::pool::zap_in_second",
1293
+ arguments: _args,
1294
+ typeArguments: [
1295
+ typeof typeArguments[0] === "string"
1296
+ ? typeArguments[0]
1297
+ : typeArguments[0].getSignature(),
1298
+ typeof typeArguments[1] === "string"
1299
+ ? typeArguments[1]
1300
+ : typeArguments[1].getSignature(),
1301
+ ],
1302
+ });
1303
+ }
1304
+ }
1305
+ export namespace view {
1306
+ export async function addLiquidity<T0 = any, T1 = any>(
1307
+ client: IotaClient,
1308
+ args: [string, string, string, bigint, bigint, bigint, bigint],
1309
+ typeArguments: [TypeDescriptor<T0> | string, TypeDescriptor<T1> | string],
1310
+ ): Promise<TypedDevInspectResults<[_0x2.coin.Coin<pool.WISPLP<T0, T1>>]>> {
1311
+ const tx = new Transaction();
1312
+ builder.addLiquidity(tx, args, typeArguments);
1313
+ const inspectRes = await client.devInspectTransactionBlock({
1314
+ transactionBlock: tx,
1315
+ sender: ZERO_ADDRESS,
1316
+ });
1317
+
1318
+ return (await getMoveCoder(client)).decodeDevInspectResult<
1319
+ [_0x2.coin.Coin<pool.WISPLP<T0, T1>>]
1320
+ >(inspectRes);
1321
+ }
1322
+ export async function borrowMutPool<T0 = any, T1 = any>(
1323
+ client: IotaClient,
1324
+ args: [string],
1325
+ typeArguments: [TypeDescriptor<T0> | string, TypeDescriptor<T1> | string],
1326
+ ): Promise<TypedDevInspectResults<[string]>> {
1327
+ const tx = new Transaction();
1328
+ builder.borrowMutPool(tx, args, typeArguments);
1329
+ const inspectRes = await client.devInspectTransactionBlock({
1330
+ transactionBlock: tx,
1331
+ sender: ZERO_ADDRESS,
1332
+ });
1333
+
1334
+ return (await getMoveCoder(client)).decodeDevInspectResult<[string]>(
1335
+ inspectRes,
1336
+ );
1337
+ }
1338
+ export async function borrowPool<T0 = any, T1 = any>(
1339
+ client: IotaClient,
1340
+ args: [string],
1341
+ typeArguments: [TypeDescriptor<T0> | string, TypeDescriptor<T1> | string],
1342
+ ): Promise<TypedDevInspectResults<[string]>> {
1343
+ const tx = new Transaction();
1344
+ builder.borrowPool(tx, args, typeArguments);
1345
+ const inspectRes = await client.devInspectTransactionBlock({
1346
+ transactionBlock: tx,
1347
+ sender: ZERO_ADDRESS,
1348
+ });
1349
+
1350
+ return (await getMoveCoder(client)).decodeDevInspectResult<[string]>(
1351
+ inspectRes,
1352
+ );
1353
+ }
1354
+ export async function createPool<T0 = any, T1 = any>(
1355
+ client: IotaClient,
1356
+ args: [string, string, string, bigint, bigint],
1357
+ typeArguments: [TypeDescriptor<T0> | string, TypeDescriptor<T1> | string],
1358
+ ): Promise<TypedDevInspectResults<[_0x2.coin.Coin<pool.WISPLP<T0, T1>>]>> {
1359
+ const tx = new Transaction();
1360
+ builder.createPool(tx, args, typeArguments);
1361
+ const inspectRes = await client.devInspectTransactionBlock({
1362
+ transactionBlock: tx,
1363
+ sender: ZERO_ADDRESS,
1364
+ });
1365
+
1366
+ return (await getMoveCoder(client)).decodeDevInspectResult<
1367
+ [_0x2.coin.Coin<pool.WISPLP<T0, T1>>]
1368
+ >(inspectRes);
1369
+ }
1370
+ export async function createPoolName(
1371
+ client: IotaClient,
1372
+ args: [_0x1.type_name.TypeName, _0x1.type_name.TypeName],
1373
+ ): Promise<TypedDevInspectResults<[pool.PoolName]>> {
1374
+ const tx = new Transaction();
1375
+ builder.createPoolName(tx, args);
1376
+ const inspectRes = await client.devInspectTransactionBlock({
1377
+ transactionBlock: tx,
1378
+ sender: ZERO_ADDRESS,
1379
+ });
1380
+
1381
+ return (await getMoveCoder(client)).decodeDevInspectResult<
1382
+ [pool.PoolName]
1383
+ >(inspectRes);
1384
+ }
1385
+ export async function getAmounts<T0 = any, T1 = any>(
1386
+ client: IotaClient,
1387
+ args: [string],
1388
+ typeArguments: [TypeDescriptor<T0> | string, TypeDescriptor<T1> | string],
1389
+ ): Promise<TypedDevInspectResults<[bigint, bigint, bigint]>> {
1390
+ const tx = new Transaction();
1391
+ builder.getAmounts(tx, args, typeArguments);
1392
+ const inspectRes = await client.devInspectTransactionBlock({
1393
+ transactionBlock: tx,
1394
+ sender: ZERO_ADDRESS,
1395
+ });
1396
+
1397
+ return (await getMoveCoder(client)).decodeDevInspectResult<
1398
+ [bigint, bigint, bigint]
1399
+ >(inspectRes);
1400
+ }
1401
+ export async function getInputAmount<T0 = any, T1 = any>(
1402
+ client: IotaClient,
1403
+ args: [string, bigint, boolean],
1404
+ typeArguments: [TypeDescriptor<T0> | string, TypeDescriptor<T1> | string],
1405
+ ): Promise<TypedDevInspectResults<[bigint]>> {
1406
+ const tx = new Transaction();
1407
+ builder.getInputAmount(tx, args, typeArguments);
1408
+ const inspectRes = await client.devInspectTransactionBlock({
1409
+ transactionBlock: tx,
1410
+ sender: ZERO_ADDRESS,
1411
+ });
1412
+
1413
+ return (await getMoveCoder(client)).decodeDevInspectResult<[bigint]>(
1414
+ inspectRes,
1415
+ );
1416
+ }
1417
+ export async function getOutputAmount<T0 = any, T1 = any>(
1418
+ client: IotaClient,
1419
+ args: [string, bigint, boolean],
1420
+ typeArguments: [TypeDescriptor<T0> | string, TypeDescriptor<T1> | string],
1421
+ ): Promise<TypedDevInspectResults<[bigint]>> {
1422
+ const tx = new Transaction();
1423
+ builder.getOutputAmount(tx, args, typeArguments);
1424
+ const inspectRes = await client.devInspectTransactionBlock({
1425
+ transactionBlock: tx,
1426
+ sender: ZERO_ADDRESS,
1427
+ });
1428
+
1429
+ return (await getMoveCoder(client)).decodeDevInspectResult<[bigint]>(
1430
+ inspectRes,
1431
+ );
1432
+ }
1433
+ export async function getPoolData<T0 = any, T1 = any>(
1434
+ client: IotaClient,
1435
+ args: [string],
1436
+ typeArguments: [TypeDescriptor<T0> | string, TypeDescriptor<T1> | string],
1437
+ ): Promise<
1438
+ TypedDevInspectResults<[bigint, bigint, bigint, bigint, bigint]>
1439
+ > {
1440
+ const tx = new Transaction();
1441
+ builder.getPoolData(tx, args, typeArguments);
1442
+ const inspectRes = await client.devInspectTransactionBlock({
1443
+ transactionBlock: tx,
1444
+ sender: ZERO_ADDRESS,
1445
+ });
1446
+
1447
+ return (await getMoveCoder(client)).decodeDevInspectResult<
1448
+ [bigint, bigint, bigint, bigint, bigint]
1449
+ >(inspectRes);
1450
+ }
1451
+ export async function isPoolCreated<T0 = any, T1 = any>(
1452
+ client: IotaClient,
1453
+ args: [string],
1454
+ typeArguments: [TypeDescriptor<T0> | string, TypeDescriptor<T1> | string],
1455
+ ): Promise<TypedDevInspectResults<[boolean]>> {
1456
+ const tx = new Transaction();
1457
+ builder.isPoolCreated(tx, args, typeArguments);
1458
+ const inspectRes = await client.devInspectTransactionBlock({
1459
+ transactionBlock: tx,
1460
+ sender: ZERO_ADDRESS,
1461
+ });
1462
+
1463
+ return (await getMoveCoder(client)).decodeDevInspectResult<[boolean]>(
1464
+ inspectRes,
1465
+ );
1466
+ }
1467
+ export async function isPoolCreatedSorted<T0 = any, T1 = any>(
1468
+ client: IotaClient,
1469
+ args: [string],
1470
+ typeArguments: [TypeDescriptor<T0> | string, TypeDescriptor<T1> | string],
1471
+ ): Promise<TypedDevInspectResults<[boolean]>> {
1472
+ const tx = new Transaction();
1473
+ builder.isPoolCreatedSorted(tx, args, typeArguments);
1474
+ const inspectRes = await client.devInspectTransactionBlock({
1475
+ transactionBlock: tx,
1476
+ sender: ZERO_ADDRESS,
1477
+ });
1478
+
1479
+ return (await getMoveCoder(client)).decodeDevInspectResult<[boolean]>(
1480
+ inspectRes,
1481
+ );
1482
+ }
1483
+ export async function processSwapExactInput<T0 = any, T1 = any>(
1484
+ client: IotaClient,
1485
+ args: [string, string, string, bigint, boolean],
1486
+ typeArguments: [TypeDescriptor<T0> | string, TypeDescriptor<T1> | string],
1487
+ ): Promise<TypedDevInspectResults<[]>> {
1488
+ const tx = new Transaction();
1489
+ builder.processSwapExactInput(tx, args, typeArguments);
1490
+ const inspectRes = await client.devInspectTransactionBlock({
1491
+ transactionBlock: tx,
1492
+ sender: ZERO_ADDRESS,
1493
+ });
1494
+
1495
+ return (await getMoveCoder(client)).decodeDevInspectResult<[]>(
1496
+ inspectRes,
1497
+ );
1498
+ }
1499
+ export async function processSwapExactOutput<T0 = any, T1 = any>(
1500
+ client: IotaClient,
1501
+ args: [string, string, string, bigint, boolean],
1502
+ typeArguments: [TypeDescriptor<T0> | string, TypeDescriptor<T1> | string],
1503
+ ): Promise<TypedDevInspectResults<[]>> {
1504
+ const tx = new Transaction();
1505
+ builder.processSwapExactOutput(tx, args, typeArguments);
1506
+ const inspectRes = await client.devInspectTransactionBlock({
1507
+ transactionBlock: tx,
1508
+ sender: ZERO_ADDRESS,
1509
+ });
1510
+
1511
+ return (await getMoveCoder(client)).decodeDevInspectResult<[]>(
1512
+ inspectRes,
1513
+ );
1514
+ }
1515
+ export async function removeLiquidity<T0 = any, T1 = any>(
1516
+ client: IotaClient,
1517
+ args: [string, string, bigint, bigint, bigint],
1518
+ typeArguments: [TypeDescriptor<T0> | string, TypeDescriptor<T1> | string],
1519
+ ): Promise<
1520
+ TypedDevInspectResults<[_0x2.coin.Coin<T0>, _0x2.coin.Coin<T1>]>
1521
+ > {
1522
+ const tx = new Transaction();
1523
+ builder.removeLiquidity(tx, args, typeArguments);
1524
+ const inspectRes = await client.devInspectTransactionBlock({
1525
+ transactionBlock: tx,
1526
+ sender: ZERO_ADDRESS,
1527
+ });
1528
+
1529
+ return (await getMoveCoder(client)).decodeDevInspectResult<
1530
+ [_0x2.coin.Coin<T0>, _0x2.coin.Coin<T1>]
1531
+ >(inspectRes);
1532
+ }
1533
+ export async function setFeeTo_(
1534
+ client: IotaClient,
1535
+ args: [string, string, string],
1536
+ ): Promise<TypedDevInspectResults<[]>> {
1537
+ const tx = new Transaction();
1538
+ builder.setFeeTo_(tx, args);
1539
+ const inspectRes = await client.devInspectTransactionBlock({
1540
+ transactionBlock: tx,
1541
+ sender: ZERO_ADDRESS,
1542
+ });
1543
+
1544
+ return (await getMoveCoder(client)).decodeDevInspectResult<[]>(
1545
+ inspectRes,
1546
+ );
1547
+ }
1548
+ export async function swapExactFirstToSecond<T0 = any, T1 = any>(
1549
+ client: IotaClient,
1550
+ args: [string, string, bigint, bigint],
1551
+ typeArguments: [TypeDescriptor<T0> | string, TypeDescriptor<T1> | string],
1552
+ ): Promise<TypedDevInspectResults<[_0x2.coin.Coin<T1>]>> {
1553
+ const tx = new Transaction();
1554
+ builder.swapExactFirstToSecond(tx, args, typeArguments);
1555
+ const inspectRes = await client.devInspectTransactionBlock({
1556
+ transactionBlock: tx,
1557
+ sender: ZERO_ADDRESS,
1558
+ });
1559
+
1560
+ return (await getMoveCoder(client)).decodeDevInspectResult<
1561
+ [_0x2.coin.Coin<T1>]
1562
+ >(inspectRes);
1563
+ }
1564
+ export async function swapExactSecondToFirst<T0 = any, T1 = any>(
1565
+ client: IotaClient,
1566
+ args: [string, string, bigint, bigint],
1567
+ typeArguments: [TypeDescriptor<T0> | string, TypeDescriptor<T1> | string],
1568
+ ): Promise<TypedDevInspectResults<[_0x2.coin.Coin<T0>]>> {
1569
+ const tx = new Transaction();
1570
+ builder.swapExactSecondToFirst(tx, args, typeArguments);
1571
+ const inspectRes = await client.devInspectTransactionBlock({
1572
+ transactionBlock: tx,
1573
+ sender: ZERO_ADDRESS,
1574
+ });
1575
+
1576
+ return (await getMoveCoder(client)).decodeDevInspectResult<
1577
+ [_0x2.coin.Coin<T0>]
1578
+ >(inspectRes);
1579
+ }
1580
+ export async function swapFirstToExactSecond<T0 = any, T1 = any>(
1581
+ client: IotaClient,
1582
+ args: [string, string, bigint, bigint],
1583
+ typeArguments: [TypeDescriptor<T0> | string, TypeDescriptor<T1> | string],
1584
+ ): Promise<TypedDevInspectResults<[_0x2.coin.Coin<T1>]>> {
1585
+ const tx = new Transaction();
1586
+ builder.swapFirstToExactSecond(tx, args, typeArguments);
1587
+ const inspectRes = await client.devInspectTransactionBlock({
1588
+ transactionBlock: tx,
1589
+ sender: ZERO_ADDRESS,
1590
+ });
1591
+
1592
+ return (await getMoveCoder(client)).decodeDevInspectResult<
1593
+ [_0x2.coin.Coin<T1>]
1594
+ >(inspectRes);
1595
+ }
1596
+ export async function swapSecondToExactFirst<T0 = any, T1 = any>(
1597
+ client: IotaClient,
1598
+ args: [string, string, bigint, bigint],
1599
+ typeArguments: [TypeDescriptor<T0> | string, TypeDescriptor<T1> | string],
1600
+ ): Promise<TypedDevInspectResults<[_0x2.coin.Coin<T0>]>> {
1601
+ const tx = new Transaction();
1602
+ builder.swapSecondToExactFirst(tx, args, typeArguments);
1603
+ const inspectRes = await client.devInspectTransactionBlock({
1604
+ transactionBlock: tx,
1605
+ sender: ZERO_ADDRESS,
1606
+ });
1607
+
1608
+ return (await getMoveCoder(client)).decodeDevInspectResult<
1609
+ [_0x2.coin.Coin<T0>]
1610
+ >(inspectRes);
1611
+ }
1612
+ export async function zapInFirst<T0 = any, T1 = any>(
1613
+ client: IotaClient,
1614
+ args: [string, string, bigint],
1615
+ typeArguments: [TypeDescriptor<T0> | string, TypeDescriptor<T1> | string],
1616
+ ): Promise<
1617
+ TypedDevInspectResults<
1618
+ [_0x2.coin.Coin<pool.WISPLP<T0, T1>>, _0x2.coin.Coin<T1>]
1619
+ >
1620
+ > {
1621
+ const tx = new Transaction();
1622
+ builder.zapInFirst(tx, args, typeArguments);
1623
+ const inspectRes = await client.devInspectTransactionBlock({
1624
+ transactionBlock: tx,
1625
+ sender: ZERO_ADDRESS,
1626
+ });
1627
+
1628
+ return (await getMoveCoder(client)).decodeDevInspectResult<
1629
+ [_0x2.coin.Coin<pool.WISPLP<T0, T1>>, _0x2.coin.Coin<T1>]
1630
+ >(inspectRes);
1631
+ }
1632
+ export async function zapInSecond<T0 = any, T1 = any>(
1633
+ client: IotaClient,
1634
+ args: [string, string, bigint],
1635
+ typeArguments: [TypeDescriptor<T0> | string, TypeDescriptor<T1> | string],
1636
+ ): Promise<
1637
+ TypedDevInspectResults<
1638
+ [_0x2.coin.Coin<pool.WISPLP<T0, T1>>, _0x2.coin.Coin<T0>]
1639
+ >
1640
+ > {
1641
+ const tx = new Transaction();
1642
+ builder.zapInSecond(tx, args, typeArguments);
1643
+ const inspectRes = await client.devInspectTransactionBlock({
1644
+ transactionBlock: tx,
1645
+ sender: ZERO_ADDRESS,
1646
+ });
1647
+
1648
+ return (await getMoveCoder(client)).decodeDevInspectResult<
1649
+ [_0x2.coin.Coin<pool.WISPLP<T0, T1>>, _0x2.coin.Coin<T0>]
1650
+ >(inspectRes);
1651
+ }
1652
+ }
1653
+ }
1654
+
1655
+ export namespace pool_utils {
1656
+ export namespace builder {
1657
+ export function executeReturnToken<T0 = any>(
1658
+ tx: Transaction,
1659
+ args: [_0x2.coin.Coin<T0> | TransactionArgument],
1660
+ typeArguments: [TypeDescriptor<T0> | string],
1661
+ ): TransactionArgument & [TransactionArgument] {
1662
+ const _args: any[] = [];
1663
+ _args.push(transactionArgumentOrPure(args[0], tx));
1664
+
1665
+ // @ts-ignore
1666
+ return tx.moveCall({
1667
+ target:
1668
+ "0x6c4a21e3e7e6b6d51c4604021633e1d97e24e37a696f8c082cd48f37503e602a::pool_utils::execute_return_token",
1669
+ arguments: _args,
1670
+ typeArguments: [
1671
+ typeof typeArguments[0] === "string"
1672
+ ? typeArguments[0]
1673
+ : typeArguments[0].getSignature(),
1674
+ ],
1675
+ });
1676
+ }
1677
+ export function getInputPrice(
1678
+ tx: Transaction,
1679
+ args: [
1680
+ bigint | TransactionArgument,
1681
+ bigint | TransactionArgument,
1682
+ bigint | TransactionArgument,
1683
+ bigint | TransactionArgument,
1684
+ ],
1685
+ ): TransactionArgument &
1686
+ [
1687
+ TransactionArgument,
1688
+ TransactionArgument,
1689
+ TransactionArgument,
1690
+ TransactionArgument,
1691
+ ] {
1692
+ const _args: any[] = [];
1693
+ _args.push(transactionArgumentOrPureU64(args[0], tx));
1694
+ _args.push(transactionArgumentOrPureU64(args[1], tx));
1695
+ _args.push(transactionArgumentOrPureU64(args[2], tx));
1696
+ _args.push(transactionArgumentOrPureU64(args[3], tx));
1697
+
1698
+ // @ts-ignore
1699
+ return tx.moveCall({
1700
+ target:
1701
+ "0x6c4a21e3e7e6b6d51c4604021633e1d97e24e37a696f8c082cd48f37503e602a::pool_utils::get_input_price",
1702
+ arguments: _args,
1703
+ });
1704
+ }
1705
+ export function getOptimalZapInAmount(
1706
+ tx: Transaction,
1707
+ args: [bigint | TransactionArgument, bigint | TransactionArgument],
1708
+ ): TransactionArgument & [TransactionArgument, TransactionArgument] {
1709
+ const _args: any[] = [];
1710
+ _args.push(transactionArgumentOrPureU64(args[0], tx));
1711
+ _args.push(transactionArgumentOrPureU64(args[1], tx));
1712
+
1713
+ // @ts-ignore
1714
+ return tx.moveCall({
1715
+ target:
1716
+ "0x6c4a21e3e7e6b6d51c4604021633e1d97e24e37a696f8c082cd48f37503e602a::pool_utils::get_optimal_zap_in_amount",
1717
+ arguments: _args,
1718
+ });
1719
+ }
1720
+ export function getOutputPrice(
1721
+ tx: Transaction,
1722
+ args: [
1723
+ bigint | TransactionArgument,
1724
+ bigint | TransactionArgument,
1725
+ bigint | TransactionArgument,
1726
+ bigint | TransactionArgument,
1727
+ ],
1728
+ ): TransactionArgument &
1729
+ [
1730
+ TransactionArgument,
1731
+ TransactionArgument,
1732
+ TransactionArgument,
1733
+ TransactionArgument,
1734
+ ] {
1735
+ const _args: any[] = [];
1736
+ _args.push(transactionArgumentOrPureU64(args[0], tx));
1737
+ _args.push(transactionArgumentOrPureU64(args[1], tx));
1738
+ _args.push(transactionArgumentOrPureU64(args[2], tx));
1739
+ _args.push(transactionArgumentOrPureU64(args[3], tx));
1740
+
1741
+ // @ts-ignore
1742
+ return tx.moveCall({
1743
+ target:
1744
+ "0x6c4a21e3e7e6b6d51c4604021633e1d97e24e37a696f8c082cd48f37503e602a::pool_utils::get_output_price",
1745
+ arguments: _args,
1746
+ });
1747
+ }
1748
+ export function getTripleType<T0 = any, T1 = any, T2 = any>(
1749
+ tx: Transaction,
1750
+ args: [],
1751
+ typeArguments: [
1752
+ TypeDescriptor<T0> | string,
1753
+ TypeDescriptor<T1> | string,
1754
+ TypeDescriptor<T2> | string,
1755
+ ],
1756
+ ): TransactionArgument & [] {
1757
+ const _args: any[] = [];
1758
+
1759
+ // @ts-ignore
1760
+ return tx.moveCall({
1761
+ target:
1762
+ "0x6c4a21e3e7e6b6d51c4604021633e1d97e24e37a696f8c082cd48f37503e602a::pool_utils::get_triple_type",
1763
+ arguments: _args,
1764
+ typeArguments: [
1765
+ typeof typeArguments[0] === "string"
1766
+ ? typeArguments[0]
1767
+ : typeArguments[0].getSignature(),
1768
+ typeof typeArguments[1] === "string"
1769
+ ? typeArguments[1]
1770
+ : typeArguments[1].getSignature(),
1771
+ typeof typeArguments[2] === "string"
1772
+ ? typeArguments[2]
1773
+ : typeArguments[2].getSignature(),
1774
+ ],
1775
+ });
1776
+ }
1777
+ export function getType<T0 = any, T1 = any>(
1778
+ tx: Transaction,
1779
+ args: [],
1780
+ typeArguments: [TypeDescriptor<T0> | string, TypeDescriptor<T1> | string],
1781
+ ): TransactionArgument & [] {
1782
+ const _args: any[] = [];
1783
+
1784
+ // @ts-ignore
1785
+ return tx.moveCall({
1786
+ target:
1787
+ "0x6c4a21e3e7e6b6d51c4604021633e1d97e24e37a696f8c082cd48f37503e602a::pool_utils::get_type",
1788
+ arguments: _args,
1789
+ typeArguments: [
1790
+ typeof typeArguments[0] === "string"
1791
+ ? typeArguments[0]
1792
+ : typeArguments[0].getSignature(),
1793
+ typeof typeArguments[1] === "string"
1794
+ ? typeArguments[1]
1795
+ : typeArguments[1].getSignature(),
1796
+ ],
1797
+ });
1798
+ }
1799
+ export function quote(
1800
+ tx: Transaction,
1801
+ args: [
1802
+ bigint | TransactionArgument,
1803
+ bigint | TransactionArgument,
1804
+ bigint | TransactionArgument,
1805
+ ],
1806
+ ): TransactionArgument &
1807
+ [TransactionArgument, TransactionArgument, TransactionArgument] {
1808
+ const _args: any[] = [];
1809
+ _args.push(transactionArgumentOrPureU64(args[0], tx));
1810
+ _args.push(transactionArgumentOrPureU64(args[1], tx));
1811
+ _args.push(transactionArgumentOrPureU64(args[2], tx));
1812
+
1813
+ // @ts-ignore
1814
+ return tx.moveCall({
1815
+ target:
1816
+ "0x6c4a21e3e7e6b6d51c4604021633e1d97e24e37a696f8c082cd48f37503e602a::pool_utils::quote",
1817
+ arguments: _args,
1818
+ });
1819
+ }
1820
+ export function sortTokenType(
1821
+ tx: Transaction,
1822
+ args: [
1823
+ string | TransactionObjectArgument | TransactionArgument,
1824
+ string | TransactionObjectArgument | TransactionArgument,
1825
+ ],
1826
+ ): TransactionArgument & [TransactionArgument, TransactionArgument] {
1827
+ const _args: any[] = [];
1828
+ _args.push(transactionArgumentOrObject(args[0], tx));
1829
+ _args.push(transactionArgumentOrObject(args[1], tx));
1830
+
1831
+ // @ts-ignore
1832
+ return tx.moveCall({
1833
+ target:
1834
+ "0x6c4a21e3e7e6b6d51c4604021633e1d97e24e37a696f8c082cd48f37503e602a::pool_utils::sort_token_type",
1835
+ arguments: _args,
1836
+ });
1837
+ }
1838
+ }
1839
+ export namespace view {
1840
+ export async function executeReturnToken<T0 = any>(
1841
+ client: IotaClient,
1842
+ args: [_0x2.coin.Coin<T0>],
1843
+ typeArguments: [TypeDescriptor<T0> | string],
1844
+ ): Promise<TypedDevInspectResults<[]>> {
1845
+ const tx = new Transaction();
1846
+ builder.executeReturnToken(tx, args, typeArguments);
1847
+ const inspectRes = await client.devInspectTransactionBlock({
1848
+ transactionBlock: tx,
1849
+ sender: ZERO_ADDRESS,
1850
+ });
1851
+
1852
+ return (await getMoveCoder(client)).decodeDevInspectResult<[]>(
1853
+ inspectRes,
1854
+ );
1855
+ }
1856
+ export async function getInputPrice(
1857
+ client: IotaClient,
1858
+ args: [bigint, bigint, bigint, bigint],
1859
+ ): Promise<TypedDevInspectResults<[bigint]>> {
1860
+ const tx = new Transaction();
1861
+ builder.getInputPrice(tx, args);
1862
+ const inspectRes = await client.devInspectTransactionBlock({
1863
+ transactionBlock: tx,
1864
+ sender: ZERO_ADDRESS,
1865
+ });
1866
+
1867
+ return (await getMoveCoder(client)).decodeDevInspectResult<[bigint]>(
1868
+ inspectRes,
1869
+ );
1870
+ }
1871
+ export async function getOptimalZapInAmount(
1872
+ client: IotaClient,
1873
+ args: [bigint, bigint],
1874
+ ): Promise<TypedDevInspectResults<[bigint]>> {
1875
+ const tx = new Transaction();
1876
+ builder.getOptimalZapInAmount(tx, args);
1877
+ const inspectRes = await client.devInspectTransactionBlock({
1878
+ transactionBlock: tx,
1879
+ sender: ZERO_ADDRESS,
1880
+ });
1881
+
1882
+ return (await getMoveCoder(client)).decodeDevInspectResult<[bigint]>(
1883
+ inspectRes,
1884
+ );
1885
+ }
1886
+ export async function getOutputPrice(
1887
+ client: IotaClient,
1888
+ args: [bigint, bigint, bigint, bigint],
1889
+ ): Promise<TypedDevInspectResults<[bigint]>> {
1890
+ const tx = new Transaction();
1891
+ builder.getOutputPrice(tx, args);
1892
+ const inspectRes = await client.devInspectTransactionBlock({
1893
+ transactionBlock: tx,
1894
+ sender: ZERO_ADDRESS,
1895
+ });
1896
+
1897
+ return (await getMoveCoder(client)).decodeDevInspectResult<[bigint]>(
1898
+ inspectRes,
1899
+ );
1900
+ }
1901
+ export async function getTripleType<T0 = any, T1 = any, T2 = any>(
1902
+ client: IotaClient,
1903
+ args: [],
1904
+ typeArguments: [
1905
+ TypeDescriptor<T0> | string,
1906
+ TypeDescriptor<T1> | string,
1907
+ TypeDescriptor<T2> | string,
1908
+ ],
1909
+ ): Promise<
1910
+ TypedDevInspectResults<
1911
+ [
1912
+ _0x1.type_name.TypeName,
1913
+ _0x1.type_name.TypeName,
1914
+ _0x1.type_name.TypeName,
1915
+ ]
1916
+ >
1917
+ > {
1918
+ const tx = new Transaction();
1919
+ builder.getTripleType(tx, args, typeArguments);
1920
+ const inspectRes = await client.devInspectTransactionBlock({
1921
+ transactionBlock: tx,
1922
+ sender: ZERO_ADDRESS,
1923
+ });
1924
+
1925
+ return (await getMoveCoder(client)).decodeDevInspectResult<
1926
+ [
1927
+ _0x1.type_name.TypeName,
1928
+ _0x1.type_name.TypeName,
1929
+ _0x1.type_name.TypeName,
1930
+ ]
1931
+ >(inspectRes);
1932
+ }
1933
+ export async function getType<T0 = any, T1 = any>(
1934
+ client: IotaClient,
1935
+ args: [],
1936
+ typeArguments: [TypeDescriptor<T0> | string, TypeDescriptor<T1> | string],
1937
+ ): Promise<
1938
+ TypedDevInspectResults<[_0x1.type_name.TypeName, _0x1.type_name.TypeName]>
1939
+ > {
1940
+ const tx = new Transaction();
1941
+ builder.getType(tx, args, typeArguments);
1942
+ const inspectRes = await client.devInspectTransactionBlock({
1943
+ transactionBlock: tx,
1944
+ sender: ZERO_ADDRESS,
1945
+ });
1946
+
1947
+ return (await getMoveCoder(client)).decodeDevInspectResult<
1948
+ [_0x1.type_name.TypeName, _0x1.type_name.TypeName]
1949
+ >(inspectRes);
1950
+ }
1951
+ export async function quote(
1952
+ client: IotaClient,
1953
+ args: [bigint, bigint, bigint],
1954
+ ): Promise<TypedDevInspectResults<[bigint]>> {
1955
+ const tx = new Transaction();
1956
+ builder.quote(tx, args);
1957
+ const inspectRes = await client.devInspectTransactionBlock({
1958
+ transactionBlock: tx,
1959
+ sender: ZERO_ADDRESS,
1960
+ });
1961
+
1962
+ return (await getMoveCoder(client)).decodeDevInspectResult<[bigint]>(
1963
+ inspectRes,
1964
+ );
1965
+ }
1966
+ export async function sortTokenType(
1967
+ client: IotaClient,
1968
+ args: [string, string],
1969
+ ): Promise<TypedDevInspectResults<[comparator.Result]>> {
1970
+ const tx = new Transaction();
1971
+ builder.sortTokenType(tx, args);
1972
+ const inspectRes = await client.devInspectTransactionBlock({
1973
+ transactionBlock: tx,
1974
+ sender: ZERO_ADDRESS,
1975
+ });
1976
+
1977
+ return (await getMoveCoder(client)).decodeDevInspectResult<
1978
+ [comparator.Result]
1979
+ >(inspectRes);
1980
+ }
1981
+ }
1982
+ }
1983
+
1984
+ export namespace router {
1985
+ export namespace builder {
1986
+ export function addLiquidity_<T0 = any, T1 = any>(
1987
+ tx: Transaction,
1988
+ args: [
1989
+ string | TransactionObjectArgument | TransactionArgument,
1990
+ (string | TransactionObjectArgument)[] | TransactionArgument,
1991
+ (string | TransactionObjectArgument)[] | TransactionArgument,
1992
+ bigint | TransactionArgument,
1993
+ bigint | TransactionArgument,
1994
+ bigint | TransactionArgument,
1995
+ bigint | TransactionArgument,
1996
+ ],
1997
+ typeArguments: [TypeDescriptor<T0> | string, TypeDescriptor<T1> | string],
1998
+ ): TransactionArgument &
1999
+ [
2000
+ TransactionArgument,
2001
+ TransactionArgument,
2002
+ TransactionArgument,
2003
+ TransactionArgument,
2004
+ TransactionArgument,
2005
+ TransactionArgument,
2006
+ TransactionArgument,
2007
+ ] {
2008
+ const _args: any[] = [];
2009
+ _args.push(transactionArgumentOrObject(args[0], tx));
2010
+ _args.push(transactionArgumentOrVec(args[1], tx));
2011
+ _args.push(transactionArgumentOrVec(args[2], tx));
2012
+ _args.push(transactionArgumentOrPureU64(args[3], tx));
2013
+ _args.push(transactionArgumentOrPureU64(args[4], tx));
2014
+ _args.push(transactionArgumentOrPureU64(args[5], tx));
2015
+ _args.push(transactionArgumentOrPureU64(args[6], tx));
2016
+
2017
+ // @ts-ignore
2018
+ return tx.moveCall({
2019
+ target:
2020
+ "0x6c4a21e3e7e6b6d51c4604021633e1d97e24e37a696f8c082cd48f37503e602a::router::add_liquidity_",
2021
+ arguments: _args,
2022
+ typeArguments: [
2023
+ typeof typeArguments[0] === "string"
2024
+ ? typeArguments[0]
2025
+ : typeArguments[0].getSignature(),
2026
+ typeof typeArguments[1] === "string"
2027
+ ? typeArguments[1]
2028
+ : typeArguments[1].getSignature(),
2029
+ ],
2030
+ });
2031
+ }
2032
+ export function createPool_<T0 = any, T1 = any>(
2033
+ tx: Transaction,
2034
+ args: [
2035
+ string | TransactionObjectArgument | TransactionArgument,
2036
+ (string | TransactionObjectArgument)[] | TransactionArgument,
2037
+ (string | TransactionObjectArgument)[] | TransactionArgument,
2038
+ bigint | TransactionArgument,
2039
+ bigint | TransactionArgument,
2040
+ ],
2041
+ typeArguments: [TypeDescriptor<T0> | string, TypeDescriptor<T1> | string],
2042
+ ): TransactionArgument &
2043
+ [
2044
+ TransactionArgument,
2045
+ TransactionArgument,
2046
+ TransactionArgument,
2047
+ TransactionArgument,
2048
+ TransactionArgument,
2049
+ ] {
2050
+ const _args: any[] = [];
2051
+ _args.push(transactionArgumentOrObject(args[0], tx));
2052
+ _args.push(transactionArgumentOrVec(args[1], tx));
2053
+ _args.push(transactionArgumentOrVec(args[2], tx));
2054
+ _args.push(transactionArgumentOrPureU64(args[3], tx));
2055
+ _args.push(transactionArgumentOrPureU64(args[4], tx));
2056
+
2057
+ // @ts-ignore
2058
+ return tx.moveCall({
2059
+ target:
2060
+ "0x6c4a21e3e7e6b6d51c4604021633e1d97e24e37a696f8c082cd48f37503e602a::router::create_pool_",
2061
+ arguments: _args,
2062
+ typeArguments: [
2063
+ typeof typeArguments[0] === "string"
2064
+ ? typeArguments[0]
2065
+ : typeArguments[0].getSignature(),
2066
+ typeof typeArguments[1] === "string"
2067
+ ? typeArguments[1]
2068
+ : typeArguments[1].getSignature(),
2069
+ ],
2070
+ });
2071
+ }
2072
+ export function removeLiquidity_<T0 = any, T1 = any>(
2073
+ tx: Transaction,
2074
+ args: [
2075
+ string | TransactionObjectArgument | TransactionArgument,
2076
+ (string | TransactionObjectArgument)[] | TransactionArgument,
2077
+ bigint | TransactionArgument,
2078
+ bigint | TransactionArgument,
2079
+ bigint | TransactionArgument,
2080
+ ],
2081
+ typeArguments: [TypeDescriptor<T0> | string, TypeDescriptor<T1> | string],
2082
+ ): TransactionArgument &
2083
+ [
2084
+ TransactionArgument,
2085
+ TransactionArgument,
2086
+ TransactionArgument,
2087
+ TransactionArgument,
2088
+ TransactionArgument,
2089
+ ] {
2090
+ const _args: any[] = [];
2091
+ _args.push(transactionArgumentOrObject(args[0], tx));
2092
+ _args.push(transactionArgumentOrVec(args[1], tx));
2093
+ _args.push(transactionArgumentOrPureU64(args[2], tx));
2094
+ _args.push(transactionArgumentOrPureU64(args[3], tx));
2095
+ _args.push(transactionArgumentOrPureU64(args[4], tx));
2096
+
2097
+ // @ts-ignore
2098
+ return tx.moveCall({
2099
+ target:
2100
+ "0x6c4a21e3e7e6b6d51c4604021633e1d97e24e37a696f8c082cd48f37503e602a::router::remove_liquidity_",
2101
+ arguments: _args,
2102
+ typeArguments: [
2103
+ typeof typeArguments[0] === "string"
2104
+ ? typeArguments[0]
2105
+ : typeArguments[0].getSignature(),
2106
+ typeof typeArguments[1] === "string"
2107
+ ? typeArguments[1]
2108
+ : typeArguments[1].getSignature(),
2109
+ ],
2110
+ });
2111
+ }
2112
+ export function swapExactInput_<T0 = any, T1 = any>(
2113
+ tx: Transaction,
2114
+ args: [
2115
+ string | TransactionObjectArgument | TransactionArgument,
2116
+ (string | TransactionObjectArgument)[] | TransactionArgument,
2117
+ bigint | TransactionArgument,
2118
+ bigint | TransactionArgument,
2119
+ ],
2120
+ typeArguments: [TypeDescriptor<T0> | string, TypeDescriptor<T1> | string],
2121
+ ): TransactionArgument &
2122
+ [
2123
+ TransactionArgument,
2124
+ TransactionArgument,
2125
+ TransactionArgument,
2126
+ TransactionArgument,
2127
+ ] {
2128
+ const _args: any[] = [];
2129
+ _args.push(transactionArgumentOrObject(args[0], tx));
2130
+ _args.push(transactionArgumentOrVec(args[1], tx));
2131
+ _args.push(transactionArgumentOrPureU64(args[2], tx));
2132
+ _args.push(transactionArgumentOrPureU64(args[3], tx));
2133
+
2134
+ // @ts-ignore
2135
+ return tx.moveCall({
2136
+ target:
2137
+ "0x6c4a21e3e7e6b6d51c4604021633e1d97e24e37a696f8c082cd48f37503e602a::router::swap_exact_input_",
2138
+ arguments: _args,
2139
+ typeArguments: [
2140
+ typeof typeArguments[0] === "string"
2141
+ ? typeArguments[0]
2142
+ : typeArguments[0].getSignature(),
2143
+ typeof typeArguments[1] === "string"
2144
+ ? typeArguments[1]
2145
+ : typeArguments[1].getSignature(),
2146
+ ],
2147
+ });
2148
+ }
2149
+ export function swapExactInputDoublehop_<T0 = any, T1 = any, T2 = any>(
2150
+ tx: Transaction,
2151
+ args: [
2152
+ string | TransactionObjectArgument | TransactionArgument,
2153
+ (string | TransactionObjectArgument)[] | TransactionArgument,
2154
+ bigint | TransactionArgument,
2155
+ bigint | TransactionArgument,
2156
+ ],
2157
+ typeArguments: [
2158
+ TypeDescriptor<T0> | string,
2159
+ TypeDescriptor<T1> | string,
2160
+ TypeDescriptor<T2> | string,
2161
+ ],
2162
+ ): TransactionArgument &
2163
+ [
2164
+ TransactionArgument,
2165
+ TransactionArgument,
2166
+ TransactionArgument,
2167
+ TransactionArgument,
2168
+ ] {
2169
+ const _args: any[] = [];
2170
+ _args.push(transactionArgumentOrObject(args[0], tx));
2171
+ _args.push(transactionArgumentOrVec(args[1], tx));
2172
+ _args.push(transactionArgumentOrPureU64(args[2], tx));
2173
+ _args.push(transactionArgumentOrPureU64(args[3], tx));
2174
+
2175
+ // @ts-ignore
2176
+ return tx.moveCall({
2177
+ target:
2178
+ "0x6c4a21e3e7e6b6d51c4604021633e1d97e24e37a696f8c082cd48f37503e602a::router::swap_exact_input_doublehop_",
2179
+ arguments: _args,
2180
+ typeArguments: [
2181
+ typeof typeArguments[0] === "string"
2182
+ ? typeArguments[0]
2183
+ : typeArguments[0].getSignature(),
2184
+ typeof typeArguments[1] === "string"
2185
+ ? typeArguments[1]
2186
+ : typeArguments[1].getSignature(),
2187
+ typeof typeArguments[2] === "string"
2188
+ ? typeArguments[2]
2189
+ : typeArguments[2].getSignature(),
2190
+ ],
2191
+ });
2192
+ }
2193
+ export function swapExactOutput_<T0 = any, T1 = any>(
2194
+ tx: Transaction,
2195
+ args: [
2196
+ string | TransactionObjectArgument | TransactionArgument,
2197
+ (string | TransactionObjectArgument)[] | TransactionArgument,
2198
+ bigint | TransactionArgument,
2199
+ bigint | TransactionArgument,
2200
+ ],
2201
+ typeArguments: [TypeDescriptor<T0> | string, TypeDescriptor<T1> | string],
2202
+ ): TransactionArgument &
2203
+ [
2204
+ TransactionArgument,
2205
+ TransactionArgument,
2206
+ TransactionArgument,
2207
+ TransactionArgument,
2208
+ ] {
2209
+ const _args: any[] = [];
2210
+ _args.push(transactionArgumentOrObject(args[0], tx));
2211
+ _args.push(transactionArgumentOrVec(args[1], tx));
2212
+ _args.push(transactionArgumentOrPureU64(args[2], tx));
2213
+ _args.push(transactionArgumentOrPureU64(args[3], tx));
2214
+
2215
+ // @ts-ignore
2216
+ return tx.moveCall({
2217
+ target:
2218
+ "0x6c4a21e3e7e6b6d51c4604021633e1d97e24e37a696f8c082cd48f37503e602a::router::swap_exact_output_",
2219
+ arguments: _args,
2220
+ typeArguments: [
2221
+ typeof typeArguments[0] === "string"
2222
+ ? typeArguments[0]
2223
+ : typeArguments[0].getSignature(),
2224
+ typeof typeArguments[1] === "string"
2225
+ ? typeArguments[1]
2226
+ : typeArguments[1].getSignature(),
2227
+ ],
2228
+ });
2229
+ }
2230
+ export function swapExactOutputDoublehop_<T0 = any, T1 = any, T2 = any>(
2231
+ tx: Transaction,
2232
+ args: [
2233
+ string | TransactionObjectArgument | TransactionArgument,
2234
+ (string | TransactionObjectArgument)[] | TransactionArgument,
2235
+ bigint | TransactionArgument,
2236
+ bigint | TransactionArgument,
2237
+ ],
2238
+ typeArguments: [
2239
+ TypeDescriptor<T0> | string,
2240
+ TypeDescriptor<T1> | string,
2241
+ TypeDescriptor<T2> | string,
2242
+ ],
2243
+ ): TransactionArgument &
2244
+ [
2245
+ TransactionArgument,
2246
+ TransactionArgument,
2247
+ TransactionArgument,
2248
+ TransactionArgument,
2249
+ ] {
2250
+ const _args: any[] = [];
2251
+ _args.push(transactionArgumentOrObject(args[0], tx));
2252
+ _args.push(transactionArgumentOrVec(args[1], tx));
2253
+ _args.push(transactionArgumentOrPureU64(args[2], tx));
2254
+ _args.push(transactionArgumentOrPureU64(args[3], tx));
2255
+
2256
+ // @ts-ignore
2257
+ return tx.moveCall({
2258
+ target:
2259
+ "0x6c4a21e3e7e6b6d51c4604021633e1d97e24e37a696f8c082cd48f37503e602a::router::swap_exact_output_doublehop_",
2260
+ arguments: _args,
2261
+ typeArguments: [
2262
+ typeof typeArguments[0] === "string"
2263
+ ? typeArguments[0]
2264
+ : typeArguments[0].getSignature(),
2265
+ typeof typeArguments[1] === "string"
2266
+ ? typeArguments[1]
2267
+ : typeArguments[1].getSignature(),
2268
+ typeof typeArguments[2] === "string"
2269
+ ? typeArguments[2]
2270
+ : typeArguments[2].getSignature(),
2271
+ ],
2272
+ });
2273
+ }
2274
+ export function zapIn_<T0 = any, T1 = any>(
2275
+ tx: Transaction,
2276
+ args: [
2277
+ string | TransactionObjectArgument | TransactionArgument,
2278
+ (string | TransactionObjectArgument)[] | TransactionArgument,
2279
+ bigint | TransactionArgument,
2280
+ ],
2281
+ typeArguments: [TypeDescriptor<T0> | string, TypeDescriptor<T1> | string],
2282
+ ): TransactionArgument &
2283
+ [TransactionArgument, TransactionArgument, TransactionArgument] {
2284
+ const _args: any[] = [];
2285
+ _args.push(transactionArgumentOrObject(args[0], tx));
2286
+ _args.push(transactionArgumentOrVec(args[1], tx));
2287
+ _args.push(transactionArgumentOrPureU64(args[2], tx));
2288
+
2289
+ // @ts-ignore
2290
+ return tx.moveCall({
2291
+ target:
2292
+ "0x6c4a21e3e7e6b6d51c4604021633e1d97e24e37a696f8c082cd48f37503e602a::router::zap_in_",
2293
+ arguments: _args,
2294
+ typeArguments: [
2295
+ typeof typeArguments[0] === "string"
2296
+ ? typeArguments[0]
2297
+ : typeArguments[0].getSignature(),
2298
+ typeof typeArguments[1] === "string"
2299
+ ? typeArguments[1]
2300
+ : typeArguments[1].getSignature(),
2301
+ ],
2302
+ });
2303
+ }
2304
+ }
2305
+ export namespace view {
2306
+ export async function addLiquidity_<T0 = any, T1 = any>(
2307
+ client: IotaClient,
2308
+ args: [string, string[], string[], bigint, bigint, bigint, bigint],
2309
+ typeArguments: [TypeDescriptor<T0> | string, TypeDescriptor<T1> | string],
2310
+ ): Promise<TypedDevInspectResults<[]>> {
2311
+ const tx = new Transaction();
2312
+ builder.addLiquidity_(tx, args, typeArguments);
2313
+ const inspectRes = await client.devInspectTransactionBlock({
2314
+ transactionBlock: tx,
2315
+ sender: ZERO_ADDRESS,
2316
+ });
2317
+
2318
+ return (await getMoveCoder(client)).decodeDevInspectResult<[]>(
2319
+ inspectRes,
2320
+ );
2321
+ }
2322
+ export async function createPool_<T0 = any, T1 = any>(
2323
+ client: IotaClient,
2324
+ args: [string, string[], string[], bigint, bigint],
2325
+ typeArguments: [TypeDescriptor<T0> | string, TypeDescriptor<T1> | string],
2326
+ ): Promise<TypedDevInspectResults<[]>> {
2327
+ const tx = new Transaction();
2328
+ builder.createPool_(tx, args, typeArguments);
2329
+ const inspectRes = await client.devInspectTransactionBlock({
2330
+ transactionBlock: tx,
2331
+ sender: ZERO_ADDRESS,
2332
+ });
2333
+
2334
+ return (await getMoveCoder(client)).decodeDevInspectResult<[]>(
2335
+ inspectRes,
2336
+ );
2337
+ }
2338
+ export async function removeLiquidity_<T0 = any, T1 = any>(
2339
+ client: IotaClient,
2340
+ args: [string, string[], bigint, bigint, bigint],
2341
+ typeArguments: [TypeDescriptor<T0> | string, TypeDescriptor<T1> | string],
2342
+ ): Promise<TypedDevInspectResults<[]>> {
2343
+ const tx = new Transaction();
2344
+ builder.removeLiquidity_(tx, args, typeArguments);
2345
+ const inspectRes = await client.devInspectTransactionBlock({
2346
+ transactionBlock: tx,
2347
+ sender: ZERO_ADDRESS,
2348
+ });
2349
+
2350
+ return (await getMoveCoder(client)).decodeDevInspectResult<[]>(
2351
+ inspectRes,
2352
+ );
2353
+ }
2354
+ export async function swapExactInput_<T0 = any, T1 = any>(
2355
+ client: IotaClient,
2356
+ args: [string, string[], bigint, bigint],
2357
+ typeArguments: [TypeDescriptor<T0> | string, TypeDescriptor<T1> | string],
2358
+ ): Promise<TypedDevInspectResults<[]>> {
2359
+ const tx = new Transaction();
2360
+ builder.swapExactInput_(tx, args, typeArguments);
2361
+ const inspectRes = await client.devInspectTransactionBlock({
2362
+ transactionBlock: tx,
2363
+ sender: ZERO_ADDRESS,
2364
+ });
2365
+
2366
+ return (await getMoveCoder(client)).decodeDevInspectResult<[]>(
2367
+ inspectRes,
2368
+ );
2369
+ }
2370
+ export async function swapExactInputDoublehop_<
2371
+ T0 = any,
2372
+ T1 = any,
2373
+ T2 = any,
2374
+ >(
2375
+ client: IotaClient,
2376
+ args: [string, string[], bigint, bigint],
2377
+ typeArguments: [
2378
+ TypeDescriptor<T0> | string,
2379
+ TypeDescriptor<T1> | string,
2380
+ TypeDescriptor<T2> | string,
2381
+ ],
2382
+ ): Promise<TypedDevInspectResults<[]>> {
2383
+ const tx = new Transaction();
2384
+ builder.swapExactInputDoublehop_(tx, args, typeArguments);
2385
+ const inspectRes = await client.devInspectTransactionBlock({
2386
+ transactionBlock: tx,
2387
+ sender: ZERO_ADDRESS,
2388
+ });
2389
+
2390
+ return (await getMoveCoder(client)).decodeDevInspectResult<[]>(
2391
+ inspectRes,
2392
+ );
2393
+ }
2394
+ export async function swapExactOutput_<T0 = any, T1 = any>(
2395
+ client: IotaClient,
2396
+ args: [string, string[], bigint, bigint],
2397
+ typeArguments: [TypeDescriptor<T0> | string, TypeDescriptor<T1> | string],
2398
+ ): Promise<TypedDevInspectResults<[]>> {
2399
+ const tx = new Transaction();
2400
+ builder.swapExactOutput_(tx, args, typeArguments);
2401
+ const inspectRes = await client.devInspectTransactionBlock({
2402
+ transactionBlock: tx,
2403
+ sender: ZERO_ADDRESS,
2404
+ });
2405
+
2406
+ return (await getMoveCoder(client)).decodeDevInspectResult<[]>(
2407
+ inspectRes,
2408
+ );
2409
+ }
2410
+ export async function swapExactOutputDoublehop_<
2411
+ T0 = any,
2412
+ T1 = any,
2413
+ T2 = any,
2414
+ >(
2415
+ client: IotaClient,
2416
+ args: [string, string[], bigint, bigint],
2417
+ typeArguments: [
2418
+ TypeDescriptor<T0> | string,
2419
+ TypeDescriptor<T1> | string,
2420
+ TypeDescriptor<T2> | string,
2421
+ ],
2422
+ ): Promise<TypedDevInspectResults<[]>> {
2423
+ const tx = new Transaction();
2424
+ builder.swapExactOutputDoublehop_(tx, args, typeArguments);
2425
+ const inspectRes = await client.devInspectTransactionBlock({
2426
+ transactionBlock: tx,
2427
+ sender: ZERO_ADDRESS,
2428
+ });
2429
+
2430
+ return (await getMoveCoder(client)).decodeDevInspectResult<[]>(
2431
+ inspectRes,
2432
+ );
2433
+ }
2434
+ export async function zapIn_<T0 = any, T1 = any>(
2435
+ client: IotaClient,
2436
+ args: [string, string[], bigint],
2437
+ typeArguments: [TypeDescriptor<T0> | string, TypeDescriptor<T1> | string],
2438
+ ): Promise<TypedDevInspectResults<[]>> {
2439
+ const tx = new Transaction();
2440
+ builder.zapIn_(tx, args, typeArguments);
2441
+ const inspectRes = await client.devInspectTransactionBlock({
2442
+ transactionBlock: tx,
2443
+ sender: ZERO_ADDRESS,
2444
+ });
2445
+
2446
+ return (await getMoveCoder(client)).decodeDevInspectResult<[]>(
2447
+ inspectRes,
2448
+ );
2449
+ }
2450
+ }
2451
+ }
2452
+
2453
+ const MODULES = JSON.parse(
2454
+ '{"comparator":{"fileFormatVersion":6,"address":"0x6c4a21e3e7e6b6d51c4604021633e1d97e24e37a696f8c082cd48f37503e602a","name":"comparator","friends":[],"structs":{"Result":{"abilities":{"abilities":["Drop"]},"typeParameters":[],"fields":[{"name":"inner","type":"U8"}]}},"exposedFunctions":{"compare":{"visibility":"Public","isEntry":false,"typeParameters":[{"abilities":[]}],"parameters":[{"Reference":{"TypeParameter":0}},{"Reference":{"TypeParameter":0}}],"return":[{"Struct":{"address":"0x6c4a21e3e7e6b6d51c4604021633e1d97e24e37a696f8c082cd48f37503e602a","module":"comparator","name":"Result","typeArguments":[]}}]},"compare_u8_vector":{"visibility":"Public","isEntry":false,"typeParameters":[],"parameters":[{"Vector":"U8"},{"Vector":"U8"}],"return":[{"Struct":{"address":"0x6c4a21e3e7e6b6d51c4604021633e1d97e24e37a696f8c082cd48f37503e602a","module":"comparator","name":"Result","typeArguments":[]}}]},"is_equal":{"visibility":"Public","isEntry":false,"typeParameters":[],"parameters":[{"Reference":{"Struct":{"address":"0x6c4a21e3e7e6b6d51c4604021633e1d97e24e37a696f8c082cd48f37503e602a","module":"comparator","name":"Result","typeArguments":[]}}}],"return":["Bool"]},"is_greater_than":{"visibility":"Public","isEntry":false,"typeParameters":[],"parameters":[{"Reference":{"Struct":{"address":"0x6c4a21e3e7e6b6d51c4604021633e1d97e24e37a696f8c082cd48f37503e602a","module":"comparator","name":"Result","typeArguments":[]}}}],"return":["Bool"]},"is_smaller_than":{"visibility":"Public","isEntry":false,"typeParameters":[],"parameters":[{"Reference":{"Struct":{"address":"0x6c4a21e3e7e6b6d51c4604021633e1d97e24e37a696f8c082cd48f37503e602a","module":"comparator","name":"Result","typeArguments":[]}}}],"return":["Bool"]}}},"math_utils":{"fileFormatVersion":6,"address":"0x6c4a21e3e7e6b6d51c4604021633e1d97e24e37a696f8c082cd48f37503e602a","name":"math_utils","friends":[],"structs":{},"exposedFunctions":{"max":{"visibility":"Public","isEntry":false,"typeParameters":[],"parameters":["U128","U128"],"return":["U128"]},"max_u64":{"visibility":"Public","isEntry":false,"typeParameters":[],"parameters":["U64","U64"],"return":["U64"]},"min":{"visibility":"Public","isEntry":false,"typeParameters":[],"parameters":["U128","U128"],"return":["U128"]},"pow":{"visibility":"Public","isEntry":false,"typeParameters":[],"parameters":["U128","U8"],"return":["U128"]},"sqrt":{"visibility":"Public","isEntry":false,"typeParameters":[],"parameters":["U128"],"return":["U128"]},"sqrt_u256":{"visibility":"Public","isEntry":false,"typeParameters":[],"parameters":["U256"],"return":["U256"]}}},"pool":{"fileFormatVersion":6,"address":"0x6c4a21e3e7e6b6d51c4604021633e1d97e24e37a696f8c082cd48f37503e602a","name":"pool","friends":[],"structs":{"ControllerCap":{"abilities":{"abilities":["Store","Key"]},"typeParameters":[],"fields":[{"name":"id","type":{"Struct":{"address":"0x2","module":"object","name":"UID","typeArguments":[]}}}]},"FeeToSet":{"abilities":{"abilities":["Copy","Drop"]},"typeParameters":[],"fields":[{"name":"fee_to","type":"Address"},{"name":"caller","type":"Address"}]},"LiquidityAdded":{"abilities":{"abilities":["Copy","Drop"]},"typeParameters":[{"constraints":{"abilities":[]},"isPhantom":true},{"constraints":{"abilities":[]},"isPhantom":true}],"fields":[{"name":"user","type":"Address"},{"name":"first_amount","type":"U64"},{"name":"second_amount","type":"U64"},{"name":"first_reserve","type":"U64"},{"name":"second_reserve","type":"U64"},{"name":"wisp_lp_amount","type":"U64"},{"name":"fee_amount","type":"U64"}]},"LiquidityRemoved":{"abilities":{"abilities":["Copy","Drop"]},"typeParameters":[{"constraints":{"abilities":[]},"isPhantom":true},{"constraints":{"abilities":[]},"isPhantom":true}],"fields":[{"name":"user","type":"Address"},{"name":"first_amount","type":"U64"},{"name":"second_amount","type":"U64"},{"name":"first_reserve","type":"U64"},{"name":"second_reserve","type":"U64"},{"name":"wisp_lp_amount","type":"U64"},{"name":"fee_amount","type":"U64"}]},"Pool":{"abilities":{"abilities":["Store","Key"]},"typeParameters":[{"constraints":{"abilities":[]},"isPhantom":true},{"constraints":{"abilities":[]},"isPhantom":true}],"fields":[{"name":"id","type":{"Struct":{"address":"0x2","module":"object","name":"UID","typeArguments":[]}}},{"name":"first_token","type":{"Struct":{"address":"0x2","module":"balance","name":"Balance","typeArguments":[{"TypeParameter":0}]}}},{"name":"second_token","type":{"Struct":{"address":"0x2","module":"balance","name":"Balance","typeArguments":[{"TypeParameter":1}]}}},{"name":"wisp_lp_supply","type":{"Struct":{"address":"0x2","module":"balance","name":"Supply","typeArguments":[{"Struct":{"address":"0x6c4a21e3e7e6b6d51c4604021633e1d97e24e37a696f8c082cd48f37503e602a","module":"pool","name":"WISPLP","typeArguments":[{"TypeParameter":0},{"TypeParameter":1}]}}]}}},{"name":"k_last","type":"U128"}]},"PoolCreated":{"abilities":{"abilities":["Copy","Drop"]},"typeParameters":[{"constraints":{"abilities":[]},"isPhantom":true},{"constraints":{"abilities":[]},"isPhantom":true}],"fields":[{"name":"pool","type":"Address"},{"name":"first_amount","type":"U64"},{"name":"second_amount","type":"U64"},{"name":"wisp_lp_amount","type":"U64"}]},"PoolName":{"abilities":{"abilities":["Copy","Drop","Store"]},"typeParameters":[],"fields":[{"name":"first_type","type":{"Struct":{"address":"0x1","module":"type_name","name":"TypeName","typeArguments":[]}}},{"name":"second_type","type":{"Struct":{"address":"0x1","module":"type_name","name":"TypeName","typeArguments":[]}}}]},"PoolRegistry":{"abilities":{"abilities":["Key"]},"typeParameters":[],"fields":[{"name":"id","type":{"Struct":{"address":"0x2","module":"object","name":"UID","typeArguments":[]}}},{"name":"fee_to","type":"Address"},{"name":"pools","type":{"Struct":{"address":"0x2","module":"object_bag","name":"ObjectBag","typeArguments":[]}}}]},"TokenSwapped":{"abilities":{"abilities":["Copy","Drop"]},"typeParameters":[{"constraints":{"abilities":[]},"isPhantom":true},{"constraints":{"abilities":[]},"isPhantom":true}],"fields":[{"name":"user","type":"Address"},{"name":"first_amount_in","type":"U64"},{"name":"second_amount_in","type":"U64"},{"name":"first_amount_out","type":"U64"},{"name":"second_amount_out","type":"U64"},{"name":"first_reserve","type":"U64"},{"name":"second_reserve","type":"U64"}]},"WISPLP":{"abilities":{"abilities":["Drop"]},"typeParameters":[{"constraints":{"abilities":[]},"isPhantom":true},{"constraints":{"abilities":[]},"isPhantom":true}],"fields":[{"name":"dummy_field","type":"Bool"}]}},"exposedFunctions":{"add_liquidity":{"visibility":"Public","isEntry":false,"typeParameters":[{"abilities":[]},{"abilities":[]}],"parameters":[{"MutableReference":{"Struct":{"address":"0x6c4a21e3e7e6b6d51c4604021633e1d97e24e37a696f8c082cd48f37503e602a","module":"pool","name":"PoolRegistry","typeArguments":[]}}},{"MutableReference":{"Struct":{"address":"0x2","module":"coin","name":"Coin","typeArguments":[{"TypeParameter":0}]}}},{"MutableReference":{"Struct":{"address":"0x2","module":"coin","name":"Coin","typeArguments":[{"TypeParameter":1}]}}},"U64","U64","U64","U64",{"MutableReference":{"Struct":{"address":"0x2","module":"tx_context","name":"TxContext","typeArguments":[]}}}],"return":[{"Struct":{"address":"0x2","module":"coin","name":"Coin","typeArguments":[{"Struct":{"address":"0x6c4a21e3e7e6b6d51c4604021633e1d97e24e37a696f8c082cd48f37503e602a","module":"pool","name":"WISPLP","typeArguments":[{"TypeParameter":0},{"TypeParameter":1}]}}]}}]},"borrow_mut_pool":{"visibility":"Public","isEntry":false,"typeParameters":[{"abilities":[]},{"abilities":[]}],"parameters":[{"MutableReference":{"Struct":{"address":"0x6c4a21e3e7e6b6d51c4604021633e1d97e24e37a696f8c082cd48f37503e602a","module":"pool","name":"PoolRegistry","typeArguments":[]}}}],"return":[{"MutableReference":{"Struct":{"address":"0x6c4a21e3e7e6b6d51c4604021633e1d97e24e37a696f8c082cd48f37503e602a","module":"pool","name":"Pool","typeArguments":[{"TypeParameter":0},{"TypeParameter":1}]}}}]},"borrow_pool":{"visibility":"Public","isEntry":false,"typeParameters":[{"abilities":[]},{"abilities":[]}],"parameters":[{"Reference":{"Struct":{"address":"0x6c4a21e3e7e6b6d51c4604021633e1d97e24e37a696f8c082cd48f37503e602a","module":"pool","name":"PoolRegistry","typeArguments":[]}}}],"return":[{"Reference":{"Struct":{"address":"0x6c4a21e3e7e6b6d51c4604021633e1d97e24e37a696f8c082cd48f37503e602a","module":"pool","name":"Pool","typeArguments":[{"TypeParameter":0},{"TypeParameter":1}]}}}]},"create_pool":{"visibility":"Public","isEntry":false,"typeParameters":[{"abilities":[]},{"abilities":[]}],"parameters":[{"MutableReference":{"Struct":{"address":"0x6c4a21e3e7e6b6d51c4604021633e1d97e24e37a696f8c082cd48f37503e602a","module":"pool","name":"PoolRegistry","typeArguments":[]}}},{"MutableReference":{"Struct":{"address":"0x2","module":"coin","name":"Coin","typeArguments":[{"TypeParameter":0}]}}},{"MutableReference":{"Struct":{"address":"0x2","module":"coin","name":"Coin","typeArguments":[{"TypeParameter":1}]}}},"U64","U64",{"MutableReference":{"Struct":{"address":"0x2","module":"tx_context","name":"TxContext","typeArguments":[]}}}],"return":[{"Struct":{"address":"0x2","module":"coin","name":"Coin","typeArguments":[{"Struct":{"address":"0x6c4a21e3e7e6b6d51c4604021633e1d97e24e37a696f8c082cd48f37503e602a","module":"pool","name":"WISPLP","typeArguments":[{"TypeParameter":0},{"TypeParameter":1}]}}]}}]},"create_pool_name":{"visibility":"Public","isEntry":false,"typeParameters":[],"parameters":[{"Struct":{"address":"0x1","module":"type_name","name":"TypeName","typeArguments":[]}},{"Struct":{"address":"0x1","module":"type_name","name":"TypeName","typeArguments":[]}}],"return":[{"Struct":{"address":"0x6c4a21e3e7e6b6d51c4604021633e1d97e24e37a696f8c082cd48f37503e602a","module":"pool","name":"PoolName","typeArguments":[]}}]},"get_amounts":{"visibility":"Public","isEntry":false,"typeParameters":[{"abilities":[]},{"abilities":[]}],"parameters":[{"Reference":{"Struct":{"address":"0x6c4a21e3e7e6b6d51c4604021633e1d97e24e37a696f8c082cd48f37503e602a","module":"pool","name":"Pool","typeArguments":[{"TypeParameter":0},{"TypeParameter":1}]}}}],"return":["U64","U64","U64"]},"get_input_amount":{"visibility":"Public","isEntry":false,"typeParameters":[{"abilities":[]},{"abilities":[]}],"parameters":[{"Reference":{"Struct":{"address":"0x6c4a21e3e7e6b6d51c4604021633e1d97e24e37a696f8c082cd48f37503e602a","module":"pool","name":"Pool","typeArguments":[{"TypeParameter":0},{"TypeParameter":1}]}}},"U64","Bool"],"return":["U64"]},"get_output_amount":{"visibility":"Public","isEntry":false,"typeParameters":[{"abilities":[]},{"abilities":[]}],"parameters":[{"Reference":{"Struct":{"address":"0x6c4a21e3e7e6b6d51c4604021633e1d97e24e37a696f8c082cd48f37503e602a","module":"pool","name":"Pool","typeArguments":[{"TypeParameter":0},{"TypeParameter":1}]}}},"U64","Bool"],"return":["U64"]},"get_pool_data":{"visibility":"Public","isEntry":false,"typeParameters":[{"abilities":[]},{"abilities":[]}],"parameters":[{"Reference":{"Struct":{"address":"0x6c4a21e3e7e6b6d51c4604021633e1d97e24e37a696f8c082cd48f37503e602a","module":"pool","name":"Pool","typeArguments":[{"TypeParameter":0},{"TypeParameter":1}]}}}],"return":["U64","U64","U64","U64","U128"]},"is_pool_created":{"visibility":"Public","isEntry":false,"typeParameters":[{"abilities":[]},{"abilities":[]}],"parameters":[{"Reference":{"Struct":{"address":"0x6c4a21e3e7e6b6d51c4604021633e1d97e24e37a696f8c082cd48f37503e602a","module":"pool","name":"PoolRegistry","typeArguments":[]}}}],"return":["Bool"]},"is_pool_created_sorted":{"visibility":"Public","isEntry":false,"typeParameters":[{"abilities":[]},{"abilities":[]}],"parameters":[{"Reference":{"Struct":{"address":"0x6c4a21e3e7e6b6d51c4604021633e1d97e24e37a696f8c082cd48f37503e602a","module":"pool","name":"PoolRegistry","typeArguments":[]}}}],"return":["Bool"]},"process_swap_exact_input":{"visibility":"Public","isEntry":false,"typeParameters":[{"abilities":[]},{"abilities":[]}],"parameters":[{"MutableReference":{"Struct":{"address":"0x6c4a21e3e7e6b6d51c4604021633e1d97e24e37a696f8c082cd48f37503e602a","module":"pool","name":"Pool","typeArguments":[{"TypeParameter":0},{"TypeParameter":1}]}}},{"MutableReference":{"Struct":{"address":"0x2","module":"coin","name":"Coin","typeArguments":[{"TypeParameter":0}]}}},{"MutableReference":{"Struct":{"address":"0x2","module":"coin","name":"Coin","typeArguments":[{"TypeParameter":1}]}}},"U64","Bool",{"MutableReference":{"Struct":{"address":"0x2","module":"tx_context","name":"TxContext","typeArguments":[]}}}],"return":[]},"process_swap_exact_output":{"visibility":"Public","isEntry":false,"typeParameters":[{"abilities":[]},{"abilities":[]}],"parameters":[{"MutableReference":{"Struct":{"address":"0x6c4a21e3e7e6b6d51c4604021633e1d97e24e37a696f8c082cd48f37503e602a","module":"pool","name":"Pool","typeArguments":[{"TypeParameter":0},{"TypeParameter":1}]}}},{"MutableReference":{"Struct":{"address":"0x2","module":"coin","name":"Coin","typeArguments":[{"TypeParameter":0}]}}},{"MutableReference":{"Struct":{"address":"0x2","module":"coin","name":"Coin","typeArguments":[{"TypeParameter":1}]}}},"U64","Bool",{"MutableReference":{"Struct":{"address":"0x2","module":"tx_context","name":"TxContext","typeArguments":[]}}}],"return":[]},"remove_liquidity":{"visibility":"Public","isEntry":false,"typeParameters":[{"abilities":[]},{"abilities":[]}],"parameters":[{"MutableReference":{"Struct":{"address":"0x6c4a21e3e7e6b6d51c4604021633e1d97e24e37a696f8c082cd48f37503e602a","module":"pool","name":"PoolRegistry","typeArguments":[]}}},{"MutableReference":{"Struct":{"address":"0x2","module":"coin","name":"Coin","typeArguments":[{"Struct":{"address":"0x6c4a21e3e7e6b6d51c4604021633e1d97e24e37a696f8c082cd48f37503e602a","module":"pool","name":"WISPLP","typeArguments":[{"TypeParameter":0},{"TypeParameter":1}]}}]}}},"U64","U64","U64",{"MutableReference":{"Struct":{"address":"0x2","module":"tx_context","name":"TxContext","typeArguments":[]}}}],"return":[{"Struct":{"address":"0x2","module":"coin","name":"Coin","typeArguments":[{"TypeParameter":0}]}},{"Struct":{"address":"0x2","module":"coin","name":"Coin","typeArguments":[{"TypeParameter":1}]}}]},"set_fee_to_":{"visibility":"Public","isEntry":true,"typeParameters":[],"parameters":[{"Reference":{"Struct":{"address":"0x6c4a21e3e7e6b6d51c4604021633e1d97e24e37a696f8c082cd48f37503e602a","module":"pool","name":"ControllerCap","typeArguments":[]}}},{"MutableReference":{"Struct":{"address":"0x6c4a21e3e7e6b6d51c4604021633e1d97e24e37a696f8c082cd48f37503e602a","module":"pool","name":"PoolRegistry","typeArguments":[]}}},"Address",{"MutableReference":{"Struct":{"address":"0x2","module":"tx_context","name":"TxContext","typeArguments":[]}}}],"return":[]},"swap_exact_first_to_second":{"visibility":"Public","isEntry":false,"typeParameters":[{"abilities":[]},{"abilities":[]}],"parameters":[{"MutableReference":{"Struct":{"address":"0x6c4a21e3e7e6b6d51c4604021633e1d97e24e37a696f8c082cd48f37503e602a","module":"pool","name":"PoolRegistry","typeArguments":[]}}},{"MutableReference":{"Struct":{"address":"0x2","module":"coin","name":"Coin","typeArguments":[{"TypeParameter":0}]}}},"U64","U64",{"MutableReference":{"Struct":{"address":"0x2","module":"tx_context","name":"TxContext","typeArguments":[]}}}],"return":[{"Struct":{"address":"0x2","module":"coin","name":"Coin","typeArguments":[{"TypeParameter":1}]}}]},"swap_exact_second_to_first":{"visibility":"Public","isEntry":false,"typeParameters":[{"abilities":[]},{"abilities":[]}],"parameters":[{"MutableReference":{"Struct":{"address":"0x6c4a21e3e7e6b6d51c4604021633e1d97e24e37a696f8c082cd48f37503e602a","module":"pool","name":"PoolRegistry","typeArguments":[]}}},{"MutableReference":{"Struct":{"address":"0x2","module":"coin","name":"Coin","typeArguments":[{"TypeParameter":1}]}}},"U64","U64",{"MutableReference":{"Struct":{"address":"0x2","module":"tx_context","name":"TxContext","typeArguments":[]}}}],"return":[{"Struct":{"address":"0x2","module":"coin","name":"Coin","typeArguments":[{"TypeParameter":0}]}}]},"swap_first_to_exact_second":{"visibility":"Public","isEntry":false,"typeParameters":[{"abilities":[]},{"abilities":[]}],"parameters":[{"MutableReference":{"Struct":{"address":"0x6c4a21e3e7e6b6d51c4604021633e1d97e24e37a696f8c082cd48f37503e602a","module":"pool","name":"PoolRegistry","typeArguments":[]}}},{"MutableReference":{"Struct":{"address":"0x2","module":"coin","name":"Coin","typeArguments":[{"TypeParameter":0}]}}},"U64","U64",{"MutableReference":{"Struct":{"address":"0x2","module":"tx_context","name":"TxContext","typeArguments":[]}}}],"return":[{"Struct":{"address":"0x2","module":"coin","name":"Coin","typeArguments":[{"TypeParameter":1}]}}]},"swap_second_to_exact_first":{"visibility":"Public","isEntry":false,"typeParameters":[{"abilities":[]},{"abilities":[]}],"parameters":[{"MutableReference":{"Struct":{"address":"0x6c4a21e3e7e6b6d51c4604021633e1d97e24e37a696f8c082cd48f37503e602a","module":"pool","name":"PoolRegistry","typeArguments":[]}}},{"MutableReference":{"Struct":{"address":"0x2","module":"coin","name":"Coin","typeArguments":[{"TypeParameter":1}]}}},"U64","U64",{"MutableReference":{"Struct":{"address":"0x2","module":"tx_context","name":"TxContext","typeArguments":[]}}}],"return":[{"Struct":{"address":"0x2","module":"coin","name":"Coin","typeArguments":[{"TypeParameter":0}]}}]},"zap_in_first":{"visibility":"Public","isEntry":false,"typeParameters":[{"abilities":[]},{"abilities":[]}],"parameters":[{"MutableReference":{"Struct":{"address":"0x6c4a21e3e7e6b6d51c4604021633e1d97e24e37a696f8c082cd48f37503e602a","module":"pool","name":"PoolRegistry","typeArguments":[]}}},{"MutableReference":{"Struct":{"address":"0x2","module":"coin","name":"Coin","typeArguments":[{"TypeParameter":0}]}}},"U64",{"MutableReference":{"Struct":{"address":"0x2","module":"tx_context","name":"TxContext","typeArguments":[]}}}],"return":[{"Struct":{"address":"0x2","module":"coin","name":"Coin","typeArguments":[{"Struct":{"address":"0x6c4a21e3e7e6b6d51c4604021633e1d97e24e37a696f8c082cd48f37503e602a","module":"pool","name":"WISPLP","typeArguments":[{"TypeParameter":0},{"TypeParameter":1}]}}]}},{"Struct":{"address":"0x2","module":"coin","name":"Coin","typeArguments":[{"TypeParameter":1}]}}]},"zap_in_second":{"visibility":"Public","isEntry":false,"typeParameters":[{"abilities":[]},{"abilities":[]}],"parameters":[{"MutableReference":{"Struct":{"address":"0x6c4a21e3e7e6b6d51c4604021633e1d97e24e37a696f8c082cd48f37503e602a","module":"pool","name":"PoolRegistry","typeArguments":[]}}},{"MutableReference":{"Struct":{"address":"0x2","module":"coin","name":"Coin","typeArguments":[{"TypeParameter":1}]}}},"U64",{"MutableReference":{"Struct":{"address":"0x2","module":"tx_context","name":"TxContext","typeArguments":[]}}}],"return":[{"Struct":{"address":"0x2","module":"coin","name":"Coin","typeArguments":[{"Struct":{"address":"0x6c4a21e3e7e6b6d51c4604021633e1d97e24e37a696f8c082cd48f37503e602a","module":"pool","name":"WISPLP","typeArguments":[{"TypeParameter":0},{"TypeParameter":1}]}}]}},{"Struct":{"address":"0x2","module":"coin","name":"Coin","typeArguments":[{"TypeParameter":0}]}}]}}},"pool_utils":{"fileFormatVersion":6,"address":"0x6c4a21e3e7e6b6d51c4604021633e1d97e24e37a696f8c082cd48f37503e602a","name":"pool_utils","friends":[],"structs":{},"exposedFunctions":{"execute_return_token":{"visibility":"Public","isEntry":false,"typeParameters":[{"abilities":[]}],"parameters":[{"Struct":{"address":"0x2","module":"coin","name":"Coin","typeArguments":[{"TypeParameter":0}]}},{"MutableReference":{"Struct":{"address":"0x2","module":"tx_context","name":"TxContext","typeArguments":[]}}}],"return":[]},"get_input_price":{"visibility":"Public","isEntry":false,"typeParameters":[],"parameters":["U64","U64","U64","U64"],"return":["U64"]},"get_optimal_zap_in_amount":{"visibility":"Public","isEntry":false,"typeParameters":[],"parameters":["U64","U64"],"return":["U64"]},"get_output_price":{"visibility":"Public","isEntry":false,"typeParameters":[],"parameters":["U64","U64","U64","U64"],"return":["U64"]},"get_triple_type":{"visibility":"Public","isEntry":false,"typeParameters":[{"abilities":[]},{"abilities":[]},{"abilities":[]}],"parameters":[],"return":[{"Struct":{"address":"0x1","module":"type_name","name":"TypeName","typeArguments":[]}},{"Struct":{"address":"0x1","module":"type_name","name":"TypeName","typeArguments":[]}},{"Struct":{"address":"0x1","module":"type_name","name":"TypeName","typeArguments":[]}}]},"get_type":{"visibility":"Public","isEntry":false,"typeParameters":[{"abilities":[]},{"abilities":[]}],"parameters":[],"return":[{"Struct":{"address":"0x1","module":"type_name","name":"TypeName","typeArguments":[]}},{"Struct":{"address":"0x1","module":"type_name","name":"TypeName","typeArguments":[]}}]},"quote":{"visibility":"Public","isEntry":false,"typeParameters":[],"parameters":["U64","U64","U64"],"return":["U64"]},"sort_token_type":{"visibility":"Public","isEntry":false,"typeParameters":[],"parameters":[{"Reference":{"Struct":{"address":"0x1","module":"type_name","name":"TypeName","typeArguments":[]}}},{"Reference":{"Struct":{"address":"0x1","module":"type_name","name":"TypeName","typeArguments":[]}}}],"return":[{"Struct":{"address":"0x6c4a21e3e7e6b6d51c4604021633e1d97e24e37a696f8c082cd48f37503e602a","module":"comparator","name":"Result","typeArguments":[]}}]}}},"router":{"fileFormatVersion":6,"address":"0x6c4a21e3e7e6b6d51c4604021633e1d97e24e37a696f8c082cd48f37503e602a","name":"router","friends":[],"structs":{},"exposedFunctions":{"add_liquidity_":{"visibility":"Public","isEntry":true,"typeParameters":[{"abilities":[]},{"abilities":[]}],"parameters":[{"MutableReference":{"Struct":{"address":"0x6c4a21e3e7e6b6d51c4604021633e1d97e24e37a696f8c082cd48f37503e602a","module":"pool","name":"PoolRegistry","typeArguments":[]}}},{"Vector":{"Struct":{"address":"0x2","module":"coin","name":"Coin","typeArguments":[{"TypeParameter":0}]}}},{"Vector":{"Struct":{"address":"0x2","module":"coin","name":"Coin","typeArguments":[{"TypeParameter":1}]}}},"U64","U64","U64","U64",{"MutableReference":{"Struct":{"address":"0x2","module":"tx_context","name":"TxContext","typeArguments":[]}}}],"return":[]},"create_pool_":{"visibility":"Public","isEntry":true,"typeParameters":[{"abilities":[]},{"abilities":[]}],"parameters":[{"MutableReference":{"Struct":{"address":"0x6c4a21e3e7e6b6d51c4604021633e1d97e24e37a696f8c082cd48f37503e602a","module":"pool","name":"PoolRegistry","typeArguments":[]}}},{"Vector":{"Struct":{"address":"0x2","module":"coin","name":"Coin","typeArguments":[{"TypeParameter":0}]}}},{"Vector":{"Struct":{"address":"0x2","module":"coin","name":"Coin","typeArguments":[{"TypeParameter":1}]}}},"U64","U64",{"MutableReference":{"Struct":{"address":"0x2","module":"tx_context","name":"TxContext","typeArguments":[]}}}],"return":[]},"remove_liquidity_":{"visibility":"Public","isEntry":true,"typeParameters":[{"abilities":[]},{"abilities":[]}],"parameters":[{"MutableReference":{"Struct":{"address":"0x6c4a21e3e7e6b6d51c4604021633e1d97e24e37a696f8c082cd48f37503e602a","module":"pool","name":"PoolRegistry","typeArguments":[]}}},{"Vector":{"Struct":{"address":"0x2","module":"coin","name":"Coin","typeArguments":[{"Struct":{"address":"0x6c4a21e3e7e6b6d51c4604021633e1d97e24e37a696f8c082cd48f37503e602a","module":"pool","name":"WISPLP","typeArguments":[{"TypeParameter":0},{"TypeParameter":1}]}}]}}},"U64","U64","U64",{"MutableReference":{"Struct":{"address":"0x2","module":"tx_context","name":"TxContext","typeArguments":[]}}}],"return":[]},"swap_exact_input_":{"visibility":"Public","isEntry":true,"typeParameters":[{"abilities":[]},{"abilities":[]}],"parameters":[{"MutableReference":{"Struct":{"address":"0x6c4a21e3e7e6b6d51c4604021633e1d97e24e37a696f8c082cd48f37503e602a","module":"pool","name":"PoolRegistry","typeArguments":[]}}},{"Vector":{"Struct":{"address":"0x2","module":"coin","name":"Coin","typeArguments":[{"TypeParameter":0}]}}},"U64","U64",{"MutableReference":{"Struct":{"address":"0x2","module":"tx_context","name":"TxContext","typeArguments":[]}}}],"return":[]},"swap_exact_input_doublehop_":{"visibility":"Public","isEntry":true,"typeParameters":[{"abilities":[]},{"abilities":[]},{"abilities":[]}],"parameters":[{"MutableReference":{"Struct":{"address":"0x6c4a21e3e7e6b6d51c4604021633e1d97e24e37a696f8c082cd48f37503e602a","module":"pool","name":"PoolRegistry","typeArguments":[]}}},{"Vector":{"Struct":{"address":"0x2","module":"coin","name":"Coin","typeArguments":[{"TypeParameter":0}]}}},"U64","U64",{"MutableReference":{"Struct":{"address":"0x2","module":"tx_context","name":"TxContext","typeArguments":[]}}}],"return":[]},"swap_exact_output_":{"visibility":"Public","isEntry":true,"typeParameters":[{"abilities":[]},{"abilities":[]}],"parameters":[{"MutableReference":{"Struct":{"address":"0x6c4a21e3e7e6b6d51c4604021633e1d97e24e37a696f8c082cd48f37503e602a","module":"pool","name":"PoolRegistry","typeArguments":[]}}},{"Vector":{"Struct":{"address":"0x2","module":"coin","name":"Coin","typeArguments":[{"TypeParameter":0}]}}},"U64","U64",{"MutableReference":{"Struct":{"address":"0x2","module":"tx_context","name":"TxContext","typeArguments":[]}}}],"return":[]},"swap_exact_output_doublehop_":{"visibility":"Public","isEntry":true,"typeParameters":[{"abilities":[]},{"abilities":[]},{"abilities":[]}],"parameters":[{"MutableReference":{"Struct":{"address":"0x6c4a21e3e7e6b6d51c4604021633e1d97e24e37a696f8c082cd48f37503e602a","module":"pool","name":"PoolRegistry","typeArguments":[]}}},{"Vector":{"Struct":{"address":"0x2","module":"coin","name":"Coin","typeArguments":[{"TypeParameter":0}]}}},"U64","U64",{"MutableReference":{"Struct":{"address":"0x2","module":"tx_context","name":"TxContext","typeArguments":[]}}}],"return":[]},"zap_in_":{"visibility":"Public","isEntry":true,"typeParameters":[{"abilities":[]},{"abilities":[]}],"parameters":[{"MutableReference":{"Struct":{"address":"0x6c4a21e3e7e6b6d51c4604021633e1d97e24e37a696f8c082cd48f37503e602a","module":"pool","name":"PoolRegistry","typeArguments":[]}}},{"Vector":{"Struct":{"address":"0x2","module":"coin","name":"Coin","typeArguments":[{"TypeParameter":0}]}}},"U64",{"MutableReference":{"Struct":{"address":"0x2","module":"tx_context","name":"TxContext","typeArguments":[]}}}],"return":[]}}}}',
2455
+ );
2456
+
2457
+ export function loadAllTypes(coder: MoveCoder) {
2458
+ _0x2.loadAllTypes(coder);
2459
+ _0x1.loadAllTypes(coder);
2460
+ for (const m of Object.values(MODULES)) {
2461
+ coder.load(
2462
+ m as any,
2463
+ "0x6c4a21e3e7e6b6d51c4604021633e1d97e24e37a696f8c082cd48f37503e602a",
2464
+ );
2465
+ }
2466
+ }
2467
+
2468
+ loadAllTypes(defaultMoveCoder());