Skip to main content
Finishes registering a passkey or a security key. Call it after Begin WebAuthn registration. When this call succeeds, two-factor authentication is on. Pacifica accepts passkeys only from the Pacifica app. 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
”challenge_id”stringrequiredChallenge ID (UUID) from Begin WebAuthn registration45c48cce-2e2d-4fbd-8f3b-7a1c9e0d5b62
”credential”objectrequiredThe credential from navigator.credentials.create() as JSON, with binary values as base64url strings. Not part of the signed payloadSee below
”expiry_window”integeroptionalSignature expiry in milliseconds30000
Sign this request with the account’s own key. Agent wallets cannot sign it. The account must be a main account. This call needs no proof. Begin WebAuthn registration already checked it. The challenge works once. If this call fails, start again with Begin WebAuthn registration.

Signing

Sign challenge_id as the data object. Do not sign credential. For the request above, the message to sign is:

Response

  • Status 200: Passkey or security key added
Pacifica shows recovery keys only once. Store them somewhere safe.
  • Status 400: Invalid request parameters or signature
  • Status 401: The credential is not valid, or the challenge is unknown, expired, or already used
  • Status 403: The account is a subaccount, or it does not exist
  • Status 422: The registration does not fit the account. The error field says why:
  • Status 500: Internal server error
  • Status 503: The two-factor service is unavailable. Retry later

Code Example (Python)