Documentation ¶
Index ¶
- type Client
- func (c *Client) Call(method string, out interface{}, params ...interface{}) error
- func (c *Client) Close() error
- func (c *Client) Debug() *Debug
- func (c *Client) Eth() *Eth
- func (c *Client) Net() *Net
- func (c *Client) SetMaxConnsLimit(count int)
- func (c *Client) Subscribe(method string, callback func(b []byte)) (func() error, error)
- func (c *Client) SubscriptionEnabled() bool
- func (c *Client) Web3() *Web3
- type Config
- type ConfigOption
- type Debug
- type Eth
- func (e *Eth) Accounts() ([]web3.Address, error)
- func (e *Eth) BlockNumber() (uint64, error)
- func (e *Eth) Call(msg *web3.CallMsg, block web3.BlockNumber) (string, error)
- func (e *Eth) ChainID() (*big.Int, error)
- func (e *Eth) EstimateGas(msg *web3.CallMsg) (uint64, error)
- func (e *Eth) EstimateGasContract(bin []byte) (uint64, error)
- func (e *Eth) GasPrice() (uint64, error)
- func (e *Eth) GetBalance(addr web3.Address, blockNumber web3.BlockNumberOrHash) (*big.Int, error)
- func (e *Eth) GetBlockByHash(hash web3.Hash, full bool) (*web3.Block, error)
- func (e *Eth) GetBlockByNumber(i web3.BlockNumber, full bool) (*web3.Block, error)
- func (e *Eth) GetCode(addr web3.Address, block web3.BlockNumberOrHash) (string, error)
- func (e *Eth) GetFilterChanges(id string) ([]*web3.Log, error)
- func (e *Eth) GetFilterChangesBlock(id string) ([]web3.Hash, error)
- func (e *Eth) GetLogs(filter *web3.LogFilter) ([]*web3.Log, error)
- func (e *Eth) GetNonce(addr web3.Address, blockNumber web3.BlockNumberOrHash) (uint64, error)
- func (e *Eth) GetStorageAt(addr web3.Address, slot web3.Hash, block web3.BlockNumberOrHash) (web3.Hash, error)
- func (e *Eth) GetTransactionByHash(hash web3.Hash) (*web3.Transaction, error)
- func (e *Eth) GetTransactionReceipt(hash web3.Hash) (*web3.Receipt, error)
- func (e *Eth) NewBlockFilter() (string, error)
- func (e *Eth) NewFilter(filter *web3.LogFilter) (string, error)
- func (e *Eth) SendRawTransaction(data []byte) (web3.Hash, error)
- func (e *Eth) SendTransaction(txn *web3.Transaction) (web3.Hash, error)
- func (e *Eth) UninstallFilter(id string) (bool, error)
- type Net
- type StructLogs
- type TransactionTrace
- type Web3
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
Client is the jsonrpc client
func (*Client) SetMaxConnsLimit ¶
SetMaxConnsLimit sets the maximum number of connections that can be established with a host
func (*Client) SubscriptionEnabled ¶
SubscriptionEnabled returns true if the subscription endpoints are enabled
type ConfigOption ¶
type ConfigOption func(*Config)
func WithHeaders ¶
func WithHeaders(headers map[string]string) ConfigOption
type Debug ¶
type Debug struct {
// contains filtered or unexported fields
}
func (*Debug) TraceTransaction ¶
func (d *Debug) TraceTransaction(hash web3.Hash) (*TransactionTrace, error)
type Eth ¶
type Eth struct {
// contains filtered or unexported fields
}
Eth is the eth namespace
func (*Eth) BlockNumber ¶
BlockNumber returns the number of most recent block.
func (*Eth) Call ¶
Call executes a new message call immediately without creating a transaction on the block chain.
func (*Eth) EstimateGas ¶
EstimateGas generates and returns an estimate of how much gas is necessary to allow the transaction to complete.
func (*Eth) EstimateGasContract ¶
EstimateGasContract estimates the gas to deploy a contract
func (*Eth) GetBalance ¶
GetBalance returns the balance of the account of given address.
func (*Eth) GetBlockByHash ¶
GetBlockByHash returns information about a block by hash.
func (*Eth) GetBlockByNumber ¶
GetBlockByNumber returns information about a block by block number.
func (*Eth) GetFilterChanges ¶
GetFilterChanges returns the filter changes for log filters
func (*Eth) GetFilterChangesBlock ¶
GetFilterChangesBlock returns the filter changes for block filters
func (*Eth) GetStorageAt ¶
func (e *Eth) GetStorageAt(addr web3.Address, slot web3.Hash, block web3.BlockNumberOrHash) (web3.Hash, error)
GetStorageAt returns the value from a storage position at a given address.
func (*Eth) GetTransactionByHash ¶
GetTransactionByHash returns a transaction by his hash
func (*Eth) GetTransactionReceipt ¶
GetTransactionReceipt returns the receipt of a transaction by transaction hash.
func (*Eth) NewBlockFilter ¶
NewBlockFilter creates a new block filter
func (*Eth) SendRawTransaction ¶
SendRawTransaction sends a signed transaction in rlp format.
func (*Eth) SendTransaction ¶
SendTransaction creates new message call transaction or a contract creation.
type Net ¶
type Net struct {
// contains filtered or unexported fields
}
Net is the net namespace
func (*Net) Listening ¶
Listening returns true if client is actively listening for network connections
type StructLogs ¶
type TransactionTrace ¶
type TransactionTrace struct { Gas uint64 ReturnValue string StructLogs []*StructLogs }
type Web3 ¶
type Web3 struct {
// contains filtered or unexported fields
}
Web3 is the web3 namespace
func (*Web3) ClientVersion ¶
ClientVersion returns the current client version