Skip to content

Commit 2b47b7b

Browse files
Documentation cleanup (#426)
* Cleaned up the main README * Moved note on WebAssembly into the docs folder * Cleaned up the note about WebAssembly * yarn to npm and other cleanup * Clean up examples README * Removing yarn.lock so we consistently use npm * Clarifying the json-rpc per maycon's feedback --------- Co-authored-by: Maycon Mello <maycon.mellos@gmail.com>
1 parent 6bf395c commit 2b47b7b

5 files changed

Lines changed: 37 additions & 45 deletions

File tree

README.md

Lines changed: 16 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -1,28 +1,25 @@
11
# Truvera Wallet SDK
22

3-
The [Wallet SDK](https://github.com/docknetwork/wallet-sdk) enables you to build a Verifiable Credentials wallet inside your app and allows your users to receive, store, and manage their DOCK tokens too. This was built for mobile applications with added support for Polkadot-JS.
3+
The [Wallet SDK](https://github.com/docknetwork/wallet-sdk) enables you to build an identity wallet inside your app and allows your users to receive, store, and manage verifiable credentials.
44

55
To use the wallet-sdk, all you need to do is wrap your app in a `WalletSDKProvider` and start building your wallet.
66

7-
Using [polkadot-js](https://polkadot.js.org/) libraries in React Native is a challenge, due to the lack of WebAssembly support.
8-
The Truvera Wallet SDK handles all the Polkadot Web Assembly in a WebView, sending messages to the React Native thread through a JSON RPC layer.
9-
10-
Truvera Mobile SDK supports:
7+
The Truvera Mobile SDK supports:
118
- Devices that have Android 8.1 or higher and iOS 11 or higher.
129
- Minimum supported version of Node.js is 20.2.0
1310

1411
## Installation
1512
```js
16-
yarn add @docknetwork/wallet-sdk-core
17-
yarn add @docknetwork/wallet-sdk-react-native
13+
npm install @docknetwork/wallet-sdk-core
14+
npm install @docknetwork/wallet-sdk-react-native
1815

1916
```
2017
**There are some scripts and additional dependencies required.**
21-
Please check our [examples](/examples) folder for detailed steps.
18+
Please check our [examples](https://github.com/docknetwork/wallet-sdk/tree/master/examples) folder for detailed steps.
2219

2320
## React Native Example
24-
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.
25-
Notice that the all documents are accessible through the `documents` object.
21+
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.
22+
Notice that all documents are accessible through the `documents` object.
2623

2724
```js
2825
import {Box, Button, NativeBaseProvider, Text} from 'native-base';
@@ -67,20 +64,20 @@ export default App;
6764

6865
```
6966

70-
## Running on other platforms
71-
72-
Check the following repository for detailed examples for running the Truvera Wallet SDK on NodeJS, Web, and Flutter.
73-
74-
[See the examples](https://github.com/docknetwork/wallet-sdk/tree/master/examples)
7567

68+
## Documentation
7669

77-
## Docs
70+
The [Truvera Documentation Portal](https://docs.truvera.io) aggregates documentation for all components of the Truvera Platform. Documentation specific to the Wallet SDK is mirrored from [the GitHub repository](https://github.com/docknetwork/wallet-sdk). Node package reference documentation is also published on [GitHub.io](https://docknetwork.github.io/wallet-sdk/).
7871

79-
For more details you can check the [getting started guide](https://github.com/docknetwork/wallet-sdk/blob/master/docs/getting-started.md)
72+
For more details you should read [the getting started guide](https://github.com/docknetwork/wallet-sdk/blob/master/docs/getting-started.md).
8073

81-
[See the Github repository](https://docknetwork.github.io/wallet-sdk/)
8274

83-
## Features
75+
### Key Features
8476
- [Biometric Plugin](https://github.com/docknetwork/wallet-sdk/blob/master/docs/biometric-plugin.md)
8577
- [Ecosystem Tools](https://github.com/docknetwork/wallet-sdk/blob/master/docs/ecosystem-tools.md)
8678
- [Cloud Wallet](https://github.com/docknetwork/wallet-sdk/blob/master/docs/cloud-wallet.md)
79+
80+
81+
### Running on other platforms
82+
83+
[The examples directory](https://github.com/docknetwork/wallet-sdk/tree/master/examples) contains detailed examples for running the Truvera Wallet SDK on NodeJS, Web, and Flutter.

docs/getting-started.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ This guide walks you through the process of setting up the Truvera Wallet SDK, c
77
To start, you need to install the necessary packages for the wallet SDK and the data store. Open your terminal and run the following command:
88

99
```bash
10-
yarn add @docknetwork/wallet-sdk-core @docknetwork/wallet-sdk-data-store-typeorm
10+
npm install @docknetwork/wallet-sdk-core @docknetwork/wallet-sdk-data-store-typeorm
1111
```
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.
@@ -16,7 +16,7 @@ The `@docknetwork/wallet-sdk-core` provides the core wallet functionality, while
1616

1717
### 1. Initialize the Data Store
1818

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 data store:
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:
2020

2121
```ts
2222
import {createDataStore} from '@docknetwork/wallet-sdk-data-store-typeorm/lib';
@@ -28,9 +28,9 @@ const dataStore = await createDataStore({
2828
});
2929
```
3030

31-
This code initializes a SQLite database to store wallet data. You can adjust the `databasePath` and `defaultNetwork` based on your needs.
31+
This code initializes an SQLite database to store wallet data locally on the device. You can adjust the `databasePath` and `defaultNetwork` based on your needs.
3232

33-
If you want to use the cloud wallet solution, please refer to the [Cloud Wallet Documentation](cloud-wallet.md) for detailed instructions and configuration options.
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.
3434

3535
### 2. Create a New Wallet
3636

docs/other-topics.md

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
# Other Topics
2+
3+
## Using WebAssembly
4+
5+
React native doesn't support WebAssembly. Libraries that require WebAssembly need to run in a WebView. This includes some components of the wallet-sdk. Messages are exchanged with the React Native thread through a JSON RPC client / server layer. The Wallet SDK can be used to abstract all the complexity of the WebView communication with the react-native thread.
6+
7+
The WebView is similar to a REST API, and its entry point is in the wallet-sdk-wasm package. Each module in the package has a service-rpc client to interact with the service.js that is running in the main thread (React Native):
8+
9+
`@docknetwork/wallet-sdk-wasm/lib/services/[moduleName]/service-rpc`
10+
interacts with
11+
`@docknetwork/wallet-sdk-wasm/lib/services/[moduleName]/service.js`
12+
13+
Notice that the `modules` folder is running in the main thread (react native) and will be using the json rpc client (`@docknetwork/wallet-sdk-core/lib/client`) to interact with `@docknetwork/wallet-sdk-core/lib/service` methods
14+
15+
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
# Wallet sdk examples
1+
# Wallet SDK Examples
22

33
This repository contains examples for working with the Truvera Wallet SDK.
4-
https://github.com/docknetwork/wallet-sdk
54

5+
https://github.com/docknetwork/wallet-sdk

readme/development.md

Lines changed: 0 additions & 20 deletions
This file was deleted.

0 commit comments

Comments
 (0)