cosmos/feegrant
Table of Contents
cosmos/feegrant/v1beta1/query.proto
TopSince: cosmos-sdk 0.43
QueryAllowanceRequest
QueryAllowanceRequest is the request type for the Query/Allowance RPC method.
Field | Type | Label | Description |
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.
Field | Type | Label | Description |
allowance | Grant | allowance is a allowance granted for grantee by granter. |
QueryAllowancesRequest
QueryAllowancesRequest is the request type for the Query/Allowances RPC method.
Field | Type | Label | Description |
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.
Field | Type | Label | Description |
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 Name | Request Type | Response Type | Description |
Allowance | QueryAllowanceRequest | QueryAllowanceResponse | Allowance returns fee granted to the grantee by the granter. |
Allowances | QueryAllowancesRequest | QueryAllowancesResponse | Allowances returns all the grants for address. |
Methods with HTTP bindings
Method Name | Method | Pattern | Body |
Allowance | GET | /cosmos/feegrant/v1beta1/allowance/{granter}/{grantee} | |
Allowances | GET | /cosmos/feegrant/v1beta1/allowances/{grantee} |
cosmos/feegrant/v1beta1/feegrant.proto
TopSince: cosmos-sdk 0.43
AllowedMsgAllowance
AllowedMsgAllowance creates allowance only for specified message types.
Field | Type | Label | Description |
allowance | google.protobuf.Any | allowance can be any of basic and filtered 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 tokens
that optionally expires. The grantee can use up to SpendLimit to cover fees.
Field | Type | Label | Description |
spend_limit | cosmos.base.v1beta1.Coin | repeated | spend_limit specifies the maximum amount of tokens that can be spent by this allowance and will be updated as tokens 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
Field | Type | Label | Description |
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 and filtered fee allowance. |
PeriodicAllowance
PeriodicAllowance extends Allowance to allow for both a maximum cap,
as well as a limit per time period.
Field | Type | Label | Description |
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
TopSince: cosmos-sdk 0.43
GenesisState
GenesisState contains a set of fee allowances, persisted from the store
Field | Type | Label | Description |
allowances | Grant | repeated |
|
cosmos/feegrant/v1beta1/tx.proto
TopSince: cosmos-sdk 0.43
MsgGrantAllowance
MsgGrantAllowance adds permission for Grantee to spend up to Allowance
of fees from the account of Granter.
Field | Type | Label | Description |
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 and filtered fee allowance. |
MsgGrantAllowanceResponse
MsgGrantAllowanceResponse defines the Msg/GrantAllowanceResponse response type.
MsgRevokeAllowance
MsgRevokeAllowance removes any existing Allowance from Granter to Grantee.
Field | Type | Label | Description |
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 Name | Request Type | Response Type | Description |
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. |
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 |