Documentation
¶
Index ¶
- type Clients
- func (c *Clients) GetAbortedZetaAmount(ctx context.Context) (string, error)
- func (c *Clients) GetAdditionalChains(ctx context.Context) ([]chains.Chain, error)
- func (c *Clients) GetAllCctx(ctx context.Context) ([]*types.CrossChainTx, error)
- func (c *Clients) GetAllNodeAccounts(ctx context.Context) ([]*types.NodeAccount, error)
- func (c *Clients) GetBTCTSSAddress(ctx context.Context, chainID int64) (string, error)
- func (c *Clients) GetBallot(ctx context.Context, ballotIdentifier string) (*types.QueryBallotByIdentifierResponse, error)
- func (c *Clients) GetBallotByID(ctx context.Context, id string) (*types.QueryBallotByIdentifierResponse, error)
- func (c *Clients) GetBaseGasPrice(ctx context.Context) (int64, error)
- func (c *Clients) GetBlockHeaderChainState(ctx context.Context, chainID int64) (*types.ChainState, error)
- func (c *Clients) GetBlockHeaderEnabledChains(ctx context.Context) ([]types.HeaderSupportedChain, error)
- func (c *Clients) GetBlockHeight(ctx context.Context) (int64, error)
- func (c *Clients) GetCctxByHash(ctx context.Context, sendHash string) (*types.CrossChainTx, error)
- func (c *Clients) GetCctxByNonce(ctx context.Context, chainID int64, nonce uint64) (*types.CrossChainTx, error)
- func (c *Clients) GetChainParams(ctx context.Context) ([]*types.ChainParams, error)
- func (c *Clients) GetChainParamsForChainID(ctx context.Context, externalChainID int64) (*types.ChainParams, error)
- func (c *Clients) GetCrosschainFlags(ctx context.Context) (types.CrosschainFlags, error)
- func (c *Clients) GetEVMTSSAddress(ctx context.Context) (string, error)
- func (c *Clients) GetInboundTrackersForChain(ctx context.Context, chainID int64) ([]types.InboundTracker, error)
- func (c *Clients) GetKeyGen(ctx context.Context) (types.Keygen, error)
- func (c *Clients) GetLastBlockHeight(ctx context.Context) (uint64, error)
- func (c *Clients) GetLatestZetaBlock(ctx context.Context) (*cmtservice.Block, error)
- func (c *Clients) GetNodeInfo(ctx context.Context) (*cmtservice.GetNodeInfoResponse, error)
- func (c *Clients) GetNonceByChain(ctx context.Context, chain chains.Chain) (types.ChainNonces, error)
- func (c *Clients) GetObserverList(ctx context.Context) ([]string, error)
- func (c *Clients) GetOutboundTracker(ctx context.Context, chain chains.Chain, nonce uint64) (*types.OutboundTracker, error)
- func (c *Clients) GetPendingNonces(ctx context.Context) (*types.QueryAllPendingNoncesResponse, error)
- func (c *Clients) GetPendingNoncesByChain(ctx context.Context, chainID int64) (types.PendingNonces, error)
- func (c *Clients) GetRateLimiterFlags(ctx context.Context) (types.RateLimiterFlags, error)
- func (c *Clients) GetRateLimiterInput(ctx context.Context, window int64) (*types.QueryRateLimiterInputResponse, error)
- func (c *Clients) GetSupportedChains(ctx context.Context) ([]chains.Chain, error)
- func (c *Clients) GetTSS(ctx context.Context) (types.TSS, error)
- func (c *Clients) GetTSSHistory(ctx context.Context) ([]types.TSS, error)
- func (c *Clients) GetUpgradePlan(ctx context.Context) (*upgradetypes.Plan, error)
- func (c *Clients) GetZetaTokenSupplyOnNode(ctx context.Context) (sdkmath.Int, error)
- func (c *Clients) HasVoted(ctx context.Context, ballotIndex string, voterAddress string) (bool, error)
- func (c *Clients) ListPendingCCTX(ctx context.Context, chainID int64) ([]*types.CrossChainTx, uint64, error)
- func (c *Clients) ListPendingCCTXWithinRateLimit(ctx context.Context) (*types.QueryListPendingCctxWithinRateLimitResponse, error)
- func (c *Clients) Prove(ctx context.Context, blockHash string, txHash string, txIndex int64, ...) (bool, error)
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 cosmossdk.io/x/upgrade/types QueryClient Upgrade upgradetypes.QueryClient // Distribution is a "github.com/cosmos/cosmos-sdk/x/distribution/types" QueryClient Distribution distributiontypes.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 // EmissionsClient is a github.com/zeta-chain/zetacore/x/emissions/types QueryClient Emissions emissionstypes.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/cmtservice QueryClient Tendermint cmtservice.ServiceClient }
Clients contains RPC client interfaces to interact with ZetaCore
Clients also has some high level wrappers for the clients
func NewCometBFTClients ¶
NewCometBFTClients creates a Clients which uses cometbft abci_query as the transport
func NewGRPCClients ¶
func NewGRPCClients(url string, opts ...grpc.DialOption) (Clients, error)
NewGRPCClients creates a Clients which uses gRPC as the transport
func (*Clients) GetAbortedZetaAmount ¶
GetAbortedZetaAmount returns the amount of zeta that has been aborted
func (*Clients) GetAdditionalChains ¶
GetAdditionalChains returns the additional chains
func (*Clients) GetAllCctx ¶
GetAllCctx returns all cross chain transactions
func (*Clients) GetAllNodeAccounts ¶
GetAllNodeAccounts returns all node accounts
func (*Clients) GetBTCTSSAddress ¶
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 ¶
func (c *Clients) GetBallotByID(ctx context.Context, id string) (*types.QueryBallotByIdentifierResponse, error)
GetBallotByID returns a ballot by ID
func (*Clients) GetBaseGasPrice ¶
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 ¶
GetBlockHeight returns the zetachain block height
func (*Clients) GetCctxByHash ¶
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 ¶
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 ¶
GetCrosschainFlags returns the crosschain flags
func (*Clients) GetEVMTSSAddress ¶
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) GetLastBlockHeight ¶
GetLastBlockHeight returns the zetachain block height
func (*Clients) GetLatestZetaBlock ¶
GetLatestZetaBlock returns the latest zeta block
func (*Clients) GetNodeInfo ¶
func (c *Clients) GetNodeInfo(ctx context.Context) (*cmtservice.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 ¶
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 ¶
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 ¶
GetSupportedChains returns the supported chains
func (*Clients) GetTSSHistory ¶
GetTSSHistory returns the historical list of TSS
func (*Clients) GetUpgradePlan ¶
GetUpgradePlan returns the current upgrade plan or nil if there is no plan.
func (*Clients) GetZetaTokenSupplyOnNode ¶
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 chain
- 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