bitmask-core 0.2.0 → 0.3.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/bitmask_core.d.ts +53 -34
- package/bitmask_core.js +386 -297
- package/bitmask_core_bg.wasm +0 -0
- package/package.json +1 -1
package/bitmask_core.d.ts
CHANGED
|
@@ -21,72 +21,82 @@ export function get_mnemonic_seed(encryption_password: string, seed_password: st
|
|
|
21
21
|
export function save_mnemonic_seed(mnemonic: string, encryption_password: string, seed_password: string): Promise<any>;
|
|
22
22
|
/**
|
|
23
23
|
* @param {string} descriptor
|
|
24
|
-
* @param {string} change_descriptor
|
|
24
|
+
* @param {string | undefined} change_descriptor
|
|
25
25
|
* @returns {Promise<any>}
|
|
26
26
|
*/
|
|
27
|
-
export function get_wallet_data(descriptor: string, change_descriptor
|
|
27
|
+
export function get_wallet_data(descriptor: string, change_descriptor?: string): Promise<any>;
|
|
28
28
|
/**
|
|
29
|
+
* @param {string | undefined} node_url
|
|
29
30
|
* @returns {Promise<any>}
|
|
30
31
|
*/
|
|
31
|
-
export function import_list_assets(): Promise<any>;
|
|
32
|
+
export function import_list_assets(node_url?: string): Promise<any>;
|
|
32
33
|
/**
|
|
33
|
-
* @param {string}
|
|
34
|
-
* @param {string} change_descriptor
|
|
34
|
+
* @param {string} rgb_tokens_descriptor
|
|
35
35
|
* @param {string | undefined} asset
|
|
36
36
|
* @param {string | undefined} genesis
|
|
37
|
+
* @param {string | undefined} node_url
|
|
37
38
|
* @returns {Promise<any>}
|
|
38
39
|
*/
|
|
39
|
-
export function import_asset(
|
|
40
|
-
/**
|
|
41
|
-
* @param {string} unspent
|
|
42
|
-
* @param {string} blinded_unspents
|
|
43
|
-
* @returns {Promise<any>}
|
|
44
|
-
*/
|
|
45
|
-
export function set_blinded_utxos(unspent: string, blinded_unspents: string): Promise<any>;
|
|
40
|
+
export function import_asset(rgb_tokens_descriptor: string, asset?: string, genesis?: string, node_url?: string): Promise<any>;
|
|
46
41
|
/**
|
|
47
42
|
* @param {string} utxo_string
|
|
43
|
+
* @param {string | undefined} node_url
|
|
48
44
|
* @returns {Promise<any>}
|
|
49
45
|
*/
|
|
50
|
-
export function set_blinded_utxo(utxo_string: string): Promise<any>;
|
|
46
|
+
export function set_blinded_utxo(utxo_string: string, node_url?: string): Promise<any>;
|
|
51
47
|
/**
|
|
52
48
|
* @param {string} descriptor
|
|
53
49
|
* @param {string} change_descriptor
|
|
54
50
|
* @param {string} address
|
|
55
|
-
* @param {
|
|
51
|
+
* @param {bigint} amount
|
|
56
52
|
* @returns {Promise<any>}
|
|
57
53
|
*/
|
|
58
|
-
export function send_sats(descriptor: string, change_descriptor: string, address: string, amount:
|
|
54
|
+
export function send_sats(descriptor: string, change_descriptor: string, address: string, amount: bigint): Promise<any>;
|
|
59
55
|
/**
|
|
60
56
|
* @param {string} descriptor
|
|
61
57
|
* @param {string} change_descriptor
|
|
58
|
+
* @param {string} address
|
|
59
|
+
* @param {string} uda_address
|
|
60
|
+
* @returns {Promise<any>}
|
|
61
|
+
*/
|
|
62
|
+
export function fund_wallet(descriptor: string, change_descriptor: string, address: string, uda_address: string): Promise<any>;
|
|
63
|
+
/**
|
|
64
|
+
* @param {string} btc_descriptor
|
|
65
|
+
* @param {string} btc_change_descriptor
|
|
66
|
+
* @param {string} rgb_tokens_descriptor
|
|
62
67
|
* @param {string} blinded_utxo
|
|
63
|
-
* @param {
|
|
68
|
+
* @param {bigint} amount
|
|
64
69
|
* @param {string} asset
|
|
70
|
+
* @param {string | undefined} node_url
|
|
65
71
|
* @returns {Promise<any>}
|
|
66
72
|
*/
|
|
67
|
-
export function send_tokens(
|
|
73
|
+
export function send_tokens(btc_descriptor: string, btc_change_descriptor: string, rgb_tokens_descriptor: string, blinded_utxo: string, amount: bigint, asset: string, node_url?: string): Promise<any>;
|
|
68
74
|
/**
|
|
69
|
-
* @param {string}
|
|
70
|
-
* @param {string}
|
|
71
|
-
* @param {string} utxo
|
|
72
|
-
* @param {BigInt} amount
|
|
73
|
-
* @param {string} asset
|
|
75
|
+
* @param {string} consignment
|
|
76
|
+
* @param {string | undefined} node_url
|
|
74
77
|
* @returns {Promise<any>}
|
|
75
78
|
*/
|
|
76
|
-
export function
|
|
79
|
+
export function validate_transaction(consignment: string, node_url?: string): Promise<any>;
|
|
77
80
|
/**
|
|
78
81
|
* @param {string} consignment
|
|
82
|
+
* @param {string} txid
|
|
83
|
+
* @param {number} vout
|
|
84
|
+
* @param {string} blinding
|
|
85
|
+
* @param {string | undefined} node_url
|
|
79
86
|
* @returns {Promise<any>}
|
|
80
87
|
*/
|
|
81
|
-
export function
|
|
88
|
+
export function accept_transaction(consignment: string, txid: string, vout: number, blinding: string, node_url?: string): Promise<any>;
|
|
82
89
|
/**
|
|
90
|
+
* @param {string} rgb_tokens_descriptor
|
|
91
|
+
* @param {string} asset
|
|
83
92
|
* @param {string} consignment
|
|
84
93
|
* @param {string} txid
|
|
85
94
|
* @param {number} vout
|
|
86
95
|
* @param {string} blinding
|
|
96
|
+
* @param {string | undefined} node_url
|
|
87
97
|
* @returns {Promise<any>}
|
|
88
98
|
*/
|
|
89
|
-
export function
|
|
99
|
+
export function import_accept(rgb_tokens_descriptor: string, asset: string, consignment: string, txid: string, vout: number, blinding: string, node_url?: string): Promise<any>;
|
|
90
100
|
/**
|
|
91
101
|
* @param {string} network_str
|
|
92
102
|
*/
|
|
@@ -100,15 +110,15 @@ export interface InitOutput {
|
|
|
100
110
|
readonly get_mnemonic_seed: (a: number, b: number, c: number, d: number) => number;
|
|
101
111
|
readonly save_mnemonic_seed: (a: number, b: number, c: number, d: number, e: number, f: number) => number;
|
|
102
112
|
readonly get_wallet_data: (a: number, b: number, c: number, d: number) => number;
|
|
103
|
-
readonly import_list_assets: () => number;
|
|
113
|
+
readonly import_list_assets: (a: number, b: number) => number;
|
|
104
114
|
readonly import_asset: (a: number, b: number, c: number, d: number, e: number, f: number, g: number, h: number) => number;
|
|
105
|
-
readonly
|
|
106
|
-
readonly set_blinded_utxo: (a: number, b: number) => number;
|
|
115
|
+
readonly set_blinded_utxo: (a: number, b: number, c: number, d: number) => number;
|
|
107
116
|
readonly send_sats: (a: number, b: number, c: number, d: number, e: number, f: number, g: number, h: number) => number;
|
|
108
|
-
readonly
|
|
109
|
-
readonly
|
|
110
|
-
readonly validate_transaction: (a: number, b: number) => number;
|
|
111
|
-
readonly accept_transaction: (a: number, b: number, c: number, d: number, e: number, f: number, g: number) => number;
|
|
117
|
+
readonly fund_wallet: (a: number, b: number, c: number, d: number, e: number, f: number, g: number, h: number) => number;
|
|
118
|
+
readonly send_tokens: (a: number, b: number, c: number, d: number, e: number, f: number, g: number, h: number, i: number, j: number, k: number, l: number, m: number, n: number) => number;
|
|
119
|
+
readonly validate_transaction: (a: number, b: number, c: number, d: number) => number;
|
|
120
|
+
readonly accept_transaction: (a: number, b: number, c: number, d: number, e: number, f: number, g: number, h: number, i: number) => number;
|
|
121
|
+
readonly import_accept: (a: number, b: number, c: number, d: number, e: number, f: number, g: number, h: number, i: number, j: number, k: number, l: number, m: number) => number;
|
|
112
122
|
readonly switch_network: (a: number, b: number) => void;
|
|
113
123
|
readonly rustsecp256k1_v0_4_1_context_create: (a: number) => number;
|
|
114
124
|
readonly rustsecp256k1_v0_4_1_context_destroy: (a: number) => void;
|
|
@@ -117,12 +127,21 @@ export interface InitOutput {
|
|
|
117
127
|
readonly __wbindgen_malloc: (a: number) => number;
|
|
118
128
|
readonly __wbindgen_realloc: (a: number, b: number, c: number) => number;
|
|
119
129
|
readonly __wbindgen_export_2: WebAssembly.Table;
|
|
120
|
-
readonly
|
|
130
|
+
readonly _dyn_core__ops__function__FnMut__A____Output___R_as_wasm_bindgen__closure__WasmClosure___describe__invoke__hc5a095e721c93f87: (a: number, b: number, c: number) => void;
|
|
121
131
|
readonly __wbindgen_exn_store: (a: number) => void;
|
|
122
132
|
readonly __wbindgen_free: (a: number, b: number) => void;
|
|
123
|
-
readonly
|
|
133
|
+
readonly wasm_bindgen__convert__closures__invoke2_mut__h2ea55aec2c4d5fb4: (a: number, b: number, c: number, d: number) => void;
|
|
124
134
|
}
|
|
125
135
|
|
|
136
|
+
/**
|
|
137
|
+
* Synchronously compiles the given `bytes` and instantiates the WebAssembly module.
|
|
138
|
+
*
|
|
139
|
+
* @param {BufferSource} bytes
|
|
140
|
+
*
|
|
141
|
+
* @returns {InitOutput}
|
|
142
|
+
*/
|
|
143
|
+
export function initSync(bytes: BufferSource): InitOutput;
|
|
144
|
+
|
|
126
145
|
/**
|
|
127
146
|
* If `module_or_path` is {RequestInfo} or {URL}, makes a request and
|
|
128
147
|
* for everything else, calls `WebAssembly.instantiate` directly.
|
package/bitmask_core.js
CHANGED
|
@@ -21,16 +21,16 @@ function takeObject(idx) {
|
|
|
21
21
|
return ret;
|
|
22
22
|
}
|
|
23
23
|
|
|
24
|
-
|
|
24
|
+
const cachedTextDecoder = new TextDecoder('utf-8', { ignoreBOM: true, fatal: true });
|
|
25
25
|
|
|
26
26
|
cachedTextDecoder.decode();
|
|
27
27
|
|
|
28
|
-
let
|
|
28
|
+
let cachedUint8Memory0;
|
|
29
29
|
function getUint8Memory0() {
|
|
30
|
-
if (
|
|
31
|
-
|
|
30
|
+
if (cachedUint8Memory0.byteLength === 0) {
|
|
31
|
+
cachedUint8Memory0 = new Uint8Array(wasm.memory.buffer);
|
|
32
32
|
}
|
|
33
|
-
return
|
|
33
|
+
return cachedUint8Memory0;
|
|
34
34
|
}
|
|
35
35
|
|
|
36
36
|
function getStringFromWasm0(ptr, len) {
|
|
@@ -48,7 +48,7 @@ function addHeapObject(obj) {
|
|
|
48
48
|
|
|
49
49
|
let WASM_VECTOR_LEN = 0;
|
|
50
50
|
|
|
51
|
-
|
|
51
|
+
const cachedTextEncoder = new TextEncoder('utf-8');
|
|
52
52
|
|
|
53
53
|
const encodeString = (typeof cachedTextEncoder.encodeInto === 'function'
|
|
54
54
|
? function (arg, view) {
|
|
@@ -101,12 +101,12 @@ function passStringToWasm0(arg, malloc, realloc) {
|
|
|
101
101
|
return ptr;
|
|
102
102
|
}
|
|
103
103
|
|
|
104
|
-
let
|
|
104
|
+
let cachedInt32Memory0;
|
|
105
105
|
function getInt32Memory0() {
|
|
106
|
-
if (
|
|
107
|
-
|
|
106
|
+
if (cachedInt32Memory0.byteLength === 0) {
|
|
107
|
+
cachedInt32Memory0 = new Int32Array(wasm.memory.buffer);
|
|
108
108
|
}
|
|
109
|
-
return
|
|
109
|
+
return cachedInt32Memory0;
|
|
110
110
|
}
|
|
111
111
|
|
|
112
112
|
function isLikeNone(x) {
|
|
@@ -203,7 +203,7 @@ function makeMutClosure(arg0, arg1, dtor, f) {
|
|
|
203
203
|
return real;
|
|
204
204
|
}
|
|
205
205
|
function __wbg_adapter_28(arg0, arg1, arg2) {
|
|
206
|
-
wasm.
|
|
206
|
+
wasm._dyn_core__ops__function__FnMut__A____Output___R_as_wasm_bindgen__closure__WasmClosure___describe__invoke__hc5a095e721c93f87(arg0, arg1, addHeapObject(arg2));
|
|
207
207
|
}
|
|
208
208
|
|
|
209
209
|
/**
|
|
@@ -212,11 +212,11 @@ function __wbg_adapter_28(arg0, arg1, arg2) {
|
|
|
212
212
|
* @returns {Promise<any>}
|
|
213
213
|
*/
|
|
214
214
|
export function get_vault(password, encrypted_descriptors) {
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
215
|
+
const ptr0 = passStringToWasm0(password, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
216
|
+
const len0 = WASM_VECTOR_LEN;
|
|
217
|
+
const ptr1 = passStringToWasm0(encrypted_descriptors, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
218
|
+
const len1 = WASM_VECTOR_LEN;
|
|
219
|
+
const ret = wasm.get_vault(ptr0, len0, ptr1, len1);
|
|
220
220
|
return takeObject(ret);
|
|
221
221
|
}
|
|
222
222
|
|
|
@@ -226,11 +226,11 @@ export function get_vault(password, encrypted_descriptors) {
|
|
|
226
226
|
* @returns {Promise<any>}
|
|
227
227
|
*/
|
|
228
228
|
export function get_mnemonic_seed(encryption_password, seed_password) {
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
229
|
+
const ptr0 = passStringToWasm0(encryption_password, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
230
|
+
const len0 = WASM_VECTOR_LEN;
|
|
231
|
+
const ptr1 = passStringToWasm0(seed_password, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
232
|
+
const len1 = WASM_VECTOR_LEN;
|
|
233
|
+
const ret = wasm.get_mnemonic_seed(ptr0, len0, ptr1, len1);
|
|
234
234
|
return takeObject(ret);
|
|
235
235
|
}
|
|
236
236
|
|
|
@@ -241,80 +241,72 @@ export function get_mnemonic_seed(encryption_password, seed_password) {
|
|
|
241
241
|
* @returns {Promise<any>}
|
|
242
242
|
*/
|
|
243
243
|
export function save_mnemonic_seed(mnemonic, encryption_password, seed_password) {
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
244
|
+
const ptr0 = passStringToWasm0(mnemonic, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
245
|
+
const len0 = WASM_VECTOR_LEN;
|
|
246
|
+
const ptr1 = passStringToWasm0(encryption_password, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
247
|
+
const len1 = WASM_VECTOR_LEN;
|
|
248
|
+
const ptr2 = passStringToWasm0(seed_password, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
249
|
+
const len2 = WASM_VECTOR_LEN;
|
|
250
|
+
const ret = wasm.save_mnemonic_seed(ptr0, len0, ptr1, len1, ptr2, len2);
|
|
251
251
|
return takeObject(ret);
|
|
252
252
|
}
|
|
253
253
|
|
|
254
254
|
/**
|
|
255
255
|
* @param {string} descriptor
|
|
256
|
-
* @param {string} change_descriptor
|
|
256
|
+
* @param {string | undefined} change_descriptor
|
|
257
257
|
* @returns {Promise<any>}
|
|
258
258
|
*/
|
|
259
259
|
export function get_wallet_data(descriptor, change_descriptor) {
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
var ptr1 = passStringToWasm0(change_descriptor, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
260
|
+
const ptr0 = passStringToWasm0(descriptor, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
261
|
+
const len0 = WASM_VECTOR_LEN;
|
|
262
|
+
var ptr1 = isLikeNone(change_descriptor) ? 0 : passStringToWasm0(change_descriptor, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
263
263
|
var len1 = WASM_VECTOR_LEN;
|
|
264
|
-
|
|
264
|
+
const ret = wasm.get_wallet_data(ptr0, len0, ptr1, len1);
|
|
265
265
|
return takeObject(ret);
|
|
266
266
|
}
|
|
267
267
|
|
|
268
268
|
/**
|
|
269
|
+
* @param {string | undefined} node_url
|
|
269
270
|
* @returns {Promise<any>}
|
|
270
271
|
*/
|
|
271
|
-
export function import_list_assets() {
|
|
272
|
-
var
|
|
272
|
+
export function import_list_assets(node_url) {
|
|
273
|
+
var ptr0 = isLikeNone(node_url) ? 0 : passStringToWasm0(node_url, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
274
|
+
var len0 = WASM_VECTOR_LEN;
|
|
275
|
+
const ret = wasm.import_list_assets(ptr0, len0);
|
|
273
276
|
return takeObject(ret);
|
|
274
277
|
}
|
|
275
278
|
|
|
276
279
|
/**
|
|
277
|
-
* @param {string}
|
|
278
|
-
* @param {string} change_descriptor
|
|
280
|
+
* @param {string} rgb_tokens_descriptor
|
|
279
281
|
* @param {string | undefined} asset
|
|
280
282
|
* @param {string | undefined} genesis
|
|
283
|
+
* @param {string | undefined} node_url
|
|
281
284
|
* @returns {Promise<any>}
|
|
282
285
|
*/
|
|
283
|
-
export function import_asset(
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
var ptr1 = passStringToWasm0(
|
|
286
|
+
export function import_asset(rgb_tokens_descriptor, asset, genesis, node_url) {
|
|
287
|
+
const ptr0 = passStringToWasm0(rgb_tokens_descriptor, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
288
|
+
const len0 = WASM_VECTOR_LEN;
|
|
289
|
+
var ptr1 = isLikeNone(asset) ? 0 : passStringToWasm0(asset, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
287
290
|
var len1 = WASM_VECTOR_LEN;
|
|
288
|
-
var ptr2 = isLikeNone(
|
|
291
|
+
var ptr2 = isLikeNone(genesis) ? 0 : passStringToWasm0(genesis, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
289
292
|
var len2 = WASM_VECTOR_LEN;
|
|
290
|
-
var ptr3 = isLikeNone(
|
|
293
|
+
var ptr3 = isLikeNone(node_url) ? 0 : passStringToWasm0(node_url, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
291
294
|
var len3 = WASM_VECTOR_LEN;
|
|
292
|
-
|
|
293
|
-
return takeObject(ret);
|
|
294
|
-
}
|
|
295
|
-
|
|
296
|
-
/**
|
|
297
|
-
* @param {string} unspent
|
|
298
|
-
* @param {string} blinded_unspents
|
|
299
|
-
* @returns {Promise<any>}
|
|
300
|
-
*/
|
|
301
|
-
export function set_blinded_utxos(unspent, blinded_unspents) {
|
|
302
|
-
var ptr0 = passStringToWasm0(unspent, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
303
|
-
var len0 = WASM_VECTOR_LEN;
|
|
304
|
-
var ptr1 = passStringToWasm0(blinded_unspents, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
305
|
-
var len1 = WASM_VECTOR_LEN;
|
|
306
|
-
var ret = wasm.set_blinded_utxos(ptr0, len0, ptr1, len1);
|
|
295
|
+
const ret = wasm.import_asset(ptr0, len0, ptr1, len1, ptr2, len2, ptr3, len3);
|
|
307
296
|
return takeObject(ret);
|
|
308
297
|
}
|
|
309
298
|
|
|
310
299
|
/**
|
|
311
300
|
* @param {string} utxo_string
|
|
301
|
+
* @param {string | undefined} node_url
|
|
312
302
|
* @returns {Promise<any>}
|
|
313
303
|
*/
|
|
314
|
-
export function set_blinded_utxo(utxo_string) {
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
var
|
|
304
|
+
export function set_blinded_utxo(utxo_string, node_url) {
|
|
305
|
+
const ptr0 = passStringToWasm0(utxo_string, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
306
|
+
const len0 = WASM_VECTOR_LEN;
|
|
307
|
+
var ptr1 = isLikeNone(node_url) ? 0 : passStringToWasm0(node_url, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
308
|
+
var len1 = WASM_VECTOR_LEN;
|
|
309
|
+
const ret = wasm.set_blinded_utxo(ptr0, len0, ptr1, len1);
|
|
318
310
|
return takeObject(ret);
|
|
319
311
|
}
|
|
320
312
|
|
|
@@ -325,97 +317,132 @@ const uint64CvtShim = new BigUint64Array(u32CvtShim.buffer);
|
|
|
325
317
|
* @param {string} descriptor
|
|
326
318
|
* @param {string} change_descriptor
|
|
327
319
|
* @param {string} address
|
|
328
|
-
* @param {
|
|
320
|
+
* @param {bigint} amount
|
|
329
321
|
* @returns {Promise<any>}
|
|
330
322
|
*/
|
|
331
323
|
export function send_sats(descriptor, change_descriptor, address, amount) {
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
324
|
+
const ptr0 = passStringToWasm0(descriptor, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
325
|
+
const len0 = WASM_VECTOR_LEN;
|
|
326
|
+
const ptr1 = passStringToWasm0(change_descriptor, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
327
|
+
const len1 = WASM_VECTOR_LEN;
|
|
328
|
+
const ptr2 = passStringToWasm0(address, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
329
|
+
const len2 = WASM_VECTOR_LEN;
|
|
338
330
|
uint64CvtShim[0] = amount;
|
|
339
331
|
const low3 = u32CvtShim[0];
|
|
340
332
|
const high3 = u32CvtShim[1];
|
|
341
|
-
|
|
333
|
+
const ret = wasm.send_sats(ptr0, len0, ptr1, len1, ptr2, len2, low3, high3);
|
|
342
334
|
return takeObject(ret);
|
|
343
335
|
}
|
|
344
336
|
|
|
345
337
|
/**
|
|
346
338
|
* @param {string} descriptor
|
|
347
339
|
* @param {string} change_descriptor
|
|
340
|
+
* @param {string} address
|
|
341
|
+
* @param {string} uda_address
|
|
342
|
+
* @returns {Promise<any>}
|
|
343
|
+
*/
|
|
344
|
+
export function fund_wallet(descriptor, change_descriptor, address, uda_address) {
|
|
345
|
+
const ptr0 = passStringToWasm0(descriptor, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
346
|
+
const len0 = WASM_VECTOR_LEN;
|
|
347
|
+
const ptr1 = passStringToWasm0(change_descriptor, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
348
|
+
const len1 = WASM_VECTOR_LEN;
|
|
349
|
+
const ptr2 = passStringToWasm0(address, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
350
|
+
const len2 = WASM_VECTOR_LEN;
|
|
351
|
+
const ptr3 = passStringToWasm0(uda_address, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
352
|
+
const len3 = WASM_VECTOR_LEN;
|
|
353
|
+
const ret = wasm.fund_wallet(ptr0, len0, ptr1, len1, ptr2, len2, ptr3, len3);
|
|
354
|
+
return takeObject(ret);
|
|
355
|
+
}
|
|
356
|
+
|
|
357
|
+
/**
|
|
358
|
+
* @param {string} btc_descriptor
|
|
359
|
+
* @param {string} btc_change_descriptor
|
|
360
|
+
* @param {string} rgb_tokens_descriptor
|
|
348
361
|
* @param {string} blinded_utxo
|
|
349
|
-
* @param {
|
|
362
|
+
* @param {bigint} amount
|
|
350
363
|
* @param {string} asset
|
|
364
|
+
* @param {string | undefined} node_url
|
|
351
365
|
* @returns {Promise<any>}
|
|
352
366
|
*/
|
|
353
|
-
export function send_tokens(
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
|
|
367
|
+
export function send_tokens(btc_descriptor, btc_change_descriptor, rgb_tokens_descriptor, blinded_utxo, amount, asset, node_url) {
|
|
368
|
+
const ptr0 = passStringToWasm0(btc_descriptor, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
369
|
+
const len0 = WASM_VECTOR_LEN;
|
|
370
|
+
const ptr1 = passStringToWasm0(btc_change_descriptor, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
371
|
+
const len1 = WASM_VECTOR_LEN;
|
|
372
|
+
const ptr2 = passStringToWasm0(rgb_tokens_descriptor, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
373
|
+
const len2 = WASM_VECTOR_LEN;
|
|
374
|
+
const ptr3 = passStringToWasm0(blinded_utxo, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
375
|
+
const len3 = WASM_VECTOR_LEN;
|
|
360
376
|
uint64CvtShim[0] = amount;
|
|
361
|
-
const
|
|
362
|
-
const
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
var
|
|
377
|
+
const low4 = u32CvtShim[0];
|
|
378
|
+
const high4 = u32CvtShim[1];
|
|
379
|
+
const ptr5 = passStringToWasm0(asset, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
380
|
+
const len5 = WASM_VECTOR_LEN;
|
|
381
|
+
var ptr6 = isLikeNone(node_url) ? 0 : passStringToWasm0(node_url, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
382
|
+
var len6 = WASM_VECTOR_LEN;
|
|
383
|
+
const ret = wasm.send_tokens(ptr0, len0, ptr1, len1, ptr2, len2, ptr3, len3, low4, high4, ptr5, len5, ptr6, len6);
|
|
366
384
|
return takeObject(ret);
|
|
367
385
|
}
|
|
368
386
|
|
|
369
387
|
/**
|
|
370
|
-
* @param {string}
|
|
371
|
-
* @param {string}
|
|
372
|
-
* @param {string} utxo
|
|
373
|
-
* @param {BigInt} amount
|
|
374
|
-
* @param {string} asset
|
|
388
|
+
* @param {string} consignment
|
|
389
|
+
* @param {string | undefined} node_url
|
|
375
390
|
* @returns {Promise<any>}
|
|
376
391
|
*/
|
|
377
|
-
export function
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
var ptr1 = passStringToWasm0(
|
|
392
|
+
export function validate_transaction(consignment, node_url) {
|
|
393
|
+
const ptr0 = passStringToWasm0(consignment, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
394
|
+
const len0 = WASM_VECTOR_LEN;
|
|
395
|
+
var ptr1 = isLikeNone(node_url) ? 0 : passStringToWasm0(node_url, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
381
396
|
var len1 = WASM_VECTOR_LEN;
|
|
382
|
-
|
|
383
|
-
var len2 = WASM_VECTOR_LEN;
|
|
384
|
-
uint64CvtShim[0] = amount;
|
|
385
|
-
const low3 = u32CvtShim[0];
|
|
386
|
-
const high3 = u32CvtShim[1];
|
|
387
|
-
var ptr4 = passStringToWasm0(asset, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
388
|
-
var len4 = WASM_VECTOR_LEN;
|
|
389
|
-
var ret = wasm.send_tokens_full(ptr0, len0, ptr1, len1, ptr2, len2, low3, high3, ptr4, len4);
|
|
397
|
+
const ret = wasm.validate_transaction(ptr0, len0, ptr1, len1);
|
|
390
398
|
return takeObject(ret);
|
|
391
399
|
}
|
|
392
400
|
|
|
393
401
|
/**
|
|
394
402
|
* @param {string} consignment
|
|
403
|
+
* @param {string} txid
|
|
404
|
+
* @param {number} vout
|
|
405
|
+
* @param {string} blinding
|
|
406
|
+
* @param {string | undefined} node_url
|
|
395
407
|
* @returns {Promise<any>}
|
|
396
408
|
*/
|
|
397
|
-
export function
|
|
398
|
-
|
|
399
|
-
|
|
400
|
-
|
|
409
|
+
export function accept_transaction(consignment, txid, vout, blinding, node_url) {
|
|
410
|
+
const ptr0 = passStringToWasm0(consignment, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
411
|
+
const len0 = WASM_VECTOR_LEN;
|
|
412
|
+
const ptr1 = passStringToWasm0(txid, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
413
|
+
const len1 = WASM_VECTOR_LEN;
|
|
414
|
+
const ptr2 = passStringToWasm0(blinding, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
415
|
+
const len2 = WASM_VECTOR_LEN;
|
|
416
|
+
var ptr3 = isLikeNone(node_url) ? 0 : passStringToWasm0(node_url, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
417
|
+
var len3 = WASM_VECTOR_LEN;
|
|
418
|
+
const ret = wasm.accept_transaction(ptr0, len0, ptr1, len1, vout, ptr2, len2, ptr3, len3);
|
|
401
419
|
return takeObject(ret);
|
|
402
420
|
}
|
|
403
421
|
|
|
404
422
|
/**
|
|
423
|
+
* @param {string} rgb_tokens_descriptor
|
|
424
|
+
* @param {string} asset
|
|
405
425
|
* @param {string} consignment
|
|
406
426
|
* @param {string} txid
|
|
407
427
|
* @param {number} vout
|
|
408
428
|
* @param {string} blinding
|
|
429
|
+
* @param {string | undefined} node_url
|
|
409
430
|
* @returns {Promise<any>}
|
|
410
431
|
*/
|
|
411
|
-
export function
|
|
412
|
-
|
|
413
|
-
|
|
414
|
-
|
|
415
|
-
|
|
416
|
-
|
|
417
|
-
|
|
418
|
-
|
|
432
|
+
export function import_accept(rgb_tokens_descriptor, asset, consignment, txid, vout, blinding, node_url) {
|
|
433
|
+
const ptr0 = passStringToWasm0(rgb_tokens_descriptor, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
434
|
+
const len0 = WASM_VECTOR_LEN;
|
|
435
|
+
const ptr1 = passStringToWasm0(asset, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
436
|
+
const len1 = WASM_VECTOR_LEN;
|
|
437
|
+
const ptr2 = passStringToWasm0(consignment, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
438
|
+
const len2 = WASM_VECTOR_LEN;
|
|
439
|
+
const ptr3 = passStringToWasm0(txid, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
440
|
+
const len3 = WASM_VECTOR_LEN;
|
|
441
|
+
const ptr4 = passStringToWasm0(blinding, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
442
|
+
const len4 = WASM_VECTOR_LEN;
|
|
443
|
+
var ptr5 = isLikeNone(node_url) ? 0 : passStringToWasm0(node_url, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
444
|
+
var len5 = WASM_VECTOR_LEN;
|
|
445
|
+
const ret = wasm.import_accept(ptr0, len0, ptr1, len1, ptr2, len2, ptr3, len3, vout, ptr4, len4, ptr5, len5);
|
|
419
446
|
return takeObject(ret);
|
|
420
447
|
}
|
|
421
448
|
|
|
@@ -423,8 +450,8 @@ export function accept_transaction(consignment, txid, vout, blinding) {
|
|
|
423
450
|
* @param {string} network_str
|
|
424
451
|
*/
|
|
425
452
|
export function switch_network(network_str) {
|
|
426
|
-
|
|
427
|
-
|
|
453
|
+
const ptr0 = passStringToWasm0(network_str, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
454
|
+
const len0 = WASM_VECTOR_LEN;
|
|
428
455
|
wasm.switch_network(ptr0, len0);
|
|
429
456
|
}
|
|
430
457
|
|
|
@@ -440,12 +467,12 @@ function getArrayU8FromWasm0(ptr, len) {
|
|
|
440
467
|
return getUint8Memory0().subarray(ptr / 1, ptr / 1 + len);
|
|
441
468
|
}
|
|
442
469
|
|
|
443
|
-
let
|
|
470
|
+
let cachedUint32Memory0;
|
|
444
471
|
function getUint32Memory0() {
|
|
445
|
-
if (
|
|
446
|
-
|
|
472
|
+
if (cachedUint32Memory0.byteLength === 0) {
|
|
473
|
+
cachedUint32Memory0 = new Uint32Array(wasm.memory.buffer);
|
|
447
474
|
}
|
|
448
|
-
return
|
|
475
|
+
return cachedUint32Memory0;
|
|
449
476
|
}
|
|
450
477
|
|
|
451
478
|
function getArrayJsValueFromWasm0(ptr, len) {
|
|
@@ -457,8 +484,8 @@ function getArrayJsValueFromWasm0(ptr, len) {
|
|
|
457
484
|
}
|
|
458
485
|
return result;
|
|
459
486
|
}
|
|
460
|
-
function
|
|
461
|
-
wasm.
|
|
487
|
+
function __wbg_adapter_159(arg0, arg1, arg2, arg3) {
|
|
488
|
+
wasm.wasm_bindgen__convert__closures__invoke2_mut__h2ea55aec2c4d5fb4(arg0, arg1, addHeapObject(arg2), addHeapObject(arg3));
|
|
462
489
|
}
|
|
463
490
|
|
|
464
491
|
async function load(module, imports) {
|
|
@@ -492,89 +519,86 @@ async function load(module, imports) {
|
|
|
492
519
|
}
|
|
493
520
|
}
|
|
494
521
|
|
|
495
|
-
|
|
496
|
-
if (typeof input === 'undefined') {
|
|
497
|
-
input = new URL('bitmask_core_bg.wasm', import.meta.url);
|
|
498
|
-
}
|
|
522
|
+
function getImports() {
|
|
499
523
|
const imports = {};
|
|
500
524
|
imports.wbg = {};
|
|
501
525
|
imports.wbg.__wbindgen_object_drop_ref = function(arg0) {
|
|
502
526
|
takeObject(arg0);
|
|
503
527
|
};
|
|
504
528
|
imports.wbg.__wbindgen_string_new = function(arg0, arg1) {
|
|
505
|
-
|
|
529
|
+
const ret = getStringFromWasm0(arg0, arg1);
|
|
506
530
|
return addHeapObject(ret);
|
|
507
531
|
};
|
|
532
|
+
imports.wbg.__wbindgen_json_serialize = function(arg0, arg1) {
|
|
533
|
+
const obj = getObject(arg1);
|
|
534
|
+
const ret = JSON.stringify(obj === undefined ? null : obj);
|
|
535
|
+
const ptr0 = passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
536
|
+
const len0 = WASM_VECTOR_LEN;
|
|
537
|
+
getInt32Memory0()[arg0 / 4 + 1] = len0;
|
|
538
|
+
getInt32Memory0()[arg0 / 4 + 0] = ptr0;
|
|
539
|
+
};
|
|
508
540
|
imports.wbg.__wbindgen_cb_drop = function(arg0) {
|
|
509
541
|
const obj = takeObject(arg0).original;
|
|
510
542
|
if (obj.cnt-- == 1) {
|
|
511
543
|
obj.a = 0;
|
|
512
544
|
return true;
|
|
513
545
|
}
|
|
514
|
-
|
|
546
|
+
const ret = false;
|
|
515
547
|
return ret;
|
|
516
548
|
};
|
|
517
|
-
imports.wbg.__wbindgen_json_serialize = function(arg0, arg1) {
|
|
518
|
-
const obj = getObject(arg1);
|
|
519
|
-
var ret = JSON.stringify(obj === undefined ? null : obj);
|
|
520
|
-
var ptr0 = passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
521
|
-
var len0 = WASM_VECTOR_LEN;
|
|
522
|
-
getInt32Memory0()[arg0 / 4 + 1] = len0;
|
|
523
|
-
getInt32Memory0()[arg0 / 4 + 0] = ptr0;
|
|
524
|
-
};
|
|
525
549
|
imports.wbg.__wbindgen_string_get = function(arg0, arg1) {
|
|
526
550
|
const obj = getObject(arg1);
|
|
527
|
-
|
|
551
|
+
const ret = typeof(obj) === 'string' ? obj : undefined;
|
|
528
552
|
var ptr0 = isLikeNone(ret) ? 0 : passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
529
553
|
var len0 = WASM_VECTOR_LEN;
|
|
530
554
|
getInt32Memory0()[arg0 / 4 + 1] = len0;
|
|
531
555
|
getInt32Memory0()[arg0 / 4 + 0] = ptr0;
|
|
532
556
|
};
|
|
557
|
+
imports.wbg.__wbindgen_is_string = function(arg0) {
|
|
558
|
+
const ret = typeof(getObject(arg0)) === 'string';
|
|
559
|
+
return ret;
|
|
560
|
+
};
|
|
533
561
|
imports.wbg.__wbindgen_object_clone_ref = function(arg0) {
|
|
534
|
-
|
|
562
|
+
const ret = getObject(arg0);
|
|
535
563
|
return addHeapObject(ret);
|
|
536
564
|
};
|
|
537
|
-
imports.wbg.
|
|
565
|
+
imports.wbg.__wbg_randomFillSync_91e2b39becca6147 = function() { return handleError(function (arg0, arg1, arg2) {
|
|
538
566
|
getObject(arg0).randomFillSync(getArrayU8FromWasm0(arg1, arg2));
|
|
539
567
|
}, arguments) };
|
|
540
|
-
imports.wbg.
|
|
568
|
+
imports.wbg.__wbg_getRandomValues_b14734aa289bc356 = function() { return handleError(function (arg0, arg1) {
|
|
541
569
|
getObject(arg0).getRandomValues(getObject(arg1));
|
|
542
570
|
}, arguments) };
|
|
543
|
-
imports.wbg.
|
|
544
|
-
|
|
571
|
+
imports.wbg.__wbg_process_e56fd54cf6319b6c = function(arg0) {
|
|
572
|
+
const ret = getObject(arg0).process;
|
|
545
573
|
return addHeapObject(ret);
|
|
546
574
|
};
|
|
547
575
|
imports.wbg.__wbindgen_is_object = function(arg0) {
|
|
548
576
|
const val = getObject(arg0);
|
|
549
|
-
|
|
577
|
+
const ret = typeof(val) === 'object' && val !== null;
|
|
550
578
|
return ret;
|
|
551
579
|
};
|
|
552
|
-
imports.wbg.
|
|
553
|
-
|
|
580
|
+
imports.wbg.__wbg_versions_77e21455908dad33 = function(arg0) {
|
|
581
|
+
const ret = getObject(arg0).versions;
|
|
554
582
|
return addHeapObject(ret);
|
|
555
583
|
};
|
|
556
|
-
imports.wbg.
|
|
557
|
-
|
|
584
|
+
imports.wbg.__wbg_node_0dd25d832e4785d5 = function(arg0) {
|
|
585
|
+
const ret = getObject(arg0).node;
|
|
558
586
|
return addHeapObject(ret);
|
|
559
587
|
};
|
|
560
|
-
imports.wbg.
|
|
561
|
-
|
|
562
|
-
return ret;
|
|
563
|
-
};
|
|
564
|
-
imports.wbg.__wbg_static_accessor_NODE_MODULE_bdc5ca9096c68aeb = function() {
|
|
565
|
-
var ret = module;
|
|
588
|
+
imports.wbg.__wbg_static_accessor_NODE_MODULE_26b231378c1be7dd = function() {
|
|
589
|
+
const ret = module;
|
|
566
590
|
return addHeapObject(ret);
|
|
567
591
|
};
|
|
568
|
-
imports.wbg.
|
|
569
|
-
|
|
592
|
+
imports.wbg.__wbg_require_0db1598d9ccecb30 = function() { return handleError(function (arg0, arg1, arg2) {
|
|
593
|
+
const ret = getObject(arg0).require(getStringFromWasm0(arg1, arg2));
|
|
570
594
|
return addHeapObject(ret);
|
|
571
595
|
}, arguments) };
|
|
572
|
-
imports.wbg.
|
|
573
|
-
|
|
596
|
+
imports.wbg.__wbg_crypto_b95d7173266618a9 = function(arg0) {
|
|
597
|
+
const ret = getObject(arg0).crypto;
|
|
574
598
|
return addHeapObject(ret);
|
|
575
599
|
};
|
|
576
|
-
imports.wbg.
|
|
577
|
-
|
|
600
|
+
imports.wbg.__wbg_msCrypto_5a86d77a66230f81 = function(arg0) {
|
|
601
|
+
const ret = getObject(arg0).msCrypto;
|
|
578
602
|
return addHeapObject(ret);
|
|
579
603
|
};
|
|
580
604
|
imports.wbg.__wbg_log_06b7ffc63a0f8bee = function(arg0, arg1) {
|
|
@@ -582,101 +606,130 @@ async function init(input) {
|
|
|
582
606
|
wasm.__wbindgen_free(arg0, arg1 * 4);
|
|
583
607
|
console.log(...v0);
|
|
584
608
|
};
|
|
585
|
-
imports.wbg.
|
|
586
|
-
|
|
609
|
+
imports.wbg.__wbg_fetch_b1379d93c1e2b015 = function(arg0) {
|
|
610
|
+
const ret = fetch(getObject(arg0));
|
|
587
611
|
return addHeapObject(ret);
|
|
588
612
|
};
|
|
589
|
-
imports.wbg.
|
|
590
|
-
|
|
613
|
+
imports.wbg.__wbg_instanceof_Window_a2a08d3918d7d4d0 = function(arg0) {
|
|
614
|
+
const ret = getObject(arg0) instanceof Window;
|
|
591
615
|
return ret;
|
|
592
616
|
};
|
|
593
|
-
imports.wbg.
|
|
594
|
-
|
|
617
|
+
imports.wbg.__wbg_fetch_23507368eed8d838 = function(arg0, arg1) {
|
|
618
|
+
const ret = getObject(arg0).fetch(getObject(arg1));
|
|
595
619
|
return addHeapObject(ret);
|
|
596
620
|
};
|
|
597
|
-
imports.wbg.
|
|
598
|
-
|
|
599
|
-
return addHeapObject(ret);
|
|
600
|
-
};
|
|
601
|
-
imports.wbg.__wbg_new_226d109446575877 = function() { return handleError(function () {
|
|
602
|
-
var ret = new Headers();
|
|
603
|
-
return addHeapObject(ret);
|
|
604
|
-
}, arguments) };
|
|
605
|
-
imports.wbg.__wbg_append_4d85f35672cbffa7 = function() { return handleError(function (arg0, arg1, arg2, arg3, arg4) {
|
|
606
|
-
getObject(arg0).append(getStringFromWasm0(arg1, arg2), getStringFromWasm0(arg3, arg4));
|
|
607
|
-
}, arguments) };
|
|
608
|
-
imports.wbg.__wbg_set_f9448486a94c9aef = function() { return handleError(function (arg0, arg1, arg2, arg3, arg4) {
|
|
609
|
-
getObject(arg0).set(getStringFromWasm0(arg1, arg2), getStringFromWasm0(arg3, arg4));
|
|
610
|
-
}, arguments) };
|
|
611
|
-
imports.wbg.__wbg_instanceof_Response_ea36d565358a42f7 = function(arg0) {
|
|
612
|
-
var ret = getObject(arg0) instanceof Response;
|
|
621
|
+
imports.wbg.__wbg_instanceof_Response_e928c54c1025470c = function(arg0) {
|
|
622
|
+
const ret = getObject(arg0) instanceof Response;
|
|
613
623
|
return ret;
|
|
614
624
|
};
|
|
615
|
-
imports.wbg.
|
|
616
|
-
|
|
617
|
-
|
|
618
|
-
|
|
625
|
+
imports.wbg.__wbg_url_0f82030e7245954c = function(arg0, arg1) {
|
|
626
|
+
const ret = getObject(arg1).url;
|
|
627
|
+
const ptr0 = passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
628
|
+
const len0 = WASM_VECTOR_LEN;
|
|
619
629
|
getInt32Memory0()[arg0 / 4 + 1] = len0;
|
|
620
630
|
getInt32Memory0()[arg0 / 4 + 0] = ptr0;
|
|
621
631
|
};
|
|
622
|
-
imports.wbg.
|
|
623
|
-
|
|
632
|
+
imports.wbg.__wbg_redirected_a3419a19f5d4cec8 = function(arg0) {
|
|
633
|
+
const ret = getObject(arg0).redirected;
|
|
624
634
|
return ret;
|
|
625
635
|
};
|
|
626
|
-
imports.wbg.
|
|
627
|
-
|
|
636
|
+
imports.wbg.__wbg_status_5b4a574de7c5bbfe = function(arg0) {
|
|
637
|
+
const ret = getObject(arg0).status;
|
|
628
638
|
return ret;
|
|
629
639
|
};
|
|
630
|
-
imports.wbg.
|
|
631
|
-
|
|
640
|
+
imports.wbg.__wbg_headers_1dc1ef92ba3d32b1 = function(arg0) {
|
|
641
|
+
const ret = getObject(arg0).headers;
|
|
632
642
|
return addHeapObject(ret);
|
|
633
643
|
};
|
|
634
|
-
imports.wbg.
|
|
635
|
-
|
|
644
|
+
imports.wbg.__wbg_bodyUsed_b23bd792b4f51c43 = function(arg0) {
|
|
645
|
+
const ret = getObject(arg0).bodyUsed;
|
|
636
646
|
return ret;
|
|
637
647
|
};
|
|
638
|
-
imports.wbg.
|
|
639
|
-
|
|
648
|
+
imports.wbg.__wbg_arrayBuffer_9c26a73988618f92 = function() { return handleError(function (arg0) {
|
|
649
|
+
const ret = getObject(arg0).arrayBuffer();
|
|
650
|
+
return addHeapObject(ret);
|
|
651
|
+
}, arguments) };
|
|
652
|
+
imports.wbg.__wbg_json_6416cf78642ce433 = function() { return handleError(function (arg0) {
|
|
653
|
+
const ret = getObject(arg0).json();
|
|
640
654
|
return addHeapObject(ret);
|
|
641
655
|
}, arguments) };
|
|
642
|
-
imports.wbg.
|
|
643
|
-
|
|
656
|
+
imports.wbg.__wbg_text_5cb78830c1a11c5b = function() { return handleError(function (arg0) {
|
|
657
|
+
const ret = getObject(arg0).text();
|
|
644
658
|
return addHeapObject(ret);
|
|
645
659
|
}, arguments) };
|
|
646
|
-
imports.wbg.
|
|
647
|
-
|
|
660
|
+
imports.wbg.__wbg_fetch_8c28485eb2d6317d = function(arg0, arg1) {
|
|
661
|
+
const ret = getObject(arg0).fetch(getObject(arg1));
|
|
662
|
+
return addHeapObject(ret);
|
|
663
|
+
};
|
|
664
|
+
imports.wbg.__wbg_new_483f23f84dfd2751 = function() { return handleError(function () {
|
|
665
|
+
const ret = new Headers();
|
|
648
666
|
return addHeapObject(ret);
|
|
649
667
|
}, arguments) };
|
|
650
|
-
imports.wbg.
|
|
651
|
-
|
|
668
|
+
imports.wbg.__wbg_append_fcf64231455390c4 = function() { return handleError(function (arg0, arg1, arg2, arg3, arg4) {
|
|
669
|
+
getObject(arg0).append(getStringFromWasm0(arg1, arg2), getStringFromWasm0(arg3, arg4));
|
|
670
|
+
}, arguments) };
|
|
671
|
+
imports.wbg.__wbg_set_23d56ff06768e13b = function() { return handleError(function (arg0, arg1, arg2, arg3, arg4) {
|
|
672
|
+
getObject(arg0).set(getStringFromWasm0(arg1, arg2), getStringFromWasm0(arg3, arg4));
|
|
673
|
+
}, arguments) };
|
|
674
|
+
imports.wbg.__wbg_new_5864f0d53a83cc43 = function() { return handleError(function () {
|
|
675
|
+
const ret = new URLSearchParams();
|
|
676
|
+
return addHeapObject(ret);
|
|
677
|
+
}, arguments) };
|
|
678
|
+
imports.wbg.__wbg_url_030ff6ed19f9422c = function(arg0, arg1) {
|
|
679
|
+
const ret = getObject(arg1).url;
|
|
680
|
+
const ptr0 = passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
681
|
+
const len0 = WASM_VECTOR_LEN;
|
|
682
|
+
getInt32Memory0()[arg0 / 4 + 1] = len0;
|
|
683
|
+
getInt32Memory0()[arg0 / 4 + 0] = ptr0;
|
|
684
|
+
};
|
|
685
|
+
imports.wbg.__wbg_newwithstr_7fc7e1b51b803fa1 = function() { return handleError(function (arg0, arg1) {
|
|
686
|
+
const ret = new Request(getStringFromWasm0(arg0, arg1));
|
|
687
|
+
return addHeapObject(ret);
|
|
688
|
+
}, arguments) };
|
|
689
|
+
imports.wbg.__wbg_newwithstrandinit_41c86e821f771b24 = function() { return handleError(function (arg0, arg1, arg2) {
|
|
690
|
+
const ret = new Request(getStringFromWasm0(arg0, arg1), getObject(arg2));
|
|
691
|
+
return addHeapObject(ret);
|
|
692
|
+
}, arguments) };
|
|
693
|
+
imports.wbg.__wbg_search_9aa1c52ef4e585b4 = function(arg0, arg1) {
|
|
694
|
+
const ret = getObject(arg1).search;
|
|
695
|
+
const ptr0 = passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
696
|
+
const len0 = WASM_VECTOR_LEN;
|
|
697
|
+
getInt32Memory0()[arg0 / 4 + 1] = len0;
|
|
698
|
+
getInt32Memory0()[arg0 / 4 + 0] = ptr0;
|
|
699
|
+
};
|
|
700
|
+
imports.wbg.__wbg_setsearch_e2944864b1e42f87 = function(arg0, arg1, arg2) {
|
|
701
|
+
getObject(arg0).search = getStringFromWasm0(arg1, arg2);
|
|
702
|
+
};
|
|
703
|
+
imports.wbg.__wbg_new_f508102bcfd6feb6 = function() { return handleError(function (arg0, arg1) {
|
|
704
|
+
const ret = new URL(getStringFromWasm0(arg0, arg1));
|
|
652
705
|
return addHeapObject(ret);
|
|
653
706
|
}, arguments) };
|
|
654
707
|
imports.wbg.__wbg_self_86b4b13392c7af56 = function() { return handleError(function () {
|
|
655
|
-
|
|
708
|
+
const ret = self.self;
|
|
656
709
|
return addHeapObject(ret);
|
|
657
710
|
}, arguments) };
|
|
658
711
|
imports.wbg.__wbg_crypto_b8c92eaac23d0d80 = function(arg0) {
|
|
659
|
-
|
|
712
|
+
const ret = getObject(arg0).crypto;
|
|
660
713
|
return addHeapObject(ret);
|
|
661
714
|
};
|
|
662
715
|
imports.wbg.__wbg_msCrypto_9ad6677321a08dd8 = function(arg0) {
|
|
663
|
-
|
|
716
|
+
const ret = getObject(arg0).msCrypto;
|
|
664
717
|
return addHeapObject(ret);
|
|
665
718
|
};
|
|
666
719
|
imports.wbg.__wbindgen_is_undefined = function(arg0) {
|
|
667
|
-
|
|
720
|
+
const ret = getObject(arg0) === undefined;
|
|
668
721
|
return ret;
|
|
669
722
|
};
|
|
670
723
|
imports.wbg.__wbg_static_accessor_MODULE_452b4680e8614c81 = function() {
|
|
671
|
-
|
|
724
|
+
const ret = module;
|
|
672
725
|
return addHeapObject(ret);
|
|
673
726
|
};
|
|
674
727
|
imports.wbg.__wbg_require_f5521a5b85ad2542 = function(arg0, arg1, arg2) {
|
|
675
|
-
|
|
728
|
+
const ret = getObject(arg0).require(getStringFromWasm0(arg1, arg2));
|
|
676
729
|
return addHeapObject(ret);
|
|
677
730
|
};
|
|
678
731
|
imports.wbg.__wbg_getRandomValues_dd27e6b0652b3236 = function(arg0) {
|
|
679
|
-
|
|
732
|
+
const ret = getObject(arg0).getRandomValues;
|
|
680
733
|
return addHeapObject(ret);
|
|
681
734
|
};
|
|
682
735
|
imports.wbg.__wbg_getRandomValues_e57c9b75ddead065 = function(arg0, arg1) {
|
|
@@ -685,167 +738,171 @@ async function init(input) {
|
|
|
685
738
|
imports.wbg.__wbg_randomFillSync_d2ba53160aec6aba = function(arg0, arg1, arg2) {
|
|
686
739
|
getObject(arg0).randomFillSync(getArrayU8FromWasm0(arg1, arg2));
|
|
687
740
|
};
|
|
688
|
-
imports.wbg.
|
|
689
|
-
|
|
741
|
+
imports.wbg.__wbg_get_f0f4f1608ebf633e = function(arg0, arg1) {
|
|
742
|
+
const ret = getObject(arg0)[arg1 >>> 0];
|
|
690
743
|
return addHeapObject(ret);
|
|
691
744
|
};
|
|
692
745
|
imports.wbg.__wbindgen_is_function = function(arg0) {
|
|
693
|
-
|
|
746
|
+
const ret = typeof(getObject(arg0)) === 'function';
|
|
694
747
|
return ret;
|
|
695
748
|
};
|
|
696
|
-
imports.wbg.
|
|
697
|
-
|
|
749
|
+
imports.wbg.__wbg_newnoargs_fc5356289219b93b = function(arg0, arg1) {
|
|
750
|
+
const ret = new Function(getStringFromWasm0(arg0, arg1));
|
|
698
751
|
return addHeapObject(ret);
|
|
699
752
|
};
|
|
700
|
-
imports.wbg.
|
|
701
|
-
|
|
753
|
+
imports.wbg.__wbg_next_0e1ee6203bc0f8ed = function(arg0) {
|
|
754
|
+
const ret = getObject(arg0).next;
|
|
702
755
|
return addHeapObject(ret);
|
|
703
756
|
};
|
|
704
|
-
imports.wbg.
|
|
705
|
-
|
|
757
|
+
imports.wbg.__wbg_next_9ef803116340cdc1 = function() { return handleError(function (arg0) {
|
|
758
|
+
const ret = getObject(arg0).next();
|
|
706
759
|
return addHeapObject(ret);
|
|
707
760
|
}, arguments) };
|
|
708
|
-
imports.wbg.
|
|
709
|
-
|
|
761
|
+
imports.wbg.__wbg_done_2a1e30464aae6a4d = function(arg0) {
|
|
762
|
+
const ret = getObject(arg0).done;
|
|
710
763
|
return ret;
|
|
711
764
|
};
|
|
712
|
-
imports.wbg.
|
|
713
|
-
|
|
765
|
+
imports.wbg.__wbg_value_a495c29471c31da6 = function(arg0) {
|
|
766
|
+
const ret = getObject(arg0).value;
|
|
714
767
|
return addHeapObject(ret);
|
|
715
768
|
};
|
|
716
|
-
imports.wbg.
|
|
717
|
-
|
|
769
|
+
imports.wbg.__wbg_iterator_6ac6eb1e020f18e3 = function() {
|
|
770
|
+
const ret = Symbol.iterator;
|
|
718
771
|
return addHeapObject(ret);
|
|
719
772
|
};
|
|
720
|
-
imports.wbg.
|
|
721
|
-
|
|
773
|
+
imports.wbg.__wbg_get_89247d3aeaa38cc5 = function() { return handleError(function (arg0, arg1) {
|
|
774
|
+
const ret = Reflect.get(getObject(arg0), getObject(arg1));
|
|
722
775
|
return addHeapObject(ret);
|
|
723
776
|
}, arguments) };
|
|
724
|
-
imports.wbg.
|
|
725
|
-
|
|
777
|
+
imports.wbg.__wbg_call_4573f605ca4b5f10 = function() { return handleError(function (arg0, arg1) {
|
|
778
|
+
const ret = getObject(arg0).call(getObject(arg1));
|
|
726
779
|
return addHeapObject(ret);
|
|
727
780
|
}, arguments) };
|
|
728
|
-
imports.wbg.
|
|
729
|
-
|
|
781
|
+
imports.wbg.__wbg_new_306ce8d57919e6ae = function() {
|
|
782
|
+
const ret = new Object();
|
|
730
783
|
return addHeapObject(ret);
|
|
731
784
|
};
|
|
732
|
-
imports.wbg.
|
|
733
|
-
|
|
785
|
+
imports.wbg.__wbg_self_ba1ddafe9ea7a3a2 = function() { return handleError(function () {
|
|
786
|
+
const ret = self.self;
|
|
787
|
+
return addHeapObject(ret);
|
|
788
|
+
}, arguments) };
|
|
789
|
+
imports.wbg.__wbg_window_be3cc430364fd32c = function() { return handleError(function () {
|
|
790
|
+
const ret = window.window;
|
|
791
|
+
return addHeapObject(ret);
|
|
792
|
+
}, arguments) };
|
|
793
|
+
imports.wbg.__wbg_globalThis_56d9c9f814daeeee = function() { return handleError(function () {
|
|
794
|
+
const ret = globalThis.globalThis;
|
|
795
|
+
return addHeapObject(ret);
|
|
796
|
+
}, arguments) };
|
|
797
|
+
imports.wbg.__wbg_global_8c35aeee4ac77f2b = function() { return handleError(function () {
|
|
798
|
+
const ret = global.global;
|
|
799
|
+
return addHeapObject(ret);
|
|
800
|
+
}, arguments) };
|
|
801
|
+
imports.wbg.__wbg_instanceof_Error_53fd3b982f19be06 = function(arg0) {
|
|
802
|
+
const ret = getObject(arg0) instanceof Error;
|
|
734
803
|
return ret;
|
|
735
804
|
};
|
|
736
|
-
imports.wbg.
|
|
737
|
-
|
|
805
|
+
imports.wbg.__wbg_message_136debd54c3edfe4 = function(arg0) {
|
|
806
|
+
const ret = getObject(arg0).message;
|
|
738
807
|
return addHeapObject(ret);
|
|
739
808
|
};
|
|
740
|
-
imports.wbg.
|
|
741
|
-
|
|
809
|
+
imports.wbg.__wbg_name_d0cc50bf0e4abe7f = function(arg0) {
|
|
810
|
+
const ret = getObject(arg0).name;
|
|
742
811
|
return addHeapObject(ret);
|
|
743
812
|
};
|
|
744
|
-
imports.wbg.
|
|
745
|
-
|
|
813
|
+
imports.wbg.__wbg_toString_ef76a2af8f5bb98a = function(arg0) {
|
|
814
|
+
const ret = getObject(arg0).toString();
|
|
746
815
|
return addHeapObject(ret);
|
|
747
816
|
};
|
|
748
|
-
imports.wbg.
|
|
749
|
-
|
|
817
|
+
imports.wbg.__wbg_call_9855a4612eb496cb = function() { return handleError(function (arg0, arg1, arg2) {
|
|
818
|
+
const ret = getObject(arg0).call(getObject(arg1), getObject(arg2));
|
|
750
819
|
return addHeapObject(ret);
|
|
751
820
|
}, arguments) };
|
|
752
|
-
imports.wbg.
|
|
753
|
-
|
|
821
|
+
imports.wbg.__wbg_entries_eec2b1798feb97a9 = function(arg0) {
|
|
822
|
+
const ret = getObject(arg0).entries();
|
|
754
823
|
return addHeapObject(ret);
|
|
755
824
|
};
|
|
756
|
-
imports.wbg.
|
|
757
|
-
|
|
825
|
+
imports.wbg.__wbg_now_513c8208bd94c09b = function() {
|
|
826
|
+
const ret = Date.now();
|
|
758
827
|
return ret;
|
|
759
828
|
};
|
|
760
|
-
imports.wbg.
|
|
829
|
+
imports.wbg.__wbg_toString_81e19471abb6dc98 = function(arg0) {
|
|
830
|
+
const ret = getObject(arg0).toString();
|
|
831
|
+
return addHeapObject(ret);
|
|
832
|
+
};
|
|
833
|
+
imports.wbg.__wbg_new_78403b138428b684 = function(arg0, arg1) {
|
|
761
834
|
try {
|
|
762
835
|
var state0 = {a: arg0, b: arg1};
|
|
763
836
|
var cb0 = (arg0, arg1) => {
|
|
764
837
|
const a = state0.a;
|
|
765
838
|
state0.a = 0;
|
|
766
839
|
try {
|
|
767
|
-
return
|
|
840
|
+
return __wbg_adapter_159(a, state0.b, arg0, arg1);
|
|
768
841
|
} finally {
|
|
769
842
|
state0.a = a;
|
|
770
843
|
}
|
|
771
844
|
};
|
|
772
|
-
|
|
845
|
+
const ret = new Promise(cb0);
|
|
773
846
|
return addHeapObject(ret);
|
|
774
847
|
} finally {
|
|
775
848
|
state0.a = state0.b = 0;
|
|
776
849
|
}
|
|
777
850
|
};
|
|
778
|
-
imports.wbg.
|
|
779
|
-
|
|
851
|
+
imports.wbg.__wbg_resolve_f269ce174f88b294 = function(arg0) {
|
|
852
|
+
const ret = Promise.resolve(getObject(arg0));
|
|
780
853
|
return addHeapObject(ret);
|
|
781
854
|
};
|
|
782
|
-
imports.wbg.
|
|
783
|
-
|
|
855
|
+
imports.wbg.__wbg_then_1c698eedca15eed6 = function(arg0, arg1) {
|
|
856
|
+
const ret = getObject(arg0).then(getObject(arg1));
|
|
784
857
|
return addHeapObject(ret);
|
|
785
858
|
};
|
|
786
|
-
imports.wbg.
|
|
787
|
-
|
|
859
|
+
imports.wbg.__wbg_then_4debc41d4fc92ce5 = function(arg0, arg1, arg2) {
|
|
860
|
+
const ret = getObject(arg0).then(getObject(arg1), getObject(arg2));
|
|
788
861
|
return addHeapObject(ret);
|
|
789
862
|
};
|
|
790
|
-
imports.wbg.
|
|
791
|
-
|
|
792
|
-
return addHeapObject(ret);
|
|
793
|
-
}, arguments) };
|
|
794
|
-
imports.wbg.__wbg_window_b4be7f48b24ac56e = function() { return handleError(function () {
|
|
795
|
-
var ret = window.window;
|
|
796
|
-
return addHeapObject(ret);
|
|
797
|
-
}, arguments) };
|
|
798
|
-
imports.wbg.__wbg_globalThis_d61b1f48a57191ae = function() { return handleError(function () {
|
|
799
|
-
var ret = globalThis.globalThis;
|
|
800
|
-
return addHeapObject(ret);
|
|
801
|
-
}, arguments) };
|
|
802
|
-
imports.wbg.__wbg_global_e7669da72fd7f239 = function() { return handleError(function () {
|
|
803
|
-
var ret = global.global;
|
|
804
|
-
return addHeapObject(ret);
|
|
805
|
-
}, arguments) };
|
|
806
|
-
imports.wbg.__wbg_buffer_5e74a88a1424a2e0 = function(arg0) {
|
|
807
|
-
var ret = getObject(arg0).buffer;
|
|
863
|
+
imports.wbg.__wbg_buffer_de1150f91b23aa89 = function(arg0) {
|
|
864
|
+
const ret = getObject(arg0).buffer;
|
|
808
865
|
return addHeapObject(ret);
|
|
809
866
|
};
|
|
810
|
-
imports.wbg.
|
|
811
|
-
|
|
867
|
+
imports.wbg.__wbg_newwithbyteoffsetandlength_9ca61320599a2c84 = function(arg0, arg1, arg2) {
|
|
868
|
+
const ret = new Uint8Array(getObject(arg0), arg1 >>> 0, arg2 >>> 0);
|
|
812
869
|
return addHeapObject(ret);
|
|
813
870
|
};
|
|
814
|
-
imports.wbg.
|
|
815
|
-
|
|
871
|
+
imports.wbg.__wbg_new_97cf52648830a70d = function(arg0) {
|
|
872
|
+
const ret = new Uint8Array(getObject(arg0));
|
|
816
873
|
return addHeapObject(ret);
|
|
817
874
|
};
|
|
818
|
-
imports.wbg.
|
|
875
|
+
imports.wbg.__wbg_set_a0172b213e2469e9 = function(arg0, arg1, arg2) {
|
|
819
876
|
getObject(arg0).set(getObject(arg1), arg2 >>> 0);
|
|
820
877
|
};
|
|
821
|
-
imports.wbg.
|
|
822
|
-
|
|
878
|
+
imports.wbg.__wbg_length_e09c0b925ab8de5d = function(arg0) {
|
|
879
|
+
const ret = getObject(arg0).length;
|
|
823
880
|
return ret;
|
|
824
881
|
};
|
|
825
|
-
imports.wbg.
|
|
826
|
-
|
|
882
|
+
imports.wbg.__wbg_newwithlength_e833b89f9db02732 = function(arg0) {
|
|
883
|
+
const ret = new Uint8Array(arg0 >>> 0);
|
|
827
884
|
return addHeapObject(ret);
|
|
828
885
|
};
|
|
829
|
-
imports.wbg.
|
|
830
|
-
|
|
886
|
+
imports.wbg.__wbg_subarray_9482ae5cd5cd99d3 = function(arg0, arg1, arg2) {
|
|
887
|
+
const ret = getObject(arg0).subarray(arg1 >>> 0, arg2 >>> 0);
|
|
831
888
|
return addHeapObject(ret);
|
|
832
889
|
};
|
|
833
|
-
imports.wbg.
|
|
834
|
-
|
|
890
|
+
imports.wbg.__wbg_has_ded5f0e31f1ff6ad = function() { return handleError(function (arg0, arg1) {
|
|
891
|
+
const ret = Reflect.has(getObject(arg0), getObject(arg1));
|
|
835
892
|
return ret;
|
|
836
893
|
}, arguments) };
|
|
837
|
-
imports.wbg.
|
|
838
|
-
|
|
894
|
+
imports.wbg.__wbg_set_b12cd0ab82903c2f = function() { return handleError(function (arg0, arg1, arg2) {
|
|
895
|
+
const ret = Reflect.set(getObject(arg0), getObject(arg1), getObject(arg2));
|
|
839
896
|
return ret;
|
|
840
897
|
}, arguments) };
|
|
841
|
-
imports.wbg.
|
|
842
|
-
|
|
898
|
+
imports.wbg.__wbg_stringify_cf20dc96bee34a66 = function() { return handleError(function (arg0) {
|
|
899
|
+
const ret = JSON.stringify(getObject(arg0));
|
|
843
900
|
return addHeapObject(ret);
|
|
844
901
|
}, arguments) };
|
|
845
902
|
imports.wbg.__wbindgen_debug_string = function(arg0, arg1) {
|
|
846
|
-
|
|
847
|
-
|
|
848
|
-
|
|
903
|
+
const ret = debugString(getObject(arg1));
|
|
904
|
+
const ptr0 = passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
905
|
+
const len0 = WASM_VECTOR_LEN;
|
|
849
906
|
getInt32Memory0()[arg0 / 4 + 1] = len0;
|
|
850
907
|
getInt32Memory0()[arg0 / 4 + 0] = ptr0;
|
|
851
908
|
};
|
|
@@ -853,27 +910,59 @@ async function init(input) {
|
|
|
853
910
|
throw new Error(getStringFromWasm0(arg0, arg1));
|
|
854
911
|
};
|
|
855
912
|
imports.wbg.__wbindgen_memory = function() {
|
|
856
|
-
|
|
913
|
+
const ret = wasm.memory;
|
|
857
914
|
return addHeapObject(ret);
|
|
858
915
|
};
|
|
859
|
-
imports.wbg.
|
|
860
|
-
|
|
916
|
+
imports.wbg.__wbindgen_closure_wrapper2538 = function(arg0, arg1, arg2) {
|
|
917
|
+
const ret = makeMutClosure(arg0, arg1, 791, __wbg_adapter_28);
|
|
861
918
|
return addHeapObject(ret);
|
|
862
919
|
};
|
|
863
920
|
|
|
864
|
-
|
|
865
|
-
|
|
866
|
-
}
|
|
867
|
-
|
|
921
|
+
return imports;
|
|
922
|
+
}
|
|
868
923
|
|
|
924
|
+
function initMemory(imports, maybe_memory) {
|
|
869
925
|
|
|
870
|
-
|
|
926
|
+
}
|
|
871
927
|
|
|
928
|
+
function finalizeInit(instance, module) {
|
|
872
929
|
wasm = instance.exports;
|
|
873
930
|
init.__wbindgen_wasm_module = module;
|
|
931
|
+
cachedInt32Memory0 = new Int32Array(wasm.memory.buffer);
|
|
932
|
+
cachedUint32Memory0 = new Uint32Array(wasm.memory.buffer);
|
|
933
|
+
cachedUint8Memory0 = new Uint8Array(wasm.memory.buffer);
|
|
934
|
+
|
|
874
935
|
|
|
875
936
|
return wasm;
|
|
876
937
|
}
|
|
877
938
|
|
|
878
|
-
|
|
939
|
+
function initSync(bytes) {
|
|
940
|
+
const imports = getImports();
|
|
879
941
|
|
|
942
|
+
initMemory(imports);
|
|
943
|
+
|
|
944
|
+
const module = new WebAssembly.Module(bytes);
|
|
945
|
+
const instance = new WebAssembly.Instance(module, imports);
|
|
946
|
+
|
|
947
|
+
return finalizeInit(instance, module);
|
|
948
|
+
}
|
|
949
|
+
|
|
950
|
+
async function init(input) {
|
|
951
|
+
if (typeof input === 'undefined') {
|
|
952
|
+
input = new URL('bitmask_core_bg.wasm', import.meta.url);
|
|
953
|
+
}
|
|
954
|
+
const imports = getImports();
|
|
955
|
+
|
|
956
|
+
if (typeof input === 'string' || (typeof Request === 'function' && input instanceof Request) || (typeof URL === 'function' && input instanceof URL)) {
|
|
957
|
+
input = fetch(input);
|
|
958
|
+
}
|
|
959
|
+
|
|
960
|
+
initMemory(imports);
|
|
961
|
+
|
|
962
|
+
const { instance, module } = await load(await input, imports);
|
|
963
|
+
|
|
964
|
+
return finalizeInit(instance, module);
|
|
965
|
+
}
|
|
966
|
+
|
|
967
|
+
export { initSync }
|
|
968
|
+
export default init;
|
package/bitmask_core_bg.wasm
CHANGED
|
Binary file
|