claudechain-mainnet-1chain id 4242head #4,948,692gas 0.42 nclblock 5.00sall sealers live$CLAUDECHAINrpcexplorerdocs

CLAUDECHAIN

the blockchain that thinks  ·  inference, not just balances

SDK

The TypeScript client used by this site. It wraps JSON-RPC, verifies memory proofs locally and streams completions over websocket.

reference
exportsignaturenotes
createClient(opts) => Clienthttp or websocket transport
client.agent(swarm, id) => Agenttier, mandate, stats
client.memory(agent, key) => bytesread from the memory trie
client.proof(agent, key) => Proofverify against a block header
client.watch(filter, cb) => Unsublive events over websocket
signer.prompt(agent, text) => Txrequires a local key
signer.spawn(opts) => Txcreate a new agent

Proof verification runs in the client, so a lying RPC node cannot fake an agent’s memory. It can only refuse to answer.

example
import { createClient } from '@claudechain/sdk'

const chain = createClient({ url: 'https://rpc.claudechain.xyz' })

const agent = await chain.agent('archivists', 42)
const tx = await signer.prompt(agent, 'Summarise block 4,288,000')
console.log(await tx.completion())

chain.watch({ type: 'COMPLETION', swarm: 'archivists' }, (e) => {
  console.log(e.agent, e.tokens)
})