1
0
Fork 0
mirror of https://github.com/bitcoin/bips.git synced 2025-03-04 11:08:05 +01:00
This commit is contained in:
Fonta1n3 2020-12-16 22:05:54 +08:00
parent e6b9822142
commit c9517ecf87
No known key found for this signature in database
GPG key ID: 025E9AD2D3AC0FCA
2 changed files with 55 additions and 35 deletions

BIN
.DS_Store vendored Normal file

Binary file not shown.

View file

@ -3,7 +3,7 @@
Layer: Applications Layer: Applications
Title: Multi-Account/Multi-Script Hierarchy for Deterministic Multi Signature Wallets Title: Multi-Account/Multi-Script Hierarchy for Deterministic Multi Signature Wallets
Author: Peter Denton <dentondevelopment@protonmail.com> Author: Peter Denton <dentondevelopment@protonmail.com>
Comments-Summary: Mixed review (one person) Comments-Summary: No comments
Comments-URI: https://github.com/bitcoin/bips/wiki/Comments:BIP-0048 Comments-URI: https://github.com/bitcoin/bips/wiki/Comments:BIP-0048
Status: Proposed Status: Proposed
Type: Standards Track Type: Standards Track
@ -27,7 +27,7 @@ millions of addresses per chain.
==Key sorting== ==Key sorting==
Any wallet that supports BIP48 inherently supports deterministic key sorting as per BIP67 so that all possible Any wallet that supports BIP48 inherently supports deterministic key sorting as per BIP67 so that all possible
multi-signature addresses/scripts are derived from deterministically ordered public keys. multi-signature addresses/scripts are derived from deterministically sorted public keys.
==Path levels== ==Path levels==
@ -37,7 +37,7 @@ We define the following 6 levels in BIP32 path:
m / purpose' / coin_type' / account' / script_type' / change / address_index m / purpose' / coin_type' / account' / script_type' / change / address_index
</pre> </pre>
`h` in the path indicates that BIP32 hardened derivation is used. <code>h</code> or <code>'</code> in the path indicates that BIP32 hardened derivation is used.
Each level has a special meaning, described in the chapters below. Each level has a special meaning, described in the chapters below.
@ -55,7 +55,7 @@ Sharing the same space for various networks has some disadvantages.
Avoiding reusing addresses across networks and improving privacy issues. Avoiding reusing addresses across networks and improving privacy issues.
Coin type `0` for mainnet and `1` for testnet. Coin type <code>0</code> for mainnet and <code>1</code> for testnet.
Hardened derivation is used at this level. Hardened derivation is used at this level.
@ -82,16 +82,18 @@ an external source. Such an algorithm is described in "Account discovery" chapte
===Script=== ===Script===
This level splits the key space into three separate `script_type`(s). To provide This level splits the key space into three separate <code>script_type</code>(s). To provide
optimum backward compatibility. optimum backward compatibility.
The recommended default is pay to witness script hash `m/48'/0'/0'/2'`. The recommended default is pay to witness script hash <code>m/48'/0'/0'/2'</code>.
The following represent mainnet, account 0. The following represent mainnet, account 0.
`1'`: Nested Segwit (p2sh-p2wsh) `m/48'/0'/0'/1'`</br> <code>1'</code>: Nested Segwit (p2sh-p2wsh) <code>m/48'/0'/0'/1'</code></br>
`2'`: Native Segwit (p2wsh) `m/48'/0'/0'/2'`</br> <code>2'</code>: Native Segwit (p2wsh) <code>m/48'/0'/0'/2'</code></br>
`3'`: Legacy (p2sh) `m/48'/0'/0'/3'`</br> <code>3'</code>: Legacy (p2sh) <code>m/48'/0'/0'/3'</code></br>
Easily expanded to account for new script types.
===Change=== ===Change===
@ -142,109 +144,127 @@ an external chain by generating a new address.
==Examples== ==Examples==
{| {|
!coin |network
!account |account
!script |script
!chain |chain
!address |address
!path |path
|- |-
|Bitcoin |mainnet
|first |first
|p2wsh
|external |external
|first |first
|m / 48' / 0' / 0' / 2' / 0 / 0 |m / 48' / 0' / 0' / 2' / 0 / 0
|- |-
|Bitcoin |mainnet
|first |first
|p2wsh
|external |external
|second |second
|m / 48' / 0' / 0' / 2' / 0 / 1 |m / 48' / 0' / 0' / 2' / 0 / 1
|- |-
|Bitcoin |mainnet
|first |first
|p2wsh
|change |change
|first |first
|m / 48' / 0' / 0' / 2' / 1 / 0 |m / 48' / 0' / 0' / 2' / 1 / 0
|- |-
|Bitcoin |mainnet
|first |first
|p2wsh
|change |change
|second |second
|m / 48' / 0' / 0' / 2' / 1 / 1 |m / 48' / 0' / 0' / 2' / 1 / 1
|- |-
|Bitcoin |mainnet
|second |second
|p2wsh
|external |external
|first |first
|m / 48' / 0' / 1' / 2' / 0 / 0 |m / 48' / 0' / 1' / 2' / 0 / 0
|- |-
|Bitcoin |mainnet
|second |second
|p2wsh
|external |external
|second |second
|m / 48' / 0' / 1' / 2' / 0 / 1 |m / 48' / 0' / 1' / 2' / 0 / 1
|- |-
|Bitcoin |mainnet
|second |second
|p2sh
|change |change
|first |first
|m / 48' / 0' / 1' / 2' / 1 / 0 |m / 48' / 0' / 1' / 3' / 1 / 0
|- |-
|Bitcoin |mainnet
|second |second
|p2sh
|change |change
|second |second
|m / 48' / 1' / 1' / 2' / 1 / 1 |m / 48' / 1' / 1' / 3' / 1 / 1
|- |-
|Bitcoin Testnet |testnet
|first |first
|p2sh-p2wsh
|external |external
|first |first
|m / 48' / 1' / 0' / 2' / 0 / 0 |m / 48' / 1' / 0' / 1' / 0 / 0
|- |-
|Bitcoin Testnet |testnet
|first |first
|p2wsh
|external |external
|second |second
|m / 48' / 1' / 0' / 2' / 0 / 1 |m / 48' / 1' / 0' / 2' / 0 / 1
|- |-
|Bitcoin Testnet |testnet
|first |first
|p2wsh
|change |change
|first |first
|m / 48' / 1' / 0' / 2' / 1 / 0 |m / 48' / 1' / 0' / 2' / 1 / 0
|- |-
|Bitcoin Testnet |testnet
|first |first
|p2wsh
|change |change
|second |second
|m / 48' / 1' / 0' / 2' / 1 / 1 |m / 48' / 1' / 0' / 2' / 1 / 1
|- |-
|Bitcoin Testnet |testnet
|second |second
|p2wsh
|external |external
|first |first
|m / 48' / 1' / 1' / 2' / 0 / 0 |m / 48' / 1' / 1' / 2' / 0 / 0
|- |-
|Bitcoin Testnet |testnet
|second |second
|p2wsh
|external |external
|second |second
|m / 48' / 1' / 1' / 2' / 0 / 1 |m / 48' / 1' / 1' / 2' / 0 / 1
|- |-
|Bitcoin Testnet |testnet
|second |second
|p2wsh
|change |change
|first |first
|m / 48' / 1' / 1' / 2' / 1 / 0 |m / 48' / 1' / 1' / 2' / 1 / 0
|- |-
|Bitcoin Testnet |testnet
|second |second
|p2wsh
|change |change
|second |second
|m / 48 h / 1' / 1' / 2' / 1 / 1 |m / 48 h / 1' / 1' / 2' / 1 / 1
|} |-
}|
==Reference== ==Reference==