import { QueryAllContractStateResponse, QueryCodeResponse, QueryCodesResponse, QueryContractHistoryResponse, QueryContractInfoResponse, QueryContractsByCodeResponse, QueryRawContractStateResponse } from "@shareledgerjs/types/cosmwasm/wasm/v1/query"; import { BaseClient } from "../../baseclient"; /** * An object containing a parsed JSON document. The result of JSON.parse(). * This doesn't provide any type safety over `any` but expresses intent in the code. * * This type is returned by `queryContractSmart`. */ export type JsonObject = any; export interface WasmQueryExtensionMethods { codes(paginationKey?: Uint8Array): Promise; /** * Downloads the original wasm bytecode by code ID. * * Throws an error if no code with this id */ code(id: number): Promise; contractsByCode(id: number, paginationKey?: Uint8Array): Promise; /** * Returns null when contract was not found at this address. */ contractInfo(address: string): Promise; /** * Returns null when contract history was not found for this address. */ contractHistory(address: string, paginationKey?: Uint8Array): Promise; /** * Returns all contract state. * This is an empty array if no such contract, or contract has no data. */ allContractState(address: string, paginationKey?: Uint8Array, height?: number): Promise; /** * Returns the data at the key if present (unknown decoded json), * or null if no data at this (contract address, key) pair */ rawContractState(address: string, key: Uint8Array, height?: number): Promise; /** * Makes a smart query on the contract and parses the response as JSON. * Throws error if no such contract exists, the query format is invalid or the response is invalid. */ smartContractState(address: string, query: Q, height?: number): Promise; } export interface WasmQueryExtension { readonly wasm: WasmQueryExtensionMethods; } export declare function WasmQueryExtension(constructor: T): T;