bitmask-core 0.7.0-beta.3 → 0.7.0-beta.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/bitcoin.js +2 -2
- package/bitcoin.ts +0 -6
- package/bitmask_core.d.ts +4 -6
- package/bitmask_core.js +14 -20
- package/bitmask_core_bg.js +1827 -0
- package/bitmask_core_bg.wasm +0 -0
- package/package.json +1 -1
|
@@ -0,0 +1,1827 @@
|
|
|
1
|
+
let wasm;
|
|
2
|
+
export function __wbg_set_wasm(val) {
|
|
3
|
+
wasm = val;
|
|
4
|
+
}
|
|
5
|
+
|
|
6
|
+
|
|
7
|
+
const heap = new Array(128).fill(undefined);
|
|
8
|
+
|
|
9
|
+
heap.push(undefined, null, true, false);
|
|
10
|
+
|
|
11
|
+
function getObject(idx) { return heap[idx]; }
|
|
12
|
+
|
|
13
|
+
let heap_next = heap.length;
|
|
14
|
+
|
|
15
|
+
function dropObject(idx) {
|
|
16
|
+
if (idx < 132) return;
|
|
17
|
+
heap[idx] = heap_next;
|
|
18
|
+
heap_next = idx;
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
function takeObject(idx) {
|
|
22
|
+
const ret = getObject(idx);
|
|
23
|
+
dropObject(idx);
|
|
24
|
+
return ret;
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
let WASM_VECTOR_LEN = 0;
|
|
28
|
+
|
|
29
|
+
let cachedUint8Memory0 = null;
|
|
30
|
+
|
|
31
|
+
function getUint8Memory0() {
|
|
32
|
+
if (cachedUint8Memory0 === null || cachedUint8Memory0.byteLength === 0) {
|
|
33
|
+
cachedUint8Memory0 = new Uint8Array(wasm.memory.buffer);
|
|
34
|
+
}
|
|
35
|
+
return cachedUint8Memory0;
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
const lTextEncoder = typeof TextEncoder === 'undefined' ? (0, module.require)('util').TextEncoder : TextEncoder;
|
|
39
|
+
|
|
40
|
+
let cachedTextEncoder = new lTextEncoder('utf-8');
|
|
41
|
+
|
|
42
|
+
const encodeString = (typeof cachedTextEncoder.encodeInto === 'function'
|
|
43
|
+
? function (arg, view) {
|
|
44
|
+
return cachedTextEncoder.encodeInto(arg, view);
|
|
45
|
+
}
|
|
46
|
+
: function (arg, view) {
|
|
47
|
+
const buf = cachedTextEncoder.encode(arg);
|
|
48
|
+
view.set(buf);
|
|
49
|
+
return {
|
|
50
|
+
read: arg.length,
|
|
51
|
+
written: buf.length
|
|
52
|
+
};
|
|
53
|
+
});
|
|
54
|
+
|
|
55
|
+
function passStringToWasm0(arg, malloc, realloc) {
|
|
56
|
+
|
|
57
|
+
if (realloc === undefined) {
|
|
58
|
+
const buf = cachedTextEncoder.encode(arg);
|
|
59
|
+
const ptr = malloc(buf.length, 1) >>> 0;
|
|
60
|
+
getUint8Memory0().subarray(ptr, ptr + buf.length).set(buf);
|
|
61
|
+
WASM_VECTOR_LEN = buf.length;
|
|
62
|
+
return ptr;
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
let len = arg.length;
|
|
66
|
+
let ptr = malloc(len, 1) >>> 0;
|
|
67
|
+
|
|
68
|
+
const mem = getUint8Memory0();
|
|
69
|
+
|
|
70
|
+
let offset = 0;
|
|
71
|
+
|
|
72
|
+
for (; offset < len; offset++) {
|
|
73
|
+
const code = arg.charCodeAt(offset);
|
|
74
|
+
if (code > 0x7F) break;
|
|
75
|
+
mem[ptr + offset] = code;
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
if (offset !== len) {
|
|
79
|
+
if (offset !== 0) {
|
|
80
|
+
arg = arg.slice(offset);
|
|
81
|
+
}
|
|
82
|
+
ptr = realloc(ptr, len, len = offset + arg.length * 3, 1) >>> 0;
|
|
83
|
+
const view = getUint8Memory0().subarray(ptr + offset, ptr + len);
|
|
84
|
+
const ret = encodeString(arg, view);
|
|
85
|
+
|
|
86
|
+
offset += ret.written;
|
|
87
|
+
}
|
|
88
|
+
|
|
89
|
+
WASM_VECTOR_LEN = offset;
|
|
90
|
+
return ptr;
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
function isLikeNone(x) {
|
|
94
|
+
return x === undefined || x === null;
|
|
95
|
+
}
|
|
96
|
+
|
|
97
|
+
let cachedInt32Memory0 = null;
|
|
98
|
+
|
|
99
|
+
function getInt32Memory0() {
|
|
100
|
+
if (cachedInt32Memory0 === null || cachedInt32Memory0.byteLength === 0) {
|
|
101
|
+
cachedInt32Memory0 = new Int32Array(wasm.memory.buffer);
|
|
102
|
+
}
|
|
103
|
+
return cachedInt32Memory0;
|
|
104
|
+
}
|
|
105
|
+
|
|
106
|
+
function addHeapObject(obj) {
|
|
107
|
+
if (heap_next === heap.length) heap.push(heap.length + 1);
|
|
108
|
+
const idx = heap_next;
|
|
109
|
+
heap_next = heap[idx];
|
|
110
|
+
|
|
111
|
+
heap[idx] = obj;
|
|
112
|
+
return idx;
|
|
113
|
+
}
|
|
114
|
+
|
|
115
|
+
let cachedFloat64Memory0 = null;
|
|
116
|
+
|
|
117
|
+
function getFloat64Memory0() {
|
|
118
|
+
if (cachedFloat64Memory0 === null || cachedFloat64Memory0.byteLength === 0) {
|
|
119
|
+
cachedFloat64Memory0 = new Float64Array(wasm.memory.buffer);
|
|
120
|
+
}
|
|
121
|
+
return cachedFloat64Memory0;
|
|
122
|
+
}
|
|
123
|
+
|
|
124
|
+
const lTextDecoder = typeof TextDecoder === 'undefined' ? (0, module.require)('util').TextDecoder : TextDecoder;
|
|
125
|
+
|
|
126
|
+
let cachedTextDecoder = new lTextDecoder('utf-8', { ignoreBOM: true, fatal: true });
|
|
127
|
+
|
|
128
|
+
cachedTextDecoder.decode();
|
|
129
|
+
|
|
130
|
+
function getStringFromWasm0(ptr, len) {
|
|
131
|
+
ptr = ptr >>> 0;
|
|
132
|
+
return cachedTextDecoder.decode(getUint8Memory0().subarray(ptr, ptr + len));
|
|
133
|
+
}
|
|
134
|
+
|
|
135
|
+
let cachedBigInt64Memory0 = null;
|
|
136
|
+
|
|
137
|
+
function getBigInt64Memory0() {
|
|
138
|
+
if (cachedBigInt64Memory0 === null || cachedBigInt64Memory0.byteLength === 0) {
|
|
139
|
+
cachedBigInt64Memory0 = new BigInt64Array(wasm.memory.buffer);
|
|
140
|
+
}
|
|
141
|
+
return cachedBigInt64Memory0;
|
|
142
|
+
}
|
|
143
|
+
|
|
144
|
+
function debugString(val) {
|
|
145
|
+
// primitive types
|
|
146
|
+
const type = typeof val;
|
|
147
|
+
if (type == 'number' || type == 'boolean' || val == null) {
|
|
148
|
+
return `${val}`;
|
|
149
|
+
}
|
|
150
|
+
if (type == 'string') {
|
|
151
|
+
return `"${val}"`;
|
|
152
|
+
}
|
|
153
|
+
if (type == 'symbol') {
|
|
154
|
+
const description = val.description;
|
|
155
|
+
if (description == null) {
|
|
156
|
+
return 'Symbol';
|
|
157
|
+
} else {
|
|
158
|
+
return `Symbol(${description})`;
|
|
159
|
+
}
|
|
160
|
+
}
|
|
161
|
+
if (type == 'function') {
|
|
162
|
+
const name = val.name;
|
|
163
|
+
if (typeof name == 'string' && name.length > 0) {
|
|
164
|
+
return `Function(${name})`;
|
|
165
|
+
} else {
|
|
166
|
+
return 'Function';
|
|
167
|
+
}
|
|
168
|
+
}
|
|
169
|
+
// objects
|
|
170
|
+
if (Array.isArray(val)) {
|
|
171
|
+
const length = val.length;
|
|
172
|
+
let debug = '[';
|
|
173
|
+
if (length > 0) {
|
|
174
|
+
debug += debugString(val[0]);
|
|
175
|
+
}
|
|
176
|
+
for(let i = 1; i < length; i++) {
|
|
177
|
+
debug += ', ' + debugString(val[i]);
|
|
178
|
+
}
|
|
179
|
+
debug += ']';
|
|
180
|
+
return debug;
|
|
181
|
+
}
|
|
182
|
+
// Test for built-in
|
|
183
|
+
const builtInMatches = /\[object ([^\]]+)\]/.exec(toString.call(val));
|
|
184
|
+
let className;
|
|
185
|
+
if (builtInMatches.length > 1) {
|
|
186
|
+
className = builtInMatches[1];
|
|
187
|
+
} else {
|
|
188
|
+
// Failed to match the standard '[object ClassName]'
|
|
189
|
+
return toString.call(val);
|
|
190
|
+
}
|
|
191
|
+
if (className == 'Object') {
|
|
192
|
+
// we're a user defined class or Object
|
|
193
|
+
// JSON.stringify avoids problems with cycles, and is generally much
|
|
194
|
+
// easier than looping through ownProperties of `val`.
|
|
195
|
+
try {
|
|
196
|
+
return 'Object(' + JSON.stringify(val) + ')';
|
|
197
|
+
} catch (_) {
|
|
198
|
+
return 'Object';
|
|
199
|
+
}
|
|
200
|
+
}
|
|
201
|
+
// errors
|
|
202
|
+
if (val instanceof Error) {
|
|
203
|
+
return `${val.name}: ${val.message}\n${val.stack}`;
|
|
204
|
+
}
|
|
205
|
+
// TODO we could test for more things here, like `Set`s and `Map`s.
|
|
206
|
+
return className;
|
|
207
|
+
}
|
|
208
|
+
|
|
209
|
+
function makeMutClosure(arg0, arg1, dtor, f) {
|
|
210
|
+
const state = { a: arg0, b: arg1, cnt: 1, dtor };
|
|
211
|
+
const real = (...args) => {
|
|
212
|
+
// First up with a closure we increment the internal reference
|
|
213
|
+
// count. This ensures that the Rust closure environment won't
|
|
214
|
+
// be deallocated while we're invoking it.
|
|
215
|
+
state.cnt++;
|
|
216
|
+
const a = state.a;
|
|
217
|
+
state.a = 0;
|
|
218
|
+
try {
|
|
219
|
+
return f(a, state.b, ...args);
|
|
220
|
+
} finally {
|
|
221
|
+
if (--state.cnt === 0) {
|
|
222
|
+
wasm.__wbindgen_export_2.get(state.dtor)(a, state.b);
|
|
223
|
+
|
|
224
|
+
} else {
|
|
225
|
+
state.a = a;
|
|
226
|
+
}
|
|
227
|
+
}
|
|
228
|
+
};
|
|
229
|
+
real.original = state;
|
|
230
|
+
|
|
231
|
+
return real;
|
|
232
|
+
}
|
|
233
|
+
function __wbg_adapter_48(arg0, arg1, arg2) {
|
|
234
|
+
wasm._dyn_core__ops__function__FnMut__A____Output___R_as_wasm_bindgen__closure__WasmClosure___describe__invoke__hab6b01928f402e82(arg0, arg1, addHeapObject(arg2));
|
|
235
|
+
}
|
|
236
|
+
|
|
237
|
+
/**
|
|
238
|
+
* @returns {Promise<any>}
|
|
239
|
+
*/
|
|
240
|
+
export function get_network() {
|
|
241
|
+
const ret = wasm.get_network();
|
|
242
|
+
return takeObject(ret);
|
|
243
|
+
}
|
|
244
|
+
|
|
245
|
+
/**
|
|
246
|
+
* @param {string} network_str
|
|
247
|
+
* @returns {Promise<any>}
|
|
248
|
+
*/
|
|
249
|
+
export function switch_network(network_str) {
|
|
250
|
+
const ptr0 = passStringToWasm0(network_str, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
251
|
+
const len0 = WASM_VECTOR_LEN;
|
|
252
|
+
const ret = wasm.switch_network(ptr0, len0);
|
|
253
|
+
return takeObject(ret);
|
|
254
|
+
}
|
|
255
|
+
|
|
256
|
+
/**
|
|
257
|
+
* @param {string} key
|
|
258
|
+
* @returns {Promise<any>}
|
|
259
|
+
*/
|
|
260
|
+
export function get_env(key) {
|
|
261
|
+
const ptr0 = passStringToWasm0(key, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
262
|
+
const len0 = WASM_VECTOR_LEN;
|
|
263
|
+
const ret = wasm.get_env(ptr0, len0);
|
|
264
|
+
return takeObject(ret);
|
|
265
|
+
}
|
|
266
|
+
|
|
267
|
+
/**
|
|
268
|
+
* @param {string} key
|
|
269
|
+
* @param {string} value
|
|
270
|
+
* @returns {Promise<any>}
|
|
271
|
+
*/
|
|
272
|
+
export function set_env(key, value) {
|
|
273
|
+
const ptr0 = passStringToWasm0(key, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
274
|
+
const len0 = WASM_VECTOR_LEN;
|
|
275
|
+
const ptr1 = passStringToWasm0(value, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
276
|
+
const len1 = WASM_VECTOR_LEN;
|
|
277
|
+
const ret = wasm.set_env(ptr0, len0, ptr1, len1);
|
|
278
|
+
return takeObject(ret);
|
|
279
|
+
}
|
|
280
|
+
|
|
281
|
+
/**
|
|
282
|
+
* @param {number} ms
|
|
283
|
+
* @returns {Promise<any>}
|
|
284
|
+
*/
|
|
285
|
+
export function sleep(ms) {
|
|
286
|
+
const ret = wasm.sleep(ms);
|
|
287
|
+
return takeObject(ret);
|
|
288
|
+
}
|
|
289
|
+
|
|
290
|
+
/**
|
|
291
|
+
* @param {string} nostr_hex_sk
|
|
292
|
+
* @param {any} request
|
|
293
|
+
* @returns {Promise<any>}
|
|
294
|
+
*/
|
|
295
|
+
export function issue_contract(nostr_hex_sk, request) {
|
|
296
|
+
const ptr0 = passStringToWasm0(nostr_hex_sk, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
297
|
+
const len0 = WASM_VECTOR_LEN;
|
|
298
|
+
const ret = wasm.issue_contract(ptr0, len0, addHeapObject(request));
|
|
299
|
+
return takeObject(ret);
|
|
300
|
+
}
|
|
301
|
+
|
|
302
|
+
/**
|
|
303
|
+
* @param {string} nostr_hex_sk
|
|
304
|
+
* @param {any} request
|
|
305
|
+
* @returns {Promise<any>}
|
|
306
|
+
*/
|
|
307
|
+
export function reissue_contract(nostr_hex_sk, request) {
|
|
308
|
+
const ptr0 = passStringToWasm0(nostr_hex_sk, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
309
|
+
const len0 = WASM_VECTOR_LEN;
|
|
310
|
+
const ret = wasm.reissue_contract(ptr0, len0, addHeapObject(request));
|
|
311
|
+
return takeObject(ret);
|
|
312
|
+
}
|
|
313
|
+
|
|
314
|
+
/**
|
|
315
|
+
* @param {string} nostr_hex_sk
|
|
316
|
+
* @param {any} request
|
|
317
|
+
* @returns {Promise<any>}
|
|
318
|
+
*/
|
|
319
|
+
export function rgb_create_invoice(nostr_hex_sk, request) {
|
|
320
|
+
const ptr0 = passStringToWasm0(nostr_hex_sk, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
321
|
+
const len0 = WASM_VECTOR_LEN;
|
|
322
|
+
const ret = wasm.rgb_create_invoice(ptr0, len0, addHeapObject(request));
|
|
323
|
+
return takeObject(ret);
|
|
324
|
+
}
|
|
325
|
+
|
|
326
|
+
/**
|
|
327
|
+
* @param {string} nostr_hex_sk
|
|
328
|
+
* @param {any} request
|
|
329
|
+
* @returns {Promise<any>}
|
|
330
|
+
*/
|
|
331
|
+
export function create_psbt(nostr_hex_sk, request) {
|
|
332
|
+
const ptr0 = passStringToWasm0(nostr_hex_sk, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
333
|
+
const len0 = WASM_VECTOR_LEN;
|
|
334
|
+
const ret = wasm.create_psbt(ptr0, len0, addHeapObject(request));
|
|
335
|
+
return takeObject(ret);
|
|
336
|
+
}
|
|
337
|
+
|
|
338
|
+
/**
|
|
339
|
+
* @param {string} _nostr_hex_sk
|
|
340
|
+
* @param {any} request
|
|
341
|
+
* @returns {Promise<any>}
|
|
342
|
+
*/
|
|
343
|
+
export function psbt_sign_file(_nostr_hex_sk, request) {
|
|
344
|
+
const ptr0 = passStringToWasm0(_nostr_hex_sk, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
345
|
+
const len0 = WASM_VECTOR_LEN;
|
|
346
|
+
const ret = wasm.psbt_sign_file(ptr0, len0, addHeapObject(request));
|
|
347
|
+
return takeObject(ret);
|
|
348
|
+
}
|
|
349
|
+
|
|
350
|
+
/**
|
|
351
|
+
* @param {string} nostr_hex_sk
|
|
352
|
+
* @param {any} request
|
|
353
|
+
* @returns {Promise<any>}
|
|
354
|
+
*/
|
|
355
|
+
export function transfer_asset(nostr_hex_sk, request) {
|
|
356
|
+
const ptr0 = passStringToWasm0(nostr_hex_sk, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
357
|
+
const len0 = WASM_VECTOR_LEN;
|
|
358
|
+
const ret = wasm.transfer_asset(ptr0, len0, addHeapObject(request));
|
|
359
|
+
return takeObject(ret);
|
|
360
|
+
}
|
|
361
|
+
|
|
362
|
+
/**
|
|
363
|
+
* @param {string} nostr_hex_sk
|
|
364
|
+
* @param {any} request
|
|
365
|
+
* @returns {Promise<any>}
|
|
366
|
+
*/
|
|
367
|
+
export function full_transfer_asset(nostr_hex_sk, request) {
|
|
368
|
+
const ptr0 = passStringToWasm0(nostr_hex_sk, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
369
|
+
const len0 = WASM_VECTOR_LEN;
|
|
370
|
+
const ret = wasm.full_transfer_asset(ptr0, len0, addHeapObject(request));
|
|
371
|
+
return takeObject(ret);
|
|
372
|
+
}
|
|
373
|
+
|
|
374
|
+
/**
|
|
375
|
+
* @param {string} nostr_hex_sk
|
|
376
|
+
* @param {any} request
|
|
377
|
+
* @returns {Promise<any>}
|
|
378
|
+
*/
|
|
379
|
+
export function accept_transfer(nostr_hex_sk, request) {
|
|
380
|
+
const ptr0 = passStringToWasm0(nostr_hex_sk, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
381
|
+
const len0 = WASM_VECTOR_LEN;
|
|
382
|
+
const ret = wasm.accept_transfer(ptr0, len0, addHeapObject(request));
|
|
383
|
+
return takeObject(ret);
|
|
384
|
+
}
|
|
385
|
+
|
|
386
|
+
/**
|
|
387
|
+
* @param {string} nostr_hex_sk
|
|
388
|
+
* @returns {Promise<any>}
|
|
389
|
+
*/
|
|
390
|
+
export function verify_transfers(nostr_hex_sk) {
|
|
391
|
+
const ptr0 = passStringToWasm0(nostr_hex_sk, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
392
|
+
const len0 = WASM_VECTOR_LEN;
|
|
393
|
+
const ret = wasm.verify_transfers(ptr0, len0);
|
|
394
|
+
return takeObject(ret);
|
|
395
|
+
}
|
|
396
|
+
|
|
397
|
+
/**
|
|
398
|
+
* @param {string} nostr_hex_sk
|
|
399
|
+
* @param {string} contract_id
|
|
400
|
+
* @returns {Promise<any>}
|
|
401
|
+
*/
|
|
402
|
+
export function get_contract(nostr_hex_sk, contract_id) {
|
|
403
|
+
const ptr0 = passStringToWasm0(nostr_hex_sk, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
404
|
+
const len0 = WASM_VECTOR_LEN;
|
|
405
|
+
const ptr1 = passStringToWasm0(contract_id, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
406
|
+
const len1 = WASM_VECTOR_LEN;
|
|
407
|
+
const ret = wasm.get_contract(ptr0, len0, ptr1, len1);
|
|
408
|
+
return takeObject(ret);
|
|
409
|
+
}
|
|
410
|
+
|
|
411
|
+
/**
|
|
412
|
+
* @param {string} nostr_hex_sk
|
|
413
|
+
* @returns {Promise<any>}
|
|
414
|
+
*/
|
|
415
|
+
export function list_contracts(nostr_hex_sk) {
|
|
416
|
+
const ptr0 = passStringToWasm0(nostr_hex_sk, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
417
|
+
const len0 = WASM_VECTOR_LEN;
|
|
418
|
+
const ret = wasm.list_contracts(ptr0, len0);
|
|
419
|
+
return takeObject(ret);
|
|
420
|
+
}
|
|
421
|
+
|
|
422
|
+
/**
|
|
423
|
+
* @param {string} nostr_hex_sk
|
|
424
|
+
* @returns {Promise<any>}
|
|
425
|
+
*/
|
|
426
|
+
export function list_interfaces(nostr_hex_sk) {
|
|
427
|
+
const ptr0 = passStringToWasm0(nostr_hex_sk, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
428
|
+
const len0 = WASM_VECTOR_LEN;
|
|
429
|
+
const ret = wasm.list_interfaces(ptr0, len0);
|
|
430
|
+
return takeObject(ret);
|
|
431
|
+
}
|
|
432
|
+
|
|
433
|
+
/**
|
|
434
|
+
* @param {string} nostr_hex_sk
|
|
435
|
+
* @returns {Promise<any>}
|
|
436
|
+
*/
|
|
437
|
+
export function list_schemas(nostr_hex_sk) {
|
|
438
|
+
const ptr0 = passStringToWasm0(nostr_hex_sk, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
439
|
+
const len0 = WASM_VECTOR_LEN;
|
|
440
|
+
const ret = wasm.list_schemas(ptr0, len0);
|
|
441
|
+
return takeObject(ret);
|
|
442
|
+
}
|
|
443
|
+
|
|
444
|
+
/**
|
|
445
|
+
* @param {string} nostr_hex_sk
|
|
446
|
+
* @param {any} request
|
|
447
|
+
* @returns {Promise<any>}
|
|
448
|
+
*/
|
|
449
|
+
export function import_contract(nostr_hex_sk, request) {
|
|
450
|
+
const ptr0 = passStringToWasm0(nostr_hex_sk, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
451
|
+
const len0 = WASM_VECTOR_LEN;
|
|
452
|
+
const ret = wasm.import_contract(ptr0, len0, addHeapObject(request));
|
|
453
|
+
return takeObject(ret);
|
|
454
|
+
}
|
|
455
|
+
|
|
456
|
+
/**
|
|
457
|
+
* @param {string} nostr_hex_sk
|
|
458
|
+
* @param {any} request
|
|
459
|
+
* @returns {Promise<any>}
|
|
460
|
+
*/
|
|
461
|
+
export function create_watcher(nostr_hex_sk, request) {
|
|
462
|
+
const ptr0 = passStringToWasm0(nostr_hex_sk, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
463
|
+
const len0 = WASM_VECTOR_LEN;
|
|
464
|
+
const ret = wasm.create_watcher(ptr0, len0, addHeapObject(request));
|
|
465
|
+
return takeObject(ret);
|
|
466
|
+
}
|
|
467
|
+
|
|
468
|
+
/**
|
|
469
|
+
* @param {string} nostr_hex_sk
|
|
470
|
+
* @param {string} name
|
|
471
|
+
* @returns {Promise<any>}
|
|
472
|
+
*/
|
|
473
|
+
export function watcher_details(nostr_hex_sk, name) {
|
|
474
|
+
const ptr0 = passStringToWasm0(nostr_hex_sk, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
475
|
+
const len0 = WASM_VECTOR_LEN;
|
|
476
|
+
const ptr1 = passStringToWasm0(name, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
477
|
+
const len1 = WASM_VECTOR_LEN;
|
|
478
|
+
const ret = wasm.watcher_details(ptr0, len0, ptr1, len1);
|
|
479
|
+
return takeObject(ret);
|
|
480
|
+
}
|
|
481
|
+
|
|
482
|
+
/**
|
|
483
|
+
* @param {string} nostr_hex_sk
|
|
484
|
+
* @param {string} name
|
|
485
|
+
* @returns {Promise<any>}
|
|
486
|
+
*/
|
|
487
|
+
export function clear_watcher(nostr_hex_sk, name) {
|
|
488
|
+
const ptr0 = passStringToWasm0(nostr_hex_sk, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
489
|
+
const len0 = WASM_VECTOR_LEN;
|
|
490
|
+
const ptr1 = passStringToWasm0(name, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
491
|
+
const len1 = WASM_VECTOR_LEN;
|
|
492
|
+
const ret = wasm.clear_watcher(ptr0, len0, ptr1, len1);
|
|
493
|
+
return takeObject(ret);
|
|
494
|
+
}
|
|
495
|
+
|
|
496
|
+
/**
|
|
497
|
+
* @param {string} nostr_hex_sk
|
|
498
|
+
* @param {string} name
|
|
499
|
+
* @param {string} address
|
|
500
|
+
* @returns {Promise<any>}
|
|
501
|
+
*/
|
|
502
|
+
export function watcher_address(nostr_hex_sk, name, address) {
|
|
503
|
+
const ptr0 = passStringToWasm0(nostr_hex_sk, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
504
|
+
const len0 = WASM_VECTOR_LEN;
|
|
505
|
+
const ptr1 = passStringToWasm0(name, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
506
|
+
const len1 = WASM_VECTOR_LEN;
|
|
507
|
+
const ptr2 = passStringToWasm0(address, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
508
|
+
const len2 = WASM_VECTOR_LEN;
|
|
509
|
+
const ret = wasm.watcher_address(ptr0, len0, ptr1, len1, ptr2, len2);
|
|
510
|
+
return takeObject(ret);
|
|
511
|
+
}
|
|
512
|
+
|
|
513
|
+
/**
|
|
514
|
+
* @param {string} nostr_hex_sk
|
|
515
|
+
* @param {string} name
|
|
516
|
+
* @param {string} utxo
|
|
517
|
+
* @returns {Promise<any>}
|
|
518
|
+
*/
|
|
519
|
+
export function watcher_utxo(nostr_hex_sk, name, utxo) {
|
|
520
|
+
const ptr0 = passStringToWasm0(nostr_hex_sk, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
521
|
+
const len0 = WASM_VECTOR_LEN;
|
|
522
|
+
const ptr1 = passStringToWasm0(name, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
523
|
+
const len1 = WASM_VECTOR_LEN;
|
|
524
|
+
const ptr2 = passStringToWasm0(utxo, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
525
|
+
const len2 = WASM_VECTOR_LEN;
|
|
526
|
+
const ret = wasm.watcher_utxo(ptr0, len0, ptr1, len1, ptr2, len2);
|
|
527
|
+
return takeObject(ret);
|
|
528
|
+
}
|
|
529
|
+
|
|
530
|
+
/**
|
|
531
|
+
* @param {string} nostr_hex_sk
|
|
532
|
+
* @param {string} name
|
|
533
|
+
* @param {string} iface
|
|
534
|
+
* @returns {Promise<any>}
|
|
535
|
+
*/
|
|
536
|
+
export function watcher_next_address(nostr_hex_sk, name, iface) {
|
|
537
|
+
const ptr0 = passStringToWasm0(nostr_hex_sk, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
538
|
+
const len0 = WASM_VECTOR_LEN;
|
|
539
|
+
const ptr1 = passStringToWasm0(name, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
540
|
+
const len1 = WASM_VECTOR_LEN;
|
|
541
|
+
const ptr2 = passStringToWasm0(iface, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
542
|
+
const len2 = WASM_VECTOR_LEN;
|
|
543
|
+
const ret = wasm.watcher_next_address(ptr0, len0, ptr1, len1, ptr2, len2);
|
|
544
|
+
return takeObject(ret);
|
|
545
|
+
}
|
|
546
|
+
|
|
547
|
+
/**
|
|
548
|
+
* @param {string} nostr_hex_sk
|
|
549
|
+
* @param {string} name
|
|
550
|
+
* @param {string} iface
|
|
551
|
+
* @returns {Promise<any>}
|
|
552
|
+
*/
|
|
553
|
+
export function watcher_next_utxo(nostr_hex_sk, name, iface) {
|
|
554
|
+
const ptr0 = passStringToWasm0(nostr_hex_sk, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
555
|
+
const len0 = WASM_VECTOR_LEN;
|
|
556
|
+
const ptr1 = passStringToWasm0(name, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
557
|
+
const len1 = WASM_VECTOR_LEN;
|
|
558
|
+
const ptr2 = passStringToWasm0(iface, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
559
|
+
const len2 = WASM_VECTOR_LEN;
|
|
560
|
+
const ret = wasm.watcher_next_utxo(ptr0, len0, ptr1, len1, ptr2, len2);
|
|
561
|
+
return takeObject(ret);
|
|
562
|
+
}
|
|
563
|
+
|
|
564
|
+
/**
|
|
565
|
+
* @param {string} nostr_hex_sk
|
|
566
|
+
* @param {string} name
|
|
567
|
+
* @param {string} iface
|
|
568
|
+
* @returns {Promise<any>}
|
|
569
|
+
*/
|
|
570
|
+
export function watcher_unspent_utxos(nostr_hex_sk, name, iface) {
|
|
571
|
+
const ptr0 = passStringToWasm0(nostr_hex_sk, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
572
|
+
const len0 = WASM_VECTOR_LEN;
|
|
573
|
+
const ptr1 = passStringToWasm0(name, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
574
|
+
const len1 = WASM_VECTOR_LEN;
|
|
575
|
+
const ptr2 = passStringToWasm0(iface, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
576
|
+
const len2 = WASM_VECTOR_LEN;
|
|
577
|
+
const ret = wasm.watcher_unspent_utxos(ptr0, len0, ptr1, len1, ptr2, len2);
|
|
578
|
+
return takeObject(ret);
|
|
579
|
+
}
|
|
580
|
+
|
|
581
|
+
/**
|
|
582
|
+
* @param {string} nostr_hex_sk
|
|
583
|
+
* @param {string} contract_id
|
|
584
|
+
* @returns {Promise<any>}
|
|
585
|
+
*/
|
|
586
|
+
export function list_transfers(nostr_hex_sk, contract_id) {
|
|
587
|
+
const ptr0 = passStringToWasm0(nostr_hex_sk, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
588
|
+
const len0 = WASM_VECTOR_LEN;
|
|
589
|
+
const ptr1 = passStringToWasm0(contract_id, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
590
|
+
const len1 = WASM_VECTOR_LEN;
|
|
591
|
+
const ret = wasm.list_transfers(ptr0, len0, ptr1, len1);
|
|
592
|
+
return takeObject(ret);
|
|
593
|
+
}
|
|
594
|
+
|
|
595
|
+
/**
|
|
596
|
+
* @param {string} nostr_hex_sk
|
|
597
|
+
* @param {any} request
|
|
598
|
+
* @returns {Promise<any>}
|
|
599
|
+
*/
|
|
600
|
+
export function save_transfer(nostr_hex_sk, request) {
|
|
601
|
+
const ptr0 = passStringToWasm0(nostr_hex_sk, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
602
|
+
const len0 = WASM_VECTOR_LEN;
|
|
603
|
+
const ret = wasm.save_transfer(ptr0, len0, addHeapObject(request));
|
|
604
|
+
return takeObject(ret);
|
|
605
|
+
}
|
|
606
|
+
|
|
607
|
+
/**
|
|
608
|
+
* @param {string} nostr_hex_sk
|
|
609
|
+
* @param {any} request
|
|
610
|
+
* @returns {Promise<any>}
|
|
611
|
+
*/
|
|
612
|
+
export function remove_transfer(nostr_hex_sk, request) {
|
|
613
|
+
const ptr0 = passStringToWasm0(nostr_hex_sk, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
614
|
+
const len0 = WASM_VECTOR_LEN;
|
|
615
|
+
const ret = wasm.remove_transfer(ptr0, len0, addHeapObject(request));
|
|
616
|
+
return takeObject(ret);
|
|
617
|
+
}
|
|
618
|
+
|
|
619
|
+
/**
|
|
620
|
+
* @param {string} invoice
|
|
621
|
+
* @returns {Promise<any>}
|
|
622
|
+
*/
|
|
623
|
+
export function decode_invoice(invoice) {
|
|
624
|
+
const ptr0 = passStringToWasm0(invoice, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
625
|
+
const len0 = WASM_VECTOR_LEN;
|
|
626
|
+
const ret = wasm.decode_invoice(ptr0, len0);
|
|
627
|
+
return takeObject(ret);
|
|
628
|
+
}
|
|
629
|
+
|
|
630
|
+
/**
|
|
631
|
+
* @param {string} pubkey
|
|
632
|
+
* @param {string} token
|
|
633
|
+
* @returns {Promise<any>}
|
|
634
|
+
*/
|
|
635
|
+
export function new_nostr_pubkey(pubkey, token) {
|
|
636
|
+
const ptr0 = passStringToWasm0(pubkey, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
637
|
+
const len0 = WASM_VECTOR_LEN;
|
|
638
|
+
const ptr1 = passStringToWasm0(token, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
639
|
+
const len1 = WASM_VECTOR_LEN;
|
|
640
|
+
const ret = wasm.new_nostr_pubkey(ptr0, len0, ptr1, len1);
|
|
641
|
+
return takeObject(ret);
|
|
642
|
+
}
|
|
643
|
+
|
|
644
|
+
/**
|
|
645
|
+
* @param {string} pubkey
|
|
646
|
+
* @param {string} token
|
|
647
|
+
* @returns {Promise<any>}
|
|
648
|
+
*/
|
|
649
|
+
export function update_nostr_pubkey(pubkey, token) {
|
|
650
|
+
const ptr0 = passStringToWasm0(pubkey, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
651
|
+
const len0 = WASM_VECTOR_LEN;
|
|
652
|
+
const ptr1 = passStringToWasm0(token, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
653
|
+
const len1 = WASM_VECTOR_LEN;
|
|
654
|
+
const ret = wasm.update_nostr_pubkey(ptr0, len0, ptr1, len1);
|
|
655
|
+
return takeObject(ret);
|
|
656
|
+
}
|
|
657
|
+
|
|
658
|
+
/**
|
|
659
|
+
* @param {string} password
|
|
660
|
+
* @returns {string}
|
|
661
|
+
*/
|
|
662
|
+
export function hash_password(password) {
|
|
663
|
+
let deferred2_0;
|
|
664
|
+
let deferred2_1;
|
|
665
|
+
try {
|
|
666
|
+
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
667
|
+
const ptr0 = passStringToWasm0(password, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
668
|
+
const len0 = WASM_VECTOR_LEN;
|
|
669
|
+
wasm.hash_password(retptr, ptr0, len0);
|
|
670
|
+
var r0 = getInt32Memory0()[retptr / 4 + 0];
|
|
671
|
+
var r1 = getInt32Memory0()[retptr / 4 + 1];
|
|
672
|
+
deferred2_0 = r0;
|
|
673
|
+
deferred2_1 = r1;
|
|
674
|
+
return getStringFromWasm0(r0, r1);
|
|
675
|
+
} finally {
|
|
676
|
+
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
677
|
+
wasm.__wbindgen_free(deferred2_0, deferred2_1, 1);
|
|
678
|
+
}
|
|
679
|
+
}
|
|
680
|
+
|
|
681
|
+
/**
|
|
682
|
+
* @param {string} password
|
|
683
|
+
* @returns {Promise<any>}
|
|
684
|
+
*/
|
|
685
|
+
export function new_mnemonic(password) {
|
|
686
|
+
const ptr0 = passStringToWasm0(password, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
687
|
+
const len0 = WASM_VECTOR_LEN;
|
|
688
|
+
const ret = wasm.new_mnemonic(ptr0, len0);
|
|
689
|
+
return takeObject(ret);
|
|
690
|
+
}
|
|
691
|
+
|
|
692
|
+
/**
|
|
693
|
+
* @param {string} hash
|
|
694
|
+
* @param {string} encrypted_descriptors
|
|
695
|
+
* @returns {Promise<any>}
|
|
696
|
+
*/
|
|
697
|
+
export function decrypt_wallet(hash, encrypted_descriptors) {
|
|
698
|
+
const ptr0 = passStringToWasm0(hash, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
699
|
+
const len0 = WASM_VECTOR_LEN;
|
|
700
|
+
const ptr1 = passStringToWasm0(encrypted_descriptors, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
701
|
+
const len1 = WASM_VECTOR_LEN;
|
|
702
|
+
const ret = wasm.decrypt_wallet(ptr0, len0, ptr1, len1);
|
|
703
|
+
return takeObject(ret);
|
|
704
|
+
}
|
|
705
|
+
|
|
706
|
+
/**
|
|
707
|
+
* @param {string} hash
|
|
708
|
+
* @param {string} encrypted_descriptors
|
|
709
|
+
* @param {string} seed_password
|
|
710
|
+
* @returns {Promise<any>}
|
|
711
|
+
*/
|
|
712
|
+
export function upgrade_wallet(hash, encrypted_descriptors, seed_password) {
|
|
713
|
+
const ptr0 = passStringToWasm0(hash, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
714
|
+
const len0 = WASM_VECTOR_LEN;
|
|
715
|
+
const ptr1 = passStringToWasm0(encrypted_descriptors, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
716
|
+
const len1 = WASM_VECTOR_LEN;
|
|
717
|
+
const ptr2 = passStringToWasm0(seed_password, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
718
|
+
const len2 = WASM_VECTOR_LEN;
|
|
719
|
+
const ret = wasm.upgrade_wallet(ptr0, len0, ptr1, len1, ptr2, len2);
|
|
720
|
+
return takeObject(ret);
|
|
721
|
+
}
|
|
722
|
+
|
|
723
|
+
/**
|
|
724
|
+
* @param {string} hash
|
|
725
|
+
* @param {string} seed_password
|
|
726
|
+
* @returns {Promise<any>}
|
|
727
|
+
*/
|
|
728
|
+
export function new_wallet(hash, seed_password) {
|
|
729
|
+
const ptr0 = passStringToWasm0(hash, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
730
|
+
const len0 = WASM_VECTOR_LEN;
|
|
731
|
+
const ptr1 = passStringToWasm0(seed_password, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
732
|
+
const len1 = WASM_VECTOR_LEN;
|
|
733
|
+
const ret = wasm.new_wallet(ptr0, len0, ptr1, len1);
|
|
734
|
+
return takeObject(ret);
|
|
735
|
+
}
|
|
736
|
+
|
|
737
|
+
/**
|
|
738
|
+
* @param {string} mnemonic
|
|
739
|
+
* @param {string} hash
|
|
740
|
+
* @param {string} seed_password
|
|
741
|
+
* @returns {Promise<any>}
|
|
742
|
+
*/
|
|
743
|
+
export function encrypt_wallet(mnemonic, hash, seed_password) {
|
|
744
|
+
const ptr0 = passStringToWasm0(mnemonic, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
745
|
+
const len0 = WASM_VECTOR_LEN;
|
|
746
|
+
const ptr1 = passStringToWasm0(hash, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
747
|
+
const len1 = WASM_VECTOR_LEN;
|
|
748
|
+
const ptr2 = passStringToWasm0(seed_password, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
749
|
+
const len2 = WASM_VECTOR_LEN;
|
|
750
|
+
const ret = wasm.encrypt_wallet(ptr0, len0, ptr1, len1, ptr2, len2);
|
|
751
|
+
return takeObject(ret);
|
|
752
|
+
}
|
|
753
|
+
|
|
754
|
+
/**
|
|
755
|
+
* @param {string} descriptor
|
|
756
|
+
* @param {string | undefined} change_descriptor
|
|
757
|
+
* @returns {Promise<any>}
|
|
758
|
+
*/
|
|
759
|
+
export function get_wallet_data(descriptor, change_descriptor) {
|
|
760
|
+
const ptr0 = passStringToWasm0(descriptor, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
761
|
+
const len0 = WASM_VECTOR_LEN;
|
|
762
|
+
var ptr1 = isLikeNone(change_descriptor) ? 0 : passStringToWasm0(change_descriptor, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
763
|
+
var len1 = WASM_VECTOR_LEN;
|
|
764
|
+
const ret = wasm.get_wallet_data(ptr0, len0, ptr1, len1);
|
|
765
|
+
return takeObject(ret);
|
|
766
|
+
}
|
|
767
|
+
|
|
768
|
+
/**
|
|
769
|
+
* @returns {Promise<any>}
|
|
770
|
+
*/
|
|
771
|
+
export function sync_wallets() {
|
|
772
|
+
const ret = wasm.sync_wallets();
|
|
773
|
+
return takeObject(ret);
|
|
774
|
+
}
|
|
775
|
+
|
|
776
|
+
/**
|
|
777
|
+
* @param {string} descriptor
|
|
778
|
+
* @param {string | undefined} change_descriptor
|
|
779
|
+
* @returns {Promise<any>}
|
|
780
|
+
*/
|
|
781
|
+
export function get_new_address(descriptor, change_descriptor) {
|
|
782
|
+
const ptr0 = passStringToWasm0(descriptor, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
783
|
+
const len0 = WASM_VECTOR_LEN;
|
|
784
|
+
var ptr1 = isLikeNone(change_descriptor) ? 0 : passStringToWasm0(change_descriptor, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
785
|
+
var len1 = WASM_VECTOR_LEN;
|
|
786
|
+
const ret = wasm.get_new_address(ptr0, len0, ptr1, len1);
|
|
787
|
+
return takeObject(ret);
|
|
788
|
+
}
|
|
789
|
+
|
|
790
|
+
/**
|
|
791
|
+
* @param {string} descriptor
|
|
792
|
+
* @param {string} change_descriptor
|
|
793
|
+
* @param {string} destination
|
|
794
|
+
* @param {bigint} amount
|
|
795
|
+
* @param {number | undefined} fee_rate
|
|
796
|
+
* @returns {Promise<any>}
|
|
797
|
+
*/
|
|
798
|
+
export function send_sats(descriptor, change_descriptor, destination, amount, fee_rate) {
|
|
799
|
+
const ptr0 = passStringToWasm0(descriptor, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
800
|
+
const len0 = WASM_VECTOR_LEN;
|
|
801
|
+
const ptr1 = passStringToWasm0(change_descriptor, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
802
|
+
const len1 = WASM_VECTOR_LEN;
|
|
803
|
+
const ptr2 = passStringToWasm0(destination, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
804
|
+
const len2 = WASM_VECTOR_LEN;
|
|
805
|
+
const ret = wasm.send_sats(ptr0, len0, ptr1, len1, ptr2, len2, amount, !isLikeNone(fee_rate), isLikeNone(fee_rate) ? 0 : fee_rate);
|
|
806
|
+
return takeObject(ret);
|
|
807
|
+
}
|
|
808
|
+
|
|
809
|
+
/**
|
|
810
|
+
* @param {string} destination
|
|
811
|
+
* @param {string} descriptor
|
|
812
|
+
* @param {string | undefined} change_descriptor
|
|
813
|
+
* @param {number | undefined} fee_rate
|
|
814
|
+
* @returns {Promise<any>}
|
|
815
|
+
*/
|
|
816
|
+
export function drain_wallet(destination, descriptor, change_descriptor, fee_rate) {
|
|
817
|
+
const ptr0 = passStringToWasm0(destination, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
818
|
+
const len0 = WASM_VECTOR_LEN;
|
|
819
|
+
const ptr1 = passStringToWasm0(descriptor, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
820
|
+
const len1 = WASM_VECTOR_LEN;
|
|
821
|
+
var ptr2 = isLikeNone(change_descriptor) ? 0 : passStringToWasm0(change_descriptor, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
822
|
+
var len2 = WASM_VECTOR_LEN;
|
|
823
|
+
const ret = wasm.drain_wallet(ptr0, len0, ptr1, len1, ptr2, len2, !isLikeNone(fee_rate), isLikeNone(fee_rate) ? 0 : fee_rate);
|
|
824
|
+
return takeObject(ret);
|
|
825
|
+
}
|
|
826
|
+
|
|
827
|
+
/**
|
|
828
|
+
* @param {string} descriptor
|
|
829
|
+
* @param {string} change_descriptor
|
|
830
|
+
* @param {string} asset_address_1
|
|
831
|
+
* @param {string} asset_address_2
|
|
832
|
+
* @param {string} uda_address_1
|
|
833
|
+
* @param {string} uda_address_2
|
|
834
|
+
* @param {number | undefined} fee_rate
|
|
835
|
+
* @returns {Promise<any>}
|
|
836
|
+
*/
|
|
837
|
+
export function fund_vault(descriptor, change_descriptor, asset_address_1, asset_address_2, uda_address_1, uda_address_2, fee_rate) {
|
|
838
|
+
const ptr0 = passStringToWasm0(descriptor, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
839
|
+
const len0 = WASM_VECTOR_LEN;
|
|
840
|
+
const ptr1 = passStringToWasm0(change_descriptor, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
841
|
+
const len1 = WASM_VECTOR_LEN;
|
|
842
|
+
const ptr2 = passStringToWasm0(asset_address_1, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
843
|
+
const len2 = WASM_VECTOR_LEN;
|
|
844
|
+
const ptr3 = passStringToWasm0(asset_address_2, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
845
|
+
const len3 = WASM_VECTOR_LEN;
|
|
846
|
+
const ptr4 = passStringToWasm0(uda_address_1, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
847
|
+
const len4 = WASM_VECTOR_LEN;
|
|
848
|
+
const ptr5 = passStringToWasm0(uda_address_2, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
849
|
+
const len5 = WASM_VECTOR_LEN;
|
|
850
|
+
const ret = wasm.fund_vault(ptr0, len0, ptr1, len1, ptr2, len2, ptr3, len3, ptr4, len4, ptr5, len5, !isLikeNone(fee_rate), isLikeNone(fee_rate) ? 0 : fee_rate);
|
|
851
|
+
return takeObject(ret);
|
|
852
|
+
}
|
|
853
|
+
|
|
854
|
+
/**
|
|
855
|
+
* @param {string} rgb_assets_descriptor_xpub
|
|
856
|
+
* @param {string} rgb_udas_descriptor_xpub
|
|
857
|
+
* @returns {Promise<any>}
|
|
858
|
+
*/
|
|
859
|
+
export function get_assets_vault(rgb_assets_descriptor_xpub, rgb_udas_descriptor_xpub) {
|
|
860
|
+
const ptr0 = passStringToWasm0(rgb_assets_descriptor_xpub, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
861
|
+
const len0 = WASM_VECTOR_LEN;
|
|
862
|
+
const ptr1 = passStringToWasm0(rgb_udas_descriptor_xpub, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
863
|
+
const len1 = WASM_VECTOR_LEN;
|
|
864
|
+
const ret = wasm.get_assets_vault(ptr0, len0, ptr1, len1);
|
|
865
|
+
return takeObject(ret);
|
|
866
|
+
}
|
|
867
|
+
|
|
868
|
+
/**
|
|
869
|
+
* @param {string} username
|
|
870
|
+
* @param {string} password
|
|
871
|
+
* @returns {Promise<any>}
|
|
872
|
+
*/
|
|
873
|
+
export function create_wallet(username, password) {
|
|
874
|
+
const ptr0 = passStringToWasm0(username, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
875
|
+
const len0 = WASM_VECTOR_LEN;
|
|
876
|
+
const ptr1 = passStringToWasm0(password, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
877
|
+
const len1 = WASM_VECTOR_LEN;
|
|
878
|
+
const ret = wasm.create_wallet(ptr0, len0, ptr1, len1);
|
|
879
|
+
return takeObject(ret);
|
|
880
|
+
}
|
|
881
|
+
|
|
882
|
+
/**
|
|
883
|
+
* @param {string} username
|
|
884
|
+
* @param {string} password
|
|
885
|
+
* @returns {Promise<any>}
|
|
886
|
+
*/
|
|
887
|
+
export function auth(username, password) {
|
|
888
|
+
const ptr0 = passStringToWasm0(username, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
889
|
+
const len0 = WASM_VECTOR_LEN;
|
|
890
|
+
const ptr1 = passStringToWasm0(password, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
891
|
+
const len1 = WASM_VECTOR_LEN;
|
|
892
|
+
const ret = wasm.auth(ptr0, len0, ptr1, len1);
|
|
893
|
+
return takeObject(ret);
|
|
894
|
+
}
|
|
895
|
+
|
|
896
|
+
/**
|
|
897
|
+
* @param {string} description
|
|
898
|
+
* @param {number} amount
|
|
899
|
+
* @param {string} token
|
|
900
|
+
* @returns {Promise<any>}
|
|
901
|
+
*/
|
|
902
|
+
export function ln_create_invoice(description, amount, token) {
|
|
903
|
+
const ptr0 = passStringToWasm0(description, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
904
|
+
const len0 = WASM_VECTOR_LEN;
|
|
905
|
+
const ptr1 = passStringToWasm0(token, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
906
|
+
const len1 = WASM_VECTOR_LEN;
|
|
907
|
+
const ret = wasm.ln_create_invoice(ptr0, len0, amount, ptr1, len1);
|
|
908
|
+
return takeObject(ret);
|
|
909
|
+
}
|
|
910
|
+
|
|
911
|
+
/**
|
|
912
|
+
* @param {string} token
|
|
913
|
+
* @returns {Promise<any>}
|
|
914
|
+
*/
|
|
915
|
+
export function get_balance(token) {
|
|
916
|
+
const ptr0 = passStringToWasm0(token, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
917
|
+
const len0 = WASM_VECTOR_LEN;
|
|
918
|
+
const ret = wasm.get_balance(ptr0, len0);
|
|
919
|
+
return takeObject(ret);
|
|
920
|
+
}
|
|
921
|
+
|
|
922
|
+
/**
|
|
923
|
+
* @param {string} token
|
|
924
|
+
* @returns {Promise<any>}
|
|
925
|
+
*/
|
|
926
|
+
export function get_txs(token) {
|
|
927
|
+
const ptr0 = passStringToWasm0(token, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
928
|
+
const len0 = WASM_VECTOR_LEN;
|
|
929
|
+
const ret = wasm.get_txs(ptr0, len0);
|
|
930
|
+
return takeObject(ret);
|
|
931
|
+
}
|
|
932
|
+
|
|
933
|
+
/**
|
|
934
|
+
* @param {string} payment_request
|
|
935
|
+
* @param {string} token
|
|
936
|
+
* @returns {Promise<any>}
|
|
937
|
+
*/
|
|
938
|
+
export function pay_invoice(payment_request, token) {
|
|
939
|
+
const ptr0 = passStringToWasm0(payment_request, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
940
|
+
const len0 = WASM_VECTOR_LEN;
|
|
941
|
+
const ptr1 = passStringToWasm0(token, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
942
|
+
const len1 = WASM_VECTOR_LEN;
|
|
943
|
+
const ret = wasm.pay_invoice(ptr0, len0, ptr1, len1);
|
|
944
|
+
return takeObject(ret);
|
|
945
|
+
}
|
|
946
|
+
|
|
947
|
+
/**
|
|
948
|
+
* @param {string} payment_hash
|
|
949
|
+
* @returns {Promise<any>}
|
|
950
|
+
*/
|
|
951
|
+
export function check_payment(payment_hash) {
|
|
952
|
+
const ptr0 = passStringToWasm0(payment_hash, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
953
|
+
const len0 = WASM_VECTOR_LEN;
|
|
954
|
+
const ret = wasm.check_payment(ptr0, len0);
|
|
955
|
+
return takeObject(ret);
|
|
956
|
+
}
|
|
957
|
+
|
|
958
|
+
/**
|
|
959
|
+
* @param {string} token
|
|
960
|
+
* @param {string | undefined} ln_address
|
|
961
|
+
* @returns {Promise<any>}
|
|
962
|
+
*/
|
|
963
|
+
export function swap_btc_ln(token, ln_address) {
|
|
964
|
+
const ptr0 = passStringToWasm0(token, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
965
|
+
const len0 = WASM_VECTOR_LEN;
|
|
966
|
+
var ptr1 = isLikeNone(ln_address) ? 0 : passStringToWasm0(ln_address, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
967
|
+
var len1 = WASM_VECTOR_LEN;
|
|
968
|
+
const ret = wasm.swap_btc_ln(ptr0, len0, ptr1, len1);
|
|
969
|
+
return takeObject(ret);
|
|
970
|
+
}
|
|
971
|
+
|
|
972
|
+
/**
|
|
973
|
+
* @param {string} address
|
|
974
|
+
* @param {bigint} amount
|
|
975
|
+
* @param {string} token
|
|
976
|
+
* @returns {Promise<any>}
|
|
977
|
+
*/
|
|
978
|
+
export function swap_ln_btc(address, amount, token) {
|
|
979
|
+
const ptr0 = passStringToWasm0(address, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
980
|
+
const len0 = WASM_VECTOR_LEN;
|
|
981
|
+
const ptr1 = passStringToWasm0(token, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
982
|
+
const len1 = WASM_VECTOR_LEN;
|
|
983
|
+
const ret = wasm.swap_ln_btc(ptr0, len0, amount, ptr1, len1);
|
|
984
|
+
return takeObject(ret);
|
|
985
|
+
}
|
|
986
|
+
|
|
987
|
+
function passArray8ToWasm0(arg, malloc) {
|
|
988
|
+
const ptr = malloc(arg.length * 1, 1) >>> 0;
|
|
989
|
+
getUint8Memory0().set(arg, ptr / 1);
|
|
990
|
+
WASM_VECTOR_LEN = arg.length;
|
|
991
|
+
return ptr;
|
|
992
|
+
}
|
|
993
|
+
/**
|
|
994
|
+
* @param {string} secret_key
|
|
995
|
+
* @param {string} name
|
|
996
|
+
* @param {Uint8Array} data
|
|
997
|
+
* @param {boolean} force
|
|
998
|
+
* @param {Uint8Array | undefined} metadata
|
|
999
|
+
* @returns {Promise<any>}
|
|
1000
|
+
*/
|
|
1001
|
+
export function store(secret_key, name, data, force, metadata) {
|
|
1002
|
+
const ptr0 = passStringToWasm0(secret_key, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
1003
|
+
const len0 = WASM_VECTOR_LEN;
|
|
1004
|
+
const ptr1 = passStringToWasm0(name, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
1005
|
+
const len1 = WASM_VECTOR_LEN;
|
|
1006
|
+
const ptr2 = passArray8ToWasm0(data, wasm.__wbindgen_malloc);
|
|
1007
|
+
const len2 = WASM_VECTOR_LEN;
|
|
1008
|
+
var ptr3 = isLikeNone(metadata) ? 0 : passArray8ToWasm0(metadata, wasm.__wbindgen_malloc);
|
|
1009
|
+
var len3 = WASM_VECTOR_LEN;
|
|
1010
|
+
const ret = wasm.store(ptr0, len0, ptr1, len1, ptr2, len2, force, ptr3, len3);
|
|
1011
|
+
return takeObject(ret);
|
|
1012
|
+
}
|
|
1013
|
+
|
|
1014
|
+
/**
|
|
1015
|
+
* @param {string} secret_key
|
|
1016
|
+
* @param {string} name
|
|
1017
|
+
* @returns {Promise<any>}
|
|
1018
|
+
*/
|
|
1019
|
+
export function retrieve(secret_key, name) {
|
|
1020
|
+
const ptr0 = passStringToWasm0(secret_key, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
1021
|
+
const len0 = WASM_VECTOR_LEN;
|
|
1022
|
+
const ptr1 = passStringToWasm0(name, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
1023
|
+
const len1 = WASM_VECTOR_LEN;
|
|
1024
|
+
const ret = wasm.retrieve(ptr0, len0, ptr1, len1);
|
|
1025
|
+
return takeObject(ret);
|
|
1026
|
+
}
|
|
1027
|
+
|
|
1028
|
+
/**
|
|
1029
|
+
* @param {string} secret_key
|
|
1030
|
+
* @param {string} name
|
|
1031
|
+
* @returns {Promise<any>}
|
|
1032
|
+
*/
|
|
1033
|
+
export function retrieve_metadata(secret_key, name) {
|
|
1034
|
+
const ptr0 = passStringToWasm0(secret_key, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
1035
|
+
const len0 = WASM_VECTOR_LEN;
|
|
1036
|
+
const ptr1 = passStringToWasm0(name, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
1037
|
+
const len1 = WASM_VECTOR_LEN;
|
|
1038
|
+
const ret = wasm.retrieve_metadata(ptr0, len0, ptr1, len1);
|
|
1039
|
+
return takeObject(ret);
|
|
1040
|
+
}
|
|
1041
|
+
|
|
1042
|
+
/**
|
|
1043
|
+
* @param {Uint8Array} bytes
|
|
1044
|
+
* @returns {string}
|
|
1045
|
+
*/
|
|
1046
|
+
export function encode_hex(bytes) {
|
|
1047
|
+
let deferred2_0;
|
|
1048
|
+
let deferred2_1;
|
|
1049
|
+
try {
|
|
1050
|
+
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
1051
|
+
const ptr0 = passArray8ToWasm0(bytes, wasm.__wbindgen_malloc);
|
|
1052
|
+
const len0 = WASM_VECTOR_LEN;
|
|
1053
|
+
wasm.encode_hex(retptr, ptr0, len0);
|
|
1054
|
+
var r0 = getInt32Memory0()[retptr / 4 + 0];
|
|
1055
|
+
var r1 = getInt32Memory0()[retptr / 4 + 1];
|
|
1056
|
+
deferred2_0 = r0;
|
|
1057
|
+
deferred2_1 = r1;
|
|
1058
|
+
return getStringFromWasm0(r0, r1);
|
|
1059
|
+
} finally {
|
|
1060
|
+
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
1061
|
+
wasm.__wbindgen_free(deferred2_0, deferred2_1, 1);
|
|
1062
|
+
}
|
|
1063
|
+
}
|
|
1064
|
+
|
|
1065
|
+
/**
|
|
1066
|
+
* @param {Uint8Array} bytes
|
|
1067
|
+
* @returns {string}
|
|
1068
|
+
*/
|
|
1069
|
+
export function encode_base64(bytes) {
|
|
1070
|
+
let deferred2_0;
|
|
1071
|
+
let deferred2_1;
|
|
1072
|
+
try {
|
|
1073
|
+
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
1074
|
+
const ptr0 = passArray8ToWasm0(bytes, wasm.__wbindgen_malloc);
|
|
1075
|
+
const len0 = WASM_VECTOR_LEN;
|
|
1076
|
+
wasm.encode_base64(retptr, ptr0, len0);
|
|
1077
|
+
var r0 = getInt32Memory0()[retptr / 4 + 0];
|
|
1078
|
+
var r1 = getInt32Memory0()[retptr / 4 + 1];
|
|
1079
|
+
deferred2_0 = r0;
|
|
1080
|
+
deferred2_1 = r1;
|
|
1081
|
+
return getStringFromWasm0(r0, r1);
|
|
1082
|
+
} finally {
|
|
1083
|
+
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
1084
|
+
wasm.__wbindgen_free(deferred2_0, deferred2_1, 1);
|
|
1085
|
+
}
|
|
1086
|
+
}
|
|
1087
|
+
|
|
1088
|
+
function getArrayU8FromWasm0(ptr, len) {
|
|
1089
|
+
ptr = ptr >>> 0;
|
|
1090
|
+
return getUint8Memory0().subarray(ptr / 1, ptr / 1 + len);
|
|
1091
|
+
}
|
|
1092
|
+
/**
|
|
1093
|
+
* @param {string} string
|
|
1094
|
+
* @returns {Uint8Array}
|
|
1095
|
+
*/
|
|
1096
|
+
export function decode_hex(string) {
|
|
1097
|
+
try {
|
|
1098
|
+
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
1099
|
+
const ptr0 = passStringToWasm0(string, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
1100
|
+
const len0 = WASM_VECTOR_LEN;
|
|
1101
|
+
wasm.decode_hex(retptr, ptr0, len0);
|
|
1102
|
+
var r0 = getInt32Memory0()[retptr / 4 + 0];
|
|
1103
|
+
var r1 = getInt32Memory0()[retptr / 4 + 1];
|
|
1104
|
+
var r2 = getInt32Memory0()[retptr / 4 + 2];
|
|
1105
|
+
var r3 = getInt32Memory0()[retptr / 4 + 3];
|
|
1106
|
+
if (r3) {
|
|
1107
|
+
throw takeObject(r2);
|
|
1108
|
+
}
|
|
1109
|
+
var v2 = getArrayU8FromWasm0(r0, r1).slice();
|
|
1110
|
+
wasm.__wbindgen_free(r0, r1 * 1);
|
|
1111
|
+
return v2;
|
|
1112
|
+
} finally {
|
|
1113
|
+
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
1114
|
+
}
|
|
1115
|
+
}
|
|
1116
|
+
|
|
1117
|
+
/**
|
|
1118
|
+
* @param {string} string
|
|
1119
|
+
* @returns {Uint8Array}
|
|
1120
|
+
*/
|
|
1121
|
+
export function decode_base64(string) {
|
|
1122
|
+
try {
|
|
1123
|
+
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
1124
|
+
const ptr0 = passStringToWasm0(string, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
1125
|
+
const len0 = WASM_VECTOR_LEN;
|
|
1126
|
+
wasm.decode_base64(retptr, ptr0, len0);
|
|
1127
|
+
var r0 = getInt32Memory0()[retptr / 4 + 0];
|
|
1128
|
+
var r1 = getInt32Memory0()[retptr / 4 + 1];
|
|
1129
|
+
var r2 = getInt32Memory0()[retptr / 4 + 2];
|
|
1130
|
+
var r3 = getInt32Memory0()[retptr / 4 + 3];
|
|
1131
|
+
if (r3) {
|
|
1132
|
+
throw takeObject(r2);
|
|
1133
|
+
}
|
|
1134
|
+
var v2 = getArrayU8FromWasm0(r0, r1).slice();
|
|
1135
|
+
wasm.__wbindgen_free(r0, r1 * 1);
|
|
1136
|
+
return v2;
|
|
1137
|
+
} finally {
|
|
1138
|
+
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
1139
|
+
}
|
|
1140
|
+
}
|
|
1141
|
+
|
|
1142
|
+
let cachedUint32Memory0 = null;
|
|
1143
|
+
|
|
1144
|
+
function getUint32Memory0() {
|
|
1145
|
+
if (cachedUint32Memory0 === null || cachedUint32Memory0.byteLength === 0) {
|
|
1146
|
+
cachedUint32Memory0 = new Uint32Array(wasm.memory.buffer);
|
|
1147
|
+
}
|
|
1148
|
+
return cachedUint32Memory0;
|
|
1149
|
+
}
|
|
1150
|
+
|
|
1151
|
+
function getArrayJsValueFromWasm0(ptr, len) {
|
|
1152
|
+
ptr = ptr >>> 0;
|
|
1153
|
+
const mem = getUint32Memory0();
|
|
1154
|
+
const slice = mem.subarray(ptr / 4, ptr / 4 + len);
|
|
1155
|
+
const result = [];
|
|
1156
|
+
for (let i = 0; i < slice.length; i++) {
|
|
1157
|
+
result.push(takeObject(slice[i]));
|
|
1158
|
+
}
|
|
1159
|
+
return result;
|
|
1160
|
+
}
|
|
1161
|
+
|
|
1162
|
+
function handleError(f, args) {
|
|
1163
|
+
try {
|
|
1164
|
+
return f.apply(this, args);
|
|
1165
|
+
} catch (e) {
|
|
1166
|
+
wasm.__wbindgen_exn_store(addHeapObject(e));
|
|
1167
|
+
}
|
|
1168
|
+
}
|
|
1169
|
+
function __wbg_adapter_247(arg0, arg1, arg2, arg3) {
|
|
1170
|
+
wasm.wasm_bindgen__convert__closures__invoke2_mut__h9582f37ec0b72c47(arg0, arg1, addHeapObject(arg2), addHeapObject(arg3));
|
|
1171
|
+
}
|
|
1172
|
+
|
|
1173
|
+
export function __wbindgen_object_drop_ref(arg0) {
|
|
1174
|
+
takeObject(arg0);
|
|
1175
|
+
};
|
|
1176
|
+
|
|
1177
|
+
export function __wbindgen_boolean_get(arg0) {
|
|
1178
|
+
const v = getObject(arg0);
|
|
1179
|
+
const ret = typeof(v) === 'boolean' ? (v ? 1 : 0) : 2;
|
|
1180
|
+
return ret;
|
|
1181
|
+
};
|
|
1182
|
+
|
|
1183
|
+
export function __wbindgen_string_get(arg0, arg1) {
|
|
1184
|
+
const obj = getObject(arg1);
|
|
1185
|
+
const ret = typeof(obj) === 'string' ? obj : undefined;
|
|
1186
|
+
var ptr1 = isLikeNone(ret) ? 0 : passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
1187
|
+
var len1 = WASM_VECTOR_LEN;
|
|
1188
|
+
getInt32Memory0()[arg0 / 4 + 1] = len1;
|
|
1189
|
+
getInt32Memory0()[arg0 / 4 + 0] = ptr1;
|
|
1190
|
+
};
|
|
1191
|
+
|
|
1192
|
+
export function __wbindgen_is_string(arg0) {
|
|
1193
|
+
const ret = typeof(getObject(arg0)) === 'string';
|
|
1194
|
+
return ret;
|
|
1195
|
+
};
|
|
1196
|
+
|
|
1197
|
+
export function __wbindgen_is_object(arg0) {
|
|
1198
|
+
const val = getObject(arg0);
|
|
1199
|
+
const ret = typeof(val) === 'object' && val !== null;
|
|
1200
|
+
return ret;
|
|
1201
|
+
};
|
|
1202
|
+
|
|
1203
|
+
export function __wbindgen_is_undefined(arg0) {
|
|
1204
|
+
const ret = getObject(arg0) === undefined;
|
|
1205
|
+
return ret;
|
|
1206
|
+
};
|
|
1207
|
+
|
|
1208
|
+
export function __wbindgen_in(arg0, arg1) {
|
|
1209
|
+
const ret = getObject(arg0) in getObject(arg1);
|
|
1210
|
+
return ret;
|
|
1211
|
+
};
|
|
1212
|
+
|
|
1213
|
+
export function __wbindgen_is_bigint(arg0) {
|
|
1214
|
+
const ret = typeof(getObject(arg0)) === 'bigint';
|
|
1215
|
+
return ret;
|
|
1216
|
+
};
|
|
1217
|
+
|
|
1218
|
+
export function __wbindgen_bigint_from_i64(arg0) {
|
|
1219
|
+
const ret = arg0;
|
|
1220
|
+
return addHeapObject(ret);
|
|
1221
|
+
};
|
|
1222
|
+
|
|
1223
|
+
export function __wbindgen_jsval_eq(arg0, arg1) {
|
|
1224
|
+
const ret = getObject(arg0) === getObject(arg1);
|
|
1225
|
+
return ret;
|
|
1226
|
+
};
|
|
1227
|
+
|
|
1228
|
+
export function __wbindgen_bigint_from_u64(arg0) {
|
|
1229
|
+
const ret = BigInt.asUintN(64, arg0);
|
|
1230
|
+
return addHeapObject(ret);
|
|
1231
|
+
};
|
|
1232
|
+
|
|
1233
|
+
export function __wbindgen_number_get(arg0, arg1) {
|
|
1234
|
+
const obj = getObject(arg1);
|
|
1235
|
+
const ret = typeof(obj) === 'number' ? obj : undefined;
|
|
1236
|
+
getFloat64Memory0()[arg0 / 8 + 1] = isLikeNone(ret) ? 0 : ret;
|
|
1237
|
+
getInt32Memory0()[arg0 / 4 + 0] = !isLikeNone(ret);
|
|
1238
|
+
};
|
|
1239
|
+
|
|
1240
|
+
export function __wbindgen_cb_drop(arg0) {
|
|
1241
|
+
const obj = takeObject(arg0).original;
|
|
1242
|
+
if (obj.cnt-- == 1) {
|
|
1243
|
+
obj.a = 0;
|
|
1244
|
+
return true;
|
|
1245
|
+
}
|
|
1246
|
+
const ret = false;
|
|
1247
|
+
return ret;
|
|
1248
|
+
};
|
|
1249
|
+
|
|
1250
|
+
export function __wbindgen_string_new(arg0, arg1) {
|
|
1251
|
+
const ret = getStringFromWasm0(arg0, arg1);
|
|
1252
|
+
return addHeapObject(ret);
|
|
1253
|
+
};
|
|
1254
|
+
|
|
1255
|
+
export function __wbindgen_object_clone_ref(arg0) {
|
|
1256
|
+
const ret = getObject(arg0);
|
|
1257
|
+
return addHeapObject(ret);
|
|
1258
|
+
};
|
|
1259
|
+
|
|
1260
|
+
export function __wbindgen_number_new(arg0) {
|
|
1261
|
+
const ret = arg0;
|
|
1262
|
+
return addHeapObject(ret);
|
|
1263
|
+
};
|
|
1264
|
+
|
|
1265
|
+
export function __wbindgen_error_new(arg0, arg1) {
|
|
1266
|
+
const ret = new Error(getStringFromWasm0(arg0, arg1));
|
|
1267
|
+
return addHeapObject(ret);
|
|
1268
|
+
};
|
|
1269
|
+
|
|
1270
|
+
export function __wbg_new_abda76e883ba8a5f() {
|
|
1271
|
+
const ret = new Error();
|
|
1272
|
+
return addHeapObject(ret);
|
|
1273
|
+
};
|
|
1274
|
+
|
|
1275
|
+
export function __wbg_stack_658279fe44541cf6(arg0, arg1) {
|
|
1276
|
+
const ret = getObject(arg1).stack;
|
|
1277
|
+
const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
1278
|
+
const len1 = WASM_VECTOR_LEN;
|
|
1279
|
+
getInt32Memory0()[arg0 / 4 + 1] = len1;
|
|
1280
|
+
getInt32Memory0()[arg0 / 4 + 0] = ptr1;
|
|
1281
|
+
};
|
|
1282
|
+
|
|
1283
|
+
export function __wbg_error_f851667af71bcfc6(arg0, arg1) {
|
|
1284
|
+
let deferred0_0;
|
|
1285
|
+
let deferred0_1;
|
|
1286
|
+
try {
|
|
1287
|
+
deferred0_0 = arg0;
|
|
1288
|
+
deferred0_1 = arg1;
|
|
1289
|
+
console.error(getStringFromWasm0(arg0, arg1));
|
|
1290
|
+
} finally {
|
|
1291
|
+
wasm.__wbindgen_free(deferred0_0, deferred0_1, 1);
|
|
1292
|
+
}
|
|
1293
|
+
};
|
|
1294
|
+
|
|
1295
|
+
export function __wbindgen_jsval_loose_eq(arg0, arg1) {
|
|
1296
|
+
const ret = getObject(arg0) == getObject(arg1);
|
|
1297
|
+
return ret;
|
|
1298
|
+
};
|
|
1299
|
+
|
|
1300
|
+
export function __wbg_String_88810dfeb4021902(arg0, arg1) {
|
|
1301
|
+
const ret = String(getObject(arg1));
|
|
1302
|
+
const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
1303
|
+
const len1 = WASM_VECTOR_LEN;
|
|
1304
|
+
getInt32Memory0()[arg0 / 4 + 1] = len1;
|
|
1305
|
+
getInt32Memory0()[arg0 / 4 + 0] = ptr1;
|
|
1306
|
+
};
|
|
1307
|
+
|
|
1308
|
+
export function __wbg_getwithrefkey_5e6d9547403deab8(arg0, arg1) {
|
|
1309
|
+
const ret = getObject(arg0)[getObject(arg1)];
|
|
1310
|
+
return addHeapObject(ret);
|
|
1311
|
+
};
|
|
1312
|
+
|
|
1313
|
+
export function __wbg_debug_783a3d4910bc24c7(arg0, arg1) {
|
|
1314
|
+
var v0 = getArrayJsValueFromWasm0(arg0, arg1).slice();
|
|
1315
|
+
wasm.__wbindgen_free(arg0, arg1 * 4);
|
|
1316
|
+
console.debug(...v0);
|
|
1317
|
+
};
|
|
1318
|
+
|
|
1319
|
+
export function __wbg_error_71d6845bf00a930f(arg0, arg1) {
|
|
1320
|
+
var v0 = getArrayJsValueFromWasm0(arg0, arg1).slice();
|
|
1321
|
+
wasm.__wbindgen_free(arg0, arg1 * 4);
|
|
1322
|
+
console.error(...v0);
|
|
1323
|
+
};
|
|
1324
|
+
|
|
1325
|
+
export function __wbg_info_0d469cecacab90cb(arg0, arg1) {
|
|
1326
|
+
var v0 = getArrayJsValueFromWasm0(arg0, arg1).slice();
|
|
1327
|
+
wasm.__wbindgen_free(arg0, arg1 * 4);
|
|
1328
|
+
console.info(...v0);
|
|
1329
|
+
};
|
|
1330
|
+
|
|
1331
|
+
export function __wbg_trace_fe50dc146726736b(arg0, arg1) {
|
|
1332
|
+
var v0 = getArrayJsValueFromWasm0(arg0, arg1).slice();
|
|
1333
|
+
wasm.__wbindgen_free(arg0, arg1 * 4);
|
|
1334
|
+
console.trace(...v0);
|
|
1335
|
+
};
|
|
1336
|
+
|
|
1337
|
+
export function __wbg_fetch_57429b87be3dcc33(arg0) {
|
|
1338
|
+
const ret = fetch(getObject(arg0));
|
|
1339
|
+
return addHeapObject(ret);
|
|
1340
|
+
};
|
|
1341
|
+
|
|
1342
|
+
export function __wbg_instanceof_Window_9029196b662bc42a(arg0) {
|
|
1343
|
+
let result;
|
|
1344
|
+
try {
|
|
1345
|
+
result = getObject(arg0) instanceof Window;
|
|
1346
|
+
} catch {
|
|
1347
|
+
result = false;
|
|
1348
|
+
}
|
|
1349
|
+
const ret = result;
|
|
1350
|
+
return ret;
|
|
1351
|
+
};
|
|
1352
|
+
|
|
1353
|
+
export function __wbg_fetch_336b6f0cb426b46e(arg0, arg1) {
|
|
1354
|
+
const ret = getObject(arg0).fetch(getObject(arg1));
|
|
1355
|
+
return addHeapObject(ret);
|
|
1356
|
+
};
|
|
1357
|
+
|
|
1358
|
+
export function __wbg_setTimeout_eb1a0d116c26d9f6() { return handleError(function (arg0, arg1, arg2) {
|
|
1359
|
+
const ret = getObject(arg0).setTimeout(getObject(arg1), arg2);
|
|
1360
|
+
return ret;
|
|
1361
|
+
}, arguments) };
|
|
1362
|
+
|
|
1363
|
+
export function __wbg_instanceof_WorkerGlobalScope_d9d741da0fb130ce(arg0) {
|
|
1364
|
+
let result;
|
|
1365
|
+
try {
|
|
1366
|
+
result = getObject(arg0) instanceof WorkerGlobalScope;
|
|
1367
|
+
} catch {
|
|
1368
|
+
result = false;
|
|
1369
|
+
}
|
|
1370
|
+
const ret = result;
|
|
1371
|
+
return ret;
|
|
1372
|
+
};
|
|
1373
|
+
|
|
1374
|
+
export function __wbg_fetch_8eaf01857a5bb21f(arg0, arg1) {
|
|
1375
|
+
const ret = getObject(arg0).fetch(getObject(arg1));
|
|
1376
|
+
return addHeapObject(ret);
|
|
1377
|
+
};
|
|
1378
|
+
|
|
1379
|
+
export function __wbg_instanceof_Response_fc4327dbfcdf5ced(arg0) {
|
|
1380
|
+
let result;
|
|
1381
|
+
try {
|
|
1382
|
+
result = getObject(arg0) instanceof Response;
|
|
1383
|
+
} catch {
|
|
1384
|
+
result = false;
|
|
1385
|
+
}
|
|
1386
|
+
const ret = result;
|
|
1387
|
+
return ret;
|
|
1388
|
+
};
|
|
1389
|
+
|
|
1390
|
+
export function __wbg_url_8503de97f69da463(arg0, arg1) {
|
|
1391
|
+
const ret = getObject(arg1).url;
|
|
1392
|
+
const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
1393
|
+
const len1 = WASM_VECTOR_LEN;
|
|
1394
|
+
getInt32Memory0()[arg0 / 4 + 1] = len1;
|
|
1395
|
+
getInt32Memory0()[arg0 / 4 + 0] = ptr1;
|
|
1396
|
+
};
|
|
1397
|
+
|
|
1398
|
+
export function __wbg_status_ac85a3142a84caa2(arg0) {
|
|
1399
|
+
const ret = getObject(arg0).status;
|
|
1400
|
+
return ret;
|
|
1401
|
+
};
|
|
1402
|
+
|
|
1403
|
+
export function __wbg_headers_b70de86b8e989bc0(arg0) {
|
|
1404
|
+
const ret = getObject(arg0).headers;
|
|
1405
|
+
return addHeapObject(ret);
|
|
1406
|
+
};
|
|
1407
|
+
|
|
1408
|
+
export function __wbg_arrayBuffer_288fb3538806e85c() { return handleError(function (arg0) {
|
|
1409
|
+
const ret = getObject(arg0).arrayBuffer();
|
|
1410
|
+
return addHeapObject(ret);
|
|
1411
|
+
}, arguments) };
|
|
1412
|
+
|
|
1413
|
+
export function __wbg_text_a667ac1770538491() { return handleError(function (arg0) {
|
|
1414
|
+
const ret = getObject(arg0).text();
|
|
1415
|
+
return addHeapObject(ret);
|
|
1416
|
+
}, arguments) };
|
|
1417
|
+
|
|
1418
|
+
export function __wbg_search_2ff3bb9114e0ca34(arg0, arg1) {
|
|
1419
|
+
const ret = getObject(arg1).search;
|
|
1420
|
+
const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
1421
|
+
const len1 = WASM_VECTOR_LEN;
|
|
1422
|
+
getInt32Memory0()[arg0 / 4 + 1] = len1;
|
|
1423
|
+
getInt32Memory0()[arg0 / 4 + 0] = ptr1;
|
|
1424
|
+
};
|
|
1425
|
+
|
|
1426
|
+
export function __wbg_setsearch_16b87f04ea0e6b80(arg0, arg1, arg2) {
|
|
1427
|
+
getObject(arg0).search = getStringFromWasm0(arg1, arg2);
|
|
1428
|
+
};
|
|
1429
|
+
|
|
1430
|
+
export function __wbg_new_a76f6bcb38f791ea() { return handleError(function (arg0, arg1) {
|
|
1431
|
+
const ret = new URL(getStringFromWasm0(arg0, arg1));
|
|
1432
|
+
return addHeapObject(ret);
|
|
1433
|
+
}, arguments) };
|
|
1434
|
+
|
|
1435
|
+
export function __wbg_new_2a98b9c4a51bdc04() { return handleError(function () {
|
|
1436
|
+
const ret = new URLSearchParams();
|
|
1437
|
+
return addHeapObject(ret);
|
|
1438
|
+
}, arguments) };
|
|
1439
|
+
|
|
1440
|
+
export function __wbg_new_1eead62f64ca15ce() { return handleError(function () {
|
|
1441
|
+
const ret = new Headers();
|
|
1442
|
+
return addHeapObject(ret);
|
|
1443
|
+
}, arguments) };
|
|
1444
|
+
|
|
1445
|
+
export function __wbg_append_fda9e3432e3e88da() { return handleError(function (arg0, arg1, arg2, arg3, arg4) {
|
|
1446
|
+
getObject(arg0).append(getStringFromWasm0(arg1, arg2), getStringFromWasm0(arg3, arg4));
|
|
1447
|
+
}, arguments) };
|
|
1448
|
+
|
|
1449
|
+
export function __wbg_set_b34caba58723c454() { return handleError(function (arg0, arg1, arg2, arg3, arg4) {
|
|
1450
|
+
getObject(arg0).set(getStringFromWasm0(arg1, arg2), getStringFromWasm0(arg3, arg4));
|
|
1451
|
+
}, arguments) };
|
|
1452
|
+
|
|
1453
|
+
export function __wbg_signal_4bd18fb489af2d4c(arg0) {
|
|
1454
|
+
const ret = getObject(arg0).signal;
|
|
1455
|
+
return addHeapObject(ret);
|
|
1456
|
+
};
|
|
1457
|
+
|
|
1458
|
+
export function __wbg_new_55c9955722952374() { return handleError(function () {
|
|
1459
|
+
const ret = new AbortController();
|
|
1460
|
+
return addHeapObject(ret);
|
|
1461
|
+
}, arguments) };
|
|
1462
|
+
|
|
1463
|
+
export function __wbg_abort_654b796176d117aa(arg0) {
|
|
1464
|
+
getObject(arg0).abort();
|
|
1465
|
+
};
|
|
1466
|
+
|
|
1467
|
+
export function __wbg_url_fda63503ced387ff(arg0, arg1) {
|
|
1468
|
+
const ret = getObject(arg1).url;
|
|
1469
|
+
const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
1470
|
+
const len1 = WASM_VECTOR_LEN;
|
|
1471
|
+
getInt32Memory0()[arg0 / 4 + 1] = len1;
|
|
1472
|
+
getInt32Memory0()[arg0 / 4 + 0] = ptr1;
|
|
1473
|
+
};
|
|
1474
|
+
|
|
1475
|
+
export function __wbg_newwithstr_3d9bc779603a93c7() { return handleError(function (arg0, arg1) {
|
|
1476
|
+
const ret = new Request(getStringFromWasm0(arg0, arg1));
|
|
1477
|
+
return addHeapObject(ret);
|
|
1478
|
+
}, arguments) };
|
|
1479
|
+
|
|
1480
|
+
export function __wbg_newwithstrandinit_cad5cd6038c7ff5d() { return handleError(function (arg0, arg1, arg2) {
|
|
1481
|
+
const ret = new Request(getStringFromWasm0(arg0, arg1), getObject(arg2));
|
|
1482
|
+
return addHeapObject(ret);
|
|
1483
|
+
}, arguments) };
|
|
1484
|
+
|
|
1485
|
+
export function __wbg_crypto_c48a774b022d20ac(arg0) {
|
|
1486
|
+
const ret = getObject(arg0).crypto;
|
|
1487
|
+
return addHeapObject(ret);
|
|
1488
|
+
};
|
|
1489
|
+
|
|
1490
|
+
export function __wbg_process_298734cf255a885d(arg0) {
|
|
1491
|
+
const ret = getObject(arg0).process;
|
|
1492
|
+
return addHeapObject(ret);
|
|
1493
|
+
};
|
|
1494
|
+
|
|
1495
|
+
export function __wbg_versions_e2e78e134e3e5d01(arg0) {
|
|
1496
|
+
const ret = getObject(arg0).versions;
|
|
1497
|
+
return addHeapObject(ret);
|
|
1498
|
+
};
|
|
1499
|
+
|
|
1500
|
+
export function __wbg_node_1cd7a5d853dbea79(arg0) {
|
|
1501
|
+
const ret = getObject(arg0).node;
|
|
1502
|
+
return addHeapObject(ret);
|
|
1503
|
+
};
|
|
1504
|
+
|
|
1505
|
+
export function __wbg_msCrypto_bcb970640f50a1e8(arg0) {
|
|
1506
|
+
const ret = getObject(arg0).msCrypto;
|
|
1507
|
+
return addHeapObject(ret);
|
|
1508
|
+
};
|
|
1509
|
+
|
|
1510
|
+
export function __wbg_require_8f08ceecec0f4fee() { return handleError(function () {
|
|
1511
|
+
const ret = module.require;
|
|
1512
|
+
return addHeapObject(ret);
|
|
1513
|
+
}, arguments) };
|
|
1514
|
+
|
|
1515
|
+
export function __wbindgen_is_function(arg0) {
|
|
1516
|
+
const ret = typeof(getObject(arg0)) === 'function';
|
|
1517
|
+
return ret;
|
|
1518
|
+
};
|
|
1519
|
+
|
|
1520
|
+
export function __wbg_getRandomValues_37fa2ca9e4e07fab() { return handleError(function (arg0, arg1) {
|
|
1521
|
+
getObject(arg0).getRandomValues(getObject(arg1));
|
|
1522
|
+
}, arguments) };
|
|
1523
|
+
|
|
1524
|
+
export function __wbg_randomFillSync_dc1e9a60c158336d() { return handleError(function (arg0, arg1) {
|
|
1525
|
+
getObject(arg0).randomFillSync(takeObject(arg1));
|
|
1526
|
+
}, arguments) };
|
|
1527
|
+
|
|
1528
|
+
export function __wbg_get_44be0491f933a435(arg0, arg1) {
|
|
1529
|
+
const ret = getObject(arg0)[arg1 >>> 0];
|
|
1530
|
+
return addHeapObject(ret);
|
|
1531
|
+
};
|
|
1532
|
+
|
|
1533
|
+
export function __wbg_length_fff51ee6522a1a18(arg0) {
|
|
1534
|
+
const ret = getObject(arg0).length;
|
|
1535
|
+
return ret;
|
|
1536
|
+
};
|
|
1537
|
+
|
|
1538
|
+
export function __wbg_new_898a68150f225f2e() {
|
|
1539
|
+
const ret = new Array();
|
|
1540
|
+
return addHeapObject(ret);
|
|
1541
|
+
};
|
|
1542
|
+
|
|
1543
|
+
export function __wbg_newnoargs_581967eacc0e2604(arg0, arg1) {
|
|
1544
|
+
const ret = new Function(getStringFromWasm0(arg0, arg1));
|
|
1545
|
+
return addHeapObject(ret);
|
|
1546
|
+
};
|
|
1547
|
+
|
|
1548
|
+
export function __wbg_next_526fc47e980da008(arg0) {
|
|
1549
|
+
const ret = getObject(arg0).next;
|
|
1550
|
+
return addHeapObject(ret);
|
|
1551
|
+
};
|
|
1552
|
+
|
|
1553
|
+
export function __wbg_next_ddb3312ca1c4e32a() { return handleError(function (arg0) {
|
|
1554
|
+
const ret = getObject(arg0).next();
|
|
1555
|
+
return addHeapObject(ret);
|
|
1556
|
+
}, arguments) };
|
|
1557
|
+
|
|
1558
|
+
export function __wbg_done_5c1f01fb660d73b5(arg0) {
|
|
1559
|
+
const ret = getObject(arg0).done;
|
|
1560
|
+
return ret;
|
|
1561
|
+
};
|
|
1562
|
+
|
|
1563
|
+
export function __wbg_value_1695675138684bd5(arg0) {
|
|
1564
|
+
const ret = getObject(arg0).value;
|
|
1565
|
+
return addHeapObject(ret);
|
|
1566
|
+
};
|
|
1567
|
+
|
|
1568
|
+
export function __wbg_iterator_97f0c81209c6c35a() {
|
|
1569
|
+
const ret = Symbol.iterator;
|
|
1570
|
+
return addHeapObject(ret);
|
|
1571
|
+
};
|
|
1572
|
+
|
|
1573
|
+
export function __wbg_get_97b561fb56f034b5() { return handleError(function (arg0, arg1) {
|
|
1574
|
+
const ret = Reflect.get(getObject(arg0), getObject(arg1));
|
|
1575
|
+
return addHeapObject(ret);
|
|
1576
|
+
}, arguments) };
|
|
1577
|
+
|
|
1578
|
+
export function __wbg_call_cb65541d95d71282() { return handleError(function (arg0, arg1) {
|
|
1579
|
+
const ret = getObject(arg0).call(getObject(arg1));
|
|
1580
|
+
return addHeapObject(ret);
|
|
1581
|
+
}, arguments) };
|
|
1582
|
+
|
|
1583
|
+
export function __wbg_new_b51585de1b234aff() {
|
|
1584
|
+
const ret = new Object();
|
|
1585
|
+
return addHeapObject(ret);
|
|
1586
|
+
};
|
|
1587
|
+
|
|
1588
|
+
export function __wbg_self_1ff1d729e9aae938() { return handleError(function () {
|
|
1589
|
+
const ret = self.self;
|
|
1590
|
+
return addHeapObject(ret);
|
|
1591
|
+
}, arguments) };
|
|
1592
|
+
|
|
1593
|
+
export function __wbg_window_5f4faef6c12b79ec() { return handleError(function () {
|
|
1594
|
+
const ret = window.window;
|
|
1595
|
+
return addHeapObject(ret);
|
|
1596
|
+
}, arguments) };
|
|
1597
|
+
|
|
1598
|
+
export function __wbg_globalThis_1d39714405582d3c() { return handleError(function () {
|
|
1599
|
+
const ret = globalThis.globalThis;
|
|
1600
|
+
return addHeapObject(ret);
|
|
1601
|
+
}, arguments) };
|
|
1602
|
+
|
|
1603
|
+
export function __wbg_global_651f05c6a0944d1c() { return handleError(function () {
|
|
1604
|
+
const ret = global.global;
|
|
1605
|
+
return addHeapObject(ret);
|
|
1606
|
+
}, arguments) };
|
|
1607
|
+
|
|
1608
|
+
export function __wbg_isArray_4c24b343cb13cfb1(arg0) {
|
|
1609
|
+
const ret = Array.isArray(getObject(arg0));
|
|
1610
|
+
return ret;
|
|
1611
|
+
};
|
|
1612
|
+
|
|
1613
|
+
export function __wbg_push_ca1c26067ef907ac(arg0, arg1) {
|
|
1614
|
+
const ret = getObject(arg0).push(getObject(arg1));
|
|
1615
|
+
return ret;
|
|
1616
|
+
};
|
|
1617
|
+
|
|
1618
|
+
export function __wbg_instanceof_ArrayBuffer_39ac22089b74fddb(arg0) {
|
|
1619
|
+
let result;
|
|
1620
|
+
try {
|
|
1621
|
+
result = getObject(arg0) instanceof ArrayBuffer;
|
|
1622
|
+
} catch {
|
|
1623
|
+
result = false;
|
|
1624
|
+
}
|
|
1625
|
+
const ret = result;
|
|
1626
|
+
return ret;
|
|
1627
|
+
};
|
|
1628
|
+
|
|
1629
|
+
export function __wbg_instanceof_Error_ab19e20608ea43c7(arg0) {
|
|
1630
|
+
let result;
|
|
1631
|
+
try {
|
|
1632
|
+
result = getObject(arg0) instanceof Error;
|
|
1633
|
+
} catch {
|
|
1634
|
+
result = false;
|
|
1635
|
+
}
|
|
1636
|
+
const ret = result;
|
|
1637
|
+
return ret;
|
|
1638
|
+
};
|
|
1639
|
+
|
|
1640
|
+
export function __wbg_message_48bacc5ea57d74ee(arg0) {
|
|
1641
|
+
const ret = getObject(arg0).message;
|
|
1642
|
+
return addHeapObject(ret);
|
|
1643
|
+
};
|
|
1644
|
+
|
|
1645
|
+
export function __wbg_name_8f734cbbd6194153(arg0) {
|
|
1646
|
+
const ret = getObject(arg0).name;
|
|
1647
|
+
return addHeapObject(ret);
|
|
1648
|
+
};
|
|
1649
|
+
|
|
1650
|
+
export function __wbg_toString_1c056108b87ba68b(arg0) {
|
|
1651
|
+
const ret = getObject(arg0).toString();
|
|
1652
|
+
return addHeapObject(ret);
|
|
1653
|
+
};
|
|
1654
|
+
|
|
1655
|
+
export function __wbg_call_01734de55d61e11d() { return handleError(function (arg0, arg1, arg2) {
|
|
1656
|
+
const ret = getObject(arg0).call(getObject(arg1), getObject(arg2));
|
|
1657
|
+
return addHeapObject(ret);
|
|
1658
|
+
}, arguments) };
|
|
1659
|
+
|
|
1660
|
+
export function __wbg_isSafeInteger_bb8e18dd21c97288(arg0) {
|
|
1661
|
+
const ret = Number.isSafeInteger(getObject(arg0));
|
|
1662
|
+
return ret;
|
|
1663
|
+
};
|
|
1664
|
+
|
|
1665
|
+
export function __wbg_getTime_5e2054f832d82ec9(arg0) {
|
|
1666
|
+
const ret = getObject(arg0).getTime();
|
|
1667
|
+
return ret;
|
|
1668
|
+
};
|
|
1669
|
+
|
|
1670
|
+
export function __wbg_getTimezoneOffset_8aee3445f323973e(arg0) {
|
|
1671
|
+
const ret = getObject(arg0).getTimezoneOffset();
|
|
1672
|
+
return ret;
|
|
1673
|
+
};
|
|
1674
|
+
|
|
1675
|
+
export function __wbg_new0_c0be7df4b6bd481f() {
|
|
1676
|
+
const ret = new Date();
|
|
1677
|
+
return addHeapObject(ret);
|
|
1678
|
+
};
|
|
1679
|
+
|
|
1680
|
+
export function __wbg_now_9c5990bda04c7e53() {
|
|
1681
|
+
const ret = Date.now();
|
|
1682
|
+
return ret;
|
|
1683
|
+
};
|
|
1684
|
+
|
|
1685
|
+
export function __wbg_entries_e51f29c7bba0c054(arg0) {
|
|
1686
|
+
const ret = Object.entries(getObject(arg0));
|
|
1687
|
+
return addHeapObject(ret);
|
|
1688
|
+
};
|
|
1689
|
+
|
|
1690
|
+
export function __wbg_toString_a8e343996af880e9(arg0) {
|
|
1691
|
+
const ret = getObject(arg0).toString();
|
|
1692
|
+
return addHeapObject(ret);
|
|
1693
|
+
};
|
|
1694
|
+
|
|
1695
|
+
export function __wbg_new_43f1b47c28813cbd(arg0, arg1) {
|
|
1696
|
+
try {
|
|
1697
|
+
var state0 = {a: arg0, b: arg1};
|
|
1698
|
+
var cb0 = (arg0, arg1) => {
|
|
1699
|
+
const a = state0.a;
|
|
1700
|
+
state0.a = 0;
|
|
1701
|
+
try {
|
|
1702
|
+
return __wbg_adapter_247(a, state0.b, arg0, arg1);
|
|
1703
|
+
} finally {
|
|
1704
|
+
state0.a = a;
|
|
1705
|
+
}
|
|
1706
|
+
};
|
|
1707
|
+
const ret = new Promise(cb0);
|
|
1708
|
+
return addHeapObject(ret);
|
|
1709
|
+
} finally {
|
|
1710
|
+
state0.a = state0.b = 0;
|
|
1711
|
+
}
|
|
1712
|
+
};
|
|
1713
|
+
|
|
1714
|
+
export function __wbg_allSettled_e945c53ea7068386(arg0) {
|
|
1715
|
+
const ret = Promise.allSettled(getObject(arg0));
|
|
1716
|
+
return addHeapObject(ret);
|
|
1717
|
+
};
|
|
1718
|
+
|
|
1719
|
+
export function __wbg_any_a5faf414e37ed588(arg0) {
|
|
1720
|
+
const ret = Promise.any(getObject(arg0));
|
|
1721
|
+
return addHeapObject(ret);
|
|
1722
|
+
};
|
|
1723
|
+
|
|
1724
|
+
export function __wbg_resolve_53698b95aaf7fcf8(arg0) {
|
|
1725
|
+
const ret = Promise.resolve(getObject(arg0));
|
|
1726
|
+
return addHeapObject(ret);
|
|
1727
|
+
};
|
|
1728
|
+
|
|
1729
|
+
export function __wbg_then_f7e06ee3c11698eb(arg0, arg1) {
|
|
1730
|
+
const ret = getObject(arg0).then(getObject(arg1));
|
|
1731
|
+
return addHeapObject(ret);
|
|
1732
|
+
};
|
|
1733
|
+
|
|
1734
|
+
export function __wbg_then_b2267541e2a73865(arg0, arg1, arg2) {
|
|
1735
|
+
const ret = getObject(arg0).then(getObject(arg1), getObject(arg2));
|
|
1736
|
+
return addHeapObject(ret);
|
|
1737
|
+
};
|
|
1738
|
+
|
|
1739
|
+
export function __wbg_buffer_085ec1f694018c4f(arg0) {
|
|
1740
|
+
const ret = getObject(arg0).buffer;
|
|
1741
|
+
return addHeapObject(ret);
|
|
1742
|
+
};
|
|
1743
|
+
|
|
1744
|
+
export function __wbg_newwithbyteoffsetandlength_6da8e527659b86aa(arg0, arg1, arg2) {
|
|
1745
|
+
const ret = new Uint8Array(getObject(arg0), arg1 >>> 0, arg2 >>> 0);
|
|
1746
|
+
return addHeapObject(ret);
|
|
1747
|
+
};
|
|
1748
|
+
|
|
1749
|
+
export function __wbg_new_8125e318e6245eed(arg0) {
|
|
1750
|
+
const ret = new Uint8Array(getObject(arg0));
|
|
1751
|
+
return addHeapObject(ret);
|
|
1752
|
+
};
|
|
1753
|
+
|
|
1754
|
+
export function __wbg_set_5cf90238115182c3(arg0, arg1, arg2) {
|
|
1755
|
+
getObject(arg0).set(getObject(arg1), arg2 >>> 0);
|
|
1756
|
+
};
|
|
1757
|
+
|
|
1758
|
+
export function __wbg_length_72e2208bbc0efc61(arg0) {
|
|
1759
|
+
const ret = getObject(arg0).length;
|
|
1760
|
+
return ret;
|
|
1761
|
+
};
|
|
1762
|
+
|
|
1763
|
+
export function __wbg_instanceof_Uint8Array_d8d9cb2b8e8ac1d4(arg0) {
|
|
1764
|
+
let result;
|
|
1765
|
+
try {
|
|
1766
|
+
result = getObject(arg0) instanceof Uint8Array;
|
|
1767
|
+
} catch {
|
|
1768
|
+
result = false;
|
|
1769
|
+
}
|
|
1770
|
+
const ret = result;
|
|
1771
|
+
return ret;
|
|
1772
|
+
};
|
|
1773
|
+
|
|
1774
|
+
export function __wbg_newwithlength_e5d69174d6984cd7(arg0) {
|
|
1775
|
+
const ret = new Uint8Array(arg0 >>> 0);
|
|
1776
|
+
return addHeapObject(ret);
|
|
1777
|
+
};
|
|
1778
|
+
|
|
1779
|
+
export function __wbg_subarray_13db269f57aa838d(arg0, arg1, arg2) {
|
|
1780
|
+
const ret = getObject(arg0).subarray(arg1 >>> 0, arg2 >>> 0);
|
|
1781
|
+
return addHeapObject(ret);
|
|
1782
|
+
};
|
|
1783
|
+
|
|
1784
|
+
export function __wbg_stringify_e25465938f3f611f() { return handleError(function (arg0) {
|
|
1785
|
+
const ret = JSON.stringify(getObject(arg0));
|
|
1786
|
+
return addHeapObject(ret);
|
|
1787
|
+
}, arguments) };
|
|
1788
|
+
|
|
1789
|
+
export function __wbg_has_c5fcd020291e56b8() { return handleError(function (arg0, arg1) {
|
|
1790
|
+
const ret = Reflect.has(getObject(arg0), getObject(arg1));
|
|
1791
|
+
return ret;
|
|
1792
|
+
}, arguments) };
|
|
1793
|
+
|
|
1794
|
+
export function __wbg_set_092e06b0f9d71865() { return handleError(function (arg0, arg1, arg2) {
|
|
1795
|
+
const ret = Reflect.set(getObject(arg0), getObject(arg1), getObject(arg2));
|
|
1796
|
+
return ret;
|
|
1797
|
+
}, arguments) };
|
|
1798
|
+
|
|
1799
|
+
export function __wbindgen_bigint_get_as_i64(arg0, arg1) {
|
|
1800
|
+
const v = getObject(arg1);
|
|
1801
|
+
const ret = typeof(v) === 'bigint' ? v : undefined;
|
|
1802
|
+
getBigInt64Memory0()[arg0 / 8 + 1] = isLikeNone(ret) ? BigInt(0) : ret;
|
|
1803
|
+
getInt32Memory0()[arg0 / 4 + 0] = !isLikeNone(ret);
|
|
1804
|
+
};
|
|
1805
|
+
|
|
1806
|
+
export function __wbindgen_debug_string(arg0, arg1) {
|
|
1807
|
+
const ret = debugString(getObject(arg1));
|
|
1808
|
+
const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
1809
|
+
const len1 = WASM_VECTOR_LEN;
|
|
1810
|
+
getInt32Memory0()[arg0 / 4 + 1] = len1;
|
|
1811
|
+
getInt32Memory0()[arg0 / 4 + 0] = ptr1;
|
|
1812
|
+
};
|
|
1813
|
+
|
|
1814
|
+
export function __wbindgen_throw(arg0, arg1) {
|
|
1815
|
+
throw new Error(getStringFromWasm0(arg0, arg1));
|
|
1816
|
+
};
|
|
1817
|
+
|
|
1818
|
+
export function __wbindgen_memory() {
|
|
1819
|
+
const ret = wasm.memory;
|
|
1820
|
+
return addHeapObject(ret);
|
|
1821
|
+
};
|
|
1822
|
+
|
|
1823
|
+
export function __wbindgen_closure_wrapper14149(arg0, arg1, arg2) {
|
|
1824
|
+
const ret = makeMutClosure(arg0, arg1, 3268, __wbg_adapter_48);
|
|
1825
|
+
return addHeapObject(ret);
|
|
1826
|
+
};
|
|
1827
|
+
|