Settings → Danger Zone → Unilateral exit uses Breez Spark SDK 0.26.1. Normal withdrawal remains the preferred path. Recovery is a multi-stage Bitcoin operation that may take days, requires separate mining-fee funding, and cannot be cancelled after broadcasting.
getblockchaininfo, submitpackage, and sendrawtransaction. Credentials are stored in the device keychain. Plain HTTP endpoints are intentionally unsupported.A hosted option is Alchemy’s Bitcoin mainnet API: https://bitcoin-mainnet.g.alchemy.com/v2/YOUR_API_KEY. Create your own account/key and verify that package submission is enabled for it. No shared key ships with the app. Another compatible HTTPS RPC can be configured at any time. The connection test checks mainnet and probes submitpackage using an empty package; it does not submit a transaction. This does not guarantee acceptance of a later real package.
EXIT, and build the exit. The app switches to the SDK’s server configuration with automatic background tasks disabled. It saves encrypted recovery intent before signing, then saves the signed result before allowing broadcast. Normal wallet spending/deletion is blocked during recovery. Do not use this seed in another app or spend the funding output elsewhere.Confirm Broadcast ready steps. Only SDK-ready steps with confirmed dependencies are submitted. A parent and its fee-paying child are submitted together. A successful HTTP response is not treated as package acceptance unless all expected transaction results succeeded. You may instead use Export ready packages after saving the encrypted backup. This separate unencrypted file contains RPC methods and parameters for currently ready transactions, so another compatible broadcaster can submit them. Anyone holding the file can broadcast the signed transactions. It is not a replacement for the encrypted recovery backup.
Done verdict and a final sweep in the checked transaction set. Normal syncing resumes. Verify funds at the destination.The app retains recovery records in a separate encrypted database. To restore on a new installation, import the same seed, open recovery, enter the backup password and import the file. Existing records cannot be overwritten with an older backup. Do not uninstall the app during recovery unless you have independently saved the backup and password. Exported files are portable; local keychain encryption is device-bound.
Rebuild the native app because the SDK and native file-sharing modules changed:
node --version # v22.14.0
npm ci --legacy-peer-deps
npx expo prebuild --clean
npm run ios -- --device
prebuild --clean regenerates the native directories; preserve any manual native changes first. npm run ios also generates the build metadata through preios.
First use a separate test wallet, never your main wallet:
No live exit or spending is performed by the automated tests. They cover encrypted backup integrity, package rejection, readiness checks, recovery completion and existing Lightning behavior. iOS/Android native execution and actual package acceptance still require device testing.
Breez recommends Spark Regtest for general SDK development. This app’s Bitcoin testnet switch does not configure Spark Regtest, and this implementation does not expose a regtest exit environment or hosted regtest package broadcaster. Do not treat mocked tests or the general regtest guide as proof of an end-to-end exit. A complete regtest exercise requires a separately configured Spark regtest SDK, matching chain backend, fee funding, mining control and package-capable RPC.
References: Breez unilateral exit, Breez testing, Alchemy submitpackage.