Cashu-TS - v4.13.0
    Preparing search index...

    Function canSpendP2PKWithKeys

    • Internal

      Whether privkeys can spend a P2PK or HTLC locked proof at now, without a preimage.

      Parameters

      • proof: Pick<Proof, "secret" | "p2pk_e">
      • privkeys: string[]
      • now: number = ...

      Returns boolean

      Main path: n_sigs of the main keys (never HTLC, which also needs the preimage). After the locktime: n_sigs_refund of the refund keys, or none without them. Keys match by x coordinate, and through p2pk_e for a blinded proof (NUT-28).

      If the secret is not P2PK/HTLC or its tags break the NUT-11 rules.