{"id":15515952,"url":"https://github.com/rustaceanrob/kyoto","last_synced_at":"2025-04-05T03:04:10.904Z","repository":{"id":237862744,"uuid":"795374191","full_name":"rustaceanrob/kyoto","owner":"rustaceanrob","description":"An implementation of Bitcoin Improvement Proposal 157/158","archived":false,"fork":false,"pushed_at":"2025-03-28T16:46:02.000Z","size":1313,"stargazers_count":60,"open_issues_count":13,"forks_count":8,"subscribers_count":7,"default_branch":"master","last_synced_at":"2025-03-29T02:06:51.621Z","etag":null,"topics":["bitcoin","cryptocurrency","networking","peer-to-peer"],"latest_commit_sha":null,"homepage":"https://docs.rs/kyoto-cbf","language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/rustaceanrob.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","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":"2024-05-03T06:27:54.000Z","updated_at":"2025-03-28T17:09:20.000Z","dependencies_parsed_at":"2024-05-03T12:16:45.171Z","dependency_job_id":"a1fe2bd7-7941-4eae-946c-b9bdcfca5e77","html_url":"https://github.com/rustaceanrob/kyoto","commit_stats":{"total_commits":304,"total_committers":3,"mean_commits":"101.33333333333333","dds":0.009868421052631526,"last_synced_commit":"a3b5ffffdf1efe4a137300a0b96bf1011ac682f5"},"previous_names":["rustaceanrob/kyoto"],"tags_count":9,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rustaceanrob%2Fkyoto","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rustaceanrob%2Fkyoto/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rustaceanrob%2Fkyoto/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rustaceanrob%2Fkyoto/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/rustaceanrob","download_url":"https://codeload.github.com/rustaceanrob/kyoto/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247280262,"owners_count":20912967,"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":["bitcoin","cryptocurrency","networking","peer-to-peer"],"created_at":"2024-10-02T10:05:04.612Z","updated_at":"2025-04-05T03:04:10.898Z","avatar_url":"https://github.com/rustaceanrob.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003cdiv align=\"center\"\u003e\n  \u003ch1\u003eKyoto: Bitcoin Light Client\u003c/h1\u003e\n  \u003cp\u003e\n    \u003cstrong\u003eAn Implementation of BIP-157/BIP-158\u003c/strong\u003e\n  \u003c/p\u003e\n\n  \u003cp\u003e\n    \u003ca href=\"https://crates.io/crates/kyoto-cbf\"\u003e\u003cimg alt=\"Crate Info\" src=\"https://img.shields.io/crates/v/kyoto-cbf.svg\"/\u003e\u003c/a\u003e\n    \u003ca href=\"https://github.com/rustaceanrob/kyoto/blob/master/LICENSE\"\u003e\u003cimg alt=\"MIT or Apache-2.0 Licensed\" src=\"https://img.shields.io/badge/license-MIT%2FApache--2.0-blue.svg\"/\u003e\u003c/a\u003e\n    \u003ca href=\"https://github.com/rustaceanrob/kyoto/actions?query=workflow%3A%22Build+%26+Test%22\"\u003e\u003cimg alt=\"CI Status\" src=\"https://github.com/rustaceanrob/kyoto/workflows/Build%20%26%20Test/badge.svg\"\u003e\u003c/a\u003e\n    \u003ca href=\"https://docs.rs/kyoto-cbf\"\u003e\u003cimg alt=\"API Docs\" src=\"https://img.shields.io/badge/docs.rs-kyoto_cbf-green\"/\u003e\u003c/a\u003e\n    \u003ca href=\"https://blog.rust-lang.org/2022/08/11/Rust-1.63.0.html\"\u003e\u003cimg alt=\"Rustc Version 1.63.0+\" src=\"https://img.shields.io/badge/rustc-1.63.0%2B-lightgrey.svg\"/\u003e\u003c/a\u003e\n  \u003c/p\u003e\n\u003c/div\u003e\n\n## About\n\nKyoto is aiming to be a simple, memory-conservative, and private Bitcoin client for developers to build wallet applications. To read more about the scope, usage recommendations, and implementation details, see [DETAILS.md](./doc/DETAILS.md).\n\n## Running an example\n\nTo run the Signet example, in the root directory:\n\n```\ncargo run --example signet\n```\n\nOr, with `just`:\n\n```\njust example\n```\n\n## Getting Started\n\nThe following snippet demonstrates how to build a Kyoto node. See the [docs](https://docs.rs/kyoto-cbf) for more details on the `NodeBuilder`, `Node`, `Client`, and more.\n\n```rust\nuse std::str::FromStr;\nuse std::collections::HashSet;\nuse kyoto::{NodeBuilder, Log, Event, Client, Address, Network, HeaderCheckpoint, BlockHash};\n#[tokio::main]\nasync fn main() {\n    // Add third-party logging\n    let subscriber = tracing_subscriber::FmtSubscriber::new();\n    tracing::subscriber::set_global_default(subscriber).unwrap();\n    // Add Bitcoin scripts to scan the blockchain for\n    let address = Address::from_str(\"tb1q9pvjqz5u5sdgpatg3wn0ce438u5cyv85lly0pc\")\n        .unwrap()\n        .require_network(Network::Signet)\n        .unwrap()\n        .into();\n    let mut addresses = HashSet::new();\n    addresses.insert(address);\n    // Start the scan after a specified header\n    let checkpoint = HeaderCheckpoint::closest_checkpoint_below_height(170_000, Network::Signet);\n    // Create a new node builder\n    let builder = NodeBuilder::new(Network::Signet);\n    // Add node preferences and build the node/client\n    let (mut node, client) = builder\n        // The Bitcoin scripts to monitor\n        .add_scripts(addresses)\n        // Only scan blocks strictly after an anchor checkpoint\n        .anchor_checkpoint(checkpoint)\n        // The number of connections we would like to maintain\n        .num_required_peers(2)\n        .build_node()\n        .unwrap();\n    // Run the node and wait for the sync message;\n    tokio::task::spawn(async move { node.run().await });\n    // Split the client into components that send messages and listen to messages\n    let Client { requester, mut log_rx, mut event_rx } = client;\n    // Sync with the single script added\n    loop {\n        tokio::select! {\n            log = log_rx.recv() =\u003e {\n                if let Some(log) = log {\n                    match log {\n                        Log::Dialog(d) =\u003e tracing::info!(\"{d}\"),\n                        _ =\u003e (),\n                    }\n                }\n            }\n            event = event_rx.recv() =\u003e {\n                if let Some(event) = event {\n                    match event {\n                        Event::Synced(_) =\u003e {\n                            tracing::info!(\"Sync complete!\");\n                            break;\n                        },\n                        _ =\u003e (),\n                    }\n                }\n            }\n        }\n    }\n    requester.shutdown().await;\n```\n\n## Minimum Supported Rust Version (MSRV) Policy\n\nThe `kyoto` core library with default features supports an MSRV of Rust 1.63.\n\n## Integration Testing\n\nThe preferred workflow is by using `just`. If you do not have `just` installed, check out the [installation page](https://just.systems/man/en/chapter_4.html).\n\nTo run the unit tests and doc tests:\n\n```\njust test\n```\n\nTo sync with a live Signet node:\n\n```\njust sync\n```\n\nAnd to run scenarios against your `bitcoind` instance, set a `BITCOIND_EXE` environment variable to the path to `bitcoind`:\n\n```\nexport BITCOIND_EXE = \"/usr/path/to/bitcoind/\"\n```\n\nYou may want to add this to your bash or zsh profile.\n\nTo run the `bitcoind` tests:\n\n```\njust integrate\n```\n\nIf you do not have `bitcoind` installed, you may simply run `just integrate` and it will be installed for you in the `build` folder.\n\n## Contributing\n\nPlease read [CONTRIBUTING.md](./CONTRIBUTING.md) to get started.\n\nUnless you explicitly state otherwise, any contribution intentionally submitted for inclusion in the work by you, as defined in the Apache-2.0 license, shall be dual licensed as above, without any additional terms or conditions.\n\n## License\n\nLicensed under either of\n\n* Apache License, Version 2.0, ([LICENSE-APACHE](LICENSE-APACHE) or \u003chttps://www.apache.org/licenses/LICENSE-2.0\u003e)\n* MIT license ([LICENSE-MIT](LICENSE-MIT) or \u003chttps://opensource.org/licenses/MIT\u003e)\n\nat your option.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frustaceanrob%2Fkyoto","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Frustaceanrob%2Fkyoto","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frustaceanrob%2Fkyoto/lists"}