@bitgo/wasm-utxo 4.28.0 → 4.30.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.
@@ -1,4 +1,4 @@
1
- export declare const coinNames: readonly ["btc", "tbtc", "tbtc4", "tbtcsig", "tbtcbgsig", "tbtcreg", "bch", "tbch", "bcha", "tbcha", "btg", "tbtg", "bsv", "tbsv", "dash", "tdash", "doge", "tdoge", "ltc", "tltc", "zec", "tzec", "pearl", "tpearl"];
1
+ export declare const coinNames: readonly ["btc", "tbtc", "tbtc4", "tbtcsig", "tbtcbgsig", "tbtcreg", "bch", "tbch", "bcha", "tbcha", "btg", "tbtg", "bsv", "tbsv", "dash", "tdash", "doge", "tdoge", "ltc", "tltc", "zec", "tzec", "pearl", "tpearl", "tpearlreg"];
2
2
  export type CoinName = (typeof coinNames)[number];
3
3
  export declare function getMainnet(name: CoinName): CoinName;
4
4
  export declare function isMainnet(name: CoinName): boolean;
@@ -32,6 +32,7 @@ exports.coinNames = [
32
32
  "tzec",
33
33
  "pearl",
34
34
  "tpearl",
35
+ "tpearlreg",
35
36
  ];
36
37
  function getMainnet(name) {
37
38
  switch (name) {
@@ -58,6 +59,7 @@ function getMainnet(name) {
58
59
  case "tzec":
59
60
  return "zec";
60
61
  case "tpearl":
62
+ case "tpearlreg":
61
63
  return "pearl";
62
64
  default:
63
65
  return name;
@@ -118,9 +118,19 @@ export declare class AcidTest {
118
118
  */
119
119
  getReplayProtectionKey(): BIP32;
120
120
  /**
121
- * Create the actual PSBT with all inputs and outputs
121
+ * Create the actual PSBT with all inputs and outputs.
122
+ *
123
+ * @param options.outpoints - Optional real outpoints (txid/vout/prevTx) to replace
124
+ * the synthetic `txid=0…0` placeholders. Used by integrationLocalRpc against a
125
+ * live regtest node; length must match `inputs`.
122
126
  */
123
- createPsbt(): BitGoPsbt;
127
+ createPsbt(options?: {
128
+ outpoints?: Array<{
129
+ txid: string;
130
+ vout: number;
131
+ prevTx?: Uint8Array;
132
+ }>;
133
+ }): BitGoPsbt;
124
134
  /**
125
135
  * Sign the PSBT according to the sign stage
126
136
  */
@@ -130,9 +130,13 @@ class AcidTest {
130
130
  return this.rootWalletKeys.userKey();
131
131
  }
132
132
  /**
133
- * Create the actual PSBT with all inputs and outputs
133
+ * Create the actual PSBT with all inputs and outputs.
134
+ *
135
+ * @param options.outpoints - Optional real outpoints (txid/vout/prevTx) to replace
136
+ * the synthetic `txid=0…0` placeholders. Used by integrationLocalRpc against a
137
+ * live regtest node; length must match `inputs`.
134
138
  */
135
- createPsbt() {
139
+ createPsbt(options) {
136
140
  // Use ZcashBitGoPsbt for Zcash networks
137
141
  const isZcash = this.coin === "zec" || this.coin === "tzec";
138
142
  const psbt = isZcash
@@ -157,21 +161,35 @@ class AcidTest {
157
161
  tx.addOutput(script, value);
158
162
  return tx.toBytes();
159
163
  };
160
- // Add inputs with deterministic outpoints
164
+ if (options?.outpoints && options.outpoints.length !== this.inputs.length) {
165
+ throw new Error(`outpoints length ${options.outpoints.length} !== inputs length ${this.inputs.length}`);
166
+ }
167
+ // Add inputs with deterministic outpoints (or real outpoints when provided)
161
168
  this.inputs.forEach((input, index) => {
162
169
  const walletKeys = input.walletKeys ?? this.rootWalletKeys;
163
- const outpoint = { txid: "0".repeat(64), vout: index, value: input.value };
170
+ const real = options?.outpoints?.[index];
171
+ const outpoint = {
172
+ txid: real?.txid ?? "0".repeat(64),
173
+ vout: real?.vout ?? index,
174
+ value: input.value,
175
+ };
164
176
  // scriptId variant: caller provides explicit chain + index
165
177
  if (input.scriptId) {
166
178
  const script = (0, index_js_1.outputScript)(walletKeys, input.scriptId.chain, input.scriptId.index, this.coin);
167
- psbt.addWalletInput({ ...outpoint, prevTx: buildPrevTx(index, script, input.value) }, walletKeys, { scriptId: input.scriptId, signPath: { signer: "user", cosigner: "bitgo" } });
179
+ psbt.addWalletInput({
180
+ ...outpoint,
181
+ prevTx: real?.prevTx ?? buildPrevTx(index, script, input.value),
182
+ }, walletKeys, { scriptId: input.scriptId, signPath: { signer: "user", cosigner: "bitgo" } });
168
183
  return;
169
184
  }
170
185
  const scriptType = input.scriptType ?? "p2sh";
171
186
  if (scriptType === "p2shP2pk") {
172
187
  const ecpair = ecpair_js_1.ECPair.fromPublicKey(this.getReplayProtectionKey().publicKey);
173
188
  const script = (0, index_js_1.p2shP2pkOutputScript)(ecpair.publicKey);
174
- psbt.addReplayProtectionInput({ ...outpoint, prevTx: buildPrevTx(index, script, input.value) }, ecpair);
189
+ psbt.addReplayProtectionInput({
190
+ ...outpoint,
191
+ prevTx: real?.prevTx ?? buildPrevTx(index, script, input.value),
192
+ }, ecpair);
175
193
  return;
176
194
  }
177
195
  const scriptId = {
@@ -182,7 +200,10 @@ class AcidTest {
182
200
  ? { signer: "user", cosigner: "backup" }
183
201
  : { signer: "user", cosigner: "bitgo" };
184
202
  const script = (0, index_js_1.outputScript)(walletKeys, scriptId.chain, scriptId.index, this.coin);
185
- psbt.addWalletInput({ ...outpoint, prevTx: buildPrevTx(index, script, input.value) }, walletKeys, { scriptId, signPath });
203
+ psbt.addWalletInput({
204
+ ...outpoint,
205
+ prevTx: real?.prevTx ?? buildPrevTx(index, script, input.value),
206
+ }, walletKeys, { scriptId, signPath });
186
207
  });
187
208
  // Add outputs
188
209
  this.outputs.forEach((output, index) => {
Binary file
@@ -1,6 +1,151 @@
1
1
  /* tslint:disable */
2
2
  /* eslint-disable */
3
3
  export const memory: WebAssembly.Memory;
4
+ export const __wbg_inscriptionsnamespace_free: (a: number, b: number) => void;
5
+ export const __wbg_wasmdashtransaction_free: (a: number, b: number) => void;
6
+ export const __wbg_wasmecpair_free: (a: number, b: number) => void;
7
+ export const __wbg_wasmtransaction_free: (a: number, b: number) => void;
8
+ export const __wbg_wasmzcashtransaction_free: (a: number, b: number) => void;
9
+ export const __wbg_wrappsbt_free: (a: number, b: number) => void;
10
+ export const __wbg_zcashunifiedaddress_free: (a: number, b: number) => void;
11
+ export const __wbg_zcashv6transaction_free: (a: number, b: number) => void;
12
+ export const inscriptionsnamespace_create_inscription_reveal_data: (a: number, b: number, c: number, d: number, e: number, f: number, g: number) => void;
13
+ export const inscriptionsnamespace_sign_reveal_transaction: (a: number, b: number, c: number, d: number, e: number, f: number, g: number, h: number, i: number, j: bigint) => void;
14
+ export const wasmdashtransaction_from_bytes: (a: number, b: number, c: number) => void;
15
+ export const wasmdashtransaction_get_inputs: (a: number, b: number) => void;
16
+ export const wasmdashtransaction_get_outputs: (a: number, b: number) => void;
17
+ export const wasmdashtransaction_get_outputs_with_address: (a: number, b: number, c: number, d: number) => void;
18
+ export const wasmdashtransaction_get_txid: (a: number, b: number) => void;
19
+ export const wasmdashtransaction_input_count: (a: number) => number;
20
+ export const wasmdashtransaction_lock_time: (a: number) => number;
21
+ export const wasmdashtransaction_output_count: (a: number) => number;
22
+ export const wasmdashtransaction_to_bytes: (a: number, b: number) => void;
23
+ export const wasmdashtransaction_version: (a: number) => number;
24
+ export const wasmecpair_from_private_key: (a: number, b: number, c: number) => void;
25
+ export const wasmecpair_from_public_key: (a: number, b: number, c: number) => void;
26
+ export const wasmecpair_from_wif: (a: number, b: number, c: number) => void;
27
+ export const wasmecpair_from_wif_mainnet: (a: number, b: number, c: number) => void;
28
+ export const wasmecpair_from_wif_testnet: (a: number, b: number, c: number) => void;
29
+ export const wasmecpair_private_key: (a: number) => number;
30
+ export const wasmecpair_public_key: (a: number) => number;
31
+ export const wasmecpair_to_wif: (a: number, b: number) => void;
32
+ export const wasmecpair_to_wif_mainnet: (a: number, b: number) => void;
33
+ export const wasmecpair_to_wif_testnet: (a: number, b: number) => void;
34
+ export const wasmtransaction_add_input: (a: number, b: number, c: number, d: number, e: number, f: number) => void;
35
+ export const wasmtransaction_add_input_at_index: (a: number, b: number, c: number, d: number, e: number, f: number, g: number) => void;
36
+ export const wasmtransaction_add_output: (a: number, b: number, c: number, d: bigint) => number;
37
+ export const wasmtransaction_add_output_at_index: (a: number, b: number, c: number, d: number, e: number, f: bigint) => void;
38
+ export const wasmtransaction_create: () => number;
39
+ export const wasmtransaction_from_bytes: (a: number, b: number, c: number) => void;
40
+ export const wasmtransaction_get_inputs: (a: number, b: number) => void;
41
+ export const wasmtransaction_get_outputs: (a: number, b: number) => void;
42
+ export const wasmtransaction_get_outputs_with_address: (a: number, b: number, c: number, d: number) => void;
43
+ export const wasmtransaction_get_txid: (a: number, b: number) => void;
44
+ export const wasmtransaction_get_vsize: (a: number) => number;
45
+ export const wasmtransaction_to_bytes: (a: number, b: number) => void;
46
+ export const wasmzcashtransaction_from_bytes: (a: number, b: number, c: number) => void;
47
+ export const wasmzcashtransaction_get_inputs: (a: number, b: number) => void;
48
+ export const wasmzcashtransaction_get_outputs: (a: number, b: number) => void;
49
+ export const wasmzcashtransaction_get_outputs_with_address: (a: number, b: number, c: number, d: number) => void;
50
+ export const wasmzcashtransaction_get_txid: (a: number, b: number) => void;
51
+ export const wasmzcashtransaction_to_bytes: (a: number, b: number) => void;
52
+ export const wrappsbt_add_input: (a: number, b: number, c: number, d: number, e: number, f: bigint, g: number, h: number, i: number) => void;
53
+ export const wrappsbt_add_input_at_index: (a: number, b: number, c: number, d: number, e: number, f: number, g: bigint, h: number, i: number, j: number) => void;
54
+ export const wrappsbt_add_output: (a: number, b: number, c: number, d: bigint) => number;
55
+ export const wrappsbt_add_output_at_index: (a: number, b: number, c: number, d: number, e: number, f: bigint) => void;
56
+ export const wrappsbt_clone: (a: number) => number;
57
+ export const wrappsbt_delete_input_kv: (a: number, b: number, c: number, d: number) => void;
58
+ export const wrappsbt_delete_kv: (a: number, b: number, c: number) => void;
59
+ export const wrappsbt_delete_output_kv: (a: number, b: number, c: number, d: number) => void;
60
+ export const wrappsbt_deserialize: (a: number, b: number, c: number) => void;
61
+ export const wrappsbt_extract_transaction: (a: number, b: number) => void;
62
+ export const wrappsbt_extract_zcash_transaction: (a: number, b: number, c: number, d: number) => void;
63
+ export const wrappsbt_finalize_mut: (a: number, b: number) => void;
64
+ export const wrappsbt_finalize_mut_zcash: (a: number, b: number, c: number, d: number, e: number) => void;
65
+ export const wrappsbt_get_global_xpubs: (a: number) => number;
66
+ export const wrappsbt_get_input_kv: (a: number, b: number, c: number, d: number) => void;
67
+ export const wrappsbt_get_inputs: (a: number, b: number) => void;
68
+ export const wrappsbt_get_kv: (a: number, b: number, c: number) => void;
69
+ export const wrappsbt_get_output_kv: (a: number, b: number, c: number, d: number) => void;
70
+ export const wrappsbt_get_outputs: (a: number, b: number) => void;
71
+ export const wrappsbt_get_outputs_with_address: (a: number, b: number, c: number, d: number) => void;
72
+ export const wrappsbt_get_partial_signatures: (a: number, b: number, c: number) => void;
73
+ export const wrappsbt_get_unsigned_tx: (a: number, b: number) => void;
74
+ export const wrappsbt_has_partial_signatures: (a: number, b: number, c: number) => void;
75
+ export const wrappsbt_input_count: (a: number) => number;
76
+ export const wrappsbt_new: (a: number, b: number) => number;
77
+ export const wrappsbt_output_count: (a: number) => number;
78
+ export const wrappsbt_remove_input: (a: number, b: number, c: number) => void;
79
+ export const wrappsbt_remove_output: (a: number, b: number, c: number) => void;
80
+ export const wrappsbt_serialize: (a: number, b: number) => void;
81
+ export const wrappsbt_set_input_kv: (a: number, b: number, c: number, d: number, e: number, f: number) => void;
82
+ export const wrappsbt_set_kv: (a: number, b: number, c: number, d: number, e: number) => void;
83
+ export const wrappsbt_set_output_kv: (a: number, b: number, c: number, d: number, e: number, f: number) => void;
84
+ export const wrappsbt_sign_all: (a: number, b: number, c: number) => void;
85
+ export const wrappsbt_sign_all_with_ecpair: (a: number, b: number, c: number) => void;
86
+ export const wrappsbt_sign_with_prv: (a: number, b: number, c: number, d: number) => void;
87
+ export const wrappsbt_sign_with_xprv: (a: number, b: number, c: number, d: number) => void;
88
+ export const wrappsbt_sign_zcash_all_with_ecpair: (a: number, b: number, c: number, d: number, e: number, f: number) => void;
89
+ export const wrappsbt_sign_zcash_with_prv: (a: number, b: number, c: number, d: number, e: number, f: number, g: number) => void;
90
+ export const wrappsbt_unsigned_tx_id: (a: number, b: number) => void;
91
+ export const wrappsbt_update_input_with_descriptor: (a: number, b: number, c: number, d: number) => void;
92
+ export const wrappsbt_update_output_with_descriptor: (a: number, b: number, c: number, d: number) => void;
93
+ export const wrappsbt_validate_signature_at_input: (a: number, b: number, c: number, d: number, e: number) => void;
94
+ export const wrappsbt_verify_signature_with_key: (a: number, b: number, c: number, d: number) => void;
95
+ export const zcash_branch_id_for_height: (a: number, b: number, c: number, d: number) => void;
96
+ export const zcashunifiedaddress_contains: (a: number, b: number, c: number, d: number) => void;
97
+ export const zcashunifiedaddress_orchardReceiver: (a: number, b: number) => void;
98
+ export const zcashunifiedaddress_parse: (a: number, b: number, c: number, d: number, e: number) => void;
99
+ export const zcashunifiedaddress_saplingReceiver: (a: number, b: number) => void;
100
+ export const zcashunifiedaddress_transparentScript: (a: number, b: number) => void;
101
+ export const zcashv6transaction_consensusBranchId: (a: number) => number;
102
+ export const zcashv6transaction_expiryHeight: (a: number) => number;
103
+ export const zcashv6transaction_fromBytes: (a: number, b: number, c: number) => void;
104
+ export const zcashv6transaction_getId: (a: number, b: number) => void;
105
+ export const zcashv6transaction_ironwoodActionCount: (a: number) => number;
106
+ export const zcashv6transaction_ironwoodAnchor: (a: number, b: number) => void;
107
+ export const zcashv6transaction_ironwoodFlags: (a: number) => number;
108
+ export const zcashv6transaction_ironwoodValueBalance: (a: number) => bigint;
109
+ export const zcashv6transaction_toBytes: (a: number, b: number) => void;
110
+ export const zcashv6transaction_txidBytes: (a: number, b: number) => void;
111
+ export const wasmtransaction_input_count: (a: number) => number;
112
+ export const wasmtransaction_output_count: (a: number) => number;
113
+ export const wasmzcashtransaction_input_count: (a: number) => number;
114
+ export const wasmzcashtransaction_output_count: (a: number) => number;
115
+ export const wasmtransaction_lock_time: (a: number) => number;
116
+ export const wasmtransaction_version: (a: number) => number;
117
+ export const wasmzcashtransaction_lock_time: (a: number) => number;
118
+ export const wasmzcashtransaction_version: (a: number) => number;
119
+ export const wrappsbt_lock_time: (a: number) => number;
120
+ export const wrappsbt_version: (a: number) => number;
121
+ export const __wbg_addressnamespace_free: (a: number, b: number) => void;
122
+ export const __wbg_utxolibcompatnamespace_free: (a: number, b: number) => void;
123
+ export const __wbg_wasmdimensions_free: (a: number, b: number) => void;
124
+ export const __wbg_wasmutxonamespace_free: (a: number, b: number) => void;
125
+ export const addressnamespace_from_output_script_with_coin: (a: number, b: number, c: number, d: number, e: number, f: number, g: number) => void;
126
+ export const addressnamespace_to_output_script_with_coin: (a: number, b: number, c: number, d: number, e: number) => void;
127
+ export const isInspectEnabled: () => number;
128
+ export const parsePsbtRawToJson: (a: number, b: number, c: number, d: number, e: number) => void;
129
+ export const utxolibcompatnamespace_from_output_script: (a: number, b: number, c: number, d: number, e: number, f: number) => void;
130
+ export const utxolibcompatnamespace_to_output_script: (a: number, b: number, c: number, d: number, e: number, f: number) => void;
131
+ export const wasmdimensions_empty: () => number;
132
+ export const wasmdimensions_from_input: (a: number, b: number, c: number, d: number, e: number, f: number, g: number) => void;
133
+ export const wasmdimensions_from_input_script_type: (a: number, b: number, c: number, d: number) => void;
134
+ export const wasmdimensions_from_output_script_length: (a: number) => number;
135
+ export const wasmdimensions_from_output_script_type: (a: number, b: number, c: number) => void;
136
+ export const wasmdimensions_from_psbt: (a: number, b: number) => void;
137
+ export const wasmdimensions_get_input_vsize: (a: number, b: number, c: number) => number;
138
+ export const wasmdimensions_get_input_weight: (a: number, b: number, c: number) => number;
139
+ export const wasmdimensions_get_output_vsize: (a: number) => number;
140
+ export const wasmdimensions_get_output_weight: (a: number) => number;
141
+ export const wasmdimensions_get_vsize: (a: number, b: number, c: number) => number;
142
+ export const wasmdimensions_get_weight: (a: number, b: number, c: number) => number;
143
+ export const wasmdimensions_has_segwit: (a: number) => number;
144
+ export const wasmdimensions_plus: (a: number, b: number) => number;
145
+ export const wasmdimensions_times: (a: number, b: number) => number;
146
+ export const wasmutxonamespace_get_wasm_utxo_version: (a: number) => void;
147
+ export const parsePsbtToJson: (a: number, b: number, c: number, d: number, e: number) => void;
148
+ export const parseTxToJson: (a: number, b: number, c: number, d: number, e: number) => void;
4
149
  export const __wbg_wrapdescriptor_free: (a: number, b: number) => void;
5
150
  export const __wbg_wrapminiscript_free: (a: number, b: number) => void;
6
151
  export const wrapdescriptor_atDerivationIndex: (a: number, b: number, c: number) => void;
@@ -155,151 +300,6 @@ export const wasmbip32_from_bip32_properties: (a: number, b: number) => void;
155
300
  export const bitgopsbt_sign_replay_protection_inputs: (a: number, b: number, c: number) => void;
156
301
  export const bitgopsbt_sign_wallet_input: (a: number, b: number, c: number, d: number) => void;
157
302
  export const bitgopsbt_sign_all_with_xpriv: (a: number, b: number, c: number) => void;
158
- export const __wbg_addressnamespace_free: (a: number, b: number) => void;
159
- export const __wbg_utxolibcompatnamespace_free: (a: number, b: number) => void;
160
- export const __wbg_wasmdimensions_free: (a: number, b: number) => void;
161
- export const __wbg_wasmutxonamespace_free: (a: number, b: number) => void;
162
- export const addressnamespace_from_output_script_with_coin: (a: number, b: number, c: number, d: number, e: number, f: number, g: number) => void;
163
- export const addressnamespace_to_output_script_with_coin: (a: number, b: number, c: number, d: number, e: number) => void;
164
- export const parsePsbtRawToJson: (a: number, b: number, c: number, d: number, e: number) => void;
165
- export const utxolibcompatnamespace_from_output_script: (a: number, b: number, c: number, d: number, e: number, f: number) => void;
166
- export const utxolibcompatnamespace_to_output_script: (a: number, b: number, c: number, d: number, e: number, f: number) => void;
167
- export const wasmdimensions_empty: () => number;
168
- export const wasmdimensions_from_input: (a: number, b: number, c: number, d: number, e: number, f: number, g: number) => void;
169
- export const wasmdimensions_from_input_script_type: (a: number, b: number, c: number, d: number) => void;
170
- export const wasmdimensions_from_output_script_length: (a: number) => number;
171
- export const wasmdimensions_from_output_script_type: (a: number, b: number, c: number) => void;
172
- export const wasmdimensions_from_psbt: (a: number, b: number) => void;
173
- export const wasmdimensions_get_input_vsize: (a: number, b: number, c: number) => number;
174
- export const wasmdimensions_get_input_weight: (a: number, b: number, c: number) => number;
175
- export const wasmdimensions_get_output_vsize: (a: number) => number;
176
- export const wasmdimensions_get_output_weight: (a: number) => number;
177
- export const wasmdimensions_get_vsize: (a: number, b: number, c: number) => number;
178
- export const wasmdimensions_get_weight: (a: number, b: number, c: number) => number;
179
- export const wasmdimensions_has_segwit: (a: number) => number;
180
- export const wasmdimensions_plus: (a: number, b: number) => number;
181
- export const wasmdimensions_times: (a: number, b: number) => number;
182
- export const wasmutxonamespace_get_wasm_utxo_version: (a: number) => void;
183
- export const isInspectEnabled: () => number;
184
- export const parsePsbtToJson: (a: number, b: number, c: number, d: number, e: number) => void;
185
- export const parseTxToJson: (a: number, b: number, c: number, d: number, e: number) => void;
186
- export const __wbg_inscriptionsnamespace_free: (a: number, b: number) => void;
187
- export const __wbg_wasmdashtransaction_free: (a: number, b: number) => void;
188
- export const __wbg_wasmecpair_free: (a: number, b: number) => void;
189
- export const __wbg_wasmtransaction_free: (a: number, b: number) => void;
190
- export const __wbg_wasmzcashtransaction_free: (a: number, b: number) => void;
191
- export const __wbg_wrappsbt_free: (a: number, b: number) => void;
192
- export const __wbg_zcashunifiedaddress_free: (a: number, b: number) => void;
193
- export const __wbg_zcashv6transaction_free: (a: number, b: number) => void;
194
- export const inscriptionsnamespace_create_inscription_reveal_data: (a: number, b: number, c: number, d: number, e: number, f: number, g: number) => void;
195
- export const inscriptionsnamespace_sign_reveal_transaction: (a: number, b: number, c: number, d: number, e: number, f: number, g: number, h: number, i: number, j: bigint) => void;
196
- export const wasmdashtransaction_from_bytes: (a: number, b: number, c: number) => void;
197
- export const wasmdashtransaction_get_inputs: (a: number, b: number) => void;
198
- export const wasmdashtransaction_get_outputs: (a: number, b: number) => void;
199
- export const wasmdashtransaction_get_outputs_with_address: (a: number, b: number, c: number, d: number) => void;
200
- export const wasmdashtransaction_get_txid: (a: number, b: number) => void;
201
- export const wasmdashtransaction_input_count: (a: number) => number;
202
- export const wasmdashtransaction_lock_time: (a: number) => number;
203
- export const wasmdashtransaction_output_count: (a: number) => number;
204
- export const wasmdashtransaction_to_bytes: (a: number, b: number) => void;
205
- export const wasmdashtransaction_version: (a: number) => number;
206
- export const wasmecpair_from_private_key: (a: number, b: number, c: number) => void;
207
- export const wasmecpair_from_public_key: (a: number, b: number, c: number) => void;
208
- export const wasmecpair_from_wif: (a: number, b: number, c: number) => void;
209
- export const wasmecpair_from_wif_mainnet: (a: number, b: number, c: number) => void;
210
- export const wasmecpair_from_wif_testnet: (a: number, b: number, c: number) => void;
211
- export const wasmecpair_private_key: (a: number) => number;
212
- export const wasmecpair_public_key: (a: number) => number;
213
- export const wasmecpair_to_wif: (a: number, b: number) => void;
214
- export const wasmecpair_to_wif_mainnet: (a: number, b: number) => void;
215
- export const wasmecpair_to_wif_testnet: (a: number, b: number) => void;
216
- export const wasmtransaction_add_input: (a: number, b: number, c: number, d: number, e: number, f: number) => void;
217
- export const wasmtransaction_add_input_at_index: (a: number, b: number, c: number, d: number, e: number, f: number, g: number) => void;
218
- export const wasmtransaction_add_output: (a: number, b: number, c: number, d: bigint) => number;
219
- export const wasmtransaction_add_output_at_index: (a: number, b: number, c: number, d: number, e: number, f: bigint) => void;
220
- export const wasmtransaction_create: () => number;
221
- export const wasmtransaction_from_bytes: (a: number, b: number, c: number) => void;
222
- export const wasmtransaction_get_inputs: (a: number, b: number) => void;
223
- export const wasmtransaction_get_outputs: (a: number, b: number) => void;
224
- export const wasmtransaction_get_outputs_with_address: (a: number, b: number, c: number, d: number) => void;
225
- export const wasmtransaction_get_txid: (a: number, b: number) => void;
226
- export const wasmtransaction_get_vsize: (a: number) => number;
227
- export const wasmtransaction_to_bytes: (a: number, b: number) => void;
228
- export const wasmzcashtransaction_from_bytes: (a: number, b: number, c: number) => void;
229
- export const wasmzcashtransaction_get_inputs: (a: number, b: number) => void;
230
- export const wasmzcashtransaction_get_outputs: (a: number, b: number) => void;
231
- export const wasmzcashtransaction_get_outputs_with_address: (a: number, b: number, c: number, d: number) => void;
232
- export const wasmzcashtransaction_get_txid: (a: number, b: number) => void;
233
- export const wasmzcashtransaction_to_bytes: (a: number, b: number) => void;
234
- export const wrappsbt_add_input: (a: number, b: number, c: number, d: number, e: number, f: bigint, g: number, h: number, i: number) => void;
235
- export const wrappsbt_add_input_at_index: (a: number, b: number, c: number, d: number, e: number, f: number, g: bigint, h: number, i: number, j: number) => void;
236
- export const wrappsbt_add_output: (a: number, b: number, c: number, d: bigint) => number;
237
- export const wrappsbt_add_output_at_index: (a: number, b: number, c: number, d: number, e: number, f: bigint) => void;
238
- export const wrappsbt_clone: (a: number) => number;
239
- export const wrappsbt_delete_input_kv: (a: number, b: number, c: number, d: number) => void;
240
- export const wrappsbt_delete_kv: (a: number, b: number, c: number) => void;
241
- export const wrappsbt_delete_output_kv: (a: number, b: number, c: number, d: number) => void;
242
- export const wrappsbt_deserialize: (a: number, b: number, c: number) => void;
243
- export const wrappsbt_extract_transaction: (a: number, b: number) => void;
244
- export const wrappsbt_extract_zcash_transaction: (a: number, b: number, c: number, d: number) => void;
245
- export const wrappsbt_finalize_mut: (a: number, b: number) => void;
246
- export const wrappsbt_finalize_mut_zcash: (a: number, b: number, c: number, d: number, e: number) => void;
247
- export const wrappsbt_get_global_xpubs: (a: number) => number;
248
- export const wrappsbt_get_input_kv: (a: number, b: number, c: number, d: number) => void;
249
- export const wrappsbt_get_inputs: (a: number, b: number) => void;
250
- export const wrappsbt_get_kv: (a: number, b: number, c: number) => void;
251
- export const wrappsbt_get_output_kv: (a: number, b: number, c: number, d: number) => void;
252
- export const wrappsbt_get_outputs: (a: number, b: number) => void;
253
- export const wrappsbt_get_outputs_with_address: (a: number, b: number, c: number, d: number) => void;
254
- export const wrappsbt_get_partial_signatures: (a: number, b: number, c: number) => void;
255
- export const wrappsbt_get_unsigned_tx: (a: number, b: number) => void;
256
- export const wrappsbt_has_partial_signatures: (a: number, b: number, c: number) => void;
257
- export const wrappsbt_input_count: (a: number) => number;
258
- export const wrappsbt_new: (a: number, b: number) => number;
259
- export const wrappsbt_output_count: (a: number) => number;
260
- export const wrappsbt_remove_input: (a: number, b: number, c: number) => void;
261
- export const wrappsbt_remove_output: (a: number, b: number, c: number) => void;
262
- export const wrappsbt_serialize: (a: number, b: number) => void;
263
- export const wrappsbt_set_input_kv: (a: number, b: number, c: number, d: number, e: number, f: number) => void;
264
- export const wrappsbt_set_kv: (a: number, b: number, c: number, d: number, e: number) => void;
265
- export const wrappsbt_set_output_kv: (a: number, b: number, c: number, d: number, e: number, f: number) => void;
266
- export const wrappsbt_sign_all: (a: number, b: number, c: number) => void;
267
- export const wrappsbt_sign_all_with_ecpair: (a: number, b: number, c: number) => void;
268
- export const wrappsbt_sign_with_prv: (a: number, b: number, c: number, d: number) => void;
269
- export const wrappsbt_sign_with_xprv: (a: number, b: number, c: number, d: number) => void;
270
- export const wrappsbt_sign_zcash_all_with_ecpair: (a: number, b: number, c: number, d: number, e: number, f: number) => void;
271
- export const wrappsbt_sign_zcash_with_prv: (a: number, b: number, c: number, d: number, e: number, f: number, g: number) => void;
272
- export const wrappsbt_unsigned_tx_id: (a: number, b: number) => void;
273
- export const wrappsbt_update_input_with_descriptor: (a: number, b: number, c: number, d: number) => void;
274
- export const wrappsbt_update_output_with_descriptor: (a: number, b: number, c: number, d: number) => void;
275
- export const wrappsbt_validate_signature_at_input: (a: number, b: number, c: number, d: number, e: number) => void;
276
- export const wrappsbt_verify_signature_with_key: (a: number, b: number, c: number, d: number) => void;
277
- export const zcash_branch_id_for_height: (a: number, b: number, c: number, d: number) => void;
278
- export const zcashunifiedaddress_contains: (a: number, b: number, c: number, d: number) => void;
279
- export const zcashunifiedaddress_orchardReceiver: (a: number, b: number) => void;
280
- export const zcashunifiedaddress_parse: (a: number, b: number, c: number, d: number, e: number) => void;
281
- export const zcashunifiedaddress_saplingReceiver: (a: number, b: number) => void;
282
- export const zcashunifiedaddress_transparentScript: (a: number, b: number) => void;
283
- export const zcashv6transaction_consensusBranchId: (a: number) => number;
284
- export const zcashv6transaction_expiryHeight: (a: number) => number;
285
- export const zcashv6transaction_fromBytes: (a: number, b: number, c: number) => void;
286
- export const zcashv6transaction_getId: (a: number, b: number) => void;
287
- export const zcashv6transaction_ironwoodActionCount: (a: number) => number;
288
- export const zcashv6transaction_ironwoodAnchor: (a: number, b: number) => void;
289
- export const zcashv6transaction_ironwoodFlags: (a: number) => number;
290
- export const zcashv6transaction_ironwoodValueBalance: (a: number) => bigint;
291
- export const zcashv6transaction_toBytes: (a: number, b: number) => void;
292
- export const zcashv6transaction_txidBytes: (a: number, b: number) => void;
293
- export const wasmtransaction_input_count: (a: number) => number;
294
- export const wasmtransaction_output_count: (a: number) => number;
295
- export const wasmzcashtransaction_input_count: (a: number) => number;
296
- export const wasmzcashtransaction_output_count: (a: number) => number;
297
- export const wasmtransaction_lock_time: (a: number) => number;
298
- export const wasmtransaction_version: (a: number) => number;
299
- export const wasmzcashtransaction_lock_time: (a: number) => number;
300
- export const wasmzcashtransaction_version: (a: number) => number;
301
- export const wrappsbt_lock_time: (a: number) => number;
302
- export const wrappsbt_version: (a: number) => number;
303
303
  export const rustsecp256k1_v0_10_0_context_create: (a: number) => number;
304
304
  export const rustsecp256k1_v0_10_0_context_destroy: (a: number) => void;
305
305
  export const rustsecp256k1_v0_10_0_default_error_callback_fn: (a: number, b: number) => void;
@@ -1,4 +1,4 @@
1
- export declare const coinNames: readonly ["btc", "tbtc", "tbtc4", "tbtcsig", "tbtcbgsig", "tbtcreg", "bch", "tbch", "bcha", "tbcha", "btg", "tbtg", "bsv", "tbsv", "dash", "tdash", "doge", "tdoge", "ltc", "tltc", "zec", "tzec", "pearl", "tpearl"];
1
+ export declare const coinNames: readonly ["btc", "tbtc", "tbtc4", "tbtcsig", "tbtcbgsig", "tbtcreg", "bch", "tbch", "bcha", "tbcha", "btg", "tbtg", "bsv", "tbsv", "dash", "tdash", "doge", "tdoge", "ltc", "tltc", "zec", "tzec", "pearl", "tpearl", "tpearlreg"];
2
2
  export type CoinName = (typeof coinNames)[number];
3
3
  export declare function getMainnet(name: CoinName): CoinName;
4
4
  export declare function isMainnet(name: CoinName): boolean;
@@ -24,6 +24,7 @@ export const coinNames = [
24
24
  "tzec",
25
25
  "pearl",
26
26
  "tpearl",
27
+ "tpearlreg",
27
28
  ];
28
29
  export function getMainnet(name) {
29
30
  switch (name) {
@@ -50,6 +51,7 @@ export function getMainnet(name) {
50
51
  case "tzec":
51
52
  return "zec";
52
53
  case "tpearl":
54
+ case "tpearlreg":
53
55
  return "pearl";
54
56
  default:
55
57
  return name;
@@ -118,9 +118,19 @@ export declare class AcidTest {
118
118
  */
119
119
  getReplayProtectionKey(): BIP32;
120
120
  /**
121
- * Create the actual PSBT with all inputs and outputs
121
+ * Create the actual PSBT with all inputs and outputs.
122
+ *
123
+ * @param options.outpoints - Optional real outpoints (txid/vout/prevTx) to replace
124
+ * the synthetic `txid=0…0` placeholders. Used by integrationLocalRpc against a
125
+ * live regtest node; length must match `inputs`.
122
126
  */
123
- createPsbt(): BitGoPsbt;
127
+ createPsbt(options?: {
128
+ outpoints?: Array<{
129
+ txid: string;
130
+ vout: number;
131
+ prevTx?: Uint8Array;
132
+ }>;
133
+ }): BitGoPsbt;
124
134
  /**
125
135
  * Sign the PSBT according to the sign stage
126
136
  */
@@ -127,9 +127,13 @@ export class AcidTest {
127
127
  return this.rootWalletKeys.userKey();
128
128
  }
129
129
  /**
130
- * Create the actual PSBT with all inputs and outputs
130
+ * Create the actual PSBT with all inputs and outputs.
131
+ *
132
+ * @param options.outpoints - Optional real outpoints (txid/vout/prevTx) to replace
133
+ * the synthetic `txid=0…0` placeholders. Used by integrationLocalRpc against a
134
+ * live regtest node; length must match `inputs`.
131
135
  */
132
- createPsbt() {
136
+ createPsbt(options) {
133
137
  // Use ZcashBitGoPsbt for Zcash networks
134
138
  const isZcash = this.coin === "zec" || this.coin === "tzec";
135
139
  const psbt = isZcash
@@ -154,21 +158,35 @@ export class AcidTest {
154
158
  tx.addOutput(script, value);
155
159
  return tx.toBytes();
156
160
  };
157
- // Add inputs with deterministic outpoints
161
+ if (options?.outpoints && options.outpoints.length !== this.inputs.length) {
162
+ throw new Error(`outpoints length ${options.outpoints.length} !== inputs length ${this.inputs.length}`);
163
+ }
164
+ // Add inputs with deterministic outpoints (or real outpoints when provided)
158
165
  this.inputs.forEach((input, index) => {
159
166
  const walletKeys = input.walletKeys ?? this.rootWalletKeys;
160
- const outpoint = { txid: "0".repeat(64), vout: index, value: input.value };
167
+ const real = options?.outpoints?.[index];
168
+ const outpoint = {
169
+ txid: real?.txid ?? "0".repeat(64),
170
+ vout: real?.vout ?? index,
171
+ value: input.value,
172
+ };
161
173
  // scriptId variant: caller provides explicit chain + index
162
174
  if (input.scriptId) {
163
175
  const script = outputScript(walletKeys, input.scriptId.chain, input.scriptId.index, this.coin);
164
- psbt.addWalletInput({ ...outpoint, prevTx: buildPrevTx(index, script, input.value) }, walletKeys, { scriptId: input.scriptId, signPath: { signer: "user", cosigner: "bitgo" } });
176
+ psbt.addWalletInput({
177
+ ...outpoint,
178
+ prevTx: real?.prevTx ?? buildPrevTx(index, script, input.value),
179
+ }, walletKeys, { scriptId: input.scriptId, signPath: { signer: "user", cosigner: "bitgo" } });
165
180
  return;
166
181
  }
167
182
  const scriptType = input.scriptType ?? "p2sh";
168
183
  if (scriptType === "p2shP2pk") {
169
184
  const ecpair = ECPair.fromPublicKey(this.getReplayProtectionKey().publicKey);
170
185
  const script = p2shP2pkOutputScript(ecpair.publicKey);
171
- psbt.addReplayProtectionInput({ ...outpoint, prevTx: buildPrevTx(index, script, input.value) }, ecpair);
186
+ psbt.addReplayProtectionInput({
187
+ ...outpoint,
188
+ prevTx: real?.prevTx ?? buildPrevTx(index, script, input.value),
189
+ }, ecpair);
172
190
  return;
173
191
  }
174
192
  const scriptId = {
@@ -179,7 +197,10 @@ export class AcidTest {
179
197
  ? { signer: "user", cosigner: "backup" }
180
198
  : { signer: "user", cosigner: "bitgo" };
181
199
  const script = outputScript(walletKeys, scriptId.chain, scriptId.index, this.coin);
182
- psbt.addWalletInput({ ...outpoint, prevTx: buildPrevTx(index, script, input.value) }, walletKeys, { scriptId, signPath });
200
+ psbt.addWalletInput({
201
+ ...outpoint,
202
+ prevTx: real?.prevTx ?? buildPrevTx(index, script, input.value),
203
+ }, walletKeys, { scriptId, signPath });
183
204
  });
184
205
  // Add outputs
185
206
  this.outputs.forEach((output, index) => {
Binary file
@@ -1,6 +1,151 @@
1
1
  /* tslint:disable */
2
2
  /* eslint-disable */
3
3
  export const memory: WebAssembly.Memory;
4
+ export const __wbg_inscriptionsnamespace_free: (a: number, b: number) => void;
5
+ export const __wbg_wasmdashtransaction_free: (a: number, b: number) => void;
6
+ export const __wbg_wasmecpair_free: (a: number, b: number) => void;
7
+ export const __wbg_wasmtransaction_free: (a: number, b: number) => void;
8
+ export const __wbg_wasmzcashtransaction_free: (a: number, b: number) => void;
9
+ export const __wbg_wrappsbt_free: (a: number, b: number) => void;
10
+ export const __wbg_zcashunifiedaddress_free: (a: number, b: number) => void;
11
+ export const __wbg_zcashv6transaction_free: (a: number, b: number) => void;
12
+ export const inscriptionsnamespace_create_inscription_reveal_data: (a: number, b: number, c: number, d: number, e: number, f: number, g: number) => void;
13
+ export const inscriptionsnamespace_sign_reveal_transaction: (a: number, b: number, c: number, d: number, e: number, f: number, g: number, h: number, i: number, j: bigint) => void;
14
+ export const wasmdashtransaction_from_bytes: (a: number, b: number, c: number) => void;
15
+ export const wasmdashtransaction_get_inputs: (a: number, b: number) => void;
16
+ export const wasmdashtransaction_get_outputs: (a: number, b: number) => void;
17
+ export const wasmdashtransaction_get_outputs_with_address: (a: number, b: number, c: number, d: number) => void;
18
+ export const wasmdashtransaction_get_txid: (a: number, b: number) => void;
19
+ export const wasmdashtransaction_input_count: (a: number) => number;
20
+ export const wasmdashtransaction_lock_time: (a: number) => number;
21
+ export const wasmdashtransaction_output_count: (a: number) => number;
22
+ export const wasmdashtransaction_to_bytes: (a: number, b: number) => void;
23
+ export const wasmdashtransaction_version: (a: number) => number;
24
+ export const wasmecpair_from_private_key: (a: number, b: number, c: number) => void;
25
+ export const wasmecpair_from_public_key: (a: number, b: number, c: number) => void;
26
+ export const wasmecpair_from_wif: (a: number, b: number, c: number) => void;
27
+ export const wasmecpair_from_wif_mainnet: (a: number, b: number, c: number) => void;
28
+ export const wasmecpair_from_wif_testnet: (a: number, b: number, c: number) => void;
29
+ export const wasmecpair_private_key: (a: number) => number;
30
+ export const wasmecpair_public_key: (a: number) => number;
31
+ export const wasmecpair_to_wif: (a: number, b: number) => void;
32
+ export const wasmecpair_to_wif_mainnet: (a: number, b: number) => void;
33
+ export const wasmecpair_to_wif_testnet: (a: number, b: number) => void;
34
+ export const wasmtransaction_add_input: (a: number, b: number, c: number, d: number, e: number, f: number) => void;
35
+ export const wasmtransaction_add_input_at_index: (a: number, b: number, c: number, d: number, e: number, f: number, g: number) => void;
36
+ export const wasmtransaction_add_output: (a: number, b: number, c: number, d: bigint) => number;
37
+ export const wasmtransaction_add_output_at_index: (a: number, b: number, c: number, d: number, e: number, f: bigint) => void;
38
+ export const wasmtransaction_create: () => number;
39
+ export const wasmtransaction_from_bytes: (a: number, b: number, c: number) => void;
40
+ export const wasmtransaction_get_inputs: (a: number, b: number) => void;
41
+ export const wasmtransaction_get_outputs: (a: number, b: number) => void;
42
+ export const wasmtransaction_get_outputs_with_address: (a: number, b: number, c: number, d: number) => void;
43
+ export const wasmtransaction_get_txid: (a: number, b: number) => void;
44
+ export const wasmtransaction_get_vsize: (a: number) => number;
45
+ export const wasmtransaction_to_bytes: (a: number, b: number) => void;
46
+ export const wasmzcashtransaction_from_bytes: (a: number, b: number, c: number) => void;
47
+ export const wasmzcashtransaction_get_inputs: (a: number, b: number) => void;
48
+ export const wasmzcashtransaction_get_outputs: (a: number, b: number) => void;
49
+ export const wasmzcashtransaction_get_outputs_with_address: (a: number, b: number, c: number, d: number) => void;
50
+ export const wasmzcashtransaction_get_txid: (a: number, b: number) => void;
51
+ export const wasmzcashtransaction_to_bytes: (a: number, b: number) => void;
52
+ export const wrappsbt_add_input: (a: number, b: number, c: number, d: number, e: number, f: bigint, g: number, h: number, i: number) => void;
53
+ export const wrappsbt_add_input_at_index: (a: number, b: number, c: number, d: number, e: number, f: number, g: bigint, h: number, i: number, j: number) => void;
54
+ export const wrappsbt_add_output: (a: number, b: number, c: number, d: bigint) => number;
55
+ export const wrappsbt_add_output_at_index: (a: number, b: number, c: number, d: number, e: number, f: bigint) => void;
56
+ export const wrappsbt_clone: (a: number) => number;
57
+ export const wrappsbt_delete_input_kv: (a: number, b: number, c: number, d: number) => void;
58
+ export const wrappsbt_delete_kv: (a: number, b: number, c: number) => void;
59
+ export const wrappsbt_delete_output_kv: (a: number, b: number, c: number, d: number) => void;
60
+ export const wrappsbt_deserialize: (a: number, b: number, c: number) => void;
61
+ export const wrappsbt_extract_transaction: (a: number, b: number) => void;
62
+ export const wrappsbt_extract_zcash_transaction: (a: number, b: number, c: number, d: number) => void;
63
+ export const wrappsbt_finalize_mut: (a: number, b: number) => void;
64
+ export const wrappsbt_finalize_mut_zcash: (a: number, b: number, c: number, d: number, e: number) => void;
65
+ export const wrappsbt_get_global_xpubs: (a: number) => number;
66
+ export const wrappsbt_get_input_kv: (a: number, b: number, c: number, d: number) => void;
67
+ export const wrappsbt_get_inputs: (a: number, b: number) => void;
68
+ export const wrappsbt_get_kv: (a: number, b: number, c: number) => void;
69
+ export const wrappsbt_get_output_kv: (a: number, b: number, c: number, d: number) => void;
70
+ export const wrappsbt_get_outputs: (a: number, b: number) => void;
71
+ export const wrappsbt_get_outputs_with_address: (a: number, b: number, c: number, d: number) => void;
72
+ export const wrappsbt_get_partial_signatures: (a: number, b: number, c: number) => void;
73
+ export const wrappsbt_get_unsigned_tx: (a: number, b: number) => void;
74
+ export const wrappsbt_has_partial_signatures: (a: number, b: number, c: number) => void;
75
+ export const wrappsbt_input_count: (a: number) => number;
76
+ export const wrappsbt_new: (a: number, b: number) => number;
77
+ export const wrappsbt_output_count: (a: number) => number;
78
+ export const wrappsbt_remove_input: (a: number, b: number, c: number) => void;
79
+ export const wrappsbt_remove_output: (a: number, b: number, c: number) => void;
80
+ export const wrappsbt_serialize: (a: number, b: number) => void;
81
+ export const wrappsbt_set_input_kv: (a: number, b: number, c: number, d: number, e: number, f: number) => void;
82
+ export const wrappsbt_set_kv: (a: number, b: number, c: number, d: number, e: number) => void;
83
+ export const wrappsbt_set_output_kv: (a: number, b: number, c: number, d: number, e: number, f: number) => void;
84
+ export const wrappsbt_sign_all: (a: number, b: number, c: number) => void;
85
+ export const wrappsbt_sign_all_with_ecpair: (a: number, b: number, c: number) => void;
86
+ export const wrappsbt_sign_with_prv: (a: number, b: number, c: number, d: number) => void;
87
+ export const wrappsbt_sign_with_xprv: (a: number, b: number, c: number, d: number) => void;
88
+ export const wrappsbt_sign_zcash_all_with_ecpair: (a: number, b: number, c: number, d: number, e: number, f: number) => void;
89
+ export const wrappsbt_sign_zcash_with_prv: (a: number, b: number, c: number, d: number, e: number, f: number, g: number) => void;
90
+ export const wrappsbt_unsigned_tx_id: (a: number, b: number) => void;
91
+ export const wrappsbt_update_input_with_descriptor: (a: number, b: number, c: number, d: number) => void;
92
+ export const wrappsbt_update_output_with_descriptor: (a: number, b: number, c: number, d: number) => void;
93
+ export const wrappsbt_validate_signature_at_input: (a: number, b: number, c: number, d: number, e: number) => void;
94
+ export const wrappsbt_verify_signature_with_key: (a: number, b: number, c: number, d: number) => void;
95
+ export const zcash_branch_id_for_height: (a: number, b: number, c: number, d: number) => void;
96
+ export const zcashunifiedaddress_contains: (a: number, b: number, c: number, d: number) => void;
97
+ export const zcashunifiedaddress_orchardReceiver: (a: number, b: number) => void;
98
+ export const zcashunifiedaddress_parse: (a: number, b: number, c: number, d: number, e: number) => void;
99
+ export const zcashunifiedaddress_saplingReceiver: (a: number, b: number) => void;
100
+ export const zcashunifiedaddress_transparentScript: (a: number, b: number) => void;
101
+ export const zcashv6transaction_consensusBranchId: (a: number) => number;
102
+ export const zcashv6transaction_expiryHeight: (a: number) => number;
103
+ export const zcashv6transaction_fromBytes: (a: number, b: number, c: number) => void;
104
+ export const zcashv6transaction_getId: (a: number, b: number) => void;
105
+ export const zcashv6transaction_ironwoodActionCount: (a: number) => number;
106
+ export const zcashv6transaction_ironwoodAnchor: (a: number, b: number) => void;
107
+ export const zcashv6transaction_ironwoodFlags: (a: number) => number;
108
+ export const zcashv6transaction_ironwoodValueBalance: (a: number) => bigint;
109
+ export const zcashv6transaction_toBytes: (a: number, b: number) => void;
110
+ export const zcashv6transaction_txidBytes: (a: number, b: number) => void;
111
+ export const wasmtransaction_input_count: (a: number) => number;
112
+ export const wasmtransaction_output_count: (a: number) => number;
113
+ export const wasmzcashtransaction_input_count: (a: number) => number;
114
+ export const wasmzcashtransaction_output_count: (a: number) => number;
115
+ export const wasmtransaction_lock_time: (a: number) => number;
116
+ export const wasmtransaction_version: (a: number) => number;
117
+ export const wasmzcashtransaction_lock_time: (a: number) => number;
118
+ export const wasmzcashtransaction_version: (a: number) => number;
119
+ export const wrappsbt_lock_time: (a: number) => number;
120
+ export const wrappsbt_version: (a: number) => number;
121
+ export const __wbg_addressnamespace_free: (a: number, b: number) => void;
122
+ export const __wbg_utxolibcompatnamespace_free: (a: number, b: number) => void;
123
+ export const __wbg_wasmdimensions_free: (a: number, b: number) => void;
124
+ export const __wbg_wasmutxonamespace_free: (a: number, b: number) => void;
125
+ export const addressnamespace_from_output_script_with_coin: (a: number, b: number, c: number, d: number, e: number, f: number, g: number) => void;
126
+ export const addressnamespace_to_output_script_with_coin: (a: number, b: number, c: number, d: number, e: number) => void;
127
+ export const isInspectEnabled: () => number;
128
+ export const parsePsbtRawToJson: (a: number, b: number, c: number, d: number, e: number) => void;
129
+ export const utxolibcompatnamespace_from_output_script: (a: number, b: number, c: number, d: number, e: number, f: number) => void;
130
+ export const utxolibcompatnamespace_to_output_script: (a: number, b: number, c: number, d: number, e: number, f: number) => void;
131
+ export const wasmdimensions_empty: () => number;
132
+ export const wasmdimensions_from_input: (a: number, b: number, c: number, d: number, e: number, f: number, g: number) => void;
133
+ export const wasmdimensions_from_input_script_type: (a: number, b: number, c: number, d: number) => void;
134
+ export const wasmdimensions_from_output_script_length: (a: number) => number;
135
+ export const wasmdimensions_from_output_script_type: (a: number, b: number, c: number) => void;
136
+ export const wasmdimensions_from_psbt: (a: number, b: number) => void;
137
+ export const wasmdimensions_get_input_vsize: (a: number, b: number, c: number) => number;
138
+ export const wasmdimensions_get_input_weight: (a: number, b: number, c: number) => number;
139
+ export const wasmdimensions_get_output_vsize: (a: number) => number;
140
+ export const wasmdimensions_get_output_weight: (a: number) => number;
141
+ export const wasmdimensions_get_vsize: (a: number, b: number, c: number) => number;
142
+ export const wasmdimensions_get_weight: (a: number, b: number, c: number) => number;
143
+ export const wasmdimensions_has_segwit: (a: number) => number;
144
+ export const wasmdimensions_plus: (a: number, b: number) => number;
145
+ export const wasmdimensions_times: (a: number, b: number) => number;
146
+ export const wasmutxonamespace_get_wasm_utxo_version: (a: number) => void;
147
+ export const parsePsbtToJson: (a: number, b: number, c: number, d: number, e: number) => void;
148
+ export const parseTxToJson: (a: number, b: number, c: number, d: number, e: number) => void;
4
149
  export const __wbg_wrapdescriptor_free: (a: number, b: number) => void;
5
150
  export const __wbg_wrapminiscript_free: (a: number, b: number) => void;
6
151
  export const wrapdescriptor_atDerivationIndex: (a: number, b: number, c: number) => void;
@@ -155,151 +300,6 @@ export const wasmbip32_from_bip32_properties: (a: number, b: number) => void;
155
300
  export const bitgopsbt_sign_replay_protection_inputs: (a: number, b: number, c: number) => void;
156
301
  export const bitgopsbt_sign_wallet_input: (a: number, b: number, c: number, d: number) => void;
157
302
  export const bitgopsbt_sign_all_with_xpriv: (a: number, b: number, c: number) => void;
158
- export const __wbg_addressnamespace_free: (a: number, b: number) => void;
159
- export const __wbg_utxolibcompatnamespace_free: (a: number, b: number) => void;
160
- export const __wbg_wasmdimensions_free: (a: number, b: number) => void;
161
- export const __wbg_wasmutxonamespace_free: (a: number, b: number) => void;
162
- export const addressnamespace_from_output_script_with_coin: (a: number, b: number, c: number, d: number, e: number, f: number, g: number) => void;
163
- export const addressnamespace_to_output_script_with_coin: (a: number, b: number, c: number, d: number, e: number) => void;
164
- export const parsePsbtRawToJson: (a: number, b: number, c: number, d: number, e: number) => void;
165
- export const utxolibcompatnamespace_from_output_script: (a: number, b: number, c: number, d: number, e: number, f: number) => void;
166
- export const utxolibcompatnamespace_to_output_script: (a: number, b: number, c: number, d: number, e: number, f: number) => void;
167
- export const wasmdimensions_empty: () => number;
168
- export const wasmdimensions_from_input: (a: number, b: number, c: number, d: number, e: number, f: number, g: number) => void;
169
- export const wasmdimensions_from_input_script_type: (a: number, b: number, c: number, d: number) => void;
170
- export const wasmdimensions_from_output_script_length: (a: number) => number;
171
- export const wasmdimensions_from_output_script_type: (a: number, b: number, c: number) => void;
172
- export const wasmdimensions_from_psbt: (a: number, b: number) => void;
173
- export const wasmdimensions_get_input_vsize: (a: number, b: number, c: number) => number;
174
- export const wasmdimensions_get_input_weight: (a: number, b: number, c: number) => number;
175
- export const wasmdimensions_get_output_vsize: (a: number) => number;
176
- export const wasmdimensions_get_output_weight: (a: number) => number;
177
- export const wasmdimensions_get_vsize: (a: number, b: number, c: number) => number;
178
- export const wasmdimensions_get_weight: (a: number, b: number, c: number) => number;
179
- export const wasmdimensions_has_segwit: (a: number) => number;
180
- export const wasmdimensions_plus: (a: number, b: number) => number;
181
- export const wasmdimensions_times: (a: number, b: number) => number;
182
- export const wasmutxonamespace_get_wasm_utxo_version: (a: number) => void;
183
- export const isInspectEnabled: () => number;
184
- export const parsePsbtToJson: (a: number, b: number, c: number, d: number, e: number) => void;
185
- export const parseTxToJson: (a: number, b: number, c: number, d: number, e: number) => void;
186
- export const __wbg_inscriptionsnamespace_free: (a: number, b: number) => void;
187
- export const __wbg_wasmdashtransaction_free: (a: number, b: number) => void;
188
- export const __wbg_wasmecpair_free: (a: number, b: number) => void;
189
- export const __wbg_wasmtransaction_free: (a: number, b: number) => void;
190
- export const __wbg_wasmzcashtransaction_free: (a: number, b: number) => void;
191
- export const __wbg_wrappsbt_free: (a: number, b: number) => void;
192
- export const __wbg_zcashunifiedaddress_free: (a: number, b: number) => void;
193
- export const __wbg_zcashv6transaction_free: (a: number, b: number) => void;
194
- export const inscriptionsnamespace_create_inscription_reveal_data: (a: number, b: number, c: number, d: number, e: number, f: number, g: number) => void;
195
- export const inscriptionsnamespace_sign_reveal_transaction: (a: number, b: number, c: number, d: number, e: number, f: number, g: number, h: number, i: number, j: bigint) => void;
196
- export const wasmdashtransaction_from_bytes: (a: number, b: number, c: number) => void;
197
- export const wasmdashtransaction_get_inputs: (a: number, b: number) => void;
198
- export const wasmdashtransaction_get_outputs: (a: number, b: number) => void;
199
- export const wasmdashtransaction_get_outputs_with_address: (a: number, b: number, c: number, d: number) => void;
200
- export const wasmdashtransaction_get_txid: (a: number, b: number) => void;
201
- export const wasmdashtransaction_input_count: (a: number) => number;
202
- export const wasmdashtransaction_lock_time: (a: number) => number;
203
- export const wasmdashtransaction_output_count: (a: number) => number;
204
- export const wasmdashtransaction_to_bytes: (a: number, b: number) => void;
205
- export const wasmdashtransaction_version: (a: number) => number;
206
- export const wasmecpair_from_private_key: (a: number, b: number, c: number) => void;
207
- export const wasmecpair_from_public_key: (a: number, b: number, c: number) => void;
208
- export const wasmecpair_from_wif: (a: number, b: number, c: number) => void;
209
- export const wasmecpair_from_wif_mainnet: (a: number, b: number, c: number) => void;
210
- export const wasmecpair_from_wif_testnet: (a: number, b: number, c: number) => void;
211
- export const wasmecpair_private_key: (a: number) => number;
212
- export const wasmecpair_public_key: (a: number) => number;
213
- export const wasmecpair_to_wif: (a: number, b: number) => void;
214
- export const wasmecpair_to_wif_mainnet: (a: number, b: number) => void;
215
- export const wasmecpair_to_wif_testnet: (a: number, b: number) => void;
216
- export const wasmtransaction_add_input: (a: number, b: number, c: number, d: number, e: number, f: number) => void;
217
- export const wasmtransaction_add_input_at_index: (a: number, b: number, c: number, d: number, e: number, f: number, g: number) => void;
218
- export const wasmtransaction_add_output: (a: number, b: number, c: number, d: bigint) => number;
219
- export const wasmtransaction_add_output_at_index: (a: number, b: number, c: number, d: number, e: number, f: bigint) => void;
220
- export const wasmtransaction_create: () => number;
221
- export const wasmtransaction_from_bytes: (a: number, b: number, c: number) => void;
222
- export const wasmtransaction_get_inputs: (a: number, b: number) => void;
223
- export const wasmtransaction_get_outputs: (a: number, b: number) => void;
224
- export const wasmtransaction_get_outputs_with_address: (a: number, b: number, c: number, d: number) => void;
225
- export const wasmtransaction_get_txid: (a: number, b: number) => void;
226
- export const wasmtransaction_get_vsize: (a: number) => number;
227
- export const wasmtransaction_to_bytes: (a: number, b: number) => void;
228
- export const wasmzcashtransaction_from_bytes: (a: number, b: number, c: number) => void;
229
- export const wasmzcashtransaction_get_inputs: (a: number, b: number) => void;
230
- export const wasmzcashtransaction_get_outputs: (a: number, b: number) => void;
231
- export const wasmzcashtransaction_get_outputs_with_address: (a: number, b: number, c: number, d: number) => void;
232
- export const wasmzcashtransaction_get_txid: (a: number, b: number) => void;
233
- export const wasmzcashtransaction_to_bytes: (a: number, b: number) => void;
234
- export const wrappsbt_add_input: (a: number, b: number, c: number, d: number, e: number, f: bigint, g: number, h: number, i: number) => void;
235
- export const wrappsbt_add_input_at_index: (a: number, b: number, c: number, d: number, e: number, f: number, g: bigint, h: number, i: number, j: number) => void;
236
- export const wrappsbt_add_output: (a: number, b: number, c: number, d: bigint) => number;
237
- export const wrappsbt_add_output_at_index: (a: number, b: number, c: number, d: number, e: number, f: bigint) => void;
238
- export const wrappsbt_clone: (a: number) => number;
239
- export const wrappsbt_delete_input_kv: (a: number, b: number, c: number, d: number) => void;
240
- export const wrappsbt_delete_kv: (a: number, b: number, c: number) => void;
241
- export const wrappsbt_delete_output_kv: (a: number, b: number, c: number, d: number) => void;
242
- export const wrappsbt_deserialize: (a: number, b: number, c: number) => void;
243
- export const wrappsbt_extract_transaction: (a: number, b: number) => void;
244
- export const wrappsbt_extract_zcash_transaction: (a: number, b: number, c: number, d: number) => void;
245
- export const wrappsbt_finalize_mut: (a: number, b: number) => void;
246
- export const wrappsbt_finalize_mut_zcash: (a: number, b: number, c: number, d: number, e: number) => void;
247
- export const wrappsbt_get_global_xpubs: (a: number) => number;
248
- export const wrappsbt_get_input_kv: (a: number, b: number, c: number, d: number) => void;
249
- export const wrappsbt_get_inputs: (a: number, b: number) => void;
250
- export const wrappsbt_get_kv: (a: number, b: number, c: number) => void;
251
- export const wrappsbt_get_output_kv: (a: number, b: number, c: number, d: number) => void;
252
- export const wrappsbt_get_outputs: (a: number, b: number) => void;
253
- export const wrappsbt_get_outputs_with_address: (a: number, b: number, c: number, d: number) => void;
254
- export const wrappsbt_get_partial_signatures: (a: number, b: number, c: number) => void;
255
- export const wrappsbt_get_unsigned_tx: (a: number, b: number) => void;
256
- export const wrappsbt_has_partial_signatures: (a: number, b: number, c: number) => void;
257
- export const wrappsbt_input_count: (a: number) => number;
258
- export const wrappsbt_new: (a: number, b: number) => number;
259
- export const wrappsbt_output_count: (a: number) => number;
260
- export const wrappsbt_remove_input: (a: number, b: number, c: number) => void;
261
- export const wrappsbt_remove_output: (a: number, b: number, c: number) => void;
262
- export const wrappsbt_serialize: (a: number, b: number) => void;
263
- export const wrappsbt_set_input_kv: (a: number, b: number, c: number, d: number, e: number, f: number) => void;
264
- export const wrappsbt_set_kv: (a: number, b: number, c: number, d: number, e: number) => void;
265
- export const wrappsbt_set_output_kv: (a: number, b: number, c: number, d: number, e: number, f: number) => void;
266
- export const wrappsbt_sign_all: (a: number, b: number, c: number) => void;
267
- export const wrappsbt_sign_all_with_ecpair: (a: number, b: number, c: number) => void;
268
- export const wrappsbt_sign_with_prv: (a: number, b: number, c: number, d: number) => void;
269
- export const wrappsbt_sign_with_xprv: (a: number, b: number, c: number, d: number) => void;
270
- export const wrappsbt_sign_zcash_all_with_ecpair: (a: number, b: number, c: number, d: number, e: number, f: number) => void;
271
- export const wrappsbt_sign_zcash_with_prv: (a: number, b: number, c: number, d: number, e: number, f: number, g: number) => void;
272
- export const wrappsbt_unsigned_tx_id: (a: number, b: number) => void;
273
- export const wrappsbt_update_input_with_descriptor: (a: number, b: number, c: number, d: number) => void;
274
- export const wrappsbt_update_output_with_descriptor: (a: number, b: number, c: number, d: number) => void;
275
- export const wrappsbt_validate_signature_at_input: (a: number, b: number, c: number, d: number, e: number) => void;
276
- export const wrappsbt_verify_signature_with_key: (a: number, b: number, c: number, d: number) => void;
277
- export const zcash_branch_id_for_height: (a: number, b: number, c: number, d: number) => void;
278
- export const zcashunifiedaddress_contains: (a: number, b: number, c: number, d: number) => void;
279
- export const zcashunifiedaddress_orchardReceiver: (a: number, b: number) => void;
280
- export const zcashunifiedaddress_parse: (a: number, b: number, c: number, d: number, e: number) => void;
281
- export const zcashunifiedaddress_saplingReceiver: (a: number, b: number) => void;
282
- export const zcashunifiedaddress_transparentScript: (a: number, b: number) => void;
283
- export const zcashv6transaction_consensusBranchId: (a: number) => number;
284
- export const zcashv6transaction_expiryHeight: (a: number) => number;
285
- export const zcashv6transaction_fromBytes: (a: number, b: number, c: number) => void;
286
- export const zcashv6transaction_getId: (a: number, b: number) => void;
287
- export const zcashv6transaction_ironwoodActionCount: (a: number) => number;
288
- export const zcashv6transaction_ironwoodAnchor: (a: number, b: number) => void;
289
- export const zcashv6transaction_ironwoodFlags: (a: number) => number;
290
- export const zcashv6transaction_ironwoodValueBalance: (a: number) => bigint;
291
- export const zcashv6transaction_toBytes: (a: number, b: number) => void;
292
- export const zcashv6transaction_txidBytes: (a: number, b: number) => void;
293
- export const wasmtransaction_input_count: (a: number) => number;
294
- export const wasmtransaction_output_count: (a: number) => number;
295
- export const wasmzcashtransaction_input_count: (a: number) => number;
296
- export const wasmzcashtransaction_output_count: (a: number) => number;
297
- export const wasmtransaction_lock_time: (a: number) => number;
298
- export const wasmtransaction_version: (a: number) => number;
299
- export const wasmzcashtransaction_lock_time: (a: number) => number;
300
- export const wasmzcashtransaction_version: (a: number) => number;
301
- export const wrappsbt_lock_time: (a: number) => number;
302
- export const wrappsbt_version: (a: number) => number;
303
303
  export const rustsecp256k1_v0_10_0_context_create: (a: number) => number;
304
304
  export const rustsecp256k1_v0_10_0_context_destroy: (a: number) => void;
305
305
  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": "4.28.0",
4
+ "version": "4.30.0",
5
5
  "type": "module",
6
6
  "repository": {
7
7
  "type": "git",
@@ -62,6 +62,8 @@
62
62
  "scripts": {
63
63
  "test": "npm run test:mocha && npm run test:wasm-pack && npm run test:imports",
64
64
  "test:mocha": "mocha --recursive 'test/**/*.ts'",
65
+ "test:integrationLocalRpc": "mocha --config .mocharc.integrationLocalRpc.json --recursive 'test/integrationLocalRpc/**/*.test.ts'",
66
+ "test:integrationLocalRpc:generate": "tsx --experimental-wasm-modules test/integrationLocalRpc/generate/main.ts",
65
67
  "test:benchmark": "mocha test/benchmark/signing.ts --timeout 600000",
66
68
  "test:wasm-pack": "npm run test:wasm-pack-node && npm run test:wasm-pack-chrome",
67
69
  "test:wasm-pack-node": "./scripts/wasm-pack-test.sh --node",