Skip to content

Commit

Permalink
replace BIP-number-placeholders and calculate test vectors
Browse files Browse the repository at this point in the history
  • Loading branch information
DanielWeigl committed Oct 5, 2016
1 parent ed5661d commit 7662d71
Showing 1 changed file with 12 additions and 12 deletions.
24 changes: 12 additions & 12 deletions bip-0049.mediawiki
Original file line number Diff line number Diff line change
Expand Up @@ -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.

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.

Expand All @@ -49,7 +49,7 @@ serialization method.
m / purpose' / coin_type' / account' / change / address_index
</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===
Expand All @@ -69,25 +69,25 @@ This BIP is not backwards compatible by design as described under [#consideratio

==Test vectors==

(tbd. when we have the actual bip number)
<pre>
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'
account0Xpriv = <hex>
account0Xpriv = tprv8fnNnm525ViePCEx7Z9cZb6QNUtsUc8XKaePnZtPnKZWHw1rnAC9r6MdMdsmrkGW7Vy3eVtwtRqrfkxfWjnitBTNEZjTb6pbui7BUmnBBd3 (testnet)
// Account 0, first receiving private key = m/49'/0'/0'/0/0
account0recvPrivateKey = <hex>
account0recvPublickKey = <hex>
account0recvPrivateKey = cQHH4LLDxjDqTM2rRpEi29f9a3EAQ8A7yWxiNdR8nC8WrkKU7Dms
account0recvPrivateKeyHex = 0x508c73a06f6b6c817238ba61be232f5080ea4616c54f94771156934666d38ee3
account0recvPublickKeyHex = 0x039b3b694b8fc5b5e07fb069c783cac754f5d38c3e08bed1960e31fdb1dda35c24
// Address derivation
keyhash = HASH160(account0recvPublickKey) = <hex>
scriptSig = <0 <keyhash>> = <hex>
addressBytes = HASH160(scriptSig) = <hex>
keyhash = HASH160(account0recvPublickKeyHex) = 0xf990679acafe25c27615373b40bf22446d24ff44
scriptSig = <0 <keyhash>> = 0x0014f990679acafe25c27615373b40bf22446d24ff44
addressBytes = HASH160(scriptSig) = 0x3fb6e95812e57bb4691f9a4a628862a61a4f769b
// addressBytes base58check encoded for testnet
address = base58check(prefix | addressBytes) = 1xyz....
address = base58check(prefix | addressBytes) = 2My47gHNc8nhX5kBWqXHU4f8uuQvQKEgwMd (testnet)
</pre>


Expand All @@ -101,4 +101,4 @@ This BIP is not backwards compatible by design as described under [#consideratio
== Copyright ==

This document is placed in the public domain.
This document is placed in the public domain.

0 comments on commit 7662d71

Please sign in to comment.