get_address

Function get_address 

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

Gets a new address for a descriptor wallet at a given index. Client must keep track of address indexes and ENSURE prevention of address reuse.

  • OUTPUT
WalletAddress {
  address: String,
}

ยง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.