UNPKG

@interlay/interbtc

Version:

JavaScript library to interact with InterBTC

18 lines (17 loc) 911 B
import { BitcoinNetwork, InterBtcApi } from "@interlay/interbtc-api"; import { AddressOrPair } from "@polkadot/api/types"; import { WrappedIndexAPI } from "./interbtcIndex"; import { ApiPromise } from "@polkadot/api"; export declare const INDEX_LOCAL_URL = "http://localhost:3007"; export declare function createInterbtc(endpoint: string, network?: BitcoinNetwork, indexEndpoint?: string, account?: AddressOrPair, autoConnect?: number | false | undefined): Promise<InterBtc>; export interface InterBtc { readonly polkadotApi: ApiPromise; readonly interBtcApi: InterBtcApi; readonly interBtcIndex: WrappedIndexAPI; } export declare class DefaultInterBtc implements InterBtc { readonly polkadotApi: ApiPromise; readonly interBtcApi: InterBtcApi; readonly interBtcIndex: WrappedIndexAPI; constructor(polkadotApi: ApiPromise, interBtcApi: InterBtcApi, interBtcIndex: WrappedIndexAPI); }