block

package
v1.2.2 Latest Latest
Warning

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

Go to latest
Published: Sep 6, 2023 License: MIT Imports: 7 Imported by: 2

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Block

type Block struct {
	Header
	Transactions []tx.Transaction
}

func (*Block) GetSize

func (b *Block) GetSize() int
type Header struct {
	Witness *tx.Witness
	// contains filtered or unexported fields
}

func NewBlockHeader

func NewBlockHeader() *Header

func NewBlockHeaderFromRPC

func NewBlockHeaderFromRPC(header *models.RpcBlockHeader) (*Header, error)

func (*Header) Deserialize

func (h *Header) Deserialize(br *io.BinaryReader)

func (*Header) DeserializeUnsigned

func (h *Header) DeserializeUnsigned(br *io.BinaryReader)

DeserializeUnsigned deserialize blockheader without witness

func (*Header) GetHash

func (h *Header) GetHash() *helper.UInt256

func (*Header) GetHashString

func (h *Header) GetHashString() string

func (*Header) GetIndex

func (h *Header) GetIndex() uint32

func (*Header) GetMerkleRoot

func (h *Header) GetMerkleRoot() *helper.UInt256

func (*Header) GetNextConsensus

func (h *Header) GetNextConsensus() *helper.UInt160

func (*Header) GetNonce added in v0.3.5

func (h *Header) GetNonce() uint64

func (*Header) GetPrevHash

func (h *Header) GetPrevHash() *helper.UInt256

func (*Header) GetPrimaryIndex

func (h *Header) GetPrimaryIndex() byte

func (*Header) GetScriptHashesForVerifying

func (h *Header) GetScriptHashesForVerifying() []*helper.UInt160

func (*Header) GetSize

func (h *Header) GetSize() int

func (*Header) GetTimeStamp

func (h *Header) GetTimeStamp() uint64

func (*Header) GetVersion

func (h *Header) GetVersion() uint32

func (*Header) GetWitnesses

func (h *Header) GetWitnesses() []*tx.Witness

func (*Header) Serialize

func (h *Header) Serialize(bw *io.BinaryWriter)

func (*Header) SerializeUnsigned

func (h *Header) SerializeUnsigned(bw *io.BinaryWriter)

SerializeUnsigned serialize Header without witness

func (*Header) SetIndex

func (h *Header) SetIndex(value uint32)

func (*Header) SetMerkleRoot

func (h *Header) SetMerkleRoot(value *helper.UInt256)

func (*Header) SetNextConsensus

func (h *Header) SetNextConsensus(value *helper.UInt160)

func (*Header) SetNonce added in v0.3.5

func (h *Header) SetNonce(value uint64)

func (*Header) SetPrevHash

func (h *Header) SetPrevHash(value *helper.UInt256)

func (*Header) SetPrimaryIndex

func (h *Header) SetPrimaryIndex(value byte)

func (*Header) SetTimeStamp

func (h *Header) SetTimeStamp(value uint64)

func (*Header) SetVersion

func (h *Header) SetVersion(value uint32)

func (*Header) SetWitnesses

func (h *Header) SetWitnesses(value []*tx.Witness)

Jump to

Keyboard shortcuts

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