bitmask-core 0.7.0-beta.7 → 0.7.0-beta.8
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/bitcoin.d.ts +2 -0
- package/bitcoin.d.ts.map +1 -1
- package/bitcoin.ts +2 -0
- package/bitmask_core.d.ts +207 -207
- package/bitmask_core.js +560 -560
- package/bitmask_core_bg.wasm +0 -0
- package/bitmask_core_bg.wasm.d.ts +29 -29
- package/constants.js +1 -1
- package/constants.ts +1 -1
- package/package.json +1 -1
- package/rgb.d.ts +2 -0
- package/rgb.d.ts.map +1 -1
- package/rgb.ts +3 -0
package/bitmask_core.js
CHANGED
|
@@ -226,161 +226,6 @@ function __wbg_adapter_48(arg0, arg1, arg2) {
|
|
|
226
226
|
wasm._dyn_core__ops__function__FnMut__A____Output___R_as_wasm_bindgen__closure__WasmClosure___describe__invoke__h6d05c64ec984f162(arg0, arg1, addHeapObject(arg2));
|
|
227
227
|
}
|
|
228
228
|
|
|
229
|
-
function passArray8ToWasm0(arg, malloc) {
|
|
230
|
-
const ptr = malloc(arg.length * 1, 1) >>> 0;
|
|
231
|
-
getUint8Memory0().set(arg, ptr / 1);
|
|
232
|
-
WASM_VECTOR_LEN = arg.length;
|
|
233
|
-
return ptr;
|
|
234
|
-
}
|
|
235
|
-
/**
|
|
236
|
-
* @param {string} secret_key
|
|
237
|
-
* @param {string} name
|
|
238
|
-
* @param {Uint8Array} data
|
|
239
|
-
* @param {boolean} force
|
|
240
|
-
* @param {Uint8Array | undefined} metadata
|
|
241
|
-
* @returns {Promise<any>}
|
|
242
|
-
*/
|
|
243
|
-
export function store(secret_key, name, data, force, metadata) {
|
|
244
|
-
const ptr0 = passStringToWasm0(secret_key, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
245
|
-
const len0 = WASM_VECTOR_LEN;
|
|
246
|
-
const ptr1 = passStringToWasm0(name, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
247
|
-
const len1 = WASM_VECTOR_LEN;
|
|
248
|
-
const ptr2 = passArray8ToWasm0(data, wasm.__wbindgen_malloc);
|
|
249
|
-
const len2 = WASM_VECTOR_LEN;
|
|
250
|
-
var ptr3 = isLikeNone(metadata) ? 0 : passArray8ToWasm0(metadata, wasm.__wbindgen_malloc);
|
|
251
|
-
var len3 = WASM_VECTOR_LEN;
|
|
252
|
-
const ret = wasm.store(ptr0, len0, ptr1, len1, ptr2, len2, force, ptr3, len3);
|
|
253
|
-
return takeObject(ret);
|
|
254
|
-
}
|
|
255
|
-
|
|
256
|
-
/**
|
|
257
|
-
* @param {string} secret_key
|
|
258
|
-
* @param {string} name
|
|
259
|
-
* @returns {Promise<any>}
|
|
260
|
-
*/
|
|
261
|
-
export function retrieve(secret_key, name) {
|
|
262
|
-
const ptr0 = passStringToWasm0(secret_key, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
263
|
-
const len0 = WASM_VECTOR_LEN;
|
|
264
|
-
const ptr1 = passStringToWasm0(name, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
265
|
-
const len1 = WASM_VECTOR_LEN;
|
|
266
|
-
const ret = wasm.retrieve(ptr0, len0, ptr1, len1);
|
|
267
|
-
return takeObject(ret);
|
|
268
|
-
}
|
|
269
|
-
|
|
270
|
-
/**
|
|
271
|
-
* @param {string} secret_key
|
|
272
|
-
* @param {string} name
|
|
273
|
-
* @returns {Promise<any>}
|
|
274
|
-
*/
|
|
275
|
-
export function retrieve_metadata(secret_key, name) {
|
|
276
|
-
const ptr0 = passStringToWasm0(secret_key, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
277
|
-
const len0 = WASM_VECTOR_LEN;
|
|
278
|
-
const ptr1 = passStringToWasm0(name, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
279
|
-
const len1 = WASM_VECTOR_LEN;
|
|
280
|
-
const ret = wasm.retrieve_metadata(ptr0, len0, ptr1, len1);
|
|
281
|
-
return takeObject(ret);
|
|
282
|
-
}
|
|
283
|
-
|
|
284
|
-
/**
|
|
285
|
-
* @param {Uint8Array} bytes
|
|
286
|
-
* @returns {string}
|
|
287
|
-
*/
|
|
288
|
-
export function encode_hex(bytes) {
|
|
289
|
-
let deferred2_0;
|
|
290
|
-
let deferred2_1;
|
|
291
|
-
try {
|
|
292
|
-
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
293
|
-
const ptr0 = passArray8ToWasm0(bytes, wasm.__wbindgen_malloc);
|
|
294
|
-
const len0 = WASM_VECTOR_LEN;
|
|
295
|
-
wasm.encode_hex(retptr, ptr0, len0);
|
|
296
|
-
var r0 = getInt32Memory0()[retptr / 4 + 0];
|
|
297
|
-
var r1 = getInt32Memory0()[retptr / 4 + 1];
|
|
298
|
-
deferred2_0 = r0;
|
|
299
|
-
deferred2_1 = r1;
|
|
300
|
-
return getStringFromWasm0(r0, r1);
|
|
301
|
-
} finally {
|
|
302
|
-
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
303
|
-
wasm.__wbindgen_free(deferred2_0, deferred2_1, 1);
|
|
304
|
-
}
|
|
305
|
-
}
|
|
306
|
-
|
|
307
|
-
/**
|
|
308
|
-
* @param {Uint8Array} bytes
|
|
309
|
-
* @returns {string}
|
|
310
|
-
*/
|
|
311
|
-
export function encode_base64(bytes) {
|
|
312
|
-
let deferred2_0;
|
|
313
|
-
let deferred2_1;
|
|
314
|
-
try {
|
|
315
|
-
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
316
|
-
const ptr0 = passArray8ToWasm0(bytes, wasm.__wbindgen_malloc);
|
|
317
|
-
const len0 = WASM_VECTOR_LEN;
|
|
318
|
-
wasm.encode_base64(retptr, ptr0, len0);
|
|
319
|
-
var r0 = getInt32Memory0()[retptr / 4 + 0];
|
|
320
|
-
var r1 = getInt32Memory0()[retptr / 4 + 1];
|
|
321
|
-
deferred2_0 = r0;
|
|
322
|
-
deferred2_1 = r1;
|
|
323
|
-
return getStringFromWasm0(r0, r1);
|
|
324
|
-
} finally {
|
|
325
|
-
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
326
|
-
wasm.__wbindgen_free(deferred2_0, deferred2_1, 1);
|
|
327
|
-
}
|
|
328
|
-
}
|
|
329
|
-
|
|
330
|
-
function getArrayU8FromWasm0(ptr, len) {
|
|
331
|
-
ptr = ptr >>> 0;
|
|
332
|
-
return getUint8Memory0().subarray(ptr / 1, ptr / 1 + len);
|
|
333
|
-
}
|
|
334
|
-
/**
|
|
335
|
-
* @param {string} string
|
|
336
|
-
* @returns {Uint8Array}
|
|
337
|
-
*/
|
|
338
|
-
export function decode_hex(string) {
|
|
339
|
-
try {
|
|
340
|
-
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
341
|
-
const ptr0 = passStringToWasm0(string, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
342
|
-
const len0 = WASM_VECTOR_LEN;
|
|
343
|
-
wasm.decode_hex(retptr, ptr0, len0);
|
|
344
|
-
var r0 = getInt32Memory0()[retptr / 4 + 0];
|
|
345
|
-
var r1 = getInt32Memory0()[retptr / 4 + 1];
|
|
346
|
-
var r2 = getInt32Memory0()[retptr / 4 + 2];
|
|
347
|
-
var r3 = getInt32Memory0()[retptr / 4 + 3];
|
|
348
|
-
if (r3) {
|
|
349
|
-
throw takeObject(r2);
|
|
350
|
-
}
|
|
351
|
-
var v2 = getArrayU8FromWasm0(r0, r1).slice();
|
|
352
|
-
wasm.__wbindgen_free(r0, r1 * 1);
|
|
353
|
-
return v2;
|
|
354
|
-
} finally {
|
|
355
|
-
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
356
|
-
}
|
|
357
|
-
}
|
|
358
|
-
|
|
359
|
-
/**
|
|
360
|
-
* @param {string} string
|
|
361
|
-
* @returns {Uint8Array}
|
|
362
|
-
*/
|
|
363
|
-
export function decode_base64(string) {
|
|
364
|
-
try {
|
|
365
|
-
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
366
|
-
const ptr0 = passStringToWasm0(string, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
367
|
-
const len0 = WASM_VECTOR_LEN;
|
|
368
|
-
wasm.decode_base64(retptr, ptr0, len0);
|
|
369
|
-
var r0 = getInt32Memory0()[retptr / 4 + 0];
|
|
370
|
-
var r1 = getInt32Memory0()[retptr / 4 + 1];
|
|
371
|
-
var r2 = getInt32Memory0()[retptr / 4 + 2];
|
|
372
|
-
var r3 = getInt32Memory0()[retptr / 4 + 3];
|
|
373
|
-
if (r3) {
|
|
374
|
-
throw takeObject(r2);
|
|
375
|
-
}
|
|
376
|
-
var v2 = getArrayU8FromWasm0(r0, r1).slice();
|
|
377
|
-
wasm.__wbindgen_free(r0, r1 * 1);
|
|
378
|
-
return v2;
|
|
379
|
-
} finally {
|
|
380
|
-
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
381
|
-
}
|
|
382
|
-
}
|
|
383
|
-
|
|
384
229
|
/**
|
|
385
230
|
* @returns {Promise<any>}
|
|
386
231
|
*/
|
|
@@ -463,325 +308,356 @@ export function update_nostr_pubkey(pubkey, token) {
|
|
|
463
308
|
}
|
|
464
309
|
|
|
465
310
|
/**
|
|
466
|
-
* @param {string}
|
|
467
|
-
* @
|
|
311
|
+
* @param {string} nostr_hex_sk
|
|
312
|
+
* @param {any} request
|
|
313
|
+
* @returns {Promise<any>}
|
|
468
314
|
*/
|
|
469
|
-
export function
|
|
470
|
-
|
|
471
|
-
|
|
472
|
-
|
|
473
|
-
|
|
474
|
-
const ptr0 = passStringToWasm0(password, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
475
|
-
const len0 = WASM_VECTOR_LEN;
|
|
476
|
-
wasm.hash_password(retptr, ptr0, len0);
|
|
477
|
-
var r0 = getInt32Memory0()[retptr / 4 + 0];
|
|
478
|
-
var r1 = getInt32Memory0()[retptr / 4 + 1];
|
|
479
|
-
deferred2_0 = r0;
|
|
480
|
-
deferred2_1 = r1;
|
|
481
|
-
return getStringFromWasm0(r0, r1);
|
|
482
|
-
} finally {
|
|
483
|
-
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
484
|
-
wasm.__wbindgen_free(deferred2_0, deferred2_1, 1);
|
|
485
|
-
}
|
|
315
|
+
export function issue_contract(nostr_hex_sk, request) {
|
|
316
|
+
const ptr0 = passStringToWasm0(nostr_hex_sk, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
317
|
+
const len0 = WASM_VECTOR_LEN;
|
|
318
|
+
const ret = wasm.issue_contract(ptr0, len0, addHeapObject(request));
|
|
319
|
+
return takeObject(ret);
|
|
486
320
|
}
|
|
487
321
|
|
|
488
322
|
/**
|
|
489
|
-
* @param {string}
|
|
323
|
+
* @param {string} nostr_hex_sk
|
|
324
|
+
* @param {any} request
|
|
490
325
|
* @returns {Promise<any>}
|
|
491
326
|
*/
|
|
492
|
-
export function
|
|
493
|
-
const ptr0 = passStringToWasm0(
|
|
327
|
+
export function reissue_contract(nostr_hex_sk, request) {
|
|
328
|
+
const ptr0 = passStringToWasm0(nostr_hex_sk, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
494
329
|
const len0 = WASM_VECTOR_LEN;
|
|
495
|
-
const ret = wasm.
|
|
330
|
+
const ret = wasm.reissue_contract(ptr0, len0, addHeapObject(request));
|
|
496
331
|
return takeObject(ret);
|
|
497
332
|
}
|
|
498
333
|
|
|
499
334
|
/**
|
|
500
|
-
* @param {string}
|
|
501
|
-
* @param {
|
|
335
|
+
* @param {string} nostr_hex_sk
|
|
336
|
+
* @param {any} request
|
|
502
337
|
* @returns {Promise<any>}
|
|
503
338
|
*/
|
|
504
|
-
export function
|
|
505
|
-
const ptr0 = passStringToWasm0(
|
|
339
|
+
export function rgb_create_invoice(nostr_hex_sk, request) {
|
|
340
|
+
const ptr0 = passStringToWasm0(nostr_hex_sk, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
506
341
|
const len0 = WASM_VECTOR_LEN;
|
|
507
|
-
const
|
|
508
|
-
const len1 = WASM_VECTOR_LEN;
|
|
509
|
-
const ret = wasm.decrypt_wallet(ptr0, len0, ptr1, len1);
|
|
342
|
+
const ret = wasm.rgb_create_invoice(ptr0, len0, addHeapObject(request));
|
|
510
343
|
return takeObject(ret);
|
|
511
344
|
}
|
|
512
345
|
|
|
513
346
|
/**
|
|
514
|
-
* @param {string}
|
|
515
|
-
* @param {
|
|
516
|
-
* @param {string} seed_password
|
|
347
|
+
* @param {string} nostr_hex_sk
|
|
348
|
+
* @param {any} request
|
|
517
349
|
* @returns {Promise<any>}
|
|
518
350
|
*/
|
|
519
|
-
export function
|
|
520
|
-
const ptr0 = passStringToWasm0(
|
|
351
|
+
export function create_psbt(nostr_hex_sk, request) {
|
|
352
|
+
const ptr0 = passStringToWasm0(nostr_hex_sk, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
521
353
|
const len0 = WASM_VECTOR_LEN;
|
|
522
|
-
const
|
|
523
|
-
const len1 = WASM_VECTOR_LEN;
|
|
524
|
-
const ptr2 = passStringToWasm0(seed_password, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
525
|
-
const len2 = WASM_VECTOR_LEN;
|
|
526
|
-
const ret = wasm.upgrade_wallet(ptr0, len0, ptr1, len1, ptr2, len2);
|
|
354
|
+
const ret = wasm.create_psbt(ptr0, len0, addHeapObject(request));
|
|
527
355
|
return takeObject(ret);
|
|
528
356
|
}
|
|
529
357
|
|
|
530
358
|
/**
|
|
531
|
-
* @param {string}
|
|
532
|
-
* @param {
|
|
359
|
+
* @param {string} _nostr_hex_sk
|
|
360
|
+
* @param {any} request
|
|
533
361
|
* @returns {Promise<any>}
|
|
534
362
|
*/
|
|
535
|
-
export function
|
|
536
|
-
const ptr0 = passStringToWasm0(
|
|
363
|
+
export function psbt_sign_file(_nostr_hex_sk, request) {
|
|
364
|
+
const ptr0 = passStringToWasm0(_nostr_hex_sk, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
537
365
|
const len0 = WASM_VECTOR_LEN;
|
|
538
|
-
const
|
|
539
|
-
const len1 = WASM_VECTOR_LEN;
|
|
540
|
-
const ret = wasm.new_wallet(ptr0, len0, ptr1, len1);
|
|
366
|
+
const ret = wasm.psbt_sign_file(ptr0, len0, addHeapObject(request));
|
|
541
367
|
return takeObject(ret);
|
|
542
368
|
}
|
|
543
369
|
|
|
544
370
|
/**
|
|
545
|
-
* @param {string}
|
|
546
|
-
* @param {
|
|
547
|
-
* @param {string} seed_password
|
|
371
|
+
* @param {string} _nostr_hex_sk
|
|
372
|
+
* @param {any} request
|
|
548
373
|
* @returns {Promise<any>}
|
|
549
374
|
*/
|
|
550
|
-
export function
|
|
551
|
-
const ptr0 = passStringToWasm0(
|
|
375
|
+
export function psbt_publish_file(_nostr_hex_sk, request) {
|
|
376
|
+
const ptr0 = passStringToWasm0(_nostr_hex_sk, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
552
377
|
const len0 = WASM_VECTOR_LEN;
|
|
553
|
-
const
|
|
554
|
-
const len1 = WASM_VECTOR_LEN;
|
|
555
|
-
const ptr2 = passStringToWasm0(seed_password, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
556
|
-
const len2 = WASM_VECTOR_LEN;
|
|
557
|
-
const ret = wasm.encrypt_wallet(ptr0, len0, ptr1, len1, ptr2, len2);
|
|
378
|
+
const ret = wasm.psbt_publish_file(ptr0, len0, addHeapObject(request));
|
|
558
379
|
return takeObject(ret);
|
|
559
380
|
}
|
|
560
381
|
|
|
561
382
|
/**
|
|
562
|
-
* @param {string}
|
|
563
|
-
* @param {
|
|
383
|
+
* @param {string} _nostr_hex_sk
|
|
384
|
+
* @param {any} request
|
|
564
385
|
* @returns {Promise<any>}
|
|
565
386
|
*/
|
|
566
|
-
export function
|
|
567
|
-
const ptr0 = passStringToWasm0(
|
|
387
|
+
export function psbt_sign_and_publish_file(_nostr_hex_sk, request) {
|
|
388
|
+
const ptr0 = passStringToWasm0(_nostr_hex_sk, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
568
389
|
const len0 = WASM_VECTOR_LEN;
|
|
569
|
-
|
|
570
|
-
var len1 = WASM_VECTOR_LEN;
|
|
571
|
-
const ret = wasm.get_wallet_data(ptr0, len0, ptr1, len1);
|
|
390
|
+
const ret = wasm.psbt_sign_and_publish_file(ptr0, len0, addHeapObject(request));
|
|
572
391
|
return takeObject(ret);
|
|
573
392
|
}
|
|
574
393
|
|
|
575
394
|
/**
|
|
395
|
+
* @param {string} nostr_hex_sk
|
|
396
|
+
* @param {any} request
|
|
576
397
|
* @returns {Promise<any>}
|
|
577
398
|
*/
|
|
578
|
-
export function
|
|
579
|
-
const
|
|
399
|
+
export function transfer_asset(nostr_hex_sk, request) {
|
|
400
|
+
const ptr0 = passStringToWasm0(nostr_hex_sk, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
401
|
+
const len0 = WASM_VECTOR_LEN;
|
|
402
|
+
const ret = wasm.transfer_asset(ptr0, len0, addHeapObject(request));
|
|
580
403
|
return takeObject(ret);
|
|
581
404
|
}
|
|
582
405
|
|
|
583
406
|
/**
|
|
584
|
-
* @param {string}
|
|
585
|
-
* @param {
|
|
407
|
+
* @param {string} nostr_hex_sk
|
|
408
|
+
* @param {any} request
|
|
586
409
|
* @returns {Promise<any>}
|
|
587
410
|
*/
|
|
588
|
-
export function
|
|
589
|
-
const ptr0 = passStringToWasm0(
|
|
411
|
+
export function full_transfer_asset(nostr_hex_sk, request) {
|
|
412
|
+
const ptr0 = passStringToWasm0(nostr_hex_sk, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
590
413
|
const len0 = WASM_VECTOR_LEN;
|
|
591
|
-
|
|
592
|
-
var len1 = WASM_VECTOR_LEN;
|
|
593
|
-
const ret = wasm.get_new_address(ptr0, len0, ptr1, len1);
|
|
414
|
+
const ret = wasm.full_transfer_asset(ptr0, len0, addHeapObject(request));
|
|
594
415
|
return takeObject(ret);
|
|
595
416
|
}
|
|
596
417
|
|
|
597
418
|
/**
|
|
598
|
-
* @param {string}
|
|
599
|
-
* @param {
|
|
600
|
-
* @param {string} destination
|
|
601
|
-
* @param {bigint} amount
|
|
602
|
-
* @param {number | undefined} fee_rate
|
|
419
|
+
* @param {string} nostr_hex_sk
|
|
420
|
+
* @param {any} request
|
|
603
421
|
* @returns {Promise<any>}
|
|
604
422
|
*/
|
|
605
|
-
export function
|
|
606
|
-
const ptr0 = passStringToWasm0(
|
|
423
|
+
export function accept_transfer(nostr_hex_sk, request) {
|
|
424
|
+
const ptr0 = passStringToWasm0(nostr_hex_sk, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
607
425
|
const len0 = WASM_VECTOR_LEN;
|
|
608
|
-
const
|
|
426
|
+
const ret = wasm.accept_transfer(ptr0, len0, addHeapObject(request));
|
|
427
|
+
return takeObject(ret);
|
|
428
|
+
}
|
|
429
|
+
|
|
430
|
+
/**
|
|
431
|
+
* @param {string} nostr_hex_sk
|
|
432
|
+
* @returns {Promise<any>}
|
|
433
|
+
*/
|
|
434
|
+
export function verify_transfers(nostr_hex_sk) {
|
|
435
|
+
const ptr0 = passStringToWasm0(nostr_hex_sk, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
436
|
+
const len0 = WASM_VECTOR_LEN;
|
|
437
|
+
const ret = wasm.verify_transfers(ptr0, len0);
|
|
438
|
+
return takeObject(ret);
|
|
439
|
+
}
|
|
440
|
+
|
|
441
|
+
/**
|
|
442
|
+
* @param {string} nostr_hex_sk
|
|
443
|
+
* @param {string} contract_id
|
|
444
|
+
* @returns {Promise<any>}
|
|
445
|
+
*/
|
|
446
|
+
export function get_contract(nostr_hex_sk, contract_id) {
|
|
447
|
+
const ptr0 = passStringToWasm0(nostr_hex_sk, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
448
|
+
const len0 = WASM_VECTOR_LEN;
|
|
449
|
+
const ptr1 = passStringToWasm0(contract_id, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
609
450
|
const len1 = WASM_VECTOR_LEN;
|
|
610
|
-
const
|
|
611
|
-
|
|
612
|
-
|
|
451
|
+
const ret = wasm.get_contract(ptr0, len0, ptr1, len1);
|
|
452
|
+
return takeObject(ret);
|
|
453
|
+
}
|
|
454
|
+
|
|
455
|
+
/**
|
|
456
|
+
* @param {string} nostr_hex_sk
|
|
457
|
+
* @param {string} contract_id
|
|
458
|
+
* @returns {Promise<any>}
|
|
459
|
+
*/
|
|
460
|
+
export function hidden_contract(nostr_hex_sk, contract_id) {
|
|
461
|
+
const ptr0 = passStringToWasm0(nostr_hex_sk, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
462
|
+
const len0 = WASM_VECTOR_LEN;
|
|
463
|
+
const ptr1 = passStringToWasm0(contract_id, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
464
|
+
const len1 = WASM_VECTOR_LEN;
|
|
465
|
+
const ret = wasm.hidden_contract(ptr0, len0, ptr1, len1);
|
|
466
|
+
return takeObject(ret);
|
|
467
|
+
}
|
|
468
|
+
|
|
469
|
+
/**
|
|
470
|
+
* @param {string} nostr_hex_sk
|
|
471
|
+
* @returns {Promise<any>}
|
|
472
|
+
*/
|
|
473
|
+
export function list_contracts(nostr_hex_sk) {
|
|
474
|
+
const ptr0 = passStringToWasm0(nostr_hex_sk, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
475
|
+
const len0 = WASM_VECTOR_LEN;
|
|
476
|
+
const ret = wasm.list_contracts(ptr0, len0);
|
|
477
|
+
return takeObject(ret);
|
|
478
|
+
}
|
|
479
|
+
|
|
480
|
+
/**
|
|
481
|
+
* @param {string} nostr_hex_sk
|
|
482
|
+
* @returns {Promise<any>}
|
|
483
|
+
*/
|
|
484
|
+
export function list_all_contracts(nostr_hex_sk) {
|
|
485
|
+
const ptr0 = passStringToWasm0(nostr_hex_sk, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
486
|
+
const len0 = WASM_VECTOR_LEN;
|
|
487
|
+
const ret = wasm.list_all_contracts(ptr0, len0);
|
|
613
488
|
return takeObject(ret);
|
|
614
489
|
}
|
|
615
490
|
|
|
616
491
|
/**
|
|
617
|
-
* @param {string}
|
|
618
|
-
* @param {string} descriptor
|
|
619
|
-
* @param {string | undefined} change_descriptor
|
|
620
|
-
* @param {number | undefined} fee_rate
|
|
492
|
+
* @param {string} nostr_hex_sk
|
|
621
493
|
* @returns {Promise<any>}
|
|
622
494
|
*/
|
|
623
|
-
export function
|
|
624
|
-
const ptr0 = passStringToWasm0(
|
|
495
|
+
export function list_interfaces(nostr_hex_sk) {
|
|
496
|
+
const ptr0 = passStringToWasm0(nostr_hex_sk, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
625
497
|
const len0 = WASM_VECTOR_LEN;
|
|
626
|
-
const
|
|
627
|
-
const len1 = WASM_VECTOR_LEN;
|
|
628
|
-
var ptr2 = isLikeNone(change_descriptor) ? 0 : passStringToWasm0(change_descriptor, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
629
|
-
var len2 = WASM_VECTOR_LEN;
|
|
630
|
-
const ret = wasm.drain_wallet(ptr0, len0, ptr1, len1, ptr2, len2, !isLikeNone(fee_rate), isLikeNone(fee_rate) ? 0 : fee_rate);
|
|
498
|
+
const ret = wasm.list_interfaces(ptr0, len0);
|
|
631
499
|
return takeObject(ret);
|
|
632
500
|
}
|
|
633
501
|
|
|
634
502
|
/**
|
|
635
|
-
* @param {string}
|
|
636
|
-
* @param {string} change_descriptor
|
|
637
|
-
* @param {string} asset_address_1
|
|
638
|
-
* @param {string} uda_address_1
|
|
639
|
-
* @param {number | undefined} fee_rate
|
|
503
|
+
* @param {string} nostr_hex_sk
|
|
640
504
|
* @returns {Promise<any>}
|
|
641
505
|
*/
|
|
642
|
-
export function
|
|
643
|
-
const ptr0 = passStringToWasm0(
|
|
506
|
+
export function list_schemas(nostr_hex_sk) {
|
|
507
|
+
const ptr0 = passStringToWasm0(nostr_hex_sk, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
644
508
|
const len0 = WASM_VECTOR_LEN;
|
|
645
|
-
const
|
|
646
|
-
const len1 = WASM_VECTOR_LEN;
|
|
647
|
-
const ptr2 = passStringToWasm0(asset_address_1, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
648
|
-
const len2 = WASM_VECTOR_LEN;
|
|
649
|
-
const ptr3 = passStringToWasm0(uda_address_1, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
650
|
-
const len3 = WASM_VECTOR_LEN;
|
|
651
|
-
const ret = wasm.fund_vault(ptr0, len0, ptr1, len1, ptr2, len2, ptr3, len3, !isLikeNone(fee_rate), isLikeNone(fee_rate) ? 0 : fee_rate);
|
|
509
|
+
const ret = wasm.list_schemas(ptr0, len0);
|
|
652
510
|
return takeObject(ret);
|
|
653
511
|
}
|
|
654
512
|
|
|
655
513
|
/**
|
|
656
|
-
* @param {string}
|
|
657
|
-
* @param {
|
|
514
|
+
* @param {string} nostr_hex_sk
|
|
515
|
+
* @param {any} request
|
|
658
516
|
* @returns {Promise<any>}
|
|
659
517
|
*/
|
|
660
|
-
export function
|
|
661
|
-
const ptr0 = passStringToWasm0(
|
|
518
|
+
export function import_contract(nostr_hex_sk, request) {
|
|
519
|
+
const ptr0 = passStringToWasm0(nostr_hex_sk, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
662
520
|
const len0 = WASM_VECTOR_LEN;
|
|
663
|
-
const
|
|
664
|
-
const len1 = WASM_VECTOR_LEN;
|
|
665
|
-
const ret = wasm.get_assets_vault(ptr0, len0, ptr1, len1);
|
|
521
|
+
const ret = wasm.import_contract(ptr0, len0, addHeapObject(request));
|
|
666
522
|
return takeObject(ret);
|
|
667
523
|
}
|
|
668
524
|
|
|
669
525
|
/**
|
|
670
|
-
* @param {string}
|
|
671
|
-
* @param {
|
|
526
|
+
* @param {string} nostr_hex_sk
|
|
527
|
+
* @param {any} request
|
|
672
528
|
* @returns {Promise<any>}
|
|
673
529
|
*/
|
|
674
|
-
export function
|
|
675
|
-
const ptr0 = passStringToWasm0(
|
|
530
|
+
export function create_watcher(nostr_hex_sk, request) {
|
|
531
|
+
const ptr0 = passStringToWasm0(nostr_hex_sk, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
676
532
|
const len0 = WASM_VECTOR_LEN;
|
|
677
|
-
const
|
|
678
|
-
const len1 = WASM_VECTOR_LEN;
|
|
679
|
-
const ret = wasm.create_wallet(ptr0, len0, ptr1, len1);
|
|
533
|
+
const ret = wasm.create_watcher(ptr0, len0, addHeapObject(request));
|
|
680
534
|
return takeObject(ret);
|
|
681
535
|
}
|
|
682
536
|
|
|
683
537
|
/**
|
|
684
|
-
* @param {string}
|
|
685
|
-
* @param {string}
|
|
538
|
+
* @param {string} nostr_hex_sk
|
|
539
|
+
* @param {string} name
|
|
686
540
|
* @returns {Promise<any>}
|
|
687
541
|
*/
|
|
688
|
-
export function
|
|
689
|
-
const ptr0 = passStringToWasm0(
|
|
542
|
+
export function watcher_details(nostr_hex_sk, name) {
|
|
543
|
+
const ptr0 = passStringToWasm0(nostr_hex_sk, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
690
544
|
const len0 = WASM_VECTOR_LEN;
|
|
691
|
-
const ptr1 = passStringToWasm0(
|
|
545
|
+
const ptr1 = passStringToWasm0(name, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
692
546
|
const len1 = WASM_VECTOR_LEN;
|
|
693
|
-
const ret = wasm.
|
|
547
|
+
const ret = wasm.watcher_details(ptr0, len0, ptr1, len1);
|
|
694
548
|
return takeObject(ret);
|
|
695
549
|
}
|
|
696
550
|
|
|
697
551
|
/**
|
|
698
|
-
* @param {string}
|
|
699
|
-
* @param {
|
|
700
|
-
* @param {string} token
|
|
552
|
+
* @param {string} nostr_hex_sk
|
|
553
|
+
* @param {string} name
|
|
701
554
|
* @returns {Promise<any>}
|
|
702
555
|
*/
|
|
703
|
-
export function
|
|
704
|
-
const ptr0 = passStringToWasm0(
|
|
556
|
+
export function clear_watcher(nostr_hex_sk, name) {
|
|
557
|
+
const ptr0 = passStringToWasm0(nostr_hex_sk, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
705
558
|
const len0 = WASM_VECTOR_LEN;
|
|
706
|
-
const ptr1 = passStringToWasm0(
|
|
559
|
+
const ptr1 = passStringToWasm0(name, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
707
560
|
const len1 = WASM_VECTOR_LEN;
|
|
708
|
-
const ret = wasm.
|
|
561
|
+
const ret = wasm.clear_watcher(ptr0, len0, ptr1, len1);
|
|
709
562
|
return takeObject(ret);
|
|
710
563
|
}
|
|
711
564
|
|
|
712
565
|
/**
|
|
713
|
-
* @param {string}
|
|
566
|
+
* @param {string} nostr_hex_sk
|
|
567
|
+
* @param {string} name
|
|
568
|
+
* @param {string} address
|
|
714
569
|
* @returns {Promise<any>}
|
|
715
570
|
*/
|
|
716
|
-
export function
|
|
717
|
-
const ptr0 = passStringToWasm0(
|
|
571
|
+
export function watcher_address(nostr_hex_sk, name, address) {
|
|
572
|
+
const ptr0 = passStringToWasm0(nostr_hex_sk, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
718
573
|
const len0 = WASM_VECTOR_LEN;
|
|
719
|
-
const
|
|
574
|
+
const ptr1 = passStringToWasm0(name, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
575
|
+
const len1 = WASM_VECTOR_LEN;
|
|
576
|
+
const ptr2 = passStringToWasm0(address, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
577
|
+
const len2 = WASM_VECTOR_LEN;
|
|
578
|
+
const ret = wasm.watcher_address(ptr0, len0, ptr1, len1, ptr2, len2);
|
|
720
579
|
return takeObject(ret);
|
|
721
580
|
}
|
|
722
581
|
|
|
723
582
|
/**
|
|
724
|
-
* @param {string}
|
|
583
|
+
* @param {string} nostr_hex_sk
|
|
584
|
+
* @param {string} name
|
|
585
|
+
* @param {string} utxo
|
|
725
586
|
* @returns {Promise<any>}
|
|
726
587
|
*/
|
|
727
|
-
export function
|
|
728
|
-
const ptr0 = passStringToWasm0(
|
|
588
|
+
export function watcher_utxo(nostr_hex_sk, name, utxo) {
|
|
589
|
+
const ptr0 = passStringToWasm0(nostr_hex_sk, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
729
590
|
const len0 = WASM_VECTOR_LEN;
|
|
730
|
-
const
|
|
591
|
+
const ptr1 = passStringToWasm0(name, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
592
|
+
const len1 = WASM_VECTOR_LEN;
|
|
593
|
+
const ptr2 = passStringToWasm0(utxo, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
594
|
+
const len2 = WASM_VECTOR_LEN;
|
|
595
|
+
const ret = wasm.watcher_utxo(ptr0, len0, ptr1, len1, ptr2, len2);
|
|
731
596
|
return takeObject(ret);
|
|
732
597
|
}
|
|
733
598
|
|
|
734
599
|
/**
|
|
735
|
-
* @param {string}
|
|
736
|
-
* @param {string}
|
|
600
|
+
* @param {string} nostr_hex_sk
|
|
601
|
+
* @param {string} name
|
|
602
|
+
* @param {string} iface
|
|
737
603
|
* @returns {Promise<any>}
|
|
738
604
|
*/
|
|
739
|
-
export function
|
|
740
|
-
const ptr0 = passStringToWasm0(
|
|
605
|
+
export function watcher_next_address(nostr_hex_sk, name, iface) {
|
|
606
|
+
const ptr0 = passStringToWasm0(nostr_hex_sk, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
741
607
|
const len0 = WASM_VECTOR_LEN;
|
|
742
|
-
const ptr1 = passStringToWasm0(
|
|
608
|
+
const ptr1 = passStringToWasm0(name, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
743
609
|
const len1 = WASM_VECTOR_LEN;
|
|
744
|
-
const
|
|
610
|
+
const ptr2 = passStringToWasm0(iface, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
611
|
+
const len2 = WASM_VECTOR_LEN;
|
|
612
|
+
const ret = wasm.watcher_next_address(ptr0, len0, ptr1, len1, ptr2, len2);
|
|
745
613
|
return takeObject(ret);
|
|
746
614
|
}
|
|
747
615
|
|
|
748
616
|
/**
|
|
749
|
-
* @param {string}
|
|
617
|
+
* @param {string} nostr_hex_sk
|
|
618
|
+
* @param {string} name
|
|
619
|
+
* @param {string} iface
|
|
750
620
|
* @returns {Promise<any>}
|
|
751
621
|
*/
|
|
752
|
-
export function
|
|
753
|
-
const ptr0 = passStringToWasm0(
|
|
622
|
+
export function watcher_next_utxo(nostr_hex_sk, name, iface) {
|
|
623
|
+
const ptr0 = passStringToWasm0(nostr_hex_sk, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
754
624
|
const len0 = WASM_VECTOR_LEN;
|
|
755
|
-
const
|
|
625
|
+
const ptr1 = passStringToWasm0(name, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
626
|
+
const len1 = WASM_VECTOR_LEN;
|
|
627
|
+
const ptr2 = passStringToWasm0(iface, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
628
|
+
const len2 = WASM_VECTOR_LEN;
|
|
629
|
+
const ret = wasm.watcher_next_utxo(ptr0, len0, ptr1, len1, ptr2, len2);
|
|
756
630
|
return takeObject(ret);
|
|
757
631
|
}
|
|
758
632
|
|
|
759
633
|
/**
|
|
760
|
-
* @param {string}
|
|
761
|
-
* @param {string
|
|
634
|
+
* @param {string} nostr_hex_sk
|
|
635
|
+
* @param {string} name
|
|
636
|
+
* @param {string} iface
|
|
762
637
|
* @returns {Promise<any>}
|
|
763
638
|
*/
|
|
764
|
-
export function
|
|
765
|
-
const ptr0 = passStringToWasm0(
|
|
639
|
+
export function watcher_unspent_utxos(nostr_hex_sk, name, iface) {
|
|
640
|
+
const ptr0 = passStringToWasm0(nostr_hex_sk, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
766
641
|
const len0 = WASM_VECTOR_LEN;
|
|
767
|
-
|
|
768
|
-
|
|
769
|
-
const
|
|
642
|
+
const ptr1 = passStringToWasm0(name, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
643
|
+
const len1 = WASM_VECTOR_LEN;
|
|
644
|
+
const ptr2 = passStringToWasm0(iface, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
645
|
+
const len2 = WASM_VECTOR_LEN;
|
|
646
|
+
const ret = wasm.watcher_unspent_utxos(ptr0, len0, ptr1, len1, ptr2, len2);
|
|
770
647
|
return takeObject(ret);
|
|
771
648
|
}
|
|
772
649
|
|
|
773
650
|
/**
|
|
774
|
-
* @param {string}
|
|
775
|
-
* @param {
|
|
776
|
-
* @param {string} token
|
|
651
|
+
* @param {string} nostr_hex_sk
|
|
652
|
+
* @param {string} contract_id
|
|
777
653
|
* @returns {Promise<any>}
|
|
778
654
|
*/
|
|
779
|
-
export function
|
|
780
|
-
const ptr0 = passStringToWasm0(
|
|
655
|
+
export function list_transfers(nostr_hex_sk, contract_id) {
|
|
656
|
+
const ptr0 = passStringToWasm0(nostr_hex_sk, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
781
657
|
const len0 = WASM_VECTOR_LEN;
|
|
782
|
-
const ptr1 = passStringToWasm0(
|
|
658
|
+
const ptr1 = passStringToWasm0(contract_id, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
783
659
|
const len1 = WASM_VECTOR_LEN;
|
|
784
|
-
const ret = wasm.
|
|
660
|
+
const ret = wasm.list_transfers(ptr0, len0, ptr1, len1);
|
|
785
661
|
return takeObject(ret);
|
|
786
662
|
}
|
|
787
663
|
|
|
@@ -790,10 +666,10 @@ export function swap_ln_btc(address, amount, token) {
|
|
|
790
666
|
* @param {any} request
|
|
791
667
|
* @returns {Promise<any>}
|
|
792
668
|
*/
|
|
793
|
-
export function
|
|
669
|
+
export function save_transfer(nostr_hex_sk, request) {
|
|
794
670
|
const ptr0 = passStringToWasm0(nostr_hex_sk, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
795
671
|
const len0 = WASM_VECTOR_LEN;
|
|
796
|
-
const ret = wasm.
|
|
672
|
+
const ret = wasm.save_transfer(ptr0, len0, addHeapObject(request));
|
|
797
673
|
return takeObject(ret);
|
|
798
674
|
}
|
|
799
675
|
|
|
@@ -802,22 +678,21 @@ export function issue_contract(nostr_hex_sk, request) {
|
|
|
802
678
|
* @param {any} request
|
|
803
679
|
* @returns {Promise<any>}
|
|
804
680
|
*/
|
|
805
|
-
export function
|
|
681
|
+
export function remove_transfer(nostr_hex_sk, request) {
|
|
806
682
|
const ptr0 = passStringToWasm0(nostr_hex_sk, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
807
683
|
const len0 = WASM_VECTOR_LEN;
|
|
808
|
-
const ret = wasm.
|
|
684
|
+
const ret = wasm.remove_transfer(ptr0, len0, addHeapObject(request));
|
|
809
685
|
return takeObject(ret);
|
|
810
686
|
}
|
|
811
687
|
|
|
812
688
|
/**
|
|
813
|
-
* @param {string}
|
|
814
|
-
* @param {any} request
|
|
689
|
+
* @param {string} invoice
|
|
815
690
|
* @returns {Promise<any>}
|
|
816
691
|
*/
|
|
817
|
-
export function
|
|
818
|
-
const ptr0 = passStringToWasm0(
|
|
692
|
+
export function decode_invoice(invoice) {
|
|
693
|
+
const ptr0 = passStringToWasm0(invoice, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
819
694
|
const len0 = WASM_VECTOR_LEN;
|
|
820
|
-
const ret = wasm.
|
|
695
|
+
const ret = wasm.decode_invoice(ptr0, len0);
|
|
821
696
|
return takeObject(ret);
|
|
822
697
|
}
|
|
823
698
|
|
|
@@ -826,82 +701,79 @@ export function rgb_create_invoice(nostr_hex_sk, request) {
|
|
|
826
701
|
* @param {any} request
|
|
827
702
|
* @returns {Promise<any>}
|
|
828
703
|
*/
|
|
829
|
-
export function
|
|
704
|
+
export function create_offer(nostr_hex_sk, request) {
|
|
830
705
|
const ptr0 = passStringToWasm0(nostr_hex_sk, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
831
706
|
const len0 = WASM_VECTOR_LEN;
|
|
832
|
-
const ret = wasm.
|
|
707
|
+
const ret = wasm.create_offer(ptr0, len0, addHeapObject(request));
|
|
833
708
|
return takeObject(ret);
|
|
834
709
|
}
|
|
835
710
|
|
|
836
711
|
/**
|
|
837
|
-
* @param {string}
|
|
712
|
+
* @param {string} nostr_hex_sk
|
|
838
713
|
* @param {any} request
|
|
839
714
|
* @returns {Promise<any>}
|
|
840
715
|
*/
|
|
841
|
-
export function
|
|
842
|
-
const ptr0 = passStringToWasm0(
|
|
716
|
+
export function create_bid(nostr_hex_sk, request) {
|
|
717
|
+
const ptr0 = passStringToWasm0(nostr_hex_sk, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
843
718
|
const len0 = WASM_VECTOR_LEN;
|
|
844
|
-
const ret = wasm.
|
|
719
|
+
const ret = wasm.create_bid(ptr0, len0, addHeapObject(request));
|
|
845
720
|
return takeObject(ret);
|
|
846
721
|
}
|
|
847
722
|
|
|
848
723
|
/**
|
|
849
|
-
* @param {string}
|
|
724
|
+
* @param {string} nostr_hex_sk
|
|
850
725
|
* @param {any} request
|
|
851
726
|
* @returns {Promise<any>}
|
|
852
727
|
*/
|
|
853
|
-
export function
|
|
854
|
-
const ptr0 = passStringToWasm0(
|
|
728
|
+
export function create_swap(nostr_hex_sk, request) {
|
|
729
|
+
const ptr0 = passStringToWasm0(nostr_hex_sk, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
855
730
|
const len0 = WASM_VECTOR_LEN;
|
|
856
|
-
const ret = wasm.
|
|
731
|
+
const ret = wasm.create_swap(ptr0, len0, addHeapObject(request));
|
|
857
732
|
return takeObject(ret);
|
|
858
733
|
}
|
|
859
734
|
|
|
860
735
|
/**
|
|
861
|
-
* @param {string}
|
|
736
|
+
* @param {string} nostr_hex_sk
|
|
862
737
|
* @param {any} request
|
|
863
738
|
* @returns {Promise<any>}
|
|
864
739
|
*/
|
|
865
|
-
export function
|
|
866
|
-
const ptr0 = passStringToWasm0(
|
|
740
|
+
export function direct_swap(nostr_hex_sk, request) {
|
|
741
|
+
const ptr0 = passStringToWasm0(nostr_hex_sk, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
867
742
|
const len0 = WASM_VECTOR_LEN;
|
|
868
|
-
const ret = wasm.
|
|
743
|
+
const ret = wasm.direct_swap(ptr0, len0, addHeapObject(request));
|
|
869
744
|
return takeObject(ret);
|
|
870
745
|
}
|
|
871
746
|
|
|
872
747
|
/**
|
|
873
748
|
* @param {string} nostr_hex_sk
|
|
874
|
-
* @param {any} request
|
|
875
749
|
* @returns {Promise<any>}
|
|
876
750
|
*/
|
|
877
|
-
export function
|
|
751
|
+
export function public_offers(nostr_hex_sk) {
|
|
878
752
|
const ptr0 = passStringToWasm0(nostr_hex_sk, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
879
753
|
const len0 = WASM_VECTOR_LEN;
|
|
880
|
-
const ret = wasm.
|
|
754
|
+
const ret = wasm.public_offers(ptr0, len0);
|
|
881
755
|
return takeObject(ret);
|
|
882
756
|
}
|
|
883
757
|
|
|
884
758
|
/**
|
|
885
759
|
* @param {string} nostr_hex_sk
|
|
886
|
-
* @param {any} request
|
|
887
760
|
* @returns {Promise<any>}
|
|
888
761
|
*/
|
|
889
|
-
export function
|
|
762
|
+
export function my_orders(nostr_hex_sk) {
|
|
890
763
|
const ptr0 = passStringToWasm0(nostr_hex_sk, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
891
764
|
const len0 = WASM_VECTOR_LEN;
|
|
892
|
-
const ret = wasm.
|
|
765
|
+
const ret = wasm.my_orders(ptr0, len0);
|
|
893
766
|
return takeObject(ret);
|
|
894
767
|
}
|
|
895
768
|
|
|
896
769
|
/**
|
|
897
770
|
* @param {string} nostr_hex_sk
|
|
898
|
-
* @param {any} request
|
|
899
771
|
* @returns {Promise<any>}
|
|
900
772
|
*/
|
|
901
|
-
export function
|
|
773
|
+
export function my_offers(nostr_hex_sk) {
|
|
902
774
|
const ptr0 = passStringToWasm0(nostr_hex_sk, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
903
775
|
const len0 = WASM_VECTOR_LEN;
|
|
904
|
-
const ret = wasm.
|
|
776
|
+
const ret = wasm.my_offers(ptr0, len0);
|
|
905
777
|
return takeObject(ret);
|
|
906
778
|
}
|
|
907
779
|
|
|
@@ -909,401 +781,529 @@ export function accept_transfer(nostr_hex_sk, request) {
|
|
|
909
781
|
* @param {string} nostr_hex_sk
|
|
910
782
|
* @returns {Promise<any>}
|
|
911
783
|
*/
|
|
912
|
-
export function
|
|
784
|
+
export function my_bids(nostr_hex_sk) {
|
|
913
785
|
const ptr0 = passStringToWasm0(nostr_hex_sk, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
914
786
|
const len0 = WASM_VECTOR_LEN;
|
|
915
|
-
const ret = wasm.
|
|
787
|
+
const ret = wasm.my_bids(ptr0, len0);
|
|
788
|
+
return takeObject(ret);
|
|
789
|
+
}
|
|
790
|
+
|
|
791
|
+
/**
|
|
792
|
+
* @param {any} request
|
|
793
|
+
* @returns {Promise<any>}
|
|
794
|
+
*/
|
|
795
|
+
export function import_consignments(request) {
|
|
796
|
+
const ret = wasm.import_consignments(addHeapObject(request));
|
|
797
|
+
return takeObject(ret);
|
|
798
|
+
}
|
|
799
|
+
|
|
800
|
+
/**
|
|
801
|
+
* @param {string} consig_or_receipt_id
|
|
802
|
+
* @returns {Promise<any>}
|
|
803
|
+
*/
|
|
804
|
+
export function get_consignment(consig_or_receipt_id) {
|
|
805
|
+
const ptr0 = passStringToWasm0(consig_or_receipt_id, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
806
|
+
const len0 = WASM_VECTOR_LEN;
|
|
807
|
+
const ret = wasm.get_consignment(ptr0, len0);
|
|
916
808
|
return takeObject(ret);
|
|
917
809
|
}
|
|
918
810
|
|
|
919
811
|
/**
|
|
920
|
-
* @param {string}
|
|
921
|
-
* @param {string} contract_id
|
|
812
|
+
* @param {string} media_id
|
|
922
813
|
* @returns {Promise<any>}
|
|
923
814
|
*/
|
|
924
|
-
export function
|
|
925
|
-
const ptr0 = passStringToWasm0(
|
|
815
|
+
export function get_media_metadata(media_id) {
|
|
816
|
+
const ptr0 = passStringToWasm0(media_id, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
926
817
|
const len0 = WASM_VECTOR_LEN;
|
|
927
|
-
const
|
|
928
|
-
const len1 = WASM_VECTOR_LEN;
|
|
929
|
-
const ret = wasm.get_contract(ptr0, len0, ptr1, len1);
|
|
818
|
+
const ret = wasm.get_media_metadata(ptr0, len0);
|
|
930
819
|
return takeObject(ret);
|
|
931
820
|
}
|
|
932
821
|
|
|
933
822
|
/**
|
|
934
|
-
* @param {
|
|
935
|
-
* @param {string} contract_id
|
|
823
|
+
* @param {any} request
|
|
936
824
|
* @returns {Promise<any>}
|
|
937
825
|
*/
|
|
938
|
-
export function
|
|
939
|
-
const
|
|
940
|
-
const len0 = WASM_VECTOR_LEN;
|
|
941
|
-
const ptr1 = passStringToWasm0(contract_id, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
942
|
-
const len1 = WASM_VECTOR_LEN;
|
|
943
|
-
const ret = wasm.hidden_contract(ptr0, len0, ptr1, len1);
|
|
826
|
+
export function import_uda_data(request) {
|
|
827
|
+
const ret = wasm.import_uda_data(addHeapObject(request));
|
|
944
828
|
return takeObject(ret);
|
|
945
829
|
}
|
|
946
830
|
|
|
947
831
|
/**
|
|
948
|
-
* @param {string}
|
|
949
|
-
* @returns {
|
|
832
|
+
* @param {string} password
|
|
833
|
+
* @returns {string}
|
|
950
834
|
*/
|
|
951
|
-
export function
|
|
952
|
-
|
|
953
|
-
|
|
954
|
-
|
|
955
|
-
|
|
835
|
+
export function hash_password(password) {
|
|
836
|
+
let deferred2_0;
|
|
837
|
+
let deferred2_1;
|
|
838
|
+
try {
|
|
839
|
+
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
840
|
+
const ptr0 = passStringToWasm0(password, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
841
|
+
const len0 = WASM_VECTOR_LEN;
|
|
842
|
+
wasm.hash_password(retptr, ptr0, len0);
|
|
843
|
+
var r0 = getInt32Memory0()[retptr / 4 + 0];
|
|
844
|
+
var r1 = getInt32Memory0()[retptr / 4 + 1];
|
|
845
|
+
deferred2_0 = r0;
|
|
846
|
+
deferred2_1 = r1;
|
|
847
|
+
return getStringFromWasm0(r0, r1);
|
|
848
|
+
} finally {
|
|
849
|
+
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
850
|
+
wasm.__wbindgen_free(deferred2_0, deferred2_1, 1);
|
|
851
|
+
}
|
|
956
852
|
}
|
|
957
853
|
|
|
958
854
|
/**
|
|
959
|
-
* @param {string}
|
|
855
|
+
* @param {string} password
|
|
960
856
|
* @returns {Promise<any>}
|
|
961
857
|
*/
|
|
962
|
-
export function
|
|
963
|
-
const ptr0 = passStringToWasm0(
|
|
858
|
+
export function new_mnemonic(password) {
|
|
859
|
+
const ptr0 = passStringToWasm0(password, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
964
860
|
const len0 = WASM_VECTOR_LEN;
|
|
965
|
-
const ret = wasm.
|
|
861
|
+
const ret = wasm.new_mnemonic(ptr0, len0);
|
|
966
862
|
return takeObject(ret);
|
|
967
863
|
}
|
|
968
864
|
|
|
969
865
|
/**
|
|
970
|
-
* @param {string}
|
|
866
|
+
* @param {string} hash
|
|
867
|
+
* @param {string} encrypted_descriptors
|
|
971
868
|
* @returns {Promise<any>}
|
|
972
869
|
*/
|
|
973
|
-
export function
|
|
974
|
-
const ptr0 = passStringToWasm0(
|
|
870
|
+
export function decrypt_wallet(hash, encrypted_descriptors) {
|
|
871
|
+
const ptr0 = passStringToWasm0(hash, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
975
872
|
const len0 = WASM_VECTOR_LEN;
|
|
976
|
-
const
|
|
873
|
+
const ptr1 = passStringToWasm0(encrypted_descriptors, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
874
|
+
const len1 = WASM_VECTOR_LEN;
|
|
875
|
+
const ret = wasm.decrypt_wallet(ptr0, len0, ptr1, len1);
|
|
977
876
|
return takeObject(ret);
|
|
978
877
|
}
|
|
979
878
|
|
|
980
879
|
/**
|
|
981
|
-
* @param {string}
|
|
880
|
+
* @param {string} hash
|
|
881
|
+
* @param {string} encrypted_descriptors
|
|
882
|
+
* @param {string} seed_password
|
|
982
883
|
* @returns {Promise<any>}
|
|
983
884
|
*/
|
|
984
|
-
export function
|
|
985
|
-
const ptr0 = passStringToWasm0(
|
|
885
|
+
export function upgrade_wallet(hash, encrypted_descriptors, seed_password) {
|
|
886
|
+
const ptr0 = passStringToWasm0(hash, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
986
887
|
const len0 = WASM_VECTOR_LEN;
|
|
987
|
-
const
|
|
888
|
+
const ptr1 = passStringToWasm0(encrypted_descriptors, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
889
|
+
const len1 = WASM_VECTOR_LEN;
|
|
890
|
+
const ptr2 = passStringToWasm0(seed_password, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
891
|
+
const len2 = WASM_VECTOR_LEN;
|
|
892
|
+
const ret = wasm.upgrade_wallet(ptr0, len0, ptr1, len1, ptr2, len2);
|
|
988
893
|
return takeObject(ret);
|
|
989
894
|
}
|
|
990
895
|
|
|
991
896
|
/**
|
|
992
|
-
* @param {string}
|
|
993
|
-
* @param {
|
|
897
|
+
* @param {string} hash
|
|
898
|
+
* @param {string} seed_password
|
|
994
899
|
* @returns {Promise<any>}
|
|
995
900
|
*/
|
|
996
|
-
export function
|
|
997
|
-
const ptr0 = passStringToWasm0(
|
|
901
|
+
export function new_wallet(hash, seed_password) {
|
|
902
|
+
const ptr0 = passStringToWasm0(hash, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
998
903
|
const len0 = WASM_VECTOR_LEN;
|
|
999
|
-
const
|
|
904
|
+
const ptr1 = passStringToWasm0(seed_password, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
905
|
+
const len1 = WASM_VECTOR_LEN;
|
|
906
|
+
const ret = wasm.new_wallet(ptr0, len0, ptr1, len1);
|
|
1000
907
|
return takeObject(ret);
|
|
1001
908
|
}
|
|
1002
909
|
|
|
1003
910
|
/**
|
|
1004
|
-
* @param {string}
|
|
1005
|
-
* @param {
|
|
911
|
+
* @param {string} mnemonic
|
|
912
|
+
* @param {string} hash
|
|
913
|
+
* @param {string} seed_password
|
|
1006
914
|
* @returns {Promise<any>}
|
|
1007
915
|
*/
|
|
1008
|
-
export function
|
|
1009
|
-
const ptr0 = passStringToWasm0(
|
|
916
|
+
export function encrypt_wallet(mnemonic, hash, seed_password) {
|
|
917
|
+
const ptr0 = passStringToWasm0(mnemonic, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
1010
918
|
const len0 = WASM_VECTOR_LEN;
|
|
1011
|
-
const
|
|
919
|
+
const ptr1 = passStringToWasm0(hash, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
920
|
+
const len1 = WASM_VECTOR_LEN;
|
|
921
|
+
const ptr2 = passStringToWasm0(seed_password, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
922
|
+
const len2 = WASM_VECTOR_LEN;
|
|
923
|
+
const ret = wasm.encrypt_wallet(ptr0, len0, ptr1, len1, ptr2, len2);
|
|
1012
924
|
return takeObject(ret);
|
|
1013
925
|
}
|
|
1014
926
|
|
|
1015
927
|
/**
|
|
1016
|
-
* @param {string}
|
|
1017
|
-
* @param {string}
|
|
928
|
+
* @param {string} descriptor
|
|
929
|
+
* @param {string | undefined} change_descriptor
|
|
1018
930
|
* @returns {Promise<any>}
|
|
1019
931
|
*/
|
|
1020
|
-
export function
|
|
1021
|
-
const ptr0 = passStringToWasm0(
|
|
932
|
+
export function get_wallet_data(descriptor, change_descriptor) {
|
|
933
|
+
const ptr0 = passStringToWasm0(descriptor, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
1022
934
|
const len0 = WASM_VECTOR_LEN;
|
|
1023
|
-
|
|
1024
|
-
|
|
1025
|
-
const ret = wasm.
|
|
935
|
+
var ptr1 = isLikeNone(change_descriptor) ? 0 : passStringToWasm0(change_descriptor, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
936
|
+
var len1 = WASM_VECTOR_LEN;
|
|
937
|
+
const ret = wasm.get_wallet_data(ptr0, len0, ptr1, len1);
|
|
1026
938
|
return takeObject(ret);
|
|
1027
939
|
}
|
|
1028
940
|
|
|
1029
941
|
/**
|
|
1030
|
-
* @param {string} nostr_hex_sk
|
|
1031
|
-
* @param {string} name
|
|
1032
942
|
* @returns {Promise<any>}
|
|
1033
943
|
*/
|
|
1034
|
-
export function
|
|
1035
|
-
const
|
|
1036
|
-
const len0 = WASM_VECTOR_LEN;
|
|
1037
|
-
const ptr1 = passStringToWasm0(name, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
1038
|
-
const len1 = WASM_VECTOR_LEN;
|
|
1039
|
-
const ret = wasm.clear_watcher(ptr0, len0, ptr1, len1);
|
|
944
|
+
export function sync_wallets() {
|
|
945
|
+
const ret = wasm.sync_wallets();
|
|
1040
946
|
return takeObject(ret);
|
|
1041
947
|
}
|
|
1042
948
|
|
|
1043
949
|
/**
|
|
1044
|
-
* @param {string}
|
|
1045
|
-
* @param {string}
|
|
1046
|
-
* @param {string} address
|
|
950
|
+
* @param {string} descriptor
|
|
951
|
+
* @param {string | undefined} change_descriptor
|
|
1047
952
|
* @returns {Promise<any>}
|
|
1048
953
|
*/
|
|
1049
|
-
export function
|
|
1050
|
-
const ptr0 = passStringToWasm0(
|
|
954
|
+
export function get_new_address(descriptor, change_descriptor) {
|
|
955
|
+
const ptr0 = passStringToWasm0(descriptor, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
1051
956
|
const len0 = WASM_VECTOR_LEN;
|
|
1052
|
-
|
|
1053
|
-
|
|
1054
|
-
const
|
|
1055
|
-
const len2 = WASM_VECTOR_LEN;
|
|
1056
|
-
const ret = wasm.watcher_address(ptr0, len0, ptr1, len1, ptr2, len2);
|
|
957
|
+
var ptr1 = isLikeNone(change_descriptor) ? 0 : passStringToWasm0(change_descriptor, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
958
|
+
var len1 = WASM_VECTOR_LEN;
|
|
959
|
+
const ret = wasm.get_new_address(ptr0, len0, ptr1, len1);
|
|
1057
960
|
return takeObject(ret);
|
|
1058
961
|
}
|
|
1059
962
|
|
|
1060
963
|
/**
|
|
1061
|
-
* @param {string}
|
|
1062
|
-
* @param {string}
|
|
1063
|
-
* @param {string}
|
|
964
|
+
* @param {string} descriptor
|
|
965
|
+
* @param {string} change_descriptor
|
|
966
|
+
* @param {string} destination
|
|
967
|
+
* @param {bigint} amount
|
|
968
|
+
* @param {number | undefined} fee_rate
|
|
1064
969
|
* @returns {Promise<any>}
|
|
1065
970
|
*/
|
|
1066
|
-
export function
|
|
1067
|
-
const ptr0 = passStringToWasm0(
|
|
971
|
+
export function send_sats(descriptor, change_descriptor, destination, amount, fee_rate) {
|
|
972
|
+
const ptr0 = passStringToWasm0(descriptor, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
1068
973
|
const len0 = WASM_VECTOR_LEN;
|
|
1069
|
-
const ptr1 = passStringToWasm0(
|
|
974
|
+
const ptr1 = passStringToWasm0(change_descriptor, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
1070
975
|
const len1 = WASM_VECTOR_LEN;
|
|
1071
|
-
const ptr2 = passStringToWasm0(
|
|
976
|
+
const ptr2 = passStringToWasm0(destination, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
1072
977
|
const len2 = WASM_VECTOR_LEN;
|
|
1073
|
-
const ret = wasm.
|
|
978
|
+
const ret = wasm.send_sats(ptr0, len0, ptr1, len1, ptr2, len2, amount, !isLikeNone(fee_rate), isLikeNone(fee_rate) ? 0 : fee_rate);
|
|
1074
979
|
return takeObject(ret);
|
|
1075
980
|
}
|
|
1076
981
|
|
|
1077
982
|
/**
|
|
1078
|
-
* @param {string}
|
|
1079
|
-
* @param {string}
|
|
1080
|
-
* @param {string}
|
|
983
|
+
* @param {string} destination
|
|
984
|
+
* @param {string} descriptor
|
|
985
|
+
* @param {string | undefined} change_descriptor
|
|
986
|
+
* @param {number | undefined} fee_rate
|
|
1081
987
|
* @returns {Promise<any>}
|
|
1082
988
|
*/
|
|
1083
|
-
export function
|
|
1084
|
-
const ptr0 = passStringToWasm0(
|
|
989
|
+
export function drain_wallet(destination, descriptor, change_descriptor, fee_rate) {
|
|
990
|
+
const ptr0 = passStringToWasm0(destination, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
1085
991
|
const len0 = WASM_VECTOR_LEN;
|
|
1086
|
-
const ptr1 = passStringToWasm0(
|
|
992
|
+
const ptr1 = passStringToWasm0(descriptor, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
1087
993
|
const len1 = WASM_VECTOR_LEN;
|
|
1088
|
-
|
|
1089
|
-
|
|
1090
|
-
const ret = wasm.
|
|
994
|
+
var ptr2 = isLikeNone(change_descriptor) ? 0 : passStringToWasm0(change_descriptor, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
995
|
+
var len2 = WASM_VECTOR_LEN;
|
|
996
|
+
const ret = wasm.drain_wallet(ptr0, len0, ptr1, len1, ptr2, len2, !isLikeNone(fee_rate), isLikeNone(fee_rate) ? 0 : fee_rate);
|
|
1091
997
|
return takeObject(ret);
|
|
1092
998
|
}
|
|
1093
999
|
|
|
1094
1000
|
/**
|
|
1095
|
-
* @param {string}
|
|
1096
|
-
* @param {string}
|
|
1097
|
-
* @param {string}
|
|
1001
|
+
* @param {string} descriptor
|
|
1002
|
+
* @param {string} change_descriptor
|
|
1003
|
+
* @param {string} asset_address_1
|
|
1004
|
+
* @param {string} uda_address_1
|
|
1005
|
+
* @param {number | undefined} fee_rate
|
|
1098
1006
|
* @returns {Promise<any>}
|
|
1099
1007
|
*/
|
|
1100
|
-
export function
|
|
1101
|
-
const ptr0 = passStringToWasm0(
|
|
1008
|
+
export function fund_vault(descriptor, change_descriptor, asset_address_1, uda_address_1, fee_rate) {
|
|
1009
|
+
const ptr0 = passStringToWasm0(descriptor, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
1102
1010
|
const len0 = WASM_VECTOR_LEN;
|
|
1103
|
-
const ptr1 = passStringToWasm0(
|
|
1011
|
+
const ptr1 = passStringToWasm0(change_descriptor, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
1104
1012
|
const len1 = WASM_VECTOR_LEN;
|
|
1105
|
-
const ptr2 = passStringToWasm0(
|
|
1013
|
+
const ptr2 = passStringToWasm0(asset_address_1, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
1106
1014
|
const len2 = WASM_VECTOR_LEN;
|
|
1107
|
-
const
|
|
1015
|
+
const ptr3 = passStringToWasm0(uda_address_1, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
1016
|
+
const len3 = WASM_VECTOR_LEN;
|
|
1017
|
+
const ret = wasm.fund_vault(ptr0, len0, ptr1, len1, ptr2, len2, ptr3, len3, !isLikeNone(fee_rate), isLikeNone(fee_rate) ? 0 : fee_rate);
|
|
1108
1018
|
return takeObject(ret);
|
|
1109
1019
|
}
|
|
1110
1020
|
|
|
1111
1021
|
/**
|
|
1112
|
-
* @param {string}
|
|
1113
|
-
* @param {string}
|
|
1114
|
-
* @param {string} iface
|
|
1022
|
+
* @param {string} rgb_assets_descriptor_xpub
|
|
1023
|
+
* @param {string} rgb_udas_descriptor_xpub
|
|
1115
1024
|
* @returns {Promise<any>}
|
|
1116
1025
|
*/
|
|
1117
|
-
export function
|
|
1118
|
-
const ptr0 = passStringToWasm0(
|
|
1026
|
+
export function get_assets_vault(rgb_assets_descriptor_xpub, rgb_udas_descriptor_xpub) {
|
|
1027
|
+
const ptr0 = passStringToWasm0(rgb_assets_descriptor_xpub, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
1119
1028
|
const len0 = WASM_VECTOR_LEN;
|
|
1120
|
-
const ptr1 = passStringToWasm0(
|
|
1029
|
+
const ptr1 = passStringToWasm0(rgb_udas_descriptor_xpub, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
1121
1030
|
const len1 = WASM_VECTOR_LEN;
|
|
1122
|
-
const
|
|
1123
|
-
const len2 = WASM_VECTOR_LEN;
|
|
1124
|
-
const ret = wasm.watcher_unspent_utxos(ptr0, len0, ptr1, len1, ptr2, len2);
|
|
1031
|
+
const ret = wasm.get_assets_vault(ptr0, len0, ptr1, len1);
|
|
1125
1032
|
return takeObject(ret);
|
|
1126
1033
|
}
|
|
1127
1034
|
|
|
1128
1035
|
/**
|
|
1129
|
-
* @param {string}
|
|
1130
|
-
* @param {string}
|
|
1036
|
+
* @param {string} username
|
|
1037
|
+
* @param {string} password
|
|
1131
1038
|
* @returns {Promise<any>}
|
|
1132
1039
|
*/
|
|
1133
|
-
export function
|
|
1134
|
-
const ptr0 = passStringToWasm0(
|
|
1040
|
+
export function create_wallet(username, password) {
|
|
1041
|
+
const ptr0 = passStringToWasm0(username, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
1135
1042
|
const len0 = WASM_VECTOR_LEN;
|
|
1136
|
-
const ptr1 = passStringToWasm0(
|
|
1043
|
+
const ptr1 = passStringToWasm0(password, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
1137
1044
|
const len1 = WASM_VECTOR_LEN;
|
|
1138
|
-
const ret = wasm.
|
|
1045
|
+
const ret = wasm.create_wallet(ptr0, len0, ptr1, len1);
|
|
1139
1046
|
return takeObject(ret);
|
|
1140
1047
|
}
|
|
1141
1048
|
|
|
1142
1049
|
/**
|
|
1143
|
-
* @param {string}
|
|
1144
|
-
* @param {
|
|
1050
|
+
* @param {string} username
|
|
1051
|
+
* @param {string} password
|
|
1145
1052
|
* @returns {Promise<any>}
|
|
1146
1053
|
*/
|
|
1147
|
-
export function
|
|
1148
|
-
const ptr0 = passStringToWasm0(
|
|
1054
|
+
export function auth(username, password) {
|
|
1055
|
+
const ptr0 = passStringToWasm0(username, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
1149
1056
|
const len0 = WASM_VECTOR_LEN;
|
|
1150
|
-
const
|
|
1057
|
+
const ptr1 = passStringToWasm0(password, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
1058
|
+
const len1 = WASM_VECTOR_LEN;
|
|
1059
|
+
const ret = wasm.auth(ptr0, len0, ptr1, len1);
|
|
1151
1060
|
return takeObject(ret);
|
|
1152
1061
|
}
|
|
1153
1062
|
|
|
1154
1063
|
/**
|
|
1155
|
-
* @param {string}
|
|
1156
|
-
* @param {
|
|
1064
|
+
* @param {string} description
|
|
1065
|
+
* @param {number} amount
|
|
1066
|
+
* @param {string} token
|
|
1157
1067
|
* @returns {Promise<any>}
|
|
1158
1068
|
*/
|
|
1159
|
-
export function
|
|
1160
|
-
const ptr0 = passStringToWasm0(
|
|
1069
|
+
export function ln_create_invoice(description, amount, token) {
|
|
1070
|
+
const ptr0 = passStringToWasm0(description, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
1161
1071
|
const len0 = WASM_VECTOR_LEN;
|
|
1162
|
-
const
|
|
1072
|
+
const ptr1 = passStringToWasm0(token, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
1073
|
+
const len1 = WASM_VECTOR_LEN;
|
|
1074
|
+
const ret = wasm.ln_create_invoice(ptr0, len0, amount, ptr1, len1);
|
|
1163
1075
|
return takeObject(ret);
|
|
1164
1076
|
}
|
|
1165
1077
|
|
|
1166
1078
|
/**
|
|
1167
|
-
* @param {string}
|
|
1079
|
+
* @param {string} token
|
|
1168
1080
|
* @returns {Promise<any>}
|
|
1169
1081
|
*/
|
|
1170
|
-
export function
|
|
1171
|
-
const ptr0 = passStringToWasm0(
|
|
1082
|
+
export function get_balance(token) {
|
|
1083
|
+
const ptr0 = passStringToWasm0(token, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
1172
1084
|
const len0 = WASM_VECTOR_LEN;
|
|
1173
|
-
const ret = wasm.
|
|
1085
|
+
const ret = wasm.get_balance(ptr0, len0);
|
|
1174
1086
|
return takeObject(ret);
|
|
1175
1087
|
}
|
|
1176
1088
|
|
|
1177
1089
|
/**
|
|
1178
|
-
* @param {string}
|
|
1179
|
-
* @param {any} request
|
|
1090
|
+
* @param {string} token
|
|
1180
1091
|
* @returns {Promise<any>}
|
|
1181
1092
|
*/
|
|
1182
|
-
export function
|
|
1183
|
-
const ptr0 = passStringToWasm0(
|
|
1093
|
+
export function get_txs(token) {
|
|
1094
|
+
const ptr0 = passStringToWasm0(token, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
1184
1095
|
const len0 = WASM_VECTOR_LEN;
|
|
1185
|
-
const ret = wasm.
|
|
1096
|
+
const ret = wasm.get_txs(ptr0, len0);
|
|
1186
1097
|
return takeObject(ret);
|
|
1187
1098
|
}
|
|
1188
1099
|
|
|
1189
1100
|
/**
|
|
1190
|
-
* @param {string}
|
|
1191
|
-
* @param {
|
|
1101
|
+
* @param {string} payment_request
|
|
1102
|
+
* @param {string} token
|
|
1192
1103
|
* @returns {Promise<any>}
|
|
1193
1104
|
*/
|
|
1194
|
-
export function
|
|
1195
|
-
const ptr0 = passStringToWasm0(
|
|
1105
|
+
export function pay_invoice(payment_request, token) {
|
|
1106
|
+
const ptr0 = passStringToWasm0(payment_request, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
1196
1107
|
const len0 = WASM_VECTOR_LEN;
|
|
1197
|
-
const
|
|
1108
|
+
const ptr1 = passStringToWasm0(token, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
1109
|
+
const len1 = WASM_VECTOR_LEN;
|
|
1110
|
+
const ret = wasm.pay_invoice(ptr0, len0, ptr1, len1);
|
|
1198
1111
|
return takeObject(ret);
|
|
1199
1112
|
}
|
|
1200
1113
|
|
|
1201
1114
|
/**
|
|
1202
|
-
* @param {string}
|
|
1203
|
-
* @param {any} request
|
|
1115
|
+
* @param {string} payment_hash
|
|
1204
1116
|
* @returns {Promise<any>}
|
|
1205
1117
|
*/
|
|
1206
|
-
export function
|
|
1207
|
-
const ptr0 = passStringToWasm0(
|
|
1118
|
+
export function check_payment(payment_hash) {
|
|
1119
|
+
const ptr0 = passStringToWasm0(payment_hash, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
1208
1120
|
const len0 = WASM_VECTOR_LEN;
|
|
1209
|
-
const ret = wasm.
|
|
1121
|
+
const ret = wasm.check_payment(ptr0, len0);
|
|
1210
1122
|
return takeObject(ret);
|
|
1211
1123
|
}
|
|
1212
1124
|
|
|
1213
1125
|
/**
|
|
1214
|
-
* @param {string}
|
|
1215
|
-
* @param {
|
|
1126
|
+
* @param {string} token
|
|
1127
|
+
* @param {string | undefined} ln_address
|
|
1216
1128
|
* @returns {Promise<any>}
|
|
1217
1129
|
*/
|
|
1218
|
-
export function
|
|
1219
|
-
const ptr0 = passStringToWasm0(
|
|
1130
|
+
export function swap_btc_ln(token, ln_address) {
|
|
1131
|
+
const ptr0 = passStringToWasm0(token, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
1220
1132
|
const len0 = WASM_VECTOR_LEN;
|
|
1221
|
-
|
|
1133
|
+
var ptr1 = isLikeNone(ln_address) ? 0 : passStringToWasm0(ln_address, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
1134
|
+
var len1 = WASM_VECTOR_LEN;
|
|
1135
|
+
const ret = wasm.swap_btc_ln(ptr0, len0, ptr1, len1);
|
|
1222
1136
|
return takeObject(ret);
|
|
1223
1137
|
}
|
|
1224
1138
|
|
|
1225
1139
|
/**
|
|
1226
|
-
* @param {string}
|
|
1140
|
+
* @param {string} address
|
|
1141
|
+
* @param {bigint} amount
|
|
1142
|
+
* @param {string} token
|
|
1227
1143
|
* @returns {Promise<any>}
|
|
1228
1144
|
*/
|
|
1229
|
-
export function
|
|
1230
|
-
const ptr0 = passStringToWasm0(
|
|
1145
|
+
export function swap_ln_btc(address, amount, token) {
|
|
1146
|
+
const ptr0 = passStringToWasm0(address, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
1231
1147
|
const len0 = WASM_VECTOR_LEN;
|
|
1232
|
-
const
|
|
1148
|
+
const ptr1 = passStringToWasm0(token, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
1149
|
+
const len1 = WASM_VECTOR_LEN;
|
|
1150
|
+
const ret = wasm.swap_ln_btc(ptr0, len0, amount, ptr1, len1);
|
|
1233
1151
|
return takeObject(ret);
|
|
1234
1152
|
}
|
|
1235
1153
|
|
|
1154
|
+
function passArray8ToWasm0(arg, malloc) {
|
|
1155
|
+
const ptr = malloc(arg.length * 1, 1) >>> 0;
|
|
1156
|
+
getUint8Memory0().set(arg, ptr / 1);
|
|
1157
|
+
WASM_VECTOR_LEN = arg.length;
|
|
1158
|
+
return ptr;
|
|
1159
|
+
}
|
|
1236
1160
|
/**
|
|
1237
|
-
* @param {string}
|
|
1161
|
+
* @param {string} secret_key
|
|
1162
|
+
* @param {string} name
|
|
1163
|
+
* @param {Uint8Array} data
|
|
1164
|
+
* @param {boolean} force
|
|
1165
|
+
* @param {Uint8Array | undefined} metadata
|
|
1238
1166
|
* @returns {Promise<any>}
|
|
1239
1167
|
*/
|
|
1240
|
-
export function
|
|
1241
|
-
const ptr0 = passStringToWasm0(
|
|
1168
|
+
export function store(secret_key, name, data, force, metadata) {
|
|
1169
|
+
const ptr0 = passStringToWasm0(secret_key, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
1242
1170
|
const len0 = WASM_VECTOR_LEN;
|
|
1243
|
-
const
|
|
1171
|
+
const ptr1 = passStringToWasm0(name, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
1172
|
+
const len1 = WASM_VECTOR_LEN;
|
|
1173
|
+
const ptr2 = passArray8ToWasm0(data, wasm.__wbindgen_malloc);
|
|
1174
|
+
const len2 = WASM_VECTOR_LEN;
|
|
1175
|
+
var ptr3 = isLikeNone(metadata) ? 0 : passArray8ToWasm0(metadata, wasm.__wbindgen_malloc);
|
|
1176
|
+
var len3 = WASM_VECTOR_LEN;
|
|
1177
|
+
const ret = wasm.store(ptr0, len0, ptr1, len1, ptr2, len2, force, ptr3, len3);
|
|
1244
1178
|
return takeObject(ret);
|
|
1245
1179
|
}
|
|
1246
1180
|
|
|
1247
1181
|
/**
|
|
1248
|
-
* @param {string}
|
|
1182
|
+
* @param {string} secret_key
|
|
1183
|
+
* @param {string} name
|
|
1249
1184
|
* @returns {Promise<any>}
|
|
1250
1185
|
*/
|
|
1251
|
-
export function
|
|
1252
|
-
const ptr0 = passStringToWasm0(
|
|
1186
|
+
export function retrieve(secret_key, name) {
|
|
1187
|
+
const ptr0 = passStringToWasm0(secret_key, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
1253
1188
|
const len0 = WASM_VECTOR_LEN;
|
|
1254
|
-
const
|
|
1189
|
+
const ptr1 = passStringToWasm0(name, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
1190
|
+
const len1 = WASM_VECTOR_LEN;
|
|
1191
|
+
const ret = wasm.retrieve(ptr0, len0, ptr1, len1);
|
|
1255
1192
|
return takeObject(ret);
|
|
1256
1193
|
}
|
|
1257
1194
|
|
|
1258
1195
|
/**
|
|
1259
|
-
* @param {string}
|
|
1196
|
+
* @param {string} secret_key
|
|
1197
|
+
* @param {string} name
|
|
1260
1198
|
* @returns {Promise<any>}
|
|
1261
1199
|
*/
|
|
1262
|
-
export function
|
|
1263
|
-
const ptr0 = passStringToWasm0(
|
|
1200
|
+
export function retrieve_metadata(secret_key, name) {
|
|
1201
|
+
const ptr0 = passStringToWasm0(secret_key, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
1264
1202
|
const len0 = WASM_VECTOR_LEN;
|
|
1265
|
-
const
|
|
1203
|
+
const ptr1 = passStringToWasm0(name, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
1204
|
+
const len1 = WASM_VECTOR_LEN;
|
|
1205
|
+
const ret = wasm.retrieve_metadata(ptr0, len0, ptr1, len1);
|
|
1266
1206
|
return takeObject(ret);
|
|
1267
1207
|
}
|
|
1268
1208
|
|
|
1269
1209
|
/**
|
|
1270
|
-
* @param {
|
|
1271
|
-
* @returns {
|
|
1210
|
+
* @param {Uint8Array} bytes
|
|
1211
|
+
* @returns {string}
|
|
1272
1212
|
*/
|
|
1273
|
-
export function
|
|
1274
|
-
|
|
1275
|
-
|
|
1213
|
+
export function encode_hex(bytes) {
|
|
1214
|
+
let deferred2_0;
|
|
1215
|
+
let deferred2_1;
|
|
1216
|
+
try {
|
|
1217
|
+
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
1218
|
+
const ptr0 = passArray8ToWasm0(bytes, wasm.__wbindgen_malloc);
|
|
1219
|
+
const len0 = WASM_VECTOR_LEN;
|
|
1220
|
+
wasm.encode_hex(retptr, ptr0, len0);
|
|
1221
|
+
var r0 = getInt32Memory0()[retptr / 4 + 0];
|
|
1222
|
+
var r1 = getInt32Memory0()[retptr / 4 + 1];
|
|
1223
|
+
deferred2_0 = r0;
|
|
1224
|
+
deferred2_1 = r1;
|
|
1225
|
+
return getStringFromWasm0(r0, r1);
|
|
1226
|
+
} finally {
|
|
1227
|
+
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
1228
|
+
wasm.__wbindgen_free(deferred2_0, deferred2_1, 1);
|
|
1229
|
+
}
|
|
1276
1230
|
}
|
|
1277
1231
|
|
|
1278
1232
|
/**
|
|
1279
|
-
* @param {
|
|
1280
|
-
* @returns {
|
|
1233
|
+
* @param {Uint8Array} bytes
|
|
1234
|
+
* @returns {string}
|
|
1281
1235
|
*/
|
|
1282
|
-
export function
|
|
1283
|
-
|
|
1284
|
-
|
|
1285
|
-
|
|
1286
|
-
|
|
1236
|
+
export function encode_base64(bytes) {
|
|
1237
|
+
let deferred2_0;
|
|
1238
|
+
let deferred2_1;
|
|
1239
|
+
try {
|
|
1240
|
+
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
1241
|
+
const ptr0 = passArray8ToWasm0(bytes, wasm.__wbindgen_malloc);
|
|
1242
|
+
const len0 = WASM_VECTOR_LEN;
|
|
1243
|
+
wasm.encode_base64(retptr, ptr0, len0);
|
|
1244
|
+
var r0 = getInt32Memory0()[retptr / 4 + 0];
|
|
1245
|
+
var r1 = getInt32Memory0()[retptr / 4 + 1];
|
|
1246
|
+
deferred2_0 = r0;
|
|
1247
|
+
deferred2_1 = r1;
|
|
1248
|
+
return getStringFromWasm0(r0, r1);
|
|
1249
|
+
} finally {
|
|
1250
|
+
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
1251
|
+
wasm.__wbindgen_free(deferred2_0, deferred2_1, 1);
|
|
1252
|
+
}
|
|
1287
1253
|
}
|
|
1288
1254
|
|
|
1255
|
+
function getArrayU8FromWasm0(ptr, len) {
|
|
1256
|
+
ptr = ptr >>> 0;
|
|
1257
|
+
return getUint8Memory0().subarray(ptr / 1, ptr / 1 + len);
|
|
1258
|
+
}
|
|
1289
1259
|
/**
|
|
1290
|
-
* @param {string}
|
|
1291
|
-
* @returns {
|
|
1260
|
+
* @param {string} string
|
|
1261
|
+
* @returns {Uint8Array}
|
|
1292
1262
|
*/
|
|
1293
|
-
export function
|
|
1294
|
-
|
|
1295
|
-
|
|
1296
|
-
|
|
1297
|
-
|
|
1263
|
+
export function decode_hex(string) {
|
|
1264
|
+
try {
|
|
1265
|
+
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
1266
|
+
const ptr0 = passStringToWasm0(string, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
1267
|
+
const len0 = WASM_VECTOR_LEN;
|
|
1268
|
+
wasm.decode_hex(retptr, ptr0, len0);
|
|
1269
|
+
var r0 = getInt32Memory0()[retptr / 4 + 0];
|
|
1270
|
+
var r1 = getInt32Memory0()[retptr / 4 + 1];
|
|
1271
|
+
var r2 = getInt32Memory0()[retptr / 4 + 2];
|
|
1272
|
+
var r3 = getInt32Memory0()[retptr / 4 + 3];
|
|
1273
|
+
if (r3) {
|
|
1274
|
+
throw takeObject(r2);
|
|
1275
|
+
}
|
|
1276
|
+
var v2 = getArrayU8FromWasm0(r0, r1).slice();
|
|
1277
|
+
wasm.__wbindgen_free(r0, r1 * 1);
|
|
1278
|
+
return v2;
|
|
1279
|
+
} finally {
|
|
1280
|
+
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
1281
|
+
}
|
|
1298
1282
|
}
|
|
1299
1283
|
|
|
1300
1284
|
/**
|
|
1301
|
-
* @param {
|
|
1302
|
-
* @returns {
|
|
1285
|
+
* @param {string} string
|
|
1286
|
+
* @returns {Uint8Array}
|
|
1303
1287
|
*/
|
|
1304
|
-
export function
|
|
1305
|
-
|
|
1306
|
-
|
|
1288
|
+
export function decode_base64(string) {
|
|
1289
|
+
try {
|
|
1290
|
+
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
1291
|
+
const ptr0 = passStringToWasm0(string, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
1292
|
+
const len0 = WASM_VECTOR_LEN;
|
|
1293
|
+
wasm.decode_base64(retptr, ptr0, len0);
|
|
1294
|
+
var r0 = getInt32Memory0()[retptr / 4 + 0];
|
|
1295
|
+
var r1 = getInt32Memory0()[retptr / 4 + 1];
|
|
1296
|
+
var r2 = getInt32Memory0()[retptr / 4 + 2];
|
|
1297
|
+
var r3 = getInt32Memory0()[retptr / 4 + 3];
|
|
1298
|
+
if (r3) {
|
|
1299
|
+
throw takeObject(r2);
|
|
1300
|
+
}
|
|
1301
|
+
var v2 = getArrayU8FromWasm0(r0, r1).slice();
|
|
1302
|
+
wasm.__wbindgen_free(r0, r1 * 1);
|
|
1303
|
+
return v2;
|
|
1304
|
+
} finally {
|
|
1305
|
+
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
1306
|
+
}
|
|
1307
1307
|
}
|
|
1308
1308
|
|
|
1309
1309
|
let cachedUint32Memory0 = null;
|
|
@@ -1378,14 +1378,6 @@ function __wbg_get_imports() {
|
|
|
1378
1378
|
const ret = getStringFromWasm0(arg0, arg1);
|
|
1379
1379
|
return addHeapObject(ret);
|
|
1380
1380
|
};
|
|
1381
|
-
imports.wbg.__wbindgen_string_get = function(arg0, arg1) {
|
|
1382
|
-
const obj = getObject(arg1);
|
|
1383
|
-
const ret = typeof(obj) === 'string' ? obj : undefined;
|
|
1384
|
-
var ptr1 = isLikeNone(ret) ? 0 : passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
1385
|
-
var len1 = WASM_VECTOR_LEN;
|
|
1386
|
-
getInt32Memory0()[arg0 / 4 + 1] = len1;
|
|
1387
|
-
getInt32Memory0()[arg0 / 4 + 0] = ptr1;
|
|
1388
|
-
};
|
|
1389
1381
|
imports.wbg.__wbindgen_number_new = function(arg0) {
|
|
1390
1382
|
const ret = arg0;
|
|
1391
1383
|
return addHeapObject(ret);
|
|
@@ -1394,13 +1386,26 @@ function __wbg_get_imports() {
|
|
|
1394
1386
|
const ret = getObject(arg0);
|
|
1395
1387
|
return addHeapObject(ret);
|
|
1396
1388
|
};
|
|
1389
|
+
imports.wbg.__wbindgen_string_get = function(arg0, arg1) {
|
|
1390
|
+
const obj = getObject(arg1);
|
|
1391
|
+
const ret = typeof(obj) === 'string' ? obj : undefined;
|
|
1392
|
+
var ptr1 = isLikeNone(ret) ? 0 : passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
1393
|
+
var len1 = WASM_VECTOR_LEN;
|
|
1394
|
+
getInt32Memory0()[arg0 / 4 + 1] = len1;
|
|
1395
|
+
getInt32Memory0()[arg0 / 4 + 0] = ptr1;
|
|
1396
|
+
};
|
|
1397
1397
|
imports.wbg.__wbindgen_is_undefined = function(arg0) {
|
|
1398
1398
|
const ret = getObject(arg0) === undefined;
|
|
1399
1399
|
return ret;
|
|
1400
1400
|
};
|
|
1401
|
-
imports.wbg.
|
|
1402
|
-
const
|
|
1403
|
-
|
|
1401
|
+
imports.wbg.__wbindgen_cb_drop = function(arg0) {
|
|
1402
|
+
const obj = takeObject(arg0).original;
|
|
1403
|
+
if (obj.cnt-- == 1) {
|
|
1404
|
+
obj.a = 0;
|
|
1405
|
+
return true;
|
|
1406
|
+
}
|
|
1407
|
+
const ret = false;
|
|
1408
|
+
return ret;
|
|
1404
1409
|
};
|
|
1405
1410
|
imports.wbg.__wbindgen_is_bigint = function(arg0) {
|
|
1406
1411
|
const ret = typeof(getObject(arg0)) === 'bigint';
|
|
@@ -1442,14 +1447,9 @@ function __wbg_get_imports() {
|
|
|
1442
1447
|
const ret = BigInt.asUintN(64, arg0);
|
|
1443
1448
|
return addHeapObject(ret);
|
|
1444
1449
|
};
|
|
1445
|
-
imports.wbg.
|
|
1446
|
-
const
|
|
1447
|
-
|
|
1448
|
-
obj.a = 0;
|
|
1449
|
-
return true;
|
|
1450
|
-
}
|
|
1451
|
-
const ret = false;
|
|
1452
|
-
return ret;
|
|
1450
|
+
imports.wbg.__wbindgen_error_new = function(arg0, arg1) {
|
|
1451
|
+
const ret = new Error(getStringFromWasm0(arg0, arg1));
|
|
1452
|
+
return addHeapObject(ret);
|
|
1453
1453
|
};
|
|
1454
1454
|
imports.wbg.__wbg_new_abda76e883ba8a5f = function() {
|
|
1455
1455
|
const ret = new Error();
|
|
@@ -1926,7 +1926,7 @@ function __wbg_get_imports() {
|
|
|
1926
1926
|
const ret = wasm.memory;
|
|
1927
1927
|
return addHeapObject(ret);
|
|
1928
1928
|
};
|
|
1929
|
-
imports.wbg.
|
|
1929
|
+
imports.wbg.__wbindgen_closure_wrapper14360 = function(arg0, arg1, arg2) {
|
|
1930
1930
|
const ret = makeMutClosure(arg0, arg1, 3409, __wbg_adapter_48);
|
|
1931
1931
|
return addHeapObject(ret);
|
|
1932
1932
|
};
|