Versions in this module Expand all Collapse all v0 v0.1.0 May 8, 2018 Changes in this version + var Bloom9 = bloom9 + var EmptyRootHash = DeriveSha(Transactions{}) + var EmptyUncleHash = CalcUncleHash(nil) + var ErrInvalidChainId = errors.New("invalid chain id for signer") + var ErrInvalidSig = errors.New("invalid v, r, s values") + var HeaderExtraMax = 32 + func BloomLookup(bin Bloom, topic []byte) bool + func CalcUncleHash(uncles []*Header) common.Hash + func DeriveSha(list DerivableList) common.Hash + func HeaderToBytes(header *Header) []byte + func LogsBloom(logs vm.Logs) *big.Int + func Number(b1, b2 *Block) bool + func Sender(signer Signer, tx *Transaction) (common.Address, error) + func SignatureValues(signer Signer, tx *Transaction) (v byte, r *big.Int, s *big.Int) + func SortByPriceAndNonce(txs []*Transaction) + type BasicSigner struct + func (fs BasicSigner) Hash(tx *Transaction) common.Hash + func (fs BasicSigner) PublicKey(tx *Transaction) ([]byte, error) + func (fs BasicSigner) SignECDSA(tx *Transaction, prv *ecdsa.PrivateKey) (*Transaction, error) + func (fs BasicSigner) WithSignature(tx *Transaction, sig []byte) (*Transaction, error) + func (s BasicSigner) Equal(s2 Signer) bool + type Block struct + ReceivedAt time.Time + ReceivedFrom interface{} + func NewBlock(header *Header, txs []*Transaction, uncles []*Header, receipts []*Receipt) *Block + func NewBlockWithHeader(header *Header) *Block + func (b *Block) Bloom() Bloom + func (b *Block) Body() *Body + func (b *Block) Coinbase() common.Address + func (b *Block) DecodeRLP(s *rlp.Stream) error + func (b *Block) DeprecatedTd() *big.Int + func (b *Block) Difficulty() *big.Int + func (b *Block) EncodeRLP(w io.Writer) error + func (b *Block) Extra() []byte + func (b *Block) GasLimit() *big.Int + func (b *Block) GasUsed() *big.Int + func (b *Block) Hash() common.Hash + func (b *Block) HashNoNonce() common.Hash + func (b *Block) Header() *Header + func (b *Block) Nonce() uint64 + func (b *Block) Number() *big.Int + func (b *Block) NumberU64() uint64 + func (b *Block) ParentHash() common.Hash + func (b *Block) ReceiptHash() common.Hash + func (b *Block) Root() common.Hash + func (b *Block) Size() common.StorageSize + func (b *Block) String() string + func (b *Block) Time() *big.Int + func (b *Block) Transaction(hash common.Hash) *Transaction + func (b *Block) Transactions() Transactions + func (b *Block) TxHash() common.Hash + func (b *Block) UncleHash() common.Hash + func (b *Block) Uncles() []*Header + func (b *Block) ValidateFields() error + func (b *Block) WithBody(transactions []*Transaction, uncles []*Header) *Block + func (b *Block) WithMiningResult(nonce uint64) *Block + type BlockBy func(b1, b2 *Block) bool + func (self BlockBy) Sort(blocks Blocks) + type BlockNonce [8]byte + func EncodeNonce(i uint64) BlockNonce + func (n BlockNonce) MarshalJSON() ([]byte, error) + func (n BlockNonce) Uint64() uint64 + type Blocks []*Block + type Bloom [bloomLength]byte + func BytesToBloom(b []byte) Bloom + func CreateBloom(receipts Receipts) Bloom + func (b *Bloom) Add(d *big.Int) + func (b *Bloom) SetBytes(d []byte) + func (b Bloom) Bytes() []byte + func (b Bloom) MarshalJSON() ([]byte, error) + type Body struct + Transactions []*Transaction + Uncles []*Header + type ChainIdSigner struct + func NewChainIdSigner(chainId *big.Int) ChainIdSigner + func (s ChainIdSigner) Equal(s2 Signer) bool + func (s ChainIdSigner) Hash(tx *Transaction) common.Hash + func (s ChainIdSigner) PublicKey(tx *Transaction) ([]byte, error) + func (s ChainIdSigner) SigECDSA(tx *Transaction, prv *ecdsa.PrivateKey) (*Transaction, error) + func (s ChainIdSigner) SignECDSA(tx *Transaction, prv *ecdsa.PrivateKey) (*Transaction, error) + func (s ChainIdSigner) WithSignature(tx *Transaction, sig []byte) (*Transaction, error) + type DerivableList interface + GetRlp func(i int) []byte + Len func() int + type Header struct + Bloom Bloom + Coinbase common.Address + Difficulty *big.Int + Extra []byte + GasLimit *big.Int + GasUsed *big.Int + Nonce BlockNonce + Number *big.Int + ParentHash common.Hash + ReceiptHash common.Hash + Root common.Hash + Time *big.Int + TxHash common.Hash + UncleHash common.Hash + func CopyHeader(h *Header) *Header + func (h *Header) Hash() common.Hash + func (h *Header) HashNoNonce() common.Hash + func (h *Header) String() string + func (h *Header) UnmarshalJSON(data []byte) error + type Log struct + Address common.Address + BlockHash common.Hash + BlockNumber uint64 + Data []byte + Index uint + Removed bool + Topics []common.Hash + TxHash common.Hash + TxIndex uint + func (l *Log) DecodeRLP(s *rlp.Stream) error + func (l *Log) EncodeRLP(w io.Writer) error + func (l *Log) String() string + type LogForStorage Log + func (l *LogForStorage) DecodeRLP(s *rlp.Stream) error + func (l *LogForStorage) EncodeRLP(w io.Writer) error + type Receipt struct + Bloom Bloom + ContractAddress common.Address + CumulativeGasUsed *big.Int + GasUsed *big.Int + Logs vm.Logs + PostState []byte + TxHash common.Hash + func NewReceipt(root []byte, cumulativeGasUsed *big.Int) *Receipt + func (r *Receipt) DecodeRLP(s *rlp.Stream) error + func (r *Receipt) EncodeRLP(w io.Writer) error + func (r *Receipt) RlpEncode() []byte + func (r *Receipt) String() string + type ReceiptForStorage Receipt + func (r *ReceiptForStorage) DecodeRLP(s *rlp.Stream) error + func (r *ReceiptForStorage) EncodeRLP(w io.Writer) error + type Receipts []*Receipt + func (r Receipts) GetRlp(i int) []byte + func (r Receipts) Len() int + type Signer interface + Equal func(Signer) bool + Hash func(tx *Transaction) common.Hash + PublicKey func(tx *Transaction) ([]byte, error) + SignECDSA func(tx *Transaction, prv *ecdsa.PrivateKey) (*Transaction, error) + WithSignature func(tx *Transaction, sig []byte) (*Transaction, error) + type StorageBlock Block + func (b *StorageBlock) DecodeRLP(s *rlp.Stream) error + type Transaction struct + func NewContractCreation(nonce uint64, amount, gasLimit, gasPrice *big.Int, data []byte) *Transaction + func NewTransaction(nonce uint64, to common.Address, amount, gasLimit, gasPrice *big.Int, ...) *Transaction + func (tx *Transaction) ChainId() *big.Int + func (tx *Transaction) Cost() *big.Int + func (tx *Transaction) Data() []byte + func (tx *Transaction) DecodeRLP(s *rlp.Stream) error + func (tx *Transaction) EncodeRLP(w io.Writer) error + func (tx *Transaction) From() (common.Address, error) + func (tx *Transaction) Gas() *big.Int + func (tx *Transaction) GasPrice() *big.Int + func (tx *Transaction) Hash() common.Hash + func (tx *Transaction) Nonce() uint64 + func (tx *Transaction) Protected() bool + func (tx *Transaction) RawSignatureValues() (v *big.Int, r *big.Int, s *big.Int) + func (tx *Transaction) SetSigner(s Signer) + func (tx *Transaction) SigHash() common.Hash + func (tx *Transaction) SignECDSA(prv *ecdsa.PrivateKey) (*Transaction, error) + func (tx *Transaction) SignatureValues() (v byte, r *big.Int, s *big.Int) + func (tx *Transaction) Size() common.StorageSize + func (tx *Transaction) String() string + func (tx *Transaction) To() *common.Address + func (tx *Transaction) Value() *big.Int + func (tx *Transaction) WithSignature(sig []byte) (*Transaction, error) + func (tx *Transaction) WithSigner(signer Signer) *Transaction + type Transactions []*Transaction + func TxDifference(a, b Transactions) (keep Transactions) + func (s Transactions) GetRlp(i int) []byte + func (s Transactions) Len() int + func (s Transactions) Swap(i, j int) + type TxByNonce Transactions + func (s TxByNonce) Len() int + func (s TxByNonce) Less(i, j int) bool + func (s TxByNonce) Swap(i, j int) + type TxByPrice Transactions + func (s *TxByPrice) Pop() interface{} + func (s *TxByPrice) Push(x interface{}) + func (s TxByPrice) Len() int + func (s TxByPrice) Less(i, j int) bool + func (s TxByPrice) Swap(i, j int)