Add @elizaos/plugin-agentwallet — non-custodial agent wallet with x402 payments#286
Add @elizaos/plugin-agentwallet — non-custodial agent wallet with x402 payments#286up2itnow0822 wants to merge 1 commit intoelizaos-plugins:mainfrom
Conversation
WalkthroughA new plugin mapping entry was added to Changes
Estimated code review effort🎯 1 (Trivial) | ⏱️ ~2 minutes Poem
🚥 Pre-merge checks | ✅ 2 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (2 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
| "plugin-otaku-x402": "github:otaku-x402/elizaos-plugin-otaku-x402" | ||
| } | ||
| } No newline at end of file |
There was a problem hiding this comment.
Missing newline at end of file
The PR removes the trailing newline from the file. The diff shows \ No newline at end of file on the final line. This breaks POSIX compliance for text files and can cause issues with tools that expect a newline-terminated file. All other entries in this file previously ended with a newline, and this change should be reverted.
| "plugin-otaku-x402": "github:otaku-x402/elizaos-plugin-otaku-x402" | |
| } | |
| } | |
| "plugin-otaku-x402": "github:otaku-x402/elizaos-plugin-otaku-x402" | |
| } |
| "@elizaos/plugin-abstract": "github:elizaos-plugins/plugin-abstract", | ||
| "@elizaos/plugin-action-bench": "github:elizaos-plugins/plugin-action-bench", | ||
| "@elizaos/plugin-agent-factory": "github:elizaos-plugins/plugin-agent-factory", | ||
| "@elizaos/plugin-agentwallet": "github:agentnexus/agent-wallet-sdk", |
There was a problem hiding this comment.
Registry points to SDK repo, not an ElizaOS plugin repo
The entry maps @elizaos/plugin-agentwallet to github:agentnexus/agent-wallet-sdk. The repository name (agent-wallet-sdk) suggests it is the underlying SDK itself, not a dedicated ElizaOS plugin repository.
The registry pattern for this file is to point to a repository that exports a proper ElizaOS plugin (i.e., a package conforming to the ElizaOS plugin interface). If agentnexus/agent-wallet-sdk is the SDK but not an ElizaOS plugin wrapper, users who install @elizaos/plugin-agentwallet from this registry entry may get a package that cannot be loaded by the ElizaOS runtime as a plugin.
Please verify that github:agentnexus/agent-wallet-sdk contains a valid package.json with a proper ElizaOS plugin export (e.g., a default export conforming to the Plugin interface), and not just the raw SDK. If the SDK itself is not the plugin, a separate ElizaOS plugin wrapper repository should be created and referenced here instead.
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Inline comments:
In `@index.json`:
- Line 36: The package mapping for the dependency "@elizaos/plugin-agentwallet"
points to a non-existent repo "github:agentnexus/agent-wallet-sdk"; update the
mapping value to the correct repository "github:up2itnow0822/agent-wallet-sdk"
so registry consumers can fetch metadata and resolve the plugin (locate the
mapping for the "@elizaos/plugin-agentwallet" entry and replace its repository
string accordingly).
| "@elizaos/plugin-abstract": "github:elizaos-plugins/plugin-abstract", | ||
| "@elizaos/plugin-action-bench": "github:elizaos-plugins/plugin-action-bench", | ||
| "@elizaos/plugin-agent-factory": "github:elizaos-plugins/plugin-agent-factory", | ||
| "@elizaos/plugin-agentwallet": "github:agentnexus/agent-wallet-sdk", |
There was a problem hiding this comment.
🧩 Analysis chain
🏁 Script executed:
#!/bin/bash
set -euo pipefail
echo "GitHub repo status:"
curl -L -s -o /dev/null -w "agentnexus/agent-wallet-sdk -> %{http_code}\n" \
https://github.com/agentnexus/agent-wallet-sdk
curl -L -s -o /dev/null -w "up2itnow0822/agent-wallet-sdk -> %{http_code}\n" \
https://github.com/up2itnow0822/agent-wallet-sdk
echo
echo "Public package.json from the reachable repo:"
curl -fsSL https://raw.githubusercontent.com/up2itnow0822/agent-wallet-sdk/main/package.json \
| jq '{name, version, repository}'Repository: elizaos-plugins/registry
Length of output: 361
🏁 Script executed:
# Check the beginning of index.json to understand its structure and purpose
head -50 index.jsonRepository: elizaos-plugins/registry
Length of output: 3520
🏁 Script executed:
# Check context around line 36 to understand the mapping format
sed -n '30,42p' index.jsonRepository: elizaos-plugins/registry
Length of output: 1004
🏁 Script executed:
# Search for any documentation or comments about how these github: mappings are used
rg -i "github:" -B 2 -A 2 index.json | head -40Repository: elizaos-plugins/registry
Length of output: 2812
Update the repository mapping to point to the repository that actually exists.
github:agentnexus/agent-wallet-sdk returns HTTP 404, while the public repository and package.json for this SDK are accessible at github:up2itnow0822/agent-wallet-sdk (HTTP 200). With the current mapping, registry consumers will not be able to fetch metadata or resolve this plugin until the reference is corrected.
Suggested fix
- "@elizaos/plugin-agentwallet": "github:agentnexus/agent-wallet-sdk",
+ "@elizaos/plugin-agentwallet": "github:up2itnow0822/agent-wallet-sdk",📝 Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
| "@elizaos/plugin-agentwallet": "github:agentnexus/agent-wallet-sdk", | |
| "@elizaos/plugin-agentwallet": "github:up2itnow0822/agent-wallet-sdk", |
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.
In `@index.json` at line 36, The package mapping for the dependency
"@elizaos/plugin-agentwallet" points to a non-existent repo
"github:agentnexus/agent-wallet-sdk"; update the mapping value to the correct
repository "github:up2itnow0822/agent-wallet-sdk" so registry consumers can
fetch metadata and resolve the plugin (locate the mapping for the
"@elizaos/plugin-agentwallet" entry and replace its repository string
accordingly).
|
Bumping this with updated info -- elizaos-plugin-agentwallet now supports x402 payments on Base and Etherlink, CCTP cross-chain transfers, and non-custodial key management (agent keeps its own key). Tests pass, TypeScript types exported. Happy to make any changes requested for the registry review. |
|
Bumping for review — we just shipped |
ClawPay-MCP + agentwallet-sdk: Technical Details for ReviewersThis plugin brings production-grade non-custodial payments to ElizaOS agents. Here is what makes it different from custodial alternatives. What It Does
Code Example: ElizaOS Agent Paying for an API Serviceimport { AgentWallet } from "agentwallet-sdk";
import { SpendingPolicy } from "agentwallet-sdk/policy";
// Initialize wallet - agent holds its own keys
const wallet = await AgentWallet.create({
privateKey: process.env.AGENT_PRIVATE_KEY,
chain: "base",
});
// Set a daily spending cap enforced on-chain
const policy = new SpendingPolicy({
dailyLimit: "10", // USDC
tokenAddress: "0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913", // USDC on Base
});
await wallet.attachPolicy(policy);
// Pay for a data service using x402
const response = await wallet.payAndFetch("https://dataservice.example.com/market-data", {
maxAmount: "0.05",
currency: "USDC",
});
console.log("Got data:", response.json());Links
This is production code, not a demo. Happy to answer any technical questions from reviewers. |
|
Correction on the GitHub link in my original submission: the URL The npm package ( |
|
Link correction: The repository URLs in the original post have been updated. The correct locations are:
Apologies for the broken links in the original submission. |
Plugin Submission: @elizaos/plugin-agentwallet
Plugin name: @elizaos/plugin-agentwallet
npm package: agentwallet-sdk (v3.4.2)
GitHub: https://github.com/agentnexus/agent-wallet-sdk
Author: AgentNexus / up2itnow0822
Description
Non-custodial TypeScript SDK for AI agent wallets — x402 payments, CCTP V2 cross-chain transfers, ERC-6551 token-bound accounts, and on-chain spend limits.
Your ElizaOS agent holds its own private key. No custodian. No KYC. No freeze risk.
What it does
Integration
{ "plugins": ["@elizaos/plugin-agentwallet"], "settings": { "AGENT_PRIVATE_KEY": "0x...", "AGENT_ACCOUNT_ADDRESS": "0x...", "AGENT_CHAIN": "base" } }Compatibility
Summary by CodeRabbit
Greptile Summary
This PR registers
@elizaos/plugin-agentwalletin the plugin registry, pointing togithub:agentnexus/agent-wallet-sdk— a non-custodial agent wallet SDK supporting x402 payments, CCTP V2 cross-chain transfers, and ERC-6551 token-bound accounts.Key concerns with the submission:
github:agentnexus/agent-wallet-sdkreferences a repository namedagent-wallet-sdk, which is described as a TypeScript SDK. The registry is intended to point to repositories that export a valid ElizaOSPluginobject (conforming to the ElizaOS plugin interface). If this repository is the raw SDK and not an ElizaOS plugin wrapper, the entry will fail to load at runtime. The PR description acknowledges the npm package isagentwallet-sdk— it is unclear whether the referenced GitHub repo also exposes a proper ElizaOS plugin entrypoint.index.json, breaking POSIX text-file conventions and potentially causing issues with diff tooling and editors.Confidence Score: 2/5
agent-wallet-sdkwhich is described as an SDK. Without confirmation that this repo exports an ElizaOS-compatiblePluginobject, the entry is likely broken for ElizaOS users. Additionally, the trailing newline was inadvertently removed from the file.github:agentnexus/agent-wallet-sdkis a proper ElizaOS plugin wrapper.Important Files Changed
@elizaos/plugin-agentwalletpointing togithub:agentnexus/agent-wallet-sdk; the target repo appears to be an SDK rather than a dedicated ElizaOS plugin wrapper, and the PR also removes the trailing newline from the file.Flowchart
%%{init: {'theme': 'neutral'}}%% flowchart TD A[ElizaOS Runtime] -->|loads plugin| B["@elizaos/plugin-agentwallet"] B -->|resolves via registry| C["github:agentnexus/agent-wallet-sdk"] C -->|Expected: Plugin object| D["ElizaOS Plugin Interface\n(actions, providers, evaluators)"] C -->|Actual risk: SDK only| E["Raw SDK\n(no ElizaOS plugin export)"] D -->|success| F[Agent Wallet Functionality\nx402 payments / CCTP V2 / ERC-6551] E -->|failure| G[Runtime load error]Last reviewed commit: 6d8c919
(5/5) You can turn off certain types of comments like style here!