mirror of
https://github.com/bitcoin/bips.git
synced 2025-05-12 12:03:29 +00:00
replace BIP-number-placeholders and calculate test vectors
This commit is contained in:
parent
ed5661dbec
commit
7662d7124a
@ -30,7 +30,7 @@ Two generally different approaches are possible for current BIP44 capable wallet
|
|||||||
|
|
||||||
2) Create dedicated accounts only used for segregated witness addresses.
|
2) Create dedicated accounts only used for segregated witness addresses.
|
||||||
|
|
||||||
The solutions from point 1 have a common disadvantage: if a user imports/recovers a BIP49-compatible wallet masterseed into/in a non-BIP{ThisBipNumber}-compatible wallet, the account might show up but also it might miss some UTXOs.
|
The solutions from point 1 have a common disadvantage: if a user imports/recovers a BIP49-compatible wallet masterseed into/in a non-BIP49-compatible wallet, the account might show up but also it might miss some UTXOs.
|
||||||
|
|
||||||
Therefore this BIP uses solution 2, which fails in a more visible way. Either the account shows up or not at all. The user does not have to check his balance after using the same seed in different wallets.
|
Therefore this BIP uses solution 2, which fails in a more visible way. Either the account shows up or not at all. The user does not have to check his balance after using the same seed in different wallets.
|
||||||
|
|
||||||
@ -49,7 +49,7 @@ serialization method.
|
|||||||
m / purpose' / coin_type' / account' / change / address_index
|
m / purpose' / coin_type' / account' / change / address_index
|
||||||
</pre>
|
</pre>
|
||||||
|
|
||||||
For the `purpose`-path level it uses {ThisBipNumber}'. The rest of the levels are used as defined in BIP44
|
For the `purpose`-path level it uses `49'`. The rest of the levels are used as defined in BIP44
|
||||||
|
|
||||||
|
|
||||||
===Address derivation===
|
===Address derivation===
|
||||||
@ -69,25 +69,25 @@ This BIP is not backwards compatible by design as described under [#consideratio
|
|||||||
|
|
||||||
==Test vectors==
|
==Test vectors==
|
||||||
|
|
||||||
(tbd. when we have the actual bip number)
|
|
||||||
<pre>
|
<pre>
|
||||||
masterseedWords = abandon abandon abandon abandon abandon abandon abandon abandon abandon abandon abandon about
|
masterseedWords = abandon abandon abandon abandon abandon abandon abandon abandon abandon abandon abandon about
|
||||||
masterseed = <hex...>
|
masterseed = tprv8ZgxMBicQKsPe5YMU9gHen4Ez3ApihUfykaqUorj9t6FDqy3nP6eoXiAo2ssvpAjoLroQxHqr3R5nE3a5dU3DHTjTgJDd7zrbniJr6nrCzd (testnet)
|
||||||
|
|
||||||
// Account 0, root = m/49'/0'/0'
|
// Account 0, root = m/49'/0'/0'
|
||||||
account0Xpriv = <hex>
|
account0Xpriv = tprv8fnNnm525ViePCEx7Z9cZb6QNUtsUc8XKaePnZtPnKZWHw1rnAC9r6MdMdsmrkGW7Vy3eVtwtRqrfkxfWjnitBTNEZjTb6pbui7BUmnBBd3 (testnet)
|
||||||
|
|
||||||
// Account 0, first receiving private key = m/49'/0'/0'/0/0
|
// Account 0, first receiving private key = m/49'/0'/0'/0/0
|
||||||
account0recvPrivateKey = <hex>
|
account0recvPrivateKey = cQHH4LLDxjDqTM2rRpEi29f9a3EAQ8A7yWxiNdR8nC8WrkKU7Dms
|
||||||
account0recvPublickKey = <hex>
|
account0recvPrivateKeyHex = 0x508c73a06f6b6c817238ba61be232f5080ea4616c54f94771156934666d38ee3
|
||||||
|
account0recvPublickKeyHex = 0x039b3b694b8fc5b5e07fb069c783cac754f5d38c3e08bed1960e31fdb1dda35c24
|
||||||
|
|
||||||
// Address derivation
|
// Address derivation
|
||||||
keyhash = HASH160(account0recvPublickKey) = <hex>
|
keyhash = HASH160(account0recvPublickKeyHex) = 0xf990679acafe25c27615373b40bf22446d24ff44
|
||||||
scriptSig = <0 <keyhash>> = <hex>
|
scriptSig = <0 <keyhash>> = 0x0014f990679acafe25c27615373b40bf22446d24ff44
|
||||||
addressBytes = HASH160(scriptSig) = <hex>
|
addressBytes = HASH160(scriptSig) = 0x3fb6e95812e57bb4691f9a4a628862a61a4f769b
|
||||||
|
|
||||||
// addressBytes base58check encoded for testnet
|
// addressBytes base58check encoded for testnet
|
||||||
address = base58check(prefix | addressBytes) = 1xyz....
|
address = base58check(prefix | addressBytes) = 2My47gHNc8nhX5kBWqXHU4f8uuQvQKEgwMd (testnet)
|
||||||
</pre>
|
</pre>
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user