bitmask-core 0.6.0-beta.2 → 0.6.0-beta.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -56,17 +56,18 @@ For running bitmask-core tests in Regtest Mode, please follow the steps below:
56
56
 
57
57
  ### Initial Setup
58
58
  1. Build bitcoin node + electrum: `docker-compose build`.
59
- 2. Up and running Docker containers: `docker-compose up -d node1`.
59
+ 2. Up and running Docker containers: `docker-compose up -d node1 bitmaskd`.
60
60
  3. Load the command line: `source .commands`
61
61
  4. Download and install BDK cli: `cargo install bdk-cli`. We will use BDK to generate the mnemonic.
62
62
  5. Generate a new mnemonic: `bdk-cli generate`.
63
- 6. Create an environment variable called **TEST_WALLET_SEED** with mnemonic generated in the **step 5**.
64
- 7. Run the test to get main address: `cargo test --test wallet -- create_wallet --exact`.
63
+ 6. Create an environment variable called **TEST_WALLET_SEED** with mnemonic generated in the **step 5** (only wasm32).
64
+ 7. Run the test to get main address for bitcoin and rgb: `cargo test --test wallet -- create_wallet --exact`.
65
65
  8. Load your wallet in the bitcoin node: `node1 loadwallet default`.
66
66
  9. Generate new first 500 blocks: `node1 -generate 500`.
67
- 10. Send some coins to the main wallet address: `node1 sendtoaddress {ADDRESS} 10`. Change `{ADDRESS}` with the address generated in the **step 7**.
68
- 11. Mine a new block: `node1 -generate 1`
69
- 12. Run the test to check the balance: `cargo test --test wallet -- get_wallet_balance --exact`.
67
+ 10. Send some coins to the main wallet address: `node1 sendtoaddress {MAIN_VAULT_ADDRESS} 10`. Change `{MAIN_VAULT_ADDRESS}` with the address generated in the **step 7**.
68
+ 11. Send some coins to the rgb wallet address: `node1 sendtoaddress {RGB_VAULT_ADDRESS} 10`. Change `{RGB_VAULT_ADDRESS}` with the address generated in the **step 7**.
69
+ 12. Mine a new block: `node1 -generate 1`
70
+ 13. Run the test to check the balance: `cargo test --test wallet -- get_wallet_balance --exact`.
70
71
 
71
72
  ### Running the tests
72
73
  Running the tests: `cargo test --test-threads 1`
package/bitmask_core.d.ts CHANGED
@@ -1,46 +1,6 @@
1
1
  /* tslint:disable */
2
2
  /* eslint-disable */
3
3
  /**
4
- * @param {string} username
5
- * @param {string} password
6
- * @returns {Promise<any>}
7
- */
8
- export function create_wallet(username: string, password: string): Promise<any>;
9
- /**
10
- * @param {string} username
11
- * @param {string} password
12
- * @returns {Promise<any>}
13
- */
14
- export function auth(username: string, password: string): Promise<any>;
15
- /**
16
- * @param {string} description
17
- * @param {number} amount
18
- * @param {string} token
19
- * @returns {Promise<any>}
20
- */
21
- export function ln_create_invoice(description: string, amount: number, token: string): Promise<any>;
22
- /**
23
- * @param {string} token
24
- * @returns {Promise<any>}
25
- */
26
- export function get_balance(token: string): Promise<any>;
27
- /**
28
- * @param {string} token
29
- * @returns {Promise<any>}
30
- */
31
- export function get_txs(token: string): Promise<any>;
32
- /**
33
- * @param {string} payment_request
34
- * @param {string} token
35
- * @returns {Promise<any>}
36
- */
37
- export function pay_invoice(payment_request: string, token: string): Promise<any>;
38
- /**
39
- * @param {string} payment_hash
40
- * @returns {Promise<any>}
41
- */
42
- export function check_payment(payment_hash: string): Promise<any>;
43
- /**
44
4
  * @returns {Promise<any>}
45
5
  */
46
6
  export function get_network(): Promise<any>;
@@ -61,51 +21,35 @@ export function get_env(key: string): Promise<any>;
61
21
  */
62
22
  export function set_env(key: string, value: string): Promise<any>;
63
23
  /**
64
- * @param {string} secret_key
65
- * @param {string} name
66
- * @param {Uint8Array} data
67
- * @returns {Promise<any>}
68
- */
69
- export function store(secret_key: string, name: string, data: Uint8Array): Promise<any>;
70
- /**
71
- * @param {string} secret_key
72
- * @param {string} name
24
+ * @param {string} nostr_hex_sk
25
+ * @param {any} request
73
26
  * @returns {Promise<any>}
74
27
  */
75
- export function retrieve(secret_key: string, name: string): Promise<any>;
28
+ export function issue_contract(nostr_hex_sk: string, request: any): Promise<any>;
76
29
  /**
77
30
  * @param {string} nostr_hex_sk
78
- * @param {string} ticker
79
- * @param {string} name
80
- * @param {string} description
81
- * @param {number} precision
82
- * @param {bigint} supply
83
- * @param {string} seal
84
- * @param {string} iface
31
+ * @param {any} request
85
32
  * @returns {Promise<any>}
86
33
  */
87
- export function issue_contract(nostr_hex_sk: string, ticker: string, name: string, description: string, precision: number, supply: bigint, seal: string, iface: string): Promise<any>;
34
+ export function rgb_create_invoice(nostr_hex_sk: string, request: any): Promise<any>;
88
35
  /**
89
36
  * @param {string} nostr_hex_sk
90
- * @param {string} contract_id
91
- * @param {string} iface
92
- * @param {bigint} amount
93
- * @param {string} seal
37
+ * @param {any} request
94
38
  * @returns {Promise<any>}
95
39
  */
96
- export function rgb_create_invoice(nostr_hex_sk: string, contract_id: string, iface: string, amount: bigint, seal: string): Promise<any>;
40
+ export function create_psbt(nostr_hex_sk: string, request: any): Promise<any>;
97
41
  /**
98
42
  * @param {string} nostr_hex_sk
99
43
  * @param {any} request
100
44
  * @returns {Promise<any>}
101
45
  */
102
- export function create_psbt(nostr_hex_sk: string, request: any): Promise<any>;
46
+ export function psbt_sign_file(nostr_hex_sk: string, request: any): Promise<any>;
103
47
  /**
104
48
  * @param {string} nostr_hex_sk
105
49
  * @param {any} request
106
50
  * @returns {Promise<any>}
107
51
  */
108
- export function pay_asset(nostr_hex_sk: string, request: any): Promise<any>;
52
+ export function transfer_asset(nostr_hex_sk: string, request: any): Promise<any>;
109
53
  /**
110
54
  * @param {string} nostr_hex_sk
111
55
  * @param {any} request
@@ -134,12 +78,43 @@ export function list_schemas(nostr_hex_sk: string): Promise<any>;
134
78
  */
135
79
  export function import_contract(nostr_hex_sk: string, request: any): Promise<any>;
136
80
  /**
81
+ * @param {string} nostr_hex_sk
82
+ * @param {any} request
83
+ * @returns {Promise<any>}
84
+ */
85
+ export function watcher(nostr_hex_sk: string, request: any): Promise<any>;
86
+ /**
87
+ * @param {string} nostr_hex_sk
88
+ * @param {string} name
89
+ * @returns {Promise<any>}
90
+ */
91
+ export function watcher_details(nostr_hex_sk: string, name: string): Promise<any>;
92
+ /**
93
+ * @param {string} nostr_hex_sk
94
+ * @param {string} name
95
+ * @returns {Promise<any>}
96
+ */
97
+ export function watcher_next_address(nostr_hex_sk: string, name: string): Promise<any>;
98
+ /**
99
+ * @param {string} nostr_hex_sk
100
+ * @param {string} name
101
+ * @returns {Promise<any>}
102
+ */
103
+ export function watcher_next_utxo(nostr_hex_sk: string, name: string): Promise<any>;
104
+ /**
137
105
  * @param {string} password
138
106
  * @param {string} encrypted_descriptors
139
107
  * @returns {Promise<any>}
140
108
  */
141
109
  export function get_encrypted_wallet(password: string, encrypted_descriptors: string): Promise<any>;
142
110
  /**
111
+ * @param {string} password
112
+ * @param {string} encrypted_descriptors
113
+ * @param {string} seed_password
114
+ * @returns {Promise<any>}
115
+ */
116
+ export function upgrade_wallet(password: string, encrypted_descriptors: string, seed_password: string): Promise<any>;
117
+ /**
143
118
  * @param {string} encryption_password
144
119
  * @param {string} seed_password
145
120
  * @returns {Promise<any>}
@@ -184,3 +159,56 @@ export function fund_vault(descriptor: string, change_descriptor: string, addres
184
159
  * @returns {Promise<any>}
185
160
  */
186
161
  export function get_assets_vault(rgb_assets_descriptor_xpub: string, rgb_udas_descriptor_xpub: string): Promise<any>;
162
+ /**
163
+ * @param {string} secret_key
164
+ * @param {string} name
165
+ * @param {Uint8Array} data
166
+ * @returns {Promise<any>}
167
+ */
168
+ export function store(secret_key: string, name: string, data: Uint8Array): Promise<any>;
169
+ /**
170
+ * @param {string} secret_key
171
+ * @param {string} name
172
+ * @returns {Promise<any>}
173
+ */
174
+ export function retrieve(secret_key: string, name: string): Promise<any>;
175
+ /**
176
+ * @param {string} username
177
+ * @param {string} password
178
+ * @returns {Promise<any>}
179
+ */
180
+ export function create_wallet(username: string, password: string): Promise<any>;
181
+ /**
182
+ * @param {string} username
183
+ * @param {string} password
184
+ * @returns {Promise<any>}
185
+ */
186
+ export function auth(username: string, password: string): Promise<any>;
187
+ /**
188
+ * @param {string} description
189
+ * @param {number} amount
190
+ * @param {string} token
191
+ * @returns {Promise<any>}
192
+ */
193
+ export function ln_create_invoice(description: string, amount: number, token: string): Promise<any>;
194
+ /**
195
+ * @param {string} token
196
+ * @returns {Promise<any>}
197
+ */
198
+ export function get_balance(token: string): Promise<any>;
199
+ /**
200
+ * @param {string} token
201
+ * @returns {Promise<any>}
202
+ */
203
+ export function get_txs(token: string): Promise<any>;
204
+ /**
205
+ * @param {string} payment_request
206
+ * @param {string} token
207
+ * @returns {Promise<any>}
208
+ */
209
+ export function pay_invoice(payment_request: string, token: string): Promise<any>;
210
+ /**
211
+ * @param {string} payment_hash
212
+ * @returns {Promise<any>}
213
+ */
214
+ export function check_payment(payment_hash: string): Promise<any>;
@@ -42,14 +42,14 @@ function passStringToWasm0(arg, malloc, realloc) {
42
42
 
43
43
  if (realloc === undefined) {
44
44
  const buf = cachedTextEncoder.encode(arg);
45
- const ptr = malloc(buf.length);
45
+ const ptr = malloc(buf.length) >>> 0;
46
46
  getUint8Memory0().subarray(ptr, ptr + buf.length).set(buf);
47
47
  WASM_VECTOR_LEN = buf.length;
48
48
  return ptr;
49
49
  }
50
50
 
51
51
  let len = arg.length;
52
- let ptr = malloc(len);
52
+ let ptr = malloc(len) >>> 0;
53
53
 
54
54
  const mem = getUint8Memory0();
55
55
 
@@ -65,7 +65,7 @@ function passStringToWasm0(arg, malloc, realloc) {
65
65
  if (offset !== 0) {
66
66
  arg = arg.slice(offset);
67
67
  }
68
- ptr = realloc(ptr, len, len = offset + arg.length * 3);
68
+ ptr = realloc(ptr, len, len = offset + arg.length * 3) >>> 0;
69
69
  const view = getUint8Memory0().subarray(ptr + offset, ptr + len);
70
70
  const ret = encodeString(arg, view);
71
71
 
@@ -119,6 +119,7 @@ let cachedTextDecoder = new lTextDecoder('utf-8', { ignoreBOM: true, fatal: true
119
119
  cachedTextDecoder.decode();
120
120
 
121
121
  function getStringFromWasm0(ptr, len) {
122
+ ptr = ptr >>> 0;
122
123
  return cachedTextDecoder.decode(getUint8Memory0().subarray(ptr, ptr + len));
123
124
  }
124
125
 
@@ -230,238 +231,155 @@ function makeMutClosure(arg0, arg1, dtor, f) {
230
231
  return real;
231
232
  }
232
233
  function __wbg_adapter_44(arg0, arg1, arg2) {
233
- wasm._dyn_core__ops__function__FnMut__A____Output___R_as_wasm_bindgen__closure__WasmClosure___describe__invoke__h7b84be60ca8b9fd3(arg0, arg1, addHeapObject(arg2));
234
+ wasm._dyn_core__ops__function__FnMut__A____Output___R_as_wasm_bindgen__closure__WasmClosure___describe__invoke__h34ea25bf63ccc363(arg0, arg1, addHeapObject(arg2));
234
235
  }
235
236
 
236
237
  /**
237
- * @param {string} username
238
- * @param {string} password
239
- * @returns {Promise<any>}
240
- */
241
- export function create_wallet(username, password) {
242
- const ptr0 = passStringToWasm0(username, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
243
- const len0 = WASM_VECTOR_LEN;
244
- const ptr1 = passStringToWasm0(password, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
245
- const len1 = WASM_VECTOR_LEN;
246
- const ret = wasm.create_wallet(ptr0, len0, ptr1, len1);
247
- return takeObject(ret);
248
- }
249
-
250
- /**
251
- * @param {string} username
252
- * @param {string} password
253
238
  * @returns {Promise<any>}
254
239
  */
255
- export function auth(username, password) {
256
- const ptr0 = passStringToWasm0(username, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
257
- const len0 = WASM_VECTOR_LEN;
258
- const ptr1 = passStringToWasm0(password, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
259
- const len1 = WASM_VECTOR_LEN;
260
- const ret = wasm.auth(ptr0, len0, ptr1, len1);
261
- return takeObject(ret);
262
- }
263
-
264
- /**
265
- * @param {string} description
266
- * @param {number} amount
267
- * @param {string} token
268
- * @returns {Promise<any>}
269
- */
270
- export function ln_create_invoice(description, amount, token) {
271
- const ptr0 = passStringToWasm0(description, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
272
- const len0 = WASM_VECTOR_LEN;
273
- const ptr1 = passStringToWasm0(token, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
274
- const len1 = WASM_VECTOR_LEN;
275
- const ret = wasm.ln_create_invoice(ptr0, len0, amount, ptr1, len1);
240
+ export function get_network() {
241
+ const ret = wasm.get_network();
276
242
  return takeObject(ret);
277
243
  }
278
244
 
279
245
  /**
280
- * @param {string} token
246
+ * @param {string} network_str
281
247
  * @returns {Promise<any>}
282
248
  */
283
- export function get_balance(token) {
284
- const ptr0 = passStringToWasm0(token, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
249
+ export function switch_network(network_str) {
250
+ const ptr0 = passStringToWasm0(network_str, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
285
251
  const len0 = WASM_VECTOR_LEN;
286
- const ret = wasm.get_balance(ptr0, len0);
252
+ const ret = wasm.switch_network(ptr0, len0);
287
253
  return takeObject(ret);
288
254
  }
289
255
 
290
256
  /**
291
- * @param {string} token
257
+ * @param {string} key
292
258
  * @returns {Promise<any>}
293
259
  */
294
- export function get_txs(token) {
295
- const ptr0 = passStringToWasm0(token, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
260
+ export function get_env(key) {
261
+ const ptr0 = passStringToWasm0(key, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
296
262
  const len0 = WASM_VECTOR_LEN;
297
- const ret = wasm.get_txs(ptr0, len0);
263
+ const ret = wasm.get_env(ptr0, len0);
298
264
  return takeObject(ret);
299
265
  }
300
266
 
301
267
  /**
302
- * @param {string} payment_request
303
- * @param {string} token
268
+ * @param {string} key
269
+ * @param {string} value
304
270
  * @returns {Promise<any>}
305
271
  */
306
- export function pay_invoice(payment_request, token) {
307
- const ptr0 = passStringToWasm0(payment_request, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
272
+ export function set_env(key, value) {
273
+ const ptr0 = passStringToWasm0(key, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
308
274
  const len0 = WASM_VECTOR_LEN;
309
- const ptr1 = passStringToWasm0(token, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
275
+ const ptr1 = passStringToWasm0(value, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
310
276
  const len1 = WASM_VECTOR_LEN;
311
- const ret = wasm.pay_invoice(ptr0, len0, ptr1, len1);
277
+ const ret = wasm.set_env(ptr0, len0, ptr1, len1);
312
278
  return takeObject(ret);
313
279
  }
314
280
 
315
281
  /**
316
- * @param {string} payment_hash
282
+ * @param {string} nostr_hex_sk
283
+ * @param {any} request
317
284
  * @returns {Promise<any>}
318
285
  */
319
- export function check_payment(payment_hash) {
320
- const ptr0 = passStringToWasm0(payment_hash, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
286
+ export function issue_contract(nostr_hex_sk, request) {
287
+ const ptr0 = passStringToWasm0(nostr_hex_sk, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
321
288
  const len0 = WASM_VECTOR_LEN;
322
- const ret = wasm.check_payment(ptr0, len0);
323
- return takeObject(ret);
324
- }
325
-
326
- /**
327
- * @returns {Promise<any>}
328
- */
329
- export function get_network() {
330
- const ret = wasm.get_network();
289
+ const ret = wasm.issue_contract(ptr0, len0, addHeapObject(request));
331
290
  return takeObject(ret);
332
291
  }
333
292
 
334
293
  /**
335
- * @param {string} network_str
294
+ * @param {string} nostr_hex_sk
295
+ * @param {any} request
336
296
  * @returns {Promise<any>}
337
297
  */
338
- export function switch_network(network_str) {
339
- const ptr0 = passStringToWasm0(network_str, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
298
+ export function rgb_create_invoice(nostr_hex_sk, request) {
299
+ const ptr0 = passStringToWasm0(nostr_hex_sk, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
340
300
  const len0 = WASM_VECTOR_LEN;
341
- const ret = wasm.switch_network(ptr0, len0);
301
+ const ret = wasm.rgb_create_invoice(ptr0, len0, addHeapObject(request));
342
302
  return takeObject(ret);
343
303
  }
344
304
 
345
305
  /**
346
- * @param {string} key
306
+ * @param {string} nostr_hex_sk
307
+ * @param {any} request
347
308
  * @returns {Promise<any>}
348
309
  */
349
- export function get_env(key) {
350
- const ptr0 = passStringToWasm0(key, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
310
+ export function create_psbt(nostr_hex_sk, request) {
311
+ const ptr0 = passStringToWasm0(nostr_hex_sk, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
351
312
  const len0 = WASM_VECTOR_LEN;
352
- const ret = wasm.get_env(ptr0, len0);
313
+ const ret = wasm.create_psbt(ptr0, len0, addHeapObject(request));
353
314
  return takeObject(ret);
354
315
  }
355
316
 
356
317
  /**
357
- * @param {string} key
358
- * @param {string} value
318
+ * @param {string} nostr_hex_sk
319
+ * @param {any} request
359
320
  * @returns {Promise<any>}
360
321
  */
361
- export function set_env(key, value) {
362
- const ptr0 = passStringToWasm0(key, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
322
+ export function psbt_sign_file(nostr_hex_sk, request) {
323
+ const ptr0 = passStringToWasm0(nostr_hex_sk, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
363
324
  const len0 = WASM_VECTOR_LEN;
364
- const ptr1 = passStringToWasm0(value, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
365
- const len1 = WASM_VECTOR_LEN;
366
- const ret = wasm.set_env(ptr0, len0, ptr1, len1);
325
+ const ret = wasm.psbt_sign_file(ptr0, len0, addHeapObject(request));
367
326
  return takeObject(ret);
368
327
  }
369
328
 
370
- function passArray8ToWasm0(arg, malloc) {
371
- const ptr = malloc(arg.length * 1);
372
- getUint8Memory0().set(arg, ptr / 1);
373
- WASM_VECTOR_LEN = arg.length;
374
- return ptr;
375
- }
376
329
  /**
377
- * @param {string} secret_key
378
- * @param {string} name
379
- * @param {Uint8Array} data
330
+ * @param {string} nostr_hex_sk
331
+ * @param {any} request
380
332
  * @returns {Promise<any>}
381
333
  */
382
- export function store(secret_key, name, data) {
383
- const ptr0 = passStringToWasm0(secret_key, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
334
+ export function transfer_asset(nostr_hex_sk, request) {
335
+ const ptr0 = passStringToWasm0(nostr_hex_sk, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
384
336
  const len0 = WASM_VECTOR_LEN;
385
- const ptr1 = passStringToWasm0(name, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
386
- const len1 = WASM_VECTOR_LEN;
387
- const ptr2 = passArray8ToWasm0(data, wasm.__wbindgen_malloc);
388
- const len2 = WASM_VECTOR_LEN;
389
- const ret = wasm.store(ptr0, len0, ptr1, len1, ptr2, len2);
337
+ const ret = wasm.transfer_asset(ptr0, len0, addHeapObject(request));
390
338
  return takeObject(ret);
391
339
  }
392
340
 
393
341
  /**
394
- * @param {string} secret_key
395
- * @param {string} name
342
+ * @param {string} nostr_hex_sk
343
+ * @param {any} request
396
344
  * @returns {Promise<any>}
397
345
  */
398
- export function retrieve(secret_key, name) {
399
- const ptr0 = passStringToWasm0(secret_key, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
346
+ export function accept_transfer(nostr_hex_sk, request) {
347
+ const ptr0 = passStringToWasm0(nostr_hex_sk, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
400
348
  const len0 = WASM_VECTOR_LEN;
401
- const ptr1 = passStringToWasm0(name, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
402
- const len1 = WASM_VECTOR_LEN;
403
- const ret = wasm.retrieve(ptr0, len0, ptr1, len1);
349
+ const ret = wasm.accept_transfer(ptr0, len0, addHeapObject(request));
404
350
  return takeObject(ret);
405
351
  }
406
352
 
407
353
  /**
408
354
  * @param {string} nostr_hex_sk
409
- * @param {string} ticker
410
- * @param {string} name
411
- * @param {string} description
412
- * @param {number} precision
413
- * @param {bigint} supply
414
- * @param {string} seal
415
- * @param {string} iface
416
355
  * @returns {Promise<any>}
417
356
  */
418
- export function issue_contract(nostr_hex_sk, ticker, name, description, precision, supply, seal, iface) {
357
+ export function list_contracts(nostr_hex_sk) {
419
358
  const ptr0 = passStringToWasm0(nostr_hex_sk, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
420
359
  const len0 = WASM_VECTOR_LEN;
421
- const ptr1 = passStringToWasm0(ticker, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
422
- const len1 = WASM_VECTOR_LEN;
423
- const ptr2 = passStringToWasm0(name, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
424
- const len2 = WASM_VECTOR_LEN;
425
- const ptr3 = passStringToWasm0(description, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
426
- const len3 = WASM_VECTOR_LEN;
427
- const ptr4 = passStringToWasm0(seal, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
428
- const len4 = WASM_VECTOR_LEN;
429
- const ptr5 = passStringToWasm0(iface, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
430
- const len5 = WASM_VECTOR_LEN;
431
- const ret = wasm.issue_contract(ptr0, len0, ptr1, len1, ptr2, len2, ptr3, len3, precision, supply, ptr4, len4, ptr5, len5);
360
+ const ret = wasm.list_contracts(ptr0, len0);
432
361
  return takeObject(ret);
433
362
  }
434
363
 
435
364
  /**
436
365
  * @param {string} nostr_hex_sk
437
- * @param {string} contract_id
438
- * @param {string} iface
439
- * @param {bigint} amount
440
- * @param {string} seal
441
366
  * @returns {Promise<any>}
442
367
  */
443
- export function rgb_create_invoice(nostr_hex_sk, contract_id, iface, amount, seal) {
368
+ export function list_interfaces(nostr_hex_sk) {
444
369
  const ptr0 = passStringToWasm0(nostr_hex_sk, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
445
370
  const len0 = WASM_VECTOR_LEN;
446
- const ptr1 = passStringToWasm0(contract_id, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
447
- const len1 = WASM_VECTOR_LEN;
448
- const ptr2 = passStringToWasm0(iface, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
449
- const len2 = WASM_VECTOR_LEN;
450
- const ptr3 = passStringToWasm0(seal, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
451
- const len3 = WASM_VECTOR_LEN;
452
- const ret = wasm.rgb_create_invoice(ptr0, len0, ptr1, len1, ptr2, len2, amount, ptr3, len3);
371
+ const ret = wasm.list_interfaces(ptr0, len0);
453
372
  return takeObject(ret);
454
373
  }
455
374
 
456
375
  /**
457
376
  * @param {string} nostr_hex_sk
458
- * @param {any} request
459
377
  * @returns {Promise<any>}
460
378
  */
461
- export function create_psbt(nostr_hex_sk, request) {
379
+ export function list_schemas(nostr_hex_sk) {
462
380
  const ptr0 = passStringToWasm0(nostr_hex_sk, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
463
381
  const len0 = WASM_VECTOR_LEN;
464
- const ret = wasm.create_psbt(ptr0, len0, addHeapObject(request));
382
+ const ret = wasm.list_schemas(ptr0, len0);
465
383
  return takeObject(ret);
466
384
  }
467
385
 
@@ -470,10 +388,10 @@ export function create_psbt(nostr_hex_sk, request) {
470
388
  * @param {any} request
471
389
  * @returns {Promise<any>}
472
390
  */
473
- export function pay_asset(nostr_hex_sk, request) {
391
+ export function import_contract(nostr_hex_sk, request) {
474
392
  const ptr0 = passStringToWasm0(nostr_hex_sk, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
475
393
  const len0 = WASM_VECTOR_LEN;
476
- const ret = wasm.pay_asset(ptr0, len0, addHeapObject(request));
394
+ const ret = wasm.import_contract(ptr0, len0, addHeapObject(request));
477
395
  return takeObject(ret);
478
396
  }
479
397
 
@@ -482,69 +400,83 @@ export function pay_asset(nostr_hex_sk, request) {
482
400
  * @param {any} request
483
401
  * @returns {Promise<any>}
484
402
  */
485
- export function accept_transfer(nostr_hex_sk, request) {
403
+ export function watcher(nostr_hex_sk, request) {
486
404
  const ptr0 = passStringToWasm0(nostr_hex_sk, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
487
405
  const len0 = WASM_VECTOR_LEN;
488
- const ret = wasm.accept_transfer(ptr0, len0, addHeapObject(request));
406
+ const ret = wasm.watcher(ptr0, len0, addHeapObject(request));
489
407
  return takeObject(ret);
490
408
  }
491
409
 
492
410
  /**
493
411
  * @param {string} nostr_hex_sk
412
+ * @param {string} name
494
413
  * @returns {Promise<any>}
495
414
  */
496
- export function list_contracts(nostr_hex_sk) {
415
+ export function watcher_details(nostr_hex_sk, name) {
497
416
  const ptr0 = passStringToWasm0(nostr_hex_sk, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
498
417
  const len0 = WASM_VECTOR_LEN;
499
- const ret = wasm.list_contracts(ptr0, len0);
418
+ const ptr1 = passStringToWasm0(name, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
419
+ const len1 = WASM_VECTOR_LEN;
420
+ const ret = wasm.watcher_details(ptr0, len0, ptr1, len1);
500
421
  return takeObject(ret);
501
422
  }
502
423
 
503
424
  /**
504
425
  * @param {string} nostr_hex_sk
426
+ * @param {string} name
505
427
  * @returns {Promise<any>}
506
428
  */
507
- export function list_interfaces(nostr_hex_sk) {
429
+ export function watcher_next_address(nostr_hex_sk, name) {
508
430
  const ptr0 = passStringToWasm0(nostr_hex_sk, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
509
431
  const len0 = WASM_VECTOR_LEN;
510
- const ret = wasm.list_interfaces(ptr0, len0);
432
+ const ptr1 = passStringToWasm0(name, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
433
+ const len1 = WASM_VECTOR_LEN;
434
+ const ret = wasm.watcher_next_address(ptr0, len0, ptr1, len1);
511
435
  return takeObject(ret);
512
436
  }
513
437
 
514
438
  /**
515
439
  * @param {string} nostr_hex_sk
440
+ * @param {string} name
516
441
  * @returns {Promise<any>}
517
442
  */
518
- export function list_schemas(nostr_hex_sk) {
443
+ export function watcher_next_utxo(nostr_hex_sk, name) {
519
444
  const ptr0 = passStringToWasm0(nostr_hex_sk, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
520
445
  const len0 = WASM_VECTOR_LEN;
521
- const ret = wasm.list_schemas(ptr0, len0);
446
+ const ptr1 = passStringToWasm0(name, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
447
+ const len1 = WASM_VECTOR_LEN;
448
+ const ret = wasm.watcher_next_utxo(ptr0, len0, ptr1, len1);
522
449
  return takeObject(ret);
523
450
  }
524
451
 
525
452
  /**
526
- * @param {string} nostr_hex_sk
527
- * @param {any} request
453
+ * @param {string} password
454
+ * @param {string} encrypted_descriptors
528
455
  * @returns {Promise<any>}
529
456
  */
530
- export function import_contract(nostr_hex_sk, request) {
531
- const ptr0 = passStringToWasm0(nostr_hex_sk, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
457
+ export function get_encrypted_wallet(password, encrypted_descriptors) {
458
+ const ptr0 = passStringToWasm0(password, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
532
459
  const len0 = WASM_VECTOR_LEN;
533
- const ret = wasm.import_contract(ptr0, len0, addHeapObject(request));
460
+ const ptr1 = passStringToWasm0(encrypted_descriptors, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
461
+ const len1 = WASM_VECTOR_LEN;
462
+ const ret = wasm.get_encrypted_wallet(ptr0, len0, ptr1, len1);
534
463
  return takeObject(ret);
535
464
  }
536
465
 
537
466
  /**
538
467
  * @param {string} password
539
468
  * @param {string} encrypted_descriptors
469
+ * @param {string} seed_password
540
470
  * @returns {Promise<any>}
541
471
  */
542
- export function get_encrypted_wallet(password, encrypted_descriptors) {
472
+ export function upgrade_wallet(password, encrypted_descriptors, seed_password) {
543
473
  const ptr0 = passStringToWasm0(password, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
544
474
  const len0 = WASM_VECTOR_LEN;
545
475
  const ptr1 = passStringToWasm0(encrypted_descriptors, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
546
476
  const len1 = WASM_VECTOR_LEN;
547
- const ret = wasm.get_encrypted_wallet(ptr0, len0, ptr1, len1);
477
+ const ptr2 = passStringToWasm0(seed_password, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
478
+ const len2 = WASM_VECTOR_LEN;
479
+ const ret = wasm.upgrade_wallet(ptr0, len0, ptr1, len1, ptr2, len2);
548
480
  return takeObject(ret);
549
481
  }
550
482
 
@@ -649,6 +581,133 @@ export function get_assets_vault(rgb_assets_descriptor_xpub, rgb_udas_descriptor
649
581
  return takeObject(ret);
650
582
  }
651
583
 
584
+ function passArray8ToWasm0(arg, malloc) {
585
+ const ptr = malloc(arg.length * 1) >>> 0;
586
+ getUint8Memory0().set(arg, ptr / 1);
587
+ WASM_VECTOR_LEN = arg.length;
588
+ return ptr;
589
+ }
590
+ /**
591
+ * @param {string} secret_key
592
+ * @param {string} name
593
+ * @param {Uint8Array} data
594
+ * @returns {Promise<any>}
595
+ */
596
+ export function store(secret_key, name, data) {
597
+ const ptr0 = passStringToWasm0(secret_key, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
598
+ const len0 = WASM_VECTOR_LEN;
599
+ const ptr1 = passStringToWasm0(name, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
600
+ const len1 = WASM_VECTOR_LEN;
601
+ const ptr2 = passArray8ToWasm0(data, wasm.__wbindgen_malloc);
602
+ const len2 = WASM_VECTOR_LEN;
603
+ const ret = wasm.store(ptr0, len0, ptr1, len1, ptr2, len2);
604
+ return takeObject(ret);
605
+ }
606
+
607
+ /**
608
+ * @param {string} secret_key
609
+ * @param {string} name
610
+ * @returns {Promise<any>}
611
+ */
612
+ export function retrieve(secret_key, name) {
613
+ const ptr0 = passStringToWasm0(secret_key, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
614
+ const len0 = WASM_VECTOR_LEN;
615
+ const ptr1 = passStringToWasm0(name, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
616
+ const len1 = WASM_VECTOR_LEN;
617
+ const ret = wasm.retrieve(ptr0, len0, ptr1, len1);
618
+ return takeObject(ret);
619
+ }
620
+
621
+ /**
622
+ * @param {string} username
623
+ * @param {string} password
624
+ * @returns {Promise<any>}
625
+ */
626
+ export function create_wallet(username, password) {
627
+ const ptr0 = passStringToWasm0(username, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
628
+ const len0 = WASM_VECTOR_LEN;
629
+ const ptr1 = passStringToWasm0(password, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
630
+ const len1 = WASM_VECTOR_LEN;
631
+ const ret = wasm.create_wallet(ptr0, len0, ptr1, len1);
632
+ return takeObject(ret);
633
+ }
634
+
635
+ /**
636
+ * @param {string} username
637
+ * @param {string} password
638
+ * @returns {Promise<any>}
639
+ */
640
+ export function auth(username, password) {
641
+ const ptr0 = passStringToWasm0(username, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
642
+ const len0 = WASM_VECTOR_LEN;
643
+ const ptr1 = passStringToWasm0(password, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
644
+ const len1 = WASM_VECTOR_LEN;
645
+ const ret = wasm.auth(ptr0, len0, ptr1, len1);
646
+ return takeObject(ret);
647
+ }
648
+
649
+ /**
650
+ * @param {string} description
651
+ * @param {number} amount
652
+ * @param {string} token
653
+ * @returns {Promise<any>}
654
+ */
655
+ export function ln_create_invoice(description, amount, token) {
656
+ const ptr0 = passStringToWasm0(description, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
657
+ const len0 = WASM_VECTOR_LEN;
658
+ const ptr1 = passStringToWasm0(token, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
659
+ const len1 = WASM_VECTOR_LEN;
660
+ const ret = wasm.ln_create_invoice(ptr0, len0, amount, ptr1, len1);
661
+ return takeObject(ret);
662
+ }
663
+
664
+ /**
665
+ * @param {string} token
666
+ * @returns {Promise<any>}
667
+ */
668
+ export function get_balance(token) {
669
+ const ptr0 = passStringToWasm0(token, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
670
+ const len0 = WASM_VECTOR_LEN;
671
+ const ret = wasm.get_balance(ptr0, len0);
672
+ return takeObject(ret);
673
+ }
674
+
675
+ /**
676
+ * @param {string} token
677
+ * @returns {Promise<any>}
678
+ */
679
+ export function get_txs(token) {
680
+ const ptr0 = passStringToWasm0(token, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
681
+ const len0 = WASM_VECTOR_LEN;
682
+ const ret = wasm.get_txs(ptr0, len0);
683
+ return takeObject(ret);
684
+ }
685
+
686
+ /**
687
+ * @param {string} payment_request
688
+ * @param {string} token
689
+ * @returns {Promise<any>}
690
+ */
691
+ export function pay_invoice(payment_request, token) {
692
+ const ptr0 = passStringToWasm0(payment_request, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
693
+ const len0 = WASM_VECTOR_LEN;
694
+ const ptr1 = passStringToWasm0(token, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
695
+ const len1 = WASM_VECTOR_LEN;
696
+ const ret = wasm.pay_invoice(ptr0, len0, ptr1, len1);
697
+ return takeObject(ret);
698
+ }
699
+
700
+ /**
701
+ * @param {string} payment_hash
702
+ * @returns {Promise<any>}
703
+ */
704
+ export function check_payment(payment_hash) {
705
+ const ptr0 = passStringToWasm0(payment_hash, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
706
+ const len0 = WASM_VECTOR_LEN;
707
+ const ret = wasm.check_payment(ptr0, len0);
708
+ return takeObject(ret);
709
+ }
710
+
652
711
  let cachedUint32Memory0 = null;
653
712
 
654
713
  function getUint32Memory0() {
@@ -659,6 +718,7 @@ function getUint32Memory0() {
659
718
  }
660
719
 
661
720
  function getArrayJsValueFromWasm0(ptr, len) {
721
+ ptr = ptr >>> 0;
662
722
  const mem = getUint32Memory0();
663
723
  const slice = mem.subarray(ptr / 4, ptr / 4 + len);
664
724
  const result = [];
@@ -675,23 +735,44 @@ function handleError(f, args) {
675
735
  wasm.__wbindgen_exn_store(addHeapObject(e));
676
736
  }
677
737
  }
678
- function __wbg_adapter_166(arg0, arg1, arg2, arg3) {
679
- wasm.wasm_bindgen__convert__closures__invoke2_mut__h5827c7de3ecaf54f(arg0, arg1, addHeapObject(arg2), addHeapObject(arg3));
738
+ function __wbg_adapter_172(arg0, arg1, arg2, arg3) {
739
+ wasm.wasm_bindgen__convert__closures__invoke2_mut__hcc587ee523568f4b(arg0, arg1, addHeapObject(arg2), addHeapObject(arg3));
680
740
  }
681
741
 
682
742
  export function __wbindgen_string_get(arg0, arg1) {
683
743
  const obj = getObject(arg1);
684
744
  const ret = typeof(obj) === 'string' ? obj : undefined;
685
- var ptr0 = isLikeNone(ret) ? 0 : passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
686
- var len0 = WASM_VECTOR_LEN;
687
- getInt32Memory0()[arg0 / 4 + 1] = len0;
688
- getInt32Memory0()[arg0 / 4 + 0] = ptr0;
745
+ var ptr1 = isLikeNone(ret) ? 0 : passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
746
+ var len1 = WASM_VECTOR_LEN;
747
+ getInt32Memory0()[arg0 / 4 + 1] = len1;
748
+ getInt32Memory0()[arg0 / 4 + 0] = ptr1;
689
749
  };
690
750
 
691
751
  export function __wbindgen_object_drop_ref(arg0) {
692
752
  takeObject(arg0);
693
753
  };
694
754
 
755
+ export function __wbindgen_boolean_get(arg0) {
756
+ const v = getObject(arg0);
757
+ const ret = typeof(v) === 'boolean' ? (v ? 1 : 0) : 2;
758
+ return ret;
759
+ };
760
+
761
+ export function __wbindgen_is_bigint(arg0) {
762
+ const ret = typeof(getObject(arg0)) === 'bigint';
763
+ return ret;
764
+ };
765
+
766
+ export function __wbindgen_bigint_from_u64(arg0) {
767
+ const ret = BigInt.asUintN(64, arg0);
768
+ return addHeapObject(ret);
769
+ };
770
+
771
+ export function __wbindgen_jsval_eq(arg0, arg1) {
772
+ const ret = getObject(arg0) === getObject(arg1);
773
+ return ret;
774
+ };
775
+
695
776
  export function __wbindgen_is_string(arg0) {
696
777
  const ret = typeof(getObject(arg0)) === 'string';
697
778
  return ret;
@@ -713,21 +794,11 @@ export function __wbindgen_in(arg0, arg1) {
713
794
  return ret;
714
795
  };
715
796
 
716
- export function __wbindgen_is_bigint(arg0) {
717
- const ret = typeof(getObject(arg0)) === 'bigint';
718
- return ret;
719
- };
720
-
721
- export function __wbindgen_bigint_from_u64(arg0) {
722
- const ret = BigInt.asUintN(64, arg0);
797
+ export function __wbindgen_error_new(arg0, arg1) {
798
+ const ret = new Error(getStringFromWasm0(arg0, arg1));
723
799
  return addHeapObject(ret);
724
800
  };
725
801
 
726
- export function __wbindgen_jsval_eq(arg0, arg1) {
727
- const ret = getObject(arg0) === getObject(arg1);
728
- return ret;
729
- };
730
-
731
802
  export function __wbindgen_string_new(arg0, arg1) {
732
803
  const ret = getStringFromWasm0(arg0, arg1);
733
804
  return addHeapObject(ret);
@@ -743,22 +814,11 @@ export function __wbindgen_cb_drop(arg0) {
743
814
  return ret;
744
815
  };
745
816
 
746
- export function __wbindgen_error_new(arg0, arg1) {
747
- const ret = new Error(getStringFromWasm0(arg0, arg1));
748
- return addHeapObject(ret);
749
- };
750
-
751
817
  export function __wbindgen_jsval_loose_eq(arg0, arg1) {
752
818
  const ret = getObject(arg0) == getObject(arg1);
753
819
  return ret;
754
820
  };
755
821
 
756
- export function __wbindgen_boolean_get(arg0) {
757
- const v = getObject(arg0);
758
- const ret = typeof(v) === 'boolean' ? (v ? 1 : 0) : 2;
759
- return ret;
760
- };
761
-
762
822
  export function __wbindgen_number_get(arg0, arg1) {
763
823
  const obj = getObject(arg1);
764
824
  const ret = typeof(obj) === 'number' ? obj : undefined;
@@ -783,17 +843,21 @@ export function __wbg_new_abda76e883ba8a5f() {
783
843
 
784
844
  export function __wbg_stack_658279fe44541cf6(arg0, arg1) {
785
845
  const ret = getObject(arg1).stack;
786
- const ptr0 = passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
787
- const len0 = WASM_VECTOR_LEN;
788
- getInt32Memory0()[arg0 / 4 + 1] = len0;
789
- getInt32Memory0()[arg0 / 4 + 0] = ptr0;
846
+ const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
847
+ const len1 = WASM_VECTOR_LEN;
848
+ getInt32Memory0()[arg0 / 4 + 1] = len1;
849
+ getInt32Memory0()[arg0 / 4 + 0] = ptr1;
790
850
  };
791
851
 
792
852
  export function __wbg_error_f851667af71bcfc6(arg0, arg1) {
853
+ let deferred0_0;
854
+ let deferred0_1;
793
855
  try {
856
+ deferred0_0 = arg0;
857
+ deferred0_1 = arg1;
794
858
  console.error(getStringFromWasm0(arg0, arg1));
795
859
  } finally {
796
- wasm.__wbindgen_free(arg0, arg1);
860
+ wasm.__wbindgen_free(deferred0_0, deferred0_1);
797
861
  }
798
862
  };
799
863
 
@@ -821,45 +885,45 @@ export function __wbg_trace_fe50dc146726736b(arg0, arg1) {
821
885
  console.trace(...v0);
822
886
  };
823
887
 
824
- export function __wbg_fetch_cf75ae0b20981e3e(arg0) {
888
+ export function __wbg_fetch_56a6919da5e4c21c(arg0) {
825
889
  const ret = fetch(getObject(arg0));
826
890
  return addHeapObject(ret);
827
891
  };
828
892
 
829
- export function __wbg_newwithstrandinit_c45f0dc6da26fd03() { return handleError(function (arg0, arg1, arg2) {
893
+ export function __wbg_newwithstrandinit_8e1c089763754d1e() { return handleError(function (arg0, arg1, arg2) {
830
894
  const ret = new Request(getStringFromWasm0(arg0, arg1), getObject(arg2));
831
895
  return addHeapObject(ret);
832
896
  }, arguments) };
833
897
 
834
- export function __wbg_new_f1c3a9c2533a55b8() { return handleError(function () {
898
+ export function __wbg_new_4d857178afd2211a() { return handleError(function () {
835
899
  const ret = new Headers();
836
900
  return addHeapObject(ret);
837
901
  }, arguments) };
838
902
 
839
- export function __wbg_append_1be1d651f9ecf2eb() { return handleError(function (arg0, arg1, arg2, arg3, arg4) {
903
+ export function __wbg_append_0df83a5c7a83dc6e() { return handleError(function (arg0, arg1, arg2, arg3, arg4) {
840
904
  getObject(arg0).append(getStringFromWasm0(arg1, arg2), getStringFromWasm0(arg3, arg4));
841
905
  }, arguments) };
842
906
 
843
- export function __wbg_signal_686bf5a4acff74a1(arg0) {
907
+ export function __wbg_signal_f51e3a3e000309e1(arg0) {
844
908
  const ret = getObject(arg0).signal;
845
909
  return addHeapObject(ret);
846
910
  };
847
911
 
848
- export function __wbg_new_a16bcd3b8d000a4f() { return handleError(function () {
912
+ export function __wbg_new_e63d52e7716df424() { return handleError(function () {
849
913
  const ret = new AbortController();
850
914
  return addHeapObject(ret);
851
915
  }, arguments) };
852
916
 
853
- export function __wbg_abort_5f06bf3b2954cf33(arg0) {
917
+ export function __wbg_abort_fc21064a02fb6dad(arg0) {
854
918
  getObject(arg0).abort();
855
919
  };
856
920
 
857
- export function __wbg_fetch_661ffba2a4f2519c(arg0, arg1) {
921
+ export function __wbg_fetch_9757442297aa6820(arg0, arg1) {
858
922
  const ret = getObject(arg0).fetch(getObject(arg1));
859
923
  return addHeapObject(ret);
860
924
  };
861
925
 
862
- export function __wbg_instanceof_Response_fb3a4df648c1859b(arg0) {
926
+ export function __wbg_instanceof_Response_b1d8fb5649a38770(arg0) {
863
927
  let result;
864
928
  try {
865
929
  result = getObject(arg0) instanceof Response;
@@ -870,30 +934,30 @@ export function __wbg_instanceof_Response_fb3a4df648c1859b(arg0) {
870
934
  return ret;
871
935
  };
872
936
 
873
- export function __wbg_url_8ec2534cdfacb103(arg0, arg1) {
937
+ export function __wbg_url_8e528fd65523cbe8(arg0, arg1) {
874
938
  const ret = getObject(arg1).url;
875
- const ptr0 = passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
876
- const len0 = WASM_VECTOR_LEN;
877
- getInt32Memory0()[arg0 / 4 + 1] = len0;
878
- getInt32Memory0()[arg0 / 4 + 0] = ptr0;
939
+ const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
940
+ const len1 = WASM_VECTOR_LEN;
941
+ getInt32Memory0()[arg0 / 4 + 1] = len1;
942
+ getInt32Memory0()[arg0 / 4 + 0] = ptr1;
879
943
  };
880
944
 
881
- export function __wbg_status_d483a4ac847f380a(arg0) {
945
+ export function __wbg_status_27590aae3bea771c(arg0) {
882
946
  const ret = getObject(arg0).status;
883
947
  return ret;
884
948
  };
885
949
 
886
- export function __wbg_headers_6093927dc359903e(arg0) {
950
+ export function __wbg_headers_f42dee5c0830a8b9(arg0) {
887
951
  const ret = getObject(arg0).headers;
888
952
  return addHeapObject(ret);
889
953
  };
890
954
 
891
- export function __wbg_arrayBuffer_cb886e06a9e36e4d() { return handleError(function (arg0) {
955
+ export function __wbg_arrayBuffer_8b744cc30bbf8d4d() { return handleError(function (arg0) {
892
956
  const ret = getObject(arg0).arrayBuffer();
893
957
  return addHeapObject(ret);
894
958
  }, arguments) };
895
959
 
896
- export function __wbg_text_f61464d781b099f0() { return handleError(function (arg0) {
960
+ export function __wbg_text_01d2781c04763803() { return handleError(function (arg0) {
897
961
  const ret = getObject(arg0).text();
898
962
  return addHeapObject(ret);
899
963
  }, arguments) };
@@ -941,87 +1005,87 @@ export function __wbindgen_is_function(arg0) {
941
1005
  return ret;
942
1006
  };
943
1007
 
944
- export function __wbg_get_27fe3dac1c4d0224(arg0, arg1) {
1008
+ export function __wbg_get_e52aaca45f37b337(arg0, arg1) {
945
1009
  const ret = getObject(arg0)[arg1 >>> 0];
946
1010
  return addHeapObject(ret);
947
1011
  };
948
1012
 
949
- export function __wbg_length_e498fbc24f9c1d4f(arg0) {
1013
+ export function __wbg_length_070e3265c186df02(arg0) {
950
1014
  const ret = getObject(arg0).length;
951
1015
  return ret;
952
1016
  };
953
1017
 
954
- export function __wbg_newnoargs_2b8b6bd7753c76ba(arg0, arg1) {
1018
+ export function __wbg_newnoargs_e643855c6572a4a8(arg0, arg1) {
955
1019
  const ret = new Function(getStringFromWasm0(arg0, arg1));
956
1020
  return addHeapObject(ret);
957
1021
  };
958
1022
 
959
- export function __wbg_next_b7d530c04fd8b217(arg0) {
1023
+ export function __wbg_next_3975dcca26737a22(arg0) {
960
1024
  const ret = getObject(arg0).next;
961
1025
  return addHeapObject(ret);
962
1026
  };
963
1027
 
964
- export function __wbg_next_88560ec06a094dea() { return handleError(function (arg0) {
1028
+ export function __wbg_next_5a9700550e162aa3() { return handleError(function (arg0) {
965
1029
  const ret = getObject(arg0).next();
966
1030
  return addHeapObject(ret);
967
1031
  }, arguments) };
968
1032
 
969
- export function __wbg_done_1ebec03bbd919843(arg0) {
1033
+ export function __wbg_done_a184612220756243(arg0) {
970
1034
  const ret = getObject(arg0).done;
971
1035
  return ret;
972
1036
  };
973
1037
 
974
- export function __wbg_value_6ac8da5cc5b3efda(arg0) {
1038
+ export function __wbg_value_6cc144c1d9645dd5(arg0) {
975
1039
  const ret = getObject(arg0).value;
976
1040
  return addHeapObject(ret);
977
1041
  };
978
1042
 
979
- export function __wbg_iterator_55f114446221aa5a() {
1043
+ export function __wbg_iterator_c1677479667ea090() {
980
1044
  const ret = Symbol.iterator;
981
1045
  return addHeapObject(ret);
982
1046
  };
983
1047
 
984
- export function __wbg_get_baf4855f9a986186() { return handleError(function (arg0, arg1) {
1048
+ export function __wbg_get_363c3b466fe4896b() { return handleError(function (arg0, arg1) {
985
1049
  const ret = Reflect.get(getObject(arg0), getObject(arg1));
986
1050
  return addHeapObject(ret);
987
1051
  }, arguments) };
988
1052
 
989
- export function __wbg_call_95d1ea488d03e4e8() { return handleError(function (arg0, arg1) {
1053
+ export function __wbg_call_f96b398515635514() { return handleError(function (arg0, arg1) {
990
1054
  const ret = getObject(arg0).call(getObject(arg1));
991
1055
  return addHeapObject(ret);
992
1056
  }, arguments) };
993
1057
 
994
- export function __wbg_new_f9876326328f45ed() {
1058
+ export function __wbg_new_7befa02319b36069() {
995
1059
  const ret = new Object();
996
1060
  return addHeapObject(ret);
997
1061
  };
998
1062
 
999
- export function __wbg_self_e7c1f827057f6584() { return handleError(function () {
1063
+ export function __wbg_self_b9aad7f1c618bfaf() { return handleError(function () {
1000
1064
  const ret = self.self;
1001
1065
  return addHeapObject(ret);
1002
1066
  }, arguments) };
1003
1067
 
1004
- export function __wbg_window_a09ec664e14b1b81() { return handleError(function () {
1068
+ export function __wbg_window_55e469842c98b086() { return handleError(function () {
1005
1069
  const ret = window.window;
1006
1070
  return addHeapObject(ret);
1007
1071
  }, arguments) };
1008
1072
 
1009
- export function __wbg_globalThis_87cbb8506fecf3a9() { return handleError(function () {
1073
+ export function __wbg_globalThis_d0957e302752547e() { return handleError(function () {
1010
1074
  const ret = globalThis.globalThis;
1011
1075
  return addHeapObject(ret);
1012
1076
  }, arguments) };
1013
1077
 
1014
- export function __wbg_global_c85a9259e621f3db() { return handleError(function () {
1078
+ export function __wbg_global_ae2f87312b8987fb() { return handleError(function () {
1015
1079
  const ret = global.global;
1016
1080
  return addHeapObject(ret);
1017
1081
  }, arguments) };
1018
1082
 
1019
- export function __wbg_isArray_39d28997bf6b96b4(arg0) {
1083
+ export function __wbg_isArray_07d89ced8fb14171(arg0) {
1020
1084
  const ret = Array.isArray(getObject(arg0));
1021
1085
  return ret;
1022
1086
  };
1023
1087
 
1024
- export function __wbg_instanceof_ArrayBuffer_a69f02ee4c4f5065(arg0) {
1088
+ export function __wbg_instanceof_ArrayBuffer_de688b806c28ff28(arg0) {
1025
1089
  let result;
1026
1090
  try {
1027
1091
  result = getObject(arg0) instanceof ArrayBuffer;
@@ -1032,34 +1096,34 @@ export function __wbg_instanceof_ArrayBuffer_a69f02ee4c4f5065(arg0) {
1032
1096
  return ret;
1033
1097
  };
1034
1098
 
1035
- export function __wbg_call_9495de66fdbe016b() { return handleError(function (arg0, arg1, arg2) {
1099
+ export function __wbg_call_35782e9a1aa5e091() { return handleError(function (arg0, arg1, arg2) {
1036
1100
  const ret = getObject(arg0).call(getObject(arg1), getObject(arg2));
1037
1101
  return addHeapObject(ret);
1038
1102
  }, arguments) };
1039
1103
 
1040
- export function __wbg_isSafeInteger_8c4789029e885159(arg0) {
1104
+ export function __wbg_isSafeInteger_fcdf4c4f25c86778(arg0) {
1041
1105
  const ret = Number.isSafeInteger(getObject(arg0));
1042
1106
  return ret;
1043
1107
  };
1044
1108
 
1045
- export function __wbg_now_931686b195a14f9d() {
1109
+ export function __wbg_now_9280d9a0a8aff990() {
1046
1110
  const ret = Date.now();
1047
1111
  return ret;
1048
1112
  };
1049
1113
 
1050
- export function __wbg_entries_4e1315b774245952(arg0) {
1114
+ export function __wbg_entries_c3e06bf0354f5d20(arg0) {
1051
1115
  const ret = Object.entries(getObject(arg0));
1052
1116
  return addHeapObject(ret);
1053
1117
  };
1054
1118
 
1055
- export function __wbg_new_9d3a9ce4282a18a8(arg0, arg1) {
1119
+ export function __wbg_new_113855d7ab252420(arg0, arg1) {
1056
1120
  try {
1057
1121
  var state0 = {a: arg0, b: arg1};
1058
1122
  var cb0 = (arg0, arg1) => {
1059
1123
  const a = state0.a;
1060
1124
  state0.a = 0;
1061
1125
  try {
1062
- return __wbg_adapter_166(a, state0.b, arg0, arg1);
1126
+ return __wbg_adapter_172(a, state0.b, arg0, arg1);
1063
1127
  } finally {
1064
1128
  state0.a = a;
1065
1129
  }
@@ -1071,46 +1135,46 @@ export function __wbg_new_9d3a9ce4282a18a8(arg0, arg1) {
1071
1135
  }
1072
1136
  };
1073
1137
 
1074
- export function __wbg_resolve_fd40f858d9db1a04(arg0) {
1138
+ export function __wbg_resolve_f3a7b38cd2af0fa4(arg0) {
1075
1139
  const ret = Promise.resolve(getObject(arg0));
1076
1140
  return addHeapObject(ret);
1077
1141
  };
1078
1142
 
1079
- export function __wbg_then_ec5db6d509eb475f(arg0, arg1) {
1143
+ export function __wbg_then_65c9631eb0022205(arg0, arg1) {
1080
1144
  const ret = getObject(arg0).then(getObject(arg1));
1081
1145
  return addHeapObject(ret);
1082
1146
  };
1083
1147
 
1084
- export function __wbg_then_f753623316e2873a(arg0, arg1, arg2) {
1148
+ export function __wbg_then_cde1713a812adbda(arg0, arg1, arg2) {
1085
1149
  const ret = getObject(arg0).then(getObject(arg1), getObject(arg2));
1086
1150
  return addHeapObject(ret);
1087
1151
  };
1088
1152
 
1089
- export function __wbg_buffer_cf65c07de34b9a08(arg0) {
1153
+ export function __wbg_buffer_fcbfb6d88b2732e9(arg0) {
1090
1154
  const ret = getObject(arg0).buffer;
1091
1155
  return addHeapObject(ret);
1092
1156
  };
1093
1157
 
1094
- export function __wbg_newwithbyteoffsetandlength_9fb2f11355ecadf5(arg0, arg1, arg2) {
1158
+ export function __wbg_newwithbyteoffsetandlength_92c251989c485785(arg0, arg1, arg2) {
1095
1159
  const ret = new Uint8Array(getObject(arg0), arg1 >>> 0, arg2 >>> 0);
1096
1160
  return addHeapObject(ret);
1097
1161
  };
1098
1162
 
1099
- export function __wbg_new_537b7341ce90bb31(arg0) {
1163
+ export function __wbg_new_bc5d9aad3f9ac80e(arg0) {
1100
1164
  const ret = new Uint8Array(getObject(arg0));
1101
1165
  return addHeapObject(ret);
1102
1166
  };
1103
1167
 
1104
- export function __wbg_set_17499e8aa4003ebd(arg0, arg1, arg2) {
1168
+ export function __wbg_set_4b3aa8445ac1e91c(arg0, arg1, arg2) {
1105
1169
  getObject(arg0).set(getObject(arg1), arg2 >>> 0);
1106
1170
  };
1107
1171
 
1108
- export function __wbg_length_27a2afe8ab42b09f(arg0) {
1172
+ export function __wbg_length_d9c4ded7e708c6a1(arg0) {
1109
1173
  const ret = getObject(arg0).length;
1110
1174
  return ret;
1111
1175
  };
1112
1176
 
1113
- export function __wbg_instanceof_Uint8Array_01cebe79ca606cca(arg0) {
1177
+ export function __wbg_instanceof_Uint8Array_4733577ba827276b(arg0) {
1114
1178
  let result;
1115
1179
  try {
1116
1180
  result = getObject(arg0) instanceof Uint8Array;
@@ -1121,27 +1185,27 @@ export function __wbg_instanceof_Uint8Array_01cebe79ca606cca(arg0) {
1121
1185
  return ret;
1122
1186
  };
1123
1187
 
1124
- export function __wbg_newwithlength_b56c882b57805732(arg0) {
1188
+ export function __wbg_newwithlength_89eca18f2603a999(arg0) {
1125
1189
  const ret = new Uint8Array(arg0 >>> 0);
1126
1190
  return addHeapObject(ret);
1127
1191
  };
1128
1192
 
1129
- export function __wbg_subarray_7526649b91a252a6(arg0, arg1, arg2) {
1193
+ export function __wbg_subarray_7649d027b2b141b3(arg0, arg1, arg2) {
1130
1194
  const ret = getObject(arg0).subarray(arg1 >>> 0, arg2 >>> 0);
1131
1195
  return addHeapObject(ret);
1132
1196
  };
1133
1197
 
1134
- export function __wbg_has_3feea89d34bd7ad5() { return handleError(function (arg0, arg1) {
1198
+ export function __wbg_has_99783608c80c4a1d() { return handleError(function (arg0, arg1) {
1135
1199
  const ret = Reflect.has(getObject(arg0), getObject(arg1));
1136
1200
  return ret;
1137
1201
  }, arguments) };
1138
1202
 
1139
- export function __wbg_set_6aa458a4ebdb65cb() { return handleError(function (arg0, arg1, arg2) {
1203
+ export function __wbg_set_bc33b7c3be9319b5() { return handleError(function (arg0, arg1, arg2) {
1140
1204
  const ret = Reflect.set(getObject(arg0), getObject(arg1), getObject(arg2));
1141
1205
  return ret;
1142
1206
  }, arguments) };
1143
1207
 
1144
- export function __wbg_stringify_029a979dfb73aa17() { return handleError(function (arg0) {
1208
+ export function __wbg_stringify_9003c389758d16d4() { return handleError(function (arg0) {
1145
1209
  const ret = JSON.stringify(getObject(arg0));
1146
1210
  return addHeapObject(ret);
1147
1211
  }, arguments) };
@@ -1155,10 +1219,10 @@ export function __wbindgen_bigint_get_as_i64(arg0, arg1) {
1155
1219
 
1156
1220
  export function __wbindgen_debug_string(arg0, arg1) {
1157
1221
  const ret = debugString(getObject(arg1));
1158
- const ptr0 = passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
1159
- const len0 = WASM_VECTOR_LEN;
1160
- getInt32Memory0()[arg0 / 4 + 1] = len0;
1161
- getInt32Memory0()[arg0 / 4 + 0] = ptr0;
1222
+ const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
1223
+ const len1 = WASM_VECTOR_LEN;
1224
+ getInt32Memory0()[arg0 / 4 + 1] = len1;
1225
+ getInt32Memory0()[arg0 / 4 + 0] = ptr1;
1162
1226
  };
1163
1227
 
1164
1228
  export function __wbindgen_throw(arg0, arg1) {
@@ -1170,8 +1234,8 @@ export function __wbindgen_memory() {
1170
1234
  return addHeapObject(ret);
1171
1235
  };
1172
1236
 
1173
- export function __wbindgen_closure_wrapper10310(arg0, arg1, arg2) {
1174
- const ret = makeMutClosure(arg0, arg1, 2650, __wbg_adapter_44);
1237
+ export function __wbindgen_closure_wrapper10458(arg0, arg1, arg2) {
1238
+ const ret = makeMutClosure(arg0, arg1, 2702, __wbg_adapter_44);
1175
1239
  return addHeapObject(ret);
1176
1240
  };
1177
1241
 
Binary file
package/package.json CHANGED
@@ -6,7 +6,7 @@
6
6
  "Francisco Calderón <francisco@diba.io>"
7
7
  ],
8
8
  "description": "Core functionality for the BitMask wallet",
9
- "version": "0.6.0-beta.2",
9
+ "version": "0.6.0-beta.4",
10
10
  "license": "MIT",
11
11
  "repository": {
12
12
  "type": "git",