@0xobelisk/client 0.3.0 → 0.3.2

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