@glif/filecoin-rpc-client
Version:
a convenience library for interacting with the Lotus jsonrpc
20 lines • 822 B
TypeScript
import { AxiosRequestConfig, AxiosRequestHeaders } from 'axios';
export declare const removeEmptyHeaders: (headers: AxiosRequestHeaders) => AxiosRequestHeaders;
export declare const getHeaders: (headers?: AxiosRequestHeaders, token?: string) => AxiosRequestHeaders;
export declare const throwIfErrors: (data: any) => void;
export type LotusRpcEngineConfig = {
apiAddress: string;
token?: string;
namespace?: string;
delimeter?: string;
axiosOpts?: AxiosRequestConfig;
};
export default class LotusRpcEngine {
readonly apiAddress: string;
readonly namespace: string;
readonly delimeter: string;
readonly axiosOpts: AxiosRequestConfig;
constructor(config: LotusRpcEngineConfig);
request<A = any>(method: string, ...params: any[]): Promise<A>;
}
//# sourceMappingURL=index.d.ts.map