Private account and private-webhook operations can require both a developer key
and the matching wallet session. Restricted order requests instead require the
developer key plus the user’s
aura_trade_… authorization and do not require an
unrelated session bearer. Supplying more scopes to a developer key never
substitutes for user consent.
Developer keys
Send a developer key only in this header:public:readandmarket:readrealtime:publicaccount:readtransactions:readtrade:placeandtrade:cancelwebhooks:manage
key.builderCode is the immutable public attribution identity bound to the
key owner. It is not secret and grants no authority. For a trading integration,
give the user this exact code when they create restricted access in Aura’s
first-party console and use a developer key with the required trade:* scopes;
the order facade verifies that the authorization binding matches the presented
key. Key rotation preserves the code.
Establish a wallet session
1
Request a one-time challenge
2
Sign the exact challenge text
Use the wallet’s
signMessage operation with the Alephium message hasher.
Do not ask for, export, or handle the wallet seed. Aura has no raw seed
export flow.3
Exchange the signature
aura_session cookie and a CSRF token
in the response. Echo the CSRF token in x-csrf-token on session-owned
mutations.r || s secp256k1 signature encoded as lowercase
hex. It is not DER and has no recovery byte.
Browser cookie versus backend bearer
Browsers should keep the session in the HttpOnly cookie:issueToken: true when exchanging the challenge and send
the returned token as:
Authorization header automatically. Store the token like any other secret;
never put it in a query string, application log or browser localStorage.
Compose builder and user credentials
Restricted trading authority
API trading uses a separate, user-created authorization held by Aura’s enclave. It is narrowly limited by account, environment, market/outcome permissions, BUY/SELL caps, expiry and builder attribution. The API signs and submits an authorized intent internally; intent signatures and cancel signatures are not returned to the builder. Users can inspect, rotate and revoke that authorization. Revoking a developer key stops the builder identity; revoking the user authorization stops its trading power. Treat these as independent controls. Creation, rotation and revocation deliberately remain in Aura’s signer iframe and first-party authorization console, where each high-authority action is bound to explicit user consent. Theaura_trade_… secret is shown once and delivered
to the builder the user selected. The builder must place it directly in a
server-side secret store and send it only in
x-aura-trading-authorization alongside its developer key.
The builder API and @aura/builder-sdk cannot mint or broaden an authorization.
Do not call wallet-svc or enclave internal routes.
The first-party console keeps the same idempotency key when a create or rotation
has an ambiguous transport failure. The authorization service never replays a
show-once secret: if the write committed but the response was lost, the console
reloads the resulting authorization ID and generation, then requires the user
to rotate with a new idempotency key or revoke it. Reusing an idempotency key
with different terms is a conflict. These recovery operations remain inside the
passkey/action-bound console; there is no builder API route for them.
Manage active sessions
GET /v1/auth/sessions returns at most the 100 most recent sessions owned by
the authenticated wallet. Rows contain only an opaque UUID, creation/last-seen
and expiry timestamps, nullable revocation time, and current; Aura never
returns the JWT, CSRF secret, token digest, or a credential fingerprint.
204. Revoking the
current session clears its cookie. revokeAllSessions() immediately
invalidates every cookie and bearer token for that wallet, including the
presented session.
Cookie-authenticated logout and revocation are writes and require the current
x-csrf-token. Bearer callers are CSRF-exempt. POST /v1/auth/logout revokes
the exact presented session (so copied tokens stop working), clears browser
cookies, and still returns 204 when no active session is present.
Session endpoints
Raw seed export is deliberately unavailable. Deleting an Aura wallet account
must use the dedicated account-destruction/recovery policy; it is not a way to
reveal custody material.

