you21979/node-electrum-client

Electrum client class should have method that takes the electrs request method and parameter.

Closed this issue · 5 comments

The Electrum client class should have a method that can take the electrs method and params which can be used to make a request to the electrs server to enable more reusability when using the library and reduce maintenance when their is a breaking change in the electrs server method names or parameters.
Users can just reference the electrs client anytime and get the method name and the parameters required and pass them appropriately.

I've modified the codebase already to fit my needs, I can create a PR for the issue.
Thanks

i dont get, whats the difference between electrs and other electrum implementations that implement the same json-rpc protocol?

I used electrumX (electrs), as an indexer to my bitcoin node, https://github.com/romanz/electrs I don't know about other implementations, I am just suggesting an improvement to the node electrum client library so that their will be no need the edit the Electrum client class https://github.com/you21979/node-electrum-client/blob/master/lib/electrum_client.js if there are changes to the method names or parameters there will be no need to add another method.

I will use the node-electrum-client as an interface to pass the method and the parameter.

Can you show the change you propose?

In https://github.com/you21979/node-electrum-client/blob/master/lib/electrum_client.js
Another method should be added.

electr_client(method,params){
    return this.request(method, params)
 }