@scallop-io/sui-kit 0.33.0

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