#[no_mangle]
pub unsafe extern "C" fn iohk_jormungandr_wallet_total_value(
wallet: WalletPtr,
total_out: *mut u64
) -> ErrorPtr
Expand description
get the total value in the wallet
make sure to call retrieve_funds
prior to calling this function
otherwise you will always have 0
After calling this function the results is returned in the total_out
.
Errors
- this function may fail if the wallet pointer is null;
On error the function returns a ErrorPtr
. On success NULL
is returned.
The ErrorPtr
can then be observed to gathered details of the error.
Don’t forget to call iohk_jormungandr_wallet_delete_error
to free
the ErrorPtr
from memory and avoid memory leaks.
If the total_out
pointer is null, this function does nothing
Safety
This function dereference raw pointers. Even though the function checks if the pointers are null. Mind not to put random values in or you may see unexpected behaviors