{"_id":"@algofam/ac2-open-claw-reference","name":"@algofam/ac2-open-claw-reference","dist-tags":{"next":"1.0.0-canary.26","latest":"1.0.0-canary.26"},"versions":{"1.0.0-canary.26":{"name":"@algofam/ac2-open-claw-reference","version":"1.0.0-canary.26","description":"Reference OpenClaw plugin for the AC2 protocol. Implements signing, chat, and x402 Algorand paid fetch over Liquid Auth.","keywords":["ac2","algorand","openclaw","openclaw-plugin","didcomm","webrtc","liquid-auth","wallet","signing","x402","payments"],"license":"Apache-2.0","homepage":"https://github.com/algorandfoundation/ac2/tree/main/packages/ac2-open-claw-reference#readme","bugs":{"url":"https://github.com/algorandfoundation/ac2/issues"},"repository":{"type":"git","url":"git+https://github.com/algorandfoundation/ac2.git","directory":"packages/ac2-open-claw-reference"},"type":"module","sideEffects":false,"main":"./dist/index.js","types":"./dist/index.d.ts","publishConfig":{"access":"public"},"exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js"}},"release":null,"dependencies":{"@algorandfoundation/algokit-utils":"10.0.0-beta.4","@sinclair/typebox":"^0.32.0","@x402/avm":"^2.20.0","@x402/core":"^2.20.0","@x402/fetch":"^2.20.0","qrcode-terminal":"^0.12.0","@algofam/ac2-cli":"1.0.0-canary.3","@algorandfoundation/ac2-sdk":"1.0.0-canary.4"},"devDependencies":{"@types/node":"^22.0.0","@types/qrcode-terminal":"^0.12.2","esbuild":"^0.25.12","openclaw":"2026.7.1-2","typescript":"~5.8.3","vitest":"^3.2.0","@algorandfoundation/package-releaser":"0.0.1"},"openclaw":{"extensions":["./dist/entry.js"],"channels":["ac2"],"channelEnvVars":[{"name":"AC2_LIQUID_AUTH_SERVER","description":"Liquid Auth signaling server origin. Overrides the `liquidAuthServer` channel config at runtime. Defaults to https://debug.liquidauth.com when neither is set.","required":false},{"name":"AC2_HEARTBEAT_TIMEOUT_MS","description":"Milliseconds without inbound ac2-heartbeat traffic before the plugin closes the channel. Defaults to 50000.","required":false}],"contracts":{"tools":["ac2_sign","ac2_capabilities","ac2_x402_fetch"],"commands":["ac2"]}},"scripts":{"build":"node scripts/bundle.mjs && tsc -p tsconfig.build.json && node scripts/bundle.mjs --flatten-dts","dist:pack:selfcontained":"node scripts/pack-selfcontained.mjs","type-check":"tsc --noEmit","test":"vitest run","test:watch":"vitest","release":"package-releaser","release:dry-run":"package-releaser --dry-run","install:plugin":"node scripts/bundle.mjs && tsc -p tsconfig.build.json && node scripts/bundle.mjs --flatten-dts && TGZ=\"$(node scripts/pack-plugin.mjs --pack-destination /tmp | tail -n1)\" && openclaw plugins install \"file:$TGZ\" --dangerously-force-unsafe-install --force && openclaw plugins enable ac2","uninstall:plugin":"openclaw plugins uninstall ac2"},"_id":"@algofam/ac2-open-claw-reference@1.0.0-canary.26","_integrity":"sha512-Y89k6cuMjle+iyVxvDJWCZfyqno8KvJahbJ5lJkniKtxlKXoQt4iM1aNXH3Cn1RMmF2gIo4PVTdQ3jgTH0xN1Q==","_resolved":"/tmp/3639dba68f541d4748a9ba4d636e3815/algofam-ac2-open-claw-reference-1.0.0-canary.26.tgz","_from":"file:algofam-ac2-open-claw-reference-1.0.0-canary.26.tgz","_nodeVersion":"24.13.1","_npmVersion":"11.8.0","dist":{"integrity":"sha512-Y89k6cuMjle+iyVxvDJWCZfyqno8KvJahbJ5lJkniKtxlKXoQt4iM1aNXH3Cn1RMmF2gIo4PVTdQ3jgTH0xN1Q==","shasum":"c9fc1807bf1f501e0d3a2c94545a5e90cb44bac7","tarball":"https://registry.npmjs.org/@algofam/ac2-open-claw-reference/-/ac2-open-claw-reference-1.0.0-canary.26.tgz","fileCount":107,"unpackedSize":418520,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEYCIQCoyt1eJMr+2eFBQb35P42BCkGQ8tSt9d9X21ESEjrR+AIhANQrEgsYaGP9S2FTVLQf8UJpHeoPjJd4F/ahohxWfpUw"}]},"_npmUser":{"name":"mikefeher","email":"npm@phearzero.com"},"directories":{},"maintainers":[{"name":"mikefeher","email":"npm@phearzero.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/ac2-open-claw-reference_1.0.0-canary.26_1786053347484_0.38313017229070767"},"_hasShrinkwrap":false}},"time":{"created":"2026-08-06T21:55:47.269Z","1.0.0-canary.26":"2026-08-06T21:55:47.899Z","modified":"2026-08-06T21:55:48.233Z"},"maintainers":[{"name":"mikefeher","email":"npm@phearzero.com"}],"description":"Reference OpenClaw plugin for the AC2 protocol. Implements signing, chat, and x402 Algorand paid fetch over Liquid Auth.","homepage":"https://github.com/algorandfoundation/ac2/tree/main/packages/ac2-open-claw-reference#readme","keywords":["ac2","algorand","openclaw","openclaw-plugin","didcomm","webrtc","liquid-auth","wallet","signing","x402","payments"],"repository":{"type":"git","url":"git+https://github.com/algorandfoundation/ac2.git","directory":"packages/ac2-open-claw-reference"},"bugs":{"url":"https://github.com/algorandfoundation/ac2/issues"},"license":"Apache-2.0","readme":"# `@algofam/ac2-open-claw-reference`\n\nThe reference [OpenClaw](https://docs.openclaw.ai/) plugin for **AC2**. It lets\nyour OpenClaw agent chat with a mobile wallet and ask that wallet to sign things,\nwhile you keep custody of your keys.\n\nYou get three agent tools and one channel:\n\n| Tool or channel | What it gives the agent |\n| --- | --- |\n| `ac2_capabilities` | Whether a wallet is connected, its address, and what it can sign. |\n| `ac2_sign` | Ask the wallet to sign a payload; the user approves on their phone. |\n| `ac2_x402_fetch` | Fetch an HTTP resource that charges with x402 on Algorand, paying with wallet approval. |\n| Channel `ac2` | The wallet becomes a chat channel: you message your agent from your phone. |\n\nThe wallet connection itself is owned by the separate\n[AC2 service](../ac2-cli/README.md), which this plugin starts for you.\n\n## Install\n\n```sh\nnpm install -g openclaw @algofam/ac2-cli@next\n```\n\nThen add the plugin to OpenClaw:\n\n```sh\nopenclaw plugins install @algofam/ac2-open-claw-reference@next\nopenclaw plugins enable ac2\nopenclaw ac2 setup          # writes the channel + tools into openclaw.json\nopenclaw gateway restart\n```\n\nKeep the `@next` tag and do not add `--pin`: OpenClaw records that moving spec, so\nboth the OpenClaw updater and the plugin-only updater can find newer AC2 canary\nreleases. The unversioned package and `@latest` follow stable releases and will\nnot pick up canaries.\n\nYou need Node.js 22 or newer, an OpenClaw agent already set up, and the `ac2`\nbinary from `@algofam/ac2-cli` on your `PATH`. The native WebRTC and\nkeychain dependencies belong to that service, not to this plugin.\n\n## Use it\n\n```sh\nopenclaw ac2 pair\n```\n\nScan the QR code with your AC2 controller wallet and approve. That command starts\nthe AC2 service if it is not already running, so this is the only step.\n\nFrom then on:\n\n- Message your agent from the wallet app and the reply comes back to your phone,\n  including tool activity and sub-agent progress.\n- The agent can call `ac2_capabilities` to see the connection, `ac2_sign` to ask\n  you to sign a payload, and `ac2_x402_fetch` for paid resources.\n\nRunning `openclaw ac2 pair` again while a wallet is connected simply prints the\nlive session and exits.\n\n### Paid fetches\n\n`ac2_x402_fetch` handles the whole x402 flow: it reads the payment challenge, asks\nyou to approve the Algorand payment on your phone, retries with the signature, and\nreturns the result. For the demo weather resource the agent should use this tool\neven for a plain question like \"what's the weather like today?\", with the default\nendpoint:\n\n```text\nhttps://example.x402.goplausible.xyz/avm/weather\n```\n\n## Commands\n\n| Command | What it does |\n| --- | --- |\n| `openclaw ac2 pair` | Pair a wallet (starts the AC2 service if needed). |\n| `openclaw ac2 status` | Show the connection as the service reports it. |\n| `openclaw ac2 connections` | List remembered wallet connections. |\n| `openclaw ac2 forget` | Drop a pairing and the agent identity bound to it. |\n| `openclaw ac2 setup` | Write or refresh the plugin's `openclaw.json` wiring. |\n| `/ac2 status` | The same status from inside a chat. |\n\nEverything except `pair` and `setup` is read-only and never starts the service.\n\n## Configuration\n\n`openclaw ac2 setup` writes the wiring for you. The result looks like this:\n\n```json5\n{\n  plugins: { entries: { ac2: { enabled: true } } },\n  channels: { ac2: { liquidAuthServer: 'https://debug.liquidauth.com' } },\n}\n```\n\nConnection settings are read by the process that owns the connection, which is the\nAC2 service, so set them in its environment (before `ac2 service start`, or in the\nunit written by `ac2 service install`):\n\n| Variable | Purpose |\n| --- | --- |\n| `AC2_LIQUID_AUTH_SERVER` | Overrides `liquidAuthServer`. |\n| `AC2_HEARTBEAT_TIMEOUT_MS` | Wallet channel liveness timeout (default `50000`). |\n| `AC2_RUNTIME` | Which runtime drives agent turns. `openclaw ac2 pair` selects `openclaw-gateway`; `socket` is the rollback. |\n\n## Update and remove\n\n```sh\nopenclaw update                     # updates OpenClaw and @next plugins together\nopenclaw plugins update ac2         # AC2 only\nopenclaw gateway restart\n```\n\nPreview an update with `openclaw plugins update ac2 --dry-run`. To remove the\nplugin, run `openclaw plugins uninstall ac2`.\n\n## Troubleshooting\n\n**The tools say no wallet is connected.** Check `openclaw ac2 status`. If the\nservice is not running, run `openclaw ac2 pair`.\n\n**The wallet paired but nothing reaches the agent.** The agent may be bound to a\ndifferent wallet (see the first-controller lock in\n[ARCHITECTURE.md](./ARCHITECTURE.md)). Run `openclaw ac2 forget`, then pair again.\n\n**You upgraded and turns are not running.** A service that was already running\nkeeps the runtime it started with. Run `ac2 service stop`, then\n`openclaw ac2 pair`.\n\n## Learn more\n\n- [ARCHITECTURE.md](./ARCHITECTURE.md): how the plugin, the AC2 service and the\n  OpenClaw gateway divide the work, plus the x402 and identity details.\n- [`@algofam/ac2-cli`](../ac2-cli): the AC2 service and `ac2` CLI.\n- [`@algorandfoundation/ac2-sdk`](../ac2-sdk): the protocol SDK.\n- [Developing in this monorepo](../CONTRIBUTING.md).\n","readmeFilename":"README.md","_rev":"1-81f8c029388332be4be16814652dc69f"}