LtbLightning / bdk-flutter

Bitcoin Development Kit - Flutter Package
MIT License
60 stars 27 forks source link

Looking for clarifications on ResponseWallet object #37

Closed thunderbiscuit closed 1 year ago

thunderbiscuit commented 1 year ago

Wondering if you had particular reasons to have the ResponseWallet being the return type for the createWallet method.

It's not obvious to me that creating a wallet using something like the createWallet method should return an object with the balance and an address. Was there a particular reason for it to not return something like just an acknowledgement that the wallet was created without error?

Some of my questions immediately were things like "wait what type of address is this? New or LastIndex? I don't need an address right now, so is that address burned now and my next call to get_address will generate a new one? What happens if my device doesn't have internet connection at the wallet creation step? (it should be able to create the wallet even though it cannot sync, but at the moment the two are happening in the same step).

i5hi commented 1 year ago

It could be more useful for createWallet to return an id which can then be used in sync and other wallet functions to support multiple wallets - as suggested in #27.

i5hi commented 1 year ago

just checked out the align-with-ffi branch. looks like its now returning a wallet instance which is much nicer.