UNPKG

send-crypto

Version:

A minimal JavaScript library / wallet for sending crypto assets

33 lines (32 loc) 1.46 kB
import BigNumber from "bignumber.js"; import { Overrides } from "ethers"; import { PromiEvent } from "../../lib/promiEvent"; import { Asset, Handler } from "../../types/types"; interface ConstructorOptions { infuraKey?: string; ethereumNode?: string; } interface AddressOptions { } interface BalanceOptions extends AddressOptions { address?: string; confirmations?: number; } interface TxOptions extends Overrides { subtractFee?: boolean; } export declare class ETHHandler implements Handler<ConstructorOptions, AddressOptions, BalanceOptions, TxOptions> { private readonly privateKey; private readonly network; private readonly decimals; private readonly unlockedAddress; private readonly sharedState; constructor(privateKey: string, network: string, options?: ConstructorOptions, sharedState?: any); readonly handlesAsset: (asset: Asset) => boolean; readonly address: (asset: Asset, options?: AddressOptions | undefined) => Promise<string>; readonly getBalance: (asset: Asset, options?: BalanceOptions | undefined) => Promise<BigNumber>; readonly getBalanceInSats: (asset: Asset, options?: BalanceOptions | undefined) => Promise<BigNumber>; readonly send: (to: string, value: BigNumber, asset: Asset, options?: TxOptions | undefined) => PromiEvent<string>; readonly sendSats: (to: string, valueIn: BigNumber, asset: Asset, optionsIn?: TxOptions | undefined) => PromiEvent<string>; } export {};