← 返回 Skills 市场
mlegls

Alkahest User

作者 疒奀 · GitHub ↗ · v1.0.0 · MIT-0
cross-platform ⚠ suspicious
245
总下载
0
收藏
0
当前安装
1
版本数
在 OpenClaw 中安装
/install alkahest-user
功能描述
Interact with Alkahest escrow contracts as a buyer, seller, or oracle using the CLI
使用说明 (SKILL.md)

Alkahest User Skill

What is Alkahest?

Alkahest is an EAS-based (Ethereum Attestation Service) escrow protocol for trustless exchanges on EVM chains. It enables:

  • Token escrow with programmable release conditions (ERC20, ERC721, ERC1155, native tokens, bundles)
  • Arbiter-based validation — release conditions are defined by arbiter contracts that check fulfillment
  • Composable demands — combine multiple conditions with AND/OR logic
  • Oracle arbitration — off-chain validation with on-chain decision submission
  • Commit-reveal — frontrunning protection for self-contained fulfillment data

Supported chains: Base Sepolia, Sepolia, Filecoin Calibration, Ethereum mainnet.

Roles

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)

CLI Setup

Install globally via npm install -g alkahest-cli, then run commands with:

alkahest [global-flags] \x3Ccommand> \x3Csubcommand> [options]

Authentication

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 \x3Cpath>]
Private key env ALKAHEST_PRIVATE_KEY=0x...
Mnemonic env ALKAHEST_MNEMONIC="word1 word2 ..."
Compat env PRIVATE_KEY=0x...

Global Flags

--chain \x3Cname>          base-sepolia (default) | sepolia | filecoin-calibration | ethereum
--rpc-url \x3Curl>         Custom RPC URL (overrides chain default)
--human                 Human-readable output (default: JSON)

Output Format

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.

Buyer Workflow: Create Escrow

1. Encode the demand

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..." } }

2. Create the escrow

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.

3. Wait for fulfillment

alkahest --private-key 0xKEY escrow wait \
  --erc20 --uid 0xESCROW_UID
# Blocks until fulfilled. Returns: { payment, fulfillment, fulfiller }

4. Reclaim expired escrow (if unfulfilled)

alkahest --private-key 0xKEY escrow reclaim \
  --erc20 --uid 0xESCROW_UID

5. Get escrow details

alkahest --private-key 0xKEY escrow get \
  --erc20 --uid 0xESCROW_UID

Seller Workflow: Fulfill Escrow

Using StringObligation (off-chain validated work)

# 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

Using barter (token-for-token swap)

# 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

# Counterparty fulfills the barter
alkahest --private-key 0xCOUNTERPARTY_KEY barter fulfill \
  --uid 0xBARTER_UID \
  --bid-type erc20 --ask-type erc20

Supported barter pairs: erc20/erc20, erc20/erc721, erc20/erc1155. Use --permit for gasless approval.

Oracle Workflow: Arbitrate

# 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.

Commit-Reveal Workflow

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

# 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", ... }

# 4. Reclaim bond after successful reveal
alkahest --private-key 0xKEY commit-reveal reclaim-bond \
  --uid 0xOBLIGATION_UID

# Check bond amount and deadline
alkahest --private-key 0xKEY commit-reveal info

# Slash an unrevealed commitment's bond
alkahest --private-key 0xKEY commit-reveal slash-bond \
  --commitment 0xCOMMITMENT_HASH

Encoding Demands

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

# IntrinsicsArbiter2 (schema check)
alkahest arbiter encode-demand --type intrinsics2 \
  --schema 0xSCHEMA_UID

# 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, intrinsics2, all, any, recipient, attester, schema, uid, ref-uid, revocable, time-after, time-before, time-equal, expiration-time-after, expiration-time-before, expiration-time-equal.

Decoding demands

alkahest arbiter decode-demand \
  --arbiter 0xARBITER_ADDRESS \
  --demand 0xENCODED_HEX

Confirmation Arbiters

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.

Payments

# 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

Attestations

# 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.

Configuration

# Show contract addresses for a chain
alkahest config show --chain base-sepolia

# List supported chains
alkahest config chains

Escrow Types

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).

Additional Resources

  • See references/typescript-sdk.md for TypeScript SDK usage (complex workflows, auto-arbitration, bundle escrows)
  • See references/contracts.md for all contract addresses and obligation data schemas
  • See references/arbiters.md for all arbiter types and demand encoding patterns
安全使用建议
This skill's documentation shows exactly how to operate the Alkahest CLI/SDK and repeatedly instructs you to supply private keys, mnemonics, or RPC URLs — but the registry metadata does not declare those secrets. Before installing or following these instructions: - Treat the examples as demonstrating sensitive operations: supplying a raw private key or mnemonic gives full custody of funds. Never paste a production private key or mnemonic into a third-party CLI or code snippet unless you fully trust and have audited the target package. - Verify the alkahest-cli npm package and @alkahest/ts-sdk source repository (check publisher, repository, and package contents). Audit or review the package code before installing globally. - Prefer hardware wallets / Ledger for signing (the SKILL.md mentions ledger support) to avoid exposing raw private keys. If using an environment variable, use a throwaway test wallet with minimal funds. - Validate RPC URLs before using them (don’t use RPC endpoints of unknown operators that could log or manipulate transactions). - For automated listeners/auto-arbitration, run them in an isolated environment and avoid running them with keys that control large balances. - The skill is instruction-only (it does not itself install code), but it recommends installing external packages; the primary risk is from those external packages and from providing secrets as shown. If you are not prepared to audit the CLI/SDK package or to use safe key-handling practices (hardware wallet, ephemeral keys), do not proceed.
功能分析
Type: OpenClaw Skill Name: alkahest-user Version: 1.0.0 The alkahest-user skill bundle provides comprehensive instructions and reference documentation for an AI agent to interact with the Alkahest escrow protocol. It details workflows for buyers, sellers, and oracles using the alkahest-cli, covering escrow management, fulfillment via EAS attestations, and commit-reveal schemes across multiple EVM chains. While the skill handles sensitive cryptographic keys (e.g., ALKAHEST_PRIVATE_KEY), this is necessary for its stated purpose of blockchain interaction, and there is no evidence of malicious intent, data exfiltration, or prompt injection within the provided files (SKILL.md, _meta.json, and reference docs).
能力评估
Purpose & Capability
The skill claims to be an interaction helper for Alkahest escrows (CLI + TS SDK), which legitimately needs wallet credentials and RPC endpoints. However, the registry metadata lists no required env vars, no primary credential, and no required binaries while the SKILL.md explicitly instructs use of private keys, mnemonics, and RPC URLs (flags and env vars like ALKAHEST_PRIVATE_KEY, ALKAHEST_MNEMONIC, PRIVATE_KEY and --private-key). That mismatch between declared requirements and actual instructions is incoherent.
Instruction Scope
The SKILL.md tells the agent/user to provide raw private keys or mnemonics (via flags or env vars) and includes code examples that embed private keys in code (TS SDK sample uses privateKeyToAccount("0xYOUR_PRIVATE_KEY")). It also describes long-running auto-arbitration listeners. While these actions are within the functional scope of an escrow CLI/SDK, the instructions explicitly require handling highly sensitive secrets and long-running automation and do not limit or warn about exfiltration or safe handling, and they reference env vars that were not declared in the skill metadata.
Install Mechanism
This is an instruction-only skill (no install spec, no code files executed by the platform). That minimizes direct installation risk because nothing is downloaded or written by the skill itself. The SKILL.md does instruct the user to install an external npm package (npm install -g alkahest-cli) outside the skill — which is expected for a CLI helper but means package provenance must be checked by the user.
Credentials
The skill requires sensitive credentials to function (private keys, mnemonics, and RPC URLs) as shown in flags/env examples, but the registry metadata declares no required env variables or primary credential. This omission prevents automated gating/visibility of secret access. Requesting raw private keys and mnemonics (or embedding them in code) is high-privilege and should be explicit and limited; the skill does not make that explicit in metadata.
Persistence & Privilege
The skill is not always-enabled (always: false) and does not request persistent system-wide privileges. Autonomous invocation is allowed (platform default), which combined with the skill's ability to instruct use of secrets could increase risk, but there is no explicit 'always' or other elevated privilege requested by the skill itself.
如何使用
  1. 确保已安装 OpenClaw(本地或 Docker 部署)
  2. 在对话框中输入安装命令:/install alkahest-user
  3. 安装完成后,直接呼叫该 Skill 的名称或使用 /alkahest-user 触发
  4. 根据 Skill 的参数说明提供必要输入,即可获得结构化输出
版本历史
v1.0.0
Initial release of the alkahest-user skill. - Enables CLI interaction with Alkahest escrow protocol as buyer, seller, or oracle - Supports token escrows (ERC20, ERC721, ERC1155, native tokens) with programmable, composable, and oracle-validated conditions - Provides commit-reveal workflow for frontrunning protection - Includes detailed buyer, seller, and oracle workflows with command examples - Offers programmatic-ready JSON output and human-readable toggling via --human flag - Supports custom authentication methods (private key, mnemonic, Ledger) and multiple EVM chains
元数据
Slug alkahest-user
版本 1.0.0
许可证 MIT-0
累计安装 0
当前安装数 0
历史版本数 1
常见问题

Alkahest User 是什么?

Interact with Alkahest escrow contracts as a buyer, seller, or oracle using the CLI. 它是一个面向 Claude Code / OpenClaw 的 AI Agent Skill 插件,目前累计下载 245 次。

如何安装 Alkahest User?

在 OpenClaw 或 Claude Code 对话框中运行命令「/install alkahest-user」即可一键安装,无需额外配置。

Alkahest User 是免费的吗?

是的,Alkahest User 完全免费,采用 MIT-0 许可证,可自由下载、安装和使用。

Alkahest User 支持哪些平台?

Alkahest User 跨平台运行,可在任意部署了 OpenClaw / Claude Code 的环境中使用(cross-platform)。

谁开发了 Alkahest User?

由 疒奀(@mlegls)开发并维护,当前版本 v1.0.0。

💬 留言讨论