You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Merge #25: cookbook: Upgrade to latest bitcoin 0.32.0
54b68a5 cookbook: Upgrade to latest bitcoin 0.32.0 (Tobin C. Harding)
Pull request description:
Upgrade the cookbook to use the latest release of `rust-bitcoin`.
ACKs for top commit:
apoelstra:
utACK 54b68a5
Tree-SHA512: 543ccfe120da784c9731d5a45f165cd4e7d4873de8f51236d2fe9bb74d14007de236d488603df8cfe7e61e1b6e4f6a0c4b081028e55924039c45fd45d0251fee
`dummy_unspent_transaction_output` generates a dummy unspent transaction output (UTXO).
111
-
This is a SegWit V0 P2WPKH (`ScriptBuf::new_v0_p2wpkh`) UTXO with a dummy invalid transaction ID (`txid: Txid::all_zeros()`),
111
+
This is a SegWit V0 P2WPKH (`ScriptBuf::new_p2wpkh`) UTXO with a dummy invalid transaction ID (`txid: Txid::all_zeros()`),
112
112
and a value of the `const DUMMY_UTXO_AMOUNT` that we defined earlier.
113
113
We are using the [`OutPoint`](https://docs.rs/bitcoin/0.31.1/bitcoin/blockdata/transaction/struct.OutPoint.html) struct to represent the transaction output.
114
114
Finally, we return the tuple `(out_point, utxo)`.
@@ -209,10 +209,10 @@ fn main() {
209
209
210
210
// Sign the sighash using the secp256k1 library (exported by rust-bitcoin).
@@ -264,7 +264,7 @@ Inside the [`TxOut`](https://docs.rs/bitcoin/0.31.1/bitcoin/blockdata/transactio
264
264
265
265
In `let change = TxOut {...}` we are instantiating the change output.
266
266
It is very similar to the `spend` output, but we are now using the `const CHANGE_AMOUNT` that we defined earlier[^spend].
267
-
This is done by setting the `script_pubkey` field to [`ScriptBuf::new_v0_p2wpkh(&wpkh)`](https://docs.rs/bitcoin/0.31.1/bitcoin/blockdata/script/struct.ScriptBuf.html#method.new_v0_p2wpkh),
267
+
This is done by setting the `script_pubkey` field to [`ScriptBuf::new_p2wpkh(&wpkh)`](https://docs.rs/bitcoin/0.31.1/bitcoin/blockdata/script/struct.ScriptBuf.html#method.new_p2wpkh),
268
268
which generates P2WPKH-type of script pubkey.
269
269
270
270
In `let unsigned_tx = Transaction {...}` we are instantiating the transaction we want to sign and broadcast using the [`Transaction`](https://docs.rs/bitcoin/0.31.1/bitcoin/blockdata/transaction/struct.Transaction.html) struct.
@@ -283,7 +283,7 @@ Inside the [`TxOut`](https://docs.rs/bitcoin/0.31.1/bitcoin/blockdata/transactio
283
283
284
284
In `let change = TxOut {...}` we are instantiating the change output.
285
285
It is very similar to the `spend` output, but we are now using the `const CHANGE_AMOUNT` that we defined earlier[^spend].
286
-
This is done by setting the `script_pubkey` field to [`ScriptBuf::new_v1_p2tr(...)`](https://docs.rs/bitcoin/0.31.1/bitcoin/blockdata/script/struct.ScriptBuf.html#method.new_v1_p2tr),
286
+
This is done by setting the `script_pubkey` field to [`ScriptBuf::new_p2tr(...)`](https://docs.rs/bitcoin/0.31.1/bitcoin/blockdata/script/struct.ScriptBuf.html#method.new_p2tr),
287
287
which generates P2TR-type of script pubkey.
288
288
289
289
In `let unsigned_tx = Transaction {...}` we are instantiating the transaction we want to sign and broadcast using the [`Transaction`](https://docs.rs/bitcoin/0.31.1/bitcoin/blockdata/transaction/struct.Transaction.html) struct.
0 commit comments