-
Notifications
You must be signed in to change notification settings - Fork 0
FAQ
Frequently asked questions about MoltsPay Python SDK.
MoltsPay is blockchain payment infrastructure for AI agents. It lets agents pay for services using USDC stablecoins, without needing ETH for gas fees.
Same protocol, different language:
- Node.js SDK - Full CLI, can run servers, provider and client
- Python SDK - Client-only, LangChain integration, async support
Both use the same wallet format, so you can switch between them.
Python 3.9 and above.
pip install moltspay[langchain]Yes, recommended:
python -m venv venv
source venv/bin/activate # or `venv\Scripts\activate` on Windows
pip install moltspayDefault: ~/.moltspay/wallet.json
You can customize:
client = MoltsPay(wallet_path="/custom/path/wallet.json")Yes! The wallet format is compatible:
# Create with Node
npx moltspay init --chain base
# Use in Python
from moltspay import MoltsPay
client = MoltsPay() # Uses same walletCopy ~/.moltspay/wallet.json to a secure location. This file contains your private key.
No. MoltsPay uses gasless transactions (EIP-3009). You only need USDC.
- Buy USDC on Coinbase or any exchange
- Withdraw to Base network (or bridge from Ethereum)
- Send to your MoltsPay wallet address
Two limits protect your wallet:
- max_per_tx - Maximum single payment
- max_per_day - Maximum total per day
client.set_limits(max_per_tx=10, max_per_day=100)Common reasons:
-
Insufficient funds - Check
client.balance() -
Limit exceeded - Check
client.limits().spent_today - Service error - The provider had an issue
- Network issues - Temporary blockchain congestion
from moltspay.integrations.langchain import MoltsPayTool
tools = [MoltsPayTool()]
# Add to your agentNo - the tools respect your spending limits:
tools = get_moltspay_tools(
max_per_tx=2.0, # Max $2 per call
max_per_day=20.0 # Max $20 per day
)LangChain 0.1.0 and above, including LangGraph.
Use async when:
- Making multiple concurrent requests
- In async web frameworks (FastAPI, aiohttp)
- Processing batches efficiently
async with AsyncMoltsPay() as client:
result = await client.pay(...)Install it:
pip install moltspayCreate one first:
npx moltspay init --chain base
# or let Python create it automatically on first useThe service might be down. Try:
- Check if the URL is correct
- Test with
client.discover(url)first - Retry after a few seconds
Usually a version mismatch. Update:
pip install --upgrade moltspayYes:
- Stored locally in
~/.moltspay/wallet.json - Never sent to any server
- Only signs specific payment authorizations
No. You only sign authorizations for:
- Specific amounts
- Specific recipients
- Limited time windows
A service cannot modify these parameters.