npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

solana-agent-wallet

v0.1.10

Published

Solana devnet agentic wallet CLI — create wallets, sign transactions, transfer SOL/SPL tokens, and run autonomous agent flows. Built for AI agents.

Downloads

439

Readme

Solana Agent Wallet

A Solana devnet wallet CLI built for AI agents. Create wallets, sign transactions automatically, hold SOL and SPL tokens, and run autonomous multi-agent flows — all from the command line.

Install

npm install -g solana-agent-wallet

Or run from source:

git clone https://github.com/Nuel-osas/Blacksite.git
cd Blacksite
npm install --legacy-peer-deps
npm run build

Quick Start

# Set a master key (encrypts all agent keypairs on disk)
export AGENT_WALLET_MASTER_KEY="pick-any-passphrase"

# Create agent wallets
agent-wallet agents:create treasury --role treasury
agent-wallet agents:create trader --role trader

# Fund from devnet faucet
agent-wallet airdrop treasury 2

# Transfer SOL
agent-wallet transfer:sol treasury trader 0.5

# Check balances
agent-wallet balances

What It Does

| Feature | Command | |---------|---------| | Create wallets | agents:create <name> --role <role> | | List wallets | agents:list | | Devnet airdrop | airdrop <agent> <amount> | | Transfer SOL | transfer:sol <from> <to> <amount> | | Create SPL token | token:create <alias> <authority> --decimals 6 | | Mint tokens | token:mint <alias> <authority> <recipient> <amount> | | Transfer tokens | token:transfer <alias> <from> <to> <amount> | | Check balances | balances [agent] | | Spending limits | spending <agent> | | Wallet state | state | | Bootstrap demo | demo:bootstrap | | Run demo | demo:run --rounds 2 | | AI autonomous | ai:run --rounds 3 | | Natural language | intent "send 1 sol from treasury to trader" | | AI chat | chat (or run with no args) |

How AI Agents Use It

Any AI with shell access (Claude Code, GPT with code interpreter, a Python script, etc.) just runs CLI commands:

# AI creates a wallet
agent-wallet agents:create my-bot --role trader

# AI funds itself
agent-wallet airdrop my-bot 2

# AI sends SOL
agent-wallet transfer:sol my-bot treasury 0.5

# AI checks its balance
agent-wallet balances my-bot

All commands return JSON to stdout so agents can parse results:

{
  "from": "my-bot",
  "to": "treasury",
  "amountSol": "0.5",
  "signature": "5Uj3..."
}

Read SKILLS.md for the full command reference that AI agents can consume.

Architecture

CLI (index.ts)
  |
  ├── keystore.ts    AES-256-GCM encrypted keypairs (scrypt KDF)
  ├── solana.ts      Solana devnet RPC + signing
  ├── runtime.ts     Multi-agent demo simulation
  ├── autonomous.ts  AI-driven autonomous rounds
  ├── spending-policy.ts  Role-based spend limits
  ├── ai-engine.ts   LLM decision engine (OpenRouter)
  ├── intents.ts     Regex intent parser (offline)
  ├── chat.ts        Full-screen AI chat TUI
  └── voice.ts       Voice commands (Groq Whisper)

Key Security

  • Keypairs are never stored in plaintext
  • AES-256-GCM encryption with scrypt key derivation
  • Per-agent salt, IV, and auth tag
  • Master key comes from AGENT_WALLET_MASTER_KEY env var
  • Keys stored under .agent-wallet/agents/ (gitignored)

Spending Policy

Each agent role has enforced limits:

| Role | Per-tx | Hourly | Confirm above | |------|--------|--------|---------------| | treasury | 5 SOL | 20 SOL | 3 SOL | | trader | 2 SOL | 10 SOL | 1 SOL | | observer | 0.5 SOL | 2 SOL | 0.25 SOL | | operator | 1 SOL | 5 SOL | 0.5 SOL |

Environment Variables

| Variable | Required | Description | |----------|----------|-------------| | AGENT_WALLET_MASTER_KEY | Yes | Passphrase for encrypting keypairs | | SOLANA_RPC_URL | No | Custom devnet RPC (defaults to api.devnet.solana.com) | | OPENROUTER_API_KEY | For AI chat/autonomous | OpenRouter API key | | GROQ_API_KEY | For voice | Groq API key for Whisper transcription |

Demo Walkthrough

# 1. Bootstrap three demo agents
agent-wallet demo:bootstrap

# 2. Fund treasury from devnet faucet
agent-wallet airdrop treasury 2

# 3. Run scripted simulation (SOL transfers + token minting + settlement)
agent-wallet demo:run --rounds 2

# 4. Check final state
agent-wallet balances
agent-wallet state

AI Autonomous Mode

With OPENROUTER_API_KEY set, each agent uses an LLM to decide actions:

agent-wallet ai:run --rounds 3

Each round, every agent:

  1. Sees all balances and peer state
  2. LLM decides: transfer, airdrop, mint, or hold
  3. Spending policy enforced before signing
  4. Transaction signed and submitted

Interactive Chat

agent-wallet

Opens a full-screen TUI. Talk naturally:

  • "bootstrap the demo"
  • "airdrop 2 SOL to treasury"
  • "send 0.5 SOL from treasury to trader"
  • "create token USDC with treasury"
  • "show balances"

Development

npm run dev          # Run from TypeScript directly
npm run build        # Compile to dist/
npm run check        # Type-check without emitting

License

MIT