Documentation ¶
Overview ¶
nolint:deadcode unused DONTCOVER
Index ¶
- func NewQuerier(keeper Keeper) sdk.Querier
- type Keeper
- func (k Keeper) DequeueAllMatureGrantQueue(ctx sdk.Context) (matureGrants []types.GGMPair)
- func (k Keeper) DispatchActions(ctx sdk.Context, granteeAddr sdk.AccAddress, msgs []sdk.Msg) error
- func (k Keeper) GetGrant(ctx sdk.Context, granterAddr sdk.AccAddress, granteeAddr sdk.AccAddress, ...) (grant types.AuthorizationGrant, found bool)
- func (k Keeper) GetGrantQueueTimeSlice(ctx sdk.Context, timestamp time.Time) (ggmPairs []types.GGMPair)
- func (k Keeper) GetGrants(ctx sdk.Context, granterAddr sdk.AccAddress, granteeAddr sdk.AccAddress) (grants []types.AuthorizationGrant)
- func (k Keeper) GrantQueueIterator(ctx sdk.Context, endTime time.Time) sdk.Iterator
- func (k Keeper) InsertGrantQueue(ctx sdk.Context, granterAddr, granteeAddr sdk.AccAddress, msgType string, ...)
- func (k Keeper) IsGrantable(msgType string) bool
- func (k Keeper) IterateGrants(ctx sdk.Context, ...)
- func (k Keeper) RevokeFromGrantQueue(ctx sdk.Context, granterAddr, granteeAddr sdk.AccAddress, msgType string, ...)
- func (k Keeper) RevokeGrant(ctx sdk.Context, granterAddr sdk.AccAddress, granteeAddr sdk.AccAddress, ...)
- func (k Keeper) SetGrant(ctx sdk.Context, granterAddr sdk.AccAddress, granteeAddr sdk.AccAddress, ...)
- func (k Keeper) SetGrantQueueTimeSlice(ctx sdk.Context, timestamp time.Time, keys []types.GGMPair)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewQuerier ¶
NewQuerier is the module level router for state queries
Types ¶
type Keeper ¶
type Keeper struct {
// contains filtered or unexported fields
}
Keeper of the msgauth store
func NewKeeper ¶
func NewKeeper(cdc *codec.Codec, storeKey sdk.StoreKey, router sdk.Router, allowedMsgTypes ...string) Keeper
NewKeeper constructs a message authorisation Keeper
func SetupTestInput ¶
func (Keeper) DequeueAllMatureGrantQueue ¶
DequeueAllMatureGrantQueue returns a concatenated list of all the timeslices inclusively previous to current block time, and deletes the timeslices from the queue
func (Keeper) DispatchActions ¶
DispatchActions attempts to execute the provided messages via authorization grants from the message signer to the grantee.
func (Keeper) GetGrant ¶
func (k Keeper) GetGrant(ctx sdk.Context, granterAddr sdk.AccAddress, granteeAddr sdk.AccAddress, msgType string) (grant types.AuthorizationGrant, found bool)
GetGrant returns grant between granter and grantee for the given msg type
func (Keeper) GetGrantQueueTimeSlice ¶
func (k Keeper) GetGrantQueueTimeSlice(ctx sdk.Context, timestamp time.Time) (ggmPairs []types.GGMPair)
GetGrantQueueTimeSlice gets a specific grant queue timeslice. A timeslice is a slice of GGMPair corresponding to grants that expire at a certain time.
func (Keeper) GetGrants ¶
func (k Keeper) GetGrants(ctx sdk.Context, granterAddr sdk.AccAddress, granteeAddr sdk.AccAddress) (grants []types.AuthorizationGrant)
GetGrants returns all the grants between granter and grantee
func (Keeper) GrantQueueIterator ¶
GrantQueueIterator returns all the grant queue timeslices from time 0 until endTime
func (Keeper) InsertGrantQueue ¶
func (k Keeper) InsertGrantQueue(ctx sdk.Context, granterAddr, granteeAddr sdk.AccAddress, msgType string, completionTime time.Time)
InsertGrantQueue inserts an grant to the appropriate timeslice in the grant queue
func (Keeper) IsGrantable ¶
IsGrantable returns the flag that the given msg type is grantable or not
func (Keeper) IterateGrants ¶
func (k Keeper) IterateGrants(ctx sdk.Context, handler func(granterAddr sdk.AccAddress, granteeAddr sdk.AccAddress, grant types.AuthorizationGrant) bool)
IterateGrants iterates over all authorization grants
func (Keeper) RevokeFromGrantQueue ¶
func (k Keeper) RevokeFromGrantQueue(ctx sdk.Context, granterAddr, granteeAddr sdk.AccAddress, msgType string, completionTime time.Time)
RevokeFromGrantQueue removes grant data from the timeslice queue
func (Keeper) RevokeGrant ¶
func (k Keeper) RevokeGrant(ctx sdk.Context, granterAddr sdk.AccAddress, granteeAddr sdk.AccAddress, msgType string)
RevokeGrant removes method revokes any authorization for the provided message type granted to the grantee by the granter.
func (Keeper) SetGrant ¶
func (k Keeper) SetGrant(ctx sdk.Context, granterAddr sdk.AccAddress, granteeAddr sdk.AccAddress, grant types.AuthorizationGrant)
SetGrant method grants the provided authorization to the grantee on the granter's account with the provided expiration time. If there is an existing authorization grant for the same `sdk.Msg` type, this grant overwrites that.