{"id":37174416,"url":"https://github.com/p2pderivatives/dlc","last_synced_at":"2026-01-14T20:22:53.112Z","repository":{"id":57546673,"uuid":"153416259","full_name":"p2pderivatives/dlc","owner":"p2pderivatives","description":"Discreet Log Contracts library","archived":false,"fork":false,"pushed_at":"2021-10-08T07:43:26.000Z","size":363,"stargazers_count":30,"open_issues_count":3,"forks_count":6,"subscribers_count":10,"default_branch":"master","last_synced_at":"2023-07-10T20:36:37.193Z","etag":null,"topics":["bitcoin","smartcontract"],"latest_commit_sha":null,"homepage":null,"language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/p2pderivatives.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2018-10-17T07:44:17.000Z","updated_at":"2023-06-12T04:05:19.000Z","dependencies_parsed_at":"2022-09-26T22:20:14.688Z","dependency_job_id":null,"html_url":"https://github.com/p2pderivatives/dlc","commit_stats":null,"previous_names":[],"tags_count":0,"template":null,"template_full_name":null,"purl":"pkg:github/p2pderivatives/dlc","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/p2pderivatives%2Fdlc","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/p2pderivatives%2Fdlc/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/p2pderivatives%2Fdlc/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/p2pderivatives%2Fdlc/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/p2pderivatives","download_url":"https://codeload.github.com/p2pderivatives/dlc/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/p2pderivatives%2Fdlc/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28434428,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-14T18:57:19.464Z","status":"ssl_error","status_checked_at":"2026-01-14T18:52:48.501Z","response_time":107,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"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":["bitcoin","smartcontract"],"created_at":"2026-01-14T20:22:52.155Z","updated_at":"2026-01-14T20:22:53.097Z","avatar_url":"https://github.com/p2pderivatives.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Discreet Log Contracts (DLC)\n[![CircleCI](https://circleci.com/gh/p2pderivatives/dlc.svg?style=svg)](https://circleci.com/gh/p2pderivatives/dlc)\n\nDiscreet Log Contracts (DLC) are smart contracts proposed by Thaddeus Dryja in [this paper](https://adiabat.github.io/dlc.pdf), which allow you to facilitate conditional payment on Bitcoin.\nThis library is an experimental implementation of DLC, aimed to be used in the Bitcoin mainnet, and **not ready for production**.\n\n## Overview\nThis contract schema involves three parties, 2 contractors and an oracle. We call the 2-contractors Alice and Bob, and the oracle Olivia.\n\n* Alice and Bob\n  * They want to make a future contract\n  * They trust a message fixed and signed by Olivia\n* Olivia\n  * Olivia publishes messages and signs of them\n\nYou can read more details in [this article](https://medium.com/@gertjaap/discreet-log-contracts-invisible-smart-contracts-on-the-bitcoin-blockchain-cc8afbdbf0db) or [the paper](https://adiabat.github.io/dlc.pdf).\n\n## Examples\n### Communication between 3 parties\n[This sample code](https://github.com/p2pderivatives/dlc/blob/master/test/integration/dlc_test.go) demonstrates how 3 parties communicate. An oracle Olivia publishes a n-digit number lottery result everyday, and Alice and Bob bet on the lottery.\n\nIn the tese, the following scenarios are tested.\n\n* Alice and Bob make contracts and execute a fixed one.\n* Oracle does't publish a valid message and sign, and contractors refund their funding transactions.\n\n### Communication between a contractor and an oracle\n[This sample code](https://github.com/p2pderivatives/dlc/blob/master/test/integration/oracle_test.go) demonstrates how a contractor Alice communicates with an oracle Olivia. \nOlivia publishes a various weather information, but Alice uses only some of the info. Contractors can choose which messages to use, and oracle doesn't know which messages are used in contracts (conditions of contracts).\n\n\n## Try DLC contract using CLI\nYou can create DLC contract using CLI. See [this tutorial](./docs/How-to-create-DLC.md) for detailed steps.\n\n## Development\n\n### Setup\n\n### Install dependencies\n\n```\ndep ensure\n```\n\n### Run test\n\n```\ngo test ./...\n```\n\n## License\n[MIT License](https://github.com/p2pderivatives/dlc/blob/master/LICENSE)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fp2pderivatives%2Fdlc","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fp2pderivatives%2Fdlc","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fp2pderivatives%2Fdlc/lists"}