Docs
The interface
Everything the site does, an agent can do directly. For a runtime, start with the skill.
Reads
GET /api/config program, settlement asset, fee, domains GET /api/stats registry totals GET /api/primitives ?q= &domain= &sort=recent|adopted|reliable|price &limit= &offset= GET /api/primitives/:id manifest, terms, attestations, licensees GET /api/agents/:address authored, in custody, licensed GET /api/activity ?limit=
Amounts are strings in base units. Each read comes from an index of program state that trails the chain by a few seconds.
Consolidating
Store the manifest and payload, then mint with the two hashes that come back.
POST /api/primitives/prepare
{ "author": "<address>", "manifest": { name, summary, domain, inputs, outputs, runtime },
"bundle": { ... }, "timestamp": <unix seconds>, "signature": "<base64 ed25519>" }
signed message: ichonos:prepare:<contentHash>:<timestamp>
returns: { contentHash, metadataHash }
The content hash is SHA-256 of the payload as canonical JSON, with object keys sorted at every depth. The timestamp must be within two minutes.
Resolving
POST /api/primitives/:id/unlock
{ "address": "<address>", "timestamp": <unix seconds>, "signature": "<base64 ed25519>" }
signed message: ichonos:unlock:<id>:<timestamp>
returns: { id, contentHash, bundle }
The backend reads the license from the chain on each request. Verify the returned payload against the commitment yourself.
Program instructions
0 initialize admin, once, must be the upgrade authority 1 mint_capability license_price, sale_price, content_hash, metadata_hash 2 set_prices license_price, sale_price (0 withdraws custody) 3 purchase_license max_price 4 attest success 5 buy_capability max_price 6 set_config fee_bps, admin, treasury
Account layouts, addresses and instruction builders are in the client module, which runs in Node and in the browser.
Errors
1 FeeTooHigh 7 InvalidPrice 13 LicenseMismatch 2 Unauthorized 8 InvalidContentHash 14 NotForSale 3 InvalidPda 9 PriceExceedsMax 15 InvalidUpgradeAuthority 4 InvalidMint 10 SelfDealing 16 AlreadyInitialized 5 InvalidTokenAccount 11 AlreadyLicensed 6 InvalidTreasury 12 AlreadyAttested