Documentation
¶
Index ¶
- type BlockByHashResponse
- type BlockByNumberResponse
- type BlockNumberResponse
- type BlockResult
- type ChainIDResponse
- type Client
- func (c *Client) BlockNumber(ctx context.Context, url string, headers map[string]string) (uint64, error)
- func (c *Client) Call(ctx context.Context, url string, method string, params interface{}, ...) ([]byte, error)
- func (c *Client) ChainID(ctx context.Context, url string, headers map[string]string) (string, error)
- func (c *Client) GetBlockByHash(ctx context.Context, url string, headers map[string]string, blockHash string) (BlockResult, error)
- func (c *Client) GetBlockByNumber(ctx context.Context, url string, headers map[string]string, blockNumber uint64) (BlockResult, error)
- func (c *Client) SendRawTransaction(ctx context.Context, url string, headers map[string]string, ...) (SendRawTransactionError, error)
- func (c *Client) Syncing(ctx context.Context, url string, headers map[string]string) (bool, error)
- type SendRawTransactionError
- type SendRawTransactionResponse
- type SyncingInProgressDetailsResponse
- type SyncingInProgressResponse
- type SyncingResponse
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type BlockByHashResponse ¶
type BlockByHashResponse struct {
Result BlockResult `json:"result" validate:"required"`
}
BlockByHashResponse represents the response struct.
type BlockByNumberResponse ¶
type BlockByNumberResponse struct {
Result BlockResult `json:"result" validate:"required"`
}
BlockByNumberResponse represents the response struct.
type BlockNumberResponse ¶
type BlockNumberResponse struct {
Result string `json:"result" validate:"required"`
}
BlockNumberResponse represents the response struct.
type BlockResult ¶
type BlockResult struct { BlockNumberUI64 uint64 BlockNumber string `json:"number" validate:"required"` BlockHash string `json:"hash" validate:"required"` }
BlockResult represents the result struct.
type ChainIDResponse ¶
type ChainIDResponse struct {
Result string `json:"result" validate:"required"`
}
ChainIDResponse represents the response struct.
type Client ¶
type Client struct { InfuraProjectID string InfuraProjectSecret string // contains filtered or unexported fields }
Client represents a Client.
func (*Client) BlockNumber ¶
func (*Client) Call ¶
func (c *Client) Call( ctx context.Context, url string, method string, params interface{}, headers map[string]string, ) ([]byte, error)
Call invokes a JSON-RPC method.
func (*Client) GetBlockByHash ¶
func (*Client) GetBlockByNumber ¶
func (*Client) SendRawTransaction ¶
type SendRawTransactionError ¶
type SendRawTransactionResponse ¶
type SendRawTransactionResponse struct {
Error SendRawTransactionError `json:"error" `
}
type SyncingInProgressResponse ¶
type SyncingInProgressResponse struct {
Result SyncingInProgressDetailsResponse `json:"result" validate:"required"`
}
SyncingInProgressResponse represents the response when is not sync.
type SyncingResponse ¶
type SyncingResponse struct {
Result bool `json:"result" validate:"required"`
}
SyncingResponse represents the response struct.
Click to show internal directories.
Click to hide internal directories.