@helium/http
Version:
HTTP library for interacting with the Helium blockchain API
75 lines • 2.52 kB
TypeScript
import Network from './Network';
import Transactions from './resources/Transactions';
import Blocks from './resources/Blocks';
import Accounts from './resources/Accounts';
import Hotspots from './resources/Hotspots';
import Challenges from './resources/Challenges';
import Stats from './resources/Stats';
import Vars from './resources/Vars';
import Oracle from './resources/Oracle';
import PendingTransactions from './resources/PendingTransactions';
import type Account from './models/Account';
import type Block from './models/Block';
import type Hotspot from './models/Hotspot';
import Elections from './resources/Elections';
import Cities from './resources/Cities';
import City from './models/City';
import Validators from './resources/Validators';
import Validator from './models/Validator';
import StateChannels from './resources/StateChannels';
import Rewards from './resources/Rewards';
import Locations from './resources/Locations';
interface AccountFromAddressFn {
(address: string): Account;
}
interface CityFromIdFn {
(cityId: string): City;
}
interface HotspotFromAddressFn {
(address: string): Hotspot;
}
interface ValidatorFromAddressFn {
(address: string): Validator;
}
interface BlockFromHeightOrHashFn {
(heightOrHash: number | string): Block;
}
interface Options {
name?: string;
userAgent?: string;
retry?: number;
headers?: Record<string, string>;
}
export default class Client {
network: Network;
name?: string;
userAgent?: string;
retry: number;
private axios;
constructor(network?: Network, options?: Options);
get accounts(): Accounts;
get account(): AccountFromAddressFn;
get blocks(): Blocks;
get block(): BlockFromHeightOrHashFn;
get transactions(): Transactions;
get hotspots(): Hotspots;
get validators(): Validators;
get elections(): Elections;
get hotspot(): HotspotFromAddressFn;
get validator(): ValidatorFromAddressFn;
get challenges(): Challenges;
get stateChannels(): StateChannels;
get pendingTransactions(): PendingTransactions;
get stats(): Stats;
get vars(): Vars;
get oracle(): Oracle;
get cities(): Cities;
get city(): CityFromIdFn;
get rewards(): Rewards;
get locations(): Locations;
private get clientOptions();
get(path: string, params?: Object): Promise<import("axios").AxiosResponse<any>>;
post(path: string, params?: Object): Promise<import("axios").AxiosResponse<any>>;
}
export {};
//# sourceMappingURL=Client.d.ts.map