verifier

package
v0.0.0-...-462dc78 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 25, 2023 License: ISC Imports: 13 Imported by: 0

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.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL