cosmos/authz
Table of Contents
cosmos/authz/v1beta1/event.proto
TopSince: cosmos-sdk 0.43
EventGrant
EventGrant is emitted on Msg/Grant
| Field | Type | Label | Description |
| msg_type_url | string | Msg type URL for which an autorization is granted |
|
| granter | string | Granter account address |
|
| grantee | string | Grantee account address |
EventRevoke
EventRevoke is emitted on Msg/Revoke
| Field | Type | Label | Description |
| msg_type_url | string | Msg type URL for which an autorization is revoked |
|
| granter | string | Granter account address |
|
| grantee | string | Grantee account address |
cosmos/authz/v1beta1/query.proto
TopSince: cosmos-sdk 0.43
QueryGranteeGrantsRequest
QueryGranteeGrantsRequest is the request type for the Query/IssuedGrants RPC method.
| Field | Type | Label | Description |
| grantee | string |
|
|
| pagination | cosmos.base.query.v1beta1.PageRequest | pagination defines an pagination for the request. |
QueryGranteeGrantsResponse
QueryGranteeGrantsResponse is the response type for the Query/GranteeGrants RPC method.
| Field | Type | Label | Description |
| grants | GrantAuthorization | repeated | grants is a list of grants granted to the grantee. |
| pagination | cosmos.base.query.v1beta1.PageResponse | pagination defines an pagination for the response. |
QueryGranterGrantsRequest
QueryGranterGrantsRequest is the request type for the Query/GranterGrants RPC method.
| Field | Type | Label | Description |
| granter | string |
|
|
| pagination | cosmos.base.query.v1beta1.PageRequest | pagination defines an pagination for the request. |
QueryGranterGrantsResponse
QueryGranterGrantsResponse is the response type for the Query/GranterGrants RPC method.
| Field | Type | Label | Description |
| grants | GrantAuthorization | repeated | grants is a list of grants granted by the granter. |
| pagination | cosmos.base.query.v1beta1.PageResponse | pagination defines an pagination for the response. |
QueryGrantsRequest
QueryGrantsRequest is the request type for the Query/Grants RPC method.
| Field | Type | Label | Description |
| granter | string |
|
|
| grantee | string |
|
|
| msg_type_url | string | Optional, msg_type_url, when set, will query only grants matching given msg type. |
|
| pagination | cosmos.base.query.v1beta1.PageRequest | pagination defines an pagination for the request. |
QueryGrantsResponse
QueryGrantsResponse is the response type for the Query/Authorizations RPC method.
| Field | Type | Label | Description |
| grants | Grant | repeated | authorizations is a list of grants 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 |
| Grants | QueryGrantsRequest | QueryGrantsResponse | Returns list of `Authorization`, granted to the grantee by the granter. |
| GranterGrants | QueryGranterGrantsRequest | QueryGranterGrantsResponse | GranterGrants returns list of `GrantAuthorization`, granted by granter. Since: cosmos-sdk 0.45.2 |
| GranteeGrants | QueryGranteeGrantsRequest | QueryGranteeGrantsResponse | GranteeGrants returns a list of `GrantAuthorization` by grantee. Since: cosmos-sdk 0.45.2 |
Methods with HTTP bindings
| Method Name | Method | Pattern | Body |
| Grants | GET | /cosmos/authz/v1beta1/grants | |
| GranterGrants | GET | /cosmos/authz/v1beta1/grants/granter/{granter} | |
| GranteeGrants | GET | /cosmos/authz/v1beta1/grants/grantee/{grantee} |
cosmos/authz/v1beta1/genesis.proto
TopSince: cosmos-sdk 0.43
GenesisState
GenesisState defines the authz module's genesis state.
| Field | Type | Label | Description |
| authorization | GrantAuthorization | repeated |
|
cosmos/authz/v1beta1/authz.proto
TopSince: cosmos-sdk 0.43
GenericAuthorization
GenericAuthorization gives the grantee unrestricted permissions to execute
the provided method on behalf of the granter's account.
| Field | Type | Label | Description |
| msg | string | Msg, identified by it's type URL, to grant unrestricted permissions to execute |
Grant
Grant gives permissions to execute
the provide method with expiration time.
| Field | Type | Label | Description |
| authorization | google.protobuf.Any |
|
|
| expiration | google.protobuf.Timestamp |
|
GrantAuthorization
GrantAuthorization extends a grant with both the addresses of the grantee and granter.
It is used in genesis.proto and query.proto
Since: cosmos-sdk 0.45.2
| Field | Type | Label | Description |
| granter | string |
|
|
| grantee | string |
|
|
| authorization | google.protobuf.Any |
|
|
| expiration | google.protobuf.Timestamp |
|
cosmos/authz/v1beta1/tx.proto
TopSince: cosmos-sdk 0.43
MsgExec
MsgExec attempts to execute the provided messages using
authorizations granted to the grantee. Each message should have only
one signer corresponding to the granter of the authorization.
| Field | Type | Label | Description |
| grantee | string |
|
|
| msgs | google.protobuf.Any | repeated | Authorization Msg requests to execute. Each msg must implement Authorization interface The x/authz will try to find a grant matching (msg.signers[0], grantee, MsgTypeURL(msg)) triple and validate it. |
MsgExecResponse
MsgExecResponse defines the Msg/MsgExecResponse response type.
| Field | Type | Label | Description |
| results | bytes | repeated |
|
MsgGrant
MsgGrant is a request type for Grant method. It declares authorization to the grantee
on behalf of the granter with the provided expiration time.
| Field | Type | Label | Description |
| granter | string |
|
|
| grantee | string |
|
|
| grant | Grant |
|
MsgGrantResponse
MsgGrantResponse defines the Msg/MsgGrant response type.
MsgRevoke
MsgRevoke revokes any authorization with the provided sdk.Msg type on the
granter's account with that has been granted to the grantee.
| Field | Type | Label | Description |
| granter | string |
|
|
| grantee | string |
|
|
| msg_type_url | string |
|
MsgRevokeResponse
MsgRevokeResponse defines the Msg/MsgRevokeResponse response type.
Msg
Msg defines the authz Msg service.
| Method Name | Request Type | Response Type | Description |
| Grant | MsgGrant | MsgGrantResponse | Grant grants the provided authorization to the grantee on the granter's account with the provided expiration time. If there is already a grant for the given (granter, grantee, Authorization) triple, then the grant will be overwritten. |
| Exec | MsgExec | MsgExecResponse | Exec attempts to execute the provided messages using authorizations granted to the grantee. Each message should have only one signer corresponding to the granter of the authorization. |
| Revoke | MsgRevoke | MsgRevokeResponse | Revoke revokes any authorization corresponding to the provided method name on the 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 |