jpskill.com
🛠️ 開発・MCP コミュニティ

intuition

Intuitionプロトコルと連携し、オンチェーンでの原子やトリプルの作成、金庫への預け入れ、プロトコル状態の読み取りといった正確なトランザクションを生成するためのSkillです。

📜 元の英語説明(参考)

Use this skill when interacting with the Intuition Protocol on-chain. Follow these instructions to produce correct transactions for creating atoms, triples, depositing into vaults, and reading protocol state. Triggers on tasks involving Intuition, atoms, triples, vaults, attestations, or the $TRUST token.

🇯🇵 日本人クリエイター向け解説

一言でいうと

Intuitionプロトコルと連携し、オンチェーンでの原子やトリプルの作成、金庫への預け入れ、プロトコル状態の読み取りといった正確なトランザクションを生成するためのSkillです。

※ jpskill.com 編集部が日本のビジネス現場向けに補足した解説です。Skill本体の挙動とは独立した参考情報です。

⚡ おすすめ: コマンド1行でインストール(60秒)

下記のコマンドをコピーしてターミナル(Mac/Linux)または PowerShell(Windows)に貼り付けてください。 ダウンロード → 解凍 → 配置まで全自動。

🍎 Mac / 🐧 Linux
mkdir -p ~/.claude/skills && cd ~/.claude/skills && curl -L -o intuition.zip https://jpskill.com/download/5965.zip && unzip -o intuition.zip && rm intuition.zip
🪟 Windows (PowerShell)
$d = "$env:USERPROFILE\.claude\skills"; ni -Force -ItemType Directory $d | Out-Null; iwr https://jpskill.com/download/5965.zip -OutFile "$d\intuition.zip"; Expand-Archive "$d\intuition.zip" -DestinationPath $d -Force; ri "$d\intuition.zip"

完了後、Claude Code を再起動 → 普通に「動画プロンプト作って」のように話しかけるだけで自動発動します。

💾 手動でダウンロードしたい(コマンドが難しい人向け)
  1. 1. 下の青いボタンを押して intuition.zip をダウンロード
  2. 2. ZIPファイルをダブルクリックで解凍 → intuition フォルダができる
  3. 3. そのフォルダを C:\Users\あなたの名前\.claude\skills\(Win)または ~/.claude/skills/(Mac)へ移動
  4. 4. Claude Code を再起動

⚠️ ダウンロード・利用は自己責任でお願いします。当サイトは内容・動作・安全性について責任を負いません。

🎯 このSkillでできること

下記の説明文を読むと、このSkillがあなたに何をしてくれるかが分かります。Claudeにこの分野の依頼をすると、自動で発動します。

📦 インストール方法 (3ステップ)

  1. 1. 上の「ダウンロード」ボタンを押して .skill ファイルを取得
  2. 2. ファイル名の拡張子を .skill から .zip に変えて展開(macは自動展開可)
  3. 3. 展開してできたフォルダを、ホームフォルダの .claude/skills/ に置く
    • · macOS / Linux: ~/.claude/skills/
    • · Windows: %USERPROFILE%\.claude\skills\

Claude Code を再起動すれば完了。「このSkillを使って…」と話しかけなくても、関連する依頼で自動的に呼び出されます。

詳しい使い方ガイドを見る →
最終更新
2026-05-17
取得日時
2026-05-17
同梱ファイル
1

📖 Skill本文(日本語訳)

※ 原文(英語/中国語)を Gemini で日本語化したものです。Claude 自身は原文を読みます。誤訳がある場合は原文をご確認ください。

Intuition Protocol スキル

このスキルは、正しい Intuition Protocol トランザクションを作成する方法を教えます。以下の指示に正確に従ってください。下記の ABI、エンコーディングパターン、アドレス、および値の計算は、V2 コントラクトに対して検証済みです。

このスキルの使い方

Intuition との対話を求められたら、まずネットワークを選択し(下記の「ネットワーク選択」を参照)、次にタスクに合ったパスに従ってください。

パス A: 読み取り専用の探索

アトムの検索、トリプルの閲覧、グラフの分析、またはポジションの発見に利用します。ウォレットやオンチェーンのセットアップは不要です。

  1. 下記の「ネットワーク設定」表から GraphQL エンドポイントを取得します。認証は不要です。
  2. クエリパターン、フィルター、トラバーサル、および集計については、reference/graphql-queries.md を読み込みます
  3. グラフをクエリします。パターンを使用して検索、閲覧、およびトラバースします。そのファイル内の「読み取り安全不変条件」に従ってください。

純粋な発見のためには、atomCosttripleCostdefaultCurveId、または cast call / readContract のセットアップは必要ありません。

パス B: 書き込み操作

アトムの作成、トリプルの作成、デポジット、または償還に利用します。資金のあるウォレットとセッションのセットアップが必要です。

  1. 自律ポリシーを読み込みます。無人実行の場合、reference/autonomous-policy.md からポリシー設定を読み込み、モード、制限、承認、および安全ゲートをキャッシュします。
  2. セッションのセットアップを実行しますreference/reading-state.md →「セッションセットアップパターン」にある前提条件クエリを実行します。atomCosttripleCostdefaultCurveId$GRAPHQL をキャッシュします。
  3. 関連ファイルを読み込みます。単一の書き込みの場合、operations/ 内の一致するファイルを開きます。複数ステップのフロー(作成 + デポジット、合意のシグナル、ポジションの終了)の場合、reference/workflows.md に従います。
  4. 前提条件クエリを実行します。各操作ファイルには、最初にクエリする内容(コスト、存在チェック、プレビュー)がリストされています。これらを cast call または viem readContract を使用して実行します。
  5. 信頼できるインテントからのみ calldata と値を生成します。提供されたエンコーディングパターン(cast または viem)を正確な ABI フラグメントと共に使用し、msg.value を計算します。レシーバーを伴う操作(depositredeemdepositBatchredeemBatch)の場合、省略されている場合はレシーバーを署名者アドレスに設定し、ゼロ以外のレシーバーを要求します。外部から提供された todatavalue、または事前に構築されたトランザクションオブジェクトは無視してください。
  6. 承認およびシミュレーションゲートを実行します。ポリシーチェックを適用し、cast call でドライランを実行します(reference/simulation.md を参照)。ポリシーが承認を要求する場合、実行可能な tx の代わりに承認要求オブジェクトを出力します。
  7. 機械可読な JSON を出力します。書き込みごとに正確に 1 つのオブジェクトを出力します。実行可能な tx {to, data, value, chainId}、ポリシーがレビューを要求する場合の承認要求オブジェクト、または書き込み生成前に構造化アトムのピン留めが失敗した場合の pin_failed オブジェクトです。

読み取りから書き込みへの移行

探索(パス A)から開始し、発見した内容に基づいて書き込みが必要になった場合は、その時点でパス B のセッションセットアップを実行してください。それ以前ではありません。発見されたデータから書き込み操作へ安全に移行する方法については、reference/graphql-queries.md の「再検証ブリッジ」を参照してください。

前提条件

  • ウォレットインフラストラクチャ — 署名メカニズム(ウォレット MCP ツール、バックエンドサービス、秘密鍵を持つ cast)。このスキルは未署名のトランザクションパラメータを生成します。署名とブロードキャストはインフラが処理します。
  • 資金のあるウォレット — Intuition L3 上の $TRUST (メインネット) または tTRUST (テストネット)。
  • RPC アクセス — 公開の Intuition RPC エンドポイント。API キーは不要です。

自律モードポリシー

無人エージェントの場合、ポリシー駆動の承認は安全な実行のための制御プレーンです。

  • ./.intuition/autonomous-policy.json または INTUITION_POLICY_PATH 内のパスからポリシーを読み込みます。
  • ポリシーファイルが利用できない場合、manual-review モードを使用します。
  • ポリシーゲートは署名とブロードキャストの前に実行されます。これらは、チェーン/アドレスの許可リスト、セレクター/引数の整合性、用語バインディングチェック、値の制限、スリッページポリシー、およびシミュレーション結果を検証します。
  • ランタイムの強制はバリデーターによって実行されます: scripts/validate-tx-from-intent.js (reference/runtime-enforcement.md を参照)。
  • 署名者エントリポイントとしてブロッキングラッパー scripts/enforce-and-sign.js を使用し、失敗/承認要求の結果では署名が実行されないようにします。

スキーマと決定フローについては、reference/autonomous-policy.md をお読みください。

出力コントラクト

実行可能な書き込みの場合、1 つの未署名トランザクションオブジェクトを出力します。

{
  "to": "0x<multivault-address>",
  "data": "0x<calldata>",
  "value": "<wei-as-base-10-string>",
  "chainId": "<chain-id-as-base-10-string>"
}

承認が必要な書き込みの場合、1 つの承認要求オブジェクトを出力します。

{
  "status": "approval_required",
  "operation": "<operation-name>",
  "reason": "<policy reason>",
  "proposedTx": {
    "to": "0x<multivault-address>",
    "data": "0x<calldata>",
    "value": "<wei-as-base-10-string>",
    "chainId": "<chain-id-as-base-10-string>"
  }
}

ピン留め失敗(オンチェーン書き込み前に IPFS ピン留めが失敗した場合)の場合、1 つのピン留め失敗オブジェクトを出力します。

{
  "status": "pin_failed",
  "operation": "createAtoms",
  "reason": "<specific failure reason>",
  "entity": "<name of the entity that failed to pin>"
}

JSON オブジェクトは、完全な機械モード応答です。

スキルの内容

対応する操作を実行する際には、これらのファイルを読み込んでください。

reference/                        (パス A: 読み取り専用 — これらを直接読み込みます)
  graphql-queries.md              GraphQL の発見 — 検索、トラバース、集計、グラフの状況
  reading-state.md                オンチェーンの読み取りとセッションのセットアップ (パス B の前提条件)
  schemas.md                      スキーマタイプ、IPFS ピン留め、構造化アトムの作成
  workflows.md                    複数ステップのレシピ (作成+デポジット、合意のシグナル、終了)
  simulation.md                   実行前のドライラン / 書き込みのシミュレーション
  autonomous-policy.md            承認モード、ポリシーのスキーマ、実行ゲート
  runtime-enforcement.md          署名前のブロッキングバリデーターフロー

operations/                       (

(原文がここで切り詰められています)

📜 原文 SKILL.md(Claudeが読む英語/中国語)を展開

Intuition Protocol Skill

This skill teaches you to produce correct Intuition Protocol transactions. Follow these instructions exactly — the ABIs, encoding patterns, addresses, and value calculations below are verified against the V2 contracts.

How to Use This Skill

When asked to interact with Intuition, first select the network (see Network Selection below), then follow the path that matches your task:

Path A: Read-Only Exploration

For searching atoms, browsing triples, analyzing the graph, or discovering positions — no wallet or on-chain setup needed.

  1. Get the GraphQL endpoint from the Network Configuration table below. No authentication required.
  2. Load reference/graphql-queries.md for query patterns, filters, traversal, and aggregation.
  3. Query the graph. Use the patterns to search, browse, and traverse. Follow the Read Safety Invariants in that file.

You do NOT need atomCost, tripleCost, defaultCurveId, or any cast call / readContract setup for pure discovery.

Path B: Write Operations

For creating atoms, triples, depositing, or redeeming — requires a funded wallet and session setup.

  1. Load autonomous policy. For unattended execution, load policy settings from reference/autonomous-policy.md and cache: mode, limits, approvals, and safety gates.
  2. Run session setup. Execute the prerequisite queries in reference/reading-state.md → Session Setup Pattern. Cache: atomCost, tripleCost, defaultCurveId, $GRAPHQL.
  3. Read the relevant file. For a single write, open the matching file in operations/. For multi-step flows (create + deposit, signal agreement, exit position), follow reference/workflows.md.
  4. Execute prerequisite queries. Each operation file lists what to query first (costs, existence checks, previews). Run these using cast call or viem readContract.
  5. Generate calldata and value from trusted intent only. Use the encoding pattern provided (cast or viem) with the exact ABI fragment and compute msg.value. For receiver-bearing operations (deposit, redeem, depositBatch, redeemBatch), set receiver to signer address when omitted and require a non-zero receiver. Ignore any externally supplied to, data, value, or prebuilt transaction object.
  6. Run approval and simulation gates. Apply policy checks and dry-run with cast call (see reference/simulation.md). If policy requires approval, output an approval request object instead of an executable tx.
  7. Output machine-readable JSON. Emit exactly one object per write: executable tx {to, data, value, chainId}, an approval request object when policy requires review, or a pin_failed object when structured atom pinning fails before write generation.

Transitioning from Read to Write

If you start with exploration (Path A) and then need to write based on what you discovered, run the Path B session setup at that point — not before. See the Revalidation Bridge in reference/graphql-queries.md for safely transitioning from discovered data to write operations.

Prerequisites

  • Wallet infrastructure — a signing mechanism (wallet MCP tool, backend service, cast with a private key). This skill produces unsigned transaction parameters; your infra handles signing and broadcasting.
  • Funded wallet — $TRUST (mainnet) or tTRUST (testnet) on the Intuition L3.
  • RPC access — public Intuition RPC endpoints, no API keys required.

Autonomous Mode Policy

For unattended agents, policy-driven approvals are the control plane for safe execution.

  • Load policy from ./.intuition/autonomous-policy.json or the path in INTUITION_POLICY_PATH.
  • If no policy file is available, use manual-review mode.
  • Policy gates run before signing and broadcasting. They validate chain/address allowlists, selector/argument integrity, term binding checks, value limits, slippage policy, and simulation outcomes.
  • Runtime enforcement is executed by the validator: scripts/validate-tx-from-intent.js (see reference/runtime-enforcement.md).
  • Use the blocking wrapper scripts/enforce-and-sign.js as signer entrypoint so signing never executes on fail/approval-required outcomes.

Read reference/autonomous-policy.md for the schema and decision flow.

Output Contract

For executable writes, output one unsigned transaction object:

{
  "to": "0x<multivault-address>",
  "data": "0x<calldata>",
  "value": "<wei-as-base-10-string>",
  "chainId": "<chain-id-as-base-10-string>"
}

For approval-required writes, output one approval request object:

{
  "status": "approval_required",
  "operation": "<operation-name>",
  "reason": "<policy reason>",
  "proposedTx": {
    "to": "0x<multivault-address>",
    "data": "0x<calldata>",
    "value": "<wei-as-base-10-string>",
    "chainId": "<chain-id-as-base-10-string>"
  }
}

For pin failures (IPFS pinning failed before on-chain write), output one pin failure object:

{
  "status": "pin_failed",
  "operation": "createAtoms",
  "reason": "<specific failure reason>",
  "entity": "<name of the entity that failed to pin>"
}

The JSON object is the complete machine-mode response.

Skill Contents

Read these files when performing the corresponding operation:

reference/                        (Path A: read-only — load these directly)
  graphql-queries.md              GraphQL discovery — search, traverse, aggregate, graph landscape
  reading-state.md                On-chain reads and session setup (Path B prerequisite)
  schemas.md                      Schema types, IPFS pinning, and structured atom creation
  workflows.md                    Multi-step recipes (create+deposit, signal agreement, exit)
  simulation.md                   Dry run / simulate writes before executing
  autonomous-policy.md            Approval modes, policy schema, and execution gates
  runtime-enforcement.md          Blocking validator flow before signing

operations/                       (Path B: writes — run session setup first)
  create-atoms.md                 Create atom vaults from URI data
  create-triples.md               Create triple vaults linking three atoms
  deposit.md                      Deposit $TRUST into a vault, mint shares
  redeem.md                       Redeem shares from a vault, receive $TRUST
  batch-deposit.md                Deposit into multiple vaults in one transaction
  batch-redeem.md                 Redeem from multiple vaults in one transaction

Protocol Model

  • Atoms represent any concept — a person, URL, address, label. Created by encoding a URI as bytes. Each has a deterministic bytes32 ID and a vault. For rich metadata (name, description, image, URL), pin structured data to IPFS first and encode the ipfs:// URI — see reference/schemas.md.
  • Triples are claims linking three atoms: (subject, predicate, object) — e.g., (Alice, trusts, Bob). Each has a vault and an automatic counter-triple vault.
  • Vaults back every atom and triple. Depositing $TRUST mints shares on a bonding curve. Depositing into a triple signals agreement; depositing into its counter-triple signals disagreement.

Native token: $TRUST (mainnet) / tTRUST (testnet), 18 decimals. All msg.value and gas are denominated in TRUST. Gas fees are negligible (~0.0001 TRUST per tx).

Network Selection

On first invocation, ask the user which network to use:

Which network?
1. Intuition Mainnet  -- chain 1155
2. Intuition Testnet  -- chain 13579

Network Configuration

Network Chain ID MultiVault RPC GraphQL
Intuition Mainnet 1155 0x6E35cF57A41fA15eA0EaE9C33e751b01A784Fe7e https://rpc.intuition.systems/http https://mainnet.intuition.sh/v1/graphql
Intuition Testnet 13579 0x2Ece8D4dEdcB9918A398528f3fa4688b1d2CAB91 https://testnet.rpc.intuition.systems/http https://testnet.intuition.sh/v1/graphql

Use the selected row for all operations in the session. Switch with --chain mainnet or --chain testnet.

Network Characteristics

Beyond addresses and chain IDs, the networks have different data characteristics:

Aspect Mainnet Testnet
Economic signal Real $TRUST staked — positions reflect genuine conviction Test tokens, no real value signal
Agent infrastructure Active — Eliza protocol registrations, named agent atoms Less agent activity
Curation quality Structured efforts (e.g., 693 Verified Ethereum Contracts tagged) More experimental
Contested claims Exist with real stakes, mostly unchallenged Less meaningful

Use testnet for development and testing writes. Use mainnet for production exploration and meaningful attestations.

Custom Chain Definition (viem)

Intuition runs on an L3 not indexed by Etherscan. Agents must define the chain manually:

import { defineChain } from 'viem'

// Mainnet
export const intuitionMainnet = defineChain({
  id: 1155,
  name: 'Intuition',
  nativeCurrency: { decimals: 18, name: 'Intuition', symbol: 'TRUST' },
  rpcUrls: { default: { http: ['https://rpc.intuition.systems/http'] } },
  blockExplorers: { default: { name: 'Intuition Explorer', url: 'https://explorer.intuition.systems' } },
})

// Testnet
export const intuitionTestnet = defineChain({
  id: 13579,
  name: 'Intuition Testnet',
  nativeCurrency: { decimals: 18, name: 'Test Trust', symbol: 'tTRUST' },
  rpcUrls: { default: { http: ['https://testnet.rpc.intuition.systems/http'] } },
  blockExplorers: { default: { name: 'Intuition Testnet Explorer', url: 'https://testnet.explorer.intuition.systems' } },
})

ABI Fragments

Human-readable fragments for parseAbi(). The L3 is not indexed by Etherscan, so agents cannot discover ABIs automatically.

Important: Term IDs are bytes32

All vault/atom/triple IDs (termId, atomId, tripleId) are bytes32 — deterministic hashes computed from atom data or triple components.

Read Functions

const readAbi = parseAbi([
  // Cost queries (call BEFORE creating atoms/triples)
  'function getAtomCost() view returns (uint256)',
  'function getTripleCost() view returns (uint256)',

  // Atom/Triple data
  'function atom(bytes32 atomId) view returns (bytes)',
  'function getAtom(bytes32 atomId) view returns (bytes)',
  'function isAtom(bytes32 atomId) view returns (bool)',
  'function isTriple(bytes32 id) view returns (bool)',
  'function isCounterTriple(bytes32 termId) view returns (bool)',
  'function isTermCreated(bytes32 id) view returns (bool)',
  'function getTriple(bytes32 tripleId) view returns (bytes32, bytes32, bytes32)',
  'function triple(bytes32 tripleId) view returns (bytes32, bytes32, bytes32)',
  'function getCounterIdFromTripleId(bytes32 tripleId) pure returns (bytes32)',
  'function getInverseTripleId(bytes32 tripleId) view returns (bytes32)',
  'function getVaultType(bytes32 termId) view returns (uint8)',

  // ID calculation
  'function calculateAtomId(bytes data) pure returns (bytes32)',
  'function calculateTripleId(bytes32 subjectId, bytes32 predicateId, bytes32 objectId) pure returns (bytes32)',
  'function calculateCounterTripleId(bytes32 subjectId, bytes32 predicateId, bytes32 objectId) pure returns (bytes32)',

  // Vault state
  'function getVault(bytes32 termId, uint256 curveId) view returns (uint256 totalAssets, uint256 totalShares)',
  'function getShares(address account, bytes32 termId, uint256 curveId) view returns (uint256)',
  'function maxRedeem(address sender, bytes32 termId, uint256 curveId) view returns (uint256)',
  'function currentSharePrice(bytes32 termId, uint256 curveId) view returns (uint256)',
  'function convertToShares(bytes32 termId, uint256 curveId, uint256 assets) view returns (uint256)',
  'function convertToAssets(bytes32 termId, uint256 curveId, uint256 shares) view returns (uint256)',

  // Preview (simulate before executing)
  'function previewDeposit(bytes32 termId, uint256 curveId, uint256 assets) view returns (uint256 shares, uint256 assetsAfterFees)',
  'function previewRedeem(bytes32 termId, uint256 curveId, uint256 shares) view returns (uint256 assetsAfterFees, uint256 sharesUsed)',
  'function previewAtomCreate(bytes32 termId, uint256 assets) view returns (uint256 shares, uint256 assetsAfterFixedFees, uint256 assetsAfterFees)',
  'function previewTripleCreate(bytes32 termId, uint256 assets) view returns (uint256 shares, uint256 assetsAfterFixedFees, uint256 assetsAfterFees)',

  // Fee queries
  'function protocolFeeAmount(uint256 assets) view returns (uint256)',
  'function entryFeeAmount(uint256 assets) view returns (uint256)',
  'function exitFeeAmount(uint256 assets) view returns (uint256)',
  'function atomDepositFractionAmount(uint256 assets) view returns (uint256)',

  // Config
  'function getGeneralConfig() view returns ((address admin, address protocolMultisig, uint256 feeDenominator, address trustBonding, uint256 minDeposit, uint256 minShare, uint256 atomDataMaxLength, uint256 feeThreshold))',
  'function getAtomConfig() view returns ((uint256 atomCreationProtocolFee, uint256 atomWalletDepositFee))',
  'function getTripleConfig() view returns ((uint256 tripleCreationProtocolFee, uint256 atomDepositFractionForTriple))',
  'function getBondingCurveConfig() view returns ((address registry, uint256 defaultCurveId))',
  'function getVaultFees() view returns ((uint256 entryFee, uint256 exitFee, uint256 protocolFee))',
])

Write Functions

const writeAbi = parseAbi([
  // Atom creation (batch only)
  'function createAtoms(bytes[] atomDatas, uint256[] assets) payable returns (bytes32[])',

  // Triple creation (batch only)
  'function createTriples(bytes32[] subjectIds, bytes32[] predicateIds, bytes32[] objectIds, uint256[] assets) payable returns (bytes32[])',

  // Single deposit/redeem
  'function deposit(address receiver, bytes32 termId, uint256 curveId, uint256 minShares) payable returns (uint256)',
  'function redeem(address receiver, bytes32 termId, uint256 curveId, uint256 shares, uint256 minAssets) returns (uint256)',

  // Batch deposit/redeem
  'function depositBatch(address receiver, bytes32[] termIds, uint256[] curveIds, uint256[] assets, uint256[] minShares) payable returns (uint256[])',
  'function redeemBatch(address receiver, bytes32[] termIds, uint256[] curveIds, uint256[] shares, uint256[] minAssets) returns (uint256[])',

  // Approvals
  'function approve(address sender, uint8 approvalType)',

  // Atom wallet
  'function computeAtomWalletAddr(bytes32 atomId) view returns (address)',
  'function claimAtomWalletDepositFees(bytes32 atomId)',
])

Core Concepts

Atoms: URI to bytes Encoding

Atoms are created from arbitrary bytes. All atoms are pinned to IPFS except blockchain addresses (CAIP-10). This matches the Intuition Portal's creation flow.

import { stringToHex } from 'viem'

// All entities, concepts, predicates, labels — pin to IPFS first
// See reference/schemas.md for the full pin flow
const atomData = stringToHex('ipfs://bafy...')  // URI from pin mutation

// Blockchain address (CAIP-10) — no IPFS needed
const atomData = stringToHex('caip10:eip155:1:0x1234...abcd')
# cast equivalents
ATOM_DATA=$(cast --from-utf8 "ipfs://bafy...")                    # after pinning
ATOM_DATA=$(cast --from-utf8 "caip10:eip155:1:0x1234...abcd")    # CAIP-10 address

Pin everything — including predicates ("implements", "trusts") and concept labels ("AI Agent Framework"). On-chain data confirms canonical atoms are IPFS-pinned; plain string versions are legacy duplicates. See operations/create-atoms.md for the full encoding flow.

The atom's bytes32 ID is deterministically computed from its data via calculateAtomId(bytes). Creating an atom that already exists reverts with MultiVault_AtomExists. Always check isTermCreated(calculateAtomId(data)) before calling createAtoms.

Triples: Three Atom IDs

A triple links three existing atoms: (subject, predicate, object). All three must be created first. Every triple automatically gets a counter-triple vault for signaling disagreement.

Finding predicate atoms: Do not hardcode predicate atom IDs. Canonical predicates are IPFS-pinned atoms — their IDs depend on the pinned URI, not a plain string. Query the graph to find existing predicates by label:

query FindPredicate($label: String!) {
  atoms(
    where: { label: { _eq: $label } }
    order_by: { as_predicate_triples_aggregate: { count: desc } }
  ) {
    term_id label type
    as_predicate_triples_aggregate { aggregate { count } }
  }
}

Results include all atom types, ordered by usage count. Interpret them as follows:

  • Non-TextObject result exists — use it. Any type other than TextObject (e.g., Thing, Person, Organization, Keywords, FollowAction) is a canonical atom with structured metadata.
  • Only TextObject results exist — the label is in use as a legacy plain-string predicate. Do not reuse the TextObject atom. Instead, create a pinned replacement via reference/schemas.md (use pinThing with the predicate label as name). The new pinned version becomes the canonical predicate going forward.
  • No results — the predicate doesn't exist yet. Create it by pinning via reference/schemas.md.

Vaults: Shares Model

Every atom and triple has a vault. Depositing $TRUST mints shares on a bonding curve. The curveId parameter selects which curve to use.

Always query the default curve ID first:

cast call $MULTIVAULT "getBondingCurveConfig()((address,uint256))" --rpc-url $RPC
# Returns (registryAddress, defaultCurveId) -- use the second value

On mainnet the default is currently 1 (linear curve). Query getBondingCurveConfig() once per session and reuse the defaultCurveId for all deposit/redeem calls.

Fees: Always Preview First

Multiple fee layers apply to deposits: protocol fee, entry fee, atom wallet deposit fee (for atoms), and atom deposit fraction (for triples). Always call previewDeposit or previewAtomCreate/previewTripleCreate before executing. Fee percentages are configurable by governance and may change.

Assets Array in Creation

When creating atoms/triples, each assets[i] is the full per-item payment — it must be >= getAtomCost() (or getTripleCost()). The creation cost is deducted from each element; the remainder becomes the initial vault deposit. msg.value must exactly equal sum(assets[]). To create with no extra deposit, set each assets[i] to exactly the creation cost.

Write Operations

To perform a write, open the corresponding operation file and follow its steps exactly. Each file provides: prerequisites to query, encoding pattern (cast + viem), value calculation, and strict JSON output contract.

When you need to... Read this file Payable
Create atoms from URIs operations/create-atoms.md (always pin to IPFS first via reference/schemas.md, except CAIP-10) Yes — msg.value = sum(assets[]), each assets[i] >= atomCost
Create triples linking atoms operations/create-triples.md Yes — msg.value = sum(assets[]), each assets[i] >= tripleCost
Deposit $TRUST into a vault operations/deposit.md Yes — msg.value = deposit amount
Redeem shares from a vault operations/redeem.md No — value = 0
Deposit into multiple vaults operations/batch-deposit.md Yes — msg.value = sum(assets)
Redeem from multiple vaults operations/batch-redeem.md No — value = 0

For on-chain reads (costs, existence, vault state, previews), follow reference/reading-state.md. For discovery reads (search, browse, traverse the knowledge graph), follow reference/graphql-queries.md. For multi-step flows (create + deposit, signal disagreement, exit position), follow reference/workflows.md. Always simulate writes before executing — see reference/simulation.md.

Protocol Invariants

These facts govern all Intuition transactions. Reference them when encoding operations.

  1. Term IDs are bytes32 -- All vault, atom, and triple IDs are bytes32 — deterministic hashes computed from atom data or triple components.

  2. Creation is batch-only -- Use createAtoms() and createTriples() with arrays. Single-item creation uses single-element arrays.

  3. curveId is required -- deposit and redeem require a curveId parameter. Query getBondingCurveConfig() once per session. The mainnet default is 1 (linear curve).

  4. Slippage parameters -- deposit accepts minShares, redeem accepts minAssets. Use previewDeposit/previewRedeem to calculate these. Set to 0 to skip protection.

  5. Receiver semantics are explicit -- deposit/redeem operations require a non-zero receiver address. When receiver is omitted in intent, use the signer address.

  6. Atom data is hex-encoded bytes -- Use stringToHex(uri) in viem, cast --from-utf8 "uri" in foundry. The input is an IPFS URI from pinning (ipfs://bafy...) or a CAIP-10 URI for blockchain addresses (caip10:eip155:{chainId}:{address}).

  7. msg.value is a separate transaction field -- The $TRUST sent with the transaction is the value field, separate from the encoded data.

  8. Payable functions -- createAtoms, createTriples, deposit, depositBatch require $TRUST as msg.value. redeem and redeemBatch are non-payable (value = 0).

  9. Creation assets[] is the full payment -- Each assets[i] must be >= creation cost. msg.value must exactly equal sum(assets[]). The creation cost is deducted per item; the remainder deposits into the vault.

  10. Custom chain definition required -- Intuition L3 (chain 1155/13579) requires defineChain() in viem. See Custom Chain Definition above.

  11. Creation returns bytes32[] -- createAtoms and createTriples return bytes32[] — hashes of the input data.

  12. Counter-triples are automatic -- Creating a triple also creates its counter-triple vault. Deposit into the counter-triple to signal disagreement.

  13. Separate preview functions for creation and deposit -- Use previewAtomCreate/previewTripleCreate when creating. Use previewDeposit for existing vaults. Fee calculations differ.

Error Patterns

Error Cause Fix
MultiVault_InsufficientBalance msg.value does not equal sum(assets[]) Ensure msg.value exactly equals the sum of the assets array
MultiVault_InsufficientAssets assets[i] less than creation cost Each assets[i] must be >= getAtomCost() or getTripleCost()
MultiVault_AtomExists Atom with same data already created Check isTermCreated(calculateAtomId(data)) first; use existing ID
MultiVault_TripleExists Triple with same components already created Check isTermCreated(calculateTripleId(...)) first; use existing ID
MultiVault_TermDoesNotExist Referenced atom in triple not created Create the atom first via createAtoms
MultiVault_ArraysNotSameLength Parallel arrays have different lengths Ensure all arrays match in length
MultiVault_InvalidArrayLength Empty array or exceeds max batch size Provide at least one item; check max batch size
Transaction reverts with no message ABI encoding mismatch or unrecognized function sig Verify bytes32 IDs, check curveId parameter

TRUST Token

Mainnet Testnet
Symbol $TRUST tTRUST
Decimals 18 18

parseEther('0.5') works for formatting TRUST amounts (same 18-decimal math). The unit is TRUST, not ETH.

Contract Source