Documentation ¶
Index ¶
- type Handler
- type IntegrationHandler
- func (gqh *IntegrationHandler) GetAccount(address string) (authtypes.AccountI, 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) GetBalance(address sdktypes.AccAddress, denom string) (*banktypes.QueryBalanceResponse, error)
- func (gqh *IntegrationHandler) GetDelegation(delegatorAddress string, validatorAddress string) (*stakingtypes.QueryDelegationResponse, 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)
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) (authtypes.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 GetBalance(address sdktypes.AccAddress, denom string) (*banktypes.QueryBalanceResponse, error) // Staking methods GetDelegation(delegatorAddress string, validatorAddress string) (*stakingtypes.QueryDelegationResponse, 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) (authtypes.AccountI, error)
GetAccount returns the account 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) GetBalance ¶
func (gqh *IntegrationHandler) GetBalance(address sdktypes.AccAddress, denom string) (*banktypes.QueryBalanceResponse, error)
GetBalance returns the balance for the given address.
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) 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.