import_master

Function import_master 

Source
#[unsafe(no_mangle)]
pub unsafe extern "C" fn import_master( network: *const c_char, mnemonic: *const c_char, passphrase: *const c_char, ) -> *mut c_char
Expand description

Creates a master xprv given a mnemonic and passphrase.

  • OUTPUT
MasterKey {
  fingerprint: String,
  mnemonic: String,
  xprv: 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.