postchain-client
Version:
Client library for accessing a Postchain node through REST.
19 lines (18 loc) • 1.2 kB
TypeScript
import { FailOverConfig, RestClientCallback } from "./types";
import { RestClient } from "./interfaces";
import { RawGtv } from "../gtv/types";
export declare function createRestClient(endpointPool: readonly string[], blockchainRid: string, maxSockets?: number, pollingInterval?: number, failOverConfig?: FailOverConfig, unreachableDuration?: number, useStickyNode?: boolean): RestClient;
/**
* @param error response error
* @param statusCode response status code
* @param responseObject the responsebody from the server
* @param callback the callback function to propagate the error and response back to the caller
*/
export declare function handleGetResponse(error: Error | null, statusCode: number | null, responseObject: RawGtv | null | undefined, callback: RestClientCallback<RawGtv>): void;
/**
* @param error response error
* @param statusCode response status code
* @param responseObject the responsebody from the server
* @param callback the callback function to propagate the error and response back to the caller
*/
export declare function handlePostResponse(error: Error | null, statusCode: number | null, responseObject: RawGtv | null, callback: RestClientCallback<RawGtv>): void;