-
Notifications
You must be signed in to change notification settings - Fork 43
API‐Reference
Clo edited this page Mar 29, 2026
·
1 revision
from omniclaw import OmniClaw, Network client = OmniClaw( network=Network.BASE_SEPOLIA, # or Network.BASE_MAINNET circle_api_key="...", # optional, reads from env entity_secret="..." # optional, reads from env )
Creates a new Circle Programmable Wallet.
wallet = client.create_wallet() print(wallet.id, wallet.address)
Retrieves an existing wallet by ID.
wallet = client.get_wallet("wallet-uuid")
Executes a guarded payment. The payment passes through policy checks and trust evaluation before execution.
result = client.pay( wallet_id="sender-wallet-id", to="recipient-address", amount=10.00, token="USDC" # default )
Returns: Transaction result with status, hash, and settlement details.
Simulates a payment without moving funds. Use this as a pre-flight check.
sim = client.simulate( wallet_id="sender-wallet-id", to="recipient-address", amount=10.00 ) if sim.success: # Safe to proceed client.pay(...) else: print(sim.error)
Returns: Simulation result with success/failure, estimated fees, and any policy violations.
Protects an endpoint and automatically handles payment collection.
from omniclaw import sell @sell(price=0.01, token="USDC") async def my_endpoint(request): return {"data": "premium content"}
When a request arrives without payment, OmniClaw returns an HTTP 402 response with payment instructions. After payment is verified, the endpoint executes normally.
from omniclaw.seller import Seller seller = Seller( wallet_id="merchant-wallet-id", network=Network.BASE_SEPOLIA )
Gas-free USDC transfers using EIP-3009 authorization.
from omniclaw.nanopayment import NanoPayment nano = NanoPayment(network=Network.BASE_SEPOLIA) result = nano.transfer( from_wallet="sender-id", to="recipient-address", amount=0.001 # micro-amounts supported )
from omniclaw.trust import TrustEvaluator evaluator = TrustEvaluator() score = evaluator.evaluate( agent_id="agent-address", context={"transaction_amount": 100.00} ) print(score.trust_level) # e.g., "high", "medium", "low" print(score.signals) # contributing trust signals
| Command | Description |
|---|---|
omniclaw doctor |
Verify credentials, connectivity, and system health |
omniclaw env |
Display all configured environment variables |
- Getting Started — installation and first payment
- Architecture — how these components fit together
- Compliance Design — authorization and audit model