import * as btc from '@scure/btc-signer'; import { TransactionInput } from '@scure/btc-signer/psbt'; import { BufferCV, ClarityValue, SomeCV, UIntCV } from '@stacks/transactions'; export type MempoolApiUtxo = { txid: string; vout: number; value: number; status?: { confirmed: boolean; block_height: number; }; }; export type UtxoWithTx = MempoolApiUtxo & { tx: string | Promise; }; export type SpendableUtxo = MempoolApiUtxo & { input: TransactionInput | Promise; vsize?: number | Promise; }; export type MempoolFeeEstimates = { fastestFee: number; halfHourFee: number; hourFee: number; }; export type SbtcApiNotifyResponse = { bitcoinTxid: string; bitcoinTxOutputIndex: number; recipient: string; amount: number; lastUpdateHeight: number; lastUpdateBlockHash: string; status: string; statusMessage: string; parameters: { maxFee: number; lockTime: number; }; reclaimScript: string; depositScript: string; }; export interface BaseClientConfig { sbtcContract: string; btcApiUrl: string; stxApiUrl: string; sbtcApiUrl: string; } export declare class SbtcApiClient { config: BaseClientConfig; constructor(config: BaseClientConfig); fetchUtxos(address: string): Promise; fetchTxHex(txid: string): Promise; fetchFeeRates(): Promise; fetchFeeRate(target: 'low' | 'medium' | 'high'): Promise; broadcastTx(tx: btc.Transaction): Promise; notifySbtc({ depositScript, reclaimScript, vout, transaction, }: { depositScript: string; reclaimScript: string; vout?: number; transaction: btc.Transaction | string; }): Promise; fetchSignersPublicKey(contractAddress?: string): Promise; fetchSignersAddress(contractAddress?: string): Promise; fetchCallReadOnly({ contractAddress, functionName, args, sender, }: { contractAddress: string; functionName: string; args?: ClarityValue[]; sender?: string; }): Promise | import("@stacks/transactions").ResponseOkCV | import("@stacks/transactions").NoneCV | SomeCV | import("@stacks/transactions").ListCV | import("@stacks/transactions").TupleCV> | import("@stacks/transactions").StringAsciiCV | import("@stacks/transactions").StringUtf8CV>; fetchBalance(address: string): Promise; fetchSbtcBalance(stacksAddress: string): Promise; fetchDeposit(txid: string): Promise; fetchDeposit({ txid, vout, }: { txid: string; vout: number; }): Promise; } export declare class SbtcApiClientMainnet extends SbtcApiClient { constructor(config?: Partial); } export declare class SbtcApiClientTestnet extends SbtcApiClient { constructor(config?: Partial); } export declare class SbtcApiClientDevenv extends SbtcApiClient { constructor(config?: Partial); } export declare function sleep(ms: number): Promise;