On-Chain Operations
Integrate blockchain capabilities into your e-commerce AI workflow — payments, verification, and cross-chain operations powered by Aizel Network.
Overview
AizelCommerce SDK natively integrates with Aizel Network's blockchain infrastructure, enabling:
- AgentPay settlements — Pay for API usage via smart contracts
- Content verification — On-chain proof of generated asset authenticity
- Product attestation — Cryptographic proof of product claims
- Cross-chain commerce — Operate across 7 supported chains
Supported Chains
| Chain | Network ID | Settlement | Verification |
|---|---|---|---|
| Ethereum | ethereum |
✓ | ✓ |
| Arbitrum | arbitrum |
✓ | ✓ |
| BSC | bsc |
✓ | ✓ |
| Avalanche | avalanche |
✓ | ✓ |
| Base | base |
✓ | ✓ |
| Aimos Chain | aimos |
✓ | ✓ |
| Peaq | peaq |
— | ✓ |
Initialize On-Chain Mode
from aizel_commerce import AizelCommerce
client = AizelCommerce(
payment_mode="on_chain",
chain="arbitrum",
wallet_address="0x1234...abcd",
private_key_env="WALLET_PRIVATE_KEY"
)
AgentPay Integration
AgentPay is Aizel Network's protocol for AI agent payments. In AizelCommerce, it enables:
Pay-per-call Settlement
# Each API call is settled on-chain automatically
result = client.product.analyze(title="...", on_chain=True)
print(result.payment.tx_hash) # Payment transaction
print(result.payment.amount) # Amount charged (USDC)
print(result.payment.gas_cost) # Network fee
Escrow for Batch Jobs
# Large batch jobs use escrow — funds locked until delivery
job = client.pipeline.run(
products=catalog,
payment={
"mode": "escrow",
"chain": "arbitrum",
"budget": 5000, # Max spend in USDC
"release_on": "completion" # or "per_stage"
}
)
# Funds auto-release when pipeline completes successfully
# If pipeline fails, funds return to your wallet
print(job.escrow_contract) # Escrow contract address
print(job.escrow_status) # "locked" | "releasing" | "released" | "refunded"
Content Verification
Register generated assets on-chain for IP protection:
# Any generated asset can be registered
images = client.creative.generate_images(
product=result,
styles=["hero_shot"],
on_chain=True,
chain="arbitrum"
)
img = images[0]
print(img.content_hash) # SHA-256 of the image
print(img.ipfs_cid) # IPFS content identifier
print(img.verification_tx) # On-chain registration tx
print(img.timestamp) # Verifiable creation time
print(img.verification_url) # Public verification page
# https://verify.aizelnetwork.com/asset/0xabc...
Product Attestation
Publish verifiable product claims on-chain:
# Useful for supply chain, authenticity, regulatory compliance
attestation = client.product.attest(
product_id="SKU-12345",
claims={
"origin": "Made in Japan",
"organic": True,
"certification": "JAS Organic #12345"
},
chain="arbitrum",
evidence_urls=["https://example.com/cert.pdf"]
)
print(attestation.contract_address)
print(attestation.verification_url)
# Consumers can verify: https://verify.aizelnetwork.com/product/SKU-12345
Cross-Chain Commerce
Execute e-commerce operations across multiple chains:
# List product on multiple chain-based marketplaces simultaneously
listing = client.commerce.cross_chain_list(
product=result,
chains=["arbitrum", "bsc", "avalanche"],
pricing={"USDC": 299.99},
metadata_storage="ipfs" # Decentralized product metadata
)
for chain_listing in listing.results:
print(f"{chain_listing.chain}: {chain_listing.contract} — tx: {chain_listing.tx_hash}")
TEE Security
All on-chain operations execute within Aizel's TEE infrastructure:
- Model inference runs in hardware-isolated enclaves
- Private keys never leave the TEE boundary
- Transaction signing happens within the secure enclave
- Verifiable execution reports (1,000+ generated to date)
# Verify TEE attestation for any operation
result = client.product.analyze(title="...", tee_report=True)
print(result.tee_report.attestation_hash)
print(result.tee_report.enclave_id)
print(result.tee_report.verification_url)