Returns list of Authorization
, granted to the grantee by the granter.
Parameters
Object Name | Required | Type | Detail |
---|---|---|---|
granter | ✅ | String | The address of the user granting an allowance of their funds. |
grantee | ✅ | String | The address of the user being granted an allowance of another user's funds. |
msg_type_url | ❌ | String | When set, will query only grants matching given msg type. |
pagination.key | ❌ | String | The value returned in PageResponse.next_key to begin querying the next page most efficiently. If provided, then pagination.offset is not allowed. |
pagination.offset | ❌ | Integer | A numeric offset that can be used when pagination.key is unavailable. It is less efficient than pagination.key . If provided, then pagination.key is not allowed. |
pagination.limit | ❌ | Integer | The total number of results to be returned in the result page. If left empty it will default to a value to be set by each app. |
pagination.count_total | ❌ | Boolean | If set to true , the result will include a count of the total number of items available for pagination. count_total is only respected when offset is used. It is ignored when key is set. |
/cosmos/authz/v1beta1/grants?granter=cosmos1wqy2s6nwnxj57l0l5rdjxxr646p3al6ymmpycg&grantee=cosmos1s76g05ezntwysza65nrgr3xkxjhzvw3pxtggvk
Result
List of Authorization
.
Example
Request
curl <your-rest-endpoint>/cosmos/authz/v1beta1/grants?granter=cosmos1wqy2s6nwnxj57l0l5rdjxxr646p3al6ymmpycg&grantee=cosmos1s76g05ezntwysza65nrgr3xkxjhzvw3pxtggvk \
-X GET \
-H "accept: application/json"
Return
{
"grants": [
{
"authorization": {
"@type": "/cosmos.authz.v1beta1.GenericAuthorization",
"msg": "/cosmos.gov.v1beta1.MsgVote"
},
"expiration": "2024-02-16T08:09:29Z"
}
],
"pagination": {
"next_key": null,
"total": "1"
}
}