@typemove/sui 1.2.0-rc.2 → 1.2.0-rc.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/Readme.md +33 -24
- package/dist/cjs/builtin/0x1.d.ts +83 -82
- package/dist/cjs/builtin/0x1.d.ts.map +1 -1
- package/dist/cjs/builtin/0x1.js +164 -164
- package/dist/cjs/builtin/0x1.js.map +1 -1
- package/dist/cjs/builtin/0x2.d.ts +353 -349
- package/dist/cjs/builtin/0x2.d.ts.map +1 -1
- package/dist/cjs/builtin/0x2.js +698 -698
- package/dist/cjs/builtin/0x2.js.map +1 -1
- package/dist/cjs/builtin/0x3.d.ts +101 -100
- package/dist/cjs/builtin/0x3.d.ts.map +1 -1
- package/dist/cjs/builtin/0x3.js +200 -200
- package/dist/cjs/builtin/0x3.js.map +1 -1
- package/dist/cjs/codegen/codegen.d.ts.map +1 -1
- package/dist/cjs/codegen/codegen.js +11 -8
- package/dist/cjs/codegen/codegen.js.map +1 -1
- package/dist/cjs/index.d.ts +1 -1
- package/dist/cjs/index.d.ts.map +1 -1
- package/dist/cjs/index.js +2 -1
- package/dist/cjs/index.js.map +1 -1
- package/dist/cjs/models.d.ts +7 -1
- package/dist/cjs/models.d.ts.map +1 -1
- package/dist/cjs/models.js +0 -3
- package/dist/cjs/models.js.map +1 -1
- package/dist/cjs/move-coder.d.ts +6 -3
- package/dist/cjs/move-coder.d.ts.map +1 -1
- package/dist/cjs/move-coder.js +50 -5
- package/dist/cjs/move-coder.js.map +1 -1
- package/dist/cjs/sui-chain-adapter.d.ts +4 -1
- package/dist/cjs/sui-chain-adapter.d.ts.map +1 -1
- package/dist/cjs/sui-chain-adapter.js +10 -4
- package/dist/cjs/sui-chain-adapter.js.map +1 -1
- package/dist/esm/builtin/0x1.d.ts +83 -82
- package/dist/esm/builtin/0x1.d.ts.map +1 -1
- package/dist/esm/builtin/0x1.js +165 -165
- package/dist/esm/builtin/0x1.js.map +1 -1
- package/dist/esm/builtin/0x2.d.ts +353 -349
- package/dist/esm/builtin/0x2.d.ts.map +1 -1
- package/dist/esm/builtin/0x2.js +699 -699
- package/dist/esm/builtin/0x2.js.map +1 -1
- package/dist/esm/builtin/0x3.d.ts +101 -100
- package/dist/esm/builtin/0x3.d.ts.map +1 -1
- package/dist/esm/builtin/0x3.js +201 -201
- package/dist/esm/builtin/0x3.js.map +1 -1
- package/dist/esm/codegen/codegen.d.ts.map +1 -1
- package/dist/esm/codegen/codegen.js +12 -9
- package/dist/esm/codegen/codegen.js.map +1 -1
- package/dist/esm/index.d.ts +1 -1
- package/dist/esm/index.d.ts.map +1 -1
- package/dist/esm/index.js +1 -1
- package/dist/esm/index.js.map +1 -1
- package/dist/esm/models.d.ts +7 -1
- package/dist/esm/models.d.ts.map +1 -1
- package/dist/esm/models.js +0 -3
- package/dist/esm/models.js.map +1 -1
- package/dist/esm/move-coder.d.ts +6 -3
- package/dist/esm/move-coder.d.ts.map +1 -1
- package/dist/esm/move-coder.js +48 -4
- package/dist/esm/move-coder.js.map +1 -1
- package/dist/esm/sui-chain-adapter.d.ts +4 -1
- package/dist/esm/sui-chain-adapter.d.ts.map +1 -1
- package/dist/esm/sui-chain-adapter.js +10 -4
- package/dist/esm/sui-chain-adapter.js.map +1 -1
- package/package.json +2 -2
- package/src/builtin/0x1.ts +503 -247
- package/src/builtin/0x2.ts +2137 -1049
- package/src/builtin/0x3.ts +611 -301
- package/src/codegen/codegen.ts +14 -10
- package/src/index.ts +1 -1
- package/src/models.ts +7 -4
- package/src/move-coder.ts +57 -6
- package/src/sui-chain-adapter.ts +11 -4
- package/src/tests/types/testnet/0x1e2b124f746a339b3cf99b9f969393a96594519aafb1d06517aacfeeae20e7a5.ts +29 -13
- package/src/tests/types/testnet/0x6c4a21e3e7e6b6d51c4604021633e1d97e24e37a696f8c082cd48f37503e602a.ts +319 -145
- package/src/tests/types/testnet/0xdee9.ts +303 -142
- package/src/tests/types/testnet/0xebaa2ad3eacc230f309cd933958cc52684df0a41ae7ac214d186b80f830867d2.ts +990 -466
|
@@ -9,7 +9,11 @@ import { MoveCoder, TypedEventInstance } from "@typemove/sui";
|
|
|
9
9
|
|
|
10
10
|
import { defaultMoveCoder } from "@typemove/sui";
|
|
11
11
|
|
|
12
|
-
import {
|
|
12
|
+
import {
|
|
13
|
+
ZERO_ADDRESS,
|
|
14
|
+
TypedDevInspectResults,
|
|
15
|
+
getMoveCoder,
|
|
16
|
+
} from "@typemove/sui";
|
|
13
17
|
import { TransactionBlock } from "@mysten/sui.js/transactions";
|
|
14
18
|
import { ObjectCallArg, TransactionArgument } from "@mysten/sui.js";
|
|
15
19
|
import { SuiClient } from "@mysten/sui.js/client";
|
|
@@ -151,14 +155,17 @@ export namespace comparator {
|
|
|
151
155
|
string | ObjectCallArg | TransactionArgument,
|
|
152
156
|
],
|
|
153
157
|
typeArguments: [TypeDescriptor<T0> | string],
|
|
154
|
-
) {
|
|
158
|
+
): Promise<TypedDevInspectResults<[comparator.Result]>> {
|
|
155
159
|
const tx = new TransactionBlock();
|
|
156
160
|
builder.compare(tx, args, typeArguments);
|
|
157
|
-
const
|
|
161
|
+
const insepctRes = await client.devInspectTransactionBlock({
|
|
158
162
|
transactionBlock: tx,
|
|
159
163
|
sender: ZERO_ADDRESS,
|
|
160
164
|
});
|
|
161
|
-
|
|
165
|
+
|
|
166
|
+
return (await getMoveCoder(client)).decodeDevInspectResult<
|
|
167
|
+
[comparator.Result]
|
|
168
|
+
>(insepctRes);
|
|
162
169
|
}
|
|
163
170
|
export async function compareU8Vector(
|
|
164
171
|
client: SuiClient,
|
|
@@ -166,50 +173,62 @@ export namespace comparator {
|
|
|
166
173
|
(string | ObjectCallArg)[] | TransactionArgument,
|
|
167
174
|
(string | ObjectCallArg)[] | TransactionArgument,
|
|
168
175
|
],
|
|
169
|
-
) {
|
|
176
|
+
): Promise<TypedDevInspectResults<[comparator.Result]>> {
|
|
170
177
|
const tx = new TransactionBlock();
|
|
171
178
|
builder.compareU8Vector(tx, args);
|
|
172
|
-
const
|
|
179
|
+
const insepctRes = await client.devInspectTransactionBlock({
|
|
173
180
|
transactionBlock: tx,
|
|
174
181
|
sender: ZERO_ADDRESS,
|
|
175
182
|
});
|
|
176
|
-
|
|
183
|
+
|
|
184
|
+
return (await getMoveCoder(client)).decodeDevInspectResult<
|
|
185
|
+
[comparator.Result]
|
|
186
|
+
>(insepctRes);
|
|
177
187
|
}
|
|
178
188
|
export async function isEqual(
|
|
179
189
|
client: SuiClient,
|
|
180
190
|
args: [string | ObjectCallArg | TransactionArgument],
|
|
181
|
-
) {
|
|
191
|
+
): Promise<TypedDevInspectResults<[Boolean]>> {
|
|
182
192
|
const tx = new TransactionBlock();
|
|
183
193
|
builder.isEqual(tx, args);
|
|
184
|
-
const
|
|
194
|
+
const insepctRes = await client.devInspectTransactionBlock({
|
|
185
195
|
transactionBlock: tx,
|
|
186
196
|
sender: ZERO_ADDRESS,
|
|
187
197
|
});
|
|
188
|
-
|
|
198
|
+
|
|
199
|
+
return (await getMoveCoder(client)).decodeDevInspectResult<[Boolean]>(
|
|
200
|
+
insepctRes,
|
|
201
|
+
);
|
|
189
202
|
}
|
|
190
203
|
export async function isGreaterThan(
|
|
191
204
|
client: SuiClient,
|
|
192
205
|
args: [string | ObjectCallArg | TransactionArgument],
|
|
193
|
-
) {
|
|
206
|
+
): Promise<TypedDevInspectResults<[Boolean]>> {
|
|
194
207
|
const tx = new TransactionBlock();
|
|
195
208
|
builder.isGreaterThan(tx, args);
|
|
196
|
-
const
|
|
209
|
+
const insepctRes = await client.devInspectTransactionBlock({
|
|
197
210
|
transactionBlock: tx,
|
|
198
211
|
sender: ZERO_ADDRESS,
|
|
199
212
|
});
|
|
200
|
-
|
|
213
|
+
|
|
214
|
+
return (await getMoveCoder(client)).decodeDevInspectResult<[Boolean]>(
|
|
215
|
+
insepctRes,
|
|
216
|
+
);
|
|
201
217
|
}
|
|
202
218
|
export async function isSmallerThan(
|
|
203
219
|
client: SuiClient,
|
|
204
220
|
args: [string | ObjectCallArg | TransactionArgument],
|
|
205
|
-
) {
|
|
221
|
+
): Promise<TypedDevInspectResults<[Boolean]>> {
|
|
206
222
|
const tx = new TransactionBlock();
|
|
207
223
|
builder.isSmallerThan(tx, args);
|
|
208
|
-
const
|
|
224
|
+
const insepctRes = await client.devInspectTransactionBlock({
|
|
209
225
|
transactionBlock: tx,
|
|
210
226
|
sender: ZERO_ADDRESS,
|
|
211
227
|
});
|
|
212
|
-
|
|
228
|
+
|
|
229
|
+
return (await getMoveCoder(client)).decodeDevInspectResult<[Boolean]>(
|
|
230
|
+
insepctRes,
|
|
231
|
+
);
|
|
213
232
|
}
|
|
214
233
|
}
|
|
215
234
|
}
|
|
@@ -309,74 +328,92 @@ export namespace math_utils {
|
|
|
309
328
|
export async function max(
|
|
310
329
|
client: SuiClient,
|
|
311
330
|
args: [bigint | TransactionArgument, bigint | TransactionArgument],
|
|
312
|
-
) {
|
|
331
|
+
): Promise<TypedDevInspectResults<[bigint]>> {
|
|
313
332
|
const tx = new TransactionBlock();
|
|
314
333
|
builder.max(tx, args);
|
|
315
|
-
const
|
|
334
|
+
const insepctRes = await client.devInspectTransactionBlock({
|
|
316
335
|
transactionBlock: tx,
|
|
317
336
|
sender: ZERO_ADDRESS,
|
|
318
337
|
});
|
|
319
|
-
|
|
338
|
+
|
|
339
|
+
return (await getMoveCoder(client)).decodeDevInspectResult<[bigint]>(
|
|
340
|
+
insepctRes,
|
|
341
|
+
);
|
|
320
342
|
}
|
|
321
343
|
export async function maxU64(
|
|
322
344
|
client: SuiClient,
|
|
323
345
|
args: [bigint | TransactionArgument, bigint | TransactionArgument],
|
|
324
|
-
) {
|
|
346
|
+
): Promise<TypedDevInspectResults<[bigint]>> {
|
|
325
347
|
const tx = new TransactionBlock();
|
|
326
348
|
builder.maxU64(tx, args);
|
|
327
|
-
const
|
|
349
|
+
const insepctRes = await client.devInspectTransactionBlock({
|
|
328
350
|
transactionBlock: tx,
|
|
329
351
|
sender: ZERO_ADDRESS,
|
|
330
352
|
});
|
|
331
|
-
|
|
353
|
+
|
|
354
|
+
return (await getMoveCoder(client)).decodeDevInspectResult<[bigint]>(
|
|
355
|
+
insepctRes,
|
|
356
|
+
);
|
|
332
357
|
}
|
|
333
358
|
export async function min(
|
|
334
359
|
client: SuiClient,
|
|
335
360
|
args: [bigint | TransactionArgument, bigint | TransactionArgument],
|
|
336
|
-
) {
|
|
361
|
+
): Promise<TypedDevInspectResults<[bigint]>> {
|
|
337
362
|
const tx = new TransactionBlock();
|
|
338
363
|
builder.min(tx, args);
|
|
339
|
-
const
|
|
364
|
+
const insepctRes = await client.devInspectTransactionBlock({
|
|
340
365
|
transactionBlock: tx,
|
|
341
366
|
sender: ZERO_ADDRESS,
|
|
342
367
|
});
|
|
343
|
-
|
|
368
|
+
|
|
369
|
+
return (await getMoveCoder(client)).decodeDevInspectResult<[bigint]>(
|
|
370
|
+
insepctRes,
|
|
371
|
+
);
|
|
344
372
|
}
|
|
345
373
|
export async function pow(
|
|
346
374
|
client: SuiClient,
|
|
347
375
|
args: [bigint | TransactionArgument, number | TransactionArgument],
|
|
348
|
-
) {
|
|
376
|
+
): Promise<TypedDevInspectResults<[bigint]>> {
|
|
349
377
|
const tx = new TransactionBlock();
|
|
350
378
|
builder.pow(tx, args);
|
|
351
|
-
const
|
|
379
|
+
const insepctRes = await client.devInspectTransactionBlock({
|
|
352
380
|
transactionBlock: tx,
|
|
353
381
|
sender: ZERO_ADDRESS,
|
|
354
382
|
});
|
|
355
|
-
|
|
383
|
+
|
|
384
|
+
return (await getMoveCoder(client)).decodeDevInspectResult<[bigint]>(
|
|
385
|
+
insepctRes,
|
|
386
|
+
);
|
|
356
387
|
}
|
|
357
388
|
export async function sqrt(
|
|
358
389
|
client: SuiClient,
|
|
359
390
|
args: [bigint | TransactionArgument],
|
|
360
|
-
) {
|
|
391
|
+
): Promise<TypedDevInspectResults<[bigint]>> {
|
|
361
392
|
const tx = new TransactionBlock();
|
|
362
393
|
builder.sqrt(tx, args);
|
|
363
|
-
const
|
|
394
|
+
const insepctRes = await client.devInspectTransactionBlock({
|
|
364
395
|
transactionBlock: tx,
|
|
365
396
|
sender: ZERO_ADDRESS,
|
|
366
397
|
});
|
|
367
|
-
|
|
398
|
+
|
|
399
|
+
return (await getMoveCoder(client)).decodeDevInspectResult<[bigint]>(
|
|
400
|
+
insepctRes,
|
|
401
|
+
);
|
|
368
402
|
}
|
|
369
403
|
export async function sqrtU256(
|
|
370
404
|
client: SuiClient,
|
|
371
405
|
args: [bigint | TransactionArgument],
|
|
372
|
-
) {
|
|
406
|
+
): Promise<TypedDevInspectResults<[bigint]>> {
|
|
373
407
|
const tx = new TransactionBlock();
|
|
374
408
|
builder.sqrtU256(tx, args);
|
|
375
|
-
const
|
|
409
|
+
const insepctRes = await client.devInspectTransactionBlock({
|
|
376
410
|
transactionBlock: tx,
|
|
377
411
|
sender: ZERO_ADDRESS,
|
|
378
412
|
});
|
|
379
|
-
|
|
413
|
+
|
|
414
|
+
return (await getMoveCoder(client)).decodeDevInspectResult<[bigint]>(
|
|
415
|
+
insepctRes,
|
|
416
|
+
);
|
|
380
417
|
}
|
|
381
418
|
}
|
|
382
419
|
}
|
|
@@ -1432,40 +1469,49 @@ export namespace pool {
|
|
|
1432
1469
|
string | ObjectCallArg | TransactionArgument,
|
|
1433
1470
|
],
|
|
1434
1471
|
typeArguments: [TypeDescriptor<T0> | string, TypeDescriptor<T1> | string],
|
|
1435
|
-
) {
|
|
1472
|
+
): Promise<TypedDevInspectResults<[_0x2.coin.Coin<pool.WISPLP<T0, T1>>]>> {
|
|
1436
1473
|
const tx = new TransactionBlock();
|
|
1437
1474
|
builder.addLiquidity(tx, args, typeArguments);
|
|
1438
|
-
const
|
|
1475
|
+
const insepctRes = await client.devInspectTransactionBlock({
|
|
1439
1476
|
transactionBlock: tx,
|
|
1440
1477
|
sender: ZERO_ADDRESS,
|
|
1441
1478
|
});
|
|
1442
|
-
|
|
1479
|
+
|
|
1480
|
+
return (await getMoveCoder(client)).decodeDevInspectResult<
|
|
1481
|
+
[_0x2.coin.Coin<pool.WISPLP<T0, T1>>]
|
|
1482
|
+
>(insepctRes);
|
|
1443
1483
|
}
|
|
1444
1484
|
export async function borrowMutPool<T0 = any, T1 = any>(
|
|
1445
1485
|
client: SuiClient,
|
|
1446
1486
|
args: [string | ObjectCallArg | TransactionArgument],
|
|
1447
1487
|
typeArguments: [TypeDescriptor<T0> | string, TypeDescriptor<T1> | string],
|
|
1448
|
-
) {
|
|
1488
|
+
): Promise<TypedDevInspectResults<[string]>> {
|
|
1449
1489
|
const tx = new TransactionBlock();
|
|
1450
1490
|
builder.borrowMutPool(tx, args, typeArguments);
|
|
1451
|
-
const
|
|
1491
|
+
const insepctRes = await client.devInspectTransactionBlock({
|
|
1452
1492
|
transactionBlock: tx,
|
|
1453
1493
|
sender: ZERO_ADDRESS,
|
|
1454
1494
|
});
|
|
1455
|
-
|
|
1495
|
+
|
|
1496
|
+
return (await getMoveCoder(client)).decodeDevInspectResult<[string]>(
|
|
1497
|
+
insepctRes,
|
|
1498
|
+
);
|
|
1456
1499
|
}
|
|
1457
1500
|
export async function borrowPool<T0 = any, T1 = any>(
|
|
1458
1501
|
client: SuiClient,
|
|
1459
1502
|
args: [string | ObjectCallArg | TransactionArgument],
|
|
1460
1503
|
typeArguments: [TypeDescriptor<T0> | string, TypeDescriptor<T1> | string],
|
|
1461
|
-
) {
|
|
1504
|
+
): Promise<TypedDevInspectResults<[string]>> {
|
|
1462
1505
|
const tx = new TransactionBlock();
|
|
1463
1506
|
builder.borrowPool(tx, args, typeArguments);
|
|
1464
|
-
const
|
|
1507
|
+
const insepctRes = await client.devInspectTransactionBlock({
|
|
1465
1508
|
transactionBlock: tx,
|
|
1466
1509
|
sender: ZERO_ADDRESS,
|
|
1467
1510
|
});
|
|
1468
|
-
|
|
1511
|
+
|
|
1512
|
+
return (await getMoveCoder(client)).decodeDevInspectResult<[string]>(
|
|
1513
|
+
insepctRes,
|
|
1514
|
+
);
|
|
1469
1515
|
}
|
|
1470
1516
|
export async function createPool<T0 = any, T1 = any>(
|
|
1471
1517
|
client: SuiClient,
|
|
@@ -1478,14 +1524,17 @@ export namespace pool {
|
|
|
1478
1524
|
string | ObjectCallArg | TransactionArgument,
|
|
1479
1525
|
],
|
|
1480
1526
|
typeArguments: [TypeDescriptor<T0> | string, TypeDescriptor<T1> | string],
|
|
1481
|
-
) {
|
|
1527
|
+
): Promise<TypedDevInspectResults<[_0x2.coin.Coin<pool.WISPLP<T0, T1>>]>> {
|
|
1482
1528
|
const tx = new TransactionBlock();
|
|
1483
1529
|
builder.createPool(tx, args, typeArguments);
|
|
1484
|
-
const
|
|
1530
|
+
const insepctRes = await client.devInspectTransactionBlock({
|
|
1485
1531
|
transactionBlock: tx,
|
|
1486
1532
|
sender: ZERO_ADDRESS,
|
|
1487
1533
|
});
|
|
1488
|
-
|
|
1534
|
+
|
|
1535
|
+
return (await getMoveCoder(client)).decodeDevInspectResult<
|
|
1536
|
+
[_0x2.coin.Coin<pool.WISPLP<T0, T1>>]
|
|
1537
|
+
>(insepctRes);
|
|
1489
1538
|
}
|
|
1490
1539
|
export async function createPoolName(
|
|
1491
1540
|
client: SuiClient,
|
|
@@ -1493,27 +1542,33 @@ export namespace pool {
|
|
|
1493
1542
|
_0x1.type_name.TypeName | TransactionArgument,
|
|
1494
1543
|
_0x1.type_name.TypeName | TransactionArgument,
|
|
1495
1544
|
],
|
|
1496
|
-
) {
|
|
1545
|
+
): Promise<TypedDevInspectResults<[pool.PoolName]>> {
|
|
1497
1546
|
const tx = new TransactionBlock();
|
|
1498
1547
|
builder.createPoolName(tx, args);
|
|
1499
|
-
const
|
|
1548
|
+
const insepctRes = await client.devInspectTransactionBlock({
|
|
1500
1549
|
transactionBlock: tx,
|
|
1501
1550
|
sender: ZERO_ADDRESS,
|
|
1502
1551
|
});
|
|
1503
|
-
|
|
1552
|
+
|
|
1553
|
+
return (await getMoveCoder(client)).decodeDevInspectResult<
|
|
1554
|
+
[pool.PoolName]
|
|
1555
|
+
>(insepctRes);
|
|
1504
1556
|
}
|
|
1505
1557
|
export async function getAmounts<T0 = any, T1 = any>(
|
|
1506
1558
|
client: SuiClient,
|
|
1507
1559
|
args: [string | ObjectCallArg | TransactionArgument],
|
|
1508
1560
|
typeArguments: [TypeDescriptor<T0> | string, TypeDescriptor<T1> | string],
|
|
1509
|
-
) {
|
|
1561
|
+
): Promise<TypedDevInspectResults<[bigint, bigint, bigint]>> {
|
|
1510
1562
|
const tx = new TransactionBlock();
|
|
1511
1563
|
builder.getAmounts(tx, args, typeArguments);
|
|
1512
|
-
const
|
|
1564
|
+
const insepctRes = await client.devInspectTransactionBlock({
|
|
1513
1565
|
transactionBlock: tx,
|
|
1514
1566
|
sender: ZERO_ADDRESS,
|
|
1515
1567
|
});
|
|
1516
|
-
|
|
1568
|
+
|
|
1569
|
+
return (await getMoveCoder(client)).decodeDevInspectResult<
|
|
1570
|
+
[bigint, bigint, bigint]
|
|
1571
|
+
>(insepctRes);
|
|
1517
1572
|
}
|
|
1518
1573
|
export async function getInputAmount<T0 = any, T1 = any>(
|
|
1519
1574
|
client: SuiClient,
|
|
@@ -1523,14 +1578,17 @@ export namespace pool {
|
|
|
1523
1578
|
Boolean | TransactionArgument,
|
|
1524
1579
|
],
|
|
1525
1580
|
typeArguments: [TypeDescriptor<T0> | string, TypeDescriptor<T1> | string],
|
|
1526
|
-
) {
|
|
1581
|
+
): Promise<TypedDevInspectResults<[bigint]>> {
|
|
1527
1582
|
const tx = new TransactionBlock();
|
|
1528
1583
|
builder.getInputAmount(tx, args, typeArguments);
|
|
1529
|
-
const
|
|
1584
|
+
const insepctRes = await client.devInspectTransactionBlock({
|
|
1530
1585
|
transactionBlock: tx,
|
|
1531
1586
|
sender: ZERO_ADDRESS,
|
|
1532
1587
|
});
|
|
1533
|
-
|
|
1588
|
+
|
|
1589
|
+
return (await getMoveCoder(client)).decodeDevInspectResult<[bigint]>(
|
|
1590
|
+
insepctRes,
|
|
1591
|
+
);
|
|
1534
1592
|
}
|
|
1535
1593
|
export async function getOutputAmount<T0 = any, T1 = any>(
|
|
1536
1594
|
client: SuiClient,
|
|
@@ -1540,53 +1598,67 @@ export namespace pool {
|
|
|
1540
1598
|
Boolean | TransactionArgument,
|
|
1541
1599
|
],
|
|
1542
1600
|
typeArguments: [TypeDescriptor<T0> | string, TypeDescriptor<T1> | string],
|
|
1543
|
-
) {
|
|
1601
|
+
): Promise<TypedDevInspectResults<[bigint]>> {
|
|
1544
1602
|
const tx = new TransactionBlock();
|
|
1545
1603
|
builder.getOutputAmount(tx, args, typeArguments);
|
|
1546
|
-
const
|
|
1604
|
+
const insepctRes = await client.devInspectTransactionBlock({
|
|
1547
1605
|
transactionBlock: tx,
|
|
1548
1606
|
sender: ZERO_ADDRESS,
|
|
1549
1607
|
});
|
|
1550
|
-
|
|
1608
|
+
|
|
1609
|
+
return (await getMoveCoder(client)).decodeDevInspectResult<[bigint]>(
|
|
1610
|
+
insepctRes,
|
|
1611
|
+
);
|
|
1551
1612
|
}
|
|
1552
1613
|
export async function getPoolData<T0 = any, T1 = any>(
|
|
1553
1614
|
client: SuiClient,
|
|
1554
1615
|
args: [string | ObjectCallArg | TransactionArgument],
|
|
1555
1616
|
typeArguments: [TypeDescriptor<T0> | string, TypeDescriptor<T1> | string],
|
|
1556
|
-
)
|
|
1617
|
+
): Promise<
|
|
1618
|
+
TypedDevInspectResults<[bigint, bigint, bigint, bigint, bigint]>
|
|
1619
|
+
> {
|
|
1557
1620
|
const tx = new TransactionBlock();
|
|
1558
1621
|
builder.getPoolData(tx, args, typeArguments);
|
|
1559
|
-
const
|
|
1622
|
+
const insepctRes = await client.devInspectTransactionBlock({
|
|
1560
1623
|
transactionBlock: tx,
|
|
1561
1624
|
sender: ZERO_ADDRESS,
|
|
1562
1625
|
});
|
|
1563
|
-
|
|
1626
|
+
|
|
1627
|
+
return (await getMoveCoder(client)).decodeDevInspectResult<
|
|
1628
|
+
[bigint, bigint, bigint, bigint, bigint]
|
|
1629
|
+
>(insepctRes);
|
|
1564
1630
|
}
|
|
1565
1631
|
export async function isPoolCreated<T0 = any, T1 = any>(
|
|
1566
1632
|
client: SuiClient,
|
|
1567
1633
|
args: [string | ObjectCallArg | TransactionArgument],
|
|
1568
1634
|
typeArguments: [TypeDescriptor<T0> | string, TypeDescriptor<T1> | string],
|
|
1569
|
-
) {
|
|
1635
|
+
): Promise<TypedDevInspectResults<[Boolean]>> {
|
|
1570
1636
|
const tx = new TransactionBlock();
|
|
1571
1637
|
builder.isPoolCreated(tx, args, typeArguments);
|
|
1572
|
-
const
|
|
1638
|
+
const insepctRes = await client.devInspectTransactionBlock({
|
|
1573
1639
|
transactionBlock: tx,
|
|
1574
1640
|
sender: ZERO_ADDRESS,
|
|
1575
1641
|
});
|
|
1576
|
-
|
|
1642
|
+
|
|
1643
|
+
return (await getMoveCoder(client)).decodeDevInspectResult<[Boolean]>(
|
|
1644
|
+
insepctRes,
|
|
1645
|
+
);
|
|
1577
1646
|
}
|
|
1578
1647
|
export async function isPoolCreatedSorted<T0 = any, T1 = any>(
|
|
1579
1648
|
client: SuiClient,
|
|
1580
1649
|
args: [string | ObjectCallArg | TransactionArgument],
|
|
1581
1650
|
typeArguments: [TypeDescriptor<T0> | string, TypeDescriptor<T1> | string],
|
|
1582
|
-
) {
|
|
1651
|
+
): Promise<TypedDevInspectResults<[Boolean]>> {
|
|
1583
1652
|
const tx = new TransactionBlock();
|
|
1584
1653
|
builder.isPoolCreatedSorted(tx, args, typeArguments);
|
|
1585
|
-
const
|
|
1654
|
+
const insepctRes = await client.devInspectTransactionBlock({
|
|
1586
1655
|
transactionBlock: tx,
|
|
1587
1656
|
sender: ZERO_ADDRESS,
|
|
1588
1657
|
});
|
|
1589
|
-
|
|
1658
|
+
|
|
1659
|
+
return (await getMoveCoder(client)).decodeDevInspectResult<[Boolean]>(
|
|
1660
|
+
insepctRes,
|
|
1661
|
+
);
|
|
1590
1662
|
}
|
|
1591
1663
|
export async function processSwapExactInput<T0 = any, T1 = any>(
|
|
1592
1664
|
client: SuiClient,
|
|
@@ -1599,14 +1671,17 @@ export namespace pool {
|
|
|
1599
1671
|
string | ObjectCallArg | TransactionArgument,
|
|
1600
1672
|
],
|
|
1601
1673
|
typeArguments: [TypeDescriptor<T0> | string, TypeDescriptor<T1> | string],
|
|
1602
|
-
) {
|
|
1674
|
+
): Promise<TypedDevInspectResults<[]>> {
|
|
1603
1675
|
const tx = new TransactionBlock();
|
|
1604
1676
|
builder.processSwapExactInput(tx, args, typeArguments);
|
|
1605
|
-
const
|
|
1677
|
+
const insepctRes = await client.devInspectTransactionBlock({
|
|
1606
1678
|
transactionBlock: tx,
|
|
1607
1679
|
sender: ZERO_ADDRESS,
|
|
1608
1680
|
});
|
|
1609
|
-
|
|
1681
|
+
|
|
1682
|
+
return (await getMoveCoder(client)).decodeDevInspectResult<[]>(
|
|
1683
|
+
insepctRes,
|
|
1684
|
+
);
|
|
1610
1685
|
}
|
|
1611
1686
|
export async function processSwapExactOutput<T0 = any, T1 = any>(
|
|
1612
1687
|
client: SuiClient,
|
|
@@ -1619,14 +1694,17 @@ export namespace pool {
|
|
|
1619
1694
|
string | ObjectCallArg | TransactionArgument,
|
|
1620
1695
|
],
|
|
1621
1696
|
typeArguments: [TypeDescriptor<T0> | string, TypeDescriptor<T1> | string],
|
|
1622
|
-
) {
|
|
1697
|
+
): Promise<TypedDevInspectResults<[]>> {
|
|
1623
1698
|
const tx = new TransactionBlock();
|
|
1624
1699
|
builder.processSwapExactOutput(tx, args, typeArguments);
|
|
1625
|
-
const
|
|
1700
|
+
const insepctRes = await client.devInspectTransactionBlock({
|
|
1626
1701
|
transactionBlock: tx,
|
|
1627
1702
|
sender: ZERO_ADDRESS,
|
|
1628
1703
|
});
|
|
1629
|
-
|
|
1704
|
+
|
|
1705
|
+
return (await getMoveCoder(client)).decodeDevInspectResult<[]>(
|
|
1706
|
+
insepctRes,
|
|
1707
|
+
);
|
|
1630
1708
|
}
|
|
1631
1709
|
export async function removeLiquidity<T0 = any, T1 = any>(
|
|
1632
1710
|
client: SuiClient,
|
|
@@ -1639,14 +1717,19 @@ export namespace pool {
|
|
|
1639
1717
|
string | ObjectCallArg | TransactionArgument,
|
|
1640
1718
|
],
|
|
1641
1719
|
typeArguments: [TypeDescriptor<T0> | string, TypeDescriptor<T1> | string],
|
|
1642
|
-
)
|
|
1720
|
+
): Promise<
|
|
1721
|
+
TypedDevInspectResults<[_0x2.coin.Coin<T0>, _0x2.coin.Coin<T1>]>
|
|
1722
|
+
> {
|
|
1643
1723
|
const tx = new TransactionBlock();
|
|
1644
1724
|
builder.removeLiquidity(tx, args, typeArguments);
|
|
1645
|
-
const
|
|
1725
|
+
const insepctRes = await client.devInspectTransactionBlock({
|
|
1646
1726
|
transactionBlock: tx,
|
|
1647
1727
|
sender: ZERO_ADDRESS,
|
|
1648
1728
|
});
|
|
1649
|
-
|
|
1729
|
+
|
|
1730
|
+
return (await getMoveCoder(client)).decodeDevInspectResult<
|
|
1731
|
+
[_0x2.coin.Coin<T0>, _0x2.coin.Coin<T1>]
|
|
1732
|
+
>(insepctRes);
|
|
1650
1733
|
}
|
|
1651
1734
|
export async function setFeeTo_(
|
|
1652
1735
|
client: SuiClient,
|
|
@@ -1656,14 +1739,17 @@ export namespace pool {
|
|
|
1656
1739
|
string | TransactionArgument,
|
|
1657
1740
|
string | ObjectCallArg | TransactionArgument,
|
|
1658
1741
|
],
|
|
1659
|
-
) {
|
|
1742
|
+
): Promise<TypedDevInspectResults<[]>> {
|
|
1660
1743
|
const tx = new TransactionBlock();
|
|
1661
1744
|
builder.setFeeTo_(tx, args);
|
|
1662
|
-
const
|
|
1745
|
+
const insepctRes = await client.devInspectTransactionBlock({
|
|
1663
1746
|
transactionBlock: tx,
|
|
1664
1747
|
sender: ZERO_ADDRESS,
|
|
1665
1748
|
});
|
|
1666
|
-
|
|
1749
|
+
|
|
1750
|
+
return (await getMoveCoder(client)).decodeDevInspectResult<[]>(
|
|
1751
|
+
insepctRes,
|
|
1752
|
+
);
|
|
1667
1753
|
}
|
|
1668
1754
|
export async function swapExactFirstToSecond<T0 = any, T1 = any>(
|
|
1669
1755
|
client: SuiClient,
|
|
@@ -1675,14 +1761,17 @@ export namespace pool {
|
|
|
1675
1761
|
string | ObjectCallArg | TransactionArgument,
|
|
1676
1762
|
],
|
|
1677
1763
|
typeArguments: [TypeDescriptor<T0> | string, TypeDescriptor<T1> | string],
|
|
1678
|
-
) {
|
|
1764
|
+
): Promise<TypedDevInspectResults<[_0x2.coin.Coin<T1>]>> {
|
|
1679
1765
|
const tx = new TransactionBlock();
|
|
1680
1766
|
builder.swapExactFirstToSecond(tx, args, typeArguments);
|
|
1681
|
-
const
|
|
1767
|
+
const insepctRes = await client.devInspectTransactionBlock({
|
|
1682
1768
|
transactionBlock: tx,
|
|
1683
1769
|
sender: ZERO_ADDRESS,
|
|
1684
1770
|
});
|
|
1685
|
-
|
|
1771
|
+
|
|
1772
|
+
return (await getMoveCoder(client)).decodeDevInspectResult<
|
|
1773
|
+
[_0x2.coin.Coin<T1>]
|
|
1774
|
+
>(insepctRes);
|
|
1686
1775
|
}
|
|
1687
1776
|
export async function swapExactSecondToFirst<T0 = any, T1 = any>(
|
|
1688
1777
|
client: SuiClient,
|
|
@@ -1694,14 +1783,17 @@ export namespace pool {
|
|
|
1694
1783
|
string | ObjectCallArg | TransactionArgument,
|
|
1695
1784
|
],
|
|
1696
1785
|
typeArguments: [TypeDescriptor<T0> | string, TypeDescriptor<T1> | string],
|
|
1697
|
-
) {
|
|
1786
|
+
): Promise<TypedDevInspectResults<[_0x2.coin.Coin<T0>]>> {
|
|
1698
1787
|
const tx = new TransactionBlock();
|
|
1699
1788
|
builder.swapExactSecondToFirst(tx, args, typeArguments);
|
|
1700
|
-
const
|
|
1789
|
+
const insepctRes = await client.devInspectTransactionBlock({
|
|
1701
1790
|
transactionBlock: tx,
|
|
1702
1791
|
sender: ZERO_ADDRESS,
|
|
1703
1792
|
});
|
|
1704
|
-
|
|
1793
|
+
|
|
1794
|
+
return (await getMoveCoder(client)).decodeDevInspectResult<
|
|
1795
|
+
[_0x2.coin.Coin<T0>]
|
|
1796
|
+
>(insepctRes);
|
|
1705
1797
|
}
|
|
1706
1798
|
export async function swapFirstToExactSecond<T0 = any, T1 = any>(
|
|
1707
1799
|
client: SuiClient,
|
|
@@ -1713,14 +1805,17 @@ export namespace pool {
|
|
|
1713
1805
|
string | ObjectCallArg | TransactionArgument,
|
|
1714
1806
|
],
|
|
1715
1807
|
typeArguments: [TypeDescriptor<T0> | string, TypeDescriptor<T1> | string],
|
|
1716
|
-
) {
|
|
1808
|
+
): Promise<TypedDevInspectResults<[_0x2.coin.Coin<T1>]>> {
|
|
1717
1809
|
const tx = new TransactionBlock();
|
|
1718
1810
|
builder.swapFirstToExactSecond(tx, args, typeArguments);
|
|
1719
|
-
const
|
|
1811
|
+
const insepctRes = await client.devInspectTransactionBlock({
|
|
1720
1812
|
transactionBlock: tx,
|
|
1721
1813
|
sender: ZERO_ADDRESS,
|
|
1722
1814
|
});
|
|
1723
|
-
|
|
1815
|
+
|
|
1816
|
+
return (await getMoveCoder(client)).decodeDevInspectResult<
|
|
1817
|
+
[_0x2.coin.Coin<T1>]
|
|
1818
|
+
>(insepctRes);
|
|
1724
1819
|
}
|
|
1725
1820
|
export async function swapSecondToExactFirst<T0 = any, T1 = any>(
|
|
1726
1821
|
client: SuiClient,
|
|
@@ -1732,14 +1827,17 @@ export namespace pool {
|
|
|
1732
1827
|
string | ObjectCallArg | TransactionArgument,
|
|
1733
1828
|
],
|
|
1734
1829
|
typeArguments: [TypeDescriptor<T0> | string, TypeDescriptor<T1> | string],
|
|
1735
|
-
) {
|
|
1830
|
+
): Promise<TypedDevInspectResults<[_0x2.coin.Coin<T0>]>> {
|
|
1736
1831
|
const tx = new TransactionBlock();
|
|
1737
1832
|
builder.swapSecondToExactFirst(tx, args, typeArguments);
|
|
1738
|
-
const
|
|
1833
|
+
const insepctRes = await client.devInspectTransactionBlock({
|
|
1739
1834
|
transactionBlock: tx,
|
|
1740
1835
|
sender: ZERO_ADDRESS,
|
|
1741
1836
|
});
|
|
1742
|
-
|
|
1837
|
+
|
|
1838
|
+
return (await getMoveCoder(client)).decodeDevInspectResult<
|
|
1839
|
+
[_0x2.coin.Coin<T0>]
|
|
1840
|
+
>(insepctRes);
|
|
1743
1841
|
}
|
|
1744
1842
|
export async function zapInFirst<T0 = any, T1 = any>(
|
|
1745
1843
|
client: SuiClient,
|
|
@@ -1750,14 +1848,21 @@ export namespace pool {
|
|
|
1750
1848
|
string | ObjectCallArg | TransactionArgument,
|
|
1751
1849
|
],
|
|
1752
1850
|
typeArguments: [TypeDescriptor<T0> | string, TypeDescriptor<T1> | string],
|
|
1753
|
-
)
|
|
1851
|
+
): Promise<
|
|
1852
|
+
TypedDevInspectResults<
|
|
1853
|
+
[_0x2.coin.Coin<pool.WISPLP<T0, T1>>, _0x2.coin.Coin<T1>]
|
|
1854
|
+
>
|
|
1855
|
+
> {
|
|
1754
1856
|
const tx = new TransactionBlock();
|
|
1755
1857
|
builder.zapInFirst(tx, args, typeArguments);
|
|
1756
|
-
const
|
|
1858
|
+
const insepctRes = await client.devInspectTransactionBlock({
|
|
1757
1859
|
transactionBlock: tx,
|
|
1758
1860
|
sender: ZERO_ADDRESS,
|
|
1759
1861
|
});
|
|
1760
|
-
|
|
1862
|
+
|
|
1863
|
+
return (await getMoveCoder(client)).decodeDevInspectResult<
|
|
1864
|
+
[_0x2.coin.Coin<pool.WISPLP<T0, T1>>, _0x2.coin.Coin<T1>]
|
|
1865
|
+
>(insepctRes);
|
|
1761
1866
|
}
|
|
1762
1867
|
export async function zapInSecond<T0 = any, T1 = any>(
|
|
1763
1868
|
client: SuiClient,
|
|
@@ -1768,14 +1873,21 @@ export namespace pool {
|
|
|
1768
1873
|
string | ObjectCallArg | TransactionArgument,
|
|
1769
1874
|
],
|
|
1770
1875
|
typeArguments: [TypeDescriptor<T0> | string, TypeDescriptor<T1> | string],
|
|
1771
|
-
)
|
|
1876
|
+
): Promise<
|
|
1877
|
+
TypedDevInspectResults<
|
|
1878
|
+
[_0x2.coin.Coin<pool.WISPLP<T0, T1>>, _0x2.coin.Coin<T0>]
|
|
1879
|
+
>
|
|
1880
|
+
> {
|
|
1772
1881
|
const tx = new TransactionBlock();
|
|
1773
1882
|
builder.zapInSecond(tx, args, typeArguments);
|
|
1774
|
-
const
|
|
1883
|
+
const insepctRes = await client.devInspectTransactionBlock({
|
|
1775
1884
|
transactionBlock: tx,
|
|
1776
1885
|
sender: ZERO_ADDRESS,
|
|
1777
1886
|
});
|
|
1778
|
-
|
|
1887
|
+
|
|
1888
|
+
return (await getMoveCoder(client)).decodeDevInspectResult<
|
|
1889
|
+
[_0x2.coin.Coin<pool.WISPLP<T0, T1>>, _0x2.coin.Coin<T0>]
|
|
1890
|
+
>(insepctRes);
|
|
1779
1891
|
}
|
|
1780
1892
|
}
|
|
1781
1893
|
}
|
|
@@ -1982,14 +2094,17 @@ export namespace pool_utils {
|
|
|
1982
2094
|
string | ObjectCallArg | TransactionArgument,
|
|
1983
2095
|
],
|
|
1984
2096
|
typeArguments: [TypeDescriptor<T0> | string],
|
|
1985
|
-
) {
|
|
2097
|
+
): Promise<TypedDevInspectResults<[]>> {
|
|
1986
2098
|
const tx = new TransactionBlock();
|
|
1987
2099
|
builder.executeReturnToken(tx, args, typeArguments);
|
|
1988
|
-
const
|
|
2100
|
+
const insepctRes = await client.devInspectTransactionBlock({
|
|
1989
2101
|
transactionBlock: tx,
|
|
1990
2102
|
sender: ZERO_ADDRESS,
|
|
1991
2103
|
});
|
|
1992
|
-
|
|
2104
|
+
|
|
2105
|
+
return (await getMoveCoder(client)).decodeDevInspectResult<[]>(
|
|
2106
|
+
insepctRes,
|
|
2107
|
+
);
|
|
1993
2108
|
}
|
|
1994
2109
|
export async function getInputPrice(
|
|
1995
2110
|
client: SuiClient,
|
|
@@ -1999,26 +2114,32 @@ export namespace pool_utils {
|
|
|
1999
2114
|
bigint | TransactionArgument,
|
|
2000
2115
|
bigint | TransactionArgument,
|
|
2001
2116
|
],
|
|
2002
|
-
) {
|
|
2117
|
+
): Promise<TypedDevInspectResults<[bigint]>> {
|
|
2003
2118
|
const tx = new TransactionBlock();
|
|
2004
2119
|
builder.getInputPrice(tx, args);
|
|
2005
|
-
const
|
|
2120
|
+
const insepctRes = await client.devInspectTransactionBlock({
|
|
2006
2121
|
transactionBlock: tx,
|
|
2007
2122
|
sender: ZERO_ADDRESS,
|
|
2008
2123
|
});
|
|
2009
|
-
|
|
2124
|
+
|
|
2125
|
+
return (await getMoveCoder(client)).decodeDevInspectResult<[bigint]>(
|
|
2126
|
+
insepctRes,
|
|
2127
|
+
);
|
|
2010
2128
|
}
|
|
2011
2129
|
export async function getOptimalZapInAmount(
|
|
2012
2130
|
client: SuiClient,
|
|
2013
2131
|
args: [bigint | TransactionArgument, bigint | TransactionArgument],
|
|
2014
|
-
) {
|
|
2132
|
+
): Promise<TypedDevInspectResults<[bigint]>> {
|
|
2015
2133
|
const tx = new TransactionBlock();
|
|
2016
2134
|
builder.getOptimalZapInAmount(tx, args);
|
|
2017
|
-
const
|
|
2135
|
+
const insepctRes = await client.devInspectTransactionBlock({
|
|
2018
2136
|
transactionBlock: tx,
|
|
2019
2137
|
sender: ZERO_ADDRESS,
|
|
2020
2138
|
});
|
|
2021
|
-
|
|
2139
|
+
|
|
2140
|
+
return (await getMoveCoder(client)).decodeDevInspectResult<[bigint]>(
|
|
2141
|
+
insepctRes,
|
|
2142
|
+
);
|
|
2022
2143
|
}
|
|
2023
2144
|
export async function getOutputPrice(
|
|
2024
2145
|
client: SuiClient,
|
|
@@ -2028,14 +2149,17 @@ export namespace pool_utils {
|
|
|
2028
2149
|
bigint | TransactionArgument,
|
|
2029
2150
|
bigint | TransactionArgument,
|
|
2030
2151
|
],
|
|
2031
|
-
) {
|
|
2152
|
+
): Promise<TypedDevInspectResults<[bigint]>> {
|
|
2032
2153
|
const tx = new TransactionBlock();
|
|
2033
2154
|
builder.getOutputPrice(tx, args);
|
|
2034
|
-
const
|
|
2155
|
+
const insepctRes = await client.devInspectTransactionBlock({
|
|
2035
2156
|
transactionBlock: tx,
|
|
2036
2157
|
sender: ZERO_ADDRESS,
|
|
2037
2158
|
});
|
|
2038
|
-
|
|
2159
|
+
|
|
2160
|
+
return (await getMoveCoder(client)).decodeDevInspectResult<[bigint]>(
|
|
2161
|
+
insepctRes,
|
|
2162
|
+
);
|
|
2039
2163
|
}
|
|
2040
2164
|
export async function getTripleType<T0 = any, T1 = any, T2 = any>(
|
|
2041
2165
|
client: SuiClient,
|
|
@@ -2045,27 +2169,47 @@ export namespace pool_utils {
|
|
|
2045
2169
|
TypeDescriptor<T1> | string,
|
|
2046
2170
|
TypeDescriptor<T2> | string,
|
|
2047
2171
|
],
|
|
2048
|
-
)
|
|
2172
|
+
): Promise<
|
|
2173
|
+
TypedDevInspectResults<
|
|
2174
|
+
[
|
|
2175
|
+
_0x1.type_name.TypeName,
|
|
2176
|
+
_0x1.type_name.TypeName,
|
|
2177
|
+
_0x1.type_name.TypeName,
|
|
2178
|
+
]
|
|
2179
|
+
>
|
|
2180
|
+
> {
|
|
2049
2181
|
const tx = new TransactionBlock();
|
|
2050
2182
|
builder.getTripleType(tx, args, typeArguments);
|
|
2051
|
-
const
|
|
2183
|
+
const insepctRes = await client.devInspectTransactionBlock({
|
|
2052
2184
|
transactionBlock: tx,
|
|
2053
2185
|
sender: ZERO_ADDRESS,
|
|
2054
2186
|
});
|
|
2055
|
-
|
|
2187
|
+
|
|
2188
|
+
return (await getMoveCoder(client)).decodeDevInspectResult<
|
|
2189
|
+
[
|
|
2190
|
+
_0x1.type_name.TypeName,
|
|
2191
|
+
_0x1.type_name.TypeName,
|
|
2192
|
+
_0x1.type_name.TypeName,
|
|
2193
|
+
]
|
|
2194
|
+
>(insepctRes);
|
|
2056
2195
|
}
|
|
2057
2196
|
export async function getType<T0 = any, T1 = any>(
|
|
2058
2197
|
client: SuiClient,
|
|
2059
2198
|
args: [],
|
|
2060
2199
|
typeArguments: [TypeDescriptor<T0> | string, TypeDescriptor<T1> | string],
|
|
2061
|
-
)
|
|
2200
|
+
): Promise<
|
|
2201
|
+
TypedDevInspectResults<[_0x1.type_name.TypeName, _0x1.type_name.TypeName]>
|
|
2202
|
+
> {
|
|
2062
2203
|
const tx = new TransactionBlock();
|
|
2063
2204
|
builder.getType(tx, args, typeArguments);
|
|
2064
|
-
const
|
|
2205
|
+
const insepctRes = await client.devInspectTransactionBlock({
|
|
2065
2206
|
transactionBlock: tx,
|
|
2066
2207
|
sender: ZERO_ADDRESS,
|
|
2067
2208
|
});
|
|
2068
|
-
|
|
2209
|
+
|
|
2210
|
+
return (await getMoveCoder(client)).decodeDevInspectResult<
|
|
2211
|
+
[_0x1.type_name.TypeName, _0x1.type_name.TypeName]
|
|
2212
|
+
>(insepctRes);
|
|
2069
2213
|
}
|
|
2070
2214
|
export async function quote(
|
|
2071
2215
|
client: SuiClient,
|
|
@@ -2074,14 +2218,17 @@ export namespace pool_utils {
|
|
|
2074
2218
|
bigint | TransactionArgument,
|
|
2075
2219
|
bigint | TransactionArgument,
|
|
2076
2220
|
],
|
|
2077
|
-
) {
|
|
2221
|
+
): Promise<TypedDevInspectResults<[bigint]>> {
|
|
2078
2222
|
const tx = new TransactionBlock();
|
|
2079
2223
|
builder.quote(tx, args);
|
|
2080
|
-
const
|
|
2224
|
+
const insepctRes = await client.devInspectTransactionBlock({
|
|
2081
2225
|
transactionBlock: tx,
|
|
2082
2226
|
sender: ZERO_ADDRESS,
|
|
2083
2227
|
});
|
|
2084
|
-
|
|
2228
|
+
|
|
2229
|
+
return (await getMoveCoder(client)).decodeDevInspectResult<[bigint]>(
|
|
2230
|
+
insepctRes,
|
|
2231
|
+
);
|
|
2085
2232
|
}
|
|
2086
2233
|
export async function sortTokenType(
|
|
2087
2234
|
client: SuiClient,
|
|
@@ -2089,14 +2236,17 @@ export namespace pool_utils {
|
|
|
2089
2236
|
string | ObjectCallArg | TransactionArgument,
|
|
2090
2237
|
string | ObjectCallArg | TransactionArgument,
|
|
2091
2238
|
],
|
|
2092
|
-
) {
|
|
2239
|
+
): Promise<TypedDevInspectResults<[comparator.Result]>> {
|
|
2093
2240
|
const tx = new TransactionBlock();
|
|
2094
2241
|
builder.sortTokenType(tx, args);
|
|
2095
|
-
const
|
|
2242
|
+
const insepctRes = await client.devInspectTransactionBlock({
|
|
2096
2243
|
transactionBlock: tx,
|
|
2097
2244
|
sender: ZERO_ADDRESS,
|
|
2098
2245
|
});
|
|
2099
|
-
|
|
2246
|
+
|
|
2247
|
+
return (await getMoveCoder(client)).decodeDevInspectResult<
|
|
2248
|
+
[comparator.Result]
|
|
2249
|
+
>(insepctRes);
|
|
2100
2250
|
}
|
|
2101
2251
|
}
|
|
2102
2252
|
}
|
|
@@ -2566,14 +2716,17 @@ export namespace router {
|
|
|
2566
2716
|
string | ObjectCallArg | TransactionArgument,
|
|
2567
2717
|
],
|
|
2568
2718
|
typeArguments: [TypeDescriptor<T0> | string, TypeDescriptor<T1> | string],
|
|
2569
|
-
) {
|
|
2719
|
+
): Promise<TypedDevInspectResults<[]>> {
|
|
2570
2720
|
const tx = new TransactionBlock();
|
|
2571
2721
|
builder.addLiquidity_(tx, args, typeArguments);
|
|
2572
|
-
const
|
|
2722
|
+
const insepctRes = await client.devInspectTransactionBlock({
|
|
2573
2723
|
transactionBlock: tx,
|
|
2574
2724
|
sender: ZERO_ADDRESS,
|
|
2575
2725
|
});
|
|
2576
|
-
|
|
2726
|
+
|
|
2727
|
+
return (await getMoveCoder(client)).decodeDevInspectResult<[]>(
|
|
2728
|
+
insepctRes,
|
|
2729
|
+
);
|
|
2577
2730
|
}
|
|
2578
2731
|
export async function createPool_<T0 = any, T1 = any>(
|
|
2579
2732
|
client: SuiClient,
|
|
@@ -2586,14 +2739,17 @@ export namespace router {
|
|
|
2586
2739
|
string | ObjectCallArg | TransactionArgument,
|
|
2587
2740
|
],
|
|
2588
2741
|
typeArguments: [TypeDescriptor<T0> | string, TypeDescriptor<T1> | string],
|
|
2589
|
-
) {
|
|
2742
|
+
): Promise<TypedDevInspectResults<[]>> {
|
|
2590
2743
|
const tx = new TransactionBlock();
|
|
2591
2744
|
builder.createPool_(tx, args, typeArguments);
|
|
2592
|
-
const
|
|
2745
|
+
const insepctRes = await client.devInspectTransactionBlock({
|
|
2593
2746
|
transactionBlock: tx,
|
|
2594
2747
|
sender: ZERO_ADDRESS,
|
|
2595
2748
|
});
|
|
2596
|
-
|
|
2749
|
+
|
|
2750
|
+
return (await getMoveCoder(client)).decodeDevInspectResult<[]>(
|
|
2751
|
+
insepctRes,
|
|
2752
|
+
);
|
|
2597
2753
|
}
|
|
2598
2754
|
export async function removeLiquidity_<T0 = any, T1 = any>(
|
|
2599
2755
|
client: SuiClient,
|
|
@@ -2606,14 +2762,17 @@ export namespace router {
|
|
|
2606
2762
|
string | ObjectCallArg | TransactionArgument,
|
|
2607
2763
|
],
|
|
2608
2764
|
typeArguments: [TypeDescriptor<T0> | string, TypeDescriptor<T1> | string],
|
|
2609
|
-
) {
|
|
2765
|
+
): Promise<TypedDevInspectResults<[]>> {
|
|
2610
2766
|
const tx = new TransactionBlock();
|
|
2611
2767
|
builder.removeLiquidity_(tx, args, typeArguments);
|
|
2612
|
-
const
|
|
2768
|
+
const insepctRes = await client.devInspectTransactionBlock({
|
|
2613
2769
|
transactionBlock: tx,
|
|
2614
2770
|
sender: ZERO_ADDRESS,
|
|
2615
2771
|
});
|
|
2616
|
-
|
|
2772
|
+
|
|
2773
|
+
return (await getMoveCoder(client)).decodeDevInspectResult<[]>(
|
|
2774
|
+
insepctRes,
|
|
2775
|
+
);
|
|
2617
2776
|
}
|
|
2618
2777
|
export async function swapExactInput_<T0 = any, T1 = any>(
|
|
2619
2778
|
client: SuiClient,
|
|
@@ -2625,14 +2784,17 @@ export namespace router {
|
|
|
2625
2784
|
string | ObjectCallArg | TransactionArgument,
|
|
2626
2785
|
],
|
|
2627
2786
|
typeArguments: [TypeDescriptor<T0> | string, TypeDescriptor<T1> | string],
|
|
2628
|
-
) {
|
|
2787
|
+
): Promise<TypedDevInspectResults<[]>> {
|
|
2629
2788
|
const tx = new TransactionBlock();
|
|
2630
2789
|
builder.swapExactInput_(tx, args, typeArguments);
|
|
2631
|
-
const
|
|
2790
|
+
const insepctRes = await client.devInspectTransactionBlock({
|
|
2632
2791
|
transactionBlock: tx,
|
|
2633
2792
|
sender: ZERO_ADDRESS,
|
|
2634
2793
|
});
|
|
2635
|
-
|
|
2794
|
+
|
|
2795
|
+
return (await getMoveCoder(client)).decodeDevInspectResult<[]>(
|
|
2796
|
+
insepctRes,
|
|
2797
|
+
);
|
|
2636
2798
|
}
|
|
2637
2799
|
export async function swapExactInputDoublehop_<
|
|
2638
2800
|
T0 = any,
|
|
@@ -2652,14 +2814,17 @@ export namespace router {
|
|
|
2652
2814
|
TypeDescriptor<T1> | string,
|
|
2653
2815
|
TypeDescriptor<T2> | string,
|
|
2654
2816
|
],
|
|
2655
|
-
) {
|
|
2817
|
+
): Promise<TypedDevInspectResults<[]>> {
|
|
2656
2818
|
const tx = new TransactionBlock();
|
|
2657
2819
|
builder.swapExactInputDoublehop_(tx, args, typeArguments);
|
|
2658
|
-
const
|
|
2820
|
+
const insepctRes = await client.devInspectTransactionBlock({
|
|
2659
2821
|
transactionBlock: tx,
|
|
2660
2822
|
sender: ZERO_ADDRESS,
|
|
2661
2823
|
});
|
|
2662
|
-
|
|
2824
|
+
|
|
2825
|
+
return (await getMoveCoder(client)).decodeDevInspectResult<[]>(
|
|
2826
|
+
insepctRes,
|
|
2827
|
+
);
|
|
2663
2828
|
}
|
|
2664
2829
|
export async function swapExactOutput_<T0 = any, T1 = any>(
|
|
2665
2830
|
client: SuiClient,
|
|
@@ -2671,14 +2836,17 @@ export namespace router {
|
|
|
2671
2836
|
string | ObjectCallArg | TransactionArgument,
|
|
2672
2837
|
],
|
|
2673
2838
|
typeArguments: [TypeDescriptor<T0> | string, TypeDescriptor<T1> | string],
|
|
2674
|
-
) {
|
|
2839
|
+
): Promise<TypedDevInspectResults<[]>> {
|
|
2675
2840
|
const tx = new TransactionBlock();
|
|
2676
2841
|
builder.swapExactOutput_(tx, args, typeArguments);
|
|
2677
|
-
const
|
|
2842
|
+
const insepctRes = await client.devInspectTransactionBlock({
|
|
2678
2843
|
transactionBlock: tx,
|
|
2679
2844
|
sender: ZERO_ADDRESS,
|
|
2680
2845
|
});
|
|
2681
|
-
|
|
2846
|
+
|
|
2847
|
+
return (await getMoveCoder(client)).decodeDevInspectResult<[]>(
|
|
2848
|
+
insepctRes,
|
|
2849
|
+
);
|
|
2682
2850
|
}
|
|
2683
2851
|
export async function swapExactOutputDoublehop_<
|
|
2684
2852
|
T0 = any,
|
|
@@ -2698,14 +2866,17 @@ export namespace router {
|
|
|
2698
2866
|
TypeDescriptor<T1> | string,
|
|
2699
2867
|
TypeDescriptor<T2> | string,
|
|
2700
2868
|
],
|
|
2701
|
-
) {
|
|
2869
|
+
): Promise<TypedDevInspectResults<[]>> {
|
|
2702
2870
|
const tx = new TransactionBlock();
|
|
2703
2871
|
builder.swapExactOutputDoublehop_(tx, args, typeArguments);
|
|
2704
|
-
const
|
|
2872
|
+
const insepctRes = await client.devInspectTransactionBlock({
|
|
2705
2873
|
transactionBlock: tx,
|
|
2706
2874
|
sender: ZERO_ADDRESS,
|
|
2707
2875
|
});
|
|
2708
|
-
|
|
2876
|
+
|
|
2877
|
+
return (await getMoveCoder(client)).decodeDevInspectResult<[]>(
|
|
2878
|
+
insepctRes,
|
|
2879
|
+
);
|
|
2709
2880
|
}
|
|
2710
2881
|
export async function zapIn_<T0 = any, T1 = any>(
|
|
2711
2882
|
client: SuiClient,
|
|
@@ -2716,14 +2887,17 @@ export namespace router {
|
|
|
2716
2887
|
string | ObjectCallArg | TransactionArgument,
|
|
2717
2888
|
],
|
|
2718
2889
|
typeArguments: [TypeDescriptor<T0> | string, TypeDescriptor<T1> | string],
|
|
2719
|
-
) {
|
|
2890
|
+
): Promise<TypedDevInspectResults<[]>> {
|
|
2720
2891
|
const tx = new TransactionBlock();
|
|
2721
2892
|
builder.zapIn_(tx, args, typeArguments);
|
|
2722
|
-
const
|
|
2893
|
+
const insepctRes = await client.devInspectTransactionBlock({
|
|
2723
2894
|
transactionBlock: tx,
|
|
2724
2895
|
sender: ZERO_ADDRESS,
|
|
2725
2896
|
});
|
|
2726
|
-
|
|
2897
|
+
|
|
2898
|
+
return (await getMoveCoder(client)).decodeDevInspectResult<[]>(
|
|
2899
|
+
insepctRes,
|
|
2900
|
+
);
|
|
2727
2901
|
}
|
|
2728
2902
|
}
|
|
2729
2903
|
}
|