Racket
7 Explicit issuer worker🔗ℹ
Server processes explicitly require commerce/issuer. This
module imports the published permit/issuer signing surface;
the default facade never does. The worker owns no durable state: every
decision derives from the claimed outbox row, the pinned catalog, and
recorded lineage.
| (make-issuance-worker | | | | | #:catalog catalog | | | | | #:issuer issuer | | | | | #:private-key private-key | | | | | #:key-id key-id | | | | | #:trust-store trust-store | | | | [ | #:clock clock | | | | | #:owner owner | | | | | #:lease-seconds lease-seconds | | | | | #:transient-backoff-seconds transient-backoff | | | | | #:operator-backoff-seconds operator-backoff]) | |
|
| → issuance-worker? |
| catalog : permit-policy-catalog? |
| issuer : string? |
| private-key : any/c |
| key-id : string? |
| trust-store : any/c |
| clock : procedure? = default-clock |
| owner : string? = default-owner |
|
|
|
Binds one reviewed catalog, issuer identity, Ed25519 private key, trust
store key id, and trust store behind one opaque worker value. The private
key is never exposed by an accessor. The clock returns two values, an epoch
second and its RFC 3339 string; the default reads wall-clock UTC.
Claims one due outbox row and drives it: deterministic dead ends are
released with their typed commerce code and an operator backoff before any
signing; a grant with no lineage signs revision zero and a withdrawal signs
an issuance-expiring successor naming the latest revision; the exact
recorded bytes are signed outside the claim transaction, and the revision,
the signed envelope, and a one-time claim are recorded in one transaction.
The result’s claim token is delivered to the caller exactly once for a
single customer handoff. Returns #f when nothing is due.
Dispositions: 'completed with the storage completion record and
claim token, 'released with the typed error code, or
'lease-lost when the lease expired between claim and completion, in
which case nothing was written. Permit signing failures release as
'permit-issue-failed with the transient backoff; the same durable
work completes after repair.
One worker turn’s outcome.
Deterministic lineage identifier. Reprocessing never allocates a second
lineage or revision; a crash after signing converges because Ed25519
re-signs identical bytes to an identical signature.
Deterministic credential identifier for one lineage revision.