Skip to content

Commit 80e8462

Browse files
authored
Merge pull request bitcoin#460 from DanielWeigl/master
BIP49 - calculate testvector
2 parents 6a8b845 + 7662d71 commit 80e8462

File tree

1 file changed

+12
-12
lines changed

1 file changed

+12
-12
lines changed

bip-0049.mediawiki

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ Two generally different approaches are possible for current BIP44 capable wallet
3030

3131
2) Create dedicated accounts only used for segregated witness addresses.
3232

33-
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.
33+
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.
3434

3535
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.
3636

@@ -49,7 +49,7 @@ serialization method.
4949
m / purpose' / coin_type' / account' / change / address_index
5050
</pre>
5151

52-
For the `purpose`-path level it uses {ThisBipNumber}'. The rest of the levels are used as defined in BIP44
52+
For the `purpose`-path level it uses `49'`. The rest of the levels are used as defined in BIP44
5353

5454

5555
===Address derivation===
@@ -69,25 +69,25 @@ This BIP is not backwards compatible by design as described under [#consideratio
6969

7070
==Test vectors==
7171

72-
(tbd. when we have the actual bip number)
7372
<pre>
7473
masterseedWords = abandon abandon abandon abandon abandon abandon abandon abandon abandon abandon abandon about
75-
masterseed = <hex...>
74+
masterseed = tprv8ZgxMBicQKsPe5YMU9gHen4Ez3ApihUfykaqUorj9t6FDqy3nP6eoXiAo2ssvpAjoLroQxHqr3R5nE3a5dU3DHTjTgJDd7zrbniJr6nrCzd (testnet)
7675

7776
// Account 0, root = m/49'/0'/0'
78-
account0Xpriv = <hex>
77+
account0Xpriv = tprv8fnNnm525ViePCEx7Z9cZb6QNUtsUc8XKaePnZtPnKZWHw1rnAC9r6MdMdsmrkGW7Vy3eVtwtRqrfkxfWjnitBTNEZjTb6pbui7BUmnBBd3 (testnet)
7978
8079
// Account 0, first receiving private key = m/49'/0'/0'/0/0
81-
account0recvPrivateKey = <hex>
82-
account0recvPublickKey = <hex>
80+
account0recvPrivateKey = cQHH4LLDxjDqTM2rRpEi29f9a3EAQ8A7yWxiNdR8nC8WrkKU7Dms
81+
account0recvPrivateKeyHex = 0x508c73a06f6b6c817238ba61be232f5080ea4616c54f94771156934666d38ee3
82+
account0recvPublickKeyHex = 0x039b3b694b8fc5b5e07fb069c783cac754f5d38c3e08bed1960e31fdb1dda35c24
8383
8484
// Address derivation
85-
keyhash = HASH160(account0recvPublickKey) = <hex>
86-
scriptSig = <0 <keyhash>> = <hex>
87-
addressBytes = HASH160(scriptSig) = <hex>
85+
keyhash = HASH160(account0recvPublickKeyHex) = 0xf990679acafe25c27615373b40bf22446d24ff44
86+
scriptSig = <0 <keyhash>> = 0x0014f990679acafe25c27615373b40bf22446d24ff44
87+
addressBytes = HASH160(scriptSig) = 0x3fb6e95812e57bb4691f9a4a628862a61a4f769b
8888
8989
// addressBytes base58check encoded for testnet
90-
address = base58check(prefix | addressBytes) = 1xyz....
90+
address = base58check(prefix | addressBytes) = 2My47gHNc8nhX5kBWqXHU4f8uuQvQKEgwMd (testnet)
9191
</pre>
9292

9393

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

104-
This document is placed in the public domain.
104+
This document is placed in the public domain.

0 commit comments

Comments
 (0)