electrum-personal-server icon indicating copy to clipboard operation
electrum-personal-server copied to clipboard

listunspent and import_addresses API methods

Open lawlawlaw opened this issue 2 years ago • 1 comments

Add the following API methods:

  • blockchain.scripthash.listunspent - returns unspent transaction object information for the given scripthash
  • import_addresses - imports the specified addresses and rescans from the specified block_height.

lawlawlaw avatar Sep 30 '21 12:09 lawlawlaw

Thanks for the PR. Implementing listunspent has long been on the todo list like in issue #105.

Some thoughts:

  1. You implement the protocol method import_addresses but from what I see in the protocol spec it's not a method there. Are you aware of any clients that actually implement this method? I think it's best to remove it.
  2. You should reduce the number of commits. Right now you have 3 commits which edit and then revert README.me. Ideally have the PR be just one commit. If you don't know how to do this then search the web for "git squish commits"

Apart from that the PR looks good on reading. Please do the edits I ask then I will test out the PR and most likely merge it.

chris-belcher avatar Mar 07 '22 18:03 chris-belcher