import { RequestQuery } from './codegen/tendermint/abci/types.js'; import type { TypeFromUrl } from './codegen/typeFromUrl.js'; import type { JsonSafe } from './codegen/index.js'; import type { Any } from './codegen/google/protobuf/any.js'; import type { QueryBalanceRequestProtoMsg } from './codegen/cosmos/bank/v1beta1/query.js'; /** * The result of Any.toJSON(). Exported at top level as a convenience * for a very common import. */ export type AnyJson = JsonSafe; /** * The encoding introduced in Protobuf 3 for Any that can be serialized to JSON. * * Technically JSON is a string, a notation encoding a JSON object. So this is * more accurately "JSON-ifiable" but we don't expect anyone to confuse this * type with a string. */ export type TypedJson = TU extends keyof TypeFromUrl ? TypeFromUrl[TU] & { '@type': TU; } : { '@type': string; }; export type MessageBody = Omit, '@type'>; /** General pattern for Request that has a corresponding Response */ type RequestTypeUrl = `/${Base}Request`; /** Pattern specific to Msg sends, in which "Msg" without "Response" implies it's a request */ type TxMessageTypeUrl> = `/${Package}.Msg${Name}`; export type ResponseTo = T['@type'] extends RequestTypeUrl ? TypedJson<`/${Base}Response`> : T['@type'] extends TxMessageTypeUrl ? TypedJson<`/${Package}.Msg${Name}Response`> : TypedJson; export declare const typedJson: (typeStr: TU, value: MessageBody) => TypedJson; export declare const typeUrlToGrpcPath: (typeUrl: Any["typeUrl"]) => string; type RequestQueryOpts = Partial>; export declare const toRequestQueryJson: (msg: Any | QueryBalanceRequestProtoMsg, opts?: RequestQueryOpts) => { data: string; path: string; height: string; prove: boolean; }; export {}; //# sourceMappingURL=helpers.d.ts.map