Radius AI Agent Toolkit - EVM Wallet
The Radius EVM Wallet package provides a simple, unified interface for interacting with Radius from AI agents. It offers high-performance wallet operations and tool-based interactions that integrate seamlessly with AI agent frameworks.
This package is part of the Radius AI Agent Toolkit, which provides tools for integrating AI agents with the Radius platform.
Installation
# Install this specific package
pip install radius-ai-agent-sdk-wallet-evm
# Required dependencies
pip install radius-ai-agent-sdk
Prerequisites
- Python >=3.10
- Access to a Radius RPC endpoint
- A funded private key for the Radius network
Usage
from radius_wallets.evm import create_radius_wallet, send_eth
from radius_adapters.langchain import get_on_chain_tools
# Create a Radius wallet
wallet = create_radius_wallet(
rpc_url=os.environ.get("RPC_PROVIDER_URL"),
private_key=os.environ.get("WALLET_PRIVATE_KEY")
)
# Get wallet address
address = wallet.get_address()
print(f"Wallet address: {address}")
# Check wallet balance using balance_of method
balance = wallet.balance_of(address)
print(f"Balance: {balance['value']} {balance['symbol']}")
# Create sendETH plugin
send_eth_plugin = send_eth()
# Get the tools provided by the plugin
tools = send_eth_plugin.get_tools(wallet)
# Or create tools for AI agents with the adapter
ai_tools = get_on_chain_tools(
wallet=wallet,
plugins=[send_eth()] # Enable ETH transfers
)
API Reference
create_radius_wallet(rpc_url, private_key, enable_batch=False, logger=None)
Creates a new Radius wallet instance.
Parameters:
rpc_url(str): URL of the Radius RPC endpointprivate_key(str): Private key for the walletenable_batch(bool, optional): Whether to enable batch transactionslogger(callable, optional): Custom logger function
Returns:
- An EVMWalletClient instance that can be used with AI agent tools
send_eth()
Creates a plugin that enables ETH transfer functionality for AI agents.
Returns:
- A plugin that can be used with the
get_on_chain_toolsfunction
Wallet Methods
wallet.get_address()
Returns the wallet's address.
wallet.balance_of(address)
Returns the balance info for the specified address, including value, symbol, and other details.
wallet.send_transaction(tx)
Sends a transaction to the network.
wallet.send_batch_of_transactions(txs)
Sends multiple transactions as a batch (if batch mode is enabled).
Advanced Usage
Batch Transactions
# Create a wallet with batch transaction support
wallet = create_radius_wallet(
rpc_url=os.environ.get("RPC_PROVIDER_URL"),
private_key=os.environ.get("WALLET_PRIVATE_KEY"),
enable_batch=True # Enable batch transactions
)
# Send a batch of transactions
result = wallet.send_batch_of_transactions([
{"to": "0x123...", "value": 100000000000000000}, # 0.1 ETH in wei
{"to": "0x456...", "value": 200000000000000000} # 0.2 ETH in wei
])
Smart Contract Interactions
# Read from a contract
result = wallet.read({
"address": "0xContractAddress",
"functionName": "balanceOf",
"args": ["0xUserAddress"],
"abi": [...] # Contract ABI
})
# Write to a contract
tx = wallet.send_transaction({
"to": "0xContractAddress",
"functionName": "transfer",
"args": ["0xRecipient", 1000000000000000000], # 1.0 ETH in wei
"abi": [...] # Contract ABI
})
Integration Examples
For examples integrating this package with AI frameworks, see:
Related Packages
- radius-ai-agent-sdk: Core abstractions and base classes
- radius-ai-agent-sdk-plugin-erc20: ERC20 token operations
- radius-ai-agent-sdk-adapter-langchain: LangChain integration
Development Setup
1. Clone the Repository
git clone git@github.com:radiustechsystems/ai-agent-toolkit.git
cd ai-agent-toolkit/python/src/wallets/evm
2. Install Development Dependencies
pip install -e ".[dev]"
3. Build the Package
pip install build
python -m build
Testing
Run tests with pytest:
pytest
Resources
Contributing
Please see the Contributing Guide for detailed information about contributing to this toolkit.
License
This project is licensed under the MIT License.
Metadata
Release files for radius-ai-agent-sdk-wallet-evm 1.0.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| radius_ai_agent_sdk_wallet_evm-1.0.0.tar.gz | 10.1 kB | Without provenance | Details for radius_ai_agent_sdk_wallet_evm-1.0.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| radius_ai_agent_sdk_wallet_evm-1.0.0-py3-none-any.whl | Python 3 | none | any | Details for radius_ai_agent_sdk_wallet_evm-1.0.0-py3-none-any.whl |
Total release size: 16.9 kB
Release files / radius_ai_agent_sdk_wallet_evm-1.0.0.tar.gz
| Download URL | radius_ai_agent_sdk_wallet_evm-1.0.0.tar.gz |
|---|---|
| Size | 10.1 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
a7aa0a77fbd14f24a4aa49b2a908da105f9494f50340a8f6833aa09d1e171675
|
|
BLAKE2b-256 checksum How to use checksums |
7cb93cf5a000b4681af12a37204d577b9d983b040430a83948635ea5cfc91871
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.11.2
|
Release files / radius_ai_agent_sdk_wallet_evm-1.0.0-py3-none-any.whl
| Download URL | radius_ai_agent_sdk_wallet_evm-1.0.0-py3-none-any.whl |
|---|---|
| Size | 6.8 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
b4e52febf618821b2bcd743790ce746f5ee0eeb26ad9602dc857a265c9514353
|
|
BLAKE2b-256 checksum How to use checksums |
16d03acdd5e4eb905a24941f114882bdca7400506fea2a440bfed8f8f9cff8a1
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.11.2
|
Security for radius-ai-agent-sdk-wallet-evm 1.0.0
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.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.