import { IBinaryReader, IBinaryWriter } from "./binary.js"; import { Any } from "./google/protobuf/any.js"; import { DeliverTxResponse } from "@interchainjs/types"; //#region src/types.d.ts type ProtoMsg = Omit & { typeUrl: any; }; interface IAminoMsg { type: any; value: Amino; } interface IProtoType { $typeUrl?: any; } /** * A type generated by Telescope 1.0. */ interface TelescopeGeneratedCodec { readonly typeUrl: string; readonly aminoType?: string; is?(o: unknown): o is T; isSDK?(o: unknown): o is SDK; isAmino?(o: unknown): o is Amino; encode: (message: T, writer?: IBinaryWriter | any) => IBinaryWriter | any; decode: (input: IBinaryReader | Uint8Array | any, length?: number) => T; fromPartial: (object: any) => T | any; fromJSON?: (object: any) => T | any; toJSON?: (message: T | any) => any; fromSDK?: (sdk: SDK) => T; fromSDKJSON?: (object: any) => SDK; toSDK?: (message: T) => SDK; fromAmino?: (amino: Amino) => T; toAmino?: (message: T) => Amino; fromAminoMsg?: (aminoMsg: IAminoMsg) => T; toAminoMsg?: (message: T) => IAminoMsg; toProto?: (message: T) => Uint8Array; fromProtoMsg?: (message: ProtoMsg) => T; toProtoMsg?: (message: T) => Any; registerTypeUrl?: () => void; } type TelescopeGeneratedType = TelescopeGeneratedCodec; type GeneratedType = TelescopeGeneratedCodec; /** * Coin defines a token with a denomination and an amount. * * NOTE: The amount field is an Int which implements the custom method * signatures required by gogoproto. */ interface Coin { denom: string; amount: string; } type EncodeObject = Message; interface Message { typeUrl: string; value: T; } interface StdFee { amount: Coin[]; gas: string; /** The granter address that is used for paying with feegrants */ granter?: string; /** The fee payer address. The payer must have signed the transaction. */ payer?: string; } interface TxRpc { request(service: string, method: string, data: Uint8Array): Promise; signAndBroadcast?(signerAddress: string, messages: EncodeObject[], fee: StdFee | "auto" | number, memo: string): Promise; } //#endregion export { type DeliverTxResponse, EncodeObject, GeneratedType, IAminoMsg, IProtoType, Message, ProtoMsg, StdFee, TelescopeGeneratedCodec, TelescopeGeneratedType, TxRpc };