import { TxOutpoint } from "../contracts/utils/txUtil"; import { bitcoinjs, btc } from "./btc"; import { SupportedNetwork } from "./constants"; import { Network, Psbt, TxInput } from "bitcoinjs-lib"; import { ByteString, Ripemd160, UTXO } from "scrypt-ts"; export type Optional = Omit & Partial; export declare function toTxOutpoint(txid: string, outputIndex: number): TxOutpoint; export declare function outpoint2TxOutpoint(outpoint: string): TxOutpoint; export declare const outpoint2ByteString: (outpoint: string) => string; export declare function scriptToP2tr(script: Buffer): { p2trLockingScript: string; tapScript: string; cblock: string; }; export declare function toBitcoinNetwork(network: SupportedNetwork): Network; export declare function p2trLockingScriptToAddr(p2tr: string, network?: SupportedNetwork): string; export declare function addrToP2trLockingScript(address: string | btc.Address): string; export declare function xPubkeyToP2trLockingScript(xPubkey: string): btc.Script; export declare function xPubkeyToAddr(xPubkey: string, network?: SupportedNetwork): string; export declare function toPsbt(tx: btc.Transaction): bitcoinjs.Psbt; export declare function toPsbtHex(tx: btc.Transaction): string; export declare function toXOnly(pubKeyHex: string, isP2TR: boolean): string; export declare function pubKeyPrefix(pubKeyHex: string): string; export declare function getUnfinalizedTxId(psbt: Psbt): string; export declare function getDummyAddress(): btc.Address; export declare function getDummyUtxo(address?: string, satoshis?: number): UTXO; export declare function getDummyUtxos(address: string, count: number, satoshis?: number): UTXO[]; export declare function toBtcTransaction(psbt: bitcoinjs.Psbt, isFinalized?: boolean): btc.Transaction; export declare function validteSupportedAddress(address: string): btc.Address; export declare function toTokenAddress(address: btc.Address | string): Ripemd160; export declare function getTxId(input: TxInput): string; export declare function sleep(seconds: number): Promise; export declare function dummySig(psbt: Psbt, address: string): void; export declare function uint8ArrayToHex(uint8Array: Uint8Array): ByteString; export declare function hexToUint8Array(hexString: string): Uint8Array; export declare function witnessStackToScriptWitness(witness: Uint8Array[]): Uint8Array; export declare function isTaprootInput(input: any): boolean; export declare function isFinalized(input: any): boolean; export declare function isP2TR(scriptOrAddr: Buffer | string): boolean; export declare function isP2WPKH(scriptOrAddr: Buffer | string): boolean; export declare function script2Addr(script: Buffer): string; //# sourceMappingURL=utils.d.ts.map