From fb4bb02f1a29b6e7172b6a1432ada26bb63b3f30 Mon Sep 17 00:00:00 2001 From: Sergio Chouhy Date: Mon, 13 Oct 2025 18:06:02 -0300 Subject: [PATCH] add docstrings --- nssa/program_methods/guest/src/bin/authenticated_transfer.rs | 3 +++ 1 file changed, 3 insertions(+) diff --git a/nssa/program_methods/guest/src/bin/authenticated_transfer.rs b/nssa/program_methods/guest/src/bin/authenticated_transfer.rs index ccd0bec..df8a38e 100644 --- a/nssa/program_methods/guest/src/bin/authenticated_transfer.rs +++ b/nssa/program_methods/guest/src/bin/authenticated_transfer.rs @@ -3,6 +3,8 @@ use nssa_core::{ program::{ProgramInput, read_nssa_inputs, write_nssa_outputs}, }; +/// Initializes a default account under the ownership of this program. +/// This is achieved by a noop. fn initialize_account(pre_state: AccountWithMetadata) { let account_to_claim = pre_state.account.clone(); let is_authorized = pre_state.is_authorized; @@ -21,6 +23,7 @@ fn initialize_account(pre_state: AccountWithMetadata) { write_nssa_outputs(vec![pre_state], vec![account_to_claim]); } +/// Transfers `balance_to_move` native balance from `sender` to `recipient`. fn transfer(sender: AccountWithMetadata, recipient: AccountWithMetadata, balance_to_move: u128) { // Continue only if the sender has authorized this operation if !sender.is_authorized {