/** @module http-client */ import { BaseCommand, FindTransactionsCommand, GetBalancesCommand, GetInclusionStatesCommand, GetTrytesCommand, Provider } from '../../types'; import { Settings } from './settings'; export interface MapsToArrays { [key: string]: any[]; } export declare type BatchableCommand = C & MapsToArrays & (FindTransactionsCommand | GetBalancesCommand | GetInclusionStatesCommand | GetTrytesCommand); export interface BatchableKeys { readonly [key: string]: string[]; } export declare type BatchableKey = 'addresses' | 'approvees' | 'bundles' | 'tags' | 'tips' | 'transactions' | 'hashes'; export declare const batchableKeys: BatchableKeys; export declare const isBatchableCommand: (command: BaseCommand) => command is BatchableCommand; export declare const getKeysToBatch: (command: BatchableCommand, batchSize?: number) => readonly string[]; /** * This method creates an HTTP client that you can use to send requests to the [IRI API endpoints](https://docs.iota.org/docs/node-software/0.1/iri/references/api-reference). * * ## Related methods * * To send requests to the IRI node, use the [`send()`]{@link #module_http-client.send} method. * * @method createHttpClient * * @summary Creates an HTTP client to access the IRI API. * * @memberof module:http-client * * @param {Object} [settings={}] * @param {String} [settings.provider=http://localhost:14265] URI of an IRI node to connect to * @param {String | number} [settings.apiVersion=1] - IOTA API version to be sent in the `X-IOTA-API-Version` header. * @param {number} [settings.requestBatchSize=1000] - Number of search values per request * * @example * ```js * let settings = { * provider: 'http://mynode.eu:14265' * } * * let httpClient = HttpClient.createHttpClient(settings); * ``` * * @return HTTP client object */ export declare const createHttpClient: (settings?: Partial | undefined) => Provider;