Documentation
¶
Index ¶
- type Handler
- type IntegrationHandler
- func (gqh *IntegrationHandler) GetAccount(address string) (sdk.AccountI, error)
- func (gqh *IntegrationHandler) GetAllBalances(address sdktypes.AccAddress) (*banktypes.QueryAllBalancesResponse, error)
- func (gqh *IntegrationHandler) GetAuthorizations(grantee, granter string) ([]authz.Authorization, error)
- func (gqh *IntegrationHandler) GetAuthorizationsByGrantee(grantee string) ([]authz.Authorization, error)
- func (gqh *IntegrationHandler) GetAuthorizationsByGranter(granter string) ([]authz.Authorization, error)
- func (gqh *IntegrationHandler) GetBalanceFromBank(address sdktypes.AccAddress, denom string) (*banktypes.QueryBalanceResponse, error)
- func (gqh *IntegrationHandler) GetBondedValidators() (*stakingtypes.QueryValidatorsResponse, error)
- func (gqh *IntegrationHandler) GetCommunityPool() (*distrtypes.QueryCommunityPoolResponse, error)
- func (gqh *IntegrationHandler) GetDelegation(delegatorAddress string, validatorAddress string) (*stakingtypes.QueryDelegationResponse, error)
- func (gqh *IntegrationHandler) GetDelegationRewards(delegatorAddress string, validatorAddress string) (*distrtypes.QueryDelegationRewardsResponse, error)
- func (gqh *IntegrationHandler) GetDelegationTotalRewards(delegatorAddress string) (*distrtypes.QueryDelegationTotalRewardsResponse, error)
- func (gqh *IntegrationHandler) GetDelegatorDelegations(delegatorAddress string) (*stakingtypes.QueryDelegatorDelegationsResponse, error)
- func (gqh *IntegrationHandler) GetDelegatorUnbondingDelegations(delegatorAddress string) (*stakingtypes.QueryDelegatorUnbondingDelegationsResponse, error)
- func (gqh *IntegrationHandler) GetDelegatorWithdrawAddr(delegatorAddress string) (*distrtypes.QueryDelegatorWithdrawAddressResponse, error)
- func (gqh *IntegrationHandler) GetGrants(grantee, granter string) ([]*authz.Grant, error)
- func (gqh *IntegrationHandler) GetGrantsByGrantee(grantee string) ([]*authz.GrantAuthorization, error)
- func (gqh *IntegrationHandler) GetGrantsByGranter(granter string) ([]*authz.GrantAuthorization, error)
- func (gqh *IntegrationHandler) GetRedelegations(delegatorAddress, srcValidator, dstValidator string) (*stakingtypes.QueryRedelegationsResponse, error)
- func (gqh *IntegrationHandler) GetSpendableBalance(address sdktypes.AccAddress, denom string) (*banktypes.QuerySpendableBalanceByDenomResponse, error)
- func (gqh *IntegrationHandler) GetTotalSupply() (*banktypes.QueryTotalSupplyResponse, error)
- func (gqh *IntegrationHandler) GetValidatorCommission(validatorAddress string) (*distrtypes.QueryValidatorCommissionResponse, error)
- func (gqh *IntegrationHandler) GetValidatorDelegations(validatorAddress string) (*stakingtypes.QueryValidatorDelegationsResponse, error)
- func (gqh *IntegrationHandler) GetValidatorOutstandingRewards(validatorAddress string) (*distrtypes.QueryValidatorOutstandingRewardsResponse, error)
- func (gqh *IntegrationHandler) GetValidatorUnbondingDelegations(validatorAddress string) (*stakingtypes.QueryValidatorUnbondingDelegationsResponse, error)
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) // 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) GetAccount ¶
func (gqh *IntegrationHandler) GetAccount(address string) (sdk.AccountI, error)
GetAccount returns the account for the given address.
func (*IntegrationHandler) GetAllBalances ¶
func (gqh *IntegrationHandler) GetAllBalances(address sdktypes.AccAddress) (*banktypes.QueryAllBalancesResponse, error)
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 ¶
func (gqh *IntegrationHandler) GetSpendableBalance(address sdktypes.AccAddress, denom string) (*banktypes.QuerySpendableBalanceByDenomResponse, error)
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.