Skip to content

Commit b39cf08

Browse files
committed
docs(wallet): reword the next_unused_address doc
docs(wallet): reword the `next_unused_address` doc 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. docs(wallet): fix typo in doc comment
1 parent 606a2b0 commit b39cf08

File tree

1 file changed

+3
-3
lines changed
  • crates/wallet/src/wallet

1 file changed

+3
-3
lines changed

crates/wallet/src/wallet/mod.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -732,10 +732,10 @@ impl Wallet {
732732
}
733733

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

0 commit comments

Comments
 (0)