mirror of
https://github.com/lightningnetwork/lnd.git
synced 2025-08-31 17:51:33 +02:00
multi: use key locator only for signing messages
To simplify the API surface of a remote signer even more, we refactor the SignMessage and SignMessageCompact calls to only accept a key locator as we always know what key we're using for signing anyway.
This commit is contained in:
@@ -192,15 +192,15 @@ type SecretKeyRing interface {
|
||||
// signing on keys within a key ring.
|
||||
type MessageSignerRing interface {
|
||||
// SignMessage signs the given message, single or double SHA256 hashing
|
||||
// it first, with the private key described in the key descriptor.
|
||||
SignMessage(keyDesc KeyDescriptor, message []byte,
|
||||
// it first, with the private key described in the key locator.
|
||||
SignMessage(keyLoc KeyLocator, msg []byte,
|
||||
doubleHash bool) (*btcec.Signature, error)
|
||||
|
||||
// SignMessageCompact signs the given message, single or double SHA256
|
||||
// hashing it first, with the private key described in the key
|
||||
// descriptor and returns the signature in the compact, public key
|
||||
// recoverable format.
|
||||
SignMessageCompact(keyDesc KeyDescriptor, message []byte,
|
||||
// hashing it first, with the private key described in the key locator
|
||||
// and returns the signature in the compact, public key recoverable
|
||||
// format.
|
||||
SignMessageCompact(keyLoc KeyLocator, msg []byte,
|
||||
doubleHash bool) ([]byte, error)
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user