watchtower/wtclient/interface: add SecretKeyRing iface
This commit is contained in:
2 files changed
+53
No files matched your search
@@ -5,6 +5,7 @@ import (
|
||||
|
||||
"github.com/btcsuite/btcd/btcec"
|
||||
"github.com/lightningnetwork/lnd/brontide"
|
||||
"github.com/lightningnetwork/lnd/keychain"
|
||||
"github.com/lightningnetwork/lnd/lnwire"
|
||||
"github.com/lightningnetwork/lnd/watchtower/wtdb"
|
||||
"github.com/lightningnetwork/lnd/watchtower/wtserver"
|
||||
@@ -77,3 +78,11 @@ func AuthDial(localPriv *btcec.PrivateKey, netAddr *lnwire.NetAddress,
|
||||
|
||||
return brontide.Dial(localPriv, netAddr, dialer)
|
||||
}
|
||||
|
||||
// SecretKeyRing abstracts the ability to derive HD private keys given a
|
||||
// description of the derivation path.
|
||||
type SecretKeyRing interface {
|
||||
// DerivePrivKey derives the private key from the root seed using a
|
||||
// key descriptor specifying the key's derivation path.
|
||||
DerivePrivKey(loc keychain.KeyDescriptor) (*btcec.PrivateKey, error)
|
||||
}
|
||||
Reference in new issue
Block a user