@stacks/clarinet-sdk-wasm 3.8.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +51 -0
- package/clarinet_sdk.d.ts +227 -0
- package/clarinet_sdk.js +1833 -0
- package/clarinet_sdk_bg.wasm +0 -0
- package/package.json +17 -0
package/clarinet_sdk.js
ADDED
|
@@ -0,0 +1,1833 @@
|
|
|
1
|
+
|
|
2
|
+
let imports = {};
|
|
3
|
+
imports['__wbindgen_placeholder__'] = module.exports;
|
|
4
|
+
let wasm;
|
|
5
|
+
const { execSync } = require(`child_process`);
|
|
6
|
+
const { existsSync, mkdirSync, readFileSync, writeFileSync } = require(`fs`);
|
|
7
|
+
const { env } = require(`process`);
|
|
8
|
+
const { TextDecoder, TextEncoder } = require(`util`);
|
|
9
|
+
|
|
10
|
+
let cachedUint8ArrayMemory0 = null;
|
|
11
|
+
|
|
12
|
+
function getUint8ArrayMemory0() {
|
|
13
|
+
if (cachedUint8ArrayMemory0 === null || cachedUint8ArrayMemory0.byteLength === 0) {
|
|
14
|
+
cachedUint8ArrayMemory0 = new Uint8Array(wasm.memory.buffer);
|
|
15
|
+
}
|
|
16
|
+
return cachedUint8ArrayMemory0;
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
let cachedTextDecoder = new TextDecoder('utf-8', { ignoreBOM: true, fatal: true });
|
|
20
|
+
|
|
21
|
+
cachedTextDecoder.decode();
|
|
22
|
+
|
|
23
|
+
function decodeText(ptr, len) {
|
|
24
|
+
return cachedTextDecoder.decode(getUint8ArrayMemory0().subarray(ptr, ptr + len));
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
function getStringFromWasm0(ptr, len) {
|
|
28
|
+
ptr = ptr >>> 0;
|
|
29
|
+
return decodeText(ptr, len);
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
let WASM_VECTOR_LEN = 0;
|
|
33
|
+
|
|
34
|
+
const cachedTextEncoder = new TextEncoder('utf-8');
|
|
35
|
+
|
|
36
|
+
const encodeString = (typeof cachedTextEncoder.encodeInto === 'function'
|
|
37
|
+
? function (arg, view) {
|
|
38
|
+
return cachedTextEncoder.encodeInto(arg, view);
|
|
39
|
+
}
|
|
40
|
+
: function (arg, view) {
|
|
41
|
+
const buf = cachedTextEncoder.encode(arg);
|
|
42
|
+
view.set(buf);
|
|
43
|
+
return {
|
|
44
|
+
read: arg.length,
|
|
45
|
+
written: buf.length
|
|
46
|
+
};
|
|
47
|
+
});
|
|
48
|
+
|
|
49
|
+
function passStringToWasm0(arg, malloc, realloc) {
|
|
50
|
+
|
|
51
|
+
if (realloc === undefined) {
|
|
52
|
+
const buf = cachedTextEncoder.encode(arg);
|
|
53
|
+
const ptr = malloc(buf.length, 1) >>> 0;
|
|
54
|
+
getUint8ArrayMemory0().subarray(ptr, ptr + buf.length).set(buf);
|
|
55
|
+
WASM_VECTOR_LEN = buf.length;
|
|
56
|
+
return ptr;
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
let len = arg.length;
|
|
60
|
+
let ptr = malloc(len, 1) >>> 0;
|
|
61
|
+
|
|
62
|
+
const mem = getUint8ArrayMemory0();
|
|
63
|
+
|
|
64
|
+
let offset = 0;
|
|
65
|
+
|
|
66
|
+
for (; offset < len; offset++) {
|
|
67
|
+
const code = arg.charCodeAt(offset);
|
|
68
|
+
if (code > 0x7F) break;
|
|
69
|
+
mem[ptr + offset] = code;
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
if (offset !== len) {
|
|
73
|
+
if (offset !== 0) {
|
|
74
|
+
arg = arg.slice(offset);
|
|
75
|
+
}
|
|
76
|
+
ptr = realloc(ptr, len, len = offset + arg.length * 3, 1) >>> 0;
|
|
77
|
+
const view = getUint8ArrayMemory0().subarray(ptr + offset, ptr + len);
|
|
78
|
+
const ret = encodeString(arg, view);
|
|
79
|
+
|
|
80
|
+
offset += ret.written;
|
|
81
|
+
ptr = realloc(ptr, len, offset, 1) >>> 0;
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
WASM_VECTOR_LEN = offset;
|
|
85
|
+
return ptr;
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
let cachedDataViewMemory0 = null;
|
|
89
|
+
|
|
90
|
+
function getDataViewMemory0() {
|
|
91
|
+
if (cachedDataViewMemory0 === null || cachedDataViewMemory0.buffer.detached === true || (cachedDataViewMemory0.buffer.detached === undefined && cachedDataViewMemory0.buffer !== wasm.memory.buffer)) {
|
|
92
|
+
cachedDataViewMemory0 = new DataView(wasm.memory.buffer);
|
|
93
|
+
}
|
|
94
|
+
return cachedDataViewMemory0;
|
|
95
|
+
}
|
|
96
|
+
|
|
97
|
+
function addToExternrefTable0(obj) {
|
|
98
|
+
const idx = wasm.__externref_table_alloc();
|
|
99
|
+
wasm.__wbindgen_export_4.set(idx, obj);
|
|
100
|
+
return idx;
|
|
101
|
+
}
|
|
102
|
+
|
|
103
|
+
function handleError(f, args) {
|
|
104
|
+
try {
|
|
105
|
+
return f.apply(this, args);
|
|
106
|
+
} catch (e) {
|
|
107
|
+
const idx = addToExternrefTable0(e);
|
|
108
|
+
wasm.__wbindgen_exn_store(idx);
|
|
109
|
+
}
|
|
110
|
+
}
|
|
111
|
+
|
|
112
|
+
function passArray8ToWasm0(arg, malloc) {
|
|
113
|
+
const ptr = malloc(arg.length * 1, 1) >>> 0;
|
|
114
|
+
getUint8ArrayMemory0().set(arg, ptr / 1);
|
|
115
|
+
WASM_VECTOR_LEN = arg.length;
|
|
116
|
+
return ptr;
|
|
117
|
+
}
|
|
118
|
+
|
|
119
|
+
function getArrayU8FromWasm0(ptr, len) {
|
|
120
|
+
ptr = ptr >>> 0;
|
|
121
|
+
return getUint8ArrayMemory0().subarray(ptr / 1, ptr / 1 + len);
|
|
122
|
+
}
|
|
123
|
+
|
|
124
|
+
function isLikeNone(x) {
|
|
125
|
+
return x === undefined || x === null;
|
|
126
|
+
}
|
|
127
|
+
|
|
128
|
+
function debugString(val) {
|
|
129
|
+
// primitive types
|
|
130
|
+
const type = typeof val;
|
|
131
|
+
if (type == 'number' || type == 'boolean' || val == null) {
|
|
132
|
+
return `${val}`;
|
|
133
|
+
}
|
|
134
|
+
if (type == 'string') {
|
|
135
|
+
return `"${val}"`;
|
|
136
|
+
}
|
|
137
|
+
if (type == 'symbol') {
|
|
138
|
+
const description = val.description;
|
|
139
|
+
if (description == null) {
|
|
140
|
+
return 'Symbol';
|
|
141
|
+
} else {
|
|
142
|
+
return `Symbol(${description})`;
|
|
143
|
+
}
|
|
144
|
+
}
|
|
145
|
+
if (type == 'function') {
|
|
146
|
+
const name = val.name;
|
|
147
|
+
if (typeof name == 'string' && name.length > 0) {
|
|
148
|
+
return `Function(${name})`;
|
|
149
|
+
} else {
|
|
150
|
+
return 'Function';
|
|
151
|
+
}
|
|
152
|
+
}
|
|
153
|
+
// objects
|
|
154
|
+
if (Array.isArray(val)) {
|
|
155
|
+
const length = val.length;
|
|
156
|
+
let debug = '[';
|
|
157
|
+
if (length > 0) {
|
|
158
|
+
debug += debugString(val[0]);
|
|
159
|
+
}
|
|
160
|
+
for(let i = 1; i < length; i++) {
|
|
161
|
+
debug += ', ' + debugString(val[i]);
|
|
162
|
+
}
|
|
163
|
+
debug += ']';
|
|
164
|
+
return debug;
|
|
165
|
+
}
|
|
166
|
+
// Test for built-in
|
|
167
|
+
const builtInMatches = /\[object ([^\]]+)\]/.exec(toString.call(val));
|
|
168
|
+
let className;
|
|
169
|
+
if (builtInMatches && builtInMatches.length > 1) {
|
|
170
|
+
className = builtInMatches[1];
|
|
171
|
+
} else {
|
|
172
|
+
// Failed to match the standard '[object ClassName]'
|
|
173
|
+
return toString.call(val);
|
|
174
|
+
}
|
|
175
|
+
if (className == 'Object') {
|
|
176
|
+
// we're a user defined class or Object
|
|
177
|
+
// JSON.stringify avoids problems with cycles, and is generally much
|
|
178
|
+
// easier than looping through ownProperties of `val`.
|
|
179
|
+
try {
|
|
180
|
+
return 'Object(' + JSON.stringify(val) + ')';
|
|
181
|
+
} catch (_) {
|
|
182
|
+
return 'Object';
|
|
183
|
+
}
|
|
184
|
+
}
|
|
185
|
+
// errors
|
|
186
|
+
if (val instanceof Error) {
|
|
187
|
+
return `${val.name}: ${val.message}\n${val.stack}`;
|
|
188
|
+
}
|
|
189
|
+
// TODO we could test for more things here, like `Set`s and `Map`s.
|
|
190
|
+
return className;
|
|
191
|
+
}
|
|
192
|
+
|
|
193
|
+
const CLOSURE_DTORS = (typeof FinalizationRegistry === 'undefined')
|
|
194
|
+
? { register: () => {}, unregister: () => {} }
|
|
195
|
+
: new FinalizationRegistry(
|
|
196
|
+
state => {
|
|
197
|
+
wasm.__wbindgen_export_6.get(state.dtor)(state.a, state.b);
|
|
198
|
+
}
|
|
199
|
+
);
|
|
200
|
+
|
|
201
|
+
function makeMutClosure(arg0, arg1, dtor, f) {
|
|
202
|
+
const state = { a: arg0, b: arg1, cnt: 1, dtor };
|
|
203
|
+
const real = (...args) => {
|
|
204
|
+
|
|
205
|
+
// First up with a closure we increment the internal reference
|
|
206
|
+
// count. This ensures that the Rust closure environment won't
|
|
207
|
+
// be deallocated while we're invoking it.
|
|
208
|
+
state.cnt++;
|
|
209
|
+
const a = state.a;
|
|
210
|
+
state.a = 0;
|
|
211
|
+
try {
|
|
212
|
+
return f(a, state.b, ...args);
|
|
213
|
+
} finally {
|
|
214
|
+
if (--state.cnt === 0) {
|
|
215
|
+
wasm.__wbindgen_export_6.get(state.dtor)(a, state.b);
|
|
216
|
+
CLOSURE_DTORS.unregister(state);
|
|
217
|
+
} else {
|
|
218
|
+
state.a = a;
|
|
219
|
+
}
|
|
220
|
+
}
|
|
221
|
+
};
|
|
222
|
+
real.original = state;
|
|
223
|
+
CLOSURE_DTORS.register(real, state, state);
|
|
224
|
+
return real;
|
|
225
|
+
}
|
|
226
|
+
|
|
227
|
+
function passArrayJsValueToWasm0(array, malloc) {
|
|
228
|
+
const ptr = malloc(array.length * 4, 4) >>> 0;
|
|
229
|
+
for (let i = 0; i < array.length; i++) {
|
|
230
|
+
const add = addToExternrefTable0(array[i]);
|
|
231
|
+
getDataViewMemory0().setUint32(ptr + 4 * i, add, true);
|
|
232
|
+
}
|
|
233
|
+
WASM_VECTOR_LEN = array.length;
|
|
234
|
+
return ptr;
|
|
235
|
+
}
|
|
236
|
+
|
|
237
|
+
function _assertClass(instance, klass) {
|
|
238
|
+
if (!(instance instanceof klass)) {
|
|
239
|
+
throw new Error(`expected instance of ${klass.name}`);
|
|
240
|
+
}
|
|
241
|
+
}
|
|
242
|
+
|
|
243
|
+
function takeFromExternrefTable0(idx) {
|
|
244
|
+
const value = wasm.__wbindgen_export_4.get(idx);
|
|
245
|
+
wasm.__externref_table_dealloc(idx);
|
|
246
|
+
return value;
|
|
247
|
+
}
|
|
248
|
+
function __wbg_adapter_8(arg0, arg1) {
|
|
249
|
+
wasm.wasm_bindgen__convert__closures_____invoke__hedd2dd73d4c477e6(arg0, arg1);
|
|
250
|
+
}
|
|
251
|
+
|
|
252
|
+
function __wbg_adapter_17(arg0, arg1, arg2) {
|
|
253
|
+
wasm.closure607_externref_shim(arg0, arg1, arg2);
|
|
254
|
+
}
|
|
255
|
+
|
|
256
|
+
function __wbg_adapter_229(arg0, arg1, arg2, arg3) {
|
|
257
|
+
wasm.closure3301_externref_shim(arg0, arg1, arg2, arg3);
|
|
258
|
+
}
|
|
259
|
+
|
|
260
|
+
const __wbindgen_enum_RequestCache = ["default", "no-store", "reload", "no-cache", "force-cache", "only-if-cached"];
|
|
261
|
+
|
|
262
|
+
const __wbindgen_enum_RequestCredentials = ["omit", "same-origin", "include"];
|
|
263
|
+
|
|
264
|
+
const __wbindgen_enum_RequestMode = ["same-origin", "no-cors", "cors", "navigate"];
|
|
265
|
+
|
|
266
|
+
const CallFnArgsFinalization = (typeof FinalizationRegistry === 'undefined')
|
|
267
|
+
? { register: () => {}, unregister: () => {} }
|
|
268
|
+
: new FinalizationRegistry(ptr => wasm.__wbg_callfnargs_free(ptr >>> 0, 1));
|
|
269
|
+
|
|
270
|
+
class CallFnArgs {
|
|
271
|
+
|
|
272
|
+
__destroy_into_raw() {
|
|
273
|
+
const ptr = this.__wbg_ptr;
|
|
274
|
+
this.__wbg_ptr = 0;
|
|
275
|
+
CallFnArgsFinalization.unregister(this);
|
|
276
|
+
return ptr;
|
|
277
|
+
}
|
|
278
|
+
|
|
279
|
+
free() {
|
|
280
|
+
const ptr = this.__destroy_into_raw();
|
|
281
|
+
wasm.__wbg_callfnargs_free(ptr, 0);
|
|
282
|
+
}
|
|
283
|
+
/**
|
|
284
|
+
* @param {string} contract
|
|
285
|
+
* @param {string} method
|
|
286
|
+
* @param {Uint8Array[]} args
|
|
287
|
+
* @param {string} sender
|
|
288
|
+
*/
|
|
289
|
+
constructor(contract, method, args, sender) {
|
|
290
|
+
const ptr0 = passStringToWasm0(contract, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
291
|
+
const len0 = WASM_VECTOR_LEN;
|
|
292
|
+
const ptr1 = passStringToWasm0(method, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
293
|
+
const len1 = WASM_VECTOR_LEN;
|
|
294
|
+
const ptr2 = passArrayJsValueToWasm0(args, wasm.__wbindgen_malloc);
|
|
295
|
+
const len2 = WASM_VECTOR_LEN;
|
|
296
|
+
const ptr3 = passStringToWasm0(sender, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
297
|
+
const len3 = WASM_VECTOR_LEN;
|
|
298
|
+
const ret = wasm.callfnargs_new(ptr0, len0, ptr1, len1, ptr2, len2, ptr3, len3);
|
|
299
|
+
this.__wbg_ptr = ret >>> 0;
|
|
300
|
+
CallFnArgsFinalization.register(this, this.__wbg_ptr, this);
|
|
301
|
+
return this;
|
|
302
|
+
}
|
|
303
|
+
}
|
|
304
|
+
module.exports.CallFnArgs = CallFnArgs;
|
|
305
|
+
|
|
306
|
+
const ContractOptionsFinalization = (typeof FinalizationRegistry === 'undefined')
|
|
307
|
+
? { register: () => {}, unregister: () => {} }
|
|
308
|
+
: new FinalizationRegistry(ptr => wasm.__wbg_contractoptions_free(ptr >>> 0, 1));
|
|
309
|
+
|
|
310
|
+
class ContractOptions {
|
|
311
|
+
|
|
312
|
+
__destroy_into_raw() {
|
|
313
|
+
const ptr = this.__wbg_ptr;
|
|
314
|
+
this.__wbg_ptr = 0;
|
|
315
|
+
ContractOptionsFinalization.unregister(this);
|
|
316
|
+
return ptr;
|
|
317
|
+
}
|
|
318
|
+
|
|
319
|
+
free() {
|
|
320
|
+
const ptr = this.__destroy_into_raw();
|
|
321
|
+
wasm.__wbg_contractoptions_free(ptr, 0);
|
|
322
|
+
}
|
|
323
|
+
/**
|
|
324
|
+
* @param {number | null} [clarity_version]
|
|
325
|
+
*/
|
|
326
|
+
constructor(clarity_version) {
|
|
327
|
+
const ret = wasm.contractoptions_new(isLikeNone(clarity_version) ? 0x100000001 : (clarity_version) >>> 0);
|
|
328
|
+
this.__wbg_ptr = ret >>> 0;
|
|
329
|
+
ContractOptionsFinalization.register(this, this.__wbg_ptr, this);
|
|
330
|
+
return this;
|
|
331
|
+
}
|
|
332
|
+
}
|
|
333
|
+
module.exports.ContractOptions = ContractOptions;
|
|
334
|
+
|
|
335
|
+
const DeployContractArgsFinalization = (typeof FinalizationRegistry === 'undefined')
|
|
336
|
+
? { register: () => {}, unregister: () => {} }
|
|
337
|
+
: new FinalizationRegistry(ptr => wasm.__wbg_deploycontractargs_free(ptr >>> 0, 1));
|
|
338
|
+
|
|
339
|
+
class DeployContractArgs {
|
|
340
|
+
|
|
341
|
+
__destroy_into_raw() {
|
|
342
|
+
const ptr = this.__wbg_ptr;
|
|
343
|
+
this.__wbg_ptr = 0;
|
|
344
|
+
DeployContractArgsFinalization.unregister(this);
|
|
345
|
+
return ptr;
|
|
346
|
+
}
|
|
347
|
+
|
|
348
|
+
free() {
|
|
349
|
+
const ptr = this.__destroy_into_raw();
|
|
350
|
+
wasm.__wbg_deploycontractargs_free(ptr, 0);
|
|
351
|
+
}
|
|
352
|
+
/**
|
|
353
|
+
* @param {string} name
|
|
354
|
+
* @param {string} content
|
|
355
|
+
* @param {ContractOptions} options
|
|
356
|
+
* @param {string} sender
|
|
357
|
+
*/
|
|
358
|
+
constructor(name, content, options, sender) {
|
|
359
|
+
const ptr0 = passStringToWasm0(name, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
360
|
+
const len0 = WASM_VECTOR_LEN;
|
|
361
|
+
const ptr1 = passStringToWasm0(content, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
362
|
+
const len1 = WASM_VECTOR_LEN;
|
|
363
|
+
_assertClass(options, ContractOptions);
|
|
364
|
+
var ptr2 = options.__destroy_into_raw();
|
|
365
|
+
const ptr3 = passStringToWasm0(sender, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
366
|
+
const len3 = WASM_VECTOR_LEN;
|
|
367
|
+
const ret = wasm.deploycontractargs_new(ptr0, len0, ptr1, len1, ptr2, ptr3, len3);
|
|
368
|
+
this.__wbg_ptr = ret >>> 0;
|
|
369
|
+
DeployContractArgsFinalization.register(this, this.__wbg_ptr, this);
|
|
370
|
+
return this;
|
|
371
|
+
}
|
|
372
|
+
}
|
|
373
|
+
module.exports.DeployContractArgs = DeployContractArgs;
|
|
374
|
+
|
|
375
|
+
const SDKFinalization = (typeof FinalizationRegistry === 'undefined')
|
|
376
|
+
? { register: () => {}, unregister: () => {} }
|
|
377
|
+
: new FinalizationRegistry(ptr => wasm.__wbg_sdk_free(ptr >>> 0, 1));
|
|
378
|
+
|
|
379
|
+
class SDK {
|
|
380
|
+
|
|
381
|
+
__destroy_into_raw() {
|
|
382
|
+
const ptr = this.__wbg_ptr;
|
|
383
|
+
this.__wbg_ptr = 0;
|
|
384
|
+
SDKFinalization.unregister(this);
|
|
385
|
+
return ptr;
|
|
386
|
+
}
|
|
387
|
+
|
|
388
|
+
free() {
|
|
389
|
+
const ptr = this.__destroy_into_raw();
|
|
390
|
+
wasm.__wbg_sdk_free(ptr, 0);
|
|
391
|
+
}
|
|
392
|
+
/**
|
|
393
|
+
* @returns {string}
|
|
394
|
+
*/
|
|
395
|
+
get deployer() {
|
|
396
|
+
let deferred1_0;
|
|
397
|
+
let deferred1_1;
|
|
398
|
+
try {
|
|
399
|
+
const ret = wasm.__wbg_get_sdk_deployer(this.__wbg_ptr);
|
|
400
|
+
deferred1_0 = ret[0];
|
|
401
|
+
deferred1_1 = ret[1];
|
|
402
|
+
return getStringFromWasm0(ret[0], ret[1]);
|
|
403
|
+
} finally {
|
|
404
|
+
wasm.__wbindgen_free(deferred1_0, deferred1_1, 1);
|
|
405
|
+
}
|
|
406
|
+
}
|
|
407
|
+
/**
|
|
408
|
+
* @param {string} arg0
|
|
409
|
+
*/
|
|
410
|
+
set deployer(arg0) {
|
|
411
|
+
const ptr0 = passStringToWasm0(arg0, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
412
|
+
const len0 = WASM_VECTOR_LEN;
|
|
413
|
+
wasm.__wbg_set_sdk_deployer(this.__wbg_ptr, ptr0, len0);
|
|
414
|
+
}
|
|
415
|
+
/**
|
|
416
|
+
* @param {Function} fs_request
|
|
417
|
+
* @param {SDKOptions | null} [options]
|
|
418
|
+
*/
|
|
419
|
+
constructor(fs_request, options) {
|
|
420
|
+
let ptr0 = 0;
|
|
421
|
+
if (!isLikeNone(options)) {
|
|
422
|
+
_assertClass(options, SDKOptions);
|
|
423
|
+
ptr0 = options.__destroy_into_raw();
|
|
424
|
+
}
|
|
425
|
+
const ret = wasm.sdk_new(fs_request, ptr0);
|
|
426
|
+
this.__wbg_ptr = ret >>> 0;
|
|
427
|
+
SDKFinalization.register(this, this.__wbg_ptr, this);
|
|
428
|
+
return this;
|
|
429
|
+
}
|
|
430
|
+
/**
|
|
431
|
+
* @returns {EpochString}
|
|
432
|
+
*/
|
|
433
|
+
static getDefaultEpoch() {
|
|
434
|
+
const ret = wasm.sdk_getDefaultEpoch();
|
|
435
|
+
return ret;
|
|
436
|
+
}
|
|
437
|
+
/**
|
|
438
|
+
* @returns {ClarityVersionString}
|
|
439
|
+
*/
|
|
440
|
+
getDefaultClarityVersionForCurrentEpoch() {
|
|
441
|
+
const ret = wasm.sdk_getDefaultClarityVersionForCurrentEpoch(this.__wbg_ptr);
|
|
442
|
+
return ret;
|
|
443
|
+
}
|
|
444
|
+
/**
|
|
445
|
+
* @param {any} remote_data_settings
|
|
446
|
+
* @returns {Promise<void>}
|
|
447
|
+
*/
|
|
448
|
+
initEmptySession(remote_data_settings) {
|
|
449
|
+
const ret = wasm.sdk_initEmptySession(this.__wbg_ptr, remote_data_settings);
|
|
450
|
+
return ret;
|
|
451
|
+
}
|
|
452
|
+
/**
|
|
453
|
+
* @param {string} cwd
|
|
454
|
+
* @param {string} manifest_path
|
|
455
|
+
* @returns {Promise<void>}
|
|
456
|
+
*/
|
|
457
|
+
initSession(cwd, manifest_path) {
|
|
458
|
+
const ptr0 = passStringToWasm0(cwd, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
459
|
+
const len0 = WASM_VECTOR_LEN;
|
|
460
|
+
const ptr1 = passStringToWasm0(manifest_path, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
461
|
+
const len1 = WASM_VECTOR_LEN;
|
|
462
|
+
const ret = wasm.sdk_initSession(this.__wbg_ptr, ptr0, len0, ptr1, len1);
|
|
463
|
+
return ret;
|
|
464
|
+
}
|
|
465
|
+
clearCache() {
|
|
466
|
+
wasm.sdk_clearCache(this.__wbg_ptr);
|
|
467
|
+
}
|
|
468
|
+
/**
|
|
469
|
+
* @returns {number}
|
|
470
|
+
*/
|
|
471
|
+
get blockHeight() {
|
|
472
|
+
const ret = wasm.sdk_blockHeight(this.__wbg_ptr);
|
|
473
|
+
return ret >>> 0;
|
|
474
|
+
}
|
|
475
|
+
/**
|
|
476
|
+
* @returns {number}
|
|
477
|
+
*/
|
|
478
|
+
get stacksBlockHeight() {
|
|
479
|
+
const ret = wasm.sdk_blockHeight(this.__wbg_ptr);
|
|
480
|
+
return ret >>> 0;
|
|
481
|
+
}
|
|
482
|
+
/**
|
|
483
|
+
* @returns {number}
|
|
484
|
+
*/
|
|
485
|
+
get burnBlockHeight() {
|
|
486
|
+
const ret = wasm.sdk_burnBlockHeight(this.__wbg_ptr);
|
|
487
|
+
return ret >>> 0;
|
|
488
|
+
}
|
|
489
|
+
/**
|
|
490
|
+
* @returns {string}
|
|
491
|
+
*/
|
|
492
|
+
get currentEpoch() {
|
|
493
|
+
let deferred1_0;
|
|
494
|
+
let deferred1_1;
|
|
495
|
+
try {
|
|
496
|
+
const ret = wasm.sdk_currentEpoch(this.__wbg_ptr);
|
|
497
|
+
deferred1_0 = ret[0];
|
|
498
|
+
deferred1_1 = ret[1];
|
|
499
|
+
return getStringFromWasm0(ret[0], ret[1]);
|
|
500
|
+
} finally {
|
|
501
|
+
wasm.__wbindgen_free(deferred1_0, deferred1_1, 1);
|
|
502
|
+
}
|
|
503
|
+
}
|
|
504
|
+
/**
|
|
505
|
+
* @param {EpochString} epoch
|
|
506
|
+
*/
|
|
507
|
+
setEpoch(epoch) {
|
|
508
|
+
wasm.sdk_setEpoch(this.__wbg_ptr, epoch);
|
|
509
|
+
}
|
|
510
|
+
/**
|
|
511
|
+
* @returns {Map<string, IContractInterface>}
|
|
512
|
+
*/
|
|
513
|
+
getContractsInterfaces() {
|
|
514
|
+
const ret = wasm.sdk_getContractsInterfaces(this.__wbg_ptr);
|
|
515
|
+
if (ret[2]) {
|
|
516
|
+
throw takeFromExternrefTable0(ret[1]);
|
|
517
|
+
}
|
|
518
|
+
return takeFromExternrefTable0(ret[0]);
|
|
519
|
+
}
|
|
520
|
+
/**
|
|
521
|
+
* @param {string} contract
|
|
522
|
+
* @returns {string | undefined}
|
|
523
|
+
*/
|
|
524
|
+
getContractSource(contract) {
|
|
525
|
+
const ptr0 = passStringToWasm0(contract, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
526
|
+
const len0 = WASM_VECTOR_LEN;
|
|
527
|
+
const ret = wasm.sdk_getContractSource(this.__wbg_ptr, ptr0, len0);
|
|
528
|
+
let v2;
|
|
529
|
+
if (ret[0] !== 0) {
|
|
530
|
+
v2 = getStringFromWasm0(ret[0], ret[1]).slice();
|
|
531
|
+
wasm.__wbindgen_free(ret[0], ret[1] * 1, 1);
|
|
532
|
+
}
|
|
533
|
+
return v2;
|
|
534
|
+
}
|
|
535
|
+
/**
|
|
536
|
+
* @param {string} contract
|
|
537
|
+
* @returns {IContractAST}
|
|
538
|
+
*/
|
|
539
|
+
getContractAST(contract) {
|
|
540
|
+
const ptr0 = passStringToWasm0(contract, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
541
|
+
const len0 = WASM_VECTOR_LEN;
|
|
542
|
+
const ret = wasm.sdk_getContractAST(this.__wbg_ptr, ptr0, len0);
|
|
543
|
+
if (ret[2]) {
|
|
544
|
+
throw takeFromExternrefTable0(ret[1]);
|
|
545
|
+
}
|
|
546
|
+
return takeFromExternrefTable0(ret[0]);
|
|
547
|
+
}
|
|
548
|
+
/**
|
|
549
|
+
* @returns {Map<string, Map<string, bigint>>}
|
|
550
|
+
*/
|
|
551
|
+
getAssetsMap() {
|
|
552
|
+
const ret = wasm.sdk_getAssetsMap(this.__wbg_ptr);
|
|
553
|
+
if (ret[2]) {
|
|
554
|
+
throw takeFromExternrefTable0(ret[1]);
|
|
555
|
+
}
|
|
556
|
+
return takeFromExternrefTable0(ret[0]);
|
|
557
|
+
}
|
|
558
|
+
/**
|
|
559
|
+
* @returns {Map<string, string>}
|
|
560
|
+
*/
|
|
561
|
+
getAccounts() {
|
|
562
|
+
const ret = wasm.sdk_getAccounts(this.__wbg_ptr);
|
|
563
|
+
if (ret[2]) {
|
|
564
|
+
throw takeFromExternrefTable0(ret[1]);
|
|
565
|
+
}
|
|
566
|
+
return takeFromExternrefTable0(ret[0]);
|
|
567
|
+
}
|
|
568
|
+
/**
|
|
569
|
+
* @param {string} contract
|
|
570
|
+
* @param {string} var_name
|
|
571
|
+
* @returns {string}
|
|
572
|
+
*/
|
|
573
|
+
getDataVar(contract, var_name) {
|
|
574
|
+
let deferred4_0;
|
|
575
|
+
let deferred4_1;
|
|
576
|
+
try {
|
|
577
|
+
const ptr0 = passStringToWasm0(contract, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
578
|
+
const len0 = WASM_VECTOR_LEN;
|
|
579
|
+
const ptr1 = passStringToWasm0(var_name, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
580
|
+
const len1 = WASM_VECTOR_LEN;
|
|
581
|
+
const ret = wasm.sdk_getDataVar(this.__wbg_ptr, ptr0, len0, ptr1, len1);
|
|
582
|
+
var ptr3 = ret[0];
|
|
583
|
+
var len3 = ret[1];
|
|
584
|
+
if (ret[3]) {
|
|
585
|
+
ptr3 = 0; len3 = 0;
|
|
586
|
+
throw takeFromExternrefTable0(ret[2]);
|
|
587
|
+
}
|
|
588
|
+
deferred4_0 = ptr3;
|
|
589
|
+
deferred4_1 = len3;
|
|
590
|
+
return getStringFromWasm0(ptr3, len3);
|
|
591
|
+
} finally {
|
|
592
|
+
wasm.__wbindgen_free(deferred4_0, deferred4_1, 1);
|
|
593
|
+
}
|
|
594
|
+
}
|
|
595
|
+
/**
|
|
596
|
+
* @returns {bigint}
|
|
597
|
+
*/
|
|
598
|
+
getBlockTime() {
|
|
599
|
+
const ret = wasm.sdk_getBlockTime(this.__wbg_ptr);
|
|
600
|
+
return BigInt.asUintN(64, ret);
|
|
601
|
+
}
|
|
602
|
+
/**
|
|
603
|
+
* @param {string} contract
|
|
604
|
+
* @param {string} map_name
|
|
605
|
+
* @param {Uint8Array} map_key
|
|
606
|
+
* @returns {string}
|
|
607
|
+
*/
|
|
608
|
+
getMapEntry(contract, map_name, map_key) {
|
|
609
|
+
let deferred5_0;
|
|
610
|
+
let deferred5_1;
|
|
611
|
+
try {
|
|
612
|
+
const ptr0 = passStringToWasm0(contract, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
613
|
+
const len0 = WASM_VECTOR_LEN;
|
|
614
|
+
const ptr1 = passStringToWasm0(map_name, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
615
|
+
const len1 = WASM_VECTOR_LEN;
|
|
616
|
+
const ptr2 = passArray8ToWasm0(map_key, wasm.__wbindgen_malloc);
|
|
617
|
+
const len2 = WASM_VECTOR_LEN;
|
|
618
|
+
const ret = wasm.sdk_getMapEntry(this.__wbg_ptr, ptr0, len0, ptr1, len1, ptr2, len2);
|
|
619
|
+
var ptr4 = ret[0];
|
|
620
|
+
var len4 = ret[1];
|
|
621
|
+
if (ret[3]) {
|
|
622
|
+
ptr4 = 0; len4 = 0;
|
|
623
|
+
throw takeFromExternrefTable0(ret[2]);
|
|
624
|
+
}
|
|
625
|
+
deferred5_0 = ptr4;
|
|
626
|
+
deferred5_1 = len4;
|
|
627
|
+
return getStringFromWasm0(ptr4, len4);
|
|
628
|
+
} finally {
|
|
629
|
+
wasm.__wbindgen_free(deferred5_0, deferred5_1, 1);
|
|
630
|
+
}
|
|
631
|
+
}
|
|
632
|
+
/**
|
|
633
|
+
* @param {CallFnArgs} args
|
|
634
|
+
* @returns {TransactionRes}
|
|
635
|
+
*/
|
|
636
|
+
callReadOnlyFn(args) {
|
|
637
|
+
_assertClass(args, CallFnArgs);
|
|
638
|
+
const ret = wasm.sdk_callReadOnlyFn(this.__wbg_ptr, args.__wbg_ptr);
|
|
639
|
+
if (ret[2]) {
|
|
640
|
+
throw takeFromExternrefTable0(ret[1]);
|
|
641
|
+
}
|
|
642
|
+
return TransactionRes.__wrap(ret[0]);
|
|
643
|
+
}
|
|
644
|
+
/**
|
|
645
|
+
* @param {DeployContractArgs} args
|
|
646
|
+
* @returns {TransactionRes}
|
|
647
|
+
*/
|
|
648
|
+
deployContract(args) {
|
|
649
|
+
_assertClass(args, DeployContractArgs);
|
|
650
|
+
const ret = wasm.sdk_deployContract(this.__wbg_ptr, args.__wbg_ptr);
|
|
651
|
+
if (ret[2]) {
|
|
652
|
+
throw takeFromExternrefTable0(ret[1]);
|
|
653
|
+
}
|
|
654
|
+
return TransactionRes.__wrap(ret[0]);
|
|
655
|
+
}
|
|
656
|
+
/**
|
|
657
|
+
* @param {TransferSTXArgs} args
|
|
658
|
+
* @returns {TransactionRes}
|
|
659
|
+
*/
|
|
660
|
+
transferSTX(args) {
|
|
661
|
+
_assertClass(args, TransferSTXArgs);
|
|
662
|
+
const ret = wasm.sdk_transferSTX(this.__wbg_ptr, args.__wbg_ptr);
|
|
663
|
+
if (ret[2]) {
|
|
664
|
+
throw takeFromExternrefTable0(ret[1]);
|
|
665
|
+
}
|
|
666
|
+
return TransactionRes.__wrap(ret[0]);
|
|
667
|
+
}
|
|
668
|
+
/**
|
|
669
|
+
* @param {CallFnArgs} args
|
|
670
|
+
* @returns {TransactionRes}
|
|
671
|
+
*/
|
|
672
|
+
callPublicFn(args) {
|
|
673
|
+
_assertClass(args, CallFnArgs);
|
|
674
|
+
const ret = wasm.sdk_callPublicFn(this.__wbg_ptr, args.__wbg_ptr);
|
|
675
|
+
if (ret[2]) {
|
|
676
|
+
throw takeFromExternrefTable0(ret[1]);
|
|
677
|
+
}
|
|
678
|
+
return TransactionRes.__wrap(ret[0]);
|
|
679
|
+
}
|
|
680
|
+
/**
|
|
681
|
+
* @param {CallFnArgs} args
|
|
682
|
+
* @returns {TransactionRes}
|
|
683
|
+
*/
|
|
684
|
+
callPrivateFn(args) {
|
|
685
|
+
_assertClass(args, CallFnArgs);
|
|
686
|
+
const ret = wasm.sdk_callPrivateFn(this.__wbg_ptr, args.__wbg_ptr);
|
|
687
|
+
if (ret[2]) {
|
|
688
|
+
throw takeFromExternrefTable0(ret[1]);
|
|
689
|
+
}
|
|
690
|
+
return TransactionRes.__wrap(ret[0]);
|
|
691
|
+
}
|
|
692
|
+
/**
|
|
693
|
+
* @param {Array<any>} js_txs
|
|
694
|
+
* @returns {any}
|
|
695
|
+
*/
|
|
696
|
+
mineBlock(js_txs) {
|
|
697
|
+
const ret = wasm.sdk_mineBlock(this.__wbg_ptr, js_txs);
|
|
698
|
+
if (ret[2]) {
|
|
699
|
+
throw takeFromExternrefTable0(ret[1]);
|
|
700
|
+
}
|
|
701
|
+
return takeFromExternrefTable0(ret[0]);
|
|
702
|
+
}
|
|
703
|
+
/**
|
|
704
|
+
* @returns {number}
|
|
705
|
+
*/
|
|
706
|
+
mineEmptyBlock() {
|
|
707
|
+
const ret = wasm.sdk_mineEmptyBlock(this.__wbg_ptr);
|
|
708
|
+
return ret >>> 0;
|
|
709
|
+
}
|
|
710
|
+
/**
|
|
711
|
+
* @param {number | null} [count]
|
|
712
|
+
* @returns {number}
|
|
713
|
+
*/
|
|
714
|
+
mineEmptyBlocks(count) {
|
|
715
|
+
const ret = wasm.sdk_mineEmptyBlocks(this.__wbg_ptr, isLikeNone(count) ? 0x100000001 : (count) >>> 0);
|
|
716
|
+
return ret >>> 0;
|
|
717
|
+
}
|
|
718
|
+
/**
|
|
719
|
+
* @returns {number}
|
|
720
|
+
*/
|
|
721
|
+
mineEmptyStacksBlock() {
|
|
722
|
+
const ret = wasm.sdk_mineEmptyStacksBlock(this.__wbg_ptr);
|
|
723
|
+
if (ret[2]) {
|
|
724
|
+
throw takeFromExternrefTable0(ret[1]);
|
|
725
|
+
}
|
|
726
|
+
return ret[0] >>> 0;
|
|
727
|
+
}
|
|
728
|
+
/**
|
|
729
|
+
* @param {number | null} [count]
|
|
730
|
+
* @returns {number}
|
|
731
|
+
*/
|
|
732
|
+
mineEmptyStacksBlocks(count) {
|
|
733
|
+
const ret = wasm.sdk_mineEmptyStacksBlocks(this.__wbg_ptr, isLikeNone(count) ? 0x100000001 : (count) >>> 0);
|
|
734
|
+
if (ret[2]) {
|
|
735
|
+
throw takeFromExternrefTable0(ret[1]);
|
|
736
|
+
}
|
|
737
|
+
return ret[0] >>> 0;
|
|
738
|
+
}
|
|
739
|
+
/**
|
|
740
|
+
* @returns {number}
|
|
741
|
+
*/
|
|
742
|
+
mineEmptyBurnBlock() {
|
|
743
|
+
const ret = wasm.sdk_mineEmptyBurnBlock(this.__wbg_ptr);
|
|
744
|
+
return ret >>> 0;
|
|
745
|
+
}
|
|
746
|
+
/**
|
|
747
|
+
* @param {number | null} [count]
|
|
748
|
+
* @returns {number}
|
|
749
|
+
*/
|
|
750
|
+
mineEmptyBurnBlocks(count) {
|
|
751
|
+
const ret = wasm.sdk_mineEmptyBurnBlocks(this.__wbg_ptr, isLikeNone(count) ? 0x100000001 : (count) >>> 0);
|
|
752
|
+
return ret >>> 0;
|
|
753
|
+
}
|
|
754
|
+
/**
|
|
755
|
+
* @param {string} snippet
|
|
756
|
+
* @returns {string}
|
|
757
|
+
*/
|
|
758
|
+
runSnippet(snippet) {
|
|
759
|
+
let deferred2_0;
|
|
760
|
+
let deferred2_1;
|
|
761
|
+
try {
|
|
762
|
+
const ptr0 = passStringToWasm0(snippet, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
763
|
+
const len0 = WASM_VECTOR_LEN;
|
|
764
|
+
const ret = wasm.sdk_runSnippet(this.__wbg_ptr, ptr0, len0);
|
|
765
|
+
deferred2_0 = ret[0];
|
|
766
|
+
deferred2_1 = ret[1];
|
|
767
|
+
return getStringFromWasm0(ret[0], ret[1]);
|
|
768
|
+
} finally {
|
|
769
|
+
wasm.__wbindgen_free(deferred2_0, deferred2_1, 1);
|
|
770
|
+
}
|
|
771
|
+
}
|
|
772
|
+
/**
|
|
773
|
+
* @param {string} snippet
|
|
774
|
+
* @returns {TransactionRes}
|
|
775
|
+
*/
|
|
776
|
+
execute(snippet) {
|
|
777
|
+
const ptr0 = passStringToWasm0(snippet, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
778
|
+
const len0 = WASM_VECTOR_LEN;
|
|
779
|
+
const ret = wasm.sdk_execute(this.__wbg_ptr, ptr0, len0);
|
|
780
|
+
if (ret[2]) {
|
|
781
|
+
throw takeFromExternrefTable0(ret[1]);
|
|
782
|
+
}
|
|
783
|
+
return TransactionRes.__wrap(ret[0]);
|
|
784
|
+
}
|
|
785
|
+
/**
|
|
786
|
+
* @param {string} snippet
|
|
787
|
+
* @returns {string}
|
|
788
|
+
*/
|
|
789
|
+
executeCommand(snippet) {
|
|
790
|
+
let deferred2_0;
|
|
791
|
+
let deferred2_1;
|
|
792
|
+
try {
|
|
793
|
+
const ptr0 = passStringToWasm0(snippet, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
794
|
+
const len0 = WASM_VECTOR_LEN;
|
|
795
|
+
const ret = wasm.sdk_executeCommand(this.__wbg_ptr, ptr0, len0);
|
|
796
|
+
deferred2_0 = ret[0];
|
|
797
|
+
deferred2_1 = ret[1];
|
|
798
|
+
return getStringFromWasm0(ret[0], ret[1]);
|
|
799
|
+
} finally {
|
|
800
|
+
wasm.__wbindgen_free(deferred2_0, deferred2_1, 1);
|
|
801
|
+
}
|
|
802
|
+
}
|
|
803
|
+
/**
|
|
804
|
+
* Returns the last contract call trace as a string, if available.
|
|
805
|
+
* @returns {string | undefined}
|
|
806
|
+
*/
|
|
807
|
+
getLastContractCallTrace() {
|
|
808
|
+
const ret = wasm.sdk_getLastContractCallTrace(this.__wbg_ptr);
|
|
809
|
+
let v1;
|
|
810
|
+
if (ret[0] !== 0) {
|
|
811
|
+
v1 = getStringFromWasm0(ret[0], ret[1]).slice();
|
|
812
|
+
wasm.__wbindgen_free(ret[0], ret[1] * 1, 1);
|
|
813
|
+
}
|
|
814
|
+
return v1;
|
|
815
|
+
}
|
|
816
|
+
/**
|
|
817
|
+
* @param {string[]} addresses
|
|
818
|
+
*/
|
|
819
|
+
setLocalAccounts(addresses) {
|
|
820
|
+
const ptr0 = passArrayJsValueToWasm0(addresses, wasm.__wbindgen_malloc);
|
|
821
|
+
const len0 = WASM_VECTOR_LEN;
|
|
822
|
+
wasm.sdk_setLocalAccounts(this.__wbg_ptr, ptr0, len0);
|
|
823
|
+
}
|
|
824
|
+
/**
|
|
825
|
+
* @param {string} recipient
|
|
826
|
+
* @param {bigint} amount
|
|
827
|
+
* @returns {string}
|
|
828
|
+
*/
|
|
829
|
+
mintSTX(recipient, amount) {
|
|
830
|
+
let deferred3_0;
|
|
831
|
+
let deferred3_1;
|
|
832
|
+
try {
|
|
833
|
+
const ptr0 = passStringToWasm0(recipient, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
834
|
+
const len0 = WASM_VECTOR_LEN;
|
|
835
|
+
const ret = wasm.sdk_mintSTX(this.__wbg_ptr, ptr0, len0, amount);
|
|
836
|
+
var ptr2 = ret[0];
|
|
837
|
+
var len2 = ret[1];
|
|
838
|
+
if (ret[3]) {
|
|
839
|
+
ptr2 = 0; len2 = 0;
|
|
840
|
+
throw takeFromExternrefTable0(ret[2]);
|
|
841
|
+
}
|
|
842
|
+
deferred3_0 = ptr2;
|
|
843
|
+
deferred3_1 = len2;
|
|
844
|
+
return getStringFromWasm0(ptr2, len2);
|
|
845
|
+
} finally {
|
|
846
|
+
wasm.__wbindgen_free(deferred3_0, deferred3_1, 1);
|
|
847
|
+
}
|
|
848
|
+
}
|
|
849
|
+
/**
|
|
850
|
+
* @param {string} test_name
|
|
851
|
+
*/
|
|
852
|
+
setCurrentTestName(test_name) {
|
|
853
|
+
const ptr0 = passStringToWasm0(test_name, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
854
|
+
const len0 = WASM_VECTOR_LEN;
|
|
855
|
+
wasm.sdk_setCurrentTestName(this.__wbg_ptr, ptr0, len0);
|
|
856
|
+
}
|
|
857
|
+
/**
|
|
858
|
+
* @param {boolean} include_boot_contracts
|
|
859
|
+
* @param {string} boot_contracts_path
|
|
860
|
+
* @returns {SessionReport}
|
|
861
|
+
*/
|
|
862
|
+
collectReport(include_boot_contracts, boot_contracts_path) {
|
|
863
|
+
const ptr0 = passStringToWasm0(boot_contracts_path, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
864
|
+
const len0 = WASM_VECTOR_LEN;
|
|
865
|
+
const ret = wasm.sdk_collectReport(this.__wbg_ptr, include_boot_contracts, ptr0, len0);
|
|
866
|
+
if (ret[2]) {
|
|
867
|
+
throw takeFromExternrefTable0(ret[1]);
|
|
868
|
+
}
|
|
869
|
+
return SessionReport.__wrap(ret[0]);
|
|
870
|
+
}
|
|
871
|
+
/**
|
|
872
|
+
* @param {string} cost_field
|
|
873
|
+
*/
|
|
874
|
+
enablePerformance(cost_field) {
|
|
875
|
+
const ptr0 = passStringToWasm0(cost_field, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
876
|
+
const len0 = WASM_VECTOR_LEN;
|
|
877
|
+
const ret = wasm.sdk_enablePerformance(this.__wbg_ptr, ptr0, len0);
|
|
878
|
+
if (ret[1]) {
|
|
879
|
+
throw takeFromExternrefTable0(ret[0]);
|
|
880
|
+
}
|
|
881
|
+
}
|
|
882
|
+
}
|
|
883
|
+
module.exports.SDK = SDK;
|
|
884
|
+
|
|
885
|
+
const SDKOptionsFinalization = (typeof FinalizationRegistry === 'undefined')
|
|
886
|
+
? { register: () => {}, unregister: () => {} }
|
|
887
|
+
: new FinalizationRegistry(ptr => wasm.__wbg_sdkoptions_free(ptr >>> 0, 1));
|
|
888
|
+
|
|
889
|
+
class SDKOptions {
|
|
890
|
+
|
|
891
|
+
__destroy_into_raw() {
|
|
892
|
+
const ptr = this.__wbg_ptr;
|
|
893
|
+
this.__wbg_ptr = 0;
|
|
894
|
+
SDKOptionsFinalization.unregister(this);
|
|
895
|
+
return ptr;
|
|
896
|
+
}
|
|
897
|
+
|
|
898
|
+
free() {
|
|
899
|
+
const ptr = this.__destroy_into_raw();
|
|
900
|
+
wasm.__wbg_sdkoptions_free(ptr, 0);
|
|
901
|
+
}
|
|
902
|
+
/**
|
|
903
|
+
* @returns {boolean}
|
|
904
|
+
*/
|
|
905
|
+
get trackCosts() {
|
|
906
|
+
const ret = wasm.__wbg_get_sdkoptions_trackCosts(this.__wbg_ptr);
|
|
907
|
+
return ret !== 0;
|
|
908
|
+
}
|
|
909
|
+
/**
|
|
910
|
+
* @param {boolean} arg0
|
|
911
|
+
*/
|
|
912
|
+
set trackCosts(arg0) {
|
|
913
|
+
wasm.__wbg_set_sdkoptions_trackCosts(this.__wbg_ptr, arg0);
|
|
914
|
+
}
|
|
915
|
+
/**
|
|
916
|
+
* @returns {boolean}
|
|
917
|
+
*/
|
|
918
|
+
get trackCoverage() {
|
|
919
|
+
const ret = wasm.__wbg_get_sdkoptions_trackCoverage(this.__wbg_ptr);
|
|
920
|
+
return ret !== 0;
|
|
921
|
+
}
|
|
922
|
+
/**
|
|
923
|
+
* @param {boolean} arg0
|
|
924
|
+
*/
|
|
925
|
+
set trackCoverage(arg0) {
|
|
926
|
+
wasm.__wbg_set_sdkoptions_trackCoverage(this.__wbg_ptr, arg0);
|
|
927
|
+
}
|
|
928
|
+
/**
|
|
929
|
+
* @returns {boolean}
|
|
930
|
+
*/
|
|
931
|
+
get trackPerformance() {
|
|
932
|
+
const ret = wasm.__wbg_get_sdkoptions_trackPerformance(this.__wbg_ptr);
|
|
933
|
+
return ret !== 0;
|
|
934
|
+
}
|
|
935
|
+
/**
|
|
936
|
+
* @param {boolean} arg0
|
|
937
|
+
*/
|
|
938
|
+
set trackPerformance(arg0) {
|
|
939
|
+
wasm.__wbg_set_sdkoptions_trackPerformance(this.__wbg_ptr, arg0);
|
|
940
|
+
}
|
|
941
|
+
/**
|
|
942
|
+
* @param {boolean} track_costs
|
|
943
|
+
* @param {boolean} track_coverage
|
|
944
|
+
* @param {boolean | null} [track_performance]
|
|
945
|
+
*/
|
|
946
|
+
constructor(track_costs, track_coverage, track_performance) {
|
|
947
|
+
const ret = wasm.sdkoptions_new(track_costs, track_coverage, isLikeNone(track_performance) ? 0xFFFFFF : track_performance ? 1 : 0);
|
|
948
|
+
this.__wbg_ptr = ret >>> 0;
|
|
949
|
+
SDKOptionsFinalization.register(this, this.__wbg_ptr, this);
|
|
950
|
+
return this;
|
|
951
|
+
}
|
|
952
|
+
}
|
|
953
|
+
module.exports.SDKOptions = SDKOptions;
|
|
954
|
+
|
|
955
|
+
const SessionReportFinalization = (typeof FinalizationRegistry === 'undefined')
|
|
956
|
+
? { register: () => {}, unregister: () => {} }
|
|
957
|
+
: new FinalizationRegistry(ptr => wasm.__wbg_sessionreport_free(ptr >>> 0, 1));
|
|
958
|
+
|
|
959
|
+
class SessionReport {
|
|
960
|
+
|
|
961
|
+
static __wrap(ptr) {
|
|
962
|
+
ptr = ptr >>> 0;
|
|
963
|
+
const obj = Object.create(SessionReport.prototype);
|
|
964
|
+
obj.__wbg_ptr = ptr;
|
|
965
|
+
SessionReportFinalization.register(obj, obj.__wbg_ptr, obj);
|
|
966
|
+
return obj;
|
|
967
|
+
}
|
|
968
|
+
|
|
969
|
+
__destroy_into_raw() {
|
|
970
|
+
const ptr = this.__wbg_ptr;
|
|
971
|
+
this.__wbg_ptr = 0;
|
|
972
|
+
SessionReportFinalization.unregister(this);
|
|
973
|
+
return ptr;
|
|
974
|
+
}
|
|
975
|
+
|
|
976
|
+
free() {
|
|
977
|
+
const ptr = this.__destroy_into_raw();
|
|
978
|
+
wasm.__wbg_sessionreport_free(ptr, 0);
|
|
979
|
+
}
|
|
980
|
+
/**
|
|
981
|
+
* @returns {string}
|
|
982
|
+
*/
|
|
983
|
+
get coverage() {
|
|
984
|
+
let deferred1_0;
|
|
985
|
+
let deferred1_1;
|
|
986
|
+
try {
|
|
987
|
+
const ret = wasm.__wbg_get_sessionreport_coverage(this.__wbg_ptr);
|
|
988
|
+
deferred1_0 = ret[0];
|
|
989
|
+
deferred1_1 = ret[1];
|
|
990
|
+
return getStringFromWasm0(ret[0], ret[1]);
|
|
991
|
+
} finally {
|
|
992
|
+
wasm.__wbindgen_free(deferred1_0, deferred1_1, 1);
|
|
993
|
+
}
|
|
994
|
+
}
|
|
995
|
+
/**
|
|
996
|
+
* @param {string} arg0
|
|
997
|
+
*/
|
|
998
|
+
set coverage(arg0) {
|
|
999
|
+
const ptr0 = passStringToWasm0(arg0, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
1000
|
+
const len0 = WASM_VECTOR_LEN;
|
|
1001
|
+
wasm.__wbg_set_sessionreport_coverage(this.__wbg_ptr, ptr0, len0);
|
|
1002
|
+
}
|
|
1003
|
+
/**
|
|
1004
|
+
* @returns {string}
|
|
1005
|
+
*/
|
|
1006
|
+
get costs() {
|
|
1007
|
+
let deferred1_0;
|
|
1008
|
+
let deferred1_1;
|
|
1009
|
+
try {
|
|
1010
|
+
const ret = wasm.__wbg_get_sessionreport_costs(this.__wbg_ptr);
|
|
1011
|
+
deferred1_0 = ret[0];
|
|
1012
|
+
deferred1_1 = ret[1];
|
|
1013
|
+
return getStringFromWasm0(ret[0], ret[1]);
|
|
1014
|
+
} finally {
|
|
1015
|
+
wasm.__wbindgen_free(deferred1_0, deferred1_1, 1);
|
|
1016
|
+
}
|
|
1017
|
+
}
|
|
1018
|
+
/**
|
|
1019
|
+
* @param {string} arg0
|
|
1020
|
+
*/
|
|
1021
|
+
set costs(arg0) {
|
|
1022
|
+
const ptr0 = passStringToWasm0(arg0, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
1023
|
+
const len0 = WASM_VECTOR_LEN;
|
|
1024
|
+
wasm.__wbg_set_sessionreport_costs(this.__wbg_ptr, ptr0, len0);
|
|
1025
|
+
}
|
|
1026
|
+
}
|
|
1027
|
+
module.exports.SessionReport = SessionReport;
|
|
1028
|
+
|
|
1029
|
+
const TransactionResFinalization = (typeof FinalizationRegistry === 'undefined')
|
|
1030
|
+
? { register: () => {}, unregister: () => {} }
|
|
1031
|
+
: new FinalizationRegistry(ptr => wasm.__wbg_transactionres_free(ptr >>> 0, 1));
|
|
1032
|
+
|
|
1033
|
+
class TransactionRes {
|
|
1034
|
+
|
|
1035
|
+
static __wrap(ptr) {
|
|
1036
|
+
ptr = ptr >>> 0;
|
|
1037
|
+
const obj = Object.create(TransactionRes.prototype);
|
|
1038
|
+
obj.__wbg_ptr = ptr;
|
|
1039
|
+
TransactionResFinalization.register(obj, obj.__wbg_ptr, obj);
|
|
1040
|
+
return obj;
|
|
1041
|
+
}
|
|
1042
|
+
|
|
1043
|
+
__destroy_into_raw() {
|
|
1044
|
+
const ptr = this.__wbg_ptr;
|
|
1045
|
+
this.__wbg_ptr = 0;
|
|
1046
|
+
TransactionResFinalization.unregister(this);
|
|
1047
|
+
return ptr;
|
|
1048
|
+
}
|
|
1049
|
+
|
|
1050
|
+
free() {
|
|
1051
|
+
const ptr = this.__destroy_into_raw();
|
|
1052
|
+
wasm.__wbg_transactionres_free(ptr, 0);
|
|
1053
|
+
}
|
|
1054
|
+
/**
|
|
1055
|
+
* @returns {string}
|
|
1056
|
+
*/
|
|
1057
|
+
get result() {
|
|
1058
|
+
let deferred1_0;
|
|
1059
|
+
let deferred1_1;
|
|
1060
|
+
try {
|
|
1061
|
+
const ret = wasm.__wbg_get_transactionres_result(this.__wbg_ptr);
|
|
1062
|
+
deferred1_0 = ret[0];
|
|
1063
|
+
deferred1_1 = ret[1];
|
|
1064
|
+
return getStringFromWasm0(ret[0], ret[1]);
|
|
1065
|
+
} finally {
|
|
1066
|
+
wasm.__wbindgen_free(deferred1_0, deferred1_1, 1);
|
|
1067
|
+
}
|
|
1068
|
+
}
|
|
1069
|
+
/**
|
|
1070
|
+
* @param {string} arg0
|
|
1071
|
+
*/
|
|
1072
|
+
set result(arg0) {
|
|
1073
|
+
const ptr0 = passStringToWasm0(arg0, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
1074
|
+
const len0 = WASM_VECTOR_LEN;
|
|
1075
|
+
wasm.__wbg_set_sessionreport_coverage(this.__wbg_ptr, ptr0, len0);
|
|
1076
|
+
}
|
|
1077
|
+
/**
|
|
1078
|
+
* @returns {string}
|
|
1079
|
+
*/
|
|
1080
|
+
get events() {
|
|
1081
|
+
let deferred1_0;
|
|
1082
|
+
let deferred1_1;
|
|
1083
|
+
try {
|
|
1084
|
+
const ret = wasm.__wbg_get_transactionres_events(this.__wbg_ptr);
|
|
1085
|
+
deferred1_0 = ret[0];
|
|
1086
|
+
deferred1_1 = ret[1];
|
|
1087
|
+
return getStringFromWasm0(ret[0], ret[1]);
|
|
1088
|
+
} finally {
|
|
1089
|
+
wasm.__wbindgen_free(deferred1_0, deferred1_1, 1);
|
|
1090
|
+
}
|
|
1091
|
+
}
|
|
1092
|
+
/**
|
|
1093
|
+
* @param {string} arg0
|
|
1094
|
+
*/
|
|
1095
|
+
set events(arg0) {
|
|
1096
|
+
const ptr0 = passStringToWasm0(arg0, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
1097
|
+
const len0 = WASM_VECTOR_LEN;
|
|
1098
|
+
wasm.__wbg_set_sessionreport_costs(this.__wbg_ptr, ptr0, len0);
|
|
1099
|
+
}
|
|
1100
|
+
/**
|
|
1101
|
+
* @returns {string}
|
|
1102
|
+
*/
|
|
1103
|
+
get costs() {
|
|
1104
|
+
let deferred1_0;
|
|
1105
|
+
let deferred1_1;
|
|
1106
|
+
try {
|
|
1107
|
+
const ret = wasm.__wbg_get_transactionres_costs(this.__wbg_ptr);
|
|
1108
|
+
deferred1_0 = ret[0];
|
|
1109
|
+
deferred1_1 = ret[1];
|
|
1110
|
+
return getStringFromWasm0(ret[0], ret[1]);
|
|
1111
|
+
} finally {
|
|
1112
|
+
wasm.__wbindgen_free(deferred1_0, deferred1_1, 1);
|
|
1113
|
+
}
|
|
1114
|
+
}
|
|
1115
|
+
/**
|
|
1116
|
+
* @param {string} arg0
|
|
1117
|
+
*/
|
|
1118
|
+
set costs(arg0) {
|
|
1119
|
+
const ptr0 = passStringToWasm0(arg0, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
1120
|
+
const len0 = WASM_VECTOR_LEN;
|
|
1121
|
+
wasm.__wbg_set_transactionres_costs(this.__wbg_ptr, ptr0, len0);
|
|
1122
|
+
}
|
|
1123
|
+
/**
|
|
1124
|
+
* @returns {string | undefined}
|
|
1125
|
+
*/
|
|
1126
|
+
get performance() {
|
|
1127
|
+
const ret = wasm.__wbg_get_transactionres_performance(this.__wbg_ptr);
|
|
1128
|
+
let v1;
|
|
1129
|
+
if (ret[0] !== 0) {
|
|
1130
|
+
v1 = getStringFromWasm0(ret[0], ret[1]).slice();
|
|
1131
|
+
wasm.__wbindgen_free(ret[0], ret[1] * 1, 1);
|
|
1132
|
+
}
|
|
1133
|
+
return v1;
|
|
1134
|
+
}
|
|
1135
|
+
/**
|
|
1136
|
+
* @param {string | null} [arg0]
|
|
1137
|
+
*/
|
|
1138
|
+
set performance(arg0) {
|
|
1139
|
+
var ptr0 = isLikeNone(arg0) ? 0 : passStringToWasm0(arg0, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
1140
|
+
var len0 = WASM_VECTOR_LEN;
|
|
1141
|
+
wasm.__wbg_set_transactionres_performance(this.__wbg_ptr, ptr0, len0);
|
|
1142
|
+
}
|
|
1143
|
+
}
|
|
1144
|
+
module.exports.TransactionRes = TransactionRes;
|
|
1145
|
+
|
|
1146
|
+
const TransferSTXArgsFinalization = (typeof FinalizationRegistry === 'undefined')
|
|
1147
|
+
? { register: () => {}, unregister: () => {} }
|
|
1148
|
+
: new FinalizationRegistry(ptr => wasm.__wbg_transferstxargs_free(ptr >>> 0, 1));
|
|
1149
|
+
|
|
1150
|
+
class TransferSTXArgs {
|
|
1151
|
+
|
|
1152
|
+
__destroy_into_raw() {
|
|
1153
|
+
const ptr = this.__wbg_ptr;
|
|
1154
|
+
this.__wbg_ptr = 0;
|
|
1155
|
+
TransferSTXArgsFinalization.unregister(this);
|
|
1156
|
+
return ptr;
|
|
1157
|
+
}
|
|
1158
|
+
|
|
1159
|
+
free() {
|
|
1160
|
+
const ptr = this.__destroy_into_raw();
|
|
1161
|
+
wasm.__wbg_transferstxargs_free(ptr, 0);
|
|
1162
|
+
}
|
|
1163
|
+
/**
|
|
1164
|
+
* @param {bigint} amount
|
|
1165
|
+
* @param {string} recipient
|
|
1166
|
+
* @param {string} sender
|
|
1167
|
+
*/
|
|
1168
|
+
constructor(amount, recipient, sender) {
|
|
1169
|
+
const ptr0 = passStringToWasm0(recipient, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
1170
|
+
const len0 = WASM_VECTOR_LEN;
|
|
1171
|
+
const ptr1 = passStringToWasm0(sender, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
1172
|
+
const len1 = WASM_VECTOR_LEN;
|
|
1173
|
+
const ret = wasm.transferstxargs_new(amount, ptr0, len0, ptr1, len1);
|
|
1174
|
+
this.__wbg_ptr = ret >>> 0;
|
|
1175
|
+
TransferSTXArgsFinalization.register(this, this.__wbg_ptr, this);
|
|
1176
|
+
return this;
|
|
1177
|
+
}
|
|
1178
|
+
}
|
|
1179
|
+
module.exports.TransferSTXArgs = TransferSTXArgs;
|
|
1180
|
+
|
|
1181
|
+
const TxArgsFinalization = (typeof FinalizationRegistry === 'undefined')
|
|
1182
|
+
? { register: () => {}, unregister: () => {} }
|
|
1183
|
+
: new FinalizationRegistry(ptr => wasm.__wbg_txargs_free(ptr >>> 0, 1));
|
|
1184
|
+
|
|
1185
|
+
class TxArgs {
|
|
1186
|
+
|
|
1187
|
+
__destroy_into_raw() {
|
|
1188
|
+
const ptr = this.__wbg_ptr;
|
|
1189
|
+
this.__wbg_ptr = 0;
|
|
1190
|
+
TxArgsFinalization.unregister(this);
|
|
1191
|
+
return ptr;
|
|
1192
|
+
}
|
|
1193
|
+
|
|
1194
|
+
free() {
|
|
1195
|
+
const ptr = this.__destroy_into_raw();
|
|
1196
|
+
wasm.__wbg_txargs_free(ptr, 0);
|
|
1197
|
+
}
|
|
1198
|
+
}
|
|
1199
|
+
module.exports.TxArgs = TxArgs;
|
|
1200
|
+
|
|
1201
|
+
module.exports.__wbg_Error_1f3748b298f99708 = function(arg0, arg1) {
|
|
1202
|
+
const ret = Error(getStringFromWasm0(arg0, arg1));
|
|
1203
|
+
return ret;
|
|
1204
|
+
};
|
|
1205
|
+
|
|
1206
|
+
module.exports.__wbg_Number_577a493fc95ea223 = function(arg0) {
|
|
1207
|
+
const ret = Number(arg0);
|
|
1208
|
+
return ret;
|
|
1209
|
+
};
|
|
1210
|
+
|
|
1211
|
+
module.exports.__wbg_String_8f0eb39a4a4c2f66 = function(arg0, arg1) {
|
|
1212
|
+
const ret = String(arg1);
|
|
1213
|
+
const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
1214
|
+
const len1 = WASM_VECTOR_LEN;
|
|
1215
|
+
getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true);
|
|
1216
|
+
getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);
|
|
1217
|
+
};
|
|
1218
|
+
|
|
1219
|
+
module.exports.__wbg_abort_6665281623826052 = function(arg0) {
|
|
1220
|
+
arg0.abort();
|
|
1221
|
+
};
|
|
1222
|
+
|
|
1223
|
+
module.exports.__wbg_abort_c11a5d245a242912 = function(arg0, arg1) {
|
|
1224
|
+
arg0.abort(arg1);
|
|
1225
|
+
};
|
|
1226
|
+
|
|
1227
|
+
module.exports.__wbg_append_3e86b0cd6215edd8 = function() { return handleError(function (arg0, arg1, arg2, arg3, arg4) {
|
|
1228
|
+
arg0.append(getStringFromWasm0(arg1, arg2), getStringFromWasm0(arg3, arg4));
|
|
1229
|
+
}, arguments) };
|
|
1230
|
+
|
|
1231
|
+
module.exports.__wbg_arrayBuffer_55e4a430671abfd8 = function() { return handleError(function (arg0) {
|
|
1232
|
+
const ret = arg0.arrayBuffer();
|
|
1233
|
+
return ret;
|
|
1234
|
+
}, arguments) };
|
|
1235
|
+
|
|
1236
|
+
module.exports.__wbg_call_2f8d426a20a307fe = function() { return handleError(function (arg0, arg1) {
|
|
1237
|
+
const ret = arg0.call(arg1);
|
|
1238
|
+
return ret;
|
|
1239
|
+
}, arguments) };
|
|
1240
|
+
|
|
1241
|
+
module.exports.__wbg_call_d7c6e5dcdab87b72 = function() { return handleError(function (arg0, arg1, arg2, arg3) {
|
|
1242
|
+
const ret = arg0.call(arg1, arg2, arg3);
|
|
1243
|
+
return ret;
|
|
1244
|
+
}, arguments) };
|
|
1245
|
+
|
|
1246
|
+
module.exports.__wbg_call_f53f0647ceb9c567 = function() { return handleError(function (arg0, arg1, arg2) {
|
|
1247
|
+
const ret = arg0.call(arg1, arg2);
|
|
1248
|
+
return ret;
|
|
1249
|
+
}, arguments) };
|
|
1250
|
+
|
|
1251
|
+
module.exports.__wbg_clearTimeout_6222fede17abcb1a = function(arg0) {
|
|
1252
|
+
const ret = clearTimeout(arg0);
|
|
1253
|
+
return ret;
|
|
1254
|
+
};
|
|
1255
|
+
|
|
1256
|
+
module.exports.__wbg_crypto_574e78ad8b13b65f = function(arg0) {
|
|
1257
|
+
const ret = arg0.crypto;
|
|
1258
|
+
return ret;
|
|
1259
|
+
};
|
|
1260
|
+
|
|
1261
|
+
module.exports.__wbg_done_4a7743b6f942c9f3 = function(arg0) {
|
|
1262
|
+
const ret = arg0.done;
|
|
1263
|
+
return ret;
|
|
1264
|
+
};
|
|
1265
|
+
|
|
1266
|
+
module.exports.__wbg_entries_17f7acbc2d691c0d = function(arg0) {
|
|
1267
|
+
const ret = Object.entries(arg0);
|
|
1268
|
+
return ret;
|
|
1269
|
+
};
|
|
1270
|
+
|
|
1271
|
+
module.exports.__wbg_error_41f0589870426ea4 = function(arg0) {
|
|
1272
|
+
console.error(arg0);
|
|
1273
|
+
};
|
|
1274
|
+
|
|
1275
|
+
module.exports.__wbg_error_7534b8e9a36f1ab4 = function(arg0, arg1) {
|
|
1276
|
+
let deferred0_0;
|
|
1277
|
+
let deferred0_1;
|
|
1278
|
+
try {
|
|
1279
|
+
deferred0_0 = arg0;
|
|
1280
|
+
deferred0_1 = arg1;
|
|
1281
|
+
console.error(getStringFromWasm0(arg0, arg1));
|
|
1282
|
+
} finally {
|
|
1283
|
+
wasm.__wbindgen_free(deferred0_0, deferred0_1, 1);
|
|
1284
|
+
}
|
|
1285
|
+
};
|
|
1286
|
+
|
|
1287
|
+
module.exports.__wbg_execSync_4988208c0d656457 = function(arg0, arg1, arg2) {
|
|
1288
|
+
const ret = execSync(getStringFromWasm0(arg1, arg2));
|
|
1289
|
+
const ptr1 = passArray8ToWasm0(ret, wasm.__wbindgen_malloc);
|
|
1290
|
+
const len1 = WASM_VECTOR_LEN;
|
|
1291
|
+
getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true);
|
|
1292
|
+
getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);
|
|
1293
|
+
};
|
|
1294
|
+
|
|
1295
|
+
module.exports.__wbg_existsSync_8a1ab19576bdfb7b = function(arg0, arg1) {
|
|
1296
|
+
const ret = existsSync(getStringFromWasm0(arg0, arg1));
|
|
1297
|
+
return ret;
|
|
1298
|
+
};
|
|
1299
|
+
|
|
1300
|
+
module.exports.__wbg_fetch_9885d2e26ad251bb = function(arg0, arg1) {
|
|
1301
|
+
const ret = arg0.fetch(arg1);
|
|
1302
|
+
return ret;
|
|
1303
|
+
};
|
|
1304
|
+
|
|
1305
|
+
module.exports.__wbg_fetch_f156d10be9a5c88a = function(arg0) {
|
|
1306
|
+
const ret = fetch(arg0);
|
|
1307
|
+
return ret;
|
|
1308
|
+
};
|
|
1309
|
+
|
|
1310
|
+
module.exports.__wbg_getRandomValues_b8f5dbd5f3995a9e = function() { return handleError(function (arg0, arg1) {
|
|
1311
|
+
arg0.getRandomValues(arg1);
|
|
1312
|
+
}, arguments) };
|
|
1313
|
+
|
|
1314
|
+
module.exports.__wbg_getTime_5b1dd03bb6d4b784 = function(arg0) {
|
|
1315
|
+
const ret = arg0.getTime();
|
|
1316
|
+
return ret;
|
|
1317
|
+
};
|
|
1318
|
+
|
|
1319
|
+
module.exports.__wbg_getTimezoneOffset_9b0741d5ee85cd60 = function(arg0) {
|
|
1320
|
+
const ret = arg0.getTimezoneOffset();
|
|
1321
|
+
return ret;
|
|
1322
|
+
};
|
|
1323
|
+
|
|
1324
|
+
module.exports.__wbg_get_27b4bcbec57323ca = function() { return handleError(function (arg0, arg1) {
|
|
1325
|
+
const ret = Reflect.get(arg0, arg1);
|
|
1326
|
+
return ret;
|
|
1327
|
+
}, arguments) };
|
|
1328
|
+
|
|
1329
|
+
module.exports.__wbg_get_59c6316d15f9f1d0 = function(arg0, arg1) {
|
|
1330
|
+
const ret = arg0[arg1 >>> 0];
|
|
1331
|
+
return ret;
|
|
1332
|
+
};
|
|
1333
|
+
|
|
1334
|
+
module.exports.__wbg_getwithrefkey_1dc361bd10053bfe = function(arg0, arg1) {
|
|
1335
|
+
const ret = arg0[arg1];
|
|
1336
|
+
return ret;
|
|
1337
|
+
};
|
|
1338
|
+
|
|
1339
|
+
module.exports.__wbg_has_85abdd8aeb8edebf = function() { return handleError(function (arg0, arg1) {
|
|
1340
|
+
const ret = Reflect.has(arg0, arg1);
|
|
1341
|
+
return ret;
|
|
1342
|
+
}, arguments) };
|
|
1343
|
+
|
|
1344
|
+
module.exports.__wbg_headers_177bc880a5823968 = function(arg0) {
|
|
1345
|
+
const ret = arg0.headers;
|
|
1346
|
+
return ret;
|
|
1347
|
+
};
|
|
1348
|
+
|
|
1349
|
+
module.exports.__wbg_instanceof_ArrayBuffer_59339a3a6f0c10ea = function(arg0) {
|
|
1350
|
+
let result;
|
|
1351
|
+
try {
|
|
1352
|
+
result = arg0 instanceof ArrayBuffer;
|
|
1353
|
+
} catch (_) {
|
|
1354
|
+
result = false;
|
|
1355
|
+
}
|
|
1356
|
+
const ret = result;
|
|
1357
|
+
return ret;
|
|
1358
|
+
};
|
|
1359
|
+
|
|
1360
|
+
module.exports.__wbg_instanceof_Response_0ab386c6818f788a = function(arg0) {
|
|
1361
|
+
let result;
|
|
1362
|
+
try {
|
|
1363
|
+
result = arg0 instanceof Response;
|
|
1364
|
+
} catch (_) {
|
|
1365
|
+
result = false;
|
|
1366
|
+
}
|
|
1367
|
+
const ret = result;
|
|
1368
|
+
return ret;
|
|
1369
|
+
};
|
|
1370
|
+
|
|
1371
|
+
module.exports.__wbg_instanceof_Uint8Array_91f3c5adee7e6672 = function(arg0) {
|
|
1372
|
+
let result;
|
|
1373
|
+
try {
|
|
1374
|
+
result = arg0 instanceof Uint8Array;
|
|
1375
|
+
} catch (_) {
|
|
1376
|
+
result = false;
|
|
1377
|
+
}
|
|
1378
|
+
const ret = result;
|
|
1379
|
+
return ret;
|
|
1380
|
+
};
|
|
1381
|
+
|
|
1382
|
+
module.exports.__wbg_isSafeInteger_6091d6e3ee1b65fd = function(arg0) {
|
|
1383
|
+
const ret = Number.isSafeInteger(arg0);
|
|
1384
|
+
return ret;
|
|
1385
|
+
};
|
|
1386
|
+
|
|
1387
|
+
module.exports.__wbg_iterator_96378c3c9a17347c = function() {
|
|
1388
|
+
const ret = Symbol.iterator;
|
|
1389
|
+
return ret;
|
|
1390
|
+
};
|
|
1391
|
+
|
|
1392
|
+
module.exports.__wbg_length_246fa1f85a0dea5b = function(arg0) {
|
|
1393
|
+
const ret = arg0.length;
|
|
1394
|
+
return ret;
|
|
1395
|
+
};
|
|
1396
|
+
|
|
1397
|
+
module.exports.__wbg_length_904c0910ed998bf3 = function(arg0) {
|
|
1398
|
+
const ret = arg0.length;
|
|
1399
|
+
return ret;
|
|
1400
|
+
};
|
|
1401
|
+
|
|
1402
|
+
module.exports.__wbg_log_f3c04200b995730f = function(arg0) {
|
|
1403
|
+
console.log(arg0);
|
|
1404
|
+
};
|
|
1405
|
+
|
|
1406
|
+
module.exports.__wbg_mkdirSync_3b9d69059451a9e3 = function(arg0, arg1, arg2) {
|
|
1407
|
+
mkdirSync(getStringFromWasm0(arg0, arg1), arg2);
|
|
1408
|
+
};
|
|
1409
|
+
|
|
1410
|
+
module.exports.__wbg_msCrypto_a61aeb35a24c1329 = function(arg0) {
|
|
1411
|
+
const ret = arg0.msCrypto;
|
|
1412
|
+
return ret;
|
|
1413
|
+
};
|
|
1414
|
+
|
|
1415
|
+
module.exports.__wbg_new0_85cc856927102294 = function() {
|
|
1416
|
+
const ret = new Date();
|
|
1417
|
+
return ret;
|
|
1418
|
+
};
|
|
1419
|
+
|
|
1420
|
+
module.exports.__wbg_new_12588505388d0897 = function() { return handleError(function () {
|
|
1421
|
+
const ret = new Headers();
|
|
1422
|
+
return ret;
|
|
1423
|
+
}, arguments) };
|
|
1424
|
+
|
|
1425
|
+
module.exports.__wbg_new_1930cbb8d9ffc31b = function() {
|
|
1426
|
+
const ret = new Object();
|
|
1427
|
+
return ret;
|
|
1428
|
+
};
|
|
1429
|
+
|
|
1430
|
+
module.exports.__wbg_new_56407f99198feff7 = function() {
|
|
1431
|
+
const ret = new Map();
|
|
1432
|
+
return ret;
|
|
1433
|
+
};
|
|
1434
|
+
|
|
1435
|
+
module.exports.__wbg_new_6a8b180049d9484e = function() { return handleError(function () {
|
|
1436
|
+
const ret = new AbortController();
|
|
1437
|
+
return ret;
|
|
1438
|
+
}, arguments) };
|
|
1439
|
+
|
|
1440
|
+
module.exports.__wbg_new_8a6f238a6ece86ea = function() {
|
|
1441
|
+
const ret = new Error();
|
|
1442
|
+
return ret;
|
|
1443
|
+
};
|
|
1444
|
+
|
|
1445
|
+
module.exports.__wbg_new_9190433fb67ed635 = function(arg0) {
|
|
1446
|
+
const ret = new Uint8Array(arg0);
|
|
1447
|
+
return ret;
|
|
1448
|
+
};
|
|
1449
|
+
|
|
1450
|
+
module.exports.__wbg_new_d5e3800b120e37e1 = function(arg0, arg1) {
|
|
1451
|
+
try {
|
|
1452
|
+
var state0 = {a: arg0, b: arg1};
|
|
1453
|
+
var cb0 = (arg0, arg1) => {
|
|
1454
|
+
const a = state0.a;
|
|
1455
|
+
state0.a = 0;
|
|
1456
|
+
try {
|
|
1457
|
+
return __wbg_adapter_229(a, state0.b, arg0, arg1);
|
|
1458
|
+
} finally {
|
|
1459
|
+
state0.a = a;
|
|
1460
|
+
}
|
|
1461
|
+
};
|
|
1462
|
+
const ret = new Promise(cb0);
|
|
1463
|
+
return ret;
|
|
1464
|
+
} finally {
|
|
1465
|
+
state0.a = state0.b = 0;
|
|
1466
|
+
}
|
|
1467
|
+
};
|
|
1468
|
+
|
|
1469
|
+
module.exports.__wbg_new_e969dc3f68d25093 = function() {
|
|
1470
|
+
const ret = new Array();
|
|
1471
|
+
return ret;
|
|
1472
|
+
};
|
|
1473
|
+
|
|
1474
|
+
module.exports.__wbg_new_eb6fa6c1e9ac9fb7 = function(arg0) {
|
|
1475
|
+
const ret = new Date(arg0);
|
|
1476
|
+
return ret;
|
|
1477
|
+
};
|
|
1478
|
+
|
|
1479
|
+
module.exports.__wbg_newfromslice_d0d56929c6d9c842 = function(arg0, arg1) {
|
|
1480
|
+
const ret = new Uint8Array(getArrayU8FromWasm0(arg0, arg1));
|
|
1481
|
+
return ret;
|
|
1482
|
+
};
|
|
1483
|
+
|
|
1484
|
+
module.exports.__wbg_newnoargs_a81330f6e05d8aca = function(arg0, arg1) {
|
|
1485
|
+
const ret = new Function(getStringFromWasm0(arg0, arg1));
|
|
1486
|
+
return ret;
|
|
1487
|
+
};
|
|
1488
|
+
|
|
1489
|
+
module.exports.__wbg_newwithlength_ed0ee6c1edca86fc = function(arg0) {
|
|
1490
|
+
const ret = new Uint8Array(arg0 >>> 0);
|
|
1491
|
+
return ret;
|
|
1492
|
+
};
|
|
1493
|
+
|
|
1494
|
+
module.exports.__wbg_newwithstrandinit_e8e22e9851f3c2fe = function() { return handleError(function (arg0, arg1, arg2) {
|
|
1495
|
+
const ret = new Request(getStringFromWasm0(arg0, arg1), arg2);
|
|
1496
|
+
return ret;
|
|
1497
|
+
}, arguments) };
|
|
1498
|
+
|
|
1499
|
+
module.exports.__wbg_next_2e6b37020ac5fe58 = function() { return handleError(function (arg0) {
|
|
1500
|
+
const ret = arg0.next();
|
|
1501
|
+
return ret;
|
|
1502
|
+
}, arguments) };
|
|
1503
|
+
|
|
1504
|
+
module.exports.__wbg_next_3de8f2669431a3ff = function(arg0) {
|
|
1505
|
+
const ret = arg0.next;
|
|
1506
|
+
return ret;
|
|
1507
|
+
};
|
|
1508
|
+
|
|
1509
|
+
module.exports.__wbg_node_905d3e251edff8a2 = function(arg0) {
|
|
1510
|
+
const ret = arg0.node;
|
|
1511
|
+
return ret;
|
|
1512
|
+
};
|
|
1513
|
+
|
|
1514
|
+
module.exports.__wbg_process_dc0fbacc7c1c06f7 = function(arg0) {
|
|
1515
|
+
const ret = arg0.process;
|
|
1516
|
+
return ret;
|
|
1517
|
+
};
|
|
1518
|
+
|
|
1519
|
+
module.exports.__wbg_prototypesetcall_c5f74efd31aea86b = function(arg0, arg1, arg2) {
|
|
1520
|
+
Uint8Array.prototype.set.call(getArrayU8FromWasm0(arg0, arg1), arg2);
|
|
1521
|
+
};
|
|
1522
|
+
|
|
1523
|
+
module.exports.__wbg_queueMicrotask_bcc6e26d899696db = function(arg0) {
|
|
1524
|
+
const ret = arg0.queueMicrotask;
|
|
1525
|
+
return ret;
|
|
1526
|
+
};
|
|
1527
|
+
|
|
1528
|
+
module.exports.__wbg_queueMicrotask_f24a794d09c42640 = function(arg0) {
|
|
1529
|
+
queueMicrotask(arg0);
|
|
1530
|
+
};
|
|
1531
|
+
|
|
1532
|
+
module.exports.__wbg_randomFillSync_ac0988aba3254290 = function() { return handleError(function (arg0, arg1) {
|
|
1533
|
+
arg0.randomFillSync(arg1);
|
|
1534
|
+
}, arguments) };
|
|
1535
|
+
|
|
1536
|
+
module.exports.__wbg_readFileSync_ef308beedfbb919c = function(arg0, arg1, arg2) {
|
|
1537
|
+
const ret = readFileSync(getStringFromWasm0(arg1, arg2));
|
|
1538
|
+
const ptr1 = passArray8ToWasm0(ret, wasm.__wbindgen_malloc);
|
|
1539
|
+
const len1 = WASM_VECTOR_LEN;
|
|
1540
|
+
getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true);
|
|
1541
|
+
getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);
|
|
1542
|
+
};
|
|
1543
|
+
|
|
1544
|
+
module.exports.__wbg_require_60cc747a6bc5215a = function() { return handleError(function () {
|
|
1545
|
+
const ret = module.require;
|
|
1546
|
+
return ret;
|
|
1547
|
+
}, arguments) };
|
|
1548
|
+
|
|
1549
|
+
module.exports.__wbg_resolve_5775c0ef9222f556 = function(arg0) {
|
|
1550
|
+
const ret = Promise.resolve(arg0);
|
|
1551
|
+
return ret;
|
|
1552
|
+
};
|
|
1553
|
+
|
|
1554
|
+
module.exports.__wbg_setTimeout_2b339866a2aa3789 = function(arg0, arg1) {
|
|
1555
|
+
const ret = setTimeout(arg0, arg1);
|
|
1556
|
+
return ret;
|
|
1557
|
+
};
|
|
1558
|
+
|
|
1559
|
+
module.exports.__wbg_set_31197016f65a6a19 = function(arg0, arg1, arg2) {
|
|
1560
|
+
const ret = arg0.set(arg1, arg2);
|
|
1561
|
+
return ret;
|
|
1562
|
+
};
|
|
1563
|
+
|
|
1564
|
+
module.exports.__wbg_set_3f1d0b984ed272ed = function(arg0, arg1, arg2) {
|
|
1565
|
+
arg0[arg1] = arg2;
|
|
1566
|
+
};
|
|
1567
|
+
|
|
1568
|
+
module.exports.__wbg_set_b33e7a98099eed58 = function() { return handleError(function (arg0, arg1, arg2) {
|
|
1569
|
+
const ret = Reflect.set(arg0, arg1, arg2);
|
|
1570
|
+
return ret;
|
|
1571
|
+
}, arguments) };
|
|
1572
|
+
|
|
1573
|
+
module.exports.__wbg_set_d636a0463acf1dbc = function(arg0, arg1, arg2) {
|
|
1574
|
+
arg0[arg1 >>> 0] = arg2;
|
|
1575
|
+
};
|
|
1576
|
+
|
|
1577
|
+
module.exports.__wbg_setbody_e324371c31597f2a = function(arg0, arg1) {
|
|
1578
|
+
arg0.body = arg1;
|
|
1579
|
+
};
|
|
1580
|
+
|
|
1581
|
+
module.exports.__wbg_setcache_7c95e3469a5bfb76 = function(arg0, arg1) {
|
|
1582
|
+
arg0.cache = __wbindgen_enum_RequestCache[arg1];
|
|
1583
|
+
};
|
|
1584
|
+
|
|
1585
|
+
module.exports.__wbg_setcredentials_55a9317ed2777533 = function(arg0, arg1) {
|
|
1586
|
+
arg0.credentials = __wbindgen_enum_RequestCredentials[arg1];
|
|
1587
|
+
};
|
|
1588
|
+
|
|
1589
|
+
module.exports.__wbg_setheaders_ac0b1e4890a949cd = function(arg0, arg1) {
|
|
1590
|
+
arg0.headers = arg1;
|
|
1591
|
+
};
|
|
1592
|
+
|
|
1593
|
+
module.exports.__wbg_setmethod_9ce6e95af1ae0eaf = function(arg0, arg1, arg2) {
|
|
1594
|
+
arg0.method = getStringFromWasm0(arg1, arg2);
|
|
1595
|
+
};
|
|
1596
|
+
|
|
1597
|
+
module.exports.__wbg_setmode_b89d1784e7e7f118 = function(arg0, arg1) {
|
|
1598
|
+
arg0.mode = __wbindgen_enum_RequestMode[arg1];
|
|
1599
|
+
};
|
|
1600
|
+
|
|
1601
|
+
module.exports.__wbg_setsignal_e663c6d962763cd5 = function(arg0, arg1) {
|
|
1602
|
+
arg0.signal = arg1;
|
|
1603
|
+
};
|
|
1604
|
+
|
|
1605
|
+
module.exports.__wbg_signal_bdb003fe19e53a13 = function(arg0) {
|
|
1606
|
+
const ret = arg0.signal;
|
|
1607
|
+
return ret;
|
|
1608
|
+
};
|
|
1609
|
+
|
|
1610
|
+
module.exports.__wbg_stack_0ed75d68575b0f3c = function(arg0, arg1) {
|
|
1611
|
+
const ret = arg1.stack;
|
|
1612
|
+
const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
1613
|
+
const len1 = WASM_VECTOR_LEN;
|
|
1614
|
+
getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true);
|
|
1615
|
+
getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);
|
|
1616
|
+
};
|
|
1617
|
+
|
|
1618
|
+
module.exports.__wbg_static_accessor_ENV_e000c7fa6f891c92 = function() {
|
|
1619
|
+
const ret = env;
|
|
1620
|
+
return ret;
|
|
1621
|
+
};
|
|
1622
|
+
|
|
1623
|
+
module.exports.__wbg_static_accessor_GLOBAL_1f13249cc3acc96d = function() {
|
|
1624
|
+
const ret = typeof global === 'undefined' ? null : global;
|
|
1625
|
+
return isLikeNone(ret) ? 0 : addToExternrefTable0(ret);
|
|
1626
|
+
};
|
|
1627
|
+
|
|
1628
|
+
module.exports.__wbg_static_accessor_GLOBAL_THIS_df7ae94b1e0ed6a3 = function() {
|
|
1629
|
+
const ret = typeof globalThis === 'undefined' ? null : globalThis;
|
|
1630
|
+
return isLikeNone(ret) ? 0 : addToExternrefTable0(ret);
|
|
1631
|
+
};
|
|
1632
|
+
|
|
1633
|
+
module.exports.__wbg_static_accessor_SELF_6265471db3b3c228 = function() {
|
|
1634
|
+
const ret = typeof self === 'undefined' ? null : self;
|
|
1635
|
+
return isLikeNone(ret) ? 0 : addToExternrefTable0(ret);
|
|
1636
|
+
};
|
|
1637
|
+
|
|
1638
|
+
module.exports.__wbg_static_accessor_WINDOW_16fb482f8ec52863 = function() {
|
|
1639
|
+
const ret = typeof window === 'undefined' ? null : window;
|
|
1640
|
+
return isLikeNone(ret) ? 0 : addToExternrefTable0(ret);
|
|
1641
|
+
};
|
|
1642
|
+
|
|
1643
|
+
module.exports.__wbg_status_31874648c8651949 = function(arg0) {
|
|
1644
|
+
const ret = arg0.status;
|
|
1645
|
+
return ret;
|
|
1646
|
+
};
|
|
1647
|
+
|
|
1648
|
+
module.exports.__wbg_stringify_1f41b6198e0932e0 = function() { return handleError(function (arg0) {
|
|
1649
|
+
const ret = JSON.stringify(arg0);
|
|
1650
|
+
return ret;
|
|
1651
|
+
}, arguments) };
|
|
1652
|
+
|
|
1653
|
+
module.exports.__wbg_subarray_a219824899e59712 = function(arg0, arg1, arg2) {
|
|
1654
|
+
const ret = arg0.subarray(arg1 >>> 0, arg2 >>> 0);
|
|
1655
|
+
return ret;
|
|
1656
|
+
};
|
|
1657
|
+
|
|
1658
|
+
module.exports.__wbg_then_8d2fcccde5380a03 = function(arg0, arg1, arg2) {
|
|
1659
|
+
const ret = arg0.then(arg1, arg2);
|
|
1660
|
+
return ret;
|
|
1661
|
+
};
|
|
1662
|
+
|
|
1663
|
+
module.exports.__wbg_then_9cc266be2bf537b6 = function(arg0, arg1) {
|
|
1664
|
+
const ret = arg0.then(arg1);
|
|
1665
|
+
return ret;
|
|
1666
|
+
};
|
|
1667
|
+
|
|
1668
|
+
module.exports.__wbg_url_d5273b9e10503471 = function(arg0, arg1) {
|
|
1669
|
+
const ret = arg1.url;
|
|
1670
|
+
const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
1671
|
+
const len1 = WASM_VECTOR_LEN;
|
|
1672
|
+
getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true);
|
|
1673
|
+
getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);
|
|
1674
|
+
};
|
|
1675
|
+
|
|
1676
|
+
module.exports.__wbg_value_09d0b4eaab48b91d = function(arg0) {
|
|
1677
|
+
const ret = arg0.value;
|
|
1678
|
+
return ret;
|
|
1679
|
+
};
|
|
1680
|
+
|
|
1681
|
+
module.exports.__wbg_versions_c01dfd4722a88165 = function(arg0) {
|
|
1682
|
+
const ret = arg0.versions;
|
|
1683
|
+
return ret;
|
|
1684
|
+
};
|
|
1685
|
+
|
|
1686
|
+
module.exports.__wbg_wbindgenbooleanget_59f830b1a70d2530 = function(arg0) {
|
|
1687
|
+
const v = arg0;
|
|
1688
|
+
const ret = typeof(v) === 'boolean' ? v : undefined;
|
|
1689
|
+
return isLikeNone(ret) ? 0xFFFFFF : ret ? 1 : 0;
|
|
1690
|
+
};
|
|
1691
|
+
|
|
1692
|
+
module.exports.__wbg_wbindgencbdrop_a85ed476c6a370b9 = function(arg0) {
|
|
1693
|
+
const obj = arg0.original;
|
|
1694
|
+
if (obj.cnt-- == 1) {
|
|
1695
|
+
obj.a = 0;
|
|
1696
|
+
return true;
|
|
1697
|
+
}
|
|
1698
|
+
const ret = false;
|
|
1699
|
+
return ret;
|
|
1700
|
+
};
|
|
1701
|
+
|
|
1702
|
+
module.exports.__wbg_wbindgendebugstring_bb652b1bc2061b6d = function(arg0, arg1) {
|
|
1703
|
+
const ret = debugString(arg1);
|
|
1704
|
+
const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
1705
|
+
const len1 = WASM_VECTOR_LEN;
|
|
1706
|
+
getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true);
|
|
1707
|
+
getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);
|
|
1708
|
+
};
|
|
1709
|
+
|
|
1710
|
+
module.exports.__wbg_wbindgenin_192b210aa1c401e9 = function(arg0, arg1) {
|
|
1711
|
+
const ret = arg0 in arg1;
|
|
1712
|
+
return ret;
|
|
1713
|
+
};
|
|
1714
|
+
|
|
1715
|
+
module.exports.__wbg_wbindgenisfunction_ea72b9d66a0e1705 = function(arg0) {
|
|
1716
|
+
const ret = typeof(arg0) === 'function';
|
|
1717
|
+
return ret;
|
|
1718
|
+
};
|
|
1719
|
+
|
|
1720
|
+
module.exports.__wbg_wbindgenisobject_dfe064a121d87553 = function(arg0) {
|
|
1721
|
+
const val = arg0;
|
|
1722
|
+
const ret = typeof(val) === 'object' && val !== null;
|
|
1723
|
+
return ret;
|
|
1724
|
+
};
|
|
1725
|
+
|
|
1726
|
+
module.exports.__wbg_wbindgenisstring_4b74e4111ba029e6 = function(arg0) {
|
|
1727
|
+
const ret = typeof(arg0) === 'string';
|
|
1728
|
+
return ret;
|
|
1729
|
+
};
|
|
1730
|
+
|
|
1731
|
+
module.exports.__wbg_wbindgenisundefined_71f08a6ade4354e7 = function(arg0) {
|
|
1732
|
+
const ret = arg0 === undefined;
|
|
1733
|
+
return ret;
|
|
1734
|
+
};
|
|
1735
|
+
|
|
1736
|
+
module.exports.__wbg_wbindgenjsvallooseeq_9dd7bb4b95ac195c = function(arg0, arg1) {
|
|
1737
|
+
const ret = arg0 == arg1;
|
|
1738
|
+
return ret;
|
|
1739
|
+
};
|
|
1740
|
+
|
|
1741
|
+
module.exports.__wbg_wbindgennumberget_d855f947247a3fbc = function(arg0, arg1) {
|
|
1742
|
+
const obj = arg1;
|
|
1743
|
+
const ret = typeof(obj) === 'number' ? obj : undefined;
|
|
1744
|
+
getDataViewMemory0().setFloat64(arg0 + 8 * 1, isLikeNone(ret) ? 0 : ret, true);
|
|
1745
|
+
getDataViewMemory0().setInt32(arg0 + 4 * 0, !isLikeNone(ret), true);
|
|
1746
|
+
};
|
|
1747
|
+
|
|
1748
|
+
module.exports.__wbg_wbindgenstringget_43fe05afe34b0cb1 = function(arg0, arg1) {
|
|
1749
|
+
const obj = arg1;
|
|
1750
|
+
const ret = typeof(obj) === 'string' ? obj : undefined;
|
|
1751
|
+
var ptr1 = isLikeNone(ret) ? 0 : passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
1752
|
+
var len1 = WASM_VECTOR_LEN;
|
|
1753
|
+
getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true);
|
|
1754
|
+
getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);
|
|
1755
|
+
};
|
|
1756
|
+
|
|
1757
|
+
module.exports.__wbg_wbindgenthrow_4c11a24fca429ccf = function(arg0, arg1) {
|
|
1758
|
+
throw new Error(getStringFromWasm0(arg0, arg1));
|
|
1759
|
+
};
|
|
1760
|
+
|
|
1761
|
+
module.exports.__wbg_writeFileSync_0aed5a98fa035b62 = function(arg0, arg1, arg2, arg3) {
|
|
1762
|
+
writeFileSync(getStringFromWasm0(arg0, arg1), getArrayU8FromWasm0(arg2, arg3));
|
|
1763
|
+
};
|
|
1764
|
+
|
|
1765
|
+
module.exports.__wbindgen_cast_2241b6af4c4b2941 = function(arg0, arg1) {
|
|
1766
|
+
// Cast intrinsic for `Ref(String) -> Externref`.
|
|
1767
|
+
const ret = getStringFromWasm0(arg0, arg1);
|
|
1768
|
+
return ret;
|
|
1769
|
+
};
|
|
1770
|
+
|
|
1771
|
+
module.exports.__wbindgen_cast_29d9d4936f0ef296 = function(arg0, arg1) {
|
|
1772
|
+
// Cast intrinsic for `Closure(Closure { dtor_idx: 606, function: Function { arguments: [Externref], shim_idx: 607, ret: Unit, inner_ret: Some(Unit) }, mutable: true }) -> Externref`.
|
|
1773
|
+
const ret = makeMutClosure(arg0, arg1, 606, __wbg_adapter_17);
|
|
1774
|
+
return ret;
|
|
1775
|
+
};
|
|
1776
|
+
|
|
1777
|
+
module.exports.__wbindgen_cast_2ddd8a25ff58642a = function(arg0, arg1) {
|
|
1778
|
+
// Cast intrinsic for `I128 -> Externref`.
|
|
1779
|
+
const ret = (BigInt.asUintN(64, arg0) | (arg1 << BigInt(64)));
|
|
1780
|
+
return ret;
|
|
1781
|
+
};
|
|
1782
|
+
|
|
1783
|
+
module.exports.__wbindgen_cast_4625c577ab2ec9ee = function(arg0) {
|
|
1784
|
+
// Cast intrinsic for `U64 -> Externref`.
|
|
1785
|
+
const ret = BigInt.asUintN(64, arg0);
|
|
1786
|
+
return ret;
|
|
1787
|
+
};
|
|
1788
|
+
|
|
1789
|
+
module.exports.__wbindgen_cast_50c13603d4e492d8 = function(arg0, arg1) {
|
|
1790
|
+
// Cast intrinsic for `Closure(Closure { dtor_idx: 403, function: Function { arguments: [], shim_idx: 404, ret: Unit, inner_ret: Some(Unit) }, mutable: true }) -> Externref`.
|
|
1791
|
+
const ret = makeMutClosure(arg0, arg1, 403, __wbg_adapter_8);
|
|
1792
|
+
return ret;
|
|
1793
|
+
};
|
|
1794
|
+
|
|
1795
|
+
module.exports.__wbindgen_cast_cb9088102bce6b30 = function(arg0, arg1) {
|
|
1796
|
+
// Cast intrinsic for `Ref(Slice(U8)) -> NamedExternref("Uint8Array")`.
|
|
1797
|
+
const ret = getArrayU8FromWasm0(arg0, arg1);
|
|
1798
|
+
return ret;
|
|
1799
|
+
};
|
|
1800
|
+
|
|
1801
|
+
module.exports.__wbindgen_cast_d6cd19b81560fd6e = function(arg0) {
|
|
1802
|
+
// Cast intrinsic for `F64 -> Externref`.
|
|
1803
|
+
const ret = arg0;
|
|
1804
|
+
return ret;
|
|
1805
|
+
};
|
|
1806
|
+
|
|
1807
|
+
module.exports.__wbindgen_cast_e7b45dd881f38ce3 = function(arg0, arg1) {
|
|
1808
|
+
// Cast intrinsic for `U128 -> Externref`.
|
|
1809
|
+
const ret = (BigInt.asUintN(64, arg0) | (BigInt.asUintN(64, arg1) << BigInt(64)));
|
|
1810
|
+
return ret;
|
|
1811
|
+
};
|
|
1812
|
+
|
|
1813
|
+
module.exports.__wbindgen_init_externref_table = function() {
|
|
1814
|
+
const table = wasm.__wbindgen_export_4;
|
|
1815
|
+
const offset = table.grow(4);
|
|
1816
|
+
table.set(0, undefined);
|
|
1817
|
+
table.set(offset + 0, undefined);
|
|
1818
|
+
table.set(offset + 1, null);
|
|
1819
|
+
table.set(offset + 2, true);
|
|
1820
|
+
table.set(offset + 3, false);
|
|
1821
|
+
;
|
|
1822
|
+
};
|
|
1823
|
+
|
|
1824
|
+
const path = require('path').join(__dirname, 'clarinet_sdk_bg.wasm');
|
|
1825
|
+
const bytes = require('fs').readFileSync(path);
|
|
1826
|
+
|
|
1827
|
+
const wasmModule = new WebAssembly.Module(bytes);
|
|
1828
|
+
const wasmInstance = new WebAssembly.Instance(wasmModule, imports);
|
|
1829
|
+
wasm = wasmInstance.exports;
|
|
1830
|
+
module.exports.__wasm = wasm;
|
|
1831
|
+
|
|
1832
|
+
wasm.__wbindgen_start();
|
|
1833
|
+
|