rpc

package
v0.0.0-...-1929ff6 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 11, 2024 License: MIT Imports: 27 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Clients

type Clients struct {

	// Auth is a github.com/cosmos/cosmos-sdk/x/auth/types QueryClient
	Auth authtypes.QueryClient
	// Bank is a github.com/cosmos/cosmos-sdk/x/bank/types QueryClient
	Bank banktypes.QueryClient
	// Bank is a github.com/cosmos/cosmos-sdk/x/staking/types QueryClient
	Staking stakingtypes.QueryClient
	// Upgrade is a github.com/cosmos/cosmos-sdk/x/upgrade/types QueryClient
	Upgrade upgradetypes.QueryClient

	// Authority is a github.com/zeta-chain/zetacore/x/authority/types QueryClient
	Authority authoritytypes.QueryClient
	// Crosschain is a github.com/zeta-chain/zetacore/x/crosschain/types QueryClient
	Crosschain crosschaintypes.QueryClient
	// Fungible is a github.com/zeta-chain/zetacore/x/fungible/types QueryClient
	Fungible fungibletypes.QueryClient
	// Observer is a github.com/zeta-chain/zetacore/x/observer/types QueryClient
	Observer observertypes.QueryClient
	// Lightclient is a github.com/zeta-chain/zetacore/x/lightclient/types QueryClient
	Lightclient lightclienttypes.QueryClient

	// Ethermint is a github.com/zeta-chain/zetacore/rpc/types QueryClient
	Ethermint *etherminttypes.QueryClient
	// EthermintFeeMarket is a github.com/zeta-chain/ethermint/x/feemarket/types QueryClient
	EthermintFeeMarket feemarkettypes.QueryClient

	// Tendermint is a github.com/cosmos/cosmos-sdk/client/grpc/tmservice QueryClient
	Tendermint tmservice.ServiceClient
}

Clients contains RPC client interfaces to interact with ZetaCore

Clients also has some high level wrappers for the clients

func NewCometBFTClients

func NewCometBFTClients(url string) (Clients, error)

NewCometBFTClients creates a Clients which uses cometbft abci_query as the transport

func NewGRPCClients

func NewGRPCClients(url string, opts ...grpc.DialOption) (Clients, error)

NewGRPCClient creates a Clients which uses gRPC as the transport

func (*Clients) GetAbortedZetaAmount

func (c *Clients) GetAbortedZetaAmount(ctx context.Context) (string, error)

GetAbortedZetaAmount returns the amount of zeta that has been aborted

func (*Clients) GetAdditionalChains

func (c *Clients) GetAdditionalChains(ctx context.Context) ([]chains.Chain, error)

GetAdditionalChains returns the additional chains

func (*Clients) GetAllCctx

func (c *Clients) GetAllCctx(ctx context.Context) ([]*types.CrossChainTx, error)

GetAllCctx returns all cross chain transactions

func (*Clients) GetAllNodeAccounts

func (c *Clients) GetAllNodeAccounts(ctx context.Context) ([]*types.NodeAccount, error)

GetAllNodeAccounts returns all node accounts

func (*Clients) GetAllOutboundTrackerByChain

func (c *Clients) GetAllOutboundTrackerByChain(
	ctx context.Context,
	chainID int64,
	order interfaces.Order,
) ([]types.OutboundTracker, error)

GetAllOutboundTrackerByChain returns all outbound trackers for a chain

func (*Clients) GetBTCTSSAddress

func (c *Clients) GetBTCTSSAddress(ctx context.Context, chainID int64) (string, error)

GetBTCTSSAddress returns the current BTC TSS address

func (*Clients) GetBallot

func (c *Clients) GetBallot(
	ctx context.Context,
	ballotIdentifier string,
) (*types.QueryBallotByIdentifierResponse, error)

GetBallot returns a ballot by ID

func (*Clients) GetBallotByID

GetBallotByID returns a ballot by ID

func (*Clients) GetBaseGasPrice

func (c *Clients) GetBaseGasPrice(ctx context.Context) (int64, error)

GetBaseGasPrice returns the base gas price

func (*Clients) GetBlockHeaderChainState

func (c *Clients) GetBlockHeaderChainState(ctx context.Context, chainID int64) (*types.ChainState, error)

GetBlockHeaderChainState returns the block header chain state

func (*Clients) GetBlockHeaderEnabledChains

func (c *Clients) GetBlockHeaderEnabledChains(ctx context.Context) ([]types.HeaderSupportedChain, error)

GetBlockHeaderEnabledChains returns the enabled chains for block headers

func (*Clients) GetBlockHeight

func (c *Clients) GetBlockHeight(ctx context.Context) (int64, error)

GetBlockHeight returns the zetachain block height

func (*Clients) GetCctxByHash

func (c *Clients) GetCctxByHash(ctx context.Context, sendHash string) (*types.CrossChainTx, error)

func (*Clients) GetCctxByNonce

func (c *Clients) GetCctxByNonce(ctx context.Context, chainID int64, nonce uint64) (*types.CrossChainTx, error)

GetCctxByNonce returns a cross chain transaction by nonce

func (*Clients) GetChainParams

func (c *Clients) GetChainParams(ctx context.Context) ([]*types.ChainParams, error)

GetChainParams returns all the chain params

func (*Clients) GetChainParamsForChainID

func (c *Clients) GetChainParamsForChainID(
	ctx context.Context,
	externalChainID int64,
) (*types.ChainParams, error)

GetChainParamsForChainID returns the chain params for a given chain ID

func (*Clients) GetCrosschainFlags

func (c *Clients) GetCrosschainFlags(ctx context.Context) (types.CrosschainFlags, error)

GetCrosschainFlags returns the crosschain flags

func (*Clients) GetEVMTSSAddress

func (c *Clients) GetEVMTSSAddress(ctx context.Context) (string, error)

GetEVMTSSAddress returns the current EVM TSS address.

func (*Clients) GetInboundTrackersForChain

func (c *Clients) GetInboundTrackersForChain(ctx context.Context, chainID int64) ([]types.InboundTracker, error)

GetInboundTrackersForChain returns the inbound trackers for a chain

func (*Clients) GetKeyGen

func (c *Clients) GetKeyGen(ctx context.Context) (types.Keygen, error)

GetKeyGen returns the keygen

func (*Clients) GetLastBlockHeight

func (c *Clients) GetLastBlockHeight(ctx context.Context) (uint64, error)

GetLastBlockHeight returns the zetachain block height

func (*Clients) GetLatestZetaBlock

func (c *Clients) GetLatestZetaBlock(ctx context.Context) (*tmservice.Block, error)

GetLatestZetaBlock returns the latest zeta block

func (*Clients) GetNodeInfo

func (c *Clients) GetNodeInfo(ctx context.Context) (*tmservice.GetNodeInfoResponse, error)

GetNodeInfo returns the node info

func (*Clients) GetNonceByChain

func (c *Clients) GetNonceByChain(ctx context.Context, chain chains.Chain) (types.ChainNonces, error)

GetNonceByChain returns the nonce by chain

func (*Clients) GetObserverList

func (c *Clients) GetObserverList(ctx context.Context) ([]string, error)

GetObserverList returns the list of observers

func (*Clients) GetOutboundTracker

func (c *Clients) GetOutboundTracker(
	ctx context.Context,
	chain chains.Chain,
	nonce uint64,
) (*types.OutboundTracker, error)

GetOutboundTracker returns the outbound tracker for a chain and nonce

func (*Clients) GetPendingNonces

func (c *Clients) GetPendingNonces(ctx context.Context) (*types.QueryAllPendingNoncesResponse, error)

GetPendingNonces returns the pending nonces

func (*Clients) GetPendingNoncesByChain

func (c *Clients) GetPendingNoncesByChain(ctx context.Context, chainID int64) (types.PendingNonces, error)

GetPendingNoncesByChain returns the pending nonces for a chain and current tss address

func (*Clients) GetRateLimiterFlags

func (c *Clients) GetRateLimiterFlags(ctx context.Context) (types.RateLimiterFlags, error)

GetRateLimiterFlags returns the rate limiter flags

func (*Clients) GetRateLimiterInput

func (c *Clients) GetRateLimiterInput(ctx context.Context, window int64) (*types.QueryRateLimiterInputResponse, error)

GetRateLimiterInput returns input data for the rate limit checker

func (*Clients) GetSupportedChains

func (c *Clients) GetSupportedChains(ctx context.Context) ([]chains.Chain, error)

GetSupportedChains returns the supported chains

func (*Clients) GetTSS

func (c *Clients) GetTSS(ctx context.Context) (types.TSS, error)

GetTSS returns the current TSS

func (*Clients) GetTSSHistory

func (c *Clients) GetTSSHistory(ctx context.Context) ([]types.TSS, error)

GetTSSHistory returns the historical list of TSS

func (*Clients) GetUpgradePlan

func (c *Clients) GetUpgradePlan(ctx context.Context) (*upgradetypes.Plan, error)

GetUpgradePlan returns the current upgrade plan. if there is no active upgrade plan, plan will be nil, err will be nil as well.

func (*Clients) GetZetaTokenSupplyOnNode

func (c *Clients) GetZetaTokenSupplyOnNode(ctx context.Context) (sdkmath.Int, error)

GetZetaTokenSupplyOnNode returns the zeta token supply on the node

func (*Clients) HasVoted

func (c *Clients) HasVoted(ctx context.Context, ballotIndex string, voterAddress string) (bool, error)

HasVoted returns whether an observer has voted

func (*Clients) ListPendingCCTX

func (c *Clients) ListPendingCCTX(ctx context.Context, chainID int64) ([]*types.CrossChainTx, uint64, error)

ListPendingCCTX returns a list of pending cctxs for a given chainID

  • The max size of the list is crosschainkeeper.MaxPendingCctxs

func (*Clients) ListPendingCCTXWithinRateLimit

func (c *Clients) ListPendingCCTXWithinRateLimit(
	ctx context.Context,
) (*types.QueryListPendingCctxWithinRateLimitResponse, error)

ListPendingCCTXWithinRateLimit returns a list of pending cctxs that do not exceed the outbound rate limit

  • The max size of the list is crosschainkeeper.MaxPendingCctxs
  • The returned `rateLimitExceeded` flag indicates if the rate limit is exceeded or not

func (*Clients) Prove

func (c *Clients) Prove(
	ctx context.Context,
	blockHash string,
	txHash string,
	txIndex int64,
	proof *proofs.Proof,
	chainID int64,
) (bool, error)

Prove returns whether a proof is valid

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL