import { Bech32Address, GeneralSigned, SigObj } from "@sign/core"; import { BaseAccount, ModuleAccount } from "../codegen/cosmos/auth/v1beta1/auth"; import { BaseVestingAccount, ContinuousVestingAccount, DelayedVestingAccount, PeriodicVestingAccount } from "../codegen/cosmos/vesting/v1beta1/vesting"; import { Any } from "../codegen/google/protobuf/any"; import { TelescopeGeneratedType } from "../codegen/types"; import { TxResponse } from "./tendermint"; export interface AbciQueryRpc { request: (service: string, method: string, data: Uint8Array) => Promise; } export interface BroadcastRpc { request: (method: string, data: Uint8Array) => Promise; } export type AccountType = BaseAccount | ModuleAccount | BaseVestingAccount | ContinuousVestingAccount | DelayedVestingAccount | PeriodicVestingAccount; export interface AccountData { accountNumber: bigint; sequence: bigint; chainId: string; address: Bech32Address; } export interface SignerData { accountNumber: bigint; sequence: bigint; chainId: string; } export interface Signed extends GeneralSigned { broadcast: (checkTx?: boolean, deliverTx?: boolean) => Promise; } export interface AminoConverter { aminoType: string; toAmino: (value: any) => any; fromAmino: (value: any) => any; } export type TypeUrl = string; export type Registry = Array<[TypeUrl, TelescopeGeneratedType]>; export interface Parser extends TelescopeGeneratedType { amino?: AminoConverter; } export type EncodeObject = Message; export interface Message { typeUrl: string; value: T; } export interface SignerOptions { hash?: (msg: Uint8Array) => Uint8Array; signatureConverter?: { toSignature: (sigObj: SigObj) => Uint8Array; fromSignature: (signature: Uint8Array) => SigObj; }; encodePubKey?: (pubkey: Uint8Array) => Any; }