Guide

Solana Developer Guide

Install the schema, validate a record, compute a content hash, and wire readiness output into a Solana commerce surface.

Use this guide when you are building an indexer, wallet integration, merchant tool, or back-office service that needs deterministic merchant context.

Install
pnpm add @realworldcommerce/ocg-schema @realworldcommerce/known-business-validator
Score a normalized record
import { validateKnownBusinessRecord } from '@realworldcommerce/known-business-validator/validation';

const report = validateKnownBusinessRecord(parsed.value);
console.log(`Overall: ${report.overall}`);
console.log(`Effective status: ${report.effectiveStatus}`);
for (const issue of report.issues) {
  console.log(`  [${issue.severity}] ${issue.ruleId} - ${issue.message}`);
}
  • Do not call a network service to decide whether the record parses.
  • Pin exact package versions while the project is in v0.x preview.
  • Store the content hash next to any cached record and recompute on read.
  • Render critical issues separately from ordinary warnings.