/** * @file Liqwid * @desc This file defines the constructor of the `Liqwid` class. * @hidden */ import { ethers } from 'ethers'; import * as eth from './eth'; import * as util from './util'; import * as lq from './lq'; import * as api from './api'; import { LiqwidInstance, LiqwidOptions, Provider } from './types'; /** * Creates an instance of the Liqwid SDK. * * @param {Provider | string} [provider] Optional Ethereum network provider. * Defaults to Ethers.js fallback mainnet provider. * @param {object} [options] Optional provider options. * * @example * ``` * const liqwid = new Liqwid(window.ethereum) // web browser * * const liqwid = new Liqwid('http://127.0.0.1:8545') // HTTP provider * * const liqwid = new Liqwid() // Uses Ethers.js fallback mainnet (for testing only) * * const liqwid = new Liqwid('ropsten') // Uses Ethers.js fallback (for testing only) * * // Init with private key (server side) * const liqwid = new Liqwid('https://mainnet.infura.io/v3/_your_project_id_', { * privateKey: '0x_your_private_key_', // preferably with environment variable * }) * * // Init with HD mnemonic (server side) * const liqwid = new Liqwid('mainnet' { * mnemonic: 'clutch captain shoe...', // preferably with environment variable * }) * ``` *_network * @returns {object} Returns an instance of the Liqwid SDK. */ declare const Liqwid: { (provider?: Provider | string, options?: LiqwidOptions): LiqwidInstance; eth: typeof eth; api: typeof api; util: typeof util; ethers: typeof ethers; decimals: { qLQ: number; qADA: number; LQ: number; ADA: number; USDC: number; }; lq: { getBalance: typeof lq.getBalance; getAccrued: typeof lq.getAccrued; }; }; export = Liqwid;