block

package
v0.0.0-...-83f9183 Latest Latest
Warning

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

Go to latest
Published: May 13, 2023 License: Unlicense Imports: 3 Imported by: 9

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Block

type Block interface {
	core.Indexable
	crypto.Hashable

	GetParentHash() core.Hash
	GetTransactionHash() core.Hash
	GetStateHash() core.Hash
	GetTransactions() []TransactionWithData
	GetStates() []State
	GetTime() int64
}

type Receipt

type Receipt interface {
	crypto.Hashable

	GetTransactionResult() TransactionResult
	GetStates() []State

	GetTransactionIndex() uint32
	SetTransactionIndex(uint32)
	GetBlockIndex() uint64
	SetBlockIndex(uint64)
}

type State

type State interface {
	core.Indexable
	crypto.Hashable

	GetStateType() StateType
	GetAccount() core.Address
	GetStateKey() []string

	GetBlockIndex() uint64
	SetBlockIndex(uint64)
}

type StateType

type StateType uint32

func GetStateTypeByName

func GetStateTypeByName(name string) StateType

func GetStateTypes

func GetStateTypes() []StateType

func (StateType) Create

func (t StateType) Create() State

func (StateType) MarshalText

func (t StateType) MarshalText() ([]byte, error)

func (StateType) Register

func (t StateType) Register(name string, f func(t StateType) State)

func (StateType) String

func (t StateType) String() string

func (*StateType) UnmarshalText

func (t *StateType) UnmarshalText(b []byte) error

type Transaction

type Transaction interface {
	core.Indexable
	crypto.Signable

	GetTransactionType() TransactionType
}

type TransactionResult

type TransactionResult int16

func (TransactionResult) Desc

func (t TransactionResult) Desc() string

func (TransactionResult) MarshalText

func (r TransactionResult) MarshalText() ([]byte, error)

func (TransactionResult) Register

func (t TransactionResult) Register(name string, desc string)

func (TransactionResult) String

func (t TransactionResult) String() string

func (*TransactionResult) UnmarshalText

func (r *TransactionResult) UnmarshalText(b []byte) error

type TransactionType

type TransactionType uint32

func GetTransactionTypeByName

func GetTransactionTypeByName(name string) TransactionType

func GetTransactionTypes

func GetTransactionTypes() []TransactionType

func (TransactionType) Create

func (t TransactionType) Create() Transaction

func (TransactionType) MarshalText

func (t TransactionType) MarshalText() ([]byte, error)

func (TransactionType) Register

func (t TransactionType) Register(name string, f func(t TransactionType) Transaction)

func (TransactionType) String

func (t TransactionType) String() string

func (*TransactionType) UnmarshalText

func (t *TransactionType) UnmarshalText(b []byte) error

type TransactionWithData

type TransactionWithData interface {
	crypto.Hashable

	GetTransaction() Transaction
	GetReceipt() Receipt
}

Jump to

Keyboard shortcuts

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