@sentio/sdk 2.45.2 → 2.45.3-rc.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/aptos/builtin/0x1.d.ts +2 -2
- package/lib/aptos/builtin/0x1.d.ts.map +1 -1
- package/lib/aptos/builtin/0x1.js +1 -2
- package/lib/aptos/builtin/0x1.js.map +1 -1
- package/lib/aptos/builtin/0x3.d.ts +2 -2
- package/lib/aptos/builtin/0x3.d.ts.map +1 -1
- package/lib/aptos/builtin/0x3.js +1 -2
- package/lib/aptos/builtin/0x3.js.map +1 -1
- package/lib/aptos/builtin/0x4.d.ts +2 -2
- package/lib/aptos/builtin/0x4.d.ts.map +1 -1
- package/lib/aptos/builtin/0x4.js +1 -2
- package/lib/aptos/builtin/0x4.js.map +1 -1
- package/lib/aptos/codegen/codegen.js +7 -1
- package/lib/aptos/codegen/codegen.js.map +1 -1
- package/lib/move/shared-network-codegen.d.ts.map +1 -1
- package/lib/move/shared-network-codegen.js +2 -3
- package/lib/move/shared-network-codegen.js.map +1 -1
- package/lib/sui/builtin/0x1.d.ts +751 -12
- package/lib/sui/builtin/0x1.d.ts.map +1 -1
- package/lib/sui/builtin/0x1.js +3857 -0
- package/lib/sui/builtin/0x1.js.map +1 -1
- package/lib/sui/builtin/0x2.d.ts +3876 -14
- package/lib/sui/builtin/0x2.d.ts.map +1 -1
- package/lib/sui/builtin/0x2.js +14389 -188
- package/lib/sui/builtin/0x2.js.map +1 -1
- package/lib/sui/builtin/0x3.d.ts +1923 -0
- package/lib/sui/builtin/0x3.d.ts.map +1 -1
- package/lib/sui/builtin/0x3.js +5425 -0
- package/lib/sui/builtin/0x3.js.map +1 -1
- package/lib/sui/codegen/codegen.js +5 -1
- package/lib/sui/codegen/codegen.js.map +1 -1
- package/package.json +6 -6
- package/src/aptos/builtin/0x1.ts +5 -5
- package/src/aptos/builtin/0x3.ts +5 -5
- package/src/aptos/builtin/0x4.ts +5 -5
- package/src/aptos/codegen/codegen.ts +7 -1
- package/src/move/shared-network-codegen.ts +1 -4
- package/src/sui/builtin/0x1.ts +5590 -19
- package/src/sui/builtin/0x2.ts +21779 -92
- package/src/sui/builtin/0x3.ts +8825 -15
- package/src/sui/codegen/codegen.ts +6 -1
package/lib/sui/builtin/0x1.js
CHANGED
@@ -4,7 +4,38 @@
|
|
4
4
|
/* Generated types for 0x1, original address 0x1 */
|
5
5
|
import { TypeDescriptor, ANY_TYPE } from "@typemove/move";
|
6
6
|
import { defaultMoveCoder } from "@sentio/sdk/sui";
|
7
|
+
import { ZERO_ADDRESS, getMoveCoder, } from "@typemove/sui";
|
8
|
+
import { Transaction, } from "@mysten/sui/transactions";
|
9
|
+
import { transactionArgumentOrObject, transactionArgumentOrVec, transactionArgumentOrPure, transactionArgumentOrPureU8, transactionArgumentOrPureU16, transactionArgumentOrPureU32, transactionArgumentOrPureU64, transactionArgumentOrPureU128, transactionArgumentOrPureU256, } from "@typemove/sui";
|
7
10
|
import { SuiBaseProcessor, SuiNetwork, } from "@sentio/sdk/sui";
|
11
|
+
export var address;
|
12
|
+
(function (address) {
|
13
|
+
let builder;
|
14
|
+
(function (builder) {
|
15
|
+
function length(tx, args) {
|
16
|
+
const _args = [];
|
17
|
+
// @ts-ignore
|
18
|
+
return tx.moveCall({
|
19
|
+
target: "0x1::address::length",
|
20
|
+
arguments: _args,
|
21
|
+
});
|
22
|
+
}
|
23
|
+
builder.length = length;
|
24
|
+
})(builder = address.builder || (address.builder = {}));
|
25
|
+
let view;
|
26
|
+
(function (view) {
|
27
|
+
async function length(client, args) {
|
28
|
+
const tx = new Transaction();
|
29
|
+
builder.length(tx, args);
|
30
|
+
const inspectRes = await client.devInspectTransactionBlock({
|
31
|
+
transactionBlock: tx,
|
32
|
+
sender: ZERO_ADDRESS,
|
33
|
+
});
|
34
|
+
return (await getMoveCoder(client)).decodeDevInspectResult(inspectRes);
|
35
|
+
}
|
36
|
+
view.length = length;
|
37
|
+
})(view = address.view || (address.view = {}));
|
38
|
+
})(address || (address = {}));
|
8
39
|
export var ascii;
|
9
40
|
(function (ascii) {
|
10
41
|
let Char;
|
@@ -25,7 +56,434 @@ export var ascii;
|
|
25
56
|
}
|
26
57
|
String.type = type;
|
27
58
|
})(String = ascii.String || (ascii.String = {}));
|
59
|
+
let builder;
|
60
|
+
(function (builder) {
|
61
|
+
function allCharactersPrintable(tx, args) {
|
62
|
+
const _args = [];
|
63
|
+
_args.push(transactionArgumentOrObject(args[0], tx));
|
64
|
+
// @ts-ignore
|
65
|
+
return tx.moveCall({
|
66
|
+
target: "0x1::ascii::all_characters_printable",
|
67
|
+
arguments: _args,
|
68
|
+
});
|
69
|
+
}
|
70
|
+
builder.allCharactersPrintable = allCharactersPrintable;
|
71
|
+
function append(tx, args) {
|
72
|
+
const _args = [];
|
73
|
+
_args.push(transactionArgumentOrObject(args[0], tx));
|
74
|
+
_args.push(transactionArgumentOrPure(args[1], tx));
|
75
|
+
// @ts-ignore
|
76
|
+
return tx.moveCall({
|
77
|
+
target: "0x1::ascii::append",
|
78
|
+
arguments: _args,
|
79
|
+
});
|
80
|
+
}
|
81
|
+
builder.append = append;
|
82
|
+
function asBytes(tx, args) {
|
83
|
+
const _args = [];
|
84
|
+
_args.push(transactionArgumentOrObject(args[0], tx));
|
85
|
+
// @ts-ignore
|
86
|
+
return tx.moveCall({
|
87
|
+
target: "0x1::ascii::as_bytes",
|
88
|
+
arguments: _args,
|
89
|
+
});
|
90
|
+
}
|
91
|
+
builder.asBytes = asBytes;
|
92
|
+
function byte(tx, args) {
|
93
|
+
const _args = [];
|
94
|
+
_args.push(transactionArgumentOrPure(args[0], tx));
|
95
|
+
// @ts-ignore
|
96
|
+
return tx.moveCall({
|
97
|
+
target: "0x1::ascii::byte",
|
98
|
+
arguments: _args,
|
99
|
+
});
|
100
|
+
}
|
101
|
+
builder.byte = byte;
|
102
|
+
function char(tx, args) {
|
103
|
+
const _args = [];
|
104
|
+
_args.push(transactionArgumentOrPureU8(args[0], tx));
|
105
|
+
// @ts-ignore
|
106
|
+
return tx.moveCall({
|
107
|
+
target: "0x1::ascii::char",
|
108
|
+
arguments: _args,
|
109
|
+
});
|
110
|
+
}
|
111
|
+
builder.char = char;
|
112
|
+
function indexOf(tx, args) {
|
113
|
+
const _args = [];
|
114
|
+
_args.push(transactionArgumentOrObject(args[0], tx));
|
115
|
+
_args.push(transactionArgumentOrObject(args[1], tx));
|
116
|
+
// @ts-ignore
|
117
|
+
return tx.moveCall({
|
118
|
+
target: "0x1::ascii::index_of",
|
119
|
+
arguments: _args,
|
120
|
+
});
|
121
|
+
}
|
122
|
+
builder.indexOf = indexOf;
|
123
|
+
function insert(tx, args) {
|
124
|
+
const _args = [];
|
125
|
+
_args.push(transactionArgumentOrObject(args[0], tx));
|
126
|
+
_args.push(transactionArgumentOrPureU64(args[1], tx));
|
127
|
+
_args.push(transactionArgumentOrPure(args[2], tx));
|
128
|
+
// @ts-ignore
|
129
|
+
return tx.moveCall({
|
130
|
+
target: "0x1::ascii::insert",
|
131
|
+
arguments: _args,
|
132
|
+
});
|
133
|
+
}
|
134
|
+
builder.insert = insert;
|
135
|
+
function intoBytes(tx, args) {
|
136
|
+
const _args = [];
|
137
|
+
_args.push(transactionArgumentOrPure(args[0], tx));
|
138
|
+
// @ts-ignore
|
139
|
+
return tx.moveCall({
|
140
|
+
target: "0x1::ascii::into_bytes",
|
141
|
+
arguments: _args,
|
142
|
+
});
|
143
|
+
}
|
144
|
+
builder.intoBytes = intoBytes;
|
145
|
+
function isEmpty(tx, args) {
|
146
|
+
const _args = [];
|
147
|
+
_args.push(transactionArgumentOrObject(args[0], tx));
|
148
|
+
// @ts-ignore
|
149
|
+
return tx.moveCall({
|
150
|
+
target: "0x1::ascii::is_empty",
|
151
|
+
arguments: _args,
|
152
|
+
});
|
153
|
+
}
|
154
|
+
builder.isEmpty = isEmpty;
|
155
|
+
function isPrintableChar(tx, args) {
|
156
|
+
const _args = [];
|
157
|
+
_args.push(transactionArgumentOrPureU8(args[0], tx));
|
158
|
+
// @ts-ignore
|
159
|
+
return tx.moveCall({
|
160
|
+
target: "0x1::ascii::is_printable_char",
|
161
|
+
arguments: _args,
|
162
|
+
});
|
163
|
+
}
|
164
|
+
builder.isPrintableChar = isPrintableChar;
|
165
|
+
function isValidChar(tx, args) {
|
166
|
+
const _args = [];
|
167
|
+
_args.push(transactionArgumentOrPureU8(args[0], tx));
|
168
|
+
// @ts-ignore
|
169
|
+
return tx.moveCall({
|
170
|
+
target: "0x1::ascii::is_valid_char",
|
171
|
+
arguments: _args,
|
172
|
+
});
|
173
|
+
}
|
174
|
+
builder.isValidChar = isValidChar;
|
175
|
+
function length(tx, args) {
|
176
|
+
const _args = [];
|
177
|
+
_args.push(transactionArgumentOrObject(args[0], tx));
|
178
|
+
// @ts-ignore
|
179
|
+
return tx.moveCall({
|
180
|
+
target: "0x1::ascii::length",
|
181
|
+
arguments: _args,
|
182
|
+
});
|
183
|
+
}
|
184
|
+
builder.length = length;
|
185
|
+
function popChar(tx, args) {
|
186
|
+
const _args = [];
|
187
|
+
_args.push(transactionArgumentOrObject(args[0], tx));
|
188
|
+
// @ts-ignore
|
189
|
+
return tx.moveCall({
|
190
|
+
target: "0x1::ascii::pop_char",
|
191
|
+
arguments: _args,
|
192
|
+
});
|
193
|
+
}
|
194
|
+
builder.popChar = popChar;
|
195
|
+
function pushChar(tx, args) {
|
196
|
+
const _args = [];
|
197
|
+
_args.push(transactionArgumentOrObject(args[0], tx));
|
198
|
+
_args.push(transactionArgumentOrPure(args[1], tx));
|
199
|
+
// @ts-ignore
|
200
|
+
return tx.moveCall({
|
201
|
+
target: "0x1::ascii::push_char",
|
202
|
+
arguments: _args,
|
203
|
+
});
|
204
|
+
}
|
205
|
+
builder.pushChar = pushChar;
|
206
|
+
function string_(tx, args) {
|
207
|
+
const _args = [];
|
208
|
+
_args.push(transactionArgumentOrVec(args[0], tx));
|
209
|
+
// @ts-ignore
|
210
|
+
return tx.moveCall({
|
211
|
+
target: "0x1::ascii::string",
|
212
|
+
arguments: _args,
|
213
|
+
});
|
214
|
+
}
|
215
|
+
builder.string_ = string_;
|
216
|
+
function substring(tx, args) {
|
217
|
+
const _args = [];
|
218
|
+
_args.push(transactionArgumentOrObject(args[0], tx));
|
219
|
+
_args.push(transactionArgumentOrPureU64(args[1], tx));
|
220
|
+
_args.push(transactionArgumentOrPureU64(args[2], tx));
|
221
|
+
// @ts-ignore
|
222
|
+
return tx.moveCall({
|
223
|
+
target: "0x1::ascii::substring",
|
224
|
+
arguments: _args,
|
225
|
+
});
|
226
|
+
}
|
227
|
+
builder.substring = substring;
|
228
|
+
function toLowercase(tx, args) {
|
229
|
+
const _args = [];
|
230
|
+
_args.push(transactionArgumentOrObject(args[0], tx));
|
231
|
+
// @ts-ignore
|
232
|
+
return tx.moveCall({
|
233
|
+
target: "0x1::ascii::to_lowercase",
|
234
|
+
arguments: _args,
|
235
|
+
});
|
236
|
+
}
|
237
|
+
builder.toLowercase = toLowercase;
|
238
|
+
function toUppercase(tx, args) {
|
239
|
+
const _args = [];
|
240
|
+
_args.push(transactionArgumentOrObject(args[0], tx));
|
241
|
+
// @ts-ignore
|
242
|
+
return tx.moveCall({
|
243
|
+
target: "0x1::ascii::to_uppercase",
|
244
|
+
arguments: _args,
|
245
|
+
});
|
246
|
+
}
|
247
|
+
builder.toUppercase = toUppercase;
|
248
|
+
function tryString(tx, args) {
|
249
|
+
const _args = [];
|
250
|
+
_args.push(transactionArgumentOrVec(args[0], tx));
|
251
|
+
// @ts-ignore
|
252
|
+
return tx.moveCall({
|
253
|
+
target: "0x1::ascii::try_string",
|
254
|
+
arguments: _args,
|
255
|
+
});
|
256
|
+
}
|
257
|
+
builder.tryString = tryString;
|
258
|
+
})(builder = ascii.builder || (ascii.builder = {}));
|
259
|
+
let view;
|
260
|
+
(function (view) {
|
261
|
+
async function allCharactersPrintable(client, args) {
|
262
|
+
const tx = new Transaction();
|
263
|
+
builder.allCharactersPrintable(tx, args);
|
264
|
+
const inspectRes = await client.devInspectTransactionBlock({
|
265
|
+
transactionBlock: tx,
|
266
|
+
sender: ZERO_ADDRESS,
|
267
|
+
});
|
268
|
+
return (await getMoveCoder(client)).decodeDevInspectResult(inspectRes);
|
269
|
+
}
|
270
|
+
view.allCharactersPrintable = allCharactersPrintable;
|
271
|
+
async function append(client, args) {
|
272
|
+
const tx = new Transaction();
|
273
|
+
builder.append(tx, args);
|
274
|
+
const inspectRes = await client.devInspectTransactionBlock({
|
275
|
+
transactionBlock: tx,
|
276
|
+
sender: ZERO_ADDRESS,
|
277
|
+
});
|
278
|
+
return (await getMoveCoder(client)).decodeDevInspectResult(inspectRes);
|
279
|
+
}
|
280
|
+
view.append = append;
|
281
|
+
async function asBytes(client, args) {
|
282
|
+
const tx = new Transaction();
|
283
|
+
builder.asBytes(tx, args);
|
284
|
+
const inspectRes = await client.devInspectTransactionBlock({
|
285
|
+
transactionBlock: tx,
|
286
|
+
sender: ZERO_ADDRESS,
|
287
|
+
});
|
288
|
+
return (await getMoveCoder(client)).decodeDevInspectResult(inspectRes);
|
289
|
+
}
|
290
|
+
view.asBytes = asBytes;
|
291
|
+
async function byte(client, args) {
|
292
|
+
const tx = new Transaction();
|
293
|
+
builder.byte(tx, args);
|
294
|
+
const inspectRes = await client.devInspectTransactionBlock({
|
295
|
+
transactionBlock: tx,
|
296
|
+
sender: ZERO_ADDRESS,
|
297
|
+
});
|
298
|
+
return (await getMoveCoder(client)).decodeDevInspectResult(inspectRes);
|
299
|
+
}
|
300
|
+
view.byte = byte;
|
301
|
+
async function char(client, args) {
|
302
|
+
const tx = new Transaction();
|
303
|
+
builder.char(tx, args);
|
304
|
+
const inspectRes = await client.devInspectTransactionBlock({
|
305
|
+
transactionBlock: tx,
|
306
|
+
sender: ZERO_ADDRESS,
|
307
|
+
});
|
308
|
+
return (await getMoveCoder(client)).decodeDevInspectResult(inspectRes);
|
309
|
+
}
|
310
|
+
view.char = char;
|
311
|
+
async function indexOf(client, args) {
|
312
|
+
const tx = new Transaction();
|
313
|
+
builder.indexOf(tx, args);
|
314
|
+
const inspectRes = await client.devInspectTransactionBlock({
|
315
|
+
transactionBlock: tx,
|
316
|
+
sender: ZERO_ADDRESS,
|
317
|
+
});
|
318
|
+
return (await getMoveCoder(client)).decodeDevInspectResult(inspectRes);
|
319
|
+
}
|
320
|
+
view.indexOf = indexOf;
|
321
|
+
async function insert(client, args) {
|
322
|
+
const tx = new Transaction();
|
323
|
+
builder.insert(tx, args);
|
324
|
+
const inspectRes = await client.devInspectTransactionBlock({
|
325
|
+
transactionBlock: tx,
|
326
|
+
sender: ZERO_ADDRESS,
|
327
|
+
});
|
328
|
+
return (await getMoveCoder(client)).decodeDevInspectResult(inspectRes);
|
329
|
+
}
|
330
|
+
view.insert = insert;
|
331
|
+
async function intoBytes(client, args) {
|
332
|
+
const tx = new Transaction();
|
333
|
+
builder.intoBytes(tx, args);
|
334
|
+
const inspectRes = await client.devInspectTransactionBlock({
|
335
|
+
transactionBlock: tx,
|
336
|
+
sender: ZERO_ADDRESS,
|
337
|
+
});
|
338
|
+
return (await getMoveCoder(client)).decodeDevInspectResult(inspectRes);
|
339
|
+
}
|
340
|
+
view.intoBytes = intoBytes;
|
341
|
+
async function isEmpty(client, args) {
|
342
|
+
const tx = new Transaction();
|
343
|
+
builder.isEmpty(tx, args);
|
344
|
+
const inspectRes = await client.devInspectTransactionBlock({
|
345
|
+
transactionBlock: tx,
|
346
|
+
sender: ZERO_ADDRESS,
|
347
|
+
});
|
348
|
+
return (await getMoveCoder(client)).decodeDevInspectResult(inspectRes);
|
349
|
+
}
|
350
|
+
view.isEmpty = isEmpty;
|
351
|
+
async function isPrintableChar(client, args) {
|
352
|
+
const tx = new Transaction();
|
353
|
+
builder.isPrintableChar(tx, args);
|
354
|
+
const inspectRes = await client.devInspectTransactionBlock({
|
355
|
+
transactionBlock: tx,
|
356
|
+
sender: ZERO_ADDRESS,
|
357
|
+
});
|
358
|
+
return (await getMoveCoder(client)).decodeDevInspectResult(inspectRes);
|
359
|
+
}
|
360
|
+
view.isPrintableChar = isPrintableChar;
|
361
|
+
async function isValidChar(client, args) {
|
362
|
+
const tx = new Transaction();
|
363
|
+
builder.isValidChar(tx, args);
|
364
|
+
const inspectRes = await client.devInspectTransactionBlock({
|
365
|
+
transactionBlock: tx,
|
366
|
+
sender: ZERO_ADDRESS,
|
367
|
+
});
|
368
|
+
return (await getMoveCoder(client)).decodeDevInspectResult(inspectRes);
|
369
|
+
}
|
370
|
+
view.isValidChar = isValidChar;
|
371
|
+
async function length(client, args) {
|
372
|
+
const tx = new Transaction();
|
373
|
+
builder.length(tx, args);
|
374
|
+
const inspectRes = await client.devInspectTransactionBlock({
|
375
|
+
transactionBlock: tx,
|
376
|
+
sender: ZERO_ADDRESS,
|
377
|
+
});
|
378
|
+
return (await getMoveCoder(client)).decodeDevInspectResult(inspectRes);
|
379
|
+
}
|
380
|
+
view.length = length;
|
381
|
+
async function popChar(client, args) {
|
382
|
+
const tx = new Transaction();
|
383
|
+
builder.popChar(tx, args);
|
384
|
+
const inspectRes = await client.devInspectTransactionBlock({
|
385
|
+
transactionBlock: tx,
|
386
|
+
sender: ZERO_ADDRESS,
|
387
|
+
});
|
388
|
+
return (await getMoveCoder(client)).decodeDevInspectResult(inspectRes);
|
389
|
+
}
|
390
|
+
view.popChar = popChar;
|
391
|
+
async function pushChar(client, args) {
|
392
|
+
const tx = new Transaction();
|
393
|
+
builder.pushChar(tx, args);
|
394
|
+
const inspectRes = await client.devInspectTransactionBlock({
|
395
|
+
transactionBlock: tx,
|
396
|
+
sender: ZERO_ADDRESS,
|
397
|
+
});
|
398
|
+
return (await getMoveCoder(client)).decodeDevInspectResult(inspectRes);
|
399
|
+
}
|
400
|
+
view.pushChar = pushChar;
|
401
|
+
async function string_(client, args) {
|
402
|
+
const tx = new Transaction();
|
403
|
+
builder.string_(tx, args);
|
404
|
+
const inspectRes = await client.devInspectTransactionBlock({
|
405
|
+
transactionBlock: tx,
|
406
|
+
sender: ZERO_ADDRESS,
|
407
|
+
});
|
408
|
+
return (await getMoveCoder(client)).decodeDevInspectResult(inspectRes);
|
409
|
+
}
|
410
|
+
view.string_ = string_;
|
411
|
+
async function substring(client, args) {
|
412
|
+
const tx = new Transaction();
|
413
|
+
builder.substring(tx, args);
|
414
|
+
const inspectRes = await client.devInspectTransactionBlock({
|
415
|
+
transactionBlock: tx,
|
416
|
+
sender: ZERO_ADDRESS,
|
417
|
+
});
|
418
|
+
return (await getMoveCoder(client)).decodeDevInspectResult(inspectRes);
|
419
|
+
}
|
420
|
+
view.substring = substring;
|
421
|
+
async function toLowercase(client, args) {
|
422
|
+
const tx = new Transaction();
|
423
|
+
builder.toLowercase(tx, args);
|
424
|
+
const inspectRes = await client.devInspectTransactionBlock({
|
425
|
+
transactionBlock: tx,
|
426
|
+
sender: ZERO_ADDRESS,
|
427
|
+
});
|
428
|
+
return (await getMoveCoder(client)).decodeDevInspectResult(inspectRes);
|
429
|
+
}
|
430
|
+
view.toLowercase = toLowercase;
|
431
|
+
async function toUppercase(client, args) {
|
432
|
+
const tx = new Transaction();
|
433
|
+
builder.toUppercase(tx, args);
|
434
|
+
const inspectRes = await client.devInspectTransactionBlock({
|
435
|
+
transactionBlock: tx,
|
436
|
+
sender: ZERO_ADDRESS,
|
437
|
+
});
|
438
|
+
return (await getMoveCoder(client)).decodeDevInspectResult(inspectRes);
|
439
|
+
}
|
440
|
+
view.toUppercase = toUppercase;
|
441
|
+
async function tryString(client, args) {
|
442
|
+
const tx = new Transaction();
|
443
|
+
builder.tryString(tx, args);
|
444
|
+
const inspectRes = await client.devInspectTransactionBlock({
|
445
|
+
transactionBlock: tx,
|
446
|
+
sender: ZERO_ADDRESS,
|
447
|
+
});
|
448
|
+
return (await getMoveCoder(client)).decodeDevInspectResult(inspectRes);
|
449
|
+
}
|
450
|
+
view.tryString = tryString;
|
451
|
+
})(view = ascii.view || (ascii.view = {}));
|
28
452
|
})(ascii || (ascii = {}));
|
453
|
+
export var bcs;
|
454
|
+
(function (bcs) {
|
455
|
+
let builder;
|
456
|
+
(function (builder) {
|
457
|
+
function toBytes(tx, args, typeArguments) {
|
458
|
+
const _args = [];
|
459
|
+
_args.push(transactionArgumentOrObject(args[0], tx));
|
460
|
+
// @ts-ignore
|
461
|
+
return tx.moveCall({
|
462
|
+
target: "0x1::bcs::to_bytes",
|
463
|
+
arguments: _args,
|
464
|
+
typeArguments: [
|
465
|
+
typeof typeArguments[0] === "string"
|
466
|
+
? typeArguments[0]
|
467
|
+
: typeArguments[0].getSignature(),
|
468
|
+
],
|
469
|
+
});
|
470
|
+
}
|
471
|
+
builder.toBytes = toBytes;
|
472
|
+
})(builder = bcs.builder || (bcs.builder = {}));
|
473
|
+
let view;
|
474
|
+
(function (view) {
|
475
|
+
async function toBytes(client, args, typeArguments) {
|
476
|
+
const tx = new Transaction();
|
477
|
+
builder.toBytes(tx, args, typeArguments);
|
478
|
+
const inspectRes = await client.devInspectTransactionBlock({
|
479
|
+
transactionBlock: tx,
|
480
|
+
sender: ZERO_ADDRESS,
|
481
|
+
});
|
482
|
+
return (await getMoveCoder(client)).decodeDevInspectResult(inspectRes);
|
483
|
+
}
|
484
|
+
view.toBytes = toBytes;
|
485
|
+
})(view = bcs.view || (bcs.view = {}));
|
486
|
+
})(bcs || (bcs = {}));
|
29
487
|
export class bit_vector extends SuiBaseProcessor {
|
30
488
|
constructor(options) {
|
31
489
|
super("bit_vector", options);
|
@@ -52,7 +510,211 @@ export class bit_vector extends SuiBaseProcessor {
|
|
52
510
|
}
|
53
511
|
BitVector.type = type;
|
54
512
|
})(BitVector = bit_vector.BitVector || (bit_vector.BitVector = {}));
|
513
|
+
let builder;
|
514
|
+
(function (builder) {
|
515
|
+
function isIndexSet(tx, args) {
|
516
|
+
const _args = [];
|
517
|
+
_args.push(transactionArgumentOrObject(args[0], tx));
|
518
|
+
_args.push(transactionArgumentOrPureU64(args[1], tx));
|
519
|
+
// @ts-ignore
|
520
|
+
return tx.moveCall({
|
521
|
+
target: "0x1::bit_vector::is_index_set",
|
522
|
+
arguments: _args,
|
523
|
+
});
|
524
|
+
}
|
525
|
+
builder.isIndexSet = isIndexSet;
|
526
|
+
function length(tx, args) {
|
527
|
+
const _args = [];
|
528
|
+
_args.push(transactionArgumentOrObject(args[0], tx));
|
529
|
+
// @ts-ignore
|
530
|
+
return tx.moveCall({
|
531
|
+
target: "0x1::bit_vector::length",
|
532
|
+
arguments: _args,
|
533
|
+
});
|
534
|
+
}
|
535
|
+
builder.length = length;
|
536
|
+
function longestSetSequenceStartingAt(tx, args) {
|
537
|
+
const _args = [];
|
538
|
+
_args.push(transactionArgumentOrObject(args[0], tx));
|
539
|
+
_args.push(transactionArgumentOrPureU64(args[1], tx));
|
540
|
+
// @ts-ignore
|
541
|
+
return tx.moveCall({
|
542
|
+
target: "0x1::bit_vector::longest_set_sequence_starting_at",
|
543
|
+
arguments: _args,
|
544
|
+
});
|
545
|
+
}
|
546
|
+
builder.longestSetSequenceStartingAt = longestSetSequenceStartingAt;
|
547
|
+
function new_(tx, args) {
|
548
|
+
const _args = [];
|
549
|
+
_args.push(transactionArgumentOrPureU64(args[0], tx));
|
550
|
+
// @ts-ignore
|
551
|
+
return tx.moveCall({
|
552
|
+
target: "0x1::bit_vector::new",
|
553
|
+
arguments: _args,
|
554
|
+
});
|
555
|
+
}
|
556
|
+
builder.new_ = new_;
|
557
|
+
function set(tx, args) {
|
558
|
+
const _args = [];
|
559
|
+
_args.push(transactionArgumentOrObject(args[0], tx));
|
560
|
+
_args.push(transactionArgumentOrPureU64(args[1], tx));
|
561
|
+
// @ts-ignore
|
562
|
+
return tx.moveCall({
|
563
|
+
target: "0x1::bit_vector::set",
|
564
|
+
arguments: _args,
|
565
|
+
});
|
566
|
+
}
|
567
|
+
builder.set = set;
|
568
|
+
function shiftLeft(tx, args) {
|
569
|
+
const _args = [];
|
570
|
+
_args.push(transactionArgumentOrObject(args[0], tx));
|
571
|
+
_args.push(transactionArgumentOrPureU64(args[1], tx));
|
572
|
+
// @ts-ignore
|
573
|
+
return tx.moveCall({
|
574
|
+
target: "0x1::bit_vector::shift_left",
|
575
|
+
arguments: _args,
|
576
|
+
});
|
577
|
+
}
|
578
|
+
builder.shiftLeft = shiftLeft;
|
579
|
+
function unset(tx, args) {
|
580
|
+
const _args = [];
|
581
|
+
_args.push(transactionArgumentOrObject(args[0], tx));
|
582
|
+
_args.push(transactionArgumentOrPureU64(args[1], tx));
|
583
|
+
// @ts-ignore
|
584
|
+
return tx.moveCall({
|
585
|
+
target: "0x1::bit_vector::unset",
|
586
|
+
arguments: _args,
|
587
|
+
});
|
588
|
+
}
|
589
|
+
builder.unset = unset;
|
590
|
+
})(builder = bit_vector.builder || (bit_vector.builder = {}));
|
591
|
+
let view;
|
592
|
+
(function (view) {
|
593
|
+
async function isIndexSet(client, args) {
|
594
|
+
const tx = new Transaction();
|
595
|
+
builder.isIndexSet(tx, args);
|
596
|
+
const inspectRes = await client.devInspectTransactionBlock({
|
597
|
+
transactionBlock: tx,
|
598
|
+
sender: ZERO_ADDRESS,
|
599
|
+
});
|
600
|
+
return (await getMoveCoder(client)).decodeDevInspectResult(inspectRes);
|
601
|
+
}
|
602
|
+
view.isIndexSet = isIndexSet;
|
603
|
+
async function length(client, args) {
|
604
|
+
const tx = new Transaction();
|
605
|
+
builder.length(tx, args);
|
606
|
+
const inspectRes = await client.devInspectTransactionBlock({
|
607
|
+
transactionBlock: tx,
|
608
|
+
sender: ZERO_ADDRESS,
|
609
|
+
});
|
610
|
+
return (await getMoveCoder(client)).decodeDevInspectResult(inspectRes);
|
611
|
+
}
|
612
|
+
view.length = length;
|
613
|
+
async function longestSetSequenceStartingAt(client, args) {
|
614
|
+
const tx = new Transaction();
|
615
|
+
builder.longestSetSequenceStartingAt(tx, args);
|
616
|
+
const inspectRes = await client.devInspectTransactionBlock({
|
617
|
+
transactionBlock: tx,
|
618
|
+
sender: ZERO_ADDRESS,
|
619
|
+
});
|
620
|
+
return (await getMoveCoder(client)).decodeDevInspectResult(inspectRes);
|
621
|
+
}
|
622
|
+
view.longestSetSequenceStartingAt = longestSetSequenceStartingAt;
|
623
|
+
async function new_(client, args) {
|
624
|
+
const tx = new Transaction();
|
625
|
+
builder.new_(tx, args);
|
626
|
+
const inspectRes = await client.devInspectTransactionBlock({
|
627
|
+
transactionBlock: tx,
|
628
|
+
sender: ZERO_ADDRESS,
|
629
|
+
});
|
630
|
+
return (await getMoveCoder(client)).decodeDevInspectResult(inspectRes);
|
631
|
+
}
|
632
|
+
view.new_ = new_;
|
633
|
+
async function set(client, args) {
|
634
|
+
const tx = new Transaction();
|
635
|
+
builder.set(tx, args);
|
636
|
+
const inspectRes = await client.devInspectTransactionBlock({
|
637
|
+
transactionBlock: tx,
|
638
|
+
sender: ZERO_ADDRESS,
|
639
|
+
});
|
640
|
+
return (await getMoveCoder(client)).decodeDevInspectResult(inspectRes);
|
641
|
+
}
|
642
|
+
view.set = set;
|
643
|
+
async function shiftLeft(client, args) {
|
644
|
+
const tx = new Transaction();
|
645
|
+
builder.shiftLeft(tx, args);
|
646
|
+
const inspectRes = await client.devInspectTransactionBlock({
|
647
|
+
transactionBlock: tx,
|
648
|
+
sender: ZERO_ADDRESS,
|
649
|
+
});
|
650
|
+
return (await getMoveCoder(client)).decodeDevInspectResult(inspectRes);
|
651
|
+
}
|
652
|
+
view.shiftLeft = shiftLeft;
|
653
|
+
async function unset(client, args) {
|
654
|
+
const tx = new Transaction();
|
655
|
+
builder.unset(tx, args);
|
656
|
+
const inspectRes = await client.devInspectTransactionBlock({
|
657
|
+
transactionBlock: tx,
|
658
|
+
sender: ZERO_ADDRESS,
|
659
|
+
});
|
660
|
+
return (await getMoveCoder(client)).decodeDevInspectResult(inspectRes);
|
661
|
+
}
|
662
|
+
view.unset = unset;
|
663
|
+
})(view = bit_vector.view || (bit_vector.view = {}));
|
55
664
|
})(bit_vector || (bit_vector = {}));
|
665
|
+
export var debug;
|
666
|
+
(function (debug) {
|
667
|
+
let builder;
|
668
|
+
(function (builder) {
|
669
|
+
function print(tx, args, typeArguments) {
|
670
|
+
const _args = [];
|
671
|
+
_args.push(transactionArgumentOrObject(args[0], tx));
|
672
|
+
// @ts-ignore
|
673
|
+
return tx.moveCall({
|
674
|
+
target: "0x1::debug::print",
|
675
|
+
arguments: _args,
|
676
|
+
typeArguments: [
|
677
|
+
typeof typeArguments[0] === "string"
|
678
|
+
? typeArguments[0]
|
679
|
+
: typeArguments[0].getSignature(),
|
680
|
+
],
|
681
|
+
});
|
682
|
+
}
|
683
|
+
builder.print = print;
|
684
|
+
function printStackTrace(tx, args) {
|
685
|
+
const _args = [];
|
686
|
+
// @ts-ignore
|
687
|
+
return tx.moveCall({
|
688
|
+
target: "0x1::debug::print_stack_trace",
|
689
|
+
arguments: _args,
|
690
|
+
});
|
691
|
+
}
|
692
|
+
builder.printStackTrace = printStackTrace;
|
693
|
+
})(builder = debug.builder || (debug.builder = {}));
|
694
|
+
let view;
|
695
|
+
(function (view) {
|
696
|
+
async function print(client, args, typeArguments) {
|
697
|
+
const tx = new Transaction();
|
698
|
+
builder.print(tx, args, typeArguments);
|
699
|
+
const inspectRes = await client.devInspectTransactionBlock({
|
700
|
+
transactionBlock: tx,
|
701
|
+
sender: ZERO_ADDRESS,
|
702
|
+
});
|
703
|
+
return (await getMoveCoder(client)).decodeDevInspectResult(inspectRes);
|
704
|
+
}
|
705
|
+
view.print = print;
|
706
|
+
async function printStackTrace(client, args) {
|
707
|
+
const tx = new Transaction();
|
708
|
+
builder.printStackTrace(tx, args);
|
709
|
+
const inspectRes = await client.devInspectTransactionBlock({
|
710
|
+
transactionBlock: tx,
|
711
|
+
sender: ZERO_ADDRESS,
|
712
|
+
});
|
713
|
+
return (await getMoveCoder(client)).decodeDevInspectResult(inspectRes);
|
714
|
+
}
|
715
|
+
view.printStackTrace = printStackTrace;
|
716
|
+
})(view = debug.view || (debug.view = {}));
|
717
|
+
})(debug || (debug = {}));
|
56
718
|
export class fixed_point32 extends SuiBaseProcessor {
|
57
719
|
constructor(options) {
|
58
720
|
super("fixed_point32", options);
|
@@ -79,7 +741,185 @@ export class fixed_point32 extends SuiBaseProcessor {
|
|
79
741
|
}
|
80
742
|
FixedPoint32.type = type;
|
81
743
|
})(FixedPoint32 = fixed_point32.FixedPoint32 || (fixed_point32.FixedPoint32 = {}));
|
744
|
+
let builder;
|
745
|
+
(function (builder) {
|
746
|
+
function createFromRational(tx, args) {
|
747
|
+
const _args = [];
|
748
|
+
_args.push(transactionArgumentOrPureU64(args[0], tx));
|
749
|
+
_args.push(transactionArgumentOrPureU64(args[1], tx));
|
750
|
+
// @ts-ignore
|
751
|
+
return tx.moveCall({
|
752
|
+
target: "0x1::fixed_point32::create_from_rational",
|
753
|
+
arguments: _args,
|
754
|
+
});
|
755
|
+
}
|
756
|
+
builder.createFromRational = createFromRational;
|
757
|
+
function createFromRawValue(tx, args) {
|
758
|
+
const _args = [];
|
759
|
+
_args.push(transactionArgumentOrPureU64(args[0], tx));
|
760
|
+
// @ts-ignore
|
761
|
+
return tx.moveCall({
|
762
|
+
target: "0x1::fixed_point32::create_from_raw_value",
|
763
|
+
arguments: _args,
|
764
|
+
});
|
765
|
+
}
|
766
|
+
builder.createFromRawValue = createFromRawValue;
|
767
|
+
function divideU64(tx, args) {
|
768
|
+
const _args = [];
|
769
|
+
_args.push(transactionArgumentOrPureU64(args[0], tx));
|
770
|
+
_args.push(transactionArgumentOrPure(args[1], tx));
|
771
|
+
// @ts-ignore
|
772
|
+
return tx.moveCall({
|
773
|
+
target: "0x1::fixed_point32::divide_u64",
|
774
|
+
arguments: _args,
|
775
|
+
});
|
776
|
+
}
|
777
|
+
builder.divideU64 = divideU64;
|
778
|
+
function getRawValue(tx, args) {
|
779
|
+
const _args = [];
|
780
|
+
_args.push(transactionArgumentOrPure(args[0], tx));
|
781
|
+
// @ts-ignore
|
782
|
+
return tx.moveCall({
|
783
|
+
target: "0x1::fixed_point32::get_raw_value",
|
784
|
+
arguments: _args,
|
785
|
+
});
|
786
|
+
}
|
787
|
+
builder.getRawValue = getRawValue;
|
788
|
+
function isZero(tx, args) {
|
789
|
+
const _args = [];
|
790
|
+
_args.push(transactionArgumentOrPure(args[0], tx));
|
791
|
+
// @ts-ignore
|
792
|
+
return tx.moveCall({
|
793
|
+
target: "0x1::fixed_point32::is_zero",
|
794
|
+
arguments: _args,
|
795
|
+
});
|
796
|
+
}
|
797
|
+
builder.isZero = isZero;
|
798
|
+
function multiplyU64(tx, args) {
|
799
|
+
const _args = [];
|
800
|
+
_args.push(transactionArgumentOrPureU64(args[0], tx));
|
801
|
+
_args.push(transactionArgumentOrPure(args[1], tx));
|
802
|
+
// @ts-ignore
|
803
|
+
return tx.moveCall({
|
804
|
+
target: "0x1::fixed_point32::multiply_u64",
|
805
|
+
arguments: _args,
|
806
|
+
});
|
807
|
+
}
|
808
|
+
builder.multiplyU64 = multiplyU64;
|
809
|
+
})(builder = fixed_point32.builder || (fixed_point32.builder = {}));
|
810
|
+
let view;
|
811
|
+
(function (view) {
|
812
|
+
async function createFromRational(client, args) {
|
813
|
+
const tx = new Transaction();
|
814
|
+
builder.createFromRational(tx, args);
|
815
|
+
const inspectRes = await client.devInspectTransactionBlock({
|
816
|
+
transactionBlock: tx,
|
817
|
+
sender: ZERO_ADDRESS,
|
818
|
+
});
|
819
|
+
return (await getMoveCoder(client)).decodeDevInspectResult(inspectRes);
|
820
|
+
}
|
821
|
+
view.createFromRational = createFromRational;
|
822
|
+
async function createFromRawValue(client, args) {
|
823
|
+
const tx = new Transaction();
|
824
|
+
builder.createFromRawValue(tx, args);
|
825
|
+
const inspectRes = await client.devInspectTransactionBlock({
|
826
|
+
transactionBlock: tx,
|
827
|
+
sender: ZERO_ADDRESS,
|
828
|
+
});
|
829
|
+
return (await getMoveCoder(client)).decodeDevInspectResult(inspectRes);
|
830
|
+
}
|
831
|
+
view.createFromRawValue = createFromRawValue;
|
832
|
+
async function divideU64(client, args) {
|
833
|
+
const tx = new Transaction();
|
834
|
+
builder.divideU64(tx, args);
|
835
|
+
const inspectRes = await client.devInspectTransactionBlock({
|
836
|
+
transactionBlock: tx,
|
837
|
+
sender: ZERO_ADDRESS,
|
838
|
+
});
|
839
|
+
return (await getMoveCoder(client)).decodeDevInspectResult(inspectRes);
|
840
|
+
}
|
841
|
+
view.divideU64 = divideU64;
|
842
|
+
async function getRawValue(client, args) {
|
843
|
+
const tx = new Transaction();
|
844
|
+
builder.getRawValue(tx, args);
|
845
|
+
const inspectRes = await client.devInspectTransactionBlock({
|
846
|
+
transactionBlock: tx,
|
847
|
+
sender: ZERO_ADDRESS,
|
848
|
+
});
|
849
|
+
return (await getMoveCoder(client)).decodeDevInspectResult(inspectRes);
|
850
|
+
}
|
851
|
+
view.getRawValue = getRawValue;
|
852
|
+
async function isZero(client, args) {
|
853
|
+
const tx = new Transaction();
|
854
|
+
builder.isZero(tx, args);
|
855
|
+
const inspectRes = await client.devInspectTransactionBlock({
|
856
|
+
transactionBlock: tx,
|
857
|
+
sender: ZERO_ADDRESS,
|
858
|
+
});
|
859
|
+
return (await getMoveCoder(client)).decodeDevInspectResult(inspectRes);
|
860
|
+
}
|
861
|
+
view.isZero = isZero;
|
862
|
+
async function multiplyU64(client, args) {
|
863
|
+
const tx = new Transaction();
|
864
|
+
builder.multiplyU64(tx, args);
|
865
|
+
const inspectRes = await client.devInspectTransactionBlock({
|
866
|
+
transactionBlock: tx,
|
867
|
+
sender: ZERO_ADDRESS,
|
868
|
+
});
|
869
|
+
return (await getMoveCoder(client)).decodeDevInspectResult(inspectRes);
|
870
|
+
}
|
871
|
+
view.multiplyU64 = multiplyU64;
|
872
|
+
})(view = fixed_point32.view || (fixed_point32.view = {}));
|
82
873
|
})(fixed_point32 || (fixed_point32 = {}));
|
874
|
+
export var hash;
|
875
|
+
(function (hash) {
|
876
|
+
let builder;
|
877
|
+
(function (builder) {
|
878
|
+
function sha2256(tx, args) {
|
879
|
+
const _args = [];
|
880
|
+
_args.push(transactionArgumentOrVec(args[0], tx));
|
881
|
+
// @ts-ignore
|
882
|
+
return tx.moveCall({
|
883
|
+
target: "0x1::hash::sha2_256",
|
884
|
+
arguments: _args,
|
885
|
+
});
|
886
|
+
}
|
887
|
+
builder.sha2256 = sha2256;
|
888
|
+
function sha3256(tx, args) {
|
889
|
+
const _args = [];
|
890
|
+
_args.push(transactionArgumentOrVec(args[0], tx));
|
891
|
+
// @ts-ignore
|
892
|
+
return tx.moveCall({
|
893
|
+
target: "0x1::hash::sha3_256",
|
894
|
+
arguments: _args,
|
895
|
+
});
|
896
|
+
}
|
897
|
+
builder.sha3256 = sha3256;
|
898
|
+
})(builder = hash.builder || (hash.builder = {}));
|
899
|
+
let view;
|
900
|
+
(function (view) {
|
901
|
+
async function sha2256(client, args) {
|
902
|
+
const tx = new Transaction();
|
903
|
+
builder.sha2256(tx, args);
|
904
|
+
const inspectRes = await client.devInspectTransactionBlock({
|
905
|
+
transactionBlock: tx,
|
906
|
+
sender: ZERO_ADDRESS,
|
907
|
+
});
|
908
|
+
return (await getMoveCoder(client)).decodeDevInspectResult(inspectRes);
|
909
|
+
}
|
910
|
+
view.sha2256 = sha2256;
|
911
|
+
async function sha3256(client, args) {
|
912
|
+
const tx = new Transaction();
|
913
|
+
builder.sha3256(tx, args);
|
914
|
+
const inspectRes = await client.devInspectTransactionBlock({
|
915
|
+
transactionBlock: tx,
|
916
|
+
sender: ZERO_ADDRESS,
|
917
|
+
});
|
918
|
+
return (await getMoveCoder(client)).decodeDevInspectResult(inspectRes);
|
919
|
+
}
|
920
|
+
view.sha3256 = sha3256;
|
921
|
+
})(view = hash.view || (hash.view = {}));
|
922
|
+
})(hash || (hash = {}));
|
83
923
|
export var option;
|
84
924
|
(function (option) {
|
85
925
|
let Option;
|
@@ -91,6 +931,443 @@ export var option;
|
|
91
931
|
}
|
92
932
|
Option.type = type;
|
93
933
|
})(Option = option.Option || (option.Option = {}));
|
934
|
+
let builder;
|
935
|
+
(function (builder) {
|
936
|
+
function borrow(tx, args, typeArguments) {
|
937
|
+
const _args = [];
|
938
|
+
_args.push(transactionArgumentOrObject(args[0], tx));
|
939
|
+
// @ts-ignore
|
940
|
+
return tx.moveCall({
|
941
|
+
target: "0x1::option::borrow",
|
942
|
+
arguments: _args,
|
943
|
+
typeArguments: [
|
944
|
+
typeof typeArguments[0] === "string"
|
945
|
+
? typeArguments[0]
|
946
|
+
: typeArguments[0].getSignature(),
|
947
|
+
],
|
948
|
+
});
|
949
|
+
}
|
950
|
+
builder.borrow = borrow;
|
951
|
+
function borrowMut(tx, args, typeArguments) {
|
952
|
+
const _args = [];
|
953
|
+
_args.push(transactionArgumentOrObject(args[0], tx));
|
954
|
+
// @ts-ignore
|
955
|
+
return tx.moveCall({
|
956
|
+
target: "0x1::option::borrow_mut",
|
957
|
+
arguments: _args,
|
958
|
+
typeArguments: [
|
959
|
+
typeof typeArguments[0] === "string"
|
960
|
+
? typeArguments[0]
|
961
|
+
: typeArguments[0].getSignature(),
|
962
|
+
],
|
963
|
+
});
|
964
|
+
}
|
965
|
+
builder.borrowMut = borrowMut;
|
966
|
+
function borrowWithDefault(tx, args, typeArguments) {
|
967
|
+
const _args = [];
|
968
|
+
_args.push(transactionArgumentOrObject(args[0], tx));
|
969
|
+
_args.push(transactionArgumentOrObject(args[1], tx));
|
970
|
+
// @ts-ignore
|
971
|
+
return tx.moveCall({
|
972
|
+
target: "0x1::option::borrow_with_default",
|
973
|
+
arguments: _args,
|
974
|
+
typeArguments: [
|
975
|
+
typeof typeArguments[0] === "string"
|
976
|
+
? typeArguments[0]
|
977
|
+
: typeArguments[0].getSignature(),
|
978
|
+
],
|
979
|
+
});
|
980
|
+
}
|
981
|
+
builder.borrowWithDefault = borrowWithDefault;
|
982
|
+
function contains(tx, args, typeArguments) {
|
983
|
+
const _args = [];
|
984
|
+
_args.push(transactionArgumentOrObject(args[0], tx));
|
985
|
+
_args.push(transactionArgumentOrObject(args[1], tx));
|
986
|
+
// @ts-ignore
|
987
|
+
return tx.moveCall({
|
988
|
+
target: "0x1::option::contains",
|
989
|
+
arguments: _args,
|
990
|
+
typeArguments: [
|
991
|
+
typeof typeArguments[0] === "string"
|
992
|
+
? typeArguments[0]
|
993
|
+
: typeArguments[0].getSignature(),
|
994
|
+
],
|
995
|
+
});
|
996
|
+
}
|
997
|
+
builder.contains = contains;
|
998
|
+
function destroyNone(tx, args, typeArguments) {
|
999
|
+
const _args = [];
|
1000
|
+
_args.push(transactionArgumentOrPure(args[0], tx));
|
1001
|
+
// @ts-ignore
|
1002
|
+
return tx.moveCall({
|
1003
|
+
target: "0x1::option::destroy_none",
|
1004
|
+
arguments: _args,
|
1005
|
+
typeArguments: [
|
1006
|
+
typeof typeArguments[0] === "string"
|
1007
|
+
? typeArguments[0]
|
1008
|
+
: typeArguments[0].getSignature(),
|
1009
|
+
],
|
1010
|
+
});
|
1011
|
+
}
|
1012
|
+
builder.destroyNone = destroyNone;
|
1013
|
+
function destroySome(tx, args, typeArguments) {
|
1014
|
+
const _args = [];
|
1015
|
+
_args.push(transactionArgumentOrPure(args[0], tx));
|
1016
|
+
// @ts-ignore
|
1017
|
+
return tx.moveCall({
|
1018
|
+
target: "0x1::option::destroy_some",
|
1019
|
+
arguments: _args,
|
1020
|
+
typeArguments: [
|
1021
|
+
typeof typeArguments[0] === "string"
|
1022
|
+
? typeArguments[0]
|
1023
|
+
: typeArguments[0].getSignature(),
|
1024
|
+
],
|
1025
|
+
});
|
1026
|
+
}
|
1027
|
+
builder.destroySome = destroySome;
|
1028
|
+
function destroyWithDefault(tx, args, typeArguments) {
|
1029
|
+
const _args = [];
|
1030
|
+
_args.push(transactionArgumentOrPure(args[0], tx));
|
1031
|
+
_args.push(transactionArgumentOrPure(args[1], tx));
|
1032
|
+
// @ts-ignore
|
1033
|
+
return tx.moveCall({
|
1034
|
+
target: "0x1::option::destroy_with_default",
|
1035
|
+
arguments: _args,
|
1036
|
+
typeArguments: [
|
1037
|
+
typeof typeArguments[0] === "string"
|
1038
|
+
? typeArguments[0]
|
1039
|
+
: typeArguments[0].getSignature(),
|
1040
|
+
],
|
1041
|
+
});
|
1042
|
+
}
|
1043
|
+
builder.destroyWithDefault = destroyWithDefault;
|
1044
|
+
function extract(tx, args, typeArguments) {
|
1045
|
+
const _args = [];
|
1046
|
+
_args.push(transactionArgumentOrObject(args[0], tx));
|
1047
|
+
// @ts-ignore
|
1048
|
+
return tx.moveCall({
|
1049
|
+
target: "0x1::option::extract",
|
1050
|
+
arguments: _args,
|
1051
|
+
typeArguments: [
|
1052
|
+
typeof typeArguments[0] === "string"
|
1053
|
+
? typeArguments[0]
|
1054
|
+
: typeArguments[0].getSignature(),
|
1055
|
+
],
|
1056
|
+
});
|
1057
|
+
}
|
1058
|
+
builder.extract = extract;
|
1059
|
+
function fill(tx, args, typeArguments) {
|
1060
|
+
const _args = [];
|
1061
|
+
_args.push(transactionArgumentOrObject(args[0], tx));
|
1062
|
+
_args.push(transactionArgumentOrPure(args[1], tx));
|
1063
|
+
// @ts-ignore
|
1064
|
+
return tx.moveCall({
|
1065
|
+
target: "0x1::option::fill",
|
1066
|
+
arguments: _args,
|
1067
|
+
typeArguments: [
|
1068
|
+
typeof typeArguments[0] === "string"
|
1069
|
+
? typeArguments[0]
|
1070
|
+
: typeArguments[0].getSignature(),
|
1071
|
+
],
|
1072
|
+
});
|
1073
|
+
}
|
1074
|
+
builder.fill = fill;
|
1075
|
+
function getWithDefault(tx, args, typeArguments) {
|
1076
|
+
const _args = [];
|
1077
|
+
_args.push(transactionArgumentOrObject(args[0], tx));
|
1078
|
+
_args.push(transactionArgumentOrPure(args[1], tx));
|
1079
|
+
// @ts-ignore
|
1080
|
+
return tx.moveCall({
|
1081
|
+
target: "0x1::option::get_with_default",
|
1082
|
+
arguments: _args,
|
1083
|
+
typeArguments: [
|
1084
|
+
typeof typeArguments[0] === "string"
|
1085
|
+
? typeArguments[0]
|
1086
|
+
: typeArguments[0].getSignature(),
|
1087
|
+
],
|
1088
|
+
});
|
1089
|
+
}
|
1090
|
+
builder.getWithDefault = getWithDefault;
|
1091
|
+
function isNone(tx, args, typeArguments) {
|
1092
|
+
const _args = [];
|
1093
|
+
_args.push(transactionArgumentOrObject(args[0], tx));
|
1094
|
+
// @ts-ignore
|
1095
|
+
return tx.moveCall({
|
1096
|
+
target: "0x1::option::is_none",
|
1097
|
+
arguments: _args,
|
1098
|
+
typeArguments: [
|
1099
|
+
typeof typeArguments[0] === "string"
|
1100
|
+
? typeArguments[0]
|
1101
|
+
: typeArguments[0].getSignature(),
|
1102
|
+
],
|
1103
|
+
});
|
1104
|
+
}
|
1105
|
+
builder.isNone = isNone;
|
1106
|
+
function isSome(tx, args, typeArguments) {
|
1107
|
+
const _args = [];
|
1108
|
+
_args.push(transactionArgumentOrObject(args[0], tx));
|
1109
|
+
// @ts-ignore
|
1110
|
+
return tx.moveCall({
|
1111
|
+
target: "0x1::option::is_some",
|
1112
|
+
arguments: _args,
|
1113
|
+
typeArguments: [
|
1114
|
+
typeof typeArguments[0] === "string"
|
1115
|
+
? typeArguments[0]
|
1116
|
+
: typeArguments[0].getSignature(),
|
1117
|
+
],
|
1118
|
+
});
|
1119
|
+
}
|
1120
|
+
builder.isSome = isSome;
|
1121
|
+
function none(tx, args, typeArguments) {
|
1122
|
+
const _args = [];
|
1123
|
+
// @ts-ignore
|
1124
|
+
return tx.moveCall({
|
1125
|
+
target: "0x1::option::none",
|
1126
|
+
arguments: _args,
|
1127
|
+
typeArguments: [
|
1128
|
+
typeof typeArguments[0] === "string"
|
1129
|
+
? typeArguments[0]
|
1130
|
+
: typeArguments[0].getSignature(),
|
1131
|
+
],
|
1132
|
+
});
|
1133
|
+
}
|
1134
|
+
builder.none = none;
|
1135
|
+
function some(tx, args, typeArguments) {
|
1136
|
+
const _args = [];
|
1137
|
+
_args.push(transactionArgumentOrPure(args[0], tx));
|
1138
|
+
// @ts-ignore
|
1139
|
+
return tx.moveCall({
|
1140
|
+
target: "0x1::option::some",
|
1141
|
+
arguments: _args,
|
1142
|
+
typeArguments: [
|
1143
|
+
typeof typeArguments[0] === "string"
|
1144
|
+
? typeArguments[0]
|
1145
|
+
: typeArguments[0].getSignature(),
|
1146
|
+
],
|
1147
|
+
});
|
1148
|
+
}
|
1149
|
+
builder.some = some;
|
1150
|
+
function swap(tx, args, typeArguments) {
|
1151
|
+
const _args = [];
|
1152
|
+
_args.push(transactionArgumentOrObject(args[0], tx));
|
1153
|
+
_args.push(transactionArgumentOrPure(args[1], tx));
|
1154
|
+
// @ts-ignore
|
1155
|
+
return tx.moveCall({
|
1156
|
+
target: "0x1::option::swap",
|
1157
|
+
arguments: _args,
|
1158
|
+
typeArguments: [
|
1159
|
+
typeof typeArguments[0] === "string"
|
1160
|
+
? typeArguments[0]
|
1161
|
+
: typeArguments[0].getSignature(),
|
1162
|
+
],
|
1163
|
+
});
|
1164
|
+
}
|
1165
|
+
builder.swap = swap;
|
1166
|
+
function swapOrFill(tx, args, typeArguments) {
|
1167
|
+
const _args = [];
|
1168
|
+
_args.push(transactionArgumentOrObject(args[0], tx));
|
1169
|
+
_args.push(transactionArgumentOrPure(args[1], tx));
|
1170
|
+
// @ts-ignore
|
1171
|
+
return tx.moveCall({
|
1172
|
+
target: "0x1::option::swap_or_fill",
|
1173
|
+
arguments: _args,
|
1174
|
+
typeArguments: [
|
1175
|
+
typeof typeArguments[0] === "string"
|
1176
|
+
? typeArguments[0]
|
1177
|
+
: typeArguments[0].getSignature(),
|
1178
|
+
],
|
1179
|
+
});
|
1180
|
+
}
|
1181
|
+
builder.swapOrFill = swapOrFill;
|
1182
|
+
function toVec(tx, args, typeArguments) {
|
1183
|
+
const _args = [];
|
1184
|
+
_args.push(transactionArgumentOrPure(args[0], tx));
|
1185
|
+
// @ts-ignore
|
1186
|
+
return tx.moveCall({
|
1187
|
+
target: "0x1::option::to_vec",
|
1188
|
+
arguments: _args,
|
1189
|
+
typeArguments: [
|
1190
|
+
typeof typeArguments[0] === "string"
|
1191
|
+
? typeArguments[0]
|
1192
|
+
: typeArguments[0].getSignature(),
|
1193
|
+
],
|
1194
|
+
});
|
1195
|
+
}
|
1196
|
+
builder.toVec = toVec;
|
1197
|
+
})(builder = option.builder || (option.builder = {}));
|
1198
|
+
let view;
|
1199
|
+
(function (view) {
|
1200
|
+
async function borrow(client, args, typeArguments) {
|
1201
|
+
const tx = new Transaction();
|
1202
|
+
builder.borrow(tx, args, typeArguments);
|
1203
|
+
const inspectRes = await client.devInspectTransactionBlock({
|
1204
|
+
transactionBlock: tx,
|
1205
|
+
sender: ZERO_ADDRESS,
|
1206
|
+
});
|
1207
|
+
return (await getMoveCoder(client)).decodeDevInspectResult(inspectRes);
|
1208
|
+
}
|
1209
|
+
view.borrow = borrow;
|
1210
|
+
async function borrowMut(client, args, typeArguments) {
|
1211
|
+
const tx = new Transaction();
|
1212
|
+
builder.borrowMut(tx, args, typeArguments);
|
1213
|
+
const inspectRes = await client.devInspectTransactionBlock({
|
1214
|
+
transactionBlock: tx,
|
1215
|
+
sender: ZERO_ADDRESS,
|
1216
|
+
});
|
1217
|
+
return (await getMoveCoder(client)).decodeDevInspectResult(inspectRes);
|
1218
|
+
}
|
1219
|
+
view.borrowMut = borrowMut;
|
1220
|
+
async function borrowWithDefault(client, args, typeArguments) {
|
1221
|
+
const tx = new Transaction();
|
1222
|
+
builder.borrowWithDefault(tx, args, typeArguments);
|
1223
|
+
const inspectRes = await client.devInspectTransactionBlock({
|
1224
|
+
transactionBlock: tx,
|
1225
|
+
sender: ZERO_ADDRESS,
|
1226
|
+
});
|
1227
|
+
return (await getMoveCoder(client)).decodeDevInspectResult(inspectRes);
|
1228
|
+
}
|
1229
|
+
view.borrowWithDefault = borrowWithDefault;
|
1230
|
+
async function contains(client, args, typeArguments) {
|
1231
|
+
const tx = new Transaction();
|
1232
|
+
builder.contains(tx, args, typeArguments);
|
1233
|
+
const inspectRes = await client.devInspectTransactionBlock({
|
1234
|
+
transactionBlock: tx,
|
1235
|
+
sender: ZERO_ADDRESS,
|
1236
|
+
});
|
1237
|
+
return (await getMoveCoder(client)).decodeDevInspectResult(inspectRes);
|
1238
|
+
}
|
1239
|
+
view.contains = contains;
|
1240
|
+
async function destroyNone(client, args, typeArguments) {
|
1241
|
+
const tx = new Transaction();
|
1242
|
+
builder.destroyNone(tx, args, typeArguments);
|
1243
|
+
const inspectRes = await client.devInspectTransactionBlock({
|
1244
|
+
transactionBlock: tx,
|
1245
|
+
sender: ZERO_ADDRESS,
|
1246
|
+
});
|
1247
|
+
return (await getMoveCoder(client)).decodeDevInspectResult(inspectRes);
|
1248
|
+
}
|
1249
|
+
view.destroyNone = destroyNone;
|
1250
|
+
async function destroySome(client, args, typeArguments) {
|
1251
|
+
const tx = new Transaction();
|
1252
|
+
builder.destroySome(tx, args, typeArguments);
|
1253
|
+
const inspectRes = await client.devInspectTransactionBlock({
|
1254
|
+
transactionBlock: tx,
|
1255
|
+
sender: ZERO_ADDRESS,
|
1256
|
+
});
|
1257
|
+
return (await getMoveCoder(client)).decodeDevInspectResult(inspectRes);
|
1258
|
+
}
|
1259
|
+
view.destroySome = destroySome;
|
1260
|
+
async function destroyWithDefault(client, args, typeArguments) {
|
1261
|
+
const tx = new Transaction();
|
1262
|
+
builder.destroyWithDefault(tx, args, typeArguments);
|
1263
|
+
const inspectRes = await client.devInspectTransactionBlock({
|
1264
|
+
transactionBlock: tx,
|
1265
|
+
sender: ZERO_ADDRESS,
|
1266
|
+
});
|
1267
|
+
return (await getMoveCoder(client)).decodeDevInspectResult(inspectRes);
|
1268
|
+
}
|
1269
|
+
view.destroyWithDefault = destroyWithDefault;
|
1270
|
+
async function extract(client, args, typeArguments) {
|
1271
|
+
const tx = new Transaction();
|
1272
|
+
builder.extract(tx, args, typeArguments);
|
1273
|
+
const inspectRes = await client.devInspectTransactionBlock({
|
1274
|
+
transactionBlock: tx,
|
1275
|
+
sender: ZERO_ADDRESS,
|
1276
|
+
});
|
1277
|
+
return (await getMoveCoder(client)).decodeDevInspectResult(inspectRes);
|
1278
|
+
}
|
1279
|
+
view.extract = extract;
|
1280
|
+
async function fill(client, args, typeArguments) {
|
1281
|
+
const tx = new Transaction();
|
1282
|
+
builder.fill(tx, args, typeArguments);
|
1283
|
+
const inspectRes = await client.devInspectTransactionBlock({
|
1284
|
+
transactionBlock: tx,
|
1285
|
+
sender: ZERO_ADDRESS,
|
1286
|
+
});
|
1287
|
+
return (await getMoveCoder(client)).decodeDevInspectResult(inspectRes);
|
1288
|
+
}
|
1289
|
+
view.fill = fill;
|
1290
|
+
async function getWithDefault(client, args, typeArguments) {
|
1291
|
+
const tx = new Transaction();
|
1292
|
+
builder.getWithDefault(tx, args, typeArguments);
|
1293
|
+
const inspectRes = await client.devInspectTransactionBlock({
|
1294
|
+
transactionBlock: tx,
|
1295
|
+
sender: ZERO_ADDRESS,
|
1296
|
+
});
|
1297
|
+
return (await getMoveCoder(client)).decodeDevInspectResult(inspectRes);
|
1298
|
+
}
|
1299
|
+
view.getWithDefault = getWithDefault;
|
1300
|
+
async function isNone(client, args, typeArguments) {
|
1301
|
+
const tx = new Transaction();
|
1302
|
+
builder.isNone(tx, args, typeArguments);
|
1303
|
+
const inspectRes = await client.devInspectTransactionBlock({
|
1304
|
+
transactionBlock: tx,
|
1305
|
+
sender: ZERO_ADDRESS,
|
1306
|
+
});
|
1307
|
+
return (await getMoveCoder(client)).decodeDevInspectResult(inspectRes);
|
1308
|
+
}
|
1309
|
+
view.isNone = isNone;
|
1310
|
+
async function isSome(client, args, typeArguments) {
|
1311
|
+
const tx = new Transaction();
|
1312
|
+
builder.isSome(tx, args, typeArguments);
|
1313
|
+
const inspectRes = await client.devInspectTransactionBlock({
|
1314
|
+
transactionBlock: tx,
|
1315
|
+
sender: ZERO_ADDRESS,
|
1316
|
+
});
|
1317
|
+
return (await getMoveCoder(client)).decodeDevInspectResult(inspectRes);
|
1318
|
+
}
|
1319
|
+
view.isSome = isSome;
|
1320
|
+
async function none(client, args, typeArguments) {
|
1321
|
+
const tx = new Transaction();
|
1322
|
+
builder.none(tx, args, typeArguments);
|
1323
|
+
const inspectRes = await client.devInspectTransactionBlock({
|
1324
|
+
transactionBlock: tx,
|
1325
|
+
sender: ZERO_ADDRESS,
|
1326
|
+
});
|
1327
|
+
return (await getMoveCoder(client)).decodeDevInspectResult(inspectRes);
|
1328
|
+
}
|
1329
|
+
view.none = none;
|
1330
|
+
async function some(client, args, typeArguments) {
|
1331
|
+
const tx = new Transaction();
|
1332
|
+
builder.some(tx, args, typeArguments);
|
1333
|
+
const inspectRes = await client.devInspectTransactionBlock({
|
1334
|
+
transactionBlock: tx,
|
1335
|
+
sender: ZERO_ADDRESS,
|
1336
|
+
});
|
1337
|
+
return (await getMoveCoder(client)).decodeDevInspectResult(inspectRes);
|
1338
|
+
}
|
1339
|
+
view.some = some;
|
1340
|
+
async function swap(client, args, typeArguments) {
|
1341
|
+
const tx = new Transaction();
|
1342
|
+
builder.swap(tx, args, typeArguments);
|
1343
|
+
const inspectRes = await client.devInspectTransactionBlock({
|
1344
|
+
transactionBlock: tx,
|
1345
|
+
sender: ZERO_ADDRESS,
|
1346
|
+
});
|
1347
|
+
return (await getMoveCoder(client)).decodeDevInspectResult(inspectRes);
|
1348
|
+
}
|
1349
|
+
view.swap = swap;
|
1350
|
+
async function swapOrFill(client, args, typeArguments) {
|
1351
|
+
const tx = new Transaction();
|
1352
|
+
builder.swapOrFill(tx, args, typeArguments);
|
1353
|
+
const inspectRes = await client.devInspectTransactionBlock({
|
1354
|
+
transactionBlock: tx,
|
1355
|
+
sender: ZERO_ADDRESS,
|
1356
|
+
});
|
1357
|
+
return (await getMoveCoder(client)).decodeDevInspectResult(inspectRes);
|
1358
|
+
}
|
1359
|
+
view.swapOrFill = swapOrFill;
|
1360
|
+
async function toVec(client, args, typeArguments) {
|
1361
|
+
const tx = new Transaction();
|
1362
|
+
builder.toVec(tx, args, typeArguments);
|
1363
|
+
const inspectRes = await client.devInspectTransactionBlock({
|
1364
|
+
transactionBlock: tx,
|
1365
|
+
sender: ZERO_ADDRESS,
|
1366
|
+
});
|
1367
|
+
return (await getMoveCoder(client)).decodeDevInspectResult(inspectRes);
|
1368
|
+
}
|
1369
|
+
view.toVec = toVec;
|
1370
|
+
})(view = option.view || (option.view = {}));
|
94
1371
|
})(option || (option = {}));
|
95
1372
|
export class string_ extends SuiBaseProcessor {
|
96
1373
|
constructor(options) {
|
@@ -118,6 +1395,321 @@ export class string_ extends SuiBaseProcessor {
|
|
118
1395
|
}
|
119
1396
|
String.type = type;
|
120
1397
|
})(String = string_.String || (string_.String = {}));
|
1398
|
+
let builder;
|
1399
|
+
(function (builder) {
|
1400
|
+
function append(tx, args) {
|
1401
|
+
const _args = [];
|
1402
|
+
_args.push(transactionArgumentOrObject(args[0], tx));
|
1403
|
+
_args.push(transactionArgumentOrPure(args[1], tx));
|
1404
|
+
// @ts-ignore
|
1405
|
+
return tx.moveCall({
|
1406
|
+
target: "0x1::string::append",
|
1407
|
+
arguments: _args,
|
1408
|
+
});
|
1409
|
+
}
|
1410
|
+
builder.append = append;
|
1411
|
+
function appendUtf8(tx, args) {
|
1412
|
+
const _args = [];
|
1413
|
+
_args.push(transactionArgumentOrObject(args[0], tx));
|
1414
|
+
_args.push(transactionArgumentOrVec(args[1], tx));
|
1415
|
+
// @ts-ignore
|
1416
|
+
return tx.moveCall({
|
1417
|
+
target: "0x1::string::append_utf8",
|
1418
|
+
arguments: _args,
|
1419
|
+
});
|
1420
|
+
}
|
1421
|
+
builder.appendUtf8 = appendUtf8;
|
1422
|
+
function asBytes(tx, args) {
|
1423
|
+
const _args = [];
|
1424
|
+
_args.push(transactionArgumentOrObject(args[0], tx));
|
1425
|
+
// @ts-ignore
|
1426
|
+
return tx.moveCall({
|
1427
|
+
target: "0x1::string::as_bytes",
|
1428
|
+
arguments: _args,
|
1429
|
+
});
|
1430
|
+
}
|
1431
|
+
builder.asBytes = asBytes;
|
1432
|
+
function bytes(tx, args) {
|
1433
|
+
const _args = [];
|
1434
|
+
_args.push(transactionArgumentOrObject(args[0], tx));
|
1435
|
+
// @ts-ignore
|
1436
|
+
return tx.moveCall({
|
1437
|
+
target: "0x1::string::bytes",
|
1438
|
+
arguments: _args,
|
1439
|
+
});
|
1440
|
+
}
|
1441
|
+
builder.bytes = bytes;
|
1442
|
+
function fromAscii(tx, args) {
|
1443
|
+
const _args = [];
|
1444
|
+
_args.push(transactionArgumentOrPure(args[0], tx));
|
1445
|
+
// @ts-ignore
|
1446
|
+
return tx.moveCall({
|
1447
|
+
target: "0x1::string::from_ascii",
|
1448
|
+
arguments: _args,
|
1449
|
+
});
|
1450
|
+
}
|
1451
|
+
builder.fromAscii = fromAscii;
|
1452
|
+
function indexOf(tx, args) {
|
1453
|
+
const _args = [];
|
1454
|
+
_args.push(transactionArgumentOrObject(args[0], tx));
|
1455
|
+
_args.push(transactionArgumentOrObject(args[1], tx));
|
1456
|
+
// @ts-ignore
|
1457
|
+
return tx.moveCall({
|
1458
|
+
target: "0x1::string::index_of",
|
1459
|
+
arguments: _args,
|
1460
|
+
});
|
1461
|
+
}
|
1462
|
+
builder.indexOf = indexOf;
|
1463
|
+
function insert(tx, args) {
|
1464
|
+
const _args = [];
|
1465
|
+
_args.push(transactionArgumentOrObject(args[0], tx));
|
1466
|
+
_args.push(transactionArgumentOrPureU64(args[1], tx));
|
1467
|
+
_args.push(transactionArgumentOrPure(args[2], tx));
|
1468
|
+
// @ts-ignore
|
1469
|
+
return tx.moveCall({
|
1470
|
+
target: "0x1::string::insert",
|
1471
|
+
arguments: _args,
|
1472
|
+
});
|
1473
|
+
}
|
1474
|
+
builder.insert = insert;
|
1475
|
+
function intoBytes(tx, args) {
|
1476
|
+
const _args = [];
|
1477
|
+
_args.push(transactionArgumentOrPure(args[0], tx));
|
1478
|
+
// @ts-ignore
|
1479
|
+
return tx.moveCall({
|
1480
|
+
target: "0x1::string::into_bytes",
|
1481
|
+
arguments: _args,
|
1482
|
+
});
|
1483
|
+
}
|
1484
|
+
builder.intoBytes = intoBytes;
|
1485
|
+
function isEmpty(tx, args) {
|
1486
|
+
const _args = [];
|
1487
|
+
_args.push(transactionArgumentOrObject(args[0], tx));
|
1488
|
+
// @ts-ignore
|
1489
|
+
return tx.moveCall({
|
1490
|
+
target: "0x1::string::is_empty",
|
1491
|
+
arguments: _args,
|
1492
|
+
});
|
1493
|
+
}
|
1494
|
+
builder.isEmpty = isEmpty;
|
1495
|
+
function length(tx, args) {
|
1496
|
+
const _args = [];
|
1497
|
+
_args.push(transactionArgumentOrObject(args[0], tx));
|
1498
|
+
// @ts-ignore
|
1499
|
+
return tx.moveCall({
|
1500
|
+
target: "0x1::string::length",
|
1501
|
+
arguments: _args,
|
1502
|
+
});
|
1503
|
+
}
|
1504
|
+
builder.length = length;
|
1505
|
+
function subString(tx, args) {
|
1506
|
+
const _args = [];
|
1507
|
+
_args.push(transactionArgumentOrObject(args[0], tx));
|
1508
|
+
_args.push(transactionArgumentOrPureU64(args[1], tx));
|
1509
|
+
_args.push(transactionArgumentOrPureU64(args[2], tx));
|
1510
|
+
// @ts-ignore
|
1511
|
+
return tx.moveCall({
|
1512
|
+
target: "0x1::string::sub_string",
|
1513
|
+
arguments: _args,
|
1514
|
+
});
|
1515
|
+
}
|
1516
|
+
builder.subString = subString;
|
1517
|
+
function substring(tx, args) {
|
1518
|
+
const _args = [];
|
1519
|
+
_args.push(transactionArgumentOrObject(args[0], tx));
|
1520
|
+
_args.push(transactionArgumentOrPureU64(args[1], tx));
|
1521
|
+
_args.push(transactionArgumentOrPureU64(args[2], tx));
|
1522
|
+
// @ts-ignore
|
1523
|
+
return tx.moveCall({
|
1524
|
+
target: "0x1::string::substring",
|
1525
|
+
arguments: _args,
|
1526
|
+
});
|
1527
|
+
}
|
1528
|
+
builder.substring = substring;
|
1529
|
+
function toAscii(tx, args) {
|
1530
|
+
const _args = [];
|
1531
|
+
_args.push(transactionArgumentOrPure(args[0], tx));
|
1532
|
+
// @ts-ignore
|
1533
|
+
return tx.moveCall({
|
1534
|
+
target: "0x1::string::to_ascii",
|
1535
|
+
arguments: _args,
|
1536
|
+
});
|
1537
|
+
}
|
1538
|
+
builder.toAscii = toAscii;
|
1539
|
+
function tryUtf8(tx, args) {
|
1540
|
+
const _args = [];
|
1541
|
+
_args.push(transactionArgumentOrVec(args[0], tx));
|
1542
|
+
// @ts-ignore
|
1543
|
+
return tx.moveCall({
|
1544
|
+
target: "0x1::string::try_utf8",
|
1545
|
+
arguments: _args,
|
1546
|
+
});
|
1547
|
+
}
|
1548
|
+
builder.tryUtf8 = tryUtf8;
|
1549
|
+
function utf8(tx, args) {
|
1550
|
+
const _args = [];
|
1551
|
+
_args.push(transactionArgumentOrVec(args[0], tx));
|
1552
|
+
// @ts-ignore
|
1553
|
+
return tx.moveCall({
|
1554
|
+
target: "0x1::string::utf8",
|
1555
|
+
arguments: _args,
|
1556
|
+
});
|
1557
|
+
}
|
1558
|
+
builder.utf8 = utf8;
|
1559
|
+
})(builder = string_.builder || (string_.builder = {}));
|
1560
|
+
let view;
|
1561
|
+
(function (view) {
|
1562
|
+
async function append(client, args) {
|
1563
|
+
const tx = new Transaction();
|
1564
|
+
builder.append(tx, args);
|
1565
|
+
const inspectRes = await client.devInspectTransactionBlock({
|
1566
|
+
transactionBlock: tx,
|
1567
|
+
sender: ZERO_ADDRESS,
|
1568
|
+
});
|
1569
|
+
return (await getMoveCoder(client)).decodeDevInspectResult(inspectRes);
|
1570
|
+
}
|
1571
|
+
view.append = append;
|
1572
|
+
async function appendUtf8(client, args) {
|
1573
|
+
const tx = new Transaction();
|
1574
|
+
builder.appendUtf8(tx, args);
|
1575
|
+
const inspectRes = await client.devInspectTransactionBlock({
|
1576
|
+
transactionBlock: tx,
|
1577
|
+
sender: ZERO_ADDRESS,
|
1578
|
+
});
|
1579
|
+
return (await getMoveCoder(client)).decodeDevInspectResult(inspectRes);
|
1580
|
+
}
|
1581
|
+
view.appendUtf8 = appendUtf8;
|
1582
|
+
async function asBytes(client, args) {
|
1583
|
+
const tx = new Transaction();
|
1584
|
+
builder.asBytes(tx, args);
|
1585
|
+
const inspectRes = await client.devInspectTransactionBlock({
|
1586
|
+
transactionBlock: tx,
|
1587
|
+
sender: ZERO_ADDRESS,
|
1588
|
+
});
|
1589
|
+
return (await getMoveCoder(client)).decodeDevInspectResult(inspectRes);
|
1590
|
+
}
|
1591
|
+
view.asBytes = asBytes;
|
1592
|
+
async function bytes(client, args) {
|
1593
|
+
const tx = new Transaction();
|
1594
|
+
builder.bytes(tx, args);
|
1595
|
+
const inspectRes = await client.devInspectTransactionBlock({
|
1596
|
+
transactionBlock: tx,
|
1597
|
+
sender: ZERO_ADDRESS,
|
1598
|
+
});
|
1599
|
+
return (await getMoveCoder(client)).decodeDevInspectResult(inspectRes);
|
1600
|
+
}
|
1601
|
+
view.bytes = bytes;
|
1602
|
+
async function fromAscii(client, args) {
|
1603
|
+
const tx = new Transaction();
|
1604
|
+
builder.fromAscii(tx, args);
|
1605
|
+
const inspectRes = await client.devInspectTransactionBlock({
|
1606
|
+
transactionBlock: tx,
|
1607
|
+
sender: ZERO_ADDRESS,
|
1608
|
+
});
|
1609
|
+
return (await getMoveCoder(client)).decodeDevInspectResult(inspectRes);
|
1610
|
+
}
|
1611
|
+
view.fromAscii = fromAscii;
|
1612
|
+
async function indexOf(client, args) {
|
1613
|
+
const tx = new Transaction();
|
1614
|
+
builder.indexOf(tx, args);
|
1615
|
+
const inspectRes = await client.devInspectTransactionBlock({
|
1616
|
+
transactionBlock: tx,
|
1617
|
+
sender: ZERO_ADDRESS,
|
1618
|
+
});
|
1619
|
+
return (await getMoveCoder(client)).decodeDevInspectResult(inspectRes);
|
1620
|
+
}
|
1621
|
+
view.indexOf = indexOf;
|
1622
|
+
async function insert(client, args) {
|
1623
|
+
const tx = new Transaction();
|
1624
|
+
builder.insert(tx, args);
|
1625
|
+
const inspectRes = await client.devInspectTransactionBlock({
|
1626
|
+
transactionBlock: tx,
|
1627
|
+
sender: ZERO_ADDRESS,
|
1628
|
+
});
|
1629
|
+
return (await getMoveCoder(client)).decodeDevInspectResult(inspectRes);
|
1630
|
+
}
|
1631
|
+
view.insert = insert;
|
1632
|
+
async function intoBytes(client, args) {
|
1633
|
+
const tx = new Transaction();
|
1634
|
+
builder.intoBytes(tx, args);
|
1635
|
+
const inspectRes = await client.devInspectTransactionBlock({
|
1636
|
+
transactionBlock: tx,
|
1637
|
+
sender: ZERO_ADDRESS,
|
1638
|
+
});
|
1639
|
+
return (await getMoveCoder(client)).decodeDevInspectResult(inspectRes);
|
1640
|
+
}
|
1641
|
+
view.intoBytes = intoBytes;
|
1642
|
+
async function isEmpty(client, args) {
|
1643
|
+
const tx = new Transaction();
|
1644
|
+
builder.isEmpty(tx, args);
|
1645
|
+
const inspectRes = await client.devInspectTransactionBlock({
|
1646
|
+
transactionBlock: tx,
|
1647
|
+
sender: ZERO_ADDRESS,
|
1648
|
+
});
|
1649
|
+
return (await getMoveCoder(client)).decodeDevInspectResult(inspectRes);
|
1650
|
+
}
|
1651
|
+
view.isEmpty = isEmpty;
|
1652
|
+
async function length(client, args) {
|
1653
|
+
const tx = new Transaction();
|
1654
|
+
builder.length(tx, args);
|
1655
|
+
const inspectRes = await client.devInspectTransactionBlock({
|
1656
|
+
transactionBlock: tx,
|
1657
|
+
sender: ZERO_ADDRESS,
|
1658
|
+
});
|
1659
|
+
return (await getMoveCoder(client)).decodeDevInspectResult(inspectRes);
|
1660
|
+
}
|
1661
|
+
view.length = length;
|
1662
|
+
async function subString(client, args) {
|
1663
|
+
const tx = new Transaction();
|
1664
|
+
builder.subString(tx, args);
|
1665
|
+
const inspectRes = await client.devInspectTransactionBlock({
|
1666
|
+
transactionBlock: tx,
|
1667
|
+
sender: ZERO_ADDRESS,
|
1668
|
+
});
|
1669
|
+
return (await getMoveCoder(client)).decodeDevInspectResult(inspectRes);
|
1670
|
+
}
|
1671
|
+
view.subString = subString;
|
1672
|
+
async function substring(client, args) {
|
1673
|
+
const tx = new Transaction();
|
1674
|
+
builder.substring(tx, args);
|
1675
|
+
const inspectRes = await client.devInspectTransactionBlock({
|
1676
|
+
transactionBlock: tx,
|
1677
|
+
sender: ZERO_ADDRESS,
|
1678
|
+
});
|
1679
|
+
return (await getMoveCoder(client)).decodeDevInspectResult(inspectRes);
|
1680
|
+
}
|
1681
|
+
view.substring = substring;
|
1682
|
+
async function toAscii(client, args) {
|
1683
|
+
const tx = new Transaction();
|
1684
|
+
builder.toAscii(tx, args);
|
1685
|
+
const inspectRes = await client.devInspectTransactionBlock({
|
1686
|
+
transactionBlock: tx,
|
1687
|
+
sender: ZERO_ADDRESS,
|
1688
|
+
});
|
1689
|
+
return (await getMoveCoder(client)).decodeDevInspectResult(inspectRes);
|
1690
|
+
}
|
1691
|
+
view.toAscii = toAscii;
|
1692
|
+
async function tryUtf8(client, args) {
|
1693
|
+
const tx = new Transaction();
|
1694
|
+
builder.tryUtf8(tx, args);
|
1695
|
+
const inspectRes = await client.devInspectTransactionBlock({
|
1696
|
+
transactionBlock: tx,
|
1697
|
+
sender: ZERO_ADDRESS,
|
1698
|
+
});
|
1699
|
+
return (await getMoveCoder(client)).decodeDevInspectResult(inspectRes);
|
1700
|
+
}
|
1701
|
+
view.tryUtf8 = tryUtf8;
|
1702
|
+
async function utf8(client, args) {
|
1703
|
+
const tx = new Transaction();
|
1704
|
+
builder.utf8(tx, args);
|
1705
|
+
const inspectRes = await client.devInspectTransactionBlock({
|
1706
|
+
transactionBlock: tx,
|
1707
|
+
sender: ZERO_ADDRESS,
|
1708
|
+
});
|
1709
|
+
return (await getMoveCoder(client)).decodeDevInspectResult(inspectRes);
|
1710
|
+
}
|
1711
|
+
view.utf8 = utf8;
|
1712
|
+
})(view = string_.view || (string_.view = {}));
|
121
1713
|
})(string_ || (string_ = {}));
|
122
1714
|
export class type_name extends SuiBaseProcessor {
|
123
1715
|
constructor(options) {
|
@@ -145,7 +1737,1485 @@ export class type_name extends SuiBaseProcessor {
|
|
145
1737
|
}
|
146
1738
|
TypeName.type = type;
|
147
1739
|
})(TypeName = type_name.TypeName || (type_name.TypeName = {}));
|
1740
|
+
let builder;
|
1741
|
+
(function (builder) {
|
1742
|
+
function borrowString(tx, args) {
|
1743
|
+
const _args = [];
|
1744
|
+
_args.push(transactionArgumentOrObject(args[0], tx));
|
1745
|
+
// @ts-ignore
|
1746
|
+
return tx.moveCall({
|
1747
|
+
target: "0x1::type_name::borrow_string",
|
1748
|
+
arguments: _args,
|
1749
|
+
});
|
1750
|
+
}
|
1751
|
+
builder.borrowString = borrowString;
|
1752
|
+
function get(tx, args, typeArguments) {
|
1753
|
+
const _args = [];
|
1754
|
+
// @ts-ignore
|
1755
|
+
return tx.moveCall({
|
1756
|
+
target: "0x1::type_name::get",
|
1757
|
+
arguments: _args,
|
1758
|
+
typeArguments: [
|
1759
|
+
typeof typeArguments[0] === "string"
|
1760
|
+
? typeArguments[0]
|
1761
|
+
: typeArguments[0].getSignature(),
|
1762
|
+
],
|
1763
|
+
});
|
1764
|
+
}
|
1765
|
+
builder.get = get;
|
1766
|
+
function getAddress(tx, args) {
|
1767
|
+
const _args = [];
|
1768
|
+
_args.push(transactionArgumentOrObject(args[0], tx));
|
1769
|
+
// @ts-ignore
|
1770
|
+
return tx.moveCall({
|
1771
|
+
target: "0x1::type_name::get_address",
|
1772
|
+
arguments: _args,
|
1773
|
+
});
|
1774
|
+
}
|
1775
|
+
builder.getAddress = getAddress;
|
1776
|
+
function getModule(tx, args) {
|
1777
|
+
const _args = [];
|
1778
|
+
_args.push(transactionArgumentOrObject(args[0], tx));
|
1779
|
+
// @ts-ignore
|
1780
|
+
return tx.moveCall({
|
1781
|
+
target: "0x1::type_name::get_module",
|
1782
|
+
arguments: _args,
|
1783
|
+
});
|
1784
|
+
}
|
1785
|
+
builder.getModule = getModule;
|
1786
|
+
function getWithOriginalIds(tx, args, typeArguments) {
|
1787
|
+
const _args = [];
|
1788
|
+
// @ts-ignore
|
1789
|
+
return tx.moveCall({
|
1790
|
+
target: "0x1::type_name::get_with_original_ids",
|
1791
|
+
arguments: _args,
|
1792
|
+
typeArguments: [
|
1793
|
+
typeof typeArguments[0] === "string"
|
1794
|
+
? typeArguments[0]
|
1795
|
+
: typeArguments[0].getSignature(),
|
1796
|
+
],
|
1797
|
+
});
|
1798
|
+
}
|
1799
|
+
builder.getWithOriginalIds = getWithOriginalIds;
|
1800
|
+
function intoString(tx, args) {
|
1801
|
+
const _args = [];
|
1802
|
+
_args.push(transactionArgumentOrPure(args[0], tx));
|
1803
|
+
// @ts-ignore
|
1804
|
+
return tx.moveCall({
|
1805
|
+
target: "0x1::type_name::into_string",
|
1806
|
+
arguments: _args,
|
1807
|
+
});
|
1808
|
+
}
|
1809
|
+
builder.intoString = intoString;
|
1810
|
+
function isPrimitive(tx, args) {
|
1811
|
+
const _args = [];
|
1812
|
+
_args.push(transactionArgumentOrObject(args[0], tx));
|
1813
|
+
// @ts-ignore
|
1814
|
+
return tx.moveCall({
|
1815
|
+
target: "0x1::type_name::is_primitive",
|
1816
|
+
arguments: _args,
|
1817
|
+
});
|
1818
|
+
}
|
1819
|
+
builder.isPrimitive = isPrimitive;
|
1820
|
+
})(builder = type_name.builder || (type_name.builder = {}));
|
1821
|
+
let view;
|
1822
|
+
(function (view) {
|
1823
|
+
async function borrowString(client, args) {
|
1824
|
+
const tx = new Transaction();
|
1825
|
+
builder.borrowString(tx, args);
|
1826
|
+
const inspectRes = await client.devInspectTransactionBlock({
|
1827
|
+
transactionBlock: tx,
|
1828
|
+
sender: ZERO_ADDRESS,
|
1829
|
+
});
|
1830
|
+
return (await getMoveCoder(client)).decodeDevInspectResult(inspectRes);
|
1831
|
+
}
|
1832
|
+
view.borrowString = borrowString;
|
1833
|
+
async function get(client, args, typeArguments) {
|
1834
|
+
const tx = new Transaction();
|
1835
|
+
builder.get(tx, args, typeArguments);
|
1836
|
+
const inspectRes = await client.devInspectTransactionBlock({
|
1837
|
+
transactionBlock: tx,
|
1838
|
+
sender: ZERO_ADDRESS,
|
1839
|
+
});
|
1840
|
+
return (await getMoveCoder(client)).decodeDevInspectResult(inspectRes);
|
1841
|
+
}
|
1842
|
+
view.get = get;
|
1843
|
+
async function getAddress(client, args) {
|
1844
|
+
const tx = new Transaction();
|
1845
|
+
builder.getAddress(tx, args);
|
1846
|
+
const inspectRes = await client.devInspectTransactionBlock({
|
1847
|
+
transactionBlock: tx,
|
1848
|
+
sender: ZERO_ADDRESS,
|
1849
|
+
});
|
1850
|
+
return (await getMoveCoder(client)).decodeDevInspectResult(inspectRes);
|
1851
|
+
}
|
1852
|
+
view.getAddress = getAddress;
|
1853
|
+
async function getModule(client, args) {
|
1854
|
+
const tx = new Transaction();
|
1855
|
+
builder.getModule(tx, args);
|
1856
|
+
const inspectRes = await client.devInspectTransactionBlock({
|
1857
|
+
transactionBlock: tx,
|
1858
|
+
sender: ZERO_ADDRESS,
|
1859
|
+
});
|
1860
|
+
return (await getMoveCoder(client)).decodeDevInspectResult(inspectRes);
|
1861
|
+
}
|
1862
|
+
view.getModule = getModule;
|
1863
|
+
async function getWithOriginalIds(client, args, typeArguments) {
|
1864
|
+
const tx = new Transaction();
|
1865
|
+
builder.getWithOriginalIds(tx, args, typeArguments);
|
1866
|
+
const inspectRes = await client.devInspectTransactionBlock({
|
1867
|
+
transactionBlock: tx,
|
1868
|
+
sender: ZERO_ADDRESS,
|
1869
|
+
});
|
1870
|
+
return (await getMoveCoder(client)).decodeDevInspectResult(inspectRes);
|
1871
|
+
}
|
1872
|
+
view.getWithOriginalIds = getWithOriginalIds;
|
1873
|
+
async function intoString(client, args) {
|
1874
|
+
const tx = new Transaction();
|
1875
|
+
builder.intoString(tx, args);
|
1876
|
+
const inspectRes = await client.devInspectTransactionBlock({
|
1877
|
+
transactionBlock: tx,
|
1878
|
+
sender: ZERO_ADDRESS,
|
1879
|
+
});
|
1880
|
+
return (await getMoveCoder(client)).decodeDevInspectResult(inspectRes);
|
1881
|
+
}
|
1882
|
+
view.intoString = intoString;
|
1883
|
+
async function isPrimitive(client, args) {
|
1884
|
+
const tx = new Transaction();
|
1885
|
+
builder.isPrimitive(tx, args);
|
1886
|
+
const inspectRes = await client.devInspectTransactionBlock({
|
1887
|
+
transactionBlock: tx,
|
1888
|
+
sender: ZERO_ADDRESS,
|
1889
|
+
});
|
1890
|
+
return (await getMoveCoder(client)).decodeDevInspectResult(inspectRes);
|
1891
|
+
}
|
1892
|
+
view.isPrimitive = isPrimitive;
|
1893
|
+
})(view = type_name.view || (type_name.view = {}));
|
148
1894
|
})(type_name || (type_name = {}));
|
1895
|
+
export var u128;
|
1896
|
+
(function (u128) {
|
1897
|
+
let builder;
|
1898
|
+
(function (builder) {
|
1899
|
+
function bitwiseNot(tx, args) {
|
1900
|
+
const _args = [];
|
1901
|
+
_args.push(transactionArgumentOrPureU128(args[0], tx));
|
1902
|
+
// @ts-ignore
|
1903
|
+
return tx.moveCall({
|
1904
|
+
target: "0x1::u128::bitwise_not",
|
1905
|
+
arguments: _args,
|
1906
|
+
});
|
1907
|
+
}
|
1908
|
+
builder.bitwiseNot = bitwiseNot;
|
1909
|
+
function diff(tx, args) {
|
1910
|
+
const _args = [];
|
1911
|
+
_args.push(transactionArgumentOrPureU128(args[0], tx));
|
1912
|
+
_args.push(transactionArgumentOrPureU128(args[1], tx));
|
1913
|
+
// @ts-ignore
|
1914
|
+
return tx.moveCall({
|
1915
|
+
target: "0x1::u128::diff",
|
1916
|
+
arguments: _args,
|
1917
|
+
});
|
1918
|
+
}
|
1919
|
+
builder.diff = diff;
|
1920
|
+
function divideAndRoundUp(tx, args) {
|
1921
|
+
const _args = [];
|
1922
|
+
_args.push(transactionArgumentOrPureU128(args[0], tx));
|
1923
|
+
_args.push(transactionArgumentOrPureU128(args[1], tx));
|
1924
|
+
// @ts-ignore
|
1925
|
+
return tx.moveCall({
|
1926
|
+
target: "0x1::u128::divide_and_round_up",
|
1927
|
+
arguments: _args,
|
1928
|
+
});
|
1929
|
+
}
|
1930
|
+
builder.divideAndRoundUp = divideAndRoundUp;
|
1931
|
+
function max(tx, args) {
|
1932
|
+
const _args = [];
|
1933
|
+
_args.push(transactionArgumentOrPureU128(args[0], tx));
|
1934
|
+
_args.push(transactionArgumentOrPureU128(args[1], tx));
|
1935
|
+
// @ts-ignore
|
1936
|
+
return tx.moveCall({
|
1937
|
+
target: "0x1::u128::max",
|
1938
|
+
arguments: _args,
|
1939
|
+
});
|
1940
|
+
}
|
1941
|
+
builder.max = max;
|
1942
|
+
function min(tx, args) {
|
1943
|
+
const _args = [];
|
1944
|
+
_args.push(transactionArgumentOrPureU128(args[0], tx));
|
1945
|
+
_args.push(transactionArgumentOrPureU128(args[1], tx));
|
1946
|
+
// @ts-ignore
|
1947
|
+
return tx.moveCall({
|
1948
|
+
target: "0x1::u128::min",
|
1949
|
+
arguments: _args,
|
1950
|
+
});
|
1951
|
+
}
|
1952
|
+
builder.min = min;
|
1953
|
+
function pow(tx, args) {
|
1954
|
+
const _args = [];
|
1955
|
+
_args.push(transactionArgumentOrPureU128(args[0], tx));
|
1956
|
+
_args.push(transactionArgumentOrPureU8(args[1], tx));
|
1957
|
+
// @ts-ignore
|
1958
|
+
return tx.moveCall({
|
1959
|
+
target: "0x1::u128::pow",
|
1960
|
+
arguments: _args,
|
1961
|
+
});
|
1962
|
+
}
|
1963
|
+
builder.pow = pow;
|
1964
|
+
function sqrt(tx, args) {
|
1965
|
+
const _args = [];
|
1966
|
+
_args.push(transactionArgumentOrPureU128(args[0], tx));
|
1967
|
+
// @ts-ignore
|
1968
|
+
return tx.moveCall({
|
1969
|
+
target: "0x1::u128::sqrt",
|
1970
|
+
arguments: _args,
|
1971
|
+
});
|
1972
|
+
}
|
1973
|
+
builder.sqrt = sqrt;
|
1974
|
+
function toString(tx, args) {
|
1975
|
+
const _args = [];
|
1976
|
+
_args.push(transactionArgumentOrPureU128(args[0], tx));
|
1977
|
+
// @ts-ignore
|
1978
|
+
return tx.moveCall({
|
1979
|
+
target: "0x1::u128::to_string",
|
1980
|
+
arguments: _args,
|
1981
|
+
});
|
1982
|
+
}
|
1983
|
+
builder.toString = toString;
|
1984
|
+
function tryAsU16(tx, args) {
|
1985
|
+
const _args = [];
|
1986
|
+
_args.push(transactionArgumentOrPureU128(args[0], tx));
|
1987
|
+
// @ts-ignore
|
1988
|
+
return tx.moveCall({
|
1989
|
+
target: "0x1::u128::try_as_u16",
|
1990
|
+
arguments: _args,
|
1991
|
+
});
|
1992
|
+
}
|
1993
|
+
builder.tryAsU16 = tryAsU16;
|
1994
|
+
function tryAsU32(tx, args) {
|
1995
|
+
const _args = [];
|
1996
|
+
_args.push(transactionArgumentOrPureU128(args[0], tx));
|
1997
|
+
// @ts-ignore
|
1998
|
+
return tx.moveCall({
|
1999
|
+
target: "0x1::u128::try_as_u32",
|
2000
|
+
arguments: _args,
|
2001
|
+
});
|
2002
|
+
}
|
2003
|
+
builder.tryAsU32 = tryAsU32;
|
2004
|
+
function tryAsU64(tx, args) {
|
2005
|
+
const _args = [];
|
2006
|
+
_args.push(transactionArgumentOrPureU128(args[0], tx));
|
2007
|
+
// @ts-ignore
|
2008
|
+
return tx.moveCall({
|
2009
|
+
target: "0x1::u128::try_as_u64",
|
2010
|
+
arguments: _args,
|
2011
|
+
});
|
2012
|
+
}
|
2013
|
+
builder.tryAsU64 = tryAsU64;
|
2014
|
+
function tryAsU8(tx, args) {
|
2015
|
+
const _args = [];
|
2016
|
+
_args.push(transactionArgumentOrPureU128(args[0], tx));
|
2017
|
+
// @ts-ignore
|
2018
|
+
return tx.moveCall({
|
2019
|
+
target: "0x1::u128::try_as_u8",
|
2020
|
+
arguments: _args,
|
2021
|
+
});
|
2022
|
+
}
|
2023
|
+
builder.tryAsU8 = tryAsU8;
|
2024
|
+
})(builder = u128.builder || (u128.builder = {}));
|
2025
|
+
let view;
|
2026
|
+
(function (view) {
|
2027
|
+
async function bitwiseNot(client, args) {
|
2028
|
+
const tx = new Transaction();
|
2029
|
+
builder.bitwiseNot(tx, args);
|
2030
|
+
const inspectRes = await client.devInspectTransactionBlock({
|
2031
|
+
transactionBlock: tx,
|
2032
|
+
sender: ZERO_ADDRESS,
|
2033
|
+
});
|
2034
|
+
return (await getMoveCoder(client)).decodeDevInspectResult(inspectRes);
|
2035
|
+
}
|
2036
|
+
view.bitwiseNot = bitwiseNot;
|
2037
|
+
async function diff(client, args) {
|
2038
|
+
const tx = new Transaction();
|
2039
|
+
builder.diff(tx, args);
|
2040
|
+
const inspectRes = await client.devInspectTransactionBlock({
|
2041
|
+
transactionBlock: tx,
|
2042
|
+
sender: ZERO_ADDRESS,
|
2043
|
+
});
|
2044
|
+
return (await getMoveCoder(client)).decodeDevInspectResult(inspectRes);
|
2045
|
+
}
|
2046
|
+
view.diff = diff;
|
2047
|
+
async function divideAndRoundUp(client, args) {
|
2048
|
+
const tx = new Transaction();
|
2049
|
+
builder.divideAndRoundUp(tx, args);
|
2050
|
+
const inspectRes = await client.devInspectTransactionBlock({
|
2051
|
+
transactionBlock: tx,
|
2052
|
+
sender: ZERO_ADDRESS,
|
2053
|
+
});
|
2054
|
+
return (await getMoveCoder(client)).decodeDevInspectResult(inspectRes);
|
2055
|
+
}
|
2056
|
+
view.divideAndRoundUp = divideAndRoundUp;
|
2057
|
+
async function max(client, args) {
|
2058
|
+
const tx = new Transaction();
|
2059
|
+
builder.max(tx, args);
|
2060
|
+
const inspectRes = await client.devInspectTransactionBlock({
|
2061
|
+
transactionBlock: tx,
|
2062
|
+
sender: ZERO_ADDRESS,
|
2063
|
+
});
|
2064
|
+
return (await getMoveCoder(client)).decodeDevInspectResult(inspectRes);
|
2065
|
+
}
|
2066
|
+
view.max = max;
|
2067
|
+
async function min(client, args) {
|
2068
|
+
const tx = new Transaction();
|
2069
|
+
builder.min(tx, args);
|
2070
|
+
const inspectRes = await client.devInspectTransactionBlock({
|
2071
|
+
transactionBlock: tx,
|
2072
|
+
sender: ZERO_ADDRESS,
|
2073
|
+
});
|
2074
|
+
return (await getMoveCoder(client)).decodeDevInspectResult(inspectRes);
|
2075
|
+
}
|
2076
|
+
view.min = min;
|
2077
|
+
async function pow(client, args) {
|
2078
|
+
const tx = new Transaction();
|
2079
|
+
builder.pow(tx, args);
|
2080
|
+
const inspectRes = await client.devInspectTransactionBlock({
|
2081
|
+
transactionBlock: tx,
|
2082
|
+
sender: ZERO_ADDRESS,
|
2083
|
+
});
|
2084
|
+
return (await getMoveCoder(client)).decodeDevInspectResult(inspectRes);
|
2085
|
+
}
|
2086
|
+
view.pow = pow;
|
2087
|
+
async function sqrt(client, args) {
|
2088
|
+
const tx = new Transaction();
|
2089
|
+
builder.sqrt(tx, args);
|
2090
|
+
const inspectRes = await client.devInspectTransactionBlock({
|
2091
|
+
transactionBlock: tx,
|
2092
|
+
sender: ZERO_ADDRESS,
|
2093
|
+
});
|
2094
|
+
return (await getMoveCoder(client)).decodeDevInspectResult(inspectRes);
|
2095
|
+
}
|
2096
|
+
view.sqrt = sqrt;
|
2097
|
+
async function toString(client, args) {
|
2098
|
+
const tx = new Transaction();
|
2099
|
+
builder.toString(tx, args);
|
2100
|
+
const inspectRes = await client.devInspectTransactionBlock({
|
2101
|
+
transactionBlock: tx,
|
2102
|
+
sender: ZERO_ADDRESS,
|
2103
|
+
});
|
2104
|
+
return (await getMoveCoder(client)).decodeDevInspectResult(inspectRes);
|
2105
|
+
}
|
2106
|
+
view.toString = toString;
|
2107
|
+
async function tryAsU16(client, args) {
|
2108
|
+
const tx = new Transaction();
|
2109
|
+
builder.tryAsU16(tx, args);
|
2110
|
+
const inspectRes = await client.devInspectTransactionBlock({
|
2111
|
+
transactionBlock: tx,
|
2112
|
+
sender: ZERO_ADDRESS,
|
2113
|
+
});
|
2114
|
+
return (await getMoveCoder(client)).decodeDevInspectResult(inspectRes);
|
2115
|
+
}
|
2116
|
+
view.tryAsU16 = tryAsU16;
|
2117
|
+
async function tryAsU32(client, args) {
|
2118
|
+
const tx = new Transaction();
|
2119
|
+
builder.tryAsU32(tx, args);
|
2120
|
+
const inspectRes = await client.devInspectTransactionBlock({
|
2121
|
+
transactionBlock: tx,
|
2122
|
+
sender: ZERO_ADDRESS,
|
2123
|
+
});
|
2124
|
+
return (await getMoveCoder(client)).decodeDevInspectResult(inspectRes);
|
2125
|
+
}
|
2126
|
+
view.tryAsU32 = tryAsU32;
|
2127
|
+
async function tryAsU64(client, args) {
|
2128
|
+
const tx = new Transaction();
|
2129
|
+
builder.tryAsU64(tx, args);
|
2130
|
+
const inspectRes = await client.devInspectTransactionBlock({
|
2131
|
+
transactionBlock: tx,
|
2132
|
+
sender: ZERO_ADDRESS,
|
2133
|
+
});
|
2134
|
+
return (await getMoveCoder(client)).decodeDevInspectResult(inspectRes);
|
2135
|
+
}
|
2136
|
+
view.tryAsU64 = tryAsU64;
|
2137
|
+
async function tryAsU8(client, args) {
|
2138
|
+
const tx = new Transaction();
|
2139
|
+
builder.tryAsU8(tx, args);
|
2140
|
+
const inspectRes = await client.devInspectTransactionBlock({
|
2141
|
+
transactionBlock: tx,
|
2142
|
+
sender: ZERO_ADDRESS,
|
2143
|
+
});
|
2144
|
+
return (await getMoveCoder(client)).decodeDevInspectResult(inspectRes);
|
2145
|
+
}
|
2146
|
+
view.tryAsU8 = tryAsU8;
|
2147
|
+
})(view = u128.view || (u128.view = {}));
|
2148
|
+
})(u128 || (u128 = {}));
|
2149
|
+
export var u16;
|
2150
|
+
(function (u16) {
|
2151
|
+
let builder;
|
2152
|
+
(function (builder) {
|
2153
|
+
function bitwiseNot(tx, args) {
|
2154
|
+
const _args = [];
|
2155
|
+
_args.push(transactionArgumentOrPureU16(args[0], tx));
|
2156
|
+
// @ts-ignore
|
2157
|
+
return tx.moveCall({
|
2158
|
+
target: "0x1::u16::bitwise_not",
|
2159
|
+
arguments: _args,
|
2160
|
+
});
|
2161
|
+
}
|
2162
|
+
builder.bitwiseNot = bitwiseNot;
|
2163
|
+
function diff(tx, args) {
|
2164
|
+
const _args = [];
|
2165
|
+
_args.push(transactionArgumentOrPureU16(args[0], tx));
|
2166
|
+
_args.push(transactionArgumentOrPureU16(args[1], tx));
|
2167
|
+
// @ts-ignore
|
2168
|
+
return tx.moveCall({
|
2169
|
+
target: "0x1::u16::diff",
|
2170
|
+
arguments: _args,
|
2171
|
+
});
|
2172
|
+
}
|
2173
|
+
builder.diff = diff;
|
2174
|
+
function divideAndRoundUp(tx, args) {
|
2175
|
+
const _args = [];
|
2176
|
+
_args.push(transactionArgumentOrPureU16(args[0], tx));
|
2177
|
+
_args.push(transactionArgumentOrPureU16(args[1], tx));
|
2178
|
+
// @ts-ignore
|
2179
|
+
return tx.moveCall({
|
2180
|
+
target: "0x1::u16::divide_and_round_up",
|
2181
|
+
arguments: _args,
|
2182
|
+
});
|
2183
|
+
}
|
2184
|
+
builder.divideAndRoundUp = divideAndRoundUp;
|
2185
|
+
function max(tx, args) {
|
2186
|
+
const _args = [];
|
2187
|
+
_args.push(transactionArgumentOrPureU16(args[0], tx));
|
2188
|
+
_args.push(transactionArgumentOrPureU16(args[1], tx));
|
2189
|
+
// @ts-ignore
|
2190
|
+
return tx.moveCall({
|
2191
|
+
target: "0x1::u16::max",
|
2192
|
+
arguments: _args,
|
2193
|
+
});
|
2194
|
+
}
|
2195
|
+
builder.max = max;
|
2196
|
+
function min(tx, args) {
|
2197
|
+
const _args = [];
|
2198
|
+
_args.push(transactionArgumentOrPureU16(args[0], tx));
|
2199
|
+
_args.push(transactionArgumentOrPureU16(args[1], tx));
|
2200
|
+
// @ts-ignore
|
2201
|
+
return tx.moveCall({
|
2202
|
+
target: "0x1::u16::min",
|
2203
|
+
arguments: _args,
|
2204
|
+
});
|
2205
|
+
}
|
2206
|
+
builder.min = min;
|
2207
|
+
function pow(tx, args) {
|
2208
|
+
const _args = [];
|
2209
|
+
_args.push(transactionArgumentOrPureU16(args[0], tx));
|
2210
|
+
_args.push(transactionArgumentOrPureU8(args[1], tx));
|
2211
|
+
// @ts-ignore
|
2212
|
+
return tx.moveCall({
|
2213
|
+
target: "0x1::u16::pow",
|
2214
|
+
arguments: _args,
|
2215
|
+
});
|
2216
|
+
}
|
2217
|
+
builder.pow = pow;
|
2218
|
+
function sqrt(tx, args) {
|
2219
|
+
const _args = [];
|
2220
|
+
_args.push(transactionArgumentOrPureU16(args[0], tx));
|
2221
|
+
// @ts-ignore
|
2222
|
+
return tx.moveCall({
|
2223
|
+
target: "0x1::u16::sqrt",
|
2224
|
+
arguments: _args,
|
2225
|
+
});
|
2226
|
+
}
|
2227
|
+
builder.sqrt = sqrt;
|
2228
|
+
function toString(tx, args) {
|
2229
|
+
const _args = [];
|
2230
|
+
_args.push(transactionArgumentOrPureU16(args[0], tx));
|
2231
|
+
// @ts-ignore
|
2232
|
+
return tx.moveCall({
|
2233
|
+
target: "0x1::u16::to_string",
|
2234
|
+
arguments: _args,
|
2235
|
+
});
|
2236
|
+
}
|
2237
|
+
builder.toString = toString;
|
2238
|
+
function tryAsU8(tx, args) {
|
2239
|
+
const _args = [];
|
2240
|
+
_args.push(transactionArgumentOrPureU16(args[0], tx));
|
2241
|
+
// @ts-ignore
|
2242
|
+
return tx.moveCall({
|
2243
|
+
target: "0x1::u16::try_as_u8",
|
2244
|
+
arguments: _args,
|
2245
|
+
});
|
2246
|
+
}
|
2247
|
+
builder.tryAsU8 = tryAsU8;
|
2248
|
+
})(builder = u16.builder || (u16.builder = {}));
|
2249
|
+
let view;
|
2250
|
+
(function (view) {
|
2251
|
+
async function bitwiseNot(client, args) {
|
2252
|
+
const tx = new Transaction();
|
2253
|
+
builder.bitwiseNot(tx, args);
|
2254
|
+
const inspectRes = await client.devInspectTransactionBlock({
|
2255
|
+
transactionBlock: tx,
|
2256
|
+
sender: ZERO_ADDRESS,
|
2257
|
+
});
|
2258
|
+
return (await getMoveCoder(client)).decodeDevInspectResult(inspectRes);
|
2259
|
+
}
|
2260
|
+
view.bitwiseNot = bitwiseNot;
|
2261
|
+
async function diff(client, args) {
|
2262
|
+
const tx = new Transaction();
|
2263
|
+
builder.diff(tx, args);
|
2264
|
+
const inspectRes = await client.devInspectTransactionBlock({
|
2265
|
+
transactionBlock: tx,
|
2266
|
+
sender: ZERO_ADDRESS,
|
2267
|
+
});
|
2268
|
+
return (await getMoveCoder(client)).decodeDevInspectResult(inspectRes);
|
2269
|
+
}
|
2270
|
+
view.diff = diff;
|
2271
|
+
async function divideAndRoundUp(client, args) {
|
2272
|
+
const tx = new Transaction();
|
2273
|
+
builder.divideAndRoundUp(tx, args);
|
2274
|
+
const inspectRes = await client.devInspectTransactionBlock({
|
2275
|
+
transactionBlock: tx,
|
2276
|
+
sender: ZERO_ADDRESS,
|
2277
|
+
});
|
2278
|
+
return (await getMoveCoder(client)).decodeDevInspectResult(inspectRes);
|
2279
|
+
}
|
2280
|
+
view.divideAndRoundUp = divideAndRoundUp;
|
2281
|
+
async function max(client, args) {
|
2282
|
+
const tx = new Transaction();
|
2283
|
+
builder.max(tx, args);
|
2284
|
+
const inspectRes = await client.devInspectTransactionBlock({
|
2285
|
+
transactionBlock: tx,
|
2286
|
+
sender: ZERO_ADDRESS,
|
2287
|
+
});
|
2288
|
+
return (await getMoveCoder(client)).decodeDevInspectResult(inspectRes);
|
2289
|
+
}
|
2290
|
+
view.max = max;
|
2291
|
+
async function min(client, args) {
|
2292
|
+
const tx = new Transaction();
|
2293
|
+
builder.min(tx, args);
|
2294
|
+
const inspectRes = await client.devInspectTransactionBlock({
|
2295
|
+
transactionBlock: tx,
|
2296
|
+
sender: ZERO_ADDRESS,
|
2297
|
+
});
|
2298
|
+
return (await getMoveCoder(client)).decodeDevInspectResult(inspectRes);
|
2299
|
+
}
|
2300
|
+
view.min = min;
|
2301
|
+
async function pow(client, args) {
|
2302
|
+
const tx = new Transaction();
|
2303
|
+
builder.pow(tx, args);
|
2304
|
+
const inspectRes = await client.devInspectTransactionBlock({
|
2305
|
+
transactionBlock: tx,
|
2306
|
+
sender: ZERO_ADDRESS,
|
2307
|
+
});
|
2308
|
+
return (await getMoveCoder(client)).decodeDevInspectResult(inspectRes);
|
2309
|
+
}
|
2310
|
+
view.pow = pow;
|
2311
|
+
async function sqrt(client, args) {
|
2312
|
+
const tx = new Transaction();
|
2313
|
+
builder.sqrt(tx, args);
|
2314
|
+
const inspectRes = await client.devInspectTransactionBlock({
|
2315
|
+
transactionBlock: tx,
|
2316
|
+
sender: ZERO_ADDRESS,
|
2317
|
+
});
|
2318
|
+
return (await getMoveCoder(client)).decodeDevInspectResult(inspectRes);
|
2319
|
+
}
|
2320
|
+
view.sqrt = sqrt;
|
2321
|
+
async function toString(client, args) {
|
2322
|
+
const tx = new Transaction();
|
2323
|
+
builder.toString(tx, args);
|
2324
|
+
const inspectRes = await client.devInspectTransactionBlock({
|
2325
|
+
transactionBlock: tx,
|
2326
|
+
sender: ZERO_ADDRESS,
|
2327
|
+
});
|
2328
|
+
return (await getMoveCoder(client)).decodeDevInspectResult(inspectRes);
|
2329
|
+
}
|
2330
|
+
view.toString = toString;
|
2331
|
+
async function tryAsU8(client, args) {
|
2332
|
+
const tx = new Transaction();
|
2333
|
+
builder.tryAsU8(tx, args);
|
2334
|
+
const inspectRes = await client.devInspectTransactionBlock({
|
2335
|
+
transactionBlock: tx,
|
2336
|
+
sender: ZERO_ADDRESS,
|
2337
|
+
});
|
2338
|
+
return (await getMoveCoder(client)).decodeDevInspectResult(inspectRes);
|
2339
|
+
}
|
2340
|
+
view.tryAsU8 = tryAsU8;
|
2341
|
+
})(view = u16.view || (u16.view = {}));
|
2342
|
+
})(u16 || (u16 = {}));
|
2343
|
+
export var u256;
|
2344
|
+
(function (u256) {
|
2345
|
+
let builder;
|
2346
|
+
(function (builder) {
|
2347
|
+
function bitwiseNot(tx, args) {
|
2348
|
+
const _args = [];
|
2349
|
+
_args.push(transactionArgumentOrPureU256(args[0], tx));
|
2350
|
+
// @ts-ignore
|
2351
|
+
return tx.moveCall({
|
2352
|
+
target: "0x1::u256::bitwise_not",
|
2353
|
+
arguments: _args,
|
2354
|
+
});
|
2355
|
+
}
|
2356
|
+
builder.bitwiseNot = bitwiseNot;
|
2357
|
+
function diff(tx, args) {
|
2358
|
+
const _args = [];
|
2359
|
+
_args.push(transactionArgumentOrPureU256(args[0], tx));
|
2360
|
+
_args.push(transactionArgumentOrPureU256(args[1], tx));
|
2361
|
+
// @ts-ignore
|
2362
|
+
return tx.moveCall({
|
2363
|
+
target: "0x1::u256::diff",
|
2364
|
+
arguments: _args,
|
2365
|
+
});
|
2366
|
+
}
|
2367
|
+
builder.diff = diff;
|
2368
|
+
function divideAndRoundUp(tx, args) {
|
2369
|
+
const _args = [];
|
2370
|
+
_args.push(transactionArgumentOrPureU256(args[0], tx));
|
2371
|
+
_args.push(transactionArgumentOrPureU256(args[1], tx));
|
2372
|
+
// @ts-ignore
|
2373
|
+
return tx.moveCall({
|
2374
|
+
target: "0x1::u256::divide_and_round_up",
|
2375
|
+
arguments: _args,
|
2376
|
+
});
|
2377
|
+
}
|
2378
|
+
builder.divideAndRoundUp = divideAndRoundUp;
|
2379
|
+
function max(tx, args) {
|
2380
|
+
const _args = [];
|
2381
|
+
_args.push(transactionArgumentOrPureU256(args[0], tx));
|
2382
|
+
_args.push(transactionArgumentOrPureU256(args[1], tx));
|
2383
|
+
// @ts-ignore
|
2384
|
+
return tx.moveCall({
|
2385
|
+
target: "0x1::u256::max",
|
2386
|
+
arguments: _args,
|
2387
|
+
});
|
2388
|
+
}
|
2389
|
+
builder.max = max;
|
2390
|
+
function min(tx, args) {
|
2391
|
+
const _args = [];
|
2392
|
+
_args.push(transactionArgumentOrPureU256(args[0], tx));
|
2393
|
+
_args.push(transactionArgumentOrPureU256(args[1], tx));
|
2394
|
+
// @ts-ignore
|
2395
|
+
return tx.moveCall({
|
2396
|
+
target: "0x1::u256::min",
|
2397
|
+
arguments: _args,
|
2398
|
+
});
|
2399
|
+
}
|
2400
|
+
builder.min = min;
|
2401
|
+
function pow(tx, args) {
|
2402
|
+
const _args = [];
|
2403
|
+
_args.push(transactionArgumentOrPureU256(args[0], tx));
|
2404
|
+
_args.push(transactionArgumentOrPureU8(args[1], tx));
|
2405
|
+
// @ts-ignore
|
2406
|
+
return tx.moveCall({
|
2407
|
+
target: "0x1::u256::pow",
|
2408
|
+
arguments: _args,
|
2409
|
+
});
|
2410
|
+
}
|
2411
|
+
builder.pow = pow;
|
2412
|
+
function toString(tx, args) {
|
2413
|
+
const _args = [];
|
2414
|
+
_args.push(transactionArgumentOrPureU256(args[0], tx));
|
2415
|
+
// @ts-ignore
|
2416
|
+
return tx.moveCall({
|
2417
|
+
target: "0x1::u256::to_string",
|
2418
|
+
arguments: _args,
|
2419
|
+
});
|
2420
|
+
}
|
2421
|
+
builder.toString = toString;
|
2422
|
+
function tryAsU128(tx, args) {
|
2423
|
+
const _args = [];
|
2424
|
+
_args.push(transactionArgumentOrPureU256(args[0], tx));
|
2425
|
+
// @ts-ignore
|
2426
|
+
return tx.moveCall({
|
2427
|
+
target: "0x1::u256::try_as_u128",
|
2428
|
+
arguments: _args,
|
2429
|
+
});
|
2430
|
+
}
|
2431
|
+
builder.tryAsU128 = tryAsU128;
|
2432
|
+
function tryAsU16(tx, args) {
|
2433
|
+
const _args = [];
|
2434
|
+
_args.push(transactionArgumentOrPureU256(args[0], tx));
|
2435
|
+
// @ts-ignore
|
2436
|
+
return tx.moveCall({
|
2437
|
+
target: "0x1::u256::try_as_u16",
|
2438
|
+
arguments: _args,
|
2439
|
+
});
|
2440
|
+
}
|
2441
|
+
builder.tryAsU16 = tryAsU16;
|
2442
|
+
function tryAsU32(tx, args) {
|
2443
|
+
const _args = [];
|
2444
|
+
_args.push(transactionArgumentOrPureU256(args[0], tx));
|
2445
|
+
// @ts-ignore
|
2446
|
+
return tx.moveCall({
|
2447
|
+
target: "0x1::u256::try_as_u32",
|
2448
|
+
arguments: _args,
|
2449
|
+
});
|
2450
|
+
}
|
2451
|
+
builder.tryAsU32 = tryAsU32;
|
2452
|
+
function tryAsU64(tx, args) {
|
2453
|
+
const _args = [];
|
2454
|
+
_args.push(transactionArgumentOrPureU256(args[0], tx));
|
2455
|
+
// @ts-ignore
|
2456
|
+
return tx.moveCall({
|
2457
|
+
target: "0x1::u256::try_as_u64",
|
2458
|
+
arguments: _args,
|
2459
|
+
});
|
2460
|
+
}
|
2461
|
+
builder.tryAsU64 = tryAsU64;
|
2462
|
+
function tryAsU8(tx, args) {
|
2463
|
+
const _args = [];
|
2464
|
+
_args.push(transactionArgumentOrPureU256(args[0], tx));
|
2465
|
+
// @ts-ignore
|
2466
|
+
return tx.moveCall({
|
2467
|
+
target: "0x1::u256::try_as_u8",
|
2468
|
+
arguments: _args,
|
2469
|
+
});
|
2470
|
+
}
|
2471
|
+
builder.tryAsU8 = tryAsU8;
|
2472
|
+
})(builder = u256.builder || (u256.builder = {}));
|
2473
|
+
let view;
|
2474
|
+
(function (view) {
|
2475
|
+
async function bitwiseNot(client, args) {
|
2476
|
+
const tx = new Transaction();
|
2477
|
+
builder.bitwiseNot(tx, args);
|
2478
|
+
const inspectRes = await client.devInspectTransactionBlock({
|
2479
|
+
transactionBlock: tx,
|
2480
|
+
sender: ZERO_ADDRESS,
|
2481
|
+
});
|
2482
|
+
return (await getMoveCoder(client)).decodeDevInspectResult(inspectRes);
|
2483
|
+
}
|
2484
|
+
view.bitwiseNot = bitwiseNot;
|
2485
|
+
async function diff(client, args) {
|
2486
|
+
const tx = new Transaction();
|
2487
|
+
builder.diff(tx, args);
|
2488
|
+
const inspectRes = await client.devInspectTransactionBlock({
|
2489
|
+
transactionBlock: tx,
|
2490
|
+
sender: ZERO_ADDRESS,
|
2491
|
+
});
|
2492
|
+
return (await getMoveCoder(client)).decodeDevInspectResult(inspectRes);
|
2493
|
+
}
|
2494
|
+
view.diff = diff;
|
2495
|
+
async function divideAndRoundUp(client, args) {
|
2496
|
+
const tx = new Transaction();
|
2497
|
+
builder.divideAndRoundUp(tx, args);
|
2498
|
+
const inspectRes = await client.devInspectTransactionBlock({
|
2499
|
+
transactionBlock: tx,
|
2500
|
+
sender: ZERO_ADDRESS,
|
2501
|
+
});
|
2502
|
+
return (await getMoveCoder(client)).decodeDevInspectResult(inspectRes);
|
2503
|
+
}
|
2504
|
+
view.divideAndRoundUp = divideAndRoundUp;
|
2505
|
+
async function max(client, args) {
|
2506
|
+
const tx = new Transaction();
|
2507
|
+
builder.max(tx, args);
|
2508
|
+
const inspectRes = await client.devInspectTransactionBlock({
|
2509
|
+
transactionBlock: tx,
|
2510
|
+
sender: ZERO_ADDRESS,
|
2511
|
+
});
|
2512
|
+
return (await getMoveCoder(client)).decodeDevInspectResult(inspectRes);
|
2513
|
+
}
|
2514
|
+
view.max = max;
|
2515
|
+
async function min(client, args) {
|
2516
|
+
const tx = new Transaction();
|
2517
|
+
builder.min(tx, args);
|
2518
|
+
const inspectRes = await client.devInspectTransactionBlock({
|
2519
|
+
transactionBlock: tx,
|
2520
|
+
sender: ZERO_ADDRESS,
|
2521
|
+
});
|
2522
|
+
return (await getMoveCoder(client)).decodeDevInspectResult(inspectRes);
|
2523
|
+
}
|
2524
|
+
view.min = min;
|
2525
|
+
async function pow(client, args) {
|
2526
|
+
const tx = new Transaction();
|
2527
|
+
builder.pow(tx, args);
|
2528
|
+
const inspectRes = await client.devInspectTransactionBlock({
|
2529
|
+
transactionBlock: tx,
|
2530
|
+
sender: ZERO_ADDRESS,
|
2531
|
+
});
|
2532
|
+
return (await getMoveCoder(client)).decodeDevInspectResult(inspectRes);
|
2533
|
+
}
|
2534
|
+
view.pow = pow;
|
2535
|
+
async function toString(client, args) {
|
2536
|
+
const tx = new Transaction();
|
2537
|
+
builder.toString(tx, args);
|
2538
|
+
const inspectRes = await client.devInspectTransactionBlock({
|
2539
|
+
transactionBlock: tx,
|
2540
|
+
sender: ZERO_ADDRESS,
|
2541
|
+
});
|
2542
|
+
return (await getMoveCoder(client)).decodeDevInspectResult(inspectRes);
|
2543
|
+
}
|
2544
|
+
view.toString = toString;
|
2545
|
+
async function tryAsU128(client, args) {
|
2546
|
+
const tx = new Transaction();
|
2547
|
+
builder.tryAsU128(tx, args);
|
2548
|
+
const inspectRes = await client.devInspectTransactionBlock({
|
2549
|
+
transactionBlock: tx,
|
2550
|
+
sender: ZERO_ADDRESS,
|
2551
|
+
});
|
2552
|
+
return (await getMoveCoder(client)).decodeDevInspectResult(inspectRes);
|
2553
|
+
}
|
2554
|
+
view.tryAsU128 = tryAsU128;
|
2555
|
+
async function tryAsU16(client, args) {
|
2556
|
+
const tx = new Transaction();
|
2557
|
+
builder.tryAsU16(tx, args);
|
2558
|
+
const inspectRes = await client.devInspectTransactionBlock({
|
2559
|
+
transactionBlock: tx,
|
2560
|
+
sender: ZERO_ADDRESS,
|
2561
|
+
});
|
2562
|
+
return (await getMoveCoder(client)).decodeDevInspectResult(inspectRes);
|
2563
|
+
}
|
2564
|
+
view.tryAsU16 = tryAsU16;
|
2565
|
+
async function tryAsU32(client, args) {
|
2566
|
+
const tx = new Transaction();
|
2567
|
+
builder.tryAsU32(tx, args);
|
2568
|
+
const inspectRes = await client.devInspectTransactionBlock({
|
2569
|
+
transactionBlock: tx,
|
2570
|
+
sender: ZERO_ADDRESS,
|
2571
|
+
});
|
2572
|
+
return (await getMoveCoder(client)).decodeDevInspectResult(inspectRes);
|
2573
|
+
}
|
2574
|
+
view.tryAsU32 = tryAsU32;
|
2575
|
+
async function tryAsU64(client, args) {
|
2576
|
+
const tx = new Transaction();
|
2577
|
+
builder.tryAsU64(tx, args);
|
2578
|
+
const inspectRes = await client.devInspectTransactionBlock({
|
2579
|
+
transactionBlock: tx,
|
2580
|
+
sender: ZERO_ADDRESS,
|
2581
|
+
});
|
2582
|
+
return (await getMoveCoder(client)).decodeDevInspectResult(inspectRes);
|
2583
|
+
}
|
2584
|
+
view.tryAsU64 = tryAsU64;
|
2585
|
+
async function tryAsU8(client, args) {
|
2586
|
+
const tx = new Transaction();
|
2587
|
+
builder.tryAsU8(tx, args);
|
2588
|
+
const inspectRes = await client.devInspectTransactionBlock({
|
2589
|
+
transactionBlock: tx,
|
2590
|
+
sender: ZERO_ADDRESS,
|
2591
|
+
});
|
2592
|
+
return (await getMoveCoder(client)).decodeDevInspectResult(inspectRes);
|
2593
|
+
}
|
2594
|
+
view.tryAsU8 = tryAsU8;
|
2595
|
+
})(view = u256.view || (u256.view = {}));
|
2596
|
+
})(u256 || (u256 = {}));
|
2597
|
+
export var u32;
|
2598
|
+
(function (u32) {
|
2599
|
+
let builder;
|
2600
|
+
(function (builder) {
|
2601
|
+
function bitwiseNot(tx, args) {
|
2602
|
+
const _args = [];
|
2603
|
+
_args.push(transactionArgumentOrPureU32(args[0], tx));
|
2604
|
+
// @ts-ignore
|
2605
|
+
return tx.moveCall({
|
2606
|
+
target: "0x1::u32::bitwise_not",
|
2607
|
+
arguments: _args,
|
2608
|
+
});
|
2609
|
+
}
|
2610
|
+
builder.bitwiseNot = bitwiseNot;
|
2611
|
+
function diff(tx, args) {
|
2612
|
+
const _args = [];
|
2613
|
+
_args.push(transactionArgumentOrPureU32(args[0], tx));
|
2614
|
+
_args.push(transactionArgumentOrPureU32(args[1], tx));
|
2615
|
+
// @ts-ignore
|
2616
|
+
return tx.moveCall({
|
2617
|
+
target: "0x1::u32::diff",
|
2618
|
+
arguments: _args,
|
2619
|
+
});
|
2620
|
+
}
|
2621
|
+
builder.diff = diff;
|
2622
|
+
function divideAndRoundUp(tx, args) {
|
2623
|
+
const _args = [];
|
2624
|
+
_args.push(transactionArgumentOrPureU32(args[0], tx));
|
2625
|
+
_args.push(transactionArgumentOrPureU32(args[1], tx));
|
2626
|
+
// @ts-ignore
|
2627
|
+
return tx.moveCall({
|
2628
|
+
target: "0x1::u32::divide_and_round_up",
|
2629
|
+
arguments: _args,
|
2630
|
+
});
|
2631
|
+
}
|
2632
|
+
builder.divideAndRoundUp = divideAndRoundUp;
|
2633
|
+
function max(tx, args) {
|
2634
|
+
const _args = [];
|
2635
|
+
_args.push(transactionArgumentOrPureU32(args[0], tx));
|
2636
|
+
_args.push(transactionArgumentOrPureU32(args[1], tx));
|
2637
|
+
// @ts-ignore
|
2638
|
+
return tx.moveCall({
|
2639
|
+
target: "0x1::u32::max",
|
2640
|
+
arguments: _args,
|
2641
|
+
});
|
2642
|
+
}
|
2643
|
+
builder.max = max;
|
2644
|
+
function min(tx, args) {
|
2645
|
+
const _args = [];
|
2646
|
+
_args.push(transactionArgumentOrPureU32(args[0], tx));
|
2647
|
+
_args.push(transactionArgumentOrPureU32(args[1], tx));
|
2648
|
+
// @ts-ignore
|
2649
|
+
return tx.moveCall({
|
2650
|
+
target: "0x1::u32::min",
|
2651
|
+
arguments: _args,
|
2652
|
+
});
|
2653
|
+
}
|
2654
|
+
builder.min = min;
|
2655
|
+
function pow(tx, args) {
|
2656
|
+
const _args = [];
|
2657
|
+
_args.push(transactionArgumentOrPureU32(args[0], tx));
|
2658
|
+
_args.push(transactionArgumentOrPureU8(args[1], tx));
|
2659
|
+
// @ts-ignore
|
2660
|
+
return tx.moveCall({
|
2661
|
+
target: "0x1::u32::pow",
|
2662
|
+
arguments: _args,
|
2663
|
+
});
|
2664
|
+
}
|
2665
|
+
builder.pow = pow;
|
2666
|
+
function sqrt(tx, args) {
|
2667
|
+
const _args = [];
|
2668
|
+
_args.push(transactionArgumentOrPureU32(args[0], tx));
|
2669
|
+
// @ts-ignore
|
2670
|
+
return tx.moveCall({
|
2671
|
+
target: "0x1::u32::sqrt",
|
2672
|
+
arguments: _args,
|
2673
|
+
});
|
2674
|
+
}
|
2675
|
+
builder.sqrt = sqrt;
|
2676
|
+
function toString(tx, args) {
|
2677
|
+
const _args = [];
|
2678
|
+
_args.push(transactionArgumentOrPureU32(args[0], tx));
|
2679
|
+
// @ts-ignore
|
2680
|
+
return tx.moveCall({
|
2681
|
+
target: "0x1::u32::to_string",
|
2682
|
+
arguments: _args,
|
2683
|
+
});
|
2684
|
+
}
|
2685
|
+
builder.toString = toString;
|
2686
|
+
function tryAsU16(tx, args) {
|
2687
|
+
const _args = [];
|
2688
|
+
_args.push(transactionArgumentOrPureU32(args[0], tx));
|
2689
|
+
// @ts-ignore
|
2690
|
+
return tx.moveCall({
|
2691
|
+
target: "0x1::u32::try_as_u16",
|
2692
|
+
arguments: _args,
|
2693
|
+
});
|
2694
|
+
}
|
2695
|
+
builder.tryAsU16 = tryAsU16;
|
2696
|
+
function tryAsU8(tx, args) {
|
2697
|
+
const _args = [];
|
2698
|
+
_args.push(transactionArgumentOrPureU32(args[0], tx));
|
2699
|
+
// @ts-ignore
|
2700
|
+
return tx.moveCall({
|
2701
|
+
target: "0x1::u32::try_as_u8",
|
2702
|
+
arguments: _args,
|
2703
|
+
});
|
2704
|
+
}
|
2705
|
+
builder.tryAsU8 = tryAsU8;
|
2706
|
+
})(builder = u32.builder || (u32.builder = {}));
|
2707
|
+
let view;
|
2708
|
+
(function (view) {
|
2709
|
+
async function bitwiseNot(client, args) {
|
2710
|
+
const tx = new Transaction();
|
2711
|
+
builder.bitwiseNot(tx, args);
|
2712
|
+
const inspectRes = await client.devInspectTransactionBlock({
|
2713
|
+
transactionBlock: tx,
|
2714
|
+
sender: ZERO_ADDRESS,
|
2715
|
+
});
|
2716
|
+
return (await getMoveCoder(client)).decodeDevInspectResult(inspectRes);
|
2717
|
+
}
|
2718
|
+
view.bitwiseNot = bitwiseNot;
|
2719
|
+
async function diff(client, args) {
|
2720
|
+
const tx = new Transaction();
|
2721
|
+
builder.diff(tx, args);
|
2722
|
+
const inspectRes = await client.devInspectTransactionBlock({
|
2723
|
+
transactionBlock: tx,
|
2724
|
+
sender: ZERO_ADDRESS,
|
2725
|
+
});
|
2726
|
+
return (await getMoveCoder(client)).decodeDevInspectResult(inspectRes);
|
2727
|
+
}
|
2728
|
+
view.diff = diff;
|
2729
|
+
async function divideAndRoundUp(client, args) {
|
2730
|
+
const tx = new Transaction();
|
2731
|
+
builder.divideAndRoundUp(tx, args);
|
2732
|
+
const inspectRes = await client.devInspectTransactionBlock({
|
2733
|
+
transactionBlock: tx,
|
2734
|
+
sender: ZERO_ADDRESS,
|
2735
|
+
});
|
2736
|
+
return (await getMoveCoder(client)).decodeDevInspectResult(inspectRes);
|
2737
|
+
}
|
2738
|
+
view.divideAndRoundUp = divideAndRoundUp;
|
2739
|
+
async function max(client, args) {
|
2740
|
+
const tx = new Transaction();
|
2741
|
+
builder.max(tx, args);
|
2742
|
+
const inspectRes = await client.devInspectTransactionBlock({
|
2743
|
+
transactionBlock: tx,
|
2744
|
+
sender: ZERO_ADDRESS,
|
2745
|
+
});
|
2746
|
+
return (await getMoveCoder(client)).decodeDevInspectResult(inspectRes);
|
2747
|
+
}
|
2748
|
+
view.max = max;
|
2749
|
+
async function min(client, args) {
|
2750
|
+
const tx = new Transaction();
|
2751
|
+
builder.min(tx, args);
|
2752
|
+
const inspectRes = await client.devInspectTransactionBlock({
|
2753
|
+
transactionBlock: tx,
|
2754
|
+
sender: ZERO_ADDRESS,
|
2755
|
+
});
|
2756
|
+
return (await getMoveCoder(client)).decodeDevInspectResult(inspectRes);
|
2757
|
+
}
|
2758
|
+
view.min = min;
|
2759
|
+
async function pow(client, args) {
|
2760
|
+
const tx = new Transaction();
|
2761
|
+
builder.pow(tx, args);
|
2762
|
+
const inspectRes = await client.devInspectTransactionBlock({
|
2763
|
+
transactionBlock: tx,
|
2764
|
+
sender: ZERO_ADDRESS,
|
2765
|
+
});
|
2766
|
+
return (await getMoveCoder(client)).decodeDevInspectResult(inspectRes);
|
2767
|
+
}
|
2768
|
+
view.pow = pow;
|
2769
|
+
async function sqrt(client, args) {
|
2770
|
+
const tx = new Transaction();
|
2771
|
+
builder.sqrt(tx, args);
|
2772
|
+
const inspectRes = await client.devInspectTransactionBlock({
|
2773
|
+
transactionBlock: tx,
|
2774
|
+
sender: ZERO_ADDRESS,
|
2775
|
+
});
|
2776
|
+
return (await getMoveCoder(client)).decodeDevInspectResult(inspectRes);
|
2777
|
+
}
|
2778
|
+
view.sqrt = sqrt;
|
2779
|
+
async function toString(client, args) {
|
2780
|
+
const tx = new Transaction();
|
2781
|
+
builder.toString(tx, args);
|
2782
|
+
const inspectRes = await client.devInspectTransactionBlock({
|
2783
|
+
transactionBlock: tx,
|
2784
|
+
sender: ZERO_ADDRESS,
|
2785
|
+
});
|
2786
|
+
return (await getMoveCoder(client)).decodeDevInspectResult(inspectRes);
|
2787
|
+
}
|
2788
|
+
view.toString = toString;
|
2789
|
+
async function tryAsU16(client, args) {
|
2790
|
+
const tx = new Transaction();
|
2791
|
+
builder.tryAsU16(tx, args);
|
2792
|
+
const inspectRes = await client.devInspectTransactionBlock({
|
2793
|
+
transactionBlock: tx,
|
2794
|
+
sender: ZERO_ADDRESS,
|
2795
|
+
});
|
2796
|
+
return (await getMoveCoder(client)).decodeDevInspectResult(inspectRes);
|
2797
|
+
}
|
2798
|
+
view.tryAsU16 = tryAsU16;
|
2799
|
+
async function tryAsU8(client, args) {
|
2800
|
+
const tx = new Transaction();
|
2801
|
+
builder.tryAsU8(tx, args);
|
2802
|
+
const inspectRes = await client.devInspectTransactionBlock({
|
2803
|
+
transactionBlock: tx,
|
2804
|
+
sender: ZERO_ADDRESS,
|
2805
|
+
});
|
2806
|
+
return (await getMoveCoder(client)).decodeDevInspectResult(inspectRes);
|
2807
|
+
}
|
2808
|
+
view.tryAsU8 = tryAsU8;
|
2809
|
+
})(view = u32.view || (u32.view = {}));
|
2810
|
+
})(u32 || (u32 = {}));
|
2811
|
+
export var u64;
|
2812
|
+
(function (u64) {
|
2813
|
+
let builder;
|
2814
|
+
(function (builder) {
|
2815
|
+
function bitwiseNot(tx, args) {
|
2816
|
+
const _args = [];
|
2817
|
+
_args.push(transactionArgumentOrPureU64(args[0], tx));
|
2818
|
+
// @ts-ignore
|
2819
|
+
return tx.moveCall({
|
2820
|
+
target: "0x1::u64::bitwise_not",
|
2821
|
+
arguments: _args,
|
2822
|
+
});
|
2823
|
+
}
|
2824
|
+
builder.bitwiseNot = bitwiseNot;
|
2825
|
+
function diff(tx, args) {
|
2826
|
+
const _args = [];
|
2827
|
+
_args.push(transactionArgumentOrPureU64(args[0], tx));
|
2828
|
+
_args.push(transactionArgumentOrPureU64(args[1], tx));
|
2829
|
+
// @ts-ignore
|
2830
|
+
return tx.moveCall({
|
2831
|
+
target: "0x1::u64::diff",
|
2832
|
+
arguments: _args,
|
2833
|
+
});
|
2834
|
+
}
|
2835
|
+
builder.diff = diff;
|
2836
|
+
function divideAndRoundUp(tx, args) {
|
2837
|
+
const _args = [];
|
2838
|
+
_args.push(transactionArgumentOrPureU64(args[0], tx));
|
2839
|
+
_args.push(transactionArgumentOrPureU64(args[1], tx));
|
2840
|
+
// @ts-ignore
|
2841
|
+
return tx.moveCall({
|
2842
|
+
target: "0x1::u64::divide_and_round_up",
|
2843
|
+
arguments: _args,
|
2844
|
+
});
|
2845
|
+
}
|
2846
|
+
builder.divideAndRoundUp = divideAndRoundUp;
|
2847
|
+
function max(tx, args) {
|
2848
|
+
const _args = [];
|
2849
|
+
_args.push(transactionArgumentOrPureU64(args[0], tx));
|
2850
|
+
_args.push(transactionArgumentOrPureU64(args[1], tx));
|
2851
|
+
// @ts-ignore
|
2852
|
+
return tx.moveCall({
|
2853
|
+
target: "0x1::u64::max",
|
2854
|
+
arguments: _args,
|
2855
|
+
});
|
2856
|
+
}
|
2857
|
+
builder.max = max;
|
2858
|
+
function min(tx, args) {
|
2859
|
+
const _args = [];
|
2860
|
+
_args.push(transactionArgumentOrPureU64(args[0], tx));
|
2861
|
+
_args.push(transactionArgumentOrPureU64(args[1], tx));
|
2862
|
+
// @ts-ignore
|
2863
|
+
return tx.moveCall({
|
2864
|
+
target: "0x1::u64::min",
|
2865
|
+
arguments: _args,
|
2866
|
+
});
|
2867
|
+
}
|
2868
|
+
builder.min = min;
|
2869
|
+
function pow(tx, args) {
|
2870
|
+
const _args = [];
|
2871
|
+
_args.push(transactionArgumentOrPureU64(args[0], tx));
|
2872
|
+
_args.push(transactionArgumentOrPureU8(args[1], tx));
|
2873
|
+
// @ts-ignore
|
2874
|
+
return tx.moveCall({
|
2875
|
+
target: "0x1::u64::pow",
|
2876
|
+
arguments: _args,
|
2877
|
+
});
|
2878
|
+
}
|
2879
|
+
builder.pow = pow;
|
2880
|
+
function sqrt(tx, args) {
|
2881
|
+
const _args = [];
|
2882
|
+
_args.push(transactionArgumentOrPureU64(args[0], tx));
|
2883
|
+
// @ts-ignore
|
2884
|
+
return tx.moveCall({
|
2885
|
+
target: "0x1::u64::sqrt",
|
2886
|
+
arguments: _args,
|
2887
|
+
});
|
2888
|
+
}
|
2889
|
+
builder.sqrt = sqrt;
|
2890
|
+
function toString(tx, args) {
|
2891
|
+
const _args = [];
|
2892
|
+
_args.push(transactionArgumentOrPureU64(args[0], tx));
|
2893
|
+
// @ts-ignore
|
2894
|
+
return tx.moveCall({
|
2895
|
+
target: "0x1::u64::to_string",
|
2896
|
+
arguments: _args,
|
2897
|
+
});
|
2898
|
+
}
|
2899
|
+
builder.toString = toString;
|
2900
|
+
function tryAsU16(tx, args) {
|
2901
|
+
const _args = [];
|
2902
|
+
_args.push(transactionArgumentOrPureU64(args[0], tx));
|
2903
|
+
// @ts-ignore
|
2904
|
+
return tx.moveCall({
|
2905
|
+
target: "0x1::u64::try_as_u16",
|
2906
|
+
arguments: _args,
|
2907
|
+
});
|
2908
|
+
}
|
2909
|
+
builder.tryAsU16 = tryAsU16;
|
2910
|
+
function tryAsU32(tx, args) {
|
2911
|
+
const _args = [];
|
2912
|
+
_args.push(transactionArgumentOrPureU64(args[0], tx));
|
2913
|
+
// @ts-ignore
|
2914
|
+
return tx.moveCall({
|
2915
|
+
target: "0x1::u64::try_as_u32",
|
2916
|
+
arguments: _args,
|
2917
|
+
});
|
2918
|
+
}
|
2919
|
+
builder.tryAsU32 = tryAsU32;
|
2920
|
+
function tryAsU8(tx, args) {
|
2921
|
+
const _args = [];
|
2922
|
+
_args.push(transactionArgumentOrPureU64(args[0], tx));
|
2923
|
+
// @ts-ignore
|
2924
|
+
return tx.moveCall({
|
2925
|
+
target: "0x1::u64::try_as_u8",
|
2926
|
+
arguments: _args,
|
2927
|
+
});
|
2928
|
+
}
|
2929
|
+
builder.tryAsU8 = tryAsU8;
|
2930
|
+
})(builder = u64.builder || (u64.builder = {}));
|
2931
|
+
let view;
|
2932
|
+
(function (view) {
|
2933
|
+
async function bitwiseNot(client, args) {
|
2934
|
+
const tx = new Transaction();
|
2935
|
+
builder.bitwiseNot(tx, args);
|
2936
|
+
const inspectRes = await client.devInspectTransactionBlock({
|
2937
|
+
transactionBlock: tx,
|
2938
|
+
sender: ZERO_ADDRESS,
|
2939
|
+
});
|
2940
|
+
return (await getMoveCoder(client)).decodeDevInspectResult(inspectRes);
|
2941
|
+
}
|
2942
|
+
view.bitwiseNot = bitwiseNot;
|
2943
|
+
async function diff(client, args) {
|
2944
|
+
const tx = new Transaction();
|
2945
|
+
builder.diff(tx, args);
|
2946
|
+
const inspectRes = await client.devInspectTransactionBlock({
|
2947
|
+
transactionBlock: tx,
|
2948
|
+
sender: ZERO_ADDRESS,
|
2949
|
+
});
|
2950
|
+
return (await getMoveCoder(client)).decodeDevInspectResult(inspectRes);
|
2951
|
+
}
|
2952
|
+
view.diff = diff;
|
2953
|
+
async function divideAndRoundUp(client, args) {
|
2954
|
+
const tx = new Transaction();
|
2955
|
+
builder.divideAndRoundUp(tx, args);
|
2956
|
+
const inspectRes = await client.devInspectTransactionBlock({
|
2957
|
+
transactionBlock: tx,
|
2958
|
+
sender: ZERO_ADDRESS,
|
2959
|
+
});
|
2960
|
+
return (await getMoveCoder(client)).decodeDevInspectResult(inspectRes);
|
2961
|
+
}
|
2962
|
+
view.divideAndRoundUp = divideAndRoundUp;
|
2963
|
+
async function max(client, args) {
|
2964
|
+
const tx = new Transaction();
|
2965
|
+
builder.max(tx, args);
|
2966
|
+
const inspectRes = await client.devInspectTransactionBlock({
|
2967
|
+
transactionBlock: tx,
|
2968
|
+
sender: ZERO_ADDRESS,
|
2969
|
+
});
|
2970
|
+
return (await getMoveCoder(client)).decodeDevInspectResult(inspectRes);
|
2971
|
+
}
|
2972
|
+
view.max = max;
|
2973
|
+
async function min(client, args) {
|
2974
|
+
const tx = new Transaction();
|
2975
|
+
builder.min(tx, args);
|
2976
|
+
const inspectRes = await client.devInspectTransactionBlock({
|
2977
|
+
transactionBlock: tx,
|
2978
|
+
sender: ZERO_ADDRESS,
|
2979
|
+
});
|
2980
|
+
return (await getMoveCoder(client)).decodeDevInspectResult(inspectRes);
|
2981
|
+
}
|
2982
|
+
view.min = min;
|
2983
|
+
async function pow(client, args) {
|
2984
|
+
const tx = new Transaction();
|
2985
|
+
builder.pow(tx, args);
|
2986
|
+
const inspectRes = await client.devInspectTransactionBlock({
|
2987
|
+
transactionBlock: tx,
|
2988
|
+
sender: ZERO_ADDRESS,
|
2989
|
+
});
|
2990
|
+
return (await getMoveCoder(client)).decodeDevInspectResult(inspectRes);
|
2991
|
+
}
|
2992
|
+
view.pow = pow;
|
2993
|
+
async function sqrt(client, args) {
|
2994
|
+
const tx = new Transaction();
|
2995
|
+
builder.sqrt(tx, args);
|
2996
|
+
const inspectRes = await client.devInspectTransactionBlock({
|
2997
|
+
transactionBlock: tx,
|
2998
|
+
sender: ZERO_ADDRESS,
|
2999
|
+
});
|
3000
|
+
return (await getMoveCoder(client)).decodeDevInspectResult(inspectRes);
|
3001
|
+
}
|
3002
|
+
view.sqrt = sqrt;
|
3003
|
+
async function toString(client, args) {
|
3004
|
+
const tx = new Transaction();
|
3005
|
+
builder.toString(tx, args);
|
3006
|
+
const inspectRes = await client.devInspectTransactionBlock({
|
3007
|
+
transactionBlock: tx,
|
3008
|
+
sender: ZERO_ADDRESS,
|
3009
|
+
});
|
3010
|
+
return (await getMoveCoder(client)).decodeDevInspectResult(inspectRes);
|
3011
|
+
}
|
3012
|
+
view.toString = toString;
|
3013
|
+
async function tryAsU16(client, args) {
|
3014
|
+
const tx = new Transaction();
|
3015
|
+
builder.tryAsU16(tx, args);
|
3016
|
+
const inspectRes = await client.devInspectTransactionBlock({
|
3017
|
+
transactionBlock: tx,
|
3018
|
+
sender: ZERO_ADDRESS,
|
3019
|
+
});
|
3020
|
+
return (await getMoveCoder(client)).decodeDevInspectResult(inspectRes);
|
3021
|
+
}
|
3022
|
+
view.tryAsU16 = tryAsU16;
|
3023
|
+
async function tryAsU32(client, args) {
|
3024
|
+
const tx = new Transaction();
|
3025
|
+
builder.tryAsU32(tx, args);
|
3026
|
+
const inspectRes = await client.devInspectTransactionBlock({
|
3027
|
+
transactionBlock: tx,
|
3028
|
+
sender: ZERO_ADDRESS,
|
3029
|
+
});
|
3030
|
+
return (await getMoveCoder(client)).decodeDevInspectResult(inspectRes);
|
3031
|
+
}
|
3032
|
+
view.tryAsU32 = tryAsU32;
|
3033
|
+
async function tryAsU8(client, args) {
|
3034
|
+
const tx = new Transaction();
|
3035
|
+
builder.tryAsU8(tx, args);
|
3036
|
+
const inspectRes = await client.devInspectTransactionBlock({
|
3037
|
+
transactionBlock: tx,
|
3038
|
+
sender: ZERO_ADDRESS,
|
3039
|
+
});
|
3040
|
+
return (await getMoveCoder(client)).decodeDevInspectResult(inspectRes);
|
3041
|
+
}
|
3042
|
+
view.tryAsU8 = tryAsU8;
|
3043
|
+
})(view = u64.view || (u64.view = {}));
|
3044
|
+
})(u64 || (u64 = {}));
|
3045
|
+
export var u8;
|
3046
|
+
(function (u8) {
|
3047
|
+
let builder;
|
3048
|
+
(function (builder) {
|
3049
|
+
function bitwiseNot(tx, args) {
|
3050
|
+
const _args = [];
|
3051
|
+
_args.push(transactionArgumentOrPureU8(args[0], tx));
|
3052
|
+
// @ts-ignore
|
3053
|
+
return tx.moveCall({
|
3054
|
+
target: "0x1::u8::bitwise_not",
|
3055
|
+
arguments: _args,
|
3056
|
+
});
|
3057
|
+
}
|
3058
|
+
builder.bitwiseNot = bitwiseNot;
|
3059
|
+
function diff(tx, args) {
|
3060
|
+
const _args = [];
|
3061
|
+
_args.push(transactionArgumentOrPureU8(args[0], tx));
|
3062
|
+
_args.push(transactionArgumentOrPureU8(args[1], tx));
|
3063
|
+
// @ts-ignore
|
3064
|
+
return tx.moveCall({
|
3065
|
+
target: "0x1::u8::diff",
|
3066
|
+
arguments: _args,
|
3067
|
+
});
|
3068
|
+
}
|
3069
|
+
builder.diff = diff;
|
3070
|
+
function divideAndRoundUp(tx, args) {
|
3071
|
+
const _args = [];
|
3072
|
+
_args.push(transactionArgumentOrPureU8(args[0], tx));
|
3073
|
+
_args.push(transactionArgumentOrPureU8(args[1], tx));
|
3074
|
+
// @ts-ignore
|
3075
|
+
return tx.moveCall({
|
3076
|
+
target: "0x1::u8::divide_and_round_up",
|
3077
|
+
arguments: _args,
|
3078
|
+
});
|
3079
|
+
}
|
3080
|
+
builder.divideAndRoundUp = divideAndRoundUp;
|
3081
|
+
function max(tx, args) {
|
3082
|
+
const _args = [];
|
3083
|
+
_args.push(transactionArgumentOrPureU8(args[0], tx));
|
3084
|
+
_args.push(transactionArgumentOrPureU8(args[1], tx));
|
3085
|
+
// @ts-ignore
|
3086
|
+
return tx.moveCall({
|
3087
|
+
target: "0x1::u8::max",
|
3088
|
+
arguments: _args,
|
3089
|
+
});
|
3090
|
+
}
|
3091
|
+
builder.max = max;
|
3092
|
+
function min(tx, args) {
|
3093
|
+
const _args = [];
|
3094
|
+
_args.push(transactionArgumentOrPureU8(args[0], tx));
|
3095
|
+
_args.push(transactionArgumentOrPureU8(args[1], tx));
|
3096
|
+
// @ts-ignore
|
3097
|
+
return tx.moveCall({
|
3098
|
+
target: "0x1::u8::min",
|
3099
|
+
arguments: _args,
|
3100
|
+
});
|
3101
|
+
}
|
3102
|
+
builder.min = min;
|
3103
|
+
function pow(tx, args) {
|
3104
|
+
const _args = [];
|
3105
|
+
_args.push(transactionArgumentOrPureU8(args[0], tx));
|
3106
|
+
_args.push(transactionArgumentOrPureU8(args[1], tx));
|
3107
|
+
// @ts-ignore
|
3108
|
+
return tx.moveCall({
|
3109
|
+
target: "0x1::u8::pow",
|
3110
|
+
arguments: _args,
|
3111
|
+
});
|
3112
|
+
}
|
3113
|
+
builder.pow = pow;
|
3114
|
+
function sqrt(tx, args) {
|
3115
|
+
const _args = [];
|
3116
|
+
_args.push(transactionArgumentOrPureU8(args[0], tx));
|
3117
|
+
// @ts-ignore
|
3118
|
+
return tx.moveCall({
|
3119
|
+
target: "0x1::u8::sqrt",
|
3120
|
+
arguments: _args,
|
3121
|
+
});
|
3122
|
+
}
|
3123
|
+
builder.sqrt = sqrt;
|
3124
|
+
function toString(tx, args) {
|
3125
|
+
const _args = [];
|
3126
|
+
_args.push(transactionArgumentOrPureU8(args[0], tx));
|
3127
|
+
// @ts-ignore
|
3128
|
+
return tx.moveCall({
|
3129
|
+
target: "0x1::u8::to_string",
|
3130
|
+
arguments: _args,
|
3131
|
+
});
|
3132
|
+
}
|
3133
|
+
builder.toString = toString;
|
3134
|
+
})(builder = u8.builder || (u8.builder = {}));
|
3135
|
+
let view;
|
3136
|
+
(function (view) {
|
3137
|
+
async function bitwiseNot(client, args) {
|
3138
|
+
const tx = new Transaction();
|
3139
|
+
builder.bitwiseNot(tx, args);
|
3140
|
+
const inspectRes = await client.devInspectTransactionBlock({
|
3141
|
+
transactionBlock: tx,
|
3142
|
+
sender: ZERO_ADDRESS,
|
3143
|
+
});
|
3144
|
+
return (await getMoveCoder(client)).decodeDevInspectResult(inspectRes);
|
3145
|
+
}
|
3146
|
+
view.bitwiseNot = bitwiseNot;
|
3147
|
+
async function diff(client, args) {
|
3148
|
+
const tx = new Transaction();
|
3149
|
+
builder.diff(tx, args);
|
3150
|
+
const inspectRes = await client.devInspectTransactionBlock({
|
3151
|
+
transactionBlock: tx,
|
3152
|
+
sender: ZERO_ADDRESS,
|
3153
|
+
});
|
3154
|
+
return (await getMoveCoder(client)).decodeDevInspectResult(inspectRes);
|
3155
|
+
}
|
3156
|
+
view.diff = diff;
|
3157
|
+
async function divideAndRoundUp(client, args) {
|
3158
|
+
const tx = new Transaction();
|
3159
|
+
builder.divideAndRoundUp(tx, args);
|
3160
|
+
const inspectRes = await client.devInspectTransactionBlock({
|
3161
|
+
transactionBlock: tx,
|
3162
|
+
sender: ZERO_ADDRESS,
|
3163
|
+
});
|
3164
|
+
return (await getMoveCoder(client)).decodeDevInspectResult(inspectRes);
|
3165
|
+
}
|
3166
|
+
view.divideAndRoundUp = divideAndRoundUp;
|
3167
|
+
async function max(client, args) {
|
3168
|
+
const tx = new Transaction();
|
3169
|
+
builder.max(tx, args);
|
3170
|
+
const inspectRes = await client.devInspectTransactionBlock({
|
3171
|
+
transactionBlock: tx,
|
3172
|
+
sender: ZERO_ADDRESS,
|
3173
|
+
});
|
3174
|
+
return (await getMoveCoder(client)).decodeDevInspectResult(inspectRes);
|
3175
|
+
}
|
3176
|
+
view.max = max;
|
3177
|
+
async function min(client, args) {
|
3178
|
+
const tx = new Transaction();
|
3179
|
+
builder.min(tx, args);
|
3180
|
+
const inspectRes = await client.devInspectTransactionBlock({
|
3181
|
+
transactionBlock: tx,
|
3182
|
+
sender: ZERO_ADDRESS,
|
3183
|
+
});
|
3184
|
+
return (await getMoveCoder(client)).decodeDevInspectResult(inspectRes);
|
3185
|
+
}
|
3186
|
+
view.min = min;
|
3187
|
+
async function pow(client, args) {
|
3188
|
+
const tx = new Transaction();
|
3189
|
+
builder.pow(tx, args);
|
3190
|
+
const inspectRes = await client.devInspectTransactionBlock({
|
3191
|
+
transactionBlock: tx,
|
3192
|
+
sender: ZERO_ADDRESS,
|
3193
|
+
});
|
3194
|
+
return (await getMoveCoder(client)).decodeDevInspectResult(inspectRes);
|
3195
|
+
}
|
3196
|
+
view.pow = pow;
|
3197
|
+
async function sqrt(client, args) {
|
3198
|
+
const tx = new Transaction();
|
3199
|
+
builder.sqrt(tx, args);
|
3200
|
+
const inspectRes = await client.devInspectTransactionBlock({
|
3201
|
+
transactionBlock: tx,
|
3202
|
+
sender: ZERO_ADDRESS,
|
3203
|
+
});
|
3204
|
+
return (await getMoveCoder(client)).decodeDevInspectResult(inspectRes);
|
3205
|
+
}
|
3206
|
+
view.sqrt = sqrt;
|
3207
|
+
async function toString(client, args) {
|
3208
|
+
const tx = new Transaction();
|
3209
|
+
builder.toString(tx, args);
|
3210
|
+
const inspectRes = await client.devInspectTransactionBlock({
|
3211
|
+
transactionBlock: tx,
|
3212
|
+
sender: ZERO_ADDRESS,
|
3213
|
+
});
|
3214
|
+
return (await getMoveCoder(client)).decodeDevInspectResult(inspectRes);
|
3215
|
+
}
|
3216
|
+
view.toString = toString;
|
3217
|
+
})(view = u8.view || (u8.view = {}));
|
3218
|
+
})(u8 || (u8 = {}));
|
149
3219
|
export class uq32_32 extends SuiBaseProcessor {
|
150
3220
|
constructor(options) {
|
151
3221
|
super("uq32_32", options);
|
@@ -172,7 +3242,794 @@ export class uq32_32 extends SuiBaseProcessor {
|
|
172
3242
|
}
|
173
3243
|
UQ32_32.type = type;
|
174
3244
|
})(UQ32_32 = uq32_32.UQ32_32 || (uq32_32.UQ32_32 = {}));
|
3245
|
+
let builder;
|
3246
|
+
(function (builder) {
|
3247
|
+
function add(tx, args) {
|
3248
|
+
const _args = [];
|
3249
|
+
_args.push(transactionArgumentOrPure(args[0], tx));
|
3250
|
+
_args.push(transactionArgumentOrPure(args[1], tx));
|
3251
|
+
// @ts-ignore
|
3252
|
+
return tx.moveCall({
|
3253
|
+
target: "0x1::uq32_32::add",
|
3254
|
+
arguments: _args,
|
3255
|
+
});
|
3256
|
+
}
|
3257
|
+
builder.add = add;
|
3258
|
+
function div(tx, args) {
|
3259
|
+
const _args = [];
|
3260
|
+
_args.push(transactionArgumentOrPure(args[0], tx));
|
3261
|
+
_args.push(transactionArgumentOrPure(args[1], tx));
|
3262
|
+
// @ts-ignore
|
3263
|
+
return tx.moveCall({
|
3264
|
+
target: "0x1::uq32_32::div",
|
3265
|
+
arguments: _args,
|
3266
|
+
});
|
3267
|
+
}
|
3268
|
+
builder.div = div;
|
3269
|
+
function fromInt(tx, args) {
|
3270
|
+
const _args = [];
|
3271
|
+
_args.push(transactionArgumentOrPureU32(args[0], tx));
|
3272
|
+
// @ts-ignore
|
3273
|
+
return tx.moveCall({
|
3274
|
+
target: "0x1::uq32_32::from_int",
|
3275
|
+
arguments: _args,
|
3276
|
+
});
|
3277
|
+
}
|
3278
|
+
builder.fromInt = fromInt;
|
3279
|
+
function fromQuotient(tx, args) {
|
3280
|
+
const _args = [];
|
3281
|
+
_args.push(transactionArgumentOrPureU64(args[0], tx));
|
3282
|
+
_args.push(transactionArgumentOrPureU64(args[1], tx));
|
3283
|
+
// @ts-ignore
|
3284
|
+
return tx.moveCall({
|
3285
|
+
target: "0x1::uq32_32::from_quotient",
|
3286
|
+
arguments: _args,
|
3287
|
+
});
|
3288
|
+
}
|
3289
|
+
builder.fromQuotient = fromQuotient;
|
3290
|
+
function fromRaw(tx, args) {
|
3291
|
+
const _args = [];
|
3292
|
+
_args.push(transactionArgumentOrPureU64(args[0], tx));
|
3293
|
+
// @ts-ignore
|
3294
|
+
return tx.moveCall({
|
3295
|
+
target: "0x1::uq32_32::from_raw",
|
3296
|
+
arguments: _args,
|
3297
|
+
});
|
3298
|
+
}
|
3299
|
+
builder.fromRaw = fromRaw;
|
3300
|
+
function ge(tx, args) {
|
3301
|
+
const _args = [];
|
3302
|
+
_args.push(transactionArgumentOrPure(args[0], tx));
|
3303
|
+
_args.push(transactionArgumentOrPure(args[1], tx));
|
3304
|
+
// @ts-ignore
|
3305
|
+
return tx.moveCall({
|
3306
|
+
target: "0x1::uq32_32::ge",
|
3307
|
+
arguments: _args,
|
3308
|
+
});
|
3309
|
+
}
|
3310
|
+
builder.ge = ge;
|
3311
|
+
function gt(tx, args) {
|
3312
|
+
const _args = [];
|
3313
|
+
_args.push(transactionArgumentOrPure(args[0], tx));
|
3314
|
+
_args.push(transactionArgumentOrPure(args[1], tx));
|
3315
|
+
// @ts-ignore
|
3316
|
+
return tx.moveCall({
|
3317
|
+
target: "0x1::uq32_32::gt",
|
3318
|
+
arguments: _args,
|
3319
|
+
});
|
3320
|
+
}
|
3321
|
+
builder.gt = gt;
|
3322
|
+
function intDiv(tx, args) {
|
3323
|
+
const _args = [];
|
3324
|
+
_args.push(transactionArgumentOrPureU64(args[0], tx));
|
3325
|
+
_args.push(transactionArgumentOrPure(args[1], tx));
|
3326
|
+
// @ts-ignore
|
3327
|
+
return tx.moveCall({
|
3328
|
+
target: "0x1::uq32_32::int_div",
|
3329
|
+
arguments: _args,
|
3330
|
+
});
|
3331
|
+
}
|
3332
|
+
builder.intDiv = intDiv;
|
3333
|
+
function intMul(tx, args) {
|
3334
|
+
const _args = [];
|
3335
|
+
_args.push(transactionArgumentOrPureU64(args[0], tx));
|
3336
|
+
_args.push(transactionArgumentOrPure(args[1], tx));
|
3337
|
+
// @ts-ignore
|
3338
|
+
return tx.moveCall({
|
3339
|
+
target: "0x1::uq32_32::int_mul",
|
3340
|
+
arguments: _args,
|
3341
|
+
});
|
3342
|
+
}
|
3343
|
+
builder.intMul = intMul;
|
3344
|
+
function le(tx, args) {
|
3345
|
+
const _args = [];
|
3346
|
+
_args.push(transactionArgumentOrPure(args[0], tx));
|
3347
|
+
_args.push(transactionArgumentOrPure(args[1], tx));
|
3348
|
+
// @ts-ignore
|
3349
|
+
return tx.moveCall({
|
3350
|
+
target: "0x1::uq32_32::le",
|
3351
|
+
arguments: _args,
|
3352
|
+
});
|
3353
|
+
}
|
3354
|
+
builder.le = le;
|
3355
|
+
function lt(tx, args) {
|
3356
|
+
const _args = [];
|
3357
|
+
_args.push(transactionArgumentOrPure(args[0], tx));
|
3358
|
+
_args.push(transactionArgumentOrPure(args[1], tx));
|
3359
|
+
// @ts-ignore
|
3360
|
+
return tx.moveCall({
|
3361
|
+
target: "0x1::uq32_32::lt",
|
3362
|
+
arguments: _args,
|
3363
|
+
});
|
3364
|
+
}
|
3365
|
+
builder.lt = lt;
|
3366
|
+
function mul(tx, args) {
|
3367
|
+
const _args = [];
|
3368
|
+
_args.push(transactionArgumentOrPure(args[0], tx));
|
3369
|
+
_args.push(transactionArgumentOrPure(args[1], tx));
|
3370
|
+
// @ts-ignore
|
3371
|
+
return tx.moveCall({
|
3372
|
+
target: "0x1::uq32_32::mul",
|
3373
|
+
arguments: _args,
|
3374
|
+
});
|
3375
|
+
}
|
3376
|
+
builder.mul = mul;
|
3377
|
+
function sub(tx, args) {
|
3378
|
+
const _args = [];
|
3379
|
+
_args.push(transactionArgumentOrPure(args[0], tx));
|
3380
|
+
_args.push(transactionArgumentOrPure(args[1], tx));
|
3381
|
+
// @ts-ignore
|
3382
|
+
return tx.moveCall({
|
3383
|
+
target: "0x1::uq32_32::sub",
|
3384
|
+
arguments: _args,
|
3385
|
+
});
|
3386
|
+
}
|
3387
|
+
builder.sub = sub;
|
3388
|
+
function toInt(tx, args) {
|
3389
|
+
const _args = [];
|
3390
|
+
_args.push(transactionArgumentOrPure(args[0], tx));
|
3391
|
+
// @ts-ignore
|
3392
|
+
return tx.moveCall({
|
3393
|
+
target: "0x1::uq32_32::to_int",
|
3394
|
+
arguments: _args,
|
3395
|
+
});
|
3396
|
+
}
|
3397
|
+
builder.toInt = toInt;
|
3398
|
+
function toRaw(tx, args) {
|
3399
|
+
const _args = [];
|
3400
|
+
_args.push(transactionArgumentOrPure(args[0], tx));
|
3401
|
+
// @ts-ignore
|
3402
|
+
return tx.moveCall({
|
3403
|
+
target: "0x1::uq32_32::to_raw",
|
3404
|
+
arguments: _args,
|
3405
|
+
});
|
3406
|
+
}
|
3407
|
+
builder.toRaw = toRaw;
|
3408
|
+
})(builder = uq32_32.builder || (uq32_32.builder = {}));
|
3409
|
+
let view;
|
3410
|
+
(function (view) {
|
3411
|
+
async function add(client, args) {
|
3412
|
+
const tx = new Transaction();
|
3413
|
+
builder.add(tx, args);
|
3414
|
+
const inspectRes = await client.devInspectTransactionBlock({
|
3415
|
+
transactionBlock: tx,
|
3416
|
+
sender: ZERO_ADDRESS,
|
3417
|
+
});
|
3418
|
+
return (await getMoveCoder(client)).decodeDevInspectResult(inspectRes);
|
3419
|
+
}
|
3420
|
+
view.add = add;
|
3421
|
+
async function div(client, args) {
|
3422
|
+
const tx = new Transaction();
|
3423
|
+
builder.div(tx, args);
|
3424
|
+
const inspectRes = await client.devInspectTransactionBlock({
|
3425
|
+
transactionBlock: tx,
|
3426
|
+
sender: ZERO_ADDRESS,
|
3427
|
+
});
|
3428
|
+
return (await getMoveCoder(client)).decodeDevInspectResult(inspectRes);
|
3429
|
+
}
|
3430
|
+
view.div = div;
|
3431
|
+
async function fromInt(client, args) {
|
3432
|
+
const tx = new Transaction();
|
3433
|
+
builder.fromInt(tx, args);
|
3434
|
+
const inspectRes = await client.devInspectTransactionBlock({
|
3435
|
+
transactionBlock: tx,
|
3436
|
+
sender: ZERO_ADDRESS,
|
3437
|
+
});
|
3438
|
+
return (await getMoveCoder(client)).decodeDevInspectResult(inspectRes);
|
3439
|
+
}
|
3440
|
+
view.fromInt = fromInt;
|
3441
|
+
async function fromQuotient(client, args) {
|
3442
|
+
const tx = new Transaction();
|
3443
|
+
builder.fromQuotient(tx, args);
|
3444
|
+
const inspectRes = await client.devInspectTransactionBlock({
|
3445
|
+
transactionBlock: tx,
|
3446
|
+
sender: ZERO_ADDRESS,
|
3447
|
+
});
|
3448
|
+
return (await getMoveCoder(client)).decodeDevInspectResult(inspectRes);
|
3449
|
+
}
|
3450
|
+
view.fromQuotient = fromQuotient;
|
3451
|
+
async function fromRaw(client, args) {
|
3452
|
+
const tx = new Transaction();
|
3453
|
+
builder.fromRaw(tx, args);
|
3454
|
+
const inspectRes = await client.devInspectTransactionBlock({
|
3455
|
+
transactionBlock: tx,
|
3456
|
+
sender: ZERO_ADDRESS,
|
3457
|
+
});
|
3458
|
+
return (await getMoveCoder(client)).decodeDevInspectResult(inspectRes);
|
3459
|
+
}
|
3460
|
+
view.fromRaw = fromRaw;
|
3461
|
+
async function ge(client, args) {
|
3462
|
+
const tx = new Transaction();
|
3463
|
+
builder.ge(tx, args);
|
3464
|
+
const inspectRes = await client.devInspectTransactionBlock({
|
3465
|
+
transactionBlock: tx,
|
3466
|
+
sender: ZERO_ADDRESS,
|
3467
|
+
});
|
3468
|
+
return (await getMoveCoder(client)).decodeDevInspectResult(inspectRes);
|
3469
|
+
}
|
3470
|
+
view.ge = ge;
|
3471
|
+
async function gt(client, args) {
|
3472
|
+
const tx = new Transaction();
|
3473
|
+
builder.gt(tx, args);
|
3474
|
+
const inspectRes = await client.devInspectTransactionBlock({
|
3475
|
+
transactionBlock: tx,
|
3476
|
+
sender: ZERO_ADDRESS,
|
3477
|
+
});
|
3478
|
+
return (await getMoveCoder(client)).decodeDevInspectResult(inspectRes);
|
3479
|
+
}
|
3480
|
+
view.gt = gt;
|
3481
|
+
async function intDiv(client, args) {
|
3482
|
+
const tx = new Transaction();
|
3483
|
+
builder.intDiv(tx, args);
|
3484
|
+
const inspectRes = await client.devInspectTransactionBlock({
|
3485
|
+
transactionBlock: tx,
|
3486
|
+
sender: ZERO_ADDRESS,
|
3487
|
+
});
|
3488
|
+
return (await getMoveCoder(client)).decodeDevInspectResult(inspectRes);
|
3489
|
+
}
|
3490
|
+
view.intDiv = intDiv;
|
3491
|
+
async function intMul(client, args) {
|
3492
|
+
const tx = new Transaction();
|
3493
|
+
builder.intMul(tx, args);
|
3494
|
+
const inspectRes = await client.devInspectTransactionBlock({
|
3495
|
+
transactionBlock: tx,
|
3496
|
+
sender: ZERO_ADDRESS,
|
3497
|
+
});
|
3498
|
+
return (await getMoveCoder(client)).decodeDevInspectResult(inspectRes);
|
3499
|
+
}
|
3500
|
+
view.intMul = intMul;
|
3501
|
+
async function le(client, args) {
|
3502
|
+
const tx = new Transaction();
|
3503
|
+
builder.le(tx, args);
|
3504
|
+
const inspectRes = await client.devInspectTransactionBlock({
|
3505
|
+
transactionBlock: tx,
|
3506
|
+
sender: ZERO_ADDRESS,
|
3507
|
+
});
|
3508
|
+
return (await getMoveCoder(client)).decodeDevInspectResult(inspectRes);
|
3509
|
+
}
|
3510
|
+
view.le = le;
|
3511
|
+
async function lt(client, args) {
|
3512
|
+
const tx = new Transaction();
|
3513
|
+
builder.lt(tx, args);
|
3514
|
+
const inspectRes = await client.devInspectTransactionBlock({
|
3515
|
+
transactionBlock: tx,
|
3516
|
+
sender: ZERO_ADDRESS,
|
3517
|
+
});
|
3518
|
+
return (await getMoveCoder(client)).decodeDevInspectResult(inspectRes);
|
3519
|
+
}
|
3520
|
+
view.lt = lt;
|
3521
|
+
async function mul(client, args) {
|
3522
|
+
const tx = new Transaction();
|
3523
|
+
builder.mul(tx, args);
|
3524
|
+
const inspectRes = await client.devInspectTransactionBlock({
|
3525
|
+
transactionBlock: tx,
|
3526
|
+
sender: ZERO_ADDRESS,
|
3527
|
+
});
|
3528
|
+
return (await getMoveCoder(client)).decodeDevInspectResult(inspectRes);
|
3529
|
+
}
|
3530
|
+
view.mul = mul;
|
3531
|
+
async function sub(client, args) {
|
3532
|
+
const tx = new Transaction();
|
3533
|
+
builder.sub(tx, args);
|
3534
|
+
const inspectRes = await client.devInspectTransactionBlock({
|
3535
|
+
transactionBlock: tx,
|
3536
|
+
sender: ZERO_ADDRESS,
|
3537
|
+
});
|
3538
|
+
return (await getMoveCoder(client)).decodeDevInspectResult(inspectRes);
|
3539
|
+
}
|
3540
|
+
view.sub = sub;
|
3541
|
+
async function toInt(client, args) {
|
3542
|
+
const tx = new Transaction();
|
3543
|
+
builder.toInt(tx, args);
|
3544
|
+
const inspectRes = await client.devInspectTransactionBlock({
|
3545
|
+
transactionBlock: tx,
|
3546
|
+
sender: ZERO_ADDRESS,
|
3547
|
+
});
|
3548
|
+
return (await getMoveCoder(client)).decodeDevInspectResult(inspectRes);
|
3549
|
+
}
|
3550
|
+
view.toInt = toInt;
|
3551
|
+
async function toRaw(client, args) {
|
3552
|
+
const tx = new Transaction();
|
3553
|
+
builder.toRaw(tx, args);
|
3554
|
+
const inspectRes = await client.devInspectTransactionBlock({
|
3555
|
+
transactionBlock: tx,
|
3556
|
+
sender: ZERO_ADDRESS,
|
3557
|
+
});
|
3558
|
+
return (await getMoveCoder(client)).decodeDevInspectResult(inspectRes);
|
3559
|
+
}
|
3560
|
+
view.toRaw = toRaw;
|
3561
|
+
})(view = uq32_32.view || (uq32_32.view = {}));
|
175
3562
|
})(uq32_32 || (uq32_32 = {}));
|
3563
|
+
export var vector;
|
3564
|
+
(function (vector) {
|
3565
|
+
let builder;
|
3566
|
+
(function (builder) {
|
3567
|
+
function append(tx, args, typeArguments) {
|
3568
|
+
const _args = [];
|
3569
|
+
_args.push(transactionArgumentOrObject(args[0], tx));
|
3570
|
+
_args.push(transactionArgumentOrVec(args[1], tx));
|
3571
|
+
// @ts-ignore
|
3572
|
+
return tx.moveCall({
|
3573
|
+
target: "0x1::vector::append",
|
3574
|
+
arguments: _args,
|
3575
|
+
typeArguments: [
|
3576
|
+
typeof typeArguments[0] === "string"
|
3577
|
+
? typeArguments[0]
|
3578
|
+
: typeArguments[0].getSignature(),
|
3579
|
+
],
|
3580
|
+
});
|
3581
|
+
}
|
3582
|
+
builder.append = append;
|
3583
|
+
function borrow(tx, args, typeArguments) {
|
3584
|
+
const _args = [];
|
3585
|
+
_args.push(transactionArgumentOrObject(args[0], tx));
|
3586
|
+
_args.push(transactionArgumentOrPureU64(args[1], tx));
|
3587
|
+
// @ts-ignore
|
3588
|
+
return tx.moveCall({
|
3589
|
+
target: "0x1::vector::borrow",
|
3590
|
+
arguments: _args,
|
3591
|
+
typeArguments: [
|
3592
|
+
typeof typeArguments[0] === "string"
|
3593
|
+
? typeArguments[0]
|
3594
|
+
: typeArguments[0].getSignature(),
|
3595
|
+
],
|
3596
|
+
});
|
3597
|
+
}
|
3598
|
+
builder.borrow = borrow;
|
3599
|
+
function borrowMut(tx, args, typeArguments) {
|
3600
|
+
const _args = [];
|
3601
|
+
_args.push(transactionArgumentOrObject(args[0], tx));
|
3602
|
+
_args.push(transactionArgumentOrPureU64(args[1], tx));
|
3603
|
+
// @ts-ignore
|
3604
|
+
return tx.moveCall({
|
3605
|
+
target: "0x1::vector::borrow_mut",
|
3606
|
+
arguments: _args,
|
3607
|
+
typeArguments: [
|
3608
|
+
typeof typeArguments[0] === "string"
|
3609
|
+
? typeArguments[0]
|
3610
|
+
: typeArguments[0].getSignature(),
|
3611
|
+
],
|
3612
|
+
});
|
3613
|
+
}
|
3614
|
+
builder.borrowMut = borrowMut;
|
3615
|
+
function contains(tx, args, typeArguments) {
|
3616
|
+
const _args = [];
|
3617
|
+
_args.push(transactionArgumentOrObject(args[0], tx));
|
3618
|
+
_args.push(transactionArgumentOrObject(args[1], tx));
|
3619
|
+
// @ts-ignore
|
3620
|
+
return tx.moveCall({
|
3621
|
+
target: "0x1::vector::contains",
|
3622
|
+
arguments: _args,
|
3623
|
+
typeArguments: [
|
3624
|
+
typeof typeArguments[0] === "string"
|
3625
|
+
? typeArguments[0]
|
3626
|
+
: typeArguments[0].getSignature(),
|
3627
|
+
],
|
3628
|
+
});
|
3629
|
+
}
|
3630
|
+
builder.contains = contains;
|
3631
|
+
function destroyEmpty(tx, args, typeArguments) {
|
3632
|
+
const _args = [];
|
3633
|
+
_args.push(transactionArgumentOrVec(args[0], tx));
|
3634
|
+
// @ts-ignore
|
3635
|
+
return tx.moveCall({
|
3636
|
+
target: "0x1::vector::destroy_empty",
|
3637
|
+
arguments: _args,
|
3638
|
+
typeArguments: [
|
3639
|
+
typeof typeArguments[0] === "string"
|
3640
|
+
? typeArguments[0]
|
3641
|
+
: typeArguments[0].getSignature(),
|
3642
|
+
],
|
3643
|
+
});
|
3644
|
+
}
|
3645
|
+
builder.destroyEmpty = destroyEmpty;
|
3646
|
+
function empty(tx, args, typeArguments) {
|
3647
|
+
const _args = [];
|
3648
|
+
// @ts-ignore
|
3649
|
+
return tx.moveCall({
|
3650
|
+
target: "0x1::vector::empty",
|
3651
|
+
arguments: _args,
|
3652
|
+
typeArguments: [
|
3653
|
+
typeof typeArguments[0] === "string"
|
3654
|
+
? typeArguments[0]
|
3655
|
+
: typeArguments[0].getSignature(),
|
3656
|
+
],
|
3657
|
+
});
|
3658
|
+
}
|
3659
|
+
builder.empty = empty;
|
3660
|
+
function flatten(tx, args, typeArguments) {
|
3661
|
+
const _args = [];
|
3662
|
+
_args.push(transactionArgumentOrVec(args[0], tx));
|
3663
|
+
// @ts-ignore
|
3664
|
+
return tx.moveCall({
|
3665
|
+
target: "0x1::vector::flatten",
|
3666
|
+
arguments: _args,
|
3667
|
+
typeArguments: [
|
3668
|
+
typeof typeArguments[0] === "string"
|
3669
|
+
? typeArguments[0]
|
3670
|
+
: typeArguments[0].getSignature(),
|
3671
|
+
],
|
3672
|
+
});
|
3673
|
+
}
|
3674
|
+
builder.flatten = flatten;
|
3675
|
+
function indexOf(tx, args, typeArguments) {
|
3676
|
+
const _args = [];
|
3677
|
+
_args.push(transactionArgumentOrObject(args[0], tx));
|
3678
|
+
_args.push(transactionArgumentOrObject(args[1], tx));
|
3679
|
+
// @ts-ignore
|
3680
|
+
return tx.moveCall({
|
3681
|
+
target: "0x1::vector::index_of",
|
3682
|
+
arguments: _args,
|
3683
|
+
typeArguments: [
|
3684
|
+
typeof typeArguments[0] === "string"
|
3685
|
+
? typeArguments[0]
|
3686
|
+
: typeArguments[0].getSignature(),
|
3687
|
+
],
|
3688
|
+
});
|
3689
|
+
}
|
3690
|
+
builder.indexOf = indexOf;
|
3691
|
+
function insert(tx, args, typeArguments) {
|
3692
|
+
const _args = [];
|
3693
|
+
_args.push(transactionArgumentOrObject(args[0], tx));
|
3694
|
+
_args.push(transactionArgumentOrPure(args[1], tx));
|
3695
|
+
_args.push(transactionArgumentOrPureU64(args[2], tx));
|
3696
|
+
// @ts-ignore
|
3697
|
+
return tx.moveCall({
|
3698
|
+
target: "0x1::vector::insert",
|
3699
|
+
arguments: _args,
|
3700
|
+
typeArguments: [
|
3701
|
+
typeof typeArguments[0] === "string"
|
3702
|
+
? typeArguments[0]
|
3703
|
+
: typeArguments[0].getSignature(),
|
3704
|
+
],
|
3705
|
+
});
|
3706
|
+
}
|
3707
|
+
builder.insert = insert;
|
3708
|
+
function isEmpty(tx, args, typeArguments) {
|
3709
|
+
const _args = [];
|
3710
|
+
_args.push(transactionArgumentOrObject(args[0], tx));
|
3711
|
+
// @ts-ignore
|
3712
|
+
return tx.moveCall({
|
3713
|
+
target: "0x1::vector::is_empty",
|
3714
|
+
arguments: _args,
|
3715
|
+
typeArguments: [
|
3716
|
+
typeof typeArguments[0] === "string"
|
3717
|
+
? typeArguments[0]
|
3718
|
+
: typeArguments[0].getSignature(),
|
3719
|
+
],
|
3720
|
+
});
|
3721
|
+
}
|
3722
|
+
builder.isEmpty = isEmpty;
|
3723
|
+
function length(tx, args, typeArguments) {
|
3724
|
+
const _args = [];
|
3725
|
+
_args.push(transactionArgumentOrObject(args[0], tx));
|
3726
|
+
// @ts-ignore
|
3727
|
+
return tx.moveCall({
|
3728
|
+
target: "0x1::vector::length",
|
3729
|
+
arguments: _args,
|
3730
|
+
typeArguments: [
|
3731
|
+
typeof typeArguments[0] === "string"
|
3732
|
+
? typeArguments[0]
|
3733
|
+
: typeArguments[0].getSignature(),
|
3734
|
+
],
|
3735
|
+
});
|
3736
|
+
}
|
3737
|
+
builder.length = length;
|
3738
|
+
function popBack(tx, args, typeArguments) {
|
3739
|
+
const _args = [];
|
3740
|
+
_args.push(transactionArgumentOrObject(args[0], tx));
|
3741
|
+
// @ts-ignore
|
3742
|
+
return tx.moveCall({
|
3743
|
+
target: "0x1::vector::pop_back",
|
3744
|
+
arguments: _args,
|
3745
|
+
typeArguments: [
|
3746
|
+
typeof typeArguments[0] === "string"
|
3747
|
+
? typeArguments[0]
|
3748
|
+
: typeArguments[0].getSignature(),
|
3749
|
+
],
|
3750
|
+
});
|
3751
|
+
}
|
3752
|
+
builder.popBack = popBack;
|
3753
|
+
function pushBack(tx, args, typeArguments) {
|
3754
|
+
const _args = [];
|
3755
|
+
_args.push(transactionArgumentOrObject(args[0], tx));
|
3756
|
+
_args.push(transactionArgumentOrPure(args[1], tx));
|
3757
|
+
// @ts-ignore
|
3758
|
+
return tx.moveCall({
|
3759
|
+
target: "0x1::vector::push_back",
|
3760
|
+
arguments: _args,
|
3761
|
+
typeArguments: [
|
3762
|
+
typeof typeArguments[0] === "string"
|
3763
|
+
? typeArguments[0]
|
3764
|
+
: typeArguments[0].getSignature(),
|
3765
|
+
],
|
3766
|
+
});
|
3767
|
+
}
|
3768
|
+
builder.pushBack = pushBack;
|
3769
|
+
function remove(tx, args, typeArguments) {
|
3770
|
+
const _args = [];
|
3771
|
+
_args.push(transactionArgumentOrObject(args[0], tx));
|
3772
|
+
_args.push(transactionArgumentOrPureU64(args[1], tx));
|
3773
|
+
// @ts-ignore
|
3774
|
+
return tx.moveCall({
|
3775
|
+
target: "0x1::vector::remove",
|
3776
|
+
arguments: _args,
|
3777
|
+
typeArguments: [
|
3778
|
+
typeof typeArguments[0] === "string"
|
3779
|
+
? typeArguments[0]
|
3780
|
+
: typeArguments[0].getSignature(),
|
3781
|
+
],
|
3782
|
+
});
|
3783
|
+
}
|
3784
|
+
builder.remove = remove;
|
3785
|
+
function reverse(tx, args, typeArguments) {
|
3786
|
+
const _args = [];
|
3787
|
+
_args.push(transactionArgumentOrObject(args[0], tx));
|
3788
|
+
// @ts-ignore
|
3789
|
+
return tx.moveCall({
|
3790
|
+
target: "0x1::vector::reverse",
|
3791
|
+
arguments: _args,
|
3792
|
+
typeArguments: [
|
3793
|
+
typeof typeArguments[0] === "string"
|
3794
|
+
? typeArguments[0]
|
3795
|
+
: typeArguments[0].getSignature(),
|
3796
|
+
],
|
3797
|
+
});
|
3798
|
+
}
|
3799
|
+
builder.reverse = reverse;
|
3800
|
+
function singleton(tx, args, typeArguments) {
|
3801
|
+
const _args = [];
|
3802
|
+
_args.push(transactionArgumentOrPure(args[0], tx));
|
3803
|
+
// @ts-ignore
|
3804
|
+
return tx.moveCall({
|
3805
|
+
target: "0x1::vector::singleton",
|
3806
|
+
arguments: _args,
|
3807
|
+
typeArguments: [
|
3808
|
+
typeof typeArguments[0] === "string"
|
3809
|
+
? typeArguments[0]
|
3810
|
+
: typeArguments[0].getSignature(),
|
3811
|
+
],
|
3812
|
+
});
|
3813
|
+
}
|
3814
|
+
builder.singleton = singleton;
|
3815
|
+
function swap(tx, args, typeArguments) {
|
3816
|
+
const _args = [];
|
3817
|
+
_args.push(transactionArgumentOrObject(args[0], tx));
|
3818
|
+
_args.push(transactionArgumentOrPureU64(args[1], tx));
|
3819
|
+
_args.push(transactionArgumentOrPureU64(args[2], tx));
|
3820
|
+
// @ts-ignore
|
3821
|
+
return tx.moveCall({
|
3822
|
+
target: "0x1::vector::swap",
|
3823
|
+
arguments: _args,
|
3824
|
+
typeArguments: [
|
3825
|
+
typeof typeArguments[0] === "string"
|
3826
|
+
? typeArguments[0]
|
3827
|
+
: typeArguments[0].getSignature(),
|
3828
|
+
],
|
3829
|
+
});
|
3830
|
+
}
|
3831
|
+
builder.swap = swap;
|
3832
|
+
function swapRemove(tx, args, typeArguments) {
|
3833
|
+
const _args = [];
|
3834
|
+
_args.push(transactionArgumentOrObject(args[0], tx));
|
3835
|
+
_args.push(transactionArgumentOrPureU64(args[1], tx));
|
3836
|
+
// @ts-ignore
|
3837
|
+
return tx.moveCall({
|
3838
|
+
target: "0x1::vector::swap_remove",
|
3839
|
+
arguments: _args,
|
3840
|
+
typeArguments: [
|
3841
|
+
typeof typeArguments[0] === "string"
|
3842
|
+
? typeArguments[0]
|
3843
|
+
: typeArguments[0].getSignature(),
|
3844
|
+
],
|
3845
|
+
});
|
3846
|
+
}
|
3847
|
+
builder.swapRemove = swapRemove;
|
3848
|
+
})(builder = vector.builder || (vector.builder = {}));
|
3849
|
+
let view;
|
3850
|
+
(function (view) {
|
3851
|
+
async function append(client, args, typeArguments) {
|
3852
|
+
const tx = new Transaction();
|
3853
|
+
builder.append(tx, args, typeArguments);
|
3854
|
+
const inspectRes = await client.devInspectTransactionBlock({
|
3855
|
+
transactionBlock: tx,
|
3856
|
+
sender: ZERO_ADDRESS,
|
3857
|
+
});
|
3858
|
+
return (await getMoveCoder(client)).decodeDevInspectResult(inspectRes);
|
3859
|
+
}
|
3860
|
+
view.append = append;
|
3861
|
+
async function borrow(client, args, typeArguments) {
|
3862
|
+
const tx = new Transaction();
|
3863
|
+
builder.borrow(tx, args, typeArguments);
|
3864
|
+
const inspectRes = await client.devInspectTransactionBlock({
|
3865
|
+
transactionBlock: tx,
|
3866
|
+
sender: ZERO_ADDRESS,
|
3867
|
+
});
|
3868
|
+
return (await getMoveCoder(client)).decodeDevInspectResult(inspectRes);
|
3869
|
+
}
|
3870
|
+
view.borrow = borrow;
|
3871
|
+
async function borrowMut(client, args, typeArguments) {
|
3872
|
+
const tx = new Transaction();
|
3873
|
+
builder.borrowMut(tx, args, typeArguments);
|
3874
|
+
const inspectRes = await client.devInspectTransactionBlock({
|
3875
|
+
transactionBlock: tx,
|
3876
|
+
sender: ZERO_ADDRESS,
|
3877
|
+
});
|
3878
|
+
return (await getMoveCoder(client)).decodeDevInspectResult(inspectRes);
|
3879
|
+
}
|
3880
|
+
view.borrowMut = borrowMut;
|
3881
|
+
async function contains(client, args, typeArguments) {
|
3882
|
+
const tx = new Transaction();
|
3883
|
+
builder.contains(tx, args, typeArguments);
|
3884
|
+
const inspectRes = await client.devInspectTransactionBlock({
|
3885
|
+
transactionBlock: tx,
|
3886
|
+
sender: ZERO_ADDRESS,
|
3887
|
+
});
|
3888
|
+
return (await getMoveCoder(client)).decodeDevInspectResult(inspectRes);
|
3889
|
+
}
|
3890
|
+
view.contains = contains;
|
3891
|
+
async function destroyEmpty(client, args, typeArguments) {
|
3892
|
+
const tx = new Transaction();
|
3893
|
+
builder.destroyEmpty(tx, args, typeArguments);
|
3894
|
+
const inspectRes = await client.devInspectTransactionBlock({
|
3895
|
+
transactionBlock: tx,
|
3896
|
+
sender: ZERO_ADDRESS,
|
3897
|
+
});
|
3898
|
+
return (await getMoveCoder(client)).decodeDevInspectResult(inspectRes);
|
3899
|
+
}
|
3900
|
+
view.destroyEmpty = destroyEmpty;
|
3901
|
+
async function empty(client, args, typeArguments) {
|
3902
|
+
const tx = new Transaction();
|
3903
|
+
builder.empty(tx, args, typeArguments);
|
3904
|
+
const inspectRes = await client.devInspectTransactionBlock({
|
3905
|
+
transactionBlock: tx,
|
3906
|
+
sender: ZERO_ADDRESS,
|
3907
|
+
});
|
3908
|
+
return (await getMoveCoder(client)).decodeDevInspectResult(inspectRes);
|
3909
|
+
}
|
3910
|
+
view.empty = empty;
|
3911
|
+
async function flatten(client, args, typeArguments) {
|
3912
|
+
const tx = new Transaction();
|
3913
|
+
builder.flatten(tx, args, typeArguments);
|
3914
|
+
const inspectRes = await client.devInspectTransactionBlock({
|
3915
|
+
transactionBlock: tx,
|
3916
|
+
sender: ZERO_ADDRESS,
|
3917
|
+
});
|
3918
|
+
return (await getMoveCoder(client)).decodeDevInspectResult(inspectRes);
|
3919
|
+
}
|
3920
|
+
view.flatten = flatten;
|
3921
|
+
async function indexOf(client, args, typeArguments) {
|
3922
|
+
const tx = new Transaction();
|
3923
|
+
builder.indexOf(tx, args, typeArguments);
|
3924
|
+
const inspectRes = await client.devInspectTransactionBlock({
|
3925
|
+
transactionBlock: tx,
|
3926
|
+
sender: ZERO_ADDRESS,
|
3927
|
+
});
|
3928
|
+
return (await getMoveCoder(client)).decodeDevInspectResult(inspectRes);
|
3929
|
+
}
|
3930
|
+
view.indexOf = indexOf;
|
3931
|
+
async function insert(client, args, typeArguments) {
|
3932
|
+
const tx = new Transaction();
|
3933
|
+
builder.insert(tx, args, typeArguments);
|
3934
|
+
const inspectRes = await client.devInspectTransactionBlock({
|
3935
|
+
transactionBlock: tx,
|
3936
|
+
sender: ZERO_ADDRESS,
|
3937
|
+
});
|
3938
|
+
return (await getMoveCoder(client)).decodeDevInspectResult(inspectRes);
|
3939
|
+
}
|
3940
|
+
view.insert = insert;
|
3941
|
+
async function isEmpty(client, args, typeArguments) {
|
3942
|
+
const tx = new Transaction();
|
3943
|
+
builder.isEmpty(tx, args, typeArguments);
|
3944
|
+
const inspectRes = await client.devInspectTransactionBlock({
|
3945
|
+
transactionBlock: tx,
|
3946
|
+
sender: ZERO_ADDRESS,
|
3947
|
+
});
|
3948
|
+
return (await getMoveCoder(client)).decodeDevInspectResult(inspectRes);
|
3949
|
+
}
|
3950
|
+
view.isEmpty = isEmpty;
|
3951
|
+
async function length(client, args, typeArguments) {
|
3952
|
+
const tx = new Transaction();
|
3953
|
+
builder.length(tx, args, typeArguments);
|
3954
|
+
const inspectRes = await client.devInspectTransactionBlock({
|
3955
|
+
transactionBlock: tx,
|
3956
|
+
sender: ZERO_ADDRESS,
|
3957
|
+
});
|
3958
|
+
return (await getMoveCoder(client)).decodeDevInspectResult(inspectRes);
|
3959
|
+
}
|
3960
|
+
view.length = length;
|
3961
|
+
async function popBack(client, args, typeArguments) {
|
3962
|
+
const tx = new Transaction();
|
3963
|
+
builder.popBack(tx, args, typeArguments);
|
3964
|
+
const inspectRes = await client.devInspectTransactionBlock({
|
3965
|
+
transactionBlock: tx,
|
3966
|
+
sender: ZERO_ADDRESS,
|
3967
|
+
});
|
3968
|
+
return (await getMoveCoder(client)).decodeDevInspectResult(inspectRes);
|
3969
|
+
}
|
3970
|
+
view.popBack = popBack;
|
3971
|
+
async function pushBack(client, args, typeArguments) {
|
3972
|
+
const tx = new Transaction();
|
3973
|
+
builder.pushBack(tx, args, typeArguments);
|
3974
|
+
const inspectRes = await client.devInspectTransactionBlock({
|
3975
|
+
transactionBlock: tx,
|
3976
|
+
sender: ZERO_ADDRESS,
|
3977
|
+
});
|
3978
|
+
return (await getMoveCoder(client)).decodeDevInspectResult(inspectRes);
|
3979
|
+
}
|
3980
|
+
view.pushBack = pushBack;
|
3981
|
+
async function remove(client, args, typeArguments) {
|
3982
|
+
const tx = new Transaction();
|
3983
|
+
builder.remove(tx, args, typeArguments);
|
3984
|
+
const inspectRes = await client.devInspectTransactionBlock({
|
3985
|
+
transactionBlock: tx,
|
3986
|
+
sender: ZERO_ADDRESS,
|
3987
|
+
});
|
3988
|
+
return (await getMoveCoder(client)).decodeDevInspectResult(inspectRes);
|
3989
|
+
}
|
3990
|
+
view.remove = remove;
|
3991
|
+
async function reverse(client, args, typeArguments) {
|
3992
|
+
const tx = new Transaction();
|
3993
|
+
builder.reverse(tx, args, typeArguments);
|
3994
|
+
const inspectRes = await client.devInspectTransactionBlock({
|
3995
|
+
transactionBlock: tx,
|
3996
|
+
sender: ZERO_ADDRESS,
|
3997
|
+
});
|
3998
|
+
return (await getMoveCoder(client)).decodeDevInspectResult(inspectRes);
|
3999
|
+
}
|
4000
|
+
view.reverse = reverse;
|
4001
|
+
async function singleton(client, args, typeArguments) {
|
4002
|
+
const tx = new Transaction();
|
4003
|
+
builder.singleton(tx, args, typeArguments);
|
4004
|
+
const inspectRes = await client.devInspectTransactionBlock({
|
4005
|
+
transactionBlock: tx,
|
4006
|
+
sender: ZERO_ADDRESS,
|
4007
|
+
});
|
4008
|
+
return (await getMoveCoder(client)).decodeDevInspectResult(inspectRes);
|
4009
|
+
}
|
4010
|
+
view.singleton = singleton;
|
4011
|
+
async function swap(client, args, typeArguments) {
|
4012
|
+
const tx = new Transaction();
|
4013
|
+
builder.swap(tx, args, typeArguments);
|
4014
|
+
const inspectRes = await client.devInspectTransactionBlock({
|
4015
|
+
transactionBlock: tx,
|
4016
|
+
sender: ZERO_ADDRESS,
|
4017
|
+
});
|
4018
|
+
return (await getMoveCoder(client)).decodeDevInspectResult(inspectRes);
|
4019
|
+
}
|
4020
|
+
view.swap = swap;
|
4021
|
+
async function swapRemove(client, args, typeArguments) {
|
4022
|
+
const tx = new Transaction();
|
4023
|
+
builder.swapRemove(tx, args, typeArguments);
|
4024
|
+
const inspectRes = await client.devInspectTransactionBlock({
|
4025
|
+
transactionBlock: tx,
|
4026
|
+
sender: ZERO_ADDRESS,
|
4027
|
+
});
|
4028
|
+
return (await getMoveCoder(client)).decodeDevInspectResult(inspectRes);
|
4029
|
+
}
|
4030
|
+
view.swapRemove = swapRemove;
|
4031
|
+
})(view = vector.view || (vector.view = {}));
|
4032
|
+
})(vector || (vector = {}));
|
176
4033
|
const MODULES = JSON.parse('{"address":{"fileFormatVersion":6,"address":"0x1","name":"address","friends":[],"structs":{},"exposedFunctions":{"length":{"visibility":"Public","isEntry":false,"typeParameters":[],"parameters":[],"return":["U64"]}}},"ascii":{"fileFormatVersion":6,"address":"0x1","name":"ascii","friends":[],"structs":{"Char":{"abilities":{"abilities":["Copy","Drop","Store"]},"typeParameters":[],"fields":[{"name":"byte","type":"U8"}]},"String":{"abilities":{"abilities":["Copy","Drop","Store"]},"typeParameters":[],"fields":[{"name":"bytes","type":{"Vector":"U8"}}]}},"exposedFunctions":{"all_characters_printable":{"visibility":"Public","isEntry":false,"typeParameters":[],"parameters":[{"Reference":{"Struct":{"address":"0x1","module":"ascii","name":"String","typeArguments":[]}}}],"return":["Bool"]},"append":{"visibility":"Public","isEntry":false,"typeParameters":[],"parameters":[{"MutableReference":{"Struct":{"address":"0x1","module":"ascii","name":"String","typeArguments":[]}}},{"Struct":{"address":"0x1","module":"ascii","name":"String","typeArguments":[]}}],"return":[]},"as_bytes":{"visibility":"Public","isEntry":false,"typeParameters":[],"parameters":[{"Reference":{"Struct":{"address":"0x1","module":"ascii","name":"String","typeArguments":[]}}}],"return":[{"Reference":{"Vector":"U8"}}]},"byte":{"visibility":"Public","isEntry":false,"typeParameters":[],"parameters":[{"Struct":{"address":"0x1","module":"ascii","name":"Char","typeArguments":[]}}],"return":["U8"]},"char":{"visibility":"Public","isEntry":false,"typeParameters":[],"parameters":["U8"],"return":[{"Struct":{"address":"0x1","module":"ascii","name":"Char","typeArguments":[]}}]},"index_of":{"visibility":"Public","isEntry":false,"typeParameters":[],"parameters":[{"Reference":{"Struct":{"address":"0x1","module":"ascii","name":"String","typeArguments":[]}}},{"Reference":{"Struct":{"address":"0x1","module":"ascii","name":"String","typeArguments":[]}}}],"return":["U64"]},"insert":{"visibility":"Public","isEntry":false,"typeParameters":[],"parameters":[{"MutableReference":{"Struct":{"address":"0x1","module":"ascii","name":"String","typeArguments":[]}}},"U64",{"Struct":{"address":"0x1","module":"ascii","name":"String","typeArguments":[]}}],"return":[]},"into_bytes":{"visibility":"Public","isEntry":false,"typeParameters":[],"parameters":[{"Struct":{"address":"0x1","module":"ascii","name":"String","typeArguments":[]}}],"return":[{"Vector":"U8"}]},"is_empty":{"visibility":"Public","isEntry":false,"typeParameters":[],"parameters":[{"Reference":{"Struct":{"address":"0x1","module":"ascii","name":"String","typeArguments":[]}}}],"return":["Bool"]},"is_printable_char":{"visibility":"Public","isEntry":false,"typeParameters":[],"parameters":["U8"],"return":["Bool"]},"is_valid_char":{"visibility":"Public","isEntry":false,"typeParameters":[],"parameters":["U8"],"return":["Bool"]},"length":{"visibility":"Public","isEntry":false,"typeParameters":[],"parameters":[{"Reference":{"Struct":{"address":"0x1","module":"ascii","name":"String","typeArguments":[]}}}],"return":["U64"]},"pop_char":{"visibility":"Public","isEntry":false,"typeParameters":[],"parameters":[{"MutableReference":{"Struct":{"address":"0x1","module":"ascii","name":"String","typeArguments":[]}}}],"return":[{"Struct":{"address":"0x1","module":"ascii","name":"Char","typeArguments":[]}}]},"push_char":{"visibility":"Public","isEntry":false,"typeParameters":[],"parameters":[{"MutableReference":{"Struct":{"address":"0x1","module":"ascii","name":"String","typeArguments":[]}}},{"Struct":{"address":"0x1","module":"ascii","name":"Char","typeArguments":[]}}],"return":[]},"string":{"visibility":"Public","isEntry":false,"typeParameters":[],"parameters":[{"Vector":"U8"}],"return":[{"Struct":{"address":"0x1","module":"ascii","name":"String","typeArguments":[]}}]},"substring":{"visibility":"Public","isEntry":false,"typeParameters":[],"parameters":[{"Reference":{"Struct":{"address":"0x1","module":"ascii","name":"String","typeArguments":[]}}},"U64","U64"],"return":[{"Struct":{"address":"0x1","module":"ascii","name":"String","typeArguments":[]}}]},"to_lowercase":{"visibility":"Public","isEntry":false,"typeParameters":[],"parameters":[{"Reference":{"Struct":{"address":"0x1","module":"ascii","name":"String","typeArguments":[]}}}],"return":[{"Struct":{"address":"0x1","module":"ascii","name":"String","typeArguments":[]}}]},"to_uppercase":{"visibility":"Public","isEntry":false,"typeParameters":[],"parameters":[{"Reference":{"Struct":{"address":"0x1","module":"ascii","name":"String","typeArguments":[]}}}],"return":[{"Struct":{"address":"0x1","module":"ascii","name":"String","typeArguments":[]}}]},"try_string":{"visibility":"Public","isEntry":false,"typeParameters":[],"parameters":[{"Vector":"U8"}],"return":[{"Struct":{"address":"0x1","module":"option","name":"Option","typeArguments":[{"Struct":{"address":"0x1","module":"ascii","name":"String","typeArguments":[]}}]}}]}}},"bcs":{"fileFormatVersion":6,"address":"0x1","name":"bcs","friends":[],"structs":{},"exposedFunctions":{"to_bytes":{"visibility":"Public","isEntry":false,"typeParameters":[{"abilities":[]}],"parameters":[{"Reference":{"TypeParameter":0}}],"return":[{"Vector":"U8"}]}}},"bit_vector":{"fileFormatVersion":6,"address":"0x1","name":"bit_vector","friends":[],"structs":{"BitVector":{"abilities":{"abilities":["Copy","Drop","Store"]},"typeParameters":[],"fields":[{"name":"length","type":"U64"},{"name":"bit_field","type":{"Vector":"Bool"}}]}},"exposedFunctions":{"is_index_set":{"visibility":"Public","isEntry":false,"typeParameters":[],"parameters":[{"Reference":{"Struct":{"address":"0x1","module":"bit_vector","name":"BitVector","typeArguments":[]}}},"U64"],"return":["Bool"]},"length":{"visibility":"Public","isEntry":false,"typeParameters":[],"parameters":[{"Reference":{"Struct":{"address":"0x1","module":"bit_vector","name":"BitVector","typeArguments":[]}}}],"return":["U64"]},"longest_set_sequence_starting_at":{"visibility":"Public","isEntry":false,"typeParameters":[],"parameters":[{"Reference":{"Struct":{"address":"0x1","module":"bit_vector","name":"BitVector","typeArguments":[]}}},"U64"],"return":["U64"]},"new":{"visibility":"Public","isEntry":false,"typeParameters":[],"parameters":["U64"],"return":[{"Struct":{"address":"0x1","module":"bit_vector","name":"BitVector","typeArguments":[]}}]},"set":{"visibility":"Public","isEntry":false,"typeParameters":[],"parameters":[{"MutableReference":{"Struct":{"address":"0x1","module":"bit_vector","name":"BitVector","typeArguments":[]}}},"U64"],"return":[]},"shift_left":{"visibility":"Public","isEntry":false,"typeParameters":[],"parameters":[{"MutableReference":{"Struct":{"address":"0x1","module":"bit_vector","name":"BitVector","typeArguments":[]}}},"U64"],"return":[]},"unset":{"visibility":"Public","isEntry":false,"typeParameters":[],"parameters":[{"MutableReference":{"Struct":{"address":"0x1","module":"bit_vector","name":"BitVector","typeArguments":[]}}},"U64"],"return":[]}}},"debug":{"fileFormatVersion":6,"address":"0x1","name":"debug","friends":[],"structs":{},"exposedFunctions":{"print":{"visibility":"Public","isEntry":false,"typeParameters":[{"abilities":[]}],"parameters":[{"Reference":{"TypeParameter":0}}],"return":[]},"print_stack_trace":{"visibility":"Public","isEntry":false,"typeParameters":[],"parameters":[],"return":[]}}},"fixed_point32":{"fileFormatVersion":6,"address":"0x1","name":"fixed_point32","friends":[],"structs":{"FixedPoint32":{"abilities":{"abilities":["Copy","Drop","Store"]},"typeParameters":[],"fields":[{"name":"value","type":"U64"}]}},"exposedFunctions":{"create_from_rational":{"visibility":"Public","isEntry":false,"typeParameters":[],"parameters":["U64","U64"],"return":[{"Struct":{"address":"0x1","module":"fixed_point32","name":"FixedPoint32","typeArguments":[]}}]},"create_from_raw_value":{"visibility":"Public","isEntry":false,"typeParameters":[],"parameters":["U64"],"return":[{"Struct":{"address":"0x1","module":"fixed_point32","name":"FixedPoint32","typeArguments":[]}}]},"divide_u64":{"visibility":"Public","isEntry":false,"typeParameters":[],"parameters":["U64",{"Struct":{"address":"0x1","module":"fixed_point32","name":"FixedPoint32","typeArguments":[]}}],"return":["U64"]},"get_raw_value":{"visibility":"Public","isEntry":false,"typeParameters":[],"parameters":[{"Struct":{"address":"0x1","module":"fixed_point32","name":"FixedPoint32","typeArguments":[]}}],"return":["U64"]},"is_zero":{"visibility":"Public","isEntry":false,"typeParameters":[],"parameters":[{"Struct":{"address":"0x1","module":"fixed_point32","name":"FixedPoint32","typeArguments":[]}}],"return":["Bool"]},"multiply_u64":{"visibility":"Public","isEntry":false,"typeParameters":[],"parameters":["U64",{"Struct":{"address":"0x1","module":"fixed_point32","name":"FixedPoint32","typeArguments":[]}}],"return":["U64"]}}},"hash":{"fileFormatVersion":6,"address":"0x1","name":"hash","friends":[],"structs":{},"exposedFunctions":{"sha2_256":{"visibility":"Public","isEntry":false,"typeParameters":[],"parameters":[{"Vector":"U8"}],"return":[{"Vector":"U8"}]},"sha3_256":{"visibility":"Public","isEntry":false,"typeParameters":[],"parameters":[{"Vector":"U8"}],"return":[{"Vector":"U8"}]}}},"macros":{"fileFormatVersion":6,"address":"0x1","name":"macros","friends":[],"structs":{},"exposedFunctions":{}},"option":{"fileFormatVersion":6,"address":"0x1","name":"option","friends":[],"structs":{"Option":{"abilities":{"abilities":["Copy","Drop","Store"]},"typeParameters":[{"constraints":{"abilities":[]},"isPhantom":false}],"fields":[{"name":"vec","type":{"Vector":{"TypeParameter":0}}}]}},"exposedFunctions":{"borrow":{"visibility":"Public","isEntry":false,"typeParameters":[{"abilities":[]}],"parameters":[{"Reference":{"Struct":{"address":"0x1","module":"option","name":"Option","typeArguments":[{"TypeParameter":0}]}}}],"return":[{"Reference":{"TypeParameter":0}}]},"borrow_mut":{"visibility":"Public","isEntry":false,"typeParameters":[{"abilities":[]}],"parameters":[{"MutableReference":{"Struct":{"address":"0x1","module":"option","name":"Option","typeArguments":[{"TypeParameter":0}]}}}],"return":[{"MutableReference":{"TypeParameter":0}}]},"borrow_with_default":{"visibility":"Public","isEntry":false,"typeParameters":[{"abilities":[]}],"parameters":[{"Reference":{"Struct":{"address":"0x1","module":"option","name":"Option","typeArguments":[{"TypeParameter":0}]}}},{"Reference":{"TypeParameter":0}}],"return":[{"Reference":{"TypeParameter":0}}]},"contains":{"visibility":"Public","isEntry":false,"typeParameters":[{"abilities":[]}],"parameters":[{"Reference":{"Struct":{"address":"0x1","module":"option","name":"Option","typeArguments":[{"TypeParameter":0}]}}},{"Reference":{"TypeParameter":0}}],"return":["Bool"]},"destroy_none":{"visibility":"Public","isEntry":false,"typeParameters":[{"abilities":[]}],"parameters":[{"Struct":{"address":"0x1","module":"option","name":"Option","typeArguments":[{"TypeParameter":0}]}}],"return":[]},"destroy_some":{"visibility":"Public","isEntry":false,"typeParameters":[{"abilities":[]}],"parameters":[{"Struct":{"address":"0x1","module":"option","name":"Option","typeArguments":[{"TypeParameter":0}]}}],"return":[{"TypeParameter":0}]},"destroy_with_default":{"visibility":"Public","isEntry":false,"typeParameters":[{"abilities":["Drop"]}],"parameters":[{"Struct":{"address":"0x1","module":"option","name":"Option","typeArguments":[{"TypeParameter":0}]}},{"TypeParameter":0}],"return":[{"TypeParameter":0}]},"extract":{"visibility":"Public","isEntry":false,"typeParameters":[{"abilities":[]}],"parameters":[{"MutableReference":{"Struct":{"address":"0x1","module":"option","name":"Option","typeArguments":[{"TypeParameter":0}]}}}],"return":[{"TypeParameter":0}]},"fill":{"visibility":"Public","isEntry":false,"typeParameters":[{"abilities":[]}],"parameters":[{"MutableReference":{"Struct":{"address":"0x1","module":"option","name":"Option","typeArguments":[{"TypeParameter":0}]}}},{"TypeParameter":0}],"return":[]},"get_with_default":{"visibility":"Public","isEntry":false,"typeParameters":[{"abilities":["Copy","Drop"]}],"parameters":[{"Reference":{"Struct":{"address":"0x1","module":"option","name":"Option","typeArguments":[{"TypeParameter":0}]}}},{"TypeParameter":0}],"return":[{"TypeParameter":0}]},"is_none":{"visibility":"Public","isEntry":false,"typeParameters":[{"abilities":[]}],"parameters":[{"Reference":{"Struct":{"address":"0x1","module":"option","name":"Option","typeArguments":[{"TypeParameter":0}]}}}],"return":["Bool"]},"is_some":{"visibility":"Public","isEntry":false,"typeParameters":[{"abilities":[]}],"parameters":[{"Reference":{"Struct":{"address":"0x1","module":"option","name":"Option","typeArguments":[{"TypeParameter":0}]}}}],"return":["Bool"]},"none":{"visibility":"Public","isEntry":false,"typeParameters":[{"abilities":[]}],"parameters":[],"return":[{"Struct":{"address":"0x1","module":"option","name":"Option","typeArguments":[{"TypeParameter":0}]}}]},"some":{"visibility":"Public","isEntry":false,"typeParameters":[{"abilities":[]}],"parameters":[{"TypeParameter":0}],"return":[{"Struct":{"address":"0x1","module":"option","name":"Option","typeArguments":[{"TypeParameter":0}]}}]},"swap":{"visibility":"Public","isEntry":false,"typeParameters":[{"abilities":[]}],"parameters":[{"MutableReference":{"Struct":{"address":"0x1","module":"option","name":"Option","typeArguments":[{"TypeParameter":0}]}}},{"TypeParameter":0}],"return":[{"TypeParameter":0}]},"swap_or_fill":{"visibility":"Public","isEntry":false,"typeParameters":[{"abilities":[]}],"parameters":[{"MutableReference":{"Struct":{"address":"0x1","module":"option","name":"Option","typeArguments":[{"TypeParameter":0}]}}},{"TypeParameter":0}],"return":[{"Struct":{"address":"0x1","module":"option","name":"Option","typeArguments":[{"TypeParameter":0}]}}]},"to_vec":{"visibility":"Public","isEntry":false,"typeParameters":[{"abilities":[]}],"parameters":[{"Struct":{"address":"0x1","module":"option","name":"Option","typeArguments":[{"TypeParameter":0}]}}],"return":[{"Vector":{"TypeParameter":0}}]}}},"string":{"fileFormatVersion":6,"address":"0x1","name":"string","friends":[],"structs":{"String":{"abilities":{"abilities":["Copy","Drop","Store"]},"typeParameters":[],"fields":[{"name":"bytes","type":{"Vector":"U8"}}]}},"exposedFunctions":{"append":{"visibility":"Public","isEntry":false,"typeParameters":[],"parameters":[{"MutableReference":{"Struct":{"address":"0x1","module":"string","name":"String","typeArguments":[]}}},{"Struct":{"address":"0x1","module":"string","name":"String","typeArguments":[]}}],"return":[]},"append_utf8":{"visibility":"Public","isEntry":false,"typeParameters":[],"parameters":[{"MutableReference":{"Struct":{"address":"0x1","module":"string","name":"String","typeArguments":[]}}},{"Vector":"U8"}],"return":[]},"as_bytes":{"visibility":"Public","isEntry":false,"typeParameters":[],"parameters":[{"Reference":{"Struct":{"address":"0x1","module":"string","name":"String","typeArguments":[]}}}],"return":[{"Reference":{"Vector":"U8"}}]},"bytes":{"visibility":"Public","isEntry":false,"typeParameters":[],"parameters":[{"Reference":{"Struct":{"address":"0x1","module":"string","name":"String","typeArguments":[]}}}],"return":[{"Reference":{"Vector":"U8"}}]},"from_ascii":{"visibility":"Public","isEntry":false,"typeParameters":[],"parameters":[{"Struct":{"address":"0x1","module":"ascii","name":"String","typeArguments":[]}}],"return":[{"Struct":{"address":"0x1","module":"string","name":"String","typeArguments":[]}}]},"index_of":{"visibility":"Public","isEntry":false,"typeParameters":[],"parameters":[{"Reference":{"Struct":{"address":"0x1","module":"string","name":"String","typeArguments":[]}}},{"Reference":{"Struct":{"address":"0x1","module":"string","name":"String","typeArguments":[]}}}],"return":["U64"]},"insert":{"visibility":"Public","isEntry":false,"typeParameters":[],"parameters":[{"MutableReference":{"Struct":{"address":"0x1","module":"string","name":"String","typeArguments":[]}}},"U64",{"Struct":{"address":"0x1","module":"string","name":"String","typeArguments":[]}}],"return":[]},"into_bytes":{"visibility":"Public","isEntry":false,"typeParameters":[],"parameters":[{"Struct":{"address":"0x1","module":"string","name":"String","typeArguments":[]}}],"return":[{"Vector":"U8"}]},"is_empty":{"visibility":"Public","isEntry":false,"typeParameters":[],"parameters":[{"Reference":{"Struct":{"address":"0x1","module":"string","name":"String","typeArguments":[]}}}],"return":["Bool"]},"length":{"visibility":"Public","isEntry":false,"typeParameters":[],"parameters":[{"Reference":{"Struct":{"address":"0x1","module":"string","name":"String","typeArguments":[]}}}],"return":["U64"]},"sub_string":{"visibility":"Public","isEntry":false,"typeParameters":[],"parameters":[{"Reference":{"Struct":{"address":"0x1","module":"string","name":"String","typeArguments":[]}}},"U64","U64"],"return":[{"Struct":{"address":"0x1","module":"string","name":"String","typeArguments":[]}}]},"substring":{"visibility":"Public","isEntry":false,"typeParameters":[],"parameters":[{"Reference":{"Struct":{"address":"0x1","module":"string","name":"String","typeArguments":[]}}},"U64","U64"],"return":[{"Struct":{"address":"0x1","module":"string","name":"String","typeArguments":[]}}]},"to_ascii":{"visibility":"Public","isEntry":false,"typeParameters":[],"parameters":[{"Struct":{"address":"0x1","module":"string","name":"String","typeArguments":[]}}],"return":[{"Struct":{"address":"0x1","module":"ascii","name":"String","typeArguments":[]}}]},"try_utf8":{"visibility":"Public","isEntry":false,"typeParameters":[],"parameters":[{"Vector":"U8"}],"return":[{"Struct":{"address":"0x1","module":"option","name":"Option","typeArguments":[{"Struct":{"address":"0x1","module":"string","name":"String","typeArguments":[]}}]}}]},"utf8":{"visibility":"Public","isEntry":false,"typeParameters":[],"parameters":[{"Vector":"U8"}],"return":[{"Struct":{"address":"0x1","module":"string","name":"String","typeArguments":[]}}]}}},"type_name":{"fileFormatVersion":6,"address":"0x1","name":"type_name","friends":[],"structs":{"TypeName":{"abilities":{"abilities":["Copy","Drop","Store"]},"typeParameters":[],"fields":[{"name":"name","type":{"Struct":{"address":"0x1","module":"ascii","name":"String","typeArguments":[]}}}]}},"exposedFunctions":{"borrow_string":{"visibility":"Public","isEntry":false,"typeParameters":[],"parameters":[{"Reference":{"Struct":{"address":"0x1","module":"type_name","name":"TypeName","typeArguments":[]}}}],"return":[{"Reference":{"Struct":{"address":"0x1","module":"ascii","name":"String","typeArguments":[]}}}]},"get":{"visibility":"Public","isEntry":false,"typeParameters":[{"abilities":[]}],"parameters":[],"return":[{"Struct":{"address":"0x1","module":"type_name","name":"TypeName","typeArguments":[]}}]},"get_address":{"visibility":"Public","isEntry":false,"typeParameters":[],"parameters":[{"Reference":{"Struct":{"address":"0x1","module":"type_name","name":"TypeName","typeArguments":[]}}}],"return":[{"Struct":{"address":"0x1","module":"ascii","name":"String","typeArguments":[]}}]},"get_module":{"visibility":"Public","isEntry":false,"typeParameters":[],"parameters":[{"Reference":{"Struct":{"address":"0x1","module":"type_name","name":"TypeName","typeArguments":[]}}}],"return":[{"Struct":{"address":"0x1","module":"ascii","name":"String","typeArguments":[]}}]},"get_with_original_ids":{"visibility":"Public","isEntry":false,"typeParameters":[{"abilities":[]}],"parameters":[],"return":[{"Struct":{"address":"0x1","module":"type_name","name":"TypeName","typeArguments":[]}}]},"into_string":{"visibility":"Public","isEntry":false,"typeParameters":[],"parameters":[{"Struct":{"address":"0x1","module":"type_name","name":"TypeName","typeArguments":[]}}],"return":[{"Struct":{"address":"0x1","module":"ascii","name":"String","typeArguments":[]}}]},"is_primitive":{"visibility":"Public","isEntry":false,"typeParameters":[],"parameters":[{"Reference":{"Struct":{"address":"0x1","module":"type_name","name":"TypeName","typeArguments":[]}}}],"return":["Bool"]}}},"u128":{"fileFormatVersion":6,"address":"0x1","name":"u128","friends":[],"structs":{},"exposedFunctions":{"bitwise_not":{"visibility":"Public","isEntry":false,"typeParameters":[],"parameters":["U128"],"return":["U128"]},"diff":{"visibility":"Public","isEntry":false,"typeParameters":[],"parameters":["U128","U128"],"return":["U128"]},"divide_and_round_up":{"visibility":"Public","isEntry":false,"typeParameters":[],"parameters":["U128","U128"],"return":["U128"]},"max":{"visibility":"Public","isEntry":false,"typeParameters":[],"parameters":["U128","U128"],"return":["U128"]},"min":{"visibility":"Public","isEntry":false,"typeParameters":[],"parameters":["U128","U128"],"return":["U128"]},"pow":{"visibility":"Public","isEntry":false,"typeParameters":[],"parameters":["U128","U8"],"return":["U128"]},"sqrt":{"visibility":"Public","isEntry":false,"typeParameters":[],"parameters":["U128"],"return":["U128"]},"to_string":{"visibility":"Public","isEntry":false,"typeParameters":[],"parameters":["U128"],"return":[{"Struct":{"address":"0x1","module":"string","name":"String","typeArguments":[]}}]},"try_as_u16":{"visibility":"Public","isEntry":false,"typeParameters":[],"parameters":["U128"],"return":[{"Struct":{"address":"0x1","module":"option","name":"Option","typeArguments":["U16"]}}]},"try_as_u32":{"visibility":"Public","isEntry":false,"typeParameters":[],"parameters":["U128"],"return":[{"Struct":{"address":"0x1","module":"option","name":"Option","typeArguments":["U32"]}}]},"try_as_u64":{"visibility":"Public","isEntry":false,"typeParameters":[],"parameters":["U128"],"return":[{"Struct":{"address":"0x1","module":"option","name":"Option","typeArguments":["U64"]}}]},"try_as_u8":{"visibility":"Public","isEntry":false,"typeParameters":[],"parameters":["U128"],"return":[{"Struct":{"address":"0x1","module":"option","name":"Option","typeArguments":["U8"]}}]}}},"u16":{"fileFormatVersion":6,"address":"0x1","name":"u16","friends":[],"structs":{},"exposedFunctions":{"bitwise_not":{"visibility":"Public","isEntry":false,"typeParameters":[],"parameters":["U16"],"return":["U16"]},"diff":{"visibility":"Public","isEntry":false,"typeParameters":[],"parameters":["U16","U16"],"return":["U16"]},"divide_and_round_up":{"visibility":"Public","isEntry":false,"typeParameters":[],"parameters":["U16","U16"],"return":["U16"]},"max":{"visibility":"Public","isEntry":false,"typeParameters":[],"parameters":["U16","U16"],"return":["U16"]},"min":{"visibility":"Public","isEntry":false,"typeParameters":[],"parameters":["U16","U16"],"return":["U16"]},"pow":{"visibility":"Public","isEntry":false,"typeParameters":[],"parameters":["U16","U8"],"return":["U16"]},"sqrt":{"visibility":"Public","isEntry":false,"typeParameters":[],"parameters":["U16"],"return":["U16"]},"to_string":{"visibility":"Public","isEntry":false,"typeParameters":[],"parameters":["U16"],"return":[{"Struct":{"address":"0x1","module":"string","name":"String","typeArguments":[]}}]},"try_as_u8":{"visibility":"Public","isEntry":false,"typeParameters":[],"parameters":["U16"],"return":[{"Struct":{"address":"0x1","module":"option","name":"Option","typeArguments":["U8"]}}]}}},"u256":{"fileFormatVersion":6,"address":"0x1","name":"u256","friends":[],"structs":{},"exposedFunctions":{"bitwise_not":{"visibility":"Public","isEntry":false,"typeParameters":[],"parameters":["U256"],"return":["U256"]},"diff":{"visibility":"Public","isEntry":false,"typeParameters":[],"parameters":["U256","U256"],"return":["U256"]},"divide_and_round_up":{"visibility":"Public","isEntry":false,"typeParameters":[],"parameters":["U256","U256"],"return":["U256"]},"max":{"visibility":"Public","isEntry":false,"typeParameters":[],"parameters":["U256","U256"],"return":["U256"]},"min":{"visibility":"Public","isEntry":false,"typeParameters":[],"parameters":["U256","U256"],"return":["U256"]},"pow":{"visibility":"Public","isEntry":false,"typeParameters":[],"parameters":["U256","U8"],"return":["U256"]},"to_string":{"visibility":"Public","isEntry":false,"typeParameters":[],"parameters":["U256"],"return":[{"Struct":{"address":"0x1","module":"string","name":"String","typeArguments":[]}}]},"try_as_u128":{"visibility":"Public","isEntry":false,"typeParameters":[],"parameters":["U256"],"return":[{"Struct":{"address":"0x1","module":"option","name":"Option","typeArguments":["U128"]}}]},"try_as_u16":{"visibility":"Public","isEntry":false,"typeParameters":[],"parameters":["U256"],"return":[{"Struct":{"address":"0x1","module":"option","name":"Option","typeArguments":["U16"]}}]},"try_as_u32":{"visibility":"Public","isEntry":false,"typeParameters":[],"parameters":["U256"],"return":[{"Struct":{"address":"0x1","module":"option","name":"Option","typeArguments":["U32"]}}]},"try_as_u64":{"visibility":"Public","isEntry":false,"typeParameters":[],"parameters":["U256"],"return":[{"Struct":{"address":"0x1","module":"option","name":"Option","typeArguments":["U64"]}}]},"try_as_u8":{"visibility":"Public","isEntry":false,"typeParameters":[],"parameters":["U256"],"return":[{"Struct":{"address":"0x1","module":"option","name":"Option","typeArguments":["U8"]}}]}}},"u32":{"fileFormatVersion":6,"address":"0x1","name":"u32","friends":[],"structs":{},"exposedFunctions":{"bitwise_not":{"visibility":"Public","isEntry":false,"typeParameters":[],"parameters":["U32"],"return":["U32"]},"diff":{"visibility":"Public","isEntry":false,"typeParameters":[],"parameters":["U32","U32"],"return":["U32"]},"divide_and_round_up":{"visibility":"Public","isEntry":false,"typeParameters":[],"parameters":["U32","U32"],"return":["U32"]},"max":{"visibility":"Public","isEntry":false,"typeParameters":[],"parameters":["U32","U32"],"return":["U32"]},"min":{"visibility":"Public","isEntry":false,"typeParameters":[],"parameters":["U32","U32"],"return":["U32"]},"pow":{"visibility":"Public","isEntry":false,"typeParameters":[],"parameters":["U32","U8"],"return":["U32"]},"sqrt":{"visibility":"Public","isEntry":false,"typeParameters":[],"parameters":["U32"],"return":["U32"]},"to_string":{"visibility":"Public","isEntry":false,"typeParameters":[],"parameters":["U32"],"return":[{"Struct":{"address":"0x1","module":"string","name":"String","typeArguments":[]}}]},"try_as_u16":{"visibility":"Public","isEntry":false,"typeParameters":[],"parameters":["U32"],"return":[{"Struct":{"address":"0x1","module":"option","name":"Option","typeArguments":["U16"]}}]},"try_as_u8":{"visibility":"Public","isEntry":false,"typeParameters":[],"parameters":["U32"],"return":[{"Struct":{"address":"0x1","module":"option","name":"Option","typeArguments":["U8"]}}]}}},"u64":{"fileFormatVersion":6,"address":"0x1","name":"u64","friends":[],"structs":{},"exposedFunctions":{"bitwise_not":{"visibility":"Public","isEntry":false,"typeParameters":[],"parameters":["U64"],"return":["U64"]},"diff":{"visibility":"Public","isEntry":false,"typeParameters":[],"parameters":["U64","U64"],"return":["U64"]},"divide_and_round_up":{"visibility":"Public","isEntry":false,"typeParameters":[],"parameters":["U64","U64"],"return":["U64"]},"max":{"visibility":"Public","isEntry":false,"typeParameters":[],"parameters":["U64","U64"],"return":["U64"]},"min":{"visibility":"Public","isEntry":false,"typeParameters":[],"parameters":["U64","U64"],"return":["U64"]},"pow":{"visibility":"Public","isEntry":false,"typeParameters":[],"parameters":["U64","U8"],"return":["U64"]},"sqrt":{"visibility":"Public","isEntry":false,"typeParameters":[],"parameters":["U64"],"return":["U64"]},"to_string":{"visibility":"Public","isEntry":false,"typeParameters":[],"parameters":["U64"],"return":[{"Struct":{"address":"0x1","module":"string","name":"String","typeArguments":[]}}]},"try_as_u16":{"visibility":"Public","isEntry":false,"typeParameters":[],"parameters":["U64"],"return":[{"Struct":{"address":"0x1","module":"option","name":"Option","typeArguments":["U16"]}}]},"try_as_u32":{"visibility":"Public","isEntry":false,"typeParameters":[],"parameters":["U64"],"return":[{"Struct":{"address":"0x1","module":"option","name":"Option","typeArguments":["U32"]}}]},"try_as_u8":{"visibility":"Public","isEntry":false,"typeParameters":[],"parameters":["U64"],"return":[{"Struct":{"address":"0x1","module":"option","name":"Option","typeArguments":["U8"]}}]}}},"u8":{"fileFormatVersion":6,"address":"0x1","name":"u8","friends":[],"structs":{},"exposedFunctions":{"bitwise_not":{"visibility":"Public","isEntry":false,"typeParameters":[],"parameters":["U8"],"return":["U8"]},"diff":{"visibility":"Public","isEntry":false,"typeParameters":[],"parameters":["U8","U8"],"return":["U8"]},"divide_and_round_up":{"visibility":"Public","isEntry":false,"typeParameters":[],"parameters":["U8","U8"],"return":["U8"]},"max":{"visibility":"Public","isEntry":false,"typeParameters":[],"parameters":["U8","U8"],"return":["U8"]},"min":{"visibility":"Public","isEntry":false,"typeParameters":[],"parameters":["U8","U8"],"return":["U8"]},"pow":{"visibility":"Public","isEntry":false,"typeParameters":[],"parameters":["U8","U8"],"return":["U8"]},"sqrt":{"visibility":"Public","isEntry":false,"typeParameters":[],"parameters":["U8"],"return":["U8"]},"to_string":{"visibility":"Public","isEntry":false,"typeParameters":[],"parameters":["U8"],"return":[{"Struct":{"address":"0x1","module":"string","name":"String","typeArguments":[]}}]}}},"uq32_32":{"fileFormatVersion":6,"address":"0x1","name":"uq32_32","friends":[],"structs":{"UQ32_32":{"abilities":{"abilities":["Copy","Drop","Store"]},"typeParameters":[],"fields":[{"name":"pos0","type":"U64"}]}},"exposedFunctions":{"add":{"visibility":"Public","isEntry":false,"typeParameters":[],"parameters":[{"Struct":{"address":"0x1","module":"uq32_32","name":"UQ32_32","typeArguments":[]}},{"Struct":{"address":"0x1","module":"uq32_32","name":"UQ32_32","typeArguments":[]}}],"return":[{"Struct":{"address":"0x1","module":"uq32_32","name":"UQ32_32","typeArguments":[]}}]},"div":{"visibility":"Public","isEntry":false,"typeParameters":[],"parameters":[{"Struct":{"address":"0x1","module":"uq32_32","name":"UQ32_32","typeArguments":[]}},{"Struct":{"address":"0x1","module":"uq32_32","name":"UQ32_32","typeArguments":[]}}],"return":[{"Struct":{"address":"0x1","module":"uq32_32","name":"UQ32_32","typeArguments":[]}}]},"from_int":{"visibility":"Public","isEntry":false,"typeParameters":[],"parameters":["U32"],"return":[{"Struct":{"address":"0x1","module":"uq32_32","name":"UQ32_32","typeArguments":[]}}]},"from_quotient":{"visibility":"Public","isEntry":false,"typeParameters":[],"parameters":["U64","U64"],"return":[{"Struct":{"address":"0x1","module":"uq32_32","name":"UQ32_32","typeArguments":[]}}]},"from_raw":{"visibility":"Public","isEntry":false,"typeParameters":[],"parameters":["U64"],"return":[{"Struct":{"address":"0x1","module":"uq32_32","name":"UQ32_32","typeArguments":[]}}]},"ge":{"visibility":"Public","isEntry":false,"typeParameters":[],"parameters":[{"Struct":{"address":"0x1","module":"uq32_32","name":"UQ32_32","typeArguments":[]}},{"Struct":{"address":"0x1","module":"uq32_32","name":"UQ32_32","typeArguments":[]}}],"return":["Bool"]},"gt":{"visibility":"Public","isEntry":false,"typeParameters":[],"parameters":[{"Struct":{"address":"0x1","module":"uq32_32","name":"UQ32_32","typeArguments":[]}},{"Struct":{"address":"0x1","module":"uq32_32","name":"UQ32_32","typeArguments":[]}}],"return":["Bool"]},"int_div":{"visibility":"Public","isEntry":false,"typeParameters":[],"parameters":["U64",{"Struct":{"address":"0x1","module":"uq32_32","name":"UQ32_32","typeArguments":[]}}],"return":["U64"]},"int_mul":{"visibility":"Public","isEntry":false,"typeParameters":[],"parameters":["U64",{"Struct":{"address":"0x1","module":"uq32_32","name":"UQ32_32","typeArguments":[]}}],"return":["U64"]},"le":{"visibility":"Public","isEntry":false,"typeParameters":[],"parameters":[{"Struct":{"address":"0x1","module":"uq32_32","name":"UQ32_32","typeArguments":[]}},{"Struct":{"address":"0x1","module":"uq32_32","name":"UQ32_32","typeArguments":[]}}],"return":["Bool"]},"lt":{"visibility":"Public","isEntry":false,"typeParameters":[],"parameters":[{"Struct":{"address":"0x1","module":"uq32_32","name":"UQ32_32","typeArguments":[]}},{"Struct":{"address":"0x1","module":"uq32_32","name":"UQ32_32","typeArguments":[]}}],"return":["Bool"]},"mul":{"visibility":"Public","isEntry":false,"typeParameters":[],"parameters":[{"Struct":{"address":"0x1","module":"uq32_32","name":"UQ32_32","typeArguments":[]}},{"Struct":{"address":"0x1","module":"uq32_32","name":"UQ32_32","typeArguments":[]}}],"return":[{"Struct":{"address":"0x1","module":"uq32_32","name":"UQ32_32","typeArguments":[]}}]},"sub":{"visibility":"Public","isEntry":false,"typeParameters":[],"parameters":[{"Struct":{"address":"0x1","module":"uq32_32","name":"UQ32_32","typeArguments":[]}},{"Struct":{"address":"0x1","module":"uq32_32","name":"UQ32_32","typeArguments":[]}}],"return":[{"Struct":{"address":"0x1","module":"uq32_32","name":"UQ32_32","typeArguments":[]}}]},"to_int":{"visibility":"Public","isEntry":false,"typeParameters":[],"parameters":[{"Struct":{"address":"0x1","module":"uq32_32","name":"UQ32_32","typeArguments":[]}}],"return":["U32"]},"to_raw":{"visibility":"Public","isEntry":false,"typeParameters":[],"parameters":[{"Struct":{"address":"0x1","module":"uq32_32","name":"UQ32_32","typeArguments":[]}}],"return":["U64"]}}},"vector":{"fileFormatVersion":6,"address":"0x1","name":"vector","friends":[],"structs":{},"exposedFunctions":{"append":{"visibility":"Public","isEntry":false,"typeParameters":[{"abilities":[]}],"parameters":[{"MutableReference":{"Vector":{"TypeParameter":0}}},{"Vector":{"TypeParameter":0}}],"return":[]},"borrow":{"visibility":"Public","isEntry":false,"typeParameters":[{"abilities":[]}],"parameters":[{"Reference":{"Vector":{"TypeParameter":0}}},"U64"],"return":[{"Reference":{"TypeParameter":0}}]},"borrow_mut":{"visibility":"Public","isEntry":false,"typeParameters":[{"abilities":[]}],"parameters":[{"MutableReference":{"Vector":{"TypeParameter":0}}},"U64"],"return":[{"MutableReference":{"TypeParameter":0}}]},"contains":{"visibility":"Public","isEntry":false,"typeParameters":[{"abilities":[]}],"parameters":[{"Reference":{"Vector":{"TypeParameter":0}}},{"Reference":{"TypeParameter":0}}],"return":["Bool"]},"destroy_empty":{"visibility":"Public","isEntry":false,"typeParameters":[{"abilities":[]}],"parameters":[{"Vector":{"TypeParameter":0}}],"return":[]},"empty":{"visibility":"Public","isEntry":false,"typeParameters":[{"abilities":[]}],"parameters":[],"return":[{"Vector":{"TypeParameter":0}}]},"flatten":{"visibility":"Public","isEntry":false,"typeParameters":[{"abilities":[]}],"parameters":[{"Vector":{"Vector":{"TypeParameter":0}}}],"return":[{"Vector":{"TypeParameter":0}}]},"index_of":{"visibility":"Public","isEntry":false,"typeParameters":[{"abilities":[]}],"parameters":[{"Reference":{"Vector":{"TypeParameter":0}}},{"Reference":{"TypeParameter":0}}],"return":["Bool","U64"]},"insert":{"visibility":"Public","isEntry":false,"typeParameters":[{"abilities":[]}],"parameters":[{"MutableReference":{"Vector":{"TypeParameter":0}}},{"TypeParameter":0},"U64"],"return":[]},"is_empty":{"visibility":"Public","isEntry":false,"typeParameters":[{"abilities":[]}],"parameters":[{"Reference":{"Vector":{"TypeParameter":0}}}],"return":["Bool"]},"length":{"visibility":"Public","isEntry":false,"typeParameters":[{"abilities":[]}],"parameters":[{"Reference":{"Vector":{"TypeParameter":0}}}],"return":["U64"]},"pop_back":{"visibility":"Public","isEntry":false,"typeParameters":[{"abilities":[]}],"parameters":[{"MutableReference":{"Vector":{"TypeParameter":0}}}],"return":[{"TypeParameter":0}]},"push_back":{"visibility":"Public","isEntry":false,"typeParameters":[{"abilities":[]}],"parameters":[{"MutableReference":{"Vector":{"TypeParameter":0}}},{"TypeParameter":0}],"return":[]},"remove":{"visibility":"Public","isEntry":false,"typeParameters":[{"abilities":[]}],"parameters":[{"MutableReference":{"Vector":{"TypeParameter":0}}},"U64"],"return":[{"TypeParameter":0}]},"reverse":{"visibility":"Public","isEntry":false,"typeParameters":[{"abilities":[]}],"parameters":[{"MutableReference":{"Vector":{"TypeParameter":0}}}],"return":[]},"singleton":{"visibility":"Public","isEntry":false,"typeParameters":[{"abilities":[]}],"parameters":[{"TypeParameter":0}],"return":[{"Vector":{"TypeParameter":0}}]},"swap":{"visibility":"Public","isEntry":false,"typeParameters":[{"abilities":[]}],"parameters":[{"MutableReference":{"Vector":{"TypeParameter":0}}},"U64","U64"],"return":[]},"swap_remove":{"visibility":"Public","isEntry":false,"typeParameters":[{"abilities":[]}],"parameters":[{"MutableReference":{"Vector":{"TypeParameter":0}}},"U64"],"return":[{"TypeParameter":0}]}}}}');
|
177
4034
|
export function loadAllTypes(coder) {
|
178
4035
|
for (const m of Object.values(MODULES)) {
|