Alkahest
No description available
Install / Use
/learn @arkhai-io/AlkahestREADME
Alkahest
Contract library and SDKs for conditional peer-to-peer escrow
Alkahest is a library and ecosystem of contracts for conditional peer-to-peer escrow. It contains three main types of contracts:
- Escrow contracts conditionally guarantee an on-chain action (usually a token transfer)
- Arbiter contracts represent the conditions on which escrows are released, and can be composed via AllArbiter and AnyArbiter
- Obligation contracts produce EAS attestations that represent the fulfillments to escrows, and which are checked by arbiter contracts. Escrow contracts are also obligation contracts.
Learn more at Alkahest Docs.
Security
Alkahest has been audited by Zellic. The full audit report is available here.
Repository Structure
This is a monorepo containing the Alkahest smart contracts and SDKs for multiple languages:
alkahest/
├── contracts/ # Solidity smart contracts and Foundry tooling
│ ├── src/ # Contract source code
│ ├── test/ # Contract tests
│ ├── script/ # Deployment scripts
│ └── lib/ # Dependencies (forge-std, EAS, OpenZeppelin)
├── sdks/ # Language-specific SDKs
│ ├── py/ # Python SDK
│ ├── rs/ # Rust SDK
│ └── ts/ # TypeScript SDK
└── docs/ # Documentation
Quick Start
Smart Contracts
The contracts are built with Foundry.
cd contracts
forge build
forge test
See contracts/README.md for more details.
SDKs
Each SDK has its own setup and usage instructions:
- Python: See sdks/py/README.md
- Rust: See sdks/rs/README.md
- TypeScript: See sdks/ts/README.md
Documentation
Comprehensive guides and tutorials are available in the docs/ directory:
- Escrow Flow (pt 1 - Token Trading) - Trade tokens for tokens using escrow and payment obligations
- Escrow Flow (pt 2 - Job Trading) - Escrow with off-chain validation via TrustedOracleArbiter
- Escrow Flow (pt 3 - Composing Demands) - Composing arbiter conditions with AllArbiter and AnyArbiter
- Writing Arbiters (pt 1 - On-chain Arbiters) - Create custom on-chain validation logic
- Writing Arbiters (pt 2 - Off-chain Oracles) - Build off-chain oracle validators (Python, Rust, TypeScript)
- Writing Escrow Contracts - Create custom escrow obligations
- Writing Fulfillment Contracts - Create custom fulfillment obligations
Development
Prerequisites
- Foundry
- Node.js (for TypeScript SDK and scripts)
- Python 3.10+ (for Python SDK)
- Rust (for Rust SDK)
Building Everything
# Build contracts
cd contracts && forge build
# Build TypeScript SDK
cd sdks/ts && npm install && npm run build
# Build Python SDK
cd sdks/py && pip install -e .
# Build Rust SDK
cd sdks/rs && cargo build
Agent Skills
The docs/skills/ directory contains agent skills for AI coding assistants (Claude Code, OpenClaw, etc.) that help developers and users interact with Alkahest conversationally.
| Skill | Description |
|-------|-------------|
| alkahest-developer | Write code using the TypeScript, Rust, or Python SDK |
| alkahest-user | Create escrows, fulfill obligations, arbitrate, and barter via the CLI |
Installation
Claude Code (via plugin marketplace)
/plugin marketplace add arkhai-io/claude-plugins
/plugin install alkahest-plugin@arkhai-plugins
See the arkhai-plugins marketplace for all available plugins.
OpenClaw (via ClawHub)
clawhub install alkahest-developer
clawhub install alkahest-user
Manual
Each skill is a directory under docs/skills/ containing a SKILL.md file. Any agent that supports SKILL.md-based skill definitions can use them directly.
Contributing
Contributions are welcome! Please check the individual README files in each directory for specific contribution guidelines.
License
MIT
