{"id":13619972,"url":"https://github.com/chainwayxyz/clementine","last_synced_at":"2026-01-11T03:52:00.979Z","repository":{"id":228996138,"uuid":"731471719","full_name":"chainwayxyz/clementine","owner":"chainwayxyz","description":"Citrea's BitVM Based Trust-Minimized Two-Way Peg Program","archived":false,"fork":false,"pushed_at":"2025-04-10T15:30:14.000Z","size":79393,"stargazers_count":73,"open_issues_count":80,"forks_count":17,"subscribers_count":8,"default_branch":"main","last_synced_at":"2025-04-10T15:53:08.496Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"https://www.blog.citrea.xyz/unveiling-clementine","language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/chainwayxyz.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2023-12-14T06:48:41.000Z","updated_at":"2025-03-27T10:28:31.000Z","dependencies_parsed_at":"2024-10-29T09:52:07.915Z","dependency_job_id":null,"html_url":"https://github.com/chainwayxyz/clementine","commit_stats":null,"previous_names":["chainwayxyz/clementine"],"tags_count":4,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/chainwayxyz%2Fclementine","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/chainwayxyz%2Fclementine/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/chainwayxyz%2Fclementine/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/chainwayxyz%2Fclementine/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/chainwayxyz","download_url":"https://codeload.github.com/chainwayxyz/clementine/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248936986,"owners_count":21186137,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-08-01T21:00:50.681Z","updated_at":"2026-01-11T03:52:00.937Z","avatar_url":"https://github.com/chainwayxyz.png","language":"Rust","funding_links":[],"categories":["Tools"],"sub_categories":["Potential Use Case"],"readme":"# Clementine 🍊\n\nClementine is Citrea's BitVM based trust-minimized two-way peg program.\nThe repository includes:\n\n- Smart contracts for deposit and withdrawal\n- A library for bridge operator and verifiers\n- Circuits that will be optimistically verified with BitVM\n\nThe flow is as follows:\n\n- Creating the operator and verifiers\n- Initial setup that includes calculating period block heights, connector tree hashes, and funding connector source UTXOs.\n- User deposit flow that includes creating a deposit transaction, signing it, and submitting it to the operator.\n- Operator processing the deposit, getting signatures from verifiers, and submitting the deposit to the Bitcoin network.\n- Verifiers verifying the deposit and signing the deposit transaction and claim signatures.\n- Operator withdrawal flow for front covering withdrawal requests.\n- Verifier to start a challenge with Bitcoin Proof of Work\n- Operator to respond to the challenge with a bridge proof.\n\n\u003e [!WARNING]\n\u003e\n\u003e Clementine is still 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.\n\n## Instructions\n\n### Preparing Test Environment\n\nTo run the whole process of simulating deposits, withdrawals, proof generation\non the Bitcoin Regtest network, you need Bitcoin Core to be installed.\n\nStart the regtest server with the following command:\n\n```sh\nbitcoind -regtest -rpcuser=admin -rpcpassword=admin -rpcport=18443 -fallbackfee=0.00001 -wallet=admin -txindex=1\n```\n\nCreate a wallet for the operator:\n\n```sh\nbitcoin-cli -regtest -rpcuser=admin -rpcpassword=admin -rpcport=18443 createwallet \"admin\"\n```\n\nMine some blocks to the wallet:\n\n```sh\nbitcoin-cli -regtest -rpcuser=admin -rpcpassword=admin -rpcport=18443 generatetoaddress 101 $(bitcoin-cli -regtest -rpcuser=admin -rpcpassword=admin -rpcport=18443 getnewaddress)\n```\n\nEnable dev-mode for risc0-zkvm. This can help lower compilation times.\n\n```sh\nexport RISC0_DEV_MODE=1\n```\n\nA custom configuration file can be specified for testing. This can be helpful\nif developer's environment is not matching with a test's configuration file\n(e.g. database user name).\n\n```sh\nexport TEST_CONFIG=/path/to/configuration.toml\n```\n\n### Testing\n\nTo run every test:\n\n```sh\ncargo test\n```\n\nUser's environment configuration can be different than hard coded test\nconfiguration file. In that case, user can specify an external configuration\nfile that overwrites test configurations some fields, like database user and\npassword. To do that, set `TEST_CONFIG` environment variable with the path of\nconfiguration file:\n\n```sh\nTEST_CONFIG=/path/to/user.toml cargo test\n```\n\n## License\n\n**(C) 2024 Chainway Limited** `clementine` was developed by Chainway Limited.\nWhile we plan to adopt an open source license, we have not yet selected one. As\nsuch, all rights are reserved for the time being. Please reach out to us if you\nhave thoughts on licensing.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fchainwayxyz%2Fclementine","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fchainwayxyz%2Fclementine","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fchainwayxyz%2Fclementine/lists"}