Produces a MarmotAuthorizationProof by asking an external Nostr event signer to sign
the exact proof event, then strictly validating the returned event before extracting the
envelope (spec "Producing a proof" steps 2-5). createdAt defaults to the producer's
current Unix time in whole seconds when omitted; an injected createdAt is used verbatim.
The signer pubkey, created_at, and template are validated before the signer is ever
invoked (so an invalid request never reaches the signer). The returned event's pubkey,
created_at, kind, tags, and content must exactly equal the request, its id must
equal the recomputed NIP-01 id, and its signature must verify — each substituted field
yields its own returned-* reason, checked in that order. No hex string is
case-normalized: canonical-encoding.md ("Text") requires byte/text equality, not
case-insensitive comparison.
A throw or rejection from signer.signEvent propagates unchanged — that is a signing
failure, not a proof rejection.
Produces a
MarmotAuthorizationProofby asking an external Nostr event signer to sign the exact proof event, then strictly validating the returned event before extracting the envelope (spec "Producing a proof" steps 2-5).createdAtdefaults to the producer's current Unix time in whole seconds when omitted; an injectedcreatedAtis used verbatim.The signer pubkey,
created_at, and template are validated before the signer is ever invoked (so an invalid request never reaches the signer). The returned event'spubkey,created_at,kind,tags, andcontentmust exactly equal the request, itsidmust equal the recomputed NIP-01 id, and its signature must verify — each substituted field yields its ownreturned-*reason, checked in that order. No hex string is case-normalized: canonical-encoding.md ("Text") requires byte/text equality, not case-insensitive comparison.A throw or rejection from
signer.signEventpropagates unchanged — that is a signing failure, not a proof rejection.