sighash

package
v2.1.0-beta.9 Latest Latest
Warning

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

Go to latest
Published: Jul 5, 2022 License: ISC Imports: 0 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Flag

type Flag uint8

Flag represents hash type bits at the end of a signature.

const (
	Old          Flag = 0x0
	All          Flag = 0x1
	None         Flag = 0x2
	Single       Flag = 0x3
	AnyOneCanPay Flag = 0x80

	AllForkID          Flag = 0x1 | 0x40
	NoneForkID         Flag = 0x2 | 0x40
	SingleForkID       Flag = 0x3 | 0x40
	AnyOneCanPayForkID Flag = 0x80 | 0x40

	ForkID Flag = 0x40

	// Mask defines the number of bits of the hash type which is used
	// to identify which outputs are signed.
	Mask = 0x1f
)

SIGHASH type bits from the end of a signature. see: https://wiki.bitcoinsv.io/index.php/SIGHASH_flags

func (Flag) Has

func (f Flag) Has(shf Flag) bool

Has returns true if contains the provided flag.

func (Flag) HasWithMask

func (f Flag) HasWithMask(shf Flag) bool

HasWithMask returns true if contains the provided flag masked

func (Flag) String

func (f Flag) String() string

Jump to

Keyboard shortcuts

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