Function libindy_sys::indy_import_wallet[][src]

pub unsafe extern "C" fn indy_import_wallet(
    command_handle: indy_handle_t,
    config: *const c_char,
    credentials: *const c_char,
    import_config_json: *const c_char,
    cb: indy_empty_cb
) -> indy_error_t

Creates a new secure wallet and then imports its content according to fields provided in import_config This can be seen as an indy_create_wallet call with additional content import

#Params config: Wallet configuration json. { "id": string, Identifier of the wallet. Configured storage uses this identifier to lookup exact wallet data placement. "storage_type": optional, Type of the wallet storage. Defaults to 'default'. 'Default' storage type allows to store wallet data in the local file. Custom storage types can be registered with indy_register_wallet_storage call. "storage_config": optional, Storage configuration json. Storage type defines set of supported keys. Can be optional if storage supports default configuration. For 'default' storage type configuration is: { "path": optional, Path to the directory with wallet files. Defaults to $HOME/.indy_client/wallets. Wallet will be stored in the file {path}/{id}/sqlite.db } } credentials: Wallet credentials json { "key": string, Key or passphrase used for wallet key derivation. Look to key_derivation_method param for information about supported key derivation methods. "storage_credentials": optional Credentials for wallet storage. Storage type defines set of supported keys. Can be optional if storage supports default configuration. For 'default' storage type should be empty. "key_derivation_method": optional Algorithm to use for wallet key derivation: ARGON2I_MOD - derive secured wallet master key (used by default) ARGON2I_INT - derive secured wallet master key (less secured but faster) RAW - raw wallet key master provided (skip derivation). RAW keys can be generated with indy_generate_wallet_key call } import_config: Import settings json. { "path": , path of the file that contains exported wallet content "key": , key used for export of the wallet }

#Returns Error code

#Errors Common* Wallet*