Documentation ¶
Index ¶
- Constants
- func RandomString(n int) string
- type FastClient
- type NodeRPC
- func (c *NodeRPC) ABCIInfo() (*coreTypes.ResultABCIInfo, error)
- func (c *NodeRPC) ABCIQuery(path string, data tmBytes.HexBytes) (*coreTypes.ResultABCIQuery, error)
- func (c *NodeRPC) ABCIQueryIsOk(path string, data tmBytes.HexBytes) (*coreTypes.ResultABCIQuery, error)
- func (c *NodeRPC) AppVersion() (string, error)
- func (c *NodeRPC) Block(height int64) (*coreTypes.ResultBlock, error)
- func (c *NodeRPC) BlockResults(height int64) (*coreTypes.ResultBlockResults, error)
- func (c *NodeRPC) BlockchainInfo(minHeight, maxHeight int64) (*coreTypes.ResultBlockchainInfo, error)
- func (c *NodeRPC) BroadcastEvidence(ev types.Evidence) (*coreTypes.ResultBroadcastEvidence, error)
- func (c *NodeRPC) BroadcastTx(txRaw *tx.TxRaw, mode ...tx.BroadcastMode) (*sdk.TxResponse, error)
- func (c *NodeRPC) BroadcastTxAsync(tx types.Tx) (*coreTypes.ResultBroadcastTx, error)
- func (c *NodeRPC) BroadcastTxCommit(tx types.Tx) (*coreTypes.ResultBroadcastTxCommit, error)
- func (c *NodeRPC) BroadcastTxRawCommit(txRaw *tx.TxRaw) (*coreTypes.ResultBroadcastTxCommit, error)
- func (c *NodeRPC) BroadcastTxSync(tx types.Tx) (*coreTypes.ResultBroadcastTx, error)
- func (c *NodeRPC) BuildTx(privKey cryptotypes.PrivKey, msgs []sdk.Msg) (*tx.TxRaw, error)
- func (c *NodeRPC) Commit(height int64) (*coreTypes.ResultCommit, error)
- func (c *NodeRPC) ConsensusParams(height int64) (*coreTypes.ResultConsensusParams, error)
- func (c *NodeRPC) ConsensusState() (*coreTypes.ResultConsensusState, error)
- func (c *NodeRPC) DumpConsensusState() (*coreTypes.ResultDumpConsensusState, error)
- func (c *NodeRPC) EstimatingGas(raw *tx.TxRaw) (*sdk.GasInfo, error)
- func (c *NodeRPC) Genesis() (*coreTypes.ResultGenesis, error)
- func (c *NodeRPC) GetAddressPrefix() (prefix string, err error)
- func (c *NodeRPC) GetBlockHeight() (int64, error)
- func (c *NodeRPC) GetChainId() (chain string, err error)
- func (c *NodeRPC) GetGasPrices() (sdk.Coins, error)deprecated
- func (c *NodeRPC) GetGravityAttestation(cdc codec.Codec, id []byte) (*gravitytypes.Attestation, error)deprecated
- func (c *NodeRPC) GetGravityLastObservedEventNonce() (uint64, error)deprecated
- func (c *NodeRPC) GetMintDenom() (denom string, err error)
- func (c *NodeRPC) GetStakeValidators(status stakingtypes.BondStatus) (stakingtypes.Validators, error)
- func (c *NodeRPC) Health() (*coreTypes.ResultHealth, error)
- func (c *NodeRPC) NetInfo() (*coreTypes.ResultNetInfo, error)
- func (c *NodeRPC) NumUnconfirmedTxs() (*coreTypes.ResultUnconfirmedTxs, error)
- func (c *NodeRPC) PeersByAddressPort(port string) (*coreTypes.ResultABCIQuery, error)
- func (c *NodeRPC) PeersById(id string) (*coreTypes.ResultABCIQuery, error)
- func (c *NodeRPC) QueryAccount(address string) (authtypes.AccountI, error)
- func (c *NodeRPC) QueryBalance(address string, denom string) (sdk.Coin, error)
- func (c *NodeRPC) QueryBalances(address string) (sdk.Coins, error)
- func (c *NodeRPC) QuerySupply() (sdk.Coins, error)
- func (c *NodeRPC) Status() (*coreTypes.ResultStatus, error)
- func (c *NodeRPC) Store(path string) (*coreTypes.ResultABCIQuery, error)
- func (c *NodeRPC) Tx(hash []byte) (*coreTypes.ResultTx, error)
- func (c *NodeRPC) TxByHash(txHash string) (*sdk.TxResponse, error)
- func (c *NodeRPC) TxSearch(query string, page, perPage int, orderBy string) (*coreTypes.ResultTxSearch, error)
- func (c *NodeRPC) UnconfirmedTxs(limit int) (*coreTypes.ResultUnconfirmedTxs, error)
- func (c *NodeRPC) Validators(height int64, page, perPage int) (*coreTypes.ResultValidators, error)
- func (c *NodeRPC) WithContext(ctx context.Context) *NodeRPC
- func (c *NodeRPC) WithGasPrices(gasPrices sdk.Coins)
- type RPCError
- type RPCRequest
- type RPCResponse
- type WSClient
- func (ws *WSClient) ABCIQuery(path string, data libTypes.HexBytes) (*coreTypes.ResultABCIQuery, error)
- func (ws *WSClient) BlockResults(height int64) (*coreTypes.ResultBlockResults, error)
- func (ws *WSClient) Call(ctx context.Context, method string, params map[string]interface{}, ...) (err error)
- func (ws *WSClient) Close()
- func (ws *WSClient) ExitCh() <-chan struct{}
- func (ws *WSClient) Status() (*coreTypes.ResultStatus, error)
- func (ws *WSClient) Subscribe(ctx context.Context, query string, resp chan RPCResponse) (id string, err error)
- func (ws *WSClient) SubscribeEvent(ctx context.Context, query string, event chan<- coreTypes.ResultEvent) (err error)
- func (ws *WSClient) TxSearch(query string, prove bool, page, perPage *int, orderBy string) (*coreTypes.ResultTxSearch, error)
- func (ws *WSClient) Unsubscribe(subId string)
Constants ¶
View Source
const DefGasLimit int64 = 200000
Variables ¶
This section is empty.
Functions ¶
func RandomString ¶
Types ¶
type FastClient ¶
FastClient implement jsonRPCCaller
func NewFastClient ¶
func NewFastClient(remote string) *FastClient
func (*FastClient) SetTimeout ¶
func (cli *FastClient) SetTimeout(t time.Duration)
type NodeRPC ¶
type NodeRPC struct {
// contains filtered or unexported fields
}
func NewNodeRPC ¶
func NewNodeRPC(caller jsonRPCCaller) *NodeRPC
func (*NodeRPC) ABCIQueryIsOk ¶
func (*NodeRPC) AppVersion ¶
func (*NodeRPC) BlockResults ¶
func (c *NodeRPC) BlockResults(height int64) (*coreTypes.ResultBlockResults, error)
func (*NodeRPC) BlockchainInfo ¶
func (c *NodeRPC) BlockchainInfo(minHeight, maxHeight int64) (*coreTypes.ResultBlockchainInfo, error)
func (*NodeRPC) BroadcastEvidence ¶
func (*NodeRPC) BroadcastTx ¶
func (c *NodeRPC) BroadcastTx(txRaw *tx.TxRaw, mode ...tx.BroadcastMode) (*sdk.TxResponse, error)
func (*NodeRPC) BroadcastTxAsync ¶
func (*NodeRPC) BroadcastTxCommit ¶
func (*NodeRPC) BroadcastTxRawCommit ¶
func (*NodeRPC) BroadcastTxSync ¶
func (*NodeRPC) ConsensusParams ¶
func (c *NodeRPC) ConsensusParams(height int64) (*coreTypes.ResultConsensusParams, error)
func (*NodeRPC) ConsensusState ¶
func (c *NodeRPC) ConsensusState() (*coreTypes.ResultConsensusState, error)
func (*NodeRPC) DumpConsensusState ¶
func (c *NodeRPC) DumpConsensusState() (*coreTypes.ResultDumpConsensusState, error)
func (*NodeRPC) EstimatingGas ¶
func (*NodeRPC) GetAddressPrefix ¶
func (*NodeRPC) GetBlockHeight ¶
func (*NodeRPC) GetChainId ¶
func (*NodeRPC) GetGasPrices
deprecated
func (*NodeRPC) GetGravityAttestation
deprecated
func (c *NodeRPC) GetGravityAttestation(cdc codec.Codec, id []byte) (*gravitytypes.Attestation, error)
Deprecated: GetGravityAttestation
func (*NodeRPC) GetGravityLastObservedEventNonce
deprecated
func (*NodeRPC) GetMintDenom ¶
func (*NodeRPC) GetStakeValidators ¶ added in v2.2.1
func (c *NodeRPC) GetStakeValidators(status stakingtypes.BondStatus) (stakingtypes.Validators, error)
func (*NodeRPC) NumUnconfirmedTxs ¶
func (c *NodeRPC) NumUnconfirmedTxs() (*coreTypes.ResultUnconfirmedTxs, error)
func (*NodeRPC) PeersByAddressPort ¶
func (c *NodeRPC) PeersByAddressPort(port string) (*coreTypes.ResultABCIQuery, error)
func (*NodeRPC) PeersById ¶
func (c *NodeRPC) PeersById(id string) (*coreTypes.ResultABCIQuery, error)
func (*NodeRPC) QueryAccount ¶
func (*NodeRPC) QueryBalance ¶
func (*NodeRPC) UnconfirmedTxs ¶
func (c *NodeRPC) UnconfirmedTxs(limit int) (*coreTypes.ResultUnconfirmedTxs, error)
func (*NodeRPC) Validators ¶
func (*NodeRPC) WithGasPrices ¶
type RPCError ¶
type RPCError struct { Code int `json:"code"` Message string `json:"message"` Data string `json:"data,omitempty"` }
func (RPCError) ServerExit ¶
type RPCRequest ¶
type RPCRequest struct { JSONRPC string `json:"jsonrpc"` ID string `json:"id,omitempty"` Method string `json:"method"` Params json.RawMessage `json:"params"` // must be map[string]interface{} or []interface{} }
func NewRPCRequest ¶
func NewRPCRequest(id, method string, params json.RawMessage) RPCRequest
type RPCResponse ¶
type RPCResponse struct { JSONRPC string `json:"jsonrpc"` ID string `json:"id,omitempty"` Result json.RawMessage `json:"result,omitempty"` Error *RPCError `json:"error,omitempty"` }
type WSClient ¶
WSClient implement jsonRPCCaller
func (*WSClient) BlockResults ¶
func (ws *WSClient) BlockResults(height int64) (*coreTypes.ResultBlockResults, error)
func (*WSClient) SubscribeEvent ¶
func (ws *WSClient) SubscribeEvent(ctx context.Context, query string, event chan<- coreTypes.ResultEvent) (err error)
SubscribeEvent Experiment
func (*WSClient) Unsubscribe ¶
Click to show internal directories.
Click to hide internal directories.