mirror of
https://github.com/cosmos/cosmjs.git
synced 2025-03-10 21:49:15 +00:00
authz queries to meet the expanded types provided in the sdk
This commit is contained in:
parent
30d0a656ea
commit
9263f33b69
@ -10,6 +10,8 @@ export interface AuthzExtension {
|
||||
msgTypeUrl: string,
|
||||
paginationKey?: Uint8Array,
|
||||
) => Promise<QueryGrantsResponse>;
|
||||
readonly granteeGrants: (grantee: string, paginationKey?: Uint8Array) => Promise<QueryGrantsResponse>;
|
||||
readonly granterGrants: (granter: string, paginationKey?: Uint8Array) => Promise<QueryGrantsResponse>;
|
||||
};
|
||||
}
|
||||
|
||||
@ -22,14 +24,24 @@ export function setupAuthzExtension(base: QueryClient): AuthzExtension {
|
||||
return {
|
||||
authz: {
|
||||
grants: async (granter: string, grantee: string, msgTypeUrl: string, paginationKey?: Uint8Array) => {
|
||||
const response = await queryService.Grants({
|
||||
return await queryService.Grants({
|
||||
granter: granter,
|
||||
grantee: grantee,
|
||||
msgTypeUrl: msgTypeUrl,
|
||||
pagination: createPagination(paginationKey),
|
||||
});
|
||||
|
||||
return response;
|
||||
},
|
||||
granteeGrants: async (grantee: string, paginationKey?: Uint8Array) => {
|
||||
return await queryService.GranteeGrants({
|
||||
grantee: grantee,
|
||||
pagination: createPagination(paginationKey),
|
||||
});
|
||||
},
|
||||
granterGrants: async (granter: string, paginationKey?: Uint8Array) => {
|
||||
return await queryService.GranterGrants({
|
||||
granter: granter,
|
||||
pagination: createPagination(paginationKey),
|
||||
});
|
||||
},
|
||||
},
|
||||
};
|
||||
|
Loading…
x
Reference in New Issue
Block a user