Versions in this module Expand all Collapse all v1 v1.5.1 Nov 16, 2016 Changes in this version + const LightScryptN + const LightScryptP + const StandardScryptN + const StandardScryptP + func MainnetGenesis() string + func TestnetGenesis() string + type Account struct + func (a *Account) GetAddress() *Address + func (a *Account) GetFile() string + type AccountManager struct + func NewAccountManager(keydir string, scryptN, scryptP int) *AccountManager + func (am *AccountManager) DeleteAccount(a *Account, passphrase string) error + func (am *AccountManager) ExportKey(a *Account, passphrase, newPassphrase string) ([]byte, error) + func (am *AccountManager) GetAccounts() *Accounts + func (am *AccountManager) HasAddress(addr *Address) bool + func (am *AccountManager) ImportKey(keyJSON []byte, passphrase, newPassphrase string) (*Account, error) + func (am *AccountManager) ImportPreSaleKey(keyJSON []byte, passphrase string) (*Account, error) + func (am *AccountManager) Lock(addr *Address) error + func (am *AccountManager) NewAccount(passphrase string) (*Account, error) + func (am *AccountManager) Sign(addr *Address, hash []byte) ([]byte, error) + func (am *AccountManager) SignWithPassphrase(addr *Address, passphrase string, hash []byte) ([]byte, error) + func (am *AccountManager) TimedUnlock(a *Account, passphrase string, timeout int64) error + func (am *AccountManager) Unlock(a *Account, passphrase string) error + func (am *AccountManager) Update(a *Account, passphrase, newPassphrase string) error + type Accounts struct + func (a *Accounts) Get(index int) (*Account, error) + func (a *Accounts) Set(index int, account *Account) error + func (a *Accounts) Size() int + type Address struct + func NewAddressFromBytes(address []byte) (*Address, error) + func NewAddressFromHex(address string) (*Address, error) + func (a *Address) GetBytes() []byte + func (a *Address) GetHex() string + func (a *Address) SetBytes(address []byte) error + func (a *Address) SetHex(address string) error + type Addresses struct + func (a *Addresses) Get(index int) (*Address, error) + func (a *Addresses) Set(index int, address *Address) error + func (a *Addresses) Size() int + type BigInt struct + func NewBigInt(x int64) *BigInt + func (bi *BigInt) GetBytes() []byte + func (bi *BigInt) GetInt64() int64 + func (bi *BigInt) GetString(base int) string + func (bi *BigInt) SetBytes(buf []byte) + func (bi *BigInt) SetInt64(x int64) + func (bi *BigInt) SetString(x string, base int) + func (bi *BigInt) String() string + type BigInts struct + func (bi *BigInts) Get(index int) (*BigInt, error) + func (bi *BigInts) Set(index int, bigint *BigInt) error + func (bi *BigInts) Size() int + type Block struct + func (b *Block) GetBloom() *Bloom + func (b *Block) GetCoinbase() *Address + func (b *Block) GetDifficulty() *BigInt + func (b *Block) GetExtra() []byte + func (b *Block) GetGasLimit() int64 + func (b *Block) GetGasUsed() int64 + func (b *Block) GetHash() *Hash + func (b *Block) GetHashNoNonce() *Hash + func (b *Block) GetHeader() *Header + func (b *Block) GetMixDigest() *Hash + func (b *Block) GetNonce() int64 + func (b *Block) GetNumber() int64 + func (b *Block) GetParentHash() *Hash + func (b *Block) GetReceiptHash() *Hash + func (b *Block) GetRoot() *Hash + func (b *Block) GetTime() int64 + func (b *Block) GetTransaction(hash *Hash) *Transaction + func (b *Block) GetTransactions() *Transactions + func (b *Block) GetTxHash() *Hash + func (b *Block) GetUncleHash() *Hash + func (b *Block) GetUncles() *Headers + type Bloom struct + func (b *Bloom) GetBytes() []byte + func (b *Bloom) GetHex() string + type BoundContract struct + func BindContract(address *Address, abiJSON string, client *EthereumClient) (*BoundContract, error) + func DeployContract(opts *TransactOpts, abiJSON string, bytecode []byte, client *EthereumClient, ...) (*BoundContract, error) + func (c *BoundContract) Call(opts *CallOpts, out *Interfaces, method string, args *Interfaces) error + func (c *BoundContract) GetAddress() *Address + func (c *BoundContract) GetDeployer() *Transaction + func (c *BoundContract) Transact(opts *TransactOpts, method string, args *Interfaces) (*Transaction, error) + func (c *BoundContract) Transfer(opts *TransactOpts) (*Transaction, error) + type CallMsg struct + func NewCallMsg() *CallMsg + func (msg *CallMsg) GetData() []byte + func (msg *CallMsg) GetFrom() *Address + func (msg *CallMsg) GetGas() int64 + func (msg *CallMsg) GetGasPrice() *BigInt + func (msg *CallMsg) GetTo() *Address + func (msg *CallMsg) GetValue() *BigInt + func (msg *CallMsg) SetData(data []byte) + func (msg *CallMsg) SetFrom(address *Address) + func (msg *CallMsg) SetGas(gas int64) + func (msg *CallMsg) SetGasPrice(price *BigInt) + func (msg *CallMsg) SetTo(address *Address) + func (msg *CallMsg) SetValue(value *BigInt) + type CallOpts struct + func NewCallOpts() *CallOpts + func (opts *CallOpts) GetGasLimit() int64 + func (opts *CallOpts) IsPending() bool + func (opts *CallOpts) SetContext(context *Context) + func (opts *CallOpts) SetGasLimit(limit int64) + func (opts *CallOpts) SetPending(pending bool) + type ChainConfig struct + ChainID int64 + DAOForkBlock int64 + DAOForkSupport bool + EIP150Block int64 + EIP150Hash Hash + EIP155Block int64 + EIP158Block int64 + HomesteadBlock int64 + func MainnetChainConfig() *ChainConfig + func NewChainConfig() *ChainConfig + func TestnetChainConfig() *ChainConfig + type Context struct + func NewContext() *Context + func (c *Context) WithCancel() *Context + func (c *Context) WithDeadline(sec int64, nsec int64) *Context + func (c *Context) WithTimeout(nsec int64) *Context + type Enode struct + func NewEnode(rawurl string) (*Enode, error) + type Enodes struct + func FoundationBootnodes() *Enodes + func NewEnodes(size int) *Enodes + func NewEnodesEmpty() *Enodes + func (e *Enodes) Append(enode *Enode) + func (e *Enodes) Get(index int) (*Enode, error) + func (e *Enodes) Set(index int, enode *Enode) error + func (e *Enodes) Size() int + type EthereumClient struct + func NewEthereumClient(rawurl string) (*EthereumClient, error) + func (ec *EthereumClient) CallContract(ctx *Context, msg *CallMsg, number int64) ([]byte, error) + func (ec *EthereumClient) EstimateGas(ctx *Context, msg *CallMsg) (*BigInt, error) + func (ec *EthereumClient) FilterLogs(ctx *Context, query *FilterQuery) (*Logs, error) + func (ec *EthereumClient) GetBalanceAt(ctx *Context, account *Address, number int64) (*BigInt, error) + func (ec *EthereumClient) GetBlockByHash(ctx *Context, hash *Hash) (*Block, error) + func (ec *EthereumClient) GetBlockByNumber(ctx *Context, number int64) (*Block, error) + func (ec *EthereumClient) GetCodeAt(ctx *Context, account *Address, number int64) ([]byte, error) + func (ec *EthereumClient) GetHeaderByHash(ctx *Context, hash *Hash) (*Header, error) + func (ec *EthereumClient) GetHeaderByNumber(ctx *Context, number int64) (*Header, error) + func (ec *EthereumClient) GetNonceAt(ctx *Context, account *Address, number int64) (int64, error) + func (ec *EthereumClient) GetPendingBalanceAt(ctx *Context, account *Address) (*BigInt, error) + func (ec *EthereumClient) GetPendingCodeAt(ctx *Context, account *Address) ([]byte, error) + func (ec *EthereumClient) GetPendingNonceAt(ctx *Context, account *Address) (int64, error) + func (ec *EthereumClient) GetPendingStorageAt(ctx *Context, account *Address, key *Hash) ([]byte, error) + func (ec *EthereumClient) GetPendingTransactionCount(ctx *Context) (int, error) + func (ec *EthereumClient) GetStorageAt(ctx *Context, account *Address, key *Hash, number int64) ([]byte, error) + func (ec *EthereumClient) GetTransactionByHash(ctx *Context, hash *Hash) (*Transaction, error) + func (ec *EthereumClient) GetTransactionCount(ctx *Context, hash *Hash) (int, error) + func (ec *EthereumClient) GetTransactionInBlock(ctx *Context, hash *Hash, index int) (*Transaction, error) + func (ec *EthereumClient) GetTransactionReceipt(ctx *Context, hash *Hash) (*Receipt, error) + func (ec *EthereumClient) PendingCallContract(ctx *Context, msg *CallMsg) ([]byte, error) + func (ec *EthereumClient) SendTransaction(ctx *Context, tx *Transaction) error + func (ec *EthereumClient) SubscribeFilterLogs(ctx *Context, query *FilterQuery, handler FilterLogsHandler, buffer int) (*Subscription, error) + func (ec *EthereumClient) SubscribeNewHead(ctx *Context, handler NewHeadHandler, buffer int) (*Subscription, error) + func (ec *EthereumClient) SuggestGasPrice(ctx *Context) (*BigInt, error) + func (ec *EthereumClient) SyncProgress(ctx *Context) (*SyncProgress, error) + type FilterLogsHandler interface + OnError func(failure string) + OnFilterLogs func(log *Log) + type FilterQuery struct + func NewFilterQuery() *FilterQuery + func (fq *FilterQuery) GetAddresses() *Addresses + func (fq *FilterQuery) GetFromBlock() *BigInt + func (fq *FilterQuery) GetToBlock() *BigInt + func (fq *FilterQuery) GetTopics() *Topics + type Hash struct + func NewHashFromBytes(hash []byte) (*Hash, error) + func NewHashFromHex(hash string) (*Hash, error) + func (h *Hash) GetBytes() []byte + func (h *Hash) GetHex() string + func (h *Hash) SetBytes(hash []byte) error + func (h *Hash) SetHex(hash string) error + type Hashes struct + func (h *Hashes) Get(index int) (*Hash, error) + func (h *Hashes) Size() int + type Header struct + func (h *Header) GetBloom() *Bloom + func (h *Header) GetCoinbase() *Address + func (h *Header) GetDifficulty() *BigInt + func (h *Header) GetExtra() []byte + func (h *Header) GetGasLimit() int64 + func (h *Header) GetGasUsed() int64 + func (h *Header) GetHash() *Hash + func (h *Header) GetHashNoNonce() *Hash + func (h *Header) GetMixDigest() *Hash + func (h *Header) GetNonce() *Nonce + func (h *Header) GetNumber() int64 + func (h *Header) GetParentHash() *Hash + func (h *Header) GetReceiptHash() *Hash + func (h *Header) GetRoot() *Hash + func (h *Header) GetTime() int64 + func (h *Header) GetTxHash() *Hash + func (h *Header) GetUncleHash() *Hash + type Headers struct + func (h *Headers) Get(index int) (*Header, error) + func (h *Headers) Size() int + type Interface struct + func NewInterface() *Interface + func (i *Interface) GetAddress() *Address + func (i *Interface) GetAddresses() *Addresses + func (i *Interface) GetBigInt() *BigInt + func (i *Interface) GetBigInts() *BigInts + func (i *Interface) GetBinaries() [][]byte + func (i *Interface) GetBinary() []byte + func (i *Interface) GetBool() bool + func (i *Interface) GetBools() []bool + func (i *Interface) GetHash() *Hash + func (i *Interface) GetHashes() *Hashes + func (i *Interface) GetInt16() int16 + func (i *Interface) GetInt32() int32 + func (i *Interface) GetInt64() int64 + func (i *Interface) GetInt8() int8 + func (i *Interface) GetString() string + func (i *Interface) GetStrings() *Strings + func (i *Interface) GetUint16() *BigInt + func (i *Interface) GetUint32() *BigInt + func (i *Interface) GetUint64() *BigInt + func (i *Interface) GetUint8() *BigInt + func (i *Interface) SetAddress(address *Address) + func (i *Interface) SetAddresses(addrs *Addresses) + func (i *Interface) SetBigInt(bigint *BigInt) + func (i *Interface) SetBigInts(bigints *BigInts) + func (i *Interface) SetBinaries(binaries [][]byte) + func (i *Interface) SetBinary(binary []byte) + func (i *Interface) SetBool(b bool) + func (i *Interface) SetBools(bs []bool) + func (i *Interface) SetDefaultAddress() + func (i *Interface) SetDefaultAddresses() + func (i *Interface) SetDefaultBigInt() + func (i *Interface) SetDefaultBigInts() + func (i *Interface) SetDefaultBinaries() + func (i *Interface) SetDefaultBinary() + func (i *Interface) SetDefaultBool() + func (i *Interface) SetDefaultBools() + func (i *Interface) SetDefaultHash() + func (i *Interface) SetDefaultHashes() + func (i *Interface) SetDefaultInt16() + func (i *Interface) SetDefaultInt32() + func (i *Interface) SetDefaultInt64() + func (i *Interface) SetDefaultInt8() + func (i *Interface) SetDefaultString() + func (i *Interface) SetDefaultStrings() + func (i *Interface) SetDefaultUint16() + func (i *Interface) SetDefaultUint32() + func (i *Interface) SetDefaultUint64() + func (i *Interface) SetDefaultUint8() + func (i *Interface) SetHash(hash *Hash) + func (i *Interface) SetHashes(hashes *Hashes) + func (i *Interface) SetInt16(n int16) + func (i *Interface) SetInt32(n int32) + func (i *Interface) SetInt64(n int64) + func (i *Interface) SetInt8(n int8) + func (i *Interface) SetString(str string) + func (i *Interface) SetStrings(strs *Strings) + func (i *Interface) SetUint16(bigint *BigInt) + func (i *Interface) SetUint32(bigint *BigInt) + func (i *Interface) SetUint64(bigint *BigInt) + func (i *Interface) SetUint8(bigint *BigInt) + type Interfaces struct + func NewInterfaces(size int) *Interfaces + func (i *Interfaces) Get(index int) (*Interface, error) + func (i *Interfaces) Set(index int, object *Interface) error + func (i *Interfaces) Size() int + type Log struct + func (l *Log) GetAddress() *Address + func (l *Log) GetBlockHash() *Hash + func (l *Log) GetBlockNumber() int64 + func (l *Log) GetData() []byte + func (l *Log) GetIndex() int + func (l *Log) GetTopics() *Hashes + func (l *Log) GetTxHash() *Hash + func (l *Log) GetTxIndex() int + type Logs struct + func (l *Logs) Get(index int) (*Log, error) + func (l *Logs) Size() int + type NewHeadHandler interface + OnError func(failure string) + OnNewHead func(header *Header) + type Node struct + func NewNode(datadir string, config *NodeConfig) (*Node, error) + func (n *Node) GetEthereumClient() (*EthereumClient, error) + func (n *Node) GetNodeInfo() *NodeInfo + func (n *Node) GetPeersInfo() *PeerInfos + func (n *Node) Start() error + func (n *Node) Stop() error + type NodeConfig struct + BootstrapNodes *Enodes + EthereumChainConfig *ChainConfig + EthereumDatabaseCache int + EthereumEnabled bool + EthereumGenesis string + EthereumNetworkID int + EthereumTestnetNonces bool + MaxPeers int + WhisperEnabled bool + func NewNodeConfig() *NodeConfig + type NodeInfo struct + func (ni *NodeInfo) GetDiscoveryPort() int + func (ni *NodeInfo) GetEnode() string + func (ni *NodeInfo) GetID() string + func (ni *NodeInfo) GetIP() string + func (ni *NodeInfo) GetListenerAddress() string + func (ni *NodeInfo) GetListenerPort() int + func (ni *NodeInfo) GetName() string + func (ni *NodeInfo) GetProtocols() *Strings + type Nonce struct + func (n *Nonce) GetBytes() []byte + func (n *Nonce) GetHex() string + type PeerInfo struct + func (pi *PeerInfo) GetCaps() *Strings + func (pi *PeerInfo) GetID() string + func (pi *PeerInfo) GetLocalAddress() string + func (pi *PeerInfo) GetName() string + func (pi *PeerInfo) GetRemoteAddress() string + type PeerInfos struct + func (pi *PeerInfos) Get(index int) (*PeerInfo, error) + func (pi *PeerInfos) Size() int + type Receipt struct + func (r *Receipt) GetBloom() *Bloom + func (r *Receipt) GetContractAddress() *Address + func (r *Receipt) GetCumulativeGasUsed() *BigInt + func (r *Receipt) GetGasUsed() *BigInt + func (r *Receipt) GetLogs() *Logs + func (r *Receipt) GetPostState() []byte + func (r *Receipt) GetTxHash() *Hash + type Signer interface + Sign func(*Address, *Transaction) (*Transaction, error) + type Strings struct + func (s *Strings) Get(index int) (string, error) + func (s *Strings) Set(index int, str string) error + func (s *Strings) Size() int + func (s *Strings) String() string + type Subscription struct + func (s *Subscription) Unsubscribe() + type SyncProgress struct + func (p *SyncProgress) GetCurrentBlock() int64 + func (p *SyncProgress) GetHighestBlock() int64 + func (p *SyncProgress) GetKnownStates() int64 + func (p *SyncProgress) GetPulledStates() int64 + func (p *SyncProgress) GetStartingBlock() int64 + type Topics struct + func (t *Topics) Get(index int) (*Hashes, error) + func (t *Topics) Set(index int, topics *Hashes) error + func (t *Topics) Size() int + type TransactOpts struct + func (opts *TransactOpts) GetFrom() *Address + func (opts *TransactOpts) GetGasLimit() int64 + func (opts *TransactOpts) GetGasPrice() *BigInt + func (opts *TransactOpts) GetNonce() int64 + func (opts *TransactOpts) GetValue() *BigInt + func (opts *TransactOpts) SetContext(context *Context) + func (opts *TransactOpts) SetFrom(from *Address) + func (opts *TransactOpts) SetGasLimit(limit int64) + func (opts *TransactOpts) SetGasPrice(price *BigInt) + func (opts *TransactOpts) SetNonce(nonce int64) + func (opts *TransactOpts) SetSigner(s Signer) + func (opts *TransactOpts) SetValue(value *BigInt) + type Transaction struct + func (tx *Transaction) GetCost() *BigInt + func (tx *Transaction) GetData() []byte + func (tx *Transaction) GetFrom() (*Address, error) + func (tx *Transaction) GetGas() int64 + func (tx *Transaction) GetGasPrice() *BigInt + func (tx *Transaction) GetHash() *Hash + func (tx *Transaction) GetNonce() int64 + func (tx *Transaction) GetSigHash() *Hash + func (tx *Transaction) GetTo() *Address + func (tx *Transaction) GetValue() *BigInt + func (tx *Transaction) WithSignature(sig []byte) (*Transaction, error) + type Transactions struct + func (t *Transactions) Get(index int) (*Transaction, error) + func (t *Transactions) Size() int