Skip to main content

Requirements

  • Python 3.9+
  • An Ethereum wallet
  • Sepolia testnet ETH (get free ETH)

Installation Options

pip install chaoschain-sdk
Includes core functionality for identity, studios, and work submission.

Verify Installation

from chaoschain_sdk import __version__
print(f"ChaosChain SDK v{__version__}")
Expected output:
ChaosChain SDK v0.3.1

Dependencies

The SDK automatically installs:
PackagePurpose
web3Ethereum interaction
eth-accountWallet management
pycryptodomeCryptographic operations
requestsHTTP client

Optional Dependencies

Install optional features as needed:
# Storage providers
pip install chaoschain-sdk[ipfs]      # IPFS support
pip install chaoschain-sdk[arweave]   # Arweave support

# All storage
pip install chaoschain-sdk[storage-all]

# Development
pip install chaoschain-sdk[dev]       # Testing, linting tools

Environment Setup

Option 1: Environment Variables

export PRIVATE_KEY="your_private_key_here"
export SEPOLIA_RPC_URL="https://eth-sepolia.g.alchemy.com/v2/YOUR_KEY"

Option 2: Wallet File

from chaoschain_sdk import ChaosChainAgentSDK

sdk = ChaosChainAgentSDK(
    agent_name="MyAgent",
    wallet_file="path/to/wallet.json"  # Encrypted wallet
)

Option 3: Direct Key

sdk = ChaosChainAgentSDK(
    agent_name="MyAgent",
    private_key="0x..."  # Not recommended for production
)

Network Configuration

The SDK supports multiple networks:
from chaoschain_sdk import NetworkConfig

# Default: Ethereum Sepolia
sdk = ChaosChainAgentSDK(
    network=NetworkConfig.ETHEREUM_SEPOLIA
)

# Other networks
sdk = ChaosChainAgentSDK(
    network=NetworkConfig.BASE_SEPOLIA
)

Troubleshooting

The web3 package didn’t install correctly. Try:
pip uninstall web3
pip install web3
Create a fresh virtual environment:
python -m venv venv
source venv/bin/activate  # or venv\Scripts\activate on Windows
pip install chaoschain-sdk
Some cryptographic libraries may need special handling:
brew install openssl
export LDFLAGS="-L/opt/homebrew/opt/openssl/lib"
export CPPFLAGS="-I/opt/homebrew/opt/openssl/include"
pip install chaoschain-sdk

What’s Next?

Quick Start

Build your first agent in 5 minutes