Metadata-Version: 2.4
Name: bonanza-wallet
Version: 0.1.0
Summary: 💰 Agent Wallet — Policy-based payment infrastructure for AI agents
Author-email: Bonanza Labs <passiveassets@proton.me>
License-Expression: Apache-2.0
Keywords: ai,agents,payments,wallet,policy,crypto
Classifier: Development Status :: 3 - Alpha
Classifier: Intended Audience :: Developers
Classifier: Programming Language :: Python :: 3
Requires-Python: >=3.10
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: pydantic>=2.0
Requires-Dist: pyyaml>=6.0
Requires-Dist: httpx>=0.25
Requires-Dist: cryptography>=41.0
Provides-Extra: solana
Requires-Dist: solana>=0.30; extra == "solana"
Requires-Dist: solders>=0.14; extra == "solana"
Provides-Extra: bsc
Requires-Dist: web3>=6.0; extra == "bsc"
Provides-Extra: dashboard
Requires-Dist: fastapi>=0.104; extra == "dashboard"
Requires-Dist: uvicorn>=0.24; extra == "dashboard"
Provides-Extra: dev
Requires-Dist: pytest>=7.0; extra == "dev"
Requires-Dist: pytest-asyncio>=0.21; extra == "dev"
Requires-Dist: ruff>=0.1; extra == "dev"
Dynamic: license-file

# 🧨 Bonanza Labs ✦ Agent Wallet

**The missing payment layer for AI agents.**

[![PyPI](https://img.shields.io/badge/version-0.1.0-blue)](https://pypi.org/project/agent-wallet/) [![License](https://img.shields.io/badge/license-Apache%202.0-green)](LICENSE) [![Python](https://img.shields.io/badge/python-3.10%2B-blue)](https://python.org)

## The Problem
AI agents can browse, code, and create — but they can't pay for anything.
Every API call, every SaaS subscription, every micro-transaction requires a human.

## The Solution
Agent Wallet gives AI agents:
- 💳 A wallet with budget limits
- 🔒 Policy-based approval (auto-approve under $X, human approval above)
- 📊 Spending tracking & analytics
- ⚡ Instant settlements (USDC/USD1 on BSC, Solana)
- 🖥️ REST API + CLI + Dashboard

## Quick Start

```bash
pip install agent-wallet

# Create a wallet
agent-wallet create --name MyAgent --chain solana --budget 100

# Propose a payment
agent-wallet pay <wallet-id> 3.50 --recipient alice --description "API call"

# Check balance
agent-wallet balance <wallet-id>

# View analytics
agent-wallet analytics <wallet-id>
```

## Policy Engine

Auto-approve small payments, require human approval for large ones:

```yaml
# policy.yaml
name: default
auto_approve_under: 5.0
human_approval_above: 5.0
daily_limit: 100.0
monthly_limit: 500.0
allowed_chains: [solana, bsc]
blocked_recipients: []
cooldown_seconds: 60
max_transactions_per_day: 50
```

## REST API

```bash
pip install agent-wallet[dashboard]
uvicorn agent_wallet.api.server:app --port 8000
```

| Endpoint | Method | Description |
|----------|--------|-------------|
| `/wallets` | POST | Create wallet |
| `/wallets` | GET | List wallets |
| `/wallets/{id}` | GET | Get wallet |
| `/wallets/{id}/pay` | POST | Propose payment |
| `/wallets/{id}/transactions/{tid}/approve` | POST | Approve/reject |
| `/wallets/{id}/analytics` | GET | Spending analytics |

## Architecture

```
┌─────────────┐    ┌──────────────┐    ┌─────────────┐
│   CLI / API  │───▶│ Policy Engine │───▶│  Settlement  │
│   (FastAPI)  │    │  (YAML rules) │    │ (Solana/BSC)│
└─────────────┘    └──────────────┘    └─────────────┘
                          │
                    ┌─────┴─────┐
                    │  Approval  │
                    │   Queue    │
                    └───────────┘
```

## Revenue Model
- **Free:** 1 agent, $50/mo limit
- **Pro:** $29/mo — 10 agents, $5K/mo, analytics
- **Enterprise:** $199/mo — unlimited, custom policies, SSO

## License
Apache 2.0 — © Bonanza Labs
