templates

package
v1.0.0-rc1 Latest Latest
Warning

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

Go to latest
Published: Nov 28, 2024 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

View Source
const (
	AlwaysFalseID byte = iota
	AlwaysTrueID
	P2pkh256ID

	TemplateStartByte = 0x00
)

Variables

This section is empty.

Functions

func AlwaysFalseBytes

func AlwaysFalseBytes() types.PredicateBytes

func AlwaysTrueBytes

func AlwaysTrueBytes() types.PredicateBytes

func EmptyArgument

func EmptyArgument() []byte

func ExtractPubKeyHashFromP2pkhPredicate

func ExtractPubKeyHashFromP2pkhPredicate(pb []byte) ([]byte, error)

func NewP2pkh256BytesFromKey

func NewP2pkh256BytesFromKey(pubKey []byte) types.PredicateBytes

func NewP2pkh256BytesFromKeyHash

func NewP2pkh256BytesFromKeyHash(pubKeyHash []byte) types.PredicateBytes

func NewP2pkh256FromKey

func NewP2pkh256FromKey(pubKey []byte) predicates.Predicate

func NewP2pkh256FromKeyHash

func NewP2pkh256FromKeyHash(pubKeyHash []byte) predicates.Predicate

func NewP2pkh256SignatureBytes

func NewP2pkh256SignatureBytes(sig, pubKey []byte) []byte

func VerifyP2pkhPredicate

func VerifyP2pkhPredicate(predicate *predicates.Predicate) error

VerifyP2pkhPredicate returns nil if the predicate is a valid P2PKH256 predicate, or an error if the predicate is invalid, with a description of the specific validation error.

Types

type P2pkh256Signature

type P2pkh256Signature struct {
	Sig    []byte
	PubKey []byte
	// contains filtered or unexported fields
}

P2pkh256Signature is a signature and public key pair, typically used as owner proof (ie the public key can be used to verify the signature).

Jump to

Keyboard shortcuts

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