Skip to main content
Returns a WebAuthn challenge for a passkey or security key proof. The challenge is bound to one request: a withdrawal or a factor change. Pacifica accepts passkeys only from the Pacifica app. A script or bot cannot make a passkey proof. API clients should use a TOTP proof. See Passkeys and security keys.

Operation Type (for Signing)

Request Body

FieldTypeNeedDescriptionExample
”account”stringrequiredUser’s wallet address42trU9A5…
“signature”stringrequiredCryptographic signature5j1Vy9Uq…
“timestamp”integerrequiredCurrent timestamp in milliseconds1716200000000
”action”stringrequiredWhat the proof will authorize:
“withdrawal"
"factor_management”
withdrawal
”intent_hash”stringrequiredHash of the request that the proof will authorize. Base64url, no padding, 32 bytes. See belowq1Xn0bJr8m2p…
“kind”stringrequiredFactor kind to use:
“passkey"
"security_key”
passkey
”agent_wallet”stringoptionalAgent wallet address69trU9A5…
“expiry_window”integeroptionalSignature expiry in milliseconds30000
You can sign this request with the account key or with an agent wallet. The account must have 2FA on. intent_hash covers the action, the account, and the signed type and data of the request that the proof will authorize. It does not cover timestamp or expiry_window. The Pacifica app computes intent_hash for you. To use the challenge:
  1. Pass options to navigator.credentials.get() in the Pacifica app.
  2. Send the request that intent_hash describes, with this proof in two_factor or proof:
credential is the assertion from navigator.credentials.get() as JSON, with binary values as base64url strings. A challenge lasts 5 minutes and works once. If the proof arrives with a different request, Pacifica rejects it and the challenge is used up.

Signing

Sign action, intent_hash, and kind as the data object. For the request above, the message to sign is:

Response

  • Status 200: Challenge created
The options above are shortened.
  • Status 400: Invalid request parameters, intent_hash, or signature
  • Status 403: The account does not exist
  • Status 422: The account cannot make this proof. The error field says why:
  • Status 429: More than 60 challenges in 10 minutes for this action and signer
  • Status 500: Internal server error
  • Status 503: The two-factor service is unavailable. Retry later

Code Example (Python)