utxoproof

package
v0.3.0 Latest Latest
Warning

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

Go to latest
Published: Jun 4, 2024 License: ISC Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ValidateSecp256k1P2PKH

func ValidateSecp256k1P2PKH(pubkey, proof []byte, expires uint32) bool

ValidateSecp256k1P2PKH validates the UTXO proof of an output controlled by a secp256k1 keypair for the given expiry height. Returns true only if the proof is valid.

Types

type Secp256k1KeyPair

type Secp256k1KeyPair struct {
	Pub  []byte
	Priv *secp256k1.PrivateKey
}

Secp256k1KeyPair provides access to the serialized public key and parsed private key of a secp256k1 key pair.

func (*Secp256k1KeyPair) SignUtxoProof

func (k *Secp256k1KeyPair) SignUtxoProof(expires uint32) ([]byte, error)

SignUtxoProof returns the UTXO proof of ownership over an output controlled by the keypair. The UTXO proof is only valid for the provided expiry height to prevent its inclusion in other PR messages signed by an unrelated identity.

Jump to

Keyboard shortcuts

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