import type { CwAccountAddr, CwBase64, CwUint128 } from './cosmwasm.js'; import type { IntStr, JsonObject } from '@blake.regalia/belt'; import type { AminoMsg, AminoSignResponse, Coin, Pubkey, StdFee, StdSignature, StdSignDoc, StdTx } from '@cosmjs/amino'; /** * Any sized int as a string */ export type WeakIntStr = IntStr; /** * Any sized uint as a string (alias of {@link WeakIntStr}) */ export type WeakUintStr = WeakIntStr; /** * 128-bit int as a string (alias of {@link WeakIntStr}) */ export type WeakInt128Str = WeakIntStr; /** * 128-bit uint as a string (alias of {@link WeakUintStr}) */ export type WeakUint128Str = WeakUintStr; /** * 64-bit int as a string (alias of {@link WeakIntStr}) */ export type WeakInt64Str = WeakIntStr; /** * 64-bit uint as a string (alias of {@link WeakUintStr}) */ export type WeakUint64Str = WeakUintStr; /** * Known Cosmos-wide address space modifiers */ export type CosmosAddrSpace = '' | 'valoper' | 'valcons'; /** * A Cosmos bech32-encoded address */ export type WeakBech32Addr = `${s_hrp}${s_space}1${string}`; /** * A Cosmos bech32-encoded pubkey */ export type WeakBech32Pub = `${s_prefix}${s_space}pub1${string}`; /** * A Cosmos bech32-encoded account address */ export type WeakAccountAddr = WeakBech32Addr; /** * A Cosmos bech32-encoded validator address */ export type WeakValidatorAddr = WeakBech32Addr; /** * Concisely represents a `cosmos.base.v1beta1.Coin` */ export type SlimCoin = readonly [ sg_amount: WeakUint128Str, s_denom: s_denom ]; /** * For compatibility with Cosmos' {@link Coin} */ export interface TypedCoin extends Coin, JsonObject { readonly amount: s_u128; } /** * For compatibility with Cosmos' {@link PubKey} */ export interface TypedPubKey extends Pubkey, JsonObject { readonly type: s_type; readonly value: s_base64; } /** * For compatibility with Cosmos' {@link StdSignature} */ export interface TypedStdSignature extends StdSignature, JsonObject { readonly pub_key: TypedPubKey; readonly signature: s_base64; } /** * For compatibility with Cosmos' {@link StdFee} */ export interface TypedStdFee extends StdFee, JsonObject { readonly amount: TypedCoin[]; readonly gas: s_u128; readonly granter?: s_addr; readonly payer?: s_addr; } /** * For compatibility with Cosmos' {@link AminoMsg} */ export interface TypedAminoMsg extends AminoMsg, JsonObject { readonly type: si_type; readonly value: g_value; } /** * For compatibility with Cosmos' {@link StdSignDoc} */ export interface TypedStdSignDoc = TypedStdFee> extends StdSignDoc, JsonObject { readonly chain_id: string; readonly account_number: s_u128; readonly sequence: s_u128; readonly fee: g_fee; readonly msgs: a_msgs; } /** * ADR-036 sign data */ export type Adr036MsgSignData = TypedAminoMsg<'sign/MsgSignData', { readonly signer: s_addr; readonly data: s_base64; }>; /** * ARD-036 sign document */ export interface Adr036SignDoc extends TypedStdSignDoc, JsonObject { readonly chain_id: ''; readonly account_number: CwUint128<'0'>; readonly sequence: CwUint128<'0'>; readonly fee: { readonly gas: CwUint128<'0'>; readonly amount: []; }; readonly msgs: [Adr036MsgSignData]; readonly memo: ''; } /** * For compatibility with Cosmos' {@link AminoSignResponse} */ export interface TypedAminoSignResponse = TypedStdFee, s_base64 extends string = CwBase64> extends AminoSignResponse, JsonObject { readonly signed: TypedStdSignDoc; readonly signature: TypedStdSignature; } /** * For compatibility with Cosmos' {@link StdTx} */ export interface TypedStdTx = TypedStdFee, a_sigs extends readonly TypedStdSignature[] = readonly TypedStdSignature[]> extends StdTx, JsonObject { readonly msg: a_msgs; readonly fee: g_fee; readonly signatures: a_sigs; readonly memo: string | undefined; } /** * Typed cosmos-sdk/StdTx */ export type AminoTx = TypedStdFee, a_sigs extends readonly TypedStdSignature[] = readonly TypedStdSignature[]> = TypedAminoMsg<'cosmos-sdk/StdTx', g_ext & TypedStdTx>; /** * Signed version of {@link AminoTx} */ export type SignedAminoTx = TypedStdFee, a_sigs extends readonly TypedStdSignature[] = readonly TypedStdSignature[]> = AminoTx<{ signatures: TypedStdSignature; }, a_msgs, g_fee, a_sigs>; /** * A signed Amino doc for CosmWasm verification */ export interface SignedAminoDoc extends JsonObject { readonly params: h_params & { readonly chain_id: string; }; readonly signature: TypedStdSignature; } //# sourceMappingURL=cosmos.d.ts.map