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