@bitgo/wasm-utxo 2.0.0 → 3.0.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.
Files changed (43) hide show
  1. package/dist/cjs/js/coinName.d.ts +3 -0
  2. package/dist/cjs/js/coinName.js +49 -0
  3. package/dist/cjs/js/descriptorWallet/Psbt.d.ts +49 -0
  4. package/dist/cjs/js/descriptorWallet/Psbt.js +126 -0
  5. package/dist/cjs/js/descriptorWallet/index.d.ts +1 -0
  6. package/dist/cjs/js/descriptorWallet/index.js +4 -0
  7. package/dist/cjs/js/fixedScriptWallet/BitGoPsbt.d.ts +17 -2
  8. package/dist/cjs/js/fixedScriptWallet/BitGoPsbt.js +22 -0
  9. package/dist/cjs/js/fixedScriptWallet/RootWalletKeys.d.ts +5 -0
  10. package/dist/cjs/js/fixedScriptWallet/RootWalletKeys.js +7 -0
  11. package/dist/cjs/js/fixedScriptWallet/index.d.ts +1 -1
  12. package/dist/cjs/js/fixedScriptWallet/index.js +2 -1
  13. package/dist/cjs/js/index.d.ts +1 -30
  14. package/dist/cjs/js/index.js +2 -2
  15. package/dist/cjs/js/psbt.d.ts +2 -0
  16. package/dist/cjs/js/testutils/AcidTest.d.ts +3 -3
  17. package/dist/cjs/js/testutils/AcidTest.js +79 -80
  18. package/dist/cjs/js/wasm/wasm_utxo.d.ts +34 -103
  19. package/dist/cjs/js/wasm/wasm_utxo.js +99 -93
  20. package/dist/cjs/js/wasm/wasm_utxo_bg.wasm +0 -0
  21. package/dist/cjs/js/wasm/wasm_utxo_bg.wasm.d.ts +73 -70
  22. package/dist/esm/js/coinName.d.ts +3 -0
  23. package/dist/esm/js/coinName.js +48 -0
  24. package/dist/esm/js/descriptorWallet/Psbt.d.ts +49 -0
  25. package/dist/esm/js/descriptorWallet/Psbt.js +122 -0
  26. package/dist/esm/js/descriptorWallet/index.d.ts +1 -0
  27. package/dist/esm/js/descriptorWallet/index.js +2 -0
  28. package/dist/esm/js/fixedScriptWallet/BitGoPsbt.d.ts +17 -2
  29. package/dist/esm/js/fixedScriptWallet/BitGoPsbt.js +22 -1
  30. package/dist/esm/js/fixedScriptWallet/RootWalletKeys.d.ts +5 -0
  31. package/dist/esm/js/fixedScriptWallet/RootWalletKeys.js +7 -0
  32. package/dist/esm/js/fixedScriptWallet/index.d.ts +1 -1
  33. package/dist/esm/js/fixedScriptWallet/index.js +1 -1
  34. package/dist/esm/js/index.d.ts +1 -30
  35. package/dist/esm/js/index.js +1 -1
  36. package/dist/esm/js/psbt.d.ts +2 -0
  37. package/dist/esm/js/testutils/AcidTest.d.ts +3 -3
  38. package/dist/esm/js/testutils/AcidTest.js +80 -81
  39. package/dist/esm/js/wasm/wasm_utxo.d.ts +34 -103
  40. package/dist/esm/js/wasm/wasm_utxo_bg.js +99 -93
  41. package/dist/esm/js/wasm/wasm_utxo_bg.wasm +0 -0
  42. package/dist/esm/js/wasm/wasm_utxo_bg.wasm.d.ts +73 -70
  43. package/package.json +1 -1
@@ -1122,10 +1122,13 @@ export class BitGoPsbt {
1122
1122
  }
1123
1123
  }
1124
1124
  /**
1125
- * Get all PSBT inputs as an array of PsbtInputData
1126
- *
1127
- * Returns an array with witness_utxo, bip32_derivation, and tap_bip32_derivation
1128
- * for each input.
1125
+ * @returns {any}
1126
+ */
1127
+ get_global_xpubs() {
1128
+ const ret = wasm.bitgopsbt_get_global_xpubs(this.__wbg_ptr);
1129
+ return takeObject(ret);
1130
+ }
1131
+ /**
1129
1132
  * @returns {any}
1130
1133
  */
1131
1134
  get_inputs() {
@@ -1167,10 +1170,6 @@ export class BitGoPsbt {
1167
1170
  }
1168
1171
  }
1169
1172
  /**
1170
- * Get all PSBT outputs as an array of PsbtOutputData
1171
- *
1172
- * Returns an array with script, value, bip32_derivation, and tap_bip32_derivation
1173
- * for each output.
1174
1173
  * @returns {any}
1175
1174
  */
1176
1175
  get_outputs() {
@@ -1189,10 +1188,6 @@ export class BitGoPsbt {
1189
1188
  }
1190
1189
  }
1191
1190
  /**
1192
- * Get all PSBT outputs with resolved address strings.
1193
- *
1194
- * Unlike the generic WrapPsbt which requires a coin parameter, BitGoPsbt
1195
- * uses the network it was created/deserialized with to resolve addresses.
1196
1191
  * @returns {any}
1197
1192
  */
1198
1193
  get_outputs_with_address() {
@@ -1211,7 +1206,6 @@ export class BitGoPsbt {
1211
1206
  }
1212
1207
  }
1213
1208
  /**
1214
- * Get the number of inputs in the PSBT
1215
1209
  * @returns {number}
1216
1210
  */
1217
1211
  input_count() {
@@ -1238,7 +1232,6 @@ export class BitGoPsbt {
1238
1232
  return ret !== 0;
1239
1233
  }
1240
1234
  /**
1241
- * Get the transaction lock time
1242
1235
  * @returns {number}
1243
1236
  */
1244
1237
  lock_time() {
@@ -1266,7 +1259,6 @@ export class BitGoPsbt {
1266
1259
  }
1267
1260
  }
1268
1261
  /**
1269
- * Get the number of outputs in the PSBT
1270
1262
  * @returns {number}
1271
1263
  */
1272
1264
  output_count() {
@@ -1888,7 +1880,6 @@ export class BitGoPsbt {
1888
1880
  }
1889
1881
  }
1890
1882
  /**
1891
- * Get the transaction version
1892
1883
  * @returns {number}
1893
1884
  */
1894
1885
  version() {
@@ -2155,6 +2146,35 @@ export class FixedScriptWalletNamespace {
2155
2146
  wasm.__wbindgen_add_to_stack_pointer(16);
2156
2147
  }
2157
2148
  }
2149
+ /**
2150
+ * Sort an xpub triple into [user, backup, bitgo] order by validating
2151
+ * against the PSBT's wallet inputs. Returns a RootWalletKeys with the
2152
+ * correct ordering.
2153
+ * @param {BitGoPsbt} psbt
2154
+ * @param {WasmBIP32} user_or_a
2155
+ * @param {WasmBIP32} backup_or_b
2156
+ * @param {WasmBIP32} bitgo_or_c
2157
+ * @returns {WasmRootWalletKeys}
2158
+ */
2159
+ static to_wallet_keys(psbt, user_or_a, backup_or_b, bitgo_or_c) {
2160
+ try {
2161
+ const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
2162
+ _assertClass(psbt, BitGoPsbt);
2163
+ _assertClass(user_or_a, WasmBIP32);
2164
+ _assertClass(backup_or_b, WasmBIP32);
2165
+ _assertClass(bitgo_or_c, WasmBIP32);
2166
+ wasm.fixedscriptwalletnamespace_to_wallet_keys(retptr, psbt.__wbg_ptr, user_or_a.__wbg_ptr, backup_or_b.__wbg_ptr, bitgo_or_c.__wbg_ptr);
2167
+ var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
2168
+ var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
2169
+ var r2 = getDataViewMemory0().getInt32(retptr + 4 * 2, true);
2170
+ if (r2) {
2171
+ throw takeObject(r1);
2172
+ }
2173
+ return WasmRootWalletKeys.__wrap(r0);
2174
+ } finally {
2175
+ wasm.__wbindgen_add_to_stack_pointer(16);
2176
+ }
2177
+ }
2158
2178
  }
2159
2179
  if (Symbol.dispose) FixedScriptWalletNamespace.prototype[Symbol.dispose] = FixedScriptWalletNamespace.prototype.free;
2160
2180
 
@@ -4404,14 +4424,14 @@ export class WrapPsbt {
4404
4424
  * @param {number | null} [sequence]
4405
4425
  * @returns {number}
4406
4426
  */
4407
- addInput(txid, vout, value, script, sequence) {
4427
+ add_input(txid, vout, value, script, sequence) {
4408
4428
  try {
4409
4429
  const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
4410
4430
  const ptr0 = passStringToWasm0(txid, wasm.__wbindgen_export, wasm.__wbindgen_export2);
4411
4431
  const len0 = WASM_VECTOR_LEN;
4412
4432
  const ptr1 = passArray8ToWasm0(script, wasm.__wbindgen_export);
4413
4433
  const len1 = WASM_VECTOR_LEN;
4414
- wasm.wrappsbt_addInput(retptr, this.__wbg_ptr, ptr0, len0, vout, value, ptr1, len1, isLikeNone(sequence) ? 0x100000001 : (sequence) >>> 0);
4434
+ wasm.wrappsbt_add_input(retptr, this.__wbg_ptr, ptr0, len0, vout, value, ptr1, len1, isLikeNone(sequence) ? 0x100000001 : (sequence) >>> 0);
4415
4435
  var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
4416
4436
  var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
4417
4437
  var r2 = getDataViewMemory0().getInt32(retptr + 4 * 2, true);
@@ -4443,14 +4463,14 @@ export class WrapPsbt {
4443
4463
  * @param {number | null} [sequence]
4444
4464
  * @returns {number}
4445
4465
  */
4446
- addInputAtIndex(index, txid, vout, value, script, sequence) {
4466
+ add_input_at_index(index, txid, vout, value, script, sequence) {
4447
4467
  try {
4448
4468
  const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
4449
4469
  const ptr0 = passStringToWasm0(txid, wasm.__wbindgen_export, wasm.__wbindgen_export2);
4450
4470
  const len0 = WASM_VECTOR_LEN;
4451
4471
  const ptr1 = passArray8ToWasm0(script, wasm.__wbindgen_export);
4452
4472
  const len1 = WASM_VECTOR_LEN;
4453
- wasm.wrappsbt_addInputAtIndex(retptr, this.__wbg_ptr, index, ptr0, len0, vout, value, ptr1, len1, isLikeNone(sequence) ? 0x100000001 : (sequence) >>> 0);
4473
+ wasm.wrappsbt_add_input_at_index(retptr, this.__wbg_ptr, index, ptr0, len0, vout, value, ptr1, len1, isLikeNone(sequence) ? 0x100000001 : (sequence) >>> 0);
4454
4474
  var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
4455
4475
  var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
4456
4476
  var r2 = getDataViewMemory0().getInt32(retptr + 4 * 2, true);
@@ -4467,10 +4487,10 @@ export class WrapPsbt {
4467
4487
  * @param {bigint} value
4468
4488
  * @returns {number}
4469
4489
  */
4470
- addOutput(script, value) {
4490
+ add_output(script, value) {
4471
4491
  const ptr0 = passArray8ToWasm0(script, wasm.__wbindgen_export);
4472
4492
  const len0 = WASM_VECTOR_LEN;
4473
- const ret = wasm.wrappsbt_addOutput(this.__wbg_ptr, ptr0, len0, value);
4493
+ const ret = wasm.wrappsbt_add_output(this.__wbg_ptr, ptr0, len0, value);
4474
4494
  return ret >>> 0;
4475
4495
  }
4476
4496
  /**
@@ -4487,12 +4507,12 @@ export class WrapPsbt {
4487
4507
  * @param {bigint} value
4488
4508
  * @returns {number}
4489
4509
  */
4490
- addOutputAtIndex(index, script, value) {
4510
+ add_output_at_index(index, script, value) {
4491
4511
  try {
4492
4512
  const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
4493
4513
  const ptr0 = passArray8ToWasm0(script, wasm.__wbindgen_export);
4494
4514
  const len0 = WASM_VECTOR_LEN;
4495
- wasm.wrappsbt_addOutputAtIndex(retptr, this.__wbg_ptr, index, ptr0, len0, value);
4515
+ wasm.wrappsbt_add_output_at_index(retptr, this.__wbg_ptr, index, ptr0, len0, value);
4496
4516
  var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
4497
4517
  var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
4498
4518
  var r2 = getDataViewMemory0().getInt32(retptr + 4 * 2, true);
@@ -4543,10 +4563,10 @@ export class WrapPsbt {
4543
4563
  * - `Err(WasmUtxoError)` if the PSBT is not fully finalized or extraction fails
4544
4564
  * @returns {WasmTransaction}
4545
4565
  */
4546
- extractTransaction() {
4566
+ extract_transaction() {
4547
4567
  try {
4548
4568
  const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
4549
- wasm.wrappsbt_extractTransaction(retptr, this.__wbg_ptr);
4569
+ wasm.wrappsbt_extract_transaction(retptr, this.__wbg_ptr);
4550
4570
  var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
4551
4571
  var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
4552
4572
  var r2 = getDataViewMemory0().getInt32(retptr + 4 * 2, true);
@@ -4558,10 +4578,10 @@ export class WrapPsbt {
4558
4578
  wasm.__wbindgen_add_to_stack_pointer(16);
4559
4579
  }
4560
4580
  }
4561
- finalize() {
4581
+ finalize_mut() {
4562
4582
  try {
4563
4583
  const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
4564
- wasm.wrappsbt_finalize(retptr, this.__wbg_ptr);
4584
+ wasm.wrappsbt_finalize_mut(retptr, this.__wbg_ptr);
4565
4585
  var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
4566
4586
  var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
4567
4587
  if (r1) {
@@ -4572,16 +4592,19 @@ export class WrapPsbt {
4572
4592
  }
4573
4593
  }
4574
4594
  /**
4575
- * Get all PSBT inputs as an array of PsbtInputData
4576
- *
4577
- * Returns an array with witness_utxo, bip32_derivation, and tap_bip32_derivation
4578
- * for each input. This is useful for introspecting the PSBT structure.
4579
4595
  * @returns {any}
4580
4596
  */
4581
- getInputs() {
4597
+ get_global_xpubs() {
4598
+ const ret = wasm.wrappsbt_get_global_xpubs(this.__wbg_ptr);
4599
+ return takeObject(ret);
4600
+ }
4601
+ /**
4602
+ * @returns {any}
4603
+ */
4604
+ get_inputs() {
4582
4605
  try {
4583
4606
  const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
4584
- wasm.wrappsbt_getInputs(retptr, this.__wbg_ptr);
4607
+ wasm.wrappsbt_get_inputs(retptr, this.__wbg_ptr);
4585
4608
  var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
4586
4609
  var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
4587
4610
  var r2 = getDataViewMemory0().getInt32(retptr + 4 * 2, true);
@@ -4594,16 +4617,12 @@ export class WrapPsbt {
4594
4617
  }
4595
4618
  }
4596
4619
  /**
4597
- * Get all PSBT outputs as an array of PsbtOutputData
4598
- *
4599
- * Returns an array with script, value, bip32_derivation, and tap_bip32_derivation
4600
- * for each output. This is useful for introspecting the PSBT structure.
4601
4620
  * @returns {any}
4602
4621
  */
4603
- getOutputs() {
4622
+ get_outputs() {
4604
4623
  try {
4605
4624
  const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
4606
- wasm.wrappsbt_getOutputs(retptr, this.__wbg_ptr);
4625
+ wasm.wrappsbt_get_outputs(retptr, this.__wbg_ptr);
4607
4626
  var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
4608
4627
  var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
4609
4628
  var r2 = getDataViewMemory0().getInt32(retptr + 4 * 2, true);
@@ -4616,19 +4635,15 @@ export class WrapPsbt {
4616
4635
  }
4617
4636
  }
4618
4637
  /**
4619
- * Get all PSBT outputs with resolved address strings.
4620
- *
4621
- * Like `getOutputs()` but each element also includes an `address` field
4622
- * derived from the output script using the given coin name (e.g. "btc", "tbtc").
4623
4638
  * @param {string} coin
4624
4639
  * @returns {any}
4625
4640
  */
4626
- getOutputsWithAddress(coin) {
4641
+ get_outputs_with_address(coin) {
4627
4642
  try {
4628
4643
  const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
4629
4644
  const ptr0 = passStringToWasm0(coin, wasm.__wbindgen_export, wasm.__wbindgen_export2);
4630
4645
  const len0 = WASM_VECTOR_LEN;
4631
- wasm.wrappsbt_getOutputsWithAddress(retptr, this.__wbg_ptr, ptr0, len0);
4646
+ wasm.wrappsbt_get_outputs_with_address(retptr, this.__wbg_ptr, ptr0, len0);
4632
4647
  var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
4633
4648
  var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
4634
4649
  var r2 = getDataViewMemory0().getInt32(retptr + 4 * 2, true);
@@ -4641,15 +4656,13 @@ export class WrapPsbt {
4641
4656
  }
4642
4657
  }
4643
4658
  /**
4644
- * Get partial signatures for an input
4645
- * Returns array of { pubkey: Uint8Array, signature: Uint8Array }
4646
4659
  * @param {number} input_index
4647
4660
  * @returns {any}
4648
4661
  */
4649
- getPartialSignatures(input_index) {
4662
+ get_partial_signatures(input_index) {
4650
4663
  try {
4651
4664
  const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
4652
- wasm.wrappsbt_getPartialSignatures(retptr, this.__wbg_ptr, input_index);
4665
+ wasm.wrappsbt_get_partial_signatures(retptr, this.__wbg_ptr, input_index);
4653
4666
  var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
4654
4667
  var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
4655
4668
  var r2 = getDataViewMemory0().getInt32(retptr + 4 * 2, true);
@@ -4668,10 +4681,10 @@ export class WrapPsbt {
4668
4681
  * The serialized unsigned transaction
4669
4682
  * @returns {Uint8Array}
4670
4683
  */
4671
- getUnsignedTx() {
4684
+ get_unsigned_tx() {
4672
4685
  try {
4673
4686
  const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
4674
- wasm.wrappsbt_getUnsignedTx(retptr, this.__wbg_ptr);
4687
+ wasm.wrappsbt_get_unsigned_tx(retptr, this.__wbg_ptr);
4675
4688
  var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
4676
4689
  var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
4677
4690
  var v1 = getArrayU8FromWasm0(r0, r1).slice();
@@ -4682,14 +4695,13 @@ export class WrapPsbt {
4682
4695
  }
4683
4696
  }
4684
4697
  /**
4685
- * Check if an input has any partial signatures
4686
4698
  * @param {number} input_index
4687
4699
  * @returns {boolean}
4688
4700
  */
4689
- hasPartialSignatures(input_index) {
4701
+ has_partial_signatures(input_index) {
4690
4702
  try {
4691
4703
  const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
4692
- wasm.wrappsbt_hasPartialSignatures(retptr, this.__wbg_ptr, input_index);
4704
+ wasm.wrappsbt_has_partial_signatures(retptr, this.__wbg_ptr, input_index);
4693
4705
  var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
4694
4706
  var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
4695
4707
  var r2 = getDataViewMemory0().getInt32(retptr + 4 * 2, true);
@@ -4702,19 +4714,17 @@ export class WrapPsbt {
4702
4714
  }
4703
4715
  }
4704
4716
  /**
4705
- * Get the number of inputs in the PSBT
4706
4717
  * @returns {number}
4707
4718
  */
4708
- inputCount() {
4709
- const ret = wasm.wrappsbt_inputCount(this.__wbg_ptr);
4719
+ input_count() {
4720
+ const ret = wasm.wrappsbt_input_count(this.__wbg_ptr);
4710
4721
  return ret >>> 0;
4711
4722
  }
4712
4723
  /**
4713
- * Get the transaction lock time
4714
4724
  * @returns {number}
4715
4725
  */
4716
- lockTime() {
4717
- const ret = wasm.wrappsbt_lockTime(this.__wbg_ptr);
4726
+ lock_time() {
4727
+ const ret = wasm.wrappsbt_lock_time(this.__wbg_ptr);
4718
4728
  return ret >>> 0;
4719
4729
  }
4720
4730
  /**
@@ -4733,20 +4743,19 @@ export class WrapPsbt {
4733
4743
  return this;
4734
4744
  }
4735
4745
  /**
4736
- * Get the number of outputs in the PSBT
4737
4746
  * @returns {number}
4738
4747
  */
4739
- outputCount() {
4740
- const ret = wasm.wrappsbt_outputCount(this.__wbg_ptr);
4748
+ output_count() {
4749
+ const ret = wasm.wrappsbt_output_count(this.__wbg_ptr);
4741
4750
  return ret >>> 0;
4742
4751
  }
4743
4752
  /**
4744
4753
  * @param {number} index
4745
4754
  */
4746
- removeInput(index) {
4755
+ remove_input(index) {
4747
4756
  try {
4748
4757
  const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
4749
- wasm.wrappsbt_removeInput(retptr, this.__wbg_ptr, index);
4758
+ wasm.wrappsbt_remove_input(retptr, this.__wbg_ptr, index);
4750
4759
  var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
4751
4760
  var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
4752
4761
  if (r1) {
@@ -4759,10 +4768,10 @@ export class WrapPsbt {
4759
4768
  /**
4760
4769
  * @param {number} index
4761
4770
  */
4762
- removeOutput(index) {
4771
+ remove_output(index) {
4763
4772
  try {
4764
4773
  const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
4765
- wasm.wrappsbt_removeOutput(retptr, this.__wbg_ptr, index);
4774
+ wasm.wrappsbt_remove_output(retptr, this.__wbg_ptr, index);
4766
4775
  var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
4767
4776
  var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
4768
4777
  if (r1) {
@@ -4802,11 +4811,11 @@ export class WrapPsbt {
4802
4811
  * @param {WasmBIP32} key
4803
4812
  * @returns {any}
4804
4813
  */
4805
- signAll(key) {
4814
+ sign_all(key) {
4806
4815
  try {
4807
4816
  const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
4808
4817
  _assertClass(key, WasmBIP32);
4809
- wasm.wrappsbt_signAll(retptr, this.__wbg_ptr, key.__wbg_ptr);
4818
+ wasm.wrappsbt_sign_all(retptr, this.__wbg_ptr, key.__wbg_ptr);
4810
4819
  var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
4811
4820
  var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
4812
4821
  var r2 = getDataViewMemory0().getInt32(retptr + 4 * 2, true);
@@ -4832,11 +4841,11 @@ export class WrapPsbt {
4832
4841
  * @param {WasmECPair} key
4833
4842
  * @returns {any}
4834
4843
  */
4835
- signAllWithEcpair(key) {
4844
+ sign_all_with_ecpair(key) {
4836
4845
  try {
4837
4846
  const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
4838
4847
  _assertClass(key, WasmECPair);
4839
- wasm.wrappsbt_signAllWithEcpair(retptr, this.__wbg_ptr, key.__wbg_ptr);
4848
+ wasm.wrappsbt_sign_all_with_ecpair(retptr, this.__wbg_ptr, key.__wbg_ptr);
4840
4849
  var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
4841
4850
  var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
4842
4851
  var r2 = getDataViewMemory0().getInt32(retptr + 4 * 2, true);
@@ -4852,12 +4861,12 @@ export class WrapPsbt {
4852
4861
  * @param {Uint8Array} prv
4853
4862
  * @returns {any}
4854
4863
  */
4855
- signWithPrv(prv) {
4864
+ sign_with_prv(prv) {
4856
4865
  try {
4857
4866
  const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
4858
4867
  const ptr0 = passArray8ToWasm0(prv, wasm.__wbindgen_export);
4859
4868
  const len0 = WASM_VECTOR_LEN;
4860
- wasm.wrappsbt_signWithPrv(retptr, this.__wbg_ptr, ptr0, len0);
4869
+ wasm.wrappsbt_sign_with_prv(retptr, this.__wbg_ptr, ptr0, len0);
4861
4870
  var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
4862
4871
  var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
4863
4872
  var r2 = getDataViewMemory0().getInt32(retptr + 4 * 2, true);
@@ -4873,12 +4882,12 @@ export class WrapPsbt {
4873
4882
  * @param {string} xprv
4874
4883
  * @returns {any}
4875
4884
  */
4876
- signWithXprv(xprv) {
4885
+ sign_with_xprv(xprv) {
4877
4886
  try {
4878
4887
  const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
4879
4888
  const ptr0 = passStringToWasm0(xprv, wasm.__wbindgen_export, wasm.__wbindgen_export2);
4880
4889
  const len0 = WASM_VECTOR_LEN;
4881
- wasm.wrappsbt_signWithXprv(retptr, this.__wbg_ptr, ptr0, len0);
4890
+ wasm.wrappsbt_sign_with_xprv(retptr, this.__wbg_ptr, ptr0, len0);
4882
4891
  var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
4883
4892
  var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
4884
4893
  var r2 = getDataViewMemory0().getInt32(retptr + 4 * 2, true);
@@ -4891,15 +4900,14 @@ export class WrapPsbt {
4891
4900
  }
4892
4901
  }
4893
4902
  /**
4894
- * Get the unsigned transaction ID as a hex string
4895
4903
  * @returns {string}
4896
4904
  */
4897
- unsignedTxId() {
4905
+ unsigned_tx_id() {
4898
4906
  let deferred1_0;
4899
4907
  let deferred1_1;
4900
4908
  try {
4901
4909
  const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
4902
- wasm.wrappsbt_unsignedTxId(retptr, this.__wbg_ptr);
4910
+ wasm.wrappsbt_unsigned_tx_id(retptr, this.__wbg_ptr);
4903
4911
  var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
4904
4912
  var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
4905
4913
  deferred1_0 = r0;
@@ -4914,11 +4922,11 @@ export class WrapPsbt {
4914
4922
  * @param {number} input_index
4915
4923
  * @param {WrapDescriptor} descriptor
4916
4924
  */
4917
- updateInputWithDescriptor(input_index, descriptor) {
4925
+ update_input_with_descriptor(input_index, descriptor) {
4918
4926
  try {
4919
4927
  const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
4920
4928
  _assertClass(descriptor, WrapDescriptor);
4921
- wasm.wrappsbt_updateInputWithDescriptor(retptr, this.__wbg_ptr, input_index, descriptor.__wbg_ptr);
4929
+ wasm.wrappsbt_update_input_with_descriptor(retptr, this.__wbg_ptr, input_index, descriptor.__wbg_ptr);
4922
4930
  var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
4923
4931
  var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
4924
4932
  if (r1) {
@@ -4932,11 +4940,11 @@ export class WrapPsbt {
4932
4940
  * @param {number} output_index
4933
4941
  * @param {WrapDescriptor} descriptor
4934
4942
  */
4935
- updateOutputWithDescriptor(output_index, descriptor) {
4943
+ update_output_with_descriptor(output_index, descriptor) {
4936
4944
  try {
4937
4945
  const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
4938
4946
  _assertClass(descriptor, WrapDescriptor);
4939
- wasm.wrappsbt_updateOutputWithDescriptor(retptr, this.__wbg_ptr, output_index, descriptor.__wbg_ptr);
4947
+ wasm.wrappsbt_update_output_with_descriptor(retptr, this.__wbg_ptr, output_index, descriptor.__wbg_ptr);
4940
4948
  var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
4941
4949
  var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
4942
4950
  if (r1) {
@@ -4947,21 +4955,16 @@ export class WrapPsbt {
4947
4955
  }
4948
4956
  }
4949
4957
  /**
4950
- * Validate a signature at a specific input against a pubkey
4951
- * Returns true if the signature is valid
4952
- *
4953
- * This method handles both ECDSA (legacy/SegWit) and Schnorr (Taproot) signatures.
4954
- * The pubkey should be provided as bytes (33 bytes for compressed ECDSA, 32 bytes for x-only Schnorr).
4955
4958
  * @param {number} input_index
4956
4959
  * @param {Uint8Array} pubkey
4957
4960
  * @returns {boolean}
4958
4961
  */
4959
- validateSignatureAtInput(input_index, pubkey) {
4962
+ validate_signature_at_input(input_index, pubkey) {
4960
4963
  try {
4961
4964
  const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
4962
4965
  const ptr0 = passArray8ToWasm0(pubkey, wasm.__wbindgen_export);
4963
4966
  const len0 = WASM_VECTOR_LEN;
4964
- wasm.wrappsbt_validateSignatureAtInput(retptr, this.__wbg_ptr, input_index, ptr0, len0);
4967
+ wasm.wrappsbt_validate_signature_at_input(retptr, this.__wbg_ptr, input_index, ptr0, len0);
4965
4968
  var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
4966
4969
  var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
4967
4970
  var r2 = getDataViewMemory0().getInt32(retptr + 4 * 2, true);
@@ -4992,11 +4995,11 @@ export class WrapPsbt {
4992
4995
  * @param {WasmBIP32} key
4993
4996
  * @returns {boolean}
4994
4997
  */
4995
- verifySignatureWithKey(input_index, key) {
4998
+ verify_signature_with_key(input_index, key) {
4996
4999
  try {
4997
5000
  const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
4998
5001
  _assertClass(key, WasmBIP32);
4999
- wasm.wrappsbt_verifySignatureWithKey(retptr, this.__wbg_ptr, input_index, key.__wbg_ptr);
5002
+ wasm.wrappsbt_verify_signature_with_key(retptr, this.__wbg_ptr, input_index, key.__wbg_ptr);
5000
5003
  var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
5001
5004
  var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
5002
5005
  var r2 = getDataViewMemory0().getInt32(retptr + 4 * 2, true);
@@ -5009,7 +5012,6 @@ export class WrapPsbt {
5009
5012
  }
5010
5013
  }
5011
5014
  /**
5012
- * Get the transaction version
5013
5015
  * @returns {number}
5014
5016
  */
5015
5017
  version() {
@@ -5337,6 +5339,10 @@ export function __wbg_versions_c01dfd4722a88165(arg0) {
5337
5339
  const ret = getObject(arg0).versions;
5338
5340
  return addHeapObject(ret);
5339
5341
  }
5342
+ export function __wbg_wasmbip32_new(arg0) {
5343
+ const ret = WasmBIP32.__wrap(arg0);
5344
+ return addHeapObject(ret);
5345
+ }
5340
5346
  export function __wbg_wasmdashtransaction_new(arg0) {
5341
5347
  const ret = WasmDashTransaction.__wrap(arg0);
5342
5348
  return addHeapObject(ret);
Binary file