cosmos/feegrant

Table of Contents

cosmos/feegrant/module/v1/module.proto

Top

Module

Module is the config object of the feegrant module.

cosmos/feegrant/v1beta1/feegrant.proto

Top

Since: cosmos-sdk 0.43

AllowedMsgAllowance

AllowedMsgAllowance creates allowance only for specified message types.

FieldTypeLabelDescription
allowance google.protobuf.Any

allowance can be any of basic and periodic fee allowance.

allowed_messages string repeated

allowed_messages are the messages for which the grantee has the access.

BasicAllowance

BasicAllowance implements Allowance with a one-time grant of coins

that optionally expires. The grantee can use up to SpendLimit to cover fees.

FieldTypeLabelDescription
spend_limit cosmos.base.v1beta1.Coin repeated

spend_limit specifies the maximum amount of coins that can be spent by this allowance and will be updated as coins are spent. If it is empty, there is no spend limit and any amount of coins can be spent.

expiration google.protobuf.Timestamp

expiration specifies an optional time when this allowance expires

Grant

Grant is stored in the KVStore to record a grant with full context

FieldTypeLabelDescription
granter string

granter is the address of the user granting an allowance of their funds.

grantee string

grantee is the address of the user being granted an allowance of another user's funds.

allowance google.protobuf.Any

allowance can be any of basic, periodic, allowed fee allowance.

PeriodicAllowance

PeriodicAllowance extends Allowance to allow for both a maximum cap,

as well as a limit per time period.

FieldTypeLabelDescription
basic BasicAllowance

basic specifies a struct of `BasicAllowance`

period google.protobuf.Duration

period specifies the time duration in which period_spend_limit coins can be spent before that allowance is reset

period_spend_limit cosmos.base.v1beta1.Coin repeated

period_spend_limit specifies the maximum number of coins that can be spent in the period

period_can_spend cosmos.base.v1beta1.Coin repeated

period_can_spend is the number of coins left to be spent before the period_reset time

period_reset google.protobuf.Timestamp

period_reset is the time at which this period resets and a new one begins, it is calculated from the start time of the first transaction after the last period ended

cosmos/feegrant/v1beta1/genesis.proto

Top

Since: cosmos-sdk 0.43

GenesisState

GenesisState contains a set of fee allowances, persisted from the store

FieldTypeLabelDescription
allowances Grant repeated

cosmos/feegrant/v1beta1/query.proto

Top

Since: cosmos-sdk 0.43

QueryAllowanceRequest

QueryAllowanceRequest is the request type for the Query/Allowance RPC method.

FieldTypeLabelDescription
granter string

granter is the address of the user granting an allowance of their funds.

grantee string

grantee is the address of the user being granted an allowance of another user's funds.

QueryAllowanceResponse

QueryAllowanceResponse is the response type for the Query/Allowance RPC method.

FieldTypeLabelDescription
allowance Grant

allowance is a allowance granted for grantee by granter.

QueryAllowancesByGranterRequest

QueryAllowancesByGranterRequest is the request type for the Query/AllowancesByGranter RPC method.

Since: cosmos-sdk 0.46

FieldTypeLabelDescription
granter string

pagination cosmos.base.query.v1beta1.PageRequest

pagination defines an pagination for the request.

QueryAllowancesByGranterResponse

QueryAllowancesByGranterResponse is the response type for the Query/AllowancesByGranter RPC method.

Since: cosmos-sdk 0.46

FieldTypeLabelDescription
allowances Grant repeated

allowances that have been issued by the granter.

pagination cosmos.base.query.v1beta1.PageResponse

pagination defines an pagination for the response.

QueryAllowancesRequest

QueryAllowancesRequest is the request type for the Query/Allowances RPC method.

FieldTypeLabelDescription
grantee string

pagination cosmos.base.query.v1beta1.PageRequest

pagination defines an pagination for the request.

QueryAllowancesResponse

QueryAllowancesResponse is the response type for the Query/Allowances RPC method.

FieldTypeLabelDescription
allowances Grant repeated

allowances are allowance's granted for grantee by granter.

pagination cosmos.base.query.v1beta1.PageResponse

pagination defines an pagination for the response.

Query

Query defines the gRPC querier service.

Method NameRequest TypeResponse TypeDescription
Allowance QueryAllowanceRequest QueryAllowanceResponse

Allowance returns granted allwance to the grantee by the granter.

Allowances QueryAllowancesRequest QueryAllowancesResponse

Allowances returns all the grants for the given grantee address.

AllowancesByGranter QueryAllowancesByGranterRequest QueryAllowancesByGranterResponse

AllowancesByGranter returns all the grants given by an address Since: cosmos-sdk 0.46

Methods with HTTP bindings

Method Name Method Pattern Body
Allowance GET /cosmos/feegrant/v1beta1/allowance/{granter}/{grantee}
Allowances GET /cosmos/feegrant/v1beta1/allowances/{grantee}
AllowancesByGranter GET /cosmos/feegrant/v1beta1/issued/{granter}

cosmos/feegrant/v1beta1/tx.proto

Top

Since: cosmos-sdk 0.43

MsgGrantAllowance

MsgGrantAllowance adds permission for Grantee to spend up to Allowance

of fees from the account of Granter.

FieldTypeLabelDescription
granter string

granter is the address of the user granting an allowance of their funds.

grantee string

grantee is the address of the user being granted an allowance of another user's funds.

allowance google.protobuf.Any

allowance can be any of basic, periodic, allowed fee allowance.

MsgGrantAllowanceResponse

MsgGrantAllowanceResponse defines the Msg/GrantAllowanceResponse response type.

MsgPruneAllowances

MsgPruneAllowances prunes expired fee allowances.

Since cosmos-sdk 0.50

FieldTypeLabelDescription
pruner string

pruner is the address of the user pruning expired allowances.

MsgPruneAllowancesResponse

MsgPruneAllowancesResponse defines the Msg/PruneAllowancesResponse response type.

Since cosmos-sdk 0.50

MsgRevokeAllowance

MsgRevokeAllowance removes any existing Allowance from Granter to Grantee.

FieldTypeLabelDescription
granter string

granter is the address of the user granting an allowance of their funds.

grantee string

grantee is the address of the user being granted an allowance of another user's funds.

MsgRevokeAllowanceResponse

MsgRevokeAllowanceResponse defines the Msg/RevokeAllowanceResponse response type.

Msg

Msg defines the feegrant msg service.

Method NameRequest TypeResponse TypeDescription
GrantAllowance MsgGrantAllowance MsgGrantAllowanceResponse

GrantAllowance grants fee allowance to the grantee on the granter's account with the provided expiration time.

RevokeAllowance MsgRevokeAllowance MsgRevokeAllowanceResponse

RevokeAllowance revokes any fee allowance of granter's account that has been granted to the grantee.

PruneAllowances MsgPruneAllowances MsgPruneAllowancesResponse

PruneAllowances prunes expired fee allowances, currently up to 75 at a time. Since cosmos-sdk 0.50

Scalar Value Types

.proto Type Notes Python Type
double float
float float
int32 Uses variable-length encoding. Inefficient for encoding negative numbers – if your field is likely to have negative values, use sint32 instead. int
int64 Uses variable-length encoding. Inefficient for encoding negative numbers – if your field is likely to have negative values, use sint64 instead. int/long
uint32 Uses variable-length encoding. int/long
uint64 Uses variable-length encoding. int/long
sint32 Uses variable-length encoding. Signed int value. These more efficiently encode negative numbers than regular int32s. int
sint64 Uses variable-length encoding. Signed int value. These more efficiently encode negative numbers than regular int64s. int/long
fixed32 Always four bytes. More efficient than uint32 if values are often greater than 2^28. int
fixed64 Always eight bytes. More efficient than uint64 if values are often greater than 2^56. int/long
sfixed32 Always four bytes. int
sfixed64 Always eight bytes. int/long
bool boolean
string A string must always contain UTF-8 encoded or 7-bit ASCII text. str/unicode
bytes May contain any arbitrary sequence of bytes. str