Contract Labels (Keon)
Human names for Starknet classes and contracts, submitted by their declarer or deployer
Contract labels give a class hash or contract address a human name, such as "Acme Vault", so wallets can show it in place of a raw hex string. Only the account that declared the class or deployed the contract can name it, and the backend proves this on-chain before accepting. A random account can't label someone else's contract "USDC Bridge".
Every label has a source:
source | Meaning |
|---|---|
community | Named by its declarer or deployer. Proven on-chain, not reviewed. Wallets should say so ("named by its deployer, not verified"). |
verified | Reviewed and set by TokenKit. Community submissions can't change it. |
One network per API. Each TokenKit API serves one network: api.tokenkithq.io serves mainnet and api.sepolia.tokenkithq.io serves Sepolia. Every request carries network. If it doesn't match the API you're calling, you get 400.
Authentication
Send your api-key header, the same as the rest of the API. POST /api/keon/contract-labels/ has two more limits. Going over either returns 429 with a Retry-After header.
| Limit | Counts |
|---|---|
| 30 per hour per client IP | Every POST, including ones rejected with 400 or 422. Checked first, before any RPC call. |
10 per hour per submitter_address | Only submissions whose tx_hash proved ownership. Failed posts that merely claim your address don't use up your quota. |
Addresses
The API accepts addresses, class hashes and tx hashes with or without leading zeros, in any case (0x4e2… and 0x04E2… are the same). Responses always use the padded form: 0x followed by 64 lowercase hex characters. Use that form as the key when you read batch results.
POST /api/keon/contract-labels/
Name a class you declared or a contract you deployed. Submitting again with a new name renames the label (the old name is kept in the history). Submitting the same name again is a no-op that returns 200.
1{2 "network": "sepolia",3 "kind": "contract",4 "contract_address": "0x048a124cfedc0a98be6b251762fb1cbe53793c9953bae6ef5969f2f630e2d5bb",5 "name": "Acme Vault",6 "tx_hash": "0x07ce69933d6275fa29f442d54a5694419846c746799f6543c4acf467e78fbba",7 "submitter_address": "0x03ed4a7d724459d986231ddfbc3080d068a98620cf6a83d020f61f1b52077613"8}| Field | Required | Notes |
|---|---|---|
network | yes | mainnet or sepolia; must match the API you call. |
kind | yes | class or contract. |
class_hash | when kind=class | Must not be sent with kind=contract. |
contract_address | when kind=contract | Must not be sent with kind=class. |
name | yes | 2–48 characters after collapsing whitespace. Letters, digits, spaces and . _ - ( ), starting with a letter or digit. |
tx_hash | yes | The transaction that proves you own it (see below). |
submitter_address | yes | Your account address. |
Any other field is rejected with 400.
What tx_hash must prove
The backend reads the transaction and its receipt from the network's RPC. The transaction must have succeeded and be final (finality_status ACCEPTED_ON_L2 or ACCEPTED_ON_L1). A reverted transaction never counts. One that is still RECEIVED or pre-confirmed gets 422 with "transaction not final yet, retry later". Submit it again once it's accepted.
kind | Accepted proof |
|---|---|
class | A DECLARE of class_hash, sent by submitter_address. |
contract | An INVOKE sent by submitter_address whose receipt has a ContractDeployed event from the Universal Deployer Contract (either the Cairo 0 UDC 0x041a78e7…02bf or the OpenZeppelin Cairo 1 UDC 0x02ceed65…2125), with this contract_address as the address and submitter_address as the deployer. |
contract | A DEPLOY_ACCOUNT that produced contract_address, when contract_address is submitter_address (an account naming itself). |
Contracts deployed by a factory contract's deploy_syscall (not through the UDC) can't be named this way yet.
Reserved terms
Community names can't contain token tickers, wallet and protocol brands, or trust words (for example USDC, ETH, STRK, Starknet, Argent, Braavos, Keon, AVNU, Ekubo, official, verified). Tickers and short words match as whole words, so Daily Method is fine but DAI Vault is not. Brand names of 6 or more letters also match inside words (StarkNetVault is rejected). If you need one of these names, ask TokenKit to verify the label.
Responses
201 (created) or 200 (renamed or unchanged):
1{2 "network": "sepolia",3 "kind": "contract",4 "contract_address": "0x048a124cfedc0a98be6b251762fb1cbe53793c9953bae6ef5969f2f630e2d5bb",5 "name": "Acme Vault",6 "source": "community",7 "updated_at": "2026-11-01T11:42:07.512Z"8}A kind=class label carries class_hash in place of contract_address. The submitter address is never returned.
Every error body has a human-readable error and a machine-readable code. Branch on code; the error text may change.
1{"error": "tx_hash does not prove ownership: transaction not final yet, retry later", "code": "not_final"}| Status | code | When | Retry? |
|---|---|---|---|
400 | invalid_request | Bad, missing or unknown fields. | No |
400 | wrong_network | network isn't the one this API serves. | No (send it to the right API) |
400 | invalid_name | The name breaks the length or character rules. | No |
400 | reserved_name | The name uses a reserved term. | No (ask TokenKit to verify it) |
409 | verified_exists | The label is verified. The body also includes the current label. | No |
422 | not_final | The transaction isn't accepted on L2 yet. | Yes, once it's accepted |
422 | tx_not_found | The node doesn't know the transaction (yet). Common straight after sending it. | Yes, a few times with backoff |
422 | proof_failed | The transaction doesn't prove ownership: wrong type, wrong sender, wrong address or class hash, or reverted. | No |
429 | rate_limited | Over 30 posts per hour from this IP, or over 10 accepted submissions per hour for this submitter_address. Includes Retry-After. | After Retry-After |
503 | rpc_unavailable | The RPC node failed or timed out. Nothing was stored. | Yes |
The 400 checks run before any RPC call. The batch lookup uses the same body shape, and its errors are always invalid_request or rate_limited.
GET /api/keon/contract-labels/
One label. Pass network and exactly one of address or class_hash.
1curl 'https://api.sepolia.tokenkithq.io/api/keon/contract-labels/?network=sepolia&address=0x48a124cf…d5bb' \2 -H 'api-key: YOUR_API_KEY'Returns the label in the shape above, or 404 if there is none.
POST /api/keon/contract-labels/lookup/
Many labels at once: at most 100 addresses and class hashes combined (400 beyond that).
1{2 "network": "sepolia",3 "addresses": ["0x48a124cf…d5bb", "0x1234"],4 "class_hashes": ["0x3c1a878d…3373"]5}Only the entries that have a label come back, keyed by the padded form:
1{2 "contracts": {3 "0x048a124cfedc0a98be6b251762fb1cbe53793c9953bae6ef5969f2f630e2d5bb": {4 "network": "sepolia",5 "kind": "contract",6 "contract_address": "0x048a124cfedc0a98be6b251762fb1cbe53793c9953bae6ef5969f2f630e2d5bb",7 "name": "Acme Vault",8 "source": "community",9 "updated_at": "2026-11-01T11:42:07.512Z"10 }11 },12 "classes": {}13}