@typemove/sui 1.0.0-rc.8 → 1.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/Readme.md +128 -0
- package/builtin/package.json +5 -0
- package/codegen/package.json +5 -0
- package/dist/cjs/builtin/0x1.d.ts +495 -0
- package/dist/cjs/builtin/0x1.d.ts.map +1 -0
- package/dist/cjs/builtin/0x1.js +2083 -0
- package/dist/cjs/builtin/0x1.js.map +1 -0
- package/dist/cjs/builtin/0x2.d.ts +2929 -0
- package/dist/cjs/builtin/0x2.d.ts.map +1 -0
- package/dist/cjs/builtin/0x2.js +9641 -0
- package/dist/cjs/builtin/0x2.js.map +1 -0
- package/dist/cjs/builtin/0x3.d.ts +1207 -0
- package/dist/cjs/builtin/0x3.d.ts.map +1 -0
- package/dist/cjs/builtin/0x3.js +2625 -0
- package/dist/cjs/builtin/0x3.js.map +1 -0
- package/dist/cjs/builtin/index.d.ts +4 -0
- package/dist/cjs/builtin/index.d.ts.map +1 -0
- package/dist/cjs/builtin/index.js +11 -0
- package/dist/cjs/builtin/index.js.map +1 -0
- package/dist/cjs/codegen/codegen.d.ts +19 -0
- package/dist/cjs/codegen/codegen.d.ts.map +1 -0
- package/dist/cjs/codegen/codegen.js +177 -0
- package/dist/cjs/codegen/codegen.js.map +1 -0
- package/dist/cjs/codegen/index.d.ts +2 -0
- package/dist/cjs/codegen/index.d.ts.map +1 -0
- package/dist/cjs/codegen/index.js +5 -0
- package/dist/cjs/codegen/index.js.map +1 -0
- package/dist/cjs/index.d.ts +4 -0
- package/dist/cjs/index.d.ts.map +1 -0
- package/dist/cjs/index.js +10 -0
- package/dist/cjs/index.js.map +1 -0
- package/dist/cjs/models.d.ts +12 -0
- package/dist/cjs/models.d.ts.map +1 -0
- package/dist/cjs/models.js +8 -0
- package/dist/cjs/models.js.map +1 -0
- package/dist/cjs/move-coder.d.ts +16 -0
- package/dist/cjs/move-coder.d.ts.map +1 -0
- package/dist/cjs/move-coder.js +104 -0
- package/dist/cjs/move-coder.js.map +1 -0
- package/dist/cjs/package.json +3 -0
- package/dist/cjs/sui-chain-adapter.d.ts +12 -0
- package/dist/cjs/sui-chain-adapter.d.ts.map +1 -0
- package/dist/cjs/sui-chain-adapter.js +86 -0
- package/dist/cjs/sui-chain-adapter.js.map +1 -0
- package/dist/cjs/to-internal.d.ts +4 -0
- package/dist/cjs/to-internal.d.ts.map +1 -0
- package/dist/cjs/to-internal.js +85 -0
- package/dist/cjs/to-internal.js.map +1 -0
- package/dist/cjs/utils.d.ts +15 -0
- package/dist/cjs/utils.d.ts.map +1 -0
- package/dist/cjs/utils.js +49 -0
- package/dist/cjs/utils.js.map +1 -0
- package/dist/esm/builtin/0x1.d.ts +495 -0
- package/dist/esm/builtin/0x1.d.ts.map +1 -0
- package/dist/esm/builtin/0x1.js +2079 -0
- package/dist/esm/builtin/0x1.js.map +1 -0
- package/dist/esm/builtin/0x2.d.ts +2929 -0
- package/dist/esm/builtin/0x2.d.ts.map +1 -0
- package/dist/esm/builtin/0x2.js +9636 -0
- package/dist/esm/builtin/0x2.js.map +1 -0
- package/dist/esm/builtin/0x3.d.ts +1207 -0
- package/dist/esm/builtin/0x3.d.ts.map +1 -0
- package/dist/esm/builtin/0x3.js +2620 -0
- package/dist/esm/builtin/0x3.js.map +1 -0
- package/dist/esm/builtin/index.d.ts +4 -0
- package/dist/esm/builtin/index.d.ts.map +1 -0
- package/dist/esm/builtin/index.js +7 -0
- package/dist/esm/builtin/index.js.map +1 -0
- package/dist/esm/codegen/codegen.d.ts +19 -0
- package/dist/esm/codegen/codegen.d.ts.map +1 -0
- package/dist/esm/codegen/codegen.js +171 -0
- package/dist/esm/codegen/codegen.js.map +1 -0
- package/dist/esm/codegen/index.d.ts +2 -0
- package/dist/esm/codegen/index.d.ts.map +1 -0
- package/dist/esm/codegen/index.js +2 -0
- package/dist/esm/codegen/index.js.map +1 -0
- package/dist/esm/codegen/run.d.ts +2 -0
- package/dist/esm/codegen/run.d.ts.map +1 -0
- package/dist/esm/codegen/run.js +19 -0
- package/dist/esm/codegen/run.js.map +1 -0
- package/dist/esm/index.d.ts +4 -0
- package/dist/esm/index.d.ts.map +1 -0
- package/dist/{index.js → esm/index.js} +0 -1
- package/dist/esm/index.js.map +1 -0
- package/dist/esm/models.d.ts +12 -0
- package/dist/esm/models.d.ts.map +1 -0
- package/dist/esm/models.js +5 -0
- package/dist/esm/models.js.map +1 -0
- package/dist/esm/move-coder.d.ts +16 -0
- package/dist/esm/move-coder.d.ts.map +1 -0
- package/dist/esm/move-coder.js +99 -0
- package/dist/esm/move-coder.js.map +1 -0
- package/dist/esm/sui-chain-adapter.d.ts +12 -0
- package/dist/esm/sui-chain-adapter.d.ts.map +1 -0
- package/dist/esm/sui-chain-adapter.js +82 -0
- package/dist/esm/sui-chain-adapter.js.map +1 -0
- package/dist/esm/to-internal.d.ts +4 -0
- package/dist/esm/to-internal.d.ts.map +1 -0
- package/dist/esm/to-internal.js +81 -0
- package/dist/esm/to-internal.js.map +1 -0
- package/dist/esm/utils.d.ts +15 -0
- package/dist/esm/utils.d.ts.map +1 -0
- package/dist/esm/utils.js +45 -0
- package/dist/esm/utils.js.map +1 -0
- package/package.json +26 -10
- package/src/builtin/0x1.ts +1359 -231
- package/src/builtin/0x2.ts +6364 -1302
- package/src/builtin/0x3.ts +1909 -495
- package/src/codegen/codegen.ts +63 -49
- package/src/index.ts +0 -2
- package/src/models.ts +9 -12
- package/src/move-coder.ts +6 -20
- package/src/sui-chain-adapter.ts +13 -15
- package/src/tests/types/testnet/0x1e2b124f746a339b3cf99b9f969393a96594519aafb1d06517aacfeeae20e7a5.ts +98 -30
- package/src/tests/types/testnet/0x6c4a21e3e7e6b6d51c4604021633e1d97e24e37a696f8c082cd48f37503e602a.ts +1084 -282
- package/src/tests/types/testnet/0xdee9.ts +1112 -308
- package/src/tests/types/testnet/0xebaa2ad3eacc230f309cd933958cc52684df0a41ae7ac214d186b80f830867d2.ts +3973 -1201
- package/src/to-internal.ts +12 -32
- package/src/module-client.ts +0 -23
|
@@ -0,0 +1,2079 @@
|
|
|
1
|
+
/* Autogenerated file. Do not edit manually. */
|
|
2
|
+
/* tslint:disable */
|
|
3
|
+
/* eslint-disable */
|
|
4
|
+
/* Generated modules for account 0x1 */
|
|
5
|
+
import { TypeDescriptor, ANY_TYPE } from "@typemove/move";
|
|
6
|
+
import { defaultMoveCoder } from "@typemove/sui";
|
|
7
|
+
import { ZERO_ADDRESS } from "@typemove/sui";
|
|
8
|
+
import { TransactionBlock } from "@mysten/sui.js/transactions";
|
|
9
|
+
import { TransactionArgument } from "@mysten/sui.js";
|
|
10
|
+
export var address;
|
|
11
|
+
(function (address) {
|
|
12
|
+
let builder;
|
|
13
|
+
(function (builder) {
|
|
14
|
+
function length(tx, args) {
|
|
15
|
+
const _args = [];
|
|
16
|
+
// @ts-ignore
|
|
17
|
+
return tx.moveCall({
|
|
18
|
+
target: "0x1::address::length",
|
|
19
|
+
arguments: _args,
|
|
20
|
+
});
|
|
21
|
+
}
|
|
22
|
+
builder.length = length;
|
|
23
|
+
})(builder = address.builder || (address.builder = {}));
|
|
24
|
+
let view;
|
|
25
|
+
(function (view) {
|
|
26
|
+
async function length(client, args) {
|
|
27
|
+
const tx = new TransactionBlock();
|
|
28
|
+
builder.length(tx, args);
|
|
29
|
+
const res = await client.devInspectTransactionBlock({
|
|
30
|
+
transactionBlock: tx,
|
|
31
|
+
sender: ZERO_ADDRESS,
|
|
32
|
+
});
|
|
33
|
+
return res;
|
|
34
|
+
}
|
|
35
|
+
view.length = length;
|
|
36
|
+
})(view = address.view || (address.view = {}));
|
|
37
|
+
})(address || (address = {}));
|
|
38
|
+
export var ascii;
|
|
39
|
+
(function (ascii) {
|
|
40
|
+
let Char;
|
|
41
|
+
(function (Char) {
|
|
42
|
+
Char.TYPE_QNAME = "0x1::ascii::Char";
|
|
43
|
+
const TYPE = new TypeDescriptor(Char.TYPE_QNAME);
|
|
44
|
+
function type() {
|
|
45
|
+
return TYPE.apply();
|
|
46
|
+
}
|
|
47
|
+
Char.type = type;
|
|
48
|
+
})(Char = ascii.Char || (ascii.Char = {}));
|
|
49
|
+
let String;
|
|
50
|
+
(function (String) {
|
|
51
|
+
String.TYPE_QNAME = "0x1::ascii::String";
|
|
52
|
+
const TYPE = new TypeDescriptor(String.TYPE_QNAME);
|
|
53
|
+
function type() {
|
|
54
|
+
return TYPE.apply();
|
|
55
|
+
}
|
|
56
|
+
String.type = type;
|
|
57
|
+
})(String = ascii.String || (ascii.String = {}));
|
|
58
|
+
let builder;
|
|
59
|
+
(function (builder) {
|
|
60
|
+
function allCharactersPrintable(tx, args) {
|
|
61
|
+
const _args = [];
|
|
62
|
+
_args.push(TransactionArgument.is(args[0]) ? args[0] : tx.object(args[0]));
|
|
63
|
+
// @ts-ignore
|
|
64
|
+
return tx.moveCall({
|
|
65
|
+
target: "0x1::ascii::all_characters_printable",
|
|
66
|
+
arguments: _args,
|
|
67
|
+
});
|
|
68
|
+
}
|
|
69
|
+
builder.allCharactersPrintable = allCharactersPrintable;
|
|
70
|
+
function asBytes(tx, args) {
|
|
71
|
+
const _args = [];
|
|
72
|
+
_args.push(TransactionArgument.is(args[0]) ? args[0] : tx.object(args[0]));
|
|
73
|
+
// @ts-ignore
|
|
74
|
+
return tx.moveCall({
|
|
75
|
+
target: "0x1::ascii::as_bytes",
|
|
76
|
+
arguments: _args,
|
|
77
|
+
});
|
|
78
|
+
}
|
|
79
|
+
builder.asBytes = asBytes;
|
|
80
|
+
function byte(tx, args) {
|
|
81
|
+
const _args = [];
|
|
82
|
+
_args.push(TransactionArgument.is(args[0]) ? args[0] : tx.pure(args[0]));
|
|
83
|
+
// @ts-ignore
|
|
84
|
+
return tx.moveCall({
|
|
85
|
+
target: "0x1::ascii::byte",
|
|
86
|
+
arguments: _args,
|
|
87
|
+
});
|
|
88
|
+
}
|
|
89
|
+
builder.byte = byte;
|
|
90
|
+
function char(tx, args) {
|
|
91
|
+
const _args = [];
|
|
92
|
+
_args.push(TransactionArgument.is(args[0]) ? args[0] : tx.pure(args[0]));
|
|
93
|
+
// @ts-ignore
|
|
94
|
+
return tx.moveCall({
|
|
95
|
+
target: "0x1::ascii::char",
|
|
96
|
+
arguments: _args,
|
|
97
|
+
});
|
|
98
|
+
}
|
|
99
|
+
builder.char = char;
|
|
100
|
+
function intoBytes(tx, args) {
|
|
101
|
+
const _args = [];
|
|
102
|
+
_args.push(TransactionArgument.is(args[0]) ? args[0] : tx.pure(args[0]));
|
|
103
|
+
// @ts-ignore
|
|
104
|
+
return tx.moveCall({
|
|
105
|
+
target: "0x1::ascii::into_bytes",
|
|
106
|
+
arguments: _args,
|
|
107
|
+
});
|
|
108
|
+
}
|
|
109
|
+
builder.intoBytes = intoBytes;
|
|
110
|
+
function isPrintableChar(tx, args) {
|
|
111
|
+
const _args = [];
|
|
112
|
+
_args.push(TransactionArgument.is(args[0]) ? args[0] : tx.pure(args[0]));
|
|
113
|
+
// @ts-ignore
|
|
114
|
+
return tx.moveCall({
|
|
115
|
+
target: "0x1::ascii::is_printable_char",
|
|
116
|
+
arguments: _args,
|
|
117
|
+
});
|
|
118
|
+
}
|
|
119
|
+
builder.isPrintableChar = isPrintableChar;
|
|
120
|
+
function isValidChar(tx, args) {
|
|
121
|
+
const _args = [];
|
|
122
|
+
_args.push(TransactionArgument.is(args[0]) ? args[0] : tx.pure(args[0]));
|
|
123
|
+
// @ts-ignore
|
|
124
|
+
return tx.moveCall({
|
|
125
|
+
target: "0x1::ascii::is_valid_char",
|
|
126
|
+
arguments: _args,
|
|
127
|
+
});
|
|
128
|
+
}
|
|
129
|
+
builder.isValidChar = isValidChar;
|
|
130
|
+
function length(tx, args) {
|
|
131
|
+
const _args = [];
|
|
132
|
+
_args.push(TransactionArgument.is(args[0]) ? args[0] : tx.object(args[0]));
|
|
133
|
+
// @ts-ignore
|
|
134
|
+
return tx.moveCall({
|
|
135
|
+
target: "0x1::ascii::length",
|
|
136
|
+
arguments: _args,
|
|
137
|
+
});
|
|
138
|
+
}
|
|
139
|
+
builder.length = length;
|
|
140
|
+
function popChar(tx, args) {
|
|
141
|
+
const _args = [];
|
|
142
|
+
_args.push(TransactionArgument.is(args[0]) ? args[0] : tx.object(args[0]));
|
|
143
|
+
// @ts-ignore
|
|
144
|
+
return tx.moveCall({
|
|
145
|
+
target: "0x1::ascii::pop_char",
|
|
146
|
+
arguments: _args,
|
|
147
|
+
});
|
|
148
|
+
}
|
|
149
|
+
builder.popChar = popChar;
|
|
150
|
+
function pushChar(tx, args) {
|
|
151
|
+
const _args = [];
|
|
152
|
+
_args.push(TransactionArgument.is(args[0]) ? args[0] : tx.object(args[0]));
|
|
153
|
+
_args.push(TransactionArgument.is(args[1]) ? args[1] : tx.pure(args[1]));
|
|
154
|
+
// @ts-ignore
|
|
155
|
+
return tx.moveCall({
|
|
156
|
+
target: "0x1::ascii::push_char",
|
|
157
|
+
arguments: _args,
|
|
158
|
+
});
|
|
159
|
+
}
|
|
160
|
+
builder.pushChar = pushChar;
|
|
161
|
+
function string_(tx, args) {
|
|
162
|
+
const _args = [];
|
|
163
|
+
_args.push(TransactionArgument.is(args[0])
|
|
164
|
+
? args[0]
|
|
165
|
+
: tx.makeMoveVec({
|
|
166
|
+
objects: args[0].map((a) => tx.object(a)),
|
|
167
|
+
// type: TODO
|
|
168
|
+
}));
|
|
169
|
+
// @ts-ignore
|
|
170
|
+
return tx.moveCall({
|
|
171
|
+
target: "0x1::ascii::string",
|
|
172
|
+
arguments: _args,
|
|
173
|
+
});
|
|
174
|
+
}
|
|
175
|
+
builder.string_ = string_;
|
|
176
|
+
function tryString(tx, args) {
|
|
177
|
+
const _args = [];
|
|
178
|
+
_args.push(TransactionArgument.is(args[0])
|
|
179
|
+
? args[0]
|
|
180
|
+
: tx.makeMoveVec({
|
|
181
|
+
objects: args[0].map((a) => tx.object(a)),
|
|
182
|
+
// type: TODO
|
|
183
|
+
}));
|
|
184
|
+
// @ts-ignore
|
|
185
|
+
return tx.moveCall({
|
|
186
|
+
target: "0x1::ascii::try_string",
|
|
187
|
+
arguments: _args,
|
|
188
|
+
});
|
|
189
|
+
}
|
|
190
|
+
builder.tryString = tryString;
|
|
191
|
+
})(builder = ascii.builder || (ascii.builder = {}));
|
|
192
|
+
let view;
|
|
193
|
+
(function (view) {
|
|
194
|
+
async function allCharactersPrintable(client, args) {
|
|
195
|
+
const tx = new TransactionBlock();
|
|
196
|
+
builder.allCharactersPrintable(tx, args);
|
|
197
|
+
const res = await client.devInspectTransactionBlock({
|
|
198
|
+
transactionBlock: tx,
|
|
199
|
+
sender: ZERO_ADDRESS,
|
|
200
|
+
});
|
|
201
|
+
return res;
|
|
202
|
+
}
|
|
203
|
+
view.allCharactersPrintable = allCharactersPrintable;
|
|
204
|
+
async function asBytes(client, args) {
|
|
205
|
+
const tx = new TransactionBlock();
|
|
206
|
+
builder.asBytes(tx, args);
|
|
207
|
+
const res = await client.devInspectTransactionBlock({
|
|
208
|
+
transactionBlock: tx,
|
|
209
|
+
sender: ZERO_ADDRESS,
|
|
210
|
+
});
|
|
211
|
+
return res;
|
|
212
|
+
}
|
|
213
|
+
view.asBytes = asBytes;
|
|
214
|
+
async function byte(client, args) {
|
|
215
|
+
const tx = new TransactionBlock();
|
|
216
|
+
builder.byte(tx, args);
|
|
217
|
+
const res = await client.devInspectTransactionBlock({
|
|
218
|
+
transactionBlock: tx,
|
|
219
|
+
sender: ZERO_ADDRESS,
|
|
220
|
+
});
|
|
221
|
+
return res;
|
|
222
|
+
}
|
|
223
|
+
view.byte = byte;
|
|
224
|
+
async function char(client, args) {
|
|
225
|
+
const tx = new TransactionBlock();
|
|
226
|
+
builder.char(tx, args);
|
|
227
|
+
const res = await client.devInspectTransactionBlock({
|
|
228
|
+
transactionBlock: tx,
|
|
229
|
+
sender: ZERO_ADDRESS,
|
|
230
|
+
});
|
|
231
|
+
return res;
|
|
232
|
+
}
|
|
233
|
+
view.char = char;
|
|
234
|
+
async function intoBytes(client, args) {
|
|
235
|
+
const tx = new TransactionBlock();
|
|
236
|
+
builder.intoBytes(tx, args);
|
|
237
|
+
const res = await client.devInspectTransactionBlock({
|
|
238
|
+
transactionBlock: tx,
|
|
239
|
+
sender: ZERO_ADDRESS,
|
|
240
|
+
});
|
|
241
|
+
return res;
|
|
242
|
+
}
|
|
243
|
+
view.intoBytes = intoBytes;
|
|
244
|
+
async function isPrintableChar(client, args) {
|
|
245
|
+
const tx = new TransactionBlock();
|
|
246
|
+
builder.isPrintableChar(tx, args);
|
|
247
|
+
const res = await client.devInspectTransactionBlock({
|
|
248
|
+
transactionBlock: tx,
|
|
249
|
+
sender: ZERO_ADDRESS,
|
|
250
|
+
});
|
|
251
|
+
return res;
|
|
252
|
+
}
|
|
253
|
+
view.isPrintableChar = isPrintableChar;
|
|
254
|
+
async function isValidChar(client, args) {
|
|
255
|
+
const tx = new TransactionBlock();
|
|
256
|
+
builder.isValidChar(tx, args);
|
|
257
|
+
const res = await client.devInspectTransactionBlock({
|
|
258
|
+
transactionBlock: tx,
|
|
259
|
+
sender: ZERO_ADDRESS,
|
|
260
|
+
});
|
|
261
|
+
return res;
|
|
262
|
+
}
|
|
263
|
+
view.isValidChar = isValidChar;
|
|
264
|
+
async function length(client, args) {
|
|
265
|
+
const tx = new TransactionBlock();
|
|
266
|
+
builder.length(tx, args);
|
|
267
|
+
const res = await client.devInspectTransactionBlock({
|
|
268
|
+
transactionBlock: tx,
|
|
269
|
+
sender: ZERO_ADDRESS,
|
|
270
|
+
});
|
|
271
|
+
return res;
|
|
272
|
+
}
|
|
273
|
+
view.length = length;
|
|
274
|
+
async function popChar(client, args) {
|
|
275
|
+
const tx = new TransactionBlock();
|
|
276
|
+
builder.popChar(tx, args);
|
|
277
|
+
const res = await client.devInspectTransactionBlock({
|
|
278
|
+
transactionBlock: tx,
|
|
279
|
+
sender: ZERO_ADDRESS,
|
|
280
|
+
});
|
|
281
|
+
return res;
|
|
282
|
+
}
|
|
283
|
+
view.popChar = popChar;
|
|
284
|
+
async function pushChar(client, args) {
|
|
285
|
+
const tx = new TransactionBlock();
|
|
286
|
+
builder.pushChar(tx, args);
|
|
287
|
+
const res = await client.devInspectTransactionBlock({
|
|
288
|
+
transactionBlock: tx,
|
|
289
|
+
sender: ZERO_ADDRESS,
|
|
290
|
+
});
|
|
291
|
+
return res;
|
|
292
|
+
}
|
|
293
|
+
view.pushChar = pushChar;
|
|
294
|
+
async function string_(client, args) {
|
|
295
|
+
const tx = new TransactionBlock();
|
|
296
|
+
builder.string_(tx, args);
|
|
297
|
+
const res = await client.devInspectTransactionBlock({
|
|
298
|
+
transactionBlock: tx,
|
|
299
|
+
sender: ZERO_ADDRESS,
|
|
300
|
+
});
|
|
301
|
+
return res;
|
|
302
|
+
}
|
|
303
|
+
view.string_ = string_;
|
|
304
|
+
async function tryString(client, args) {
|
|
305
|
+
const tx = new TransactionBlock();
|
|
306
|
+
builder.tryString(tx, args);
|
|
307
|
+
const res = await client.devInspectTransactionBlock({
|
|
308
|
+
transactionBlock: tx,
|
|
309
|
+
sender: ZERO_ADDRESS,
|
|
310
|
+
});
|
|
311
|
+
return res;
|
|
312
|
+
}
|
|
313
|
+
view.tryString = tryString;
|
|
314
|
+
})(view = ascii.view || (ascii.view = {}));
|
|
315
|
+
})(ascii || (ascii = {}));
|
|
316
|
+
export var bcs;
|
|
317
|
+
(function (bcs) {
|
|
318
|
+
let builder;
|
|
319
|
+
(function (builder) {
|
|
320
|
+
function toBytes(tx, args, typeArguments) {
|
|
321
|
+
const _args = [];
|
|
322
|
+
_args.push(TransactionArgument.is(args[0]) ? args[0] : tx.object(args[0]));
|
|
323
|
+
// @ts-ignore
|
|
324
|
+
return tx.moveCall({
|
|
325
|
+
target: "0x1::bcs::to_bytes",
|
|
326
|
+
arguments: _args,
|
|
327
|
+
typeArguments: [
|
|
328
|
+
typeof typeArguments[0] === "string"
|
|
329
|
+
? typeArguments[0]
|
|
330
|
+
: typeArguments[0].getSignature(),
|
|
331
|
+
],
|
|
332
|
+
});
|
|
333
|
+
}
|
|
334
|
+
builder.toBytes = toBytes;
|
|
335
|
+
})(builder = bcs.builder || (bcs.builder = {}));
|
|
336
|
+
let view;
|
|
337
|
+
(function (view) {
|
|
338
|
+
async function toBytes(client, args, typeArguments) {
|
|
339
|
+
const tx = new TransactionBlock();
|
|
340
|
+
builder.toBytes(tx, args, typeArguments);
|
|
341
|
+
const res = await client.devInspectTransactionBlock({
|
|
342
|
+
transactionBlock: tx,
|
|
343
|
+
sender: ZERO_ADDRESS,
|
|
344
|
+
});
|
|
345
|
+
return res;
|
|
346
|
+
}
|
|
347
|
+
view.toBytes = toBytes;
|
|
348
|
+
})(view = bcs.view || (bcs.view = {}));
|
|
349
|
+
})(bcs || (bcs = {}));
|
|
350
|
+
export var bit_vector;
|
|
351
|
+
(function (bit_vector) {
|
|
352
|
+
let BitVector;
|
|
353
|
+
(function (BitVector) {
|
|
354
|
+
BitVector.TYPE_QNAME = "0x1::bit_vector::BitVector";
|
|
355
|
+
const TYPE = new TypeDescriptor(BitVector.TYPE_QNAME);
|
|
356
|
+
function type() {
|
|
357
|
+
return TYPE.apply();
|
|
358
|
+
}
|
|
359
|
+
BitVector.type = type;
|
|
360
|
+
})(BitVector = bit_vector.BitVector || (bit_vector.BitVector = {}));
|
|
361
|
+
let builder;
|
|
362
|
+
(function (builder) {
|
|
363
|
+
function isIndexSet(tx, args) {
|
|
364
|
+
const _args = [];
|
|
365
|
+
_args.push(TransactionArgument.is(args[0]) ? args[0] : tx.object(args[0]));
|
|
366
|
+
_args.push(TransactionArgument.is(args[1]) ? args[1] : tx.pure(args[1]));
|
|
367
|
+
// @ts-ignore
|
|
368
|
+
return tx.moveCall({
|
|
369
|
+
target: "0x1::bit_vector::is_index_set",
|
|
370
|
+
arguments: _args,
|
|
371
|
+
});
|
|
372
|
+
}
|
|
373
|
+
builder.isIndexSet = isIndexSet;
|
|
374
|
+
function length(tx, args) {
|
|
375
|
+
const _args = [];
|
|
376
|
+
_args.push(TransactionArgument.is(args[0]) ? args[0] : tx.object(args[0]));
|
|
377
|
+
// @ts-ignore
|
|
378
|
+
return tx.moveCall({
|
|
379
|
+
target: "0x1::bit_vector::length",
|
|
380
|
+
arguments: _args,
|
|
381
|
+
});
|
|
382
|
+
}
|
|
383
|
+
builder.length = length;
|
|
384
|
+
function longestSetSequenceStartingAt(tx, args) {
|
|
385
|
+
const _args = [];
|
|
386
|
+
_args.push(TransactionArgument.is(args[0]) ? args[0] : tx.object(args[0]));
|
|
387
|
+
_args.push(TransactionArgument.is(args[1]) ? args[1] : tx.pure(args[1]));
|
|
388
|
+
// @ts-ignore
|
|
389
|
+
return tx.moveCall({
|
|
390
|
+
target: "0x1::bit_vector::longest_set_sequence_starting_at",
|
|
391
|
+
arguments: _args,
|
|
392
|
+
});
|
|
393
|
+
}
|
|
394
|
+
builder.longestSetSequenceStartingAt = longestSetSequenceStartingAt;
|
|
395
|
+
function new_(tx, args) {
|
|
396
|
+
const _args = [];
|
|
397
|
+
_args.push(TransactionArgument.is(args[0]) ? args[0] : tx.pure(args[0]));
|
|
398
|
+
// @ts-ignore
|
|
399
|
+
return tx.moveCall({
|
|
400
|
+
target: "0x1::bit_vector::new",
|
|
401
|
+
arguments: _args,
|
|
402
|
+
});
|
|
403
|
+
}
|
|
404
|
+
builder.new_ = new_;
|
|
405
|
+
function set(tx, args) {
|
|
406
|
+
const _args = [];
|
|
407
|
+
_args.push(TransactionArgument.is(args[0]) ? args[0] : tx.object(args[0]));
|
|
408
|
+
_args.push(TransactionArgument.is(args[1]) ? args[1] : tx.pure(args[1]));
|
|
409
|
+
// @ts-ignore
|
|
410
|
+
return tx.moveCall({
|
|
411
|
+
target: "0x1::bit_vector::set",
|
|
412
|
+
arguments: _args,
|
|
413
|
+
});
|
|
414
|
+
}
|
|
415
|
+
builder.set = set;
|
|
416
|
+
function shiftLeft(tx, args) {
|
|
417
|
+
const _args = [];
|
|
418
|
+
_args.push(TransactionArgument.is(args[0]) ? args[0] : tx.object(args[0]));
|
|
419
|
+
_args.push(TransactionArgument.is(args[1]) ? args[1] : tx.pure(args[1]));
|
|
420
|
+
// @ts-ignore
|
|
421
|
+
return tx.moveCall({
|
|
422
|
+
target: "0x1::bit_vector::shift_left",
|
|
423
|
+
arguments: _args,
|
|
424
|
+
});
|
|
425
|
+
}
|
|
426
|
+
builder.shiftLeft = shiftLeft;
|
|
427
|
+
function unset(tx, args) {
|
|
428
|
+
const _args = [];
|
|
429
|
+
_args.push(TransactionArgument.is(args[0]) ? args[0] : tx.object(args[0]));
|
|
430
|
+
_args.push(TransactionArgument.is(args[1]) ? args[1] : tx.pure(args[1]));
|
|
431
|
+
// @ts-ignore
|
|
432
|
+
return tx.moveCall({
|
|
433
|
+
target: "0x1::bit_vector::unset",
|
|
434
|
+
arguments: _args,
|
|
435
|
+
});
|
|
436
|
+
}
|
|
437
|
+
builder.unset = unset;
|
|
438
|
+
})(builder = bit_vector.builder || (bit_vector.builder = {}));
|
|
439
|
+
let view;
|
|
440
|
+
(function (view) {
|
|
441
|
+
async function isIndexSet(client, args) {
|
|
442
|
+
const tx = new TransactionBlock();
|
|
443
|
+
builder.isIndexSet(tx, args);
|
|
444
|
+
const res = await client.devInspectTransactionBlock({
|
|
445
|
+
transactionBlock: tx,
|
|
446
|
+
sender: ZERO_ADDRESS,
|
|
447
|
+
});
|
|
448
|
+
return res;
|
|
449
|
+
}
|
|
450
|
+
view.isIndexSet = isIndexSet;
|
|
451
|
+
async function length(client, args) {
|
|
452
|
+
const tx = new TransactionBlock();
|
|
453
|
+
builder.length(tx, args);
|
|
454
|
+
const res = await client.devInspectTransactionBlock({
|
|
455
|
+
transactionBlock: tx,
|
|
456
|
+
sender: ZERO_ADDRESS,
|
|
457
|
+
});
|
|
458
|
+
return res;
|
|
459
|
+
}
|
|
460
|
+
view.length = length;
|
|
461
|
+
async function longestSetSequenceStartingAt(client, args) {
|
|
462
|
+
const tx = new TransactionBlock();
|
|
463
|
+
builder.longestSetSequenceStartingAt(tx, args);
|
|
464
|
+
const res = await client.devInspectTransactionBlock({
|
|
465
|
+
transactionBlock: tx,
|
|
466
|
+
sender: ZERO_ADDRESS,
|
|
467
|
+
});
|
|
468
|
+
return res;
|
|
469
|
+
}
|
|
470
|
+
view.longestSetSequenceStartingAt = longestSetSequenceStartingAt;
|
|
471
|
+
async function new_(client, args) {
|
|
472
|
+
const tx = new TransactionBlock();
|
|
473
|
+
builder.new_(tx, args);
|
|
474
|
+
const res = await client.devInspectTransactionBlock({
|
|
475
|
+
transactionBlock: tx,
|
|
476
|
+
sender: ZERO_ADDRESS,
|
|
477
|
+
});
|
|
478
|
+
return res;
|
|
479
|
+
}
|
|
480
|
+
view.new_ = new_;
|
|
481
|
+
async function set(client, args) {
|
|
482
|
+
const tx = new TransactionBlock();
|
|
483
|
+
builder.set(tx, args);
|
|
484
|
+
const res = await client.devInspectTransactionBlock({
|
|
485
|
+
transactionBlock: tx,
|
|
486
|
+
sender: ZERO_ADDRESS,
|
|
487
|
+
});
|
|
488
|
+
return res;
|
|
489
|
+
}
|
|
490
|
+
view.set = set;
|
|
491
|
+
async function shiftLeft(client, args) {
|
|
492
|
+
const tx = new TransactionBlock();
|
|
493
|
+
builder.shiftLeft(tx, args);
|
|
494
|
+
const res = await client.devInspectTransactionBlock({
|
|
495
|
+
transactionBlock: tx,
|
|
496
|
+
sender: ZERO_ADDRESS,
|
|
497
|
+
});
|
|
498
|
+
return res;
|
|
499
|
+
}
|
|
500
|
+
view.shiftLeft = shiftLeft;
|
|
501
|
+
async function unset(client, args) {
|
|
502
|
+
const tx = new TransactionBlock();
|
|
503
|
+
builder.unset(tx, args);
|
|
504
|
+
const res = await client.devInspectTransactionBlock({
|
|
505
|
+
transactionBlock: tx,
|
|
506
|
+
sender: ZERO_ADDRESS,
|
|
507
|
+
});
|
|
508
|
+
return res;
|
|
509
|
+
}
|
|
510
|
+
view.unset = unset;
|
|
511
|
+
})(view = bit_vector.view || (bit_vector.view = {}));
|
|
512
|
+
})(bit_vector || (bit_vector = {}));
|
|
513
|
+
export var debug;
|
|
514
|
+
(function (debug) {
|
|
515
|
+
let builder;
|
|
516
|
+
(function (builder) {
|
|
517
|
+
function print(tx, args, typeArguments) {
|
|
518
|
+
const _args = [];
|
|
519
|
+
_args.push(TransactionArgument.is(args[0]) ? args[0] : tx.object(args[0]));
|
|
520
|
+
// @ts-ignore
|
|
521
|
+
return tx.moveCall({
|
|
522
|
+
target: "0x1::debug::print",
|
|
523
|
+
arguments: _args,
|
|
524
|
+
typeArguments: [
|
|
525
|
+
typeof typeArguments[0] === "string"
|
|
526
|
+
? typeArguments[0]
|
|
527
|
+
: typeArguments[0].getSignature(),
|
|
528
|
+
],
|
|
529
|
+
});
|
|
530
|
+
}
|
|
531
|
+
builder.print = print;
|
|
532
|
+
function printStackTrace(tx, args) {
|
|
533
|
+
const _args = [];
|
|
534
|
+
// @ts-ignore
|
|
535
|
+
return tx.moveCall({
|
|
536
|
+
target: "0x1::debug::print_stack_trace",
|
|
537
|
+
arguments: _args,
|
|
538
|
+
});
|
|
539
|
+
}
|
|
540
|
+
builder.printStackTrace = printStackTrace;
|
|
541
|
+
})(builder = debug.builder || (debug.builder = {}));
|
|
542
|
+
let view;
|
|
543
|
+
(function (view) {
|
|
544
|
+
async function print(client, args, typeArguments) {
|
|
545
|
+
const tx = new TransactionBlock();
|
|
546
|
+
builder.print(tx, args, typeArguments);
|
|
547
|
+
const res = await client.devInspectTransactionBlock({
|
|
548
|
+
transactionBlock: tx,
|
|
549
|
+
sender: ZERO_ADDRESS,
|
|
550
|
+
});
|
|
551
|
+
return res;
|
|
552
|
+
}
|
|
553
|
+
view.print = print;
|
|
554
|
+
async function printStackTrace(client, args) {
|
|
555
|
+
const tx = new TransactionBlock();
|
|
556
|
+
builder.printStackTrace(tx, args);
|
|
557
|
+
const res = await client.devInspectTransactionBlock({
|
|
558
|
+
transactionBlock: tx,
|
|
559
|
+
sender: ZERO_ADDRESS,
|
|
560
|
+
});
|
|
561
|
+
return res;
|
|
562
|
+
}
|
|
563
|
+
view.printStackTrace = printStackTrace;
|
|
564
|
+
})(view = debug.view || (debug.view = {}));
|
|
565
|
+
})(debug || (debug = {}));
|
|
566
|
+
export var fixed_point32;
|
|
567
|
+
(function (fixed_point32) {
|
|
568
|
+
let FixedPoint32;
|
|
569
|
+
(function (FixedPoint32) {
|
|
570
|
+
FixedPoint32.TYPE_QNAME = "0x1::fixed_point32::FixedPoint32";
|
|
571
|
+
const TYPE = new TypeDescriptor(FixedPoint32.TYPE_QNAME);
|
|
572
|
+
function type() {
|
|
573
|
+
return TYPE.apply();
|
|
574
|
+
}
|
|
575
|
+
FixedPoint32.type = type;
|
|
576
|
+
})(FixedPoint32 = fixed_point32.FixedPoint32 || (fixed_point32.FixedPoint32 = {}));
|
|
577
|
+
let builder;
|
|
578
|
+
(function (builder) {
|
|
579
|
+
function createFromRational(tx, args) {
|
|
580
|
+
const _args = [];
|
|
581
|
+
_args.push(TransactionArgument.is(args[0]) ? args[0] : tx.pure(args[0]));
|
|
582
|
+
_args.push(TransactionArgument.is(args[1]) ? args[1] : tx.pure(args[1]));
|
|
583
|
+
// @ts-ignore
|
|
584
|
+
return tx.moveCall({
|
|
585
|
+
target: "0x1::fixed_point32::create_from_rational",
|
|
586
|
+
arguments: _args,
|
|
587
|
+
});
|
|
588
|
+
}
|
|
589
|
+
builder.createFromRational = createFromRational;
|
|
590
|
+
function createFromRawValue(tx, args) {
|
|
591
|
+
const _args = [];
|
|
592
|
+
_args.push(TransactionArgument.is(args[0]) ? args[0] : tx.pure(args[0]));
|
|
593
|
+
// @ts-ignore
|
|
594
|
+
return tx.moveCall({
|
|
595
|
+
target: "0x1::fixed_point32::create_from_raw_value",
|
|
596
|
+
arguments: _args,
|
|
597
|
+
});
|
|
598
|
+
}
|
|
599
|
+
builder.createFromRawValue = createFromRawValue;
|
|
600
|
+
function divideU64(tx, args) {
|
|
601
|
+
const _args = [];
|
|
602
|
+
_args.push(TransactionArgument.is(args[0]) ? args[0] : tx.pure(args[0]));
|
|
603
|
+
_args.push(TransactionArgument.is(args[1]) ? args[1] : tx.pure(args[1]));
|
|
604
|
+
// @ts-ignore
|
|
605
|
+
return tx.moveCall({
|
|
606
|
+
target: "0x1::fixed_point32::divide_u64",
|
|
607
|
+
arguments: _args,
|
|
608
|
+
});
|
|
609
|
+
}
|
|
610
|
+
builder.divideU64 = divideU64;
|
|
611
|
+
function getRawValue(tx, args) {
|
|
612
|
+
const _args = [];
|
|
613
|
+
_args.push(TransactionArgument.is(args[0]) ? args[0] : tx.pure(args[0]));
|
|
614
|
+
// @ts-ignore
|
|
615
|
+
return tx.moveCall({
|
|
616
|
+
target: "0x1::fixed_point32::get_raw_value",
|
|
617
|
+
arguments: _args,
|
|
618
|
+
});
|
|
619
|
+
}
|
|
620
|
+
builder.getRawValue = getRawValue;
|
|
621
|
+
function isZero(tx, args) {
|
|
622
|
+
const _args = [];
|
|
623
|
+
_args.push(TransactionArgument.is(args[0]) ? args[0] : tx.pure(args[0]));
|
|
624
|
+
// @ts-ignore
|
|
625
|
+
return tx.moveCall({
|
|
626
|
+
target: "0x1::fixed_point32::is_zero",
|
|
627
|
+
arguments: _args,
|
|
628
|
+
});
|
|
629
|
+
}
|
|
630
|
+
builder.isZero = isZero;
|
|
631
|
+
function multiplyU64(tx, args) {
|
|
632
|
+
const _args = [];
|
|
633
|
+
_args.push(TransactionArgument.is(args[0]) ? args[0] : tx.pure(args[0]));
|
|
634
|
+
_args.push(TransactionArgument.is(args[1]) ? args[1] : tx.pure(args[1]));
|
|
635
|
+
// @ts-ignore
|
|
636
|
+
return tx.moveCall({
|
|
637
|
+
target: "0x1::fixed_point32::multiply_u64",
|
|
638
|
+
arguments: _args,
|
|
639
|
+
});
|
|
640
|
+
}
|
|
641
|
+
builder.multiplyU64 = multiplyU64;
|
|
642
|
+
})(builder = fixed_point32.builder || (fixed_point32.builder = {}));
|
|
643
|
+
let view;
|
|
644
|
+
(function (view) {
|
|
645
|
+
async function createFromRational(client, args) {
|
|
646
|
+
const tx = new TransactionBlock();
|
|
647
|
+
builder.createFromRational(tx, args);
|
|
648
|
+
const res = await client.devInspectTransactionBlock({
|
|
649
|
+
transactionBlock: tx,
|
|
650
|
+
sender: ZERO_ADDRESS,
|
|
651
|
+
});
|
|
652
|
+
return res;
|
|
653
|
+
}
|
|
654
|
+
view.createFromRational = createFromRational;
|
|
655
|
+
async function createFromRawValue(client, args) {
|
|
656
|
+
const tx = new TransactionBlock();
|
|
657
|
+
builder.createFromRawValue(tx, args);
|
|
658
|
+
const res = await client.devInspectTransactionBlock({
|
|
659
|
+
transactionBlock: tx,
|
|
660
|
+
sender: ZERO_ADDRESS,
|
|
661
|
+
});
|
|
662
|
+
return res;
|
|
663
|
+
}
|
|
664
|
+
view.createFromRawValue = createFromRawValue;
|
|
665
|
+
async function divideU64(client, args) {
|
|
666
|
+
const tx = new TransactionBlock();
|
|
667
|
+
builder.divideU64(tx, args);
|
|
668
|
+
const res = await client.devInspectTransactionBlock({
|
|
669
|
+
transactionBlock: tx,
|
|
670
|
+
sender: ZERO_ADDRESS,
|
|
671
|
+
});
|
|
672
|
+
return res;
|
|
673
|
+
}
|
|
674
|
+
view.divideU64 = divideU64;
|
|
675
|
+
async function getRawValue(client, args) {
|
|
676
|
+
const tx = new TransactionBlock();
|
|
677
|
+
builder.getRawValue(tx, args);
|
|
678
|
+
const res = await client.devInspectTransactionBlock({
|
|
679
|
+
transactionBlock: tx,
|
|
680
|
+
sender: ZERO_ADDRESS,
|
|
681
|
+
});
|
|
682
|
+
return res;
|
|
683
|
+
}
|
|
684
|
+
view.getRawValue = getRawValue;
|
|
685
|
+
async function isZero(client, args) {
|
|
686
|
+
const tx = new TransactionBlock();
|
|
687
|
+
builder.isZero(tx, args);
|
|
688
|
+
const res = await client.devInspectTransactionBlock({
|
|
689
|
+
transactionBlock: tx,
|
|
690
|
+
sender: ZERO_ADDRESS,
|
|
691
|
+
});
|
|
692
|
+
return res;
|
|
693
|
+
}
|
|
694
|
+
view.isZero = isZero;
|
|
695
|
+
async function multiplyU64(client, args) {
|
|
696
|
+
const tx = new TransactionBlock();
|
|
697
|
+
builder.multiplyU64(tx, args);
|
|
698
|
+
const res = await client.devInspectTransactionBlock({
|
|
699
|
+
transactionBlock: tx,
|
|
700
|
+
sender: ZERO_ADDRESS,
|
|
701
|
+
});
|
|
702
|
+
return res;
|
|
703
|
+
}
|
|
704
|
+
view.multiplyU64 = multiplyU64;
|
|
705
|
+
})(view = fixed_point32.view || (fixed_point32.view = {}));
|
|
706
|
+
})(fixed_point32 || (fixed_point32 = {}));
|
|
707
|
+
export var hash;
|
|
708
|
+
(function (hash) {
|
|
709
|
+
let builder;
|
|
710
|
+
(function (builder) {
|
|
711
|
+
function sha2256(tx, args) {
|
|
712
|
+
const _args = [];
|
|
713
|
+
_args.push(TransactionArgument.is(args[0])
|
|
714
|
+
? args[0]
|
|
715
|
+
: tx.makeMoveVec({
|
|
716
|
+
objects: args[0].map((a) => tx.object(a)),
|
|
717
|
+
// type: TODO
|
|
718
|
+
}));
|
|
719
|
+
// @ts-ignore
|
|
720
|
+
return tx.moveCall({
|
|
721
|
+
target: "0x1::hash::sha2_256",
|
|
722
|
+
arguments: _args,
|
|
723
|
+
});
|
|
724
|
+
}
|
|
725
|
+
builder.sha2256 = sha2256;
|
|
726
|
+
function sha3256(tx, args) {
|
|
727
|
+
const _args = [];
|
|
728
|
+
_args.push(TransactionArgument.is(args[0])
|
|
729
|
+
? args[0]
|
|
730
|
+
: tx.makeMoveVec({
|
|
731
|
+
objects: args[0].map((a) => tx.object(a)),
|
|
732
|
+
// type: TODO
|
|
733
|
+
}));
|
|
734
|
+
// @ts-ignore
|
|
735
|
+
return tx.moveCall({
|
|
736
|
+
target: "0x1::hash::sha3_256",
|
|
737
|
+
arguments: _args,
|
|
738
|
+
});
|
|
739
|
+
}
|
|
740
|
+
builder.sha3256 = sha3256;
|
|
741
|
+
})(builder = hash.builder || (hash.builder = {}));
|
|
742
|
+
let view;
|
|
743
|
+
(function (view) {
|
|
744
|
+
async function sha2256(client, args) {
|
|
745
|
+
const tx = new TransactionBlock();
|
|
746
|
+
builder.sha2256(tx, args);
|
|
747
|
+
const res = await client.devInspectTransactionBlock({
|
|
748
|
+
transactionBlock: tx,
|
|
749
|
+
sender: ZERO_ADDRESS,
|
|
750
|
+
});
|
|
751
|
+
return res;
|
|
752
|
+
}
|
|
753
|
+
view.sha2256 = sha2256;
|
|
754
|
+
async function sha3256(client, args) {
|
|
755
|
+
const tx = new TransactionBlock();
|
|
756
|
+
builder.sha3256(tx, args);
|
|
757
|
+
const res = await client.devInspectTransactionBlock({
|
|
758
|
+
transactionBlock: tx,
|
|
759
|
+
sender: ZERO_ADDRESS,
|
|
760
|
+
});
|
|
761
|
+
return res;
|
|
762
|
+
}
|
|
763
|
+
view.sha3256 = sha3256;
|
|
764
|
+
})(view = hash.view || (hash.view = {}));
|
|
765
|
+
})(hash || (hash = {}));
|
|
766
|
+
export var option;
|
|
767
|
+
(function (option) {
|
|
768
|
+
let Option;
|
|
769
|
+
(function (Option) {
|
|
770
|
+
Option.TYPE_QNAME = "0x1::option::Option";
|
|
771
|
+
const TYPE = new TypeDescriptor(Option.TYPE_QNAME);
|
|
772
|
+
function type(arg0 = ANY_TYPE) {
|
|
773
|
+
return TYPE.apply(arg0);
|
|
774
|
+
}
|
|
775
|
+
Option.type = type;
|
|
776
|
+
})(Option = option.Option || (option.Option = {}));
|
|
777
|
+
let builder;
|
|
778
|
+
(function (builder) {
|
|
779
|
+
function borrow(tx, args, typeArguments) {
|
|
780
|
+
const _args = [];
|
|
781
|
+
_args.push(TransactionArgument.is(args[0]) ? args[0] : tx.object(args[0]));
|
|
782
|
+
// @ts-ignore
|
|
783
|
+
return tx.moveCall({
|
|
784
|
+
target: "0x1::option::borrow",
|
|
785
|
+
arguments: _args,
|
|
786
|
+
typeArguments: [
|
|
787
|
+
typeof typeArguments[0] === "string"
|
|
788
|
+
? typeArguments[0]
|
|
789
|
+
: typeArguments[0].getSignature(),
|
|
790
|
+
],
|
|
791
|
+
});
|
|
792
|
+
}
|
|
793
|
+
builder.borrow = borrow;
|
|
794
|
+
function borrowMut(tx, args, typeArguments) {
|
|
795
|
+
const _args = [];
|
|
796
|
+
_args.push(TransactionArgument.is(args[0]) ? args[0] : tx.object(args[0]));
|
|
797
|
+
// @ts-ignore
|
|
798
|
+
return tx.moveCall({
|
|
799
|
+
target: "0x1::option::borrow_mut",
|
|
800
|
+
arguments: _args,
|
|
801
|
+
typeArguments: [
|
|
802
|
+
typeof typeArguments[0] === "string"
|
|
803
|
+
? typeArguments[0]
|
|
804
|
+
: typeArguments[0].getSignature(),
|
|
805
|
+
],
|
|
806
|
+
});
|
|
807
|
+
}
|
|
808
|
+
builder.borrowMut = borrowMut;
|
|
809
|
+
function borrowWithDefault(tx, args, typeArguments) {
|
|
810
|
+
const _args = [];
|
|
811
|
+
_args.push(TransactionArgument.is(args[0]) ? args[0] : tx.object(args[0]));
|
|
812
|
+
_args.push(TransactionArgument.is(args[1]) ? args[1] : tx.object(args[1]));
|
|
813
|
+
// @ts-ignore
|
|
814
|
+
return tx.moveCall({
|
|
815
|
+
target: "0x1::option::borrow_with_default",
|
|
816
|
+
arguments: _args,
|
|
817
|
+
typeArguments: [
|
|
818
|
+
typeof typeArguments[0] === "string"
|
|
819
|
+
? typeArguments[0]
|
|
820
|
+
: typeArguments[0].getSignature(),
|
|
821
|
+
],
|
|
822
|
+
});
|
|
823
|
+
}
|
|
824
|
+
builder.borrowWithDefault = borrowWithDefault;
|
|
825
|
+
function contains(tx, args, typeArguments) {
|
|
826
|
+
const _args = [];
|
|
827
|
+
_args.push(TransactionArgument.is(args[0]) ? args[0] : tx.object(args[0]));
|
|
828
|
+
_args.push(TransactionArgument.is(args[1]) ? args[1] : tx.object(args[1]));
|
|
829
|
+
// @ts-ignore
|
|
830
|
+
return tx.moveCall({
|
|
831
|
+
target: "0x1::option::contains",
|
|
832
|
+
arguments: _args,
|
|
833
|
+
typeArguments: [
|
|
834
|
+
typeof typeArguments[0] === "string"
|
|
835
|
+
? typeArguments[0]
|
|
836
|
+
: typeArguments[0].getSignature(),
|
|
837
|
+
],
|
|
838
|
+
});
|
|
839
|
+
}
|
|
840
|
+
builder.contains = contains;
|
|
841
|
+
function destroyNone(tx, args, typeArguments) {
|
|
842
|
+
const _args = [];
|
|
843
|
+
_args.push(TransactionArgument.is(args[0]) ? args[0] : tx.pure(args[0]));
|
|
844
|
+
// @ts-ignore
|
|
845
|
+
return tx.moveCall({
|
|
846
|
+
target: "0x1::option::destroy_none",
|
|
847
|
+
arguments: _args,
|
|
848
|
+
typeArguments: [
|
|
849
|
+
typeof typeArguments[0] === "string"
|
|
850
|
+
? typeArguments[0]
|
|
851
|
+
: typeArguments[0].getSignature(),
|
|
852
|
+
],
|
|
853
|
+
});
|
|
854
|
+
}
|
|
855
|
+
builder.destroyNone = destroyNone;
|
|
856
|
+
function destroySome(tx, args, typeArguments) {
|
|
857
|
+
const _args = [];
|
|
858
|
+
_args.push(TransactionArgument.is(args[0]) ? args[0] : tx.pure(args[0]));
|
|
859
|
+
// @ts-ignore
|
|
860
|
+
return tx.moveCall({
|
|
861
|
+
target: "0x1::option::destroy_some",
|
|
862
|
+
arguments: _args,
|
|
863
|
+
typeArguments: [
|
|
864
|
+
typeof typeArguments[0] === "string"
|
|
865
|
+
? typeArguments[0]
|
|
866
|
+
: typeArguments[0].getSignature(),
|
|
867
|
+
],
|
|
868
|
+
});
|
|
869
|
+
}
|
|
870
|
+
builder.destroySome = destroySome;
|
|
871
|
+
function destroyWithDefault(tx, args, typeArguments) {
|
|
872
|
+
const _args = [];
|
|
873
|
+
_args.push(TransactionArgument.is(args[0]) ? args[0] : tx.pure(args[0]));
|
|
874
|
+
_args.push(TransactionArgument.is(args[1]) ? args[1] : tx.pure(args[1]));
|
|
875
|
+
// @ts-ignore
|
|
876
|
+
return tx.moveCall({
|
|
877
|
+
target: "0x1::option::destroy_with_default",
|
|
878
|
+
arguments: _args,
|
|
879
|
+
typeArguments: [
|
|
880
|
+
typeof typeArguments[0] === "string"
|
|
881
|
+
? typeArguments[0]
|
|
882
|
+
: typeArguments[0].getSignature(),
|
|
883
|
+
],
|
|
884
|
+
});
|
|
885
|
+
}
|
|
886
|
+
builder.destroyWithDefault = destroyWithDefault;
|
|
887
|
+
function extract(tx, args, typeArguments) {
|
|
888
|
+
const _args = [];
|
|
889
|
+
_args.push(TransactionArgument.is(args[0]) ? args[0] : tx.object(args[0]));
|
|
890
|
+
// @ts-ignore
|
|
891
|
+
return tx.moveCall({
|
|
892
|
+
target: "0x1::option::extract",
|
|
893
|
+
arguments: _args,
|
|
894
|
+
typeArguments: [
|
|
895
|
+
typeof typeArguments[0] === "string"
|
|
896
|
+
? typeArguments[0]
|
|
897
|
+
: typeArguments[0].getSignature(),
|
|
898
|
+
],
|
|
899
|
+
});
|
|
900
|
+
}
|
|
901
|
+
builder.extract = extract;
|
|
902
|
+
function fill(tx, args, typeArguments) {
|
|
903
|
+
const _args = [];
|
|
904
|
+
_args.push(TransactionArgument.is(args[0]) ? args[0] : tx.object(args[0]));
|
|
905
|
+
_args.push(TransactionArgument.is(args[1]) ? args[1] : tx.pure(args[1]));
|
|
906
|
+
// @ts-ignore
|
|
907
|
+
return tx.moveCall({
|
|
908
|
+
target: "0x1::option::fill",
|
|
909
|
+
arguments: _args,
|
|
910
|
+
typeArguments: [
|
|
911
|
+
typeof typeArguments[0] === "string"
|
|
912
|
+
? typeArguments[0]
|
|
913
|
+
: typeArguments[0].getSignature(),
|
|
914
|
+
],
|
|
915
|
+
});
|
|
916
|
+
}
|
|
917
|
+
builder.fill = fill;
|
|
918
|
+
function getWithDefault(tx, args, typeArguments) {
|
|
919
|
+
const _args = [];
|
|
920
|
+
_args.push(TransactionArgument.is(args[0]) ? args[0] : tx.object(args[0]));
|
|
921
|
+
_args.push(TransactionArgument.is(args[1]) ? args[1] : tx.pure(args[1]));
|
|
922
|
+
// @ts-ignore
|
|
923
|
+
return tx.moveCall({
|
|
924
|
+
target: "0x1::option::get_with_default",
|
|
925
|
+
arguments: _args,
|
|
926
|
+
typeArguments: [
|
|
927
|
+
typeof typeArguments[0] === "string"
|
|
928
|
+
? typeArguments[0]
|
|
929
|
+
: typeArguments[0].getSignature(),
|
|
930
|
+
],
|
|
931
|
+
});
|
|
932
|
+
}
|
|
933
|
+
builder.getWithDefault = getWithDefault;
|
|
934
|
+
function isNone(tx, args, typeArguments) {
|
|
935
|
+
const _args = [];
|
|
936
|
+
_args.push(TransactionArgument.is(args[0]) ? args[0] : tx.object(args[0]));
|
|
937
|
+
// @ts-ignore
|
|
938
|
+
return tx.moveCall({
|
|
939
|
+
target: "0x1::option::is_none",
|
|
940
|
+
arguments: _args,
|
|
941
|
+
typeArguments: [
|
|
942
|
+
typeof typeArguments[0] === "string"
|
|
943
|
+
? typeArguments[0]
|
|
944
|
+
: typeArguments[0].getSignature(),
|
|
945
|
+
],
|
|
946
|
+
});
|
|
947
|
+
}
|
|
948
|
+
builder.isNone = isNone;
|
|
949
|
+
function isSome(tx, args, typeArguments) {
|
|
950
|
+
const _args = [];
|
|
951
|
+
_args.push(TransactionArgument.is(args[0]) ? args[0] : tx.object(args[0]));
|
|
952
|
+
// @ts-ignore
|
|
953
|
+
return tx.moveCall({
|
|
954
|
+
target: "0x1::option::is_some",
|
|
955
|
+
arguments: _args,
|
|
956
|
+
typeArguments: [
|
|
957
|
+
typeof typeArguments[0] === "string"
|
|
958
|
+
? typeArguments[0]
|
|
959
|
+
: typeArguments[0].getSignature(),
|
|
960
|
+
],
|
|
961
|
+
});
|
|
962
|
+
}
|
|
963
|
+
builder.isSome = isSome;
|
|
964
|
+
function none(tx, args, typeArguments) {
|
|
965
|
+
const _args = [];
|
|
966
|
+
// @ts-ignore
|
|
967
|
+
return tx.moveCall({
|
|
968
|
+
target: "0x1::option::none",
|
|
969
|
+
arguments: _args,
|
|
970
|
+
typeArguments: [
|
|
971
|
+
typeof typeArguments[0] === "string"
|
|
972
|
+
? typeArguments[0]
|
|
973
|
+
: typeArguments[0].getSignature(),
|
|
974
|
+
],
|
|
975
|
+
});
|
|
976
|
+
}
|
|
977
|
+
builder.none = none;
|
|
978
|
+
function some(tx, args, typeArguments) {
|
|
979
|
+
const _args = [];
|
|
980
|
+
_args.push(TransactionArgument.is(args[0]) ? args[0] : tx.pure(args[0]));
|
|
981
|
+
// @ts-ignore
|
|
982
|
+
return tx.moveCall({
|
|
983
|
+
target: "0x1::option::some",
|
|
984
|
+
arguments: _args,
|
|
985
|
+
typeArguments: [
|
|
986
|
+
typeof typeArguments[0] === "string"
|
|
987
|
+
? typeArguments[0]
|
|
988
|
+
: typeArguments[0].getSignature(),
|
|
989
|
+
],
|
|
990
|
+
});
|
|
991
|
+
}
|
|
992
|
+
builder.some = some;
|
|
993
|
+
function swap(tx, args, typeArguments) {
|
|
994
|
+
const _args = [];
|
|
995
|
+
_args.push(TransactionArgument.is(args[0]) ? args[0] : tx.object(args[0]));
|
|
996
|
+
_args.push(TransactionArgument.is(args[1]) ? args[1] : tx.pure(args[1]));
|
|
997
|
+
// @ts-ignore
|
|
998
|
+
return tx.moveCall({
|
|
999
|
+
target: "0x1::option::swap",
|
|
1000
|
+
arguments: _args,
|
|
1001
|
+
typeArguments: [
|
|
1002
|
+
typeof typeArguments[0] === "string"
|
|
1003
|
+
? typeArguments[0]
|
|
1004
|
+
: typeArguments[0].getSignature(),
|
|
1005
|
+
],
|
|
1006
|
+
});
|
|
1007
|
+
}
|
|
1008
|
+
builder.swap = swap;
|
|
1009
|
+
function swapOrFill(tx, args, typeArguments) {
|
|
1010
|
+
const _args = [];
|
|
1011
|
+
_args.push(TransactionArgument.is(args[0]) ? args[0] : tx.object(args[0]));
|
|
1012
|
+
_args.push(TransactionArgument.is(args[1]) ? args[1] : tx.pure(args[1]));
|
|
1013
|
+
// @ts-ignore
|
|
1014
|
+
return tx.moveCall({
|
|
1015
|
+
target: "0x1::option::swap_or_fill",
|
|
1016
|
+
arguments: _args,
|
|
1017
|
+
typeArguments: [
|
|
1018
|
+
typeof typeArguments[0] === "string"
|
|
1019
|
+
? typeArguments[0]
|
|
1020
|
+
: typeArguments[0].getSignature(),
|
|
1021
|
+
],
|
|
1022
|
+
});
|
|
1023
|
+
}
|
|
1024
|
+
builder.swapOrFill = swapOrFill;
|
|
1025
|
+
function toVec(tx, args, typeArguments) {
|
|
1026
|
+
const _args = [];
|
|
1027
|
+
_args.push(TransactionArgument.is(args[0]) ? args[0] : tx.pure(args[0]));
|
|
1028
|
+
// @ts-ignore
|
|
1029
|
+
return tx.moveCall({
|
|
1030
|
+
target: "0x1::option::to_vec",
|
|
1031
|
+
arguments: _args,
|
|
1032
|
+
typeArguments: [
|
|
1033
|
+
typeof typeArguments[0] === "string"
|
|
1034
|
+
? typeArguments[0]
|
|
1035
|
+
: typeArguments[0].getSignature(),
|
|
1036
|
+
],
|
|
1037
|
+
});
|
|
1038
|
+
}
|
|
1039
|
+
builder.toVec = toVec;
|
|
1040
|
+
})(builder = option.builder || (option.builder = {}));
|
|
1041
|
+
let view;
|
|
1042
|
+
(function (view) {
|
|
1043
|
+
async function borrow(client, args, typeArguments) {
|
|
1044
|
+
const tx = new TransactionBlock();
|
|
1045
|
+
builder.borrow(tx, args, typeArguments);
|
|
1046
|
+
const res = await client.devInspectTransactionBlock({
|
|
1047
|
+
transactionBlock: tx,
|
|
1048
|
+
sender: ZERO_ADDRESS,
|
|
1049
|
+
});
|
|
1050
|
+
return res;
|
|
1051
|
+
}
|
|
1052
|
+
view.borrow = borrow;
|
|
1053
|
+
async function borrowMut(client, args, typeArguments) {
|
|
1054
|
+
const tx = new TransactionBlock();
|
|
1055
|
+
builder.borrowMut(tx, args, typeArguments);
|
|
1056
|
+
const res = await client.devInspectTransactionBlock({
|
|
1057
|
+
transactionBlock: tx,
|
|
1058
|
+
sender: ZERO_ADDRESS,
|
|
1059
|
+
});
|
|
1060
|
+
return res;
|
|
1061
|
+
}
|
|
1062
|
+
view.borrowMut = borrowMut;
|
|
1063
|
+
async function borrowWithDefault(client, args, typeArguments) {
|
|
1064
|
+
const tx = new TransactionBlock();
|
|
1065
|
+
builder.borrowWithDefault(tx, args, typeArguments);
|
|
1066
|
+
const res = await client.devInspectTransactionBlock({
|
|
1067
|
+
transactionBlock: tx,
|
|
1068
|
+
sender: ZERO_ADDRESS,
|
|
1069
|
+
});
|
|
1070
|
+
return res;
|
|
1071
|
+
}
|
|
1072
|
+
view.borrowWithDefault = borrowWithDefault;
|
|
1073
|
+
async function contains(client, args, typeArguments) {
|
|
1074
|
+
const tx = new TransactionBlock();
|
|
1075
|
+
builder.contains(tx, args, typeArguments);
|
|
1076
|
+
const res = await client.devInspectTransactionBlock({
|
|
1077
|
+
transactionBlock: tx,
|
|
1078
|
+
sender: ZERO_ADDRESS,
|
|
1079
|
+
});
|
|
1080
|
+
return res;
|
|
1081
|
+
}
|
|
1082
|
+
view.contains = contains;
|
|
1083
|
+
async function destroyNone(client, args, typeArguments) {
|
|
1084
|
+
const tx = new TransactionBlock();
|
|
1085
|
+
builder.destroyNone(tx, args, typeArguments);
|
|
1086
|
+
const res = await client.devInspectTransactionBlock({
|
|
1087
|
+
transactionBlock: tx,
|
|
1088
|
+
sender: ZERO_ADDRESS,
|
|
1089
|
+
});
|
|
1090
|
+
return res;
|
|
1091
|
+
}
|
|
1092
|
+
view.destroyNone = destroyNone;
|
|
1093
|
+
async function destroySome(client, args, typeArguments) {
|
|
1094
|
+
const tx = new TransactionBlock();
|
|
1095
|
+
builder.destroySome(tx, args, typeArguments);
|
|
1096
|
+
const res = await client.devInspectTransactionBlock({
|
|
1097
|
+
transactionBlock: tx,
|
|
1098
|
+
sender: ZERO_ADDRESS,
|
|
1099
|
+
});
|
|
1100
|
+
return res;
|
|
1101
|
+
}
|
|
1102
|
+
view.destroySome = destroySome;
|
|
1103
|
+
async function destroyWithDefault(client, args, typeArguments) {
|
|
1104
|
+
const tx = new TransactionBlock();
|
|
1105
|
+
builder.destroyWithDefault(tx, args, typeArguments);
|
|
1106
|
+
const res = await client.devInspectTransactionBlock({
|
|
1107
|
+
transactionBlock: tx,
|
|
1108
|
+
sender: ZERO_ADDRESS,
|
|
1109
|
+
});
|
|
1110
|
+
return res;
|
|
1111
|
+
}
|
|
1112
|
+
view.destroyWithDefault = destroyWithDefault;
|
|
1113
|
+
async function extract(client, args, typeArguments) {
|
|
1114
|
+
const tx = new TransactionBlock();
|
|
1115
|
+
builder.extract(tx, args, typeArguments);
|
|
1116
|
+
const res = await client.devInspectTransactionBlock({
|
|
1117
|
+
transactionBlock: tx,
|
|
1118
|
+
sender: ZERO_ADDRESS,
|
|
1119
|
+
});
|
|
1120
|
+
return res;
|
|
1121
|
+
}
|
|
1122
|
+
view.extract = extract;
|
|
1123
|
+
async function fill(client, args, typeArguments) {
|
|
1124
|
+
const tx = new TransactionBlock();
|
|
1125
|
+
builder.fill(tx, args, typeArguments);
|
|
1126
|
+
const res = await client.devInspectTransactionBlock({
|
|
1127
|
+
transactionBlock: tx,
|
|
1128
|
+
sender: ZERO_ADDRESS,
|
|
1129
|
+
});
|
|
1130
|
+
return res;
|
|
1131
|
+
}
|
|
1132
|
+
view.fill = fill;
|
|
1133
|
+
async function getWithDefault(client, args, typeArguments) {
|
|
1134
|
+
const tx = new TransactionBlock();
|
|
1135
|
+
builder.getWithDefault(tx, args, typeArguments);
|
|
1136
|
+
const res = await client.devInspectTransactionBlock({
|
|
1137
|
+
transactionBlock: tx,
|
|
1138
|
+
sender: ZERO_ADDRESS,
|
|
1139
|
+
});
|
|
1140
|
+
return res;
|
|
1141
|
+
}
|
|
1142
|
+
view.getWithDefault = getWithDefault;
|
|
1143
|
+
async function isNone(client, args, typeArguments) {
|
|
1144
|
+
const tx = new TransactionBlock();
|
|
1145
|
+
builder.isNone(tx, args, typeArguments);
|
|
1146
|
+
const res = await client.devInspectTransactionBlock({
|
|
1147
|
+
transactionBlock: tx,
|
|
1148
|
+
sender: ZERO_ADDRESS,
|
|
1149
|
+
});
|
|
1150
|
+
return res;
|
|
1151
|
+
}
|
|
1152
|
+
view.isNone = isNone;
|
|
1153
|
+
async function isSome(client, args, typeArguments) {
|
|
1154
|
+
const tx = new TransactionBlock();
|
|
1155
|
+
builder.isSome(tx, args, typeArguments);
|
|
1156
|
+
const res = await client.devInspectTransactionBlock({
|
|
1157
|
+
transactionBlock: tx,
|
|
1158
|
+
sender: ZERO_ADDRESS,
|
|
1159
|
+
});
|
|
1160
|
+
return res;
|
|
1161
|
+
}
|
|
1162
|
+
view.isSome = isSome;
|
|
1163
|
+
async function none(client, args, typeArguments) {
|
|
1164
|
+
const tx = new TransactionBlock();
|
|
1165
|
+
builder.none(tx, args, typeArguments);
|
|
1166
|
+
const res = await client.devInspectTransactionBlock({
|
|
1167
|
+
transactionBlock: tx,
|
|
1168
|
+
sender: ZERO_ADDRESS,
|
|
1169
|
+
});
|
|
1170
|
+
return res;
|
|
1171
|
+
}
|
|
1172
|
+
view.none = none;
|
|
1173
|
+
async function some(client, args, typeArguments) {
|
|
1174
|
+
const tx = new TransactionBlock();
|
|
1175
|
+
builder.some(tx, args, typeArguments);
|
|
1176
|
+
const res = await client.devInspectTransactionBlock({
|
|
1177
|
+
transactionBlock: tx,
|
|
1178
|
+
sender: ZERO_ADDRESS,
|
|
1179
|
+
});
|
|
1180
|
+
return res;
|
|
1181
|
+
}
|
|
1182
|
+
view.some = some;
|
|
1183
|
+
async function swap(client, args, typeArguments) {
|
|
1184
|
+
const tx = new TransactionBlock();
|
|
1185
|
+
builder.swap(tx, args, typeArguments);
|
|
1186
|
+
const res = await client.devInspectTransactionBlock({
|
|
1187
|
+
transactionBlock: tx,
|
|
1188
|
+
sender: ZERO_ADDRESS,
|
|
1189
|
+
});
|
|
1190
|
+
return res;
|
|
1191
|
+
}
|
|
1192
|
+
view.swap = swap;
|
|
1193
|
+
async function swapOrFill(client, args, typeArguments) {
|
|
1194
|
+
const tx = new TransactionBlock();
|
|
1195
|
+
builder.swapOrFill(tx, args, typeArguments);
|
|
1196
|
+
const res = await client.devInspectTransactionBlock({
|
|
1197
|
+
transactionBlock: tx,
|
|
1198
|
+
sender: ZERO_ADDRESS,
|
|
1199
|
+
});
|
|
1200
|
+
return res;
|
|
1201
|
+
}
|
|
1202
|
+
view.swapOrFill = swapOrFill;
|
|
1203
|
+
async function toVec(client, args, typeArguments) {
|
|
1204
|
+
const tx = new TransactionBlock();
|
|
1205
|
+
builder.toVec(tx, args, typeArguments);
|
|
1206
|
+
const res = await client.devInspectTransactionBlock({
|
|
1207
|
+
transactionBlock: tx,
|
|
1208
|
+
sender: ZERO_ADDRESS,
|
|
1209
|
+
});
|
|
1210
|
+
return res;
|
|
1211
|
+
}
|
|
1212
|
+
view.toVec = toVec;
|
|
1213
|
+
})(view = option.view || (option.view = {}));
|
|
1214
|
+
})(option || (option = {}));
|
|
1215
|
+
export var string_;
|
|
1216
|
+
(function (string_) {
|
|
1217
|
+
let String;
|
|
1218
|
+
(function (String) {
|
|
1219
|
+
String.TYPE_QNAME = "0x1::string::String";
|
|
1220
|
+
const TYPE = new TypeDescriptor(String.TYPE_QNAME);
|
|
1221
|
+
function type() {
|
|
1222
|
+
return TYPE.apply();
|
|
1223
|
+
}
|
|
1224
|
+
String.type = type;
|
|
1225
|
+
})(String = string_.String || (string_.String = {}));
|
|
1226
|
+
let builder;
|
|
1227
|
+
(function (builder) {
|
|
1228
|
+
function append(tx, args) {
|
|
1229
|
+
const _args = [];
|
|
1230
|
+
_args.push(TransactionArgument.is(args[0]) ? args[0] : tx.object(args[0]));
|
|
1231
|
+
_args.push(TransactionArgument.is(args[1]) ? args[1] : tx.pure(args[1]));
|
|
1232
|
+
// @ts-ignore
|
|
1233
|
+
return tx.moveCall({
|
|
1234
|
+
target: "0x1::string::append",
|
|
1235
|
+
arguments: _args,
|
|
1236
|
+
});
|
|
1237
|
+
}
|
|
1238
|
+
builder.append = append;
|
|
1239
|
+
function appendUtf8(tx, args) {
|
|
1240
|
+
const _args = [];
|
|
1241
|
+
_args.push(TransactionArgument.is(args[0]) ? args[0] : tx.object(args[0]));
|
|
1242
|
+
_args.push(TransactionArgument.is(args[1])
|
|
1243
|
+
? args[1]
|
|
1244
|
+
: tx.makeMoveVec({
|
|
1245
|
+
objects: args[1].map((a) => tx.object(a)),
|
|
1246
|
+
// type: TODO
|
|
1247
|
+
}));
|
|
1248
|
+
// @ts-ignore
|
|
1249
|
+
return tx.moveCall({
|
|
1250
|
+
target: "0x1::string::append_utf8",
|
|
1251
|
+
arguments: _args,
|
|
1252
|
+
});
|
|
1253
|
+
}
|
|
1254
|
+
builder.appendUtf8 = appendUtf8;
|
|
1255
|
+
function bytes(tx, args) {
|
|
1256
|
+
const _args = [];
|
|
1257
|
+
_args.push(TransactionArgument.is(args[0]) ? args[0] : tx.object(args[0]));
|
|
1258
|
+
// @ts-ignore
|
|
1259
|
+
return tx.moveCall({
|
|
1260
|
+
target: "0x1::string::bytes",
|
|
1261
|
+
arguments: _args,
|
|
1262
|
+
});
|
|
1263
|
+
}
|
|
1264
|
+
builder.bytes = bytes;
|
|
1265
|
+
function fromAscii(tx, args) {
|
|
1266
|
+
const _args = [];
|
|
1267
|
+
_args.push(TransactionArgument.is(args[0]) ? args[0] : tx.pure(args[0]));
|
|
1268
|
+
// @ts-ignore
|
|
1269
|
+
return tx.moveCall({
|
|
1270
|
+
target: "0x1::string::from_ascii",
|
|
1271
|
+
arguments: _args,
|
|
1272
|
+
});
|
|
1273
|
+
}
|
|
1274
|
+
builder.fromAscii = fromAscii;
|
|
1275
|
+
function indexOf(tx, args) {
|
|
1276
|
+
const _args = [];
|
|
1277
|
+
_args.push(TransactionArgument.is(args[0]) ? args[0] : tx.object(args[0]));
|
|
1278
|
+
_args.push(TransactionArgument.is(args[1]) ? args[1] : tx.object(args[1]));
|
|
1279
|
+
// @ts-ignore
|
|
1280
|
+
return tx.moveCall({
|
|
1281
|
+
target: "0x1::string::index_of",
|
|
1282
|
+
arguments: _args,
|
|
1283
|
+
});
|
|
1284
|
+
}
|
|
1285
|
+
builder.indexOf = indexOf;
|
|
1286
|
+
function insert(tx, args) {
|
|
1287
|
+
const _args = [];
|
|
1288
|
+
_args.push(TransactionArgument.is(args[0]) ? args[0] : tx.object(args[0]));
|
|
1289
|
+
_args.push(TransactionArgument.is(args[1]) ? args[1] : tx.pure(args[1]));
|
|
1290
|
+
_args.push(TransactionArgument.is(args[2]) ? args[2] : tx.pure(args[2]));
|
|
1291
|
+
// @ts-ignore
|
|
1292
|
+
return tx.moveCall({
|
|
1293
|
+
target: "0x1::string::insert",
|
|
1294
|
+
arguments: _args,
|
|
1295
|
+
});
|
|
1296
|
+
}
|
|
1297
|
+
builder.insert = insert;
|
|
1298
|
+
function isEmpty(tx, args) {
|
|
1299
|
+
const _args = [];
|
|
1300
|
+
_args.push(TransactionArgument.is(args[0]) ? args[0] : tx.object(args[0]));
|
|
1301
|
+
// @ts-ignore
|
|
1302
|
+
return tx.moveCall({
|
|
1303
|
+
target: "0x1::string::is_empty",
|
|
1304
|
+
arguments: _args,
|
|
1305
|
+
});
|
|
1306
|
+
}
|
|
1307
|
+
builder.isEmpty = isEmpty;
|
|
1308
|
+
function length(tx, args) {
|
|
1309
|
+
const _args = [];
|
|
1310
|
+
_args.push(TransactionArgument.is(args[0]) ? args[0] : tx.object(args[0]));
|
|
1311
|
+
// @ts-ignore
|
|
1312
|
+
return tx.moveCall({
|
|
1313
|
+
target: "0x1::string::length",
|
|
1314
|
+
arguments: _args,
|
|
1315
|
+
});
|
|
1316
|
+
}
|
|
1317
|
+
builder.length = length;
|
|
1318
|
+
function subString(tx, args) {
|
|
1319
|
+
const _args = [];
|
|
1320
|
+
_args.push(TransactionArgument.is(args[0]) ? args[0] : tx.object(args[0]));
|
|
1321
|
+
_args.push(TransactionArgument.is(args[1]) ? args[1] : tx.pure(args[1]));
|
|
1322
|
+
_args.push(TransactionArgument.is(args[2]) ? args[2] : tx.pure(args[2]));
|
|
1323
|
+
// @ts-ignore
|
|
1324
|
+
return tx.moveCall({
|
|
1325
|
+
target: "0x1::string::sub_string",
|
|
1326
|
+
arguments: _args,
|
|
1327
|
+
});
|
|
1328
|
+
}
|
|
1329
|
+
builder.subString = subString;
|
|
1330
|
+
function toAscii(tx, args) {
|
|
1331
|
+
const _args = [];
|
|
1332
|
+
_args.push(TransactionArgument.is(args[0]) ? args[0] : tx.pure(args[0]));
|
|
1333
|
+
// @ts-ignore
|
|
1334
|
+
return tx.moveCall({
|
|
1335
|
+
target: "0x1::string::to_ascii",
|
|
1336
|
+
arguments: _args,
|
|
1337
|
+
});
|
|
1338
|
+
}
|
|
1339
|
+
builder.toAscii = toAscii;
|
|
1340
|
+
function tryUtf8(tx, args) {
|
|
1341
|
+
const _args = [];
|
|
1342
|
+
_args.push(TransactionArgument.is(args[0])
|
|
1343
|
+
? args[0]
|
|
1344
|
+
: tx.makeMoveVec({
|
|
1345
|
+
objects: args[0].map((a) => tx.object(a)),
|
|
1346
|
+
// type: TODO
|
|
1347
|
+
}));
|
|
1348
|
+
// @ts-ignore
|
|
1349
|
+
return tx.moveCall({
|
|
1350
|
+
target: "0x1::string::try_utf8",
|
|
1351
|
+
arguments: _args,
|
|
1352
|
+
});
|
|
1353
|
+
}
|
|
1354
|
+
builder.tryUtf8 = tryUtf8;
|
|
1355
|
+
function utf8(tx, args) {
|
|
1356
|
+
const _args = [];
|
|
1357
|
+
_args.push(TransactionArgument.is(args[0])
|
|
1358
|
+
? args[0]
|
|
1359
|
+
: tx.makeMoveVec({
|
|
1360
|
+
objects: args[0].map((a) => tx.object(a)),
|
|
1361
|
+
// type: TODO
|
|
1362
|
+
}));
|
|
1363
|
+
// @ts-ignore
|
|
1364
|
+
return tx.moveCall({
|
|
1365
|
+
target: "0x1::string::utf8",
|
|
1366
|
+
arguments: _args,
|
|
1367
|
+
});
|
|
1368
|
+
}
|
|
1369
|
+
builder.utf8 = utf8;
|
|
1370
|
+
})(builder = string_.builder || (string_.builder = {}));
|
|
1371
|
+
let view;
|
|
1372
|
+
(function (view) {
|
|
1373
|
+
async function append(client, args) {
|
|
1374
|
+
const tx = new TransactionBlock();
|
|
1375
|
+
builder.append(tx, args);
|
|
1376
|
+
const res = await client.devInspectTransactionBlock({
|
|
1377
|
+
transactionBlock: tx,
|
|
1378
|
+
sender: ZERO_ADDRESS,
|
|
1379
|
+
});
|
|
1380
|
+
return res;
|
|
1381
|
+
}
|
|
1382
|
+
view.append = append;
|
|
1383
|
+
async function appendUtf8(client, args) {
|
|
1384
|
+
const tx = new TransactionBlock();
|
|
1385
|
+
builder.appendUtf8(tx, args);
|
|
1386
|
+
const res = await client.devInspectTransactionBlock({
|
|
1387
|
+
transactionBlock: tx,
|
|
1388
|
+
sender: ZERO_ADDRESS,
|
|
1389
|
+
});
|
|
1390
|
+
return res;
|
|
1391
|
+
}
|
|
1392
|
+
view.appendUtf8 = appendUtf8;
|
|
1393
|
+
async function bytes(client, args) {
|
|
1394
|
+
const tx = new TransactionBlock();
|
|
1395
|
+
builder.bytes(tx, args);
|
|
1396
|
+
const res = await client.devInspectTransactionBlock({
|
|
1397
|
+
transactionBlock: tx,
|
|
1398
|
+
sender: ZERO_ADDRESS,
|
|
1399
|
+
});
|
|
1400
|
+
return res;
|
|
1401
|
+
}
|
|
1402
|
+
view.bytes = bytes;
|
|
1403
|
+
async function fromAscii(client, args) {
|
|
1404
|
+
const tx = new TransactionBlock();
|
|
1405
|
+
builder.fromAscii(tx, args);
|
|
1406
|
+
const res = await client.devInspectTransactionBlock({
|
|
1407
|
+
transactionBlock: tx,
|
|
1408
|
+
sender: ZERO_ADDRESS,
|
|
1409
|
+
});
|
|
1410
|
+
return res;
|
|
1411
|
+
}
|
|
1412
|
+
view.fromAscii = fromAscii;
|
|
1413
|
+
async function indexOf(client, args) {
|
|
1414
|
+
const tx = new TransactionBlock();
|
|
1415
|
+
builder.indexOf(tx, args);
|
|
1416
|
+
const res = await client.devInspectTransactionBlock({
|
|
1417
|
+
transactionBlock: tx,
|
|
1418
|
+
sender: ZERO_ADDRESS,
|
|
1419
|
+
});
|
|
1420
|
+
return res;
|
|
1421
|
+
}
|
|
1422
|
+
view.indexOf = indexOf;
|
|
1423
|
+
async function insert(client, args) {
|
|
1424
|
+
const tx = new TransactionBlock();
|
|
1425
|
+
builder.insert(tx, args);
|
|
1426
|
+
const res = await client.devInspectTransactionBlock({
|
|
1427
|
+
transactionBlock: tx,
|
|
1428
|
+
sender: ZERO_ADDRESS,
|
|
1429
|
+
});
|
|
1430
|
+
return res;
|
|
1431
|
+
}
|
|
1432
|
+
view.insert = insert;
|
|
1433
|
+
async function isEmpty(client, args) {
|
|
1434
|
+
const tx = new TransactionBlock();
|
|
1435
|
+
builder.isEmpty(tx, args);
|
|
1436
|
+
const res = await client.devInspectTransactionBlock({
|
|
1437
|
+
transactionBlock: tx,
|
|
1438
|
+
sender: ZERO_ADDRESS,
|
|
1439
|
+
});
|
|
1440
|
+
return res;
|
|
1441
|
+
}
|
|
1442
|
+
view.isEmpty = isEmpty;
|
|
1443
|
+
async function length(client, args) {
|
|
1444
|
+
const tx = new TransactionBlock();
|
|
1445
|
+
builder.length(tx, args);
|
|
1446
|
+
const res = await client.devInspectTransactionBlock({
|
|
1447
|
+
transactionBlock: tx,
|
|
1448
|
+
sender: ZERO_ADDRESS,
|
|
1449
|
+
});
|
|
1450
|
+
return res;
|
|
1451
|
+
}
|
|
1452
|
+
view.length = length;
|
|
1453
|
+
async function subString(client, args) {
|
|
1454
|
+
const tx = new TransactionBlock();
|
|
1455
|
+
builder.subString(tx, args);
|
|
1456
|
+
const res = await client.devInspectTransactionBlock({
|
|
1457
|
+
transactionBlock: tx,
|
|
1458
|
+
sender: ZERO_ADDRESS,
|
|
1459
|
+
});
|
|
1460
|
+
return res;
|
|
1461
|
+
}
|
|
1462
|
+
view.subString = subString;
|
|
1463
|
+
async function toAscii(client, args) {
|
|
1464
|
+
const tx = new TransactionBlock();
|
|
1465
|
+
builder.toAscii(tx, args);
|
|
1466
|
+
const res = await client.devInspectTransactionBlock({
|
|
1467
|
+
transactionBlock: tx,
|
|
1468
|
+
sender: ZERO_ADDRESS,
|
|
1469
|
+
});
|
|
1470
|
+
return res;
|
|
1471
|
+
}
|
|
1472
|
+
view.toAscii = toAscii;
|
|
1473
|
+
async function tryUtf8(client, args) {
|
|
1474
|
+
const tx = new TransactionBlock();
|
|
1475
|
+
builder.tryUtf8(tx, args);
|
|
1476
|
+
const res = await client.devInspectTransactionBlock({
|
|
1477
|
+
transactionBlock: tx,
|
|
1478
|
+
sender: ZERO_ADDRESS,
|
|
1479
|
+
});
|
|
1480
|
+
return res;
|
|
1481
|
+
}
|
|
1482
|
+
view.tryUtf8 = tryUtf8;
|
|
1483
|
+
async function utf8(client, args) {
|
|
1484
|
+
const tx = new TransactionBlock();
|
|
1485
|
+
builder.utf8(tx, args);
|
|
1486
|
+
const res = await client.devInspectTransactionBlock({
|
|
1487
|
+
transactionBlock: tx,
|
|
1488
|
+
sender: ZERO_ADDRESS,
|
|
1489
|
+
});
|
|
1490
|
+
return res;
|
|
1491
|
+
}
|
|
1492
|
+
view.utf8 = utf8;
|
|
1493
|
+
})(view = string_.view || (string_.view = {}));
|
|
1494
|
+
})(string_ || (string_ = {}));
|
|
1495
|
+
export var type_name;
|
|
1496
|
+
(function (type_name) {
|
|
1497
|
+
let TypeName;
|
|
1498
|
+
(function (TypeName) {
|
|
1499
|
+
TypeName.TYPE_QNAME = "0x1::type_name::TypeName";
|
|
1500
|
+
const TYPE = new TypeDescriptor(TypeName.TYPE_QNAME);
|
|
1501
|
+
function type() {
|
|
1502
|
+
return TYPE.apply();
|
|
1503
|
+
}
|
|
1504
|
+
TypeName.type = type;
|
|
1505
|
+
})(TypeName = type_name.TypeName || (type_name.TypeName = {}));
|
|
1506
|
+
let builder;
|
|
1507
|
+
(function (builder) {
|
|
1508
|
+
function borrowString(tx, args) {
|
|
1509
|
+
const _args = [];
|
|
1510
|
+
_args.push(TransactionArgument.is(args[0]) ? args[0] : tx.object(args[0]));
|
|
1511
|
+
// @ts-ignore
|
|
1512
|
+
return tx.moveCall({
|
|
1513
|
+
target: "0x1::type_name::borrow_string",
|
|
1514
|
+
arguments: _args,
|
|
1515
|
+
});
|
|
1516
|
+
}
|
|
1517
|
+
builder.borrowString = borrowString;
|
|
1518
|
+
function get(tx, args, typeArguments) {
|
|
1519
|
+
const _args = [];
|
|
1520
|
+
// @ts-ignore
|
|
1521
|
+
return tx.moveCall({
|
|
1522
|
+
target: "0x1::type_name::get",
|
|
1523
|
+
arguments: _args,
|
|
1524
|
+
typeArguments: [
|
|
1525
|
+
typeof typeArguments[0] === "string"
|
|
1526
|
+
? typeArguments[0]
|
|
1527
|
+
: typeArguments[0].getSignature(),
|
|
1528
|
+
],
|
|
1529
|
+
});
|
|
1530
|
+
}
|
|
1531
|
+
builder.get = get;
|
|
1532
|
+
function getAddress(tx, args) {
|
|
1533
|
+
const _args = [];
|
|
1534
|
+
_args.push(TransactionArgument.is(args[0]) ? args[0] : tx.object(args[0]));
|
|
1535
|
+
// @ts-ignore
|
|
1536
|
+
return tx.moveCall({
|
|
1537
|
+
target: "0x1::type_name::get_address",
|
|
1538
|
+
arguments: _args,
|
|
1539
|
+
});
|
|
1540
|
+
}
|
|
1541
|
+
builder.getAddress = getAddress;
|
|
1542
|
+
function getModule(tx, args) {
|
|
1543
|
+
const _args = [];
|
|
1544
|
+
_args.push(TransactionArgument.is(args[0]) ? args[0] : tx.object(args[0]));
|
|
1545
|
+
// @ts-ignore
|
|
1546
|
+
return tx.moveCall({
|
|
1547
|
+
target: "0x1::type_name::get_module",
|
|
1548
|
+
arguments: _args,
|
|
1549
|
+
});
|
|
1550
|
+
}
|
|
1551
|
+
builder.getModule = getModule;
|
|
1552
|
+
function intoString(tx, args) {
|
|
1553
|
+
const _args = [];
|
|
1554
|
+
_args.push(TransactionArgument.is(args[0]) ? args[0] : tx.pure(args[0]));
|
|
1555
|
+
// @ts-ignore
|
|
1556
|
+
return tx.moveCall({
|
|
1557
|
+
target: "0x1::type_name::into_string",
|
|
1558
|
+
arguments: _args,
|
|
1559
|
+
});
|
|
1560
|
+
}
|
|
1561
|
+
builder.intoString = intoString;
|
|
1562
|
+
})(builder = type_name.builder || (type_name.builder = {}));
|
|
1563
|
+
let view;
|
|
1564
|
+
(function (view) {
|
|
1565
|
+
async function borrowString(client, args) {
|
|
1566
|
+
const tx = new TransactionBlock();
|
|
1567
|
+
builder.borrowString(tx, args);
|
|
1568
|
+
const res = await client.devInspectTransactionBlock({
|
|
1569
|
+
transactionBlock: tx,
|
|
1570
|
+
sender: ZERO_ADDRESS,
|
|
1571
|
+
});
|
|
1572
|
+
return res;
|
|
1573
|
+
}
|
|
1574
|
+
view.borrowString = borrowString;
|
|
1575
|
+
async function get(client, args, typeArguments) {
|
|
1576
|
+
const tx = new TransactionBlock();
|
|
1577
|
+
builder.get(tx, args, typeArguments);
|
|
1578
|
+
const res = await client.devInspectTransactionBlock({
|
|
1579
|
+
transactionBlock: tx,
|
|
1580
|
+
sender: ZERO_ADDRESS,
|
|
1581
|
+
});
|
|
1582
|
+
return res;
|
|
1583
|
+
}
|
|
1584
|
+
view.get = get;
|
|
1585
|
+
async function getAddress(client, args) {
|
|
1586
|
+
const tx = new TransactionBlock();
|
|
1587
|
+
builder.getAddress(tx, args);
|
|
1588
|
+
const res = await client.devInspectTransactionBlock({
|
|
1589
|
+
transactionBlock: tx,
|
|
1590
|
+
sender: ZERO_ADDRESS,
|
|
1591
|
+
});
|
|
1592
|
+
return res;
|
|
1593
|
+
}
|
|
1594
|
+
view.getAddress = getAddress;
|
|
1595
|
+
async function getModule(client, args) {
|
|
1596
|
+
const tx = new TransactionBlock();
|
|
1597
|
+
builder.getModule(tx, args);
|
|
1598
|
+
const res = await client.devInspectTransactionBlock({
|
|
1599
|
+
transactionBlock: tx,
|
|
1600
|
+
sender: ZERO_ADDRESS,
|
|
1601
|
+
});
|
|
1602
|
+
return res;
|
|
1603
|
+
}
|
|
1604
|
+
view.getModule = getModule;
|
|
1605
|
+
async function intoString(client, args) {
|
|
1606
|
+
const tx = new TransactionBlock();
|
|
1607
|
+
builder.intoString(tx, args);
|
|
1608
|
+
const res = await client.devInspectTransactionBlock({
|
|
1609
|
+
transactionBlock: tx,
|
|
1610
|
+
sender: ZERO_ADDRESS,
|
|
1611
|
+
});
|
|
1612
|
+
return res;
|
|
1613
|
+
}
|
|
1614
|
+
view.intoString = intoString;
|
|
1615
|
+
})(view = type_name.view || (type_name.view = {}));
|
|
1616
|
+
})(type_name || (type_name = {}));
|
|
1617
|
+
export var vector;
|
|
1618
|
+
(function (vector) {
|
|
1619
|
+
let builder;
|
|
1620
|
+
(function (builder) {
|
|
1621
|
+
function append(tx, args, typeArguments) {
|
|
1622
|
+
const _args = [];
|
|
1623
|
+
_args.push(TransactionArgument.is(args[0]) ? args[0] : tx.object(args[0]));
|
|
1624
|
+
_args.push(TransactionArgument.is(args[1])
|
|
1625
|
+
? args[1]
|
|
1626
|
+
: tx.makeMoveVec({
|
|
1627
|
+
objects: args[1].map((a) => tx.object(a)),
|
|
1628
|
+
// type: TODO
|
|
1629
|
+
}));
|
|
1630
|
+
// @ts-ignore
|
|
1631
|
+
return tx.moveCall({
|
|
1632
|
+
target: "0x1::vector::append",
|
|
1633
|
+
arguments: _args,
|
|
1634
|
+
typeArguments: [
|
|
1635
|
+
typeof typeArguments[0] === "string"
|
|
1636
|
+
? typeArguments[0]
|
|
1637
|
+
: typeArguments[0].getSignature(),
|
|
1638
|
+
],
|
|
1639
|
+
});
|
|
1640
|
+
}
|
|
1641
|
+
builder.append = append;
|
|
1642
|
+
function borrow(tx, args, typeArguments) {
|
|
1643
|
+
const _args = [];
|
|
1644
|
+
_args.push(TransactionArgument.is(args[0]) ? args[0] : tx.object(args[0]));
|
|
1645
|
+
_args.push(TransactionArgument.is(args[1]) ? args[1] : tx.pure(args[1]));
|
|
1646
|
+
// @ts-ignore
|
|
1647
|
+
return tx.moveCall({
|
|
1648
|
+
target: "0x1::vector::borrow",
|
|
1649
|
+
arguments: _args,
|
|
1650
|
+
typeArguments: [
|
|
1651
|
+
typeof typeArguments[0] === "string"
|
|
1652
|
+
? typeArguments[0]
|
|
1653
|
+
: typeArguments[0].getSignature(),
|
|
1654
|
+
],
|
|
1655
|
+
});
|
|
1656
|
+
}
|
|
1657
|
+
builder.borrow = borrow;
|
|
1658
|
+
function borrowMut(tx, args, typeArguments) {
|
|
1659
|
+
const _args = [];
|
|
1660
|
+
_args.push(TransactionArgument.is(args[0]) ? args[0] : tx.object(args[0]));
|
|
1661
|
+
_args.push(TransactionArgument.is(args[1]) ? args[1] : tx.pure(args[1]));
|
|
1662
|
+
// @ts-ignore
|
|
1663
|
+
return tx.moveCall({
|
|
1664
|
+
target: "0x1::vector::borrow_mut",
|
|
1665
|
+
arguments: _args,
|
|
1666
|
+
typeArguments: [
|
|
1667
|
+
typeof typeArguments[0] === "string"
|
|
1668
|
+
? typeArguments[0]
|
|
1669
|
+
: typeArguments[0].getSignature(),
|
|
1670
|
+
],
|
|
1671
|
+
});
|
|
1672
|
+
}
|
|
1673
|
+
builder.borrowMut = borrowMut;
|
|
1674
|
+
function contains(tx, args, typeArguments) {
|
|
1675
|
+
const _args = [];
|
|
1676
|
+
_args.push(TransactionArgument.is(args[0]) ? args[0] : tx.object(args[0]));
|
|
1677
|
+
_args.push(TransactionArgument.is(args[1]) ? args[1] : tx.object(args[1]));
|
|
1678
|
+
// @ts-ignore
|
|
1679
|
+
return tx.moveCall({
|
|
1680
|
+
target: "0x1::vector::contains",
|
|
1681
|
+
arguments: _args,
|
|
1682
|
+
typeArguments: [
|
|
1683
|
+
typeof typeArguments[0] === "string"
|
|
1684
|
+
? typeArguments[0]
|
|
1685
|
+
: typeArguments[0].getSignature(),
|
|
1686
|
+
],
|
|
1687
|
+
});
|
|
1688
|
+
}
|
|
1689
|
+
builder.contains = contains;
|
|
1690
|
+
function destroyEmpty(tx, args, typeArguments) {
|
|
1691
|
+
const _args = [];
|
|
1692
|
+
_args.push(TransactionArgument.is(args[0])
|
|
1693
|
+
? args[0]
|
|
1694
|
+
: tx.makeMoveVec({
|
|
1695
|
+
objects: args[0].map((a) => tx.object(a)),
|
|
1696
|
+
// type: TODO
|
|
1697
|
+
}));
|
|
1698
|
+
// @ts-ignore
|
|
1699
|
+
return tx.moveCall({
|
|
1700
|
+
target: "0x1::vector::destroy_empty",
|
|
1701
|
+
arguments: _args,
|
|
1702
|
+
typeArguments: [
|
|
1703
|
+
typeof typeArguments[0] === "string"
|
|
1704
|
+
? typeArguments[0]
|
|
1705
|
+
: typeArguments[0].getSignature(),
|
|
1706
|
+
],
|
|
1707
|
+
});
|
|
1708
|
+
}
|
|
1709
|
+
builder.destroyEmpty = destroyEmpty;
|
|
1710
|
+
function empty(tx, args, typeArguments) {
|
|
1711
|
+
const _args = [];
|
|
1712
|
+
// @ts-ignore
|
|
1713
|
+
return tx.moveCall({
|
|
1714
|
+
target: "0x1::vector::empty",
|
|
1715
|
+
arguments: _args,
|
|
1716
|
+
typeArguments: [
|
|
1717
|
+
typeof typeArguments[0] === "string"
|
|
1718
|
+
? typeArguments[0]
|
|
1719
|
+
: typeArguments[0].getSignature(),
|
|
1720
|
+
],
|
|
1721
|
+
});
|
|
1722
|
+
}
|
|
1723
|
+
builder.empty = empty;
|
|
1724
|
+
function indexOf(tx, args, typeArguments) {
|
|
1725
|
+
const _args = [];
|
|
1726
|
+
_args.push(TransactionArgument.is(args[0]) ? args[0] : tx.object(args[0]));
|
|
1727
|
+
_args.push(TransactionArgument.is(args[1]) ? args[1] : tx.object(args[1]));
|
|
1728
|
+
// @ts-ignore
|
|
1729
|
+
return tx.moveCall({
|
|
1730
|
+
target: "0x1::vector::index_of",
|
|
1731
|
+
arguments: _args,
|
|
1732
|
+
typeArguments: [
|
|
1733
|
+
typeof typeArguments[0] === "string"
|
|
1734
|
+
? typeArguments[0]
|
|
1735
|
+
: typeArguments[0].getSignature(),
|
|
1736
|
+
],
|
|
1737
|
+
});
|
|
1738
|
+
}
|
|
1739
|
+
builder.indexOf = indexOf;
|
|
1740
|
+
function insert(tx, args, typeArguments) {
|
|
1741
|
+
const _args = [];
|
|
1742
|
+
_args.push(TransactionArgument.is(args[0]) ? args[0] : tx.object(args[0]));
|
|
1743
|
+
_args.push(TransactionArgument.is(args[1]) ? args[1] : tx.pure(args[1]));
|
|
1744
|
+
_args.push(TransactionArgument.is(args[2]) ? args[2] : tx.pure(args[2]));
|
|
1745
|
+
// @ts-ignore
|
|
1746
|
+
return tx.moveCall({
|
|
1747
|
+
target: "0x1::vector::insert",
|
|
1748
|
+
arguments: _args,
|
|
1749
|
+
typeArguments: [
|
|
1750
|
+
typeof typeArguments[0] === "string"
|
|
1751
|
+
? typeArguments[0]
|
|
1752
|
+
: typeArguments[0].getSignature(),
|
|
1753
|
+
],
|
|
1754
|
+
});
|
|
1755
|
+
}
|
|
1756
|
+
builder.insert = insert;
|
|
1757
|
+
function isEmpty(tx, args, typeArguments) {
|
|
1758
|
+
const _args = [];
|
|
1759
|
+
_args.push(TransactionArgument.is(args[0]) ? args[0] : tx.object(args[0]));
|
|
1760
|
+
// @ts-ignore
|
|
1761
|
+
return tx.moveCall({
|
|
1762
|
+
target: "0x1::vector::is_empty",
|
|
1763
|
+
arguments: _args,
|
|
1764
|
+
typeArguments: [
|
|
1765
|
+
typeof typeArguments[0] === "string"
|
|
1766
|
+
? typeArguments[0]
|
|
1767
|
+
: typeArguments[0].getSignature(),
|
|
1768
|
+
],
|
|
1769
|
+
});
|
|
1770
|
+
}
|
|
1771
|
+
builder.isEmpty = isEmpty;
|
|
1772
|
+
function length(tx, args, typeArguments) {
|
|
1773
|
+
const _args = [];
|
|
1774
|
+
_args.push(TransactionArgument.is(args[0]) ? args[0] : tx.object(args[0]));
|
|
1775
|
+
// @ts-ignore
|
|
1776
|
+
return tx.moveCall({
|
|
1777
|
+
target: "0x1::vector::length",
|
|
1778
|
+
arguments: _args,
|
|
1779
|
+
typeArguments: [
|
|
1780
|
+
typeof typeArguments[0] === "string"
|
|
1781
|
+
? typeArguments[0]
|
|
1782
|
+
: typeArguments[0].getSignature(),
|
|
1783
|
+
],
|
|
1784
|
+
});
|
|
1785
|
+
}
|
|
1786
|
+
builder.length = length;
|
|
1787
|
+
function popBack(tx, args, typeArguments) {
|
|
1788
|
+
const _args = [];
|
|
1789
|
+
_args.push(TransactionArgument.is(args[0]) ? args[0] : tx.object(args[0]));
|
|
1790
|
+
// @ts-ignore
|
|
1791
|
+
return tx.moveCall({
|
|
1792
|
+
target: "0x1::vector::pop_back",
|
|
1793
|
+
arguments: _args,
|
|
1794
|
+
typeArguments: [
|
|
1795
|
+
typeof typeArguments[0] === "string"
|
|
1796
|
+
? typeArguments[0]
|
|
1797
|
+
: typeArguments[0].getSignature(),
|
|
1798
|
+
],
|
|
1799
|
+
});
|
|
1800
|
+
}
|
|
1801
|
+
builder.popBack = popBack;
|
|
1802
|
+
function pushBack(tx, args, typeArguments) {
|
|
1803
|
+
const _args = [];
|
|
1804
|
+
_args.push(TransactionArgument.is(args[0]) ? args[0] : tx.object(args[0]));
|
|
1805
|
+
_args.push(TransactionArgument.is(args[1]) ? args[1] : tx.pure(args[1]));
|
|
1806
|
+
// @ts-ignore
|
|
1807
|
+
return tx.moveCall({
|
|
1808
|
+
target: "0x1::vector::push_back",
|
|
1809
|
+
arguments: _args,
|
|
1810
|
+
typeArguments: [
|
|
1811
|
+
typeof typeArguments[0] === "string"
|
|
1812
|
+
? typeArguments[0]
|
|
1813
|
+
: typeArguments[0].getSignature(),
|
|
1814
|
+
],
|
|
1815
|
+
});
|
|
1816
|
+
}
|
|
1817
|
+
builder.pushBack = pushBack;
|
|
1818
|
+
function remove(tx, args, typeArguments) {
|
|
1819
|
+
const _args = [];
|
|
1820
|
+
_args.push(TransactionArgument.is(args[0]) ? args[0] : tx.object(args[0]));
|
|
1821
|
+
_args.push(TransactionArgument.is(args[1]) ? args[1] : tx.pure(args[1]));
|
|
1822
|
+
// @ts-ignore
|
|
1823
|
+
return tx.moveCall({
|
|
1824
|
+
target: "0x1::vector::remove",
|
|
1825
|
+
arguments: _args,
|
|
1826
|
+
typeArguments: [
|
|
1827
|
+
typeof typeArguments[0] === "string"
|
|
1828
|
+
? typeArguments[0]
|
|
1829
|
+
: typeArguments[0].getSignature(),
|
|
1830
|
+
],
|
|
1831
|
+
});
|
|
1832
|
+
}
|
|
1833
|
+
builder.remove = remove;
|
|
1834
|
+
function reverse(tx, args, typeArguments) {
|
|
1835
|
+
const _args = [];
|
|
1836
|
+
_args.push(TransactionArgument.is(args[0]) ? args[0] : tx.object(args[0]));
|
|
1837
|
+
// @ts-ignore
|
|
1838
|
+
return tx.moveCall({
|
|
1839
|
+
target: "0x1::vector::reverse",
|
|
1840
|
+
arguments: _args,
|
|
1841
|
+
typeArguments: [
|
|
1842
|
+
typeof typeArguments[0] === "string"
|
|
1843
|
+
? typeArguments[0]
|
|
1844
|
+
: typeArguments[0].getSignature(),
|
|
1845
|
+
],
|
|
1846
|
+
});
|
|
1847
|
+
}
|
|
1848
|
+
builder.reverse = reverse;
|
|
1849
|
+
function singleton(tx, args, typeArguments) {
|
|
1850
|
+
const _args = [];
|
|
1851
|
+
_args.push(TransactionArgument.is(args[0]) ? args[0] : tx.pure(args[0]));
|
|
1852
|
+
// @ts-ignore
|
|
1853
|
+
return tx.moveCall({
|
|
1854
|
+
target: "0x1::vector::singleton",
|
|
1855
|
+
arguments: _args,
|
|
1856
|
+
typeArguments: [
|
|
1857
|
+
typeof typeArguments[0] === "string"
|
|
1858
|
+
? typeArguments[0]
|
|
1859
|
+
: typeArguments[0].getSignature(),
|
|
1860
|
+
],
|
|
1861
|
+
});
|
|
1862
|
+
}
|
|
1863
|
+
builder.singleton = singleton;
|
|
1864
|
+
function swap(tx, args, typeArguments) {
|
|
1865
|
+
const _args = [];
|
|
1866
|
+
_args.push(TransactionArgument.is(args[0]) ? args[0] : tx.object(args[0]));
|
|
1867
|
+
_args.push(TransactionArgument.is(args[1]) ? args[1] : tx.pure(args[1]));
|
|
1868
|
+
_args.push(TransactionArgument.is(args[2]) ? args[2] : tx.pure(args[2]));
|
|
1869
|
+
// @ts-ignore
|
|
1870
|
+
return tx.moveCall({
|
|
1871
|
+
target: "0x1::vector::swap",
|
|
1872
|
+
arguments: _args,
|
|
1873
|
+
typeArguments: [
|
|
1874
|
+
typeof typeArguments[0] === "string"
|
|
1875
|
+
? typeArguments[0]
|
|
1876
|
+
: typeArguments[0].getSignature(),
|
|
1877
|
+
],
|
|
1878
|
+
});
|
|
1879
|
+
}
|
|
1880
|
+
builder.swap = swap;
|
|
1881
|
+
function swapRemove(tx, args, typeArguments) {
|
|
1882
|
+
const _args = [];
|
|
1883
|
+
_args.push(TransactionArgument.is(args[0]) ? args[0] : tx.object(args[0]));
|
|
1884
|
+
_args.push(TransactionArgument.is(args[1]) ? args[1] : tx.pure(args[1]));
|
|
1885
|
+
// @ts-ignore
|
|
1886
|
+
return tx.moveCall({
|
|
1887
|
+
target: "0x1::vector::swap_remove",
|
|
1888
|
+
arguments: _args,
|
|
1889
|
+
typeArguments: [
|
|
1890
|
+
typeof typeArguments[0] === "string"
|
|
1891
|
+
? typeArguments[0]
|
|
1892
|
+
: typeArguments[0].getSignature(),
|
|
1893
|
+
],
|
|
1894
|
+
});
|
|
1895
|
+
}
|
|
1896
|
+
builder.swapRemove = swapRemove;
|
|
1897
|
+
})(builder = vector.builder || (vector.builder = {}));
|
|
1898
|
+
let view;
|
|
1899
|
+
(function (view) {
|
|
1900
|
+
async function append(client, args, typeArguments) {
|
|
1901
|
+
const tx = new TransactionBlock();
|
|
1902
|
+
builder.append(tx, args, typeArguments);
|
|
1903
|
+
const res = await client.devInspectTransactionBlock({
|
|
1904
|
+
transactionBlock: tx,
|
|
1905
|
+
sender: ZERO_ADDRESS,
|
|
1906
|
+
});
|
|
1907
|
+
return res;
|
|
1908
|
+
}
|
|
1909
|
+
view.append = append;
|
|
1910
|
+
async function borrow(client, args, typeArguments) {
|
|
1911
|
+
const tx = new TransactionBlock();
|
|
1912
|
+
builder.borrow(tx, args, typeArguments);
|
|
1913
|
+
const res = await client.devInspectTransactionBlock({
|
|
1914
|
+
transactionBlock: tx,
|
|
1915
|
+
sender: ZERO_ADDRESS,
|
|
1916
|
+
});
|
|
1917
|
+
return res;
|
|
1918
|
+
}
|
|
1919
|
+
view.borrow = borrow;
|
|
1920
|
+
async function borrowMut(client, args, typeArguments) {
|
|
1921
|
+
const tx = new TransactionBlock();
|
|
1922
|
+
builder.borrowMut(tx, args, typeArguments);
|
|
1923
|
+
const res = await client.devInspectTransactionBlock({
|
|
1924
|
+
transactionBlock: tx,
|
|
1925
|
+
sender: ZERO_ADDRESS,
|
|
1926
|
+
});
|
|
1927
|
+
return res;
|
|
1928
|
+
}
|
|
1929
|
+
view.borrowMut = borrowMut;
|
|
1930
|
+
async function contains(client, args, typeArguments) {
|
|
1931
|
+
const tx = new TransactionBlock();
|
|
1932
|
+
builder.contains(tx, args, typeArguments);
|
|
1933
|
+
const res = await client.devInspectTransactionBlock({
|
|
1934
|
+
transactionBlock: tx,
|
|
1935
|
+
sender: ZERO_ADDRESS,
|
|
1936
|
+
});
|
|
1937
|
+
return res;
|
|
1938
|
+
}
|
|
1939
|
+
view.contains = contains;
|
|
1940
|
+
async function destroyEmpty(client, args, typeArguments) {
|
|
1941
|
+
const tx = new TransactionBlock();
|
|
1942
|
+
builder.destroyEmpty(tx, args, typeArguments);
|
|
1943
|
+
const res = await client.devInspectTransactionBlock({
|
|
1944
|
+
transactionBlock: tx,
|
|
1945
|
+
sender: ZERO_ADDRESS,
|
|
1946
|
+
});
|
|
1947
|
+
return res;
|
|
1948
|
+
}
|
|
1949
|
+
view.destroyEmpty = destroyEmpty;
|
|
1950
|
+
async function empty(client, args, typeArguments) {
|
|
1951
|
+
const tx = new TransactionBlock();
|
|
1952
|
+
builder.empty(tx, args, typeArguments);
|
|
1953
|
+
const res = await client.devInspectTransactionBlock({
|
|
1954
|
+
transactionBlock: tx,
|
|
1955
|
+
sender: ZERO_ADDRESS,
|
|
1956
|
+
});
|
|
1957
|
+
return res;
|
|
1958
|
+
}
|
|
1959
|
+
view.empty = empty;
|
|
1960
|
+
async function indexOf(client, args, typeArguments) {
|
|
1961
|
+
const tx = new TransactionBlock();
|
|
1962
|
+
builder.indexOf(tx, args, typeArguments);
|
|
1963
|
+
const res = await client.devInspectTransactionBlock({
|
|
1964
|
+
transactionBlock: tx,
|
|
1965
|
+
sender: ZERO_ADDRESS,
|
|
1966
|
+
});
|
|
1967
|
+
return res;
|
|
1968
|
+
}
|
|
1969
|
+
view.indexOf = indexOf;
|
|
1970
|
+
async function insert(client, args, typeArguments) {
|
|
1971
|
+
const tx = new TransactionBlock();
|
|
1972
|
+
builder.insert(tx, args, typeArguments);
|
|
1973
|
+
const res = await client.devInspectTransactionBlock({
|
|
1974
|
+
transactionBlock: tx,
|
|
1975
|
+
sender: ZERO_ADDRESS,
|
|
1976
|
+
});
|
|
1977
|
+
return res;
|
|
1978
|
+
}
|
|
1979
|
+
view.insert = insert;
|
|
1980
|
+
async function isEmpty(client, args, typeArguments) {
|
|
1981
|
+
const tx = new TransactionBlock();
|
|
1982
|
+
builder.isEmpty(tx, args, typeArguments);
|
|
1983
|
+
const res = await client.devInspectTransactionBlock({
|
|
1984
|
+
transactionBlock: tx,
|
|
1985
|
+
sender: ZERO_ADDRESS,
|
|
1986
|
+
});
|
|
1987
|
+
return res;
|
|
1988
|
+
}
|
|
1989
|
+
view.isEmpty = isEmpty;
|
|
1990
|
+
async function length(client, args, typeArguments) {
|
|
1991
|
+
const tx = new TransactionBlock();
|
|
1992
|
+
builder.length(tx, args, typeArguments);
|
|
1993
|
+
const res = await client.devInspectTransactionBlock({
|
|
1994
|
+
transactionBlock: tx,
|
|
1995
|
+
sender: ZERO_ADDRESS,
|
|
1996
|
+
});
|
|
1997
|
+
return res;
|
|
1998
|
+
}
|
|
1999
|
+
view.length = length;
|
|
2000
|
+
async function popBack(client, args, typeArguments) {
|
|
2001
|
+
const tx = new TransactionBlock();
|
|
2002
|
+
builder.popBack(tx, args, typeArguments);
|
|
2003
|
+
const res = await client.devInspectTransactionBlock({
|
|
2004
|
+
transactionBlock: tx,
|
|
2005
|
+
sender: ZERO_ADDRESS,
|
|
2006
|
+
});
|
|
2007
|
+
return res;
|
|
2008
|
+
}
|
|
2009
|
+
view.popBack = popBack;
|
|
2010
|
+
async function pushBack(client, args, typeArguments) {
|
|
2011
|
+
const tx = new TransactionBlock();
|
|
2012
|
+
builder.pushBack(tx, args, typeArguments);
|
|
2013
|
+
const res = await client.devInspectTransactionBlock({
|
|
2014
|
+
transactionBlock: tx,
|
|
2015
|
+
sender: ZERO_ADDRESS,
|
|
2016
|
+
});
|
|
2017
|
+
return res;
|
|
2018
|
+
}
|
|
2019
|
+
view.pushBack = pushBack;
|
|
2020
|
+
async function remove(client, args, typeArguments) {
|
|
2021
|
+
const tx = new TransactionBlock();
|
|
2022
|
+
builder.remove(tx, args, typeArguments);
|
|
2023
|
+
const res = await client.devInspectTransactionBlock({
|
|
2024
|
+
transactionBlock: tx,
|
|
2025
|
+
sender: ZERO_ADDRESS,
|
|
2026
|
+
});
|
|
2027
|
+
return res;
|
|
2028
|
+
}
|
|
2029
|
+
view.remove = remove;
|
|
2030
|
+
async function reverse(client, args, typeArguments) {
|
|
2031
|
+
const tx = new TransactionBlock();
|
|
2032
|
+
builder.reverse(tx, args, typeArguments);
|
|
2033
|
+
const res = await client.devInspectTransactionBlock({
|
|
2034
|
+
transactionBlock: tx,
|
|
2035
|
+
sender: ZERO_ADDRESS,
|
|
2036
|
+
});
|
|
2037
|
+
return res;
|
|
2038
|
+
}
|
|
2039
|
+
view.reverse = reverse;
|
|
2040
|
+
async function singleton(client, args, typeArguments) {
|
|
2041
|
+
const tx = new TransactionBlock();
|
|
2042
|
+
builder.singleton(tx, args, typeArguments);
|
|
2043
|
+
const res = await client.devInspectTransactionBlock({
|
|
2044
|
+
transactionBlock: tx,
|
|
2045
|
+
sender: ZERO_ADDRESS,
|
|
2046
|
+
});
|
|
2047
|
+
return res;
|
|
2048
|
+
}
|
|
2049
|
+
view.singleton = singleton;
|
|
2050
|
+
async function swap(client, args, typeArguments) {
|
|
2051
|
+
const tx = new TransactionBlock();
|
|
2052
|
+
builder.swap(tx, args, typeArguments);
|
|
2053
|
+
const res = await client.devInspectTransactionBlock({
|
|
2054
|
+
transactionBlock: tx,
|
|
2055
|
+
sender: ZERO_ADDRESS,
|
|
2056
|
+
});
|
|
2057
|
+
return res;
|
|
2058
|
+
}
|
|
2059
|
+
view.swap = swap;
|
|
2060
|
+
async function swapRemove(client, args, typeArguments) {
|
|
2061
|
+
const tx = new TransactionBlock();
|
|
2062
|
+
builder.swapRemove(tx, args, typeArguments);
|
|
2063
|
+
const res = await client.devInspectTransactionBlock({
|
|
2064
|
+
transactionBlock: tx,
|
|
2065
|
+
sender: ZERO_ADDRESS,
|
|
2066
|
+
});
|
|
2067
|
+
return res;
|
|
2068
|
+
}
|
|
2069
|
+
view.swapRemove = swapRemove;
|
|
2070
|
+
})(view = vector.view || (vector.view = {}));
|
|
2071
|
+
})(vector || (vector = {}));
|
|
2072
|
+
const MODULES = JSON.parse('{"address":{"fileFormatVersion":6,"address":"0x1","name":"address","friends":[],"structs":{},"exposedFunctions":{"length":{"visibility":"Public","isEntry":false,"typeParameters":[],"parameters":[],"return":["U64"]}}},"ascii":{"fileFormatVersion":6,"address":"0x1","name":"ascii","friends":[],"structs":{"Char":{"abilities":{"abilities":["Copy","Drop","Store"]},"typeParameters":[],"fields":[{"name":"byte","type":"U8"}]},"String":{"abilities":{"abilities":["Copy","Drop","Store"]},"typeParameters":[],"fields":[{"name":"bytes","type":{"Vector":"U8"}}]}},"exposedFunctions":{"all_characters_printable":{"visibility":"Public","isEntry":false,"typeParameters":[],"parameters":[{"Reference":{"Struct":{"address":"0x1","module":"ascii","name":"String","typeArguments":[]}}}],"return":["Bool"]},"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}]}}}}');
|
|
2073
|
+
export function loadAllTypes(coder) {
|
|
2074
|
+
for (const m of Object.values(MODULES)) {
|
|
2075
|
+
coder.load(m);
|
|
2076
|
+
}
|
|
2077
|
+
}
|
|
2078
|
+
loadAllTypes(defaultMoveCoder());
|
|
2079
|
+
//# sourceMappingURL=0x1.js.map
|