77 "github.com/btcsuite/btcd/chaincfg"
88 "github.com/btcsuite/btcutil"
99 "github.com/btcsuite/btcutil/hdkeychain"
10- "github.com/guggero/chantools/btc "
10+ "github.com/guggero/chantools/lnd "
1111)
1212
1313const (
@@ -84,10 +84,10 @@ func (c *genImportScriptCommand) Execute(_ []string) error {
8484
8585 // External branch first (m/84'/<coinType>'/0'/0/x).
8686 for i := uint32 (0 ); i < c .RecoveryWindow ; i ++ {
87- derivedKey , err := btc .DeriveChildren (extendedKey , []uint32 {
88- btc .HardenedKeyStart + uint32 (84 ),
89- btc .HardenedKeyStart + chainParams .HDCoinType ,
90- btc .HardenedKeyStart + uint32 (0 ),
87+ derivedKey , err := lnd .DeriveChildren (extendedKey , []uint32 {
88+ lnd .HardenedKeyStart + uint32 (84 ),
89+ lnd .HardenedKeyStart + chainParams .HDCoinType ,
90+ lnd .HardenedKeyStart + uint32 (0 ),
9191 0 ,
9292 i ,
9393 })
@@ -102,10 +102,10 @@ func (c *genImportScriptCommand) Execute(_ []string) error {
102102
103103 // Now the internal branch (m/84'/<coinType>'/0'/1/x).
104104 for i := uint32 (0 ); i < c .RecoveryWindow ; i ++ {
105- derivedKey , err := btc .DeriveChildren (extendedKey , []uint32 {
106- btc .HardenedKeyStart + uint32 (84 ),
107- btc .HardenedKeyStart + chainParams .HDCoinType ,
108- btc .HardenedKeyStart + uint32 (0 ),
105+ derivedKey , err := lnd .DeriveChildren (extendedKey , []uint32 {
106+ lnd .HardenedKeyStart + uint32 (84 ),
107+ lnd .HardenedKeyStart + chainParams .HDCoinType ,
108+ lnd .HardenedKeyStart + uint32 (0 ),
109109 1 ,
110110 i ,
111111 })
0 commit comments