watchtower: use ECDH interface for watchtower session
This commit is contained in:
12 files changed
+53
-93
No files matched your search
@@ -102,14 +102,14 @@ type Dial func(net, addr string) (net.Conn, error)
|
||||
// AuthDialer connects to a remote node using an authenticated transport, such as
|
||||
// brontide. The dialer argument is used to specify a resolver, which allows
|
||||
// this method to be used over Tor or clear net connections.
|
||||
type AuthDialer func(localPriv *btcec.PrivateKey, netAddr *lnwire.NetAddress,
|
||||
type AuthDialer func(localKey keychain.SingleKeyECDH, netAddr *lnwire.NetAddress,
|
||||
dialer func(string, string) (net.Conn, error)) (wtserver.Peer, error)
|
||||
|
||||
// AuthDial is the watchtower client's default method of dialing.
|
||||
func AuthDial(localPriv *btcec.PrivateKey, netAddr *lnwire.NetAddress,
|
||||
func AuthDial(localKey keychain.SingleKeyECDH, netAddr *lnwire.NetAddress,
|
||||
dialer func(string, string) (net.Conn, error)) (wtserver.Peer, error) {
|
||||
|
||||
return brontide.Dial(nil/*TODO fix in next commit*/, netAddr, dialer)
|
||||
return brontide.Dial(localKey, netAddr, dialer)
|
||||
}
|
||||
|
||||
// ECDHKeyRing abstracts the ability to derive shared ECDH keys given a
|
||||
@@ -117,10 +117,6 @@ func AuthDial(localPriv *btcec.PrivateKey, netAddr *lnwire.NetAddress,
|
||||
type ECDHKeyRing interface {
|
||||
keychain.ECDHRing
|
||||
|
||||
// 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)
|
||||
|
||||
// DeriveKey attempts to derive an arbitrary key specified by the
|
||||
// passed KeyLocator. This may be used in several recovery scenarios,
|
||||
// or when manually rotating something like our current default node
|
||||
|
||||
Reference in new issue
Block a user