{"version":3,"file":"signing-Bnsro0hE.cjs","sources":["../src/tbv/core/utils/signing.ts"],"sourcesContent":["import type { SignPsbtOptions } from \"../../../shared/wallets/interfaces\";\n\n/**\n * Create SignPsbtOptions for Taproot script-path PSBT signing.\n *\n * All vault protocol signing operations are Taproot script-path spends that\n * require `useTweakedSigner: false` (untweaked key) and `autoFinalized: false`\n * (to preserve tapScriptSig for Schnorr signature extraction).\n *\n * @param publicKey - Signer's BTC public key (hex). Accepts both compressed\n *   (66-char) and x-only (64-char) formats — the wallet connector handles both.\n * @param inputCount - Number of inputs to sign. Generates entries\n *   for indices 0 through inputCount-1.\n */\nexport function createTaprootScriptPathSignOptions(\n  publicKey: string,\n  inputCount: number,\n): SignPsbtOptions {\n  if (!Number.isInteger(inputCount) || inputCount < 1) {\n    throw new Error(`inputCount must be a positive integer, got ${inputCount}`);\n  }\n\n  return {\n    autoFinalized: false,\n    signInputs: Array.from({ length: inputCount }, (_, i) => ({\n      index: i,\n      publicKey,\n      useTweakedSigner: false,\n    })),\n  };\n}\n"],"names":["createTaprootScriptPathSignOptions","publicKey","inputCount","_","i"],"mappings":"aAcO,SAASA,EACdC,EACAC,EACiB,CACjB,GAAI,CAAC,OAAO,UAAUA,CAAU,GAAKA,EAAa,EAChD,MAAM,IAAI,MAAM,8CAA8CA,CAAU,EAAE,EAG5E,MAAO,CACL,cAAe,GACf,WAAY,MAAM,KAAK,CAAE,OAAQA,GAAc,CAACC,EAAGC,KAAO,CACxD,MAAOA,EACP,UAAAH,EACA,iBAAkB,EAAA,EAClB,CAAA,CAEN"}