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

    Function signP2PKProof

    • Signs a single proof with the provided private key if required.

      Parameters

      • proof: Proof

        A proof to sign.

      • privateKey: PrivKey

        A single private key (hex string or Uint8Array).

      • Optionalmessage: string

        Required for SIG_ALL proofs; not accepted for SIG_INPUTS proofs.

      Returns Proof

      Signed proofs.

      Will only sign if the proof requires a signature from the key.

      Error if signature is not required, proof is already signed, a message is missing for a SIG_ALL proof, or given for a SIG_INPUTS proof.