@bitgo/wasm-utxo 2.1.0 → 3.1.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 (33) hide show
  1. package/dist/cjs/js/bip322/index.d.ts +5 -0
  2. package/dist/cjs/js/bip322/index.js +8 -0
  3. package/dist/cjs/js/coinName.d.ts +3 -0
  4. package/dist/cjs/js/coinName.js +49 -0
  5. package/dist/cjs/js/descriptorWallet/Psbt.d.ts +49 -0
  6. package/dist/cjs/js/descriptorWallet/Psbt.js +126 -0
  7. package/dist/cjs/js/descriptorWallet/index.d.ts +1 -0
  8. package/dist/cjs/js/descriptorWallet/index.js +4 -0
  9. package/dist/cjs/js/index.d.ts +1 -31
  10. package/dist/cjs/js/index.js +2 -2
  11. package/dist/cjs/js/testutils/AcidTest.d.ts +3 -3
  12. package/dist/cjs/js/testutils/AcidTest.js +79 -80
  13. package/dist/cjs/js/wasm/wasm_utxo.d.ts +32 -110
  14. package/dist/cjs/js/wasm/wasm_utxo.js +83 -97
  15. package/dist/cjs/js/wasm/wasm_utxo_bg.wasm +0 -0
  16. package/dist/cjs/js/wasm/wasm_utxo_bg.wasm.d.ts +75 -74
  17. package/dist/esm/js/bip322/index.d.ts +5 -0
  18. package/dist/esm/js/bip322/index.js +7 -0
  19. package/dist/esm/js/coinName.d.ts +3 -0
  20. package/dist/esm/js/coinName.js +48 -0
  21. package/dist/esm/js/descriptorWallet/Psbt.d.ts +49 -0
  22. package/dist/esm/js/descriptorWallet/Psbt.js +122 -0
  23. package/dist/esm/js/descriptorWallet/index.d.ts +1 -0
  24. package/dist/esm/js/descriptorWallet/index.js +2 -0
  25. package/dist/esm/js/index.d.ts +1 -31
  26. package/dist/esm/js/index.js +1 -1
  27. package/dist/esm/js/testutils/AcidTest.d.ts +3 -3
  28. package/dist/esm/js/testutils/AcidTest.js +80 -81
  29. package/dist/esm/js/wasm/wasm_utxo.d.ts +32 -110
  30. package/dist/esm/js/wasm/wasm_utxo_bg.js +83 -97
  31. package/dist/esm/js/wasm/wasm_utxo_bg.wasm +0 -0
  32. package/dist/esm/js/wasm/wasm_utxo_bg.wasm.d.ts +75 -74
  33. package/package.json +1 -1
@@ -142,6 +142,35 @@ export class Bip322Namespace {
142
142
  wasm.__wbindgen_add_to_stack_pointer(16);
143
143
  }
144
144
  }
145
+ /**
146
+ * Get the BIP322 message stored at a PSBT input index.
147
+ * Returns null if no message is stored.
148
+ * @param {BitGoPsbt} psbt
149
+ * @param {number} input_index
150
+ * @returns {string | undefined}
151
+ */
152
+ static get_bip322_message(psbt, input_index) {
153
+ try {
154
+ const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
155
+ _assertClass(psbt, BitGoPsbt);
156
+ wasm.bip322namespace_get_bip322_message(retptr, psbt.__wbg_ptr, input_index);
157
+ var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
158
+ var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
159
+ var r2 = getDataViewMemory0().getInt32(retptr + 4 * 2, true);
160
+ var r3 = getDataViewMemory0().getInt32(retptr + 4 * 3, true);
161
+ if (r3) {
162
+ throw takeObject(r2);
163
+ }
164
+ let v1;
165
+ if (r0 !== 0) {
166
+ v1 = getStringFromWasm0(r0, r1).slice();
167
+ wasm.__wbindgen_export4(r0, r1 * 1, 1);
168
+ }
169
+ return v1;
170
+ } finally {
171
+ wasm.__wbindgen_add_to_stack_pointer(16);
172
+ }
173
+ }
145
174
  /**
146
175
  * Verify a single input of a BIP-0322 PSBT proof
147
176
  *
@@ -1122,7 +1151,6 @@ export class BitGoPsbt {
1122
1151
  }
1123
1152
  }
1124
1153
  /**
1125
- * Returns the global xpubs from the PSBT as an array of WasmBIP32 instances.
1126
1154
  * @returns {any}
1127
1155
  */
1128
1156
  get_global_xpubs() {
@@ -1130,10 +1158,6 @@ export class BitGoPsbt {
1130
1158
  return takeObject(ret);
1131
1159
  }
1132
1160
  /**
1133
- * Get all PSBT inputs as an array of PsbtInputData
1134
- *
1135
- * Returns an array with witness_utxo, bip32_derivation, and tap_bip32_derivation
1136
- * for each input.
1137
1161
  * @returns {any}
1138
1162
  */
1139
1163
  get_inputs() {
@@ -1175,10 +1199,6 @@ export class BitGoPsbt {
1175
1199
  }
1176
1200
  }
1177
1201
  /**
1178
- * Get all PSBT outputs as an array of PsbtOutputData
1179
- *
1180
- * Returns an array with script, value, bip32_derivation, and tap_bip32_derivation
1181
- * for each output.
1182
1202
  * @returns {any}
1183
1203
  */
1184
1204
  get_outputs() {
@@ -1197,10 +1217,6 @@ export class BitGoPsbt {
1197
1217
  }
1198
1218
  }
1199
1219
  /**
1200
- * Get all PSBT outputs with resolved address strings.
1201
- *
1202
- * Unlike the generic WrapPsbt which requires a coin parameter, BitGoPsbt
1203
- * uses the network it was created/deserialized with to resolve addresses.
1204
1220
  * @returns {any}
1205
1221
  */
1206
1222
  get_outputs_with_address() {
@@ -1219,7 +1235,6 @@ export class BitGoPsbt {
1219
1235
  }
1220
1236
  }
1221
1237
  /**
1222
- * Get the number of inputs in the PSBT
1223
1238
  * @returns {number}
1224
1239
  */
1225
1240
  input_count() {
@@ -1246,7 +1261,6 @@ export class BitGoPsbt {
1246
1261
  return ret !== 0;
1247
1262
  }
1248
1263
  /**
1249
- * Get the transaction lock time
1250
1264
  * @returns {number}
1251
1265
  */
1252
1266
  lock_time() {
@@ -1274,7 +1288,6 @@ export class BitGoPsbt {
1274
1288
  }
1275
1289
  }
1276
1290
  /**
1277
- * Get the number of outputs in the PSBT
1278
1291
  * @returns {number}
1279
1292
  */
1280
1293
  output_count() {
@@ -1896,7 +1909,6 @@ export class BitGoPsbt {
1896
1909
  }
1897
1910
  }
1898
1911
  /**
1899
- * Get the transaction version
1900
1912
  * @returns {number}
1901
1913
  */
1902
1914
  version() {
@@ -4441,14 +4453,14 @@ export class WrapPsbt {
4441
4453
  * @param {number | null} [sequence]
4442
4454
  * @returns {number}
4443
4455
  */
4444
- addInput(txid, vout, value, script, sequence) {
4456
+ add_input(txid, vout, value, script, sequence) {
4445
4457
  try {
4446
4458
  const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
4447
4459
  const ptr0 = passStringToWasm0(txid, wasm.__wbindgen_export, wasm.__wbindgen_export2);
4448
4460
  const len0 = WASM_VECTOR_LEN;
4449
4461
  const ptr1 = passArray8ToWasm0(script, wasm.__wbindgen_export);
4450
4462
  const len1 = WASM_VECTOR_LEN;
4451
- wasm.wrappsbt_addInput(retptr, this.__wbg_ptr, ptr0, len0, vout, value, ptr1, len1, isLikeNone(sequence) ? 0x100000001 : (sequence) >>> 0);
4463
+ wasm.wrappsbt_add_input(retptr, this.__wbg_ptr, ptr0, len0, vout, value, ptr1, len1, isLikeNone(sequence) ? 0x100000001 : (sequence) >>> 0);
4452
4464
  var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
4453
4465
  var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
4454
4466
  var r2 = getDataViewMemory0().getInt32(retptr + 4 * 2, true);
@@ -4480,14 +4492,14 @@ export class WrapPsbt {
4480
4492
  * @param {number | null} [sequence]
4481
4493
  * @returns {number}
4482
4494
  */
4483
- addInputAtIndex(index, txid, vout, value, script, sequence) {
4495
+ add_input_at_index(index, txid, vout, value, script, sequence) {
4484
4496
  try {
4485
4497
  const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
4486
4498
  const ptr0 = passStringToWasm0(txid, wasm.__wbindgen_export, wasm.__wbindgen_export2);
4487
4499
  const len0 = WASM_VECTOR_LEN;
4488
4500
  const ptr1 = passArray8ToWasm0(script, wasm.__wbindgen_export);
4489
4501
  const len1 = WASM_VECTOR_LEN;
4490
- wasm.wrappsbt_addInputAtIndex(retptr, this.__wbg_ptr, index, ptr0, len0, vout, value, ptr1, len1, isLikeNone(sequence) ? 0x100000001 : (sequence) >>> 0);
4502
+ wasm.wrappsbt_add_input_at_index(retptr, this.__wbg_ptr, index, ptr0, len0, vout, value, ptr1, len1, isLikeNone(sequence) ? 0x100000001 : (sequence) >>> 0);
4491
4503
  var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
4492
4504
  var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
4493
4505
  var r2 = getDataViewMemory0().getInt32(retptr + 4 * 2, true);
@@ -4504,10 +4516,10 @@ export class WrapPsbt {
4504
4516
  * @param {bigint} value
4505
4517
  * @returns {number}
4506
4518
  */
4507
- addOutput(script, value) {
4519
+ add_output(script, value) {
4508
4520
  const ptr0 = passArray8ToWasm0(script, wasm.__wbindgen_export);
4509
4521
  const len0 = WASM_VECTOR_LEN;
4510
- const ret = wasm.wrappsbt_addOutput(this.__wbg_ptr, ptr0, len0, value);
4522
+ const ret = wasm.wrappsbt_add_output(this.__wbg_ptr, ptr0, len0, value);
4511
4523
  return ret >>> 0;
4512
4524
  }
4513
4525
  /**
@@ -4524,12 +4536,12 @@ export class WrapPsbt {
4524
4536
  * @param {bigint} value
4525
4537
  * @returns {number}
4526
4538
  */
4527
- addOutputAtIndex(index, script, value) {
4539
+ add_output_at_index(index, script, value) {
4528
4540
  try {
4529
4541
  const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
4530
4542
  const ptr0 = passArray8ToWasm0(script, wasm.__wbindgen_export);
4531
4543
  const len0 = WASM_VECTOR_LEN;
4532
- wasm.wrappsbt_addOutputAtIndex(retptr, this.__wbg_ptr, index, ptr0, len0, value);
4544
+ wasm.wrappsbt_add_output_at_index(retptr, this.__wbg_ptr, index, ptr0, len0, value);
4533
4545
  var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
4534
4546
  var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
4535
4547
  var r2 = getDataViewMemory0().getInt32(retptr + 4 * 2, true);
@@ -4580,10 +4592,10 @@ export class WrapPsbt {
4580
4592
  * - `Err(WasmUtxoError)` if the PSBT is not fully finalized or extraction fails
4581
4593
  * @returns {WasmTransaction}
4582
4594
  */
4583
- extractTransaction() {
4595
+ extract_transaction() {
4584
4596
  try {
4585
4597
  const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
4586
- wasm.wrappsbt_extractTransaction(retptr, this.__wbg_ptr);
4598
+ wasm.wrappsbt_extract_transaction(retptr, this.__wbg_ptr);
4587
4599
  var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
4588
4600
  var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
4589
4601
  var r2 = getDataViewMemory0().getInt32(retptr + 4 * 2, true);
@@ -4595,10 +4607,10 @@ export class WrapPsbt {
4595
4607
  wasm.__wbindgen_add_to_stack_pointer(16);
4596
4608
  }
4597
4609
  }
4598
- finalize() {
4610
+ finalize_mut() {
4599
4611
  try {
4600
4612
  const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
4601
- wasm.wrappsbt_finalize(retptr, this.__wbg_ptr);
4613
+ wasm.wrappsbt_finalize_mut(retptr, this.__wbg_ptr);
4602
4614
  var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
4603
4615
  var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
4604
4616
  if (r1) {
@@ -4609,24 +4621,19 @@ export class WrapPsbt {
4609
4621
  }
4610
4622
  }
4611
4623
  /**
4612
- * Get global xpubs from the PSBT as an array of WasmBIP32 instances.
4613
4624
  * @returns {any}
4614
4625
  */
4615
- getGlobalXpubs() {
4616
- const ret = wasm.wrappsbt_getGlobalXpubs(this.__wbg_ptr);
4626
+ get_global_xpubs() {
4627
+ const ret = wasm.wrappsbt_get_global_xpubs(this.__wbg_ptr);
4617
4628
  return takeObject(ret);
4618
4629
  }
4619
4630
  /**
4620
- * Get all PSBT inputs as an array of PsbtInputData
4621
- *
4622
- * Returns an array with witness_utxo, bip32_derivation, and tap_bip32_derivation
4623
- * for each input. This is useful for introspecting the PSBT structure.
4624
4631
  * @returns {any}
4625
4632
  */
4626
- getInputs() {
4633
+ get_inputs() {
4627
4634
  try {
4628
4635
  const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
4629
- wasm.wrappsbt_getInputs(retptr, this.__wbg_ptr);
4636
+ wasm.wrappsbt_get_inputs(retptr, this.__wbg_ptr);
4630
4637
  var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
4631
4638
  var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
4632
4639
  var r2 = getDataViewMemory0().getInt32(retptr + 4 * 2, true);
@@ -4639,16 +4646,12 @@ export class WrapPsbt {
4639
4646
  }
4640
4647
  }
4641
4648
  /**
4642
- * Get all PSBT outputs as an array of PsbtOutputData
4643
- *
4644
- * Returns an array with script, value, bip32_derivation, and tap_bip32_derivation
4645
- * for each output. This is useful for introspecting the PSBT structure.
4646
4649
  * @returns {any}
4647
4650
  */
4648
- getOutputs() {
4651
+ get_outputs() {
4649
4652
  try {
4650
4653
  const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
4651
- wasm.wrappsbt_getOutputs(retptr, this.__wbg_ptr);
4654
+ wasm.wrappsbt_get_outputs(retptr, this.__wbg_ptr);
4652
4655
  var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
4653
4656
  var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
4654
4657
  var r2 = getDataViewMemory0().getInt32(retptr + 4 * 2, true);
@@ -4661,19 +4664,15 @@ export class WrapPsbt {
4661
4664
  }
4662
4665
  }
4663
4666
  /**
4664
- * Get all PSBT outputs with resolved address strings.
4665
- *
4666
- * Like `getOutputs()` but each element also includes an `address` field
4667
- * derived from the output script using the given coin name (e.g. "btc", "tbtc").
4668
4667
  * @param {string} coin
4669
4668
  * @returns {any}
4670
4669
  */
4671
- getOutputsWithAddress(coin) {
4670
+ get_outputs_with_address(coin) {
4672
4671
  try {
4673
4672
  const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
4674
4673
  const ptr0 = passStringToWasm0(coin, wasm.__wbindgen_export, wasm.__wbindgen_export2);
4675
4674
  const len0 = WASM_VECTOR_LEN;
4676
- wasm.wrappsbt_getOutputsWithAddress(retptr, this.__wbg_ptr, ptr0, len0);
4675
+ wasm.wrappsbt_get_outputs_with_address(retptr, this.__wbg_ptr, ptr0, len0);
4677
4676
  var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
4678
4677
  var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
4679
4678
  var r2 = getDataViewMemory0().getInt32(retptr + 4 * 2, true);
@@ -4686,15 +4685,13 @@ export class WrapPsbt {
4686
4685
  }
4687
4686
  }
4688
4687
  /**
4689
- * Get partial signatures for an input
4690
- * Returns array of { pubkey: Uint8Array, signature: Uint8Array }
4691
4688
  * @param {number} input_index
4692
4689
  * @returns {any}
4693
4690
  */
4694
- getPartialSignatures(input_index) {
4691
+ get_partial_signatures(input_index) {
4695
4692
  try {
4696
4693
  const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
4697
- wasm.wrappsbt_getPartialSignatures(retptr, this.__wbg_ptr, input_index);
4694
+ wasm.wrappsbt_get_partial_signatures(retptr, this.__wbg_ptr, input_index);
4698
4695
  var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
4699
4696
  var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
4700
4697
  var r2 = getDataViewMemory0().getInt32(retptr + 4 * 2, true);
@@ -4713,10 +4710,10 @@ export class WrapPsbt {
4713
4710
  * The serialized unsigned transaction
4714
4711
  * @returns {Uint8Array}
4715
4712
  */
4716
- getUnsignedTx() {
4713
+ get_unsigned_tx() {
4717
4714
  try {
4718
4715
  const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
4719
- wasm.wrappsbt_getUnsignedTx(retptr, this.__wbg_ptr);
4716
+ wasm.wrappsbt_get_unsigned_tx(retptr, this.__wbg_ptr);
4720
4717
  var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
4721
4718
  var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
4722
4719
  var v1 = getArrayU8FromWasm0(r0, r1).slice();
@@ -4727,14 +4724,13 @@ export class WrapPsbt {
4727
4724
  }
4728
4725
  }
4729
4726
  /**
4730
- * Check if an input has any partial signatures
4731
4727
  * @param {number} input_index
4732
4728
  * @returns {boolean}
4733
4729
  */
4734
- hasPartialSignatures(input_index) {
4730
+ has_partial_signatures(input_index) {
4735
4731
  try {
4736
4732
  const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
4737
- wasm.wrappsbt_hasPartialSignatures(retptr, this.__wbg_ptr, input_index);
4733
+ wasm.wrappsbt_has_partial_signatures(retptr, this.__wbg_ptr, input_index);
4738
4734
  var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
4739
4735
  var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
4740
4736
  var r2 = getDataViewMemory0().getInt32(retptr + 4 * 2, true);
@@ -4747,19 +4743,17 @@ export class WrapPsbt {
4747
4743
  }
4748
4744
  }
4749
4745
  /**
4750
- * Get the number of inputs in the PSBT
4751
4746
  * @returns {number}
4752
4747
  */
4753
- inputCount() {
4754
- const ret = wasm.wrappsbt_inputCount(this.__wbg_ptr);
4748
+ input_count() {
4749
+ const ret = wasm.wrappsbt_input_count(this.__wbg_ptr);
4755
4750
  return ret >>> 0;
4756
4751
  }
4757
4752
  /**
4758
- * Get the transaction lock time
4759
4753
  * @returns {number}
4760
4754
  */
4761
- lockTime() {
4762
- const ret = wasm.wrappsbt_lockTime(this.__wbg_ptr);
4755
+ lock_time() {
4756
+ const ret = wasm.wrappsbt_lock_time(this.__wbg_ptr);
4763
4757
  return ret >>> 0;
4764
4758
  }
4765
4759
  /**
@@ -4778,20 +4772,19 @@ export class WrapPsbt {
4778
4772
  return this;
4779
4773
  }
4780
4774
  /**
4781
- * Get the number of outputs in the PSBT
4782
4775
  * @returns {number}
4783
4776
  */
4784
- outputCount() {
4785
- const ret = wasm.wrappsbt_outputCount(this.__wbg_ptr);
4777
+ output_count() {
4778
+ const ret = wasm.wrappsbt_output_count(this.__wbg_ptr);
4786
4779
  return ret >>> 0;
4787
4780
  }
4788
4781
  /**
4789
4782
  * @param {number} index
4790
4783
  */
4791
- removeInput(index) {
4784
+ remove_input(index) {
4792
4785
  try {
4793
4786
  const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
4794
- wasm.wrappsbt_removeInput(retptr, this.__wbg_ptr, index);
4787
+ wasm.wrappsbt_remove_input(retptr, this.__wbg_ptr, index);
4795
4788
  var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
4796
4789
  var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
4797
4790
  if (r1) {
@@ -4804,10 +4797,10 @@ export class WrapPsbt {
4804
4797
  /**
4805
4798
  * @param {number} index
4806
4799
  */
4807
- removeOutput(index) {
4800
+ remove_output(index) {
4808
4801
  try {
4809
4802
  const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
4810
- wasm.wrappsbt_removeOutput(retptr, this.__wbg_ptr, index);
4803
+ wasm.wrappsbt_remove_output(retptr, this.__wbg_ptr, index);
4811
4804
  var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
4812
4805
  var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
4813
4806
  if (r1) {
@@ -4847,11 +4840,11 @@ export class WrapPsbt {
4847
4840
  * @param {WasmBIP32} key
4848
4841
  * @returns {any}
4849
4842
  */
4850
- signAll(key) {
4843
+ sign_all(key) {
4851
4844
  try {
4852
4845
  const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
4853
4846
  _assertClass(key, WasmBIP32);
4854
- wasm.wrappsbt_signAll(retptr, this.__wbg_ptr, key.__wbg_ptr);
4847
+ wasm.wrappsbt_sign_all(retptr, this.__wbg_ptr, key.__wbg_ptr);
4855
4848
  var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
4856
4849
  var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
4857
4850
  var r2 = getDataViewMemory0().getInt32(retptr + 4 * 2, true);
@@ -4877,11 +4870,11 @@ export class WrapPsbt {
4877
4870
  * @param {WasmECPair} key
4878
4871
  * @returns {any}
4879
4872
  */
4880
- signAllWithEcpair(key) {
4873
+ sign_all_with_ecpair(key) {
4881
4874
  try {
4882
4875
  const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
4883
4876
  _assertClass(key, WasmECPair);
4884
- wasm.wrappsbt_signAllWithEcpair(retptr, this.__wbg_ptr, key.__wbg_ptr);
4877
+ wasm.wrappsbt_sign_all_with_ecpair(retptr, this.__wbg_ptr, key.__wbg_ptr);
4885
4878
  var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
4886
4879
  var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
4887
4880
  var r2 = getDataViewMemory0().getInt32(retptr + 4 * 2, true);
@@ -4897,12 +4890,12 @@ export class WrapPsbt {
4897
4890
  * @param {Uint8Array} prv
4898
4891
  * @returns {any}
4899
4892
  */
4900
- signWithPrv(prv) {
4893
+ sign_with_prv(prv) {
4901
4894
  try {
4902
4895
  const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
4903
4896
  const ptr0 = passArray8ToWasm0(prv, wasm.__wbindgen_export);
4904
4897
  const len0 = WASM_VECTOR_LEN;
4905
- wasm.wrappsbt_signWithPrv(retptr, this.__wbg_ptr, ptr0, len0);
4898
+ wasm.wrappsbt_sign_with_prv(retptr, this.__wbg_ptr, ptr0, len0);
4906
4899
  var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
4907
4900
  var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
4908
4901
  var r2 = getDataViewMemory0().getInt32(retptr + 4 * 2, true);
@@ -4918,12 +4911,12 @@ export class WrapPsbt {
4918
4911
  * @param {string} xprv
4919
4912
  * @returns {any}
4920
4913
  */
4921
- signWithXprv(xprv) {
4914
+ sign_with_xprv(xprv) {
4922
4915
  try {
4923
4916
  const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
4924
4917
  const ptr0 = passStringToWasm0(xprv, wasm.__wbindgen_export, wasm.__wbindgen_export2);
4925
4918
  const len0 = WASM_VECTOR_LEN;
4926
- wasm.wrappsbt_signWithXprv(retptr, this.__wbg_ptr, ptr0, len0);
4919
+ wasm.wrappsbt_sign_with_xprv(retptr, this.__wbg_ptr, ptr0, len0);
4927
4920
  var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
4928
4921
  var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
4929
4922
  var r2 = getDataViewMemory0().getInt32(retptr + 4 * 2, true);
@@ -4936,15 +4929,14 @@ export class WrapPsbt {
4936
4929
  }
4937
4930
  }
4938
4931
  /**
4939
- * Get the unsigned transaction ID as a hex string
4940
4932
  * @returns {string}
4941
4933
  */
4942
- unsignedTxId() {
4934
+ unsigned_tx_id() {
4943
4935
  let deferred1_0;
4944
4936
  let deferred1_1;
4945
4937
  try {
4946
4938
  const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
4947
- wasm.wrappsbt_unsignedTxId(retptr, this.__wbg_ptr);
4939
+ wasm.wrappsbt_unsigned_tx_id(retptr, this.__wbg_ptr);
4948
4940
  var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
4949
4941
  var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
4950
4942
  deferred1_0 = r0;
@@ -4959,11 +4951,11 @@ export class WrapPsbt {
4959
4951
  * @param {number} input_index
4960
4952
  * @param {WrapDescriptor} descriptor
4961
4953
  */
4962
- updateInputWithDescriptor(input_index, descriptor) {
4954
+ update_input_with_descriptor(input_index, descriptor) {
4963
4955
  try {
4964
4956
  const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
4965
4957
  _assertClass(descriptor, WrapDescriptor);
4966
- wasm.wrappsbt_updateInputWithDescriptor(retptr, this.__wbg_ptr, input_index, descriptor.__wbg_ptr);
4958
+ wasm.wrappsbt_update_input_with_descriptor(retptr, this.__wbg_ptr, input_index, descriptor.__wbg_ptr);
4967
4959
  var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
4968
4960
  var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
4969
4961
  if (r1) {
@@ -4977,11 +4969,11 @@ export class WrapPsbt {
4977
4969
  * @param {number} output_index
4978
4970
  * @param {WrapDescriptor} descriptor
4979
4971
  */
4980
- updateOutputWithDescriptor(output_index, descriptor) {
4972
+ update_output_with_descriptor(output_index, descriptor) {
4981
4973
  try {
4982
4974
  const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
4983
4975
  _assertClass(descriptor, WrapDescriptor);
4984
- wasm.wrappsbt_updateOutputWithDescriptor(retptr, this.__wbg_ptr, output_index, descriptor.__wbg_ptr);
4976
+ wasm.wrappsbt_update_output_with_descriptor(retptr, this.__wbg_ptr, output_index, descriptor.__wbg_ptr);
4985
4977
  var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
4986
4978
  var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
4987
4979
  if (r1) {
@@ -4992,21 +4984,16 @@ export class WrapPsbt {
4992
4984
  }
4993
4985
  }
4994
4986
  /**
4995
- * Validate a signature at a specific input against a pubkey
4996
- * Returns true if the signature is valid
4997
- *
4998
- * This method handles both ECDSA (legacy/SegWit) and Schnorr (Taproot) signatures.
4999
- * The pubkey should be provided as bytes (33 bytes for compressed ECDSA, 32 bytes for x-only Schnorr).
5000
4987
  * @param {number} input_index
5001
4988
  * @param {Uint8Array} pubkey
5002
4989
  * @returns {boolean}
5003
4990
  */
5004
- validateSignatureAtInput(input_index, pubkey) {
4991
+ validate_signature_at_input(input_index, pubkey) {
5005
4992
  try {
5006
4993
  const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
5007
4994
  const ptr0 = passArray8ToWasm0(pubkey, wasm.__wbindgen_export);
5008
4995
  const len0 = WASM_VECTOR_LEN;
5009
- wasm.wrappsbt_validateSignatureAtInput(retptr, this.__wbg_ptr, input_index, ptr0, len0);
4996
+ wasm.wrappsbt_validate_signature_at_input(retptr, this.__wbg_ptr, input_index, ptr0, len0);
5010
4997
  var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
5011
4998
  var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
5012
4999
  var r2 = getDataViewMemory0().getInt32(retptr + 4 * 2, true);
@@ -5037,11 +5024,11 @@ export class WrapPsbt {
5037
5024
  * @param {WasmBIP32} key
5038
5025
  * @returns {boolean}
5039
5026
  */
5040
- verifySignatureWithKey(input_index, key) {
5027
+ verify_signature_with_key(input_index, key) {
5041
5028
  try {
5042
5029
  const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
5043
5030
  _assertClass(key, WasmBIP32);
5044
- wasm.wrappsbt_verifySignatureWithKey(retptr, this.__wbg_ptr, input_index, key.__wbg_ptr);
5031
+ wasm.wrappsbt_verify_signature_with_key(retptr, this.__wbg_ptr, input_index, key.__wbg_ptr);
5045
5032
  var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
5046
5033
  var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
5047
5034
  var r2 = getDataViewMemory0().getInt32(retptr + 4 * 2, true);
@@ -5054,7 +5041,6 @@ export class WrapPsbt {
5054
5041
  }
5055
5042
  }
5056
5043
  /**
5057
- * Get the transaction version
5058
5044
  * @returns {number}
5059
5045
  */
5060
5046
  version() {
Binary file