Feature request: Support the lnd AEZEED cipher seed format as an input mechanism in the Sparrow software wallet import dialog. This would allow users to recover/manage on-chain balances from an lnd wallet.
Workaround: A tool called guggero/chantools has a command called showrootkey that can retrieve the BIP-32 xprv. As of Sparrow v1.4.0, this can be imported directly in the software wallet import dialog.
Implementation notes: The part of the chantools code that converts the AEZEED mnemonic into the xprv starts on line 104 of lnd/aezeed.go:
var mnemonic aezeed.Mnemonic
copy(mnemonic[:], cipherSeedMnemonic)
// If we're unable to map it back into the ciphertext, then either the
// mnemonic is wrong, or the passphrase is wrong.
cipherSeed, err := mnemonic.ToCipherSeed(passphraseBytes)
if err != nil {
return nil, time.Unix(0, 0), fmt.Errorf("failed to decrypt "+
"seed with passphrase: %v", err)
}
rootKey, err := hdkeychain.NewMaster(cipherSeed.Entropy[:], params)
if err != nil {
return nil, time.Unix(0, 0), fmt.Errorf("failed to derive " +
"master extended key")
}
return rootKey, cipherSeed.BirthdayTime(), nil
It looks like the mnemonic.ToCipherSeed() method is responsible for converting the AEZEED mnemonic into entropy bits. Note that hdkeychain is from btcsuite/btcutil.
Background: Instead of using BIP-39, the
lnd
lightning implementation uses a cipher seed scheme called AEZEED. Implementation (Go) and details here: https://github.com/lightningnetwork/lnd/tree/master/aezeedFeature request: Support the lnd AEZEED cipher seed format as an input mechanism in the Sparrow software wallet import dialog. This would allow users to recover/manage on-chain balances from an
lnd
wallet.Workaround: A tool called guggero/chantools has a command called
showrootkey
that can retrieve the BIP-32xprv
. As of Sparrow v1.4.0, this can be imported directly in the software wallet import dialog.Implementation notes: The part of the chantools code that converts the AEZEED mnemonic into the
xprv
starts on line 104 of lnd/aezeed.go:It looks like the
mnemonic.ToCipherSeed()
method is responsible for converting the AEZEED mnemonic into entropy bits. Note thathdkeychain
is from btcsuite/btcutil.