@0xkobold/pi-wallet

CDP Agentic Wallet + x402 payments for pi-coding-agent. Zero-setup agent wallets with Base L2 support

Package details

extension

Install @0xkobold/pi-wallet from npm and Pi will load the resources declared by the package manifest.

$ pi install npm:@0xkobold/pi-wallet
Package
@0xkobold/pi-wallet
Version
0.1.1
Published
Mar 12, 2026
Downloads
40/mo ยท 10/wk
Author
moikapy
License
MIT
Types
extension
Size
92.8 KB
Dependencies
3 dependencies ยท 2 peers
Pi manifest JSON
{
  "extensions": [
    "./src/index.ts"
  ],
  "image": "https://www.coinbase.com/img/press/coinbase-logo.png"
}

Security note

Pi packages can execute code and influence agent behavior. Review the source before installing third-party packages.

README

Pi Wallet Extension

CDP Agentic Wallet + x402 payments for pi-coding-agent.

Installation

# Via pi CLI
pi install npm:@0xkobold/pi-wallet

# Or in pi-config.ts
{
  extensions: [
    'npm:@0xkobold/pi-wallet'
  ]
}

# Or temporary (testing)
pi -e npm:@0xkobold/pi-wallet

Features

  • ๐Ÿช™ CDP Agentic Wallet - Zero setup, email-based authentication
  • ๐Ÿ’ณ x402 Protocol - Machine-to-machine payments
  • โ›“๏ธ Base L2 - Mainnet (8453) and Sepolia (84532)
  • ๐Ÿ”’ Secure - Config stored with 0600 permissions
  • ๐Ÿ“ Portable - Works with or without .0xkobold directory
  • โš™๏ธ Configurable - Environment variables for custom paths

Quick Start

# Create wallet
/wallet-create --email me@example.com

# Check status  
/wallet-status

# Send ETH
/wallet-send --to 0x742d35... --amount 0.01

# Send USDC
/wallet-send --to 0x742d35... --amount 10 --token USDC

# Trade tokens
/wallet-trade 10 USDC ETH

# Pay via x402
/wallet-x402 --url https://api.service.com/pay --budget 0.001

Configuration

Environment Variables

Variable Description Default
PI_WALLET_DIR Custom storage directory ~/.pi/wallet or ~/.0xkobold/wallets
PI_WALLET_CHAIN Default chain sepolia
PI_WALLET_MAX_AMOUNT Max transaction amount 100

Config File

Stored at PI_WALLET_DIR/config.json:

{
  "activeProvider": "agentic",
  "agentic": {
    "email": "me@example.com",
    "authenticated": true,
    "address": "0x742d35..."
  },
  "settings": {
    "defaultChain": "sepolia",
    "maxTransactionAmount": "100",
    "requireConfirmation": true
  }
}

Commands

Command Description
/wallet create --email E Create CDP Agentic Wallet
/wallet status Check status and balances
/wallet send --to ADDR --amount N [--token T] [--chain C] Send crypto
/wallet trade AMOUNT FROM TO Swap tokens
/wallet x402 --url URL [--budget N] Pay via x402

Chains

Chain Chain ID Explorer
Base 8453 https://basescan.org
Base Sepolia 84532 https://sepolia.basescan.org

Tools

wallet_send

{
  to: "0x742d35...",
  amount: "0.01",
  token?: "ETH" | "USDC",
  chain?: "base" | "sepolia"
}

wallet_x402_pay

{
  url: "https://api.example.com",
  maxBudget?: 0.01
}

Prerequisites

# Install CDP Agentic Wallet
npm install -g @coinbase/awal

# Or use via npx (no install)
npx awal status

Local Development

git clone https://github.com/0xKobold/pi-wallet
cd pi-wallet
npm install
npm run build
pi install ./

Testing

npm test

Security

  • Config stored with 0o600 permissions (owner only)
  • No private keys stored locally
  • Atomic writes prevent corruption
  • Optional transaction confirmations

License

MIT ยฉ 0xKobold