feat: add frigate electrum based RPC methods - #16
Conversation
server.version, blockchain.silentpayments.subscribe and blockchain.silentpayments.unsubscribe225fc0c to
885cd2f
Compare
- Add `ServerVersion` request type (`server.version`) - Add optional `mode` parameter to `EstimateFee` (breaking: new field) - Support both pre-1.6 (concatenated hex) and v1.6 (list of hex strings) response formats for `blockchain.block.headers` - Add `BroadcastPackage` request type (`blockchain.transaction.broadcast_package`) - Add `GetMempoolInfo` request type (`mempool.get_info`) - Add missing `Features` to `gen_pending_request_types!` macro Closes bitcoindevkit#8 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
Cover both the pre-1.6 concatenated-hex path and the v1.6 array-of-hex path, asserting they produce equal `Vec<Header>`, plus a sanity check that non-string/non-array inputs are rejected. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
|
Thanks for the PR! Note that it needs a rebase now with the recent merges. |
oleonardolima
left a comment
There was a problem hiding this comment.
In https://github.com/sparrowwallet/frigate#serverfeatures it mentions the new field in server.features, is it not needed by bdk-sp ?
|
@sdmg15 I just thought this now during the call, but you could also try adding support for these in https://github.com/bitcoindevkit/rust-electrum-client, not sure if the architecture there supports it though. |
Capture rejection details when package broadcast fails, and simplify broadcast hex encoding with serialize_hex.
mempool.get_info returns required BTC/kvB floats, so deserialize to FeeRate directly and share conversion with the estimatefee opt helper.
Use blockchain.relayfee in docs and switch the README sample to GetMempoolInfo for v1.6.
noahjoeris
left a comment
There was a problem hiding this comment.
Thanks for updating @sdmg15 !
I left a few more comments
|
@noahjoeris Thanks for the reviews. I've applied the changes. |
noahjoeris
left a comment
There was a problem hiding this comment.
Thanks again for updating man. Almost there 🚀
Could you also add doc comments to the pub fields you added?
|
Thanks @sdmg15 . I left some final nits. And I ran a quick manual test and it was looking good. |
noahjoeris
left a comment
There was a problem hiding this comment.
tACK on the code. Manually tested against Frigate 1.4.1 on regtest with sp txs.
Before merge, please fold the history into:
feat: support attributes in gen_pending_request_types!feat: add Frigate Silent Payments RPC support
Also left some docs update suggestions (non-blocking).
Thanks for all the updates
d93c094 to
7b1017a
Compare
This PR adds supports for additional RPC methods provided by Frigate electrum based RPC server.
The added methods are:
server.version: This is the first message sent to establish connection with serverblockchain.silentpayments.subscribe: This takes a spend public key and a scan private key and return outputs belonging to the them.blockchain.silentpayments.unsubscribe: This takes a spend public key and a scan private key and unsubscribe from notifications.Some context:
This is useful for the PR opened at bitcoindevkit/bdk-sp#48 which is doing integration of frigate ephemeral scanning.
Opening this PR in order to receive feedback.
Reference:
https://github.com/sparrowwallet/frigate/
Supported Frigate version 1.3.2