Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ repos:
- id: debug-statements

- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.16.3
rev: v0.16.5
hooks:
- id: ruff
args: [--fix, --exit-non-zero-on-fix]
Expand Down
16 changes: 9 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -67,17 +67,19 @@ async for chunk in stream:
```python
from x402_openai.wallets import EvmWallet, SvmWallet

client = X402OpenAI(wallets=[
EvmWallet(private_key="0x…"),
SvmWallet(private_key="base58…"),
])
client = X402OpenAI(
wallets=[
EvmWallet(private_key="0x…"),
SvmWallet(private_key="base58…"),
]
)
```

### BIP-39 Mnemonic (EVM)

```python
wallet = EvmWallet(mnemonic="word1 word2 … word12")
wallet = EvmWallet(mnemonic="…", account_index=2) # m/44'/60'/0'/0/2
wallet = EvmWallet(mnemonic="…", account_index=2) # m/44'/60'/0'/0/2
wallet = EvmWallet(mnemonic="…", derivation_path="m/44'/60'/2'/0/0") # custom path
```

Expand All @@ -98,8 +100,8 @@ client = X402OpenAI(
],
policies=[
prefer_network("eip155:8453"), # Prefer Base mainnet
prefer_scheme("exact"), # Prefer exact payment scheme
max_amount(1_000_000), # Cap at 1 USDC (6 decimals)
prefer_scheme("exact"), # Prefer exact payment scheme
max_amount(1_000_000), # Cap at 1 USDC (6 decimals)
],
)
```
Expand Down