{"_id":"@bwmxaf/ac2-open-claw-reference","name":"@bwmxaf/ac2-open-claw-reference","dist-tags":{"test":"1.0.0-canary.2","latest":"1.0.0-canary.2"},"versions":{"1.0.0-canary.2":{"name":"@bwmxaf/ac2-open-claw-reference","version":"1.0.0-canary.2","description":"Reference OpenClaw plugin for the AC2 protocol. Implements both tool and channel interfaces for signing and chat over Liquid Auth.","keywords":["ac2","algorand","openclaw","openclaw-plugin","didcomm","webrtc","liquid-auth","wallet","signing"],"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","provenance":true},"exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js"}},"scripts":{"build":"node scripts/bundle.mjs && tsc -p tsconfig.build.json && node scripts/bundle.mjs --flatten-dts","type-check":"tsc --noEmit","test":"vitest run","test:watch":"vitest","release":"package-releaser","release:dry-run":"package-releaser --dry-run","rebuild:node-datachannel":"NDC=\"${OPENCLAW_HOME:-$HOME/.openclaw}/extensions/ac2-open-claw-reference/node_modules/node-datachannel\" && (cd \"$NDC\" && npm install --ignore-scripts --production=false && npx cmake-js clean && npx cmake-js configure --CDUSE_NICE=1 && npx cmake-js build)","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 && npm rebuild --prefix \"${OPENCLAW_HOME:-$HOME/.openclaw}/extensions/ac2-open-claw-reference\" @napi-rs/keyring && pnpm rebuild:node-datachannel && openclaw plugins enable ac2-open-claw-reference","uninstall:plugin":"openclaw plugins uninstall ac2-open-claw-reference"},"release":null,"dependencies":{"@algorandfoundation/ac2-sdk":"1.0.0-canary.1","@algorandfoundation/keystore":"1.0.0-canary.16","@algorandfoundation/liquid-client":"1.0.0-canary.8","@napi-rs/keyring":"^1.3.0","@sinclair/typebox":"^0.32.0","@tanstack/store":"^0.9.1","node-datachannel":"^0.32.3","qrcode-terminal":"^0.12.0","socket.io-client":"^4.7.5"},"devDependencies":{"@algorandfoundation/package-releaser":"workspace:*","@roamhq/wrtc":"^0.10.0","@types/node":"^22.0.0","@types/qrcode-terminal":"^0.12.2","esbuild":"^0.25.12","openclaw":"2026.6.1","typescript":"~5.8.3","vitest":"^3.2.0"},"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}],"contracts":{"tools":["ac2_sign","ac2_capabilities"],"commands":["ac2"]}},"_id":"@bwmxaf/ac2-open-claw-reference@1.0.0-canary.2","gitHead":"f62134b24c90272afe19f6857d4b27306220f7f4","_nodeVersion":"22.21.1","_npmVersion":"10.9.4","dist":{"integrity":"sha512-uKYotQiZ9n5a+cxG8vjXW+m6yF3ClLMpnj+o+PsgYAfZwqVadYmeMO1ou352RqDfZcIKrxSqHIzx6vzPf5SXcQ==","shasum":"d43ca2e0f11a94653d62bd7fd1be9816a50e2ba2","tarball":"https://registry.npmjs.org/@bwmxaf/ac2-open-claw-reference/-/ac2-open-claw-reference-1.0.0-canary.2.tgz","fileCount":154,"unpackedSize":460432,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEQCIBC6cUD1E741gaIUNaQqu+dMiJmbhRv6M20D8mckobn/AiBI+gF2HNRuv3S3qCb47XePJgt1eqTGysxMnaZVs9kWOg=="}]},"_npmUser":{"name":"bwmxaf","email":"blair.mcilroy@algorand.foundation"},"directories":{},"maintainers":[{"name":"bwmxaf","email":"blair.mcilroy@algorand.foundation"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/ac2-open-claw-reference_1.0.0-canary.2_1782996316144_0.5126800545762862"},"_hasShrinkwrap":false}},"time":{"created":"2026-07-02T12:45:16.052Z","1.0.0-canary.2":"2026-07-02T12:45:16.302Z","modified":"2026-07-02T12:45:16.449Z"},"maintainers":[{"name":"bwmxaf","email":"blair.mcilroy@algorand.foundation"}],"description":"Reference OpenClaw plugin for the AC2 protocol. Implements both tool and channel interfaces for signing and chat 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"],"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":"# `@algorandfoundation/ac2-open-claw-reference`\n\nReference [OpenClaw](https://docs.openclaw.ai/) plugin for the **AC2**\nprotocol. It implements both the tool and channel interfaces — `ac2_sign`\n/ `ac2_capabilities` tools plus the `ac2` channel — over Liquid Auth +\nWebRTC via [`@algorandfoundation/ac2-sdk`](../ac2-sdk).\n\n## What AC2 contributes to OpenClaw\n\n| OpenClaw surface        | AC2 contribution                                                           |\n| ----------------------- | -------------------------------------------------------------------------- |\n| Channel `ac2`           | Owns Liquid Auth + WebRTC pairing and the active session.                  |\n| Tool `ac2_capabilities` | Agent DID + `sig_hint` catalog.                                            |\n| Tool `ac2_sign`         | Routes a `SigningRequest` to the wallet over the active channel.           |\n| Setup entry             | `openclaw ac2 setup` writes the channel/tools wiring into `openclaw.json`. |\n\n**Channels own the lifecycle; tools are pure consumers.** The `ac2`\nchannel pairs once (one QR per session) and registers the transport on a\n`SessionManager`. `ac2_sign` reads from that manager and rejects with\n`no_active_session` when no channel is connected. The agent's own\nidentity key is **issued by the wallet** during pairing (bootstrap\n`KeyRequest`) and persisted in an OS-keychain-protected keystore — the\nagent never touches the user's account keys or passkeys.\n\n## Getting started\n\n### Prerequisites\n\n- Node.js ≥ 22, pnpm ≥ 10\n- `openclaw` CLI on `PATH`\n- `openclaw` already set up with an agent\n- A C/C++ toolchain (the plugin pulls in native addons —\n  `node-datachannel`, `@napi-rs/keyring` — that are rebuilt against your\n  Node version at install time)\n- **`cmake` and `libnice`** (with its development headers) — required to\n  build `node-datachannel` against the libnice ICE backend, which supports\n  TURN over TCP and TURNs (TURN over TLS). On macOS:\n  ```bash\n  brew install cmake libnice\n  ```\n  On Debian/Ubuntu: `apt install cmake libnice-dev`. Other platforms: see\n  your package manager for an equivalent `libnice` development package.\n\n### Install the plugin into OpenClaw\n\n#### From the npm registry (canary)\n\n```bash\nopenclaw plugins install npm:@algorandfoundation/ac2-open-claw-reference@1.0.0-canary.2\n\n# openclaw plugins install runs `npm install --ignore-scripts`, so native\n# addons are not built automatically. Rebuild them from the plugin project dir:\nPLUGIN_DIR=\"$(ls -d \"${OPENCLAW_HOME:-$HOME/.openclaw}\"/npm/projects/algorandfoundation-ac2-open-claw-reference-* | head -n1)\"\n\n# @napi-rs/keyring — standard prebuild-install path:\nnpm rebuild --prefix \"$PLUGIN_DIR\" @napi-rs/keyring\n\n# node-datachannel — must be built from source against libnice (USE_NICE=1)\n# so that TURN over TCP and TURNs are supported (the prebuilt binary uses\n# libjuice which is UDP-only for TURN):\nNDC=\"$PLUGIN_DIR/node_modules/node-datachannel\"\n(cd \"$NDC\" && npm install --ignore-scripts --production=false \\\n  && npx cmake-js clean \\\n  && npx cmake-js configure --CDUSE_NICE=1 \\\n  && npx cmake-js build)\n\nopenclaw plugins enable ac2-open-claw-reference\nopenclaw ac2 setup                                    # wire channel + tools into openclaw.json\nopenclaw gateway restart\n```\n\nThe npm-registry install lays the plugin out at\n`${OPENCLAW_HOME:-~/.openclaw}/npm/projects/algorandfoundation-ac2-open-claw-reference-<hash>/node_modules/@algorandfoundation/ac2-open-claw-reference`,\nso `npm rebuild --prefix` must point at the **project root** (the\n`npm/projects/<slug>/` directory), not at the inner package — that's\nwhere the rebuildable `node_modules/` tree lives.\n\n#### From this monorepo (pre-release / development)\n\n```bash\ngit clone https://github.com/algorandfoundation/ac2.git\ncd ac2\npnpm install                                          # once, at the repo root\n\ncd packages/ac2-open-claw-reference\npnpm install:plugin                                   # build → pack → openclaw plugins install → rebuild natives → enable\nopenclaw ac2 setup                                    # wire channel + tools into openclaw.json\nopenclaw gateway restart\n```\n\n`pnpm install:plugin` builds the flat tree-shakeable `dist/`, packs a\ntarball with workspace-only devDependencies stripped, installs it into\n`${OPENCLAW_HOME:-~/.openclaw}/extensions/ac2-open-claw-reference`, rebuilds\n`@napi-rs/keyring` via `npm rebuild`, then compiles `node-datachannel` from\nsource against libnice (`USE_NICE=1`) via `pnpm rebuild:node-datachannel`.\nYou can also run `pnpm rebuild:node-datachannel` on its own to re-compile the\nnative ICE layer without repeating the full install cycle.\n\nTo uninstall (either install path):\n\n```bash\nopenclaw plugins uninstall ac2-open-claw-reference\n# or, from the monorepo:\npnpm uninstall:plugin\n```\n\n### Configuration\n\nOnce installed, `openclaw.json` will contain an entry like:\n\n```json5\n{\n  'ac2-open-claw-reference': {\n    enabled: true,\n    config: {\n      liquidAuthServer: 'https://debug.liquidauth.com',\n      defaultTimeoutMs: 120000,\n    },\n  },\n}\n```\n\n`AC2_LIQUID_AUTH_SERVER` overrides `liquidAuthServer` at runtime.\n\n### Using it\n\nIn a conversation, enable the `ac2` channel, scan the QR with your AC2\nController / wallet, then the model can call `ac2_capabilities`\nfollowed by `ac2_sign`. See\n[DISCOVERY §3.2](https://github.com/algorandfoundation/ac2-sdk) for the\nrequest/response shapes.\n\n## Scope\n\n- ✅ Liquid Auth pairing, AC2 signing trio, `thid`-bound responses,\n  channel-owned sessions, wallet-issued agent identity.\n- ❌ Chain-specific verifiers, wallet introspection, holding user keys,\n  a bundled Node WebRTC stack — these belong in downstream plugins.\n","readmeFilename":"README.md","_rev":"1-6e6eef1bbf34aadab27dc43748174c64"}