Documentation ¶
Overview ¶
package client provides API for communication with an Ethereum blockchain.
Index ¶
- type Client
- func (c *Client) EtherToWei(ether *big.Float) *big.Int
- func (c *Client) GetTransactionStatus(ctx context.Context, txHash common.Hash) TxStatus
- func (c *Client) QueryERC20Balance(ctx context.Context, address common.Address, pending bool) (*big.Int, error)
- func (c *Client) QueryEtherBalance(ctx context.Context, address common.Address, blockNumber *big.Int) (*big.Int, error)
- func (c *Client) TransferERC20Tokens(ctx context.Context, amount int64, targetAddress common.Address, ...) (common.Hash, error)
- func (c *Client) TransferEther(ctx context.Context, toAddress common.Address, amount float64) (common.Hash, error)
- type Config
- type TxStatus
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 defines necessary attributes for establishing communication with an Ethereum blockchain and for performing functions required by the Nym system.
func (*Client) GetTransactionStatus ¶
used to get status of transaction, pending, accepted, rejected, etc
func (*Client) QueryERC20Balance ¶
func (c *Client) QueryERC20Balance(ctx context.Context, address common.Address, pending bool) (*big.Int, error)
pending is used to decide whether to query pending balance
func (*Client) QueryEtherBalance ¶
func (c *Client) QueryEtherBalance(ctx context.Context, address common.Address, blockNumber *big.Int) (*big.Int, error)
for nil blockNumber, latest known is used
Click to show internal directories.
Click to hide internal directories.