#[no_mangle]
pub unsafe extern "C" fn iohk_jormungandr_wallet_import_keys(
    account_key: *const u8,
    wallet_out: *mut WalletPtr
) -> ErrorPtr
Expand description

recover a wallet from an account and a list of utxo keys

You can also use this function to recover a wallet even after you have transferred all the funds to the new format (see the convert function)

The recovered wallet will be returned in wallet_out.

parameters

  • account_key: the Ed25519 extended key used wallet’s account address private key in the form of a 64 bytes array.
  • utxo_keys: an array of Ed25519 extended keys in the form of 64 bytes, used as utxo keys for the wallet
  • utxo_keys_len: the number of keys in the utxo_keys array (not the number of bytes)
  • wallet_out: the recovered wallet

Safety

This function dereference raw pointers (password and wallet_out). Even though the function checks if the pointers are null. Mind not to put random values in or you may see unexpected behaviors

errors

The function may fail if:

  • the wallet_out is null pointer