Skip to content

Commit

Permalink
docs: remove link to private code from public interfaces
Browse files Browse the repository at this point in the history
Co-authored-by: Alan Szepieniec <[email protected]>
  • Loading branch information
Sword-Smith and aszepieniec committed Jan 31, 2025
1 parent 466a5b8 commit 50dd91b
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 23 deletions.
16 changes: 6 additions & 10 deletions src/models/state/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -567,7 +567,9 @@ impl GlobalState {

/// Generate a change UTXO to ensure that the difference in input amount
/// and output amount goes back to us. Return the UTXO in a format compatible
/// with claiming it later on, *i.e.*, as an [ExpectedUtxo].
/// with claiming it later on.
//
// "Later on" meaning: as an [ExpectedUtxo].
pub fn create_change_output(
&self,
change_amount: NativeCurrencyAmount,
Expand Down Expand Up @@ -603,21 +605,15 @@ impl GlobalState {
Ok(change_output)
}

/// generates [TxOutputList] from a list of address:amount pairs (outputs).
/// generates TxOutputList from a list of address:amount pairs (outputs).
///
/// This is a helper method for generating the `TxOutputList` that
/// is required by [Self::create_transaction()].
///
/// Each output may use either `OnChain` or `OffChain` notifications. See documentation of
/// of [TxOutput::auto()] for a description of the logic and the
/// `owned_utxo_notify_method` parameter.
/// Each output may use either `OnChain` or `OffChain` notifications.
///
/// If a different behavior is desired, the TxOutputList can be
/// constructed manually.
///
/// future work:
///
/// see future work comment in [TxOutput::auto()]
pub fn generate_tx_outputs(
&self,
outputs: impl IntoIterator<Item = (ReceivingAddress, NativeCurrencyAmount)>,
Expand Down Expand Up @@ -669,7 +665,7 @@ impl GlobalState {
/// UTXO.
///
/// After this call returns, it is the caller's responsibility to inform the
/// wallet of any returned [ExpectedUtxo], ie `OffChain` secret
/// wallet of any returned ExpectedUtxo, ie `OffChain` secret
/// notifications, for utxos that match wallet keys. Failure to do so can
/// result in loss of funds!
///
Expand Down
20 changes: 10 additions & 10 deletions src/models/state/wallet/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -199,11 +199,11 @@ impl WalletSecret {
}

/// derives a generation spending key at `index`
///
/// note: this is a read-only method and does not modify wallet state. When
/// requesting a new key for purposes of a new wallet receiving address,
/// callers should use [wallet_state::WalletState::next_unused_spending_key()]
/// which takes &mut self.
//
// note: this is a read-only method and does not modify wallet state. When
// requesting a new key for purposes of a new wallet receiving address,
// callers should use [wallet_state::WalletState::next_unused_spending_key()]
// which takes &mut self.
pub fn nth_generation_spending_key(
&self,
index: u64,
Expand All @@ -224,11 +224,11 @@ impl WalletSecret {
}

/// derives a symmetric key at `index`
///
/// note: this is a read-only method and does not modify wallet state. When
/// requesting a new key for purposes of a new wallet receiving address,
/// callers should use [wallet_state::WalletState::next_unused_spending_key()]
/// which takes &mut self.
//
// note: this is a read-only method and does not modify wallet state. When
// requesting a new key for purposes of a new wallet receiving address,
// callers should use [wallet_state::WalletState::next_unused_spending_key()]
// which takes &mut self.
pub fn nth_symmetric_key(&self, index: u64) -> symmetric_key::SymmetricKey {
let key_seed = Hash::hash_varlen(
&[
Expand Down
3 changes: 0 additions & 3 deletions src/rpc_server.rs
Original file line number Diff line number Diff line change
Expand Up @@ -421,9 +421,6 @@ pub trait RPC {
///
/// A list of the encoded transaction notifications is also returned. The relevant notifications
/// should be sent to the transaction receiver in case `Offchain` notifications are used.
///
/// future work: add `unowned_utxo_notify_medium` param.
/// see comment for [TxOutput::auto()](crate::models::state::wallet::transaction_output::TxOutput::auto())
async fn send_to_many(
token: rpc_auth::Token,
outputs: Vec<(ReceivingAddress, NativeCurrencyAmount)>,
Expand Down

0 comments on commit 50dd91b

Please sign in to comment.