@bitgo/wasm-utxo 1.21.0 → 1.22.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -30,6 +30,21 @@ function dropObject(idx) {
30
30
  heap_next = idx;
31
31
  }
32
32
 
33
+ function getArrayJsValueFromWasm0(ptr, len) {
34
+ ptr = ptr >>> 0;
35
+ const mem = getDataViewMemory0();
36
+ const result = [];
37
+ for (let i = ptr; i < ptr + 4 * len; i += 4) {
38
+ result.push(takeObject(mem.getUint32(i, true)));
39
+ }
40
+ return result;
41
+ }
42
+
43
+ function getArrayU32FromWasm0(ptr, len) {
44
+ ptr = ptr >>> 0;
45
+ return getUint32ArrayMemory0().subarray(ptr / 4, ptr / 4 + len);
46
+ }
47
+
33
48
  function getArrayU8FromWasm0(ptr, len) {
34
49
  ptr = ptr >>> 0;
35
50
  return getUint8ArrayMemory0().subarray(ptr / 1, ptr / 1 + len);
@@ -48,6 +63,14 @@ function getStringFromWasm0(ptr, len) {
48
63
  return decodeText(ptr, len);
49
64
  }
50
65
 
66
+ let cachedUint32ArrayMemory0 = null;
67
+ function getUint32ArrayMemory0() {
68
+ if (cachedUint32ArrayMemory0 === null || cachedUint32ArrayMemory0.byteLength === 0) {
69
+ cachedUint32ArrayMemory0 = new Uint32Array(wasm.memory.buffer);
70
+ }
71
+ return cachedUint32ArrayMemory0;
72
+ }
73
+
51
74
  let cachedUint8ArrayMemory0 = null;
52
75
  function getUint8ArrayMemory0() {
53
76
  if (cachedUint8ArrayMemory0 === null || cachedUint8ArrayMemory0.byteLength === 0) {
@@ -170,6 +193,10 @@ const AddressNamespaceFinalization = (typeof FinalizationRegistry === 'undefined
170
193
  ? { register: () => {}, unregister: () => {} }
171
194
  : new FinalizationRegistry(ptr => wasm.__wbg_addressnamespace_free(ptr >>> 0, 1));
172
195
 
196
+ const Bip322NamespaceFinalization = (typeof FinalizationRegistry === 'undefined')
197
+ ? { register: () => {}, unregister: () => {} }
198
+ : new FinalizationRegistry(ptr => wasm.__wbg_bip322namespace_free(ptr >>> 0, 1));
199
+
173
200
  const BitGoPsbtFinalization = (typeof FinalizationRegistry === 'undefined')
174
201
  ? { register: () => {}, unregister: () => {} }
175
202
  : new FinalizationRegistry(ptr => wasm.__wbg_bitgopsbt_free(ptr >>> 0, 1));
@@ -303,6 +330,277 @@ export class AddressNamespace {
303
330
  }
304
331
  if (Symbol.dispose) AddressNamespace.prototype[Symbol.dispose] = AddressNamespace.prototype.free;
305
332
 
333
+ /**
334
+ * Namespace for BIP-0322 functions
335
+ */
336
+ export class Bip322Namespace {
337
+ __destroy_into_raw() {
338
+ const ptr = this.__wbg_ptr;
339
+ this.__wbg_ptr = 0;
340
+ Bip322NamespaceFinalization.unregister(this);
341
+ return ptr;
342
+ }
343
+ free() {
344
+ const ptr = this.__destroy_into_raw();
345
+ wasm.__wbg_bip322namespace_free(ptr, 0);
346
+ }
347
+ /**
348
+ * Add a BIP-0322 message input to an existing BitGoPsbt
349
+ *
350
+ * If this is the first input, also adds the OP_RETURN output.
351
+ * The PSBT must have version 0 per BIP-0322 specification.
352
+ *
353
+ * # Arguments
354
+ * * `psbt` - The BitGoPsbt to add the input to
355
+ * * `message` - The message to sign
356
+ * * `chain` - The wallet chain (e.g., 10 for external, 20 for internal)
357
+ * * `index` - The address index
358
+ * * `wallet_keys` - The wallet's root keys
359
+ * * `signer` - Optional signer key name for taproot (e.g., "user", "backup", "bitgo")
360
+ * * `cosigner` - Optional cosigner key name for taproot
361
+ * * `tag` - Optional custom tag for message hashing
362
+ *
363
+ * # Returns
364
+ * The index of the added input
365
+ * @param {BitGoPsbt} psbt
366
+ * @param {string} message
367
+ * @param {number} chain
368
+ * @param {number} index
369
+ * @param {WasmRootWalletKeys} wallet_keys
370
+ * @param {string | null} [signer]
371
+ * @param {string | null} [cosigner]
372
+ * @param {string | null} [tag]
373
+ * @returns {number}
374
+ */
375
+ static add_bip322_input(psbt, message, chain, index, wallet_keys, signer, cosigner, tag) {
376
+ try {
377
+ const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
378
+ _assertClass(psbt, BitGoPsbt);
379
+ const ptr0 = passStringToWasm0(message, wasm.__wbindgen_export, wasm.__wbindgen_export2);
380
+ const len0 = WASM_VECTOR_LEN;
381
+ _assertClass(wallet_keys, WasmRootWalletKeys);
382
+ var ptr1 = isLikeNone(signer) ? 0 : passStringToWasm0(signer, wasm.__wbindgen_export, wasm.__wbindgen_export2);
383
+ var len1 = WASM_VECTOR_LEN;
384
+ var ptr2 = isLikeNone(cosigner) ? 0 : passStringToWasm0(cosigner, wasm.__wbindgen_export, wasm.__wbindgen_export2);
385
+ var len2 = WASM_VECTOR_LEN;
386
+ var ptr3 = isLikeNone(tag) ? 0 : passStringToWasm0(tag, wasm.__wbindgen_export, wasm.__wbindgen_export2);
387
+ var len3 = WASM_VECTOR_LEN;
388
+ wasm.bip322namespace_add_bip322_input(retptr, psbt.__wbg_ptr, ptr0, len0, chain, index, wallet_keys.__wbg_ptr, ptr1, len1, ptr2, len2, ptr3, len3);
389
+ var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
390
+ var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
391
+ var r2 = getDataViewMemory0().getInt32(retptr + 4 * 2, true);
392
+ if (r2) {
393
+ throw takeObject(r1);
394
+ }
395
+ return r0 >>> 0;
396
+ } finally {
397
+ wasm.__wbindgen_add_to_stack_pointer(16);
398
+ }
399
+ }
400
+ /**
401
+ * Verify a single input of a BIP-0322 transaction proof
402
+ *
403
+ * # Arguments
404
+ * * `tx` - The signed transaction
405
+ * * `input_index` - The index of the input to verify
406
+ * * `message` - The message that was signed
407
+ * * `chain` - The wallet chain
408
+ * * `index` - The address index
409
+ * * `wallet_keys` - The wallet's root keys
410
+ * * `network` - Network name
411
+ * * `tag` - Optional custom tag for message hashing
412
+ *
413
+ * # Throws
414
+ * Throws an error if verification fails
415
+ * @param {WasmTransaction} tx
416
+ * @param {number} input_index
417
+ * @param {string} message
418
+ * @param {number} chain
419
+ * @param {number} index
420
+ * @param {WasmRootWalletKeys} wallet_keys
421
+ * @param {string} network
422
+ * @param {string | null} [tag]
423
+ */
424
+ static verify_bip322_tx_input(tx, input_index, message, chain, index, wallet_keys, network, tag) {
425
+ try {
426
+ const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
427
+ _assertClass(tx, WasmTransaction);
428
+ const ptr0 = passStringToWasm0(message, wasm.__wbindgen_export, wasm.__wbindgen_export2);
429
+ const len0 = WASM_VECTOR_LEN;
430
+ _assertClass(wallet_keys, WasmRootWalletKeys);
431
+ const ptr1 = passStringToWasm0(network, wasm.__wbindgen_export, wasm.__wbindgen_export2);
432
+ const len1 = WASM_VECTOR_LEN;
433
+ var ptr2 = isLikeNone(tag) ? 0 : passStringToWasm0(tag, wasm.__wbindgen_export, wasm.__wbindgen_export2);
434
+ var len2 = WASM_VECTOR_LEN;
435
+ wasm.bip322namespace_verify_bip322_tx_input(retptr, tx.__wbg_ptr, input_index, ptr0, len0, chain, index, wallet_keys.__wbg_ptr, ptr1, len1, ptr2, len2);
436
+ var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
437
+ var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
438
+ if (r1) {
439
+ throw takeObject(r0);
440
+ }
441
+ } finally {
442
+ wasm.__wbindgen_add_to_stack_pointer(16);
443
+ }
444
+ }
445
+ /**
446
+ * Verify a single input of a BIP-0322 PSBT proof
447
+ *
448
+ * # Arguments
449
+ * * `psbt` - The signed BitGoPsbt
450
+ * * `input_index` - The index of the input to verify
451
+ * * `message` - The message that was signed
452
+ * * `chain` - The wallet chain
453
+ * * `index` - The address index
454
+ * * `wallet_keys` - The wallet's root keys
455
+ * * `tag` - Optional custom tag for message hashing
456
+ *
457
+ * # Returns
458
+ * An array of signer names ("user", "backup", "bitgo") that have valid signatures
459
+ *
460
+ * # Throws
461
+ * Throws an error if verification fails or no valid signatures found
462
+ * @param {BitGoPsbt} psbt
463
+ * @param {number} input_index
464
+ * @param {string} message
465
+ * @param {number} chain
466
+ * @param {number} index
467
+ * @param {WasmRootWalletKeys} wallet_keys
468
+ * @param {string | null} [tag]
469
+ * @returns {string[]}
470
+ */
471
+ static verify_bip322_psbt_input(psbt, input_index, message, chain, index, wallet_keys, tag) {
472
+ try {
473
+ const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
474
+ _assertClass(psbt, BitGoPsbt);
475
+ const ptr0 = passStringToWasm0(message, wasm.__wbindgen_export, wasm.__wbindgen_export2);
476
+ const len0 = WASM_VECTOR_LEN;
477
+ _assertClass(wallet_keys, WasmRootWalletKeys);
478
+ var ptr1 = isLikeNone(tag) ? 0 : passStringToWasm0(tag, wasm.__wbindgen_export, wasm.__wbindgen_export2);
479
+ var len1 = WASM_VECTOR_LEN;
480
+ wasm.bip322namespace_verify_bip322_psbt_input(retptr, psbt.__wbg_ptr, input_index, ptr0, len0, chain, index, wallet_keys.__wbg_ptr, ptr1, len1);
481
+ var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
482
+ var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
483
+ var r2 = getDataViewMemory0().getInt32(retptr + 4 * 2, true);
484
+ var r3 = getDataViewMemory0().getInt32(retptr + 4 * 3, true);
485
+ if (r3) {
486
+ throw takeObject(r2);
487
+ }
488
+ var v3 = getArrayJsValueFromWasm0(r0, r1).slice();
489
+ wasm.__wbindgen_export4(r0, r1 * 4, 4);
490
+ return v3;
491
+ } finally {
492
+ wasm.__wbindgen_add_to_stack_pointer(16);
493
+ }
494
+ }
495
+ /**
496
+ * Verify a single input of a BIP-0322 transaction proof using pubkeys directly
497
+ *
498
+ * # Arguments
499
+ * * `tx` - The signed transaction
500
+ * * `input_index` - The index of the input to verify
501
+ * * `message` - The message that was signed
502
+ * * `pubkeys` - Array of 3 hex-encoded pubkeys [user, backup, bitgo]
503
+ * * `script_type` - One of: "p2sh", "p2shP2wsh", "p2wsh", "p2tr", "p2trMusig2"
504
+ * * `is_script_path` - For taproot types, whether script path was used
505
+ * * `tag` - Optional custom tag for message hashing
506
+ *
507
+ * # Returns
508
+ * An array of pubkey indices (0, 1, 2) that have valid signatures
509
+ *
510
+ * # Throws
511
+ * Throws an error if verification fails
512
+ * @param {WasmTransaction} tx
513
+ * @param {number} input_index
514
+ * @param {string} message
515
+ * @param {string[]} pubkeys
516
+ * @param {string} script_type
517
+ * @param {boolean | null} [is_script_path]
518
+ * @param {string | null} [tag]
519
+ * @returns {Uint32Array}
520
+ */
521
+ static verify_bip322_tx_input_with_pubkeys(tx, input_index, message, pubkeys, script_type, is_script_path, tag) {
522
+ try {
523
+ const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
524
+ _assertClass(tx, WasmTransaction);
525
+ const ptr0 = passStringToWasm0(message, wasm.__wbindgen_export, wasm.__wbindgen_export2);
526
+ const len0 = WASM_VECTOR_LEN;
527
+ const ptr1 = passArrayJsValueToWasm0(pubkeys, wasm.__wbindgen_export);
528
+ const len1 = WASM_VECTOR_LEN;
529
+ const ptr2 = passStringToWasm0(script_type, wasm.__wbindgen_export, wasm.__wbindgen_export2);
530
+ const len2 = WASM_VECTOR_LEN;
531
+ var ptr3 = isLikeNone(tag) ? 0 : passStringToWasm0(tag, wasm.__wbindgen_export, wasm.__wbindgen_export2);
532
+ var len3 = WASM_VECTOR_LEN;
533
+ wasm.bip322namespace_verify_bip322_tx_input_with_pubkeys(retptr, tx.__wbg_ptr, input_index, ptr0, len0, ptr1, len1, ptr2, len2, isLikeNone(is_script_path) ? 0xFFFFFF : is_script_path ? 1 : 0, ptr3, len3);
534
+ var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
535
+ var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
536
+ var r2 = getDataViewMemory0().getInt32(retptr + 4 * 2, true);
537
+ var r3 = getDataViewMemory0().getInt32(retptr + 4 * 3, true);
538
+ if (r3) {
539
+ throw takeObject(r2);
540
+ }
541
+ var v5 = getArrayU32FromWasm0(r0, r1).slice();
542
+ wasm.__wbindgen_export4(r0, r1 * 4, 4);
543
+ return v5;
544
+ } finally {
545
+ wasm.__wbindgen_add_to_stack_pointer(16);
546
+ }
547
+ }
548
+ /**
549
+ * Verify a single input of a BIP-0322 PSBT proof using pubkeys directly
550
+ *
551
+ * # Arguments
552
+ * * `psbt` - The signed BitGoPsbt
553
+ * * `input_index` - The index of the input to verify
554
+ * * `message` - The message that was signed
555
+ * * `pubkeys` - Array of 3 hex-encoded pubkeys [user, backup, bitgo]
556
+ * * `script_type` - One of: "p2sh", "p2shP2wsh", "p2wsh", "p2tr", "p2trMusig2"
557
+ * * `is_script_path` - For taproot types, whether script path was used
558
+ * * `tag` - Optional custom tag for message hashing
559
+ *
560
+ * # Returns
561
+ * An array of pubkey indices (0, 1, 2) that have valid signatures
562
+ *
563
+ * # Throws
564
+ * Throws an error if verification fails or no valid signatures found
565
+ * @param {BitGoPsbt} psbt
566
+ * @param {number} input_index
567
+ * @param {string} message
568
+ * @param {string[]} pubkeys
569
+ * @param {string} script_type
570
+ * @param {boolean | null} [is_script_path]
571
+ * @param {string | null} [tag]
572
+ * @returns {Uint32Array}
573
+ */
574
+ static verify_bip322_psbt_input_with_pubkeys(psbt, input_index, message, pubkeys, script_type, is_script_path, tag) {
575
+ try {
576
+ const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
577
+ _assertClass(psbt, BitGoPsbt);
578
+ const ptr0 = passStringToWasm0(message, wasm.__wbindgen_export, wasm.__wbindgen_export2);
579
+ const len0 = WASM_VECTOR_LEN;
580
+ const ptr1 = passArrayJsValueToWasm0(pubkeys, wasm.__wbindgen_export);
581
+ const len1 = WASM_VECTOR_LEN;
582
+ const ptr2 = passStringToWasm0(script_type, wasm.__wbindgen_export, wasm.__wbindgen_export2);
583
+ const len2 = WASM_VECTOR_LEN;
584
+ var ptr3 = isLikeNone(tag) ? 0 : passStringToWasm0(tag, wasm.__wbindgen_export, wasm.__wbindgen_export2);
585
+ var len3 = WASM_VECTOR_LEN;
586
+ wasm.bip322namespace_verify_bip322_psbt_input_with_pubkeys(retptr, psbt.__wbg_ptr, input_index, ptr0, len0, ptr1, len1, ptr2, len2, isLikeNone(is_script_path) ? 0xFFFFFF : is_script_path ? 1 : 0, ptr3, len3);
587
+ var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
588
+ var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
589
+ var r2 = getDataViewMemory0().getInt32(retptr + 4 * 2, true);
590
+ var r3 = getDataViewMemory0().getInt32(retptr + 4 * 3, true);
591
+ if (r3) {
592
+ throw takeObject(r2);
593
+ }
594
+ var v5 = getArrayU32FromWasm0(r0, r1).slice();
595
+ wasm.__wbindgen_export4(r0, r1 * 4, 4);
596
+ return v5;
597
+ } finally {
598
+ wasm.__wbindgen_add_to_stack_pointer(16);
599
+ }
600
+ }
601
+ }
602
+ if (Symbol.dispose) Bip322Namespace.prototype[Symbol.dispose] = Bip322Namespace.prototype.free;
603
+
306
604
  export class BitGoPsbt {
307
605
  static __wrap(ptr) {
308
606
  ptr = ptr >>> 0;
Binary file
@@ -1,9 +1,59 @@
1
1
  /* tslint:disable */
2
2
  /* eslint-disable */
3
3
  export const memory: WebAssembly.Memory;
4
+ export const __wbg_wasmtransaction_free: (a: number, b: number) => void;
5
+ export const __wbg_wasmzcashtransaction_free: (a: number, b: number) => void;
6
+ export const __wbg_wrapdescriptor_free: (a: number, b: number) => void;
7
+ export const __wbg_wrapminiscript_free: (a: number, b: number) => void;
8
+ export const __wbg_wrappsbt_free: (a: number, b: number) => void;
9
+ export const wasmtransaction_from_bytes: (a: number, b: number, c: number) => void;
10
+ export const wasmtransaction_get_vsize: (a: number) => number;
11
+ export const wasmtransaction_to_bytes: (a: number, b: number) => void;
12
+ export const wasmzcashtransaction_from_bytes: (a: number, b: number, c: number) => void;
13
+ export const wasmzcashtransaction_to_bytes: (a: number, b: number) => void;
14
+ export const wrapdescriptor_atDerivationIndex: (a: number, b: number, c: number) => void;
15
+ export const wrapdescriptor_descType: (a: number, b: number) => void;
16
+ export const wrapdescriptor_encode: (a: number, b: number) => void;
17
+ export const wrapdescriptor_fromString: (a: number, b: number, c: number, d: number, e: number) => void;
18
+ export const wrapdescriptor_fromStringDetectType: (a: number, b: number, c: number) => void;
19
+ export const wrapdescriptor_hasWildcard: (a: number) => number;
20
+ export const wrapdescriptor_maxWeightToSatisfy: (a: number, b: number) => void;
21
+ export const wrapdescriptor_node: (a: number, b: number) => void;
22
+ export const wrapdescriptor_scriptPubkey: (a: number, b: number) => void;
23
+ export const wrapdescriptor_toAsmString: (a: number, b: number) => void;
24
+ export const wrapdescriptor_toString: (a: number, b: number) => void;
25
+ export const wrapminiscript_encode: (a: number, b: number) => void;
26
+ export const wrapminiscript_fromBitcoinScript: (a: number, b: number, c: number, d: number, e: number) => void;
27
+ export const wrapminiscript_fromString: (a: number, b: number, c: number, d: number, e: number) => void;
28
+ export const wrapminiscript_node: (a: number, b: number) => void;
29
+ export const wrapminiscript_toAsmString: (a: number, b: number) => void;
30
+ export const wrapminiscript_toString: (a: number, b: number) => void;
31
+ export const wrappsbt_clone: (a: number) => number;
32
+ export const wrappsbt_deserialize: (a: number, b: number, c: number) => void;
33
+ export const wrappsbt_finalize: (a: number, b: number) => void;
34
+ export const wrappsbt_serialize: (a: number, b: number) => void;
35
+ export const wrappsbt_signWithPrv: (a: number, b: number, c: number, d: number) => void;
36
+ export const wrappsbt_signWithXprv: (a: number, b: number, c: number, d: number) => void;
37
+ export const wrappsbt_updateInputWithDescriptor: (a: number, b: number, c: number, d: number) => void;
38
+ export const wrappsbt_updateOutputWithDescriptor: (a: number, b: number, c: number, d: number) => void;
39
+ export const __wbg_addressnamespace_free: (a: number, b: number) => void;
40
+ export const __wbg_bip322namespace_free: (a: number, b: number) => void;
4
41
  export const __wbg_bitgopsbt_free: (a: number, b: number) => void;
5
42
  export const __wbg_fixedscriptwalletnamespace_free: (a: number, b: number) => void;
43
+ export const __wbg_utxolibcompatnamespace_free: (a: number, b: number) => void;
6
44
  export const __wbg_wasmbip32_free: (a: number, b: number) => void;
45
+ export const __wbg_wasmdashtransaction_free: (a: number, b: number) => void;
46
+ export const __wbg_wasmdimensions_free: (a: number, b: number) => void;
47
+ export const __wbg_wasmecpair_free: (a: number, b: number) => void;
48
+ export const __wbg_wasmreplayprotection_free: (a: number, b: number) => void;
49
+ export const __wbg_wasmrootwalletkeys_free: (a: number, b: number) => void;
50
+ export const addressnamespace_from_output_script_with_coin: (a: number, b: number, c: number, d: number, e: number, f: number, g: number) => void;
51
+ export const addressnamespace_to_output_script_with_coin: (a: number, b: number, c: number, d: number, e: number) => void;
52
+ export const bip322namespace_add_bip322_input: (a: number, b: number, c: number, d: number, e: number, f: number, g: number, h: number, i: number, j: number, k: number, l: number, m: number) => void;
53
+ export const bip322namespace_verify_bip322_psbt_input: (a: number, b: number, c: number, d: number, e: number, f: number, g: number, h: number, i: number, j: number) => void;
54
+ export const bip322namespace_verify_bip322_psbt_input_with_pubkeys: (a: number, b: number, c: number, d: number, e: number, f: number, g: number, h: number, i: number, j: number, k: number, l: number) => void;
55
+ export const bip322namespace_verify_bip322_tx_input: (a: number, b: number, c: number, d: number, e: number, f: number, g: number, h: number, i: number, j: number, k: number, l: number) => void;
56
+ export const bip322namespace_verify_bip322_tx_input_with_pubkeys: (a: number, b: number, c: number, d: number, e: number, f: number, g: number, h: number, i: number, j: number, k: number, l: number) => void;
7
57
  export const bitgopsbt_add_input: (a: number, b: number, c: number, d: number, e: number, f: bigint, g: number, h: number, i: number, j: number, k: number) => void;
8
58
  export const bitgopsbt_add_output: (a: number, b: number, c: number, d: number, e: bigint) => void;
9
59
  export const bitgopsbt_add_output_with_address: (a: number, b: number, c: number, d: number, e: bigint) => void;
@@ -36,6 +86,8 @@ export const bitgopsbt_version_group_id: (a: number) => number;
36
86
  export const fixedscriptwalletnamespace_address: (a: number, b: number, c: number, d: number, e: number, f: number, g: number) => void;
37
87
  export const fixedscriptwalletnamespace_output_script: (a: number, b: number, c: number, d: number, e: number) => void;
38
88
  export const fixedscriptwalletnamespace_supports_script_type: (a: number, b: number, c: number, d: number, e: number) => void;
89
+ export const utxolibcompatnamespace_from_output_script: (a: number, b: number, c: number, d: number, e: number, f: number) => void;
90
+ export const utxolibcompatnamespace_to_output_script: (a: number, b: number, c: number, d: number, e: number, f: number) => void;
39
91
  export const wasmbip32_chain_code: (a: number) => number;
40
92
  export const wasmbip32_depth: (a: number) => number;
41
93
  export const wasmbip32_derive: (a: number, b: number, c: number) => void;
@@ -56,9 +108,17 @@ export const wasmbip32_private_key: (a: number) => number;
56
108
  export const wasmbip32_public_key: (a: number) => number;
57
109
  export const wasmbip32_to_base58: (a: number, b: number) => void;
58
110
  export const wasmbip32_to_wif: (a: number, b: number) => void;
59
- export const wasmbip32_from_bip32_properties: (a: number, b: number) => void;
60
- export const __wbg_wasmecpair_free: (a: number, b: number) => void;
61
- export const __wbg_wasmreplayprotection_free: (a: number, b: number) => void;
111
+ export const wasmdashtransaction_from_bytes: (a: number, b: number, c: number) => void;
112
+ export const wasmdashtransaction_to_bytes: (a: number, b: number) => void;
113
+ export const wasmdimensions_empty: () => number;
114
+ export const wasmdimensions_from_input: (a: number, b: number, c: number, d: number, e: number, f: number) => void;
115
+ export const wasmdimensions_from_input_script_type: (a: number, b: number, c: number) => void;
116
+ export const wasmdimensions_from_output_script: (a: number, b: number) => number;
117
+ export const wasmdimensions_from_psbt: (a: number, b: number) => void;
118
+ export const wasmdimensions_get_vsize: (a: number, b: number, c: number) => number;
119
+ export const wasmdimensions_get_weight: (a: number, b: number, c: number) => number;
120
+ export const wasmdimensions_has_segwit: (a: number) => number;
121
+ export const wasmdimensions_plus: (a: number, b: number) => number;
62
122
  export const wasmecpair_from_private_key: (a: number, b: number, c: number) => void;
63
123
  export const wasmecpair_from_public_key: (a: number, b: number, c: number) => void;
64
124
  export const wasmecpair_from_wif: (a: number, b: number, c: number) => void;
@@ -72,66 +132,12 @@ export const wasmecpair_to_wif_testnet: (a: number, b: number) => void;
72
132
  export const wasmreplayprotection_from_addresses: (a: number, b: number, c: number, d: number, e: number) => void;
73
133
  export const wasmreplayprotection_from_output_scripts: (a: number, b: number) => number;
74
134
  export const wasmreplayprotection_from_public_keys: (a: number, b: number, c: number) => void;
75
- export const __wbg_addressnamespace_free: (a: number, b: number) => void;
76
- export const __wbg_utxolibcompatnamespace_free: (a: number, b: number) => void;
77
- export const __wbg_wasmdimensions_free: (a: number, b: number) => void;
78
- export const __wbg_wasmtransaction_free: (a: number, b: number) => void;
79
- export const __wbg_wasmzcashtransaction_free: (a: number, b: number) => void;
80
- export const __wbg_wrapdescriptor_free: (a: number, b: number) => void;
81
- export const __wbg_wrapminiscript_free: (a: number, b: number) => void;
82
- export const __wbg_wrappsbt_free: (a: number, b: number) => void;
83
- export const addressnamespace_from_output_script_with_coin: (a: number, b: number, c: number, d: number, e: number, f: number, g: number) => void;
84
- export const addressnamespace_to_output_script_with_coin: (a: number, b: number, c: number, d: number, e: number) => void;
85
- export const utxolibcompatnamespace_from_output_script: (a: number, b: number, c: number, d: number, e: number, f: number) => void;
86
- export const utxolibcompatnamespace_to_output_script: (a: number, b: number, c: number, d: number, e: number, f: number) => void;
87
- export const wasmdimensions_empty: () => number;
88
- export const wasmdimensions_from_input: (a: number, b: number, c: number, d: number, e: number, f: number) => void;
89
- export const wasmdimensions_from_input_script_type: (a: number, b: number, c: number) => void;
90
- export const wasmdimensions_from_output_script: (a: number, b: number) => number;
91
- export const wasmdimensions_from_psbt: (a: number, b: number) => void;
92
- export const wasmdimensions_get_vsize: (a: number, b: number, c: number) => number;
93
- export const wasmdimensions_get_weight: (a: number, b: number, c: number) => number;
94
- export const wasmdimensions_has_segwit: (a: number) => number;
95
- export const wasmdimensions_plus: (a: number, b: number) => number;
96
- export const wasmtransaction_from_bytes: (a: number, b: number, c: number) => void;
97
- export const wasmtransaction_get_vsize: (a: number) => number;
98
- export const wasmtransaction_to_bytes: (a: number, b: number) => void;
99
- export const wasmzcashtransaction_from_bytes: (a: number, b: number, c: number) => void;
100
- export const wasmzcashtransaction_to_bytes: (a: number, b: number) => void;
101
- export const wrapdescriptor_atDerivationIndex: (a: number, b: number, c: number) => void;
102
- export const wrapdescriptor_descType: (a: number, b: number) => void;
103
- export const wrapdescriptor_encode: (a: number, b: number) => void;
104
- export const wrapdescriptor_fromString: (a: number, b: number, c: number, d: number, e: number) => void;
105
- export const wrapdescriptor_fromStringDetectType: (a: number, b: number, c: number) => void;
106
- export const wrapdescriptor_hasWildcard: (a: number) => number;
107
- export const wrapdescriptor_maxWeightToSatisfy: (a: number, b: number) => void;
108
- export const wrapdescriptor_node: (a: number, b: number) => void;
109
- export const wrapdescriptor_scriptPubkey: (a: number, b: number) => void;
110
- export const wrapdescriptor_toAsmString: (a: number, b: number) => void;
111
- export const wrapdescriptor_toString: (a: number, b: number) => void;
112
- export const wrapminiscript_encode: (a: number, b: number) => void;
113
- export const wrapminiscript_fromBitcoinScript: (a: number, b: number, c: number, d: number, e: number) => void;
114
- export const wrapminiscript_fromString: (a: number, b: number, c: number, d: number, e: number) => void;
115
- export const wrapminiscript_node: (a: number, b: number) => void;
116
- export const wrapminiscript_toAsmString: (a: number, b: number) => void;
117
- export const wrapminiscript_toString: (a: number, b: number) => void;
118
- export const wrappsbt_clone: (a: number) => number;
119
- export const wrappsbt_deserialize: (a: number, b: number, c: number) => void;
120
- export const wrappsbt_finalize: (a: number, b: number) => void;
121
- export const wrappsbt_serialize: (a: number, b: number) => void;
122
- export const wrappsbt_signWithPrv: (a: number, b: number, c: number, d: number) => void;
123
- export const wrappsbt_signWithXprv: (a: number, b: number, c: number, d: number) => void;
124
- export const wrappsbt_updateInputWithDescriptor: (a: number, b: number, c: number, d: number) => void;
125
- export const wrappsbt_updateOutputWithDescriptor: (a: number, b: number, c: number, d: number) => void;
126
- export const __wbg_wasmrootwalletkeys_free: (a: number, b: number) => void;
127
135
  export const wasmrootwalletkeys_backup_key: (a: number) => number;
128
136
  export const wasmrootwalletkeys_bitgo_key: (a: number) => number;
129
137
  export const wasmrootwalletkeys_new: (a: number, b: number, c: number, d: number) => void;
130
138
  export const wasmrootwalletkeys_user_key: (a: number) => number;
131
139
  export const wasmrootwalletkeys_with_derivation_prefixes: (a: number, b: number, c: number, d: number, e: number, f: number, g: number, h: number, i: number, j: number) => void;
132
- export const __wbg_wasmdashtransaction_free: (a: number, b: number) => void;
133
- export const wasmdashtransaction_from_bytes: (a: number, b: number, c: number) => void;
134
- export const wasmdashtransaction_to_bytes: (a: number, b: number) => void;
140
+ export const wasmbip32_from_bip32_properties: (a: number, b: number) => void;
135
141
  export const rustsecp256k1_v0_10_0_context_create: (a: number) => number;
136
142
  export const rustsecp256k1_v0_10_0_context_destroy: (a: number) => void;
137
143
  export const rustsecp256k1_v0_10_0_default_error_callback_fn: (a: number, b: number) => void;
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@bitgo/wasm-utxo",
3
3
  "description": "WebAssembly wrapper for rust-bitcoin (beta)",
4
- "version": "1.21.0",
4
+ "version": "1.22.0",
5
5
  "type": "module",
6
6
  "repository": {
7
7
  "type": "git",