MCPcopy Index your code
hub / github.com/2140-dev/kyoto

github.com/2140-dev/kyoto @v0.6.1

Chat with this repo
repository ↗ · DeepWiki ↗ · release v0.6.1 ↗ · + Follow
424 symbols 1,081 edges 25 files 100 documented · 24%
What it actually does AI analysis from the code graph — generated when you open this
loading…
README

Kyoto: Bitcoin Light Client

<strong>An Implementation of BIP-157/BIP-158</strong>







<a href="https://crates.io/crates/bip157"><img alt="Crate Info" src="https://img.shields.io/crates/v/bip157.svg"/></a>
<a href="https://github.com/2140-dev/kyoto/blob/master/LICENSE"><img alt="MIT or Apache-2.0 Licensed" src="https://img.shields.io/badge/license-MIT%2FApache--2.0-blue.svg"/></a>
<a href="https://github.com/2140-dev/kyoto/actions?query=workflow%3A%22Build+%26+Test%22"><img alt="CI Status" src="https://github.com/2140-dev/kyoto/workflows/CI/badge.svg"/></a>
<a href="https://docs.rs/bip157"><img alt="API Docs" src="https://img.shields.io/badge/docs.rs-bip157-green"/></a>
<a href="https://blog.rust-lang.org/2022/08/11/Rust-1.63.0.html"><img alt="Rustc Version 1.63.0+" src="https://img.shields.io/badge/rustc-1.63.0%2B-lightgrey.svg"/></a>

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 fetching metadata. 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 Builder, Node, Client, and more.

To add to your project:

cargo add bip157

BDK

Kyoto integrates well with the Bitcoin Dev Kit (BDK) ecosystem.

  • Book of BDK - Kyoto Examples: Learn how to use Kyoto with BDK Wallet through step-by-step examples.
  • BDK FFI: Build native Bitcoin experiences across multiple platforms by combining Kyoto with BDK's foreign function interface libraries.
  • bdk-kyoto Crate: A dedicated crate that provides direct integration between BDK and Kyoto for Rust applications.

Minimum Supported Rust Version (MSRV) Policy

The bip157 core library with default features supports an MSRV of Rust 1.84.

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.

Extension points exported contracts — how you extend this code

HeightExt (Interface)
Attributes of a height in the Bitcoin blockchain. [1 implementers]
src/chain/mod.rs
ZerolikeExt (Interface)
(no doc) [1 implementers]
src/chain/mod.rs
HeaderValidationExt (Interface)
(no doc) [1 implementers]
src/chain/mod.rs
DummyRequestExt (Interface)
(no doc) [1 implementers]
src/chain/block_queue.rs

Core symbols most depended-on inside this repo

block_hash
called by 27
src/chain/mod.rs
sync_cf_headers
called by 26
src/chain/chain.rs
prev_header
called by 23
src/chain/chain.rs
best_hash
called by 22
tests/core.rs
n_most_work_filter_hashes
called by 21
src/chain/chain.rs
run
called by 20
src/node.rs
mine_blocks
called by 20
tests/core.rs
shutdown
called by 19
src/client.rs

Shape

Method 263
Function 62
Class 59
Enum 36
Interface 4

Languages

Rust100%

Modules by API surface

src/network/mod.rs59 symbols
src/chain/graph.rs46 symbols
src/chain/mod.rs44 symbols
src/chain/chain.rs42 symbols
src/lib.rs40 symbols
src/client.rs18 symbols
tests/core.rs17 symbols
src/node.rs17 symbols
src/network/peer_map.rs17 symbols
src/messages.rs17 symbols
src/chain/block_queue.rs17 symbols
src/builder.rs16 symbols

For agents

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

⬇ download graph artifact