Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

API‐Reference

Clo edited this page Mar 29, 2026 · 1 revision

API Reference

OmniClaw Client

Initialization

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
)

Wallet Management

create_wallet()

Creates a new Circle Programmable Wallet.

wallet = client.create_wallet()
print(wallet.id, wallet.address)

get_wallet(wallet_id)

Retrieves an existing wallet by ID.

wallet = client.get_wallet("wallet-uuid")

Payment Operations

pay()

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.

simulate()

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.


Seller SDK

sell() Decorator

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.

Seller Configuration

from omniclaw.seller import Seller
seller = Seller(
 wallet_id="merchant-wallet-id",
 network=Network.BASE_SEPOLIA
)

NanoPayment

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
)

Trust Evaluation

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

CLI Commands

Command Description
omniclaw doctor Verify credentials, connectivity, and system health
omniclaw env Display all configured environment variables

Further Reading

Clone this wiki locally

AltStyle によって変換されたページ (->オリジナル) /