Function sn_transfers::create_offline_transfer
source · pub fn create_offline_transfer(
available_cash_notes: Vec<(CashNote, DerivedSecretKey)>,
recipients: Vec<(NanoTokens, MainPubkey, DerivationIndex)>,
change_to: MainPubkey,
reason_hash: Hash
) -> Result<OfflineTransfer>Expand description
A function for creating an offline transfer of tokens. This is done by creating new cash_notes to the recipients (and a change cash_note if any) by selecting from the available input cash_notes, and creating the necessary spends to do so.
Those signed spends are found in each new cash_note, and must be uploaded to the network for the transaction to take effect. The peers will validate each signed spend they receive, before accepting it. Once enough peers have accepted all the spends of the transaction, and serve them upon request, the transaction will be completed.