@ibearua/bitmask-core-dev 1.0.0-beta.17 → 1.0.0-beta.18
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.d.ts.map +1 -0
- package/bitmask_core.d.ts +152 -0
- package/bitmask_core.js +2436 -5
- package/bitmask_core_bg.js +3 -3
- package/bitmask_core_bg.wasm +0 -0
- package/bitmask_core_bg.wasm.d.ts +128 -0
- package/bp.d.ts.map +1 -0
- package/carbonado.d.ts.map +1 -0
- package/constants.d.ts.map +1 -0
- package/constants.js +14 -23
- package/index.d.ts.map +1 -0
- package/lightning.d.ts.map +1 -0
- package/nostr.d.ts.map +1 -0
- package/package.json +130 -33
- package/rgb.d.ts.map +1 -0
- package/wallet.d.ts.map +1 -0
package/bitmask_core.js
CHANGED
|
@@ -1,5 +1,2436 @@
|
|
|
1
|
-
import * as
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
1
|
+
import * as __wbg_star0 from 'env';
|
|
2
|
+
|
|
3
|
+
let wasm;
|
|
4
|
+
|
|
5
|
+
let WASM_VECTOR_LEN = 0;
|
|
6
|
+
|
|
7
|
+
let cachedUint8ArrayMemory0 = null;
|
|
8
|
+
|
|
9
|
+
function getUint8ArrayMemory0() {
|
|
10
|
+
if (cachedUint8ArrayMemory0 === null || cachedUint8ArrayMemory0.byteLength === 0) {
|
|
11
|
+
cachedUint8ArrayMemory0 = new Uint8Array(wasm.memory.buffer);
|
|
12
|
+
}
|
|
13
|
+
return cachedUint8ArrayMemory0;
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
const cachedTextEncoder = (typeof TextEncoder !== 'undefined' ? new TextEncoder('utf-8') : { encode: () => { throw Error('TextEncoder not available') } } );
|
|
17
|
+
|
|
18
|
+
const encodeString = (typeof cachedTextEncoder.encodeInto === 'function'
|
|
19
|
+
? function (arg, view) {
|
|
20
|
+
return cachedTextEncoder.encodeInto(arg, view);
|
|
21
|
+
}
|
|
22
|
+
: function (arg, view) {
|
|
23
|
+
const buf = cachedTextEncoder.encode(arg);
|
|
24
|
+
view.set(buf);
|
|
25
|
+
return {
|
|
26
|
+
read: arg.length,
|
|
27
|
+
written: buf.length
|
|
28
|
+
};
|
|
29
|
+
});
|
|
30
|
+
|
|
31
|
+
function passStringToWasm0(arg, malloc, realloc) {
|
|
32
|
+
|
|
33
|
+
if (realloc === undefined) {
|
|
34
|
+
const buf = cachedTextEncoder.encode(arg);
|
|
35
|
+
const ptr = malloc(buf.length, 1) >>> 0;
|
|
36
|
+
getUint8ArrayMemory0().subarray(ptr, ptr + buf.length).set(buf);
|
|
37
|
+
WASM_VECTOR_LEN = buf.length;
|
|
38
|
+
return ptr;
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
let len = arg.length;
|
|
42
|
+
let ptr = malloc(len, 1) >>> 0;
|
|
43
|
+
|
|
44
|
+
const mem = getUint8ArrayMemory0();
|
|
45
|
+
|
|
46
|
+
let offset = 0;
|
|
47
|
+
|
|
48
|
+
for (; offset < len; offset++) {
|
|
49
|
+
const code = arg.charCodeAt(offset);
|
|
50
|
+
if (code > 0x7F) break;
|
|
51
|
+
mem[ptr + offset] = code;
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
if (offset !== len) {
|
|
55
|
+
if (offset !== 0) {
|
|
56
|
+
arg = arg.slice(offset);
|
|
57
|
+
}
|
|
58
|
+
ptr = realloc(ptr, len, len = offset + arg.length * 3, 1) >>> 0;
|
|
59
|
+
const view = getUint8ArrayMemory0().subarray(ptr + offset, ptr + len);
|
|
60
|
+
const ret = encodeString(arg, view);
|
|
61
|
+
|
|
62
|
+
offset += ret.written;
|
|
63
|
+
ptr = realloc(ptr, len, offset, 1) >>> 0;
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
WASM_VECTOR_LEN = offset;
|
|
67
|
+
return ptr;
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
let cachedDataViewMemory0 = null;
|
|
71
|
+
|
|
72
|
+
function getDataViewMemory0() {
|
|
73
|
+
if (cachedDataViewMemory0 === null || cachedDataViewMemory0.buffer.detached === true || (cachedDataViewMemory0.buffer.detached === undefined && cachedDataViewMemory0.buffer !== wasm.memory.buffer)) {
|
|
74
|
+
cachedDataViewMemory0 = new DataView(wasm.memory.buffer);
|
|
75
|
+
}
|
|
76
|
+
return cachedDataViewMemory0;
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
const cachedTextDecoder = (typeof TextDecoder !== 'undefined' ? new TextDecoder('utf-8', { ignoreBOM: true, fatal: true }) : { decode: () => { throw Error('TextDecoder not available') } } );
|
|
80
|
+
|
|
81
|
+
if (typeof TextDecoder !== 'undefined') { cachedTextDecoder.decode(); };
|
|
82
|
+
|
|
83
|
+
function getStringFromWasm0(ptr, len) {
|
|
84
|
+
ptr = ptr >>> 0;
|
|
85
|
+
return cachedTextDecoder.decode(getUint8ArrayMemory0().subarray(ptr, ptr + len));
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
function addToExternrefTable0(obj) {
|
|
89
|
+
const idx = wasm.__externref_table_alloc();
|
|
90
|
+
wasm.__wbindgen_export_4.set(idx, obj);
|
|
91
|
+
return idx;
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
function handleError(f, args) {
|
|
95
|
+
try {
|
|
96
|
+
return f.apply(this, args);
|
|
97
|
+
} catch (e) {
|
|
98
|
+
const idx = addToExternrefTable0(e);
|
|
99
|
+
wasm.__wbindgen_exn_store(idx);
|
|
100
|
+
}
|
|
101
|
+
}
|
|
102
|
+
|
|
103
|
+
function getArrayJsValueFromWasm0(ptr, len) {
|
|
104
|
+
ptr = ptr >>> 0;
|
|
105
|
+
const mem = getDataViewMemory0();
|
|
106
|
+
const result = [];
|
|
107
|
+
for (let i = ptr; i < ptr + 4 * len; i += 4) {
|
|
108
|
+
result.push(wasm.__wbindgen_export_4.get(mem.getUint32(i, true)));
|
|
109
|
+
}
|
|
110
|
+
wasm.__externref_drop_slice(ptr, len);
|
|
111
|
+
return result;
|
|
112
|
+
}
|
|
113
|
+
|
|
114
|
+
function isLikeNone(x) {
|
|
115
|
+
return x === undefined || x === null;
|
|
116
|
+
}
|
|
117
|
+
|
|
118
|
+
function getArrayU8FromWasm0(ptr, len) {
|
|
119
|
+
ptr = ptr >>> 0;
|
|
120
|
+
return getUint8ArrayMemory0().subarray(ptr / 1, ptr / 1 + len);
|
|
121
|
+
}
|
|
122
|
+
|
|
123
|
+
const CLOSURE_DTORS = (typeof FinalizationRegistry === 'undefined')
|
|
124
|
+
? { register: () => {}, unregister: () => {} }
|
|
125
|
+
: new FinalizationRegistry(state => {
|
|
126
|
+
wasm.__wbindgen_export_7.get(state.dtor)(state.a, state.b)
|
|
127
|
+
});
|
|
128
|
+
|
|
129
|
+
function makeMutClosure(arg0, arg1, dtor, f) {
|
|
130
|
+
const state = { a: arg0, b: arg1, cnt: 1, dtor };
|
|
131
|
+
const real = (...args) => {
|
|
132
|
+
// First up with a closure we increment the internal reference
|
|
133
|
+
// count. This ensures that the Rust closure environment won't
|
|
134
|
+
// be deallocated while we're invoking it.
|
|
135
|
+
state.cnt++;
|
|
136
|
+
const a = state.a;
|
|
137
|
+
state.a = 0;
|
|
138
|
+
try {
|
|
139
|
+
return f(a, state.b, ...args);
|
|
140
|
+
} finally {
|
|
141
|
+
if (--state.cnt === 0) {
|
|
142
|
+
wasm.__wbindgen_export_7.get(state.dtor)(a, state.b);
|
|
143
|
+
CLOSURE_DTORS.unregister(state);
|
|
144
|
+
} else {
|
|
145
|
+
state.a = a;
|
|
146
|
+
}
|
|
147
|
+
}
|
|
148
|
+
};
|
|
149
|
+
real.original = state;
|
|
150
|
+
CLOSURE_DTORS.register(real, state, state);
|
|
151
|
+
return real;
|
|
152
|
+
}
|
|
153
|
+
|
|
154
|
+
function debugString(val) {
|
|
155
|
+
// primitive types
|
|
156
|
+
const type = typeof val;
|
|
157
|
+
if (type == 'number' || type == 'boolean' || val == null) {
|
|
158
|
+
return `${val}`;
|
|
159
|
+
}
|
|
160
|
+
if (type == 'string') {
|
|
161
|
+
return `"${val}"`;
|
|
162
|
+
}
|
|
163
|
+
if (type == 'symbol') {
|
|
164
|
+
const description = val.description;
|
|
165
|
+
if (description == null) {
|
|
166
|
+
return 'Symbol';
|
|
167
|
+
} else {
|
|
168
|
+
return `Symbol(${description})`;
|
|
169
|
+
}
|
|
170
|
+
}
|
|
171
|
+
if (type == 'function') {
|
|
172
|
+
const name = val.name;
|
|
173
|
+
if (typeof name == 'string' && name.length > 0) {
|
|
174
|
+
return `Function(${name})`;
|
|
175
|
+
} else {
|
|
176
|
+
return 'Function';
|
|
177
|
+
}
|
|
178
|
+
}
|
|
179
|
+
// objects
|
|
180
|
+
if (Array.isArray(val)) {
|
|
181
|
+
const length = val.length;
|
|
182
|
+
let debug = '[';
|
|
183
|
+
if (length > 0) {
|
|
184
|
+
debug += debugString(val[0]);
|
|
185
|
+
}
|
|
186
|
+
for(let i = 1; i < length; i++) {
|
|
187
|
+
debug += ', ' + debugString(val[i]);
|
|
188
|
+
}
|
|
189
|
+
debug += ']';
|
|
190
|
+
return debug;
|
|
191
|
+
}
|
|
192
|
+
// Test for built-in
|
|
193
|
+
const builtInMatches = /\[object ([^\]]+)\]/.exec(toString.call(val));
|
|
194
|
+
let className;
|
|
195
|
+
if (builtInMatches && builtInMatches.length > 1) {
|
|
196
|
+
className = builtInMatches[1];
|
|
197
|
+
} else {
|
|
198
|
+
// Failed to match the standard '[object ClassName]'
|
|
199
|
+
return toString.call(val);
|
|
200
|
+
}
|
|
201
|
+
if (className == 'Object') {
|
|
202
|
+
// we're a user defined class or Object
|
|
203
|
+
// JSON.stringify avoids problems with cycles, and is generally much
|
|
204
|
+
// easier than looping through ownProperties of `val`.
|
|
205
|
+
try {
|
|
206
|
+
return 'Object(' + JSON.stringify(val) + ')';
|
|
207
|
+
} catch (_) {
|
|
208
|
+
return 'Object';
|
|
209
|
+
}
|
|
210
|
+
}
|
|
211
|
+
// errors
|
|
212
|
+
if (val instanceof Error) {
|
|
213
|
+
return `${val.name}: ${val.message}\n${val.stack}`;
|
|
214
|
+
}
|
|
215
|
+
// TODO we could test for more things here, like `Set`s and `Map`s.
|
|
216
|
+
return className;
|
|
217
|
+
}
|
|
218
|
+
|
|
219
|
+
function passArray8ToWasm0(arg, malloc) {
|
|
220
|
+
const ptr = malloc(arg.length * 1, 1) >>> 0;
|
|
221
|
+
getUint8ArrayMemory0().set(arg, ptr / 1);
|
|
222
|
+
WASM_VECTOR_LEN = arg.length;
|
|
223
|
+
return ptr;
|
|
224
|
+
}
|
|
225
|
+
/**
|
|
226
|
+
* @param {string} secret_key
|
|
227
|
+
* @param {string} name
|
|
228
|
+
* @param {Uint8Array} data
|
|
229
|
+
* @param {boolean} force
|
|
230
|
+
* @param {Uint8Array | null} [metadata]
|
|
231
|
+
* @returns {Promise<any>}
|
|
232
|
+
*/
|
|
233
|
+
export function store(secret_key, name, data, force, metadata) {
|
|
234
|
+
const ptr0 = passStringToWasm0(secret_key, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
235
|
+
const len0 = WASM_VECTOR_LEN;
|
|
236
|
+
const ptr1 = passStringToWasm0(name, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
237
|
+
const len1 = WASM_VECTOR_LEN;
|
|
238
|
+
const ptr2 = passArray8ToWasm0(data, wasm.__wbindgen_malloc);
|
|
239
|
+
const len2 = WASM_VECTOR_LEN;
|
|
240
|
+
var ptr3 = isLikeNone(metadata) ? 0 : passArray8ToWasm0(metadata, wasm.__wbindgen_malloc);
|
|
241
|
+
var len3 = WASM_VECTOR_LEN;
|
|
242
|
+
const ret = wasm.store(ptr0, len0, ptr1, len1, ptr2, len2, force, ptr3, len3);
|
|
243
|
+
return ret;
|
|
244
|
+
}
|
|
245
|
+
|
|
246
|
+
/**
|
|
247
|
+
* @param {string} secret_key
|
|
248
|
+
* @param {string} name
|
|
249
|
+
* @returns {Promise<any>}
|
|
250
|
+
*/
|
|
251
|
+
export function retrieve(secret_key, name) {
|
|
252
|
+
const ptr0 = passStringToWasm0(secret_key, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
253
|
+
const len0 = WASM_VECTOR_LEN;
|
|
254
|
+
const ptr1 = passStringToWasm0(name, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
255
|
+
const len1 = WASM_VECTOR_LEN;
|
|
256
|
+
const ret = wasm.retrieve(ptr0, len0, ptr1, len1);
|
|
257
|
+
return ret;
|
|
258
|
+
}
|
|
259
|
+
|
|
260
|
+
/**
|
|
261
|
+
* @param {string} secret_key
|
|
262
|
+
* @param {string} name
|
|
263
|
+
* @returns {Promise<any>}
|
|
264
|
+
*/
|
|
265
|
+
export function retrieve_metadata(secret_key, name) {
|
|
266
|
+
const ptr0 = passStringToWasm0(secret_key, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
267
|
+
const len0 = WASM_VECTOR_LEN;
|
|
268
|
+
const ptr1 = passStringToWasm0(name, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
269
|
+
const len1 = WASM_VECTOR_LEN;
|
|
270
|
+
const ret = wasm.retrieve_metadata(ptr0, len0, ptr1, len1);
|
|
271
|
+
return ret;
|
|
272
|
+
}
|
|
273
|
+
|
|
274
|
+
/**
|
|
275
|
+
* @param {Uint8Array} bytes
|
|
276
|
+
* @returns {string}
|
|
277
|
+
*/
|
|
278
|
+
export function encode_hex(bytes) {
|
|
279
|
+
let deferred2_0;
|
|
280
|
+
let deferred2_1;
|
|
281
|
+
try {
|
|
282
|
+
const ptr0 = passArray8ToWasm0(bytes, wasm.__wbindgen_malloc);
|
|
283
|
+
const len0 = WASM_VECTOR_LEN;
|
|
284
|
+
const ret = wasm.encode_hex(ptr0, len0);
|
|
285
|
+
deferred2_0 = ret[0];
|
|
286
|
+
deferred2_1 = ret[1];
|
|
287
|
+
return getStringFromWasm0(ret[0], ret[1]);
|
|
288
|
+
} finally {
|
|
289
|
+
wasm.__wbindgen_free(deferred2_0, deferred2_1, 1);
|
|
290
|
+
}
|
|
291
|
+
}
|
|
292
|
+
|
|
293
|
+
/**
|
|
294
|
+
* @param {Uint8Array} bytes
|
|
295
|
+
* @returns {string}
|
|
296
|
+
*/
|
|
297
|
+
export function encode_base64(bytes) {
|
|
298
|
+
let deferred2_0;
|
|
299
|
+
let deferred2_1;
|
|
300
|
+
try {
|
|
301
|
+
const ptr0 = passArray8ToWasm0(bytes, wasm.__wbindgen_malloc);
|
|
302
|
+
const len0 = WASM_VECTOR_LEN;
|
|
303
|
+
const ret = wasm.encode_base64(ptr0, len0);
|
|
304
|
+
deferred2_0 = ret[0];
|
|
305
|
+
deferred2_1 = ret[1];
|
|
306
|
+
return getStringFromWasm0(ret[0], ret[1]);
|
|
307
|
+
} finally {
|
|
308
|
+
wasm.__wbindgen_free(deferred2_0, deferred2_1, 1);
|
|
309
|
+
}
|
|
310
|
+
}
|
|
311
|
+
|
|
312
|
+
function takeFromExternrefTable0(idx) {
|
|
313
|
+
const value = wasm.__wbindgen_export_4.get(idx);
|
|
314
|
+
wasm.__externref_table_dealloc(idx);
|
|
315
|
+
return value;
|
|
316
|
+
}
|
|
317
|
+
/**
|
|
318
|
+
* @param {string} string
|
|
319
|
+
* @returns {Uint8Array}
|
|
320
|
+
*/
|
|
321
|
+
export function decode_hex(string) {
|
|
322
|
+
const ptr0 = passStringToWasm0(string, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
323
|
+
const len0 = WASM_VECTOR_LEN;
|
|
324
|
+
const ret = wasm.decode_hex(ptr0, len0);
|
|
325
|
+
if (ret[3]) {
|
|
326
|
+
throw takeFromExternrefTable0(ret[2]);
|
|
327
|
+
}
|
|
328
|
+
var v2 = getArrayU8FromWasm0(ret[0], ret[1]).slice();
|
|
329
|
+
wasm.__wbindgen_free(ret[0], ret[1] * 1, 1);
|
|
330
|
+
return v2;
|
|
331
|
+
}
|
|
332
|
+
|
|
333
|
+
/**
|
|
334
|
+
* @param {string} string
|
|
335
|
+
* @returns {Uint8Array}
|
|
336
|
+
*/
|
|
337
|
+
export function decode_base64(string) {
|
|
338
|
+
const ptr0 = passStringToWasm0(string, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
339
|
+
const len0 = WASM_VECTOR_LEN;
|
|
340
|
+
const ret = wasm.decode_base64(ptr0, len0);
|
|
341
|
+
if (ret[3]) {
|
|
342
|
+
throw takeFromExternrefTable0(ret[2]);
|
|
343
|
+
}
|
|
344
|
+
var v2 = getArrayU8FromWasm0(ret[0], ret[1]).slice();
|
|
345
|
+
wasm.__wbindgen_free(ret[0], ret[1] * 1, 1);
|
|
346
|
+
return v2;
|
|
347
|
+
}
|
|
348
|
+
|
|
349
|
+
/**
|
|
350
|
+
* @param {string} nostr_hex_sk
|
|
351
|
+
* @param {any} request
|
|
352
|
+
* @returns {Promise<any>}
|
|
353
|
+
*/
|
|
354
|
+
export function create_watcher(nostr_hex_sk, request) {
|
|
355
|
+
const ptr0 = passStringToWasm0(nostr_hex_sk, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
356
|
+
const len0 = WASM_VECTOR_LEN;
|
|
357
|
+
const ret = wasm.create_watcher(ptr0, len0, request);
|
|
358
|
+
return ret;
|
|
359
|
+
}
|
|
360
|
+
|
|
361
|
+
/**
|
|
362
|
+
* @param {string} nostr_hex_sk
|
|
363
|
+
* @param {any} request
|
|
364
|
+
* @returns {Promise<any>}
|
|
365
|
+
*/
|
|
366
|
+
export function recover_watcher(nostr_hex_sk, request) {
|
|
367
|
+
const ptr0 = passStringToWasm0(nostr_hex_sk, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
368
|
+
const len0 = WASM_VECTOR_LEN;
|
|
369
|
+
const ret = wasm.recover_watcher(ptr0, len0, request);
|
|
370
|
+
return ret;
|
|
371
|
+
}
|
|
372
|
+
|
|
373
|
+
/**
|
|
374
|
+
* @param {string} nostr_hex_sk
|
|
375
|
+
* @returns {Promise<any>}
|
|
376
|
+
*/
|
|
377
|
+
export function destroy_watcher(nostr_hex_sk) {
|
|
378
|
+
const ptr0 = passStringToWasm0(nostr_hex_sk, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
379
|
+
const len0 = WASM_VECTOR_LEN;
|
|
380
|
+
const ret = wasm.destroy_watcher(ptr0, len0);
|
|
381
|
+
return ret;
|
|
382
|
+
}
|
|
383
|
+
|
|
384
|
+
/**
|
|
385
|
+
* @param {string} nostr_hex_sk
|
|
386
|
+
* @returns {Promise<any>}
|
|
387
|
+
*/
|
|
388
|
+
export function destroy_recover_watcher(nostr_hex_sk) {
|
|
389
|
+
const ptr0 = passStringToWasm0(nostr_hex_sk, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
390
|
+
const len0 = WASM_VECTOR_LEN;
|
|
391
|
+
const ret = wasm.destroy_recover_watcher(ptr0, len0);
|
|
392
|
+
return ret;
|
|
393
|
+
}
|
|
394
|
+
|
|
395
|
+
/**
|
|
396
|
+
* @param {string} nostr_hex_sk
|
|
397
|
+
* @returns {Promise<any>}
|
|
398
|
+
*/
|
|
399
|
+
export function check_watcher(nostr_hex_sk) {
|
|
400
|
+
const ptr0 = passStringToWasm0(nostr_hex_sk, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
401
|
+
const len0 = WASM_VECTOR_LEN;
|
|
402
|
+
const ret = wasm.check_watcher(ptr0, len0);
|
|
403
|
+
return ret;
|
|
404
|
+
}
|
|
405
|
+
|
|
406
|
+
/**
|
|
407
|
+
* @param {string} nostr_hex_sk
|
|
408
|
+
* @param {string} request
|
|
409
|
+
* @returns {Promise<any>}
|
|
410
|
+
*/
|
|
411
|
+
export function watcher_next_address(nostr_hex_sk, request) {
|
|
412
|
+
const ptr0 = passStringToWasm0(nostr_hex_sk, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
413
|
+
const len0 = WASM_VECTOR_LEN;
|
|
414
|
+
const ptr1 = passStringToWasm0(request, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
415
|
+
const len1 = WASM_VECTOR_LEN;
|
|
416
|
+
const ret = wasm.watcher_next_address(ptr0, len0, ptr1, len1);
|
|
417
|
+
return ret;
|
|
418
|
+
}
|
|
419
|
+
|
|
420
|
+
/**
|
|
421
|
+
* @param {string} nostr_hex_sk
|
|
422
|
+
* @param {string} request
|
|
423
|
+
* @returns {Promise<any>}
|
|
424
|
+
*/
|
|
425
|
+
export function watcher_next_utxo(nostr_hex_sk, request) {
|
|
426
|
+
const ptr0 = passStringToWasm0(nostr_hex_sk, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
427
|
+
const len0 = WASM_VECTOR_LEN;
|
|
428
|
+
const ptr1 = passStringToWasm0(request, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
429
|
+
const len1 = WASM_VECTOR_LEN;
|
|
430
|
+
const ret = wasm.watcher_next_utxo(ptr0, len0, ptr1, len1);
|
|
431
|
+
return ret;
|
|
432
|
+
}
|
|
433
|
+
|
|
434
|
+
/**
|
|
435
|
+
* @param {string} nostr_hex_sk
|
|
436
|
+
* @param {string} request
|
|
437
|
+
* @returns {Promise<any>}
|
|
438
|
+
*/
|
|
439
|
+
export function watcher_unspent_utxos(nostr_hex_sk, request) {
|
|
440
|
+
const ptr0 = passStringToWasm0(nostr_hex_sk, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
441
|
+
const len0 = WASM_VECTOR_LEN;
|
|
442
|
+
const ptr1 = passStringToWasm0(request, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
443
|
+
const len1 = WASM_VECTOR_LEN;
|
|
444
|
+
const ret = wasm.watcher_unspent_utxos(ptr0, len0, ptr1, len1);
|
|
445
|
+
return ret;
|
|
446
|
+
}
|
|
447
|
+
|
|
448
|
+
/**
|
|
449
|
+
* @returns {string}
|
|
450
|
+
*/
|
|
451
|
+
export function get_rgb_version() {
|
|
452
|
+
let deferred1_0;
|
|
453
|
+
let deferred1_1;
|
|
454
|
+
try {
|
|
455
|
+
const ret = wasm.get_rgb_version();
|
|
456
|
+
deferred1_0 = ret[0];
|
|
457
|
+
deferred1_1 = ret[1];
|
|
458
|
+
return getStringFromWasm0(ret[0], ret[1]);
|
|
459
|
+
} finally {
|
|
460
|
+
wasm.__wbindgen_free(deferred1_0, deferred1_1, 1);
|
|
461
|
+
}
|
|
462
|
+
}
|
|
463
|
+
|
|
464
|
+
/**
|
|
465
|
+
* @param {string} nostr_hex_sk
|
|
466
|
+
* @returns {Promise<any>}
|
|
467
|
+
*/
|
|
468
|
+
export function get_rgb_wallet(nostr_hex_sk) {
|
|
469
|
+
const ptr0 = passStringToWasm0(nostr_hex_sk, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
470
|
+
const len0 = WASM_VECTOR_LEN;
|
|
471
|
+
const ret = wasm.get_rgb_wallet(ptr0, len0);
|
|
472
|
+
return ret;
|
|
473
|
+
}
|
|
474
|
+
|
|
475
|
+
/**
|
|
476
|
+
* @param {string} nostr_hex_sk
|
|
477
|
+
* @param {string} request
|
|
478
|
+
* @returns {Promise<any>}
|
|
479
|
+
*/
|
|
480
|
+
export function get_contract(nostr_hex_sk, request) {
|
|
481
|
+
const ptr0 = passStringToWasm0(nostr_hex_sk, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
482
|
+
const len0 = WASM_VECTOR_LEN;
|
|
483
|
+
const ptr1 = passStringToWasm0(request, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
484
|
+
const len1 = WASM_VECTOR_LEN;
|
|
485
|
+
const ret = wasm.get_contract(ptr0, len0, ptr1, len1);
|
|
486
|
+
return ret;
|
|
487
|
+
}
|
|
488
|
+
|
|
489
|
+
/**
|
|
490
|
+
* @param {string} nostr_hex_sk
|
|
491
|
+
* @param {boolean} arg1
|
|
492
|
+
* @returns {Promise<any>}
|
|
493
|
+
*/
|
|
494
|
+
export function list_contracts(nostr_hex_sk, arg1) {
|
|
495
|
+
const ptr0 = passStringToWasm0(nostr_hex_sk, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
496
|
+
const len0 = WASM_VECTOR_LEN;
|
|
497
|
+
const ret = wasm.list_contracts(ptr0, len0, arg1);
|
|
498
|
+
return ret;
|
|
499
|
+
}
|
|
500
|
+
|
|
501
|
+
/**
|
|
502
|
+
* @param {string} nostr_hex_sk
|
|
503
|
+
* @param {string} request
|
|
504
|
+
* @returns {Promise<any>}
|
|
505
|
+
*/
|
|
506
|
+
export function import_contract(nostr_hex_sk, request) {
|
|
507
|
+
const ptr0 = passStringToWasm0(nostr_hex_sk, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
508
|
+
const len0 = WASM_VECTOR_LEN;
|
|
509
|
+
const ptr1 = passStringToWasm0(request, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
510
|
+
const len1 = WASM_VECTOR_LEN;
|
|
511
|
+
const ret = wasm.import_contract(ptr0, len0, ptr1, len1);
|
|
512
|
+
return ret;
|
|
513
|
+
}
|
|
514
|
+
|
|
515
|
+
/**
|
|
516
|
+
* @param {string} nostr_hex_sk
|
|
517
|
+
* @param {any} request
|
|
518
|
+
* @returns {Promise<any>}
|
|
519
|
+
*/
|
|
520
|
+
export function issue_contract(nostr_hex_sk, request) {
|
|
521
|
+
const ptr0 = passStringToWasm0(nostr_hex_sk, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
522
|
+
const len0 = WASM_VECTOR_LEN;
|
|
523
|
+
const ret = wasm.issue_contract(ptr0, len0, request);
|
|
524
|
+
return ret;
|
|
525
|
+
}
|
|
526
|
+
|
|
527
|
+
/**
|
|
528
|
+
* @param {string} nostr_hex_sk
|
|
529
|
+
* @param {any} request
|
|
530
|
+
* @returns {Promise<any>}
|
|
531
|
+
*/
|
|
532
|
+
export function issue_contract_proxy(nostr_hex_sk, request) {
|
|
533
|
+
const ptr0 = passStringToWasm0(nostr_hex_sk, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
534
|
+
const len0 = WASM_VECTOR_LEN;
|
|
535
|
+
const ret = wasm.issue_contract_proxy(ptr0, len0, request);
|
|
536
|
+
return ret;
|
|
537
|
+
}
|
|
538
|
+
|
|
539
|
+
/**
|
|
540
|
+
* @param {string} nostr_hex_sk
|
|
541
|
+
* @param {any} request
|
|
542
|
+
* @returns {Promise<any>}
|
|
543
|
+
*/
|
|
544
|
+
export function create_rgb_invoice(nostr_hex_sk, request) {
|
|
545
|
+
const ptr0 = passStringToWasm0(nostr_hex_sk, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
546
|
+
const len0 = WASM_VECTOR_LEN;
|
|
547
|
+
const ret = wasm.create_rgb_invoice(ptr0, len0, request);
|
|
548
|
+
return ret;
|
|
549
|
+
}
|
|
550
|
+
|
|
551
|
+
/**
|
|
552
|
+
* @param {string} nostr_hex_sk
|
|
553
|
+
* @param {string} request
|
|
554
|
+
* @returns {Promise<any>}
|
|
555
|
+
*/
|
|
556
|
+
export function remove_rgb_invoice(nostr_hex_sk, request) {
|
|
557
|
+
const ptr0 = passStringToWasm0(nostr_hex_sk, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
558
|
+
const len0 = WASM_VECTOR_LEN;
|
|
559
|
+
const ptr1 = passStringToWasm0(request, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
560
|
+
const len1 = WASM_VECTOR_LEN;
|
|
561
|
+
const ret = wasm.remove_rgb_invoice(ptr0, len0, ptr1, len1);
|
|
562
|
+
return ret;
|
|
563
|
+
}
|
|
564
|
+
|
|
565
|
+
/**
|
|
566
|
+
* @param {string} nostr_hex_sk
|
|
567
|
+
* @returns {Promise<any>}
|
|
568
|
+
*/
|
|
569
|
+
export function list_rgb_invoices(nostr_hex_sk) {
|
|
570
|
+
const ptr0 = passStringToWasm0(nostr_hex_sk, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
571
|
+
const len0 = WASM_VECTOR_LEN;
|
|
572
|
+
const ret = wasm.list_rgb_invoices(ptr0, len0);
|
|
573
|
+
return ret;
|
|
574
|
+
}
|
|
575
|
+
|
|
576
|
+
/**
|
|
577
|
+
* @param {string} invoice
|
|
578
|
+
* @returns {Promise<any>}
|
|
579
|
+
*/
|
|
580
|
+
export function decode_rgb_invoice(invoice) {
|
|
581
|
+
const ptr0 = passStringToWasm0(invoice, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
582
|
+
const len0 = WASM_VECTOR_LEN;
|
|
583
|
+
const ret = wasm.decode_rgb_invoice(ptr0, len0);
|
|
584
|
+
return ret;
|
|
585
|
+
}
|
|
586
|
+
|
|
587
|
+
/**
|
|
588
|
+
* @param {string} nostr_hex_sk
|
|
589
|
+
* @param {any} request
|
|
590
|
+
* @returns {Promise<any>}
|
|
591
|
+
*/
|
|
592
|
+
export function can_create_transfer_contract(nostr_hex_sk, request) {
|
|
593
|
+
const ptr0 = passStringToWasm0(nostr_hex_sk, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
594
|
+
const len0 = WASM_VECTOR_LEN;
|
|
595
|
+
const ret = wasm.can_create_transfer_contract(ptr0, len0, request);
|
|
596
|
+
return ret;
|
|
597
|
+
}
|
|
598
|
+
|
|
599
|
+
/**
|
|
600
|
+
* @param {string} nostr_hex_sk
|
|
601
|
+
* @param {any} request
|
|
602
|
+
* @returns {Promise<any>}
|
|
603
|
+
*/
|
|
604
|
+
export function create_rgb_transfer(nostr_hex_sk, request) {
|
|
605
|
+
const ptr0 = passStringToWasm0(nostr_hex_sk, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
606
|
+
const len0 = WASM_VECTOR_LEN;
|
|
607
|
+
const ret = wasm.create_rgb_transfer(ptr0, len0, request);
|
|
608
|
+
return ret;
|
|
609
|
+
}
|
|
610
|
+
|
|
611
|
+
/**
|
|
612
|
+
* @param {string} nostr_hex_sk
|
|
613
|
+
* @param {any} request
|
|
614
|
+
* @param {any} secrets
|
|
615
|
+
* @returns {Promise<any>}
|
|
616
|
+
*/
|
|
617
|
+
export function create_and_publish_rgb_transfer(nostr_hex_sk, request, secrets) {
|
|
618
|
+
const ptr0 = passStringToWasm0(nostr_hex_sk, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
619
|
+
const len0 = WASM_VECTOR_LEN;
|
|
620
|
+
const ret = wasm.create_and_publish_rgb_transfer(ptr0, len0, request, secrets);
|
|
621
|
+
return ret;
|
|
622
|
+
}
|
|
623
|
+
|
|
624
|
+
/**
|
|
625
|
+
* @param {string} _nostr_hex_sk
|
|
626
|
+
* @param {any} request
|
|
627
|
+
* @returns {Promise<any>}
|
|
628
|
+
*/
|
|
629
|
+
export function psbt_sign_file(_nostr_hex_sk, request) {
|
|
630
|
+
const ptr0 = passStringToWasm0(_nostr_hex_sk, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
631
|
+
const len0 = WASM_VECTOR_LEN;
|
|
632
|
+
const ret = wasm.psbt_sign_file(ptr0, len0, request);
|
|
633
|
+
return ret;
|
|
634
|
+
}
|
|
635
|
+
|
|
636
|
+
/**
|
|
637
|
+
* @param {string} nostr_hex_sk
|
|
638
|
+
* @param {any} request
|
|
639
|
+
* @returns {Promise<any>}
|
|
640
|
+
*/
|
|
641
|
+
export function accept_transfer(nostr_hex_sk, request) {
|
|
642
|
+
const ptr0 = passStringToWasm0(nostr_hex_sk, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
643
|
+
const len0 = WASM_VECTOR_LEN;
|
|
644
|
+
const ret = wasm.accept_transfer(ptr0, len0, request);
|
|
645
|
+
return ret;
|
|
646
|
+
}
|
|
647
|
+
|
|
648
|
+
/**
|
|
649
|
+
* @param {string} nostr_hex_sk
|
|
650
|
+
* @param {any} request
|
|
651
|
+
* @returns {Promise<any>}
|
|
652
|
+
*/
|
|
653
|
+
export function save_transfer(nostr_hex_sk, request) {
|
|
654
|
+
const ptr0 = passStringToWasm0(nostr_hex_sk, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
655
|
+
const len0 = WASM_VECTOR_LEN;
|
|
656
|
+
const ret = wasm.save_transfer(ptr0, len0, request);
|
|
657
|
+
return ret;
|
|
658
|
+
}
|
|
659
|
+
|
|
660
|
+
/**
|
|
661
|
+
* @param {string} nostr_hex_sk
|
|
662
|
+
* @returns {Promise<any>}
|
|
663
|
+
*/
|
|
664
|
+
export function list_transfers(nostr_hex_sk) {
|
|
665
|
+
const ptr0 = passStringToWasm0(nostr_hex_sk, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
666
|
+
const len0 = WASM_VECTOR_LEN;
|
|
667
|
+
const ret = wasm.list_transfers(ptr0, len0);
|
|
668
|
+
return ret;
|
|
669
|
+
}
|
|
670
|
+
|
|
671
|
+
/**
|
|
672
|
+
* @param {string} nostr_hex_sk
|
|
673
|
+
* @returns {Promise<any>}
|
|
674
|
+
*/
|
|
675
|
+
export function verify_transfers(nostr_hex_sk) {
|
|
676
|
+
const ptr0 = passStringToWasm0(nostr_hex_sk, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
677
|
+
const len0 = WASM_VECTOR_LEN;
|
|
678
|
+
const ret = wasm.verify_transfers(ptr0, len0);
|
|
679
|
+
return ret;
|
|
680
|
+
}
|
|
681
|
+
|
|
682
|
+
/**
|
|
683
|
+
* @param {string} nostr_hex_sk
|
|
684
|
+
* @returns {Promise<any>}
|
|
685
|
+
*/
|
|
686
|
+
export function list_offers(nostr_hex_sk) {
|
|
687
|
+
const ptr0 = passStringToWasm0(nostr_hex_sk, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
688
|
+
const len0 = WASM_VECTOR_LEN;
|
|
689
|
+
const ret = wasm.list_offers(ptr0, len0);
|
|
690
|
+
return ret;
|
|
691
|
+
}
|
|
692
|
+
|
|
693
|
+
/**
|
|
694
|
+
* @param {string} nostr_hex_sk
|
|
695
|
+
* @returns {Promise<any>}
|
|
696
|
+
*/
|
|
697
|
+
export function offers(nostr_hex_sk) {
|
|
698
|
+
const ptr0 = passStringToWasm0(nostr_hex_sk, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
699
|
+
const len0 = WASM_VECTOR_LEN;
|
|
700
|
+
const ret = wasm.offers(ptr0, len0);
|
|
701
|
+
return ret;
|
|
702
|
+
}
|
|
703
|
+
|
|
704
|
+
/**
|
|
705
|
+
* @param {string} nostr_hex_sk
|
|
706
|
+
* @returns {Promise<any>}
|
|
707
|
+
*/
|
|
708
|
+
export function bids(nostr_hex_sk) {
|
|
709
|
+
const ptr0 = passStringToWasm0(nostr_hex_sk, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
710
|
+
const len0 = WASM_VECTOR_LEN;
|
|
711
|
+
const ret = wasm.bids(ptr0, len0);
|
|
712
|
+
return ret;
|
|
713
|
+
}
|
|
714
|
+
|
|
715
|
+
/**
|
|
716
|
+
* @param {string} nostr_hex_sk
|
|
717
|
+
* @param {string} offer_id
|
|
718
|
+
* @returns {Promise<any>}
|
|
719
|
+
*/
|
|
720
|
+
export function offer_swap_suppl(nostr_hex_sk, offer_id) {
|
|
721
|
+
const ptr0 = passStringToWasm0(nostr_hex_sk, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
722
|
+
const len0 = WASM_VECTOR_LEN;
|
|
723
|
+
const ptr1 = passStringToWasm0(offer_id, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
724
|
+
const len1 = WASM_VECTOR_LEN;
|
|
725
|
+
const ret = wasm.offer_swap_suppl(ptr0, len0, ptr1, len1);
|
|
726
|
+
return ret;
|
|
727
|
+
}
|
|
728
|
+
|
|
729
|
+
/**
|
|
730
|
+
* @param {string} nostr_hex_sk
|
|
731
|
+
* @param {string} bid_id
|
|
732
|
+
* @returns {Promise<any>}
|
|
733
|
+
*/
|
|
734
|
+
export function bid_swap_suppl(nostr_hex_sk, bid_id) {
|
|
735
|
+
const ptr0 = passStringToWasm0(nostr_hex_sk, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
736
|
+
const len0 = WASM_VECTOR_LEN;
|
|
737
|
+
const ptr1 = passStringToWasm0(bid_id, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
738
|
+
const len1 = WASM_VECTOR_LEN;
|
|
739
|
+
const ret = wasm.bid_swap_suppl(ptr0, len0, ptr1, len1);
|
|
740
|
+
return ret;
|
|
741
|
+
}
|
|
742
|
+
|
|
743
|
+
/**
|
|
744
|
+
* @param {string} nostr_hex_sk
|
|
745
|
+
* @param {any} request
|
|
746
|
+
* @param {any} secrets
|
|
747
|
+
* @returns {Promise<any>}
|
|
748
|
+
*/
|
|
749
|
+
export function can_create_offer(nostr_hex_sk, request, secrets) {
|
|
750
|
+
const ptr0 = passStringToWasm0(nostr_hex_sk, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
751
|
+
const len0 = WASM_VECTOR_LEN;
|
|
752
|
+
const ret = wasm.can_create_offer(ptr0, len0, request, secrets);
|
|
753
|
+
return ret;
|
|
754
|
+
}
|
|
755
|
+
|
|
756
|
+
/**
|
|
757
|
+
* @param {string} nostr_hex_sk
|
|
758
|
+
* @param {any} request
|
|
759
|
+
* @param {any} secrets
|
|
760
|
+
* @returns {Promise<any>}
|
|
761
|
+
*/
|
|
762
|
+
export function create_offer(nostr_hex_sk, request, secrets) {
|
|
763
|
+
const ptr0 = passStringToWasm0(nostr_hex_sk, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
764
|
+
const len0 = WASM_VECTOR_LEN;
|
|
765
|
+
const ret = wasm.create_offer(ptr0, len0, request, secrets);
|
|
766
|
+
return ret;
|
|
767
|
+
}
|
|
768
|
+
|
|
769
|
+
/**
|
|
770
|
+
* @param {string} nostr_hex_sk
|
|
771
|
+
* @param {any} request
|
|
772
|
+
* @returns {Promise<any>}
|
|
773
|
+
*/
|
|
774
|
+
export function cancel_offer(nostr_hex_sk, request) {
|
|
775
|
+
const ptr0 = passStringToWasm0(nostr_hex_sk, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
776
|
+
const len0 = WASM_VECTOR_LEN;
|
|
777
|
+
const ret = wasm.cancel_offer(ptr0, len0, request);
|
|
778
|
+
return ret;
|
|
779
|
+
}
|
|
780
|
+
|
|
781
|
+
/**
|
|
782
|
+
* @param {string} nostr_hex_sk
|
|
783
|
+
* @param {any} request
|
|
784
|
+
* @param {any} secrets
|
|
785
|
+
* @returns {Promise<any>}
|
|
786
|
+
*/
|
|
787
|
+
export function can_create_bid(nostr_hex_sk, request, secrets) {
|
|
788
|
+
const ptr0 = passStringToWasm0(nostr_hex_sk, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
789
|
+
const len0 = WASM_VECTOR_LEN;
|
|
790
|
+
const ret = wasm.can_create_bid(ptr0, len0, request, secrets);
|
|
791
|
+
return ret;
|
|
792
|
+
}
|
|
793
|
+
|
|
794
|
+
/**
|
|
795
|
+
* @param {string} nostr_hex_sk
|
|
796
|
+
* @param {any} request
|
|
797
|
+
* @param {any} secrets
|
|
798
|
+
* @returns {Promise<any>}
|
|
799
|
+
*/
|
|
800
|
+
export function create_bid(nostr_hex_sk, request, secrets) {
|
|
801
|
+
const ptr0 = passStringToWasm0(nostr_hex_sk, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
802
|
+
const len0 = WASM_VECTOR_LEN;
|
|
803
|
+
const ret = wasm.create_bid(ptr0, len0, request, secrets);
|
|
804
|
+
return ret;
|
|
805
|
+
}
|
|
806
|
+
|
|
807
|
+
/**
|
|
808
|
+
* @param {string} nostr_hex_sk
|
|
809
|
+
* @param {any} request
|
|
810
|
+
* @returns {Promise<any>}
|
|
811
|
+
*/
|
|
812
|
+
export function cancel_bid(nostr_hex_sk, request) {
|
|
813
|
+
const ptr0 = passStringToWasm0(nostr_hex_sk, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
814
|
+
const len0 = WASM_VECTOR_LEN;
|
|
815
|
+
const ret = wasm.cancel_bid(ptr0, len0, request);
|
|
816
|
+
return ret;
|
|
817
|
+
}
|
|
818
|
+
|
|
819
|
+
/**
|
|
820
|
+
* @param {string} nostr_hex_sk
|
|
821
|
+
* @param {any} request
|
|
822
|
+
* @param {any} secrets
|
|
823
|
+
* @param {bigint} fee
|
|
824
|
+
* @param {string} max_claim
|
|
825
|
+
* @returns {Promise<any>}
|
|
826
|
+
*/
|
|
827
|
+
export function create_airdrop(nostr_hex_sk, request, secrets, fee, max_claim) {
|
|
828
|
+
const ptr0 = passStringToWasm0(nostr_hex_sk, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
829
|
+
const len0 = WASM_VECTOR_LEN;
|
|
830
|
+
const ptr1 = passStringToWasm0(max_claim, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
831
|
+
const len1 = WASM_VECTOR_LEN;
|
|
832
|
+
const ret = wasm.create_airdrop(ptr0, len0, request, secrets, fee, ptr1, len1);
|
|
833
|
+
return ret;
|
|
834
|
+
}
|
|
835
|
+
|
|
836
|
+
/**
|
|
837
|
+
* @param {string} nostr_hex_sk
|
|
838
|
+
* @param {any} request
|
|
839
|
+
* @returns {Promise<any>}
|
|
840
|
+
*/
|
|
841
|
+
export function create_airdrop_claim(nostr_hex_sk, request) {
|
|
842
|
+
const ptr0 = passStringToWasm0(nostr_hex_sk, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
843
|
+
const len0 = WASM_VECTOR_LEN;
|
|
844
|
+
const ret = wasm.create_airdrop_claim(ptr0, len0, request);
|
|
845
|
+
return ret;
|
|
846
|
+
}
|
|
847
|
+
|
|
848
|
+
/**
|
|
849
|
+
* @param {string} nostr_hex_sk
|
|
850
|
+
* @param {any} request
|
|
851
|
+
* @returns {Promise<any>}
|
|
852
|
+
*/
|
|
853
|
+
export function close_airdrop(nostr_hex_sk, request) {
|
|
854
|
+
const ptr0 = passStringToWasm0(nostr_hex_sk, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
855
|
+
const len0 = WASM_VECTOR_LEN;
|
|
856
|
+
const ret = wasm.close_airdrop(ptr0, len0, request);
|
|
857
|
+
return ret;
|
|
858
|
+
}
|
|
859
|
+
|
|
860
|
+
/**
|
|
861
|
+
* @param {string} nostr_hex_sk
|
|
862
|
+
* @returns {Promise<any>}
|
|
863
|
+
*/
|
|
864
|
+
export function backup_rgb_data(nostr_hex_sk) {
|
|
865
|
+
const ptr0 = passStringToWasm0(nostr_hex_sk, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
866
|
+
const len0 = WASM_VECTOR_LEN;
|
|
867
|
+
const ret = wasm.backup_rgb_data(ptr0, len0);
|
|
868
|
+
return ret;
|
|
869
|
+
}
|
|
870
|
+
|
|
871
|
+
/**
|
|
872
|
+
* @param {string} nostr_hex_sk
|
|
873
|
+
* @returns {Promise<any>}
|
|
874
|
+
*/
|
|
875
|
+
export function restore_rgb_data(nostr_hex_sk) {
|
|
876
|
+
const ptr0 = passStringToWasm0(nostr_hex_sk, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
877
|
+
const len0 = WASM_VECTOR_LEN;
|
|
878
|
+
const ret = wasm.restore_rgb_data(ptr0, len0);
|
|
879
|
+
return ret;
|
|
880
|
+
}
|
|
881
|
+
|
|
882
|
+
/**
|
|
883
|
+
* @returns {Promise<any>}
|
|
884
|
+
*/
|
|
885
|
+
export function get_network() {
|
|
886
|
+
const ret = wasm.get_network();
|
|
887
|
+
return ret;
|
|
888
|
+
}
|
|
889
|
+
|
|
890
|
+
/**
|
|
891
|
+
* @param {string} network_str
|
|
892
|
+
* @returns {Promise<any>}
|
|
893
|
+
*/
|
|
894
|
+
export function switch_network(network_str) {
|
|
895
|
+
const ptr0 = passStringToWasm0(network_str, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
896
|
+
const len0 = WASM_VECTOR_LEN;
|
|
897
|
+
const ret = wasm.switch_network(ptr0, len0);
|
|
898
|
+
return ret;
|
|
899
|
+
}
|
|
900
|
+
|
|
901
|
+
/**
|
|
902
|
+
* @param {string} key
|
|
903
|
+
* @returns {Promise<any>}
|
|
904
|
+
*/
|
|
905
|
+
export function get_env(key) {
|
|
906
|
+
const ptr0 = passStringToWasm0(key, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
907
|
+
const len0 = WASM_VECTOR_LEN;
|
|
908
|
+
const ret = wasm.get_env(ptr0, len0);
|
|
909
|
+
return ret;
|
|
910
|
+
}
|
|
911
|
+
|
|
912
|
+
/**
|
|
913
|
+
* @param {string} key
|
|
914
|
+
* @param {string} value
|
|
915
|
+
* @returns {Promise<any>}
|
|
916
|
+
*/
|
|
917
|
+
export function set_env(key, value) {
|
|
918
|
+
const ptr0 = passStringToWasm0(key, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
919
|
+
const len0 = WASM_VECTOR_LEN;
|
|
920
|
+
const ptr1 = passStringToWasm0(value, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
921
|
+
const len1 = WASM_VECTOR_LEN;
|
|
922
|
+
const ret = wasm.set_env(ptr0, len0, ptr1, len1);
|
|
923
|
+
return ret;
|
|
924
|
+
}
|
|
925
|
+
|
|
926
|
+
/**
|
|
927
|
+
* @param {number} ms
|
|
928
|
+
* @returns {Promise<any>}
|
|
929
|
+
*/
|
|
930
|
+
export function sleep(ms) {
|
|
931
|
+
const ret = wasm.sleep(ms);
|
|
932
|
+
return ret;
|
|
933
|
+
}
|
|
934
|
+
|
|
935
|
+
/**
|
|
936
|
+
* @param {string} decimal
|
|
937
|
+
* @param {number} precision
|
|
938
|
+
* @returns {string}
|
|
939
|
+
*/
|
|
940
|
+
export function convert_contract_amount_raw(decimal, precision) {
|
|
941
|
+
let deferred2_0;
|
|
942
|
+
let deferred2_1;
|
|
943
|
+
try {
|
|
944
|
+
const ptr0 = passStringToWasm0(decimal, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
945
|
+
const len0 = WASM_VECTOR_LEN;
|
|
946
|
+
const ret = wasm.convert_contract_amount_raw(ptr0, len0, precision);
|
|
947
|
+
deferred2_0 = ret[0];
|
|
948
|
+
deferred2_1 = ret[1];
|
|
949
|
+
return getStringFromWasm0(ret[0], ret[1]);
|
|
950
|
+
} finally {
|
|
951
|
+
wasm.__wbindgen_free(deferred2_0, deferred2_1, 1);
|
|
952
|
+
}
|
|
953
|
+
}
|
|
954
|
+
|
|
955
|
+
/**
|
|
956
|
+
* @param {bigint} amount
|
|
957
|
+
* @param {number} precision
|
|
958
|
+
* @returns {string}
|
|
959
|
+
*/
|
|
960
|
+
export function convert_contract_amount_string(amount, precision) {
|
|
961
|
+
let deferred1_0;
|
|
962
|
+
let deferred1_1;
|
|
963
|
+
try {
|
|
964
|
+
const ret = wasm.convert_contract_amount_string(amount, precision);
|
|
965
|
+
deferred1_0 = ret[0];
|
|
966
|
+
deferred1_1 = ret[1];
|
|
967
|
+
return getStringFromWasm0(ret[0], ret[1]);
|
|
968
|
+
} finally {
|
|
969
|
+
wasm.__wbindgen_free(deferred1_0, deferred1_1, 1);
|
|
970
|
+
}
|
|
971
|
+
}
|
|
972
|
+
|
|
973
|
+
/**
|
|
974
|
+
* @param {string} amount
|
|
975
|
+
* @returns {any}
|
|
976
|
+
*/
|
|
977
|
+
export function parse_contract_amount(amount) {
|
|
978
|
+
const ptr0 = passStringToWasm0(amount, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
979
|
+
const len0 = WASM_VECTOR_LEN;
|
|
980
|
+
const ret = wasm.parse_contract_amount(ptr0, len0);
|
|
981
|
+
return ret;
|
|
982
|
+
}
|
|
983
|
+
|
|
984
|
+
/**
|
|
985
|
+
* @param {string} amount
|
|
986
|
+
* @param {number} precision
|
|
987
|
+
* @returns {string}
|
|
988
|
+
*/
|
|
989
|
+
export function parse_contract_amount_precision(amount, precision) {
|
|
990
|
+
let deferred2_0;
|
|
991
|
+
let deferred2_1;
|
|
992
|
+
try {
|
|
993
|
+
const ptr0 = passStringToWasm0(amount, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
994
|
+
const len0 = WASM_VECTOR_LEN;
|
|
995
|
+
const ret = wasm.parse_contract_amount_precision(ptr0, len0, precision);
|
|
996
|
+
deferred2_0 = ret[0];
|
|
997
|
+
deferred2_1 = ret[1];
|
|
998
|
+
return getStringFromWasm0(ret[0], ret[1]);
|
|
999
|
+
} finally {
|
|
1000
|
+
wasm.__wbindgen_free(deferred2_0, deferred2_1, 1);
|
|
1001
|
+
}
|
|
1002
|
+
}
|
|
1003
|
+
|
|
1004
|
+
/**
|
|
1005
|
+
* @returns {any}
|
|
1006
|
+
*/
|
|
1007
|
+
export function version() {
|
|
1008
|
+
const ret = wasm.version();
|
|
1009
|
+
return ret;
|
|
1010
|
+
}
|
|
1011
|
+
|
|
1012
|
+
/**
|
|
1013
|
+
* @param {string} username
|
|
1014
|
+
* @param {string} password
|
|
1015
|
+
* @returns {Promise<any>}
|
|
1016
|
+
*/
|
|
1017
|
+
export function create_wallet(username, password) {
|
|
1018
|
+
const ptr0 = passStringToWasm0(username, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
1019
|
+
const len0 = WASM_VECTOR_LEN;
|
|
1020
|
+
const ptr1 = passStringToWasm0(password, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
1021
|
+
const len1 = WASM_VECTOR_LEN;
|
|
1022
|
+
const ret = wasm.create_wallet(ptr0, len0, ptr1, len1);
|
|
1023
|
+
return ret;
|
|
1024
|
+
}
|
|
1025
|
+
|
|
1026
|
+
/**
|
|
1027
|
+
* @param {string} username
|
|
1028
|
+
* @param {string} password
|
|
1029
|
+
* @returns {Promise<any>}
|
|
1030
|
+
*/
|
|
1031
|
+
export function auth(username, password) {
|
|
1032
|
+
const ptr0 = passStringToWasm0(username, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
1033
|
+
const len0 = WASM_VECTOR_LEN;
|
|
1034
|
+
const ptr1 = passStringToWasm0(password, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
1035
|
+
const len1 = WASM_VECTOR_LEN;
|
|
1036
|
+
const ret = wasm.auth(ptr0, len0, ptr1, len1);
|
|
1037
|
+
return ret;
|
|
1038
|
+
}
|
|
1039
|
+
|
|
1040
|
+
/**
|
|
1041
|
+
* @param {string} description
|
|
1042
|
+
* @param {number} amount
|
|
1043
|
+
* @param {string} token
|
|
1044
|
+
* @returns {Promise<any>}
|
|
1045
|
+
*/
|
|
1046
|
+
export function ln_create_invoice(description, amount, token) {
|
|
1047
|
+
const ptr0 = passStringToWasm0(description, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
1048
|
+
const len0 = WASM_VECTOR_LEN;
|
|
1049
|
+
const ptr1 = passStringToWasm0(token, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
1050
|
+
const len1 = WASM_VECTOR_LEN;
|
|
1051
|
+
const ret = wasm.ln_create_invoice(ptr0, len0, amount, ptr1, len1);
|
|
1052
|
+
return ret;
|
|
1053
|
+
}
|
|
1054
|
+
|
|
1055
|
+
/**
|
|
1056
|
+
* @param {string} token
|
|
1057
|
+
* @returns {Promise<any>}
|
|
1058
|
+
*/
|
|
1059
|
+
export function get_balance(token) {
|
|
1060
|
+
const ptr0 = passStringToWasm0(token, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
1061
|
+
const len0 = WASM_VECTOR_LEN;
|
|
1062
|
+
const ret = wasm.get_balance(ptr0, len0);
|
|
1063
|
+
return ret;
|
|
1064
|
+
}
|
|
1065
|
+
|
|
1066
|
+
/**
|
|
1067
|
+
* @param {string} token
|
|
1068
|
+
* @returns {Promise<any>}
|
|
1069
|
+
*/
|
|
1070
|
+
export function get_txs(token) {
|
|
1071
|
+
const ptr0 = passStringToWasm0(token, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
1072
|
+
const len0 = WASM_VECTOR_LEN;
|
|
1073
|
+
const ret = wasm.get_txs(ptr0, len0);
|
|
1074
|
+
return ret;
|
|
1075
|
+
}
|
|
1076
|
+
|
|
1077
|
+
/**
|
|
1078
|
+
* @param {string} payment_request
|
|
1079
|
+
* @param {string} token
|
|
1080
|
+
* @returns {Promise<any>}
|
|
1081
|
+
*/
|
|
1082
|
+
export function pay_invoice(payment_request, token) {
|
|
1083
|
+
const ptr0 = passStringToWasm0(payment_request, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
1084
|
+
const len0 = WASM_VECTOR_LEN;
|
|
1085
|
+
const ptr1 = passStringToWasm0(token, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
1086
|
+
const len1 = WASM_VECTOR_LEN;
|
|
1087
|
+
const ret = wasm.pay_invoice(ptr0, len0, ptr1, len1);
|
|
1088
|
+
return ret;
|
|
1089
|
+
}
|
|
1090
|
+
|
|
1091
|
+
/**
|
|
1092
|
+
* @param {string} payment_hash
|
|
1093
|
+
* @returns {Promise<any>}
|
|
1094
|
+
*/
|
|
1095
|
+
export function check_payment(payment_hash) {
|
|
1096
|
+
const ptr0 = passStringToWasm0(payment_hash, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
1097
|
+
const len0 = WASM_VECTOR_LEN;
|
|
1098
|
+
const ret = wasm.check_payment(ptr0, len0);
|
|
1099
|
+
return ret;
|
|
1100
|
+
}
|
|
1101
|
+
|
|
1102
|
+
/**
|
|
1103
|
+
* @param {string} token
|
|
1104
|
+
* @param {string | null} [ln_address]
|
|
1105
|
+
* @returns {Promise<any>}
|
|
1106
|
+
*/
|
|
1107
|
+
export function swap_btc_ln(token, ln_address) {
|
|
1108
|
+
const ptr0 = passStringToWasm0(token, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
1109
|
+
const len0 = WASM_VECTOR_LEN;
|
|
1110
|
+
var ptr1 = isLikeNone(ln_address) ? 0 : passStringToWasm0(ln_address, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
1111
|
+
var len1 = WASM_VECTOR_LEN;
|
|
1112
|
+
const ret = wasm.swap_btc_ln(ptr0, len0, ptr1, len1);
|
|
1113
|
+
return ret;
|
|
1114
|
+
}
|
|
1115
|
+
|
|
1116
|
+
/**
|
|
1117
|
+
* @param {string} address
|
|
1118
|
+
* @param {bigint} amount
|
|
1119
|
+
* @param {string} token
|
|
1120
|
+
* @returns {Promise<any>}
|
|
1121
|
+
*/
|
|
1122
|
+
export function swap_ln_btc(address, amount, token) {
|
|
1123
|
+
const ptr0 = passStringToWasm0(address, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
1124
|
+
const len0 = WASM_VECTOR_LEN;
|
|
1125
|
+
const ptr1 = passStringToWasm0(token, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
1126
|
+
const len1 = WASM_VECTOR_LEN;
|
|
1127
|
+
const ret = wasm.swap_ln_btc(ptr0, len0, amount, ptr1, len1);
|
|
1128
|
+
return ret;
|
|
1129
|
+
}
|
|
1130
|
+
|
|
1131
|
+
/**
|
|
1132
|
+
* @param {string} sk
|
|
1133
|
+
* @param {number} fee_rate
|
|
1134
|
+
* @param {any} secrets
|
|
1135
|
+
* @param {boolean} broadcast
|
|
1136
|
+
* @param {bigint | null | undefined} fund_value
|
|
1137
|
+
* @param {boolean} coordinator_fee
|
|
1138
|
+
* @returns {Promise<any>}
|
|
1139
|
+
*/
|
|
1140
|
+
export function fund_rgb_vault(sk, fee_rate, secrets, broadcast, fund_value, coordinator_fee) {
|
|
1141
|
+
const ptr0 = passStringToWasm0(sk, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
1142
|
+
const len0 = WASM_VECTOR_LEN;
|
|
1143
|
+
const ret = wasm.fund_rgb_vault(ptr0, len0, fee_rate, secrets, broadcast, !isLikeNone(fund_value), isLikeNone(fund_value) ? BigInt(0) : fund_value, coordinator_fee);
|
|
1144
|
+
return ret;
|
|
1145
|
+
}
|
|
1146
|
+
|
|
1147
|
+
/**
|
|
1148
|
+
* @param {string} sk
|
|
1149
|
+
* @param {string} address
|
|
1150
|
+
* @param {bigint} sats
|
|
1151
|
+
* @param {number} fee_rate
|
|
1152
|
+
* @param {any} secrets
|
|
1153
|
+
* @returns {Promise<any>}
|
|
1154
|
+
*/
|
|
1155
|
+
export function transfer_sats(sk, address, sats, fee_rate, secrets) {
|
|
1156
|
+
const ptr0 = passStringToWasm0(sk, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
1157
|
+
const len0 = WASM_VECTOR_LEN;
|
|
1158
|
+
const ptr1 = passStringToWasm0(address, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
1159
|
+
const len1 = WASM_VECTOR_LEN;
|
|
1160
|
+
const ret = wasm.transfer_sats(ptr0, len0, ptr1, len1, sats, fee_rate, secrets);
|
|
1161
|
+
return ret;
|
|
1162
|
+
}
|
|
1163
|
+
|
|
1164
|
+
/**
|
|
1165
|
+
* @param {string} sk
|
|
1166
|
+
* @returns {Promise<any>}
|
|
1167
|
+
*/
|
|
1168
|
+
export function get_btc_wallet(sk) {
|
|
1169
|
+
const ptr0 = passStringToWasm0(sk, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
1170
|
+
const len0 = WASM_VECTOR_LEN;
|
|
1171
|
+
const ret = wasm.get_btc_wallet(ptr0, len0);
|
|
1172
|
+
return ret;
|
|
1173
|
+
}
|
|
1174
|
+
|
|
1175
|
+
/**
|
|
1176
|
+
* @param {string} nostr_hex_sk
|
|
1177
|
+
* @returns {Promise<any>}
|
|
1178
|
+
*/
|
|
1179
|
+
export function backup_btc_data(nostr_hex_sk) {
|
|
1180
|
+
const ptr0 = passStringToWasm0(nostr_hex_sk, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
1181
|
+
const len0 = WASM_VECTOR_LEN;
|
|
1182
|
+
const ret = wasm.backup_btc_data(ptr0, len0);
|
|
1183
|
+
return ret;
|
|
1184
|
+
}
|
|
1185
|
+
|
|
1186
|
+
/**
|
|
1187
|
+
* @param {string} seed
|
|
1188
|
+
* @param {string} pass_phrase
|
|
1189
|
+
* @param {string} recover_address
|
|
1190
|
+
* @returns {Promise<any>}
|
|
1191
|
+
*/
|
|
1192
|
+
export function recover_funds_from_bad_wallets(seed, pass_phrase, recover_address) {
|
|
1193
|
+
const ptr0 = passStringToWasm0(seed, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
1194
|
+
const len0 = WASM_VECTOR_LEN;
|
|
1195
|
+
const ptr1 = passStringToWasm0(pass_phrase, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
1196
|
+
const len1 = WASM_VECTOR_LEN;
|
|
1197
|
+
const ptr2 = passStringToWasm0(recover_address, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
1198
|
+
const len2 = WASM_VECTOR_LEN;
|
|
1199
|
+
const ret = wasm.recover_funds_from_bad_wallets(ptr0, len0, ptr1, len1, ptr2, len2);
|
|
1200
|
+
return ret;
|
|
1201
|
+
}
|
|
1202
|
+
|
|
1203
|
+
/**
|
|
1204
|
+
* @param {string} nostr_hex_sk
|
|
1205
|
+
* @returns {Promise<any>}
|
|
1206
|
+
*/
|
|
1207
|
+
export function restore_btc_data(nostr_hex_sk) {
|
|
1208
|
+
const ptr0 = passStringToWasm0(nostr_hex_sk, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
1209
|
+
const len0 = WASM_VECTOR_LEN;
|
|
1210
|
+
const ret = wasm.restore_btc_data(ptr0, len0);
|
|
1211
|
+
return ret;
|
|
1212
|
+
}
|
|
1213
|
+
|
|
1214
|
+
/**
|
|
1215
|
+
* @param {string} pubkey
|
|
1216
|
+
* @param {string} token
|
|
1217
|
+
* @returns {Promise<any>}
|
|
1218
|
+
*/
|
|
1219
|
+
export function new_nostr_pubkey(pubkey, token) {
|
|
1220
|
+
const ptr0 = passStringToWasm0(pubkey, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
1221
|
+
const len0 = WASM_VECTOR_LEN;
|
|
1222
|
+
const ptr1 = passStringToWasm0(token, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
1223
|
+
const len1 = WASM_VECTOR_LEN;
|
|
1224
|
+
const ret = wasm.new_nostr_pubkey(ptr0, len0, ptr1, len1);
|
|
1225
|
+
return ret;
|
|
1226
|
+
}
|
|
1227
|
+
|
|
1228
|
+
/**
|
|
1229
|
+
* @param {string} pubkey
|
|
1230
|
+
* @param {string} token
|
|
1231
|
+
* @returns {Promise<any>}
|
|
1232
|
+
*/
|
|
1233
|
+
export function update_nostr_pubkey(pubkey, token) {
|
|
1234
|
+
const ptr0 = passStringToWasm0(pubkey, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
1235
|
+
const len0 = WASM_VECTOR_LEN;
|
|
1236
|
+
const ptr1 = passStringToWasm0(token, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
1237
|
+
const len1 = WASM_VECTOR_LEN;
|
|
1238
|
+
const ret = wasm.update_nostr_pubkey(ptr0, len0, ptr1, len1);
|
|
1239
|
+
return ret;
|
|
1240
|
+
}
|
|
1241
|
+
|
|
1242
|
+
/**
|
|
1243
|
+
* @param {string} password
|
|
1244
|
+
* @returns {string}
|
|
1245
|
+
*/
|
|
1246
|
+
export function hash_password(password) {
|
|
1247
|
+
let deferred2_0;
|
|
1248
|
+
let deferred2_1;
|
|
1249
|
+
try {
|
|
1250
|
+
const ptr0 = passStringToWasm0(password, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
1251
|
+
const len0 = WASM_VECTOR_LEN;
|
|
1252
|
+
const ret = wasm.hash_password(ptr0, len0);
|
|
1253
|
+
deferred2_0 = ret[0];
|
|
1254
|
+
deferred2_1 = ret[1];
|
|
1255
|
+
return getStringFromWasm0(ret[0], ret[1]);
|
|
1256
|
+
} finally {
|
|
1257
|
+
wasm.__wbindgen_free(deferred2_0, deferred2_1, 1);
|
|
1258
|
+
}
|
|
1259
|
+
}
|
|
1260
|
+
|
|
1261
|
+
/**
|
|
1262
|
+
* @param {string} password
|
|
1263
|
+
* @returns {Promise<any>}
|
|
1264
|
+
*/
|
|
1265
|
+
export function new_mnemonic(password) {
|
|
1266
|
+
const ptr0 = passStringToWasm0(password, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
1267
|
+
const len0 = WASM_VECTOR_LEN;
|
|
1268
|
+
const ret = wasm.new_mnemonic(ptr0, len0);
|
|
1269
|
+
return ret;
|
|
1270
|
+
}
|
|
1271
|
+
|
|
1272
|
+
/**
|
|
1273
|
+
* @param {string} seed
|
|
1274
|
+
* @param {string} password
|
|
1275
|
+
* @returns {Promise<any>}
|
|
1276
|
+
*/
|
|
1277
|
+
export function save_mnemonic(seed, password) {
|
|
1278
|
+
const ptr0 = passStringToWasm0(seed, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
1279
|
+
const len0 = WASM_VECTOR_LEN;
|
|
1280
|
+
const ptr1 = passStringToWasm0(password, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
1281
|
+
const len1 = WASM_VECTOR_LEN;
|
|
1282
|
+
const ret = wasm.save_mnemonic(ptr0, len0, ptr1, len1);
|
|
1283
|
+
return ret;
|
|
1284
|
+
}
|
|
1285
|
+
|
|
1286
|
+
/**
|
|
1287
|
+
* @param {string} hash
|
|
1288
|
+
* @param {string} encrypted_descriptors
|
|
1289
|
+
* @param {string} seed_password
|
|
1290
|
+
* @returns {Promise<any>}
|
|
1291
|
+
*/
|
|
1292
|
+
export function decrypt_wallet(hash, encrypted_descriptors, seed_password) {
|
|
1293
|
+
const ptr0 = passStringToWasm0(hash, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
1294
|
+
const len0 = WASM_VECTOR_LEN;
|
|
1295
|
+
const ptr1 = passStringToWasm0(encrypted_descriptors, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
1296
|
+
const len1 = WASM_VECTOR_LEN;
|
|
1297
|
+
const ptr2 = passStringToWasm0(seed_password, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
1298
|
+
const len2 = WASM_VECTOR_LEN;
|
|
1299
|
+
const ret = wasm.decrypt_wallet(ptr0, len0, ptr1, len1, ptr2, len2);
|
|
1300
|
+
return ret;
|
|
1301
|
+
}
|
|
1302
|
+
|
|
1303
|
+
/**
|
|
1304
|
+
* @param {string} hash
|
|
1305
|
+
* @param {string} encrypted_descriptors
|
|
1306
|
+
* @param {string} seed_password
|
|
1307
|
+
* @returns {Promise<any>}
|
|
1308
|
+
*/
|
|
1309
|
+
export function upgrade_wallet(hash, encrypted_descriptors, seed_password) {
|
|
1310
|
+
const ptr0 = passStringToWasm0(hash, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
1311
|
+
const len0 = WASM_VECTOR_LEN;
|
|
1312
|
+
const ptr1 = passStringToWasm0(encrypted_descriptors, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
1313
|
+
const len1 = WASM_VECTOR_LEN;
|
|
1314
|
+
const ptr2 = passStringToWasm0(seed_password, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
1315
|
+
const len2 = WASM_VECTOR_LEN;
|
|
1316
|
+
const ret = wasm.upgrade_wallet(ptr0, len0, ptr1, len1, ptr2, len2);
|
|
1317
|
+
return ret;
|
|
1318
|
+
}
|
|
1319
|
+
|
|
1320
|
+
/**
|
|
1321
|
+
* @param {string} hash
|
|
1322
|
+
* @param {string} seed_password
|
|
1323
|
+
* @returns {Promise<any>}
|
|
1324
|
+
*/
|
|
1325
|
+
export function new_wallet(hash, seed_password) {
|
|
1326
|
+
const ptr0 = passStringToWasm0(hash, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
1327
|
+
const len0 = WASM_VECTOR_LEN;
|
|
1328
|
+
const ptr1 = passStringToWasm0(seed_password, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
1329
|
+
const len1 = WASM_VECTOR_LEN;
|
|
1330
|
+
const ret = wasm.new_wallet(ptr0, len0, ptr1, len1);
|
|
1331
|
+
return ret;
|
|
1332
|
+
}
|
|
1333
|
+
|
|
1334
|
+
/**
|
|
1335
|
+
* @param {string} mnemonic
|
|
1336
|
+
* @param {string} hash
|
|
1337
|
+
* @param {string} seed_password
|
|
1338
|
+
* @returns {Promise<any>}
|
|
1339
|
+
*/
|
|
1340
|
+
export function encrypt_wallet(mnemonic, hash, seed_password) {
|
|
1341
|
+
const ptr0 = passStringToWasm0(mnemonic, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
1342
|
+
const len0 = WASM_VECTOR_LEN;
|
|
1343
|
+
const ptr1 = passStringToWasm0(hash, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
1344
|
+
const len1 = WASM_VECTOR_LEN;
|
|
1345
|
+
const ptr2 = passStringToWasm0(seed_password, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
1346
|
+
const len2 = WASM_VECTOR_LEN;
|
|
1347
|
+
const ret = wasm.encrypt_wallet(ptr0, len0, ptr1, len1, ptr2, len2);
|
|
1348
|
+
return ret;
|
|
1349
|
+
}
|
|
1350
|
+
|
|
1351
|
+
/**
|
|
1352
|
+
* @param {string} descriptor
|
|
1353
|
+
* @param {string | null} [change_descriptor]
|
|
1354
|
+
* @returns {Promise<any>}
|
|
1355
|
+
*/
|
|
1356
|
+
export function get_wallet_data(descriptor, change_descriptor) {
|
|
1357
|
+
const ptr0 = passStringToWasm0(descriptor, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
1358
|
+
const len0 = WASM_VECTOR_LEN;
|
|
1359
|
+
var ptr1 = isLikeNone(change_descriptor) ? 0 : passStringToWasm0(change_descriptor, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
1360
|
+
var len1 = WASM_VECTOR_LEN;
|
|
1361
|
+
const ret = wasm.get_wallet_data(ptr0, len0, ptr1, len1);
|
|
1362
|
+
return ret;
|
|
1363
|
+
}
|
|
1364
|
+
|
|
1365
|
+
/**
|
|
1366
|
+
* @returns {Promise<any>}
|
|
1367
|
+
*/
|
|
1368
|
+
export function sync_wallets() {
|
|
1369
|
+
const ret = wasm.sync_wallets();
|
|
1370
|
+
return ret;
|
|
1371
|
+
}
|
|
1372
|
+
|
|
1373
|
+
/**
|
|
1374
|
+
* @param {string} descriptor
|
|
1375
|
+
* @param {string | null} [change_descriptor]
|
|
1376
|
+
* @returns {Promise<any>}
|
|
1377
|
+
*/
|
|
1378
|
+
export function get_new_address(descriptor, change_descriptor) {
|
|
1379
|
+
const ptr0 = passStringToWasm0(descriptor, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
1380
|
+
const len0 = WASM_VECTOR_LEN;
|
|
1381
|
+
var ptr1 = isLikeNone(change_descriptor) ? 0 : passStringToWasm0(change_descriptor, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
1382
|
+
var len1 = WASM_VECTOR_LEN;
|
|
1383
|
+
const ret = wasm.get_new_address(ptr0, len0, ptr1, len1);
|
|
1384
|
+
return ret;
|
|
1385
|
+
}
|
|
1386
|
+
|
|
1387
|
+
/**
|
|
1388
|
+
* @param {string} descriptor
|
|
1389
|
+
* @param {string} change_descriptor
|
|
1390
|
+
* @param {string} destination
|
|
1391
|
+
* @param {bigint} amount
|
|
1392
|
+
* @param {boolean} broadcast
|
|
1393
|
+
* @param {number | null} [fee_rate]
|
|
1394
|
+
* @returns {Promise<any>}
|
|
1395
|
+
*/
|
|
1396
|
+
export function send_sats(descriptor, change_descriptor, destination, amount, broadcast, fee_rate) {
|
|
1397
|
+
const ptr0 = passStringToWasm0(descriptor, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
1398
|
+
const len0 = WASM_VECTOR_LEN;
|
|
1399
|
+
const ptr1 = passStringToWasm0(change_descriptor, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
1400
|
+
const len1 = WASM_VECTOR_LEN;
|
|
1401
|
+
const ptr2 = passStringToWasm0(destination, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
1402
|
+
const len2 = WASM_VECTOR_LEN;
|
|
1403
|
+
const ret = wasm.send_sats(ptr0, len0, ptr1, len1, ptr2, len2, amount, broadcast, isLikeNone(fee_rate) ? 0x100000001 : Math.fround(fee_rate));
|
|
1404
|
+
return ret;
|
|
1405
|
+
}
|
|
1406
|
+
|
|
1407
|
+
/**
|
|
1408
|
+
* @param {string} descriptor
|
|
1409
|
+
* @param {string} change_descriptor
|
|
1410
|
+
* @param {string} rgb_address
|
|
1411
|
+
* @param {boolean} broadcast
|
|
1412
|
+
* @param {number | null} [fee_rate]
|
|
1413
|
+
* @returns {Promise<any>}
|
|
1414
|
+
*/
|
|
1415
|
+
export function fund_vault(descriptor, change_descriptor, rgb_address, broadcast, fee_rate) {
|
|
1416
|
+
const ptr0 = passStringToWasm0(descriptor, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
1417
|
+
const len0 = WASM_VECTOR_LEN;
|
|
1418
|
+
const ptr1 = passStringToWasm0(change_descriptor, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
1419
|
+
const len1 = WASM_VECTOR_LEN;
|
|
1420
|
+
const ptr2 = passStringToWasm0(rgb_address, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
1421
|
+
const len2 = WASM_VECTOR_LEN;
|
|
1422
|
+
const ret = wasm.fund_vault(ptr0, len0, ptr1, len1, ptr2, len2, broadcast, isLikeNone(fee_rate) ? 0x100000001 : Math.fround(fee_rate));
|
|
1423
|
+
return ret;
|
|
1424
|
+
}
|
|
1425
|
+
|
|
1426
|
+
/**
|
|
1427
|
+
* @param {string} rgb_descriptor_xpub
|
|
1428
|
+
* @returns {Promise<any>}
|
|
1429
|
+
*/
|
|
1430
|
+
export function get_assets_vault(rgb_descriptor_xpub) {
|
|
1431
|
+
const ptr0 = passStringToWasm0(rgb_descriptor_xpub, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
1432
|
+
const len0 = WASM_VECTOR_LEN;
|
|
1433
|
+
const ret = wasm.get_assets_vault(ptr0, len0);
|
|
1434
|
+
return ret;
|
|
1435
|
+
}
|
|
1436
|
+
|
|
1437
|
+
/**
|
|
1438
|
+
* @param {string} destination
|
|
1439
|
+
* @param {string} descriptor
|
|
1440
|
+
* @param {string | null} [change_descriptor]
|
|
1441
|
+
* @param {number | null} [fee_rate]
|
|
1442
|
+
* @returns {Promise<any>}
|
|
1443
|
+
*/
|
|
1444
|
+
export function drain_wallet(destination, descriptor, change_descriptor, fee_rate) {
|
|
1445
|
+
const ptr0 = passStringToWasm0(destination, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
1446
|
+
const len0 = WASM_VECTOR_LEN;
|
|
1447
|
+
const ptr1 = passStringToWasm0(descriptor, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
1448
|
+
const len1 = WASM_VECTOR_LEN;
|
|
1449
|
+
var ptr2 = isLikeNone(change_descriptor) ? 0 : passStringToWasm0(change_descriptor, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
1450
|
+
var len2 = WASM_VECTOR_LEN;
|
|
1451
|
+
const ret = wasm.drain_wallet(ptr0, len0, ptr1, len1, ptr2, len2, isLikeNone(fee_rate) ? 0x100000001 : Math.fround(fee_rate));
|
|
1452
|
+
return ret;
|
|
1453
|
+
}
|
|
1454
|
+
|
|
1455
|
+
/**
|
|
1456
|
+
* @param {string} txid
|
|
1457
|
+
* @param {number} fee_rate
|
|
1458
|
+
* @param {string} descriptor
|
|
1459
|
+
* @param {string | null | undefined} change_descriptor
|
|
1460
|
+
* @param {boolean} broadcast
|
|
1461
|
+
* @returns {Promise<any>}
|
|
1462
|
+
*/
|
|
1463
|
+
export function bump_fee(txid, fee_rate, descriptor, change_descriptor, broadcast) {
|
|
1464
|
+
const ptr0 = passStringToWasm0(txid, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
1465
|
+
const len0 = WASM_VECTOR_LEN;
|
|
1466
|
+
const ptr1 = passStringToWasm0(descriptor, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
1467
|
+
const len1 = WASM_VECTOR_LEN;
|
|
1468
|
+
var ptr2 = isLikeNone(change_descriptor) ? 0 : passStringToWasm0(change_descriptor, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
1469
|
+
var len2 = WASM_VECTOR_LEN;
|
|
1470
|
+
const ret = wasm.bump_fee(ptr0, len0, fee_rate, ptr1, len1, ptr2, len2, broadcast);
|
|
1471
|
+
return ret;
|
|
1472
|
+
}
|
|
1473
|
+
|
|
1474
|
+
/**
|
|
1475
|
+
* @param {any} request
|
|
1476
|
+
* @returns {Promise<any>}
|
|
1477
|
+
*/
|
|
1478
|
+
export function psbt_sign_and_publish_file(request) {
|
|
1479
|
+
const ret = wasm.psbt_sign_and_publish_file(request);
|
|
1480
|
+
return ret;
|
|
1481
|
+
}
|
|
1482
|
+
|
|
1483
|
+
/**
|
|
1484
|
+
* @param {any} request
|
|
1485
|
+
* @returns {Promise<any>}
|
|
1486
|
+
*/
|
|
1487
|
+
export function psbt_publish_file(request) {
|
|
1488
|
+
const ret = wasm.psbt_publish_file(request);
|
|
1489
|
+
return ret;
|
|
1490
|
+
}
|
|
1491
|
+
|
|
1492
|
+
function __wbg_adapter_54(arg0, arg1, arg2) {
|
|
1493
|
+
wasm.closure1856_externref_shim(arg0, arg1, arg2);
|
|
1494
|
+
}
|
|
1495
|
+
|
|
1496
|
+
function __wbg_adapter_57(arg0, arg1, arg2) {
|
|
1497
|
+
wasm.closure1997_externref_shim(arg0, arg1, arg2);
|
|
1498
|
+
}
|
|
1499
|
+
|
|
1500
|
+
function __wbg_adapter_60(arg0, arg1, arg2) {
|
|
1501
|
+
wasm.closure2665_externref_shim(arg0, arg1, arg2);
|
|
1502
|
+
}
|
|
1503
|
+
|
|
1504
|
+
function __wbg_adapter_63(arg0, arg1, arg2) {
|
|
1505
|
+
wasm.closure3825_externref_shim(arg0, arg1, arg2);
|
|
1506
|
+
}
|
|
1507
|
+
|
|
1508
|
+
function __wbg_adapter_416(arg0, arg1, arg2, arg3) {
|
|
1509
|
+
wasm.closure4113_externref_shim(arg0, arg1, arg2, arg3);
|
|
1510
|
+
}
|
|
1511
|
+
|
|
1512
|
+
const __wbindgen_enum_IdbTransactionMode = ["readonly", "readwrite", "versionchange", "readwriteflush", "cleanup"];
|
|
1513
|
+
|
|
1514
|
+
const __wbindgen_enum_RequestCredentials = ["omit", "same-origin", "include"];
|
|
1515
|
+
|
|
1516
|
+
const __wbindgen_enum_RequestMode = ["same-origin", "no-cors", "cors", "navigate"];
|
|
1517
|
+
|
|
1518
|
+
async function __wbg_load(module, imports) {
|
|
1519
|
+
if (typeof Response === 'function' && module instanceof Response) {
|
|
1520
|
+
if (typeof WebAssembly.instantiateStreaming === 'function') {
|
|
1521
|
+
try {
|
|
1522
|
+
return await WebAssembly.instantiateStreaming(module, imports);
|
|
1523
|
+
|
|
1524
|
+
} catch (e) {
|
|
1525
|
+
if (module.headers.get('Content-Type') != 'application/wasm') {
|
|
1526
|
+
console.warn("`WebAssembly.instantiateStreaming` failed because your server does not serve Wasm with `application/wasm` MIME type. Falling back to `WebAssembly.instantiate` which is slower. Original error:\n", e);
|
|
1527
|
+
|
|
1528
|
+
} else {
|
|
1529
|
+
throw e;
|
|
1530
|
+
}
|
|
1531
|
+
}
|
|
1532
|
+
}
|
|
1533
|
+
|
|
1534
|
+
const bytes = await module.arrayBuffer();
|
|
1535
|
+
return await WebAssembly.instantiate(bytes, imports);
|
|
1536
|
+
|
|
1537
|
+
} else {
|
|
1538
|
+
const instance = await WebAssembly.instantiate(module, imports);
|
|
1539
|
+
|
|
1540
|
+
if (instance instanceof WebAssembly.Instance) {
|
|
1541
|
+
return { instance, module };
|
|
1542
|
+
|
|
1543
|
+
} else {
|
|
1544
|
+
return instance;
|
|
1545
|
+
}
|
|
1546
|
+
}
|
|
1547
|
+
}
|
|
1548
|
+
|
|
1549
|
+
function __wbg_get_imports() {
|
|
1550
|
+
const imports = {};
|
|
1551
|
+
imports.wbg = {};
|
|
1552
|
+
imports.wbg.__wbg_String_8f0eb39a4a4c2f66 = function(arg0, arg1) {
|
|
1553
|
+
const ret = String(arg1);
|
|
1554
|
+
const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
1555
|
+
const len1 = WASM_VECTOR_LEN;
|
|
1556
|
+
getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true);
|
|
1557
|
+
getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);
|
|
1558
|
+
};
|
|
1559
|
+
imports.wbg.__wbg_abort_775ef1d17fc65868 = function(arg0) {
|
|
1560
|
+
arg0.abort();
|
|
1561
|
+
};
|
|
1562
|
+
imports.wbg.__wbg_allSettled_d6c2eb0382f2fff9 = function(arg0) {
|
|
1563
|
+
const ret = Promise.allSettled(arg0);
|
|
1564
|
+
return ret;
|
|
1565
|
+
};
|
|
1566
|
+
imports.wbg.__wbg_any_8f7b1d9e103c57f1 = function(arg0) {
|
|
1567
|
+
const ret = Promise.any(arg0);
|
|
1568
|
+
return ret;
|
|
1569
|
+
};
|
|
1570
|
+
imports.wbg.__wbg_append_299d5d48292c0495 = function() { return handleError(function (arg0, arg1, arg2, arg3, arg4) {
|
|
1571
|
+
arg0.append(getStringFromWasm0(arg1, arg2), getStringFromWasm0(arg3, arg4));
|
|
1572
|
+
}, arguments) };
|
|
1573
|
+
imports.wbg.__wbg_append_8c7dd8d641a5f01b = function() { return handleError(function (arg0, arg1, arg2, arg3, arg4) {
|
|
1574
|
+
arg0.append(getStringFromWasm0(arg1, arg2), getStringFromWasm0(arg3, arg4));
|
|
1575
|
+
}, arguments) };
|
|
1576
|
+
imports.wbg.__wbg_append_b2d1fc16de2a0e81 = function() { return handleError(function (arg0, arg1, arg2, arg3, arg4, arg5) {
|
|
1577
|
+
arg0.append(getStringFromWasm0(arg1, arg2), arg3, getStringFromWasm0(arg4, arg5));
|
|
1578
|
+
}, arguments) };
|
|
1579
|
+
imports.wbg.__wbg_append_b44785ebeb668479 = function() { return handleError(function (arg0, arg1, arg2, arg3) {
|
|
1580
|
+
arg0.append(getStringFromWasm0(arg1, arg2), arg3);
|
|
1581
|
+
}, arguments) };
|
|
1582
|
+
imports.wbg.__wbg_arrayBuffer_d1b44c4390db422f = function() { return handleError(function (arg0) {
|
|
1583
|
+
const ret = arg0.arrayBuffer();
|
|
1584
|
+
return ret;
|
|
1585
|
+
}, arguments) };
|
|
1586
|
+
imports.wbg.__wbg_buffer_609cc3eee51ed158 = function(arg0) {
|
|
1587
|
+
const ret = arg0.buffer;
|
|
1588
|
+
return ret;
|
|
1589
|
+
};
|
|
1590
|
+
imports.wbg.__wbg_call_672a4d21634d4a24 = function() { return handleError(function (arg0, arg1) {
|
|
1591
|
+
const ret = arg0.call(arg1);
|
|
1592
|
+
return ret;
|
|
1593
|
+
}, arguments) };
|
|
1594
|
+
imports.wbg.__wbg_call_7cccdd69e0791ae2 = function() { return handleError(function (arg0, arg1, arg2) {
|
|
1595
|
+
const ret = arg0.call(arg1, arg2);
|
|
1596
|
+
return ret;
|
|
1597
|
+
}, arguments) };
|
|
1598
|
+
imports.wbg.__wbg_close_26fc2e6856d8567a = function(arg0) {
|
|
1599
|
+
arg0.close();
|
|
1600
|
+
};
|
|
1601
|
+
imports.wbg.__wbg_commit_ee33ba79d75a9134 = function() { return handleError(function (arg0) {
|
|
1602
|
+
arg0.commit();
|
|
1603
|
+
}, arguments) };
|
|
1604
|
+
imports.wbg.__wbg_createIndex_873ac48adc772309 = function() { return handleError(function (arg0, arg1, arg2, arg3, arg4) {
|
|
1605
|
+
const ret = arg0.createIndex(getStringFromWasm0(arg1, arg2), arg3, arg4);
|
|
1606
|
+
return ret;
|
|
1607
|
+
}, arguments) };
|
|
1608
|
+
imports.wbg.__wbg_createObjectStore_d2f9e1016f4d81b9 = function() { return handleError(function (arg0, arg1, arg2, arg3) {
|
|
1609
|
+
const ret = arg0.createObjectStore(getStringFromWasm0(arg1, arg2), arg3);
|
|
1610
|
+
return ret;
|
|
1611
|
+
}, arguments) };
|
|
1612
|
+
imports.wbg.__wbg_crypto_8b2f439d7d40e47c = function(arg0) {
|
|
1613
|
+
const ret = arg0.crypto;
|
|
1614
|
+
return ret;
|
|
1615
|
+
};
|
|
1616
|
+
imports.wbg.__wbg_debug_07010e9cfe65fce9 = function(arg0, arg1) {
|
|
1617
|
+
var v0 = getArrayJsValueFromWasm0(arg0, arg1).slice();
|
|
1618
|
+
wasm.__wbindgen_free(arg0, arg1 * 4, 4);
|
|
1619
|
+
console.debug(...v0);
|
|
1620
|
+
};
|
|
1621
|
+
imports.wbg.__wbg_deleteDatabase_b8f234aeb7ad3452 = function() { return handleError(function (arg0, arg1, arg2) {
|
|
1622
|
+
const ret = arg0.deleteDatabase(getStringFromWasm0(arg1, arg2));
|
|
1623
|
+
return ret;
|
|
1624
|
+
}, arguments) };
|
|
1625
|
+
imports.wbg.__wbg_deleteIndex_e6717aa0e9691894 = function() { return handleError(function (arg0, arg1, arg2) {
|
|
1626
|
+
arg0.deleteIndex(getStringFromWasm0(arg1, arg2));
|
|
1627
|
+
}, arguments) };
|
|
1628
|
+
imports.wbg.__wbg_deleteObjectStore_3f08ae00cd288224 = function() { return handleError(function (arg0, arg1, arg2) {
|
|
1629
|
+
arg0.deleteObjectStore(getStringFromWasm0(arg1, arg2));
|
|
1630
|
+
}, arguments) };
|
|
1631
|
+
imports.wbg.__wbg_done_769e5ede4b31c67b = function(arg0) {
|
|
1632
|
+
const ret = arg0.done;
|
|
1633
|
+
return ret;
|
|
1634
|
+
};
|
|
1635
|
+
imports.wbg.__wbg_entries_3265d4158b33e5dc = function(arg0) {
|
|
1636
|
+
const ret = Object.entries(arg0);
|
|
1637
|
+
return ret;
|
|
1638
|
+
};
|
|
1639
|
+
imports.wbg.__wbg_error_3c7d958458bf649b = function(arg0, arg1) {
|
|
1640
|
+
var v0 = getArrayJsValueFromWasm0(arg0, arg1).slice();
|
|
1641
|
+
wasm.__wbindgen_free(arg0, arg1 * 4, 4);
|
|
1642
|
+
console.error(...v0);
|
|
1643
|
+
};
|
|
1644
|
+
imports.wbg.__wbg_error_7534b8e9a36f1ab4 = function(arg0, arg1) {
|
|
1645
|
+
let deferred0_0;
|
|
1646
|
+
let deferred0_1;
|
|
1647
|
+
try {
|
|
1648
|
+
deferred0_0 = arg0;
|
|
1649
|
+
deferred0_1 = arg1;
|
|
1650
|
+
console.error(getStringFromWasm0(arg0, arg1));
|
|
1651
|
+
} finally {
|
|
1652
|
+
wasm.__wbindgen_free(deferred0_0, deferred0_1, 1);
|
|
1653
|
+
}
|
|
1654
|
+
};
|
|
1655
|
+
imports.wbg.__wbg_error_e9332df4e7a14612 = function(arg0) {
|
|
1656
|
+
const ret = arg0.error;
|
|
1657
|
+
return isLikeNone(ret) ? 0 : addToExternrefTable0(ret);
|
|
1658
|
+
};
|
|
1659
|
+
imports.wbg.__wbg_error_ff4ddaabdfc5dbb3 = function() { return handleError(function (arg0) {
|
|
1660
|
+
const ret = arg0.error;
|
|
1661
|
+
return isLikeNone(ret) ? 0 : addToExternrefTable0(ret);
|
|
1662
|
+
}, arguments) };
|
|
1663
|
+
imports.wbg.__wbg_fetch_509096533071c657 = function(arg0, arg1) {
|
|
1664
|
+
const ret = arg0.fetch(arg1);
|
|
1665
|
+
return ret;
|
|
1666
|
+
};
|
|
1667
|
+
imports.wbg.__wbg_fetch_6397c767b06a0785 = function(arg0) {
|
|
1668
|
+
const ret = fetch(arg0);
|
|
1669
|
+
return ret;
|
|
1670
|
+
};
|
|
1671
|
+
imports.wbg.__wbg_fetch_b335d17f45a8b5a1 = function(arg0) {
|
|
1672
|
+
const ret = fetch(arg0);
|
|
1673
|
+
return ret;
|
|
1674
|
+
};
|
|
1675
|
+
imports.wbg.__wbg_fetch_b7bf320f681242d2 = function(arg0, arg1) {
|
|
1676
|
+
const ret = arg0.fetch(arg1);
|
|
1677
|
+
return ret;
|
|
1678
|
+
};
|
|
1679
|
+
imports.wbg.__wbg_getRandomValues_1c61fac11405ffdc = function() { return handleError(function (arg0, arg1) {
|
|
1680
|
+
globalThis.crypto.getRandomValues(getArrayU8FromWasm0(arg0, arg1));
|
|
1681
|
+
}, arguments) };
|
|
1682
|
+
imports.wbg.__wbg_getRandomValues_7b17ba35056bcdd1 = function() { return handleError(function (arg0, arg1) {
|
|
1683
|
+
arg0.getRandomValues(arg1);
|
|
1684
|
+
}, arguments) };
|
|
1685
|
+
imports.wbg.__wbg_getTime_46267b1c24877e30 = function(arg0) {
|
|
1686
|
+
const ret = arg0.getTime();
|
|
1687
|
+
return ret;
|
|
1688
|
+
};
|
|
1689
|
+
imports.wbg.__wbg_get_4f73335ab78445db = function(arg0, arg1, arg2) {
|
|
1690
|
+
const ret = arg1[arg2 >>> 0];
|
|
1691
|
+
var ptr1 = isLikeNone(ret) ? 0 : passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
1692
|
+
var len1 = WASM_VECTOR_LEN;
|
|
1693
|
+
getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true);
|
|
1694
|
+
getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);
|
|
1695
|
+
};
|
|
1696
|
+
imports.wbg.__wbg_get_67b2ba62fc30de12 = function() { return handleError(function (arg0, arg1) {
|
|
1697
|
+
const ret = Reflect.get(arg0, arg1);
|
|
1698
|
+
return ret;
|
|
1699
|
+
}, arguments) };
|
|
1700
|
+
imports.wbg.__wbg_get_8da03f81f6a1111e = function() { return handleError(function (arg0, arg1) {
|
|
1701
|
+
const ret = arg0.get(arg1);
|
|
1702
|
+
return ret;
|
|
1703
|
+
}, arguments) };
|
|
1704
|
+
imports.wbg.__wbg_get_b9b93047fe3cf45b = function(arg0, arg1) {
|
|
1705
|
+
const ret = arg0[arg1 >>> 0];
|
|
1706
|
+
return ret;
|
|
1707
|
+
};
|
|
1708
|
+
imports.wbg.__wbg_getwithrefkey_1dc361bd10053bfe = function(arg0, arg1) {
|
|
1709
|
+
const ret = arg0[arg1];
|
|
1710
|
+
return ret;
|
|
1711
|
+
};
|
|
1712
|
+
imports.wbg.__wbg_has_a5ea9117f258a0ec = function() { return handleError(function (arg0, arg1) {
|
|
1713
|
+
const ret = Reflect.has(arg0, arg1);
|
|
1714
|
+
return ret;
|
|
1715
|
+
}, arguments) };
|
|
1716
|
+
imports.wbg.__wbg_headers_9cb51cfd2ac780a4 = function(arg0) {
|
|
1717
|
+
const ret = arg0.headers;
|
|
1718
|
+
return ret;
|
|
1719
|
+
};
|
|
1720
|
+
imports.wbg.__wbg_indexNames_0ed82a19d7d88aa3 = function(arg0) {
|
|
1721
|
+
const ret = arg0.indexNames;
|
|
1722
|
+
return ret;
|
|
1723
|
+
};
|
|
1724
|
+
imports.wbg.__wbg_index_e00ca5fff206ee3e = function() { return handleError(function (arg0, arg1, arg2) {
|
|
1725
|
+
const ret = arg0.index(getStringFromWasm0(arg1, arg2));
|
|
1726
|
+
return ret;
|
|
1727
|
+
}, arguments) };
|
|
1728
|
+
imports.wbg.__wbg_info_638bd7b680bce79d = function(arg0, arg1) {
|
|
1729
|
+
var v0 = getArrayJsValueFromWasm0(arg0, arg1).slice();
|
|
1730
|
+
wasm.__wbindgen_free(arg0, arg1 * 4, 4);
|
|
1731
|
+
console.info(...v0);
|
|
1732
|
+
};
|
|
1733
|
+
imports.wbg.__wbg_instanceof_ArrayBuffer_e14585432e3737fc = function(arg0) {
|
|
1734
|
+
let result;
|
|
1735
|
+
try {
|
|
1736
|
+
result = arg0 instanceof ArrayBuffer;
|
|
1737
|
+
} catch (_) {
|
|
1738
|
+
result = false;
|
|
1739
|
+
}
|
|
1740
|
+
const ret = result;
|
|
1741
|
+
return ret;
|
|
1742
|
+
};
|
|
1743
|
+
imports.wbg.__wbg_instanceof_Error_4d54113b22d20306 = function(arg0) {
|
|
1744
|
+
let result;
|
|
1745
|
+
try {
|
|
1746
|
+
result = arg0 instanceof Error;
|
|
1747
|
+
} catch (_) {
|
|
1748
|
+
result = false;
|
|
1749
|
+
}
|
|
1750
|
+
const ret = result;
|
|
1751
|
+
return ret;
|
|
1752
|
+
};
|
|
1753
|
+
imports.wbg.__wbg_instanceof_IdbDatabase_a3ef009ca00059f9 = function(arg0) {
|
|
1754
|
+
let result;
|
|
1755
|
+
try {
|
|
1756
|
+
result = arg0 instanceof IDBDatabase;
|
|
1757
|
+
} catch (_) {
|
|
1758
|
+
result = false;
|
|
1759
|
+
}
|
|
1760
|
+
const ret = result;
|
|
1761
|
+
return ret;
|
|
1762
|
+
};
|
|
1763
|
+
imports.wbg.__wbg_instanceof_IdbFactory_12eaba3366f4302f = function(arg0) {
|
|
1764
|
+
let result;
|
|
1765
|
+
try {
|
|
1766
|
+
result = arg0 instanceof IDBFactory;
|
|
1767
|
+
} catch (_) {
|
|
1768
|
+
result = false;
|
|
1769
|
+
}
|
|
1770
|
+
const ret = result;
|
|
1771
|
+
return ret;
|
|
1772
|
+
};
|
|
1773
|
+
imports.wbg.__wbg_instanceof_IdbOpenDbRequest_a3416e156c9db893 = function(arg0) {
|
|
1774
|
+
let result;
|
|
1775
|
+
try {
|
|
1776
|
+
result = arg0 instanceof IDBOpenDBRequest;
|
|
1777
|
+
} catch (_) {
|
|
1778
|
+
result = false;
|
|
1779
|
+
}
|
|
1780
|
+
const ret = result;
|
|
1781
|
+
return ret;
|
|
1782
|
+
};
|
|
1783
|
+
imports.wbg.__wbg_instanceof_IdbRequest_4813c3f207666aa4 = function(arg0) {
|
|
1784
|
+
let result;
|
|
1785
|
+
try {
|
|
1786
|
+
result = arg0 instanceof IDBRequest;
|
|
1787
|
+
} catch (_) {
|
|
1788
|
+
result = false;
|
|
1789
|
+
}
|
|
1790
|
+
const ret = result;
|
|
1791
|
+
return ret;
|
|
1792
|
+
};
|
|
1793
|
+
imports.wbg.__wbg_instanceof_IdbTransaction_746ea660d347650d = function(arg0) {
|
|
1794
|
+
let result;
|
|
1795
|
+
try {
|
|
1796
|
+
result = arg0 instanceof IDBTransaction;
|
|
1797
|
+
} catch (_) {
|
|
1798
|
+
result = false;
|
|
1799
|
+
}
|
|
1800
|
+
const ret = result;
|
|
1801
|
+
return ret;
|
|
1802
|
+
};
|
|
1803
|
+
imports.wbg.__wbg_instanceof_Response_f2cc20d9f7dfd644 = function(arg0) {
|
|
1804
|
+
let result;
|
|
1805
|
+
try {
|
|
1806
|
+
result = arg0 instanceof Response;
|
|
1807
|
+
} catch (_) {
|
|
1808
|
+
result = false;
|
|
1809
|
+
}
|
|
1810
|
+
const ret = result;
|
|
1811
|
+
return ret;
|
|
1812
|
+
};
|
|
1813
|
+
imports.wbg.__wbg_instanceof_Uint8Array_17156bcf118086a9 = function(arg0) {
|
|
1814
|
+
let result;
|
|
1815
|
+
try {
|
|
1816
|
+
result = arg0 instanceof Uint8Array;
|
|
1817
|
+
} catch (_) {
|
|
1818
|
+
result = false;
|
|
1819
|
+
}
|
|
1820
|
+
const ret = result;
|
|
1821
|
+
return ret;
|
|
1822
|
+
};
|
|
1823
|
+
imports.wbg.__wbg_instanceof_Window_def73ea0955fc569 = function(arg0) {
|
|
1824
|
+
let result;
|
|
1825
|
+
try {
|
|
1826
|
+
result = arg0 instanceof Window;
|
|
1827
|
+
} catch (_) {
|
|
1828
|
+
result = false;
|
|
1829
|
+
}
|
|
1830
|
+
const ret = result;
|
|
1831
|
+
return ret;
|
|
1832
|
+
};
|
|
1833
|
+
imports.wbg.__wbg_instanceof_WorkerGlobalScope_dbdbdea7e3b56493 = function(arg0) {
|
|
1834
|
+
let result;
|
|
1835
|
+
try {
|
|
1836
|
+
result = arg0 instanceof WorkerGlobalScope;
|
|
1837
|
+
} catch (_) {
|
|
1838
|
+
result = false;
|
|
1839
|
+
}
|
|
1840
|
+
const ret = result;
|
|
1841
|
+
return ret;
|
|
1842
|
+
};
|
|
1843
|
+
imports.wbg.__wbg_isArray_a1eab7e0d067391b = function(arg0) {
|
|
1844
|
+
const ret = Array.isArray(arg0);
|
|
1845
|
+
return ret;
|
|
1846
|
+
};
|
|
1847
|
+
imports.wbg.__wbg_isSafeInteger_343e2beeeece1bb0 = function(arg0) {
|
|
1848
|
+
const ret = Number.isSafeInteger(arg0);
|
|
1849
|
+
return ret;
|
|
1850
|
+
};
|
|
1851
|
+
imports.wbg.__wbg_iterator_9a24c88df860dc65 = function() {
|
|
1852
|
+
const ret = Symbol.iterator;
|
|
1853
|
+
return ret;
|
|
1854
|
+
};
|
|
1855
|
+
imports.wbg.__wbg_keyPath_443ecf3f74202169 = function() { return handleError(function (arg0) {
|
|
1856
|
+
const ret = arg0.keyPath;
|
|
1857
|
+
return ret;
|
|
1858
|
+
}, arguments) };
|
|
1859
|
+
imports.wbg.__wbg_length_52b6c4580c5ec934 = function(arg0) {
|
|
1860
|
+
const ret = arg0.length;
|
|
1861
|
+
return ret;
|
|
1862
|
+
};
|
|
1863
|
+
imports.wbg.__wbg_length_a446193dc22c12f8 = function(arg0) {
|
|
1864
|
+
const ret = arg0.length;
|
|
1865
|
+
return ret;
|
|
1866
|
+
};
|
|
1867
|
+
imports.wbg.__wbg_length_e2d2a49132c1b256 = function(arg0) {
|
|
1868
|
+
const ret = arg0.length;
|
|
1869
|
+
return ret;
|
|
1870
|
+
};
|
|
1871
|
+
imports.wbg.__wbg_log_c222819a41e063d3 = function(arg0) {
|
|
1872
|
+
console.log(arg0);
|
|
1873
|
+
};
|
|
1874
|
+
imports.wbg.__wbg_message_97a2af9b89d693a3 = function(arg0) {
|
|
1875
|
+
const ret = arg0.message;
|
|
1876
|
+
return ret;
|
|
1877
|
+
};
|
|
1878
|
+
imports.wbg.__wbg_msCrypto_592a45e469d83ced = function(arg0) {
|
|
1879
|
+
const ret = arg0.msCrypto;
|
|
1880
|
+
return ret;
|
|
1881
|
+
};
|
|
1882
|
+
imports.wbg.__wbg_multiEntry_c146ebd38a5de9ea = function(arg0) {
|
|
1883
|
+
const ret = arg0.multiEntry;
|
|
1884
|
+
return ret;
|
|
1885
|
+
};
|
|
1886
|
+
imports.wbg.__wbg_name_0b327d569f00ebee = function(arg0) {
|
|
1887
|
+
const ret = arg0.name;
|
|
1888
|
+
return ret;
|
|
1889
|
+
};
|
|
1890
|
+
imports.wbg.__wbg_new0_f788a2397c7ca929 = function() {
|
|
1891
|
+
const ret = new Date();
|
|
1892
|
+
return ret;
|
|
1893
|
+
};
|
|
1894
|
+
imports.wbg.__wbg_new_018dcc2d6c8c2f6a = function() { return handleError(function () {
|
|
1895
|
+
const ret = new Headers();
|
|
1896
|
+
return ret;
|
|
1897
|
+
}, arguments) };
|
|
1898
|
+
imports.wbg.__wbg_new_23a2665fac83c611 = function(arg0, arg1) {
|
|
1899
|
+
try {
|
|
1900
|
+
var state0 = {a: arg0, b: arg1};
|
|
1901
|
+
var cb0 = (arg0, arg1) => {
|
|
1902
|
+
const a = state0.a;
|
|
1903
|
+
state0.a = 0;
|
|
1904
|
+
try {
|
|
1905
|
+
return __wbg_adapter_416(a, state0.b, arg0, arg1);
|
|
1906
|
+
} finally {
|
|
1907
|
+
state0.a = a;
|
|
1908
|
+
}
|
|
1909
|
+
};
|
|
1910
|
+
const ret = new Promise(cb0);
|
|
1911
|
+
return ret;
|
|
1912
|
+
} finally {
|
|
1913
|
+
state0.a = state0.b = 0;
|
|
1914
|
+
}
|
|
1915
|
+
};
|
|
1916
|
+
imports.wbg.__wbg_new_405e22f390576ce2 = function() {
|
|
1917
|
+
const ret = new Object();
|
|
1918
|
+
return ret;
|
|
1919
|
+
};
|
|
1920
|
+
imports.wbg.__wbg_new_78feb108b6472713 = function() {
|
|
1921
|
+
const ret = new Array();
|
|
1922
|
+
return ret;
|
|
1923
|
+
};
|
|
1924
|
+
imports.wbg.__wbg_new_80bf4ee74f41ff92 = function() { return handleError(function () {
|
|
1925
|
+
const ret = new URLSearchParams();
|
|
1926
|
+
return ret;
|
|
1927
|
+
}, arguments) };
|
|
1928
|
+
imports.wbg.__wbg_new_8a6f238a6ece86ea = function() {
|
|
1929
|
+
const ret = new Error();
|
|
1930
|
+
return ret;
|
|
1931
|
+
};
|
|
1932
|
+
imports.wbg.__wbg_new_9fd39a253424609a = function() { return handleError(function () {
|
|
1933
|
+
const ret = new FormData();
|
|
1934
|
+
return ret;
|
|
1935
|
+
}, arguments) };
|
|
1936
|
+
imports.wbg.__wbg_new_9ffbe0a71eff35e3 = function() { return handleError(function (arg0, arg1) {
|
|
1937
|
+
const ret = new URL(getStringFromWasm0(arg0, arg1));
|
|
1938
|
+
return ret;
|
|
1939
|
+
}, arguments) };
|
|
1940
|
+
imports.wbg.__wbg_new_a12002a7f91c75be = function(arg0) {
|
|
1941
|
+
const ret = new Uint8Array(arg0);
|
|
1942
|
+
return ret;
|
|
1943
|
+
};
|
|
1944
|
+
imports.wbg.__wbg_new_e25e5aab09ff45db = function() { return handleError(function () {
|
|
1945
|
+
const ret = new AbortController();
|
|
1946
|
+
return ret;
|
|
1947
|
+
}, arguments) };
|
|
1948
|
+
imports.wbg.__wbg_newnoargs_105ed471475aaf50 = function(arg0, arg1) {
|
|
1949
|
+
const ret = new Function(getStringFromWasm0(arg0, arg1));
|
|
1950
|
+
return ret;
|
|
1951
|
+
};
|
|
1952
|
+
imports.wbg.__wbg_newwithbyteoffsetandlength_d97e637ebe145a9a = function(arg0, arg1, arg2) {
|
|
1953
|
+
const ret = new Uint8Array(arg0, arg1 >>> 0, arg2 >>> 0);
|
|
1954
|
+
return ret;
|
|
1955
|
+
};
|
|
1956
|
+
imports.wbg.__wbg_newwithlength_a381634e90c276d4 = function(arg0) {
|
|
1957
|
+
const ret = new Uint8Array(arg0 >>> 0);
|
|
1958
|
+
return ret;
|
|
1959
|
+
};
|
|
1960
|
+
imports.wbg.__wbg_newwithstr_78e86e03c4ae814e = function() { return handleError(function (arg0, arg1) {
|
|
1961
|
+
const ret = new Request(getStringFromWasm0(arg0, arg1));
|
|
1962
|
+
return ret;
|
|
1963
|
+
}, arguments) };
|
|
1964
|
+
imports.wbg.__wbg_newwithstrandinit_06c535e0a867c635 = function() { return handleError(function (arg0, arg1, arg2) {
|
|
1965
|
+
const ret = new Request(getStringFromWasm0(arg0, arg1), arg2);
|
|
1966
|
+
return ret;
|
|
1967
|
+
}, arguments) };
|
|
1968
|
+
imports.wbg.__wbg_newwithu8arraysequence_1e24f242a67f6fdd = function() { return handleError(function (arg0) {
|
|
1969
|
+
const ret = new Blob(arg0);
|
|
1970
|
+
return ret;
|
|
1971
|
+
}, arguments) };
|
|
1972
|
+
imports.wbg.__wbg_newwithu8arraysequenceandoptions_068570c487f69127 = function() { return handleError(function (arg0, arg1) {
|
|
1973
|
+
const ret = new Blob(arg0, arg1);
|
|
1974
|
+
return ret;
|
|
1975
|
+
}, arguments) };
|
|
1976
|
+
imports.wbg.__wbg_next_25feadfc0913fea9 = function(arg0) {
|
|
1977
|
+
const ret = arg0.next;
|
|
1978
|
+
return ret;
|
|
1979
|
+
};
|
|
1980
|
+
imports.wbg.__wbg_next_6574e1a8a62d1055 = function() { return handleError(function (arg0) {
|
|
1981
|
+
const ret = arg0.next();
|
|
1982
|
+
return ret;
|
|
1983
|
+
}, arguments) };
|
|
1984
|
+
imports.wbg.__wbg_node_6d722617e26f29f2 = function(arg0) {
|
|
1985
|
+
const ret = arg0.node;
|
|
1986
|
+
return ret;
|
|
1987
|
+
};
|
|
1988
|
+
imports.wbg.__wbg_now_807e54c39636c349 = function() {
|
|
1989
|
+
const ret = Date.now();
|
|
1990
|
+
return ret;
|
|
1991
|
+
};
|
|
1992
|
+
imports.wbg.__wbg_objectStoreNames_9bb1ab04a7012aaf = function(arg0) {
|
|
1993
|
+
const ret = arg0.objectStoreNames;
|
|
1994
|
+
return ret;
|
|
1995
|
+
};
|
|
1996
|
+
imports.wbg.__wbg_objectStore_21878d46d25b64b6 = function() { return handleError(function (arg0, arg1, arg2) {
|
|
1997
|
+
const ret = arg0.objectStore(getStringFromWasm0(arg1, arg2));
|
|
1998
|
+
return ret;
|
|
1999
|
+
}, arguments) };
|
|
2000
|
+
imports.wbg.__wbg_open_88b1390d99a7c691 = function() { return handleError(function (arg0, arg1, arg2) {
|
|
2001
|
+
const ret = arg0.open(getStringFromWasm0(arg1, arg2));
|
|
2002
|
+
return ret;
|
|
2003
|
+
}, arguments) };
|
|
2004
|
+
imports.wbg.__wbg_open_e0c0b2993eb596e1 = function() { return handleError(function (arg0, arg1, arg2, arg3) {
|
|
2005
|
+
const ret = arg0.open(getStringFromWasm0(arg1, arg2), arg3 >>> 0);
|
|
2006
|
+
return ret;
|
|
2007
|
+
}, arguments) };
|
|
2008
|
+
imports.wbg.__wbg_process_d9ea7ce819197991 = function(arg0) {
|
|
2009
|
+
const ret = arg0.process;
|
|
2010
|
+
return ret;
|
|
2011
|
+
};
|
|
2012
|
+
imports.wbg.__wbg_push_737cfc8c1432c2c6 = function(arg0, arg1) {
|
|
2013
|
+
const ret = arg0.push(arg1);
|
|
2014
|
+
return ret;
|
|
2015
|
+
};
|
|
2016
|
+
imports.wbg.__wbg_put_066faa31a6a88f5b = function() { return handleError(function (arg0, arg1, arg2) {
|
|
2017
|
+
const ret = arg0.put(arg1, arg2);
|
|
2018
|
+
return ret;
|
|
2019
|
+
}, arguments) };
|
|
2020
|
+
imports.wbg.__wbg_put_9ef5363941008835 = function() { return handleError(function (arg0, arg1) {
|
|
2021
|
+
const ret = arg0.put(arg1);
|
|
2022
|
+
return ret;
|
|
2023
|
+
}, arguments) };
|
|
2024
|
+
imports.wbg.__wbg_queueMicrotask_97d92b4fcc8a61c5 = function(arg0) {
|
|
2025
|
+
queueMicrotask(arg0);
|
|
2026
|
+
};
|
|
2027
|
+
imports.wbg.__wbg_queueMicrotask_d3219def82552485 = function(arg0) {
|
|
2028
|
+
const ret = arg0.queueMicrotask;
|
|
2029
|
+
return ret;
|
|
2030
|
+
};
|
|
2031
|
+
imports.wbg.__wbg_randomFillSync_e2ae5c896c5ec592 = function() { return handleError(function (arg0, arg1) {
|
|
2032
|
+
arg0.randomFillSync(arg1);
|
|
2033
|
+
}, arguments) };
|
|
2034
|
+
imports.wbg.__wbg_require_d3a2417979c32e11 = function() { return handleError(function () {
|
|
2035
|
+
const ret = module.require;
|
|
2036
|
+
return ret;
|
|
2037
|
+
}, arguments) };
|
|
2038
|
+
imports.wbg.__wbg_resolve_4851785c9c5f573d = function(arg0) {
|
|
2039
|
+
const ret = Promise.resolve(arg0);
|
|
2040
|
+
return ret;
|
|
2041
|
+
};
|
|
2042
|
+
imports.wbg.__wbg_result_f29afabdf2c05826 = function() { return handleError(function (arg0) {
|
|
2043
|
+
const ret = arg0.result;
|
|
2044
|
+
return ret;
|
|
2045
|
+
}, arguments) };
|
|
2046
|
+
imports.wbg.__wbg_search_e0e79cfe010c5c23 = function(arg0, arg1) {
|
|
2047
|
+
const ret = arg1.search;
|
|
2048
|
+
const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
2049
|
+
const len1 = WASM_VECTOR_LEN;
|
|
2050
|
+
getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true);
|
|
2051
|
+
getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);
|
|
2052
|
+
};
|
|
2053
|
+
imports.wbg.__wbg_setTimeout_f2fe5af8e3debeb3 = function() { return handleError(function (arg0, arg1, arg2) {
|
|
2054
|
+
const ret = arg0.setTimeout(arg1, arg2);
|
|
2055
|
+
return ret;
|
|
2056
|
+
}, arguments) };
|
|
2057
|
+
imports.wbg.__wbg_set_11cd83f45504cedf = function() { return handleError(function (arg0, arg1, arg2, arg3, arg4) {
|
|
2058
|
+
arg0.set(getStringFromWasm0(arg1, arg2), getStringFromWasm0(arg3, arg4));
|
|
2059
|
+
}, arguments) };
|
|
2060
|
+
imports.wbg.__wbg_set_65595bdd868b3009 = function(arg0, arg1, arg2) {
|
|
2061
|
+
arg0.set(arg1, arg2 >>> 0);
|
|
2062
|
+
};
|
|
2063
|
+
imports.wbg.__wbg_setautoincrement_8b4327709e9ee7d9 = function(arg0, arg1) {
|
|
2064
|
+
arg0.autoIncrement = arg1 !== 0;
|
|
2065
|
+
};
|
|
2066
|
+
imports.wbg.__wbg_setbody_5923b78a95eedf29 = function(arg0, arg1) {
|
|
2067
|
+
arg0.body = arg1;
|
|
2068
|
+
};
|
|
2069
|
+
imports.wbg.__wbg_setcredentials_c3a22f1cd105a2c6 = function(arg0, arg1) {
|
|
2070
|
+
arg0.credentials = __wbindgen_enum_RequestCredentials[arg1];
|
|
2071
|
+
};
|
|
2072
|
+
imports.wbg.__wbg_setheaders_834c0bdb6a8949ad = function(arg0, arg1) {
|
|
2073
|
+
arg0.headers = arg1;
|
|
2074
|
+
};
|
|
2075
|
+
imports.wbg.__wbg_setkeypath_691179e313c26ae1 = function(arg0, arg1) {
|
|
2076
|
+
arg0.keyPath = arg1;
|
|
2077
|
+
};
|
|
2078
|
+
imports.wbg.__wbg_setmethod_3c5280fe5d890842 = function(arg0, arg1, arg2) {
|
|
2079
|
+
arg0.method = getStringFromWasm0(arg1, arg2);
|
|
2080
|
+
};
|
|
2081
|
+
imports.wbg.__wbg_setmode_5dc300b865044b65 = function(arg0, arg1) {
|
|
2082
|
+
arg0.mode = __wbindgen_enum_RequestMode[arg1];
|
|
2083
|
+
};
|
|
2084
|
+
imports.wbg.__wbg_setmultientry_4c4eee871f29837a = function(arg0, arg1) {
|
|
2085
|
+
arg0.multiEntry = arg1 !== 0;
|
|
2086
|
+
};
|
|
2087
|
+
imports.wbg.__wbg_setonabort_3bf4db6614fa98e9 = function(arg0, arg1) {
|
|
2088
|
+
arg0.onabort = arg1;
|
|
2089
|
+
};
|
|
2090
|
+
imports.wbg.__wbg_setoncomplete_4d19df0dadb7c4d4 = function(arg0, arg1) {
|
|
2091
|
+
arg0.oncomplete = arg1;
|
|
2092
|
+
};
|
|
2093
|
+
imports.wbg.__wbg_setonerror_b0d9d723b8fddbbb = function(arg0, arg1) {
|
|
2094
|
+
arg0.onerror = arg1;
|
|
2095
|
+
};
|
|
2096
|
+
imports.wbg.__wbg_setonerror_d7e3056cc6e56085 = function(arg0, arg1) {
|
|
2097
|
+
arg0.onerror = arg1;
|
|
2098
|
+
};
|
|
2099
|
+
imports.wbg.__wbg_setonsuccess_afa464ee777a396d = function(arg0, arg1) {
|
|
2100
|
+
arg0.onsuccess = arg1;
|
|
2101
|
+
};
|
|
2102
|
+
imports.wbg.__wbg_setonupgradeneeded_fcf7ce4f2eb0cb5f = function(arg0, arg1) {
|
|
2103
|
+
arg0.onupgradeneeded = arg1;
|
|
2104
|
+
};
|
|
2105
|
+
imports.wbg.__wbg_setonversionchange_6ee07fa49ee1e3a5 = function(arg0, arg1) {
|
|
2106
|
+
arg0.onversionchange = arg1;
|
|
2107
|
+
};
|
|
2108
|
+
imports.wbg.__wbg_setsearch_609451e9e712f3c6 = function(arg0, arg1, arg2) {
|
|
2109
|
+
arg0.search = getStringFromWasm0(arg1, arg2);
|
|
2110
|
+
};
|
|
2111
|
+
imports.wbg.__wbg_setsignal_75b21ef3a81de905 = function(arg0, arg1) {
|
|
2112
|
+
arg0.signal = arg1;
|
|
2113
|
+
};
|
|
2114
|
+
imports.wbg.__wbg_settype_39ed370d3edd403c = function(arg0, arg1, arg2) {
|
|
2115
|
+
arg0.type = getStringFromWasm0(arg1, arg2);
|
|
2116
|
+
};
|
|
2117
|
+
imports.wbg.__wbg_setunique_dd24c422aa05df89 = function(arg0, arg1) {
|
|
2118
|
+
arg0.unique = arg1 !== 0;
|
|
2119
|
+
};
|
|
2120
|
+
imports.wbg.__wbg_signal_aaf9ad74119f20a4 = function(arg0) {
|
|
2121
|
+
const ret = arg0.signal;
|
|
2122
|
+
return ret;
|
|
2123
|
+
};
|
|
2124
|
+
imports.wbg.__wbg_stack_0ed75d68575b0f3c = function(arg0, arg1) {
|
|
2125
|
+
const ret = arg1.stack;
|
|
2126
|
+
const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
2127
|
+
const len1 = WASM_VECTOR_LEN;
|
|
2128
|
+
getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true);
|
|
2129
|
+
getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);
|
|
2130
|
+
};
|
|
2131
|
+
imports.wbg.__wbg_static_accessor_GLOBAL_88a902d13a557d07 = function() {
|
|
2132
|
+
const ret = typeof global === 'undefined' ? null : global;
|
|
2133
|
+
return isLikeNone(ret) ? 0 : addToExternrefTable0(ret);
|
|
2134
|
+
};
|
|
2135
|
+
imports.wbg.__wbg_static_accessor_GLOBAL_THIS_56578be7e9f832b0 = function() {
|
|
2136
|
+
const ret = typeof globalThis === 'undefined' ? null : globalThis;
|
|
2137
|
+
return isLikeNone(ret) ? 0 : addToExternrefTable0(ret);
|
|
2138
|
+
};
|
|
2139
|
+
imports.wbg.__wbg_static_accessor_SELF_37c5d418e4bf5819 = function() {
|
|
2140
|
+
const ret = typeof self === 'undefined' ? null : self;
|
|
2141
|
+
return isLikeNone(ret) ? 0 : addToExternrefTable0(ret);
|
|
2142
|
+
};
|
|
2143
|
+
imports.wbg.__wbg_static_accessor_WINDOW_5de37043a91a9c40 = function() {
|
|
2144
|
+
const ret = typeof window === 'undefined' ? null : window;
|
|
2145
|
+
return isLikeNone(ret) ? 0 : addToExternrefTable0(ret);
|
|
2146
|
+
};
|
|
2147
|
+
imports.wbg.__wbg_status_f6360336ca686bf0 = function(arg0) {
|
|
2148
|
+
const ret = arg0.status;
|
|
2149
|
+
return ret;
|
|
2150
|
+
};
|
|
2151
|
+
imports.wbg.__wbg_stringify_f7ed6987935b4a24 = function() { return handleError(function (arg0) {
|
|
2152
|
+
const ret = JSON.stringify(arg0);
|
|
2153
|
+
return ret;
|
|
2154
|
+
}, arguments) };
|
|
2155
|
+
imports.wbg.__wbg_subarray_aa9065fa9dc5df96 = function(arg0, arg1, arg2) {
|
|
2156
|
+
const ret = arg0.subarray(arg1 >>> 0, arg2 >>> 0);
|
|
2157
|
+
return ret;
|
|
2158
|
+
};
|
|
2159
|
+
imports.wbg.__wbg_target_0a62d9d79a2a1ede = function(arg0) {
|
|
2160
|
+
const ret = arg0.target;
|
|
2161
|
+
return isLikeNone(ret) ? 0 : addToExternrefTable0(ret);
|
|
2162
|
+
};
|
|
2163
|
+
imports.wbg.__wbg_text_7805bea50de2af49 = function() { return handleError(function (arg0) {
|
|
2164
|
+
const ret = arg0.text();
|
|
2165
|
+
return ret;
|
|
2166
|
+
}, arguments) };
|
|
2167
|
+
imports.wbg.__wbg_then_44b73946d2fb3e7d = function(arg0, arg1) {
|
|
2168
|
+
const ret = arg0.then(arg1);
|
|
2169
|
+
return ret;
|
|
2170
|
+
};
|
|
2171
|
+
imports.wbg.__wbg_then_48b406749878a531 = function(arg0, arg1, arg2) {
|
|
2172
|
+
const ret = arg0.then(arg1, arg2);
|
|
2173
|
+
return ret;
|
|
2174
|
+
};
|
|
2175
|
+
imports.wbg.__wbg_toString_5285597960676b7b = function(arg0) {
|
|
2176
|
+
const ret = arg0.toString();
|
|
2177
|
+
return ret;
|
|
2178
|
+
};
|
|
2179
|
+
imports.wbg.__wbg_toString_c813bbd34d063839 = function(arg0) {
|
|
2180
|
+
const ret = arg0.toString();
|
|
2181
|
+
return ret;
|
|
2182
|
+
};
|
|
2183
|
+
imports.wbg.__wbg_trace_4f64f498ecbfeea8 = function(arg0, arg1) {
|
|
2184
|
+
var v0 = getArrayJsValueFromWasm0(arg0, arg1).slice();
|
|
2185
|
+
wasm.__wbindgen_free(arg0, arg1 * 4, 4);
|
|
2186
|
+
console.trace(...v0);
|
|
2187
|
+
};
|
|
2188
|
+
imports.wbg.__wbg_transaction_d6d07c3c9963c49e = function() { return handleError(function (arg0, arg1, arg2) {
|
|
2189
|
+
const ret = arg0.transaction(arg1, __wbindgen_enum_IdbTransactionMode[arg2]);
|
|
2190
|
+
return ret;
|
|
2191
|
+
}, arguments) };
|
|
2192
|
+
imports.wbg.__wbg_transaction_e713aa7b07ccaedd = function(arg0) {
|
|
2193
|
+
const ret = arg0.transaction;
|
|
2194
|
+
return isLikeNone(ret) ? 0 : addToExternrefTable0(ret);
|
|
2195
|
+
};
|
|
2196
|
+
imports.wbg.__wbg_unique_23ddfed89bddb31d = function(arg0) {
|
|
2197
|
+
const ret = arg0.unique;
|
|
2198
|
+
return ret;
|
|
2199
|
+
};
|
|
2200
|
+
imports.wbg.__wbg_url_8f9653b899456042 = function(arg0, arg1) {
|
|
2201
|
+
const ret = arg1.url;
|
|
2202
|
+
const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
2203
|
+
const len1 = WASM_VECTOR_LEN;
|
|
2204
|
+
getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true);
|
|
2205
|
+
getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);
|
|
2206
|
+
};
|
|
2207
|
+
imports.wbg.__wbg_url_ae10c34ca209681d = function(arg0, arg1) {
|
|
2208
|
+
const ret = arg1.url;
|
|
2209
|
+
const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
2210
|
+
const len1 = WASM_VECTOR_LEN;
|
|
2211
|
+
getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true);
|
|
2212
|
+
getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);
|
|
2213
|
+
};
|
|
2214
|
+
imports.wbg.__wbg_value_cd1ffa7b1ab794f1 = function(arg0) {
|
|
2215
|
+
const ret = arg0.value;
|
|
2216
|
+
return ret;
|
|
2217
|
+
};
|
|
2218
|
+
imports.wbg.__wbg_versions_c8e8bcb59a0bf647 = function(arg0) {
|
|
2219
|
+
const ret = arg0.versions;
|
|
2220
|
+
return ret;
|
|
2221
|
+
};
|
|
2222
|
+
imports.wbg.__wbg_warn_1529a2c662795cd8 = function(arg0, arg1) {
|
|
2223
|
+
var v0 = getArrayJsValueFromWasm0(arg0, arg1).slice();
|
|
2224
|
+
wasm.__wbindgen_free(arg0, arg1 * 4, 4);
|
|
2225
|
+
console.warn(...v0);
|
|
2226
|
+
};
|
|
2227
|
+
imports.wbg.__wbindgen_as_number = function(arg0) {
|
|
2228
|
+
const ret = +arg0;
|
|
2229
|
+
return ret;
|
|
2230
|
+
};
|
|
2231
|
+
imports.wbg.__wbindgen_bigint_from_i64 = function(arg0) {
|
|
2232
|
+
const ret = arg0;
|
|
2233
|
+
return ret;
|
|
2234
|
+
};
|
|
2235
|
+
imports.wbg.__wbindgen_bigint_from_u64 = function(arg0) {
|
|
2236
|
+
const ret = BigInt.asUintN(64, arg0);
|
|
2237
|
+
return ret;
|
|
2238
|
+
};
|
|
2239
|
+
imports.wbg.__wbindgen_bigint_get_as_i64 = function(arg0, arg1) {
|
|
2240
|
+
const v = arg1;
|
|
2241
|
+
const ret = typeof(v) === 'bigint' ? v : undefined;
|
|
2242
|
+
getDataViewMemory0().setBigInt64(arg0 + 8 * 1, isLikeNone(ret) ? BigInt(0) : ret, true);
|
|
2243
|
+
getDataViewMemory0().setInt32(arg0 + 4 * 0, !isLikeNone(ret), true);
|
|
2244
|
+
};
|
|
2245
|
+
imports.wbg.__wbindgen_boolean_get = function(arg0) {
|
|
2246
|
+
const v = arg0;
|
|
2247
|
+
const ret = typeof(v) === 'boolean' ? (v ? 1 : 0) : 2;
|
|
2248
|
+
return ret;
|
|
2249
|
+
};
|
|
2250
|
+
imports.wbg.__wbindgen_cb_drop = function(arg0) {
|
|
2251
|
+
const obj = arg0.original;
|
|
2252
|
+
if (obj.cnt-- == 1) {
|
|
2253
|
+
obj.a = 0;
|
|
2254
|
+
return true;
|
|
2255
|
+
}
|
|
2256
|
+
const ret = false;
|
|
2257
|
+
return ret;
|
|
2258
|
+
};
|
|
2259
|
+
imports.wbg.__wbindgen_closure_wrapper11536 = function(arg0, arg1, arg2) {
|
|
2260
|
+
const ret = makeMutClosure(arg0, arg1, 2666, __wbg_adapter_60);
|
|
2261
|
+
return ret;
|
|
2262
|
+
};
|
|
2263
|
+
imports.wbg.__wbindgen_closure_wrapper15965 = function(arg0, arg1, arg2) {
|
|
2264
|
+
const ret = makeMutClosure(arg0, arg1, 3826, __wbg_adapter_63);
|
|
2265
|
+
return ret;
|
|
2266
|
+
};
|
|
2267
|
+
imports.wbg.__wbindgen_closure_wrapper7704 = function(arg0, arg1, arg2) {
|
|
2268
|
+
const ret = makeMutClosure(arg0, arg1, 1857, __wbg_adapter_54);
|
|
2269
|
+
return ret;
|
|
2270
|
+
};
|
|
2271
|
+
imports.wbg.__wbindgen_closure_wrapper8151 = function(arg0, arg1, arg2) {
|
|
2272
|
+
const ret = makeMutClosure(arg0, arg1, 1998, __wbg_adapter_57);
|
|
2273
|
+
return ret;
|
|
2274
|
+
};
|
|
2275
|
+
imports.wbg.__wbindgen_debug_string = function(arg0, arg1) {
|
|
2276
|
+
const ret = debugString(arg1);
|
|
2277
|
+
const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
2278
|
+
const len1 = WASM_VECTOR_LEN;
|
|
2279
|
+
getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true);
|
|
2280
|
+
getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);
|
|
2281
|
+
};
|
|
2282
|
+
imports.wbg.__wbindgen_error_new = function(arg0, arg1) {
|
|
2283
|
+
const ret = new Error(getStringFromWasm0(arg0, arg1));
|
|
2284
|
+
return ret;
|
|
2285
|
+
};
|
|
2286
|
+
imports.wbg.__wbindgen_in = function(arg0, arg1) {
|
|
2287
|
+
const ret = arg0 in arg1;
|
|
2288
|
+
return ret;
|
|
2289
|
+
};
|
|
2290
|
+
imports.wbg.__wbindgen_init_externref_table = function() {
|
|
2291
|
+
const table = wasm.__wbindgen_export_4;
|
|
2292
|
+
const offset = table.grow(4);
|
|
2293
|
+
table.set(0, undefined);
|
|
2294
|
+
table.set(offset + 0, undefined);
|
|
2295
|
+
table.set(offset + 1, null);
|
|
2296
|
+
table.set(offset + 2, true);
|
|
2297
|
+
table.set(offset + 3, false);
|
|
2298
|
+
;
|
|
2299
|
+
};
|
|
2300
|
+
imports.wbg.__wbindgen_is_bigint = function(arg0) {
|
|
2301
|
+
const ret = typeof(arg0) === 'bigint';
|
|
2302
|
+
return ret;
|
|
2303
|
+
};
|
|
2304
|
+
imports.wbg.__wbindgen_is_function = function(arg0) {
|
|
2305
|
+
const ret = typeof(arg0) === 'function';
|
|
2306
|
+
return ret;
|
|
2307
|
+
};
|
|
2308
|
+
imports.wbg.__wbindgen_is_null = function(arg0) {
|
|
2309
|
+
const ret = arg0 === null;
|
|
2310
|
+
return ret;
|
|
2311
|
+
};
|
|
2312
|
+
imports.wbg.__wbindgen_is_object = function(arg0) {
|
|
2313
|
+
const val = arg0;
|
|
2314
|
+
const ret = typeof(val) === 'object' && val !== null;
|
|
2315
|
+
return ret;
|
|
2316
|
+
};
|
|
2317
|
+
imports.wbg.__wbindgen_is_string = function(arg0) {
|
|
2318
|
+
const ret = typeof(arg0) === 'string';
|
|
2319
|
+
return ret;
|
|
2320
|
+
};
|
|
2321
|
+
imports.wbg.__wbindgen_is_undefined = function(arg0) {
|
|
2322
|
+
const ret = arg0 === undefined;
|
|
2323
|
+
return ret;
|
|
2324
|
+
};
|
|
2325
|
+
imports.wbg.__wbindgen_jsval_eq = function(arg0, arg1) {
|
|
2326
|
+
const ret = arg0 === arg1;
|
|
2327
|
+
return ret;
|
|
2328
|
+
};
|
|
2329
|
+
imports.wbg.__wbindgen_jsval_loose_eq = function(arg0, arg1) {
|
|
2330
|
+
const ret = arg0 == arg1;
|
|
2331
|
+
return ret;
|
|
2332
|
+
};
|
|
2333
|
+
imports.wbg.__wbindgen_memory = function() {
|
|
2334
|
+
const ret = wasm.memory;
|
|
2335
|
+
return ret;
|
|
2336
|
+
};
|
|
2337
|
+
imports.wbg.__wbindgen_number_get = function(arg0, arg1) {
|
|
2338
|
+
const obj = arg1;
|
|
2339
|
+
const ret = typeof(obj) === 'number' ? obj : undefined;
|
|
2340
|
+
getDataViewMemory0().setFloat64(arg0 + 8 * 1, isLikeNone(ret) ? 0 : ret, true);
|
|
2341
|
+
getDataViewMemory0().setInt32(arg0 + 4 * 0, !isLikeNone(ret), true);
|
|
2342
|
+
};
|
|
2343
|
+
imports.wbg.__wbindgen_number_new = function(arg0) {
|
|
2344
|
+
const ret = arg0;
|
|
2345
|
+
return ret;
|
|
2346
|
+
};
|
|
2347
|
+
imports.wbg.__wbindgen_string_get = function(arg0, arg1) {
|
|
2348
|
+
const obj = arg1;
|
|
2349
|
+
const ret = typeof(obj) === 'string' ? obj : undefined;
|
|
2350
|
+
var ptr1 = isLikeNone(ret) ? 0 : passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
2351
|
+
var len1 = WASM_VECTOR_LEN;
|
|
2352
|
+
getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true);
|
|
2353
|
+
getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);
|
|
2354
|
+
};
|
|
2355
|
+
imports.wbg.__wbindgen_string_new = function(arg0, arg1) {
|
|
2356
|
+
const ret = getStringFromWasm0(arg0, arg1);
|
|
2357
|
+
return ret;
|
|
2358
|
+
};
|
|
2359
|
+
imports.wbg.__wbindgen_throw = function(arg0, arg1) {
|
|
2360
|
+
throw new Error(getStringFromWasm0(arg0, arg1));
|
|
2361
|
+
};
|
|
2362
|
+
imports['env'] = __wbg_star0;
|
|
2363
|
+
|
|
2364
|
+
return imports;
|
|
2365
|
+
}
|
|
2366
|
+
|
|
2367
|
+
function __wbg_init_memory(imports, memory) {
|
|
2368
|
+
|
|
2369
|
+
}
|
|
2370
|
+
|
|
2371
|
+
function __wbg_finalize_init(instance, module) {
|
|
2372
|
+
wasm = instance.exports;
|
|
2373
|
+
__wbg_init.__wbindgen_wasm_module = module;
|
|
2374
|
+
cachedDataViewMemory0 = null;
|
|
2375
|
+
cachedUint8ArrayMemory0 = null;
|
|
2376
|
+
|
|
2377
|
+
|
|
2378
|
+
wasm.__wbindgen_start();
|
|
2379
|
+
return wasm;
|
|
2380
|
+
}
|
|
2381
|
+
|
|
2382
|
+
function initSync(module) {
|
|
2383
|
+
if (wasm !== undefined) return wasm;
|
|
2384
|
+
|
|
2385
|
+
|
|
2386
|
+
if (typeof module !== 'undefined') {
|
|
2387
|
+
if (Object.getPrototypeOf(module) === Object.prototype) {
|
|
2388
|
+
({module} = module)
|
|
2389
|
+
} else {
|
|
2390
|
+
console.warn('using deprecated parameters for `initSync()`; pass a single object instead')
|
|
2391
|
+
}
|
|
2392
|
+
}
|
|
2393
|
+
|
|
2394
|
+
const imports = __wbg_get_imports();
|
|
2395
|
+
|
|
2396
|
+
__wbg_init_memory(imports);
|
|
2397
|
+
|
|
2398
|
+
if (!(module instanceof WebAssembly.Module)) {
|
|
2399
|
+
module = new WebAssembly.Module(module);
|
|
2400
|
+
}
|
|
2401
|
+
|
|
2402
|
+
const instance = new WebAssembly.Instance(module, imports);
|
|
2403
|
+
|
|
2404
|
+
return __wbg_finalize_init(instance, module);
|
|
2405
|
+
}
|
|
2406
|
+
|
|
2407
|
+
async function __wbg_init(module_or_path) {
|
|
2408
|
+
if (wasm !== undefined) return wasm;
|
|
2409
|
+
|
|
2410
|
+
|
|
2411
|
+
if (typeof module_or_path !== 'undefined') {
|
|
2412
|
+
if (Object.getPrototypeOf(module_or_path) === Object.prototype) {
|
|
2413
|
+
({module_or_path} = module_or_path)
|
|
2414
|
+
} else {
|
|
2415
|
+
console.warn('using deprecated parameters for the initialization function; pass a single object instead')
|
|
2416
|
+
}
|
|
2417
|
+
}
|
|
2418
|
+
|
|
2419
|
+
if (typeof module_or_path === 'undefined') {
|
|
2420
|
+
module_or_path = new URL('bitmask_core_bg.wasm', import.meta.url);
|
|
2421
|
+
}
|
|
2422
|
+
const imports = __wbg_get_imports();
|
|
2423
|
+
|
|
2424
|
+
if (typeof module_or_path === 'string' || (typeof Request === 'function' && module_or_path instanceof Request) || (typeof URL === 'function' && module_or_path instanceof URL)) {
|
|
2425
|
+
module_or_path = fetch(module_or_path);
|
|
2426
|
+
}
|
|
2427
|
+
|
|
2428
|
+
__wbg_init_memory(imports);
|
|
2429
|
+
|
|
2430
|
+
const { instance, module } = await __wbg_load(await module_or_path, imports);
|
|
2431
|
+
|
|
2432
|
+
return __wbg_finalize_init(instance, module);
|
|
2433
|
+
}
|
|
2434
|
+
|
|
2435
|
+
export { initSync };
|
|
2436
|
+
export default __wbg_init;
|