Skip to content

Commit 95f1401

Browse files
committed
fix: some inconsistencies in tx_taproot.md
1 parent 1b6f20f commit 95f1401

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

cookbook/src/tx_taproot.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -132,7 +132,7 @@ We are using the latter, since we are not going to tweak the key.
132132
We are using the [`OutPoint`](https://docs.rs/bitcoin/0.32.0/bitcoin/blockdata/transaction/struct.OutPoint.html) struct to represent the transaction output.
133133
Finally, we return the tuple `(out_point, utxo)`.
134134

135-
Now we are ready for our main function that will sign a transaction that spends a `p2wpkh` unspent output:
135+
Now we are ready for our main function that will sign a transaction that spends a `p2tr` unspent output:
136136

137137
```rust
138138
# use std::str::FromStr;
@@ -257,7 +257,7 @@ we can use the [`SecretKey::new`](https://docs.rs/secp256k1/0.27.0/secp256k1/str
257257
and `let (internal_key, _parity) = keypair.x_only_public_key();` generates a [`XOnlyPublicKey`](https://docs.rs/bitcoin/0.32.0/bitcoin/key/struct.XOnlyPublicKey.html) that represent an X-only public key, used for verification of Schnorr signatures according to [BIP340](https://github.com/bitcoin/bips/blob/master/bip-0340.mediawiki).
258258
We won't be using second element from the returned tuple, the parity, so we are ignoring it by using the `_` underscore.
259259
`let address = receivers_address();` generates a receiver's address `address`.
260-
`let (dummy_out_point, dummy_utxo) = dummy_unspent_transaction_output(&wpkh);` generates a dummy unspent transaction output `dummy_utxo` and its corresponding outpoint `dummy_out_point`.
260+
`let (dummy_out_point, dummy_utxo) = dummy_unspent_transaction_output(&secp, internal_key);` generates a dummy unspent transaction output `dummy_utxo` and its corresponding outpoint `dummy_out_point`.
261261
All of these are helper functions that we defined earlier.
262262

263263
In `let input = TxIn {...}` we are instantiating the input for the transaction we are constructing

0 commit comments

Comments
 (0)