> ## 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/state

> Returns decoded on-chain state for a HyperAuth smart account — nonce, linked DID, active status, and the P-256 public key coordinates used to sign.

Calls `getAccountState` on the `accountHelper` contract and decodes the ABI-encoded response (5 × 32-byte slots: nonce, did, isActive, pubKeyX, pubKeyY).

## Query parameters

| Parameter | Type     | Required | Description         |
| --------- | -------- | -------- | ------------------- |
| `account` | `string` | Yes      | 20-byte EVM address |

## Response (200)

```json theme={null}
{
  "nonce": "0",
  "did": "0x...",
  "isActive": true,
  "pubKeyX": "0x...",
  "pubKeyY": "0x..."
}
```

## Errors

| Code  | `error`                                           | Condition                  |
| ----- | ------------------------------------------------- | -------------------------- |
| `400` | `"Missing query parameter: account"`              | Parameter absent           |
| `400` | `"Invalid account: expected 20-byte hex address"` | Address invalid            |
| `502` | `"rpc_error"`                                     | Upstream eth\_call failure |
