Skip to content

Add raw_call to ElectrumApi#74

Merged
afilini merged 1 commit intobitcoindevkit:masterfrom
zoedberg:raw_call
Aug 1, 2022
Merged

Add raw_call to ElectrumApi#74
afilini merged 1 commit intobitcoindevkit:masterfrom
zoedberg:raw_call

Conversation

@zoedberg
Copy link
Copy Markdown
Contributor

In order to give more flexibility to the users of this library I added a raw_call method to the ElectrumApi trait that will allow to call any arbitrary electrum API call.

Copy link
Copy Markdown
Member

@afilini afilini left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ACK 3d96644

@afilini afilini merged commit e1c20b8 into bitcoindevkit:master Aug 1, 2022
@dr-orlovsky
Copy link
Copy Markdown
Contributor

Am I correct that after the latest version was yanged this is not yet released in any working crate version?

Copy link
Copy Markdown
Contributor

@dr-orlovsky dr-orlovsky left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Post-merge review with improvement proposal

Comment thread src/api.rs
}

/// Executes the requested API call returning the raw answer.
fn raw_call(&self, call: &Call) -> Result<serde_json::Value, Error>;
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this leads to calling method like raw_call(&("method_name".to_owned(), vec![])), which is very non-rust ideomatic. Thus I propose a follow-up PR with changing function signature to raw_call(&self, method_name: &str, params: impl IntoIterator<Item=Param>).

This, however, will be a breaking change and will require a new minor version bump.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Opened #84 to implement your proposal

@afilini
Copy link
Copy Markdown
Member

afilini commented Aug 24, 2022

Am I correct that after the latest version was yanged this is not yet released in any working crate version?

This should be part of 0.10.2 which is not yanked and currently the latest version

This, however, will be a breaking change and will require a new minor version bump.

This is fine, we will have to do a breaking release anyway because we've recently changed the implementation of socks so we can include this as well.

radiant-smith-lk20 added a commit to radiant-smith-lk20/rust-electrum-client that referenced this pull request Dec 15, 2025
3d96644a0f7e5823b8b9bd712640ddfbb253061d Add raw_call to ElectrumApi (Zoe Faltibà)

Pull request description:

  In order to give more flexibility to the users of this library I added a `raw_call` method to the `ElectrumApi` trait that will allow to call any arbitrary electrum API call.

ACKs for top commit:
  afilini:
    ACK 3d96644a0f7e5823b8b9bd712640ddfbb253061d

Tree-SHA512: b88ece7bd9ff8121272c3b3528430e9ccb8778661b15cce276c6f67a8797a4dbf4c52a8521191942c21e8b67ebde8187fd75ac49189440b0fbb71274974b4b41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants