Skip to content

Commit b89386b

Browse files
authored
Merge pull request #431 from docknetwork/more-docs-cleanup
Standardized title casing in docs Fixed copy-paste error in nodejs verification example
2 parents 05f9443 + 91a1861 commit b89386b

8 files changed

Lines changed: 49 additions & 46 deletions

File tree

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ npm install @docknetwork/wallet-sdk-react-native
1717
**There are some scripts and additional dependencies required.**
1818
Please check our [examples](https://github.com/docknetwork/wallet-sdk/tree/master/examples) folder for detailed steps.
1919

20-
## React Native Example
20+
## React Native example
2121
The following example will create a wallet and allow the user to add credentials to it, displaying the count of documents added to the wallet.
2222
Notice that all documents are accessible through the `documents` object.
2323

@@ -72,7 +72,7 @@ The [Truvera Documentation Portal](https://docs.truvera.io) aggregates documenta
7272
For more details you should read [the getting started guide](https://github.com/docknetwork/wallet-sdk/blob/master/docs/getting-started.md).
7373

7474

75-
### Key Features
75+
### Key features
7676
- [Biometric Plugin](https://github.com/docknetwork/wallet-sdk/blob/master/docs/biometric-plugin.md)
7777
- [Ecosystem Tools](https://github.com/docknetwork/wallet-sdk/blob/master/docs/ecosystem-tools.md)
7878
- [Cloud Wallet](https://github.com/docknetwork/wallet-sdk/blob/master/docs/cloud-wallet.md)

docs/biometric-plugin.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -178,7 +178,7 @@ At the time of verification, the verifier can request the biometric check creden
178178
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.
179179

180180

181-
## TrustX Biometric Plugin
181+
## TrustX biometric plugin
182182

183183
The TrustX biometric plugin uses the TrustX API to perform biometric verification and implements the IDVProvider interface.
184184

docs/cloud-wallet.md

Lines changed: 25 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -1,27 +1,27 @@
1-
# Cloud Wallet Documentation
1+
# Cloud Wallet documentation
22

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.
44

55
The implementation is in:
66
`@docknetwork/wallet-sdk-core/src/cloud-wallet`
77

8-
## Feature Overview
8+
## Feature overview
99

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.
1111

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.
1313

1414
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.
1515

16-
## Usage Example
16+
## Usage example
1717

1818
The example below demonstrates how to initialize and use the Cloud Wallet for managing documents.
1919

20-
### Step 1: Initialize the Data Store
20+
### Step 1: Initialize the data store
2121

2222
First, you need to create local data storage to connect to the credential wallet.
2323

24-
#### For Mobile and Node.js
24+
#### For mobile and Node.js
2525

2626
```ts
2727
import {createDataStore} from '@docknetwork/wallet-sdk-data-store-typeorm/lib';
@@ -33,7 +33,7 @@ const dataStore = await createDataStore({
3333
});
3434
```
3535

36-
#### For Browser
36+
#### For browser
3737

3838
```ts
3939
import {createDataStore} from '@docknetwork/wallet-sdk-data-store-web/lib';
@@ -44,9 +44,9 @@ const dataStore = await createDataStore({
4444
});
4545
```
4646

47-
### Step 2: Generate Wallet Key and Mnemonic
47+
### Step 2: Generate wallet key and mnemonic
4848

49-
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.
5050

5151
```ts
5252
import {generateCloudWalletMasterKey} from '@docknetwork/wallet-sdk-core/lib/cloud-wallet';
@@ -85,7 +85,7 @@ await pullDocuments();
8585

8686
The `pullDocuments` function synchronizes the EDV and the wallet by comparing documents and updating the data store accordingly. Documents can be credentials or messages.
8787

88-
### Step 4: Create a New Wallet
88+
### Step 4: Create a new wallet
8989

9090
Now, create a credential wallet inside of the data storage. This will allow you to add, update, and remove documents.
9191

@@ -97,7 +97,7 @@ const wallet = await createWallet({
9797
});
9898
```
9999

100-
### Step 5: Add a Document to the Wallet
100+
### Step 5: Add a document to the wallet
101101

102102
You can add a document to the wallet using the following code:
103103

@@ -111,15 +111,15 @@ const document = {
111111
await wallet.addDocument(document);
112112
```
113113

114-
### Issuing Credentials to Cloud Wallet
114+
### Issuing credentials to a cloud wallet
115115

116116
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.
117117

118-
#### Important Requirement
118+
#### Important requirement
119119

120120
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.
121121

122-
#### Receiving Credentials in Cloud Wallet
122+
#### Receiving credentials in a cloud wallet
123123

124124
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:
125125

@@ -139,7 +139,7 @@ await messageProvider.fetchMessages();
139139
await messageProvider.processDIDCommMessages();
140140
```
141141

142-
### Full Example
142+
### Full example
143143

144144
```ts
145145
import {createDataStore} from '@docknetwork/wallet-sdk-data-store-web/lib';
@@ -182,17 +182,17 @@ example();
182182

183183
```
184184

185-
## Multi-Key Authentication
185+
## Multi-key authentication
186186

187-
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.
188188

189-
### Available Authentication Methods
189+
### Available authentication methods
190190

191191
1. **Mnemonic-based authentication**: The traditional recovery phrase approach
192192
2. **Biometric authentication**: Using fingerprints, facial recognition, or other biometric data
193193
3. **Future extensions**: Can be extended to support passkeys and other authentication methods
194194

195-
### How Multi-Key Authentication Works
195+
### How multi-key authentication works
196196

197197
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.
198198

@@ -204,7 +204,7 @@ We will provide an example of how this two-vault architecture can be used to all
204204

205205
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).
206206

207-
#### Step 1: Enroll User with Biometric Data
207+
#### Step 1: Enroll user with biometric data
208208

209209
To set up biometric authentication, enroll the user with their biometric data and identifier:
210210

@@ -233,7 +233,7 @@ The enrollment process:
233233

234234
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.
235235

236-
#### Step 2: Authenticate with Biometrics
236+
#### Step 2: Authenticate with biometrics
237237

238238
Next, when the user wants to access their wallet, they can authenticate with their biometric data:
239239

@@ -271,7 +271,7 @@ The authentication process:
271271
4. Decrypts the master key
272272
5. Uses the master key to access the CloudWalletVault
273273

274-
### Wallet Recovery
274+
### Wallet recovery
275275

276276
This architecture allows solution developers to design the recovery mechanism that makes sense for your use case.
277277

@@ -282,7 +282,7 @@ Alternatively, one or more recovery keys can be stored in the KeyMappingVault. A
282282
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.
283283

284284

285-
## Organizational Wallets
285+
## Organizational wallets
286286

287287
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.
288288

docs/ecosystem-tools.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ The functions of an ecosystem are further described in [the Ecosystem Tools sect
77
The Truvera Wallet SDK implementation of ecosystem tools is in:
88
[packages/core/src/ecosystem-tools.ts](https://github.com/docknetwork/wallet-sdk/blob/5dfbcb197b848802478d2f7a697286a8c3c28823/packages/core/src/ecosystem-tools.ts#L4)
99

10-
## Usage Example
10+
## Usage example
1111

1212
Below is an example demonstrating how to use getEcosystems to retrieve ecosystem information based on an issuer's DID.
1313

@@ -30,7 +30,7 @@ async function fetchEcosystemDetails() {
3030
fetchEcosystemDetails();
3131
```
3232

33-
## Expected Output
33+
## Expected output
3434

3535
When you run the above code, you should expect output similar to this:
3636

@@ -46,7 +46,7 @@ When you run the above code, you should expect output similar to this:
4646

4747
This JSON output contains the details of the ecosystems associated with the given issuerDID.
4848

49-
## Integration Tests
49+
## Integration tests
5050

5151
For more examples and usage, please refer to the integration test at:
5252
https://github.com/docknetwork/wallet-sdk/blob/master/integration-tests/ecosystem-tools.test.ts

docs/getting-started.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# Getting Started with the Truvera Wallet SDK
1+
# Getting started with the Truvera Wallet SDK
22

33
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.
44

@@ -12,9 +12,9 @@ npm install @docknetwork/wallet-sdk-core @docknetwork/wallet-sdk-data-store-type
1212

1313
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.
1414

15-
## Usage Example
15+
## Usage example
1616

17-
### 1. Initialize the Data Store
17+
### 1. Initialize the data store
1818

1919
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:
2020

@@ -32,7 +32,7 @@ This code initializes an SQLite database to store wallet data locally on the dev
3232

3333
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.
3434

35-
### 2. Create a New Wallet
35+
### 2. Create a new wallet
3636

3737
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.
3838

@@ -62,7 +62,7 @@ console.log(defaultDID);
6262
// Example output: did:key:z6MkrcDhePAr5J44Htf6CLSQpZFUGGec4kPVVmERaY9Seijw
6363
```
6464

65-
### 4. Add a Credential to the Wallet
65+
### 4. Add a credential to the wallet
6666

6767
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.
6868

@@ -87,7 +87,7 @@ console.log(credentials);
8787

8888
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.
8989

90-
### 5. Verify a Credential
90+
### 5. Verify a credential
9191

9292
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.
9393

docs/index.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# Truvera Wallet SDK Documentation
1+
# Truvera Wallet SDK documentation
22

33
- [@docknetwork/wallet-sdk-core](./api/core.md)
44
- [@docknetwork/wallet-sdk-wasm](./api/wasm.md)

docs/other-topics.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# Other Topics
1+
# Other topics
22

33
## Using WebAssembly
44

examples/nodejs-example/readme.md

Lines changed: 10 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# Wallet SDK NodeJS Example
1+
# Wallet SDK NodeJS examples
22
This example illustrates how to install the Truvera Wallet SDK in a Node.js application.
33

44
## Installation steps
@@ -7,12 +7,12 @@ This example illustrates how to install the Truvera Wallet SDK in a Node.js appl
77
npm install
88
```
99

10-
## OID4VC Example
10+
## OID4VC example
1111

1212
In this example, we will show how to use OID4VC to import credentials and then list them using the Wallet SDK.
1313
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)
1414

15-
### Step 1: Generate an OpenID Issuer and Credential Offer
15+
### Step 1: Generate an OpenID issuer and credential offer
1616

1717
To get started, define your environment variables to access the Truvera API:
1818

@@ -39,7 +39,7 @@ OID4VC offer undefined was created.
3939
Copy your OID4VC URL: openid-credential-offer://?credential_offer=%7B%......
4040
```
4141

42-
### Step 2: Import the Credential into the Wallet
42+
### Step 2: Import the credential into the wallet
4343

4444
Now that you have an OID4VC URL, you can import it into the wallet using the Wallet SDK.
4545

@@ -59,12 +59,15 @@ npm run oid4vc-example <OID4VC_URL>
5959

6060
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.
6161

62-
## Verification Example
62+
## Verification example
6363

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.
6565

6666
``` bash
67-
npm run oid4vc-example
67+
npm run verification-submission-example
68+
```
6869

70+
``` bash
71+
npm run verification-evaluation-example
6972
```
7073

0 commit comments

Comments
 (0)