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
Atala PRISM TypeScript SDK provides a library and documentation for developers to build
4
-
TypeScript-based SSI applications with Atala PRISM. It provides a set of
5
-
utilities for building SSI Edge Agents speaking DIDComm V2 protocols.
6
-
7
-
## Basic considerations
8
-
9
-
### Atala PRISM
1
+
# Atala PRISM TypeScript SDK
10
2
11
3
Atala PRISM is a self-sovereign identity (SSI) platform and service suite for
12
4
verifiable data and digital identity. Built on Cardano, it offers core
@@ -20,7 +12,7 @@ The complete platform is separated into multiple repositories:
20
12
-[atala-prism-building-blocks](https://github.com/hyperledger-labs/open-enterprise-agent) - Repo that contains the servers Building Blocks.
21
13
-[atala-prism-mediator](https://github.com/input-output-hk/atala-prism-mediator) - Repo for DIDComm V2 Mediator
22
14
23
-
###SDK Overview
15
+
## SDK Overview
24
16
25
17
- Apollo: Provides a suite of necessary cryptographic operations.
26
18
- Castor: Provides a suite of operations to create, manage and resolve decentralized identifiers.
@@ -29,61 +21,98 @@ The complete platform is separated into multiple repositories:
29
21
- Pluto: Provides an interface for storage operations in a portable, storage-agnostic manner.
30
22
- PrismAgent: PrismAgent, a component using all other building blocks, provides basic edge agent capabilities, including implementing DIDComm V2 protocols.
31
23
32
-
###Getting started
24
+
## Getting started
33
25
34
-
This repository includes a browser and a Node.js demo application, and also a step-by-step documented process to run it.
26
+
This repository includes a browser and a Node.js demo application, and also a step-by-step documented process on [how to run it](#running-a-demo-project).
35
27
36
-
#### Running a demo project
28
+
### Use in your project
29
+
You can install and use this library in browsers and nodejs.
37
30
38
-
To be able to run the demos, we have to build `prism-wallet-sdk-ts`.
31
+
```bash
32
+
npm i @atala/prism-wallet-sdk --save
33
+
```
39
34
40
-
From the repository root run:
35
+
or with yarn
36
+
37
+
```bash
38
+
yarn add @atala/prism-wallet-sdk
39
+
```
41
40
41
+
> **Note for Webpack:**
42
+
>
43
+
> 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
44
+
45
+
46
+
47
+
48
+
### Running a demo project
49
+
50
+
#### Building from source
51
+
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:
To be able to run the demos, we have to build `prism-wallet-sdk`.
63
+
From the repository root run:
42
64
43
65
```bash
44
66
npm i
45
67
npm run build
46
68
```
47
69
48
-
####For NodeJS
70
+
### For NodeJS CJS
49
71
50
-
After building `prism-wallet-sdk-ts`, cd into `{path}/prism-wallet-sdk-ts/demos/node`:
72
+
After building `prism-wallet-sdk`, cd into `{path}/demos/node-cjs` or use visual studio debugger "CJS DEMO":
51
73
52
74
```bash
75
+
cd demos/node-cjs
53
76
npm i
54
-
node index.js
77
+
npm run start
55
78
```
56
79
57
-
:::note
58
-
The installation in the `demos/node` directory requires the `build` folder from the wallet-sdk to be available.
59
-
:::
80
+
> **Note:**
81
+
>
82
+
> The installation in the `{path}/demos/node-cjs` directory requires the `build` folder from the wallet-sdk to be available.
60
83
61
-
####For browser
84
+
### For NodeJS ESM
62
85
63
-
After building `prism-wallet-sdk-ts`, cd into the demo directory "demos/browser"
86
+
After building `prism-wallet-sdk`, cd into `{path}/demos/node-esm` or use visual studio debugger "ESM DEMO":
64
87
65
88
```bash
66
-
cd demos/browser
89
+
cd demos/node-esm
67
90
npm i
68
91
npm run start
69
92
```
70
93
71
-
#### Implementing storage for the SDK
72
-
This SDK exposes Pluto, a storage interface that should be implemented by the user, in the most appropriate way for a particular use case.
94
+
> **Note:**
95
+
>
96
+
> The installation in the `{path}/demos/node-esm` directory requires the `build` folder from the wallet-sdk to be available.
73
97
74
-
We don't provide a default implementation out of the box at the moment, but we do provide a couple of demo implementations that can be used to get started with demos and testing.
75
98
76
-
Provided demo implementations are intentionally oversimplified and SHOULD NOT be used in production.
99
+
### For browser
77
100
78
-
#### Use in your project
79
-
In order to use this SDK in your project you now just need to install the package as follows
101
+
After building `prism-wallet-sdk`, cd into the demo directory `{path}/demos/browser`
80
102
81
103
```bash
82
-
npm @atala/prism-wallet-sdk --save
104
+
cd demos/browser
105
+
npm i
106
+
npm run start
83
107
```
84
108
85
-
or with yarn
86
109
87
-
```bash
88
-
yarn add @atala/prism-wallet-sdk
89
-
```
110
+
111
+
112
+
### Implementing storage for the SDK
113
+
This SDK exposes Pluto, a storage interface that should be implemented by the user, in the most appropriate way for a particular use case.
114
+
115
+
We don't provide a default implementation out of the box at the moment, but we do provide a couple of demo implementations that can be used to get started with demos and testing.
116
+
117
+
Provided demo implementations are intentionally oversimplified and SHOULD NOT be used in production.
0 commit comments