///
import { BodyInit, Response } from 'node-fetch';
import { ReadStream } from 'fs';
import { Instantiable, InstantiableConfig } from '../../Instantiable.abstract';
import { URL } from 'whatwg-url';
export declare class WebServiceConnector extends Instantiable {
constructor(config: InstantiableConfig);
post(url: string, payload: BodyInit, headers?: {
[header: string]: string;
}): Promise;
get(url: string | URL, headers?: {
[header: string]: string;
}): Promise;
put(url: string, payload: BodyInit, headers?: {
[header: string]: string;
}): Promise;
delete(url: string, payload?: BodyInit, headers?: {
[header: string]: string;
}): Promise;
downloadFile(url: string, destination?: string, index?: number, headers?: {
[key: string]: string;
}): Promise;
private getFileResponse;
downloadUrl(url: string, headers?: any): Promise;
uploadMessage(url: string, data: string, encrypt?: boolean): Promise;
uploadFile(url: string, data: ReadStream, encrypt?: boolean): Promise;
fetchToken(url: string, grantToken: string, numberTries?: number): Promise;
fetchCID(cid: string): Promise;
private static getIPFSAuthToken;
private fetch;
private _sleep;
}