Bitcoin Stack Exchange is a question and answer site for Bitcoin crypto-currency enthusiasts. It only takes a minute to sign up.
Sign up to join this communityAnybody can ask a question
Anybody can answer
The best answers are voted up and rise to the top
Can you give a simple step-by-step example on how to create a transaction with an output of P2SH-P2WPKH using bitcoin-cli on Regtest?
For this example, we will use a transaction that spends two outputs from a previous transaction. The first output (1N2) is paid to the pubkey script "P2SH-P2WPKH" and the second output (1N3) is paid to the pubkey script "P2SH".
- Create the first transaction that spends the two outputs from a previous transaction. In this example, the first output (1N2) is paid to the pubkey script "P2SH-P2WPKH" and the second output (1N3) is paid to the pubkey script "P2SH".
bitcoin-cli sendtoaddress 1N2 P2SH-P2WPKH bitcoin-cli sendtoaddress 1N3 P2SH
- Get the hex encoded transaction data for the first transaction.
bitcoin-cli gettransaction 1N2
![Get BONUS $200 for FREE! Get BONUS $200 for FREE!](/img/socialgood3.jpg)
You can get bonuses upto $100 FREE BONUS when you:
π° Install these recommended apps:
π² SocialGood - 100% Crypto Back on Everyday Shopping
π² xPortal - The DeFi For The Next Billion
π² CryptoTab Browser - Lightweight, fast, and ready to mine!
π° Register on these recommended exchanges:
π‘ Binanceπ‘ Bitfinexπ‘ Bitmartπ‘ Bittrexπ‘ Bitget
π‘ CoinExπ‘ Crypto.comπ‘ Gate.ioπ‘ Huobiπ‘ Kucoin.
Comments