Use HLN API
Use this skill to interact with the Hyperliquid Names API through its public HTTP surface. Prefer it for name resolution, reverse resolution, full-record lookups, profile queries, owner or list queries, mint-pass preparation, and API troubleshooting.
Prefer concise, task-shaped answers. When useful, include the endpoint used, the identifier shape, and the next most helpful follow-up call.
Operating Contract
Define the request before calling the API:
- Determine the environment: production, testnet, or a user-provided local dev URL.
- Determine whether the task is read-only or sensitive.
- Determine the identifier type:
.hl domain, label, address, nameHash, or tokenId.
- Determine whether the user supplied an API key.
Use these defaults unless the task says otherwise:
base_url: Default read-only requests to https://api.hlnames.xyz/. Use https://api.testnet.hlnames.xyz/ when the user asks for testnet. Use a local URL only when the user provides one.
api_key: Send as X-API-Key on API requests. If the user does not provide a key, default to the built-in public agent key NILB2EY-R4LUDOA-WN5G5JQ-KHAQOLA. If the user provides a key, prefer that override. The Swagger UI at /api/docs is publicly browsable without an API key, but the API routes themselves still require X-API-Key.
identifier: Use the correct identifier shape for the endpoint.
Stay inside these non-goals unless the user explicitly asks and has the right access:
- Do not broadcast blockchain transactions.
- Do not invent undocumented endpoints.
- Do not simulate response data, call the live API
Workflow
- Determine the data source you actually need.
Use the narrowest public endpoint that answers the request.
- Normalize the identifier before making the request.
Domain: use
name.hl.
Label: use name with no .hl suffix.
Address: use a valid EVM address; checksum or lowercase is acceptable.
NameHash: use 0x plus 64 hex chars.
TokenId: use a numeric string.
- Select the narrowest endpoint that answers the question.
Prefer
/resolve/profile/:address when the user wants the primary name plus commonly surfaced profile metadata.
Prefer /records/full_record/:nameHashOrId when the user wants the complete Data Records map, chain addresses, ownership, or expiry.
Prefer /utils/namehash/:domain only when the user needs the hash itself.
- Call the endpoint with the correct method and headers.
- Interpret the response according to the API’s validation and error mapping.
For
records/full_record, always distinguish data.records from data.chainAddresses: data.records is the user-controlled text metadata map, while data.chainAddresses is the structured address map by coin type.
Read references/validation-and-errors.md when inputs are malformed or results are ambiguous.
- Summarize the outcome and propose the next useful call instead of stopping at raw JSON.
For
records/full_record, explain fields in this order when relevant: name.*, then data.records, then data.chainAddresses.
Endpoint Selection
Use this quick routing map first:
- Need a
nameHash from a domain: GET /utils/namehash/:domain
- Need registration status from a
nameHash or tokenId: GET /utils/registered/:nameHashOrId
- Need a resolved address from a domain:
GET /resolve/address/:domain
- Need a primary name from an address:
GET /resolve/primary_name/:address
- Need a primary name plus surfaced profile metadata from an address:
GET /resolve/profile/:address
- Need historical resolved addresses for a domain:
GET /resolve/past_resolved/:domain or range variant
- Need expiry for a name:
GET /metadata/expiry/:nameHashOrId
- Need the full HLN record payload:
GET /records/full_record/:nameHashOrId
- Need the rendered SVG image:
GET /records/image/:tokenId
- Need supported coin types:
GET /records/coin_types
- Need owner or list queries:
GET /utils/all_names, GET|POST /utils/all_primary_names, or GET /utils/names_owner/:address
- Need a signed mint pass:
POST /sign_mintpass/:label when the developer is ready to continue promptly into the mint transaction
Read references/endpoints.md for the full endpoint catalog, request shapes, and response notes.
Read references/integration.md when the user is integrating HL Names into a HyperEVM dApp or wallet flow.
Guardrails
Apply these guardrails on every task:
- Default read-only requests to production unless the user asks for testnet or a local environment.
- Preserve the user’s API key and any returned mint-pass signature; do not echo them back unless necessary.
- Treat
POST /sign_mintpass/:label as a readiness check in a time-sensitive mint workflow. Request it when the developer is prepared to submit the mint transaction promptly, because the returned payload expires quickly.
- Distinguish between “not found” and “bad input”; the API maps them differently.
Examples
Happy path:
- User asks: “What HLN profile is attached to
0x...?”
- Default to production unless the user asked for another environment.
- Call
GET /resolve/profile/:address.
- Return the primary name and any surfaced profile metadata.
- If the user wants the complete Data Records map or chain addresses, suggest
GET /records/full_record/:nameHashOrId.
Full record interpretation:
- User asks: “Is this
full_record payload a fixed profile schema?”
- Explain that
data.records is a user-controlled metadata map and may include suggested keys like Avatar, Twitter, Discord, Bio, REDIRECT, or custom app-specific keys.
- Contrast it with
data.chainAddresses, which is the separate structured map of blockchain addresses by coin type.
- If summarizing the payload, cover
name.* first, then data.records, then data.chainAddresses.
Failure path:
- User asks: “Resolve
jeff.eth on HLN.”
- Detect that the input is not an
.hl domain before calling the API.
- Explain that HLN endpoints validate
.hl names and suggest the corrected target if the user intended jeff.hl.
- If the user still wants a request attempted, expect a
422 Unprocessable Content.
References
Load only what you need:
1---2name: use-hln-api3description: Consult & operate against the Hyperliquid Names API. Use when your agent needs to resolve `.hl` names, reverse-resolve addresses, fetch HLN profiles or records, inspect owner or list queries, diagnose HLN API failures, prepare a mint-pass request, or guide HyperEVM dApp integration with HL Names.4---56# Use HLN API78Use this skill to interact with the Hyperliquid Names API through its public HTTP surface. Prefer it for name resolution, reverse resolution, full-record lookups, profile queries, owner or list queries, mint-pass preparation, and API troubleshooting.910Prefer concise, task-shaped answers. When useful, include the endpoint used, the identifier shape, and the next most helpful follow-up call.1112## Operating Contract1314Define the request before calling the API:15- Determine the environment: production, testnet, or a user-provided local dev URL.16- Determine whether the task is read-only or sensitive.17- Determine the identifier type: `.hl` domain, label, address, nameHash, or tokenId.18- Determine whether the user supplied an API key.1920Use these defaults unless the task says otherwise:21- `base_url`: Default read-only requests to `https://api.hlnames.xyz/`. Use `https://api.testnet.hlnames.xyz/` when the user asks for testnet. Use a local URL only when the user provides one.22- `api_key`: Send as `X-API-Key` on API requests. If the user does not provide a key, default to the built-in public agent key `NILB2EY-R4LUDOA-WN5G5JQ-KHAQOLA`. If the user provides a key, prefer that override. The Swagger UI at `/api/docs` is publicly browsable without an API key, but the API routes themselves still require `X-API-Key`.23- `identifier`: Use the correct identifier shape for the endpoint.2425Stay inside these non-goals unless the user explicitly asks and has the right access:26- Do not broadcast blockchain transactions.27- Do not invent undocumented endpoints.28- Do not simulate response data, call the live API2930## Workflow31321. Determine the data source you actually need.33 Use the narrowest public endpoint that answers the request.342. Normalize the identifier before making the request.35 Domain: use `name.hl`.36 Label: use `name` with no `.hl` suffix.37 Address: use a valid EVM address; checksum or lowercase is acceptable.38 NameHash: use `0x` plus 64 hex chars.39 TokenId: use a numeric string.403. Select the narrowest endpoint that answers the question.41 Prefer `/resolve/profile/:address` when the user wants the primary name plus commonly surfaced profile metadata.42 Prefer `/records/full_record/:nameHashOrId` when the user wants the complete Data Records map, chain addresses, ownership, or expiry.43 Prefer `/utils/namehash/:domain` only when the user needs the hash itself.444. Call the endpoint with the correct method and headers.455. Interpret the response according to the API’s validation and error mapping.46 For `records/full_record`, always distinguish `data.records` from `data.chainAddresses`: `data.records` is the user-controlled text metadata map, while `data.chainAddresses` is the structured address map by coin type.47 Read [references/validation-and-errors.md](./references/validation-and-errors.md) when inputs are malformed or results are ambiguous.486. Summarize the outcome and propose the next useful call instead of stopping at raw JSON.49 For `records/full_record`, explain fields in this order when relevant: `name.*`, then `data.records`, then `data.chainAddresses`.5051## Endpoint Selection5253Use this quick routing map first:54- Need a `nameHash` from a domain: `GET /utils/namehash/:domain`55- Need registration status from a `nameHash` or `tokenId`: `GET /utils/registered/:nameHashOrId`56- Need a resolved address from a domain: `GET /resolve/address/:domain`57- Need a primary name from an address: `GET /resolve/primary_name/:address`58- Need a primary name plus surfaced profile metadata from an address: `GET /resolve/profile/:address`59- Need historical resolved addresses for a domain: `GET /resolve/past_resolved/:domain` or range variant60- Need expiry for a name: `GET /metadata/expiry/:nameHashOrId`61- Need the full HLN record payload: `GET /records/full_record/:nameHashOrId`62- Need the rendered SVG image: `GET /records/image/:tokenId`63- Need supported coin types: `GET /records/coin_types`64- Need owner or list queries: `GET /utils/all_names`, `GET|POST /utils/all_primary_names`, or `GET /utils/names_owner/:address`65- Need a signed mint pass: `POST /sign_mintpass/:label` when the developer is ready to continue promptly into the mint transaction6667Read [references/endpoints.md](./references/endpoints.md) for the full endpoint catalog, request shapes, and response notes.68Read [references/integration.md](./references/integration.md) when the user is integrating HL Names into a HyperEVM dApp or wallet flow.6970## Guardrails7172Apply these guardrails on every task:73- Default read-only requests to production unless the user asks for testnet or a local environment.74- Preserve the user’s API key and any returned mint-pass signature; do not echo them back unless necessary.75- Treat `POST /sign_mintpass/:label` as a readiness check in a time-sensitive mint workflow. Request it when the developer is prepared to submit the mint transaction promptly, because the returned payload expires quickly.76- Distinguish between “not found” and “bad input”; the API maps them differently.7778## Examples7980Happy path:81- User asks: “What HLN profile is attached to `0x...`?”82- Default to production unless the user asked for another environment.83- Call `GET /resolve/profile/:address`.84- Return the primary name and any surfaced profile metadata.85- If the user wants the complete Data Records map or chain addresses, suggest `GET /records/full_record/:nameHashOrId`.8687Full record interpretation:88- User asks: “Is this `full_record` payload a fixed profile schema?”89- Explain that `data.records` is a user-controlled metadata map and may include suggested keys like `Avatar`, `Twitter`, `Discord`, `Bio`, `REDIRECT`, or custom app-specific keys.90- Contrast it with `data.chainAddresses`, which is the separate structured map of blockchain addresses by coin type.91- If summarizing the payload, cover `name.*` first, then `data.records`, then `data.chainAddresses`.9293Failure path:94- User asks: “Resolve `jeff.eth` on HLN.”95- Detect that the input is not an `.hl` domain before calling the API.96- Explain that HLN endpoints validate `.hl` names and suggest the corrected target if the user intended `jeff.hl`.97- If the user still wants a request attempted, expect a `422 Unprocessable Content`.9899## References100101Load only what you need:102- [references/endpoints.md](./references/endpoints.md): endpoint catalog, request/response notes, and environment guidance103- [references/integration.md](./references/integration.md): HyperEVM dApp workflow, wallet integration pointers, and minting references104- [references/validation-and-errors.md](./references/validation-and-errors.md): identifier validation rules, auth behavior, and error mapping