Pay to script hash (P2SH) and Trezor hardware wallets (2024)

Pay to script hash (P2SH) is a type of bitcoin transaction that allows the sender to commit to a script, or set of conditions, that must be met in order to spend the funds.

This can be used to create more complex transactions, such as multi-signature transactions or transactions that can only be spent after a certain time has passed.

To use P2SH with a Trezor device, you will first need to create a P2SH address. This can be done using Trezor Suite or a third party application which supports P2SH such as Electrum.

Once you have created a P2SH address, you can use it to receive funds in the same way you would use any other bitcoin address.


Generating a P2SH address

To get a Pay-to-Script-Hash (P2SH) address with Trezor Suite, follow these steps:

  • Connect your Trezor device to your computer and open Trezor Suite.
  • Click on the plus [+] icon next to My accountsin the side menu.

Pay to script hash (P2SH) and Trezor hardware wallets (1)

  • Select Bitcoin and from the drop down menu choose "Legacy SegWit"for a compatible P2SH address.

Pay to script hash (P2SH) and Trezor hardware wallets (2)

Pay to script hash (P2SH) and Trezor hardware wallets (3)

  • Click on the Add account button.
  • Now you should see your Legacy SegWitaccount added to the menu on the left side of Trezor Suite. With your Legacy Segwit account selected choose receive and continuetoconfirmon your device andgenerate your P2SH compatible address.

Pay to script hash (P2SH) and Trezor hardware wallets (4)

  • Once the address is generated, you will see it displayed on the screen.

P2SH addresses start with the number "3" and are followed by a series of letters and numbers. For example, a P2SH address might look something like this: "3AdD7ZaJQw9m1maN39CeJ1zVyXQLn2MEHR".


You can use this address to receive payments to a script that is hashed and stored on the blockchain. Keep in mind that P2SH addresses are generally more complex and less widely used than regular addresses, and may not be supported by all wallets and exchanges.


Transaction scripts

Anoutputthat pays to a P2SHscriptPubKeyis spent by aninputwith ascriptSigthat provides the correct redeem script along with all the data (likesignaturesand correspondingpublic keys) necessary for the successfull script evaluation:

scriptPubKey: OP_HASH160 <redeemScriptHash> OP_EQUALscriptSig: <singatures> <publicKeys> <redeemScript>


P2SH-multisig

AP2SHaddress can represent a multi-signature script. The script requires multiple signatures to prove ownership and therefore spend funds. The bitcoin multi-signature feature is designed to require M signatures from a total of N keys, known as an M-of-N multisig, where M is equal to or less than N.


P2WPKH-in-P2SH

P2WPKH-in-P2SH (Pay-to-Witness-Public-Key-Hash-in-Pay-to-Script-Hash) is atype of transaction on the Bitcoin blockchain that allows a user to send funds to a pay to witness public key hash (P2WPKH) address using a version of the script hash (P2SH) format. This allows the user to send funds to a SegWit (Segregated Witness) address using a non-SegWit transaction, which can be useful in cases where the user's wallet or software does not support SegWit transactions.

ScriptPubKey: OP_HASH160 <20-byte-redeemScriptHash> OP_EQUAL ScriptSig: <0 <20-byte-PublicKeyHash>> Witness: <Signature> <PublicKey>
RedeemScript: 0 <20-byte-PublicKeyHash>


The P2SH redeem script is equal to 0 <20-byte-PublicKeyHash> which is exactly the same as P2WPKHscriptPubKey. ThescriptSigis a canonical push of data, which contains another canonical push of data.

To understand more about how transactions work on a basic technical level, check out this blog post on types of bitcoin transactions:Part I,Part 2. More detailed description can be found inBitcoin Wikior inBitcoin.org Developer guide.

See also: What is Multisig?

For even more check out this blog post to learn more about using multisignature transations with Trezor: Multi-signature hardware wallets with Electrum


Pay to script hash (P2SH) and Trezor hardware wallets (2024)
Top Articles
Question 8 What are 3 benefits of the Pay
$MICKEY Coin: Leading the Charge with Disney's Public Domain IP
Jack Doherty Lpsg
Fighter Torso Ornament Kit
2018 Jeep Wrangler Unlimited All New for sale - Portland, OR - craigslist
neither of the twins was arrested,传说中的800句记7000词
Nybe Business Id
Lighthouse Diner Taylorsville Menu
Activities and Experiments to Explore Photosynthesis in the Classroom - Project Learning Tree
Poe Pohx Profile
Bbc 5Live Schedule
104 Presidential Ct Lafayette La 70503
Crusader Kings 3 Workshop
Synq3 Reviews
Explore Top Free Tattoo Fonts: Style Your Ink Perfectly! 🖌️
Cooking Fever Wiki
Echo & the Bunnymen - Lips Like Sugar Lyrics
Voy Boards Miss America
Buy Swap Sell Dirt Late Model
Concordia Apartment 34 Tarkov
Outlet For The Thames Crossword
Barber Gym Quantico Hours
Little Rock Skipthegames
The Many Faces of the Craigslist Killer
Sherburne Refuge Bulldogs
Prep Spotlight Tv Mn
Tuw Academic Calendar
Churchill Downs Racing Entries
Ou Football Brainiacs
Claio Rotisserie Menu
Black Lion Backpack And Glider Voucher
Busch Gardens Wait Times
Babydepot Registry
Rvtrader Com Florida
Fox And Friends Mega Morning Deals July 2022
Rocksteady Steakhouse Menu
Sedano's Supermarkets Expands to Orlando - Sedano's Supermarkets
The Vélodrome d'Hiver (Vél d'Hiv) Roundup
Rs3 Bis Perks
The best bagels in NYC, according to a New Yorker
Immobiliare di Felice| Appartamento | Appartamento in vendita Porto San
Sand Castle Parents Guide
Bill Manser Net Worth
Gamestop Store Manager Pay
60 Days From May 31
Mybiglots Net Associates
M&T Bank
Conan Exiles Tiger Cub Best Food
Streameast Io Soccer
Parks And Rec Fantasy Football Names
Costco Gas Price Fort Lauderdale
E. 81 St. Deli Menu
Latest Posts
Article information

Author: Edmund Hettinger DC

Last Updated:

Views: 6711

Rating: 4.8 / 5 (58 voted)

Reviews: 89% of readers found this page helpful

Author information

Name: Edmund Hettinger DC

Birthday: 1994-08-17

Address: 2033 Gerhold Pine, Port Jocelyn, VA 12101-5654

Phone: +8524399971620

Job: Central Manufacturing Supervisor

Hobby: Jogging, Metalworking, Tai chi, Shopping, Puzzles, Rock climbing, Crocheting

Introduction: My name is Edmund Hettinger DC, I am a adventurous, colorful, gifted, determined, precious, open, colorful person who loves writing and wants to share my knowledge and understanding with you.