Cashu-TS - v4.0.0-rc3
    Preparing search index...

    Function parseP2PKSecret

    • Parse a P2PK Secret and validate NUT-10 shape and NUT-11 tag-level constraints.

      Parameters

      • secret: string | Secret

        The Proof secret.

      Returns Secret

      Secret object.

      Layer 1 validation: Checks NUT-10 structure, rejects duplicate P2PK tag keys, and validates sigflag value. Does NOT validate cross-tag semantics (e.g. n_sigs <= pubkeys) — use verifyP2PKSpendingConditions for full semantic validation.

      If the NUT-10 secret is malformed, tags are duplicated, or sigflag is unrecognised.