@0xobelisk/sui-client 0.5.3 → 0.5.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.d.ts +3 -1
- package/dist/index.js +343 -238
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +331 -245
- package/dist/index.mjs.map +1 -1
- package/dist/libs/multiSig/client.d.ts +15 -0
- package/dist/libs/multiSig/index.d.ts +1 -0
- package/dist/libs/multiSig/publickey.d.ts +2 -0
- package/dist/libs/suiAccountManager/index.d.ts +1 -1
- package/dist/libs/suiAccountManager/keypair.d.ts +1 -1
- package/dist/libs/suiContractFactory/index.d.ts +1 -1
- package/dist/libs/suiContractFactory/types.d.ts +1 -1
- package/dist/libs/suiInteractor/index.d.ts +0 -1
- package/dist/libs/suiInteractor/suiInteractor.d.ts +17 -177
- package/dist/libs/suiModel/suiOwnedObject.d.ts +4 -4
- package/dist/libs/suiModel/suiSharedObject.d.ts +4 -5
- package/dist/libs/suiTxBuilder/index.d.ts +178 -374
- package/dist/libs/suiTxBuilder/util.d.ts +41 -59
- package/dist/metadata/index.d.ts +2 -33
- package/dist/obelisk.d.ts +20 -2454
- package/dist/types/index.d.ts +28 -6
- package/package.json +22 -19
- package/src/index.ts +3 -1
- package/src/libs/multiSig/client.ts +44 -0
- package/src/libs/multiSig/index.ts +1 -0
- package/src/libs/multiSig/publickey.ts +11 -0
- package/src/libs/suiAccountManager/index.ts +1 -1
- package/src/libs/suiAccountManager/keypair.ts +1 -1
- package/src/libs/suiAccountManager/util.ts +1 -1
- package/src/libs/suiContractFactory/index.ts +1 -1
- package/src/libs/suiContractFactory/types.ts +2 -2
- package/src/libs/suiInteractor/index.ts +1 -1
- package/src/libs/suiInteractor/suiInteractor.ts +106 -111
- package/src/libs/suiModel/suiOwnedObject.ts +5 -10
- package/src/libs/suiModel/suiSharedObject.ts +4 -7
- package/src/libs/suiTxBuilder/index.ts +146 -100
- package/src/libs/suiTxBuilder/util.ts +145 -31
- package/src/metadata/index.ts +5 -3
- package/src/obelisk.ts +52 -37
- package/src/types/index.ts +53 -24
- package/dist/libs/suiInteractor/defaultConfig.d.ts +0 -10
- package/src/libs/suiInteractor/defaultConfig.ts +0 -32
|
@@ -1,276 +1,242 @@
|
|
|
1
|
-
import { TransactionBlock
|
|
2
|
-
import type {
|
|
1
|
+
import { TransactionBlock } from '@mysten/sui.js/transactions';
|
|
2
|
+
import type { SuiClient, SuiObjectRef } from '@mysten/sui.js/client';
|
|
3
|
+
import type { TransactionObjectArgument } from '@mysten/sui.js/transactions';
|
|
4
|
+
import type { TransactionExpiration, SharedObjectRef } from '@mysten/sui.js/bcs';
|
|
5
|
+
import type { Keypair } from '@mysten/sui.js/cryptography';
|
|
6
|
+
import type { ObjectCallArg, TransactionType, SuiTxArg, SuiAddressArg, SuiObjectArg, SuiVecTxArg } from 'src/types';
|
|
3
7
|
export declare class SuiTxBlock {
|
|
4
8
|
txBlock: TransactionBlock;
|
|
5
9
|
constructor(transaction?: TransactionBlock);
|
|
6
|
-
|
|
7
|
-
kind: "Input";
|
|
8
|
-
index: number;
|
|
9
|
-
type?: "object" | "pure" | undefined;
|
|
10
|
-
value?: any;
|
|
11
|
-
};
|
|
12
|
-
pure(value: unknown, type?: string): {
|
|
13
|
-
kind: "Input";
|
|
14
|
-
index: number;
|
|
15
|
-
type?: "object" | "pure" | undefined;
|
|
16
|
-
value?: any;
|
|
17
|
-
};
|
|
18
|
-
object(value: string | ObjectCallArg): {
|
|
19
|
-
kind: "Input";
|
|
20
|
-
index: number;
|
|
21
|
-
type?: "object" | "pure" | undefined;
|
|
22
|
-
value?: any;
|
|
23
|
-
};
|
|
24
|
-
objectRef(ref: SuiObjectRef): {
|
|
25
|
-
kind: "Input";
|
|
26
|
-
index: number;
|
|
27
|
-
type?: "object" | "pure" | undefined;
|
|
28
|
-
value?: any;
|
|
29
|
-
};
|
|
30
|
-
sharedObjectRef(ref: SharedObjectRef): {
|
|
31
|
-
kind: "Input";
|
|
32
|
-
index: number;
|
|
33
|
-
type?: "object" | "pure" | undefined;
|
|
34
|
-
value?: any;
|
|
35
|
-
};
|
|
36
|
-
setSender(sender: string): void;
|
|
37
|
-
setSenderIfNotSet(sender: string): void;
|
|
38
|
-
setExpiration(expiration?: TransactionExpiration): void;
|
|
39
|
-
setGasPrice(price: number | bigint): void;
|
|
40
|
-
setGasBudget(budget: number | bigint): void;
|
|
41
|
-
setGasOwner(owner: string): void;
|
|
42
|
-
setGasPayment(payments: SuiObjectRef[]): void;
|
|
43
|
-
add(transaction: TransactionType): ({
|
|
44
|
-
kind: "Input";
|
|
45
|
-
index: number;
|
|
46
|
-
type?: "object" | "pure" | undefined;
|
|
47
|
-
value?: any;
|
|
48
|
-
} | {
|
|
49
|
-
kind: "GasCoin";
|
|
50
|
-
} | {
|
|
51
|
-
kind: "Result";
|
|
52
|
-
index: number;
|
|
53
|
-
} | {
|
|
54
|
-
kind: "NestedResult";
|
|
55
|
-
index: number;
|
|
56
|
-
resultIndex: number;
|
|
57
|
-
}) & ({
|
|
58
|
-
kind: "Input";
|
|
59
|
-
index: number;
|
|
60
|
-
type?: "object" | "pure" | undefined;
|
|
61
|
-
value?: any;
|
|
62
|
-
} | {
|
|
63
|
-
kind: "GasCoin";
|
|
64
|
-
} | {
|
|
65
|
-
kind: "Result";
|
|
66
|
-
index: number;
|
|
67
|
-
} | {
|
|
68
|
-
kind: "NestedResult";
|
|
69
|
-
index: number;
|
|
70
|
-
resultIndex: number;
|
|
71
|
-
})[];
|
|
72
|
-
serialize(): string;
|
|
73
|
-
build(params?: {
|
|
74
|
-
provider?: JsonRpcProvider;
|
|
75
|
-
onlyTransactionKind?: boolean;
|
|
76
|
-
}): Promise<Uint8Array>;
|
|
77
|
-
getDigest({ provider }?: {
|
|
78
|
-
provider?: JsonRpcProvider;
|
|
79
|
-
}): Promise<string>;
|
|
80
|
-
get gas(): {
|
|
81
|
-
kind: "Input";
|
|
82
|
-
index: number;
|
|
83
|
-
type?: "object" | "pure" | undefined;
|
|
84
|
-
value?: any;
|
|
85
|
-
} | {
|
|
86
|
-
kind: "GasCoin";
|
|
87
|
-
} | {
|
|
88
|
-
kind: "Result";
|
|
89
|
-
index: number;
|
|
90
|
-
} | {
|
|
91
|
-
kind: "NestedResult";
|
|
92
|
-
index: number;
|
|
93
|
-
resultIndex: number;
|
|
94
|
-
};
|
|
10
|
+
get gas(): TransactionObjectArgument;
|
|
95
11
|
get blockData(): {
|
|
96
12
|
version: 1;
|
|
13
|
+
inputs: ({
|
|
14
|
+
index: number;
|
|
15
|
+
kind: "Input";
|
|
16
|
+
type?: "object" | undefined;
|
|
17
|
+
value?: any;
|
|
18
|
+
} | {
|
|
19
|
+
type: "pure";
|
|
20
|
+
index: number;
|
|
21
|
+
kind: "Input";
|
|
22
|
+
value?: any;
|
|
23
|
+
})[];
|
|
97
24
|
transactions: ({
|
|
25
|
+
typeArguments: string[];
|
|
26
|
+
kind: "MoveCall";
|
|
98
27
|
arguments: ({
|
|
28
|
+
index: number;
|
|
99
29
|
kind: "Input";
|
|
30
|
+
type?: "object" | undefined;
|
|
31
|
+
value?: any;
|
|
32
|
+
} | {
|
|
33
|
+
type: "pure";
|
|
100
34
|
index: number;
|
|
101
|
-
|
|
35
|
+
kind: "Input";
|
|
102
36
|
value?: any;
|
|
103
37
|
} | {
|
|
104
38
|
kind: "GasCoin";
|
|
105
39
|
} | {
|
|
106
|
-
kind: "Result";
|
|
107
40
|
index: number;
|
|
41
|
+
kind: "Result";
|
|
108
42
|
} | {
|
|
109
|
-
kind: "NestedResult";
|
|
110
43
|
index: number;
|
|
111
44
|
resultIndex: number;
|
|
45
|
+
kind: "NestedResult";
|
|
112
46
|
})[];
|
|
113
|
-
kind: "MoveCall";
|
|
114
47
|
target: `${string}::${string}::${string}`;
|
|
115
|
-
typeArguments: string[];
|
|
116
48
|
} | {
|
|
117
|
-
|
|
49
|
+
address: {
|
|
50
|
+
index: number;
|
|
118
51
|
kind: "Input";
|
|
52
|
+
type?: "object" | undefined;
|
|
53
|
+
value?: any;
|
|
54
|
+
} | {
|
|
55
|
+
type: "pure";
|
|
119
56
|
index: number;
|
|
120
|
-
|
|
57
|
+
kind: "Input";
|
|
121
58
|
value?: any;
|
|
122
59
|
} | {
|
|
123
60
|
kind: "GasCoin";
|
|
124
61
|
} | {
|
|
125
|
-
kind: "Result";
|
|
126
62
|
index: number;
|
|
63
|
+
kind: "Result";
|
|
127
64
|
} | {
|
|
128
|
-
kind: "NestedResult";
|
|
129
65
|
index: number;
|
|
130
66
|
resultIndex: number;
|
|
131
|
-
|
|
67
|
+
kind: "NestedResult";
|
|
68
|
+
};
|
|
132
69
|
kind: "TransferObjects";
|
|
133
|
-
|
|
70
|
+
objects: ({
|
|
71
|
+
index: number;
|
|
134
72
|
kind: "Input";
|
|
73
|
+
type?: "object" | undefined;
|
|
74
|
+
value?: any;
|
|
75
|
+
} | {
|
|
76
|
+
type: "pure";
|
|
135
77
|
index: number;
|
|
136
|
-
|
|
78
|
+
kind: "Input";
|
|
137
79
|
value?: any;
|
|
138
80
|
} | {
|
|
139
81
|
kind: "GasCoin";
|
|
140
82
|
} | {
|
|
141
|
-
kind: "Result";
|
|
142
83
|
index: number;
|
|
84
|
+
kind: "Result";
|
|
143
85
|
} | {
|
|
144
|
-
kind: "NestedResult";
|
|
145
86
|
index: number;
|
|
146
87
|
resultIndex: number;
|
|
147
|
-
|
|
88
|
+
kind: "NestedResult";
|
|
89
|
+
})[];
|
|
148
90
|
} | {
|
|
149
91
|
kind: "SplitCoins";
|
|
150
92
|
coin: {
|
|
93
|
+
index: number;
|
|
151
94
|
kind: "Input";
|
|
95
|
+
type?: "object" | undefined;
|
|
96
|
+
value?: any;
|
|
97
|
+
} | {
|
|
98
|
+
type: "pure";
|
|
152
99
|
index: number;
|
|
153
|
-
|
|
100
|
+
kind: "Input";
|
|
154
101
|
value?: any;
|
|
155
102
|
} | {
|
|
156
103
|
kind: "GasCoin";
|
|
157
104
|
} | {
|
|
158
|
-
kind: "Result";
|
|
159
105
|
index: number;
|
|
106
|
+
kind: "Result";
|
|
160
107
|
} | {
|
|
161
|
-
kind: "NestedResult";
|
|
162
108
|
index: number;
|
|
163
109
|
resultIndex: number;
|
|
110
|
+
kind: "NestedResult";
|
|
164
111
|
};
|
|
165
112
|
amounts: ({
|
|
113
|
+
index: number;
|
|
166
114
|
kind: "Input";
|
|
115
|
+
type?: "object" | undefined;
|
|
116
|
+
value?: any;
|
|
117
|
+
} | {
|
|
118
|
+
type: "pure";
|
|
167
119
|
index: number;
|
|
168
|
-
|
|
120
|
+
kind: "Input";
|
|
169
121
|
value?: any;
|
|
170
122
|
} | {
|
|
171
123
|
kind: "GasCoin";
|
|
172
124
|
} | {
|
|
173
|
-
kind: "Result";
|
|
174
125
|
index: number;
|
|
126
|
+
kind: "Result";
|
|
175
127
|
} | {
|
|
176
|
-
kind: "NestedResult";
|
|
177
128
|
index: number;
|
|
178
129
|
resultIndex: number;
|
|
130
|
+
kind: "NestedResult";
|
|
179
131
|
})[];
|
|
180
132
|
} | {
|
|
181
133
|
kind: "MergeCoins";
|
|
182
134
|
destination: {
|
|
135
|
+
index: number;
|
|
183
136
|
kind: "Input";
|
|
137
|
+
type?: "object" | undefined;
|
|
138
|
+
value?: any;
|
|
139
|
+
} | {
|
|
140
|
+
type: "pure";
|
|
184
141
|
index: number;
|
|
185
|
-
|
|
142
|
+
kind: "Input";
|
|
186
143
|
value?: any;
|
|
187
144
|
} | {
|
|
188
145
|
kind: "GasCoin";
|
|
189
146
|
} | {
|
|
190
|
-
kind: "Result";
|
|
191
147
|
index: number;
|
|
148
|
+
kind: "Result";
|
|
192
149
|
} | {
|
|
193
|
-
kind: "NestedResult";
|
|
194
150
|
index: number;
|
|
195
151
|
resultIndex: number;
|
|
152
|
+
kind: "NestedResult";
|
|
196
153
|
};
|
|
197
154
|
sources: ({
|
|
155
|
+
index: number;
|
|
198
156
|
kind: "Input";
|
|
157
|
+
type?: "object" | undefined;
|
|
158
|
+
value?: any;
|
|
159
|
+
} | {
|
|
160
|
+
type: "pure";
|
|
199
161
|
index: number;
|
|
200
|
-
|
|
162
|
+
kind: "Input";
|
|
201
163
|
value?: any;
|
|
202
164
|
} | {
|
|
203
165
|
kind: "GasCoin";
|
|
204
166
|
} | {
|
|
205
|
-
kind: "Result";
|
|
206
167
|
index: number;
|
|
168
|
+
kind: "Result";
|
|
207
169
|
} | {
|
|
208
|
-
kind: "NestedResult";
|
|
209
170
|
index: number;
|
|
210
171
|
resultIndex: number;
|
|
172
|
+
kind: "NestedResult";
|
|
211
173
|
})[];
|
|
212
174
|
} | {
|
|
175
|
+
type: {
|
|
176
|
+
Some: import("@mysten/sui.js/bcs").TypeTag;
|
|
177
|
+
} | {
|
|
178
|
+
None: true | null;
|
|
179
|
+
};
|
|
180
|
+
kind: "MakeMoveVec";
|
|
213
181
|
objects: ({
|
|
182
|
+
index: number;
|
|
214
183
|
kind: "Input";
|
|
184
|
+
type?: "object" | undefined;
|
|
185
|
+
value?: any;
|
|
186
|
+
} | {
|
|
187
|
+
type: "pure";
|
|
215
188
|
index: number;
|
|
216
|
-
|
|
189
|
+
kind: "Input";
|
|
217
190
|
value?: any;
|
|
218
191
|
} | {
|
|
219
192
|
kind: "GasCoin";
|
|
220
193
|
} | {
|
|
221
|
-
kind: "Result";
|
|
222
194
|
index: number;
|
|
195
|
+
kind: "Result";
|
|
223
196
|
} | {
|
|
224
|
-
kind: "NestedResult";
|
|
225
197
|
index: number;
|
|
226
198
|
resultIndex: number;
|
|
199
|
+
kind: "NestedResult";
|
|
227
200
|
})[];
|
|
228
|
-
kind: "MakeMoveVec";
|
|
229
|
-
type?: {
|
|
230
|
-
None: true | null;
|
|
231
|
-
} | {
|
|
232
|
-
Some: Record<string, unknown>;
|
|
233
|
-
} | undefined;
|
|
234
201
|
} | {
|
|
235
202
|
kind: "Publish";
|
|
236
|
-
dependencies: string[];
|
|
237
203
|
modules: number[][];
|
|
204
|
+
dependencies: string[];
|
|
238
205
|
} | {
|
|
239
|
-
packageId: string;
|
|
240
206
|
kind: "Upgrade";
|
|
241
|
-
dependencies: string[];
|
|
242
207
|
modules: number[][];
|
|
208
|
+
dependencies: string[];
|
|
209
|
+
packageId: string;
|
|
243
210
|
ticket: {
|
|
211
|
+
index: number;
|
|
244
212
|
kind: "Input";
|
|
213
|
+
type?: "object" | undefined;
|
|
214
|
+
value?: any;
|
|
215
|
+
} | {
|
|
216
|
+
type: "pure";
|
|
245
217
|
index: number;
|
|
246
|
-
|
|
218
|
+
kind: "Input";
|
|
247
219
|
value?: any;
|
|
248
220
|
} | {
|
|
249
221
|
kind: "GasCoin";
|
|
250
222
|
} | {
|
|
251
|
-
kind: "Result";
|
|
252
223
|
index: number;
|
|
224
|
+
kind: "Result";
|
|
253
225
|
} | {
|
|
254
|
-
kind: "NestedResult";
|
|
255
226
|
index: number;
|
|
256
227
|
resultIndex: number;
|
|
228
|
+
kind: "NestedResult";
|
|
257
229
|
};
|
|
258
230
|
})[];
|
|
259
|
-
inputs: {
|
|
260
|
-
kind: "Input";
|
|
261
|
-
index: number;
|
|
262
|
-
type?: "object" | "pure" | undefined;
|
|
263
|
-
value?: any;
|
|
264
|
-
}[];
|
|
265
231
|
gasConfig: {
|
|
232
|
+
owner?: string | undefined;
|
|
266
233
|
payment?: {
|
|
267
|
-
objectId: string;
|
|
268
|
-
version: string | number;
|
|
269
234
|
digest: string;
|
|
235
|
+
objectId: string;
|
|
236
|
+
version: string | number | bigint;
|
|
270
237
|
}[] | undefined;
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
budget?: string | undefined;
|
|
238
|
+
price?: string | number | bigint | undefined;
|
|
239
|
+
budget?: string | number | bigint | undefined;
|
|
274
240
|
};
|
|
275
241
|
sender?: string | undefined;
|
|
276
242
|
expiration?: {
|
|
@@ -279,266 +245,104 @@ export declare class SuiTxBlock {
|
|
|
279
245
|
None: true | null;
|
|
280
246
|
} | null | undefined;
|
|
281
247
|
};
|
|
282
|
-
|
|
283
|
-
splitCoins(coin: SuiObjectArg, amounts: number[]): ({
|
|
284
|
-
kind: "Input";
|
|
285
|
-
index: number;
|
|
286
|
-
type?: "object" | "pure" | undefined;
|
|
287
|
-
value?: any;
|
|
288
|
-
} | {
|
|
289
|
-
kind: "GasCoin";
|
|
290
|
-
} | {
|
|
291
|
-
kind: "Result";
|
|
292
|
-
index: number;
|
|
293
|
-
} | {
|
|
294
|
-
kind: "NestedResult";
|
|
248
|
+
address(value: string): {
|
|
295
249
|
index: number;
|
|
296
|
-
resultIndex: number;
|
|
297
|
-
})[];
|
|
298
|
-
mergeCoins(destination: SuiObjectArg, sources: SuiObjectArg[]): ({
|
|
299
250
|
kind: "Input";
|
|
300
|
-
|
|
301
|
-
type?: "object" | "pure" | undefined;
|
|
251
|
+
type?: "object" | undefined;
|
|
302
252
|
value?: any;
|
|
303
253
|
} | {
|
|
304
|
-
|
|
305
|
-
} | {
|
|
306
|
-
kind: "Result";
|
|
254
|
+
type: "pure";
|
|
307
255
|
index: number;
|
|
308
|
-
} | {
|
|
309
|
-
kind: "NestedResult";
|
|
310
|
-
index: number;
|
|
311
|
-
resultIndex: number;
|
|
312
|
-
}) & ({
|
|
313
256
|
kind: "Input";
|
|
314
|
-
index: number;
|
|
315
|
-
type?: "object" | "pure" | undefined;
|
|
316
257
|
value?: any;
|
|
317
|
-
}
|
|
318
|
-
|
|
319
|
-
} | {
|
|
320
|
-
kind: "Result";
|
|
321
|
-
index: number;
|
|
322
|
-
} | {
|
|
323
|
-
kind: "NestedResult";
|
|
258
|
+
};
|
|
259
|
+
pure(value: unknown, type?: string): {
|
|
324
260
|
index: number;
|
|
325
|
-
resultIndex: number;
|
|
326
|
-
})[];
|
|
327
|
-
publish(...args: Parameters<(typeof Transactions)['Publish']>): ({
|
|
328
261
|
kind: "Input";
|
|
329
|
-
|
|
330
|
-
type?: "object" | "pure" | undefined;
|
|
262
|
+
type?: "object" | undefined;
|
|
331
263
|
value?: any;
|
|
332
264
|
} | {
|
|
333
|
-
|
|
334
|
-
} | {
|
|
335
|
-
kind: "Result";
|
|
336
|
-
index: number;
|
|
337
|
-
} | {
|
|
338
|
-
kind: "NestedResult";
|
|
265
|
+
type: "pure";
|
|
339
266
|
index: number;
|
|
340
|
-
resultIndex: number;
|
|
341
|
-
}) & ({
|
|
342
267
|
kind: "Input";
|
|
343
|
-
index: number;
|
|
344
|
-
type?: "object" | "pure" | undefined;
|
|
345
268
|
value?: any;
|
|
346
|
-
}
|
|
347
|
-
|
|
348
|
-
} | {
|
|
349
|
-
kind: "Result";
|
|
350
|
-
index: number;
|
|
351
|
-
} | {
|
|
352
|
-
kind: "NestedResult";
|
|
269
|
+
};
|
|
270
|
+
object(value: string | ObjectCallArg): {
|
|
353
271
|
index: number;
|
|
354
|
-
resultIndex: number;
|
|
355
|
-
})[];
|
|
356
|
-
upgrade(...args: Parameters<(typeof Transactions)['Upgrade']>): ({
|
|
357
272
|
kind: "Input";
|
|
358
|
-
|
|
359
|
-
type?: "object" | "pure" | undefined;
|
|
273
|
+
type?: "object" | undefined;
|
|
360
274
|
value?: any;
|
|
361
|
-
}
|
|
362
|
-
|
|
363
|
-
} | {
|
|
364
|
-
kind: "Result";
|
|
365
|
-
index: number;
|
|
366
|
-
} | {
|
|
367
|
-
kind: "NestedResult";
|
|
275
|
+
};
|
|
276
|
+
objectRef(ref: SuiObjectRef): {
|
|
368
277
|
index: number;
|
|
369
|
-
resultIndex: number;
|
|
370
|
-
}) & ({
|
|
371
278
|
kind: "Input";
|
|
372
|
-
|
|
373
|
-
type?: "object" | "pure" | undefined;
|
|
279
|
+
type?: "object" | undefined;
|
|
374
280
|
value?: any;
|
|
375
|
-
}
|
|
376
|
-
|
|
377
|
-
} | {
|
|
378
|
-
kind: "Result";
|
|
379
|
-
index: number;
|
|
380
|
-
} | {
|
|
381
|
-
kind: "NestedResult";
|
|
281
|
+
};
|
|
282
|
+
sharedObjectRef(ref: SharedObjectRef): {
|
|
382
283
|
index: number;
|
|
383
|
-
resultIndex: number;
|
|
384
|
-
})[];
|
|
385
|
-
makeMoveVec(...args: Parameters<(typeof Transactions)['MakeMoveVec']>): ({
|
|
386
284
|
kind: "Input";
|
|
387
|
-
|
|
388
|
-
type?: "object" | "pure" | undefined;
|
|
285
|
+
type?: "object" | undefined;
|
|
389
286
|
value?: any;
|
|
390
|
-
}
|
|
391
|
-
|
|
392
|
-
|
|
393
|
-
|
|
394
|
-
|
|
395
|
-
|
|
396
|
-
|
|
287
|
+
};
|
|
288
|
+
setSender(sender: string): void;
|
|
289
|
+
setSenderIfNotSet(sender: string): void;
|
|
290
|
+
setExpiration(expiration?: TransactionExpiration): void;
|
|
291
|
+
setGasPrice(price: number | bigint): void;
|
|
292
|
+
setGasBudget(budget: number | bigint): void;
|
|
293
|
+
setGasOwner(owner: string): void;
|
|
294
|
+
setGasPayment(payments: SuiObjectRef[]): void;
|
|
295
|
+
serialize(): string;
|
|
296
|
+
sign(params: {
|
|
297
|
+
signer: Keypair;
|
|
298
|
+
client?: SuiClient;
|
|
299
|
+
onlyTransactionKind?: boolean;
|
|
300
|
+
}): Promise<import("@mysten/sui.js/cryptography").SignatureWithBytes>;
|
|
301
|
+
build(params?: {
|
|
302
|
+
client?: SuiClient;
|
|
303
|
+
onlyTransactionKind?: boolean;
|
|
304
|
+
}): Promise<Uint8Array>;
|
|
305
|
+
getDigest(params?: {
|
|
306
|
+
client?: SuiClient;
|
|
307
|
+
}): Promise<string>;
|
|
308
|
+
add(...args: TransactionType): import("@mysten/sui.js/transactions").TransactionResult;
|
|
309
|
+
publish({ modules, dependencies, }: {
|
|
310
|
+
modules: number[][] | string[];
|
|
311
|
+
dependencies: string[];
|
|
312
|
+
}): import("@mysten/sui.js/transactions").TransactionResult;
|
|
313
|
+
upgrade({ modules, dependencies, packageId, ticket, }: {
|
|
314
|
+
modules: number[][] | string[];
|
|
315
|
+
dependencies: string[];
|
|
316
|
+
packageId: string;
|
|
317
|
+
ticket: TransactionObjectArgument | string;
|
|
318
|
+
}): import("@mysten/sui.js/transactions").TransactionResult;
|
|
319
|
+
makeMoveVec({ objects, type, }: {
|
|
320
|
+
objects: (TransactionObjectArgument | string)[];
|
|
321
|
+
type?: string;
|
|
322
|
+
}): import("@mysten/sui.js/transactions").TransactionResult;
|
|
323
|
+
transferObjects(objects: SuiObjectArg[], address: SuiAddressArg): import("@mysten/sui.js/transactions").TransactionResult;
|
|
324
|
+
splitCoins(coin: SuiObjectArg, amounts: SuiTxArg[]): {
|
|
397
325
|
index: number;
|
|
398
326
|
resultIndex: number;
|
|
399
|
-
}) & ({
|
|
400
|
-
kind: "Input";
|
|
401
|
-
index: number;
|
|
402
|
-
type?: "object" | "pure" | undefined;
|
|
403
|
-
value?: any;
|
|
404
|
-
} | {
|
|
405
|
-
kind: "GasCoin";
|
|
406
|
-
} | {
|
|
407
|
-
kind: "Result";
|
|
408
|
-
index: number;
|
|
409
|
-
} | {
|
|
410
327
|
kind: "NestedResult";
|
|
411
|
-
|
|
412
|
-
|
|
413
|
-
})[];
|
|
328
|
+
}[];
|
|
329
|
+
mergeCoins(destination: SuiObjectArg, sources: SuiObjectArg[]): import("@mysten/sui.js/transactions").TransactionResult;
|
|
414
330
|
/**
|
|
415
331
|
* @description Move call
|
|
416
332
|
* @param target `${string}::${string}::${string}`, e.g. `0x3::sui_system::request_add_stake`
|
|
417
333
|
* @param args the arguments of the move call, such as `['0x1', '0x2']`
|
|
418
|
-
* @param
|
|
334
|
+
* @param typeArgs the type arguments of the move call, such as `['0x2::sui::SUI']`
|
|
419
335
|
*/
|
|
420
|
-
moveCall(target: string, args?: (SuiTxArg | SuiVecTxArg)[],
|
|
421
|
-
|
|
422
|
-
|
|
423
|
-
|
|
424
|
-
|
|
425
|
-
|
|
426
|
-
|
|
427
|
-
|
|
428
|
-
kind: "Result";
|
|
429
|
-
index: number;
|
|
430
|
-
} | {
|
|
431
|
-
kind: "NestedResult";
|
|
432
|
-
index: number;
|
|
433
|
-
resultIndex: number;
|
|
434
|
-
}) & ({
|
|
435
|
-
kind: "Input";
|
|
436
|
-
index: number;
|
|
437
|
-
type?: "object" | "pure" | undefined;
|
|
438
|
-
value?: any;
|
|
439
|
-
} | {
|
|
440
|
-
kind: "GasCoin";
|
|
441
|
-
} | {
|
|
442
|
-
kind: "Result";
|
|
443
|
-
index: number;
|
|
444
|
-
} | {
|
|
445
|
-
kind: "NestedResult";
|
|
446
|
-
index: number;
|
|
447
|
-
resultIndex: number;
|
|
448
|
-
})[];
|
|
449
|
-
transferSuiToMany(recipients: string[], amounts: number[]): this;
|
|
450
|
-
transferSui(recipient: string, amount: number): this;
|
|
451
|
-
takeAmountFromCoins(coins: SuiObjectArg[], amount: number): ({
|
|
452
|
-
kind: "Input";
|
|
453
|
-
index: number;
|
|
454
|
-
type?: "object" | "pure" | undefined;
|
|
455
|
-
value?: any;
|
|
456
|
-
} | {
|
|
457
|
-
kind: "GasCoin";
|
|
458
|
-
} | {
|
|
459
|
-
kind: "Result";
|
|
460
|
-
index: number;
|
|
461
|
-
} | {
|
|
462
|
-
kind: "NestedResult";
|
|
463
|
-
index: number;
|
|
464
|
-
resultIndex: number;
|
|
465
|
-
})[];
|
|
466
|
-
splitSUIFromGas(amounts: number[]): ({
|
|
467
|
-
kind: "Input";
|
|
468
|
-
index: number;
|
|
469
|
-
type?: "object" | "pure" | undefined;
|
|
470
|
-
value?: any;
|
|
471
|
-
} | {
|
|
472
|
-
kind: "GasCoin";
|
|
473
|
-
} | {
|
|
474
|
-
kind: "Result";
|
|
475
|
-
index: number;
|
|
476
|
-
} | {
|
|
477
|
-
kind: "NestedResult";
|
|
478
|
-
index: number;
|
|
479
|
-
resultIndex: number;
|
|
480
|
-
}) & ({
|
|
481
|
-
kind: "Input";
|
|
482
|
-
index: number;
|
|
483
|
-
type?: "object" | "pure" | undefined;
|
|
484
|
-
value?: any;
|
|
485
|
-
} | {
|
|
486
|
-
kind: "GasCoin";
|
|
487
|
-
} | {
|
|
488
|
-
kind: "Result";
|
|
489
|
-
index: number;
|
|
490
|
-
} | {
|
|
491
|
-
kind: "NestedResult";
|
|
492
|
-
index: number;
|
|
493
|
-
resultIndex: number;
|
|
494
|
-
})[];
|
|
495
|
-
splitMultiCoins(coins: SuiObjectArg[], amounts: number[]): {
|
|
496
|
-
splitedCoins: ({
|
|
497
|
-
kind: "Input";
|
|
498
|
-
index: number;
|
|
499
|
-
type?: "object" | "pure" | undefined;
|
|
500
|
-
value?: any;
|
|
501
|
-
} | {
|
|
502
|
-
kind: "GasCoin";
|
|
503
|
-
} | {
|
|
504
|
-
kind: "Result";
|
|
505
|
-
index: number;
|
|
506
|
-
} | {
|
|
507
|
-
kind: "NestedResult";
|
|
508
|
-
index: number;
|
|
509
|
-
resultIndex: number;
|
|
510
|
-
}) & ({
|
|
511
|
-
kind: "Input";
|
|
512
|
-
index: number;
|
|
513
|
-
type?: "object" | "pure" | undefined;
|
|
514
|
-
value?: any;
|
|
515
|
-
} | {
|
|
516
|
-
kind: "GasCoin";
|
|
517
|
-
} | {
|
|
518
|
-
kind: "Result";
|
|
519
|
-
index: number;
|
|
520
|
-
} | {
|
|
521
|
-
kind: "NestedResult";
|
|
522
|
-
index: number;
|
|
523
|
-
resultIndex: number;
|
|
524
|
-
})[];
|
|
525
|
-
mergedCoin: {
|
|
526
|
-
kind: "Input";
|
|
527
|
-
index: number;
|
|
528
|
-
type?: "object" | "pure" | undefined;
|
|
529
|
-
value?: any;
|
|
530
|
-
} | {
|
|
531
|
-
kind: "GasCoin";
|
|
532
|
-
} | {
|
|
533
|
-
kind: "Result";
|
|
534
|
-
index: number;
|
|
535
|
-
} | {
|
|
536
|
-
kind: "NestedResult";
|
|
537
|
-
index: number;
|
|
538
|
-
resultIndex: number;
|
|
539
|
-
};
|
|
336
|
+
moveCall(target: string, args?: (SuiTxArg | SuiVecTxArg)[], typeArgs?: string[]): import("@mysten/sui.js/transactions").TransactionResult;
|
|
337
|
+
transferSuiToMany(recipients: SuiAddressArg[], amounts: SuiTxArg[]): this;
|
|
338
|
+
transferSui(address: SuiAddressArg, amount: SuiTxArg): this;
|
|
339
|
+
takeAmountFromCoins(coins: SuiObjectArg[], amount: SuiTxArg): TransactionObjectArgument[];
|
|
340
|
+
splitSUIFromGas(amounts: SuiTxArg[]): import("@mysten/sui.js/transactions").TransactionResult;
|
|
341
|
+
splitMultiCoins(coins: SuiObjectArg[], amounts: SuiTxArg[]): {
|
|
342
|
+
splitedCoins: import("@mysten/sui.js/transactions").TransactionResult;
|
|
343
|
+
mergedCoin: TransactionObjectArgument;
|
|
540
344
|
};
|
|
541
|
-
transferCoinToMany(
|
|
542
|
-
transferCoin(
|
|
543
|
-
stakeSui(amount:
|
|
345
|
+
transferCoinToMany(coins: SuiObjectArg[], sender: SuiAddressArg, recipients: SuiAddressArg[], amounts: SuiTxArg[]): this;
|
|
346
|
+
transferCoin(coins: SuiObjectArg[], sender: SuiAddressArg, recipient: SuiAddressArg, amount: SuiTxArg): this;
|
|
347
|
+
stakeSui(amount: SuiTxArg, validatorAddr: SuiAddressArg): import("@mysten/sui.js/transactions").TransactionResult;
|
|
544
348
|
}
|