Cashu-TS - v3.3.0
    Preparing search index...

    Function verifyHTLCSpendingConditions

    • Verify HTLC spending conditions for a single input.

      Two spending paths are available:

      1. Hashlock path: Preimage + signatures from the main pubkeys (always valid)
      2. Refund path: signatures from refund pubkeys (only valid after locktime)

      In addition, if the lock has expired and no refund keys are present, the proof is considered unlocked and spendable without witness signatures.

      Parameters

      • proof: Proof

        The Proof to check.

      • logger: Logger = NULL_LOGGER

        Optional logger (default: NULL_LOGGER)

      • Optionalmessage: string

        Optional. The message to sign (for SIG_ALL)

      Returns P2PKVerificationResult

      A P2PKVerificationResult describing the spending outcome.

      Returns a detailed P2PKVerificationResult showing the conditions. If you just want a boolean result, use isP2PKSpendAuthorised().

      If verification is impossible.