Passkeys
A passkey lets a device open sessions on an account without asking the wallet each time. The owner signs once to register the passkey together with a ceiling, the most any session it opens may do. After that, the passkey alone can open sessions within the ceiling, using the device’s own unlock such as Face ID, Touch ID, Windows Hello or a security key.
A passkey is never the account’s login or owner. Sessions it opens can trade within the ceiling, but can never withdraw or transfer funds, approve a builder, change the ceiling or register another passkey.
Passkeys are rolling out gradually, so access may be limited during rollout. A request from an account that does not have access yet returns 403 PASSKEYS_DISABLED or 403 SESSIONS_DISABLED.
Passkeys are currently first party only. The challenge endpoint returns the one relying party ID (rp_id) a passkey can use, and WebAuthn ties a passkey to that domain, so apps on other domains cannot register or use passkeys.
Get a challenge
Every passkey ceremony starts with a single use challenge, consumed by the first request that uses it. A registration challenge expires after five minutes and a session challenge after two.
Response 200
Register a passkey
Create the credential
Call navigator.credentials.create with the registration challenge, user.id set to user_handle and rp.id set to rp_id. Request a discoverable credential (residentKey: "required"), user verification, the ES256 algorithm and attestation none.
Build the PasskeyGrant
Fill in the fields below with the new credential’s id and public key, and the ceiling you want.
The owner signs it
EVM owned accounts sign it as EIP-712 and Starknet owned accounts as SNIP-12, exactly as for a session grant, with PasskeyGrant as the primary type.
PasskeyGrant
Passkey:
Ceiling:
A registered ceiling cannot be changed. To widen it, for example to add trade:rfq, register a new passkey. A passkey session that lists trade:rfq uses RFQs under the same conditions as any other session, described in Scopes.
PasskeyGrant typed data types
EIP-712 field types, in signed order. SNIP-12 uses the same names and order, with shortstring for paradexChain and environment, ContractAddress for account and builderAccount, felt for nonce, timestamp for issuedAt and expiresAt, u128 for maxSessionTtl and maxConcurrentSessions, shortstring* for scopes and markets, and ContractAddress* for subaccounts.
Request
Response 200: the passkey object.
Open a session with a passkey
Build the SessionMint
Generate a fresh session key and fill in a SessionMint with the challenge as its nonce.
Sign it with the passkey
Compute the SNIP-12 revision 1 message hash of the SessionMint, using the same domain as a session grant and 0x0 as the account, since a mint names no account. Pass its 32 bytes, base64url encoded, as the challenge of navigator.credentials.get, with rpId set to the passkey’s rp_id. Leave allowCredentials empty to let the user pick any passkey they hold for the site, or set it to one credential id to require that passkey.
SessionMint
A SessionMint names neither the account nor the passkey. The server finds the passkey from the assertion’s credential id, and the account from that passkey’s grant.
Request
Response 200: the same grant_id, expires_at and accounts as POST /v2/sessions, plus account (the account the passkey opens sessions for), credential_id, owner_signer_type (stark or eip191), owner_wallet, passkey_expires_at in milliseconds, and the session’s limits. A client that let the user pick any passkey learns the account here. The session key then signs in with POST /v1/auth/{public_key}, and the session appears in GET /v2/sessions with source set to passkey. Revoke it with DELETE /v2/sessions/{grant_id} like any other session.
List passkeys
Returns the account’s passkeys, revoked ones included, newest first, as { "results": [ <passkey>, ... ] }. The owner’s main key session sees every passkey; a session a passkey opened sees only that passkey.
The passkey object
Revoke a passkey
Revokes the passkey, then every session it opened. Resting orders are kept. The owner’s main key session can revoke any passkey on the account, and a session a passkey opened can revoke that passkey. Revoking a passkey that is already revoked succeeds.
Response 204 with no body. Returns 403 for a caller that is neither the owner’s main key session nor a passkey’s session, and 404 for an unknown id or a session opened by a different passkey.