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 into the KM state bridge, 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

Functionsยง

copy_user_key_to_state ๐Ÿ”’
Sets the decrypted user key into the KM state bridge, so that it survives re-creation of the SDK
get_user_key_from_state ๐Ÿ”’