# Chainhilt Hyperliquid User Abstraction Preview

> Chainhilt Hyperliquid User Abstraction Preview is a paid API for AI agents from chainhilt.ai, paid per call via x402, $0.001/call, status unknown (last checked 2026-11-16).

Prepares an EIP-712 typed-data payload for changing a Hyperliquid account's abstraction mode (disabled, unifiedAccount, or portfolioMargin) that the account owner must sign before submitting.

## Facts

- Endpoint: POST https://chainhilt.ai/api/v1/perp/hyperliquid/user-abstraction/preview?utm_source=zero.xyz
- Price: $0.001/call
- Payment: x402
- Status: unknown
- Last checked: 2026-11-16
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/chainhilt-hyperliquid-user-abstraction-preview-4b90bce2
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_XUGyEQyiAfhIdQ4gtom7m

Status and success rate cover calls made through Zero and Zero's own probes. Third-party monitors may report differently.

## How to call it through Zero

Zero handles the 402 payment challenge and records the run. With the Zero CLI installed (`npm i -g @zeroxyz/cli`):

```sh
zero fetch --capability chainhilt-hyperliquid-user-abstraction-preview-4b90bce2 -d '<json body>'
```

Example prompt: Prepare the EIP-712 signing payload to switch my Hyperliquid account 0x1111111111111111111111111111111111111111 to unifiedAccount abstraction mode using nonce 1710000000000, so I can sign and submit it.

## When to prefer this

Use this endpoint when you need to change a Hyperliquid account's abstraction mode (unified balance, portfolio margin, or disabled) and require the EIP-712 payload for user signing before submission. Prefer this over direct on-chain construction when you want a pre-validated, correctly formatted typed-data object ready for wallet signing, with the submit path included.

## Known failure modes

- Invalid or malformed user address (not a valid 0x EVM address) returns 400
- Nonce out of valid range (negative or exceeding MAX_SAFE_INTEGER) returns 400
- Invalid abstraction enum value (not disabled/unifiedAccount/portfolioMargin) returns 400
- Network or upstream Hyperliquid connectivity issues may cause 5xx responses
- Missing required fields returns validation error

## How this service works

Prepare a user-signed abstraction change: disabled, unifiedAccount, or portfolioMargin. Sign with the owner's wallet and submit to the returned submitPath. Errors: 400 invalid input; execution may return 422 rejection or 502 provider failure. Treat spot and perp as one balance only when the account abstraction mode is "unifiedAccount".

## Output

Returns an action object containing the full EIP-712 typed-data structure (domain, types, message, primaryType), the nonce, chainId (42161 Arbitrum), the protocol tag 'hyperliquid', and a submitPath (/perp/hyperliquid/user-abstraction/execute) to use after signing. Any validation errors or warnings are included in the response envelope.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "properties": {
  "user": {
   "type": "string",
   "pattern": "^0x[a-fA-F0-9]{40}$",
   "description": "Account whose mode changes; the account owner's wallet signs."
  },
  "nonce": {
   "type": "integer",
   "minimum": 0,
   "description": "Action nonce in milliseconds since the epoch; defaults to the current time."
  },
  "abstraction": {
   "enum": [
    "disabled",
    "unifiedAccount",
    "portfolioMargin"
   ],
   "type": "string",
   "description": "New mode: \"disabled\", \"unifiedAccount\" (spot and perp as one balance) or \"portfolioMargin\"."
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "type": "json",
 "example": {
  "response": {
   "errors": [],
   "actions": [
    {
     "data": {
      "nonce": 1710000000000,
      "action": {
       "type": "userSetAbstraction",
       "user": "0x1111111111111111111111111111111111111111",
       "nonce": 1710000000000,
       "abstraction": "unifiedAccount",
       "hyperliquidChain": "Mainnet",
       "signatureChainId": "0xa4b1"
      },
      "typedData": {
       "types": {
        "EIP712Domain": [
         {
          "name": "name",
          "type": "string"
         },
         {
          "name": "version",
          "type": "string"
         },
         {
          "name": "chainId",
          "type": "uint256"
         },
         {
          "name": "verifyingContract",
          "type": "address"
         }
        ],
        "HyperliquidTransaction:UserSetAbstraction": [
         {
          "name": "hyperliquidChain",
          "type": "string"
         },
         {
          "name": "user",
          "type": "address"
         },
         {
          "name": "abstraction",
          "type": "string"
         },
         {
          "name": "nonce",
          "type": "uint64"
         }
        ]
       },
       "domain": {
        "name": "HyperliquidSignTransaction",
        "chainId": 42161,
        "version": "1",
        "verifyingContract": "0x0000000000000000000000000000000000000000"
       },
       "message": {
        "type": "userSetAbstraction",
        "user": "0x1111111111111111111111111111111111111111",
        "nonce": 1710000000000,
        "abstraction": "unifiedAccount",
        "hyperliquidChain": "Mainnet",
        "signatureChainId": "0xa4b1"
       },
       "primaryType": "HyperliquidTransaction:UserSetAbstraction"
      }
     },
     "type": "signature",
     "chainId": 42161,
     "protocol": "hyperliquid",
     "submitPath": "/perp/hyperliquid/user-abstraction/execute"
    }
   ],
   "warnings": []
  }
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/chainhilt-hyperliquid-user-abstraction-preview-4b90bce2/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from chainhilt.ai](https://www.zero.xyz/host/chainhilt.ai/llms.txt)
