@typemove/sui 1.2.0-rc.2 → 1.2.0-rc.3
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/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
package/src/builtin/0x1.ts
CHANGED
|
@@ -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";
|
|
@@ -30,14 +34,20 @@ export namespace address {
|
|
|
30
34
|
}
|
|
31
35
|
}
|
|
32
36
|
export namespace view {
|
|
33
|
-
export async function length(
|
|
37
|
+
export async function length(
|
|
38
|
+
client: SuiClient,
|
|
39
|
+
args: [],
|
|
40
|
+
): Promise<TypedDevInspectResults<[bigint]>> {
|
|
34
41
|
const tx = new TransactionBlock();
|
|
35
42
|
builder.length(tx, args);
|
|
36
|
-
const
|
|
43
|
+
const insepctRes = await client.devInspectTransactionBlock({
|
|
37
44
|
transactionBlock: tx,
|
|
38
45
|
sender: ZERO_ADDRESS,
|
|
39
46
|
});
|
|
40
|
-
|
|
47
|
+
|
|
48
|
+
return (await getMoveCoder(client)).decodeDevInspectResult<[bigint]>(
|
|
49
|
+
insepctRes,
|
|
50
|
+
);
|
|
41
51
|
}
|
|
42
52
|
}
|
|
43
53
|
}
|
|
@@ -255,110 +265,137 @@ export namespace ascii {
|
|
|
255
265
|
export async function allCharactersPrintable(
|
|
256
266
|
client: SuiClient,
|
|
257
267
|
args: [string | ObjectCallArg | TransactionArgument],
|
|
258
|
-
) {
|
|
268
|
+
): Promise<TypedDevInspectResults<[Boolean]>> {
|
|
259
269
|
const tx = new TransactionBlock();
|
|
260
270
|
builder.allCharactersPrintable(tx, args);
|
|
261
|
-
const
|
|
271
|
+
const insepctRes = await client.devInspectTransactionBlock({
|
|
262
272
|
transactionBlock: tx,
|
|
263
273
|
sender: ZERO_ADDRESS,
|
|
264
274
|
});
|
|
265
|
-
|
|
275
|
+
|
|
276
|
+
return (await getMoveCoder(client)).decodeDevInspectResult<[Boolean]>(
|
|
277
|
+
insepctRes,
|
|
278
|
+
);
|
|
266
279
|
}
|
|
267
280
|
export async function asBytes(
|
|
268
281
|
client: SuiClient,
|
|
269
282
|
args: [string | ObjectCallArg | TransactionArgument],
|
|
270
|
-
) {
|
|
283
|
+
): Promise<TypedDevInspectResults<[string]>> {
|
|
271
284
|
const tx = new TransactionBlock();
|
|
272
285
|
builder.asBytes(tx, args);
|
|
273
|
-
const
|
|
286
|
+
const insepctRes = await client.devInspectTransactionBlock({
|
|
274
287
|
transactionBlock: tx,
|
|
275
288
|
sender: ZERO_ADDRESS,
|
|
276
289
|
});
|
|
277
|
-
|
|
290
|
+
|
|
291
|
+
return (await getMoveCoder(client)).decodeDevInspectResult<[string]>(
|
|
292
|
+
insepctRes,
|
|
293
|
+
);
|
|
278
294
|
}
|
|
279
295
|
export async function byte(
|
|
280
296
|
client: SuiClient,
|
|
281
297
|
args: [ascii.Char | TransactionArgument],
|
|
282
|
-
) {
|
|
298
|
+
): Promise<TypedDevInspectResults<[number]>> {
|
|
283
299
|
const tx = new TransactionBlock();
|
|
284
300
|
builder.byte(tx, args);
|
|
285
|
-
const
|
|
301
|
+
const insepctRes = await client.devInspectTransactionBlock({
|
|
286
302
|
transactionBlock: tx,
|
|
287
303
|
sender: ZERO_ADDRESS,
|
|
288
304
|
});
|
|
289
|
-
|
|
305
|
+
|
|
306
|
+
return (await getMoveCoder(client)).decodeDevInspectResult<[number]>(
|
|
307
|
+
insepctRes,
|
|
308
|
+
);
|
|
290
309
|
}
|
|
291
310
|
export async function char(
|
|
292
311
|
client: SuiClient,
|
|
293
312
|
args: [number | TransactionArgument],
|
|
294
|
-
) {
|
|
313
|
+
): Promise<TypedDevInspectResults<[ascii.Char]>> {
|
|
295
314
|
const tx = new TransactionBlock();
|
|
296
315
|
builder.char(tx, args);
|
|
297
|
-
const
|
|
316
|
+
const insepctRes = await client.devInspectTransactionBlock({
|
|
298
317
|
transactionBlock: tx,
|
|
299
318
|
sender: ZERO_ADDRESS,
|
|
300
319
|
});
|
|
301
|
-
|
|
320
|
+
|
|
321
|
+
return (await getMoveCoder(client)).decodeDevInspectResult<[ascii.Char]>(
|
|
322
|
+
insepctRes,
|
|
323
|
+
);
|
|
302
324
|
}
|
|
303
325
|
export async function intoBytes(
|
|
304
326
|
client: SuiClient,
|
|
305
327
|
args: [ascii.String | TransactionArgument],
|
|
306
|
-
) {
|
|
328
|
+
): Promise<TypedDevInspectResults<[number[]]>> {
|
|
307
329
|
const tx = new TransactionBlock();
|
|
308
330
|
builder.intoBytes(tx, args);
|
|
309
|
-
const
|
|
331
|
+
const insepctRes = await client.devInspectTransactionBlock({
|
|
310
332
|
transactionBlock: tx,
|
|
311
333
|
sender: ZERO_ADDRESS,
|
|
312
334
|
});
|
|
313
|
-
|
|
335
|
+
|
|
336
|
+
return (await getMoveCoder(client)).decodeDevInspectResult<[number[]]>(
|
|
337
|
+
insepctRes,
|
|
338
|
+
);
|
|
314
339
|
}
|
|
315
340
|
export async function isPrintableChar(
|
|
316
341
|
client: SuiClient,
|
|
317
342
|
args: [number | TransactionArgument],
|
|
318
|
-
) {
|
|
343
|
+
): Promise<TypedDevInspectResults<[Boolean]>> {
|
|
319
344
|
const tx = new TransactionBlock();
|
|
320
345
|
builder.isPrintableChar(tx, args);
|
|
321
|
-
const
|
|
346
|
+
const insepctRes = await client.devInspectTransactionBlock({
|
|
322
347
|
transactionBlock: tx,
|
|
323
348
|
sender: ZERO_ADDRESS,
|
|
324
349
|
});
|
|
325
|
-
|
|
350
|
+
|
|
351
|
+
return (await getMoveCoder(client)).decodeDevInspectResult<[Boolean]>(
|
|
352
|
+
insepctRes,
|
|
353
|
+
);
|
|
326
354
|
}
|
|
327
355
|
export async function isValidChar(
|
|
328
356
|
client: SuiClient,
|
|
329
357
|
args: [number | TransactionArgument],
|
|
330
|
-
) {
|
|
358
|
+
): Promise<TypedDevInspectResults<[Boolean]>> {
|
|
331
359
|
const tx = new TransactionBlock();
|
|
332
360
|
builder.isValidChar(tx, args);
|
|
333
|
-
const
|
|
361
|
+
const insepctRes = await client.devInspectTransactionBlock({
|
|
334
362
|
transactionBlock: tx,
|
|
335
363
|
sender: ZERO_ADDRESS,
|
|
336
364
|
});
|
|
337
|
-
|
|
365
|
+
|
|
366
|
+
return (await getMoveCoder(client)).decodeDevInspectResult<[Boolean]>(
|
|
367
|
+
insepctRes,
|
|
368
|
+
);
|
|
338
369
|
}
|
|
339
370
|
export async function length(
|
|
340
371
|
client: SuiClient,
|
|
341
372
|
args: [string | ObjectCallArg | TransactionArgument],
|
|
342
|
-
) {
|
|
373
|
+
): Promise<TypedDevInspectResults<[bigint]>> {
|
|
343
374
|
const tx = new TransactionBlock();
|
|
344
375
|
builder.length(tx, args);
|
|
345
|
-
const
|
|
376
|
+
const insepctRes = await client.devInspectTransactionBlock({
|
|
346
377
|
transactionBlock: tx,
|
|
347
378
|
sender: ZERO_ADDRESS,
|
|
348
379
|
});
|
|
349
|
-
|
|
380
|
+
|
|
381
|
+
return (await getMoveCoder(client)).decodeDevInspectResult<[bigint]>(
|
|
382
|
+
insepctRes,
|
|
383
|
+
);
|
|
350
384
|
}
|
|
351
385
|
export async function popChar(
|
|
352
386
|
client: SuiClient,
|
|
353
387
|
args: [string | ObjectCallArg | TransactionArgument],
|
|
354
|
-
) {
|
|
388
|
+
): Promise<TypedDevInspectResults<[ascii.Char]>> {
|
|
355
389
|
const tx = new TransactionBlock();
|
|
356
390
|
builder.popChar(tx, args);
|
|
357
|
-
const
|
|
391
|
+
const insepctRes = await client.devInspectTransactionBlock({
|
|
358
392
|
transactionBlock: tx,
|
|
359
393
|
sender: ZERO_ADDRESS,
|
|
360
394
|
});
|
|
361
|
-
|
|
395
|
+
|
|
396
|
+
return (await getMoveCoder(client)).decodeDevInspectResult<[ascii.Char]>(
|
|
397
|
+
insepctRes,
|
|
398
|
+
);
|
|
362
399
|
}
|
|
363
400
|
export async function pushChar(
|
|
364
401
|
client: SuiClient,
|
|
@@ -366,38 +403,47 @@ export namespace ascii {
|
|
|
366
403
|
string | ObjectCallArg | TransactionArgument,
|
|
367
404
|
ascii.Char | TransactionArgument,
|
|
368
405
|
],
|
|
369
|
-
) {
|
|
406
|
+
): Promise<TypedDevInspectResults<[]>> {
|
|
370
407
|
const tx = new TransactionBlock();
|
|
371
408
|
builder.pushChar(tx, args);
|
|
372
|
-
const
|
|
409
|
+
const insepctRes = await client.devInspectTransactionBlock({
|
|
373
410
|
transactionBlock: tx,
|
|
374
411
|
sender: ZERO_ADDRESS,
|
|
375
412
|
});
|
|
376
|
-
|
|
413
|
+
|
|
414
|
+
return (await getMoveCoder(client)).decodeDevInspectResult<[]>(
|
|
415
|
+
insepctRes,
|
|
416
|
+
);
|
|
377
417
|
}
|
|
378
418
|
export async function string_(
|
|
379
419
|
client: SuiClient,
|
|
380
420
|
args: [(string | ObjectCallArg)[] | TransactionArgument],
|
|
381
|
-
) {
|
|
421
|
+
): Promise<TypedDevInspectResults<[ascii.String]>> {
|
|
382
422
|
const tx = new TransactionBlock();
|
|
383
423
|
builder.string_(tx, args);
|
|
384
|
-
const
|
|
424
|
+
const insepctRes = await client.devInspectTransactionBlock({
|
|
385
425
|
transactionBlock: tx,
|
|
386
426
|
sender: ZERO_ADDRESS,
|
|
387
427
|
});
|
|
388
|
-
|
|
428
|
+
|
|
429
|
+
return (await getMoveCoder(client)).decodeDevInspectResult<
|
|
430
|
+
[ascii.String]
|
|
431
|
+
>(insepctRes);
|
|
389
432
|
}
|
|
390
433
|
export async function tryString(
|
|
391
434
|
client: SuiClient,
|
|
392
435
|
args: [(string | ObjectCallArg)[] | TransactionArgument],
|
|
393
|
-
) {
|
|
436
|
+
): Promise<TypedDevInspectResults<[option.Option<ascii.String>]>> {
|
|
394
437
|
const tx = new TransactionBlock();
|
|
395
438
|
builder.tryString(tx, args);
|
|
396
|
-
const
|
|
439
|
+
const insepctRes = await client.devInspectTransactionBlock({
|
|
397
440
|
transactionBlock: tx,
|
|
398
441
|
sender: ZERO_ADDRESS,
|
|
399
442
|
});
|
|
400
|
-
|
|
443
|
+
|
|
444
|
+
return (await getMoveCoder(client)).decodeDevInspectResult<
|
|
445
|
+
[option.Option<ascii.String>]
|
|
446
|
+
>(insepctRes);
|
|
401
447
|
}
|
|
402
448
|
}
|
|
403
449
|
}
|
|
@@ -431,14 +477,17 @@ export namespace bcs {
|
|
|
431
477
|
client: SuiClient,
|
|
432
478
|
args: [string | ObjectCallArg | TransactionArgument],
|
|
433
479
|
typeArguments: [TypeDescriptor<T0> | string],
|
|
434
|
-
) {
|
|
480
|
+
): Promise<TypedDevInspectResults<[number[]]>> {
|
|
435
481
|
const tx = new TransactionBlock();
|
|
436
482
|
builder.toBytes(tx, args, typeArguments);
|
|
437
|
-
const
|
|
483
|
+
const insepctRes = await client.devInspectTransactionBlock({
|
|
438
484
|
transactionBlock: tx,
|
|
439
485
|
sender: ZERO_ADDRESS,
|
|
440
486
|
});
|
|
441
|
-
|
|
487
|
+
|
|
488
|
+
return (await getMoveCoder(client)).decodeDevInspectResult<[number[]]>(
|
|
489
|
+
insepctRes,
|
|
490
|
+
);
|
|
442
491
|
}
|
|
443
492
|
}
|
|
444
493
|
}
|
|
@@ -596,26 +645,32 @@ export namespace bit_vector {
|
|
|
596
645
|
string | ObjectCallArg | TransactionArgument,
|
|
597
646
|
bigint | TransactionArgument,
|
|
598
647
|
],
|
|
599
|
-
) {
|
|
648
|
+
): Promise<TypedDevInspectResults<[Boolean]>> {
|
|
600
649
|
const tx = new TransactionBlock();
|
|
601
650
|
builder.isIndexSet(tx, args);
|
|
602
|
-
const
|
|
651
|
+
const insepctRes = await client.devInspectTransactionBlock({
|
|
603
652
|
transactionBlock: tx,
|
|
604
653
|
sender: ZERO_ADDRESS,
|
|
605
654
|
});
|
|
606
|
-
|
|
655
|
+
|
|
656
|
+
return (await getMoveCoder(client)).decodeDevInspectResult<[Boolean]>(
|
|
657
|
+
insepctRes,
|
|
658
|
+
);
|
|
607
659
|
}
|
|
608
660
|
export async function length(
|
|
609
661
|
client: SuiClient,
|
|
610
662
|
args: [string | ObjectCallArg | TransactionArgument],
|
|
611
|
-
) {
|
|
663
|
+
): Promise<TypedDevInspectResults<[bigint]>> {
|
|
612
664
|
const tx = new TransactionBlock();
|
|
613
665
|
builder.length(tx, args);
|
|
614
|
-
const
|
|
666
|
+
const insepctRes = await client.devInspectTransactionBlock({
|
|
615
667
|
transactionBlock: tx,
|
|
616
668
|
sender: ZERO_ADDRESS,
|
|
617
669
|
});
|
|
618
|
-
|
|
670
|
+
|
|
671
|
+
return (await getMoveCoder(client)).decodeDevInspectResult<[bigint]>(
|
|
672
|
+
insepctRes,
|
|
673
|
+
);
|
|
619
674
|
}
|
|
620
675
|
export async function longestSetSequenceStartingAt(
|
|
621
676
|
client: SuiClient,
|
|
@@ -623,26 +678,32 @@ export namespace bit_vector {
|
|
|
623
678
|
string | ObjectCallArg | TransactionArgument,
|
|
624
679
|
bigint | TransactionArgument,
|
|
625
680
|
],
|
|
626
|
-
) {
|
|
681
|
+
): Promise<TypedDevInspectResults<[bigint]>> {
|
|
627
682
|
const tx = new TransactionBlock();
|
|
628
683
|
builder.longestSetSequenceStartingAt(tx, args);
|
|
629
|
-
const
|
|
684
|
+
const insepctRes = await client.devInspectTransactionBlock({
|
|
630
685
|
transactionBlock: tx,
|
|
631
686
|
sender: ZERO_ADDRESS,
|
|
632
687
|
});
|
|
633
|
-
|
|
688
|
+
|
|
689
|
+
return (await getMoveCoder(client)).decodeDevInspectResult<[bigint]>(
|
|
690
|
+
insepctRes,
|
|
691
|
+
);
|
|
634
692
|
}
|
|
635
693
|
export async function new_(
|
|
636
694
|
client: SuiClient,
|
|
637
695
|
args: [bigint | TransactionArgument],
|
|
638
|
-
) {
|
|
696
|
+
): Promise<TypedDevInspectResults<[bit_vector.BitVector]>> {
|
|
639
697
|
const tx = new TransactionBlock();
|
|
640
698
|
builder.new_(tx, args);
|
|
641
|
-
const
|
|
699
|
+
const insepctRes = await client.devInspectTransactionBlock({
|
|
642
700
|
transactionBlock: tx,
|
|
643
701
|
sender: ZERO_ADDRESS,
|
|
644
702
|
});
|
|
645
|
-
|
|
703
|
+
|
|
704
|
+
return (await getMoveCoder(client)).decodeDevInspectResult<
|
|
705
|
+
[bit_vector.BitVector]
|
|
706
|
+
>(insepctRes);
|
|
646
707
|
}
|
|
647
708
|
export async function set(
|
|
648
709
|
client: SuiClient,
|
|
@@ -650,14 +711,17 @@ export namespace bit_vector {
|
|
|
650
711
|
string | ObjectCallArg | TransactionArgument,
|
|
651
712
|
bigint | TransactionArgument,
|
|
652
713
|
],
|
|
653
|
-
) {
|
|
714
|
+
): Promise<TypedDevInspectResults<[]>> {
|
|
654
715
|
const tx = new TransactionBlock();
|
|
655
716
|
builder.set(tx, args);
|
|
656
|
-
const
|
|
717
|
+
const insepctRes = await client.devInspectTransactionBlock({
|
|
657
718
|
transactionBlock: tx,
|
|
658
719
|
sender: ZERO_ADDRESS,
|
|
659
720
|
});
|
|
660
|
-
|
|
721
|
+
|
|
722
|
+
return (await getMoveCoder(client)).decodeDevInspectResult<[]>(
|
|
723
|
+
insepctRes,
|
|
724
|
+
);
|
|
661
725
|
}
|
|
662
726
|
export async function shiftLeft(
|
|
663
727
|
client: SuiClient,
|
|
@@ -665,14 +729,17 @@ export namespace bit_vector {
|
|
|
665
729
|
string | ObjectCallArg | TransactionArgument,
|
|
666
730
|
bigint | TransactionArgument,
|
|
667
731
|
],
|
|
668
|
-
) {
|
|
732
|
+
): Promise<TypedDevInspectResults<[]>> {
|
|
669
733
|
const tx = new TransactionBlock();
|
|
670
734
|
builder.shiftLeft(tx, args);
|
|
671
|
-
const
|
|
735
|
+
const insepctRes = await client.devInspectTransactionBlock({
|
|
672
736
|
transactionBlock: tx,
|
|
673
737
|
sender: ZERO_ADDRESS,
|
|
674
738
|
});
|
|
675
|
-
|
|
739
|
+
|
|
740
|
+
return (await getMoveCoder(client)).decodeDevInspectResult<[]>(
|
|
741
|
+
insepctRes,
|
|
742
|
+
);
|
|
676
743
|
}
|
|
677
744
|
export async function unset(
|
|
678
745
|
client: SuiClient,
|
|
@@ -680,14 +747,17 @@ export namespace bit_vector {
|
|
|
680
747
|
string | ObjectCallArg | TransactionArgument,
|
|
681
748
|
bigint | TransactionArgument,
|
|
682
749
|
],
|
|
683
|
-
) {
|
|
750
|
+
): Promise<TypedDevInspectResults<[]>> {
|
|
684
751
|
const tx = new TransactionBlock();
|
|
685
752
|
builder.unset(tx, args);
|
|
686
|
-
const
|
|
753
|
+
const insepctRes = await client.devInspectTransactionBlock({
|
|
687
754
|
transactionBlock: tx,
|
|
688
755
|
sender: ZERO_ADDRESS,
|
|
689
756
|
});
|
|
690
|
-
|
|
757
|
+
|
|
758
|
+
return (await getMoveCoder(client)).decodeDevInspectResult<[]>(
|
|
759
|
+
insepctRes,
|
|
760
|
+
);
|
|
691
761
|
}
|
|
692
762
|
}
|
|
693
763
|
}
|
|
@@ -733,23 +803,32 @@ export namespace debug {
|
|
|
733
803
|
client: SuiClient,
|
|
734
804
|
args: [string | ObjectCallArg | TransactionArgument],
|
|
735
805
|
typeArguments: [TypeDescriptor<T0> | string],
|
|
736
|
-
) {
|
|
806
|
+
): Promise<TypedDevInspectResults<[]>> {
|
|
737
807
|
const tx = new TransactionBlock();
|
|
738
808
|
builder.print(tx, args, typeArguments);
|
|
739
|
-
const
|
|
809
|
+
const insepctRes = await client.devInspectTransactionBlock({
|
|
740
810
|
transactionBlock: tx,
|
|
741
811
|
sender: ZERO_ADDRESS,
|
|
742
812
|
});
|
|
743
|
-
|
|
813
|
+
|
|
814
|
+
return (await getMoveCoder(client)).decodeDevInspectResult<[]>(
|
|
815
|
+
insepctRes,
|
|
816
|
+
);
|
|
744
817
|
}
|
|
745
|
-
export async function printStackTrace(
|
|
818
|
+
export async function printStackTrace(
|
|
819
|
+
client: SuiClient,
|
|
820
|
+
args: [],
|
|
821
|
+
): Promise<TypedDevInspectResults<[]>> {
|
|
746
822
|
const tx = new TransactionBlock();
|
|
747
823
|
builder.printStackTrace(tx, args);
|
|
748
|
-
const
|
|
824
|
+
const insepctRes = await client.devInspectTransactionBlock({
|
|
749
825
|
transactionBlock: tx,
|
|
750
826
|
sender: ZERO_ADDRESS,
|
|
751
827
|
});
|
|
752
|
-
|
|
828
|
+
|
|
829
|
+
return (await getMoveCoder(client)).decodeDevInspectResult<[]>(
|
|
830
|
+
insepctRes,
|
|
831
|
+
);
|
|
753
832
|
}
|
|
754
833
|
}
|
|
755
834
|
}
|
|
@@ -868,26 +947,32 @@ export namespace fixed_point32 {
|
|
|
868
947
|
export async function createFromRational(
|
|
869
948
|
client: SuiClient,
|
|
870
949
|
args: [bigint | TransactionArgument, bigint | TransactionArgument],
|
|
871
|
-
) {
|
|
950
|
+
): Promise<TypedDevInspectResults<[fixed_point32.FixedPoint32]>> {
|
|
872
951
|
const tx = new TransactionBlock();
|
|
873
952
|
builder.createFromRational(tx, args);
|
|
874
|
-
const
|
|
953
|
+
const insepctRes = await client.devInspectTransactionBlock({
|
|
875
954
|
transactionBlock: tx,
|
|
876
955
|
sender: ZERO_ADDRESS,
|
|
877
956
|
});
|
|
878
|
-
|
|
957
|
+
|
|
958
|
+
return (await getMoveCoder(client)).decodeDevInspectResult<
|
|
959
|
+
[fixed_point32.FixedPoint32]
|
|
960
|
+
>(insepctRes);
|
|
879
961
|
}
|
|
880
962
|
export async function createFromRawValue(
|
|
881
963
|
client: SuiClient,
|
|
882
964
|
args: [bigint | TransactionArgument],
|
|
883
|
-
) {
|
|
965
|
+
): Promise<TypedDevInspectResults<[fixed_point32.FixedPoint32]>> {
|
|
884
966
|
const tx = new TransactionBlock();
|
|
885
967
|
builder.createFromRawValue(tx, args);
|
|
886
|
-
const
|
|
968
|
+
const insepctRes = await client.devInspectTransactionBlock({
|
|
887
969
|
transactionBlock: tx,
|
|
888
970
|
sender: ZERO_ADDRESS,
|
|
889
971
|
});
|
|
890
|
-
|
|
972
|
+
|
|
973
|
+
return (await getMoveCoder(client)).decodeDevInspectResult<
|
|
974
|
+
[fixed_point32.FixedPoint32]
|
|
975
|
+
>(insepctRes);
|
|
891
976
|
}
|
|
892
977
|
export async function divideU64(
|
|
893
978
|
client: SuiClient,
|
|
@@ -895,38 +980,47 @@ export namespace fixed_point32 {
|
|
|
895
980
|
bigint | TransactionArgument,
|
|
896
981
|
fixed_point32.FixedPoint32 | TransactionArgument,
|
|
897
982
|
],
|
|
898
|
-
) {
|
|
983
|
+
): Promise<TypedDevInspectResults<[bigint]>> {
|
|
899
984
|
const tx = new TransactionBlock();
|
|
900
985
|
builder.divideU64(tx, args);
|
|
901
|
-
const
|
|
986
|
+
const insepctRes = await client.devInspectTransactionBlock({
|
|
902
987
|
transactionBlock: tx,
|
|
903
988
|
sender: ZERO_ADDRESS,
|
|
904
989
|
});
|
|
905
|
-
|
|
990
|
+
|
|
991
|
+
return (await getMoveCoder(client)).decodeDevInspectResult<[bigint]>(
|
|
992
|
+
insepctRes,
|
|
993
|
+
);
|
|
906
994
|
}
|
|
907
995
|
export async function getRawValue(
|
|
908
996
|
client: SuiClient,
|
|
909
997
|
args: [fixed_point32.FixedPoint32 | TransactionArgument],
|
|
910
|
-
) {
|
|
998
|
+
): Promise<TypedDevInspectResults<[bigint]>> {
|
|
911
999
|
const tx = new TransactionBlock();
|
|
912
1000
|
builder.getRawValue(tx, args);
|
|
913
|
-
const
|
|
1001
|
+
const insepctRes = await client.devInspectTransactionBlock({
|
|
914
1002
|
transactionBlock: tx,
|
|
915
1003
|
sender: ZERO_ADDRESS,
|
|
916
1004
|
});
|
|
917
|
-
|
|
1005
|
+
|
|
1006
|
+
return (await getMoveCoder(client)).decodeDevInspectResult<[bigint]>(
|
|
1007
|
+
insepctRes,
|
|
1008
|
+
);
|
|
918
1009
|
}
|
|
919
1010
|
export async function isZero(
|
|
920
1011
|
client: SuiClient,
|
|
921
1012
|
args: [fixed_point32.FixedPoint32 | TransactionArgument],
|
|
922
|
-
) {
|
|
1013
|
+
): Promise<TypedDevInspectResults<[Boolean]>> {
|
|
923
1014
|
const tx = new TransactionBlock();
|
|
924
1015
|
builder.isZero(tx, args);
|
|
925
|
-
const
|
|
1016
|
+
const insepctRes = await client.devInspectTransactionBlock({
|
|
926
1017
|
transactionBlock: tx,
|
|
927
1018
|
sender: ZERO_ADDRESS,
|
|
928
1019
|
});
|
|
929
|
-
|
|
1020
|
+
|
|
1021
|
+
return (await getMoveCoder(client)).decodeDevInspectResult<[Boolean]>(
|
|
1022
|
+
insepctRes,
|
|
1023
|
+
);
|
|
930
1024
|
}
|
|
931
1025
|
export async function multiplyU64(
|
|
932
1026
|
client: SuiClient,
|
|
@@ -934,14 +1028,17 @@ export namespace fixed_point32 {
|
|
|
934
1028
|
bigint | TransactionArgument,
|
|
935
1029
|
fixed_point32.FixedPoint32 | TransactionArgument,
|
|
936
1030
|
],
|
|
937
|
-
) {
|
|
1031
|
+
): Promise<TypedDevInspectResults<[bigint]>> {
|
|
938
1032
|
const tx = new TransactionBlock();
|
|
939
1033
|
builder.multiplyU64(tx, args);
|
|
940
|
-
const
|
|
1034
|
+
const insepctRes = await client.devInspectTransactionBlock({
|
|
941
1035
|
transactionBlock: tx,
|
|
942
1036
|
sender: ZERO_ADDRESS,
|
|
943
1037
|
});
|
|
944
|
-
|
|
1038
|
+
|
|
1039
|
+
return (await getMoveCoder(client)).decodeDevInspectResult<[bigint]>(
|
|
1040
|
+
insepctRes,
|
|
1041
|
+
);
|
|
945
1042
|
}
|
|
946
1043
|
}
|
|
947
1044
|
}
|
|
@@ -993,26 +1090,32 @@ export namespace hash {
|
|
|
993
1090
|
export async function sha2256(
|
|
994
1091
|
client: SuiClient,
|
|
995
1092
|
args: [(string | ObjectCallArg)[] | TransactionArgument],
|
|
996
|
-
) {
|
|
1093
|
+
): Promise<TypedDevInspectResults<[number[]]>> {
|
|
997
1094
|
const tx = new TransactionBlock();
|
|
998
1095
|
builder.sha2256(tx, args);
|
|
999
|
-
const
|
|
1096
|
+
const insepctRes = await client.devInspectTransactionBlock({
|
|
1000
1097
|
transactionBlock: tx,
|
|
1001
1098
|
sender: ZERO_ADDRESS,
|
|
1002
1099
|
});
|
|
1003
|
-
|
|
1100
|
+
|
|
1101
|
+
return (await getMoveCoder(client)).decodeDevInspectResult<[number[]]>(
|
|
1102
|
+
insepctRes,
|
|
1103
|
+
);
|
|
1004
1104
|
}
|
|
1005
1105
|
export async function sha3256(
|
|
1006
1106
|
client: SuiClient,
|
|
1007
1107
|
args: [(string | ObjectCallArg)[] | TransactionArgument],
|
|
1008
|
-
) {
|
|
1108
|
+
): Promise<TypedDevInspectResults<[number[]]>> {
|
|
1009
1109
|
const tx = new TransactionBlock();
|
|
1010
1110
|
builder.sha3256(tx, args);
|
|
1011
|
-
const
|
|
1111
|
+
const insepctRes = await client.devInspectTransactionBlock({
|
|
1012
1112
|
transactionBlock: tx,
|
|
1013
1113
|
sender: ZERO_ADDRESS,
|
|
1014
1114
|
});
|
|
1015
|
-
|
|
1115
|
+
|
|
1116
|
+
return (await getMoveCoder(client)).decodeDevInspectResult<[number[]]>(
|
|
1117
|
+
insepctRes,
|
|
1118
|
+
);
|
|
1016
1119
|
}
|
|
1017
1120
|
}
|
|
1018
1121
|
}
|
|
@@ -1411,27 +1514,33 @@ export namespace option {
|
|
|
1411
1514
|
client: SuiClient,
|
|
1412
1515
|
args: [string | ObjectCallArg | TransactionArgument],
|
|
1413
1516
|
typeArguments: [TypeDescriptor<T0> | string],
|
|
1414
|
-
) {
|
|
1517
|
+
): Promise<TypedDevInspectResults<[string]>> {
|
|
1415
1518
|
const tx = new TransactionBlock();
|
|
1416
1519
|
builder.borrow(tx, args, typeArguments);
|
|
1417
|
-
const
|
|
1520
|
+
const insepctRes = await client.devInspectTransactionBlock({
|
|
1418
1521
|
transactionBlock: tx,
|
|
1419
1522
|
sender: ZERO_ADDRESS,
|
|
1420
1523
|
});
|
|
1421
|
-
|
|
1524
|
+
|
|
1525
|
+
return (await getMoveCoder(client)).decodeDevInspectResult<[string]>(
|
|
1526
|
+
insepctRes,
|
|
1527
|
+
);
|
|
1422
1528
|
}
|
|
1423
1529
|
export async function borrowMut<T0 = any>(
|
|
1424
1530
|
client: SuiClient,
|
|
1425
1531
|
args: [string | ObjectCallArg | TransactionArgument],
|
|
1426
1532
|
typeArguments: [TypeDescriptor<T0> | string],
|
|
1427
|
-
) {
|
|
1533
|
+
): Promise<TypedDevInspectResults<[string]>> {
|
|
1428
1534
|
const tx = new TransactionBlock();
|
|
1429
1535
|
builder.borrowMut(tx, args, typeArguments);
|
|
1430
|
-
const
|
|
1536
|
+
const insepctRes = await client.devInspectTransactionBlock({
|
|
1431
1537
|
transactionBlock: tx,
|
|
1432
1538
|
sender: ZERO_ADDRESS,
|
|
1433
1539
|
});
|
|
1434
|
-
|
|
1540
|
+
|
|
1541
|
+
return (await getMoveCoder(client)).decodeDevInspectResult<[string]>(
|
|
1542
|
+
insepctRes,
|
|
1543
|
+
);
|
|
1435
1544
|
}
|
|
1436
1545
|
export async function borrowWithDefault<T0 = any>(
|
|
1437
1546
|
client: SuiClient,
|
|
@@ -1440,14 +1549,17 @@ export namespace option {
|
|
|
1440
1549
|
string | ObjectCallArg | TransactionArgument,
|
|
1441
1550
|
],
|
|
1442
1551
|
typeArguments: [TypeDescriptor<T0> | string],
|
|
1443
|
-
) {
|
|
1552
|
+
): Promise<TypedDevInspectResults<[string]>> {
|
|
1444
1553
|
const tx = new TransactionBlock();
|
|
1445
1554
|
builder.borrowWithDefault(tx, args, typeArguments);
|
|
1446
|
-
const
|
|
1555
|
+
const insepctRes = await client.devInspectTransactionBlock({
|
|
1447
1556
|
transactionBlock: tx,
|
|
1448
1557
|
sender: ZERO_ADDRESS,
|
|
1449
1558
|
});
|
|
1450
|
-
|
|
1559
|
+
|
|
1560
|
+
return (await getMoveCoder(client)).decodeDevInspectResult<[string]>(
|
|
1561
|
+
insepctRes,
|
|
1562
|
+
);
|
|
1451
1563
|
}
|
|
1452
1564
|
export async function contains<T0 = any>(
|
|
1453
1565
|
client: SuiClient,
|
|
@@ -1456,66 +1568,81 @@ export namespace option {
|
|
|
1456
1568
|
string | ObjectCallArg | TransactionArgument,
|
|
1457
1569
|
],
|
|
1458
1570
|
typeArguments: [TypeDescriptor<T0> | string],
|
|
1459
|
-
) {
|
|
1571
|
+
): Promise<TypedDevInspectResults<[Boolean]>> {
|
|
1460
1572
|
const tx = new TransactionBlock();
|
|
1461
1573
|
builder.contains(tx, args, typeArguments);
|
|
1462
|
-
const
|
|
1574
|
+
const insepctRes = await client.devInspectTransactionBlock({
|
|
1463
1575
|
transactionBlock: tx,
|
|
1464
1576
|
sender: ZERO_ADDRESS,
|
|
1465
1577
|
});
|
|
1466
|
-
|
|
1578
|
+
|
|
1579
|
+
return (await getMoveCoder(client)).decodeDevInspectResult<[Boolean]>(
|
|
1580
|
+
insepctRes,
|
|
1581
|
+
);
|
|
1467
1582
|
}
|
|
1468
1583
|
export async function destroyNone<T0 = any>(
|
|
1469
1584
|
client: SuiClient,
|
|
1470
1585
|
args: [option.Option<T0> | TransactionArgument],
|
|
1471
1586
|
typeArguments: [TypeDescriptor<T0> | string],
|
|
1472
|
-
) {
|
|
1587
|
+
): Promise<TypedDevInspectResults<[]>> {
|
|
1473
1588
|
const tx = new TransactionBlock();
|
|
1474
1589
|
builder.destroyNone(tx, args, typeArguments);
|
|
1475
|
-
const
|
|
1590
|
+
const insepctRes = await client.devInspectTransactionBlock({
|
|
1476
1591
|
transactionBlock: tx,
|
|
1477
1592
|
sender: ZERO_ADDRESS,
|
|
1478
1593
|
});
|
|
1479
|
-
|
|
1594
|
+
|
|
1595
|
+
return (await getMoveCoder(client)).decodeDevInspectResult<[]>(
|
|
1596
|
+
insepctRes,
|
|
1597
|
+
);
|
|
1480
1598
|
}
|
|
1481
1599
|
export async function destroySome<T0 = any>(
|
|
1482
1600
|
client: SuiClient,
|
|
1483
1601
|
args: [option.Option<T0> | TransactionArgument],
|
|
1484
1602
|
typeArguments: [TypeDescriptor<T0> | string],
|
|
1485
|
-
) {
|
|
1603
|
+
): Promise<TypedDevInspectResults<[T0]>> {
|
|
1486
1604
|
const tx = new TransactionBlock();
|
|
1487
1605
|
builder.destroySome(tx, args, typeArguments);
|
|
1488
|
-
const
|
|
1606
|
+
const insepctRes = await client.devInspectTransactionBlock({
|
|
1489
1607
|
transactionBlock: tx,
|
|
1490
1608
|
sender: ZERO_ADDRESS,
|
|
1491
1609
|
});
|
|
1492
|
-
|
|
1610
|
+
|
|
1611
|
+
return (await getMoveCoder(client)).decodeDevInspectResult<[T0]>(
|
|
1612
|
+
insepctRes,
|
|
1613
|
+
);
|
|
1493
1614
|
}
|
|
1494
1615
|
export async function destroyWithDefault<T0 = any>(
|
|
1495
1616
|
client: SuiClient,
|
|
1496
1617
|
args: [option.Option<T0> | TransactionArgument, T0 | TransactionArgument],
|
|
1497
1618
|
typeArguments: [TypeDescriptor<T0> | string],
|
|
1498
|
-
) {
|
|
1619
|
+
): Promise<TypedDevInspectResults<[T0]>> {
|
|
1499
1620
|
const tx = new TransactionBlock();
|
|
1500
1621
|
builder.destroyWithDefault(tx, args, typeArguments);
|
|
1501
|
-
const
|
|
1622
|
+
const insepctRes = await client.devInspectTransactionBlock({
|
|
1502
1623
|
transactionBlock: tx,
|
|
1503
1624
|
sender: ZERO_ADDRESS,
|
|
1504
1625
|
});
|
|
1505
|
-
|
|
1626
|
+
|
|
1627
|
+
return (await getMoveCoder(client)).decodeDevInspectResult<[T0]>(
|
|
1628
|
+
insepctRes,
|
|
1629
|
+
);
|
|
1506
1630
|
}
|
|
1507
1631
|
export async function extract<T0 = any>(
|
|
1508
1632
|
client: SuiClient,
|
|
1509
1633
|
args: [string | ObjectCallArg | TransactionArgument],
|
|
1510
1634
|
typeArguments: [TypeDescriptor<T0> | string],
|
|
1511
|
-
) {
|
|
1635
|
+
): Promise<TypedDevInspectResults<[T0]>> {
|
|
1512
1636
|
const tx = new TransactionBlock();
|
|
1513
1637
|
builder.extract(tx, args, typeArguments);
|
|
1514
|
-
const
|
|
1638
|
+
const insepctRes = await client.devInspectTransactionBlock({
|
|
1515
1639
|
transactionBlock: tx,
|
|
1516
1640
|
sender: ZERO_ADDRESS,
|
|
1517
1641
|
});
|
|
1518
|
-
|
|
1642
|
+
|
|
1643
|
+
return (await getMoveCoder(client)).decodeDevInspectResult<[T0]>(
|
|
1644
|
+
insepctRes,
|
|
1645
|
+
);
|
|
1519
1646
|
}
|
|
1520
1647
|
export async function fill<T0 = any>(
|
|
1521
1648
|
client: SuiClient,
|
|
@@ -1524,14 +1651,17 @@ export namespace option {
|
|
|
1524
1651
|
T0 | TransactionArgument,
|
|
1525
1652
|
],
|
|
1526
1653
|
typeArguments: [TypeDescriptor<T0> | string],
|
|
1527
|
-
) {
|
|
1654
|
+
): Promise<TypedDevInspectResults<[]>> {
|
|
1528
1655
|
const tx = new TransactionBlock();
|
|
1529
1656
|
builder.fill(tx, args, typeArguments);
|
|
1530
|
-
const
|
|
1657
|
+
const insepctRes = await client.devInspectTransactionBlock({
|
|
1531
1658
|
transactionBlock: tx,
|
|
1532
1659
|
sender: ZERO_ADDRESS,
|
|
1533
1660
|
});
|
|
1534
|
-
|
|
1661
|
+
|
|
1662
|
+
return (await getMoveCoder(client)).decodeDevInspectResult<[]>(
|
|
1663
|
+
insepctRes,
|
|
1664
|
+
);
|
|
1535
1665
|
}
|
|
1536
1666
|
export async function getWithDefault<T0 = any>(
|
|
1537
1667
|
client: SuiClient,
|
|
@@ -1540,66 +1670,81 @@ export namespace option {
|
|
|
1540
1670
|
T0 | TransactionArgument,
|
|
1541
1671
|
],
|
|
1542
1672
|
typeArguments: [TypeDescriptor<T0> | string],
|
|
1543
|
-
) {
|
|
1673
|
+
): Promise<TypedDevInspectResults<[T0]>> {
|
|
1544
1674
|
const tx = new TransactionBlock();
|
|
1545
1675
|
builder.getWithDefault(tx, args, typeArguments);
|
|
1546
|
-
const
|
|
1676
|
+
const insepctRes = await client.devInspectTransactionBlock({
|
|
1547
1677
|
transactionBlock: tx,
|
|
1548
1678
|
sender: ZERO_ADDRESS,
|
|
1549
1679
|
});
|
|
1550
|
-
|
|
1680
|
+
|
|
1681
|
+
return (await getMoveCoder(client)).decodeDevInspectResult<[T0]>(
|
|
1682
|
+
insepctRes,
|
|
1683
|
+
);
|
|
1551
1684
|
}
|
|
1552
1685
|
export async function isNone<T0 = any>(
|
|
1553
1686
|
client: SuiClient,
|
|
1554
1687
|
args: [string | ObjectCallArg | TransactionArgument],
|
|
1555
1688
|
typeArguments: [TypeDescriptor<T0> | string],
|
|
1556
|
-
) {
|
|
1689
|
+
): Promise<TypedDevInspectResults<[Boolean]>> {
|
|
1557
1690
|
const tx = new TransactionBlock();
|
|
1558
1691
|
builder.isNone(tx, args, typeArguments);
|
|
1559
|
-
const
|
|
1692
|
+
const insepctRes = await client.devInspectTransactionBlock({
|
|
1560
1693
|
transactionBlock: tx,
|
|
1561
1694
|
sender: ZERO_ADDRESS,
|
|
1562
1695
|
});
|
|
1563
|
-
|
|
1696
|
+
|
|
1697
|
+
return (await getMoveCoder(client)).decodeDevInspectResult<[Boolean]>(
|
|
1698
|
+
insepctRes,
|
|
1699
|
+
);
|
|
1564
1700
|
}
|
|
1565
1701
|
export async function isSome<T0 = any>(
|
|
1566
1702
|
client: SuiClient,
|
|
1567
1703
|
args: [string | ObjectCallArg | TransactionArgument],
|
|
1568
1704
|
typeArguments: [TypeDescriptor<T0> | string],
|
|
1569
|
-
) {
|
|
1705
|
+
): Promise<TypedDevInspectResults<[Boolean]>> {
|
|
1570
1706
|
const tx = new TransactionBlock();
|
|
1571
1707
|
builder.isSome(tx, args, typeArguments);
|
|
1572
|
-
const
|
|
1708
|
+
const insepctRes = await client.devInspectTransactionBlock({
|
|
1573
1709
|
transactionBlock: tx,
|
|
1574
1710
|
sender: ZERO_ADDRESS,
|
|
1575
1711
|
});
|
|
1576
|
-
|
|
1712
|
+
|
|
1713
|
+
return (await getMoveCoder(client)).decodeDevInspectResult<[Boolean]>(
|
|
1714
|
+
insepctRes,
|
|
1715
|
+
);
|
|
1577
1716
|
}
|
|
1578
1717
|
export async function none<T0 = any>(
|
|
1579
1718
|
client: SuiClient,
|
|
1580
1719
|
args: [],
|
|
1581
1720
|
typeArguments: [TypeDescriptor<T0> | string],
|
|
1582
|
-
) {
|
|
1721
|
+
): Promise<TypedDevInspectResults<[option.Option<T0>]>> {
|
|
1583
1722
|
const tx = new TransactionBlock();
|
|
1584
1723
|
builder.none(tx, args, typeArguments);
|
|
1585
|
-
const
|
|
1724
|
+
const insepctRes = await client.devInspectTransactionBlock({
|
|
1586
1725
|
transactionBlock: tx,
|
|
1587
1726
|
sender: ZERO_ADDRESS,
|
|
1588
1727
|
});
|
|
1589
|
-
|
|
1728
|
+
|
|
1729
|
+
return (await getMoveCoder(client)).decodeDevInspectResult<
|
|
1730
|
+
[option.Option<T0>]
|
|
1731
|
+
>(insepctRes);
|
|
1590
1732
|
}
|
|
1591
1733
|
export async function some<T0 = any>(
|
|
1592
1734
|
client: SuiClient,
|
|
1593
1735
|
args: [T0 | TransactionArgument],
|
|
1594
1736
|
typeArguments: [TypeDescriptor<T0> | string],
|
|
1595
|
-
) {
|
|
1737
|
+
): Promise<TypedDevInspectResults<[option.Option<T0>]>> {
|
|
1596
1738
|
const tx = new TransactionBlock();
|
|
1597
1739
|
builder.some(tx, args, typeArguments);
|
|
1598
|
-
const
|
|
1740
|
+
const insepctRes = await client.devInspectTransactionBlock({
|
|
1599
1741
|
transactionBlock: tx,
|
|
1600
1742
|
sender: ZERO_ADDRESS,
|
|
1601
1743
|
});
|
|
1602
|
-
|
|
1744
|
+
|
|
1745
|
+
return (await getMoveCoder(client)).decodeDevInspectResult<
|
|
1746
|
+
[option.Option<T0>]
|
|
1747
|
+
>(insepctRes);
|
|
1603
1748
|
}
|
|
1604
1749
|
export async function swap<T0 = any>(
|
|
1605
1750
|
client: SuiClient,
|
|
@@ -1608,14 +1753,17 @@ export namespace option {
|
|
|
1608
1753
|
T0 | TransactionArgument,
|
|
1609
1754
|
],
|
|
1610
1755
|
typeArguments: [TypeDescriptor<T0> | string],
|
|
1611
|
-
) {
|
|
1756
|
+
): Promise<TypedDevInspectResults<[T0]>> {
|
|
1612
1757
|
const tx = new TransactionBlock();
|
|
1613
1758
|
builder.swap(tx, args, typeArguments);
|
|
1614
|
-
const
|
|
1759
|
+
const insepctRes = await client.devInspectTransactionBlock({
|
|
1615
1760
|
transactionBlock: tx,
|
|
1616
1761
|
sender: ZERO_ADDRESS,
|
|
1617
1762
|
});
|
|
1618
|
-
|
|
1763
|
+
|
|
1764
|
+
return (await getMoveCoder(client)).decodeDevInspectResult<[T0]>(
|
|
1765
|
+
insepctRes,
|
|
1766
|
+
);
|
|
1619
1767
|
}
|
|
1620
1768
|
export async function swapOrFill<T0 = any>(
|
|
1621
1769
|
client: SuiClient,
|
|
@@ -1624,27 +1772,33 @@ export namespace option {
|
|
|
1624
1772
|
T0 | TransactionArgument,
|
|
1625
1773
|
],
|
|
1626
1774
|
typeArguments: [TypeDescriptor<T0> | string],
|
|
1627
|
-
) {
|
|
1775
|
+
): Promise<TypedDevInspectResults<[option.Option<T0>]>> {
|
|
1628
1776
|
const tx = new TransactionBlock();
|
|
1629
1777
|
builder.swapOrFill(tx, args, typeArguments);
|
|
1630
|
-
const
|
|
1778
|
+
const insepctRes = await client.devInspectTransactionBlock({
|
|
1631
1779
|
transactionBlock: tx,
|
|
1632
1780
|
sender: ZERO_ADDRESS,
|
|
1633
1781
|
});
|
|
1634
|
-
|
|
1782
|
+
|
|
1783
|
+
return (await getMoveCoder(client)).decodeDevInspectResult<
|
|
1784
|
+
[option.Option<T0>]
|
|
1785
|
+
>(insepctRes);
|
|
1635
1786
|
}
|
|
1636
1787
|
export async function toVec<T0 = any>(
|
|
1637
1788
|
client: SuiClient,
|
|
1638
1789
|
args: [option.Option<T0> | TransactionArgument],
|
|
1639
1790
|
typeArguments: [TypeDescriptor<T0> | string],
|
|
1640
|
-
) {
|
|
1791
|
+
): Promise<TypedDevInspectResults<[T0[] | string]>> {
|
|
1641
1792
|
const tx = new TransactionBlock();
|
|
1642
1793
|
builder.toVec(tx, args, typeArguments);
|
|
1643
|
-
const
|
|
1794
|
+
const insepctRes = await client.devInspectTransactionBlock({
|
|
1644
1795
|
transactionBlock: tx,
|
|
1645
1796
|
sender: ZERO_ADDRESS,
|
|
1646
1797
|
});
|
|
1647
|
-
|
|
1798
|
+
|
|
1799
|
+
return (await getMoveCoder(client)).decodeDevInspectResult<
|
|
1800
|
+
[T0[] | string]
|
|
1801
|
+
>(insepctRes);
|
|
1648
1802
|
}
|
|
1649
1803
|
}
|
|
1650
1804
|
}
|
|
@@ -1899,14 +2053,17 @@ export namespace string_ {
|
|
|
1899
2053
|
string | ObjectCallArg | TransactionArgument,
|
|
1900
2054
|
string | TransactionArgument,
|
|
1901
2055
|
],
|
|
1902
|
-
) {
|
|
2056
|
+
): Promise<TypedDevInspectResults<[]>> {
|
|
1903
2057
|
const tx = new TransactionBlock();
|
|
1904
2058
|
builder.append(tx, args);
|
|
1905
|
-
const
|
|
2059
|
+
const insepctRes = await client.devInspectTransactionBlock({
|
|
1906
2060
|
transactionBlock: tx,
|
|
1907
2061
|
sender: ZERO_ADDRESS,
|
|
1908
2062
|
});
|
|
1909
|
-
|
|
2063
|
+
|
|
2064
|
+
return (await getMoveCoder(client)).decodeDevInspectResult<[]>(
|
|
2065
|
+
insepctRes,
|
|
2066
|
+
);
|
|
1910
2067
|
}
|
|
1911
2068
|
export async function appendUtf8(
|
|
1912
2069
|
client: SuiClient,
|
|
@@ -1914,38 +2071,47 @@ export namespace string_ {
|
|
|
1914
2071
|
string | ObjectCallArg | TransactionArgument,
|
|
1915
2072
|
(string | ObjectCallArg)[] | TransactionArgument,
|
|
1916
2073
|
],
|
|
1917
|
-
) {
|
|
2074
|
+
): Promise<TypedDevInspectResults<[]>> {
|
|
1918
2075
|
const tx = new TransactionBlock();
|
|
1919
2076
|
builder.appendUtf8(tx, args);
|
|
1920
|
-
const
|
|
2077
|
+
const insepctRes = await client.devInspectTransactionBlock({
|
|
1921
2078
|
transactionBlock: tx,
|
|
1922
2079
|
sender: ZERO_ADDRESS,
|
|
1923
2080
|
});
|
|
1924
|
-
|
|
2081
|
+
|
|
2082
|
+
return (await getMoveCoder(client)).decodeDevInspectResult<[]>(
|
|
2083
|
+
insepctRes,
|
|
2084
|
+
);
|
|
1925
2085
|
}
|
|
1926
2086
|
export async function bytes(
|
|
1927
2087
|
client: SuiClient,
|
|
1928
2088
|
args: [string | ObjectCallArg | TransactionArgument],
|
|
1929
|
-
) {
|
|
2089
|
+
): Promise<TypedDevInspectResults<[string]>> {
|
|
1930
2090
|
const tx = new TransactionBlock();
|
|
1931
2091
|
builder.bytes(tx, args);
|
|
1932
|
-
const
|
|
2092
|
+
const insepctRes = await client.devInspectTransactionBlock({
|
|
1933
2093
|
transactionBlock: tx,
|
|
1934
2094
|
sender: ZERO_ADDRESS,
|
|
1935
2095
|
});
|
|
1936
|
-
|
|
2096
|
+
|
|
2097
|
+
return (await getMoveCoder(client)).decodeDevInspectResult<[string]>(
|
|
2098
|
+
insepctRes,
|
|
2099
|
+
);
|
|
1937
2100
|
}
|
|
1938
2101
|
export async function fromAscii(
|
|
1939
2102
|
client: SuiClient,
|
|
1940
2103
|
args: [ascii.String | TransactionArgument],
|
|
1941
|
-
) {
|
|
2104
|
+
): Promise<TypedDevInspectResults<[string]>> {
|
|
1942
2105
|
const tx = new TransactionBlock();
|
|
1943
2106
|
builder.fromAscii(tx, args);
|
|
1944
|
-
const
|
|
2107
|
+
const insepctRes = await client.devInspectTransactionBlock({
|
|
1945
2108
|
transactionBlock: tx,
|
|
1946
2109
|
sender: ZERO_ADDRESS,
|
|
1947
2110
|
});
|
|
1948
|
-
|
|
2111
|
+
|
|
2112
|
+
return (await getMoveCoder(client)).decodeDevInspectResult<[string]>(
|
|
2113
|
+
insepctRes,
|
|
2114
|
+
);
|
|
1949
2115
|
}
|
|
1950
2116
|
export async function indexOf(
|
|
1951
2117
|
client: SuiClient,
|
|
@@ -1953,14 +2119,17 @@ export namespace string_ {
|
|
|
1953
2119
|
string | ObjectCallArg | TransactionArgument,
|
|
1954
2120
|
string | ObjectCallArg | TransactionArgument,
|
|
1955
2121
|
],
|
|
1956
|
-
) {
|
|
2122
|
+
): Promise<TypedDevInspectResults<[bigint]>> {
|
|
1957
2123
|
const tx = new TransactionBlock();
|
|
1958
2124
|
builder.indexOf(tx, args);
|
|
1959
|
-
const
|
|
2125
|
+
const insepctRes = await client.devInspectTransactionBlock({
|
|
1960
2126
|
transactionBlock: tx,
|
|
1961
2127
|
sender: ZERO_ADDRESS,
|
|
1962
2128
|
});
|
|
1963
|
-
|
|
2129
|
+
|
|
2130
|
+
return (await getMoveCoder(client)).decodeDevInspectResult<[bigint]>(
|
|
2131
|
+
insepctRes,
|
|
2132
|
+
);
|
|
1964
2133
|
}
|
|
1965
2134
|
export async function insert(
|
|
1966
2135
|
client: SuiClient,
|
|
@@ -1969,38 +2138,47 @@ export namespace string_ {
|
|
|
1969
2138
|
bigint | TransactionArgument,
|
|
1970
2139
|
string | TransactionArgument,
|
|
1971
2140
|
],
|
|
1972
|
-
) {
|
|
2141
|
+
): Promise<TypedDevInspectResults<[]>> {
|
|
1973
2142
|
const tx = new TransactionBlock();
|
|
1974
2143
|
builder.insert(tx, args);
|
|
1975
|
-
const
|
|
2144
|
+
const insepctRes = await client.devInspectTransactionBlock({
|
|
1976
2145
|
transactionBlock: tx,
|
|
1977
2146
|
sender: ZERO_ADDRESS,
|
|
1978
2147
|
});
|
|
1979
|
-
|
|
2148
|
+
|
|
2149
|
+
return (await getMoveCoder(client)).decodeDevInspectResult<[]>(
|
|
2150
|
+
insepctRes,
|
|
2151
|
+
);
|
|
1980
2152
|
}
|
|
1981
2153
|
export async function isEmpty(
|
|
1982
2154
|
client: SuiClient,
|
|
1983
2155
|
args: [string | ObjectCallArg | TransactionArgument],
|
|
1984
|
-
) {
|
|
2156
|
+
): Promise<TypedDevInspectResults<[Boolean]>> {
|
|
1985
2157
|
const tx = new TransactionBlock();
|
|
1986
2158
|
builder.isEmpty(tx, args);
|
|
1987
|
-
const
|
|
2159
|
+
const insepctRes = await client.devInspectTransactionBlock({
|
|
1988
2160
|
transactionBlock: tx,
|
|
1989
2161
|
sender: ZERO_ADDRESS,
|
|
1990
2162
|
});
|
|
1991
|
-
|
|
2163
|
+
|
|
2164
|
+
return (await getMoveCoder(client)).decodeDevInspectResult<[Boolean]>(
|
|
2165
|
+
insepctRes,
|
|
2166
|
+
);
|
|
1992
2167
|
}
|
|
1993
2168
|
export async function length(
|
|
1994
2169
|
client: SuiClient,
|
|
1995
2170
|
args: [string | ObjectCallArg | TransactionArgument],
|
|
1996
|
-
) {
|
|
2171
|
+
): Promise<TypedDevInspectResults<[bigint]>> {
|
|
1997
2172
|
const tx = new TransactionBlock();
|
|
1998
2173
|
builder.length(tx, args);
|
|
1999
|
-
const
|
|
2174
|
+
const insepctRes = await client.devInspectTransactionBlock({
|
|
2000
2175
|
transactionBlock: tx,
|
|
2001
2176
|
sender: ZERO_ADDRESS,
|
|
2002
2177
|
});
|
|
2003
|
-
|
|
2178
|
+
|
|
2179
|
+
return (await getMoveCoder(client)).decodeDevInspectResult<[bigint]>(
|
|
2180
|
+
insepctRes,
|
|
2181
|
+
);
|
|
2004
2182
|
}
|
|
2005
2183
|
export async function subString(
|
|
2006
2184
|
client: SuiClient,
|
|
@@ -2009,50 +2187,62 @@ export namespace string_ {
|
|
|
2009
2187
|
bigint | TransactionArgument,
|
|
2010
2188
|
bigint | TransactionArgument,
|
|
2011
2189
|
],
|
|
2012
|
-
) {
|
|
2190
|
+
): Promise<TypedDevInspectResults<[string]>> {
|
|
2013
2191
|
const tx = new TransactionBlock();
|
|
2014
2192
|
builder.subString(tx, args);
|
|
2015
|
-
const
|
|
2193
|
+
const insepctRes = await client.devInspectTransactionBlock({
|
|
2016
2194
|
transactionBlock: tx,
|
|
2017
2195
|
sender: ZERO_ADDRESS,
|
|
2018
2196
|
});
|
|
2019
|
-
|
|
2197
|
+
|
|
2198
|
+
return (await getMoveCoder(client)).decodeDevInspectResult<[string]>(
|
|
2199
|
+
insepctRes,
|
|
2200
|
+
);
|
|
2020
2201
|
}
|
|
2021
2202
|
export async function toAscii(
|
|
2022
2203
|
client: SuiClient,
|
|
2023
2204
|
args: [string | TransactionArgument],
|
|
2024
|
-
) {
|
|
2205
|
+
): Promise<TypedDevInspectResults<[ascii.String]>> {
|
|
2025
2206
|
const tx = new TransactionBlock();
|
|
2026
2207
|
builder.toAscii(tx, args);
|
|
2027
|
-
const
|
|
2208
|
+
const insepctRes = await client.devInspectTransactionBlock({
|
|
2028
2209
|
transactionBlock: tx,
|
|
2029
2210
|
sender: ZERO_ADDRESS,
|
|
2030
2211
|
});
|
|
2031
|
-
|
|
2212
|
+
|
|
2213
|
+
return (await getMoveCoder(client)).decodeDevInspectResult<
|
|
2214
|
+
[ascii.String]
|
|
2215
|
+
>(insepctRes);
|
|
2032
2216
|
}
|
|
2033
2217
|
export async function tryUtf8(
|
|
2034
2218
|
client: SuiClient,
|
|
2035
2219
|
args: [(string | ObjectCallArg)[] | TransactionArgument],
|
|
2036
|
-
) {
|
|
2220
|
+
): Promise<TypedDevInspectResults<[option.Option<string>]>> {
|
|
2037
2221
|
const tx = new TransactionBlock();
|
|
2038
2222
|
builder.tryUtf8(tx, args);
|
|
2039
|
-
const
|
|
2223
|
+
const insepctRes = await client.devInspectTransactionBlock({
|
|
2040
2224
|
transactionBlock: tx,
|
|
2041
2225
|
sender: ZERO_ADDRESS,
|
|
2042
2226
|
});
|
|
2043
|
-
|
|
2227
|
+
|
|
2228
|
+
return (await getMoveCoder(client)).decodeDevInspectResult<
|
|
2229
|
+
[option.Option<string>]
|
|
2230
|
+
>(insepctRes);
|
|
2044
2231
|
}
|
|
2045
2232
|
export async function utf8(
|
|
2046
2233
|
client: SuiClient,
|
|
2047
2234
|
args: [(string | ObjectCallArg)[] | TransactionArgument],
|
|
2048
|
-
) {
|
|
2235
|
+
): Promise<TypedDevInspectResults<[string]>> {
|
|
2049
2236
|
const tx = new TransactionBlock();
|
|
2050
2237
|
builder.utf8(tx, args);
|
|
2051
|
-
const
|
|
2238
|
+
const insepctRes = await client.devInspectTransactionBlock({
|
|
2052
2239
|
transactionBlock: tx,
|
|
2053
2240
|
sender: ZERO_ADDRESS,
|
|
2054
2241
|
});
|
|
2055
|
-
|
|
2242
|
+
|
|
2243
|
+
return (await getMoveCoder(client)).decodeDevInspectResult<[string]>(
|
|
2244
|
+
insepctRes,
|
|
2245
|
+
);
|
|
2056
2246
|
}
|
|
2057
2247
|
}
|
|
2058
2248
|
}
|
|
@@ -2159,63 +2349,78 @@ export namespace type_name {
|
|
|
2159
2349
|
export async function borrowString(
|
|
2160
2350
|
client: SuiClient,
|
|
2161
2351
|
args: [string | ObjectCallArg | TransactionArgument],
|
|
2162
|
-
) {
|
|
2352
|
+
): Promise<TypedDevInspectResults<[string]>> {
|
|
2163
2353
|
const tx = new TransactionBlock();
|
|
2164
2354
|
builder.borrowString(tx, args);
|
|
2165
|
-
const
|
|
2355
|
+
const insepctRes = await client.devInspectTransactionBlock({
|
|
2166
2356
|
transactionBlock: tx,
|
|
2167
2357
|
sender: ZERO_ADDRESS,
|
|
2168
2358
|
});
|
|
2169
|
-
|
|
2359
|
+
|
|
2360
|
+
return (await getMoveCoder(client)).decodeDevInspectResult<[string]>(
|
|
2361
|
+
insepctRes,
|
|
2362
|
+
);
|
|
2170
2363
|
}
|
|
2171
2364
|
export async function get<T0 = any>(
|
|
2172
2365
|
client: SuiClient,
|
|
2173
2366
|
args: [],
|
|
2174
2367
|
typeArguments: [TypeDescriptor<T0> | string],
|
|
2175
|
-
) {
|
|
2368
|
+
): Promise<TypedDevInspectResults<[type_name.TypeName]>> {
|
|
2176
2369
|
const tx = new TransactionBlock();
|
|
2177
2370
|
builder.get(tx, args, typeArguments);
|
|
2178
|
-
const
|
|
2371
|
+
const insepctRes = await client.devInspectTransactionBlock({
|
|
2179
2372
|
transactionBlock: tx,
|
|
2180
2373
|
sender: ZERO_ADDRESS,
|
|
2181
2374
|
});
|
|
2182
|
-
|
|
2375
|
+
|
|
2376
|
+
return (await getMoveCoder(client)).decodeDevInspectResult<
|
|
2377
|
+
[type_name.TypeName]
|
|
2378
|
+
>(insepctRes);
|
|
2183
2379
|
}
|
|
2184
2380
|
export async function getAddress(
|
|
2185
2381
|
client: SuiClient,
|
|
2186
2382
|
args: [string | ObjectCallArg | TransactionArgument],
|
|
2187
|
-
) {
|
|
2383
|
+
): Promise<TypedDevInspectResults<[ascii.String]>> {
|
|
2188
2384
|
const tx = new TransactionBlock();
|
|
2189
2385
|
builder.getAddress(tx, args);
|
|
2190
|
-
const
|
|
2386
|
+
const insepctRes = await client.devInspectTransactionBlock({
|
|
2191
2387
|
transactionBlock: tx,
|
|
2192
2388
|
sender: ZERO_ADDRESS,
|
|
2193
2389
|
});
|
|
2194
|
-
|
|
2390
|
+
|
|
2391
|
+
return (await getMoveCoder(client)).decodeDevInspectResult<
|
|
2392
|
+
[ascii.String]
|
|
2393
|
+
>(insepctRes);
|
|
2195
2394
|
}
|
|
2196
2395
|
export async function getModule(
|
|
2197
2396
|
client: SuiClient,
|
|
2198
2397
|
args: [string | ObjectCallArg | TransactionArgument],
|
|
2199
|
-
) {
|
|
2398
|
+
): Promise<TypedDevInspectResults<[ascii.String]>> {
|
|
2200
2399
|
const tx = new TransactionBlock();
|
|
2201
2400
|
builder.getModule(tx, args);
|
|
2202
|
-
const
|
|
2401
|
+
const insepctRes = await client.devInspectTransactionBlock({
|
|
2203
2402
|
transactionBlock: tx,
|
|
2204
2403
|
sender: ZERO_ADDRESS,
|
|
2205
2404
|
});
|
|
2206
|
-
|
|
2405
|
+
|
|
2406
|
+
return (await getMoveCoder(client)).decodeDevInspectResult<
|
|
2407
|
+
[ascii.String]
|
|
2408
|
+
>(insepctRes);
|
|
2207
2409
|
}
|
|
2208
2410
|
export async function intoString(
|
|
2209
2411
|
client: SuiClient,
|
|
2210
2412
|
args: [type_name.TypeName | TransactionArgument],
|
|
2211
|
-
) {
|
|
2413
|
+
): Promise<TypedDevInspectResults<[ascii.String]>> {
|
|
2212
2414
|
const tx = new TransactionBlock();
|
|
2213
2415
|
builder.intoString(tx, args);
|
|
2214
|
-
const
|
|
2416
|
+
const insepctRes = await client.devInspectTransactionBlock({
|
|
2215
2417
|
transactionBlock: tx,
|
|
2216
2418
|
sender: ZERO_ADDRESS,
|
|
2217
2419
|
});
|
|
2218
|
-
|
|
2420
|
+
|
|
2421
|
+
return (await getMoveCoder(client)).decodeDevInspectResult<
|
|
2422
|
+
[ascii.String]
|
|
2423
|
+
>(insepctRes);
|
|
2219
2424
|
}
|
|
2220
2425
|
}
|
|
2221
2426
|
}
|
|
@@ -2645,14 +2850,17 @@ export namespace vector {
|
|
|
2645
2850
|
(string | ObjectCallArg)[] | TransactionArgument,
|
|
2646
2851
|
],
|
|
2647
2852
|
typeArguments: [TypeDescriptor<T0> | string],
|
|
2648
|
-
) {
|
|
2853
|
+
): Promise<TypedDevInspectResults<[]>> {
|
|
2649
2854
|
const tx = new TransactionBlock();
|
|
2650
2855
|
builder.append(tx, args, typeArguments);
|
|
2651
|
-
const
|
|
2856
|
+
const insepctRes = await client.devInspectTransactionBlock({
|
|
2652
2857
|
transactionBlock: tx,
|
|
2653
2858
|
sender: ZERO_ADDRESS,
|
|
2654
2859
|
});
|
|
2655
|
-
|
|
2860
|
+
|
|
2861
|
+
return (await getMoveCoder(client)).decodeDevInspectResult<[]>(
|
|
2862
|
+
insepctRes,
|
|
2863
|
+
);
|
|
2656
2864
|
}
|
|
2657
2865
|
export async function borrow<T0 = any>(
|
|
2658
2866
|
client: SuiClient,
|
|
@@ -2661,14 +2869,17 @@ export namespace vector {
|
|
|
2661
2869
|
bigint | TransactionArgument,
|
|
2662
2870
|
],
|
|
2663
2871
|
typeArguments: [TypeDescriptor<T0> | string],
|
|
2664
|
-
) {
|
|
2872
|
+
): Promise<TypedDevInspectResults<[string]>> {
|
|
2665
2873
|
const tx = new TransactionBlock();
|
|
2666
2874
|
builder.borrow(tx, args, typeArguments);
|
|
2667
|
-
const
|
|
2875
|
+
const insepctRes = await client.devInspectTransactionBlock({
|
|
2668
2876
|
transactionBlock: tx,
|
|
2669
2877
|
sender: ZERO_ADDRESS,
|
|
2670
2878
|
});
|
|
2671
|
-
|
|
2879
|
+
|
|
2880
|
+
return (await getMoveCoder(client)).decodeDevInspectResult<[string]>(
|
|
2881
|
+
insepctRes,
|
|
2882
|
+
);
|
|
2672
2883
|
}
|
|
2673
2884
|
export async function borrowMut<T0 = any>(
|
|
2674
2885
|
client: SuiClient,
|
|
@@ -2677,14 +2888,17 @@ export namespace vector {
|
|
|
2677
2888
|
bigint | TransactionArgument,
|
|
2678
2889
|
],
|
|
2679
2890
|
typeArguments: [TypeDescriptor<T0> | string],
|
|
2680
|
-
) {
|
|
2891
|
+
): Promise<TypedDevInspectResults<[string]>> {
|
|
2681
2892
|
const tx = new TransactionBlock();
|
|
2682
2893
|
builder.borrowMut(tx, args, typeArguments);
|
|
2683
|
-
const
|
|
2894
|
+
const insepctRes = await client.devInspectTransactionBlock({
|
|
2684
2895
|
transactionBlock: tx,
|
|
2685
2896
|
sender: ZERO_ADDRESS,
|
|
2686
2897
|
});
|
|
2687
|
-
|
|
2898
|
+
|
|
2899
|
+
return (await getMoveCoder(client)).decodeDevInspectResult<[string]>(
|
|
2900
|
+
insepctRes,
|
|
2901
|
+
);
|
|
2688
2902
|
}
|
|
2689
2903
|
export async function contains<T0 = any>(
|
|
2690
2904
|
client: SuiClient,
|
|
@@ -2693,40 +2907,49 @@ export namespace vector {
|
|
|
2693
2907
|
string | ObjectCallArg | TransactionArgument,
|
|
2694
2908
|
],
|
|
2695
2909
|
typeArguments: [TypeDescriptor<T0> | string],
|
|
2696
|
-
) {
|
|
2910
|
+
): Promise<TypedDevInspectResults<[Boolean]>> {
|
|
2697
2911
|
const tx = new TransactionBlock();
|
|
2698
2912
|
builder.contains(tx, args, typeArguments);
|
|
2699
|
-
const
|
|
2913
|
+
const insepctRes = await client.devInspectTransactionBlock({
|
|
2700
2914
|
transactionBlock: tx,
|
|
2701
2915
|
sender: ZERO_ADDRESS,
|
|
2702
2916
|
});
|
|
2703
|
-
|
|
2917
|
+
|
|
2918
|
+
return (await getMoveCoder(client)).decodeDevInspectResult<[Boolean]>(
|
|
2919
|
+
insepctRes,
|
|
2920
|
+
);
|
|
2704
2921
|
}
|
|
2705
2922
|
export async function destroyEmpty<T0 = any>(
|
|
2706
2923
|
client: SuiClient,
|
|
2707
2924
|
args: [(string | ObjectCallArg)[] | TransactionArgument],
|
|
2708
2925
|
typeArguments: [TypeDescriptor<T0> | string],
|
|
2709
|
-
) {
|
|
2926
|
+
): Promise<TypedDevInspectResults<[]>> {
|
|
2710
2927
|
const tx = new TransactionBlock();
|
|
2711
2928
|
builder.destroyEmpty(tx, args, typeArguments);
|
|
2712
|
-
const
|
|
2929
|
+
const insepctRes = await client.devInspectTransactionBlock({
|
|
2713
2930
|
transactionBlock: tx,
|
|
2714
2931
|
sender: ZERO_ADDRESS,
|
|
2715
2932
|
});
|
|
2716
|
-
|
|
2933
|
+
|
|
2934
|
+
return (await getMoveCoder(client)).decodeDevInspectResult<[]>(
|
|
2935
|
+
insepctRes,
|
|
2936
|
+
);
|
|
2717
2937
|
}
|
|
2718
2938
|
export async function empty<T0 = any>(
|
|
2719
2939
|
client: SuiClient,
|
|
2720
2940
|
args: [],
|
|
2721
2941
|
typeArguments: [TypeDescriptor<T0> | string],
|
|
2722
|
-
) {
|
|
2942
|
+
): Promise<TypedDevInspectResults<[T0[] | string]>> {
|
|
2723
2943
|
const tx = new TransactionBlock();
|
|
2724
2944
|
builder.empty(tx, args, typeArguments);
|
|
2725
|
-
const
|
|
2945
|
+
const insepctRes = await client.devInspectTransactionBlock({
|
|
2726
2946
|
transactionBlock: tx,
|
|
2727
2947
|
sender: ZERO_ADDRESS,
|
|
2728
2948
|
});
|
|
2729
|
-
|
|
2949
|
+
|
|
2950
|
+
return (await getMoveCoder(client)).decodeDevInspectResult<
|
|
2951
|
+
[T0[] | string]
|
|
2952
|
+
>(insepctRes);
|
|
2730
2953
|
}
|
|
2731
2954
|
export async function indexOf<T0 = any>(
|
|
2732
2955
|
client: SuiClient,
|
|
@@ -2735,14 +2958,17 @@ export namespace vector {
|
|
|
2735
2958
|
string | ObjectCallArg | TransactionArgument,
|
|
2736
2959
|
],
|
|
2737
2960
|
typeArguments: [TypeDescriptor<T0> | string],
|
|
2738
|
-
) {
|
|
2961
|
+
): Promise<TypedDevInspectResults<[Boolean, bigint]>> {
|
|
2739
2962
|
const tx = new TransactionBlock();
|
|
2740
2963
|
builder.indexOf(tx, args, typeArguments);
|
|
2741
|
-
const
|
|
2964
|
+
const insepctRes = await client.devInspectTransactionBlock({
|
|
2742
2965
|
transactionBlock: tx,
|
|
2743
2966
|
sender: ZERO_ADDRESS,
|
|
2744
2967
|
});
|
|
2745
|
-
|
|
2968
|
+
|
|
2969
|
+
return (await getMoveCoder(client)).decodeDevInspectResult<
|
|
2970
|
+
[Boolean, bigint]
|
|
2971
|
+
>(insepctRes);
|
|
2746
2972
|
}
|
|
2747
2973
|
export async function insert<T0 = any>(
|
|
2748
2974
|
client: SuiClient,
|
|
@@ -2752,53 +2978,65 @@ export namespace vector {
|
|
|
2752
2978
|
bigint | TransactionArgument,
|
|
2753
2979
|
],
|
|
2754
2980
|
typeArguments: [TypeDescriptor<T0> | string],
|
|
2755
|
-
) {
|
|
2981
|
+
): Promise<TypedDevInspectResults<[]>> {
|
|
2756
2982
|
const tx = new TransactionBlock();
|
|
2757
2983
|
builder.insert(tx, args, typeArguments);
|
|
2758
|
-
const
|
|
2984
|
+
const insepctRes = await client.devInspectTransactionBlock({
|
|
2759
2985
|
transactionBlock: tx,
|
|
2760
2986
|
sender: ZERO_ADDRESS,
|
|
2761
2987
|
});
|
|
2762
|
-
|
|
2988
|
+
|
|
2989
|
+
return (await getMoveCoder(client)).decodeDevInspectResult<[]>(
|
|
2990
|
+
insepctRes,
|
|
2991
|
+
);
|
|
2763
2992
|
}
|
|
2764
2993
|
export async function isEmpty<T0 = any>(
|
|
2765
2994
|
client: SuiClient,
|
|
2766
2995
|
args: [string | ObjectCallArg | TransactionArgument],
|
|
2767
2996
|
typeArguments: [TypeDescriptor<T0> | string],
|
|
2768
|
-
) {
|
|
2997
|
+
): Promise<TypedDevInspectResults<[Boolean]>> {
|
|
2769
2998
|
const tx = new TransactionBlock();
|
|
2770
2999
|
builder.isEmpty(tx, args, typeArguments);
|
|
2771
|
-
const
|
|
3000
|
+
const insepctRes = await client.devInspectTransactionBlock({
|
|
2772
3001
|
transactionBlock: tx,
|
|
2773
3002
|
sender: ZERO_ADDRESS,
|
|
2774
3003
|
});
|
|
2775
|
-
|
|
3004
|
+
|
|
3005
|
+
return (await getMoveCoder(client)).decodeDevInspectResult<[Boolean]>(
|
|
3006
|
+
insepctRes,
|
|
3007
|
+
);
|
|
2776
3008
|
}
|
|
2777
3009
|
export async function length<T0 = any>(
|
|
2778
3010
|
client: SuiClient,
|
|
2779
3011
|
args: [string | ObjectCallArg | TransactionArgument],
|
|
2780
3012
|
typeArguments: [TypeDescriptor<T0> | string],
|
|
2781
|
-
) {
|
|
3013
|
+
): Promise<TypedDevInspectResults<[bigint]>> {
|
|
2782
3014
|
const tx = new TransactionBlock();
|
|
2783
3015
|
builder.length(tx, args, typeArguments);
|
|
2784
|
-
const
|
|
3016
|
+
const insepctRes = await client.devInspectTransactionBlock({
|
|
2785
3017
|
transactionBlock: tx,
|
|
2786
3018
|
sender: ZERO_ADDRESS,
|
|
2787
3019
|
});
|
|
2788
|
-
|
|
3020
|
+
|
|
3021
|
+
return (await getMoveCoder(client)).decodeDevInspectResult<[bigint]>(
|
|
3022
|
+
insepctRes,
|
|
3023
|
+
);
|
|
2789
3024
|
}
|
|
2790
3025
|
export async function popBack<T0 = any>(
|
|
2791
3026
|
client: SuiClient,
|
|
2792
3027
|
args: [string | ObjectCallArg | TransactionArgument],
|
|
2793
3028
|
typeArguments: [TypeDescriptor<T0> | string],
|
|
2794
|
-
) {
|
|
3029
|
+
): Promise<TypedDevInspectResults<[T0]>> {
|
|
2795
3030
|
const tx = new TransactionBlock();
|
|
2796
3031
|
builder.popBack(tx, args, typeArguments);
|
|
2797
|
-
const
|
|
3032
|
+
const insepctRes = await client.devInspectTransactionBlock({
|
|
2798
3033
|
transactionBlock: tx,
|
|
2799
3034
|
sender: ZERO_ADDRESS,
|
|
2800
3035
|
});
|
|
2801
|
-
|
|
3036
|
+
|
|
3037
|
+
return (await getMoveCoder(client)).decodeDevInspectResult<[T0]>(
|
|
3038
|
+
insepctRes,
|
|
3039
|
+
);
|
|
2802
3040
|
}
|
|
2803
3041
|
export async function pushBack<T0 = any>(
|
|
2804
3042
|
client: SuiClient,
|
|
@@ -2807,14 +3045,17 @@ export namespace vector {
|
|
|
2807
3045
|
T0 | TransactionArgument,
|
|
2808
3046
|
],
|
|
2809
3047
|
typeArguments: [TypeDescriptor<T0> | string],
|
|
2810
|
-
) {
|
|
3048
|
+
): Promise<TypedDevInspectResults<[]>> {
|
|
2811
3049
|
const tx = new TransactionBlock();
|
|
2812
3050
|
builder.pushBack(tx, args, typeArguments);
|
|
2813
|
-
const
|
|
3051
|
+
const insepctRes = await client.devInspectTransactionBlock({
|
|
2814
3052
|
transactionBlock: tx,
|
|
2815
3053
|
sender: ZERO_ADDRESS,
|
|
2816
3054
|
});
|
|
2817
|
-
|
|
3055
|
+
|
|
3056
|
+
return (await getMoveCoder(client)).decodeDevInspectResult<[]>(
|
|
3057
|
+
insepctRes,
|
|
3058
|
+
);
|
|
2818
3059
|
}
|
|
2819
3060
|
export async function remove<T0 = any>(
|
|
2820
3061
|
client: SuiClient,
|
|
@@ -2823,40 +3064,49 @@ export namespace vector {
|
|
|
2823
3064
|
bigint | TransactionArgument,
|
|
2824
3065
|
],
|
|
2825
3066
|
typeArguments: [TypeDescriptor<T0> | string],
|
|
2826
|
-
) {
|
|
3067
|
+
): Promise<TypedDevInspectResults<[T0]>> {
|
|
2827
3068
|
const tx = new TransactionBlock();
|
|
2828
3069
|
builder.remove(tx, args, typeArguments);
|
|
2829
|
-
const
|
|
3070
|
+
const insepctRes = await client.devInspectTransactionBlock({
|
|
2830
3071
|
transactionBlock: tx,
|
|
2831
3072
|
sender: ZERO_ADDRESS,
|
|
2832
3073
|
});
|
|
2833
|
-
|
|
3074
|
+
|
|
3075
|
+
return (await getMoveCoder(client)).decodeDevInspectResult<[T0]>(
|
|
3076
|
+
insepctRes,
|
|
3077
|
+
);
|
|
2834
3078
|
}
|
|
2835
3079
|
export async function reverse<T0 = any>(
|
|
2836
3080
|
client: SuiClient,
|
|
2837
3081
|
args: [string | ObjectCallArg | TransactionArgument],
|
|
2838
3082
|
typeArguments: [TypeDescriptor<T0> | string],
|
|
2839
|
-
) {
|
|
3083
|
+
): Promise<TypedDevInspectResults<[]>> {
|
|
2840
3084
|
const tx = new TransactionBlock();
|
|
2841
3085
|
builder.reverse(tx, args, typeArguments);
|
|
2842
|
-
const
|
|
3086
|
+
const insepctRes = await client.devInspectTransactionBlock({
|
|
2843
3087
|
transactionBlock: tx,
|
|
2844
3088
|
sender: ZERO_ADDRESS,
|
|
2845
3089
|
});
|
|
2846
|
-
|
|
3090
|
+
|
|
3091
|
+
return (await getMoveCoder(client)).decodeDevInspectResult<[]>(
|
|
3092
|
+
insepctRes,
|
|
3093
|
+
);
|
|
2847
3094
|
}
|
|
2848
3095
|
export async function singleton<T0 = any>(
|
|
2849
3096
|
client: SuiClient,
|
|
2850
3097
|
args: [T0 | TransactionArgument],
|
|
2851
3098
|
typeArguments: [TypeDescriptor<T0> | string],
|
|
2852
|
-
) {
|
|
3099
|
+
): Promise<TypedDevInspectResults<[T0[] | string]>> {
|
|
2853
3100
|
const tx = new TransactionBlock();
|
|
2854
3101
|
builder.singleton(tx, args, typeArguments);
|
|
2855
|
-
const
|
|
3102
|
+
const insepctRes = await client.devInspectTransactionBlock({
|
|
2856
3103
|
transactionBlock: tx,
|
|
2857
3104
|
sender: ZERO_ADDRESS,
|
|
2858
3105
|
});
|
|
2859
|
-
|
|
3106
|
+
|
|
3107
|
+
return (await getMoveCoder(client)).decodeDevInspectResult<
|
|
3108
|
+
[T0[] | string]
|
|
3109
|
+
>(insepctRes);
|
|
2860
3110
|
}
|
|
2861
3111
|
export async function swap<T0 = any>(
|
|
2862
3112
|
client: SuiClient,
|
|
@@ -2866,14 +3116,17 @@ export namespace vector {
|
|
|
2866
3116
|
bigint | TransactionArgument,
|
|
2867
3117
|
],
|
|
2868
3118
|
typeArguments: [TypeDescriptor<T0> | string],
|
|
2869
|
-
) {
|
|
3119
|
+
): Promise<TypedDevInspectResults<[]>> {
|
|
2870
3120
|
const tx = new TransactionBlock();
|
|
2871
3121
|
builder.swap(tx, args, typeArguments);
|
|
2872
|
-
const
|
|
3122
|
+
const insepctRes = await client.devInspectTransactionBlock({
|
|
2873
3123
|
transactionBlock: tx,
|
|
2874
3124
|
sender: ZERO_ADDRESS,
|
|
2875
3125
|
});
|
|
2876
|
-
|
|
3126
|
+
|
|
3127
|
+
return (await getMoveCoder(client)).decodeDevInspectResult<[]>(
|
|
3128
|
+
insepctRes,
|
|
3129
|
+
);
|
|
2877
3130
|
}
|
|
2878
3131
|
export async function swapRemove<T0 = any>(
|
|
2879
3132
|
client: SuiClient,
|
|
@@ -2882,14 +3135,17 @@ export namespace vector {
|
|
|
2882
3135
|
bigint | TransactionArgument,
|
|
2883
3136
|
],
|
|
2884
3137
|
typeArguments: [TypeDescriptor<T0> | string],
|
|
2885
|
-
) {
|
|
3138
|
+
): Promise<TypedDevInspectResults<[T0]>> {
|
|
2886
3139
|
const tx = new TransactionBlock();
|
|
2887
3140
|
builder.swapRemove(tx, args, typeArguments);
|
|
2888
|
-
const
|
|
3141
|
+
const insepctRes = await client.devInspectTransactionBlock({
|
|
2889
3142
|
transactionBlock: tx,
|
|
2890
3143
|
sender: ZERO_ADDRESS,
|
|
2891
3144
|
});
|
|
2892
|
-
|
|
3145
|
+
|
|
3146
|
+
return (await getMoveCoder(client)).decodeDevInspectResult<[T0]>(
|
|
3147
|
+
insepctRes,
|
|
3148
|
+
);
|
|
2893
3149
|
}
|
|
2894
3150
|
}
|
|
2895
3151
|
}
|