import { ApiPromise } from "@polkadot/api"; import { ElectrsAPI } from "../external/electrs"; import { u32 } from "@polkadot/types/primitive"; import { H256Le } from "../interfaces/default"; export declare const DEFAULT_STABLE_CONFIRMATIONS = 6; /** * @category PolkaBTC Bridge */ export interface BTCRelayAPI { /** * @returns A global security parameter: the required block confirmations * for a transaction to be considered stable on Bitcoin */ getStableBitcoinConfirmations(): Promise; /** * @returns A global security parameter: the required block confirmations * for a transaction to be considered stable on the parachain */ getStableParachainConfirmations(): Promise; /** * @returns The raw transaction data, represented as a Buffer object */ getLatestBlock(): Promise; /** * @returns The height of the latest Bitcoin block that was rekayed by the BTC-Relay */ getLatestBlockHeight(): Promise; /** * Verifies the inclusion of a transaction with `txid` in the Bitcoin blockchain * * @param txid The ID of a Bitcoin transaction * @param confirmations The number of block confirmations needed to accept the inclusion proof. * This parameter is only used if the `insecure` parameter is set to `true`. */ verifyTransactionInclusion(txid: string, confirmations?: number, insecure?: boolean): Promise; } export declare class DefaultBTCRelayAPI implements BTCRelayAPI { private api; private electrsAPI; constructor(api: ApiPromise, electrsAPI: ElectrsAPI); getStableBitcoinConfirmations(): Promise; getStableParachainConfirmations(): Promise; getLatestBlock(): Promise; getLatestBlockHeight(): Promise; verifyTransactionInclusion(txid: string, confirmations?: number): Promise; }