Docs/Getting Started

Quickstart

Paste a link and get a real atom — a deterministic ID and a canonical shape — in five minutes, with no wallet.

In five minutes you'll turn a URL into an atom — a thing in the knowledge graph with a permanent, deterministic ID — without a wallet, gas, or a single transaction. Then you'll give it a canonical shape. That's the entire offchain foundation; everything else builds on it.

Install#

bash
bun add @0xintuition/ids@alpha @0xintuition/primitives@alpha

These are alpha packages (@0xintuition/protocol is the stable one, at v3.0.0). APIs may move; the IDs you generate won't — they're derived from bytes, not versions.

atom-id.ts
import { calculateAtomId } from "@0xintuition/ids";

const id = calculateAtomId("https://github.com/vercel/next.js");
console.log(id);
// → 0x3a52c8…f577

A 32-byte hex ID, computed locally. calculateAtomId is a pure function — salted keccak256 over the input bytes. Sync, no network, no wallet. You just derived the atom's identity, and it's the same identity the MultiVault contract derives onchain.

Step 2 — The aha — run it again#

Run Step 1 a second time. Same input, same ID. Run it in a different file, a different project, a different machine — still 0x3a52c8…f577. That determinism is the whole point: same content, same ID — in your app, in anyone else's, and onchain. Your offchain work is never throwaway. The full derivation is in Deterministic IDs.

Step 3 — Give it a shape#

An ID is identity; a classification gives it meaning. Each of the 37 classifications has a typed builder in @0xintuition/primitives (the full set is browsable at /classifications.html):

classify.ts
import { buildSoftwareApplication } from "@0xintuition/primitives";

const atomData = buildSoftwareApplication({
  name: "Next.js",
  url:  "https://github.com/vercel/next.js",
  applicationCategory: "WebFramework",
  programmingLanguage: "TypeScript",
});

// atomData is canonical JSON-LD:
// {
//   "@context": "https://schema.org/",
//   "@type":    "SoftwareApplication",
//   "name":     "Next.js",
//   "url":      "https://github.com/vercel/next.js",
//   ...
// }

The builder validates fields and emits identity-stable JSON-LD. Store it offchain, keyed by calculateAtomId. Because you used the shared shape, your atom lines up with everyone else's by default — no custom schema.

Write sameAs at creation when you can, using canonical source URLs. Those URLs are hashed into the ID, so setting them now is what makes independent apps converge on one record instead of minting duplicates. Strip tracking params first — ?si=… is not identity.

Step 4 — Onchain, when it's worth keeping#

Later, the same bytes go to MultiVault via @0xintuition/protocol. The contract derives the same ID, and the atom gains a bonding-curve vault, its own Ethereum address, and a permanent home. Nothing migrates. That walkthrough is Offchain to Onchain.

Now you try#

  • Paste your project's URL into Step 1. That's your atom.
  • Classify it with the right builder — buildPerson, buildBook, buildWebSite, buildMusicRecording, and ~30 more.
  • Connect two atoms with a predicate from the registry — your project uses something (@0xintuition/predicates/use), or was createdBy someone. The full registry is browsable at /predicates.html; see Triples & Predicates.