Skip to main content

Module wasm_unlock_state

Module wasm_unlock_state 

Source
Expand description

The WASM sdk currently does not hold persistent SDK instances and instead re-createds SDK instances frequently. The unlock-state is lost, since the user-key is only held in the SDK. This file implements setting the user-key to WASM client-managed ephemeral state, so that SDK-re-creations have access to the user-key.

This is not required on UNIFFI since there SDK instances live as long as the client is unlocked. Eventually, the WASM sdk will also hold SDK instances like described above.

Structsยง

UnableToGetError ๐Ÿ”’
UnableToSetError ๐Ÿ”’
Error indicating inability to set the user key into state

Constantsยง

USER_KEY_REPOSITORY_KEY ๐Ÿ”’

Functionsยง

copy_user_key_to_client_managed_state ๐Ÿ”’
Sets the decrypted user key into the client-managed state, so that it survives re-creation of the SDK
get_user_key_from_client_managed_state ๐Ÿ”’