bip322

package
v0.7.3 Latest Latest
Warning

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

Go to latest
Published: Nov 26, 2024 License: GPL-3.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DeserializeWitnessSignature

func DeserializeWitnessSignature(serialized []byte) (wire.TxWitness, error)

func GetSha256

func GetSha256(data []byte) (hash []byte)

func GetTagSha256

func GetTagSha256(data []byte) (hash []byte)

func PayToTaprootScript

func PayToTaprootScript(taprootKey *btcec.PublicKey) ([]byte, error)

PayToTaprootScript creates a pk script for a pay-to-taproot output key.

func PayToWitnessScript

func PayToWitnessScript(pubkey *btcec.PublicKey) ([]byte, error)

PayToWitnessScript creates a pk script for a pay-to-wpkh output key.

func PrepareTx

func PrepareTx(pkScript []byte, message string) (toSign *wire.MsgTx, err error)

func SerializeWitnessSignature

func SerializeWitnessSignature(witness wire.TxWitness) ([]byte, error)

func SignMessage

func SignMessage(privateKey *btcec.PrivateKey, address *btcutils.Address, message string) ([]byte, error)

func SignSignatureP2WPKH

func SignSignatureP2WPKH(privKey *btcec.PrivateKey, message string) (witness wire.TxWitness, pkScript []byte, err error)

func SignSignatureTaproot

func SignSignatureTaproot(privKey *btcec.PrivateKey, message string) (witness wire.TxWitness, pkScript []byte, err error)

func VerifyMessage

func VerifyMessage(address *btcutils.Address, signature []byte, message string) bool

Types

This section is empty.

Jump to

Keyboard shortcuts

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