An `elementsd`-compatible fork of `corepc` for unified RPC client support
Nobody has claimed this yet.
Assessment
- Difficulty
- 5/5
- Estimated time
- Over a week
- Newbie friendliness
- 35/100
Research direction
Start by comparing the corepc interface with the Elements-specific methods listed in the proposal, then read liquid-functionary's rpc.rs as an example of the duplicated client work. Decide whether a fork or extension crate best handles shared types and versioning. Done means an elementsd-compatible RPC client covers the required differing and Elements-only methods with a maintainable versioning approach.
Written by the indexing model from the issue text.
Description
Background
The rust-bitcoin ecosystem has converged on corepc as a unified library for managing RPC communication with bitcoind. It provides versioned, type-safe client bindings for Bitcoin Core's JSON-RPC interface and is actively maintained alongside rust-bitcoin itself.
rust-elements currently has no equivalent. Downstream projects that need to talk to elementsd end up writing their own ad-hoc RPC clients on top of jsonrpc. For example, liquid-functionary maintains its own rpc.rs. This is duplicated effort, and the resulting clients tend to lag behind upstream changes, cover only the methods each project happens to need, and have inconsistent type definitions.
Proposal
Create an elementsd-compatible fork (or sibling crate) of corepc that:
- Keeps all the common parts of
corepcunchanged. TheelementsdRPC surface is largely a superset ofbitcoind's — the majority of methods are either identical or close enough thatcorepc's existing types can be reused directly. - Overrides the subset of methods that differ. Some Bitcoin Core methods return different or extended data on
elementsd(e.g. anything involving amounts/assets, blinded outputs, or pegged-in coins). These need Elements-specific response types. - Adds the Elements-only methods. Things like
getsidechaininfo,getpeginaddress,claimpegin,rawblindrawtransaction,issueasset,listissuances, asset/token RPCs etc. would need to be added.
Structurally, this could be done either as
- A fork of
corepc - A separate crate that depends on
corepcand re-exports/extends its types
Open questions
- Fork vs. extension crate: I am not sure which is easier to maintain?
- Versioning is a little tricky as in
corepcthere are versions of the interface that track the Bitcoin releases and Elements also tracks the Bitcoin releases but also has its own versions.
- Dominant language
- Rust
- Stars
- 57
- Forks
- 40
- Avg merge
- 11h 58m
- Merged PRs (30d)
- 1
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from ElementsProject/rust-elements
-
Difficulty 3/5 1-2 days Newbie friendliness 45/100
ElementsProject/rust-elements#290 · 1 comment ·
-
Difficulty 5/5 Over a week Newbie friendliness 25/100
ElementsProject/rust-elements#277 ·
-
Difficulty 5/5 Over a week Newbie friendliness 30/100
ElementsProject/rust-elements#273 · 3 comments ·
-
Difficulty 3/5 1-2 days Newbie friendliness 52/100
ElementsProject/rust-elements#262 · 2 comments · 1 reaction ·
-
Difficulty 5/5 Over a week Newbie friendliness 35/100
ElementsProject/rust-elements#260 · 1 comment ·
All issues in ElementsProject/rust-elements
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 85/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 84/100
Eynzof/Hermes-CN-Desktop#610 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
-
bug team:backend track:services-maintenance
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
cowprotocol/services#4950 ·
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
gitbutlerapp/gitbutler#15998 · 1 comment ·