Skip to main content

kestrel-feature-wallet

Multi-currency agent wallet with Stripe on-ramp for Kestrel Sovereign. Supports FIL, USDC, and USDT with on-chain balance sync, economic gates, cryostasis threshold monitoring, and fiat-to-crypto conversions via Stripe.

Installation

uv pip install kestrel-feature-wallet

With EVM chain support:

uv pip install "kestrel-feature-wallet[evm]"

With Stripe on-ramp:

uv pip install "kestrel-feature-wallet[stripe]"

With x402 buyer support:

uv pip install "kestrel-feature-wallet[x402]"

For local tests:

uv pip install -e ".[all]"
uv run pytest

Dependencies

  • kestrel-sovereign-sdk
  • aiosqlite>=0.21.0
  • httpx>=0.27.0
  • cryptography>=45.0.5
  • Optional: web3>=7.0.0 (via [evm]), stripe>=10.0.0 (via [stripe]), x402[httpx]>=2.9.0 (via [x402])

Usage

Once installed, the WalletFeature is automatically discovered by kestrel-sovereign via the kestrel_sovereign.features entry point.

Configuration

Variable Description
KESTREL_DATA_KEY Enables encrypted private-key persistence for generated wallet keys
KESTREL_DB_PATH Base directory for wallet key and audit storage when no agent DB path is available
BASE_SEPOLIA_RPC Optional Base Sepolia RPC override; defaults to https://sepolia.base.org
BASE_MAINNET_RPC Optional Base Mainnet RPC override; defaults to https://mainnet.base.org
KESTREL_ALLOW_MAINNET Set to true or 1 only when the operator intentionally enables real-value mainnet transactions
KESTREL_X402_MAX_USDC_PER_REQUEST Maximum x402 USDC invoice the buyer will sign; defaults to 1
KESTREL_TX_DAILY_LIMIT_USD Daily mainnet spending limit; defaults to 100
STRIPE_API_KEY Stripe API key (for on-ramp)
STRIPE_WEBHOOK_SECRET Stripe webhook secret (for on-ramp)

Base L2 Commands

The Filecoin address and Base/EVM address are derived from the same secp256k1 key generated by !wallet-generate-address.

!wallet-address
!wallet-chain-balance base_sepolia USDC
!wallet-chain-balance base_sepolia native
!wallet-send-token <to> <amount> USDC base_sepolia

Base Mainnet (base_mainnet) is blocked unless KESTREL_ALLOW_MAINNET is explicitly enabled.

For direct ERC-20 transfers, the wallet needs Base Sepolia ETH for gas and Base Sepolia USDC for payments. For x402 exact payments through the default testnet facilitator, Base Sepolia USDC can be enough because settlement can be gas-sponsored by the facilitator. Filecoin Calibration FIL is a different testnet asset and cannot pay Base Sepolia x402 invoices. Current faucet references:

x402 Buyer

X402Buyer wraps the Python x402 SDK with the agent's EVM private key and returns payment receipt metadata for audit trails. It defaults to Base Sepolia and filters out Base Mainnet payment requirements unless KESTREL_ALLOW_MAINNET is explicitly enabled.

from kestrel_feature_wallet import X402Buyer

buyer = X402Buyer(private_key="0x...")
paid = await buyer.post_with_payment("https://example.com/paid-upload", content=b"...")
print(paid.response.status_code)
print(paid.receipt)

Core storage integrations should use this buyer primitive instead of handling private keys directly.

Development

uv pip install -e ".[test]"
uv run pytest

Metadata

Release files for kestrel-feature-wallet 0.1.4

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for kestrel-feature-wallet 0.1.4
File Size Uploaded
kestrel_feature_wallet-0.1.4.tar.gz 76.1 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for kestrel-feature-wallet 0.1.4
File Interpreter ABI Platform
kestrel_feature_wallet-0.1.4-py3-none-any.whl Python 3 none any Details

Total release size: 153.3 kB

Release files / kestrel_feature_wallet-0.1.4.tar.gz

Download URL kestrel_feature_wallet-0.1.4.tar.gz
Size 76.1 kB
Tags Source
SHA-256 checksum
How to use checksums
79d310af6f0ccea63af6bda66a0f60e2260834a6cc146dbc0882883e6ed5beba
BLAKE2b-256 checksum
How to use checksums
b7e922af6ae13b92245d8b5710050166e7cdcd9f50cf7aa4f16b1fc4e223d1cc
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.12

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Jun 22, 2026.

Transparency log

Release files / kestrel_feature_wallet-0.1.4-py3-none-any.whl

Download URL kestrel_feature_wallet-0.1.4-py3-none-any.whl
Size 77.1 kB
Tags Python 3
SHA-256 checksum
How to use checksums
9e8ad55aeac7e6b1a5b591211489cb1da6ccf660947d2201887ee998419f9fa9
BLAKE2b-256 checksum
How to use checksums
fcc7f4dd25e5b54c72d61c86ffad74b82b100aa591c826d5190a2ff5c11b6162
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.12

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Jun 22, 2026.

Transparency log

Release history Release notifications | RSS feed

This release

0.1.4 This release

2 release files

0.1.3

2 release files

0.1.2

2 release files

0.1.1

2 release files

0.1.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page