> ## Documentation Index
> Fetch the complete documentation index at: https://docs.hyperauth.dev/llms.txt
> Use this file to discover all available pages before exploring further.

# GET /api/accounts/predict

> Predicts the counterfactual ERC-4337 smart account address for a given P-256 passkey public key and CREATE2 salt without deploying the contract.

Calls `getAddress` on the `hyperAuthFactory` contract to predict the counterfactual smart account address for a given P-256 public key and salt.

## Query parameters

| Parameter | Type     | Required | Description                                  |
| --------- | -------- | -------- | -------------------------------------------- |
| `pubKeyX` | `string` | Yes      | P-256 X coordinate as uint256 hex string     |
| `pubKeyY` | `string` | Yes      | P-256 Y coordinate as uint256 hex string     |
| `salt`    | `string` | No       | uint256 decimal or hex string (default: `0`) |

## Response (200)

```json theme={null}
{ "address": "0x..." }
```

## Errors

| Code  | `error`                                                     | Condition                  |
| ----- | ----------------------------------------------------------- | -------------------------- |
| `400` | `"Missing query parameters: pubKeyX, pubKeyY"`              | Parameters absent          |
| `400` | `"Invalid pubKeyX or pubKeyY: expected uint256 hex string"` | Decode failure             |
| `400` | `"Invalid salt: expected uint256 decimal or hex string"`    | Salt parse failure         |
| `502` | `"rpc_error"`                                               | Upstream eth\_call failure |
