LtbLightning / bdk-flutter

Bitcoin Development Kit - Flutter Package
MIT License
63 stars 28 forks source link

Purge wallet #28

Open BitcoinZavior opened 1 year ago

BitcoinZavior commented 1 year ago

Purge wallet from db. If multiple wallets are being supported, there should be an option to purge a wallet's sqlite db.

BitcoinZavior commented 1 year ago

Addresses https://github.com/LtbLightning/bdk-flutter/issues/27

i5hi commented 1 year ago

The way we did this on stackmate is by using sqflite in dart and with bdk we allow users to specify the dbPath. This allows us to then just use sqflite to delete the wallet from dart.

I suppose its possible to do it via rust as well, if you do not want to remove the complexity of having the frontend developer have any direct interaction with sqlite. When a user wants to purge a wallet, it can use purgeWallet(descriptor) and from rust we see if this wallet exists and if it does, we delete it.

What are your thoughts?