Documentation ¶
Overview ¶
Package verifier implements utility routines for verifying signed message via Bitcoin message signing (BMS).
Index ¶
Constants ¶
View Source
const ExpectedSignatureLength = 65
ExpectedSignatureLength contains the fixed signature length all signed messages are expected to have.
Variables ¶
This section is empty.
Functions ¶
func Verify ¶
func Verify(sig SignedMessage) (bool, error)
Verify will verify a SignedMessage based on the recovery flag on Bitcoin main network.
func VerifyWithChain ¶
func VerifyWithChain(signedMessage SignedMessage, net *chaincfg.Params) (bool, error)
VerifyWithChain will verify a SignedMessage based on the recovery flag on the passed network. Supported address types are P2PKH, P2WKH, NP2WKH (P2WPKH), P2TR.
Types ¶
type SignedMessage ¶
type SignedMessage struct { // Address that was used to sign the Message with. Address string // Message that has been signed by the Address. Message string // Signature that has been provided and should be valid against the Address and Message. Signature string }
SignedMessage is the representation of verification request.
Click to show internal directories.
Click to hide internal directories.