#p2p #bitcoin #kyoto #specification

kyoto-cbf

A Bitcoin light-client according to the BIP-157/BIP-158 specifications

10 breaking releases

new 0.11.0 May 6, 2025
0.9.0 Feb 21, 2025
0.6.0 Dec 4, 2024
0.5.0 Nov 7, 2024

#1 in #kyoto

Download history 13/week @ 2025-01-13 430/week @ 2025-01-20 181/week @ 2025-01-27 142/week @ 2025-02-03 5/week @ 2025-02-10 413/week @ 2025-02-17 276/week @ 2025-02-24 114/week @ 2025-03-03 1255/week @ 2025-03-10 124/week @ 2025-03-17 2074/week @ 2025-03-24 152/week @ 2025-03-31 382/week @ 2025-04-07 155/week @ 2025-04-14 1720/week @ 2025-04-21 1086/week @ 2025-04-28

3,353 downloads per month
Used in bdk_kyoto

MIT/Apache

400KB
9K SLoC

Kyoto: Bitcoin Light Client

An Implementation of BIP-157/BIP-158

Crate Info MIT or Apache-2.0 Licensed CI Status API Docs Rustc Version 1.63.0+

About

Kyoto 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.

Running an example

To run the Signet example, in the root directory:

cargo run --example signet

Or, with just:

just example

Getting Started

It is recommended to walk through the Signet example code. Unlike usual clients that source data from the blockchain, there are two components to the CBF system. There is a "node" that fetches data on behalf of a user, and a "client" that receives data, logs, and warnings from the node. The client may also interact with the node by sending transactions to broadcast or new scripts. This crate allows a highly configurable node construction, so your app may optimize for the desired speed, privacy, and preferences.

See the docs for more details on the NodeBuilder, Node, Client, and more.

Minimum Supported Rust Version (MSRV) Policy

The kyoto core library with default features supports an MSRV of Rust 1.63.

Integration Testing

The preferred workflow is by using just. If you do not have just installed, check out the installation page.

To run the unit tests and doc tests:

just test

To sync with a live Signet node:

just test sync

And to run scenarios against your bitcoind instance, set a BITCOIND_EXE environment variable to the path to bitcoind:

export BITCOIND_EXE = "/usr/path/to/bitcoind/"

You may want to add this to your bash or zsh profile.

To run the bitcoind tests:

just test integration

If you do not have bitcoind installed, you may simply run just test integration and it will be installed for you in the build folder.

Contributing

Please read CONTRIBUTING.md to get started.

Unless 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.

License

Licensed under either of

at your option.

Dependencies

~40MB
~635K SLoC