#[unsafe(no_mangle)]pub unsafe extern "C" fn derive_wallet_account(
master_xprv: *const c_char,
purpose: *const c_char,
account: *const c_char,
) -> *mut c_charExpand description
Derives hardened child keys from a master xprv. Follows the BIP32 standard of m/purpose’/network’/account’. Network path is inferred from the master xprv.
- OUTPUT
ChildKeys {
fingerprint: String,
hardened_path: String,
xprv: String,
xpub: 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.