verifier

package
v0.7.1 Latest Latest
Warning

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

Go to latest
Published: May 29, 2024 License: ISC Imports: 7 Imported by: 1

Documentation

Overview

Package verifier implements utility routines for verifying signed message via Bitcoin message signing (BMS).

Index

Constants

This section is empty.

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