Documentation
¶
Index ¶
- func FromWei(value *big.Int, unit ValueUnit) *big.Float
- func ToWei(value *big.Float, unit ValueUnit) *big.Int
- type Client
- func (c *Client) EthAccounts(ctx context.Context) ([]common.Address, error)
- func (c *Client) EthCall(ctx context.Context, msg interface{}) ([]byte, error)
- func (c *Client) EthCoinbase(ctx context.Context) (common.Address, error)
- func (c *Client) EthEstimateGas(ctx context.Context, msg interface{}) (uint64, error)
- func (c *Client) EthGasPrice(ctx context.Context) (*big.Int, error)
- func (c *Client) EthGetBalance(ctx context.Context, account common.Address, blockLocator interface{}) (*big.Int, error)
- func (c *Client) EthGetBlockByHash(ctx context.Context, hash common.Hash) (*types.Block, error)
- func (c *Client) EthGetBlockByNumber(ctx context.Context, number *big.Int) (*types.Block, error)
- func (c *Client) EthGetBlockTransactionCountByHash(ctx context.Context, blockHash common.Hash) (uint, error)
- func (c *Client) EthGetBlockTransactionCountByNumber(ctx context.Context, blockLocator interface{}) (uint, error)
- func (c *Client) EthGetCode(ctx context.Context, account common.Address, blockLocator interface{}) ([]byte, error)
- func (c *Client) EthGetFilterChanges(ctx context.Context, filterId string) ([]common.Hash, error)
- func (c *Client) EthGetFilterLogs(ctx context.Context, filterId uint64) (*types.Log, error)
- func (c *Client) EthGetLogFilterChanges(ctx context.Context, filterId string) ([]types.Log, error)
- func (c *Client) EthGetStorageAt(ctx context.Context, account common.Address, key common.Hash, ...) ([]byte, error)
- func (c *Client) EthGetTransactionCount(ctx context.Context, account common.Address, blockLocator interface{}) (uint64, error)
- func (c *Client) EthGetTransactionReceipt(ctx context.Context, hash common.Hash) (*types.Receipt, error)
- func (c *Client) EthGetUncleCountByBlockHash(ctx context.Context, blockHash common.Hash) (uint, error)
- func (c *Client) EthGetUncleCountByBlockNumber(ctx context.Context, blockLocator interface{}) (uint, error)
- func (c *Client) EthHashrate(ctx context.Context) (uint64, error)
- func (c *Client) EthMining(ctx context.Context) (bool, error)
- func (c *Client) EthNewBlockFilter(ctx context.Context) (string, error)
- func (c *Client) EthNewFilter(ctx context.Context, filterOpts interface{}) (string, error)
- func (c *Client) EthNewPendingTransactionFilter(ctx context.Context) (string, error)
- func (c *Client) EthProtocolVersion(ctx context.Context) (string, error)
- func (c *Client) EthSendRawTransaction(ctx context.Context, rawtx []byte) (common.Hash, error)
- func (c *Client) EthSendTransaction(ctx context.Context, msg interface{}) (common.Hash, error)
- func (c *Client) EthSign(ctx context.Context, account common.Address, data []byte) ([]byte, error)
- func (c *Client) NetListening(ctx context.Context) (bool, error)
- func (c *Client) NetPeerCount(ctx context.Context) (uint, error)
- func (c *Client) NetVersion(ctx context.Context) (*big.Int, error)
- func (c *Client) SubscribeNewPendingTransactions(ctx context.Context, ch chan<- *common.Hash) (ethereum.Subscription, error)
- func (c *Client) Web3ClientVersion(ctx context.Context) (string, error)
- func (c *Client) Web3Sha3(ctx context.Context, data string) (string, error)
- type Credential
- func (c *Credential) AddressHex() string
- func (c *Credential) GetTransactOpts() *bind.TransactOpts
- func (c *Credential) PrivateKeyHex() string
- func (c *Credential) PublicKeyHex() string
- func (c *Credential) Sign(data []byte) ([]byte, error)
- func (c *Credential) SignTx(tx *types.Transaction, chainid *big.Int) (*types.Transaction, error)
- func (c *Credential) Verify(data, signature []byte) bool
- type SimpleTx
- type ValueUnit
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Client ¶
func (*Client) EthAccounts ¶
func (*Client) EthCoinbase ¶
func (*Client) EthEstimateGas ¶
func (*Client) EthGetBalance ¶
func (*Client) EthGetBlockByHash ¶
func (*Client) EthGetBlockByNumber ¶
func (*Client) EthGetBlockTransactionCountByHash ¶
func (*Client) EthGetBlockTransactionCountByNumber ¶
func (*Client) EthGetCode ¶
func (*Client) EthGetFilterChanges ¶
func (*Client) EthGetFilterLogs ¶
func (*Client) EthGetLogFilterChanges ¶
func (*Client) EthGetStorageAt ¶
func (*Client) EthGetTransactionCount ¶
func (*Client) EthGetTransactionReceipt ¶
func (*Client) EthGetUncleCountByBlockHash ¶
func (c *Client) EthGetUncleCountByBlockHash(ctx context.Context, blockHash common.Hash) (uint, error)
to test
func (*Client) EthGetUncleCountByBlockNumber ¶
func (*Client) EthNewBlockFilter ¶
func (*Client) EthNewFilter ¶
func (*Client) EthNewPendingTransactionFilter ¶
func (*Client) EthProtocolVersion ¶
func (*Client) EthSendRawTransaction ¶
func (*Client) EthSendTransaction ¶
func (*Client) SubscribeNewPendingTransactions ¶
func (*Client) Web3ClientVersion ¶
type Credential ¶
type Credential struct { PrivateKey *ecdsa.PrivateKey PublicKey *ecdsa.PublicKey Address common.Address }
func HexToCredential ¶
func HexToCredential(hexkey string) (*Credential, error)
func KeyToCredential ¶
func KeyToCredential(privateKey *ecdsa.PrivateKey) (*Credential, error)
func NewCredential ¶
func NewCredential() (*Credential, error)
func (*Credential) AddressHex ¶
func (c *Credential) AddressHex() string
func (*Credential) GetTransactOpts ¶
func (c *Credential) GetTransactOpts() *bind.TransactOpts
func (*Credential) PrivateKeyHex ¶
func (c *Credential) PrivateKeyHex() string
func (*Credential) PublicKeyHex ¶
func (c *Credential) PublicKeyHex() string
func (*Credential) SignTx ¶
func (c *Credential) SignTx(tx *types.Transaction, chainid *big.Int) (*types.Transaction, error)
func (*Credential) Verify ¶
func (c *Credential) Verify(data, signature []byte) bool
Click to show internal directories.
Click to hide internal directories.