@bitgo/wasm-utxo 1.20.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;
@@ -1227,6 +1525,43 @@ export class FixedScriptWalletNamespace {
1227
1525
  wasm.__wbindgen_add_to_stack_pointer(16);
1228
1526
  }
1229
1527
  }
1528
+ /**
1529
+ * Check if a network supports a given fixed-script wallet script type
1530
+ *
1531
+ * # Arguments
1532
+ * * `coin` - Coin name (e.g., "btc", "ltc", "doge")
1533
+ * * `script_type` - Script type name: "p2sh", "p2shP2wsh", "p2wsh", "p2tr", "p2trMusig2"
1534
+ *
1535
+ * # Returns
1536
+ * `true` if the network supports the script type, `false` otherwise
1537
+ *
1538
+ * # Examples
1539
+ * - Bitcoin supports all script types (p2sh, p2shP2wsh, p2wsh, p2tr, p2trMusig2)
1540
+ * - Litecoin supports segwit but not taproot (p2sh, p2shP2wsh, p2wsh)
1541
+ * - Dogecoin only supports legacy scripts (p2sh)
1542
+ * @param {string} coin
1543
+ * @param {string} script_type
1544
+ * @returns {boolean}
1545
+ */
1546
+ static supports_script_type(coin, script_type) {
1547
+ try {
1548
+ const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
1549
+ const ptr0 = passStringToWasm0(coin, wasm.__wbindgen_export, wasm.__wbindgen_export2);
1550
+ const len0 = WASM_VECTOR_LEN;
1551
+ const ptr1 = passStringToWasm0(script_type, wasm.__wbindgen_export, wasm.__wbindgen_export2);
1552
+ const len1 = WASM_VECTOR_LEN;
1553
+ wasm.fixedscriptwalletnamespace_supports_script_type(retptr, ptr0, len0, ptr1, len1);
1554
+ var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
1555
+ var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
1556
+ var r2 = getDataViewMemory0().getInt32(retptr + 4 * 2, true);
1557
+ if (r2) {
1558
+ throw takeObject(r1);
1559
+ }
1560
+ return r0 !== 0;
1561
+ } finally {
1562
+ wasm.__wbindgen_add_to_stack_pointer(16);
1563
+ }
1564
+ }
1230
1565
  /**
1231
1566
  * @param {WasmRootWalletKeys} keys
1232
1567
  * @param {number} chain
Binary file
@@ -1,21 +1,11 @@
1
1
  /* tslint:disable */
2
2
  /* eslint-disable */
3
3
  export const memory: WebAssembly.Memory;
4
- export const __wbg_utxolibcompatnamespace_free: (a: number, b: number) => void;
5
- export const __wbg_wasmdashtransaction_free: (a: number, b: number) => void;
6
- export const __wbg_wasmreplayprotection_free: (a: number, b: number) => void;
7
4
  export const __wbg_wasmtransaction_free: (a: number, b: number) => void;
8
5
  export const __wbg_wasmzcashtransaction_free: (a: number, b: number) => void;
9
6
  export const __wbg_wrapdescriptor_free: (a: number, b: number) => void;
10
7
  export const __wbg_wrapminiscript_free: (a: number, b: number) => void;
11
8
  export const __wbg_wrappsbt_free: (a: number, b: number) => void;
12
- export const utxolibcompatnamespace_from_output_script: (a: number, b: number, c: number, d: number, e: number, f: number) => void;
13
- export const utxolibcompatnamespace_to_output_script: (a: number, b: number, c: number, d: number, e: number, f: number) => void;
14
- export const wasmdashtransaction_from_bytes: (a: number, b: number, c: number) => void;
15
- export const wasmdashtransaction_to_bytes: (a: number, b: number) => void;
16
- export const wasmreplayprotection_from_addresses: (a: number, b: number, c: number, d: number, e: number) => void;
17
- export const wasmreplayprotection_from_output_scripts: (a: number, b: number) => number;
18
- export const wasmreplayprotection_from_public_keys: (a: number, b: number, c: number) => void;
19
9
  export const wasmtransaction_from_bytes: (a: number, b: number, c: number) => void;
20
10
  export const wasmtransaction_get_vsize: (a: number) => number;
21
11
  export const wasmtransaction_to_bytes: (a: number, b: number) => void;
@@ -47,14 +37,23 @@ export const wrappsbt_signWithXprv: (a: number, b: number, c: number, d: number)
47
37
  export const wrappsbt_updateInputWithDescriptor: (a: number, b: number, c: number, d: number) => void;
48
38
  export const wrappsbt_updateOutputWithDescriptor: (a: number, b: number, c: number, d: number) => void;
49
39
  export const __wbg_addressnamespace_free: (a: number, b: number) => void;
40
+ export const __wbg_bip322namespace_free: (a: number, b: number) => void;
50
41
  export const __wbg_bitgopsbt_free: (a: number, b: number) => void;
51
42
  export const __wbg_fixedscriptwalletnamespace_free: (a: number, b: number) => void;
43
+ export const __wbg_utxolibcompatnamespace_free: (a: number, b: number) => void;
52
44
  export const __wbg_wasmbip32_free: (a: number, b: number) => void;
45
+ export const __wbg_wasmdashtransaction_free: (a: number, b: number) => void;
53
46
  export const __wbg_wasmdimensions_free: (a: number, b: number) => void;
54
47
  export const __wbg_wasmecpair_free: (a: number, b: number) => void;
48
+ export const __wbg_wasmreplayprotection_free: (a: number, b: number) => void;
55
49
  export const __wbg_wasmrootwalletkeys_free: (a: number, b: number) => void;
56
50
  export const addressnamespace_from_output_script_with_coin: (a: number, b: number, c: number, d: number, e: number, f: number, g: number) => void;
57
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;
58
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;
59
58
  export const bitgopsbt_add_output: (a: number, b: number, c: number, d: number, e: bigint) => void;
60
59
  export const bitgopsbt_add_output_with_address: (a: number, b: number, c: number, d: number, e: bigint) => void;
@@ -86,6 +85,9 @@ export const bitgopsbt_version: (a: number) => number;
86
85
  export const bitgopsbt_version_group_id: (a: number) => number;
87
86
  export const fixedscriptwalletnamespace_address: (a: number, b: number, c: number, d: number, e: number, f: number, g: number) => void;
88
87
  export const fixedscriptwalletnamespace_output_script: (a: number, b: number, c: number, d: number, e: number) => void;
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;
89
91
  export const wasmbip32_chain_code: (a: number) => number;
90
92
  export const wasmbip32_depth: (a: number) => number;
91
93
  export const wasmbip32_derive: (a: number, b: number, c: number) => void;
@@ -106,6 +108,8 @@ export const wasmbip32_private_key: (a: number) => number;
106
108
  export const wasmbip32_public_key: (a: number) => number;
107
109
  export const wasmbip32_to_base58: (a: number, b: number) => void;
108
110
  export const wasmbip32_to_wif: (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;
109
113
  export const wasmdimensions_empty: () => number;
110
114
  export const wasmdimensions_from_input: (a: number, b: number, c: number, d: number, e: number, f: number) => void;
111
115
  export const wasmdimensions_from_input_script_type: (a: number, b: number, c: number) => void;
@@ -125,6 +129,9 @@ export const wasmecpair_public_key: (a: number) => number;
125
129
  export const wasmecpair_to_wif: (a: number, b: number) => void;
126
130
  export const wasmecpair_to_wif_mainnet: (a: number, b: number) => void;
127
131
  export const wasmecpair_to_wif_testnet: (a: number, b: number) => void;
132
+ export const wasmreplayprotection_from_addresses: (a: number, b: number, c: number, d: number, e: number) => void;
133
+ export const wasmreplayprotection_from_output_scripts: (a: number, b: number) => number;
134
+ export const wasmreplayprotection_from_public_keys: (a: number, b: number, c: number) => void;
128
135
  export const wasmrootwalletkeys_backup_key: (a: number) => number;
129
136
  export const wasmrootwalletkeys_bitgo_key: (a: number) => number;
130
137
  export const wasmrootwalletkeys_new: (a: number, b: number, c: number, d: 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.20.0",
4
+ "version": "1.22.0",
5
5
  "type": "module",
6
6
  "repository": {
7
7
  "type": "git",