Versioned guide

Builders and actions

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

Wallet-signed registration, transfer, resolver, price, purchase, and release actions.

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.

All six Lite operations

OperationOpcodeSignerEffect
register0payercreates record; payer becomes owner and resolver
transfer1ownerchanges owner; resets resolver and price
setResolver2ownerchanges resolver only
setPrice3ownersets lamport price; zero removes listing
buy4buyerpays exact native SOL and transfers ownership
release5ownercloses record; anyone may register again

Build locally

import {
  createLiteBuyInstruction,
  createLiteRegisterInstruction,
  createLiteReleaseInstruction,
  createLiteSetPriceInstruction,
  createLiteSetResolverInstruction,
  createLiteTransferInstruction,
} from "@tocnp/sdk";

// Each builder requires the canonical name, Program ID, and exact actors/amounts.
// Builders never sign, submit, or call tocnp.com.

The complete compile-checked example is packages/sdk/examples/lite-self-hosted.ts in the source tree. It includes every builder, finalized verification, rent lookup, simulation, message-integrity checking, submission, and finality tracking.

Transaction boundary

  1. Re-read and validate finalized state; cached index data is display-only.
  2. Build with integer lamports, a fresh blockhash, and minContextSlot.
  3. Estimate the network fee, preserve enough SOL, and simulate.
  4. Show action, destination, exact amount, network, fee, and irreversible effects.
  5. Require explicit confirmation, request the wallet signature, and reject a changed signed message.
  6. Submit once, persist the signature, track processed/confirmed/finalized, and revalidate.

A release requires typing the exact normalized name and an irreversible-action confirmation. A changed buy owner or price requires a new review; never silently update it.

Rust support

No supported TOCNP-LITE Rust SDK exists yet. The workspace Rust crate implements the undeployed Full model and must not decode Lite records. Until byte fixtures and local-validator tests exist, use the compile-checked TypeScript implementation or treat Rust Lite support as unavailable.