dcipher is a modular protocol for threshold cryptography.
It combines smart contracts and off-chain node operators to enable:
- Asynchronous Distributed Key Generation
- Threshold signing
- Identity-based encryption
- Chain abstraction
The repository is organized into:
- Binaries (
bin/) – runnable agents, CLIs, and services. - Crates (
crates/) – Rust libraries used across the project. - Modules (
modules/) – Git submodule dependencies that pull in protocol-specific logic or external components.
| Binary | Purpose | Documentation |
|---|---|---|
adkg-cli | CLI for running and testing Asynchronous Distributed Key Generation ceremonies | README |
blocklock-agent | Agent for the Blocklock protocol (time-lock / conditional decryption) | |
dsigner | Threshold signing daemon, allowing operators to separate condition evaluation and signing for security | README |
gen-keys | Utility for key generation (testing / setup) | README |
monitoring | An agent that listens/polls dcipher-related information and ships it to prometheus | README |
onlyswaps-smoketest | A continuous monitoring and testing tool for only swaps. | README |
onlyswaps-solver | An agent for providing token liquidity on chains that support onlyswaps to make yield. | README |
onlyswaps-state-api | API for caching and serving state related to ONLYSwaps | |
onlyswaps-verifier | A dcipher protocol implementation called ONLYSwaps for enabling cross-chain token swaps | README |
randomness-agent | A dcipher protocol implementation for providing request-based verifiable randomness on-chain |
| Crate | Purpose |
|---|---|
adkg | Core Asynchronous Distributed Key Generation implementation |
agent-utils | Utilities shared by dcipher agents |
config | Shared configuration handling for agents that use networking, threshold signing, or load config files (TOML, env, etc.) |
dcipher-agents | Common agent framework code |
generated | Auto-generated Rust bindings from Solidity (kept in sync via generate-bindings.sh) |
network | Networking primitives and libp2p integrations |
onlyswaps-client | A client to interact with onlyswaps |
omnievent | A library for streaming contract events sources into database sinks, and back into filterable streams for apps built on top of alloy |
signer | Signing logic (BLS / threshold compatible) |
superalloy | A crate providing multiplexing logic for combining alloy providers |
utils | General helper utilities |
These are Git submodule dependencies, not local crates.
They typically include protocol-specific or external components maintained in separate repositories.
Update them with:
git submodule update --init --recursive- Rust
1.89.0+ - Node.js & npm
make- Foundry (if running the tests)
Build everything, including solidity and tests:
make allBuild the repo (but not the tests):
cargo buildBuild a specific binary (e.g. adkg-cli):
cargo build --release -p adkg-cliBuild Docker images (requires binaries to be built first):
make build_binaries
make build_docker_randomness-agent
make build_docker_onlyswaps-verifierClean artifacts:
make clean
make clean_node_modules
make clean_forgeIf Solidity contracts change, regenerate Rust bindings:
./generate-bindings.shCI will fail if bindings are out of sync.
- Rust crates:
cargo test --workspace- Fork & clone the repo
- Create a feature branch
- Run
cargo testandforge testbefore pushing - Open a PR and ensure CI passes
Licensed under MIT.