Function libindy_sys::indy_key_for_did[][src]

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

Returns ver key (key id) for the given DID.

"indy_key_for_did" call follow the idea that we resolve information about their DID from the ledger with cache in the local wallet. The "indy_open_wallet" call has freshness parameter that is used for checking the freshness of cached pool value.

Note if you don't want to resolve their DID info from the ledger you can use "indy_key_for_local_did" call instead that will look only to the local wallet and skip freshness checking.

Note that "indy_create_and_store_my_did" makes similar wallet record as "indy_create_key". As result we can use returned ver key in all generic crypto and messaging functions.

#Params command_handle: Command handle to map callback to caller context. wallet_handle: Wallet handle (created by open_wallet). did - The DID to resolve key. 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.
  • key - The DIDs ver key (key id).

#Errors Common* Wallet* Crypto*