Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Block ¶
type Block struct { Number *big.Int ParentHash *util.Hash ExtraData []byte Nonce *big.Int Transactions []*Transaction TxRoot *util.Hash R *big.Int S *big.Int PublicKey *util.CompactPublicKey }
Block is the basic unit of the blockchain.
func DeserializeBlock ¶
DeserializeBlock deserializes the block bytes into a block object.
func (*Block) DeriveHash ¶
DeriveHash derives the hash of the block.
func (*Block) Sign ¶
func (b *Block) Sign(ua *util.UnlockedAccount)
func (*Block) TxRootHash ¶
type RPCResponse ¶
type Transaction ¶
type Transaction struct { From util.Address To util.Address Value *big.Int Msg []byte Fee *big.Int Nonce *big.Int R *big.Int S *big.Int PublicKey *util.CompactPublicKey }
func DeserializeTransaction ¶
func DeserializeTransaction(data []byte) *Transaction
func (*Transaction) CalculateHash ¶
func (tx *Transaction) CalculateHash() ([]byte, error)
func (*Transaction) Equals ¶
func (tx *Transaction) Equals(other merkletree.Content) (bool, error)
Equals tests for equality of two Contents
func (*Transaction) Hash ¶
func (tx *Transaction) Hash() *util.Hash
func (*Transaction) Serialize ¶
func (tx *Transaction) Serialize() []byte
func (*Transaction) Sign ¶
func (tx *Transaction) Sign(ua *util.UnlockedAccount)
func (*Transaction) Verify ¶
func (tx *Transaction) Verify() bool
type Transactions ¶
type Transactions []*Transaction
func (Transactions) Array ¶
func (txs Transactions) Array() []*Transaction
Click to show internal directories.
Click to hide internal directories.