sutil

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Mar 29, 2023 License: MIT Imports: 6 Imported by: 10

Documentation

Index

Constants

View Source
const (
	TypeMaster = 0
	TypeSub    = 1 << 1
	TypeMulti  = 1 << 2
	TypeNotify = 1 << 3
)

Variables

This section is empty.

Functions

func NewEmptyHeader

func NewEmptyHeader() util.BlockHeader

func NewHeader

func NewHeader(orgHeader *types.Header) util.BlockHeader

Types

type Addr

type Addr struct {
	// contains filtered or unexported fields
}

func NewAddr

func NewAddr(hash *common.Uint168, script []byte, addrType int) *Addr

func (*Addr) Hash

func (addr *Addr) Hash() *common.Uint168

func (*Addr) Script

func (addr *Addr) Script() []byte

func (*Addr) String

func (addr *Addr) String() string

func (*Addr) Type

func (addr *Addr) Type() int

func (*Addr) TypeName

func (addr *Addr) TypeName() string
type Header struct {
	*types.Header
}

func (*Header) Bits

func (h *Header) Bits() uint32

func (*Header) MerkleRoot

func (h *Header) MerkleRoot() common.Uint256

func (*Header) PowHash

func (h *Header) PowHash() common.Uint256

func (*Header) Previous

func (h *Header) Previous() common.Uint256

type STXO

type STXO struct {
	// When it used to be a UTXO
	UTXO

	// The height at which it met its demise
	SpendHeight uint32

	// The tx that consumed it
	SpendTxId common.Uint256
}

func NewSTXO

func NewSTXO(utxo *UTXO, spendHeight uint32, spendTxId common.Uint256) *STXO

func (*STXO) IsEqual

func (stxo *STXO) IsEqual(alt *STXO) bool

func (*STXO) String

func (stxo *STXO) String() string

type SortByValueASC

type SortByValueASC []*UTXO

func (SortByValueASC) Len

func (utxos SortByValueASC) Len() int

func (SortByValueASC) Less

func (utxos SortByValueASC) Less(i, j int) bool

func (SortByValueASC) Swap

func (utxos SortByValueASC) Swap(i, j int)

type Tx

type Tx struct {
	types.Transaction
}

func NewTx

func NewTx(tx types.Transaction) *Tx

func (*Tx) MatchFilter

func (tx *Tx) MatchFilter(bf util.Filter) bool

type UTXO

type UTXO struct {
	// Previous txid and output index
	Op *util.OutPoint

	// The higher the better
	Value common.Fixed64

	// The utxo locked height
	LockTime uint32

	// Block height where this tx was confirmed, 0 for unconfirmed
	AtHeight uint32

	// Address where this UTXO belongs to.
	Address common.Uint168
}

func NewUTXO

func NewUTXO(txId common.Uint256, height uint32, index int,
	value common.Fixed64, lockTime uint32, address common.Uint168) *UTXO

func SortByValue

func SortByValue(utxos []*UTXO) []*UTXO

func (*UTXO) IsEqual

func (utxo *UTXO) IsEqual(alt *UTXO) bool

func (*UTXO) String

func (utxo *UTXO) String() string

Jump to

Keyboard shortcuts

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