Versions in this module Expand all Collapse all v0 v0.1.0 May 8, 2018 Changes in this version + const BlockBodiesMsg + const BlockHeadersMsg + const ErrDecode + const ErrExtraStatusMsg + const ErrGenesisBlockMismatch + const ErrInvalidMsgCode + const ErrMsgTooLarge + const ErrNetworkIdMismatch + const ErrNoStatusMsg + const ErrProtocolVersionMismatch + const ErrSuspendedPeer + const GetBlockBodiesMsg + const GetBlockHeadersMsg + const GetNodeDataMsg + const GetReceiptsMsg + const NetworkId + const NewBlockHashesMsg + const NewBlockMsg + const NodeDataMsg + const ProtocolMaxMsgSize + const ReceiptsMsg + const StatusMsg + const TxMsg + var EnableBadBlockReporting = false + var ProtocolLengths = []uint64 + var ProtocolName = "web" + var ProtocolVersions = []uint + func GPUBench(gpuid uint64) + func PrintOpenCLDevices() + func ProtocolMessageStringer(m uint) string + type CallArgs struct + Data string + From common.Address + Gas *rpc.HexNumber + GasPrice *rpc.HexNumber + To *common.Address + Value rpc.HexNumber + type Config struct + AccountManager *accounts.Manager + BlockChainVersion int + ChainConfig *core.ChainConfig + DatabaseCache int + DatabaseHandles int + DocRoot string + Etherbase common.Address + FastSync bool + GasPrice *big.Int + Genesis *core.GenesisDump + GpoFullBlockRatio int + GpoMaxGasPrice *big.Int + GpoMinGasPrice *big.Int + GpobaseCorrectionFactor int + GpobaseStepDown int + GpobaseStepUp int + MinerThreads int + NatSpec bool + NetworkId int + PowShared bool + PowTest bool + SkipBcVersionCheck bool + SolcPath string + TestGenesisBlock *types.Block + TestGenesisState ethdb.Database + type ContractBackend struct + func NewContractBackend(eth *Ethereum) *ContractBackend + func (b *ContractBackend) ContractCall(contract common.Address, data []byte, pending bool) ([]byte, error) + func (b *ContractBackend) EstimateGasLimit(sender common.Address, contract *common.Address, value *big.Int, data []byte) (*big.Int, error) + func (b *ContractBackend) HasCode(contract common.Address, pending bool) (bool, error) + func (b *ContractBackend) PendingAccountNonce(account common.Address) (uint64, error) + func (b *ContractBackend) SendTransaction(tx *types.Transaction) error + func (b *ContractBackend) SuggestGasPrice() (*big.Int, error) + type EthNodeInfo struct + Difficulty *big.Int + Genesis common.Hash + Head common.Hash + Network int + type Ethereum struct + GpoFullBlockRatio int + GpoMaxGasPrice *big.Int + GpoMinGasPrice *big.Int + GpobaseCorrectionFactor int + GpobaseStepDown int + GpobaseStepUp int + MinerThreads int + Mining bool + NatSpec bool + PowTest bool + SolcPath string + func New(ctx *node.ServiceContext, config *Config) (*Ethereum, error) + func (s *Ethereum) APIs() []rpc.API + func (s *Ethereum) AccountManager() *accounts.Manager + func (s *Ethereum) BlockChain() *core.BlockChain + func (s *Ethereum) ChainConfig() *core.ChainConfig + func (s *Ethereum) ChainDb() ethdb.Database + func (s *Ethereum) DappDb() ethdb.Database + func (s *Ethereum) Downloader() *downloader.Downloader + func (s *Ethereum) EthVersion() int + func (s *Ethereum) Etherbase() (eb common.Address, err error) + func (s *Ethereum) EventMux() *event.TypeMux + func (s *Ethereum) IsListening() bool + func (s *Ethereum) IsMining() bool + func (s *Ethereum) Miner() *miner.Miner + func (s *Ethereum) NetVersion() int + func (s *Ethereum) Protocols() []p2p.Protocol + func (s *Ethereum) ResetWithGenesisBlock(gb *types.Block) + func (s *Ethereum) Start(srvr *p2p.Server) error + func (s *Ethereum) StartMining(threads int, gpus string) error + func (s *Ethereum) Stop() error + func (s *Ethereum) StopMining() + func (s *Ethereum) TxPool() *core.TxPool + func (s *Ethereum) WaitForShutdown() + func (self *Ethereum) HTTPClient() *httpclient.HTTPClient + func (self *Ethereum) SetEtherbase(etherbase common.Address) + func (self *Ethereum) SetSolc(solcPath string) (*compiler.Solidity, error) + func (self *Ethereum) Solc() (*compiler.Solidity, error) + type ExecutionResult struct + Gas *big.Int + ReturnValue string + type GasPriceOracle struct + func NewGasPriceOracle(eth *Ethereum) *GasPriceOracle + func (self *GasPriceOracle) SuggestPrice() *big.Int + type NewBlocksArgs struct + IncludeTransactions bool + TransactionDetails bool + type PeerInfo struct + Difficulty *big.Int + Head string + Version int + type PrivateAccountAPI struct + func NewPrivateAccountAPI(e *Ethereum) *PrivateAccountAPI + func (s *PrivateAccountAPI) ImportRawKey(privkey string, password string) (common.Address, error) + func (s *PrivateAccountAPI) ListAccounts() []common.Address + func (s *PrivateAccountAPI) LockAccount(addr common.Address) bool + func (s *PrivateAccountAPI) NewAccount(password string) (common.Address, error) + func (s *PrivateAccountAPI) SendTransaction(args SendTxArgs, passwd string) (common.Hash, error) + func (s *PrivateAccountAPI) Sign(data []byte, addr common.Address, passwd string) (string, error) + func (s *PrivateAccountAPI) SignAndSendTransaction(args SendTxArgs, passwd string) (common.Hash, error) + func (s *PrivateAccountAPI) UnlockAccount(addr common.Address, password string, duration *rpc.HexNumber) (bool, error) + type PrivateAdminAPI struct + func NewPrivateAdminAPI(eth *Ethereum) *PrivateAdminAPI + func (api *PrivateAdminAPI) ExportChain(file string) (bool, error) + func (api *PrivateAdminAPI) ImportChain(file string) (bool, error) + func (api *PrivateAdminAPI) SetSolc(path string) (string, error) + type PrivateMinerAPI struct + func NewPrivateMinerAPI(e *Ethereum) *PrivateMinerAPI + func (s *PrivateMinerAPI) SetEtherbase(etherbase common.Address) bool + func (s *PrivateMinerAPI) SetGasPrice(gasPrice rpc.HexNumber) bool + func (s *PrivateMinerAPI) Start(threads *rpc.HexNumber) (bool, error) + func (s *PrivateMinerAPI) Stop() bool + type ProtocolManager struct + SubProtocols []p2p.Protocol + func NewProtocolManager(config *core.ChainConfig, fastSync bool, networkId int, mux *event.TypeMux, ...) (*ProtocolManager, error) + func (pm *ProtocolManager) BroadcastBlock(block *types.Block, propagate bool) + func (pm *ProtocolManager) BroadcastTx(hash common.Hash, tx *types.Transaction) + func (pm *ProtocolManager) Start() + func (pm *ProtocolManager) Stop() + func (self *ProtocolManager) NodeInfo() *EthNodeInfo + type PublicAccountAPI struct + func NewPublicAccountAPI(am *accounts.Manager) *PublicAccountAPI + func (s *PublicAccountAPI) Accounts() []accounts.Account + type PublicBlockChainAPI struct + func NewPublicBlockChainAPI(config *core.ChainConfig, bc *core.BlockChain, m *miner.Miner, ...) *PublicBlockChainAPI + func (s *PublicBlockChainAPI) BlockNumber() *big.Int + func (s *PublicBlockChainAPI) Call(args CallArgs, blockNr rpc.BlockNumber) (string, error) + func (s *PublicBlockChainAPI) EstimateGas(args CallArgs) (*rpc.HexNumber, error) + func (s *PublicBlockChainAPI) GetBalance(address common.Address, blockNr rpc.BlockNumber) (*big.Int, error) + func (s *PublicBlockChainAPI) GetBlockByHash(blockHash common.Hash, fullTx bool) (map[string]interface{}, error) + func (s *PublicBlockChainAPI) GetBlockByNumber(blockNr rpc.BlockNumber, fullTx bool) (map[string]interface{}, error) + func (s *PublicBlockChainAPI) GetCode(address common.Address, blockNr rpc.BlockNumber) (string, error) + func (s *PublicBlockChainAPI) GetStorageAt(address common.Address, key string, blockNr rpc.BlockNumber) (string, error) + func (s *PublicBlockChainAPI) GetUncleByBlockHashAndIndex(blockHash common.Hash, index rpc.HexNumber) (map[string]interface{}, error) + func (s *PublicBlockChainAPI) GetUncleByBlockNumberAndIndex(blockNr rpc.BlockNumber, index rpc.HexNumber) (map[string]interface{}, error) + func (s *PublicBlockChainAPI) GetUncleCountByBlockHash(blockHash common.Hash) *rpc.HexNumber + func (s *PublicBlockChainAPI) GetUncleCountByBlockNumber(blockNr rpc.BlockNumber) *rpc.HexNumber + func (s *PublicBlockChainAPI) NewBlocks(ctx context.Context, args NewBlocksArgs) (rpc.Subscription, error) + func (s *PublicBlockChainAPI) TraceCall(args CallArgs, blockNr rpc.BlockNumber) (*ExecutionResult, error) + type PublicDebugAPI struct + func NewPublicDebugAPI(eth *Ethereum) *PublicDebugAPI + func (api *PublicDebugAPI) AccountExist(address common.Address, number uint64) (bool, error) + func (api *PublicDebugAPI) DumpBlock(number uint64) (state.Dump, error) + func (api *PublicDebugAPI) GetBlockRlp(number uint64) (string, error) + func (api *PublicDebugAPI) Metrics(raw bool) (map[string]interface{}, error) + func (api *PublicDebugAPI) PrintBlock(number uint64) (string, error) + func (api *PublicDebugAPI) Verbosity(n uint64) (int, error) + func (api *PublicDebugAPI) Vmodule(s string) (string, error) + func (s *PublicDebugAPI) TraceTransaction(txHash common.Hash) (*ExecutionResult, error) + type PublicEthereumAPI struct + func NewPublicEthereumAPI(e *Ethereum) *PublicEthereumAPI + func (s *PublicEthereumAPI) ChainId() *big.Int + func (s *PublicEthereumAPI) Coinbase() (common.Address, error) + func (s *PublicEthereumAPI) CompileSolidity(source string) (map[string]*compiler.Contract, error) + func (s *PublicEthereumAPI) Etherbase() (common.Address, error) + func (s *PublicEthereumAPI) GasPrice() *big.Int + func (s *PublicEthereumAPI) GetCompilers() ([]string, error) + func (s *PublicEthereumAPI) Hashrate() *rpc.HexNumber + func (s *PublicEthereumAPI) ProtocolVersion() *rpc.HexNumber + func (s *PublicEthereumAPI) Syncing() (interface{}, error) + type PublicMinerAPI struct + func NewPublicMinerAPI(e *Ethereum) *PublicMinerAPI + func (s *PublicMinerAPI) GetWork() (work [3]string, err error) + func (s *PublicMinerAPI) Mining() bool + func (s *PublicMinerAPI) SubmitHashrate(hashrate rpc.HexNumber, id common.Hash) bool + func (s *PublicMinerAPI) SubmitWork(nonce rpc.HexNumber, solution common.Hash) bool + type PublicNetAPI struct + func NewPublicNetAPI(net *p2p.Server, networkVersion int) *PublicNetAPI + func (s *PublicNetAPI) Listening() bool + func (s *PublicNetAPI) PeerCount() *rpc.HexNumber + func (s *PublicNetAPI) Version() string + type PublicTransactionPoolAPI struct + func NewPublicTransactionPoolAPI(e *Ethereum) *PublicTransactionPoolAPI + func (s *PublicTransactionPoolAPI) GetBlockTransactionCountByHash(blockHash common.Hash) *rpc.HexNumber + func (s *PublicTransactionPoolAPI) GetBlockTransactionCountByNumber(blockNr rpc.BlockNumber) *rpc.HexNumber + func (s *PublicTransactionPoolAPI) GetTransactionByBlockHashAndIndex(blockHash common.Hash, index rpc.HexNumber) (*RPCTransaction, error) + func (s *PublicTransactionPoolAPI) GetTransactionByBlockNumberAndIndex(blockNr rpc.BlockNumber, index rpc.HexNumber) (*RPCTransaction, error) + func (s *PublicTransactionPoolAPI) GetTransactionByHash(txHash common.Hash) (*RPCTransaction, error) + func (s *PublicTransactionPoolAPI) GetTransactionCount(address common.Address, blockNr rpc.BlockNumber) (*rpc.HexNumber, error) + func (s *PublicTransactionPoolAPI) GetTransactionReceipt(txHash common.Hash) (map[string]interface{}, error) + func (s *PublicTransactionPoolAPI) NewPendingTransactions(ctx context.Context) (rpc.Subscription, error) + func (s *PublicTransactionPoolAPI) PendingTransactions() []*RPCTransaction + func (s *PublicTransactionPoolAPI) Resend(tx Tx, gasPrice, gasLimit *rpc.HexNumber) (common.Hash, error) + func (s *PublicTransactionPoolAPI) SendRawTransaction(encodedTx string) (string, error) + func (s *PublicTransactionPoolAPI) SendTransaction(args SendTxArgs) (common.Hash, error) + func (s *PublicTransactionPoolAPI) Sign(addr common.Address, data []byte) (string, error) + func (s *PublicTransactionPoolAPI) SignTransaction(args SignTransactionArgs) (*SignTransactionResult, error) + type PublicTxPoolAPI struct + func NewPublicTxPoolAPI(e *Ethereum) *PublicTxPoolAPI + func (s *PublicTxPoolAPI) Content() map[string]map[string]map[string][]*RPCTransaction + func (s *PublicTxPoolAPI) Inspect() map[string]map[string]map[string][]string + func (s *PublicTxPoolAPI) Status() map[string]*rpc.HexNumber + type RPCTransaction struct + BlockHash common.Hash + BlockNumber *rpc.HexNumber + ChainId *big.Int + From common.Address + Gas *rpc.HexNumber + GasPrice *rpc.HexNumber + Hash common.Hash + Input string + Nonce *rpc.HexNumber + ReplayProtected bool + To *common.Address + TransactionIndex *rpc.HexNumber + Value *rpc.HexNumber + type SendTxArgs struct + Data string + From common.Address + Gas *rpc.HexNumber + GasPrice *rpc.HexNumber + Nonce *rpc.HexNumber + To *common.Address + Value *rpc.HexNumber + type SignTransactionArgs struct + BlockNumber int64 + Data string + From common.Address + Gas *rpc.HexNumber + GasPrice *rpc.HexNumber + Nonce *rpc.HexNumber + To *common.Address + Value *rpc.HexNumber + type SignTransactionResult struct + Raw string + Tx *Tx + type Tx struct + Data string + From common.Address + GasLimit *rpc.HexNumber + GasPrice *rpc.HexNumber + Hash common.Hash + Nonce *rpc.HexNumber + To *common.Address + Value *rpc.HexNumber + func (tx *Tx) UnmarshalJSON(b []byte) (err error)