meer

package
v1.2.0 Latest Latest
Warning

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

Go to latest
Published: May 22, 2024 License: ISC Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Block

type Block struct {
	Id       *hash.Hash
	Txs      []model.Tx
	Time     time.Time
	EvmBlock *types.Block
}

func (*Block) Clean

func (b *Block) Clean()

func (*Block) ID

func (b *Block) ID() *hash.Hash

func (*Block) Timestamp

func (b *Block) Timestamp() time.Time

func (*Block) Transactions

func (b *Block) Transactions() []model.Tx

type ExportTx

type ExportTx struct {
	*Tx
}

func NewExportTx

func NewExportTx(tx *types.Transaction) (*ExportTx, error)

type ImportTx

type ImportTx struct {
	*Tx
	*types.Transaction
}

func NewImportTx

func NewImportTx(tx *types.Transaction) (*ImportTx, error)

func (*ImportTx) CheckSanity

func (itx *ImportTx) CheckSanity() error

func (*ImportTx) GetPKAddress

func (itx *ImportTx) GetPKAddress() (*address.SecpPubKeyAddress, error)

func (*ImportTx) GetPKScript

func (itx *ImportTx) GetPKScript() ([]byte, error)

func (*ImportTx) GetTransactionForEngine

func (itx *ImportTx) GetTransactionForEngine() (*types.Transaction, error)

func (*ImportTx) SetCoinbaseTx

func (itx *ImportTx) SetCoinbaseTx(tx *types.Transaction) error

func (*ImportTx) Sign

func (itx *ImportTx) Sign(privateKey ecc.PrivateKey) error

type Tx

type Tx struct {
	Type  types.TxType
	From  []byte
	To    []byte
	Value uint64
	Data  []byte
}

func (*Tx) GetData

func (tx *Tx) GetData() []byte

func (*Tx) GetFrom

func (tx *Tx) GetFrom() []byte

func (*Tx) GetTo

func (tx *Tx) GetTo() []byte

func (*Tx) GetTxType

func (tx *Tx) GetTxType() types.TxType

func (*Tx) GetValue

func (tx *Tx) GetValue() uint64

type VMTx

type VMTx struct {
	*Tx
	Coinbase hash.Hash
	ETx      *etypes.Transaction
}

func NewVMTx

func NewVMTx(tx *types.Transaction, coinbase *types.Transaction) (*VMTx, error)

Jump to

Keyboard shortcuts

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