بنقرة واحدة
alkahest-user
Interact with Alkahest escrow contracts as a buyer, seller, or oracle using the CLI
التثبيت باستخدام Codex أو Claude انسخ هذا Prompt والصقه في Codex أو Claude أو مساعد آخر ليراجع صفحة Skill ويثبّتها لك.
القائمة
Interact with Alkahest escrow contracts as a buyer, seller, or oracle using the CLI
التثبيت باستخدام Codex أو Claude انسخ هذا Prompt والصقه في Codex أو Claude أو مساعد آخر ليراجع صفحة Skill ويثبّتها لك.
استنادا إلى تصنيف SOC المهني
Entry point for Internet Court — the trust layer for agent-to-agent commerce. Use whenever an agent needs to transact with another agent or a paid service, or a user mentions agent payments, paid APIs (HTTP 402/x402), wallet custody or trust concerns, spending mandates, delegated permissions (ERC-7710/7715), escrow, agent identity or reputation (ERC-8004), negotiation between agents (A2A), agent jobs (ERC-8183), machine payments (MPP, AP2), supervision of agent behavior, revocation, verification, or dispute resolution (GenLayer) — even if they never say "Internet Court". Routes to the vendored protocol skills and connector skills in this package.
Connect GenLayer Intelligent Contract decisions to ERC-7710-style delegated authority. Use when an agent needs to design the interface, message schema, relayer/bridge path, EVM revocation controller, constraint updates, proof/finality assumptions, and failure handling that turn a GenLayer agent-performance review into ERC-7710 revocation or policy changes.
Internet Court adapter for GenLayer Intelligent Contract supervision. Use to specify agent-performance rubrics, evidence schemas, decision outputs, and ERC-7710 connector expectations, while delegating actual GenLayer contract writing, linting, testing, deployment, and CLI interaction to the official GenLayer skills at https://skills.genlayer.com/.
Design and implement demos combining x402 HTTP payments with ERC-7710 smart contract delegations and ERC-7715 wallet permission requests for subscriptions, bounded agent budgets, recurring spend, pay-per-use APIs, and agentic commerce.
0G Compute Network guide for decentralized AI inference, fine-tuning, and GPU services. Covers chatbots, image generation, speech-to-text, SDK integration (0g-serving-broker), processResponse API, broker.inference methods, CLI commands (0g-compute-cli), and account management. Use this skill for any 0G compute, 0G AI, or decentralized GPU question.
Use this skill when the user asks to list, create, inspect, update, disable, re-enable, or revoke AltLLM Portal API keys for external agents or applications. Do NOT use for wallet login, billing history, or payment links.
| name | alkahest-user |
| description | Interact with Alkahest escrow contracts as a buyer, seller, or oracle using the CLI |
Alkahest is an EAS-based (Ethereum Attestation Service) escrow protocol for trustless exchanges on EVM chains. It enables:
Supported chains: Base Sepolia, Sepolia, Ethereum mainnet.
| Role | Description |
|---|---|
| Buyer | Creates escrow with assets + demand (what they want in return) |
| Seller | Fulfills the demand to collect escrowed assets |
| Oracle | Validates fulfillment and submits on-chain decisions (for TrustedOracleArbiter) |
Install globally via npm install -g alkahest-cli, then run commands with:
alkahest [global-flags] <command> <subcommand> [options]
Provide a wallet via one of (in priority order):
| Method | Flag / Env Var |
|---|---|
| Private key flag | --private-key 0x... |
| Mnemonic flag | --mnemonic "word1 word2 ..." |
| Ledger USB | --ledger [--ledger-path <path>] |
| Private key env | ALKAHEST_PRIVATE_KEY=0x... |
| Mnemonic env | ALKAHEST_MNEMONIC="word1 word2 ..." |
| Compat env | PRIVATE_KEY=0x... |
--chain <name> base-sepolia (default) | sepolia | ethereum
--rpc-url <url> Custom RPC URL (overrides chain default)
--human Human-readable output (default: JSON)
JSON by default (ideal for programmatic/agent use). All BigInts are serialized as strings.
{ "success": true, "data": { "hash": "0x...", "uid": "0x..." } }
{ "success": false, "error": { "code": "ESCROW_CREATE_FAILED", "message": "..." } }
Use --human for labeled, indented output.
First, encode the demand data that specifies your release condition:
# Trusted oracle demand — oracle must approve fulfillment
alkahest arbiter encode-demand \
--type trusted-oracle \
--oracle 0xORACLE_ADDRESS \
--data 0x
# Returns: { "success": true, "data": { "encoded": "0x..." } }
Use the --arbiter address and the encoded --demand hex from step 1:
# ERC20 escrow with auto-approve
alkahest --private-key 0xKEY escrow create \
--erc20 \
--token 0xTOKEN_ADDRESS \
--amount 1000000000000000000 \
--arbiter 0xARBITER_ADDRESS \
--demand 0xENCODED_DEMAND \
--expiration 1735689600 \
--approve
# ERC721 escrow
alkahest --private-key 0xKEY escrow create \
--erc721 \
--token 0xNFT_ADDRESS \
--token-id 42 \
--amount 0 \
--arbiter 0xARBITER_ADDRESS \
--demand 0xENCODED_DEMAND \
--expiration 1735689600 \
--approve
# Native token (ETH) escrow — no approve needed
alkahest --private-key 0xKEY escrow create \
--native \
--token 0x0000000000000000000000000000000000000000 \
--amount 500000000000000000 \
--arbiter 0xARBITER_ADDRESS \
--demand 0xENCODED_DEMAND \
--expiration 1735689600
Returns { "success": true, "data": { "hash": "0x...", "uid": "0x...", ... } }. Save the uid — this is the escrow UID.
alkahest --private-key 0xKEY escrow wait \
--erc20 --uid 0xESCROW_UID
# Blocks until fulfilled. Returns: { payment, fulfillment, fulfiller }
alkahest --private-key 0xKEY escrow reclaim \
--erc20 --uid 0xESCROW_UID
alkahest --private-key 0xKEY escrow get \
--erc20 --uid 0xESCROW_UID
# 1. Create fulfillment referencing the escrow
alkahest --private-key 0xKEY string create \
--item "Here is my completed deliverable" \
--ref-uid 0xESCROW_UID
# Returns: { uid: "0xFULFILLMENT_UID", ... }
# 2. If escrow uses TrustedOracleArbiter, oracle arbitrates
alkahest --private-key 0xORACLE_KEY arbiter arbitrate \
--obligation 0xFULFILLMENT_UID \
--demand 0xDEMAND_HEX \
--decision true
# 3. Collect the escrow
alkahest --private-key 0xSELLER_KEY escrow collect \
--erc20 \
--escrow-uid 0xESCROW_UID \
--fulfillment-uid 0xFULFILLMENT_UID
# Create a barter offer: bid ERC20 for ERC20
alkahest --private-key 0xKEY barter create \
--bid-type erc20 --ask-type erc20 \
--bid-token 0xBID_TOKEN --bid-amount 1000000000000000000 \
--ask-token 0xASK_TOKEN --ask-amount 2000000000000000000 \
--expiration 1735689600 \
--approve
# Counterparty fulfills the barter
alkahest --private-key 0xCOUNTERPARTY_KEY barter fulfill \
--uid 0xBARTER_UID \
--bid-type erc20 --ask-type erc20 \
--approve
Supported barter pairs: erc20/erc20, erc20/erc721, erc20/erc1155. --permit is only supported when fulfilling an ERC20 ask.
# Approve a fulfillment
alkahest --private-key 0xORACLE_KEY arbiter arbitrate \
--obligation 0xFULFILLMENT_UID \
--demand 0xDEMAND_HEX \
--decision true
# Reject a fulfillment
alkahest --private-key 0xORACLE_KEY arbiter arbitrate \
--obligation 0xFULFILLMENT_UID \
--demand 0xDEMAND_HEX \
--decision false
For auto-arbitration (listening for requests and auto-deciding), use the TypeScript SDK directly — see references/typescript-sdk.md.
Use commit-reveal when fulfillment data is self-contained (e.g., a string answer) to prevent frontrunning.
# 1. Compute commitment hash
alkahest --private-key 0xKEY commit-reveal compute-commitment \
--ref-uid 0xESCROW_UID \
--claimer 0xSELLER_ADDRESS \
--payload 0xPAYLOAD_HEX \
--salt 0xSALT_HEX \
--schema 0xSCHEMA_UID
# Returns: { commitment: "0x..." }
# 2. Commit (sends bond as ETH)
alkahest --private-key 0xKEY commit-reveal commit \
--commitment 0xCOMMITMENT_HASH \
--bond-amount 10000000000000000
# 3. Wait at least 1 block, then reveal
alkahest --private-key 0xKEY commit-reveal reveal \
--payload 0xPAYLOAD_HEX \
--salt 0xSALT_HEX \
--schema 0xSCHEMA_UID \
--ref-uid 0xESCROW_UID
# Returns: { uid: "0xOBLIGATION_UID", ... }
# Check deadline and slashed bond recipient
alkahest --private-key 0xKEY commit-reveal info
# Slash an unrevealed commitment's bond
alkahest --private-key 0xKEY commit-reveal slash-bond \
--commitment 0xCOMMITMENT_HASH
The arbiter encode-demand command encodes demand data for any arbiter type:
# Trusted oracle
alkahest arbiter encode-demand --type trusted-oracle \
--oracle 0xORACLE --data 0x
# Attestation property arbiters
alkahest arbiter encode-demand --type recipient --recipient 0xADDRESS
alkahest arbiter encode-demand --type attester --attester 0xADDRESS
alkahest arbiter encode-demand --type schema --schema 0xSCHEMA_UID
alkahest arbiter encode-demand --type time-after --time 1735689600
# Logical composition (AllArbiter / AnyArbiter)
alkahest arbiter encode-demand --type all \
--demands '[{"arbiter":"0xARB1","demand":"0xDEM1"},{"arbiter":"0xARB2","demand":"0xDEM2"}]'
alkahest arbiter encode-demand --type any \
--demands '[{"arbiter":"0xARB1","demand":"0xDEM1"},{"arbiter":"0xARB2","demand":"0xDEM2"}]'
Available --type values: trusted-oracle, all, any, recipient, attester, schema, uid, ref-uid, revocable, time-after, time-before, time-equal, expiration-time-after, expiration-time-before, expiration-time-equal.
alkahest arbiter decode-demand \
--arbiter 0xARBITER_ADDRESS \
--demand 0xENCODED_HEX
For manual buyer-side approval of fulfillments:
# Confirm a fulfillment
alkahest --private-key 0xBUYER_KEY arbiter confirm \
--fulfillment 0xFULFILLMENT_UID \
--escrow 0xESCROW_UID \
--type exclusive-revocable
# Revoke confirmation (revocable variants only)
alkahest --private-key 0xBUYER_KEY arbiter revoke \
--fulfillment 0xFULFILLMENT_UID \
--escrow 0xESCROW_UID \
--type exclusive-revocable
Types: exclusive-revocable, exclusive-unrevocable, nonexclusive-revocable, nonexclusive-unrevocable.
# ERC20 payment with auto-approve
alkahest --private-key 0xKEY payment pay \
--erc20 \
--token 0xTOKEN --amount 1000000000000000000 \
--payee 0xRECIPIENT \
--approve
# Native token payment
alkahest --private-key 0xKEY payment pay \
--native \
--token 0x0000000000000000000000000000000000000000 \
--amount 500000000000000000 \
--payee 0xRECIPIENT
# Get payment details
alkahest --private-key 0xKEY payment get --erc20 --uid 0xUID
# Get raw attestation by UID
alkahest --private-key 0xKEY attestation get --uid 0xUID
# Decode attestation data by type
alkahest --private-key 0xKEY attestation decode \
--uid 0xUID --type erc20-escrow
Decode types: erc20-escrow, erc20-payment, erc721-escrow, erc721-payment, erc1155-escrow, erc1155-payment, string, commit-reveal.
# Show contract addresses for a chain
alkahest config show --chain base-sepolia
# List supported chains
alkahest config chains
| Type | Flag | Key options |
|---|---|---|
| ERC20 | --erc20 | --token, --amount |
| ERC721 | --erc721 | --token, --token-id |
| ERC1155 | --erc1155 | --token, --token-id, --amount |
| Native Token | --native | --amount |
| Token Bundle | --bundle | (SDK only for create) |
All escrow types share the same workflow: create -> wait -> collect (or reclaim if expired).
references/typescript-sdk.md for TypeScript SDK usage (complex workflows, auto-arbitration, bundle escrows)references/contracts.md for all contract addresses and obligation data schemasreferences/arbiters.md for all arbiter types and demand encoding patterns