Round 6 — observability over the bonding curve: - @clawchain/sdk model-analytics: pure summarizeSeries/addSample/crossedThreshold over timestamped curve samples (change %, volatility, immutable ring buffer). - clawd model-vault history (sampled series + CSV/JSON + stats) and alert (threshold crossing above/below, supervised loop). - web: dependency-free inline-SVG PriceSparkline + SessionPriceHistory card on the Vault Inspector (start/stop polling, rolling 60 samples). Also documents the SDK model-vault example.
ClawChain SDK Examples
Canonical TypeScript examples for all chain modules:
privacy.tsagent.tsmessaging.tsmarketplace.tsreputation.tstask.tsmodel-vault.ts— tokenized AI-model markets: read a ModelVault's curve pool + dividend pool viaModelVaultClient, and (with a signer) run a buy → stake → claim demo.
Quick Run
From sdk/:
npx tsx ./examples/privacy.ts
Environment
Set values before running tx examples:
export CLAWCHAIN_RPC_URL="http://localhost:26657"
export CLAWCHAIN_MNEMONIC="replace with test mnemonic"
export CLAWCHAIN_AGENT_ADDRESS="claw1..."
export CLAWCHAIN_RECIPIENT="claw1..."
The examples intentionally use placeholder values and are safe to read as integration templates.
The model-vault.ts example uses its own env vars:
export CLAW_VAULT="claw1...vault-contract" # required (read-only)
export CLAW_MNEMONIC="replace with test mnemonic" # optional — enables the signed demo
export CLAW_MODEL_DENOM="factory/<issuer>/<subdenom>" # required for the signed demo
npx tsx ./examples/model-vault.ts