MCPcopy Index your code
hub / github.com/chainwayxyz/clementine

github.com/chainwayxyz/clementine @v0.6.6

Chat with this repo
repository ↗ · DeepWiki ↗ · release v0.6.6 ↗ · + Follow
2,103 symbols 8,634 edges 150 files 637 documented · 30%
What it actually does AI analysis from the code graph — generated when you open this
loading…
README

Clementine 🍊

Clementine is Citrea's BitVM based trust-minimized two-way peg program. You can check Clementine whitepaper at citrea.xyz/clementine_whitepaper.pdf.

The repository includes:

  • A library for bridge operator, verifiers, aggregator and watchtower
  • Circuits that will be optimistically verified with BitVM

[!WARNING]

Clementine is still a work in progress. It has not been audited and should not be used in production under any circumstances. It also requires a full BitVM implementation to be run fully on-chain.

Documentation

High level documentations are in docs/. These documentations explains the design, architecture and usage of Clementine.

To start using Clementine, jump docs/usage.md documentation.

Code documentation is also present and can be viewed at chainwayxyz.github.io/clementine/clementine_core.

It can also be generated locally:

cargo doc --no-deps

Documentation will be available at target/doc/clementine_core/index.html after that.

Extension points exported contracts — how you extend this code

SpendableScript (Interface)
A trait that marks all script types. Each script has a `generate_script_inputs` (eg. [`WinternitzCommit::generate_script [8 …
core/src/builder/script.rs
ZkvmGuest (Interface)
This module defines the traits and structures for zkVM guest and host interactions for convenience. [2 implementers]
circuits-lib/src/common/zkvm.rs
NamedEntity (Interface)
A trait for entities that have a name, operator, verifier, etc. Used to distinguish between state machines with differen [4 …
core/src/utils.rs
ZkvmHost (Interface)
(no doc) [1 implementers]
circuits-lib/src/common/zkvm.rs
Task (Interface)
(no doc) [16 implementers]
core/src/task/mod.rs
IntoTask (Interface)
A trait for objects that can be converted into a Task [4 implementers]
core/src/task/mod.rs
ActorWithConfig (Interface)
(no doc) [4 implementers]
core/src/compatibility.rs

Core symbols most depended-on inside this repo

new
called by 1200
core/src/header_chain_prover.rs
clone
called by 1081
core/src/rpc/clementine.rs
map
called by 356
core/src/task/mod.rs
protocol_paramset
called by 268
core/src/config/mod.rs
mine_blocks
called by 103
core/src/extended_bitcoin_rpc.rs
invalid_argument
called by 85
core/src/rpc/error.rs
finalize
called by 85
core/src/builder/transaction/txhandler.rs
add_output
called by 78
core/src/builder/transaction/txhandler.rs

Shape

Method 928
Function 786
Class 289
Enum 71
Interface 29

Languages

Rust100%
Python1%

Modules by API surface

core/src/rpc/clementine.rs171 symbols
core/src/extended_bitcoin_rpc.rs59 symbols
core/src/actor.rs46 symbols
core/src/builder/script.rs43 symbols
core/src/verifier.rs42 symbols
core/src/operator.rs41 symbols
core/src/rpc/aggregator.rs39 symbols
core/src/database/operator.rs37 symbols
core/src/builder/transaction/creator.rs36 symbols
core/src/bitvm_client.rs36 symbols
circuits-lib/src/header_chain/mod.rs36 symbols
circuits-lib/src/bridge_circuit/mod.rs35 symbols

For agents

$ claude mcp add clementine \
  -- python -m otcore.mcp_server <graph>

⬇ download graph artifact

Ask about this repo answers extend the page