Function libindy_sys::indy_create_key[][src]

pub unsafe extern "C" fn indy_create_key(
    command_handle: indy_handle_t,
    wallet_handle: indy_handle_t,
    key_json: *const c_char,
    cb: indy_str_cb
) -> indy_error_t

Creates keys pair and stores in the wallet.

#Params command_handle: Command handle to map callback to caller context. wallet_handle: Wallet handle (created by open_wallet). key_json: Key information as json. Example: { "seed": string, // Optional (if not set random one will be used); Seed information that allows deterministic key creation. "crypto_type": string, // Optional (if not set then ed25519 curve is used); Currently only 'ed25519' value is supported for this field. } cb: Callback that takes command result as parameter.

#Returns Error Code cb:

  • xcommand_handle: command handle to map callback to caller context.
  • err: Error code.
  • verkey: Ver key of generated key pair, also used as key identifier

#Errors Common* Wallet* Crypto*