UNPKG

@simbachain/simbats

Version:
76 lines 3.08 kB
import { AxiosResponse } from "axios"; import { RequestHandler } from "./request_handler"; import { ParamCheckingContract } from "./param_checking_contract"; import { Simba } from "./simba"; /** * Main class for submitting contract methods */ export declare class SimbaContract extends ParamCheckingContract { baseApiURL: string; appName: string; contractName: string; contractURI: string; syncContractURI: string; metadata: Record<any, any>; paramsRestricted: Record<any, any> | null; requestHandler: RequestHandler; simba: Simba; constructor(baseApiURL: string, appName: string, contractName: string); /** * returns past invocations of contract method calls for methodName * @param methodName * @returns {Promise<AxiosResponse<any> | Record<any, any>>} */ callMethod(methodName: string): Promise<AxiosResponse<any> | Record<any, any>>; /** * invokes methodName * @param methodName * @param inputs * @param filePaths * @param validateParams * @returns {Promise<AxiosResponse<any> | Record<any, any>>} */ submitMethod(methodName: string, inputs?: Record<any, any>, filePaths?: Array<string>, validateParams?: boolean): Promise<AxiosResponse<any> | Record<any, any>>; /** * returns transactions for methodName * @param methodName * @param queryParams * @returns {Promise<AxiosResponse<any> | Record<any, any>>} */ getTransactionsByMethod(methodName: string, queryParams?: Record<any, any>): Promise<AxiosResponse<any> | Record<any, any>>; /** * returns events for eventName * @param eventName * @param queryParams * @returns {Promise<AxiosResponse<any> | Record<any, any>>} */ getEvents(eventName: string, queryParams?: Record<any, any>): Promise<AxiosResponse<any> | Record<any, any>>; /** * validate bundleHash * @param bundleHash * @returns {Promise<AxiosResponse<any> | Record<any, any> | void>} */ validateBundleHash(bundleHash: string): Promise<AxiosResponse<any> | Record<any, any> | void>; /** * get bundle from bundleHash * @param bundleHash * @param downloadLocation * @returns {Promise<AxiosResponse<any> | Record<any, any> | void | unknown>} */ getBundle(bundleHash: string, downloadLocation: string): Promise<AxiosResponse<any> | Record<any, any> | void | unknown>; /** * get file from bundleHash * @param bundleHash * @param fileName * @param downloadLocation * @returns {Promise<AxiosResponse<any> | Record<any, any> | void | unknown>} */ getBundleFile(bundleHash: string, fileName: string, downloadLocation: string): Promise<AxiosResponse<any> | Record<any, any> | void | unknown>; /** * get manifest from bundleHash * @param bundleHash * @returns {Promise<AxiosResponse<any> | Record<any, any> | void>} */ getManifestFromBundleHash(bundleHash: string): Promise<AxiosResponse<any> | Record<any, any> | void>; } //# sourceMappingURL=simba_contract.d.ts.map