feat: minimal sweep WIF QR-code implementation#53
Conversation
|
@psychemist Hi thanks for the PR. Not quite sure we want to add a WIF feature for the sample app. IMO adding WIF is a big jump from where the wallet is atm. @thunderbiscuit might have a different opinion. Don't mind me asking, what was your rationale the for adding WIF ? are you use in your projects somewhere? |
|
have a contributor who added it for BDK iOS bitcoindevkit/BDKSwiftExampleWallet#355 so let me know if we're doing anything different from ya'll here if you do add it |
|
@ItoroD i saw the contribution on the iOS repo so i thought it would be a nice addition here. unfortunately, i thought about raising the issue AFTER i was done building |
Ahhh I see! Thanks for the input. |
No worries! When I saw camera permissions and QR scanning I had to look a little harder. I know IOS has been using those for a while already. I think we do not even have camera scanning for QR anywhere yet not even for scanning addresses. Probably good to start now. I will run the test and do a proper review. |
Description
This PR adds the ability to sweep funds from an external WIF private key into the user's wallet by scanning a QR code or copy-pasting the raw WIF string.
What This Does
raw WIF,wif: prefix, andbitcoin:?wif= URIformatsFlow
Testing
Unit tests (JVM, no device needed)
./gradlew :app:testDebugUnitTestInstall on device/emulator
./gradlew installDebugManual: send testnet4 coins to the wpkh address derived from a test WIF then sweep. Check in-app logs for balance details per descriptor.
Check out test sweep transaction on testnet4 here:
Screenshots