You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/biometric-plugin.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -178,7 +178,7 @@ At the time of verification, the verifier can request the biometric check creden
178
178
The biometric ID should not contain the user's actual biometric information. When enrolling a holder in the biometric service, it might be useful to issue an enrolment credential containing the biometric template, the generated biometric ID and any other needed information to identify a returning user. This credential can be verified to get the user's information before checking their biometric. By storing this information with the holder, it avoids the biometric service having to store that PII outside of the control of the holder. The holder should only share a biometric enrollment credential with the biometric service that issued it.
179
179
180
180
181
-
## TrustX Biometric Plugin
181
+
## TrustX biometric plugin
182
182
183
183
The TrustX biometric plugin uses the TrustX API to perform biometric verification and implements the IDVProvider interface.
Copy file name to clipboardExpand all lines: docs/cloud-wallet.md
+25-25Lines changed: 25 additions & 25 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,27 +1,27 @@
1
-
# Cloud Wallet Documentation
1
+
# Cloud Wallet documentation
2
2
3
-
The Truvera Cloud Wallet provides SaaS hosted secure storage of a user's identity data. The contents of an individual cloud wallet are accessed through a wallet application. The Cloud Wallet APIs support synchronization between the cloud storage and local storage of a wallet application. In addition to standard mobile or web wallet applications, the Cloud Wallet also allows credentials to be used in existing web sites through embedded widgets. The Cloud Wallet is especially useful for non-human identity use cases, such as organizational identity wallets and wallets for AI agents.
3
+
The Truvera Cloud Wallet provides SaaS hosted secure storage of a user's identity data. The contents of an individual cloud wallet are accessed through a wallet application. The Truvera Cloud Wallet APIs support synchronization between the cloud storage and local storage of a wallet application. In addition to standard mobile or web wallet applications, the Cloud Wallet also allows credentials to be used in existing web sites through embedded widgets. The Cloud Wallet is especially useful for non-human identity use cases, such as organizational identity wallets and wallets for AI agents.
4
4
5
5
The implementation is in:
6
6
`@docknetwork/wallet-sdk-core/src/cloud-wallet`
7
7
8
-
## Feature Overview
8
+
## Feature overview
9
9
10
-
The Truvera Cloud Wallet service hosts individual wallets for each user. The user's wallet stores encrypted documents that usually contain verifiable credentials. The service includes an [Encrypted Data Vault (EDV)](https://digitalbazaar.github.io/encrypted-data-vaults/) to securely store, sync, and manage documents. The Truvera Platform includes an EDV instance that can be used as part of a Truvera solution, but you can also deploy an EDV instance within your infrastructure if you prefer to host the encrypted user data. In most solutions, documents should be encrypted by the wallet application before being stored in the cloud wallet so that it cannot be read by the organization hosting the EDV.
10
+
The Truvera Cloud Wallet service hosts individual wallets for each user. The user's wallet stores encrypted documents that usually contain verifiable credentials. The service includes an [Encrypted Data Vault (EDV)](https://digitalbazaar.github.io/encrypted-data-vaults/) to securely store, sync, and manage documents. The Truvera Platform includes an EDV instance that can be used as part of a Truvera solution, but you can also deploy an EDV instance within your infrastructure if you prefer to host the encrypted user data. In most solutions, documents should be encrypted by the wallet application before being stored in a cloud wallet so that it cannot be read by the organization hosting the EDV.
11
11
12
-
Once initialized, the Cloud Wallet automatically synchronizes documents between the EDV and the wallet application, allowing you to add, update, and remove credentials without dealing with the synchronization logic.
12
+
Once initialized, the Cloud Wallet service automatically synchronizes documents between the EDV and the wallet application, allowing you to add, update, and remove credentials without dealing with the synchronization logic.
13
13
14
14
Each holder's individual cloud wallet is accessed using a key in the holder's possession. This key can be stored in the local storage of a wallet application, or derived from a biometric of the holder's. A recovery mnemonic can be used to recover a lost master key.
15
15
16
-
## Usage Example
16
+
## Usage example
17
17
18
18
The example below demonstrates how to initialize and use the Cloud Wallet for managing documents.
19
19
20
-
### Step 1: Initialize the Data Store
20
+
### Step 1: Initialize the data store
21
21
22
22
First, you need to create local data storage to connect to the credential wallet.
Next, we generate a key and mnemonic for interacting with the cloud wallet. Use the same Cloud Wallet key across multiple devices to access the same documents. These keys are used to encrypt, decrypt, and locate documents in the EDV.
49
+
Next, we generate a key and mnemonic for interacting with a cloud wallet. Use the same cloud wallet key across multiple devices to access the same documents. These keys are used to encrypt, decrypt, and locate documents in the EDV.
The `pullDocuments` function synchronizes the EDV and the wallet by comparing documents and updating the data store accordingly. Documents can be credentials or messages.
87
87
88
-
### Step 4: Create a New Wallet
88
+
### Step 4: Create a new wallet
89
89
90
90
Now, create a credential wallet inside of the data storage. This will allow you to add, update, and remove documents.
You can add a document to the wallet using the following code:
103
103
@@ -111,15 +111,15 @@ const document = {
111
111
awaitwallet.addDocument(document);
112
112
```
113
113
114
-
### Issuing Credentials to Cloud Wallet
114
+
### Issuing credentials to a cloud wallet
115
115
116
116
You can issue credentials directly to a cloud wallet using the Truvera Workspace or the Truvera API. The credential will be automatically distributed to the holder's cloud wallet through the DIDComm protocol, eliminating the need for direct API calls or manual credential handling.
117
117
118
-
#### Important Requirement
118
+
#### Important requirement
119
119
120
120
For the DIDComm automatic distribution to work properly, the **subject ID of the credential must be set to the holder's DID** when issuing the credential. This enables the system to route the credential to the correct wallet.
121
121
122
-
#### Receiving Credentials in Cloud Wallet
122
+
#### Receiving credentials in a cloud wallet
123
123
124
124
After a credential has been issued to a holder's DID, the cloud wallet only needs to fetch and process DIDComm messages to receive it:
The Cloud Wallet supports multiple authentication methods to unlock the same wallet, providing both security and convenience.
187
+
The Truvera Cloud Wallet supports multiple authentication methods to unlock the same wallet, providing both security and convenience.
188
188
189
-
### Available Authentication Methods
189
+
### Available authentication methods
190
190
191
191
1.**Mnemonic-based authentication**: The traditional recovery phrase approach
192
192
2.**Biometric authentication**: Using fingerprints, facial recognition, or other biometric data
193
193
3.**Future extensions**: Can be extended to support passkeys and other authentication methods
194
194
195
-
### How Multi-Key Authentication Works
195
+
### How multi-key authentication works
196
196
197
197
The Cloud Wallet uses a key mapping system that allows a secondary key (e.g. derived from biometrics) to unlock the same master key that was originally derived from a mnemonic phrase.
198
198
@@ -204,7 +204,7 @@ We will provide an example of how this two-vault architecture can be used to all
204
204
205
205
Note that the biometric sample used to authenticate to a cloud wallet could also be provided to a [biometric service](https://github.com/docknetwork/wallet-sdk/blob/master/docs/biometric-plugin.md) in order to issue a new biometric check credential as described in [biometric bound credentials](https://docs.truvera.io/solutions/biometric-bound-credentials).
206
206
207
-
#### Step 1: Enroll User with Biometric Data
207
+
#### Step 1: Enroll user with biometric data
208
208
209
209
To set up biometric authentication, enroll the user with their biometric data and identifier:
210
210
@@ -233,7 +233,7 @@ The enrollment process:
233
233
234
234
In this example, the user email address is provided as a unique identifier to look up the biometric template for highly secure one-to-one biometric matching. The identifier is not shared with issuers or verifiers and any identifier may be used so long as it is convenient for the holder to remember. Phone numbers are another common choice. Biometric solutions that support one-to-n matching might be sufficient for many scenarios and would allow the user to avoid having to remember and provide an identifier. If you use an identifier, remember to verify that the user is actually in control of the identifier or an attacker could register the identifier and prevent the legitimate holder from accessing the service.
235
235
236
-
#### Step 2: Authenticate with Biometrics
236
+
#### Step 2: Authenticate with biometrics
237
237
238
238
Next, when the user wants to access their wallet, they can authenticate with their biometric data:
239
239
@@ -271,7 +271,7 @@ The authentication process:
271
271
4. Decrypts the master key
272
272
5. Uses the master key to access the CloudWalletVault
273
273
274
-
### Wallet Recovery
274
+
### Wallet recovery
275
275
276
276
This architecture allows solution developers to design the recovery mechanism that makes sense for your use case.
277
277
@@ -282,7 +282,7 @@ Alternatively, one or more recovery keys can be stored in the KeyMappingVault. A
282
282
If a biometrically derived key can no longer be generated, then a recovery key should be used to enroll a new biometric. Any biometric-bound credentials will need to be reissued with the new biometric.
283
283
284
284
285
-
## Organizational Wallets
285
+
## Organizational wallets
286
286
287
287
Verifiable credentials can help automate many processes that include organization identity, such as credit worthiness or Know-Your-Business (KYB) checks. Organization information that originates with a third party and then must be privately shared with a relying party is well suited to verifiable credentials.
Copy file name to clipboardExpand all lines: docs/getting-started.md
+6-6Lines changed: 6 additions & 6 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,4 +1,4 @@
1
-
# Getting Started with the Truvera Wallet SDK
1
+
# Getting started with the Truvera Wallet SDK
2
2
3
3
This guide walks you through the process of setting up the Truvera Wallet SDK, creating a wallet, managing decentralized identifiers (DIDs), adding credentials, and verifying them.
The `@docknetwork/wallet-sdk-core` provides the core wallet functionality, while `@docknetwork/wallet-sdk-data-store-typeorm` handles data persistence using a local SQLite database.
14
14
15
-
## Usage Example
15
+
## Usage example
16
16
17
-
### 1. Initialize the Data Store
17
+
### 1. Initialize the data store
18
18
19
19
Before creating a wallet, you need to set up a data store to manage the persistence of wallet data such as DIDs and credentials. Here’s how to create a local data store:
20
20
@@ -32,7 +32,7 @@ This code initializes an SQLite database to store wallet data locally on the dev
32
32
33
33
If you want to store data in the Truvera Cloud Wallet, please refer to the [Cloud Wallet Documentation](cloud-wallet.md) for detailed instructions and configuration options.
34
34
35
-
### 2. Create a New Wallet
35
+
### 2. Create a new wallet
36
36
37
37
Once the data store is set up, you can create a wallet. The wallet will act as a container for managing your documents, DIDs, and credentials.
38
38
@@ -62,7 +62,7 @@ console.log(defaultDID);
62
62
// Example output: did:key:z6MkrcDhePAr5J44Htf6CLSQpZFUGGec4kPVVmERaY9Seijw
63
63
```
64
64
65
-
### 4. Add a Credential to the Wallet
65
+
### 4. Add a credential to the wallet
66
66
67
67
Once you have a wallet and a DID, you can start managing credentials. In this example, you will import a credential from a URL into the wallet.
68
68
@@ -87,7 +87,7 @@ console.log(credentials);
87
87
88
88
In this example, the credential is fetched from a specified URI and imported into the wallet. The `getAuthCode` function is used to handle any authentication, such as providing a password if required.
89
89
90
-
### 5. Verify a Credential
90
+
### 5. Verify a credential
91
91
92
92
The Truvera Wallet SDK provides built-in functionality for verifying credentials. This is especially useful when interacting with third parties who need to verify your credentials. The verification controller manages this process. Below is an example of how to start a verification, select which credentials to reveal, create a presentation, and submit it for verification.
Copy file name to clipboardExpand all lines: examples/nodejs-example/readme.md
+10-7Lines changed: 10 additions & 7 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,4 +1,4 @@
1
-
# Wallet SDK NodeJS Example
1
+
# Wallet SDK NodeJS examples
2
2
This example illustrates how to install the Truvera Wallet SDK in a Node.js application.
3
3
4
4
## Installation steps
@@ -7,12 +7,12 @@ This example illustrates how to install the Truvera Wallet SDK in a Node.js appl
7
7
npm install
8
8
```
9
9
10
-
## OID4VC Example
10
+
## OID4VC example
11
11
12
12
In this example, we will show how to use OID4VC to import credentials and then list them using the Wallet SDK.
13
13
You can read more about OID4VC in [our docs](https://docs.dock.io/developer-documentation/key-standards/interoperability-with-openid/openid-issuance-and-verification-integration-guide)
14
14
15
-
### Step 1: Generate an OpenID Issuer and Credential Offer
15
+
### Step 1: Generate an OpenID issuer and credential offer
16
16
17
17
To get started, define your environment variables to access the Truvera API:
18
18
@@ -39,7 +39,7 @@ OID4VC offer undefined was created.
39
39
Copy your OID4VC URL: openid-credential-offer://?credential_offer=%7B%......
40
40
```
41
41
42
-
### Step 2: Import the Credential into the Wallet
42
+
### Step 2: Import the credential into the wallet
43
43
44
44
Now that you have an OID4VC URL, you can import it into the wallet using the Wallet SDK.
45
45
@@ -59,12 +59,15 @@ npm run oid4vc-example <OID4VC_URL>
59
59
60
60
The example above creates an instance of the Wallet SDK, imports the credential into the wallet, and then logs the list of credentials available in the user database. Note that the imported credential is stored locally on the device, and in this Node.js example, it uses SQLite for storage.
61
61
62
-
## Verification Example
62
+
## Verification example
63
63
64
-
In this example, we will show how to use the SDK to verify a credential.
64
+
We provide two examples for credential verification using the SDK.
0 commit comments