AuthZ
ℹ️info
JMES's Authz module inherits from the Cosmos SDK's authz
module. This document is a stub and mainly explains important JMES-specific notes on how it is used.
The authz (message authorization) module allows users to authorize another account to send messages on their behalf. Certain authorizations, such as the spending of another account's tokens, can be parameterized to constrain the permissions of the grantee, such as setting a spending limit.
Message types
MsgGrantAuthorization
_8// MsgGrantAuthorization grants the provided authorization to the grantee on the granter's_8// account during the provided time period_8type MsgGrantAuthorization struct {_8 Granter sdk.AccAddress `json:"granter"`_8 Grantee sdk.AccAddress `json:"grantee"`_8 Authorization Authorization `json:"authorization"`_8 Period time.Duration `json:"period"`_8}
MsgRevokeAuthorization
_9// MsgRevokeAuthorization revokes any authorization with the provided sdk.Msg type on the_9// granter's account that has been granted to the grantee_9type MsgRevokeAuthorization struct {_9 Granter sdk.AccAddress `json:"granter"`_9 Grantee sdk.AccAddress `json:"grantee"`_9 // AuthorizationMsgType is the type of sdk.Msg that the revoked Authorization refers to._9 // i.e. this is what `Authorization.MsgType()` returns_9 AuthorizationMsgType string `json:"authorization_msg_type"`_9}
MsgExecAuthorized
_7// MsgExecAuthorized attempts to execute the provided messages using_7// authorizations granted to the grantee. Each message should only have_7// one signer corresponding to the granter of the authorization._7type MsgExecAuthorized struct {_7 Grantee sdk.AccAddress `json:"grantee"`_7 Msgs []sdk.Msg `json:"msgs"`_7}