The Rust SDK for building Bitcoin dApps on REE (Runes Exchange Environment).
Bitcoin Script is intentionally not Turing-complete, which makes building complex protocols (e.g., AMMs) directly on the UTXO model very challenging. REE extends Bitcoin programmability for Rune assets by combining:
- ICP (Internet Computer Protocol) Chain Key cryptography
- PSBT (Partially Signed Bitcoin Transactions)
This repository is a Rust workspace that provides the SDK, proc-macros, and shared types required to build REE exchanges.
sdk/
: The core SDK published to crates.io and documented on docs.rssdk-macro/
: Procedural/attribute macros used by the SDK and consumerstypes/
: Shared type definitions
Add the dependency in your Cargo.toml
:
[dependencies]
ree-exchange-sdk = "0.10"
- Construct PSBT: The client (wallet/UI) composes a PSBT from user input and REE exchange metadata, then the user signs it.
- Submit to REE: The orchestrator validates the PSBT (including UTXO/Rune info) and checks I/O relations. On success, it forwards the request to the Exchange service.
- Validate & Sign: The Exchange signs the pool UTXO using ICP Chain Key, turning the PSBT into a valid Bitcoin transaction.
- Broadcast: The finalized transaction is returned to REE and broadcast to the Bitcoin network.
- License: MIT (see
LICENSE
) - Tutorials: https://docs.omnity.network/
- Website: https://www.omnity.network/