Creates a new instance of the EncryptedMaps client.
The client instance for interacting with the EncryptedMaps canister.
The cached verification key for validating encrypted VetKeys.
Decrypts a value for a specific map and key.
The principal of the map owner
The name/identifier of the map
The key to decrypt for
The value to decrypt
Promise resolving to the decrypted value
Encrypts a value for a specific map and key.
The principal of the map owner
The name/identifier of the map
The key to encrypt for
The value to encrypt
Promise resolving to the encrypted value
Retrieves a list of maps that were shared with the user and the user still has access to.
Promise resolving to an array of [Principal, Uint8Array]
pairs representing accessible map identifiers.
Retrieves all accessible maps with their decrypted values.
Promise resolving to an array of map data
Retrieves all accessible values across all maps the user has access to.
Promise resolving to an array of map data with decrypted values
Derives a key material for a specific map.
The principal of the map owner
The name/identifier of the map
Promise resolving to the derived key material
Gets or fetches the derived key material for a map.
The principal of the map owner
The name/identifier of the map
Promise resolving to the derived key material
Retrieves a list of non-empty maps owned by the caller.
Promise resolving to an array of map names
Gets all users that have access to a map and their access rights.
The principal of the map owner
The name/identifier of the map
Promise resolving to an array of user-access rights pairs
Checks a user's access rights.
The principal of the map owner
The name/identifier of the map
The principal of the user to check rights for
Promise resolving to the user's access rights if they exist
Retrieves and decrypts a stored value from a map.
The principal of the map owner
The name/identifier of the map
The key to retrieve
Promise resolving to the decrypted value
Retrieves all values from a specific map.
The principal of the map owner
The name/identifier of the map
Promise resolving to an array of key-value pairs
Retrieves the public verification key for validating encrypted VetKeys.
The vetkeys obtained via getVetkey
are verified using this key,
and, therefore, this method is not needed for using getVetkey
.
Promise resolving to the verification key bytes
Removes a value from a map.
The principal of the map owner
The name/identifier of the map
The key to remove
Promise resolving to the removed value if it existed
Revokes a user's access.
The principal of the map owner
The name/identifier of the map
The principal of the user to remove
Promise resolving to the previous access rights if they existed
Grants or modifies access rights for a user.
The principal of the map owner
The name/identifier of the map
The principal of the user to grant/modify rights for
The access rights to grant
Promise resolving to the previous access rights if they existed
Stores an encrypted value in a map.
The principal of the map owner
The name/identifier of the map
The key to store
The value to store
Promise resolving to the previous value if it existed
The EncryptedMaps frontend library facilitates interaction with an EncryptedMaps-enabled canister on the Internet Computer (ICP). It allows web applications to securely store, retrieve, and manage encrypted key-value pairs within named maps while handling user access control and key sharing.
Core Features
Security Considerations
Example