Versioned guide
Builders and actions
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
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
| Operation | Opcode | Signer | Effect |
|---|---|---|---|
| register | 0 | payer | creates record; payer becomes owner and resolver |
| transfer | 1 | owner | changes owner; resets resolver and price |
| setResolver | 2 | owner | changes resolver only |
| setPrice | 3 | owner | sets lamport price; zero removes listing |
| buy | 4 | buyer | pays exact native SOL and transfers ownership |
| release | 5 | owner | closes 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
- Re-read and validate finalized state; cached index data is display-only.
- Build with integer lamports, a fresh blockhash, and minContextSlot.
- Estimate the network fee, preserve enough SOL, and simulate.
- Show action, destination, exact amount, network, fee, and irreversible effects.
- Require explicit confirmation, request the wallet signature, and reject a changed signed message.
- 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.