@babylonlabs-io/ts-sdk 5.0.1 → 6.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (73) hide show
  1. package/dist/{PayoutManager-C3p_cNHQ.cjs → PayoutManager-B5nR0x1t.cjs} +2 -2
  2. package/dist/{PayoutManager-C3p_cNHQ.cjs.map → PayoutManager-B5nR0x1t.cjs.map} +1 -1
  3. package/dist/{PayoutManager-CkZ3mGXB.js → PayoutManager-BHeiLQ1j.js} +2 -2
  4. package/dist/{PayoutManager-CkZ3mGXB.js.map → PayoutManager-BHeiLQ1j.js.map} +1 -1
  5. package/dist/{PeginManager-tP0Y-UCv.cjs → PeginManager-6ghglb4r.cjs} +2 -2
  6. package/dist/{PeginManager-tP0Y-UCv.cjs.map → PeginManager-6ghglb4r.cjs.map} +1 -1
  7. package/dist/{PeginManager-BvDlBR13.js → PeginManager-CXNqbgA4.js} +4 -4
  8. package/dist/{PeginManager-BvDlBR13.js.map → PeginManager-CXNqbgA4.js.map} +1 -1
  9. package/dist/{buildAndBroadcastReclaim-rUsFRC5H.js → buildAndBroadcastReclaim-Bs_zdDGN.js} +811 -732
  10. package/dist/{buildAndBroadcastReclaim-rUsFRC5H.js.map → buildAndBroadcastReclaim-Bs_zdDGN.js.map} +1 -1
  11. package/dist/{buildAndBroadcastReclaim-DtmMg096.cjs → buildAndBroadcastReclaim-CXOMHHgK.cjs} +2 -2
  12. package/dist/{buildAndBroadcastReclaim-DtmMg096.cjs.map → buildAndBroadcastReclaim-CXOMHHgK.cjs.map} +1 -1
  13. package/dist/{challengeAssert-ea0EmRKe.cjs → challengeAssert-CuX_8Twt.cjs} +2 -2
  14. package/dist/{challengeAssert-ea0EmRKe.cjs.map → challengeAssert-CuX_8Twt.cjs.map} +1 -1
  15. package/dist/{challengeAssert-CVxCGwBH.js → challengeAssert-D_lRvsO0.js} +2 -2
  16. package/dist/{challengeAssert-CVxCGwBH.js.map → challengeAssert-D_lRvsO0.js.map} +1 -1
  17. package/dist/index.cjs +1 -1
  18. package/dist/index.js +103 -99
  19. package/dist/peginState-B4t_PDgj.cjs +2 -0
  20. package/dist/peginState-B4t_PDgj.cjs.map +1 -0
  21. package/dist/{peginState-CIibG9S_.js → peginState-CXdbSit3.js} +7 -7
  22. package/dist/peginState-CXdbSit3.js.map +1 -0
  23. package/dist/{reservation-BZQABu4g.js → reservation-BAj5n-H_.js} +2 -2
  24. package/dist/{reservation-BZQABu4g.js.map → reservation-BAj5n-H_.js.map} +1 -1
  25. package/dist/{reservation-CA5knoQ0.cjs → reservation-D9ftyiwP.cjs} +2 -2
  26. package/dist/{reservation-CA5knoQ0.cjs.map → reservation-D9ftyiwP.cjs.map} +1 -1
  27. package/dist/tbv/core/clients/eth/types.d.ts +1 -1
  28. package/dist/tbv/core/index.cjs +1 -1
  29. package/dist/tbv/core/index.js +84 -80
  30. package/dist/tbv/core/managers/index.cjs +1 -1
  31. package/dist/tbv/core/managers/index.js +2 -2
  32. package/dist/tbv/core/primitives/index.cjs +1 -1
  33. package/dist/tbv/core/primitives/index.js +3 -3
  34. package/dist/tbv/core/recovery/reconstructPeginParams.d.ts +6 -0
  35. package/dist/tbv/core/recovery/reconstructPeginParams.d.ts.map +1 -1
  36. package/dist/tbv/core/recovery/toRefundInputs.d.ts +0 -2
  37. package/dist/tbv/core/recovery/toRefundInputs.d.ts.map +1 -1
  38. package/dist/tbv/core/services/deposit/index.d.ts +1 -1
  39. package/dist/tbv/core/services/deposit/index.d.ts.map +1 -1
  40. package/dist/tbv/core/services/deposit/peginState.d.ts +9 -2
  41. package/dist/tbv/core/services/deposit/peginState.d.ts.map +1 -1
  42. package/dist/tbv/core/services/deposit/verifyRegisteredParticipantKeys.d.ts +27 -1
  43. package/dist/tbv/core/services/deposit/verifyRegisteredParticipantKeys.d.ts.map +1 -1
  44. package/dist/tbv/core/services/index.cjs +1 -1
  45. package/dist/tbv/core/services/index.js +89 -85
  46. package/dist/tbv/core/services/refund/buildAndBroadcastRefund.d.ts +6 -2
  47. package/dist/tbv/core/services/refund/buildAndBroadcastRefund.d.ts.map +1 -1
  48. package/dist/tbv/core/services/refund/errors.d.ts +15 -0
  49. package/dist/tbv/core/services/refund/errors.d.ts.map +1 -1
  50. package/dist/tbv/core/services/refund/index.d.ts +1 -1
  51. package/dist/tbv/core/services/refund/index.d.ts.map +1 -1
  52. package/dist/tbv/core/utils/index.cjs +1 -1
  53. package/dist/tbv/core/utils/index.js +1 -1
  54. package/dist/tbv/index.cjs +1 -1
  55. package/dist/tbv/index.js +84 -80
  56. package/dist/{toRefundInputs-M4IbYwZU.js → toRefundInputs-Cl4KgzIc.js} +152 -152
  57. package/dist/{toRefundInputs-M4IbYwZU.js.map → toRefundInputs-Cl4KgzIc.js.map} +1 -1
  58. package/dist/{toRefundInputs-4W8aNM6b.cjs → toRefundInputs-DyIgmGJq.cjs} +2 -2
  59. package/dist/{toRefundInputs-4W8aNM6b.cjs.map → toRefundInputs-DyIgmGJq.cjs.map} +1 -1
  60. package/dist/types-BnZIbDHb.cjs.map +1 -1
  61. package/dist/types-K_aM5GZO.js.map +1 -1
  62. package/dist/{verifyKeyPathSchnorrSignature-DDi3B6EL.cjs → verifyKeyPathSchnorrSignature-BVrAmVL3.cjs} +2 -2
  63. package/dist/{verifyKeyPathSchnorrSignature-DDi3B6EL.cjs.map → verifyKeyPathSchnorrSignature-BVrAmVL3.cjs.map} +1 -1
  64. package/dist/{verifyKeyPathSchnorrSignature-CAp5zOTX.js → verifyKeyPathSchnorrSignature-CIE3jlVt.js} +2 -2
  65. package/dist/{verifyKeyPathSchnorrSignature-CAp5zOTX.js.map → verifyKeyPathSchnorrSignature-CIE3jlVt.js.map} +1 -1
  66. package/dist/{verifyScriptPathSchnorrSignature-cpUVCwU3.cjs → verifyScriptPathSchnorrSignature-BHskbJJx.cjs} +2 -2
  67. package/dist/{verifyScriptPathSchnorrSignature-cpUVCwU3.cjs.map → verifyScriptPathSchnorrSignature-BHskbJJx.cjs.map} +1 -1
  68. package/dist/{verifyScriptPathSchnorrSignature-BK-bd6w5.js → verifyScriptPathSchnorrSignature-DLNGgm4j.js} +3 -2
  69. package/dist/{verifyScriptPathSchnorrSignature-BK-bd6w5.js.map → verifyScriptPathSchnorrSignature-DLNGgm4j.js.map} +1 -1
  70. package/package.json +1 -1
  71. package/dist/peginState-CIibG9S_.js.map +0 -1
  72. package/dist/peginState-IyE22wWh.cjs +0 -2
  73. package/dist/peginState-IyE22wWh.cjs.map +0 -1
@@ -1 +1 @@
1
- {"version":3,"file":"reservation-CA5knoQ0.cjs","sources":["../src/tbv/core/utils/utxo/availability.ts","../src/tbv/core/utils/utxo/reservation.ts"],"sourcesContent":["/**\n * UTXO Availability Validation\n *\n * Validates that UTXOs referenced in a pre-pegin transaction are still unspent\n * BEFORE asking the user to sign. This prevents wasted signing effort when\n * UTXOs have already been spent by unrelated transactions.\n *\n * These functions are pure — they accept pre-fetched UTXOs and perform no I/O.\n * The vault service wrapper is responsible for fetching UTXOs from the mempool.\n */\n\nimport { Transaction } from \"bitcoinjs-lib\";\nimport { Buffer } from \"buffer\";\n\n/**\n * Reference to a Bitcoin UTXO by its outpoint (txid + vout).\n *\n * Used by the availability check to compare a Pre-PegIn transaction's\n * declared inputs against the wallet's current spendable set. Txids are\n * compared case-insensitively; callers should treat the txid as opaque\n * lowercase hex.\n */\nexport interface UtxoRef {\n txid: string;\n vout: number;\n}\n\n/**\n * Information about a missing/spent UTXO.\n */\nexport interface MissingUtxoInfo {\n /** Transaction ID of the missing UTXO */\n txid: string;\n /** Output index of the missing UTXO */\n vout: number;\n}\n\n/**\n * Result of UTXO validation.\n */\nexport interface UtxoValidationResult {\n /** Whether all UTXOs are still available */\n allAvailable: boolean;\n /** List of missing UTXOs (if any) */\n missingUtxos: MissingUtxoInfo[];\n /** Total number of inputs checked */\n totalInputs: number;\n}\n\n/**\n * Error thrown when UTXOs are not available.\n */\nexport class UtxoNotAvailableError extends Error {\n public readonly missingUtxos: MissingUtxoInfo[];\n\n constructor(missingUtxos: MissingUtxoInfo[]) {\n const count = missingUtxos.length;\n const message =\n count === 1\n ? \"The UTXO for this peg-in is no longer available. It may have been spent in another transaction. Please create a new peg-in request with a different UTXO.\"\n : `${count} UTXOs for this peg-in are no longer available. They may have been spent. Please create a new peg-in request with different UTXOs.`;\n\n super(message);\n this.name = \"UtxoNotAvailableError\";\n this.missingUtxos = missingUtxos;\n }\n}\n\n/**\n * Extract input references (txid:vout) from an unsigned transaction.\n *\n * @param unsignedTxHex - Unsigned transaction hex\n * @returns Array of input references\n */\nexport function extractInputsFromTransaction(\n unsignedTxHex: string,\n): Array<{ txid: string; vout: number }> {\n const cleanHex = unsignedTxHex.startsWith(\"0x\")\n ? unsignedTxHex.slice(2)\n : unsignedTxHex;\n\n let tx: Transaction;\n try {\n tx = Transaction.fromHex(cleanHex);\n } catch (error) {\n throw new Error(\n `Failed to parse BTC transaction: ${error instanceof Error ? error.message : String(error)}`,\n );\n }\n\n return tx.ins.map((input) => ({\n // Bitcoin stores txid in reverse byte order\n txid: Buffer.from(input.hash).reverse().toString(\"hex\"),\n vout: input.index,\n }));\n}\n\n/**\n * Validate that all UTXOs in a transaction are still available.\n *\n * Pure function — accepts pre-fetched UTXOs instead of making network calls.\n * This should be called BEFORE signing to avoid wasting user effort\n * signing a transaction that will fail to broadcast.\n *\n * @param unsignedTxHex - Unsigned transaction hex\n * @param availableUtxos - Pre-fetched list of available UTXOs for the depositor\n * @returns Validation result with missing UTXO details\n */\nexport function validateUtxosAvailable(\n unsignedTxHex: string,\n availableUtxos: UtxoRef[],\n): UtxoValidationResult {\n const inputs = extractInputsFromTransaction(unsignedTxHex);\n\n if (inputs.length === 0) {\n throw new Error(\"Transaction has no inputs\");\n }\n\n // Detect duplicate inputs (same txid:vout referenced more than once).\n // This would produce an invalid Bitcoin transaction.\n const inputKeys = new Set<string>();\n for (const input of inputs) {\n const key = `${input.txid.toLowerCase()}:${input.vout}`;\n if (inputKeys.has(key)) {\n throw new Error(\n `Transaction contains duplicate input ${input.txid}:${input.vout}. ` +\n `This would produce an invalid Bitcoin transaction.`,\n );\n }\n inputKeys.add(key);\n }\n\n // Set of available outpoints for O(1) lookup. Lowercased so the comparison\n // is case-insensitive against whatever case the wallet returned.\n const availableSet = new Set(\n availableUtxos.map((utxo) => `${utxo.txid.toLowerCase()}:${utxo.vout}`),\n );\n\n // Check which inputs are missing\n const missingUtxos: MissingUtxoInfo[] = [];\n for (const input of inputs) {\n const key = `${input.txid.toLowerCase()}:${input.vout}`;\n if (!availableSet.has(key)) {\n missingUtxos.push({\n txid: input.txid,\n vout: input.vout,\n });\n }\n }\n\n return {\n allAvailable: missingUtxos.length === 0,\n missingUtxos,\n totalInputs: inputs.length,\n };\n}\n\n/**\n * Validate UTXOs and throw if any are not available.\n *\n * Pure convenience function that combines validation and error throwing.\n *\n * @param unsignedTxHex - Unsigned transaction hex\n * @param availableUtxos - Pre-fetched list of available UTXOs for the depositor\n * @throws UtxoNotAvailableError if any UTXOs are not available\n * @throws Error if validation fails\n */\nexport function assertUtxosAvailable(\n unsignedTxHex: string,\n availableUtxos: UtxoRef[],\n): void {\n const result = validateUtxosAvailable(unsignedTxHex, availableUtxos);\n\n if (!result.allAvailable) {\n throw new UtxoNotAvailableError(result.missingUtxos);\n }\n}\n","/**\n * Pending-vault outpoint overlap detection.\n *\n * Given the depositor's pending vaults (indexer + local cache) and the\n * outpoints a new deposit's coin selector picked, return the set of\n * pending vault ids whose Pre-PegIn BTC tx shares an input. Advisory\n * only — used to warn the user before signing.\n *\n * Only `PENDING` vaults contribute: VERIFIED+ have their Pre-PegIn\n * already confirmed on-chain, so those inputs cannot still appear in\n * the wallet's spendable set.\n */\nimport { Transaction } from \"bitcoinjs-lib\";\nimport { Buffer } from \"buffer\";\n\nimport { stripHexPrefix } from \"../../primitives/utils/bitcoin\";\nimport { ContractStatus } from \"../../services/deposit/peginState\";\n\nimport type { UtxoRef } from \"./availability\";\n\n/** Locally-known pending pegin. `id` is the bytes32 vault id. */\nexport interface PendingPeginLike {\n id?: string;\n unsignedTxHex?: string;\n}\n\n/** On-chain vault row from the indexer. */\nexport interface VaultLike {\n id?: string;\n status: number;\n unsignedPrePeginTx: string;\n}\n\nexport interface FindOverlappingPendingVaultsParams {\n selectedOutpoints: ReadonlyArray<UtxoRef>;\n vaults?: ReadonlyArray<VaultLike>;\n pendingPegins?: ReadonlyArray<PendingPeginLike>;\n}\n\nfunction extractInputUtxoRefs(txHex: string): UtxoRef[] {\n try {\n const tx = Transaction.fromHex(stripHexPrefix(txHex));\n return tx.ins.map((input) => ({\n txid: Buffer.from(input.hash).reverse().toString(\"hex\"),\n vout: input.index,\n }));\n } catch {\n return [];\n }\n}\n\nfunction outpointKey(o: UtxoRef): string {\n return `${o.txid.toLowerCase()}:${o.vout}`;\n}\n\n/**\n * Return the ids of pending vaults whose committed Pre-PegIn inputs\n * overlap any of the just-selected outpoints. On-chain `PENDING` vaults\n * take precedence over a same-id local pegin entry.\n */\nexport function findOverlappingPendingVaults(\n params: FindOverlappingPendingVaultsParams,\n): string[] {\n const { selectedOutpoints, vaults = [], pendingPegins = [] } = params;\n\n const selectedSet = new Set(selectedOutpoints.map(outpointKey));\n if (selectedSet.size === 0) return [];\n\n const seenIds = new Set<string>();\n const impacted = new Set<string>();\n\n const consider = (id: string | undefined, txHex: string): void => {\n if (!id) return;\n const idLower = id.toLowerCase();\n if (seenIds.has(idLower)) return;\n seenIds.add(idLower);\n const inputs = extractInputUtxoRefs(txHex);\n for (const input of inputs) {\n if (selectedSet.has(outpointKey(input))) {\n impacted.add(id);\n return;\n }\n }\n };\n\n // On-chain wins on id collision.\n for (const v of vaults) {\n if (v.status !== ContractStatus.PENDING) continue;\n consider(v.id, v.unsignedPrePeginTx);\n }\n for (const p of pendingPegins) {\n if (!p.unsignedTxHex) continue;\n consider(p.id, p.unsignedTxHex);\n }\n\n return Array.from(impacted);\n}\n"],"names":["UtxoNotAvailableError","missingUtxos","count","message","__publicField","extractInputsFromTransaction","unsignedTxHex","cleanHex","tx","Transaction","error","input","Buffer","validateUtxosAvailable","availableUtxos","inputs","inputKeys","key","availableSet","utxo","assertUtxosAvailable","result","extractInputUtxoRefs","txHex","stripHexPrefix","outpointKey","o","findOverlappingPendingVaults","params","selectedOutpoints","vaults","pendingPegins","selectedSet","seenIds","impacted","consider","id","idLower","v","ContractStatus","p"],"mappings":"iTAoDO,MAAMA,UAA8B,KAAM,CAG/C,YAAYC,EAAiC,CAC3C,MAAMC,EAAQD,EAAa,OACrBE,EACJD,IAAU,EACN,4JACA,GAAGA,CAAK,qIAEd,MAAMC,CAAO,EATCC,EAAA,qBAUd,KAAK,KAAO,wBACZ,KAAK,aAAeH,CACtB,CACF,CAQO,SAASI,EACdC,EACuC,CACvC,MAAMC,EAAWD,EAAc,WAAW,IAAI,EAC1CA,EAAc,MAAM,CAAC,EACrBA,EAEJ,IAAIE,EACJ,GAAI,CACFA,EAAKC,EAAAA,YAAY,QAAQF,CAAQ,CACnC,OAASG,EAAO,CACd,MAAM,IAAI,MACR,oCAAoCA,aAAiB,MAAQA,EAAM,QAAU,OAAOA,CAAK,CAAC,EAAA,CAE9F,CAEA,OAAOF,EAAG,IAAI,IAAKG,IAAW,CAE5B,KAAMC,EAAAA,OAAO,KAAKD,EAAM,IAAI,EAAE,QAAA,EAAU,SAAS,KAAK,EACtD,KAAMA,EAAM,KAAA,EACZ,CACJ,CAaO,SAASE,EACdP,EACAQ,EACsB,CACtB,MAAMC,EAASV,EAA6BC,CAAa,EAEzD,GAAIS,EAAO,SAAW,EACpB,MAAM,IAAI,MAAM,2BAA2B,EAK7C,MAAMC,MAAgB,IACtB,UAAWL,KAASI,EAAQ,CAC1B,MAAME,EAAM,GAAGN,EAAM,KAAK,aAAa,IAAIA,EAAM,IAAI,GACrD,GAAIK,EAAU,IAAIC,CAAG,EACnB,MAAM,IAAI,MACR,wCAAwCN,EAAM,IAAI,IAAIA,EAAM,IAAI,sDAAA,EAIpEK,EAAU,IAAIC,CAAG,CACnB,CAIA,MAAMC,EAAe,IAAI,IACvBJ,EAAe,IAAKK,GAAS,GAAGA,EAAK,KAAK,aAAa,IAAIA,EAAK,IAAI,EAAE,CAAA,EAIlElB,EAAkC,CAAA,EACxC,UAAWU,KAASI,EAAQ,CAC1B,MAAME,EAAM,GAAGN,EAAM,KAAK,aAAa,IAAIA,EAAM,IAAI,GAChDO,EAAa,IAAID,CAAG,GACvBhB,EAAa,KAAK,CAChB,KAAMU,EAAM,KACZ,KAAMA,EAAM,IAAA,CACb,CAEL,CAEA,MAAO,CACL,aAAcV,EAAa,SAAW,EACtC,aAAAA,EACA,YAAac,EAAO,MAAA,CAExB,CAYO,SAASK,EACdd,EACAQ,EACM,CACN,MAAMO,EAASR,EAAuBP,EAAeQ,CAAc,EAEnE,GAAI,CAACO,EAAO,aACV,MAAM,IAAIrB,EAAsBqB,EAAO,YAAY,CAEvD,CCzIA,SAASC,EAAqBC,EAA0B,CACtD,GAAI,CAEF,OADWd,EAAAA,YAAY,QAAQe,EAAAA,eAAeD,CAAK,CAAC,EAC1C,IAAI,IAAKZ,IAAW,CAC5B,KAAMC,EAAAA,OAAO,KAAKD,EAAM,IAAI,EAAE,QAAA,EAAU,SAAS,KAAK,EACtD,KAAMA,EAAM,KAAA,EACZ,CACJ,MAAQ,CACN,MAAO,CAAA,CACT,CACF,CAEA,SAASc,EAAYC,EAAoB,CACvC,MAAO,GAAGA,EAAE,KAAK,aAAa,IAAIA,EAAE,IAAI,EAC1C,CAOO,SAASC,EACdC,EACU,CACV,KAAM,CAAE,kBAAAC,EAAmB,OAAAC,EAAS,CAAA,EAAI,cAAAC,EAAgB,CAAA,GAAOH,EAEzDI,EAAc,IAAI,IAAIH,EAAkB,IAAIJ,CAAW,CAAC,EAC9D,GAAIO,EAAY,OAAS,EAAG,MAAO,CAAA,EAEnC,MAAMC,MAAc,IACdC,MAAe,IAEfC,EAAW,CAACC,EAAwBb,IAAwB,CAChE,GAAI,CAACa,EAAI,OACT,MAAMC,EAAUD,EAAG,YAAA,EACnB,GAAIH,EAAQ,IAAII,CAAO,EAAG,OAC1BJ,EAAQ,IAAII,CAAO,EACnB,MAAMtB,EAASO,EAAqBC,CAAK,EACzC,UAAWZ,KAASI,EAClB,GAAIiB,EAAY,IAAIP,EAAYd,CAAK,CAAC,EAAG,CACvCuB,EAAS,IAAIE,CAAE,EACf,MACF,CAEJ,EAGA,UAAWE,KAAKR,EACVQ,EAAE,SAAWC,EAAAA,eAAe,SAChCJ,EAASG,EAAE,GAAIA,EAAE,kBAAkB,EAErC,UAAWE,KAAKT,EACTS,EAAE,eACPL,EAASK,EAAE,GAAIA,EAAE,aAAa,EAGhC,OAAO,MAAM,KAAKN,CAAQ,CAC5B"}
1
+ {"version":3,"file":"reservation-D9ftyiwP.cjs","sources":["../src/tbv/core/utils/utxo/availability.ts","../src/tbv/core/utils/utxo/reservation.ts"],"sourcesContent":["/**\n * UTXO Availability Validation\n *\n * Validates that UTXOs referenced in a pre-pegin transaction are still unspent\n * BEFORE asking the user to sign. This prevents wasted signing effort when\n * UTXOs have already been spent by unrelated transactions.\n *\n * These functions are pure — they accept pre-fetched UTXOs and perform no I/O.\n * The vault service wrapper is responsible for fetching UTXOs from the mempool.\n */\n\nimport { Transaction } from \"bitcoinjs-lib\";\nimport { Buffer } from \"buffer\";\n\n/**\n * Reference to a Bitcoin UTXO by its outpoint (txid + vout).\n *\n * Used by the availability check to compare a Pre-PegIn transaction's\n * declared inputs against the wallet's current spendable set. Txids are\n * compared case-insensitively; callers should treat the txid as opaque\n * lowercase hex.\n */\nexport interface UtxoRef {\n txid: string;\n vout: number;\n}\n\n/**\n * Information about a missing/spent UTXO.\n */\nexport interface MissingUtxoInfo {\n /** Transaction ID of the missing UTXO */\n txid: string;\n /** Output index of the missing UTXO */\n vout: number;\n}\n\n/**\n * Result of UTXO validation.\n */\nexport interface UtxoValidationResult {\n /** Whether all UTXOs are still available */\n allAvailable: boolean;\n /** List of missing UTXOs (if any) */\n missingUtxos: MissingUtxoInfo[];\n /** Total number of inputs checked */\n totalInputs: number;\n}\n\n/**\n * Error thrown when UTXOs are not available.\n */\nexport class UtxoNotAvailableError extends Error {\n public readonly missingUtxos: MissingUtxoInfo[];\n\n constructor(missingUtxos: MissingUtxoInfo[]) {\n const count = missingUtxos.length;\n const message =\n count === 1\n ? \"The UTXO for this peg-in is no longer available. It may have been spent in another transaction. Please create a new peg-in request with a different UTXO.\"\n : `${count} UTXOs for this peg-in are no longer available. They may have been spent. Please create a new peg-in request with different UTXOs.`;\n\n super(message);\n this.name = \"UtxoNotAvailableError\";\n this.missingUtxos = missingUtxos;\n }\n}\n\n/**\n * Extract input references (txid:vout) from an unsigned transaction.\n *\n * @param unsignedTxHex - Unsigned transaction hex\n * @returns Array of input references\n */\nexport function extractInputsFromTransaction(\n unsignedTxHex: string,\n): Array<{ txid: string; vout: number }> {\n const cleanHex = unsignedTxHex.startsWith(\"0x\")\n ? unsignedTxHex.slice(2)\n : unsignedTxHex;\n\n let tx: Transaction;\n try {\n tx = Transaction.fromHex(cleanHex);\n } catch (error) {\n throw new Error(\n `Failed to parse BTC transaction: ${error instanceof Error ? error.message : String(error)}`,\n );\n }\n\n return tx.ins.map((input) => ({\n // Bitcoin stores txid in reverse byte order\n txid: Buffer.from(input.hash).reverse().toString(\"hex\"),\n vout: input.index,\n }));\n}\n\n/**\n * Validate that all UTXOs in a transaction are still available.\n *\n * Pure function — accepts pre-fetched UTXOs instead of making network calls.\n * This should be called BEFORE signing to avoid wasting user effort\n * signing a transaction that will fail to broadcast.\n *\n * @param unsignedTxHex - Unsigned transaction hex\n * @param availableUtxos - Pre-fetched list of available UTXOs for the depositor\n * @returns Validation result with missing UTXO details\n */\nexport function validateUtxosAvailable(\n unsignedTxHex: string,\n availableUtxos: UtxoRef[],\n): UtxoValidationResult {\n const inputs = extractInputsFromTransaction(unsignedTxHex);\n\n if (inputs.length === 0) {\n throw new Error(\"Transaction has no inputs\");\n }\n\n // Detect duplicate inputs (same txid:vout referenced more than once).\n // This would produce an invalid Bitcoin transaction.\n const inputKeys = new Set<string>();\n for (const input of inputs) {\n const key = `${input.txid.toLowerCase()}:${input.vout}`;\n if (inputKeys.has(key)) {\n throw new Error(\n `Transaction contains duplicate input ${input.txid}:${input.vout}. ` +\n `This would produce an invalid Bitcoin transaction.`,\n );\n }\n inputKeys.add(key);\n }\n\n // Set of available outpoints for O(1) lookup. Lowercased so the comparison\n // is case-insensitive against whatever case the wallet returned.\n const availableSet = new Set(\n availableUtxos.map((utxo) => `${utxo.txid.toLowerCase()}:${utxo.vout}`),\n );\n\n // Check which inputs are missing\n const missingUtxos: MissingUtxoInfo[] = [];\n for (const input of inputs) {\n const key = `${input.txid.toLowerCase()}:${input.vout}`;\n if (!availableSet.has(key)) {\n missingUtxos.push({\n txid: input.txid,\n vout: input.vout,\n });\n }\n }\n\n return {\n allAvailable: missingUtxos.length === 0,\n missingUtxos,\n totalInputs: inputs.length,\n };\n}\n\n/**\n * Validate UTXOs and throw if any are not available.\n *\n * Pure convenience function that combines validation and error throwing.\n *\n * @param unsignedTxHex - Unsigned transaction hex\n * @param availableUtxos - Pre-fetched list of available UTXOs for the depositor\n * @throws UtxoNotAvailableError if any UTXOs are not available\n * @throws Error if validation fails\n */\nexport function assertUtxosAvailable(\n unsignedTxHex: string,\n availableUtxos: UtxoRef[],\n): void {\n const result = validateUtxosAvailable(unsignedTxHex, availableUtxos);\n\n if (!result.allAvailable) {\n throw new UtxoNotAvailableError(result.missingUtxos);\n }\n}\n","/**\n * Pending-vault outpoint overlap detection.\n *\n * Given the depositor's pending vaults (indexer + local cache) and the\n * outpoints a new deposit's coin selector picked, return the set of\n * pending vault ids whose Pre-PegIn BTC tx shares an input. Advisory\n * only — used to warn the user before signing.\n *\n * Only `PENDING` vaults contribute: VERIFIED+ have their Pre-PegIn\n * already confirmed on-chain, so those inputs cannot still appear in\n * the wallet's spendable set.\n */\nimport { Transaction } from \"bitcoinjs-lib\";\nimport { Buffer } from \"buffer\";\n\nimport { stripHexPrefix } from \"../../primitives/utils/bitcoin\";\nimport { ContractStatus } from \"../../services/deposit/peginState\";\n\nimport type { UtxoRef } from \"./availability\";\n\n/** Locally-known pending pegin. `id` is the bytes32 vault id. */\nexport interface PendingPeginLike {\n id?: string;\n unsignedTxHex?: string;\n}\n\n/** On-chain vault row from the indexer. */\nexport interface VaultLike {\n id?: string;\n status: number;\n unsignedPrePeginTx: string;\n}\n\nexport interface FindOverlappingPendingVaultsParams {\n selectedOutpoints: ReadonlyArray<UtxoRef>;\n vaults?: ReadonlyArray<VaultLike>;\n pendingPegins?: ReadonlyArray<PendingPeginLike>;\n}\n\nfunction extractInputUtxoRefs(txHex: string): UtxoRef[] {\n try {\n const tx = Transaction.fromHex(stripHexPrefix(txHex));\n return tx.ins.map((input) => ({\n txid: Buffer.from(input.hash).reverse().toString(\"hex\"),\n vout: input.index,\n }));\n } catch {\n return [];\n }\n}\n\nfunction outpointKey(o: UtxoRef): string {\n return `${o.txid.toLowerCase()}:${o.vout}`;\n}\n\n/**\n * Return the ids of pending vaults whose committed Pre-PegIn inputs\n * overlap any of the just-selected outpoints. On-chain `PENDING` vaults\n * take precedence over a same-id local pegin entry.\n */\nexport function findOverlappingPendingVaults(\n params: FindOverlappingPendingVaultsParams,\n): string[] {\n const { selectedOutpoints, vaults = [], pendingPegins = [] } = params;\n\n const selectedSet = new Set(selectedOutpoints.map(outpointKey));\n if (selectedSet.size === 0) return [];\n\n const seenIds = new Set<string>();\n const impacted = new Set<string>();\n\n const consider = (id: string | undefined, txHex: string): void => {\n if (!id) return;\n const idLower = id.toLowerCase();\n if (seenIds.has(idLower)) return;\n seenIds.add(idLower);\n const inputs = extractInputUtxoRefs(txHex);\n for (const input of inputs) {\n if (selectedSet.has(outpointKey(input))) {\n impacted.add(id);\n return;\n }\n }\n };\n\n // On-chain wins on id collision.\n for (const v of vaults) {\n if (v.status !== ContractStatus.PENDING) continue;\n consider(v.id, v.unsignedPrePeginTx);\n }\n for (const p of pendingPegins) {\n if (!p.unsignedTxHex) continue;\n consider(p.id, p.unsignedTxHex);\n }\n\n return Array.from(impacted);\n}\n"],"names":["UtxoNotAvailableError","missingUtxos","count","message","__publicField","extractInputsFromTransaction","unsignedTxHex","cleanHex","tx","Transaction","error","input","Buffer","validateUtxosAvailable","availableUtxos","inputs","inputKeys","key","availableSet","utxo","assertUtxosAvailable","result","extractInputUtxoRefs","txHex","stripHexPrefix","outpointKey","o","findOverlappingPendingVaults","params","selectedOutpoints","vaults","pendingPegins","selectedSet","seenIds","impacted","consider","id","idLower","v","ContractStatus","p"],"mappings":"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"}
@@ -20,7 +20,7 @@ export type OnChainBtcPubkey = string & {
20
20
  *
21
21
  * Do NOT confuse with the app-side `ContractStatus` enum
22
22
  * (`services/deposit/peginState.ts`) — that one is for the indexer and
23
- * extends this with values 5-7, reassigning 4 to LIQUIDATED. Reading an
23
+ * extends this with values 5-8, reassigning 4 to LIQUIDATED. Reading an
24
24
  * on-chain status through `ContractStatus[n]` for labels will mislabel
25
25
  * Expired(4) as LIQUIDATED.
26
26
  */
@@ -1,2 +1,2 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const o=require("../../verifyScriptPathSchnorrSignature-cpUVCwU3.cjs"),O=require("../../secp256k1-DDHQ1_za.cjs"),n=require("./wasm/index.cjs"),R=require("../../verifyKeyPathSchnorrSignature-DDi3B6EL.cjs"),E=require("../../challengeAssert-ea0EmRKe.cjs"),r=require("../../bitcoin-D-O2GjbC.cjs"),F=require("../../abortSignals-msbmbqFe.cjs"),I=require("../../signing-DvISftFk.cjs"),P=require("../../validation-C6XTfZak.cjs"),V=require("./utils/eth/index.cjs"),_=require("../../PeginManager-tP0Y-UCv.cjs"),d=require("../../PayoutManager-C3p_cNHQ.cjs"),s=require("./clients/mempool/index.cjs"),l=require("../../registration-records-CKc0OVuK.cjs"),C=require("../../signer-set-reader-CJfV-GDz.cjs"),A=require("../../pegin-registration-client-DOb-Iznp.cjs"),h=require("../../types-BnZIbDHb.cjs"),y=require("../../ApplicationRegistry.abi-sMiTWmnL.cjs"),N=require("../../BTCVaultRegistry.abi-DzbfZ9_s.cjs"),u=require("../../BTCVaultRegistryKeyEpochs.abi-CReWFJdu.cjs"),M=require("../../ProtocolParams.abi-DWfIh6VH.cjs"),b=require("../../VaultErrors.abi-Hjn1CdLs.cjs"),v=require("../../buildVaultContextInputForClaim-9XZaqIiw.cjs"),S=require("../../deriveVaultRoot-C3uqnJto.cjs"),D=require("../../parseFundingOutpoints-C_-PT9BT.cjs"),B=require("../../btcTxHash-CGb5BqFL.cjs"),c=require("../../psbtInputFields-BrV_ZfL_.cjs"),i=require("../../fundPeginTransaction-54-Rwb2k.cjs"),T=require("../../reservation-CA5knoQ0.cjs"),m=require("../../index-Dn7RlsKK.cjs"),a=require("../../state-C4WoNCy1.cjs"),g=require("../../primeVpAuth-Ch-ig2My.cjs"),t=require("../../toRefundInputs-4W8aNM6b.cjs"),e=require("../../buildAndBroadcastReclaim-DtmMg096.cjs"),p=require("../../peginState-IyE22wWh.cjs");exports.PEGIN_DEPOSITOR_CLAIM_VOUT=o.PEGIN_DEPOSITOR_CLAIM_VOUT;exports.PsbtSubstitutionError=o.PsbtSubstitutionError;exports.assertPsbtUnsignedTxMatches=o.assertPsbtUnsignedTxMatches;exports.assertScriptPathSchnorrSignature=o.assertScriptPathSchnorrSignature;exports.buildPayoutPsbt=o.buildPayoutPsbt;exports.buildPeginTxFromFundedPrePegin=o.buildPeginTxFromFundedPrePegin;exports.buildPrePeginPsbt=o.buildPrePeginPsbt;exports.computeNumLocalChallengers=o.computeNumLocalChallengers;exports.createPayoutScript=o.createPayoutScript;exports.deriveDepositorClaimDescriptor=o.deriveDepositorClaimDescriptor;exports.deriveDepositorClaimScriptPubKey=o.deriveDepositorClaimScriptPubKey;exports.extractPayoutSignature=o.extractPayoutSignature;exports.assertValidVaultCoreVersion=O.assertValidVaultCoreVersion;exports.attachFinalizedAssert=n.attachFinalizedAssert;exports.computeMinClaimValue=n.computeMinClaimValue;exports.computeMinPeginFee=n.computeMinPeginFee;exports.deriveVaultId=n.deriveVaultId;exports.expandAuthAnchor=n.expandAuthAnchor;exports.expandHashlockSecret=n.expandHashlockSecret;exports.expandWotsSeed=n.expandWotsSeed;exports.finalizePayout=n.finalizePayout;exports.finalizeWronglyChallenged=n.finalizeWronglyChallenged;exports.peginP2aAnchorOutput=n.peginP2aAnchorOutput;exports.pinPegoutProof=n.pinPegoutProof;exports.supportedTxGraphVersions=n.supportedTxGraphVersions;exports.validatePeginP2aAnchor=n.validatePeginP2aAnchor;exports.assertKeyPathSchnorrSignature=R.assertKeyPathSchnorrSignature;exports.assertReturnedKeyPathSignatures=R.assertReturnedKeyPathSignatures;exports.buildPeginInputPsbt=R.buildPeginInputPsbt;exports.extractPeginInputSignature=R.extractPeginInputSignature;exports.finalizePeginInputPsbt=R.finalizePeginInputPsbt;exports.buildChallengeAssertPsbt=E.buildChallengeAssertPsbt;exports.buildNoPayoutPsbt=E.buildNoPayoutPsbt;exports.buildReclaimPsbt=E.buildReclaimPsbt;exports.buildRefundPsbt=E.buildRefundPsbt;exports.estimateReclaimFeeSats=E.estimateReclaimFeeSats;exports.finalizeScriptPathWithSignatures=E.finalizeScriptPathWithSignatures;exports.reclaimVsize=E.reclaimVsize;exports.canonicalizeBtcPubkey=r.canonicalizeBtcPubkey;exports.deriveBip86ScriptPubKeyHex=r.deriveBip86ScriptPubKeyHex;exports.deriveNativeSegwitAddress=r.deriveNativeSegwitAddress;exports.deriveTaprootAddress=r.deriveTaprootAddress;exports.ensureHexPrefix=r.ensureHexPrefix;exports.formatSatoshisToBtc=r.formatSatoshisToBtc;exports.getNetwork=r.getNetwork;exports.getSortedXOnlyPubkeys=r.getSortedXOnlyPubkeys;exports.hexToUint8Array=r.hexToUint8Array;exports.isAddressFromPublicKey=r.isAddressFromPublicKey;exports.isValidHex=r.isValidHex;exports.processPublicKeyToXOnly=r.processPublicKeyToXOnly;exports.stripHexPrefix=r.stripHexPrefix;exports.toXOnly=r.toXOnly;exports.uint8ArrayToHex=r.uint8ArrayToHex;exports.validateWalletPubkey=r.validateWalletPubkey;exports.combineAbortSignals=F.combineAbortSignals;exports.createTaprootScriptPathSignOptions=I.createTaprootScriptPathSignOptions;exports.createTaprootScriptPathSignOptionsForInput=I.createTaprootScriptPathSignOptionsForInput;exports.BITCOIN_ADDRESS_RE=P.BITCOIN_ADDRESS_RE;exports.COMPRESSED_PUBKEY_HEX_LEN=P.COMPRESSED_PUBKEY_HEX_LEN;exports.HEX_RE=P.HEX_RE;exports.KNOWN_SCRIPT_PREFIXES=P.KNOWN_SCRIPT_PREFIXES;exports.MAX_REASONABLE_FEE_SATS=P.MAX_REASONABLE_FEE_SATS;exports.TXID_RE=P.TXID_RE;exports.X_ONLY_PUBKEY_HEX_LEN=P.X_ONLY_PUBKEY_HEX_LEN;exports.waitForTransactionReceiptSmartAware=V.waitForTransactionReceiptSmartAware;exports.PeginManager=_.PeginManager;exports.buildDepositTerms=_.buildDepositTerms;exports.computeWotsBlockPublicKeysHash=_.computeWotsBlockPublicKeysHash;exports.deriveWotsBlocksFromSeed=_.deriveWotsBlocksFromSeed;exports.ensurePrePeginTermsApproval=_.ensurePrePeginTermsApproval;exports.PayoutManager=d.PayoutManager;exports.computeHashlock=d.computeHashlock;exports.forwardDepositApproval=d.forwardDepositApproval;exports.requireChangeAddress=d.requireChangeAddress;exports.supportsDepositApproval=d.supportsDepositApproval;exports.validateSecretAgainstHashlock=d.validateSecretAgainstHashlock;exports.MEMPOOL_API_URLS=s.MEMPOOL_API_URLS;exports.MempoolNotFoundError=s.MempoolNotFoundError;exports.getAddressTxs=s.getAddressTxs;exports.getAddressUtxos=s.getAddressUtxos;exports.getMempoolApiUrl=s.getMempoolApiUrl;exports.getNetworkFees=s.getNetworkFees;exports.getOutspend=s.getOutspend;exports.getTipHeight=s.getTipHeight;exports.getTxHex=s.getTxHex;exports.getTxInfo=s.getTxInfo;exports.getUtxoInfo=s.getUtxoInfo;exports.pushTx=s.pushTx;exports.RegistrationLogsUnavailableError=l.RegistrationLogsUnavailableError;exports.VaultClaimableByNotFoundError=l.VaultClaimableByNotFoundError;exports.assertOnChainBtcPubkey=l.assertOnChainBtcPubkey;exports.assertRegisteredPayoutScriptBounds=l.assertRegisteredPayoutScriptBounds;exports.derivePeginVaultId=l.derivePeginVaultId;exports.findRegistrationRecord=l.findRegistrationRecord;exports.isRegistrationLogsUnavailableError=l.isRegistrationLogsUnavailableError;exports.isVaultClaimableByNotFoundError=l.isVaultClaimableByNotFoundError;exports.registrationPrePeginTxHash=l.registrationPrePeginTxHash;exports.validateOffchainParams=l.validateOffchainParams;exports.validatePegInConfiguration=l.validatePegInConfiguration;exports.validateTBVProtocolParams=l.validateTBVProtocolParams;exports.ViemOperationKeyReader=C.ViemOperationKeyReader;exports.ViemUniversalChallengerReader=C.ViemUniversalChallengerReader;exports.ViemVaultKeeperReader=C.ViemVaultKeeperReader;exports.resolveProtocolAddresses=C.resolveProtocolAddresses;exports.COMMISSION_BPS_HEADROOM=A.COMMISSION_BPS_HEADROOM;exports.MAX_ACCEPTABLE_COMMISSION_BPS_CAP=A.MAX_ACCEPTABLE_COMMISSION_BPS_CAP;exports.ViemPeginRegistrationClient=A.ViemPeginRegistrationClient;exports.ViemVaultRegistryReader=A.ViemVaultRegistryReader;exports.capMaxAcceptableCommissionBps=A.capMaxAcceptableCommissionBps;exports.OnChainBtcVaultStatus=h.OnChainBtcVaultStatus;exports.ViemProtocolParamsReader=h.ViemProtocolParamsReader;exports.ApplicationRegistryABI=y.ApplicationRegistryABI;exports.BTCVaultRegistryABI=N.BTCVaultRegistryABI;exports.BTCVaultRegistryKeyEpochsABI=u.BTCVaultRegistryKeyEpochsABI;exports.CONTRACT_ERRORS=u.CONTRACT_ERRORS;exports.EMPTY_REVERT_MESSAGE=u.EMPTY_REVERT_MESSAGE;exports.PEGIN_FINGERPRINT_CHANGED_SELECTOR=u.PEGIN_FINGERPRINT_CHANGED_SELECTOR;exports.PeginFingerprintChangedError=u.PeginFingerprintChangedError;exports.extractErrorData=u.extractErrorData;exports.getContractErrorMessage=u.getContractErrorMessage;exports.handleContractError=u.handleContractError;exports.isKnownContractError=u.isKnownContractError;exports.isPeginFingerprintChangedError=u.isPeginFingerprintChangedError;exports.ProtocolParamsABI=M.ProtocolParamsABI;exports.VAULT_ERROR_ABI=b.VAULT_ERROR_ABI;exports.buildVaultContextInputForClaim=v.buildVaultContextInputForClaim;exports.VAULT_APP_NAME=S.VAULT_APP_NAME;exports.buildFundingOutpointsCommitment=S.buildFundingOutpointsCommitment;exports.buildVaultContext=S.buildVaultContext;exports.deriveVaultRoot=S.deriveVaultRoot;exports.forwardDeriveContextHash=S.forwardDeriveContextHash;exports.parseFundingOutpointsFromTx=D.parseFundingOutpointsFromTx;exports.calculateBtcTxHash=B.calculateBtcTxHash;exports.BitcoinScriptType=c.BitcoinScriptType;exports.applyChangeOutputPolicy=c.applyChangeOutputPolicy;exports.computeChangeOutputFeeSats=c.computeChangeOutputFeeSats;exports.computeMaxDeposit=c.computeMaxDeposit;exports.computePeginBaseFeeSats=c.computePeginBaseFeeSats;exports.getDustThreshold=c.getDustThreshold;exports.getPsbtInputFields=c.getPsbtInputFields;exports.getScriptType=c.getScriptType;exports.selectUtxosForPegin=c.selectUtxosForPegin;exports.shouldAddChangeOutput=c.shouldAddChangeOutput;exports.BTC_DUST_SAT=i.BTC_DUST_SAT;exports.DUST_THRESHOLD=i.DUST_THRESHOLD;exports.LOW_RATE_ESTIMATION_ACCURACY_BUFFER=i.LOW_RATE_ESTIMATION_ACCURACY_BUFFER;exports.MAX_NON_LEGACY_OUTPUT_SIZE=i.MAX_NON_LEGACY_OUTPUT_SIZE;exports.MAX_REASONABLE_PEGIN_VBYTES=i.MAX_REASONABLE_PEGIN_VBYTES;exports.P2TR_INPUT_SIZE=i.P2TR_INPUT_SIZE;exports.PEGIN_AUTH_ANCHOR_OUTPUTS=i.PEGIN_AUTH_ANCHOR_OUTPUTS;exports.PEGIN_FIXED_OUTPUTS=i.PEGIN_FIXED_OUTPUTS;exports.SPLIT_TX_FEE_SAFETY_MULTIPLIER=i.SPLIT_TX_FEE_SAFETY_MULTIPLIER;exports.TX_BUFFER_SIZE_OVERHEAD=i.TX_BUFFER_SIZE_OVERHEAD;exports.WALLET_RELAY_FEE_RATE_THRESHOLD=i.WALLET_RELAY_FEE_RATE_THRESHOLD;exports.fundPeginTransaction=i.fundPeginTransaction;exports.parseUnfundedWasmTransaction=i.parseUnfundedWasmTransaction;exports.peginOutputCount=i.peginOutputCount;exports.rateBasedTxBufferFee=i.rateBasedTxBufferFee;exports.UtxoNotAvailableError=T.UtxoNotAvailableError;exports.assertUtxosAvailable=T.assertUtxosAvailable;exports.extractInputsFromTransaction=T.extractInputsFromTransaction;exports.findOverlappingPendingVaults=T.findOverlappingPendingVaults;exports.validateUtxosAvailable=T.validateUtxosAvailable;exports.VaultProviderRpcClient=m.VaultProviderRpcClient;exports.VpResponseValidationError=m.VpResponseValidationError;exports.batchPollByProvider=m.batchPollByProvider;exports.isUnrecognizedDaemonStatusError=m.isUnrecognizedDaemonStatusError;exports.validateRequestDepositorClaimerArtifactsResponse=m.validateRequestDepositorClaimerArtifactsResponse;exports.AUTH_REJECTED_RPC_CODE=a.AUTH_REJECTED_RPC_CODE;exports.ClaimerPegoutStatusValue=a.ClaimerPegoutStatusValue;exports.DaemonStatus=a.DaemonStatus;exports.JSON_RPC_ERROR_CODES=a.JSON_RPC_ERROR_CODES;exports.JsonRpcClient=a.JsonRpcClient;exports.JsonRpcError=a.JsonRpcError;exports.POST_WOTS_STATUSES=a.POST_WOTS_STATUSES;exports.PRE_DEPOSITOR_SIGNATURES_STATES=a.PRE_DEPOSITOR_SIGNATURES_STATES;exports.RpcErrorCode=a.RpcErrorCode;exports.VP_BATCH_MAX_SIZE=a.VP_BATCH_MAX_SIZE;exports.VP_TERMINAL_FAILURE_STATUSES=a.VP_TERMINAL_FAILURE_STATUSES;exports.VP_TRANSIENT_STATUSES=a.VP_TRANSIENT_STATUSES;exports.isAuthRejectedError=a.isAuthRejectedError;exports.isPegoutTerminalStatus=a.isPegoutTerminalStatus;exports.isRecognizedPegoutStatus=a.isRecognizedPegoutStatus;exports.ServerIdentityError=g.ServerIdentityError;exports.VpTokenRegistry=g.VpTokenRegistry;exports.createAuthenticatedVpClient=g.createAuthenticatedVpClient;exports.primeVpTokenRegistry=g.primeVpTokenRegistry;exports.verifyServerIdentity=g.verifyServerIdentity;exports.vpTokenRegistry=g.vpTokenRegistry;exports.DEPOSIT_TERMS_REJECTED_ERROR_NAME=t.DEPOSIT_TERMS_REJECTED_ERROR_NAME;exports.DepositTermsRejectedError=t.DepositTermsRejectedError;exports.PEGIN_FINGERPRINT_DOMAIN=t.PEGIN_FINGERPRINT_DOMAIN;exports.PEGIN_FINGERPRINT_DOMAIN_PREIMAGE=t.PEGIN_FINGERPRINT_DOMAIN_PREIMAGE;exports.PeginFingerprintInputError=t.PeginFingerprintInputError;exports.PeginParamsAmbiguousError=t.PeginParamsAmbiguousError;exports.PeginParamsIncompleteSpaceError=t.PeginParamsIncompleteSpaceError;exports.PeginParamsNotFoundError=t.PeginParamsNotFoundError;exports.PeginSizingIntegrityError=t.PeginSizingIntegrityError;exports.UnanchoredPrePeginError=t.UnanchoredPrePeginError;exports.VaultRootMismatchError=t.VaultRootMismatchError;exports.assertClaimBatchHomogeneous=t.assertClaimBatchHomogeneous;exports.buildPeginParamsCandidates=t.buildPeginParamsCandidates;exports.computeFundedPrePeginFee=t.computeFundedPrePeginFee;exports.computePeginFingerprint=t.computePeginFingerprint;exports.deriveHashlocksFromPrePegin=t.deriveHashlocksFromPrePegin;exports.describePeginParamsCandidate=t.describePeginParamsCandidate;exports.describeUnresolvedVersion=t.describeUnresolvedVersion;exports.encodePeginFingerprintPreimage=t.encodePeginFingerprintPreimage;exports.isDepositTermsRejectedError=t.isDepositTermsRejectedError;exports.isPeginFingerprintInputError=t.isPeginFingerprintInputError;exports.isWotsMismatchError=t.isWotsMismatchError;exports.orderClaimBatchByHtlcVout=t.orderClaimBatchByHtlcVout;exports.rebuildDepositTermsCore=t.rebuildDepositTermsCore;exports.rebuildDepositTermsForClaim=t.rebuildDepositTermsForClaim;exports.reconstructPeginParams=t.reconstructPeginParams;exports.selectSiblingRegistrations=t.selectSiblingRegistrations;exports.toRefundInputs=t.toRefundInputs;exports.ApplicationEntryPointMismatchError=e.ApplicationEntryPointMismatchError;exports.ArtifactsVaultMismatchError=e.ArtifactsVaultMismatchError;exports.AssertBindingError=e.AssertBindingError;exports.BIP68NotMatureError=e.BIP68NotMatureError;exports.ChallengerSetMismatchError=e.ChallengerSetMismatchError;exports.DELEGATED_CLAIM_TX_GRAPH_VERSION=e.DELEGATED_CLAIM_TX_GRAPH_VERSION;exports.DelegatedClaimSigningIncompleteError=e.DelegatedClaimSigningIncompleteError;exports.GraphFingerprintError=e.GraphFingerprintError;exports.PEGIN_ETH_CONFIRMATIONS=e.PEGIN_ETH_CONFIRMATIONS;exports.ParticipantKeyDriftError=e.ParticipantKeyDriftError;exports.PayoutDestinationError=e.PayoutDestinationError;exports.PayoutInputLeafError=e.PayoutInputLeafError;exports.PeginRegistrationMissingError=e.PeginRegistrationMissingError;exports.PeginRegistrationNotFinalError=e.PeginRegistrationNotFinalError;exports.RECLAIM_MAX_FEE_FRACTION_DENOMINATOR=e.RECLAIM_MAX_FEE_FRACTION_DENOMINATOR;exports.RECLAIM_MAX_FEE_FRACTION_NUMERATOR=e.RECLAIM_MAX_FEE_FRACTION_NUMERATOR;exports.RECLAIM_MAX_FEE_RATE_SATS_VB=e.RECLAIM_MAX_FEE_RATE_SATS_VB;exports.RECLAIM_WARN_FEE_FRACTION_NUMERATOR=e.RECLAIM_WARN_FEE_FRACTION_NUMERATOR;exports.REFUND_MAX_FEE_FRACTION_DENOMINATOR=e.REFUND_MAX_FEE_FRACTION_DENOMINATOR;exports.REFUND_MAX_FEE_FRACTION_NUMERATOR=e.REFUND_MAX_FEE_FRACTION_NUMERATOR;exports.REFUND_MAX_FEE_RATE_SATS_VB=e.REFUND_MAX_FEE_RATE_SATS_VB;exports.REFUND_VSIZE=e.REFUND_VSIZE;exports.ReclaimUneconomicalError=e.ReclaimUneconomicalError;exports.RegisteredVaultVersionMismatchError=e.RegisteredVaultVersionMismatchError;exports.SigningPlanMismatchError=e.SigningPlanMismatchError;exports.VaultIdBindingError=e.VaultIdBindingError;exports.activateVault=e.activateVault;exports.activateVaultAndRedeem=e.activateVaultAndRedeem;exports.assembleWatchtowerArtifacts=e.assembleWatchtowerArtifacts;exports.assembleWatchtowerArtifactsFromSignatures=e.assembleWatchtowerArtifactsFromSignatures;exports.assertArtifactsUsableForVault=e.assertArtifactsUsableForVault;exports.assertAssertBindsClaimAndPayout=e.assertAssertBindsClaimAndPayout;exports.assertChallengerSetMatchesVault=e.assertChallengerSetMatchesVault;exports.assertClaimSpendsVault=e.assertClaimSpendsVault;exports.assertPayoutPaysRegisteredScript=e.assertPayoutPaysRegisteredScript;exports.assertReturnedGraphMatchesFingerprint=e.assertReturnedGraphMatchesFingerprint;exports.assertTermsMatchVault=e.assertTermsMatchVault;exports.assertVaultProviderHintAccepted=e.assertVaultProviderHintAccepted;exports.buildAndBroadcastReclaim=e.buildAndBroadcastReclaim;exports.buildAndBroadcastRefund=e.buildAndBroadcastRefund;exports.claimExpiredVault=e.claimExpiredVault;exports.copyAssertConnectorLeaf=e.copyAssertConnectorLeaf;exports.deriveClaimerWotsKeypair=e.deriveClaimerWotsKeypair;exports.estimateRefundFeeSats=e.estimateRefundFeeSats;exports.fingerprintReturnedGraph=e.fingerprintReturnedGraph;exports.isApplicationEntryPointMismatchError=e.isApplicationEntryPointMismatchError;exports.isDepositAmountValid=e.isDepositAmountValid;exports.isHintAccepted=e.isHintAccepted;exports.isParticipantKeyDriftError=e.isParticipantKeyDriftError;exports.isPeginRegistrationMissingError=e.isPeginRegistrationMissingError;exports.isPeginRegistrationNotFinalError=e.isPeginRegistrationNotFinalError;exports.isRegisteredVaultVersionMismatchError=e.isRegisteredVaultVersionMismatchError;exports.matchKeyHint=e.matchKeyHint;exports.matchKeySetHint=e.matchKeySetHint;exports.planDelegatedClaimSigning=e.planDelegatedClaimSigning;exports.readDelegatedClaimVaultContext=e.readDelegatedClaimVaultContext;exports.readRefundPrePeginContext=e.readRefundPrePeginContext;exports.readStampedParticipantKeys=e.readStampedParticipantKeys;exports.resolveCurrentParticipantKeys=e.resolveCurrentParticipantKeys;exports.resolveParticipantKeysAtEpochs=e.resolveParticipantKeysAtEpochs;exports.runDepositorPresignFlow=e.runDepositorPresignFlow;exports.signDelegatedClaimPlan=e.signDelegatedClaimPlan;exports.signDepositorGraph=e.signDepositorGraph;exports.submitWotsPublicKey=e.submitWotsPublicKey;exports.summarizeWatchtowerArtifacts=e.summarizeWatchtowerArtifacts;exports.validateDepositAmount=e.validateDepositAmount;exports.validateMultiVaultDepositInputs=e.validateMultiVaultDepositInputs;exports.validateOnChainParticipantKeys=e.validateOnChainParticipantKeys;exports.validateProviderSelection=e.validateProviderSelection;exports.validateRemainingCapacity=e.validateRemainingCapacity;exports.validateVaultAmounts=e.validateVaultAmounts;exports.validateVaultProviderPubkey=e.validateVaultProviderPubkey;exports.verifyRegisteredParticipantKeys=e.verifyRegisteredParticipantKeys;exports.verifyRegisteredVaultVersions=e.verifyRegisteredVaultVersions;exports.waitForPeginRegistrationDepth=e.waitForPeginRegistrationDepth;exports.waitForPeginStatus=e.waitForPeginStatus;exports.ContractStatus=p.ContractStatus;exports.PeginAction=p.PeginAction;exports.activationDeadlineBlocksRemaining=p.activationDeadlineBlocksRemaining;exports.canPerformAction=p.canPerformAction;exports.getPeginProtocolState=p.getPeginProtocolState;exports.isActivationDeadlinePassedOnChain=p.isActivationDeadlinePassedOnChain;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const n=require("../../verifyScriptPathSchnorrSignature-BHskbJJx.cjs"),O=require("../../secp256k1-DDHQ1_za.cjs"),o=require("./wasm/index.cjs"),R=require("../../verifyKeyPathSchnorrSignature-BVrAmVL3.cjs"),E=require("../../challengeAssert-CuX_8Twt.cjs"),r=require("../../bitcoin-D-O2GjbC.cjs"),y=require("../../abortSignals-msbmbqFe.cjs"),I=require("../../signing-DvISftFk.cjs"),P=require("../../validation-C6XTfZak.cjs"),F=require("./utils/eth/index.cjs"),_=require("../../PeginManager-6ghglb4r.cjs"),d=require("../../PayoutManager-B5nR0x1t.cjs"),s=require("./clients/mempool/index.cjs"),l=require("../../registration-records-CKc0OVuK.cjs"),C=require("../../signer-set-reader-CJfV-GDz.cjs"),A=require("../../pegin-registration-client-DOb-Iznp.cjs"),h=require("../../types-BnZIbDHb.cjs"),V=require("../../ApplicationRegistry.abi-sMiTWmnL.cjs"),N=require("../../BTCVaultRegistry.abi-DzbfZ9_s.cjs"),u=require("../../BTCVaultRegistryKeyEpochs.abi-CReWFJdu.cjs"),M=require("../../ProtocolParams.abi-DWfIh6VH.cjs"),b=require("../../VaultErrors.abi-Hjn1CdLs.cjs"),v=require("../../buildVaultContextInputForClaim-9XZaqIiw.cjs"),S=require("../../deriveVaultRoot-C3uqnJto.cjs"),D=require("../../parseFundingOutpoints-C_-PT9BT.cjs"),U=require("../../btcTxHash-CGb5BqFL.cjs"),c=require("../../psbtInputFields-BrV_ZfL_.cjs"),i=require("../../fundPeginTransaction-54-Rwb2k.cjs"),T=require("../../reservation-D9ftyiwP.cjs"),m=require("../../index-Dn7RlsKK.cjs"),a=require("../../state-C4WoNCy1.cjs"),p=require("../../primeVpAuth-Ch-ig2My.cjs"),t=require("../../toRefundInputs-DyIgmGJq.cjs"),e=require("../../buildAndBroadcastReclaim-CXOMHHgK.cjs"),g=require("../../peginState-B4t_PDgj.cjs");exports.PEGIN_DEPOSITOR_CLAIM_VOUT=n.PEGIN_DEPOSITOR_CLAIM_VOUT;exports.PsbtSubstitutionError=n.PsbtSubstitutionError;exports.assertPsbtUnsignedTxMatches=n.assertPsbtUnsignedTxMatches;exports.assertScriptPathSchnorrSignature=n.assertScriptPathSchnorrSignature;exports.buildPayoutPsbt=n.buildPayoutPsbt;exports.buildPeginTxFromFundedPrePegin=n.buildPeginTxFromFundedPrePegin;exports.buildPrePeginPsbt=n.buildPrePeginPsbt;exports.computeNumLocalChallengers=n.computeNumLocalChallengers;exports.createPayoutScript=n.createPayoutScript;exports.deriveDepositorClaimDescriptor=n.deriveDepositorClaimDescriptor;exports.deriveDepositorClaimScriptPubKey=n.deriveDepositorClaimScriptPubKey;exports.extractPayoutSignature=n.extractPayoutSignature;exports.assertValidVaultCoreVersion=O.assertValidVaultCoreVersion;exports.attachFinalizedAssert=o.attachFinalizedAssert;exports.computeMinClaimValue=o.computeMinClaimValue;exports.computeMinPeginFee=o.computeMinPeginFee;exports.deriveVaultId=o.deriveVaultId;exports.expandAuthAnchor=o.expandAuthAnchor;exports.expandHashlockSecret=o.expandHashlockSecret;exports.expandWotsSeed=o.expandWotsSeed;exports.finalizePayout=o.finalizePayout;exports.finalizeWronglyChallenged=o.finalizeWronglyChallenged;exports.peginP2aAnchorOutput=o.peginP2aAnchorOutput;exports.pinPegoutProof=o.pinPegoutProof;exports.supportedTxGraphVersions=o.supportedTxGraphVersions;exports.validatePeginP2aAnchor=o.validatePeginP2aAnchor;exports.assertKeyPathSchnorrSignature=R.assertKeyPathSchnorrSignature;exports.assertReturnedKeyPathSignatures=R.assertReturnedKeyPathSignatures;exports.buildPeginInputPsbt=R.buildPeginInputPsbt;exports.extractPeginInputSignature=R.extractPeginInputSignature;exports.finalizePeginInputPsbt=R.finalizePeginInputPsbt;exports.buildChallengeAssertPsbt=E.buildChallengeAssertPsbt;exports.buildNoPayoutPsbt=E.buildNoPayoutPsbt;exports.buildReclaimPsbt=E.buildReclaimPsbt;exports.buildRefundPsbt=E.buildRefundPsbt;exports.estimateReclaimFeeSats=E.estimateReclaimFeeSats;exports.finalizeScriptPathWithSignatures=E.finalizeScriptPathWithSignatures;exports.reclaimVsize=E.reclaimVsize;exports.canonicalizeBtcPubkey=r.canonicalizeBtcPubkey;exports.deriveBip86ScriptPubKeyHex=r.deriveBip86ScriptPubKeyHex;exports.deriveNativeSegwitAddress=r.deriveNativeSegwitAddress;exports.deriveTaprootAddress=r.deriveTaprootAddress;exports.ensureHexPrefix=r.ensureHexPrefix;exports.formatSatoshisToBtc=r.formatSatoshisToBtc;exports.getNetwork=r.getNetwork;exports.getSortedXOnlyPubkeys=r.getSortedXOnlyPubkeys;exports.hexToUint8Array=r.hexToUint8Array;exports.isAddressFromPublicKey=r.isAddressFromPublicKey;exports.isValidHex=r.isValidHex;exports.processPublicKeyToXOnly=r.processPublicKeyToXOnly;exports.stripHexPrefix=r.stripHexPrefix;exports.toXOnly=r.toXOnly;exports.uint8ArrayToHex=r.uint8ArrayToHex;exports.validateWalletPubkey=r.validateWalletPubkey;exports.combineAbortSignals=y.combineAbortSignals;exports.createTaprootScriptPathSignOptions=I.createTaprootScriptPathSignOptions;exports.createTaprootScriptPathSignOptionsForInput=I.createTaprootScriptPathSignOptionsForInput;exports.BITCOIN_ADDRESS_RE=P.BITCOIN_ADDRESS_RE;exports.COMPRESSED_PUBKEY_HEX_LEN=P.COMPRESSED_PUBKEY_HEX_LEN;exports.HEX_RE=P.HEX_RE;exports.KNOWN_SCRIPT_PREFIXES=P.KNOWN_SCRIPT_PREFIXES;exports.MAX_REASONABLE_FEE_SATS=P.MAX_REASONABLE_FEE_SATS;exports.TXID_RE=P.TXID_RE;exports.X_ONLY_PUBKEY_HEX_LEN=P.X_ONLY_PUBKEY_HEX_LEN;exports.waitForTransactionReceiptSmartAware=F.waitForTransactionReceiptSmartAware;exports.PeginManager=_.PeginManager;exports.buildDepositTerms=_.buildDepositTerms;exports.computeWotsBlockPublicKeysHash=_.computeWotsBlockPublicKeysHash;exports.deriveWotsBlocksFromSeed=_.deriveWotsBlocksFromSeed;exports.ensurePrePeginTermsApproval=_.ensurePrePeginTermsApproval;exports.PayoutManager=d.PayoutManager;exports.computeHashlock=d.computeHashlock;exports.forwardDepositApproval=d.forwardDepositApproval;exports.requireChangeAddress=d.requireChangeAddress;exports.supportsDepositApproval=d.supportsDepositApproval;exports.validateSecretAgainstHashlock=d.validateSecretAgainstHashlock;exports.MEMPOOL_API_URLS=s.MEMPOOL_API_URLS;exports.MempoolNotFoundError=s.MempoolNotFoundError;exports.getAddressTxs=s.getAddressTxs;exports.getAddressUtxos=s.getAddressUtxos;exports.getMempoolApiUrl=s.getMempoolApiUrl;exports.getNetworkFees=s.getNetworkFees;exports.getOutspend=s.getOutspend;exports.getTipHeight=s.getTipHeight;exports.getTxHex=s.getTxHex;exports.getTxInfo=s.getTxInfo;exports.getUtxoInfo=s.getUtxoInfo;exports.pushTx=s.pushTx;exports.RegistrationLogsUnavailableError=l.RegistrationLogsUnavailableError;exports.VaultClaimableByNotFoundError=l.VaultClaimableByNotFoundError;exports.assertOnChainBtcPubkey=l.assertOnChainBtcPubkey;exports.assertRegisteredPayoutScriptBounds=l.assertRegisteredPayoutScriptBounds;exports.derivePeginVaultId=l.derivePeginVaultId;exports.findRegistrationRecord=l.findRegistrationRecord;exports.isRegistrationLogsUnavailableError=l.isRegistrationLogsUnavailableError;exports.isVaultClaimableByNotFoundError=l.isVaultClaimableByNotFoundError;exports.registrationPrePeginTxHash=l.registrationPrePeginTxHash;exports.validateOffchainParams=l.validateOffchainParams;exports.validatePegInConfiguration=l.validatePegInConfiguration;exports.validateTBVProtocolParams=l.validateTBVProtocolParams;exports.ViemOperationKeyReader=C.ViemOperationKeyReader;exports.ViemUniversalChallengerReader=C.ViemUniversalChallengerReader;exports.ViemVaultKeeperReader=C.ViemVaultKeeperReader;exports.resolveProtocolAddresses=C.resolveProtocolAddresses;exports.COMMISSION_BPS_HEADROOM=A.COMMISSION_BPS_HEADROOM;exports.MAX_ACCEPTABLE_COMMISSION_BPS_CAP=A.MAX_ACCEPTABLE_COMMISSION_BPS_CAP;exports.ViemPeginRegistrationClient=A.ViemPeginRegistrationClient;exports.ViemVaultRegistryReader=A.ViemVaultRegistryReader;exports.capMaxAcceptableCommissionBps=A.capMaxAcceptableCommissionBps;exports.OnChainBtcVaultStatus=h.OnChainBtcVaultStatus;exports.ViemProtocolParamsReader=h.ViemProtocolParamsReader;exports.ApplicationRegistryABI=V.ApplicationRegistryABI;exports.BTCVaultRegistryABI=N.BTCVaultRegistryABI;exports.BTCVaultRegistryKeyEpochsABI=u.BTCVaultRegistryKeyEpochsABI;exports.CONTRACT_ERRORS=u.CONTRACT_ERRORS;exports.EMPTY_REVERT_MESSAGE=u.EMPTY_REVERT_MESSAGE;exports.PEGIN_FINGERPRINT_CHANGED_SELECTOR=u.PEGIN_FINGERPRINT_CHANGED_SELECTOR;exports.PeginFingerprintChangedError=u.PeginFingerprintChangedError;exports.extractErrorData=u.extractErrorData;exports.getContractErrorMessage=u.getContractErrorMessage;exports.handleContractError=u.handleContractError;exports.isKnownContractError=u.isKnownContractError;exports.isPeginFingerprintChangedError=u.isPeginFingerprintChangedError;exports.ProtocolParamsABI=M.ProtocolParamsABI;exports.VAULT_ERROR_ABI=b.VAULT_ERROR_ABI;exports.buildVaultContextInputForClaim=v.buildVaultContextInputForClaim;exports.VAULT_APP_NAME=S.VAULT_APP_NAME;exports.buildFundingOutpointsCommitment=S.buildFundingOutpointsCommitment;exports.buildVaultContext=S.buildVaultContext;exports.deriveVaultRoot=S.deriveVaultRoot;exports.forwardDeriveContextHash=S.forwardDeriveContextHash;exports.parseFundingOutpointsFromTx=D.parseFundingOutpointsFromTx;exports.calculateBtcTxHash=U.calculateBtcTxHash;exports.BitcoinScriptType=c.BitcoinScriptType;exports.applyChangeOutputPolicy=c.applyChangeOutputPolicy;exports.computeChangeOutputFeeSats=c.computeChangeOutputFeeSats;exports.computeMaxDeposit=c.computeMaxDeposit;exports.computePeginBaseFeeSats=c.computePeginBaseFeeSats;exports.getDustThreshold=c.getDustThreshold;exports.getPsbtInputFields=c.getPsbtInputFields;exports.getScriptType=c.getScriptType;exports.selectUtxosForPegin=c.selectUtxosForPegin;exports.shouldAddChangeOutput=c.shouldAddChangeOutput;exports.BTC_DUST_SAT=i.BTC_DUST_SAT;exports.DUST_THRESHOLD=i.DUST_THRESHOLD;exports.LOW_RATE_ESTIMATION_ACCURACY_BUFFER=i.LOW_RATE_ESTIMATION_ACCURACY_BUFFER;exports.MAX_NON_LEGACY_OUTPUT_SIZE=i.MAX_NON_LEGACY_OUTPUT_SIZE;exports.MAX_REASONABLE_PEGIN_VBYTES=i.MAX_REASONABLE_PEGIN_VBYTES;exports.P2TR_INPUT_SIZE=i.P2TR_INPUT_SIZE;exports.PEGIN_AUTH_ANCHOR_OUTPUTS=i.PEGIN_AUTH_ANCHOR_OUTPUTS;exports.PEGIN_FIXED_OUTPUTS=i.PEGIN_FIXED_OUTPUTS;exports.SPLIT_TX_FEE_SAFETY_MULTIPLIER=i.SPLIT_TX_FEE_SAFETY_MULTIPLIER;exports.TX_BUFFER_SIZE_OVERHEAD=i.TX_BUFFER_SIZE_OVERHEAD;exports.WALLET_RELAY_FEE_RATE_THRESHOLD=i.WALLET_RELAY_FEE_RATE_THRESHOLD;exports.fundPeginTransaction=i.fundPeginTransaction;exports.parseUnfundedWasmTransaction=i.parseUnfundedWasmTransaction;exports.peginOutputCount=i.peginOutputCount;exports.rateBasedTxBufferFee=i.rateBasedTxBufferFee;exports.UtxoNotAvailableError=T.UtxoNotAvailableError;exports.assertUtxosAvailable=T.assertUtxosAvailable;exports.extractInputsFromTransaction=T.extractInputsFromTransaction;exports.findOverlappingPendingVaults=T.findOverlappingPendingVaults;exports.validateUtxosAvailable=T.validateUtxosAvailable;exports.VaultProviderRpcClient=m.VaultProviderRpcClient;exports.VpResponseValidationError=m.VpResponseValidationError;exports.batchPollByProvider=m.batchPollByProvider;exports.isUnrecognizedDaemonStatusError=m.isUnrecognizedDaemonStatusError;exports.validateRequestDepositorClaimerArtifactsResponse=m.validateRequestDepositorClaimerArtifactsResponse;exports.AUTH_REJECTED_RPC_CODE=a.AUTH_REJECTED_RPC_CODE;exports.ClaimerPegoutStatusValue=a.ClaimerPegoutStatusValue;exports.DaemonStatus=a.DaemonStatus;exports.JSON_RPC_ERROR_CODES=a.JSON_RPC_ERROR_CODES;exports.JsonRpcClient=a.JsonRpcClient;exports.JsonRpcError=a.JsonRpcError;exports.POST_WOTS_STATUSES=a.POST_WOTS_STATUSES;exports.PRE_DEPOSITOR_SIGNATURES_STATES=a.PRE_DEPOSITOR_SIGNATURES_STATES;exports.RpcErrorCode=a.RpcErrorCode;exports.VP_BATCH_MAX_SIZE=a.VP_BATCH_MAX_SIZE;exports.VP_TERMINAL_FAILURE_STATUSES=a.VP_TERMINAL_FAILURE_STATUSES;exports.VP_TRANSIENT_STATUSES=a.VP_TRANSIENT_STATUSES;exports.isAuthRejectedError=a.isAuthRejectedError;exports.isPegoutTerminalStatus=a.isPegoutTerminalStatus;exports.isRecognizedPegoutStatus=a.isRecognizedPegoutStatus;exports.ServerIdentityError=p.ServerIdentityError;exports.VpTokenRegistry=p.VpTokenRegistry;exports.createAuthenticatedVpClient=p.createAuthenticatedVpClient;exports.primeVpTokenRegistry=p.primeVpTokenRegistry;exports.verifyServerIdentity=p.verifyServerIdentity;exports.vpTokenRegistry=p.vpTokenRegistry;exports.DEPOSIT_TERMS_REJECTED_ERROR_NAME=t.DEPOSIT_TERMS_REJECTED_ERROR_NAME;exports.DepositTermsRejectedError=t.DepositTermsRejectedError;exports.PEGIN_FINGERPRINT_DOMAIN=t.PEGIN_FINGERPRINT_DOMAIN;exports.PEGIN_FINGERPRINT_DOMAIN_PREIMAGE=t.PEGIN_FINGERPRINT_DOMAIN_PREIMAGE;exports.PeginFingerprintInputError=t.PeginFingerprintInputError;exports.PeginParamsAmbiguousError=t.PeginParamsAmbiguousError;exports.PeginParamsIncompleteSpaceError=t.PeginParamsIncompleteSpaceError;exports.PeginParamsNotFoundError=t.PeginParamsNotFoundError;exports.PeginSizingIntegrityError=t.PeginSizingIntegrityError;exports.UnanchoredPrePeginError=t.UnanchoredPrePeginError;exports.VaultRootMismatchError=t.VaultRootMismatchError;exports.assertClaimBatchHomogeneous=t.assertClaimBatchHomogeneous;exports.buildPeginParamsCandidates=t.buildPeginParamsCandidates;exports.computeFundedPrePeginFee=t.computeFundedPrePeginFee;exports.computePeginFingerprint=t.computePeginFingerprint;exports.deriveHashlocksFromPrePegin=t.deriveHashlocksFromPrePegin;exports.describePeginParamsCandidate=t.describePeginParamsCandidate;exports.describeUnresolvedVersion=t.describeUnresolvedVersion;exports.encodePeginFingerprintPreimage=t.encodePeginFingerprintPreimage;exports.isDepositTermsRejectedError=t.isDepositTermsRejectedError;exports.isPeginFingerprintInputError=t.isPeginFingerprintInputError;exports.isWotsMismatchError=t.isWotsMismatchError;exports.orderClaimBatchByHtlcVout=t.orderClaimBatchByHtlcVout;exports.rebuildDepositTermsCore=t.rebuildDepositTermsCore;exports.rebuildDepositTermsForClaim=t.rebuildDepositTermsForClaim;exports.reconstructPeginParams=t.reconstructPeginParams;exports.selectSiblingRegistrations=t.selectSiblingRegistrations;exports.toRefundInputs=t.toRefundInputs;exports.ApplicationEntryPointMismatchError=e.ApplicationEntryPointMismatchError;exports.ArtifactsVaultMismatchError=e.ArtifactsVaultMismatchError;exports.AssertBindingError=e.AssertBindingError;exports.BIP68NotMatureError=e.BIP68NotMatureError;exports.ChallengerSetMismatchError=e.ChallengerSetMismatchError;exports.DELEGATED_CLAIM_TX_GRAPH_VERSION=e.DELEGATED_CLAIM_TX_GRAPH_VERSION;exports.DelegatedClaimSigningIncompleteError=e.DelegatedClaimSigningIncompleteError;exports.GraphFingerprintError=e.GraphFingerprintError;exports.PEGIN_ETH_CONFIRMATIONS=e.PEGIN_ETH_CONFIRMATIONS;exports.ParticipantKeyDriftError=e.ParticipantKeyDriftError;exports.PayoutDestinationError=e.PayoutDestinationError;exports.PayoutInputLeafError=e.PayoutInputLeafError;exports.PeginRegistrationMissingError=e.PeginRegistrationMissingError;exports.PeginRegistrationNotFinalError=e.PeginRegistrationNotFinalError;exports.RECLAIM_MAX_FEE_FRACTION_DENOMINATOR=e.RECLAIM_MAX_FEE_FRACTION_DENOMINATOR;exports.RECLAIM_MAX_FEE_FRACTION_NUMERATOR=e.RECLAIM_MAX_FEE_FRACTION_NUMERATOR;exports.RECLAIM_MAX_FEE_RATE_SATS_VB=e.RECLAIM_MAX_FEE_RATE_SATS_VB;exports.RECLAIM_WARN_FEE_FRACTION_NUMERATOR=e.RECLAIM_WARN_FEE_FRACTION_NUMERATOR;exports.REFUND_MAX_FEE_FRACTION_DENOMINATOR=e.REFUND_MAX_FEE_FRACTION_DENOMINATOR;exports.REFUND_MAX_FEE_FRACTION_NUMERATOR=e.REFUND_MAX_FEE_FRACTION_NUMERATOR;exports.REFUND_MAX_FEE_RATE_SATS_VB=e.REFUND_MAX_FEE_RATE_SATS_VB;exports.REFUND_VSIZE=e.REFUND_VSIZE;exports.ReclaimUneconomicalError=e.ReclaimUneconomicalError;exports.RefundBroadcastRejectedError=e.RefundBroadcastRejectedError;exports.RegisteredVaultVersionMismatchError=e.RegisteredVaultVersionMismatchError;exports.SigningPlanMismatchError=e.SigningPlanMismatchError;exports.UnsupportedPayoutScriptError=e.UnsupportedPayoutScriptError;exports.VaultIdBindingError=e.VaultIdBindingError;exports.activateVault=e.activateVault;exports.activateVaultAndRedeem=e.activateVaultAndRedeem;exports.assembleWatchtowerArtifacts=e.assembleWatchtowerArtifacts;exports.assembleWatchtowerArtifactsFromSignatures=e.assembleWatchtowerArtifactsFromSignatures;exports.assertArtifactsUsableForVault=e.assertArtifactsUsableForVault;exports.assertAssertBindsClaimAndPayout=e.assertAssertBindsClaimAndPayout;exports.assertChallengerSetMatchesVault=e.assertChallengerSetMatchesVault;exports.assertClaimSpendsVault=e.assertClaimSpendsVault;exports.assertPayoutPaysRegisteredScript=e.assertPayoutPaysRegisteredScript;exports.assertReturnedGraphMatchesFingerprint=e.assertReturnedGraphMatchesFingerprint;exports.assertStandardPayoutScriptsAtEpochs=e.assertStandardPayoutScriptsAtEpochs;exports.assertTermsMatchVault=e.assertTermsMatchVault;exports.assertVaultProviderHintAccepted=e.assertVaultProviderHintAccepted;exports.buildAndBroadcastReclaim=e.buildAndBroadcastReclaim;exports.buildAndBroadcastRefund=e.buildAndBroadcastRefund;exports.claimExpiredVault=e.claimExpiredVault;exports.copyAssertConnectorLeaf=e.copyAssertConnectorLeaf;exports.deriveClaimerWotsKeypair=e.deriveClaimerWotsKeypair;exports.estimateRefundFeeSats=e.estimateRefundFeeSats;exports.fingerprintReturnedGraph=e.fingerprintReturnedGraph;exports.isApplicationEntryPointMismatchError=e.isApplicationEntryPointMismatchError;exports.isDepositAmountValid=e.isDepositAmountValid;exports.isHintAccepted=e.isHintAccepted;exports.isParticipantKeyDriftError=e.isParticipantKeyDriftError;exports.isPeginRegistrationMissingError=e.isPeginRegistrationMissingError;exports.isPeginRegistrationNotFinalError=e.isPeginRegistrationNotFinalError;exports.isRegisteredVaultVersionMismatchError=e.isRegisteredVaultVersionMismatchError;exports.isUnsupportedPayoutScriptError=e.isUnsupportedPayoutScriptError;exports.matchKeyHint=e.matchKeyHint;exports.matchKeySetHint=e.matchKeySetHint;exports.planDelegatedClaimSigning=e.planDelegatedClaimSigning;exports.readDelegatedClaimVaultContext=e.readDelegatedClaimVaultContext;exports.readRefundPrePeginContext=e.readRefundPrePeginContext;exports.readStampedParticipantKeys=e.readStampedParticipantKeys;exports.resolveCurrentParticipantKeys=e.resolveCurrentParticipantKeys;exports.resolveParticipantKeysAtEpochs=e.resolveParticipantKeysAtEpochs;exports.runDepositorPresignFlow=e.runDepositorPresignFlow;exports.signDelegatedClaimPlan=e.signDelegatedClaimPlan;exports.signDepositorGraph=e.signDepositorGraph;exports.submitWotsPublicKey=e.submitWotsPublicKey;exports.summarizeWatchtowerArtifacts=e.summarizeWatchtowerArtifacts;exports.validateDepositAmount=e.validateDepositAmount;exports.validateMultiVaultDepositInputs=e.validateMultiVaultDepositInputs;exports.validateOnChainParticipantKeys=e.validateOnChainParticipantKeys;exports.validateProviderSelection=e.validateProviderSelection;exports.validateRemainingCapacity=e.validateRemainingCapacity;exports.validateVaultAmounts=e.validateVaultAmounts;exports.validateVaultProviderPubkey=e.validateVaultProviderPubkey;exports.verifyRegisteredParticipantKeys=e.verifyRegisteredParticipantKeys;exports.verifyRegisteredVaultVersions=e.verifyRegisteredVaultVersions;exports.waitForPeginRegistrationDepth=e.waitForPeginRegistrationDepth;exports.waitForPeginStatus=e.waitForPeginStatus;exports.ContractStatus=g.ContractStatus;exports.PeginAction=g.PeginAction;exports.activationDeadlineBlocksRemaining=g.activationDeadlineBlocksRemaining;exports.canPerformAction=g.canPerformAction;exports.getPeginProtocolState=g.getPeginProtocolState;exports.isActivationDeadlinePassedOnChain=g.isActivationDeadlinePassedOnChain;
2
2
  //# sourceMappingURL=index.cjs.map
@@ -1,15 +1,15 @@
1
- import { P as s, h as r, i as t, j as i, f as o, b as n, a as l, c as p, k as P, d as E, e as c, g as d } from "../../verifyScriptPathSchnorrSignature-BK-bd6w5.js";
1
+ import { P as s, h as r, i as t, j as i, f as o, b as n, a as l, c as p, k as P, d as E, e as c, g as d } from "../../verifyScriptPathSchnorrSignature-DLNGgm4j.js";
2
2
  import { a as g } from "../../secp256k1-BuxBFUHm.js";
3
3
  import { attachFinalizedAssert as R, computeMinClaimValue as A, computeMinPeginFee as _, deriveVaultId as S, expandAuthAnchor as T, expandHashlockSecret as C, expandWotsSeed as I, finalizePayout as f, finalizeWronglyChallenged as h, peginP2aAnchorOutput as V, pinPegoutProof as O, supportedTxGraphVersions as x, validatePeginP2aAnchor as b } from "./wasm/index.js";
4
- import { a as N, c as M, b as y, e as v, f as D } from "../../verifyKeyPathSchnorrSignature-CAp5zOTX.js";
5
- import { d as U, c as H, a as L, b as K, e as X, f as G, r as k } from "../../challengeAssert-CVxCGwBH.js";
4
+ import { a as N, c as y, b as M, e as v, f as D } from "../../verifyKeyPathSchnorrSignature-CIE3jlVt.js";
5
+ import { d as U, c as H, a as L, b as K, e as X, f as G, r as k } from "../../challengeAssert-D_lRvsO0.js";
6
6
  import { c as w, d as z, a as Y, b as j, e as J, f as Z, k as q, g as Q, h as $, i as aa, j as ea, p as sa, s as ra, t as ta, u as ia, v as oa } from "../../bitcoin-C-TuHb-v.js";
7
7
  import { c as la } from "../../abortSignals-BPpAUL1Z.js";
8
8
  import { c as Pa, a as Ea } from "../../signing-C1rR4tqs.js";
9
9
  import { B as da, C as ua, H as ga, K as ma, M as Ra, T as Aa, X as _a } from "../../validation-OSC0xTHB.js";
10
10
  import { waitForTransactionReceiptSmartAware as Ta } from "./utils/eth/index.js";
11
- import { P as Ia, b as fa, c as ha, d as Va, e as Oa } from "../../PeginManager-BvDlBR13.js";
12
- import { P as ba, c as Fa, f as Na, r as Ma, s as ya, v as va } from "../../PayoutManager-CkZ3mGXB.js";
11
+ import { P as Ia, b as fa, c as ha, d as Va, e as Oa } from "../../PeginManager-CXNqbgA4.js";
12
+ import { P as ba, c as Fa, f as Na, r as ya, s as Ma, v as va } from "../../PayoutManager-BHeiLQ1j.js";
13
13
  import { MEMPOOL_API_URLS as Ba, MempoolNotFoundError as Ua, getAddressTxs as Ha, getAddressUtxos as La, getMempoolApiUrl as Ka, getNetworkFees as Xa, getOutspend as Ga, getTipHeight as ka, getTxHex as Wa, getTxInfo as wa, getUtxoInfo as za, pushTx as Ya } from "./clients/mempool/index.js";
14
14
  import { R as Ja, V as Za, a as qa, f as Qa, d as $a, g as ae, e as ee, i as se, r as re, v as te, b as ie, c as oe } from "../../registration-records-D39ApuHS.js";
15
15
  import { V as le, a as pe, b as Pe, r as Ee } from "../../signer-set-reader-DiwLeqik.js";
@@ -17,7 +17,7 @@ import { C as de, M as ue, V as ge, a as me, c as Re } from "../../pegin-registr
17
17
  import { O as _e, V as Se } from "../../types-K_aM5GZO.js";
18
18
  import { A as Ce } from "../../ApplicationRegistry.abi-s8cQ1ooR.js";
19
19
  import { B as fe } from "../../BTCVaultRegistry.abi-DnP4UkB5.js";
20
- import { B as Ve, C as Oe, E as xe, P as be, a as Fe, e as Ne, g as Me, h as ye, i as ve, b as De } from "../../BTCVaultRegistryKeyEpochs.abi-Btg0nBz1.js";
20
+ import { B as Ve, C as Oe, E as xe, P as be, a as Fe, e as Ne, g as ye, h as Me, i as ve, b as De } from "../../BTCVaultRegistryKeyEpochs.abi-Btg0nBz1.js";
21
21
  import { P as Ue } from "../../ProtocolParams.abi-CuDl7AuC.js";
22
22
  import { V as Le } from "../../VaultErrors.abi-Dc3UnB_h.js";
23
23
  import { b as Xe } from "../../buildVaultContextInputForClaim-DhBoQKyN.js";
@@ -26,13 +26,13 @@ import { p as Je } from "../../parseFundingOutpoints-GSM-IaaK.js";
26
26
  import { c as qe } from "../../btcTxHash-BRZ8_EZq.js";
27
27
  import { B as $e, a as as, c as es, b as ss, d as rs, g as ts, h as is, f as os, s as ns, e as ls } from "../../psbtInputFields-CCVyaQMi.js";
28
28
  import { B as Ps, D as Es, L as cs, M as ds, c as us, P as gs, b as ms, a as Rs, S as As, T as _s, W as Ss, f as Ts, d as Cs, p as Is, r as fs } from "../../fundPeginTransaction-CwhRbCQC.js";
29
- import { U as Vs, a as Os, e as xs, f as bs, v as Fs } from "../../reservation-BZQABu4g.js";
30
- import { V as Ms, a as ys, b as vs, i as Ds, v as Bs } from "../../index-B-9aXMxk.js";
29
+ import { U as Vs, a as Os, e as xs, f as bs, v as Fs } from "../../reservation-BAj5n-H_.js";
30
+ import { V as ys, a as Ms, b as vs, i as Ds, v as Bs } from "../../index-B-9aXMxk.js";
31
31
  import { A as Hs, C as Ls, D as Ks, J as Xs, a as Gs, b as ks, d as Ws, P as ws, R as zs, e as Ys, c as js, V as Js, i as Zs, g as qs, f as Qs } from "../../state-CFn1rT74.js";
32
32
  import { S as ar, V as er, c as sr, p as rr, v as tr, a as ir } from "../../primeVpAuth-B0noJdcy.js";
33
- import { D as nr, g as lr, P as pr, a as Pr, b as Er, u as cr, v as dr, t as ur, w as gr, U as mr, V as Rr, f as Ar, m as _r, j as Sr, c as Tr, l as Cr, p as Ir, n as fr, e as hr, h as Vr, d as Or, i as xr, o as br, r as Fr, k as Nr, q as Mr, s as yr, x as vr } from "../../toRefundInputs-M4IbYwZU.js";
34
- import { J as Br, l as Ur, A as Hr, a8 as Lr, C as Kr, D as Xr, n as Gr, G as kr, u as Wr, W as wr, P as zr, j as Yr, v as jr, w as Jr, ai as Zr, aj as qr, ak as Qr, al as $r, ab as at, ac as et, ad as st, ae as rt, ag as tt, Z as it, S as ot, V as nt, a as lt, b as pt, d as Pt, e as Et, m as ct, f as dt, g as ut, t as gt, i as mt, B as Rt, o as At, a1 as _t, ah as St, a9 as Tt, c as Ct, k as It, h as ft, aa as ht, E as Vt, K as Ot, M as xt, a2 as bt, X as Ft, x as Nt, y as Mt, _ as yt, a3 as vt, a4 as Dt, p as Bt, r as Ut, af as Ht, a5 as Lt, a6 as Kt, a7 as Xt, F as Gt, q as kt, H as Wt, I as wt, s as zt, N as Yt, O as jt, L as Jt, Q as Zt, R as qt, T as Qt, U as $t, Y as ai, $ as ei, z as si, a0 as ri } from "../../buildAndBroadcastReclaim-rUsFRC5H.js";
35
- import { C as ii, P as oi, a as ni, c as li, g as pi, i as Pi } from "../../peginState-CIibG9S_.js";
33
+ import { D as nr, g as lr, P as pr, a as Pr, b as Er, u as cr, v as dr, t as ur, w as gr, U as mr, V as Rr, f as Ar, m as _r, j as Sr, c as Tr, l as Cr, p as Ir, n as fr, e as hr, h as Vr, d as Or, i as xr, o as br, r as Fr, k as Nr, q as yr, s as Mr, x as vr } from "../../toRefundInputs-Cl4KgzIc.js";
34
+ import { J as Br, l as Ur, A as Hr, ab as Lr, C as Kr, D as Xr, n as Gr, G as kr, u as Wr, W as wr, P as zr, j as Yr, v as jr, w as Jr, am as Zr, an as qr, ao as Qr, ap as $r, af as at, ag as et, ah as st, ai as rt, ak as tt, ac as it, a0 as ot, S as nt, X as lt, V as pt, a as Pt, b as Et, d as ct, e as dt, m as ut, f as gt, g as mt, t as Rt, i as At, B as _t, Y as St, o as Tt, a4 as Ct, al as It, ad as ft, c as ht, k as Vt, h as Ot, ae as xt, E as bt, K as Ft, M as Nt, a5 as yt, Z as Mt, x as vt, y as Dt, a1 as Bt, _ as Ut, a6 as Ht, a7 as Lt, p as Kt, r as Xt, aj as Gt, a8 as kt, a9 as Wt, aa as wt, F as zt, q as Yt, H as jt, I as Jt, s as Zt, N as qt, O as Qt, L as $t, Q as ai, R as ei, T as si, U as ri, $ as ti, a2 as ii, z as oi, a3 as ni } from "../../buildAndBroadcastReclaim-Bs_zdDGN.js";
35
+ import { C as pi, P as Pi, a as Ei, c as ci, g as di, i as ui } from "../../peginState-CXdbSit3.js";
36
36
  export {
37
37
  Hs as AUTH_REJECTED_RPC_CODE,
38
38
  Br as ApplicationEntryPointMismatchError,
@@ -50,7 +50,7 @@ export {
50
50
  Oe as CONTRACT_ERRORS,
51
51
  Kr as ChallengerSetMismatchError,
52
52
  Ls as ClaimerPegoutStatusValue,
53
- ii as ContractStatus,
53
+ pi as ContractStatus,
54
54
  Xr as DELEGATED_CLAIM_TX_GRAPH_VERSION,
55
55
  nr as DEPOSIT_TERMS_REJECTED_ERROR_NAME,
56
56
  Es as DUST_THRESHOLD,
@@ -86,7 +86,7 @@ export {
86
86
  zr as PayoutDestinationError,
87
87
  Yr as PayoutInputLeafError,
88
88
  ba as PayoutManager,
89
- oi as PeginAction,
89
+ Pi as PeginAction,
90
90
  Fe as PeginFingerprintChangedError,
91
91
  Er as PeginFingerprintInputError,
92
92
  Ia as PeginManager,
@@ -107,15 +107,17 @@ export {
107
107
  st as REFUND_MAX_FEE_RATE_SATS_VB,
108
108
  rt as REFUND_VSIZE,
109
109
  tt as ReclaimUneconomicalError,
110
- it as RegisteredVaultVersionMismatchError,
110
+ it as RefundBroadcastRejectedError,
111
+ ot as RegisteredVaultVersionMismatchError,
111
112
  Ja as RegistrationLogsUnavailableError,
112
113
  zs as RpcErrorCode,
113
114
  As as SPLIT_TX_FEE_SAFETY_MULTIPLIER,
114
115
  ar as ServerIdentityError,
115
- ot as SigningPlanMismatchError,
116
+ nt as SigningPlanMismatchError,
116
117
  Aa as TXID_RE,
117
118
  _s as TX_BUFFER_SIZE_OVERHEAD,
118
119
  mr as UnanchoredPrePeginError,
120
+ lt as UnsupportedPayoutScriptError,
119
121
  Vs as UtxoNotAvailableError,
120
122
  ke as VAULT_APP_NAME,
121
123
  Le as VAULT_ERROR_ABI,
@@ -123,8 +125,8 @@ export {
123
125
  js as VP_TERMINAL_FAILURE_STATUSES,
124
126
  Js as VP_TRANSIENT_STATUSES,
125
127
  Za as VaultClaimableByNotFoundError,
126
- nt as VaultIdBindingError,
127
- Ms as VaultProviderRpcClient,
128
+ pt as VaultIdBindingError,
129
+ ys as VaultProviderRpcClient,
128
130
  Rr as VaultRootMismatchError,
129
131
  le as ViemOperationKeyReader,
130
132
  ge as ViemPeginRegistrationClient,
@@ -132,43 +134,44 @@ export {
132
134
  pe as ViemUniversalChallengerReader,
133
135
  Pe as ViemVaultKeeperReader,
134
136
  me as ViemVaultRegistryReader,
135
- ys as VpResponseValidationError,
137
+ Ms as VpResponseValidationError,
136
138
  er as VpTokenRegistry,
137
139
  Ss as WALLET_RELAY_FEE_RATE_THRESHOLD,
138
140
  _a as X_ONLY_PUBKEY_HEX_LEN,
139
- lt as activateVault,
140
- pt as activateVaultAndRedeem,
141
- ni as activationDeadlineBlocksRemaining,
141
+ Pt as activateVault,
142
+ Et as activateVaultAndRedeem,
143
+ Ei as activationDeadlineBlocksRemaining,
142
144
  as as applyChangeOutputPolicy,
143
- Pt as assembleWatchtowerArtifacts,
144
- Et as assembleWatchtowerArtifactsFromSignatures,
145
- ct as assertArtifactsUsableForVault,
146
- dt as assertAssertBindsClaimAndPayout,
147
- ut as assertChallengerSetMatchesVault,
145
+ ct as assembleWatchtowerArtifacts,
146
+ dt as assembleWatchtowerArtifactsFromSignatures,
147
+ ut as assertArtifactsUsableForVault,
148
+ gt as assertAssertBindsClaimAndPayout,
149
+ mt as assertChallengerSetMatchesVault,
148
150
  Ar as assertClaimBatchHomogeneous,
149
- gt as assertClaimSpendsVault,
151
+ Rt as assertClaimSpendsVault,
150
152
  N as assertKeyPathSchnorrSignature,
151
153
  qa as assertOnChainBtcPubkey,
152
- mt as assertPayoutPaysRegisteredScript,
154
+ At as assertPayoutPaysRegisteredScript,
153
155
  t as assertPsbtUnsignedTxMatches,
154
156
  Qa as assertRegisteredPayoutScriptBounds,
155
- Rt as assertReturnedGraphMatchesFingerprint,
156
- M as assertReturnedKeyPathSignatures,
157
+ _t as assertReturnedGraphMatchesFingerprint,
158
+ y as assertReturnedKeyPathSignatures,
157
159
  i as assertScriptPathSchnorrSignature,
158
- At as assertTermsMatchVault,
160
+ St as assertStandardPayoutScriptsAtEpochs,
161
+ Tt as assertTermsMatchVault,
159
162
  Os as assertUtxosAvailable,
160
163
  g as assertValidVaultCoreVersion,
161
- _t as assertVaultProviderHintAccepted,
164
+ Ct as assertVaultProviderHintAccepted,
162
165
  R as attachFinalizedAssert,
163
166
  vs as batchPollByProvider,
164
- St as buildAndBroadcastReclaim,
165
- Tt as buildAndBroadcastRefund,
167
+ It as buildAndBroadcastReclaim,
168
+ ft as buildAndBroadcastRefund,
166
169
  U as buildChallengeAssertPsbt,
167
170
  fa as buildDepositTerms,
168
171
  We as buildFundingOutpointsCommitment,
169
172
  H as buildNoPayoutPsbt,
170
173
  o as buildPayoutPsbt,
171
- y as buildPeginInputPsbt,
174
+ M as buildPeginInputPsbt,
172
175
  _r as buildPeginParamsCandidates,
173
176
  n as buildPeginTxFromFundedPrePegin,
174
177
  l as buildPrePeginPsbt,
@@ -177,10 +180,10 @@ export {
177
180
  we as buildVaultContext,
178
181
  Xe as buildVaultContextInputForClaim,
179
182
  qe as calculateBtcTxHash,
180
- li as canPerformAction,
183
+ ci as canPerformAction,
181
184
  w as canonicalizeBtcPubkey,
182
185
  Re as capMaxAcceptableCommissionBps,
183
- Ct as claimExpiredVault,
186
+ ht as claimExpiredVault,
184
187
  la as combineAbortSignals,
185
188
  es as computeChangeOutputFeeSats,
186
189
  Sr as computeFundedPrePeginFee,
@@ -192,13 +195,13 @@ export {
192
195
  rs as computePeginBaseFeeSats,
193
196
  Tr as computePeginFingerprint,
194
197
  ha as computeWotsBlockPublicKeysHash,
195
- It as copyAssertConnectorLeaf,
198
+ Vt as copyAssertConnectorLeaf,
196
199
  sr as createAuthenticatedVpClient,
197
200
  P as createPayoutScript,
198
201
  Pa as createTaprootScriptPathSignOptions,
199
202
  Ea as createTaprootScriptPathSignOptionsForInput,
200
203
  z as deriveBip86ScriptPubKeyHex,
201
- ft as deriveClaimerWotsKeypair,
204
+ Ot as deriveClaimerWotsKeypair,
202
205
  E as deriveDepositorClaimDescriptor,
203
206
  c as deriveDepositorClaimScriptPubKey,
204
207
  Cr as deriveHashlocksFromPrePegin,
@@ -214,7 +217,7 @@ export {
214
217
  J as ensureHexPrefix,
215
218
  Oa as ensurePrePeginTermsApproval,
216
219
  X as estimateReclaimFeeSats,
217
- ht as estimateRefundFeeSats,
220
+ xt as estimateRefundFeeSats,
218
221
  T as expandAuthAnchor,
219
222
  C as expandHashlockSecret,
220
223
  I as expandWotsSeed,
@@ -228,20 +231,20 @@ export {
228
231
  h as finalizeWronglyChallenged,
229
232
  bs as findOverlappingPendingVaults,
230
233
  ae as findRegistrationRecord,
231
- Vt as fingerprintReturnedGraph,
234
+ bt as fingerprintReturnedGraph,
232
235
  Z as formatSatoshisToBtc,
233
236
  Na as forwardDepositApproval,
234
237
  Ye as forwardDeriveContextHash,
235
238
  Ts as fundPeginTransaction,
236
239
  Ha as getAddressTxs,
237
240
  La as getAddressUtxos,
238
- Me as getContractErrorMessage,
241
+ ye as getContractErrorMessage,
239
242
  ts as getDustThreshold,
240
243
  Ka as getMempoolApiUrl,
241
244
  q as getNetwork,
242
245
  Xa as getNetworkFees,
243
246
  Ga as getOutspend,
244
- pi as getPeginProtocolState,
247
+ di as getPeginProtocolState,
245
248
  is as getPsbtInputFields,
246
249
  os as getScriptType,
247
250
  Q as getSortedXOnlyPubkeys,
@@ -249,89 +252,90 @@ export {
249
252
  Wa as getTxHex,
250
253
  wa as getTxInfo,
251
254
  za as getUtxoInfo,
252
- ye as handleContractError,
255
+ Me as handleContractError,
253
256
  $ as hexToUint8Array,
254
- Pi as isActivationDeadlinePassedOnChain,
257
+ ui as isActivationDeadlinePassedOnChain,
255
258
  aa as isAddressFromPublicKey,
256
- Ot as isApplicationEntryPointMismatchError,
259
+ Ft as isApplicationEntryPointMismatchError,
257
260
  Zs as isAuthRejectedError,
258
- xt as isDepositAmountValid,
261
+ Nt as isDepositAmountValid,
259
262
  Vr as isDepositTermsRejectedError,
260
- bt as isHintAccepted,
263
+ yt as isHintAccepted,
261
264
  ve as isKnownContractError,
262
- Ft as isParticipantKeyDriftError,
265
+ Mt as isParticipantKeyDriftError,
263
266
  De as isPeginFingerprintChangedError,
264
267
  Or as isPeginFingerprintInputError,
265
- Nt as isPeginRegistrationMissingError,
266
- Mt as isPeginRegistrationNotFinalError,
268
+ vt as isPeginRegistrationMissingError,
269
+ Dt as isPeginRegistrationNotFinalError,
267
270
  qs as isPegoutTerminalStatus,
268
271
  Qs as isRecognizedPegoutStatus,
269
- yt as isRegisteredVaultVersionMismatchError,
272
+ Bt as isRegisteredVaultVersionMismatchError,
270
273
  ee as isRegistrationLogsUnavailableError,
271
274
  Ds as isUnrecognizedDaemonStatusError,
275
+ Ut as isUnsupportedPayoutScriptError,
272
276
  ea as isValidHex,
273
277
  se as isVaultClaimableByNotFoundError,
274
278
  xr as isWotsMismatchError,
275
- vt as matchKeyHint,
276
- Dt as matchKeySetHint,
279
+ Ht as matchKeyHint,
280
+ Lt as matchKeySetHint,
277
281
  br as orderClaimBatchByHtlcVout,
278
282
  Je as parseFundingOutpointsFromTx,
279
283
  Cs as parseUnfundedWasmTransaction,
280
284
  Is as peginOutputCount,
281
285
  V as peginP2aAnchorOutput,
282
286
  O as pinPegoutProof,
283
- Bt as planDelegatedClaimSigning,
287
+ Kt as planDelegatedClaimSigning,
284
288
  rr as primeVpTokenRegistry,
285
289
  sa as processPublicKeyToXOnly,
286
290
  Ya as pushTx,
287
291
  fs as rateBasedTxBufferFee,
288
- Ut as readDelegatedClaimVaultContext,
289
- Ht as readRefundPrePeginContext,
290
- Lt as readStampedParticipantKeys,
292
+ Xt as readDelegatedClaimVaultContext,
293
+ Gt as readRefundPrePeginContext,
294
+ kt as readStampedParticipantKeys,
291
295
  Fr as rebuildDepositTermsCore,
292
296
  Nr as rebuildDepositTermsForClaim,
293
297
  k as reclaimVsize,
294
- Mr as reconstructPeginParams,
298
+ yr as reconstructPeginParams,
295
299
  re as registrationPrePeginTxHash,
296
- Ma as requireChangeAddress,
297
- Kt as resolveCurrentParticipantKeys,
298
- Xt as resolveParticipantKeysAtEpochs,
300
+ ya as requireChangeAddress,
301
+ Wt as resolveCurrentParticipantKeys,
302
+ wt as resolveParticipantKeysAtEpochs,
299
303
  Ee as resolveProtocolAddresses,
300
- Gt as runDepositorPresignFlow,
301
- yr as selectSiblingRegistrations,
304
+ zt as runDepositorPresignFlow,
305
+ Mr as selectSiblingRegistrations,
302
306
  ns as selectUtxosForPegin,
303
307
  ls as shouldAddChangeOutput,
304
- kt as signDelegatedClaimPlan,
305
- Wt as signDepositorGraph,
308
+ Yt as signDelegatedClaimPlan,
309
+ jt as signDepositorGraph,
306
310
  ra as stripHexPrefix,
307
- wt as submitWotsPublicKey,
308
- zt as summarizeWatchtowerArtifacts,
311
+ Jt as submitWotsPublicKey,
312
+ Zt as summarizeWatchtowerArtifacts,
309
313
  x as supportedTxGraphVersions,
310
- ya as supportsDepositApproval,
314
+ Ma as supportsDepositApproval,
311
315
  vr as toRefundInputs,
312
316
  ta as toXOnly,
313
317
  ia as uint8ArrayToHex,
314
- Yt as validateDepositAmount,
315
- jt as validateMultiVaultDepositInputs,
318
+ qt as validateDepositAmount,
319
+ Qt as validateMultiVaultDepositInputs,
316
320
  te as validateOffchainParams,
317
- Jt as validateOnChainParticipantKeys,
321
+ $t as validateOnChainParticipantKeys,
318
322
  ie as validatePegInConfiguration,
319
323
  b as validatePeginP2aAnchor,
320
- Zt as validateProviderSelection,
321
- qt as validateRemainingCapacity,
324
+ ai as validateProviderSelection,
325
+ ei as validateRemainingCapacity,
322
326
  Bs as validateRequestDepositorClaimerArtifactsResponse,
323
327
  va as validateSecretAgainstHashlock,
324
328
  oe as validateTBVProtocolParams,
325
329
  Fs as validateUtxosAvailable,
326
- Qt as validateVaultAmounts,
327
- $t as validateVaultProviderPubkey,
330
+ si as validateVaultAmounts,
331
+ ri as validateVaultProviderPubkey,
328
332
  oa as validateWalletPubkey,
329
- ai as verifyRegisteredParticipantKeys,
330
- ei as verifyRegisteredVaultVersions,
333
+ ti as verifyRegisteredParticipantKeys,
334
+ ii as verifyRegisteredVaultVersions,
331
335
  tr as verifyServerIdentity,
332
336
  ir as vpTokenRegistry,
333
- si as waitForPeginRegistrationDepth,
334
- ri as waitForPeginStatus,
337
+ oi as waitForPeginRegistrationDepth,
338
+ ni as waitForPeginStatus,
335
339
  Ta as waitForTransactionReceiptSmartAware
336
340
  };
337
341
  //# sourceMappingURL=index.js.map
@@ -1,2 +1,2 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("../../../PeginManager-tP0Y-UCv.cjs"),a=require("../../../PayoutManager-C3p_cNHQ.cjs");exports.PeginManager=e.PeginManager;exports.PayoutManager=a.PayoutManager;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("../../../PeginManager-6ghglb4r.cjs"),a=require("../../../PayoutManager-B5nR0x1t.cjs");exports.PeginManager=e.PeginManager;exports.PayoutManager=a.PayoutManager;
2
2
  //# sourceMappingURL=index.cjs.map
@@ -1,5 +1,5 @@
1
- import { P as e } from "../../../PeginManager-BvDlBR13.js";
2
- import { P } from "../../../PayoutManager-CkZ3mGXB.js";
1
+ import { P as e } from "../../../PeginManager-CXNqbgA4.js";
2
+ import { P } from "../../../PayoutManager-BHeiLQ1j.js";
3
3
  export {
4
4
  P as PayoutManager,
5
5
  e as PeginManager
@@ -1,2 +1,2 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("../../../verifyScriptPathSchnorrSignature-cpUVCwU3.cjs"),s=require("../../../secp256k1-DDHQ1_za.cjs"),r=require("../wasm/index.cjs"),a=require("../../../verifyKeyPathSchnorrSignature-DDi3B6EL.cjs"),i=require("../../../challengeAssert-ea0EmRKe.cjs"),e=require("../../../bitcoin-D-O2GjbC.cjs");exports.PEGIN_DEPOSITOR_CLAIM_VOUT=t.PEGIN_DEPOSITOR_CLAIM_VOUT;exports.PsbtSubstitutionError=t.PsbtSubstitutionError;exports.assertPsbtUnsignedTxMatches=t.assertPsbtUnsignedTxMatches;exports.assertScriptPathSchnorrSignature=t.assertScriptPathSchnorrSignature;exports.buildPayoutPsbt=t.buildPayoutPsbt;exports.buildPeginTxFromFundedPrePegin=t.buildPeginTxFromFundedPrePegin;exports.buildPrePeginPsbt=t.buildPrePeginPsbt;exports.computeNumLocalChallengers=t.computeNumLocalChallengers;exports.createPayoutScript=t.createPayoutScript;exports.deriveDepositorClaimDescriptor=t.deriveDepositorClaimDescriptor;exports.deriveDepositorClaimScriptPubKey=t.deriveDepositorClaimScriptPubKey;exports.extractPayoutSignature=t.extractPayoutSignature;exports.assertValidVaultCoreVersion=s.assertValidVaultCoreVersion;exports.computeMinClaimValue=r.computeMinClaimValue;exports.computeMinPeginFee=r.computeMinPeginFee;exports.deriveVaultId=r.deriveVaultId;exports.peginP2aAnchorOutput=r.peginP2aAnchorOutput;exports.supportedTxGraphVersions=r.supportedTxGraphVersions;exports.validatePeginP2aAnchor=r.validatePeginP2aAnchor;exports.assertKeyPathSchnorrSignature=a.assertKeyPathSchnorrSignature;exports.assertReturnedKeyPathSignatures=a.assertReturnedKeyPathSignatures;exports.buildPeginInputPsbt=a.buildPeginInputPsbt;exports.extractPeginInputSignature=a.extractPeginInputSignature;exports.finalizePeginInputPsbt=a.finalizePeginInputPsbt;exports.buildChallengeAssertPsbt=i.buildChallengeAssertPsbt;exports.buildNoPayoutPsbt=i.buildNoPayoutPsbt;exports.buildReclaimPsbt=i.buildReclaimPsbt;exports.buildRefundPsbt=i.buildRefundPsbt;exports.estimateReclaimFeeSats=i.estimateReclaimFeeSats;exports.finalizeScriptPathWithSignatures=i.finalizeScriptPathWithSignatures;exports.reclaimVsize=i.reclaimVsize;exports.canonicalizeBtcPubkey=e.canonicalizeBtcPubkey;exports.deriveBip86ScriptPubKeyHex=e.deriveBip86ScriptPubKeyHex;exports.deriveNativeSegwitAddress=e.deriveNativeSegwitAddress;exports.deriveTaprootAddress=e.deriveTaprootAddress;exports.ensureHexPrefix=e.ensureHexPrefix;exports.formatSatoshisToBtc=e.formatSatoshisToBtc;exports.getSortedXOnlyPubkeys=e.getSortedXOnlyPubkeys;exports.hexToUint8Array=e.hexToUint8Array;exports.isAddressFromPublicKey=e.isAddressFromPublicKey;exports.isValidHex=e.isValidHex;exports.processPublicKeyToXOnly=e.processPublicKeyToXOnly;exports.stripHexPrefix=e.stripHexPrefix;exports.toXOnly=e.toXOnly;exports.uint8ArrayToHex=e.uint8ArrayToHex;exports.validateWalletPubkey=e.validateWalletPubkey;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("../../../verifyScriptPathSchnorrSignature-BHskbJJx.cjs"),s=require("../../../secp256k1-DDHQ1_za.cjs"),r=require("../wasm/index.cjs"),a=require("../../../verifyKeyPathSchnorrSignature-BVrAmVL3.cjs"),i=require("../../../challengeAssert-CuX_8Twt.cjs"),e=require("../../../bitcoin-D-O2GjbC.cjs");exports.PEGIN_DEPOSITOR_CLAIM_VOUT=t.PEGIN_DEPOSITOR_CLAIM_VOUT;exports.PsbtSubstitutionError=t.PsbtSubstitutionError;exports.assertPsbtUnsignedTxMatches=t.assertPsbtUnsignedTxMatches;exports.assertScriptPathSchnorrSignature=t.assertScriptPathSchnorrSignature;exports.buildPayoutPsbt=t.buildPayoutPsbt;exports.buildPeginTxFromFundedPrePegin=t.buildPeginTxFromFundedPrePegin;exports.buildPrePeginPsbt=t.buildPrePeginPsbt;exports.computeNumLocalChallengers=t.computeNumLocalChallengers;exports.createPayoutScript=t.createPayoutScript;exports.deriveDepositorClaimDescriptor=t.deriveDepositorClaimDescriptor;exports.deriveDepositorClaimScriptPubKey=t.deriveDepositorClaimScriptPubKey;exports.extractPayoutSignature=t.extractPayoutSignature;exports.assertValidVaultCoreVersion=s.assertValidVaultCoreVersion;exports.computeMinClaimValue=r.computeMinClaimValue;exports.computeMinPeginFee=r.computeMinPeginFee;exports.deriveVaultId=r.deriveVaultId;exports.peginP2aAnchorOutput=r.peginP2aAnchorOutput;exports.supportedTxGraphVersions=r.supportedTxGraphVersions;exports.validatePeginP2aAnchor=r.validatePeginP2aAnchor;exports.assertKeyPathSchnorrSignature=a.assertKeyPathSchnorrSignature;exports.assertReturnedKeyPathSignatures=a.assertReturnedKeyPathSignatures;exports.buildPeginInputPsbt=a.buildPeginInputPsbt;exports.extractPeginInputSignature=a.extractPeginInputSignature;exports.finalizePeginInputPsbt=a.finalizePeginInputPsbt;exports.buildChallengeAssertPsbt=i.buildChallengeAssertPsbt;exports.buildNoPayoutPsbt=i.buildNoPayoutPsbt;exports.buildReclaimPsbt=i.buildReclaimPsbt;exports.buildRefundPsbt=i.buildRefundPsbt;exports.estimateReclaimFeeSats=i.estimateReclaimFeeSats;exports.finalizeScriptPathWithSignatures=i.finalizeScriptPathWithSignatures;exports.reclaimVsize=i.reclaimVsize;exports.canonicalizeBtcPubkey=e.canonicalizeBtcPubkey;exports.deriveBip86ScriptPubKeyHex=e.deriveBip86ScriptPubKeyHex;exports.deriveNativeSegwitAddress=e.deriveNativeSegwitAddress;exports.deriveTaprootAddress=e.deriveTaprootAddress;exports.ensureHexPrefix=e.ensureHexPrefix;exports.formatSatoshisToBtc=e.formatSatoshisToBtc;exports.getSortedXOnlyPubkeys=e.getSortedXOnlyPubkeys;exports.hexToUint8Array=e.hexToUint8Array;exports.isAddressFromPublicKey=e.isAddressFromPublicKey;exports.isValidHex=e.isValidHex;exports.processPublicKeyToXOnly=e.processPublicKeyToXOnly;exports.stripHexPrefix=e.stripHexPrefix;exports.toXOnly=e.toXOnly;exports.uint8ArrayToHex=e.uint8ArrayToHex;exports.validateWalletPubkey=e.validateWalletPubkey;
2
2
  //# sourceMappingURL=index.cjs.map
@@ -1,8 +1,8 @@
1
- import { P as s, h as t, i as r, j as i, f as o, b as u, a as n, c as P, k as l, d, e as c, g as b } from "../../../verifyScriptPathSchnorrSignature-BK-bd6w5.js";
1
+ import { P as s, h as t, i as r, j as i, f as o, b as u, a as n, c as P, k as l, d, e as c, g as b } from "../../../verifyScriptPathSchnorrSignature-DLNGgm4j.js";
2
2
  import { a as g } from "../../../secp256k1-BuxBFUHm.js";
3
3
  import { computeMinClaimValue as x, computeMinPeginFee as S, deriveVaultId as y, peginP2aAnchorOutput as h, supportedTxGraphVersions as f, validatePeginP2aAnchor as v } from "../wasm/index.js";
4
- import { a as A, c as V, b as C, e as I, f as O } from "../../../verifyKeyPathSchnorrSignature-CAp5zOTX.js";
5
- import { d as F, c as H, a as R, b as k, e as z, f as D, r as M } from "../../../challengeAssert-CVxCGwBH.js";
4
+ import { a as A, c as V, b as C, e as I, f as O } from "../../../verifyKeyPathSchnorrSignature-CIE3jlVt.js";
5
+ import { d as F, c as H, a as R, b as k, e as z, f as D, r as M } from "../../../challengeAssert-D_lRvsO0.js";
6
6
  import { c as B, d as E, a as U, b as X, e as _, f as j, g as G, h as L, i as W, j as w, p as q, s as J, t as Q, u as Y, v as Z } from "../../../bitcoin-C-TuHb-v.js";
7
7
  export {
8
8
  s as PEGIN_DEPOSITOR_CLAIM_VOUT,
@@ -55,6 +55,12 @@ export interface ReconstructPeginParamsResult {
55
55
  peginAmounts: readonly bigint[];
56
56
  /** The transaction's `SHA256(authAnchor)` commitment, for the refund rebuild. */
57
57
  authAnchorHash: string;
58
+ /**
59
+ * The funded Pre-PegIn transaction this result was verified against,
60
+ * without `0x`. These are the bytes hashed into `terms.prepeginTxid`, so
61
+ * the refund spends the transaction that was actually checked.
62
+ */
63
+ fundedPrePeginTxHex: string;
58
64
  /** Size of the space actually trialled, for the recovery record. */
59
65
  candidatesTried: number;
60
66
  /**
@@ -1 +1 @@
1
- {"version":3,"file":"reconstructPeginParams.d.ts","sourceRoot":"","sources":["../../../../src/tbv/core/recovery/reconstructPeginParams.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAEH,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,uCAAuC,CAAC;AAGrE,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,+BAA+B,CAAC;AAelE,OAAO,EAGL,KAAK,oBAAoB,EACzB,KAAK,iBAAiB,EACvB,MAAM,yBAAyB,CAAC;AAkBjC,MAAM,WAAW,2BAA2B;IAC1C,2EAA2E;IAC3E,SAAS,EAAE,SAAS,MAAM,EAAE,CAAC;IAC7B,mEAAmE;IACnE,mBAAmB,EAAE,MAAM,CAAC;IAC5B,kEAAkE;IAClE,kBAAkB,EAAE,MAAM,CAAC;IAC3B;;;;OAIG;IACH,cAAc,EAAE,MAAM,CAAC;IACvB;;;;;OAKG;IACH,0BAA0B,EAAE,MAAM,CAAC;IACnC,OAAO,EAAE,OAAO,CAAC;IACjB,8DAA8D;IAC9D,UAAU,EAAE,SAAS,oBAAoB,EAAE,CAAC;IAC5C;;;;;;;;OAQG;IACH,kBAAkB,EAAE,SAAS,iBAAiB,EAAE,CAAC;CAClD;AAED,MAAM,WAAW,4BAA4B;IAC3C,yEAAyE;IACzE,SAAS,EAAE,oBAAoB,CAAC;IAChC;;;;;;;;OAQG;IACH,KAAK,EAAE,YAAY,CAAC;IACpB;;;OAGG;IACH,YAAY,EAAE,SAAS,MAAM,EAAE,CAAC;IAChC,iFAAiF;IACjF,cAAc,EAAE,MAAM,CAAC;IACvB,oEAAoE;IACpE,eAAe,EAAE,MAAM,CAAC;IACxB;;;;;;;;OAQG;IACH,iBAAiB,EAAE,SAAS,oBAAoB,EAAE,CAAC;CACpD;AAgGD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAuCG;AACH,wBAAsB,sBAAsB,CAC1C,KAAK,EAAE,2BAA2B,GACjC,OAAO,CAAC,4BAA4B,CAAC,CA+LvC"}
1
+ {"version":3,"file":"reconstructPeginParams.d.ts","sourceRoot":"","sources":["../../../../src/tbv/core/recovery/reconstructPeginParams.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAEH,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,uCAAuC,CAAC;AAGrE,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,+BAA+B,CAAC;AAelE,OAAO,EAGL,KAAK,oBAAoB,EACzB,KAAK,iBAAiB,EACvB,MAAM,yBAAyB,CAAC;AAkBjC,MAAM,WAAW,2BAA2B;IAC1C,2EAA2E;IAC3E,SAAS,EAAE,SAAS,MAAM,EAAE,CAAC;IAC7B,mEAAmE;IACnE,mBAAmB,EAAE,MAAM,CAAC;IAC5B,kEAAkE;IAClE,kBAAkB,EAAE,MAAM,CAAC;IAC3B;;;;OAIG;IACH,cAAc,EAAE,MAAM,CAAC;IACvB;;;;;OAKG;IACH,0BAA0B,EAAE,MAAM,CAAC;IACnC,OAAO,EAAE,OAAO,CAAC;IACjB,8DAA8D;IAC9D,UAAU,EAAE,SAAS,oBAAoB,EAAE,CAAC;IAC5C;;;;;;;;OAQG;IACH,kBAAkB,EAAE,SAAS,iBAAiB,EAAE,CAAC;CAClD;AAED,MAAM,WAAW,4BAA4B;IAC3C,yEAAyE;IACzE,SAAS,EAAE,oBAAoB,CAAC;IAChC;;;;;;;;OAQG;IACH,KAAK,EAAE,YAAY,CAAC;IACpB;;;OAGG;IACH,YAAY,EAAE,SAAS,MAAM,EAAE,CAAC;IAChC,iFAAiF;IACjF,cAAc,EAAE,MAAM,CAAC;IACvB;;;;OAIG;IACH,mBAAmB,EAAE,MAAM,CAAC;IAC5B,oEAAoE;IACpE,eAAe,EAAE,MAAM,CAAC;IACxB;;;;;;;;OAQG;IACH,iBAAiB,EAAE,SAAS,oBAAoB,EAAE,CAAC;CACpD;AAgGD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAuCG;AACH,wBAAsB,sBAAsB,CAC1C,KAAK,EAAE,2BAA2B,GACjC,OAAO,CAAC,4BAA4B,CAAC,CAgMvC"}
@@ -29,8 +29,6 @@ export interface ToRefundInputsOptions {
29
29
  * survives the reorg untouched.
30
30
  */
31
31
  applicationEntryPoint: Address;
32
- /** Funded Pre-PegIn transaction hex, `0x` optional. */
33
- fundedPrePeginTxHex: string;
34
32
  /** Hashlocks indexed by `htlcVout`, as passed to the reconstruction. */
35
33
  hashlocks: readonly string[];
36
34
  /**
@@ -1 +1 @@
1
- {"version":3,"file":"toRefundInputs.d.ts","sourceRoot":"","sources":["../../../../src/tbv/core/recovery/toRefundInputs.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;GAkBG;AAEH,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,uCAAuC,CAAC;AACrE,OAAO,KAAK,EAAE,OAAO,EAAO,MAAM,MAAM,CAAC;AAGzC,OAAO,KAAK,EACV,qBAAqB,EACrB,eAAe,EAChB,MAAM,4CAA4C,CAAC;AAEpD,OAAO,KAAK,EAAE,4BAA4B,EAAE,MAAM,0BAA0B,CAAC;AAE7E,MAAM,WAAW,qBAAqB;IACpC;;;;OAIG;IACH,QAAQ,EAAE,MAAM,CAAC;IACjB;;;;;;;;;;;OAWG;IACH,kBAAkB,EAAE,MAAM,CAAC;IAC3B;;;;;OAKG;IACH,qBAAqB,EAAE,OAAO,CAAC;IAC/B,uDAAuD;IACvD,mBAAmB,EAAE,MAAM,CAAC;IAC5B,wEAAwE;IACxE,SAAS,EAAE,SAAS,MAAM,EAAE,CAAC;IAC7B;;;;;OAKG;IACH,OAAO,EAAE,OAAO,CAAC;CAClB;AAED,MAAM,WAAW,wBAAwB;IACvC,KAAK,EAAE,eAAe,CAAC;IACvB,OAAO,EAAE,qBAAqB,CAAC;CAChC;AAED;;;;;;;;;;;GAWG;AACH,wBAAgB,cAAc,CAC5B,MAAM,EAAE,4BAA4B,EACpC,OAAO,EAAE,qBAAqB,GAC7B,wBAAwB,CAuE1B"}
1
+ {"version":3,"file":"toRefundInputs.d.ts","sourceRoot":"","sources":["../../../../src/tbv/core/recovery/toRefundInputs.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;GAkBG;AAEH,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,uCAAuC,CAAC;AACrE,OAAO,KAAK,EAAE,OAAO,EAAO,MAAM,MAAM,CAAC;AAGzC,OAAO,KAAK,EACV,qBAAqB,EACrB,eAAe,EAChB,MAAM,4CAA4C,CAAC;AAEpD,OAAO,KAAK,EAAE,4BAA4B,EAAE,MAAM,0BAA0B,CAAC;AAE7E,MAAM,WAAW,qBAAqB;IACpC;;;;OAIG;IACH,QAAQ,EAAE,MAAM,CAAC;IACjB;;;;;;;;;;;OAWG;IACH,kBAAkB,EAAE,MAAM,CAAC;IAC3B;;;;;OAKG;IACH,qBAAqB,EAAE,OAAO,CAAC;IAC/B,wEAAwE;IACxE,SAAS,EAAE,SAAS,MAAM,EAAE,CAAC;IAC7B;;;;;OAKG;IACH,OAAO,EAAE,OAAO,CAAC;CAClB;AAED,MAAM,WAAW,wBAAwB;IACvC,KAAK,EAAE,eAAe,CAAC;IACvB,OAAO,EAAE,qBAAqB,CAAC;CAChC;AAED;;;;;;;;;;;GAWG;AACH,wBAAgB,cAAc,CAC5B,MAAM,EAAE,4BAA4B,EACpC,OAAO,EAAE,qBAAqB,GAC7B,wBAAwB,CAsE1B"}
@@ -7,7 +7,7 @@ export { signDepositorGraph, type DepositorGraphSigningContext, type SignDeposit
7
7
  export { submitWotsPublicKey, type SubmitWotsPublicKeyParams, } from './submitWotsPublicKey';
8
8
  export { ApplicationEntryPointMismatchError, isApplicationEntryPointMismatchError, validateOnChainParticipantKeys, type ValidateOnChainParticipantKeysParams, type ValidatedOnChainParticipantKeys, } from './validateOnChainParticipantKeys';
9
9
  export { isDepositAmountValid, validateDepositAmount, validateMultiVaultDepositInputs, validateProviderSelection, validateRemainingCapacity, validateVaultAmounts, validateVaultProviderPubkey, type DepositFormValidityParams, type MultiVaultDepositFlowInputs, type RemainingCapacityParams, type ValidationResult, } from './validation';
10
- export { ParticipantKeyDriftError, isParticipantKeyDriftError, verifyRegisteredParticipantKeys, type VerifyRegisteredParticipantKeysParams, } from './verifyRegisteredParticipantKeys';
10
+ export { ParticipantKeyDriftError, UnsupportedPayoutScriptError, assertStandardPayoutScriptsAtEpochs, isParticipantKeyDriftError, isUnsupportedPayoutScriptError, verifyRegisteredParticipantKeys, type VerifyRegisteredParticipantKeysParams, } from './verifyRegisteredParticipantKeys';
11
11
  export { RegisteredVaultVersionMismatchError, isRegisteredVaultVersionMismatchError, verifyRegisteredVaultVersions, type VerifyRegisteredVaultVersionsParams, } from './verifyRegisteredVaultVersions';
12
12
  export { waitForPeginStatus, type WaitForPeginStatusParams, } from './waitForPeginStatus';
13
13
  //# sourceMappingURL=index.d.ts.map