Documentation ¶
Index ¶
- type EthClient
- func (c *EthClient) DecodeRawTx(rawtx string) (*types.Transaction, error)
- func (c *EthClient) GetAdressFromPrivateKey(privKeyHex string) (string, error)
- func (c *EthClient) GetBalance(address string, blockNumber *big.Int) (string, error)
- func (c *EthClient) GetTransactionsByHash(hashes []common.Hash) (txs []*types.Transaction, err error)
- func (c *EthClient) ImportRawKey(key string) (string, error)
- func (c *EthClient) PrintPretty(msg string, source interface{})
- func (c *EthClient) Send(key string, receiver string, weiAmount string) (signedTx *types.Transaction, err error)
- type Eth_GasPriceRequest
- type Eth_GasPriceResponse
- type Eth_GetTransactionByHashResponse
- type Eth_SendRawTransactionRequest
- type Eth_SendRawTransactionResponse
- type Net_VersionRequest
- type Net_VersionResponse
- type RawTransaction
- type RlpDecodedRawTransaction
- type TransactionHash
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type EthClient ¶
func NewEthClient ¶
func (*EthClient) DecodeRawTx ¶
func (c *EthClient) DecodeRawTx(rawtx string) (*types.Transaction, error)
DecodeRawTX decodes a raw ethereum RLP encoded transaction and returns a go-ethereum types.Transaction
func (*EthClient) GetAdressFromPrivateKey ¶
GetAdressFromPrivateKey returns the ethereum address from a private key encoded as a hex string
func (*EthClient) GetBalance ¶
GetBalance returns a string with the balance of an address in units of wei
func (*EthClient) GetTransactionsByHash ¶
func (c *EthClient) GetTransactionsByHash(hashes []common.Hash) (txs []*types.Transaction, err error)
Returns a slice of transactions given a slice of transaction hashes
func (*EthClient) ImportRawKey ¶
ImportRawKey() imports a private key into the keystore of the node
func (*EthClient) PrintPretty ¶
type Eth_GasPriceResponse ¶
type Eth_GasPriceResponse string
type Eth_GetTransactionByHashResponse ¶
type Eth_GetTransactionByHashResponse struct { BlockHash string `json:"blockHash"` BlockNumber string `json:"blockNumber"` From string `json:"from"` Gas string `json:"gas"` GasPrice string `json:"gasPrice"` Hash string `json:"hash"` Input string `json:"input"` Nonce string `json:"nonce"` To string `json:"to"` TransactionIndex string `json:"transactionIndex"` Value string `json:"value"` V string `json:"v"` R string `json:"r"` S string `json:"s"` }
RPC Method: eth_getTransactionByHash
type Eth_SendRawTransactionRequest ¶
type Eth_SendRawTransactionRequest struct {
RawTx string `json:"rawtx"`
}
RPC Method: eth_sendRawTransaction
type Eth_SendRawTransactionResponse ¶
type Eth_SendRawTransactionResponse struct {
Hash string `json:"hash"`
}
type Net_VersionResponse ¶
type Net_VersionResponse string
type RawTransaction ¶
type RawTransaction struct { From string `json:"from"` Gas string `json:"gas"` GasPrice string `json:"gasPrice"` Hash string `json:"hash"` Input string `json:"input"` Nonce string `json:"nonce"` To string `json:"to"` TransactionIndex string `json:"transactionIndex"` Value string `json:"value"` V string `json:"v"` R string `json:"r"` S string `json:"s"` }
type RlpDecodedRawTransaction ¶
type RlpDecodedRawTransaction struct {
types.Transaction
}
func (*RlpDecodedRawTransaction) Unmarshal ¶
func (tx *RlpDecodedRawTransaction) Unmarshal() (*RawTransaction, error)
type TransactionHash ¶
type TransactionHash struct {
Hash string `json:"hash"`
}
Click to show internal directories.
Click to hide internal directories.