Skip to content

Commit 93a7b24

Browse files
committed
Add documentation about recovery
1 parent e08c3a8 commit 93a7b24

1 file changed

Lines changed: 15 additions & 0 deletions

File tree

orange-sdk/src/lib.rs

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -485,6 +485,21 @@ impl fmt::Display for SingleUseReceiveUri {
485485

486486
impl Wallet {
487487
/// Constructs a new Wallet
488+
///
489+
/// ## Recovery
490+
///
491+
/// The wallet automatically performs recovery operations when initialized for the first time:
492+
///
493+
/// - **Trusted wallet backends** (Spark/Cashu): Automatically attempt to recover any existing
494+
/// funds associated with the wallet's seed on first initialization. Recovery is performed
495+
/// once per wallet instance and runs asynchronously without blocking initialization.
496+
///
497+
/// - **Lightning wallet**: Recovery will **NOT** work unless using VSS (Versioned Storage Service)
498+
/// for storage. With local SQLite storage, Lightning channel state and funds cannot be recovered
499+
/// from seed alone and will be lost if the local storage is deleted.
500+
///
501+
/// Recovery ensures trusted wallet funds can be restored when reconstructed from the same seed
502+
/// across different devices or installations.
488503
pub async fn new(config: WalletConfig) -> Result<Wallet, InitFailure> {
489504
let rt = tokio::runtime::Builder::new_multi_thread()
490505
.enable_all()

0 commit comments

Comments
 (0)