Skip to content

Commit

Permalink
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
docs(wallet): reword the next_unused_address doc
Browse files Browse the repository at this point in the history
Adds an example on what `used` stands for, and make it explicit that it
has the same behavior as `Wallet::reveal_next_address` in the scenario
where all previously revealed addresses have been used.
oleonardolima committed Dec 12, 2024

Verified

This commit was signed with the committer’s verified signature. The key has expired.
oleonardolima Leonardo L.
1 parent 606a2b0 commit bcc5329
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions crates/wallet/src/wallet/mod.rs
Original file line number Diff line number Diff line change
@@ -732,10 +732,10 @@ impl Wallet {
}

/// Get the next unused address for the given `keychain`, i.e. the address with the lowest
/// derivation index that hasn't been used.
/// derivation index that hasn't been used a transaction.
///
/// This will attempt to derive and reveal a new address if no newly revealed addresses
/// are available. See also [`reveal_next_address`](Self::reveal_next_address).
/// This will attempt to reveal a new address if all previously revealed addresses have
/// been used, in which case the returned address will be the same as calling [`Wallet::reveal_next_address`].
///
/// **WARNING**: To avoid address reuse you must persist the changes resulting from one or more
/// calls to this method before closing the wallet. See [`Wallet::reveal_next_address`].

0 comments on commit bcc5329

Please sign in to comment.