Versioned guide

Resolve on-chain

Linkable section with data contracts and reproducible examples.

  • Examples identify the expected cluster and IDs.
Mainnet · Finalized

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

  1. Require the Solana Mainnet genesis hash.
  2. Fetch Program, ProgramData, and name PDA at finalized commitment with one coherent context.
  3. Verify loader-v3 ownership, ProgramData address, revoked upgrade authority, deployed slot, ELF byte length, and SHA-256.
  4. For a record, require the Lite program owner, non-executable account, exact address, exact 96-byte layout, normalized name, bump, and supported version.
  5. Carry the highest trusted slot forward as minContextSlot; reject older failover responses.

Raw account layout

OffsetBytesFieldRule
02magic54 4c
21version1
31bumpmust re-derive PDA
41name length1–15
515name[a-z0-9] + zero padding
2032ownernonzero public key
5232resolverowner-defined
848pricelittle-endian lamports; zero is unlisted
924reservedall 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.