Chuyển đến nội dung
Skillpedia
Lập trình chung7.0k · #13611

alkahest-user

Skill này làm gì

Skill này chỉ cách dùng công cụ dòng lệnh alkahest để giữ token trong escrow trên các blockchain EVM. Nó giải thích vai trò người mua, người bán và oracle, cùng cách đăng nhập bằng ví.

Khi nào nên dùng

  • ✓Khi bạn muốn khóa token trong một escrow cho đến khi người bán giao hàng.
  • ✓Khi bạn là người bán và cần chứng minh đã đáp ứng điều kiện của người mua.
  • ✓Khi bạn đóng vai oracle và phải chấp thuận hoặc từ chối một kết quả hoàn thành.

Liên kết skill

https://github.com/internet-court/internet-court-skill/blob/main/vendored/arkhai/alkahest-user/SKILL.md

Sao chép rồi dán vào AI của bạn (Claude, ChatGPT hoặc Cursor) và nhờ nó làm theo hướng dẫn.

Cách dùng

Cách dễ nhất: sao chép tin nhắn và dán vào AI của bạn. AI sẽ đọc skill và làm theo hướng dẫn.

Tin nhắn có sẵn để dán

Hãy dùng skill này để giúp tôi: https://github.com/internet-court/internet-court-skill/blob/main/vendored/arkhai/alkahest-user/SKILL.md Đọc tệp SKILL.md tại liên kết đó và làm theo hướng dẫn cho việc của tôi.
Bạn muốn AI tự tìm những skill như thế này?Cài MCP Skillpedia miễn phí: chỉ một dòng, và AI sẽ tìm trong 15.000+ skill trước mỗi việc.Cài đặt trong 1 phút →

Ví dụ cách nhờ AI

“Tôi muốn tạo một escrow để giải ngân token cho người bán khi họ giao hàng.”

5 skill mới mỗi tuần. Đọc chỉ 1 phút.

Cách hoạt động

Agent chạy công cụ dòng lệnh với một ví do bạn cung cấp, qua khóa riêng, cụm từ khôi phục hoặc ví phần cứng. Nó dùng các lệnh cho từng vai trò để tạo escrow, nộp sản phẩm hoặc ghi lại quyết định.

Nội dung kỹ thuật (SKILL.md gốc)

Lấy nguyên văn từ GitHub, do tác giả viết bằng tiếng Anh.

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, 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] <command> <subcommand> [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 <path>]
Private key env ALKAHEST_PRIVATE_KEY=0x...
Mnemonic env ALKAHEST_MNEMONIC="word1 word2 ..."
Compat env PRIVATE_KEY=0x...

Global Flags

--chain <name>          base-sepolia (default) | sepolia | ethereum
--rpc-url <url>         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 \
  --escr
Câu hỏi thường gặp

Skill này hỗ trợ những mạng nào?

Skill liệt kê Base Sepolia, Sepolia và Ethereum mainnet.

Agent có thể đăng nhập vào ví của tôi bằng cách nào?

Bạn có thể cung cấp khóa riêng, cụm từ khôi phục hoặc ví phần cứng Ledger.

Điều kiện giải ngân có thể phức tạp không?

Có. Các điều kiện có thể kết hợp bằng logic AND hoặc OR, và có thể bao gồm nhiều loại token.

Chi tiết

Mô tả gốc của tác giả

Interact with Alkahest escrow contracts as a buyer, seller, or oracle using the CLI

repo: internet-court/internet-court-skill

Độ phổ biến

Sao GitHub
7.0k
Vị trí xếp hạng
#13611
Giấy phép
—
Cập nhật
26/10/2026

Skill này có hữu ích không?

0

Đăng nhập để bình chọn.

Bình luận

  • …

Thêm skill từ kho mã này

Skill tương tự