mirror of
https://github.com/guggero/chantools.git
synced 2026-08-13 12:33:34 +02:00
derivekey: add test TestDeriveKeyXprv
This test checks that "chantools derivekey --rootkey xpriv..." works.
This commit is contained in:
parent
b352ed9838
commit
d93e39098b
1 changed files with 20 additions and 0 deletions
|
|
@ -82,3 +82,23 @@ func TestDeriveKeySeedBip39(t *testing.T) {
|
|||
|
||||
h.assertLogContains(keyContentBIP39)
|
||||
}
|
||||
|
||||
func TestDeriveKeyXprv(t *testing.T) {
|
||||
h := newHarness(t)
|
||||
|
||||
// Derive a specific key from xprv.
|
||||
derive := &deriveKeyCommand{
|
||||
Path: testPath,
|
||||
rootKey: &rootKey{
|
||||
RootKey: "xprv9s21ZrQH143K3QTDL4LXw2F7HEK3wJUD2nW2nR" +
|
||||
"k4stbPy6cq3jPPqjiChkVvvNKmPGJxWUtg6LnF5kejM" +
|
||||
"RNNU3TGtRBeJgk33yuGBxrMPHi",
|
||||
},
|
||||
}
|
||||
|
||||
err := derive.Execute(nil, nil)
|
||||
require.NoError(t, err)
|
||||
|
||||
h.assertLogContains("cQcdieZy2d1TAdCsa5MjmHJs2gdHcD7x22nDbhJyVTUa3Ax" +
|
||||
"5KB3w")
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue