UNPKG

thorchain.js

Version:

Thorchain.js is a libary that lets you interact with mutiple blockchains perform swaps, etc

25 lines (24 loc) 882 B
import { TxHash, Network } from "@xchainjs/xchain-client"; import { Client as ThorClient, ChainIds } from "@xchainjs/xchain-thorchain"; import { Chain, AssetAmount, BaseAmount } from "@xchainjs/xchain-util"; export interface IThorChain { getClient(): ThorClient; } export declare class ThorChain implements IThorChain { chain: Chain; client: ThorClient; constructor({ network, phrase, chainIds, }: { network?: Network; phrase: string; chainIds: ChainIds; }); getClient(): ThorClient; get getAddress(): string; getBalance(address?: string): Promise<Error | { base: any; asset: string; }>; assetToBase(amount: number): AssetAmount | Error; baseToAsset(amount: BaseAmount): AssetAmount; transfer(baseAmount: BaseAmount, receiver: string, memo?: string): Promise<TxHash>; }