/** * Shared helpers for fundWalletFromP2PKHOutpoints. * Used by both Setup (Node) and SetupClient (browser/isomorphic). */ import { Beef, BEEF, CreateActionResult, LockingScript, PublicKey, ScriptTemplateUnlock, SignableTransaction, Transaction, WalletInterface } from '@bsv/sdk'; import { KeyPairAddress } from './SetupWallet'; export interface ParsedOutpoint { outpoint: string; txid: string; vout: number; } /** Strictly parse an outpoint string into txid and vout components. */ export declare function parseOutpoint(s: string): ParsedOutpoint; /** Parse raw hex into a Transaction and assert its hash matches the expected txid. */ export declare function parseTxAndAssertId(rawHex: string, expectedTxid: string): Transaction; /** Verify that a locking script is standard P2PKH and its hash160 matches the given public key. */ export declare function verifyP2PKHOwnership(lockingScript: LockingScript, publicKey: PublicKey): void; /** @internal */ export declare function resolveAutoSigned(car: CreateActionResult, txid: string, vout: number): string; /** @internal */ export declare function signAndComplete(wallet: WalletInterface, st: SignableTransaction, txid: string, vout: number, satoshis: number, p2pkhKey: KeyPairAddress, getUnlockP2PKH: (priv: KeyPairAddress['privateKey'], satoshis: number) => ScriptTemplateUnlock): Promise; /** @internal */ export declare function importSingleOutpoint(wallet: WalletInterface, beef: Beef, beefBin: BEEF, parsed: ParsedOutpoint, p2pkhKey: KeyPairAddress, getUnlockP2PKH: (priv: KeyPairAddress['privateKey'], satoshis: number) => ScriptTemplateUnlock): Promise; /** * Funds a BRC-100 wallet by importing P2PKH UTXOs. * * Accepts outpoints + a P2PKH key pair, optionally with a pre-built BEEF. * If no BEEF is provided, one is built via buildBeefForOutpoints. */ export declare function fundWalletFromP2PKHOutpoints(wallet: WalletInterface, outpoints: string[], p2pkhKey: KeyPairAddress, getUnlockP2PKH: (priv: KeyPairAddress['privateKey'], satoshis: number) => ScriptTemplateUnlock, inputBEEF?: BEEF): Promise>; /** * Builds a valid BEEF for the given outpoints by recursively fetching * parent transactions until all paths lead to confirmed ancestors * with merkle proofs. * * This solves the common case where legacy wallets (HandCash, ElectrumSV) * create chains of unconfirmed transactions — standard BEEF construction * fails because the proof chain is incomplete. * * @internal */ export declare function buildBeefForOutpoints(outpoints: string[], maxDepth?: number): Promise; //# sourceMappingURL=fundWalletP2PKH.d.ts.map