bitcoin-connect icon indicating copy to clipboard operation
bitcoin-connect copied to clipboard

Expose API through a single object instead of exported methods

Open rolznz opened this issue 1 year ago • 0 comments

This way you could initialize a new BitcoinConnect instance and interact with it.

  • New methods do not always need to be exposed (in the react wrapper for example) and if people want to do custom stuff they can access it directly from the object.
  • They can also more easily see the current state of Bitcoin Connect.
  • Getters can be added rather than always using functions

Related:

https://github.com/getAlby/bitcoin-connect/pull/186#discussion_r1444317022

https://github.com/getAlby/bitcoin-connect/issues/177#issuecomment-1879739078

rolznz avatar Jan 08 '24 09:01 rolznz