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