← 输入框|github.com|刷新
Skip to content

Make IPC usable by external clients #113

Open

Description

@rustaceanrob

Exposing a minimal chain interface could allow for the following:

  • UI applications that integrate a wallet (SwiftUI with a Capnp proto C++ wrapper as an example)
  • External indexes. Examples include utreexo inclusion proofs or silent payments key tweaks
  • Statistical analysis in programs like python

I would imagine the Chain interface starting as:

  • wait_next_block that returns BlockInfo on a chain connection
  • BlockInfo is the serialized block and a structure for the undo data
  • broadcast_raw_tx should likely move to that interface

In the future it should cover:

  • Mempool related operations, like setting up notifications or queries
  • Get block by hash, height
  • Chain traversal, (get the next or previous header)

Activity

  1. yancyribbens commented on Oct 19, 2026

    @yancyribbens
    Contributor

    This sounds similar in functionality then to the electrum protocol? Is there reason to prefer using this vs using electrum then? For example, electrs.

  2. rustaceanrob commented on Oct 24, 2026

    @rustaceanrob
    ContributorAuthor

    Electrum is a protocol, I think typically for light clients or users to connect over the internet to their home node. That is more the typical client-server relationship. Exposing a Capnp interface here would be for over applications to be compiled along with kernel-node, so the process can interact with the node but the two run separately. I am imagining this is mostly useful for GUIs that will embed their own wallet. In fact, the node can run 24/7 as a daemon on the machine and the GUI just needs to open a unix socket and catch up on whatever blocks it missed. So the purpose here would be to allow building bundled applications.

  3. yancyribbens commented on Oct 25, 2026

    @yancyribbens
    Contributor

    I'm not sure I see the distinction between what your proposing and existing electrum protocol. In fact, I think this project could implement electrum and that way maintain compatibility with wallets that already implement the electrum protocol. For example, here is a CLI I wrote some years ago: https://crates.io/crates/esplora-cli. The point is, if this project implemented electrum, and then, this cli could just be pointed at the kernel-node and call for example "broadcast" to broadcast a transaction..

  4. yancyribbens commented on Oct 25, 2026

    @yancyribbens
    Contributor

    Actually, the cli I posted above is esplora which is over HTTPs. Electrum uses JSON-RPC over TCP, SSL/TLS, or socks proxy (for Onion services). Although, i'm still wonder if what you are proposing could instead be done with electrum since that supports all the same functionality like broadcast tx, wait for next block etc.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions