mirror of
https://github.com/ChristopherA/Learning-Bitcoin-from-the-Command-Line.git
synced 2025-07-23 18:05:37 +00:00
Update and rename 8_4_Sending_and_Spending_a_Bitcoin_Script.md to 8_5_Spending_a_Transaction_with_a_Bitcoin_script.md
This commit is contained in:
parent
93a074b84c
commit
95568d120d
@ -1,21 +0,0 @@
|
|||||||
> **WARNING:** The lack of any code Script interpretors is currently halting this section.
|
|
||||||
|
|
||||||
# 8.4: Sending & Spending a Bitcoin Script
|
|
||||||
|
|
||||||
If you can't test Bitcoin Scripts in simple APIs and UIs, then you can at least test them by sending and spending sample P2SH transactions on testnet, right? Sort of. This _is_ what you need to do to test Bitcoin Scripts currently, but you'll need some tools from the next Part of the book, so some of this will still remain theoretical.
|
|
||||||
|
|
||||||
## Writing a Script to Hash Scripts
|
|
||||||
|
|
||||||
## Sending a P2SH Transaction
|
|
||||||
|
|
||||||
|
|
||||||
From There:
|
|
||||||
|
|
||||||
BitCoinJ ScriptBuilder
|
|
||||||
|
|
||||||
Spending
|
|
||||||
|
|
||||||
[need to successfully send first!]
|
|
||||||
|
|
||||||
## Spending a P2SH Transaction
|
|
||||||
|
|
23
8_5_Spending_a_Transaction_with_a_Bitcoin_script.md
Normal file
23
8_5_Spending_a_Transaction_with_a_Bitcoin_script.md
Normal file
@ -0,0 +1,23 @@
|
|||||||
|
> **WARNING:** The lack of any code Script interpretors is currently halting this section.
|
||||||
|
|
||||||
|
# 8.5: Spending a Transaction with a Bitcoin Script
|
||||||
|
|
||||||
|
Before we close out an overview of P2SH transactions, it's worth briefly discussing how to spend them!
|
||||||
|
|
||||||
|
## Use the Redeem Script
|
||||||
|
|
||||||
|
As we saw in [§6.2: Spending a Transaction to a Multisig](6_2_Spending_a_Transaction_to_a_Multisig.md), spending a P2SH transaction is all about having that serialized version of the locking script, the so-called _redeemScript_. So, the first step to being able to spend a P2SH transaction is ensuring that you save the _redeemScript_ before you give out the P2SH address to everyone.
|
||||||
|
|
||||||
|
Because P2SH addresses aren't integrated into `bitcoin-cli` there will be no short-cuts as you saw in [§6.3: Sending an Automated Multisig](6_3_Sending_an_Automated_Multisig.md). You're going to need to collect all the more complex variables on your own!
|
||||||
|
|
||||||
|
## Create the Transaction
|
||||||
|
|
||||||
|
[[PENDING]]
|
||||||
|
|
||||||
|
[Notes: I *think* this is just the same as what we did in chapter 6.2, but I need to actually receive a P2SH transaction to test it, and that requires first getting to the APIs, then using one to send myself a P2SH transaction, then writing up how to respend that.]
|
||||||
|
|
||||||
|
## Summary: Spending a Transaction with a Bitcoin Script
|
||||||
|
|
||||||
|
[[PENDING]]
|
||||||
|
|
||||||
|
[Notes: Say it's just like respending that multisig, the hard way]
|
Loading…
x
Reference in New Issue
Block a user