Operation Type (for Signing)
Request Body
| Field | Type | Need | Description | Example |
|---|---|---|---|---|
”account” | string | required | User’s wallet address | 42trU9A5… |
“signature” | string | required | Cryptographic signature | 5j1Vy9Uq… |
“timestamp” | integer | required | Current timestamp in milliseconds | 1716200000000 |
”action” | string | required | What the proof will authorize:“withdrawal""factor_management” | withdrawal |
”intent_hash” | string | required | Hash of the request that the proof will authorize. Base64url, no padding, 32 bytes. See below | q1Xn0bJr8m2p… |
“kind” | string | required | Factor kind to use:“passkey""security_key” | passkey |
”agent_wallet” | string | optional | Agent wallet address | 69trU9A5… |
“expiry_window” | integer | optional | Signature expiry in milliseconds | 30000 |
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:
- Pass
optionstonavigator.credentials.get()in the Pacifica app. - Send the request that
intent_hashdescribes, with this proof intwo_factororproof:
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
Signaction, intent_hash, and kind as the data object. For the request above, the message to sign is:
Response
- Status 200: Challenge created
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
errorfield 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