import { grpc } from "@improbable-eng/grpc-web"; import Long from "long"; import _m0 from "protobufjs/minimal"; import { PageRequest, PageResponse } from "../../base/query/v1beta1/pagination"; import { Grant, GrantAuthorization } from "./authz"; export declare const protobufPackage = "cosmos.authz.v1beta1"; /** QueryGrantsRequest is the request type for the Query/Grants RPC method. */ export interface QueryGrantsRequest { granter: string; grantee: string; /** Optional, msg_type_url, when set, will query only grants matching given msg type. */ msgTypeUrl: string; /** pagination defines an pagination for the request. */ pagination: PageRequest | undefined; } /** QueryGrantsResponse is the response type for the Query/Authorizations RPC method. */ export interface QueryGrantsResponse { /** authorizations is a list of grants granted for grantee by granter. */ grants: Grant[]; /** pagination defines an pagination for the response. */ pagination: PageResponse | undefined; } /** QueryGranterGrantsRequest is the request type for the Query/GranterGrants RPC method. */ export interface QueryGranterGrantsRequest { granter: string; /** pagination defines an pagination for the request. */ pagination: PageRequest | undefined; } /** QueryGranterGrantsResponse is the response type for the Query/GranterGrants RPC method. */ export interface QueryGranterGrantsResponse { /** grants is a list of grants granted by the granter. */ grants: GrantAuthorization[]; /** pagination defines an pagination for the response. */ pagination: PageResponse | undefined; } /** QueryGranteeGrantsRequest is the request type for the Query/GranteeGrants RPC method. */ export interface QueryGranteeGrantsRequest { grantee: string; /** pagination defines an pagination for the request. */ pagination: PageRequest | undefined; } /** QueryGranteeGrantsResponse is the response type for the Query/GranteeGrants RPC method. */ export interface QueryGranteeGrantsResponse { /** grants is a list of grants granted to the grantee. */ grants: GrantAuthorization[]; /** pagination defines an pagination for the response. */ pagination: PageResponse | undefined; } export declare const QueryGrantsRequest: { encode(message: QueryGrantsRequest, writer?: _m0.Writer): _m0.Writer; decode(input: _m0.Reader | Uint8Array, length?: number): QueryGrantsRequest; fromJSON(object: any): QueryGrantsRequest; toJSON(message: QueryGrantsRequest): unknown; create(base?: DeepPartial): QueryGrantsRequest; fromPartial(object: DeepPartial): QueryGrantsRequest; }; export declare const QueryGrantsResponse: { encode(message: QueryGrantsResponse, writer?: _m0.Writer): _m0.Writer; decode(input: _m0.Reader | Uint8Array, length?: number): QueryGrantsResponse; fromJSON(object: any): QueryGrantsResponse; toJSON(message: QueryGrantsResponse): unknown; create(base?: DeepPartial): QueryGrantsResponse; fromPartial(object: DeepPartial): QueryGrantsResponse; }; export declare const QueryGranterGrantsRequest: { encode(message: QueryGranterGrantsRequest, writer?: _m0.Writer): _m0.Writer; decode(input: _m0.Reader | Uint8Array, length?: number): QueryGranterGrantsRequest; fromJSON(object: any): QueryGranterGrantsRequest; toJSON(message: QueryGranterGrantsRequest): unknown; create(base?: DeepPartial): QueryGranterGrantsRequest; fromPartial(object: DeepPartial): QueryGranterGrantsRequest; }; export declare const QueryGranterGrantsResponse: { encode(message: QueryGranterGrantsResponse, writer?: _m0.Writer): _m0.Writer; decode(input: _m0.Reader | Uint8Array, length?: number): QueryGranterGrantsResponse; fromJSON(object: any): QueryGranterGrantsResponse; toJSON(message: QueryGranterGrantsResponse): unknown; create(base?: DeepPartial): QueryGranterGrantsResponse; fromPartial(object: DeepPartial): QueryGranterGrantsResponse; }; export declare const QueryGranteeGrantsRequest: { encode(message: QueryGranteeGrantsRequest, writer?: _m0.Writer): _m0.Writer; decode(input: _m0.Reader | Uint8Array, length?: number): QueryGranteeGrantsRequest; fromJSON(object: any): QueryGranteeGrantsRequest; toJSON(message: QueryGranteeGrantsRequest): unknown; create(base?: DeepPartial): QueryGranteeGrantsRequest; fromPartial(object: DeepPartial): QueryGranteeGrantsRequest; }; export declare const QueryGranteeGrantsResponse: { encode(message: QueryGranteeGrantsResponse, writer?: _m0.Writer): _m0.Writer; decode(input: _m0.Reader | Uint8Array, length?: number): QueryGranteeGrantsResponse; fromJSON(object: any): QueryGranteeGrantsResponse; toJSON(message: QueryGranteeGrantsResponse): unknown; create(base?: DeepPartial): QueryGranteeGrantsResponse; fromPartial(object: DeepPartial): QueryGranteeGrantsResponse; }; /** Query defines the gRPC querier service. */ export interface Query { /** Returns list of `Authorization`, granted to the grantee by the granter. */ Grants(request: DeepPartial, metadata?: grpc.Metadata): Promise; /** GranterGrants returns list of `GrantAuthorization`, granted by granter. */ GranterGrants(request: DeepPartial, metadata?: grpc.Metadata): Promise; /** GranteeGrants returns a list of `GrantAuthorization` by grantee. */ GranteeGrants(request: DeepPartial, metadata?: grpc.Metadata): Promise; } export declare class QueryClientImpl implements Query { private readonly rpc; constructor(rpc: Rpc); Grants(request: DeepPartial, metadata?: grpc.Metadata): Promise; GranterGrants(request: DeepPartial, metadata?: grpc.Metadata): Promise; GranteeGrants(request: DeepPartial, metadata?: grpc.Metadata): Promise; } export declare const QueryDesc: { serviceName: string; }; export declare const QueryGrantsDesc: UnaryMethodDefinitionish; export declare const QueryGranterGrantsDesc: UnaryMethodDefinitionish; export declare const QueryGranteeGrantsDesc: UnaryMethodDefinitionish; interface UnaryMethodDefinitionishR extends grpc.UnaryMethodDefinition { requestStream: any; responseStream: any; } type UnaryMethodDefinitionish = UnaryMethodDefinitionishR; interface Rpc { unary(methodDesc: T, request: any, metadata: grpc.Metadata | undefined): Promise; } export declare class GrpcWebImpl { private host; private options; constructor(host: string, options: { transport?: grpc.TransportFactory; debug?: boolean; metadata?: grpc.Metadata; upStreamRetryCodes?: number[]; }); unary(methodDesc: T, _request: any, metadata: grpc.Metadata | undefined): Promise; } type Builtin = Date | Function | Uint8Array | string | number | boolean | undefined; export type DeepPartial = T extends Builtin ? T : T extends Long ? string | number | Long : T extends globalThis.Array ? globalThis.Array> : T extends ReadonlyArray ? ReadonlyArray> : T extends {} ? { [K in keyof T]?: DeepPartial; } : Partial; export declare class GrpcWebError extends globalThis.Error { code: grpc.Code; metadata: grpc.Metadata; constructor(message: string, code: grpc.Code, metadata: grpc.Metadata); } export {};