45 lines
2.9 KiB
TypeScript
45 lines
2.9 KiB
TypeScript
import { Rpc } from "../../../helpers";
|
|
import { QueryClient } from "@cosmjs/stargate";
|
|
import { QueryAccountsRequest, QueryAccountsResponse, QueryAccountRequest, QueryAccountResponse, QueryParamsRequest, QueryParamsResponse, QueryModuleAccountsRequest, QueryModuleAccountsResponse, Bech32PrefixRequest, Bech32PrefixResponse, AddressBytesToStringRequest, AddressBytesToStringResponse, AddressStringToBytesRequest, AddressStringToBytesResponse } from "./query";
|
|
/** Query defines the gRPC querier service. */
|
|
export interface Query {
|
|
/**
|
|
* Accounts returns all the existing accounts
|
|
*
|
|
* Since: cosmos-sdk 0.43
|
|
*/
|
|
accounts(request?: QueryAccountsRequest): Promise<QueryAccountsResponse>;
|
|
/** Account returns account details based on address. */
|
|
account(request: QueryAccountRequest): Promise<QueryAccountResponse>;
|
|
/** Params queries all parameters. */
|
|
params(request?: QueryParamsRequest): Promise<QueryParamsResponse>;
|
|
/** ModuleAccounts returns all the existing module accounts. */
|
|
moduleAccounts(request?: QueryModuleAccountsRequest): Promise<QueryModuleAccountsResponse>;
|
|
/** Bech32 queries bech32Prefix */
|
|
bech32Prefix(request?: Bech32PrefixRequest): Promise<Bech32PrefixResponse>;
|
|
/** AddressBytesToString converts Account Address bytes to string */
|
|
addressBytesToString(request: AddressBytesToStringRequest): Promise<AddressBytesToStringResponse>;
|
|
/** AddressStringToBytes converts Address string to bytes */
|
|
addressStringToBytes(request: AddressStringToBytesRequest): Promise<AddressStringToBytesResponse>;
|
|
}
|
|
export declare class QueryClientImpl implements Query {
|
|
private readonly rpc;
|
|
constructor(rpc: Rpc);
|
|
accounts(request?: QueryAccountsRequest): Promise<QueryAccountsResponse>;
|
|
account(request: QueryAccountRequest): Promise<QueryAccountResponse>;
|
|
params(request?: QueryParamsRequest): Promise<QueryParamsResponse>;
|
|
moduleAccounts(request?: QueryModuleAccountsRequest): Promise<QueryModuleAccountsResponse>;
|
|
bech32Prefix(request?: Bech32PrefixRequest): Promise<Bech32PrefixResponse>;
|
|
addressBytesToString(request: AddressBytesToStringRequest): Promise<AddressBytesToStringResponse>;
|
|
addressStringToBytes(request: AddressStringToBytesRequest): Promise<AddressStringToBytesResponse>;
|
|
}
|
|
export declare const createRpcQueryExtension: (base: QueryClient) => {
|
|
accounts(request?: QueryAccountsRequest): Promise<QueryAccountsResponse>;
|
|
account(request: QueryAccountRequest): Promise<QueryAccountResponse>;
|
|
params(request?: QueryParamsRequest): Promise<QueryParamsResponse>;
|
|
moduleAccounts(request?: QueryModuleAccountsRequest): Promise<QueryModuleAccountsResponse>;
|
|
bech32Prefix(request?: Bech32PrefixRequest): Promise<Bech32PrefixResponse>;
|
|
addressBytesToString(request: AddressBytesToStringRequest): Promise<AddressBytesToStringResponse>;
|
|
addressStringToBytes(request: AddressStringToBytesRequest): Promise<AddressStringToBytesResponse>;
|
|
};
|