Documentation ¶
Index ¶
- func GetRequestID(events []sdk.StringEvent) (uint64, error)
- func NewClientCtx(chainID string) client.Context
- type Client
- type RPC
- func (c RPC) GetAccount(account sdk.AccAddress) (client.Account, error)
- func (c RPC) GetBalance(_ sdk.AccAddress) (uint64, error)
- func (c RPC) GetBlockResult(height int64) (*ctypes.ResultBlockResults, error)
- func (c RPC) GetResult(id uint64) (*oracletypes.Result, error)
- func (c RPC) GetSignature(_ uint64) ([]byte, error)
- func (c RPC) GetTx(txHash string) (*sdk.TxResponse, error)
- func (c RPC) QueryRequestFailureReason(id uint64) (string, error)
- func (c RPC) SendRequest(msg *oracletypes.MsgRequestData, gasPrice float64, key keyring.Info) (*sdk.TxResponse, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetRequestID ¶
func GetRequestID(events []sdk.StringEvent) (uint64, error)
func NewClientCtx ¶
Types ¶
type Client ¶
type Client interface { GetAccount(account sdk.AccAddress) (client.Account, error) GetTx(txHash string) (*sdk.TxResponse, error) GetResult(id uint64) (*oracletypes.Result, error) GetSignature(id uint64) ([]byte, error) GetBlockResult(height int64) (*ctypes.ResultBlockResults, error) QueryRequestFailureReason(id uint64) (string, error) GetBalance(account sdk.AccAddress) (uint64, error) SendRequest(msg *oracletypes.MsgRequestData, gasPrice float64, key keyring.Info) (*sdk.TxResponse, error) }
type RPC ¶
type RPC struct {
// contains filtered or unexported fields
}
RPC implements Clients by using multiple RPC nodes
func NewRPC ¶
func NewRPC( logger logging.Logger, endpoints []string, chainID string, timeout string, gasPrice string, keyring keyring.Keyring, ) (*RPC, error)
NewRPC creates new RPC client
func (RPC) GetAccount ¶
GetAccount find max account sequence from multiple clients
func (RPC) GetBalance ¶
func (c RPC) GetBalance(_ sdk.AccAddress) (uint64, error)
func (RPC) GetBlockResult ¶
func (c RPC) GetBlockResult(height int64) (*ctypes.ResultBlockResults, error)
func (RPC) GetResult ¶
func (c RPC) GetResult(id uint64) (*oracletypes.Result, error)
GetResult find result from multiple clients
func (RPC) QueryRequestFailureReason ¶
func (RPC) SendRequest ¶
func (c RPC) SendRequest(msg *oracletypes.MsgRequestData, gasPrice float64, key keyring.Info) (*sdk.TxResponse, error)
Click to show internal directories.
Click to hide internal directories.