/** * @packageDocumentation * @module API-Index */ import LuxCore from "../../lux"; import { JRPCAPI } from "../../common/jrpcapi"; import { GetLastAcceptedResponse, GetContainerByIndexResponse, GetContainerByIDResponse, GetContainerRangeResponse, IsAcceptedResponse } from "./interfaces"; /** * Class for interacting with a node's IndexAPI. * * @category RPCAPIs * * @remarks This extends the [[JRPCAPI]] class. This class should not be directly called. Instead, use the [[Lux.addAPI]] function to register this interface with Lux. */ export declare class IndexAPI extends JRPCAPI { /** * Get last accepted tx, vtx or block * * @param encoding * @param baseURL * * @returns Returns a Promise GetLastAcceptedResponse. */ getLastAccepted: (encoding?: string, baseURL?: string) => Promise; /** * Get container by index * * @param index * @param encoding * @param baseURL * * @returns Returns a Promise GetContainerByIndexResponse. */ getContainerByIndex: (index?: string, encoding?: string, baseURL?: string) => Promise; /** * Get contrainer by ID * * @param id * @param encoding * @param baseURL * * @returns Returns a Promise GetContainerByIDResponse. */ getContainerByID: (id?: string, encoding?: string, baseURL?: string) => Promise; /** * Get container range * * @param startIndex * @param numToFetch * @param encoding * @param baseURL * * @returns Returns a Promise GetContainerRangeResponse. */ getContainerRange: (startIndex?: number, numToFetch?: number, encoding?: string, baseURL?: string) => Promise; /** * Get index by containerID * * @param id * @param encoding * @param baseURL * * @returns Returns a Promise GetIndexResponse. */ getIndex: (id?: string, encoding?: string, baseURL?: string) => Promise; /** * Check if container is accepted * * @param id * @param encoding * @param baseURL * * @returns Returns a Promise GetIsAcceptedResponse. */ isAccepted: (id?: string, encoding?: string, baseURL?: string) => Promise; /** * This class should not be instantiated directly. Instead use the [[Lux.addAPI]] method. * * @param core A reference to the Lux class * @param baseURL Defaults to the string "/ext/index/X/tx" as the path to rpc's baseURL */ constructor(core: LuxCore, baseURL?: string); } //# sourceMappingURL=api.d.ts.map