Versioned guide
Resolve on-chain
Linkable section with data contracts and reproducible examples.
- Examples identify the expected cluster and IDs.
Program ID and evidence match the Lite manifest; the upgrade authority is revoked.
Guide contract
Derive ["n", name] and directly validate the raw 96-byte record.
Use the Lite manifest as the source for the Program ID, slot, hash, authority, and account parameters. The program is finalized: the manifest records the revoked authority and immutable program.
Derive, then verify
Normalize ASCII input first and derive the account yourself. Never accept a record address supplied by a caller or directory.
import { deriveLiteNameRecord, mainnetLiteDeployment } from "@tocnp/sdk";
const deployment = mainnetLiteDeployment();
const record = deriveLiteNameRecord("GM", deployment.registryProgramId);
console.log(record.normalizedName); // gm
console.log(record.address.toBase58(), record.bump);PDA = findProgramAddress([UTF8("n"), UTF8(normalizedName)], PROGRAM_ID)
Finalized read contract
- Require the Solana Mainnet genesis hash.
- Fetch Program, ProgramData, and name PDA at finalized commitment with one coherent context.
- Verify loader-v3 ownership, ProgramData address, revoked upgrade authority, deployed slot, ELF byte length, and SHA-256.
- For a record, require the Lite program owner, non-executable account, exact address, exact 96-byte layout, normalized name, bump, and supported version.
- Carry the highest trusted slot forward as minContextSlot; reject older failover responses.
Raw account layout
| Offset | Bytes | Field | Rule |
|---|---|---|---|
| 0 | 2 | magic | 54 4c |
| 2 | 1 | version | 1 |
| 3 | 1 | bump | must re-derive PDA |
| 4 | 1 | name length | 1–15 |
| 5 | 15 | name | [a-z0-9] + zero padding |
| 20 | 32 | owner | nonzero public key |
| 52 | 32 | resolver | owner-defined |
| 84 | 8 | price | little-endian lamports; zero is unlisted |
| 92 | 4 | reserved | all zero |
import { decodeLiteNameRecordV1 } from "@tocnp/sdk";
const decoded = decodeLiteNameRecordV1(accountData);
// Also verify RPC cluster, account owner, PDA, bump, and embedded name.Availability is a point-in-time proof
Call a name available only when the canonical finalized PDA is absent, or is a non-executable System-owned account with zero data. A malformed, executable, data-bearing, or foreign-owned account is an error. Availability is not a reservation.