{"_id":"@arcproof/sdk-elizaos","_rev":"2-e93bb625a6bb4cb836fed5cfce693955","name":"@arcproof/sdk-elizaos","dist-tags":{"latest":"0.2.0"},"versions":{"0.1.0":{"name":"@arcproof/sdk-elizaos","version":"0.1.0","keywords":["arcproof","elizaos","ai-agents","verification","plugin"],"license":"MIT","_id":"@arcproof/sdk-elizaos@0.1.0","maintainers":[{"name":"yuvan05","email":"yuvan.r2005@gmail.com"}],"dist":{"shasum":"97ba50b25d0cf69d1b239189c8ae1aec724e16cf","tarball":"https://registry.npmjs.org/@arcproof/sdk-elizaos/-/sdk-elizaos-0.1.0.tgz","fileCount":5,"integrity":"sha512-Zsa6kKt5SiTgsK2Aq80weaW51nzjA436P4Hz34BfmA0MZHrJFxidHv7EVK5Hrc5F+YfYk6Nd6KX12U540h6aoQ==","signatures":[{"sig":"MEYCIQDLzlqFdGfZke/lISa4ufwqm0rm6XMc+jwfqB1nG7RtHQIhAKS5265QEDWkFeCQMNeWI/P4CWRoXcD5OeovGl5uxPPo","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":12936},"main":"./dist/index.js","type":"module","types":"./dist/index.d.ts","exports":{".":{"types":"./dist/index.d.ts","default":"./dist/index.js"}},"gitHead":"edd9dd7e3cdb6e1b91e93b80e7ce53f46553b640","scripts":{"build":"tsc","typecheck":"tsc --noEmit"},"_npmUser":{"name":"yuvan05","email":"yuvan.r2005@gmail.com"},"_npmVersion":"11.18.0","description":"ElizaOS plugin for @arcproof/sdk -- expose a bonded, independently-verified, real-payment action inside an ElizaOS agent.","directories":{},"_nodeVersion":"24.12.0","publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"typescript":"^5.7.3","@types/node":"^22.10.5","@arcproof/sdk":"*"},"peerDependencies":{"@arcproof/sdk":"^0.1.0","@elizaos/core":"^1.0.0"},"_npmOperationalInternal":{"tmp":"tmp/sdk-elizaos_0.1.0_1783185152073_0.1363524949619248","host":"s3://npm-registry-packages-npm-production"}},"0.2.0":{"name":"@arcproof/sdk-elizaos","version":"0.2.0","description":"ElizaOS plugin for @arcproof/sdk -- native orchestrator + specialist builders (runtime.useModel, no LangChain needed) plus the Action/Plugin wrapper, for a bonded, independently-verified, real-payment agent.","type":"module","main":"./dist/index.js","types":"./dist/index.d.ts","exports":{".":{"types":"./dist/index.d.ts","default":"./dist/index.js"}},"publishConfig":{"access":"public"},"scripts":{"build":"tsc","typecheck":"tsc --noEmit"},"keywords":["arcproof","elizaos","ai-agents","verification","plugin"],"license":"MIT","peerDependencies":{"@arcproof/sdk":"^0.1.0","@elizaos/core":"^1.0.0"},"devDependencies":{"@arcproof/sdk":"*","typescript":"^5.7.3","@types/node":"^22.10.5"},"gitHead":"b2c7682186bdcf5b2ec80affce78502effd5c94a","_id":"@arcproof/sdk-elizaos@0.2.0","_nodeVersion":"24.12.0","_npmVersion":"11.18.0","dist":{"integrity":"sha512-Lm47ahBgMh9wQhaYTc7EHt1c+CX6Fwr+FTcn69zctXmG3NczNRNr7ejgdi0PAhUzi9Zblr9JQeMeT/b6hJYm1A==","shasum":"dce3ff16bf7b489ff3f38f957fee0f41fea1cfe7","tarball":"https://registry.npmjs.org/@arcproof/sdk-elizaos/-/sdk-elizaos-0.2.0.tgz","fileCount":8,"unpackedSize":36822,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEQCIFS/X7TKXy1ig+tZSIJxYy/vUklswtVkKU4cX+Lp3TPzAiA0kAw0pFBwPb4obUTRFWQuZNQoO/mckmxW4Nv0pmz+ug=="}]},"_npmUser":{"name":"yuvan05","email":"yuvan.r2005@gmail.com"},"directories":{},"maintainers":[{"name":"yuvan05","email":"yuvan.r2005@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/sdk-elizaos_0.2.0_1783192299045_0.5370525954508205"},"_hasShrinkwrap":false}},"time":{"created":"2026-07-04T17:12:31.957Z","modified":"2026-07-04T19:11:39.325Z","0.1.0":"2026-07-04T17:12:32.236Z","0.2.0":"2026-07-04T19:11:39.196Z"},"license":"MIT","keywords":["arcproof","elizaos","ai-agents","verification","plugin"],"description":"ElizaOS plugin for @arcproof/sdk -- native orchestrator + specialist builders (runtime.useModel, no LangChain needed) plus the Action/Plugin wrapper, for a bonded, independently-verified, real-payment agent.","maintainers":[{"name":"yuvan05","email":"yuvan.r2005@gmail.com"}],"readme":"# @arcproof/sdk-elizaos\n\nElizaOS adapter for [`@arcproof/sdk`](../sdk): the full orchestrator → specialists → evaluator → real-payment flow, as a real ElizaOS `Action`/`Plugin`.\n\n**A standalone alternative to [`@arcproof/sdk-langchain`](../sdk-langchain), not an add-on.** This package ships its own native orchestrator + specialist builders (`createElizaOrchestrator`, `createElizaClaimGatherer`) that run entirely on ElizaOS's own model API (`runtime.useModel`) -- **zero LangChain dependency**. So `@arcproof/sdk` + `@arcproof/sdk-elizaos` alone gives you the complete pipeline; you never need `@arcproof/sdk-langchain` unless you specifically want LangChain.\n\n```text\norchestrator (createElizaOrchestrator)   -- picks which specialists a request needs\nspecialist   (createElizaClaimGatherer)  -- runs its tools, drafts claims via runtime.useModel\nevaluator    (@arcproof/sdk's VerifierRegistry) -- independently verifies, zero LLM calls\n```\n\nPick this or `@arcproof/sdk-langchain` based purely on which agent framework your product already runs on -- the trust layer (verification + on-chain payment, in `@arcproof/sdk` core) is identical either way.\n\n## Install\n\n```bash\nnpm install @arcproof/sdk @arcproof/sdk-elizaos @elizaos/core\n```\n\n## Usage A -- standalone (native ElizaOS, no LangChain)\n\nReal, working code from [`examples/defi-diligence-agent`](../../examples/defi-diligence-agent) (`src/shared-native.ts` + `src/elizaos-native.ts`). The three specialists (`onchain-agent-v1`, `news-agent-v1`, `compliance-agent-v1`) are built with this package's own `createElizaClaimGatherer`, and the orchestrator with `createElizaOrchestrator` -- all on `runtime.useModel`, no LangChain anywhere. Verified live on Arc testnet: orchestrator plan → specialists → deterministic verification against live DefiLlama/CoinGecko/Snapshot data → real per-specialist payout, `ACCEPT`.\n\n```ts\nimport { createElizaClaimGatherer, createElizaOrchestrator, createArcProofAction, type ElizaTool } from \"@arcproof/sdk-elizaos\";\nimport { VerifierRegistry, ARC_TESTNET } from \"@arcproof/sdk\";\n\n// A tool is a plain async fn returning a text result (or an \"ERROR: ...\" line\n// the model is told to skip) -- no LangChain tool() wrapper.\nconst fetchTvl: ElizaTool = {\n  name: \"fetch_tvl\",\n  description: \"Fetch a protocol's live TVL in USD.\",\n  run: async (ctx) => `tvl_usd=${await lookUpTvl(ctx.protocolSlug)} source=... simulated=false`,\n};\n\nconst onchain = createElizaClaimGatherer({\n  agentId: \"onchain-agent-v1\",\n  tools: [fetchTvl /*, ... */],\n  claimTypes: [\"tvl\", \"price_change\", \"wallet_flow\", \"token_concentration\"],\n  systemPrompt: \"You are the on-chain data specialist. Draft one claim per metric your tools returned; copy values verbatim.\",\n});\n\n// Orchestrator picks which specialists a given request needs.\nconst gatherClaims = createElizaOrchestrator({\n  specialists: [{ id: \"onchain-agent-v1\", description: \"On-chain data: TVL, price, wallet flow, concentration.\", gatherClaims: onchain } /*, news, compliance */],\n});\n\nconst action = createArcProofAction({\n  name: \"DEFI_TREASURY_DILIGENCE\",\n  description: \"Independently verifies protocol claims before treasury deployment, paying each specialist only if its claims check out.\",\n  trustedAgentConfig: { network: ARC_TESTNET, contractAddress, verifiers /* VerifierRegistry, one entry per claim_type */ },\n  requester, settler, providerAddresses,\n  budgetAmount: 0.3,\n  gatherClaims, // the native ElizaOS orchestrator -- createArcProofAction injects runtime.useModel into its context automatically\n  buildContext: (message) => ({ protocolSlug: \"uniswap\", requestText: message.content.text }),\n});\n```\n\n`createArcProofAction`'s handler injects the ElizaOS `runtime` it receives into the job context, so the native gatherers reach `runtime.useModel` without you wiring anything -- the `gatherClaims(context)` signature stays framework-agnostic.\n\n## Usage B -- reuse a LangChain orchestrator (if you already have one)\n\nIf your specialists are already built with [`@arcproof/sdk-langchain`](../sdk-langchain), you can pass its orchestrator straight into `createArcProofAction` -- ElizaOS never has to know the difference. Real, working code from [`examples/lending-apr-agent`](../../examples/lending-apr-agent) (`src/elizaos-demo.ts` + `src/shared.ts`), verified live.\n\n```ts\nimport { createArcProofAction, createArcProofPlugin } from \"@arcproof/sdk-elizaos\";\nimport { createLangChainOrchestrator } from \"@arcproof/sdk-langchain\";\nimport { VerifierRegistry, ARC_TESTNET } from \"@arcproof/sdk\";\nimport { getModel, makeSpecialists, makeVerifiers } from \"./shared.js\"; // same file the LangChain-only entrypoint uses\n\nconst model = await getModel();\nconst specialists = makeSpecialists(model); // lending-apr-agent-v1 + lending-eligibility-agent-v1\nconst verifiers = makeVerifiers(); // one VerifierRegistry entry per claim_type, deterministic\n\n// The orchestrator IS the gatherClaims the ElizaOS action calls -- no\n// separate ElizaOS-specific planning logic needed. Could just as easily be\n// a single createLangChainClaimGatherer() instead of a full orchestrator;\n// ElizaOS never has to know the difference, it just sees the reply either way.\nconst gatherClaims = createLangChainOrchestrator({\n  model,\n  specialists,\n  buildPlanningMessage: (context) => `Request: ${context.requestText}\\nLoan id: ${context.loanId}`,\n});\n\nconst action = createArcProofAction({\n  name: \"CHECK_TRUE_APR\",\n  description: \"Independently verifies a loan's true APR and borrower eligibility before answering, paying each specialist only if their claim checks out.\",\n  trustedAgentConfig: { network: ARC_TESTNET, contractAddress, verifiers },\n  requester, // WalletCredential\n  settler, // WalletCredential\n  providerAddresses: { \"lending-apr-agent-v1\": \"0x...\", \"lending-eligibility-agent-v1\": \"0x...\" },\n  budgetAmount: 0.06,\n  gatherClaims,\n  buildContext: (message) => ({ loanId: \"loan-001\", requestText: message.content.text }),\n});\n\nconst plugin = createArcProofPlugin({\n  name: \"arcproof-trust-layer\",\n  description: \"Bonded, independently-verified agent actions with real on-chain payment.\",\n  actions: [action],\n});\n\n// register `plugin` with your ElizaOS character/project as you would any other plugin\n```\n\n## Why this doesn't import types from `@elizaos/core`\n\n`@elizaos/core`'s top-level barrel (`dist/index.d.ts`) re-exports both `./types` (which defines `Action`/`Plugin` as types) and `./actions` (a same-named runtime export) via `export *`. TypeScript silently drops an ambiguous re-exported name rather than erroring, so `import type { Action } from \"@elizaos/core\"` fails at typecheck time even though the type genuinely exists in the package (confirmed against `@elizaos/core@1.7.2`'s actual `.d.ts` files).\n\nThis package defines structurally-identical local types (`ElizaAction`, `ElizaPlugin`, etc.) instead of depending on that fragile export path. TypeScript's structural typing makes the objects this package builds assignable to the real `Action`/`Plugin` types wherever your actual ElizaOS runtime code expects them -- `@elizaos/core` is still a declared peer dependency because you need the real package installed to run an agent at all.\n\n## Worked examples (real, verified live)\n\nBoth ship an `elizaos-demo.ts` that drives the exact same specialists as their LangChain entrypoint through a real `ElizaAction.handler` -- proving the two adapters are interchangeable, not two different products:\n\n- [`examples/defi-diligence-agent`](../../examples/defi-diligence-agent) -- the real `onchain-agent-v1`/`news-agent-v1`/`compliance-agent-v1` DeFi specialists.\n- [`examples/lending-apr-agent`](../../examples/lending-apr-agent) -- a different vertical (lending true-APR + eligibility).\n\n## License\n\nMIT\n","readmeFilename":"README.md"}