UNPKG

@glitterprotocol/glitter-sdk

Version:

The JavaScript SDK for Glitter

52 lines (51 loc) 1.47 kB
import { APIRequester } from './APIRequester'; import { AuthAPI, TendermintAPI, BankAPI, TxAPI } from './api'; import { Db } from './Db'; import { Numeric } from '../../core/numeric'; import { Coins } from '../../core/Coins'; import { Key } from '../../key'; import { DatasetAPI } from './api/DatasetAPI'; export interface LCDClientConfig { /** * The base URL to which LCD requests will be made. */ URL: string; rpcURL?: string; /** * Chain ID of the blockchain to connect to. */ chainID: string; /** * Coins representing the default gas prices to use for fee estimation. */ gasPrices?: Coins.Input; /** * Number presenting the default gas adjustment value to use for fee estimation. */ gasAdjustment?: Numeric.Input; /** * is it connected to forked network? */ isClassic?: boolean; } /** * An object repesenting a connection to a glittered node running the Lite Client Daemon (LCD) * server, a REST server providing access to a node. */ export declare class LCDClient { config: LCDClientConfig; apiRequester: APIRequester; auth: AuthAPI; bank: BankAPI; dataset: DatasetAPI; tendermint: TendermintAPI; tx: TxAPI; /** * Creates a new LCD client with the specified configuration. * * @param config LCD configuration */ constructor(config: LCDClientConfig); /** Creates a new Db with the Key. */ db(key: Key): Db; }