1
0
mirror of https://github.com/bitcoin/bips.git synced 2025-05-12 12:03:29 +00:00

BIP48: Add p2tr script type derivation

This commit is contained in:
benk10 2025-04-28 10:29:27 +03:00
parent fd3878a279
commit e7cf2e9149

View File

@ -99,11 +99,11 @@ Hardened derivation is used at this level.
===Script===
This level splits the key space into two separate <code>script_type</code>(s). To provide
This level splits the key space into three separate <code>script_type</code>(s). To provide
forward compatibility for future script types this specification can be easily extended.
Currently the only script types covered by this BIP are Native Segwit (p2wsh) and
Nested Segwit (p2sh-p2wsh).
Currently the only script types covered by this BIP are Native Segwit (p2wsh),
Nested Segwit (p2sh-p2wsh), and Taproot (p2tr).
The following path represents Nested Segwit (p2sh-p2wsh) mainnet, account 0:
<code>1'</code>: Nested Segwit (p2sh-p2wsh) <code>m/48'/0'/0'/1'</code></br>
@ -111,6 +111,9 @@ The following path represents Nested Segwit (p2sh-p2wsh) mainnet, account 0:
The following path represents Native Segwit (p2wsh) mainnet, account 0:
<code>2'</code>: Native Segwit (p2wsh) <code>m/48'/0'/0'/2'</code></br>
The following path represents Taproot (p2tr) mainnet, account 0:
<code>3'</code>: Taproot (p2tr) <code>m/48'/0'/0'/3'</code></br>
The recommended default for wallets is pay to witness script hash <code>m/48'/0'/0'/2'</code>.
To add new script types submit a PR to this specification and include it in the list above:
@ -240,6 +243,13 @@ Public derivation is used at this level.
|change
|second
|m / 48' / 1' / 1' / 2' / 1 / 1
|-
|testnet
|first
|p2tr
|external
|first
|m / 48' / 1' / 0' / 3' / 0 / 0
|}