Skip to content

Commit

Permalink
fix: Improve documentation.
Browse files Browse the repository at this point in the history
  • Loading branch information
elribonazo committed Dec 8, 2023
1 parent 822a3ef commit 9c9b771
Showing 1 changed file with 31 additions and 23 deletions.
54 changes: 31 additions & 23 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -40,13 +40,25 @@ yarn add @atala/prism-wallet-sdk

> **Note for Webpack:**
>
> The application builds code with wasm files for DIDComm and Anoncreds for both browsers and nodejs. When webpack builds public website the wasm files need to be copied manually into the public folder.
> The application builds code with wasm files for DIDComm and Anoncreds for both browsers and nodejs. When webpack builds public website the wasm files need to be copied manually into the public folder. See examples



### Running a demo project

#### Building from source
This repository contains compiles typescript code and some rust dependencies for DIDComm and AnonCreds, so in order to build the code from source you will need the following:

* Bash
* Have Rust (cargo) and wasm-pack installed.
* Node JS Version (20/LTS Recommended)

Clone the repository
```
git clone [email protected]:input-output-hk/atala-prism-wallet-sdk-ts.git
```

To be able to run the demos, we have to build `prism-wallet-sdk`.
From the repository root run:

Expand All @@ -55,50 +67,46 @@ npm i
npm run build
```

### For NodeJS
### For NodeJS CJS

After building `prism-wallet-sdk`, cd into `{path}/demos/node`:
After building `prism-wallet-sdk`, cd into `{path}/demos/node-cjs` or use visual studio debugger "CJS DEMO":

```bash
cd demos/node
cd demos/node-cjs
npm i
npm run start
```

> **Note:**
>
> The installation in the `{path}/demos/node` directory requires the `build` folder from the wallet-sdk to be available.
> The installation in the `{path}/demos/node-cjs` directory requires the `build` folder from the wallet-sdk to be available.
### For NodeJS ESM

### For browser

After building `prism-wallet-sdk`, cd into the demo directory `{path}/demos/browser`
After building `prism-wallet-sdk`, cd into `{path}/demos/node-esm` or use visual studio debugger "ESM DEMO":

```bash
cd demos/browser
cd demos/node-esm
npm i
npm run start
```

### Building from source
This repository contains compiles typescript code and some rust dependencies for DIDComm and AnonCreds, so in order to build the code from source you will need the following:
> **Note:**
>
> The installation in the `{path}/demos/node-esm` directory requires the `build` folder from the wallet-sdk to be available.
* Bash
* Have Rust (cargo) and wasm-pack installed.
* Node JS Version (20/LTS Recommended)

Clone the repository
```
git clone [email protected]:input-output-hk/atala-prism-wallet-sdk-ts.git
```
### For browser

> **Note:**
>
> This repository uses git submodules but this process is already automated and all the dependencies will be fetched and compiled before building.
After building `prism-wallet-sdk`, cd into the demo directory `{path}/demos/browser`

```bash
cd demos/browser
npm i
npm run start
```
npm run build
```




### Implementing storage for the SDK
Expand Down

0 comments on commit 9c9b771

Please sign in to comment.