Server SDK Reference
This page documents the full server-side API for the Persona Relay SDK.
Installation
Node.js
Go
Available on npm as @persona/sdk-node.
Constructor
Node.js
Go
Arguments — PersonaOptions
Methods
Node.js
Go
Relay methods are available on the persona.relays namespace.
create
Creates a Persona relay session. No API key required.
Node.js
Go
Arguments — CreateRelayParams
Returns — CreateRelayResponse
issuePrivacyPass
Runs the full blind RSA issuance flow and returns a Privacy Pass token. The SDK handles all cryptography internally.
How does this work?
Curious how the Privacy Pass protocol works under the hood? See Privacy Pass Protocol for a full walkthrough — relevant if you’re implementing this yourself without the SDK.
Issuance depends only on the claim type — it is not tied to a relay, so it can run at any time, including before the relay is created.
Issue against the same claim type as your relay
The signing key the SDK fetches is determined by the claim type you pass, so each Privacy Pass is bound to that claim type. A pass can only redeem a relay created with the same claim type — if they don’t match, the pass won’t be able to redeem the claim.
Node.js
Go
Arguments — IssuePrivacyPassParams
Returns — IssuePrivacyPassResponse
generateClaim
Redeems the Privacy Pass token against Persona and returns the claim payload.
Node.js
Go
If you created the relay session with an encryptionKeyPem, claimPayload will be a base64-encoded RSA-OAEP ciphertext. Decrypt it with your corresponding private key.
Arguments — GenerateClaimParams
Returns — GenerateClaimResponse
Error handling
Node.js
Go
All Persona API errors and network failures throw a subtype of PersonaError.
See Error responses for the raw JSON error shape returned by the API.

