Skip to content

New RPC API #220

@jrick

Description

@jrick

btcwallet functionality has diverged significantly enough from Bitcoin Core wallet that it no longer makes sense to copy each and every RPC API.

One big issue I see with the Bitcoin Core wallet API is that it is a very leaky abstraction and requires nearly perfect duplication of the wallet implementation to return the same results. This is out of the question for btcwallet, so some methods simply can not be supported.

Additionally, even if btcwallet does have the capability to return the same responses as Bitcoin Core wallet, some response formats are arcane and do not correctly reflect the nature of how Bitcoin works. As btcwallet is primarily intended to be used by other clients, the less lossy the results are, the better.

General philosophies that this API should cater to:

  • Addresses are only displayed once (to discourage address reuse)
  • Addresses are grouped by account
  • Spendable outputs are group by account
  • Account funds are never mingled
  • There is no from address
  • Bitcoin is very different than many other currencies and money software. Embrace its quirks rather than hiding them.

Development of the new API must be done in conjunction with a new client. A one-shot command line client is the easiest and quickest to implement, but we will want to consider the needs of long-running and graphical clients as well.

Decisions such as encoding format are still undecided. JSON is the obvious choice, but Cap'n Proto is being considered as well. Ideally these decisions will be orthogonal to the information contained in each request and response.

The old Bitcoin Core-compatible API will remain implemented but deprecated. Users will be encouraged to use the new API where possible.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions