Cloud Wallet
The Cloud Wallet feature allows secure storage and synchronization of wallet documents via an Encrypted Data Vault (EDV).
File Path: @docknetwork/wallet-sdk-core/src/cloud-wallet
Feature Overview
The Cloud Wallet integrates with an Encrypted Data Vault (EDV) to securely store, sync, and manage documents. Once initialized, it automatically synchronizes documents between the EDV and the wallet, allowing you to add, update, remove, without dealing with the synchronization logic.
Usage Example
The example below demonstrates how to initialize and use the Cloud Wallet for managing documents.
Step 1: Initialize the Data Store
For Mobile and Node.js
For Browser
Step 2: Generate Wallet Keys
Use the same Cloud Wallet keys across multiple devices to access the same documents. These keys are used to encrypt, decrypt, and locate documents in the EDV.
The key generation returns an object with agreementKey
, verificationKey
, and hmacKey
. You will use these keys to initialize the Cloud Wallet.
Note: Encryption keys can be derived from biometric data through a third-party service, offering enhanced security by linking the keys to a user's unique biometric profile
Step 3: Initialize the Cloud Wallet
After setting up the data store and generating keys, initialize the Cloud Wallet. This ensures continuous synchronization between the EDV and the wallet.
The pullDocuments
function synchronizes the EDV and the wallet by comparing documents and updating the data store accordingly.
Step 4: Create a New Wallet
Now, create a wallet to manage your documents. This will allow you to add, update, and remove documents.
Step 5: Add a Document to the Wallet
You can add a document to the wallet using the following code:
Full Example
Last updated