transaction

package
v0.0.0-...-da31739 Latest Latest
Warning

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

Go to latest
Published: Nov 12, 2018 License: LGPL-3.0 Imports: 3 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 {
	BlockNumber uint64     `json:"blockNumer"`
	Hash        string     `json:"hash"`
	Trans       []*Message `json:"trans"`
}

type Message

type Message struct {
	Hash       string   `json:"hash"`
	To         []byte   `json:"to"`
	From       []byte   `json:"from"`
	Nonce      uint64   `json:"nonce"`
	Amount     *big.Int `json:"amount"`
	GasLimit   uint64   `json:"gasLimit"`
	GasPrice   *big.Int `json:"gasPrice"`
	Data       []byte   `json:"data"`
	CheckNonce bool     `json:"checkNonce"`
	Success    bool     `json:"success"`
	GasUsed    uint64   `json:"gasUsed"`
}

Message is the immutable transaction

func (Message) String

func (m Message) String() string

type Transaction

type Transaction struct {
	From                []byte
	To                  []byte
	TxHashFunc          func(rawTx interface{}) []byte
	TxHexHashSignedFunc func(rawTx interface{}) string
	SignFunc            func(sig []byte) error
	// contains filtered or unexported fields
}

func NewTransaction

func NewTransaction(rawTx interface{}, From []byte) *Transaction

func (*Transaction) Hash

func (t *Transaction) Hash() []byte

func (*Transaction) Hex

func (t *Transaction) Hex() string

func (*Transaction) RawTx

func (t *Transaction) RawTx() interface{}

func (*Transaction) Sender

func (t *Transaction) Sender() []byte

func (*Transaction) SetRawTx

func (t *Transaction) SetRawTx(rawTx interface{})

func (*Transaction) WithSign

func (t *Transaction) WithSign(sig []byte) error

Jump to

Keyboard shortcuts

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