grpc

package
v0.6.4 Latest Latest
Warning

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

Go to latest
Published: Nov 2, 2026 License: Apache-2.0 Imports: 9 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Handler

type Handler interface {
	// Account methods
	GetAccount(address string) (sdk.AccountI, error)

	// Authz methods
	GetAuthorizations(grantee, granter string) ([]authz.Authorization, error)
	GetAuthorizationsByGrantee(grantee string) ([]authz.Authorization, error)
	GetAuthorizationsByGranter(granter string) ([]authz.Authorization, error)
	GetGrants(grantee, granter string) ([]*authz.Grant, error)
	GetGrantsByGrantee(grantee string) ([]*authz.GrantAuthorization, error)
	GetGrantsByGranter(granter string) ([]*authz.GrantAuthorization, error)

	// Bank methods
	GetBalanceFromBank(address sdk.AccAddress, denom string) (*banktypes.QueryBalanceResponse, error)
	GetSpendableBalance(address sdk.AccAddress, denom string) (*banktypes.QuerySpendableBalanceByDenomResponse, error)
	GetAllBalances(address sdk.AccAddress) (*banktypes.QueryAllBalancesResponse, error)
	GetTotalSupply() (*banktypes.QueryTotalSupplyResponse, error)

	// PreciseBank methods
	Remainder() (*precisebanktypes.QueryRemainderResponse, error)
	FractionalBalance(address sdk.AccAddress) (*precisebanktypes.QueryFractionalBalanceResponse, error)

	// Staking methods
	GetDelegation(delegatorAddress string, validatorAddress string) (*stakingtypes.QueryDelegationResponse, error)
	GetDelegatorDelegations(delegatorAddress string) (*stakingtypes.QueryDelegatorDelegationsResponse, error)
	GetValidatorDelegations(validatorAddress string) (*stakingtypes.QueryValidatorDelegationsResponse, error)
	GetRedelegations(delegatorAddress, srcValidator, dstValidator string) (*stakingtypes.QueryRedelegationsResponse, error)
	GetValidatorUnbondingDelegations(validatorAddress string) (*stakingtypes.QueryValidatorUnbondingDelegationsResponse, error)
	GetDelegatorUnbondingDelegations(delegatorAddress string) (*stakingtypes.QueryDelegatorUnbondingDelegationsResponse, error)

	// Distribution methods
	GetDelegationTotalRewards(delegatorAddress string) (*distrtypes.QueryDelegationTotalRewardsResponse, error)
	GetDelegationRewards(delegatorAddress string, validatorAddress string) (*distrtypes.QueryDelegationRewardsResponse, error)
	GetDelegatorWithdrawAddr(delegatorAddress string) (*distrtypes.QueryDelegatorWithdrawAddressResponse, error)
	GetValidatorCommission(validatorAddress string) (*distrtypes.QueryValidatorCommissionResponse, error)
	GetValidatorOutstandingRewards(validatorAddress string) (*distrtypes.QueryValidatorOutstandingRewardsResponse, error)
	GetCommunityPool() (*distrtypes.QueryCommunityPoolResponse, error)
	GetBondedValidators() (*stakingtypes.QueryValidatorsResponse, error)
}

Handler is an interface that defines the common methods that are used to query the network's modules via gRPC.

type IntegrationHandler

type IntegrationHandler struct {
	// contains filtered or unexported fields
}

IntegrationHandler is a helper struct to query the network's modules via gRPC. This is to simulate the behavior of a real user and avoid querying the modules directly.

func NewIntegrationHandler

func NewIntegrationHandler(network network.Network) *IntegrationHandler

NewIntegrationHandler creates a new IntegrationHandler instance.

func (*IntegrationHandler) FractionalBalance added in v0.5.0

func (*IntegrationHandler) GetAccount

func (gqh *IntegrationHandler) GetAccount(address string) (sdk.AccountI, error)

GetAccount returns the account for the given address.

func (*IntegrationHandler) GetAllBalances

GetAllBalances returns all the balances for the given address.

func (*IntegrationHandler) GetAuthorizations

func (gqh *IntegrationHandler) GetAuthorizations(grantee, granter string) ([]authz.Authorization, error)

GetAuthorizations returns the concrete authorizations for the given grantee and granter combination.

func (*IntegrationHandler) GetAuthorizationsByGrantee

func (gqh *IntegrationHandler) GetAuthorizationsByGrantee(grantee string) ([]authz.Authorization, error)

GetAuthorizationsByGrantee returns the concrete authorizations for the given grantee.

func (*IntegrationHandler) GetAuthorizationsByGranter

func (gqh *IntegrationHandler) GetAuthorizationsByGranter(granter string) ([]authz.Authorization, error)

GetAuthorizationsByGranter returns the concrete authorizations for the given granter.

func (*IntegrationHandler) GetBalanceFromBank

func (gqh *IntegrationHandler) GetBalanceFromBank(address sdktypes.AccAddress, denom string) (*banktypes.QueryBalanceResponse, error)

GetBalanceFromBank returns the balance for the given address and denom.

func (*IntegrationHandler) GetBondedValidators

func (gqh *IntegrationHandler) GetBondedValidators() (*stakingtypes.QueryValidatorsResponse, error)

GetValidators returns the list of all bonded validators.

func (*IntegrationHandler) GetCommunityPool

func (gqh *IntegrationHandler) GetCommunityPool() (*distrtypes.QueryCommunityPoolResponse, error)

GetCommunityPool queries the community pool coins.

func (*IntegrationHandler) GetDelegation

func (gqh *IntegrationHandler) GetDelegation(delegatorAddress string, validatorAddress string) (*stakingtypes.QueryDelegationResponse, error)

GetDelegation returns the delegation for the given delegator and validator addresses.

func (*IntegrationHandler) GetDelegationRewards

func (gqh *IntegrationHandler) GetDelegationRewards(delegatorAddress string, validatorAddress string) (*distrtypes.QueryDelegationRewardsResponse, error)

GetDelegationRewards returns the delegation rewards for the given delegator and validator.

func (*IntegrationHandler) GetDelegationTotalRewards

func (gqh *IntegrationHandler) GetDelegationTotalRewards(delegatorAddress string) (*distrtypes.QueryDelegationTotalRewardsResponse, error)

GetDelegationTotalRewards returns the total delegation rewards for the given delegator.

func (*IntegrationHandler) GetDelegatorDelegations

func (gqh *IntegrationHandler) GetDelegatorDelegations(delegatorAddress string) (*stakingtypes.QueryDelegatorDelegationsResponse, error)

GetDelegatorDelegations returns the delegations to a given delegator.

func (*IntegrationHandler) GetDelegatorUnbondingDelegations

func (gqh *IntegrationHandler) GetDelegatorUnbondingDelegations(delegatorAddress string) (*stakingtypes.QueryDelegatorUnbondingDelegationsResponse, error)

GetDelegatorUnbondingDelegations returns all the unbonding delegations for given delegator.

func (*IntegrationHandler) GetDelegatorWithdrawAddr

func (gqh *IntegrationHandler) GetDelegatorWithdrawAddr(delegatorAddress string) (*distrtypes.QueryDelegatorWithdrawAddressResponse, error)

GetDelegatorWithdrawAddr returns the withdraw address the given delegator.

func (*IntegrationHandler) GetGrants

func (gqh *IntegrationHandler) GetGrants(grantee, granter string) ([]*authz.Grant, error)

GetGrants returns the grants for the given grantee and granter combination.

NOTE: To extract the concrete authorizations, use the GetAuthorizations method.

func (*IntegrationHandler) GetGrantsByGrantee

func (gqh *IntegrationHandler) GetGrantsByGrantee(grantee string) ([]*authz.GrantAuthorization, error)

GetGrantsByGrantee returns the grants for the given grantee.

NOTE: To extract the concrete authorizations, use the GetAuthorizationsByGrantee method.

func (*IntegrationHandler) GetGrantsByGranter

func (gqh *IntegrationHandler) GetGrantsByGranter(granter string) ([]*authz.GrantAuthorization, error)

GetGrantsByGranter returns the grants for the given granter.

NOTE: To extract the concrete authorizations, use the GetAuthorizationsByGranter method.

func (*IntegrationHandler) GetRedelegations

func (gqh *IntegrationHandler) GetRedelegations(delegatorAddress, srcValidator, dstValidator string) (*stakingtypes.QueryRedelegationsResponse, error)

GetRedelegations returns the redelegations to a given delegator and validators.

func (*IntegrationHandler) GetSpendableBalance

GetSpendableBalance returns the spendable balance for the given denomination.

func (*IntegrationHandler) GetTotalSupply

func (gqh *IntegrationHandler) GetTotalSupply() (*banktypes.QueryTotalSupplyResponse, error)

GetTotalSupply returns all the balances for the given address.

func (*IntegrationHandler) GetValidatorCommission

func (gqh *IntegrationHandler) GetValidatorCommission(validatorAddress string) (*distrtypes.QueryValidatorCommissionResponse, error)

GetValidatorCommission returns the commission for the given validator.

func (*IntegrationHandler) GetValidatorDelegations

func (gqh *IntegrationHandler) GetValidatorDelegations(validatorAddress string) (*stakingtypes.QueryValidatorDelegationsResponse, error)

GetValidatorDelegations returns the delegations to a given validator.

func (*IntegrationHandler) GetValidatorOutstandingRewards

func (gqh *IntegrationHandler) GetValidatorOutstandingRewards(validatorAddress string) (*distrtypes.QueryValidatorOutstandingRewardsResponse, error)

GetValidatorOutstandingRewards returns the delegation rewards for the given delegator and validator.

func (*IntegrationHandler) GetValidatorUnbondingDelegations

func (gqh *IntegrationHandler) GetValidatorUnbondingDelegations(validatorAddress string) (*stakingtypes.QueryValidatorUnbondingDelegationsResponse, error)

GetValidatorUnbondingDelegations returns the unbonding delegations to a given validator.

func (*IntegrationHandler) Remainder added in v0.5.0

Jump to

Keyboard shortcuts

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