Struct indy::crypto::Key

source ·
pub struct Key {}

Implementations

Creates key pair in wallet

Arguments
  • wallet_handle - wallet handle (created by Wallet::open)
  • my_key_json - Optional key information as json. If none then defaults are used.
Example

my_key_json { “seed”: string, (optional) Seed that allows deterministic key creation (if not set random one will be created). Can be UTF-8, base64 or hex string. “crypto_type”: string, // Optional (if not set then ed25519 curve is used); Currently only ‘ed25519’ value is supported for this field. }

Returns

verkey of generated key pair, also used as key identifier

Creates key pair in wallet

Arguments
  • wallet_handle - wallet handle (created by Wallet::open)
  • my_key_json - key information as json
  • timeout - the maximum time this function waits for a response
Example

my_key_json { “seed”: string, (optional) Seed that allows deterministic key creation (if not set random one will be created). Can be UTF-8, base64 or hex string. “crypto_type”: string, // Optional (if not set then ed25519 curve is used); Currently only ‘ed25519’ value is supported for this field. }

Returns

verkey of generated key pair, also used as key identifier

Creates key pair in wallet

Arguments
  • wallet_handle - wallet handle (created by Wallet::open)
  • my_key_json - Optional key information as json. If none then defaults are used.
  • closure - The closure that is called when finished
Example

my_key_json { “seed”: string, (optional) Seed that allows deterministic key creation (if not set random one will be created). Can be UTF-8, base64 or hex string. “crypto_type”: string, // Optional (if not set then ed25519 curve is used); Currently only ‘ed25519’ value is supported for this field. }

Returns

errorcode from calling ffi function. The closure receives the return result

Saves/replaces the metadata for the verkey in the wallet

Arguments
  • wallet_handle - wallet handle (created by Wallet::open)
  • verkey - the public key or key id where to store the metadata
  • metadata - the metadata that will be stored with the key, can be empty string

Saves/replaces the metadata for the verkey in the wallet

Arguments
  • wallet_handle - wallet handle (created by Wallet::open)
  • verkey - the public key or key id where to store the metadata
  • metadata - the metadata that will be stored with the key, can be empty string
  • timeout - the maximum time this function waits for a response

Saves/replaces the metadata for the verkey in the wallet

Arguments
  • wallet_handle - wallet handle (created by Wallet::open)
  • verkey - the public key or key id where to store the metadata
  • metadata - the metadata that will be stored with the key, can be empty string
  • closure - The closure that is called when finished

Retrieves the metadata for the verkey in the wallet

Argument
  • wallet_handle - wallet handle (created by Wallet::open)
  • verkey - the public key or key id to retrieve metadata
Returns

metadata currently stored with the key; Can be empty if no metadata was saved for this key

Retrieves the metadata for the verkey in the wallet

Argument
  • wallet_handle - wallet handle (created by Wallet::open)
  • verkey - the public key or key id to retrieve metadata
  • timeout - the maximum time this function waits for a response
Returns

metadata currently stored with the key; Can be empty if no metadata was saved for this key

Retrieves the metadata for the verkey in the wallet

Argument
  • wallet_handle - wallet handle (created by Wallet::open)
  • verkey - the public key or key id to retrieve metadata
  • closure - The closure that is called when finished
Returns

errorcode from calling ffi function

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more
Immutably borrows from an owned value. Read more
Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

The type returned in the event of a conversion error.
Performs the conversion.
The type returned in the event of a conversion error.
Performs the conversion.