Multibit-Legacy / multibit-hd

Deprecated Bitcoin Wallet
https://multibit.org/blog/2017/07/26/multibit-shutdown.html
Other
171 stars 113 forks source link

REST API #693

Closed JeremyRand closed 9 years ago

JeremyRand commented 9 years ago

Bitcoin Core supports a REST API, documented here: https://github.com/bitcoin/bitcoin/blob/master/doc/REST-interface.md

It would be nice to be able to use that API with Multibit-HD. Obviously some of the API calls aren't really applicable to an SPV client, but some (e.g. headers) seem to make sense.

I'm guessing this isn't a high priority for you, so a few questions.

  1. Is this something you would be interested in implementing?
  2. Would you accept a pull request with such functionality if someone provided it, assuming it met your coding standards?
  3. If someone supplied a bounty for this feature, would that encourage you to implement it? If so, how much would the bounty have to be for?

Thanks.

jim618 commented 9 years ago

Hi JeremyRand,

We wouldn't want to add this into MultiBit HD, primarily as it increases the attack surface considerably.

There is already quite a nice bitcoinj command line utility - wallettool : in the bitcoinj git repo - that could very easily be wrapped into a REST API. If you were after an api to do 'wallety' things I would start with that and then wrap it.

Regards,

Jim

JeremyRand commented 9 years ago

Thanks for the quick response @jim618 . Totally understandable; I'll look into wallettool.

jim618 commented 9 years ago

Wallettool is pretty useful and would be easily extendable if you have custom logic you want to implement.

It uses encrypted HD wallets so it's pretty powerful.

The biggest limitation of bitcoinj in this area is that you can only really use bloom filtering and a narrow set of private keys. There is a PrunedBlockStore in bitcoinj but it is generally thought to be for research purposes only (yet) i.e. you wouldn't want to run a business with it.