@firmachain/firma-js
Version:
The Official FirmaChain Javascript SDK written in Typescript
57 lines (56 loc) • 1.63 kB
TypeScript
import { Pagination } from "../common";
export interface CodeInfo {
code_id: string;
creator: string;
data_hash: string;
}
export interface CodeData {
code_info: CodeInfo;
data: string;
}
export interface ContractInfo {
address: string;
contract_info: {
code_id: string;
creator: string;
admin: string;
label: string;
created: {
block_height: string;
tx_index: string;
};
ibc_port_id: string;
extension: {
"@type": string;
};
};
}
export interface ContractHistoryInfo {
operation: string;
code_id: string;
updated: {
block_height: string;
tx_index: string;
};
msg: string;
}
export interface ContractStateInfo {
key: string;
value: string;
}
export declare class CosmWasmQueryClient {
private readonly axios;
constructor(baseUrl: string);
getCodeInfoList(): Promise<CodeInfo[]>;
getCodeData(codeId: string): Promise<CodeData>;
getContractListFromCodeId(codeId: string, paginationKey: string): Promise<{
dataList: string[];
pagination: Pagination;
}>;
getContractInfo(contractAddress: string): Promise<ContractInfo>;
getContractHistory(contractAddress: string): Promise<ContractHistoryInfo[]>;
getContractRawQueryData(contractAddress: string, hexString: string): Promise<string>;
getContractSmartQueryData(contractAddress: string, query: string): Promise<string>;
getContractState(contractAddress: string): Promise<ContractStateInfo[]>;
getPinnedCodeList(): Promise<string[]>;
}