bitcoin-connect
bitcoin-connect copied to clipboard
Expose API through a single object instead of exported methods
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