Function sync_history

Source
#[no_mangle]
pub unsafe extern "C" fn sync_history(
    descriptor: *const c_char,
    node_address: *const c_char,
) -> *mut c_char
Expand description

Syncs to a remote node and fetches history of a descriptor wallet.

  • OUTPUT
 WalletHistory{
   history: Vec<Transaction {
     timestamp: u64,
     height: u32,
     verified: bool,
     txid: String,
     received: u64,
     sent: u64,
     fee: u64,
   }>;
 }

ยงSafety

  • This function is unsafe because it dereferences and a returns raw pointer.
  • ENSURE that result is passed into cstring_free(ptr: *mut c_char) after use.