mirror of
https://github.com/aljazceru/breez-lnd.git
synced 2025-12-17 14:14:21 +01:00
multi: use key locator for lnwallet.MessageSigner
To simplify the message signing API even further, we refactor the lnwallet.MessageSigner interface to use a key locator instead of the public key to identify which key should be signed with.
This commit is contained in:
@@ -15,7 +15,7 @@ import (
|
||||
"github.com/btcsuite/btcwallet/waddrmgr"
|
||||
"github.com/btcsuite/btcwallet/wallet/txauthor"
|
||||
"github.com/btcsuite/btcwallet/wtxmgr"
|
||||
"github.com/lightningnetwork/lnd/input"
|
||||
"github.com/lightningnetwork/lnd/keychain"
|
||||
"github.com/lightningnetwork/lnd/lnwallet/chainfee"
|
||||
)
|
||||
|
||||
@@ -440,10 +440,11 @@ type BlockChainIO interface {
|
||||
// to attest to some message.
|
||||
type MessageSigner interface {
|
||||
// SignMessage attempts to sign a target message with the private key
|
||||
// that corresponds to the passed public key. If the target private key
|
||||
// is unable to be found, then an error will be returned. The actual
|
||||
// digest signed is the double SHA-256 of the passed message.
|
||||
SignMessage(pubKey *btcec.PublicKey, msg []byte) (input.Signature, error)
|
||||
// described in the key locator. If the target private key is unable to
|
||||
// be found, then an error will be returned. The actual digest signed is
|
||||
// the double SHA-256 of the passed message.
|
||||
SignMessage(keyLoc keychain.KeyLocator, msg []byte) (*btcec.Signature,
|
||||
error)
|
||||
}
|
||||
|
||||
// WalletDriver represents a "driver" for a particular concrete
|
||||
|
||||
Reference in New Issue
Block a user