1

When I use bitcoin-cli getnewaddress "" "p2sh-segwit" which kind of script is inside And can I convert if in bech32?

  • 2
    Does this answer your question? Confusion about Addresses – MCCCS Apr 9 '20 at 15:59
  • You should never ever try to convert an address from one format into another, as you don't know what type the receiver software expects. If you want a particular type address, ask for it. – Pieter Wuille Apr 9 '20 at 20:51
  • @MCCCS thanks. What kind of redeem script Can I have If I get p2sh? What is default script? – foo_bar Apr 10 '20 at 6:34
  • "legacy" will give you a P2PKH script. "bech32" will give you a P2WPKH script. "p2sh-segwit" will give you a P2SH-P2WPKH (a P2SH script with a P2WPKH redeemScript). – Pieter Wuille Apr 13 '20 at 21:52

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.