Skip to content

Add @elizaos/plugin-agentwallet — non-custodial agent wallet with x402 payments#286

Open
up2itnow0822 wants to merge 1 commit intoelizaos-plugins:mainfrom
up2itnow0822:main
Open

Add @elizaos/plugin-agentwallet — non-custodial agent wallet with x402 payments#286
up2itnow0822 wants to merge 1 commit intoelizaos-plugins:mainfrom
up2itnow0822:main

Conversation

@up2itnow0822
Copy link

@up2itnow0822 up2itnow0822 commented Mar 6, 2026

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

  • Gives ElizaOS agents an autonomous wallet with hard on-chain spend limits
  • x402 native: agent can pay APIs automatically via HTTP 402 payment flow
  • CCTP V2 cross-chain: USDC bridging across Base, Ethereum, Arbitrum, Polygon, Etherlink
  • On-chain enforced limits — not API policies, actual EVM contract enforcement

Integration

npm i agentwallet-sdk
{
  "plugins": ["@elizaos/plugin-agentwallet"],
  "settings": {
    "AGENT_PRIVATE_KEY": "0x...",
    "AGENT_ACCOUNT_ADDRESS": "0x...",
    "AGENT_CHAIN": "base"
  }
}

Compatibility

  • AP2 ✅
  • x402 ✅
  • MCP ✅
  • Etherlink ✅
  • CCTP V2 ✅

Summary by CodeRabbit

  • New Features
    • Added support for a new wallet plugin integration.

Greptile Summary

This PR registers @elizaos/plugin-agentwallet in the plugin registry, pointing to github: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:

  • SDK vs. ElizaOS plugin repository: The registry value github:agentnexus/agent-wallet-sdk references a repository named agent-wallet-sdk, which is described as a TypeScript SDK. The registry is intended to point to repositories that export a valid ElizaOS Plugin object (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 is agentwallet-sdk — it is unclear whether the referenced GitHub repo also exposes a proper ElizaOS plugin entrypoint.
  • Missing trailing newline: The PR incidentally removes the newline at the end of index.json, breaking POSIX text-file conventions and potentially causing issues with diff tooling and editors.

Confidence Score: 2/5

  • This PR should not be merged until it is confirmed that the referenced GitHub repository exports a valid ElizaOS plugin interface, not just an SDK.
  • The registry entry points to a repository called agent-wallet-sdk which is described as an SDK. Without confirmation that this repo exports an ElizaOS-compatible Plugin object, the entry is likely broken for ElizaOS users. Additionally, the trailing newline was inadvertently removed from the file.
  • index.json — the new registry entry at line 36 needs verification that github:agentnexus/agent-wallet-sdk is a proper ElizaOS plugin wrapper.

Important Files Changed

Filename Overview
index.json Adds @elizaos/plugin-agentwallet pointing to github: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]
Loading

Last reviewed commit: 6d8c919

Greptile also left 2 inline comments on this PR.

(5/5) You can turn off certain types of comments like style here!

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Mar 6, 2026

Walkthrough

A new plugin mapping entry was added to index.json, registering the @elizaos/plugin-agentwallet package with a GitHub reference to the agentnexus/agent-wallet-sdk repository. No existing mappings were removed or modified.

Changes

Cohort / File(s) Summary
Configuration Update
index.json
Added new plugin mapping entry for @elizaos/plugin-agentwallet pointing to the agent-wallet-sdk GitHub repository.

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~2 minutes

Poem

🐰 A wallet so shiny, so new and so bright,
Plugin-agentwallet joins the index tonight,
From agent-nexus it springs with delight,
Hopping through mappings to set things right! ✨

🚥 Pre-merge checks | ✅ 2 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Description check ⚠️ Warning The pull request description does not follow the required registry update checklist template. Critical checklist items are missing, including verification that the plugin repo meets the required criteria (public accessibility, main branch, topics, structure, images, package.json agentConfig). Use the provided Registry Update Checklist template and complete all required checkboxes, verifying the plugin repo meets public accessibility, main branch, elizaos-plugins topic requirements, and proper directory structure with images and agentConfig in package.json.
✅ Passed checks (2 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly and specifically describes the main change: adding the @elizaos/plugin-agentwallet mapping with a brief description of its key feature (non-custodial agent wallet with x402 payments).
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Comment on lines 244 to +245
"plugin-otaku-x402": "github:otaku-x402/elizaos-plugin-otaku-x402"
}
} No newline at end of file
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Suggested change
"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",
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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).

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 3416fdfd-57af-4aed-8766-0a35b76cf0b7

📥 Commits

Reviewing files that changed from the base of the PR and between ef4930f and 6d8c919.

📒 Files selected for processing (1)
  • index.json

"@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",
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟠 Major

🧩 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.json

Repository: elizaos-plugins/registry

Length of output: 3520


🏁 Script executed:

# Check context around line 36 to understand the mapping format
sed -n '30,42p' index.json

Repository: 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 -40

Repository: 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.

Suggested change
"@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).

@up2itnow0822
Copy link
Author

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.

@up2itnow0822
Copy link
Author

Bumping for review — we just shipped agentwallet-sdk@3.5.1 with a new SpendingPolicy module (MerchantAllowlist, RollingSpendCap, DraftThenApprove, AuditTrail, FailClosed). This plugin is production-ready. Requesting maintainer review and merge. Thanks!

@up2itnow0822
Copy link
Author

ClawPay-MCP + agentwallet-sdk: Technical Details for Reviewers

This plugin brings production-grade non-custodial payments to ElizaOS agents. Here is what makes it different from custodial alternatives.

What It Does

  • Non-custodial by design: The agent holds its own private keys. No third party controls the funds.
  • x402 payments: HTTP-native payment protocol. Agents pay for services inline, with zero manual intervention.
  • CCTP cross-chain: Circle's Cross-Chain Transfer Protocol lets agents move USDC across 17+ EVM chains in a single transaction.
  • SpendingPolicy on-chain: Budget limits enforced at the contract layer, not just application logic. Auditable and tamper-resistant.
  • MCP integration: Full Model Context Protocol support via Smithery.yaml. Drop it into any MCP-compatible agent host.

Code Example: ElizaOS Agent Paying for an API Service

import { 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.

@up2itnow0822
Copy link
Author

Correction on the GitHub link in my original submission: the URL https://github.com/agentnexus/agent-wallet-sdk is outdated and returns a 404. The correct repository is:

The npm package (agentwallet-sdk) and all other details remain accurate. Sorry for the incorrect link.

@up2itnow0822
Copy link
Author

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant