Metadata-Version: 2.1
Name: goat-sdk-wallet-web3
Version: 0.1.5
Summary: Goat SDK Web3 wallet implementation
Home-page: https://ohmygoat.dev/
Keywords: goat,sdk,web3,agents,ai,evm,wallet
Author: Andrea Villa
Author-email: andreakarimodm@gmail.com
Requires-Python: >=3.10,<4.0
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Requires-Dist: goat-sdk (>=0.1.0,<0.2.0)
Requires-Dist: goat-sdk-wallet-evm (>=0.1.0,<0.2.0)
Requires-Dist: web3 (>=6.20.3)
Project-URL: Bug Tracker, https://github.com/goat-sdk/goat/issues
Project-URL: Repository, https://github.com/goat-sdk/goat
Description-Content-Type: text/markdown

# Web3 Wallet for GOAT SDK

A Python implementation of a Web3 wallet for the GOAT SDK, providing enhanced Ethereum and EVM-compatible chain support through web3.py integration.

## Installation

```bash
poetry add goat-sdk-wallet-web3

# Required dependency
poetry add goat-sdk-wallet-evm
```

## Usage

```python
from goat_wallets.web3 import web3_wallet

# Initialize wallet with private key
wallet = web3_wallet(
    private_key="${WALLET_PRIVATE_KEY}",  # Your EVM wallet private key
    rpc_url="${RPC_PROVIDER_URL}"  # Your EVM RPC endpoint
)

# Get wallet address
address = wallet.get_address()

# Get native token balance
balance = await wallet.get_balance()

# Send transaction
tx_hash = await wallet.send_transaction({
    "to": "recipient_address",
    "value": "1000000000000000000",  # 1 ETH in wei
    "data": "0x",  # Optional contract data
    "gas": 21000,  # Optional gas limit
    "maxFeePerGas": "50000000000"  # Optional max fee per gas (50 gwei)
})

# Call contract method
result = await wallet.call_contract(
    contract_address="contract_address",
    function_name="balanceOf",
    args=["token_holder_address"]
)
```

## Features

- Web3.py Integration:
  - Full web3.py functionality
  - Enhanced contract interactions
  - ABI handling
  - Gas estimation
  
- Transaction Management:
  - EIP-1559 support
  - Legacy transaction support
  - Contract deployment
  - Method encoding/decoding
  
- Smart Contract Features:
  - Contract interaction
  - Event listening
  - Function calling
  - State queries
  
- Network Support:
  - Ethereum
  - Polygon
  - Arbitrum
  - Optimism
  - Base
  - BNB Chain
  - All EVM-compatible chains

## License

This project is licensed under the terms of the MIT license.

