Versions in this module Expand all Collapse all v0 v0.2.0 Jan 23, 2019 Changes in this version + const EtherAmountDecimalPoint + const EthereumTypeAddressDescriptorLen + func GetHeightFromTx(tx *bchain.Tx) (uint32, error) type Configuration + BlockAddressesToKeep int type EthereumParser + func (p *EthereumParser) EthereumTypeGetErc20FromTx(tx *bchain.Tx) ([]bchain.Erc20Transfer, error) + func (p *EthereumParser) GetChainType() bchain.ChainType type EthereumRPC + func (b *EthereumRPC) EthereumTypeEstimateGas(params map[string]interface{}) (uint64, error) + func (b *EthereumRPC) EthereumTypeGetBalance(addrDesc bchain.AddressDescriptor) (*big.Int, error) + func (b *EthereumRPC) EthereumTypeGetErc20ContractBalance(addrDesc, contractDesc bchain.AddressDescriptor) (*big.Int, error) + func (b *EthereumRPC) EthereumTypeGetErc20ContractInfo(contractDesc bchain.AddressDescriptor) (*bchain.Erc20Contract, error) + func (b *EthereumRPC) EthereumTypeGetNonce(addrDesc bchain.AddressDescriptor) (uint64, error) + type EthereumTxData struct + GasLimit *big.Int + GasPrice *big.Int + GasUsed *big.Int + Nonce uint64 + Status int + func GetEthereumTxData(tx *bchain.Tx) *EthereumTxData + type ProtoCompleteTransaction struct + BlockNumber uint32 + BlockTime uint64 + Receipt *ProtoCompleteTransaction_ReceiptType + Tx *ProtoCompleteTransaction_TxType + func (*ProtoCompleteTransaction) Descriptor() ([]byte, []int) + func (*ProtoCompleteTransaction) ProtoMessage() + func (m *ProtoCompleteTransaction) GetBlockNumber() uint32 + func (m *ProtoCompleteTransaction) GetBlockTime() uint64 + func (m *ProtoCompleteTransaction) GetReceipt() *ProtoCompleteTransaction_ReceiptType + func (m *ProtoCompleteTransaction) GetTx() *ProtoCompleteTransaction_TxType + func (m *ProtoCompleteTransaction) Reset() + func (m *ProtoCompleteTransaction) String() string + type ProtoCompleteTransaction_ReceiptType struct + GasUsed []byte + Log []*ProtoCompleteTransaction_ReceiptType_LogType + Status []byte + func (*ProtoCompleteTransaction_ReceiptType) Descriptor() ([]byte, []int) + func (*ProtoCompleteTransaction_ReceiptType) ProtoMessage() + func (m *ProtoCompleteTransaction_ReceiptType) GetGasUsed() []byte + func (m *ProtoCompleteTransaction_ReceiptType) GetLog() []*ProtoCompleteTransaction_ReceiptType_LogType + func (m *ProtoCompleteTransaction_ReceiptType) GetStatus() []byte + func (m *ProtoCompleteTransaction_ReceiptType) Reset() + func (m *ProtoCompleteTransaction_ReceiptType) String() string + type ProtoCompleteTransaction_ReceiptType_LogType struct + Address []byte + Data []byte + Topics [][]byte + func (*ProtoCompleteTransaction_ReceiptType_LogType) Descriptor() ([]byte, []int) + func (*ProtoCompleteTransaction_ReceiptType_LogType) ProtoMessage() + func (m *ProtoCompleteTransaction_ReceiptType_LogType) GetAddress() []byte + func (m *ProtoCompleteTransaction_ReceiptType_LogType) GetData() []byte + func (m *ProtoCompleteTransaction_ReceiptType_LogType) GetTopics() [][]byte + func (m *ProtoCompleteTransaction_ReceiptType_LogType) Reset() + func (m *ProtoCompleteTransaction_ReceiptType_LogType) String() string + type ProtoCompleteTransaction_TxType struct + AccountNonce uint64 + From []byte + GasLimit uint64 + GasPrice []byte + Hash []byte + Payload []byte + To []byte + TransactionIndex uint32 + Value []byte + func (*ProtoCompleteTransaction_TxType) Descriptor() ([]byte, []int) + func (*ProtoCompleteTransaction_TxType) ProtoMessage() + func (m *ProtoCompleteTransaction_TxType) GetAccountNonce() uint64 + func (m *ProtoCompleteTransaction_TxType) GetFrom() []byte + func (m *ProtoCompleteTransaction_TxType) GetGasLimit() uint64 + func (m *ProtoCompleteTransaction_TxType) GetGasPrice() []byte + func (m *ProtoCompleteTransaction_TxType) GetHash() []byte + func (m *ProtoCompleteTransaction_TxType) GetPayload() []byte + func (m *ProtoCompleteTransaction_TxType) GetTo() []byte + func (m *ProtoCompleteTransaction_TxType) GetTransactionIndex() uint32 + func (m *ProtoCompleteTransaction_TxType) GetValue() []byte + func (m *ProtoCompleteTransaction_TxType) Reset() + func (m *ProtoCompleteTransaction_TxType) String() string v0.1.2 Jan 21, 2019 v0.1.1 Dec 5, 2018 Changes in this version type EthereumRPC + func (b *EthereumRPC) GetTransactionSpecific(txid string) (json.RawMessage, error) v0.1.0 Oct 10, 2018 Changes in this version type EthereumParser + func (p *EthereumParser) GetAddrDescFromAddress(address string) (bchain.AddressDescriptor, error) + func (p *EthereumParser) GetAddrDescFromVout(output *bchain.Vout) (bchain.AddressDescriptor, error) + func (p *EthereumParser) GetAddressesFromAddrDesc(addrDesc bchain.AddressDescriptor) ([]string, bool, error) + func (p *EthereumParser) GetScriptFromAddrDesc(addrDesc bchain.AddressDescriptor) ([]byte, error) type EthereumRPC + func (b *EthereumRPC) GetBlockInfo(hash string) (*bchain.BlockInfo, error) + func (b *EthereumRPC) GetChainInfo() (*bchain.ChainInfo, error) + func (b *EthereumRPC) GetMempoolTransactionsForAddrDesc(addrDesc bchain.AddressDescriptor) ([]string, error) v0.0.6 Sep 12, 2018 Changes in this version + func NewEthereumRPC(config json.RawMessage, pushHandler func(bchain.NotificationType)) (bchain.BlockChain, error) + type Configuration struct + CoinName string + CoinShortcut string + RPCTimeout int + RPCURL string + type EthereumNet uint32 + const MainNet + const TestNet + type EthereumParser struct + func NewEthereumParser() *EthereumParser + func (p *EthereumParser) GetAddrIDFromAddress(address string) ([]byte, error) + func (p *EthereumParser) GetAddrIDFromVout(output *bchain.Vout) ([]byte, error) + func (p *EthereumParser) IsUTXOChain() bool + func (p *EthereumParser) KeepBlockAddresses() int + func (p *EthereumParser) PackBlockHash(hash string) ([]byte, error) + func (p *EthereumParser) PackTx(tx *bchain.Tx, height uint32, blockTime int64) ([]byte, error) + func (p *EthereumParser) PackTxid(txid string) ([]byte, error) + func (p *EthereumParser) PackedTxidLen() int + func (p *EthereumParser) UnpackBlockHash(buf []byte) (string, error) + func (p *EthereumParser) UnpackTx(buf []byte) (*bchain.Tx, uint32, error) + func (p *EthereumParser) UnpackTxid(buf []byte) (string, error) + type EthereumRPC struct + ChainConfig *Configuration + Mempool *bchain.NonUTXOMempool + Network string + Parser *EthereumParser + Testnet bool + func (b *EthereumRPC) EstimateFee(blocks int) (float64, error) + func (b *EthereumRPC) EstimateSmartFee(blocks int, conservative bool) (float64, error) + func (b *EthereumRPC) GetBestBlockHash() (string, error) + func (b *EthereumRPC) GetBestBlockHeight() (uint32, error) + func (b *EthereumRPC) GetBlock(hash string, height uint32) (*bchain.Block, error) + func (b *EthereumRPC) GetBlockChainInfo() (string, error) + func (b *EthereumRPC) GetBlockHash(height uint32) (string, error) + func (b *EthereumRPC) GetBlockHeader(hash string) (*bchain.BlockHeader, error) + func (b *EthereumRPC) GetChainParser() bchain.BlockChainParser + func (b *EthereumRPC) GetCoinName() string + func (b *EthereumRPC) GetMempool() ([]string, error) + func (b *EthereumRPC) GetMempoolEntry(txid string) (*bchain.MempoolEntry, error) + func (b *EthereumRPC) GetMempoolTransactions(address string) ([]string, error) + func (b *EthereumRPC) GetNetworkName() string + func (b *EthereumRPC) GetSubversion() string + func (b *EthereumRPC) GetTransaction(txid string) (*bchain.Tx, error) + func (b *EthereumRPC) GetTransactionForMempool(txid string) (*bchain.Tx, error) + func (b *EthereumRPC) Initialize() error + func (b *EthereumRPC) IsTestnet() bool + func (b *EthereumRPC) ResyncMempool(onNewTxAddr bchain.OnNewTxAddrFunc) (int, error) + func (b *EthereumRPC) SendRawTransaction(hex string) (string, error) + func (b *EthereumRPC) Shutdown(ctx context.Context) error + type ProtoTransaction struct + AccountNonce uint64 + BlockNumber uint32 + BlockTime uint64 + From []byte + GasLimit uint64 + Hash []byte + Payload []byte + Price []byte + R []byte + S []byte + To []byte + TransactionIndex uint32 + V []byte + Value []byte + func (*ProtoTransaction) Descriptor() ([]byte, []int) + func (*ProtoTransaction) ProtoMessage() + func (m *ProtoTransaction) GetAccountNonce() uint64 + func (m *ProtoTransaction) GetBlockNumber() uint32 + func (m *ProtoTransaction) GetBlockTime() uint64 + func (m *ProtoTransaction) GetFrom() []byte + func (m *ProtoTransaction) GetGasLimit() uint64 + func (m *ProtoTransaction) GetHash() []byte + func (m *ProtoTransaction) GetPayload() []byte + func (m *ProtoTransaction) GetPrice() []byte + func (m *ProtoTransaction) GetR() []byte + func (m *ProtoTransaction) GetS() []byte + func (m *ProtoTransaction) GetTo() []byte + func (m *ProtoTransaction) GetTransactionIndex() uint32 + func (m *ProtoTransaction) GetV() []byte + func (m *ProtoTransaction) GetValue() []byte + func (m *ProtoTransaction) Reset() + func (m *ProtoTransaction) String() string