@0xobelisk/client 0.0.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (38) hide show
  1. package/LICENSE +202 -0
  2. package/README.md +1 -0
  3. package/dist/index.d.ts +6 -0
  4. package/dist/index.js +757 -0
  5. package/dist/index.js.map +1 -0
  6. package/dist/index.mjs +755 -0
  7. package/dist/index.mjs.map +1 -0
  8. package/dist/libs/suiAccountManager/crypto.d.ts +1 -0
  9. package/dist/libs/suiAccountManager/index.d.ts +35 -0
  10. package/dist/libs/suiAccountManager/keypair.d.ts +21 -0
  11. package/dist/libs/suiAccountManager/types.d.ts +9 -0
  12. package/dist/libs/suiAccountManager/util.d.ts +29 -0
  13. package/dist/libs/suiRpcProvider/defaultChainConfigs.d.ts +8 -0
  14. package/dist/libs/suiRpcProvider/faucet.d.ts +8 -0
  15. package/dist/libs/suiRpcProvider/index.d.ts +40 -0
  16. package/dist/libs/suiRpcProvider/types.d.ts +14 -0
  17. package/dist/libs/suiTxBuilder/index.d.ts +544 -0
  18. package/dist/libs/suiTxBuilder/types.d.ts +12 -0
  19. package/dist/libs/suiTxBuilder/util.d.ts +76 -0
  20. package/dist/obelisk.d.ts +2857 -0
  21. package/dist/test/tsconfig.tsbuildinfo +1 -0
  22. package/dist/types/index.d.ts +11 -0
  23. package/package.json +152 -0
  24. package/src/index.ts +10 -0
  25. package/src/libs/suiAccountManager/crypto.ts +7 -0
  26. package/src/libs/suiAccountManager/index.ts +72 -0
  27. package/src/libs/suiAccountManager/keypair.ts +38 -0
  28. package/src/libs/suiAccountManager/types.ts +10 -0
  29. package/src/libs/suiAccountManager/util.ts +70 -0
  30. package/src/libs/suiRpcProvider/defaultChainConfigs.ts +30 -0
  31. package/src/libs/suiRpcProvider/faucet.ts +57 -0
  32. package/src/libs/suiRpcProvider/index.ts +114 -0
  33. package/src/libs/suiRpcProvider/types.ts +17 -0
  34. package/src/libs/suiTxBuilder/index.ts +245 -0
  35. package/src/libs/suiTxBuilder/types.ts +32 -0
  36. package/src/libs/suiTxBuilder/util.ts +84 -0
  37. package/src/obelisk.ts +297 -0
  38. package/src/types/index.ts +17 -0
@@ -0,0 +1,2857 @@
1
+ /**
2
+ * @file src.ts
3
+ * @description This file is used to aggregate the tools that used to interact with SUI network.
4
+ * @author IceFox
5
+ * @version 0.1.0
6
+ */
7
+ import { RawSigner, TransactionBlock, DevInspectResults, SuiTransactionBlockResponse, JsonRpcProvider } from '@mysten/sui.js';
8
+ import { SuiAccountManager } from './libs/suiAccountManager';
9
+ import { SuiRpcProvider } from './libs/suiRpcProvider';
10
+ import { SuiTxBlock } from './libs/suiTxBuilder';
11
+ import { SuiKitParams, DerivePathParams, SuiTxArg, SuiVecTxArg } from './types';
12
+ /**
13
+ * @class SuiKit
14
+ * @description This class is used to aggregate the tools that used to interact with SUI network.
15
+ */
16
+ export declare class Obelisk {
17
+ accountManager: SuiAccountManager;
18
+ rpcProvider: SuiRpcProvider;
19
+ /**
20
+ * Support the following ways to init the SuiToolkit:
21
+ * 1. mnemonics
22
+ * 2. secretKey (base64 or hex)
23
+ * If none of them is provided, will generate a random mnemonics with 24 words.
24
+ *
25
+ * @param mnemonics, 12 or 24 mnemonics words, separated by space
26
+ * @param secretKey, base64 or hex string, when mnemonics is provided, secretKey will be ignored
27
+ * @param networkType, 'testnet' | 'mainnet' | 'devnet' | 'localnet', default is 'devnet'
28
+ * @param fullnodeUrl, the fullnode url, default is the preconfig fullnode url for the given network type
29
+ * @param faucetUrl, the faucet url, default is the preconfig faucet url for the given network type
30
+ */
31
+ constructor({ mnemonics, secretKey, networkType, fullnodeUrl, faucetUrl, }?: SuiKitParams);
32
+ /**
33
+ * if derivePathParams is not provided or mnemonics is empty, it will return the currentSigner.
34
+ * else:
35
+ * it will generate signer from the mnemonic with the given derivePathParams.
36
+ * @param derivePathParams, such as { accountIndex: 2, isExternal: false, addressIndex: 10 }, comply with the BIP44 standard
37
+ */
38
+ getSigner(derivePathParams?: DerivePathParams): RawSigner;
39
+ /**
40
+ * @description Switch the current account with the given derivePathParams
41
+ * @param derivePathParams, such as { accountIndex: 2, isExternal: false, addressIndex: 10 }, comply with the BIP44 standard
42
+ */
43
+ switchAccount(derivePathParams: DerivePathParams): void;
44
+ /**
45
+ * @description Get the address of the account for the given derivePathParams
46
+ * @param derivePathParams, such as { accountIndex: 2, isExternal: false, addressIndex: 10 }, comply with the BIP44 standard
47
+ */
48
+ getAddress(derivePathParams?: DerivePathParams): string;
49
+ currentAddress(): string;
50
+ provider(): JsonRpcProvider;
51
+ /**
52
+ * Request some SUI from faucet
53
+ * @Returns {Promise<boolean>}, true if the request is successful, false otherwise.
54
+ */
55
+ requestFaucet(derivePathParams?: DerivePathParams): Promise<void>;
56
+ getBalance(coinType?: string, derivePathParams?: DerivePathParams): Promise<{
57
+ coinType: string;
58
+ coinObjectCount: number;
59
+ totalBalance: string;
60
+ lockedBalance: {
61
+ number?: number | undefined;
62
+ epochId?: number | undefined;
63
+ };
64
+ }>;
65
+ getObjects(objectIds: string[]): Promise<import("./libs/suiRpcProvider/types").ObjectData[]>;
66
+ signTxn(tx: Uint8Array | TransactionBlock | SuiTxBlock, derivePathParams?: DerivePathParams): Promise<import("@mysten/sui.js").SignedTransaction>;
67
+ signAndSendTxn(tx: Uint8Array | TransactionBlock | SuiTxBlock, derivePathParams?: DerivePathParams): Promise<SuiTransactionBlockResponse>;
68
+ /**
69
+ * Transfer the given amount of SUI to the recipient
70
+ * @param recipient
71
+ * @param amount
72
+ * @param derivePathParams
73
+ */
74
+ transferSui(recipient: string, amount: number, derivePathParams?: DerivePathParams): Promise<{
75
+ digest: string;
76
+ timestampMs?: string | undefined;
77
+ transaction?: {
78
+ data: {
79
+ sender: string;
80
+ messageVersion: "v1";
81
+ transaction: {
82
+ epoch: string;
83
+ storage_charge: string;
84
+ computation_charge: string;
85
+ storage_rebate: string;
86
+ kind: "ChangeEpoch";
87
+ epoch_start_timestamp_ms?: string | undefined;
88
+ } | {
89
+ epoch: string;
90
+ round: string;
91
+ commit_timestamp_ms: string;
92
+ kind: "ConsensusCommitPrologue";
93
+ } | {
94
+ objects: string[];
95
+ kind: "Genesis";
96
+ } | {
97
+ transactions: ({
98
+ MoveCall: {
99
+ function: string;
100
+ package: string;
101
+ module: string;
102
+ arguments?: ("GasCoin" | {
103
+ Input: number;
104
+ } | {
105
+ Result: number;
106
+ } | {
107
+ NestedResult: [number, number];
108
+ })[] | undefined;
109
+ type_arguments?: string[] | undefined;
110
+ };
111
+ } | {
112
+ TransferObjects: [("GasCoin" | {
113
+ Input: number;
114
+ } | {
115
+ Result: number;
116
+ } | {
117
+ NestedResult: [number, number];
118
+ })[], "GasCoin" | {
119
+ Input: number;
120
+ } | {
121
+ Result: number;
122
+ } | {
123
+ NestedResult: [number, number];
124
+ }];
125
+ } | {
126
+ SplitCoins: ["GasCoin" | {
127
+ Input: number;
128
+ } | {
129
+ Result: number;
130
+ } | {
131
+ NestedResult: [number, number];
132
+ }, ("GasCoin" | {
133
+ Input: number;
134
+ } | {
135
+ Result: number;
136
+ } | {
137
+ NestedResult: [number, number];
138
+ })[]];
139
+ } | {
140
+ MergeCoins: ["GasCoin" | {
141
+ Input: number;
142
+ } | {
143
+ Result: number;
144
+ } | {
145
+ NestedResult: [number, number];
146
+ }, ("GasCoin" | {
147
+ Input: number;
148
+ } | {
149
+ Result: number;
150
+ } | {
151
+ NestedResult: [number, number];
152
+ })[]];
153
+ } | {
154
+ Publish: string[] | [{
155
+ disassembled: Record<string, string>;
156
+ }, string[]];
157
+ } | {
158
+ Upgrade: [string[], string, "GasCoin" | {
159
+ Input: number;
160
+ } | {
161
+ Result: number;
162
+ } | {
163
+ NestedResult: [number, number];
164
+ }] | [{
165
+ disassembled: Record<string, string>;
166
+ }, string[], string, "GasCoin" | {
167
+ Input: number;
168
+ } | {
169
+ Result: number;
170
+ } | {
171
+ NestedResult: [number, number];
172
+ }];
173
+ } | {
174
+ MakeMoveVec: [string | null, ("GasCoin" | {
175
+ Input: number;
176
+ } | {
177
+ Result: number;
178
+ } | {
179
+ NestedResult: [number, number];
180
+ })[]];
181
+ })[];
182
+ inputs: ({
183
+ type: "pure";
184
+ valueType: string | null;
185
+ value: import("@mysten/sui.js").SuiJsonValue;
186
+ } | {
187
+ type: "object";
188
+ objectType: "immOrOwnedObject";
189
+ objectId: string;
190
+ version: string;
191
+ digest: string;
192
+ } | {
193
+ type: "object";
194
+ objectType: "sharedObject";
195
+ objectId: string;
196
+ initialSharedVersion: string;
197
+ mutable: boolean;
198
+ })[];
199
+ kind: "ProgrammableTransaction";
200
+ };
201
+ gasData: {
202
+ payment: {
203
+ objectId: string;
204
+ version: string | number;
205
+ digest: string;
206
+ }[];
207
+ owner: string;
208
+ price: string;
209
+ budget: string;
210
+ };
211
+ };
212
+ txSignatures: string[];
213
+ } | undefined;
214
+ effects?: {
215
+ messageVersion: "v1";
216
+ status: {
217
+ status: "success" | "failure";
218
+ error?: string | undefined;
219
+ };
220
+ executedEpoch: string;
221
+ gasUsed: {
222
+ computationCost: string;
223
+ storageCost: string;
224
+ storageRebate: string;
225
+ nonRefundableStorageFee: string;
226
+ };
227
+ transactionDigest: string;
228
+ gasObject: {
229
+ owner: "Immutable" | {
230
+ AddressOwner: string;
231
+ } | {
232
+ ObjectOwner: string;
233
+ } | {
234
+ Shared: {
235
+ initial_shared_version: number;
236
+ };
237
+ };
238
+ reference: {
239
+ objectId: string;
240
+ version: string | number;
241
+ digest: string;
242
+ };
243
+ };
244
+ modifiedAtVersions?: {
245
+ objectId: string;
246
+ sequenceNumber: string;
247
+ }[] | undefined;
248
+ sharedObjects?: {
249
+ objectId: string;
250
+ version: string | number;
251
+ digest: string;
252
+ }[] | undefined;
253
+ created?: {
254
+ owner: "Immutable" | {
255
+ AddressOwner: string;
256
+ } | {
257
+ ObjectOwner: string;
258
+ } | {
259
+ Shared: {
260
+ initial_shared_version: number;
261
+ };
262
+ };
263
+ reference: {
264
+ objectId: string;
265
+ version: string | number;
266
+ digest: string;
267
+ };
268
+ }[] | undefined;
269
+ mutated?: {
270
+ owner: "Immutable" | {
271
+ AddressOwner: string;
272
+ } | {
273
+ ObjectOwner: string;
274
+ } | {
275
+ Shared: {
276
+ initial_shared_version: number;
277
+ };
278
+ };
279
+ reference: {
280
+ objectId: string;
281
+ version: string | number;
282
+ digest: string;
283
+ };
284
+ }[] | undefined;
285
+ unwrapped?: {
286
+ owner: "Immutable" | {
287
+ AddressOwner: string;
288
+ } | {
289
+ ObjectOwner: string;
290
+ } | {
291
+ Shared: {
292
+ initial_shared_version: number;
293
+ };
294
+ };
295
+ reference: {
296
+ objectId: string;
297
+ version: string | number;
298
+ digest: string;
299
+ };
300
+ }[] | undefined;
301
+ deleted?: {
302
+ objectId: string;
303
+ version: string | number;
304
+ digest: string;
305
+ }[] | undefined;
306
+ unwrappedThenDeleted?: {
307
+ objectId: string;
308
+ version: string | number;
309
+ digest: string;
310
+ }[] | undefined;
311
+ wrapped?: {
312
+ objectId: string;
313
+ version: string | number;
314
+ digest: string;
315
+ }[] | undefined;
316
+ eventsDigest?: string | undefined;
317
+ dependencies?: string[] | undefined;
318
+ } | undefined;
319
+ events?: {
320
+ id: {
321
+ txDigest: string;
322
+ eventSeq: string;
323
+ };
324
+ packageId: string;
325
+ transactionModule: string;
326
+ sender: string;
327
+ type: string;
328
+ parsedJson?: Record<string, any> | undefined;
329
+ bcs?: string | undefined;
330
+ timestampMs?: string | undefined;
331
+ }[] | undefined;
332
+ checkpoint?: string | undefined;
333
+ confirmedLocalExecution?: boolean | undefined;
334
+ objectChanges?: ({
335
+ packageId: string;
336
+ type: "published";
337
+ version: string;
338
+ digest: string;
339
+ modules: string[];
340
+ } | {
341
+ sender: string;
342
+ type: "transferred";
343
+ objectType: string;
344
+ objectId: string;
345
+ version: string;
346
+ digest: string;
347
+ recipient: "Immutable" | {
348
+ AddressOwner: string;
349
+ } | {
350
+ ObjectOwner: string;
351
+ } | {
352
+ Shared: {
353
+ initial_shared_version: number;
354
+ };
355
+ };
356
+ } | {
357
+ sender: string;
358
+ type: "mutated";
359
+ objectType: string;
360
+ objectId: string;
361
+ version: string;
362
+ digest: string;
363
+ owner: "Immutable" | {
364
+ AddressOwner: string;
365
+ } | {
366
+ ObjectOwner: string;
367
+ } | {
368
+ Shared: {
369
+ initial_shared_version: number;
370
+ };
371
+ };
372
+ previousVersion: string;
373
+ } | {
374
+ sender: string;
375
+ type: "deleted";
376
+ objectType: string;
377
+ objectId: string;
378
+ version: string;
379
+ } | {
380
+ sender: string;
381
+ type: "wrapped";
382
+ objectType: string;
383
+ objectId: string;
384
+ version: string;
385
+ } | {
386
+ sender: string;
387
+ type: "created";
388
+ objectType: string;
389
+ objectId: string;
390
+ version: string;
391
+ digest: string;
392
+ owner: "Immutable" | {
393
+ AddressOwner: string;
394
+ } | {
395
+ ObjectOwner: string;
396
+ } | {
397
+ Shared: {
398
+ initial_shared_version: number;
399
+ };
400
+ };
401
+ })[] | undefined;
402
+ balanceChanges?: {
403
+ owner: "Immutable" | {
404
+ AddressOwner: string;
405
+ } | {
406
+ ObjectOwner: string;
407
+ } | {
408
+ Shared: {
409
+ initial_shared_version: number;
410
+ };
411
+ };
412
+ coinType: string;
413
+ amount: string;
414
+ }[] | undefined;
415
+ errors?: string[] | undefined;
416
+ }>;
417
+ /**
418
+ * Transfer to mutliple recipients
419
+ * @param recipients the recipients addresses
420
+ * @param amounts the amounts of SUI to transfer to each recipient, the length of amounts should be the same as the length of recipients
421
+ * @param derivePathParams
422
+ */
423
+ transferSuiToMany(recipients: string[], amounts: number[], derivePathParams?: DerivePathParams): Promise<{
424
+ digest: string;
425
+ timestampMs?: string | undefined;
426
+ transaction?: {
427
+ data: {
428
+ sender: string;
429
+ messageVersion: "v1";
430
+ transaction: {
431
+ epoch: string;
432
+ storage_charge: string;
433
+ computation_charge: string;
434
+ storage_rebate: string;
435
+ kind: "ChangeEpoch";
436
+ epoch_start_timestamp_ms?: string | undefined;
437
+ } | {
438
+ epoch: string;
439
+ round: string;
440
+ commit_timestamp_ms: string;
441
+ kind: "ConsensusCommitPrologue";
442
+ } | {
443
+ objects: string[];
444
+ kind: "Genesis";
445
+ } | {
446
+ transactions: ({
447
+ MoveCall: {
448
+ function: string;
449
+ package: string;
450
+ module: string;
451
+ arguments?: ("GasCoin" | {
452
+ Input: number;
453
+ } | {
454
+ Result: number;
455
+ } | {
456
+ NestedResult: [number, number];
457
+ })[] | undefined;
458
+ type_arguments?: string[] | undefined;
459
+ };
460
+ } | {
461
+ TransferObjects: [("GasCoin" | {
462
+ Input: number;
463
+ } | {
464
+ Result: number;
465
+ } | {
466
+ NestedResult: [number, number];
467
+ })[], "GasCoin" | {
468
+ Input: number;
469
+ } | {
470
+ Result: number;
471
+ } | {
472
+ NestedResult: [number, number];
473
+ }];
474
+ } | {
475
+ SplitCoins: ["GasCoin" | {
476
+ Input: number;
477
+ } | {
478
+ Result: number;
479
+ } | {
480
+ NestedResult: [number, number];
481
+ }, ("GasCoin" | {
482
+ Input: number;
483
+ } | {
484
+ Result: number;
485
+ } | {
486
+ NestedResult: [number, number];
487
+ })[]];
488
+ } | {
489
+ MergeCoins: ["GasCoin" | {
490
+ Input: number;
491
+ } | {
492
+ Result: number;
493
+ } | {
494
+ NestedResult: [number, number];
495
+ }, ("GasCoin" | {
496
+ Input: number;
497
+ } | {
498
+ Result: number;
499
+ } | {
500
+ NestedResult: [number, number];
501
+ })[]];
502
+ } | {
503
+ Publish: string[] | [{
504
+ disassembled: Record<string, string>;
505
+ }, string[]];
506
+ } | {
507
+ Upgrade: [string[], string, "GasCoin" | {
508
+ Input: number;
509
+ } | {
510
+ Result: number;
511
+ } | {
512
+ NestedResult: [number, number];
513
+ }] | [{
514
+ disassembled: Record<string, string>;
515
+ }, string[], string, "GasCoin" | {
516
+ Input: number;
517
+ } | {
518
+ Result: number;
519
+ } | {
520
+ NestedResult: [number, number];
521
+ }];
522
+ } | {
523
+ MakeMoveVec: [string | null, ("GasCoin" | {
524
+ Input: number;
525
+ } | {
526
+ Result: number;
527
+ } | {
528
+ NestedResult: [number, number];
529
+ })[]];
530
+ })[];
531
+ inputs: ({
532
+ type: "pure";
533
+ valueType: string | null;
534
+ value: import("@mysten/sui.js").SuiJsonValue;
535
+ } | {
536
+ type: "object";
537
+ objectType: "immOrOwnedObject";
538
+ objectId: string;
539
+ version: string;
540
+ digest: string;
541
+ } | {
542
+ type: "object";
543
+ objectType: "sharedObject";
544
+ objectId: string;
545
+ initialSharedVersion: string;
546
+ mutable: boolean;
547
+ })[];
548
+ kind: "ProgrammableTransaction";
549
+ };
550
+ gasData: {
551
+ payment: {
552
+ objectId: string;
553
+ version: string | number;
554
+ digest: string;
555
+ }[];
556
+ owner: string;
557
+ price: string;
558
+ budget: string;
559
+ };
560
+ };
561
+ txSignatures: string[];
562
+ } | undefined;
563
+ effects?: {
564
+ messageVersion: "v1";
565
+ status: {
566
+ status: "success" | "failure";
567
+ error?: string | undefined;
568
+ };
569
+ executedEpoch: string;
570
+ gasUsed: {
571
+ computationCost: string;
572
+ storageCost: string;
573
+ storageRebate: string;
574
+ nonRefundableStorageFee: string;
575
+ };
576
+ transactionDigest: string;
577
+ gasObject: {
578
+ owner: "Immutable" | {
579
+ AddressOwner: string;
580
+ } | {
581
+ ObjectOwner: string;
582
+ } | {
583
+ Shared: {
584
+ initial_shared_version: number;
585
+ };
586
+ };
587
+ reference: {
588
+ objectId: string;
589
+ version: string | number;
590
+ digest: string;
591
+ };
592
+ };
593
+ modifiedAtVersions?: {
594
+ objectId: string;
595
+ sequenceNumber: string;
596
+ }[] | undefined;
597
+ sharedObjects?: {
598
+ objectId: string;
599
+ version: string | number;
600
+ digest: string;
601
+ }[] | undefined;
602
+ created?: {
603
+ owner: "Immutable" | {
604
+ AddressOwner: string;
605
+ } | {
606
+ ObjectOwner: string;
607
+ } | {
608
+ Shared: {
609
+ initial_shared_version: number;
610
+ };
611
+ };
612
+ reference: {
613
+ objectId: string;
614
+ version: string | number;
615
+ digest: string;
616
+ };
617
+ }[] | undefined;
618
+ mutated?: {
619
+ owner: "Immutable" | {
620
+ AddressOwner: string;
621
+ } | {
622
+ ObjectOwner: string;
623
+ } | {
624
+ Shared: {
625
+ initial_shared_version: number;
626
+ };
627
+ };
628
+ reference: {
629
+ objectId: string;
630
+ version: string | number;
631
+ digest: string;
632
+ };
633
+ }[] | undefined;
634
+ unwrapped?: {
635
+ owner: "Immutable" | {
636
+ AddressOwner: string;
637
+ } | {
638
+ ObjectOwner: string;
639
+ } | {
640
+ Shared: {
641
+ initial_shared_version: number;
642
+ };
643
+ };
644
+ reference: {
645
+ objectId: string;
646
+ version: string | number;
647
+ digest: string;
648
+ };
649
+ }[] | undefined;
650
+ deleted?: {
651
+ objectId: string;
652
+ version: string | number;
653
+ digest: string;
654
+ }[] | undefined;
655
+ unwrappedThenDeleted?: {
656
+ objectId: string;
657
+ version: string | number;
658
+ digest: string;
659
+ }[] | undefined;
660
+ wrapped?: {
661
+ objectId: string;
662
+ version: string | number;
663
+ digest: string;
664
+ }[] | undefined;
665
+ eventsDigest?: string | undefined;
666
+ dependencies?: string[] | undefined;
667
+ } | undefined;
668
+ events?: {
669
+ id: {
670
+ txDigest: string;
671
+ eventSeq: string;
672
+ };
673
+ packageId: string;
674
+ transactionModule: string;
675
+ sender: string;
676
+ type: string;
677
+ parsedJson?: Record<string, any> | undefined;
678
+ bcs?: string | undefined;
679
+ timestampMs?: string | undefined;
680
+ }[] | undefined;
681
+ checkpoint?: string | undefined;
682
+ confirmedLocalExecution?: boolean | undefined;
683
+ objectChanges?: ({
684
+ packageId: string;
685
+ type: "published";
686
+ version: string;
687
+ digest: string;
688
+ modules: string[];
689
+ } | {
690
+ sender: string;
691
+ type: "transferred";
692
+ objectType: string;
693
+ objectId: string;
694
+ version: string;
695
+ digest: string;
696
+ recipient: "Immutable" | {
697
+ AddressOwner: string;
698
+ } | {
699
+ ObjectOwner: string;
700
+ } | {
701
+ Shared: {
702
+ initial_shared_version: number;
703
+ };
704
+ };
705
+ } | {
706
+ sender: string;
707
+ type: "mutated";
708
+ objectType: string;
709
+ objectId: string;
710
+ version: string;
711
+ digest: string;
712
+ owner: "Immutable" | {
713
+ AddressOwner: string;
714
+ } | {
715
+ ObjectOwner: string;
716
+ } | {
717
+ Shared: {
718
+ initial_shared_version: number;
719
+ };
720
+ };
721
+ previousVersion: string;
722
+ } | {
723
+ sender: string;
724
+ type: "deleted";
725
+ objectType: string;
726
+ objectId: string;
727
+ version: string;
728
+ } | {
729
+ sender: string;
730
+ type: "wrapped";
731
+ objectType: string;
732
+ objectId: string;
733
+ version: string;
734
+ } | {
735
+ sender: string;
736
+ type: "created";
737
+ objectType: string;
738
+ objectId: string;
739
+ version: string;
740
+ digest: string;
741
+ owner: "Immutable" | {
742
+ AddressOwner: string;
743
+ } | {
744
+ ObjectOwner: string;
745
+ } | {
746
+ Shared: {
747
+ initial_shared_version: number;
748
+ };
749
+ };
750
+ })[] | undefined;
751
+ balanceChanges?: {
752
+ owner: "Immutable" | {
753
+ AddressOwner: string;
754
+ } | {
755
+ ObjectOwner: string;
756
+ } | {
757
+ Shared: {
758
+ initial_shared_version: number;
759
+ };
760
+ };
761
+ coinType: string;
762
+ amount: string;
763
+ }[] | undefined;
764
+ errors?: string[] | undefined;
765
+ }>;
766
+ /**
767
+ * Transfer the given amounts of coin to multiple recipients
768
+ * @param recipients the list of recipient address
769
+ * @param amounts the amounts to transfer for each recipient
770
+ * @param coinType any custom coin type but not SUI
771
+ * @param derivePathParams the derive path params for the current signer
772
+ */
773
+ transferCoinToMany(recipients: string[], amounts: number[], coinType: string, derivePathParams?: DerivePathParams): Promise<{
774
+ digest: string;
775
+ timestampMs?: string | undefined;
776
+ transaction?: {
777
+ data: {
778
+ sender: string;
779
+ messageVersion: "v1";
780
+ transaction: {
781
+ epoch: string;
782
+ storage_charge: string;
783
+ computation_charge: string;
784
+ storage_rebate: string;
785
+ kind: "ChangeEpoch";
786
+ epoch_start_timestamp_ms?: string | undefined;
787
+ } | {
788
+ epoch: string;
789
+ round: string;
790
+ commit_timestamp_ms: string;
791
+ kind: "ConsensusCommitPrologue";
792
+ } | {
793
+ objects: string[];
794
+ kind: "Genesis";
795
+ } | {
796
+ transactions: ({
797
+ MoveCall: {
798
+ function: string;
799
+ package: string;
800
+ module: string;
801
+ arguments?: ("GasCoin" | {
802
+ Input: number;
803
+ } | {
804
+ Result: number;
805
+ } | {
806
+ NestedResult: [number, number];
807
+ })[] | undefined;
808
+ type_arguments?: string[] | undefined;
809
+ };
810
+ } | {
811
+ TransferObjects: [("GasCoin" | {
812
+ Input: number;
813
+ } | {
814
+ Result: number;
815
+ } | {
816
+ NestedResult: [number, number];
817
+ })[], "GasCoin" | {
818
+ Input: number;
819
+ } | {
820
+ Result: number;
821
+ } | {
822
+ NestedResult: [number, number];
823
+ }];
824
+ } | {
825
+ SplitCoins: ["GasCoin" | {
826
+ Input: number;
827
+ } | {
828
+ Result: number;
829
+ } | {
830
+ NestedResult: [number, number];
831
+ }, ("GasCoin" | {
832
+ Input: number;
833
+ } | {
834
+ Result: number;
835
+ } | {
836
+ NestedResult: [number, number];
837
+ })[]];
838
+ } | {
839
+ MergeCoins: ["GasCoin" | {
840
+ Input: number;
841
+ } | {
842
+ Result: number;
843
+ } | {
844
+ NestedResult: [number, number];
845
+ }, ("GasCoin" | {
846
+ Input: number;
847
+ } | {
848
+ Result: number;
849
+ } | {
850
+ NestedResult: [number, number];
851
+ })[]];
852
+ } | {
853
+ Publish: string[] | [{
854
+ disassembled: Record<string, string>;
855
+ }, string[]];
856
+ } | {
857
+ Upgrade: [string[], string, "GasCoin" | {
858
+ Input: number;
859
+ } | {
860
+ Result: number;
861
+ } | {
862
+ NestedResult: [number, number];
863
+ }] | [{
864
+ disassembled: Record<string, string>;
865
+ }, string[], string, "GasCoin" | {
866
+ Input: number;
867
+ } | {
868
+ Result: number;
869
+ } | {
870
+ NestedResult: [number, number];
871
+ }];
872
+ } | {
873
+ MakeMoveVec: [string | null, ("GasCoin" | {
874
+ Input: number;
875
+ } | {
876
+ Result: number;
877
+ } | {
878
+ NestedResult: [number, number];
879
+ })[]];
880
+ })[];
881
+ inputs: ({
882
+ type: "pure";
883
+ valueType: string | null;
884
+ value: import("@mysten/sui.js").SuiJsonValue;
885
+ } | {
886
+ type: "object";
887
+ objectType: "immOrOwnedObject";
888
+ objectId: string;
889
+ version: string;
890
+ digest: string;
891
+ } | {
892
+ type: "object";
893
+ objectType: "sharedObject";
894
+ objectId: string;
895
+ initialSharedVersion: string;
896
+ mutable: boolean;
897
+ })[];
898
+ kind: "ProgrammableTransaction";
899
+ };
900
+ gasData: {
901
+ payment: {
902
+ objectId: string;
903
+ version: string | number;
904
+ digest: string;
905
+ }[];
906
+ owner: string;
907
+ price: string;
908
+ budget: string;
909
+ };
910
+ };
911
+ txSignatures: string[];
912
+ } | undefined;
913
+ effects?: {
914
+ messageVersion: "v1";
915
+ status: {
916
+ status: "success" | "failure";
917
+ error?: string | undefined;
918
+ };
919
+ executedEpoch: string;
920
+ gasUsed: {
921
+ computationCost: string;
922
+ storageCost: string;
923
+ storageRebate: string;
924
+ nonRefundableStorageFee: string;
925
+ };
926
+ transactionDigest: string;
927
+ gasObject: {
928
+ owner: "Immutable" | {
929
+ AddressOwner: string;
930
+ } | {
931
+ ObjectOwner: string;
932
+ } | {
933
+ Shared: {
934
+ initial_shared_version: number;
935
+ };
936
+ };
937
+ reference: {
938
+ objectId: string;
939
+ version: string | number;
940
+ digest: string;
941
+ };
942
+ };
943
+ modifiedAtVersions?: {
944
+ objectId: string;
945
+ sequenceNumber: string;
946
+ }[] | undefined;
947
+ sharedObjects?: {
948
+ objectId: string;
949
+ version: string | number;
950
+ digest: string;
951
+ }[] | undefined;
952
+ created?: {
953
+ owner: "Immutable" | {
954
+ AddressOwner: string;
955
+ } | {
956
+ ObjectOwner: string;
957
+ } | {
958
+ Shared: {
959
+ initial_shared_version: number;
960
+ };
961
+ };
962
+ reference: {
963
+ objectId: string;
964
+ version: string | number;
965
+ digest: string;
966
+ };
967
+ }[] | undefined;
968
+ mutated?: {
969
+ owner: "Immutable" | {
970
+ AddressOwner: string;
971
+ } | {
972
+ ObjectOwner: string;
973
+ } | {
974
+ Shared: {
975
+ initial_shared_version: number;
976
+ };
977
+ };
978
+ reference: {
979
+ objectId: string;
980
+ version: string | number;
981
+ digest: string;
982
+ };
983
+ }[] | undefined;
984
+ unwrapped?: {
985
+ owner: "Immutable" | {
986
+ AddressOwner: string;
987
+ } | {
988
+ ObjectOwner: string;
989
+ } | {
990
+ Shared: {
991
+ initial_shared_version: number;
992
+ };
993
+ };
994
+ reference: {
995
+ objectId: string;
996
+ version: string | number;
997
+ digest: string;
998
+ };
999
+ }[] | undefined;
1000
+ deleted?: {
1001
+ objectId: string;
1002
+ version: string | number;
1003
+ digest: string;
1004
+ }[] | undefined;
1005
+ unwrappedThenDeleted?: {
1006
+ objectId: string;
1007
+ version: string | number;
1008
+ digest: string;
1009
+ }[] | undefined;
1010
+ wrapped?: {
1011
+ objectId: string;
1012
+ version: string | number;
1013
+ digest: string;
1014
+ }[] | undefined;
1015
+ eventsDigest?: string | undefined;
1016
+ dependencies?: string[] | undefined;
1017
+ } | undefined;
1018
+ events?: {
1019
+ id: {
1020
+ txDigest: string;
1021
+ eventSeq: string;
1022
+ };
1023
+ packageId: string;
1024
+ transactionModule: string;
1025
+ sender: string;
1026
+ type: string;
1027
+ parsedJson?: Record<string, any> | undefined;
1028
+ bcs?: string | undefined;
1029
+ timestampMs?: string | undefined;
1030
+ }[] | undefined;
1031
+ checkpoint?: string | undefined;
1032
+ confirmedLocalExecution?: boolean | undefined;
1033
+ objectChanges?: ({
1034
+ packageId: string;
1035
+ type: "published";
1036
+ version: string;
1037
+ digest: string;
1038
+ modules: string[];
1039
+ } | {
1040
+ sender: string;
1041
+ type: "transferred";
1042
+ objectType: string;
1043
+ objectId: string;
1044
+ version: string;
1045
+ digest: string;
1046
+ recipient: "Immutable" | {
1047
+ AddressOwner: string;
1048
+ } | {
1049
+ ObjectOwner: string;
1050
+ } | {
1051
+ Shared: {
1052
+ initial_shared_version: number;
1053
+ };
1054
+ };
1055
+ } | {
1056
+ sender: string;
1057
+ type: "mutated";
1058
+ objectType: string;
1059
+ objectId: string;
1060
+ version: string;
1061
+ digest: string;
1062
+ owner: "Immutable" | {
1063
+ AddressOwner: string;
1064
+ } | {
1065
+ ObjectOwner: string;
1066
+ } | {
1067
+ Shared: {
1068
+ initial_shared_version: number;
1069
+ };
1070
+ };
1071
+ previousVersion: string;
1072
+ } | {
1073
+ sender: string;
1074
+ type: "deleted";
1075
+ objectType: string;
1076
+ objectId: string;
1077
+ version: string;
1078
+ } | {
1079
+ sender: string;
1080
+ type: "wrapped";
1081
+ objectType: string;
1082
+ objectId: string;
1083
+ version: string;
1084
+ } | {
1085
+ sender: string;
1086
+ type: "created";
1087
+ objectType: string;
1088
+ objectId: string;
1089
+ version: string;
1090
+ digest: string;
1091
+ owner: "Immutable" | {
1092
+ AddressOwner: string;
1093
+ } | {
1094
+ ObjectOwner: string;
1095
+ } | {
1096
+ Shared: {
1097
+ initial_shared_version: number;
1098
+ };
1099
+ };
1100
+ })[] | undefined;
1101
+ balanceChanges?: {
1102
+ owner: "Immutable" | {
1103
+ AddressOwner: string;
1104
+ } | {
1105
+ ObjectOwner: string;
1106
+ } | {
1107
+ Shared: {
1108
+ initial_shared_version: number;
1109
+ };
1110
+ };
1111
+ coinType: string;
1112
+ amount: string;
1113
+ }[] | undefined;
1114
+ errors?: string[] | undefined;
1115
+ }>;
1116
+ transferCoin(recipient: string, amount: number, coinType: string, derivePathParams?: DerivePathParams): Promise<{
1117
+ digest: string;
1118
+ timestampMs?: string | undefined;
1119
+ transaction?: {
1120
+ data: {
1121
+ sender: string;
1122
+ messageVersion: "v1";
1123
+ transaction: {
1124
+ epoch: string;
1125
+ storage_charge: string;
1126
+ computation_charge: string;
1127
+ storage_rebate: string;
1128
+ kind: "ChangeEpoch";
1129
+ epoch_start_timestamp_ms?: string | undefined;
1130
+ } | {
1131
+ epoch: string;
1132
+ round: string;
1133
+ commit_timestamp_ms: string;
1134
+ kind: "ConsensusCommitPrologue";
1135
+ } | {
1136
+ objects: string[];
1137
+ kind: "Genesis";
1138
+ } | {
1139
+ transactions: ({
1140
+ MoveCall: {
1141
+ function: string;
1142
+ package: string;
1143
+ module: string;
1144
+ arguments?: ("GasCoin" | {
1145
+ Input: number;
1146
+ } | {
1147
+ Result: number;
1148
+ } | {
1149
+ NestedResult: [number, number];
1150
+ })[] | undefined;
1151
+ type_arguments?: string[] | undefined;
1152
+ };
1153
+ } | {
1154
+ TransferObjects: [("GasCoin" | {
1155
+ Input: number;
1156
+ } | {
1157
+ Result: number;
1158
+ } | {
1159
+ NestedResult: [number, number];
1160
+ })[], "GasCoin" | {
1161
+ Input: number;
1162
+ } | {
1163
+ Result: number;
1164
+ } | {
1165
+ NestedResult: [number, number];
1166
+ }];
1167
+ } | {
1168
+ SplitCoins: ["GasCoin" | {
1169
+ Input: number;
1170
+ } | {
1171
+ Result: number;
1172
+ } | {
1173
+ NestedResult: [number, number];
1174
+ }, ("GasCoin" | {
1175
+ Input: number;
1176
+ } | {
1177
+ Result: number;
1178
+ } | {
1179
+ NestedResult: [number, number];
1180
+ })[]];
1181
+ } | {
1182
+ MergeCoins: ["GasCoin" | {
1183
+ Input: number;
1184
+ } | {
1185
+ Result: number;
1186
+ } | {
1187
+ NestedResult: [number, number];
1188
+ }, ("GasCoin" | {
1189
+ Input: number;
1190
+ } | {
1191
+ Result: number;
1192
+ } | {
1193
+ NestedResult: [number, number];
1194
+ })[]];
1195
+ } | {
1196
+ Publish: string[] | [{
1197
+ disassembled: Record<string, string>;
1198
+ }, string[]];
1199
+ } | {
1200
+ Upgrade: [string[], string, "GasCoin" | {
1201
+ Input: number;
1202
+ } | {
1203
+ Result: number;
1204
+ } | {
1205
+ NestedResult: [number, number];
1206
+ }] | [{
1207
+ disassembled: Record<string, string>;
1208
+ }, string[], string, "GasCoin" | {
1209
+ Input: number;
1210
+ } | {
1211
+ Result: number;
1212
+ } | {
1213
+ NestedResult: [number, number];
1214
+ }];
1215
+ } | {
1216
+ MakeMoveVec: [string | null, ("GasCoin" | {
1217
+ Input: number;
1218
+ } | {
1219
+ Result: number;
1220
+ } | {
1221
+ NestedResult: [number, number];
1222
+ })[]];
1223
+ })[];
1224
+ inputs: ({
1225
+ type: "pure";
1226
+ valueType: string | null;
1227
+ value: import("@mysten/sui.js").SuiJsonValue;
1228
+ } | {
1229
+ type: "object";
1230
+ objectType: "immOrOwnedObject";
1231
+ objectId: string;
1232
+ version: string;
1233
+ digest: string;
1234
+ } | {
1235
+ type: "object";
1236
+ objectType: "sharedObject";
1237
+ objectId: string;
1238
+ initialSharedVersion: string;
1239
+ mutable: boolean;
1240
+ })[];
1241
+ kind: "ProgrammableTransaction";
1242
+ };
1243
+ gasData: {
1244
+ payment: {
1245
+ objectId: string;
1246
+ version: string | number;
1247
+ digest: string;
1248
+ }[];
1249
+ owner: string;
1250
+ price: string;
1251
+ budget: string;
1252
+ };
1253
+ };
1254
+ txSignatures: string[];
1255
+ } | undefined;
1256
+ effects?: {
1257
+ messageVersion: "v1";
1258
+ status: {
1259
+ status: "success" | "failure";
1260
+ error?: string | undefined;
1261
+ };
1262
+ executedEpoch: string;
1263
+ gasUsed: {
1264
+ computationCost: string;
1265
+ storageCost: string;
1266
+ storageRebate: string;
1267
+ nonRefundableStorageFee: string;
1268
+ };
1269
+ transactionDigest: string;
1270
+ gasObject: {
1271
+ owner: "Immutable" | {
1272
+ AddressOwner: string;
1273
+ } | {
1274
+ ObjectOwner: string;
1275
+ } | {
1276
+ Shared: {
1277
+ initial_shared_version: number;
1278
+ };
1279
+ };
1280
+ reference: {
1281
+ objectId: string;
1282
+ version: string | number;
1283
+ digest: string;
1284
+ };
1285
+ };
1286
+ modifiedAtVersions?: {
1287
+ objectId: string;
1288
+ sequenceNumber: string;
1289
+ }[] | undefined;
1290
+ sharedObjects?: {
1291
+ objectId: string;
1292
+ version: string | number;
1293
+ digest: string;
1294
+ }[] | undefined;
1295
+ created?: {
1296
+ owner: "Immutable" | {
1297
+ AddressOwner: string;
1298
+ } | {
1299
+ ObjectOwner: string;
1300
+ } | {
1301
+ Shared: {
1302
+ initial_shared_version: number;
1303
+ };
1304
+ };
1305
+ reference: {
1306
+ objectId: string;
1307
+ version: string | number;
1308
+ digest: string;
1309
+ };
1310
+ }[] | undefined;
1311
+ mutated?: {
1312
+ owner: "Immutable" | {
1313
+ AddressOwner: string;
1314
+ } | {
1315
+ ObjectOwner: string;
1316
+ } | {
1317
+ Shared: {
1318
+ initial_shared_version: number;
1319
+ };
1320
+ };
1321
+ reference: {
1322
+ objectId: string;
1323
+ version: string | number;
1324
+ digest: string;
1325
+ };
1326
+ }[] | undefined;
1327
+ unwrapped?: {
1328
+ owner: "Immutable" | {
1329
+ AddressOwner: string;
1330
+ } | {
1331
+ ObjectOwner: string;
1332
+ } | {
1333
+ Shared: {
1334
+ initial_shared_version: number;
1335
+ };
1336
+ };
1337
+ reference: {
1338
+ objectId: string;
1339
+ version: string | number;
1340
+ digest: string;
1341
+ };
1342
+ }[] | undefined;
1343
+ deleted?: {
1344
+ objectId: string;
1345
+ version: string | number;
1346
+ digest: string;
1347
+ }[] | undefined;
1348
+ unwrappedThenDeleted?: {
1349
+ objectId: string;
1350
+ version: string | number;
1351
+ digest: string;
1352
+ }[] | undefined;
1353
+ wrapped?: {
1354
+ objectId: string;
1355
+ version: string | number;
1356
+ digest: string;
1357
+ }[] | undefined;
1358
+ eventsDigest?: string | undefined;
1359
+ dependencies?: string[] | undefined;
1360
+ } | undefined;
1361
+ events?: {
1362
+ id: {
1363
+ txDigest: string;
1364
+ eventSeq: string;
1365
+ };
1366
+ packageId: string;
1367
+ transactionModule: string;
1368
+ sender: string;
1369
+ type: string;
1370
+ parsedJson?: Record<string, any> | undefined;
1371
+ bcs?: string | undefined;
1372
+ timestampMs?: string | undefined;
1373
+ }[] | undefined;
1374
+ checkpoint?: string | undefined;
1375
+ confirmedLocalExecution?: boolean | undefined;
1376
+ objectChanges?: ({
1377
+ packageId: string;
1378
+ type: "published";
1379
+ version: string;
1380
+ digest: string;
1381
+ modules: string[];
1382
+ } | {
1383
+ sender: string;
1384
+ type: "transferred";
1385
+ objectType: string;
1386
+ objectId: string;
1387
+ version: string;
1388
+ digest: string;
1389
+ recipient: "Immutable" | {
1390
+ AddressOwner: string;
1391
+ } | {
1392
+ ObjectOwner: string;
1393
+ } | {
1394
+ Shared: {
1395
+ initial_shared_version: number;
1396
+ };
1397
+ };
1398
+ } | {
1399
+ sender: string;
1400
+ type: "mutated";
1401
+ objectType: string;
1402
+ objectId: string;
1403
+ version: string;
1404
+ digest: string;
1405
+ owner: "Immutable" | {
1406
+ AddressOwner: string;
1407
+ } | {
1408
+ ObjectOwner: string;
1409
+ } | {
1410
+ Shared: {
1411
+ initial_shared_version: number;
1412
+ };
1413
+ };
1414
+ previousVersion: string;
1415
+ } | {
1416
+ sender: string;
1417
+ type: "deleted";
1418
+ objectType: string;
1419
+ objectId: string;
1420
+ version: string;
1421
+ } | {
1422
+ sender: string;
1423
+ type: "wrapped";
1424
+ objectType: string;
1425
+ objectId: string;
1426
+ version: string;
1427
+ } | {
1428
+ sender: string;
1429
+ type: "created";
1430
+ objectType: string;
1431
+ objectId: string;
1432
+ version: string;
1433
+ digest: string;
1434
+ owner: "Immutable" | {
1435
+ AddressOwner: string;
1436
+ } | {
1437
+ ObjectOwner: string;
1438
+ } | {
1439
+ Shared: {
1440
+ initial_shared_version: number;
1441
+ };
1442
+ };
1443
+ })[] | undefined;
1444
+ balanceChanges?: {
1445
+ owner: "Immutable" | {
1446
+ AddressOwner: string;
1447
+ } | {
1448
+ ObjectOwner: string;
1449
+ } | {
1450
+ Shared: {
1451
+ initial_shared_version: number;
1452
+ };
1453
+ };
1454
+ coinType: string;
1455
+ amount: string;
1456
+ }[] | undefined;
1457
+ errors?: string[] | undefined;
1458
+ }>;
1459
+ transferObjects(objects: string[], recipient: string, derivePathParams?: DerivePathParams): Promise<{
1460
+ digest: string;
1461
+ timestampMs?: string | undefined;
1462
+ transaction?: {
1463
+ data: {
1464
+ sender: string;
1465
+ messageVersion: "v1";
1466
+ transaction: {
1467
+ epoch: string;
1468
+ storage_charge: string;
1469
+ computation_charge: string;
1470
+ storage_rebate: string;
1471
+ kind: "ChangeEpoch";
1472
+ epoch_start_timestamp_ms?: string | undefined;
1473
+ } | {
1474
+ epoch: string;
1475
+ round: string;
1476
+ commit_timestamp_ms: string;
1477
+ kind: "ConsensusCommitPrologue";
1478
+ } | {
1479
+ objects: string[];
1480
+ kind: "Genesis";
1481
+ } | {
1482
+ transactions: ({
1483
+ MoveCall: {
1484
+ function: string;
1485
+ package: string;
1486
+ module: string;
1487
+ arguments?: ("GasCoin" | {
1488
+ Input: number;
1489
+ } | {
1490
+ Result: number;
1491
+ } | {
1492
+ NestedResult: [number, number];
1493
+ })[] | undefined;
1494
+ type_arguments?: string[] | undefined;
1495
+ };
1496
+ } | {
1497
+ TransferObjects: [("GasCoin" | {
1498
+ Input: number;
1499
+ } | {
1500
+ Result: number;
1501
+ } | {
1502
+ NestedResult: [number, number];
1503
+ })[], "GasCoin" | {
1504
+ Input: number;
1505
+ } | {
1506
+ Result: number;
1507
+ } | {
1508
+ NestedResult: [number, number];
1509
+ }];
1510
+ } | {
1511
+ SplitCoins: ["GasCoin" | {
1512
+ Input: number;
1513
+ } | {
1514
+ Result: number;
1515
+ } | {
1516
+ NestedResult: [number, number];
1517
+ }, ("GasCoin" | {
1518
+ Input: number;
1519
+ } | {
1520
+ Result: number;
1521
+ } | {
1522
+ NestedResult: [number, number];
1523
+ })[]];
1524
+ } | {
1525
+ MergeCoins: ["GasCoin" | {
1526
+ Input: number;
1527
+ } | {
1528
+ Result: number;
1529
+ } | {
1530
+ NestedResult: [number, number];
1531
+ }, ("GasCoin" | {
1532
+ Input: number;
1533
+ } | {
1534
+ Result: number;
1535
+ } | {
1536
+ NestedResult: [number, number];
1537
+ })[]];
1538
+ } | {
1539
+ Publish: string[] | [{
1540
+ disassembled: Record<string, string>;
1541
+ }, string[]];
1542
+ } | {
1543
+ Upgrade: [string[], string, "GasCoin" | {
1544
+ Input: number;
1545
+ } | {
1546
+ Result: number;
1547
+ } | {
1548
+ NestedResult: [number, number];
1549
+ }] | [{
1550
+ disassembled: Record<string, string>;
1551
+ }, string[], string, "GasCoin" | {
1552
+ Input: number;
1553
+ } | {
1554
+ Result: number;
1555
+ } | {
1556
+ NestedResult: [number, number];
1557
+ }];
1558
+ } | {
1559
+ MakeMoveVec: [string | null, ("GasCoin" | {
1560
+ Input: number;
1561
+ } | {
1562
+ Result: number;
1563
+ } | {
1564
+ NestedResult: [number, number];
1565
+ })[]];
1566
+ })[];
1567
+ inputs: ({
1568
+ type: "pure";
1569
+ valueType: string | null;
1570
+ value: import("@mysten/sui.js").SuiJsonValue;
1571
+ } | {
1572
+ type: "object";
1573
+ objectType: "immOrOwnedObject";
1574
+ objectId: string;
1575
+ version: string;
1576
+ digest: string;
1577
+ } | {
1578
+ type: "object";
1579
+ objectType: "sharedObject";
1580
+ objectId: string;
1581
+ initialSharedVersion: string;
1582
+ mutable: boolean;
1583
+ })[];
1584
+ kind: "ProgrammableTransaction";
1585
+ };
1586
+ gasData: {
1587
+ payment: {
1588
+ objectId: string;
1589
+ version: string | number;
1590
+ digest: string;
1591
+ }[];
1592
+ owner: string;
1593
+ price: string;
1594
+ budget: string;
1595
+ };
1596
+ };
1597
+ txSignatures: string[];
1598
+ } | undefined;
1599
+ effects?: {
1600
+ messageVersion: "v1";
1601
+ status: {
1602
+ status: "success" | "failure";
1603
+ error?: string | undefined;
1604
+ };
1605
+ executedEpoch: string;
1606
+ gasUsed: {
1607
+ computationCost: string;
1608
+ storageCost: string;
1609
+ storageRebate: string;
1610
+ nonRefundableStorageFee: string;
1611
+ };
1612
+ transactionDigest: string;
1613
+ gasObject: {
1614
+ owner: "Immutable" | {
1615
+ AddressOwner: string;
1616
+ } | {
1617
+ ObjectOwner: string;
1618
+ } | {
1619
+ Shared: {
1620
+ initial_shared_version: number;
1621
+ };
1622
+ };
1623
+ reference: {
1624
+ objectId: string;
1625
+ version: string | number;
1626
+ digest: string;
1627
+ };
1628
+ };
1629
+ modifiedAtVersions?: {
1630
+ objectId: string;
1631
+ sequenceNumber: string;
1632
+ }[] | undefined;
1633
+ sharedObjects?: {
1634
+ objectId: string;
1635
+ version: string | number;
1636
+ digest: string;
1637
+ }[] | undefined;
1638
+ created?: {
1639
+ owner: "Immutable" | {
1640
+ AddressOwner: string;
1641
+ } | {
1642
+ ObjectOwner: string;
1643
+ } | {
1644
+ Shared: {
1645
+ initial_shared_version: number;
1646
+ };
1647
+ };
1648
+ reference: {
1649
+ objectId: string;
1650
+ version: string | number;
1651
+ digest: string;
1652
+ };
1653
+ }[] | undefined;
1654
+ mutated?: {
1655
+ owner: "Immutable" | {
1656
+ AddressOwner: string;
1657
+ } | {
1658
+ ObjectOwner: string;
1659
+ } | {
1660
+ Shared: {
1661
+ initial_shared_version: number;
1662
+ };
1663
+ };
1664
+ reference: {
1665
+ objectId: string;
1666
+ version: string | number;
1667
+ digest: string;
1668
+ };
1669
+ }[] | undefined;
1670
+ unwrapped?: {
1671
+ owner: "Immutable" | {
1672
+ AddressOwner: string;
1673
+ } | {
1674
+ ObjectOwner: string;
1675
+ } | {
1676
+ Shared: {
1677
+ initial_shared_version: number;
1678
+ };
1679
+ };
1680
+ reference: {
1681
+ objectId: string;
1682
+ version: string | number;
1683
+ digest: string;
1684
+ };
1685
+ }[] | undefined;
1686
+ deleted?: {
1687
+ objectId: string;
1688
+ version: string | number;
1689
+ digest: string;
1690
+ }[] | undefined;
1691
+ unwrappedThenDeleted?: {
1692
+ objectId: string;
1693
+ version: string | number;
1694
+ digest: string;
1695
+ }[] | undefined;
1696
+ wrapped?: {
1697
+ objectId: string;
1698
+ version: string | number;
1699
+ digest: string;
1700
+ }[] | undefined;
1701
+ eventsDigest?: string | undefined;
1702
+ dependencies?: string[] | undefined;
1703
+ } | undefined;
1704
+ events?: {
1705
+ id: {
1706
+ txDigest: string;
1707
+ eventSeq: string;
1708
+ };
1709
+ packageId: string;
1710
+ transactionModule: string;
1711
+ sender: string;
1712
+ type: string;
1713
+ parsedJson?: Record<string, any> | undefined;
1714
+ bcs?: string | undefined;
1715
+ timestampMs?: string | undefined;
1716
+ }[] | undefined;
1717
+ checkpoint?: string | undefined;
1718
+ confirmedLocalExecution?: boolean | undefined;
1719
+ objectChanges?: ({
1720
+ packageId: string;
1721
+ type: "published";
1722
+ version: string;
1723
+ digest: string;
1724
+ modules: string[];
1725
+ } | {
1726
+ sender: string;
1727
+ type: "transferred";
1728
+ objectType: string;
1729
+ objectId: string;
1730
+ version: string;
1731
+ digest: string;
1732
+ recipient: "Immutable" | {
1733
+ AddressOwner: string;
1734
+ } | {
1735
+ ObjectOwner: string;
1736
+ } | {
1737
+ Shared: {
1738
+ initial_shared_version: number;
1739
+ };
1740
+ };
1741
+ } | {
1742
+ sender: string;
1743
+ type: "mutated";
1744
+ objectType: string;
1745
+ objectId: string;
1746
+ version: string;
1747
+ digest: string;
1748
+ owner: "Immutable" | {
1749
+ AddressOwner: string;
1750
+ } | {
1751
+ ObjectOwner: string;
1752
+ } | {
1753
+ Shared: {
1754
+ initial_shared_version: number;
1755
+ };
1756
+ };
1757
+ previousVersion: string;
1758
+ } | {
1759
+ sender: string;
1760
+ type: "deleted";
1761
+ objectType: string;
1762
+ objectId: string;
1763
+ version: string;
1764
+ } | {
1765
+ sender: string;
1766
+ type: "wrapped";
1767
+ objectType: string;
1768
+ objectId: string;
1769
+ version: string;
1770
+ } | {
1771
+ sender: string;
1772
+ type: "created";
1773
+ objectType: string;
1774
+ objectId: string;
1775
+ version: string;
1776
+ digest: string;
1777
+ owner: "Immutable" | {
1778
+ AddressOwner: string;
1779
+ } | {
1780
+ ObjectOwner: string;
1781
+ } | {
1782
+ Shared: {
1783
+ initial_shared_version: number;
1784
+ };
1785
+ };
1786
+ })[] | undefined;
1787
+ balanceChanges?: {
1788
+ owner: "Immutable" | {
1789
+ AddressOwner: string;
1790
+ } | {
1791
+ ObjectOwner: string;
1792
+ } | {
1793
+ Shared: {
1794
+ initial_shared_version: number;
1795
+ };
1796
+ };
1797
+ coinType: string;
1798
+ amount: string;
1799
+ }[] | undefined;
1800
+ errors?: string[] | undefined;
1801
+ }>;
1802
+ moveCall(callParams: {
1803
+ target: string;
1804
+ arguments?: (SuiTxArg | SuiVecTxArg)[];
1805
+ typeArguments?: string[];
1806
+ derivePathParams?: DerivePathParams;
1807
+ }): Promise<{
1808
+ digest: string;
1809
+ timestampMs?: string | undefined;
1810
+ transaction?: {
1811
+ data: {
1812
+ sender: string;
1813
+ messageVersion: "v1";
1814
+ transaction: {
1815
+ epoch: string;
1816
+ storage_charge: string;
1817
+ computation_charge: string;
1818
+ storage_rebate: string;
1819
+ kind: "ChangeEpoch";
1820
+ epoch_start_timestamp_ms?: string | undefined;
1821
+ } | {
1822
+ epoch: string;
1823
+ round: string;
1824
+ commit_timestamp_ms: string;
1825
+ kind: "ConsensusCommitPrologue";
1826
+ } | {
1827
+ objects: string[];
1828
+ kind: "Genesis";
1829
+ } | {
1830
+ transactions: ({
1831
+ MoveCall: {
1832
+ function: string;
1833
+ package: string;
1834
+ module: string;
1835
+ arguments?: ("GasCoin" | {
1836
+ Input: number;
1837
+ } | {
1838
+ Result: number;
1839
+ } | {
1840
+ NestedResult: [number, number];
1841
+ })[] | undefined;
1842
+ type_arguments?: string[] | undefined;
1843
+ };
1844
+ } | {
1845
+ TransferObjects: [("GasCoin" | {
1846
+ Input: number;
1847
+ } | {
1848
+ Result: number;
1849
+ } | {
1850
+ NestedResult: [number, number];
1851
+ })[], "GasCoin" | {
1852
+ Input: number;
1853
+ } | {
1854
+ Result: number;
1855
+ } | {
1856
+ NestedResult: [number, number];
1857
+ }];
1858
+ } | {
1859
+ SplitCoins: ["GasCoin" | {
1860
+ Input: number;
1861
+ } | {
1862
+ Result: number;
1863
+ } | {
1864
+ NestedResult: [number, number];
1865
+ }, ("GasCoin" | {
1866
+ Input: number;
1867
+ } | {
1868
+ Result: number;
1869
+ } | {
1870
+ NestedResult: [number, number];
1871
+ })[]];
1872
+ } | {
1873
+ MergeCoins: ["GasCoin" | {
1874
+ Input: number;
1875
+ } | {
1876
+ Result: number;
1877
+ } | {
1878
+ NestedResult: [number, number];
1879
+ }, ("GasCoin" | {
1880
+ Input: number;
1881
+ } | {
1882
+ Result: number;
1883
+ } | {
1884
+ NestedResult: [number, number];
1885
+ })[]];
1886
+ } | {
1887
+ Publish: string[] | [{
1888
+ disassembled: Record<string, string>;
1889
+ }, string[]];
1890
+ } | {
1891
+ Upgrade: [string[], string, "GasCoin" | {
1892
+ Input: number;
1893
+ } | {
1894
+ Result: number;
1895
+ } | {
1896
+ NestedResult: [number, number];
1897
+ }] | [{
1898
+ disassembled: Record<string, string>;
1899
+ }, string[], string, "GasCoin" | {
1900
+ Input: number;
1901
+ } | {
1902
+ Result: number;
1903
+ } | {
1904
+ NestedResult: [number, number];
1905
+ }];
1906
+ } | {
1907
+ MakeMoveVec: [string | null, ("GasCoin" | {
1908
+ Input: number;
1909
+ } | {
1910
+ Result: number;
1911
+ } | {
1912
+ NestedResult: [number, number];
1913
+ })[]];
1914
+ })[];
1915
+ inputs: ({
1916
+ type: "pure";
1917
+ valueType: string | null;
1918
+ value: import("@mysten/sui.js").SuiJsonValue;
1919
+ } | {
1920
+ type: "object";
1921
+ objectType: "immOrOwnedObject";
1922
+ objectId: string;
1923
+ version: string;
1924
+ digest: string;
1925
+ } | {
1926
+ type: "object";
1927
+ objectType: "sharedObject";
1928
+ objectId: string;
1929
+ initialSharedVersion: string;
1930
+ mutable: boolean;
1931
+ })[];
1932
+ kind: "ProgrammableTransaction";
1933
+ };
1934
+ gasData: {
1935
+ payment: {
1936
+ objectId: string;
1937
+ version: string | number;
1938
+ digest: string;
1939
+ }[];
1940
+ owner: string;
1941
+ price: string;
1942
+ budget: string;
1943
+ };
1944
+ };
1945
+ txSignatures: string[];
1946
+ } | undefined;
1947
+ effects?: {
1948
+ messageVersion: "v1";
1949
+ status: {
1950
+ status: "success" | "failure";
1951
+ error?: string | undefined;
1952
+ };
1953
+ executedEpoch: string;
1954
+ gasUsed: {
1955
+ computationCost: string;
1956
+ storageCost: string;
1957
+ storageRebate: string;
1958
+ nonRefundableStorageFee: string;
1959
+ };
1960
+ transactionDigest: string;
1961
+ gasObject: {
1962
+ owner: "Immutable" | {
1963
+ AddressOwner: string;
1964
+ } | {
1965
+ ObjectOwner: string;
1966
+ } | {
1967
+ Shared: {
1968
+ initial_shared_version: number;
1969
+ };
1970
+ };
1971
+ reference: {
1972
+ objectId: string;
1973
+ version: string | number;
1974
+ digest: string;
1975
+ };
1976
+ };
1977
+ modifiedAtVersions?: {
1978
+ objectId: string;
1979
+ sequenceNumber: string;
1980
+ }[] | undefined;
1981
+ sharedObjects?: {
1982
+ objectId: string;
1983
+ version: string | number;
1984
+ digest: string;
1985
+ }[] | undefined;
1986
+ created?: {
1987
+ owner: "Immutable" | {
1988
+ AddressOwner: string;
1989
+ } | {
1990
+ ObjectOwner: string;
1991
+ } | {
1992
+ Shared: {
1993
+ initial_shared_version: number;
1994
+ };
1995
+ };
1996
+ reference: {
1997
+ objectId: string;
1998
+ version: string | number;
1999
+ digest: string;
2000
+ };
2001
+ }[] | undefined;
2002
+ mutated?: {
2003
+ owner: "Immutable" | {
2004
+ AddressOwner: string;
2005
+ } | {
2006
+ ObjectOwner: string;
2007
+ } | {
2008
+ Shared: {
2009
+ initial_shared_version: number;
2010
+ };
2011
+ };
2012
+ reference: {
2013
+ objectId: string;
2014
+ version: string | number;
2015
+ digest: string;
2016
+ };
2017
+ }[] | undefined;
2018
+ unwrapped?: {
2019
+ owner: "Immutable" | {
2020
+ AddressOwner: string;
2021
+ } | {
2022
+ ObjectOwner: string;
2023
+ } | {
2024
+ Shared: {
2025
+ initial_shared_version: number;
2026
+ };
2027
+ };
2028
+ reference: {
2029
+ objectId: string;
2030
+ version: string | number;
2031
+ digest: string;
2032
+ };
2033
+ }[] | undefined;
2034
+ deleted?: {
2035
+ objectId: string;
2036
+ version: string | number;
2037
+ digest: string;
2038
+ }[] | undefined;
2039
+ unwrappedThenDeleted?: {
2040
+ objectId: string;
2041
+ version: string | number;
2042
+ digest: string;
2043
+ }[] | undefined;
2044
+ wrapped?: {
2045
+ objectId: string;
2046
+ version: string | number;
2047
+ digest: string;
2048
+ }[] | undefined;
2049
+ eventsDigest?: string | undefined;
2050
+ dependencies?: string[] | undefined;
2051
+ } | undefined;
2052
+ events?: {
2053
+ id: {
2054
+ txDigest: string;
2055
+ eventSeq: string;
2056
+ };
2057
+ packageId: string;
2058
+ transactionModule: string;
2059
+ sender: string;
2060
+ type: string;
2061
+ parsedJson?: Record<string, any> | undefined;
2062
+ bcs?: string | undefined;
2063
+ timestampMs?: string | undefined;
2064
+ }[] | undefined;
2065
+ checkpoint?: string | undefined;
2066
+ confirmedLocalExecution?: boolean | undefined;
2067
+ objectChanges?: ({
2068
+ packageId: string;
2069
+ type: "published";
2070
+ version: string;
2071
+ digest: string;
2072
+ modules: string[];
2073
+ } | {
2074
+ sender: string;
2075
+ type: "transferred";
2076
+ objectType: string;
2077
+ objectId: string;
2078
+ version: string;
2079
+ digest: string;
2080
+ recipient: "Immutable" | {
2081
+ AddressOwner: string;
2082
+ } | {
2083
+ ObjectOwner: string;
2084
+ } | {
2085
+ Shared: {
2086
+ initial_shared_version: number;
2087
+ };
2088
+ };
2089
+ } | {
2090
+ sender: string;
2091
+ type: "mutated";
2092
+ objectType: string;
2093
+ objectId: string;
2094
+ version: string;
2095
+ digest: string;
2096
+ owner: "Immutable" | {
2097
+ AddressOwner: string;
2098
+ } | {
2099
+ ObjectOwner: string;
2100
+ } | {
2101
+ Shared: {
2102
+ initial_shared_version: number;
2103
+ };
2104
+ };
2105
+ previousVersion: string;
2106
+ } | {
2107
+ sender: string;
2108
+ type: "deleted";
2109
+ objectType: string;
2110
+ objectId: string;
2111
+ version: string;
2112
+ } | {
2113
+ sender: string;
2114
+ type: "wrapped";
2115
+ objectType: string;
2116
+ objectId: string;
2117
+ version: string;
2118
+ } | {
2119
+ sender: string;
2120
+ type: "created";
2121
+ objectType: string;
2122
+ objectId: string;
2123
+ version: string;
2124
+ digest: string;
2125
+ owner: "Immutable" | {
2126
+ AddressOwner: string;
2127
+ } | {
2128
+ ObjectOwner: string;
2129
+ } | {
2130
+ Shared: {
2131
+ initial_shared_version: number;
2132
+ };
2133
+ };
2134
+ })[] | undefined;
2135
+ balanceChanges?: {
2136
+ owner: "Immutable" | {
2137
+ AddressOwner: string;
2138
+ } | {
2139
+ ObjectOwner: string;
2140
+ } | {
2141
+ Shared: {
2142
+ initial_shared_version: number;
2143
+ };
2144
+ };
2145
+ coinType: string;
2146
+ amount: string;
2147
+ }[] | undefined;
2148
+ errors?: string[] | undefined;
2149
+ }>;
2150
+ /**
2151
+ * Select coins with the given amount and coin type, the total amount is greater than or equal to the given amount
2152
+ * @param amount
2153
+ * @param coinType
2154
+ * @param owner
2155
+ */
2156
+ selectCoinsWithAmount(amount: number, coinType: string, owner?: string): Promise<string[]>;
2157
+ /**
2158
+ * stake the given amount of SUI to the validator
2159
+ * @param amount the amount of SUI to stake
2160
+ * @param validatorAddr the validator address
2161
+ * @param derivePathParams the derive path params for the current signer
2162
+ */
2163
+ stakeSui(amount: number, validatorAddr: string, derivePathParams?: DerivePathParams): Promise<{
2164
+ digest: string;
2165
+ timestampMs?: string | undefined;
2166
+ transaction?: {
2167
+ data: {
2168
+ sender: string;
2169
+ messageVersion: "v1";
2170
+ transaction: {
2171
+ epoch: string;
2172
+ storage_charge: string;
2173
+ computation_charge: string;
2174
+ storage_rebate: string;
2175
+ kind: "ChangeEpoch";
2176
+ epoch_start_timestamp_ms?: string | undefined;
2177
+ } | {
2178
+ epoch: string;
2179
+ round: string;
2180
+ commit_timestamp_ms: string;
2181
+ kind: "ConsensusCommitPrologue";
2182
+ } | {
2183
+ objects: string[];
2184
+ kind: "Genesis";
2185
+ } | {
2186
+ transactions: ({
2187
+ MoveCall: {
2188
+ function: string;
2189
+ package: string;
2190
+ module: string;
2191
+ arguments?: ("GasCoin" | {
2192
+ Input: number;
2193
+ } | {
2194
+ Result: number;
2195
+ } | {
2196
+ NestedResult: [number, number];
2197
+ })[] | undefined;
2198
+ type_arguments?: string[] | undefined;
2199
+ };
2200
+ } | {
2201
+ TransferObjects: [("GasCoin" | {
2202
+ Input: number;
2203
+ } | {
2204
+ Result: number;
2205
+ } | {
2206
+ NestedResult: [number, number];
2207
+ })[], "GasCoin" | {
2208
+ Input: number;
2209
+ } | {
2210
+ Result: number;
2211
+ } | {
2212
+ NestedResult: [number, number];
2213
+ }];
2214
+ } | {
2215
+ SplitCoins: ["GasCoin" | {
2216
+ Input: number;
2217
+ } | {
2218
+ Result: number;
2219
+ } | {
2220
+ NestedResult: [number, number];
2221
+ }, ("GasCoin" | {
2222
+ Input: number;
2223
+ } | {
2224
+ Result: number;
2225
+ } | {
2226
+ NestedResult: [number, number];
2227
+ })[]];
2228
+ } | {
2229
+ MergeCoins: ["GasCoin" | {
2230
+ Input: number;
2231
+ } | {
2232
+ Result: number;
2233
+ } | {
2234
+ NestedResult: [number, number];
2235
+ }, ("GasCoin" | {
2236
+ Input: number;
2237
+ } | {
2238
+ Result: number;
2239
+ } | {
2240
+ NestedResult: [number, number];
2241
+ })[]];
2242
+ } | {
2243
+ Publish: string[] | [{
2244
+ disassembled: Record<string, string>;
2245
+ }, string[]];
2246
+ } | {
2247
+ Upgrade: [string[], string, "GasCoin" | {
2248
+ Input: number;
2249
+ } | {
2250
+ Result: number;
2251
+ } | {
2252
+ NestedResult: [number, number];
2253
+ }] | [{
2254
+ disassembled: Record<string, string>;
2255
+ }, string[], string, "GasCoin" | {
2256
+ Input: number;
2257
+ } | {
2258
+ Result: number;
2259
+ } | {
2260
+ NestedResult: [number, number];
2261
+ }];
2262
+ } | {
2263
+ MakeMoveVec: [string | null, ("GasCoin" | {
2264
+ Input: number;
2265
+ } | {
2266
+ Result: number;
2267
+ } | {
2268
+ NestedResult: [number, number];
2269
+ })[]];
2270
+ })[];
2271
+ inputs: ({
2272
+ type: "pure";
2273
+ valueType: string | null;
2274
+ value: import("@mysten/sui.js").SuiJsonValue;
2275
+ } | {
2276
+ type: "object";
2277
+ objectType: "immOrOwnedObject";
2278
+ objectId: string;
2279
+ version: string;
2280
+ digest: string;
2281
+ } | {
2282
+ type: "object";
2283
+ objectType: "sharedObject";
2284
+ objectId: string;
2285
+ initialSharedVersion: string;
2286
+ mutable: boolean;
2287
+ })[];
2288
+ kind: "ProgrammableTransaction";
2289
+ };
2290
+ gasData: {
2291
+ payment: {
2292
+ objectId: string;
2293
+ version: string | number;
2294
+ digest: string;
2295
+ }[];
2296
+ owner: string;
2297
+ price: string;
2298
+ budget: string;
2299
+ };
2300
+ };
2301
+ txSignatures: string[];
2302
+ } | undefined;
2303
+ effects?: {
2304
+ messageVersion: "v1";
2305
+ status: {
2306
+ status: "success" | "failure";
2307
+ error?: string | undefined;
2308
+ };
2309
+ executedEpoch: string;
2310
+ gasUsed: {
2311
+ computationCost: string;
2312
+ storageCost: string;
2313
+ storageRebate: string;
2314
+ nonRefundableStorageFee: string;
2315
+ };
2316
+ transactionDigest: string;
2317
+ gasObject: {
2318
+ owner: "Immutable" | {
2319
+ AddressOwner: string;
2320
+ } | {
2321
+ ObjectOwner: string;
2322
+ } | {
2323
+ Shared: {
2324
+ initial_shared_version: number;
2325
+ };
2326
+ };
2327
+ reference: {
2328
+ objectId: string;
2329
+ version: string | number;
2330
+ digest: string;
2331
+ };
2332
+ };
2333
+ modifiedAtVersions?: {
2334
+ objectId: string;
2335
+ sequenceNumber: string;
2336
+ }[] | undefined;
2337
+ sharedObjects?: {
2338
+ objectId: string;
2339
+ version: string | number;
2340
+ digest: string;
2341
+ }[] | undefined;
2342
+ created?: {
2343
+ owner: "Immutable" | {
2344
+ AddressOwner: string;
2345
+ } | {
2346
+ ObjectOwner: string;
2347
+ } | {
2348
+ Shared: {
2349
+ initial_shared_version: number;
2350
+ };
2351
+ };
2352
+ reference: {
2353
+ objectId: string;
2354
+ version: string | number;
2355
+ digest: string;
2356
+ };
2357
+ }[] | undefined;
2358
+ mutated?: {
2359
+ owner: "Immutable" | {
2360
+ AddressOwner: string;
2361
+ } | {
2362
+ ObjectOwner: string;
2363
+ } | {
2364
+ Shared: {
2365
+ initial_shared_version: number;
2366
+ };
2367
+ };
2368
+ reference: {
2369
+ objectId: string;
2370
+ version: string | number;
2371
+ digest: string;
2372
+ };
2373
+ }[] | undefined;
2374
+ unwrapped?: {
2375
+ owner: "Immutable" | {
2376
+ AddressOwner: string;
2377
+ } | {
2378
+ ObjectOwner: string;
2379
+ } | {
2380
+ Shared: {
2381
+ initial_shared_version: number;
2382
+ };
2383
+ };
2384
+ reference: {
2385
+ objectId: string;
2386
+ version: string | number;
2387
+ digest: string;
2388
+ };
2389
+ }[] | undefined;
2390
+ deleted?: {
2391
+ objectId: string;
2392
+ version: string | number;
2393
+ digest: string;
2394
+ }[] | undefined;
2395
+ unwrappedThenDeleted?: {
2396
+ objectId: string;
2397
+ version: string | number;
2398
+ digest: string;
2399
+ }[] | undefined;
2400
+ wrapped?: {
2401
+ objectId: string;
2402
+ version: string | number;
2403
+ digest: string;
2404
+ }[] | undefined;
2405
+ eventsDigest?: string | undefined;
2406
+ dependencies?: string[] | undefined;
2407
+ } | undefined;
2408
+ events?: {
2409
+ id: {
2410
+ txDigest: string;
2411
+ eventSeq: string;
2412
+ };
2413
+ packageId: string;
2414
+ transactionModule: string;
2415
+ sender: string;
2416
+ type: string;
2417
+ parsedJson?: Record<string, any> | undefined;
2418
+ bcs?: string | undefined;
2419
+ timestampMs?: string | undefined;
2420
+ }[] | undefined;
2421
+ checkpoint?: string | undefined;
2422
+ confirmedLocalExecution?: boolean | undefined;
2423
+ objectChanges?: ({
2424
+ packageId: string;
2425
+ type: "published";
2426
+ version: string;
2427
+ digest: string;
2428
+ modules: string[];
2429
+ } | {
2430
+ sender: string;
2431
+ type: "transferred";
2432
+ objectType: string;
2433
+ objectId: string;
2434
+ version: string;
2435
+ digest: string;
2436
+ recipient: "Immutable" | {
2437
+ AddressOwner: string;
2438
+ } | {
2439
+ ObjectOwner: string;
2440
+ } | {
2441
+ Shared: {
2442
+ initial_shared_version: number;
2443
+ };
2444
+ };
2445
+ } | {
2446
+ sender: string;
2447
+ type: "mutated";
2448
+ objectType: string;
2449
+ objectId: string;
2450
+ version: string;
2451
+ digest: string;
2452
+ owner: "Immutable" | {
2453
+ AddressOwner: string;
2454
+ } | {
2455
+ ObjectOwner: string;
2456
+ } | {
2457
+ Shared: {
2458
+ initial_shared_version: number;
2459
+ };
2460
+ };
2461
+ previousVersion: string;
2462
+ } | {
2463
+ sender: string;
2464
+ type: "deleted";
2465
+ objectType: string;
2466
+ objectId: string;
2467
+ version: string;
2468
+ } | {
2469
+ sender: string;
2470
+ type: "wrapped";
2471
+ objectType: string;
2472
+ objectId: string;
2473
+ version: string;
2474
+ } | {
2475
+ sender: string;
2476
+ type: "created";
2477
+ objectType: string;
2478
+ objectId: string;
2479
+ version: string;
2480
+ digest: string;
2481
+ owner: "Immutable" | {
2482
+ AddressOwner: string;
2483
+ } | {
2484
+ ObjectOwner: string;
2485
+ } | {
2486
+ Shared: {
2487
+ initial_shared_version: number;
2488
+ };
2489
+ };
2490
+ })[] | undefined;
2491
+ balanceChanges?: {
2492
+ owner: "Immutable" | {
2493
+ AddressOwner: string;
2494
+ } | {
2495
+ ObjectOwner: string;
2496
+ } | {
2497
+ Shared: {
2498
+ initial_shared_version: number;
2499
+ };
2500
+ };
2501
+ coinType: string;
2502
+ amount: string;
2503
+ }[] | undefined;
2504
+ errors?: string[] | undefined;
2505
+ }>;
2506
+ /**
2507
+ * Execute the transaction with on-chain data but without really submitting. Useful for querying the effects of a transaction.
2508
+ * Since the transaction is not submitted, its gas cost is not charged.
2509
+ * @param tx the transaction to execute
2510
+ * @param derivePathParams the derive path params
2511
+ * @returns the effects and events of the transaction, such as object changes, gas cost, event emitted.
2512
+ */
2513
+ inspectTxn(tx: Uint8Array | TransactionBlock | SuiTxBlock, derivePathParams?: DerivePathParams): Promise<DevInspectResults>;
2514
+ call(world_id: string, system_name: string, counter: any, derivePathParams?: DerivePathParams): Promise<{
2515
+ digest: string;
2516
+ timestampMs?: string | undefined;
2517
+ transaction?: {
2518
+ data: {
2519
+ sender: string;
2520
+ messageVersion: "v1";
2521
+ transaction: {
2522
+ epoch: string;
2523
+ storage_charge: string;
2524
+ computation_charge: string;
2525
+ storage_rebate: string;
2526
+ kind: "ChangeEpoch";
2527
+ epoch_start_timestamp_ms?: string | undefined;
2528
+ } | {
2529
+ epoch: string;
2530
+ round: string;
2531
+ commit_timestamp_ms: string;
2532
+ kind: "ConsensusCommitPrologue";
2533
+ } | {
2534
+ objects: string[];
2535
+ kind: "Genesis";
2536
+ } | {
2537
+ transactions: ({
2538
+ MoveCall: {
2539
+ function: string;
2540
+ package: string;
2541
+ module: string;
2542
+ arguments?: ("GasCoin" | {
2543
+ Input: number;
2544
+ } | {
2545
+ Result: number;
2546
+ } | {
2547
+ NestedResult: [number, number];
2548
+ })[] | undefined;
2549
+ type_arguments?: string[] | undefined;
2550
+ };
2551
+ } | {
2552
+ TransferObjects: [("GasCoin" | {
2553
+ Input: number;
2554
+ } | {
2555
+ Result: number;
2556
+ } | {
2557
+ NestedResult: [number, number];
2558
+ })[], "GasCoin" | {
2559
+ Input: number;
2560
+ } | {
2561
+ Result: number;
2562
+ } | {
2563
+ NestedResult: [number, number];
2564
+ }];
2565
+ } | {
2566
+ SplitCoins: ["GasCoin" | {
2567
+ Input: number;
2568
+ } | {
2569
+ Result: number;
2570
+ } | {
2571
+ NestedResult: [number, number];
2572
+ }, ("GasCoin" | {
2573
+ Input: number;
2574
+ } | {
2575
+ Result: number;
2576
+ } | {
2577
+ NestedResult: [number, number];
2578
+ })[]];
2579
+ } | {
2580
+ MergeCoins: ["GasCoin" | {
2581
+ Input: number;
2582
+ } | {
2583
+ Result: number;
2584
+ } | {
2585
+ NestedResult: [number, number];
2586
+ }, ("GasCoin" | {
2587
+ Input: number;
2588
+ } | {
2589
+ Result: number;
2590
+ } | {
2591
+ NestedResult: [number, number];
2592
+ })[]];
2593
+ } | {
2594
+ Publish: string[] | [{
2595
+ disassembled: Record<string, string>;
2596
+ }, string[]];
2597
+ } | {
2598
+ Upgrade: [string[], string, "GasCoin" | {
2599
+ Input: number;
2600
+ } | {
2601
+ Result: number;
2602
+ } | {
2603
+ NestedResult: [number, number];
2604
+ }] | [{
2605
+ disassembled: Record<string, string>;
2606
+ }, string[], string, "GasCoin" | {
2607
+ Input: number;
2608
+ } | {
2609
+ Result: number;
2610
+ } | {
2611
+ NestedResult: [number, number];
2612
+ }];
2613
+ } | {
2614
+ MakeMoveVec: [string | null, ("GasCoin" | {
2615
+ Input: number;
2616
+ } | {
2617
+ Result: number;
2618
+ } | {
2619
+ NestedResult: [number, number];
2620
+ })[]];
2621
+ })[];
2622
+ inputs: ({
2623
+ type: "pure";
2624
+ valueType: string | null;
2625
+ value: import("@mysten/sui.js").SuiJsonValue;
2626
+ } | {
2627
+ type: "object";
2628
+ objectType: "immOrOwnedObject";
2629
+ objectId: string;
2630
+ version: string;
2631
+ digest: string;
2632
+ } | {
2633
+ type: "object";
2634
+ objectType: "sharedObject";
2635
+ objectId: string;
2636
+ initialSharedVersion: string;
2637
+ mutable: boolean;
2638
+ })[];
2639
+ kind: "ProgrammableTransaction";
2640
+ };
2641
+ gasData: {
2642
+ payment: {
2643
+ objectId: string;
2644
+ version: string | number;
2645
+ digest: string;
2646
+ }[];
2647
+ owner: string;
2648
+ price: string;
2649
+ budget: string;
2650
+ };
2651
+ };
2652
+ txSignatures: string[];
2653
+ } | undefined;
2654
+ effects?: {
2655
+ messageVersion: "v1";
2656
+ status: {
2657
+ status: "success" | "failure";
2658
+ error?: string | undefined;
2659
+ };
2660
+ executedEpoch: string;
2661
+ gasUsed: {
2662
+ computationCost: string;
2663
+ storageCost: string;
2664
+ storageRebate: string;
2665
+ nonRefundableStorageFee: string;
2666
+ };
2667
+ transactionDigest: string;
2668
+ gasObject: {
2669
+ owner: "Immutable" | {
2670
+ AddressOwner: string;
2671
+ } | {
2672
+ ObjectOwner: string;
2673
+ } | {
2674
+ Shared: {
2675
+ initial_shared_version: number;
2676
+ };
2677
+ };
2678
+ reference: {
2679
+ objectId: string;
2680
+ version: string | number;
2681
+ digest: string;
2682
+ };
2683
+ };
2684
+ modifiedAtVersions?: {
2685
+ objectId: string;
2686
+ sequenceNumber: string;
2687
+ }[] | undefined;
2688
+ sharedObjects?: {
2689
+ objectId: string;
2690
+ version: string | number;
2691
+ digest: string;
2692
+ }[] | undefined;
2693
+ created?: {
2694
+ owner: "Immutable" | {
2695
+ AddressOwner: string;
2696
+ } | {
2697
+ ObjectOwner: string;
2698
+ } | {
2699
+ Shared: {
2700
+ initial_shared_version: number;
2701
+ };
2702
+ };
2703
+ reference: {
2704
+ objectId: string;
2705
+ version: string | number;
2706
+ digest: string;
2707
+ };
2708
+ }[] | undefined;
2709
+ mutated?: {
2710
+ owner: "Immutable" | {
2711
+ AddressOwner: string;
2712
+ } | {
2713
+ ObjectOwner: string;
2714
+ } | {
2715
+ Shared: {
2716
+ initial_shared_version: number;
2717
+ };
2718
+ };
2719
+ reference: {
2720
+ objectId: string;
2721
+ version: string | number;
2722
+ digest: string;
2723
+ };
2724
+ }[] | undefined;
2725
+ unwrapped?: {
2726
+ owner: "Immutable" | {
2727
+ AddressOwner: string;
2728
+ } | {
2729
+ ObjectOwner: string;
2730
+ } | {
2731
+ Shared: {
2732
+ initial_shared_version: number;
2733
+ };
2734
+ };
2735
+ reference: {
2736
+ objectId: string;
2737
+ version: string | number;
2738
+ digest: string;
2739
+ };
2740
+ }[] | undefined;
2741
+ deleted?: {
2742
+ objectId: string;
2743
+ version: string | number;
2744
+ digest: string;
2745
+ }[] | undefined;
2746
+ unwrappedThenDeleted?: {
2747
+ objectId: string;
2748
+ version: string | number;
2749
+ digest: string;
2750
+ }[] | undefined;
2751
+ wrapped?: {
2752
+ objectId: string;
2753
+ version: string | number;
2754
+ digest: string;
2755
+ }[] | undefined;
2756
+ eventsDigest?: string | undefined;
2757
+ dependencies?: string[] | undefined;
2758
+ } | undefined;
2759
+ events?: {
2760
+ id: {
2761
+ txDigest: string;
2762
+ eventSeq: string;
2763
+ };
2764
+ packageId: string;
2765
+ transactionModule: string;
2766
+ sender: string;
2767
+ type: string;
2768
+ parsedJson?: Record<string, any> | undefined;
2769
+ bcs?: string | undefined;
2770
+ timestampMs?: string | undefined;
2771
+ }[] | undefined;
2772
+ checkpoint?: string | undefined;
2773
+ confirmedLocalExecution?: boolean | undefined;
2774
+ objectChanges?: ({
2775
+ packageId: string;
2776
+ type: "published";
2777
+ version: string;
2778
+ digest: string;
2779
+ modules: string[];
2780
+ } | {
2781
+ sender: string;
2782
+ type: "transferred";
2783
+ objectType: string;
2784
+ objectId: string;
2785
+ version: string;
2786
+ digest: string;
2787
+ recipient: "Immutable" | {
2788
+ AddressOwner: string;
2789
+ } | {
2790
+ ObjectOwner: string;
2791
+ } | {
2792
+ Shared: {
2793
+ initial_shared_version: number;
2794
+ };
2795
+ };
2796
+ } | {
2797
+ sender: string;
2798
+ type: "mutated";
2799
+ objectType: string;
2800
+ objectId: string;
2801
+ version: string;
2802
+ digest: string;
2803
+ owner: "Immutable" | {
2804
+ AddressOwner: string;
2805
+ } | {
2806
+ ObjectOwner: string;
2807
+ } | {
2808
+ Shared: {
2809
+ initial_shared_version: number;
2810
+ };
2811
+ };
2812
+ previousVersion: string;
2813
+ } | {
2814
+ sender: string;
2815
+ type: "deleted";
2816
+ objectType: string;
2817
+ objectId: string;
2818
+ version: string;
2819
+ } | {
2820
+ sender: string;
2821
+ type: "wrapped";
2822
+ objectType: string;
2823
+ objectId: string;
2824
+ version: string;
2825
+ } | {
2826
+ sender: string;
2827
+ type: "created";
2828
+ objectType: string;
2829
+ objectId: string;
2830
+ version: string;
2831
+ digest: string;
2832
+ owner: "Immutable" | {
2833
+ AddressOwner: string;
2834
+ } | {
2835
+ ObjectOwner: string;
2836
+ } | {
2837
+ Shared: {
2838
+ initial_shared_version: number;
2839
+ };
2840
+ };
2841
+ })[] | undefined;
2842
+ balanceChanges?: {
2843
+ owner: "Immutable" | {
2844
+ AddressOwner: string;
2845
+ } | {
2846
+ ObjectOwner: string;
2847
+ } | {
2848
+ Shared: {
2849
+ initial_shared_version: number;
2850
+ };
2851
+ };
2852
+ coinType: string;
2853
+ amount: string;
2854
+ }[] | undefined;
2855
+ errors?: string[] | undefined;
2856
+ }>;
2857
+ }