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: README.md
+57-26Lines changed: 57 additions & 26 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -13,15 +13,44 @@ This project is used as a dependency by several other projects.
13
13
14
14
Proposals and issues for the specification itself should be submitted as pull requests to the [spec repo](https://github.com/decentralized-identity/decentralized-web-node).
15
15
16
-
17
16
## Installation
18
17
19
-
If you are interested in using DWNs and web5 in your web app, you probably want to look at web5-js, instead of this repository. Head on over here: https://github.com/TBD54566975/web5-js
18
+
If you are interested in using DWNs and web5 in your web app, you probably want to look at web5-js, instead of this repository. Head on over here: https://github.com/TBD54566975/web5-js.
19
+
20
+
For advanced users wishing to use this repo directly:
20
21
21
22
```bash
22
23
npm install @tbd54566975/dwn-sdk-js
23
24
```
24
25
26
+
Additional steps needed for some environments.
27
+
28
+
Node.js <= 18
29
+
30
+
```js
31
+
// node.js 18 and earlier, needs globalThis.crypto polyfill
32
+
import { webcrypto } from"node:crypto";
33
+
// @ts-ignore
34
+
if (!globalThis.crypto) globalThis.crypto= webcrypto;
35
+
```
36
+
37
+
React Native:
38
+
39
+
```js
40
+
// If you're on react native. React Native needs crypto.getRandomValues polyfill and sha512
The DWN JS SDK releases builds to [npmjs.com](https://www.npmjs.com/package/@tbd54566975/dwn-sdk-js). There are two build types: stable build and unstable build.
72
102
73
103
### Stable Build
104
+
74
105
This is triggered manually by:
75
-
1. Increment `version` in `package.json` in [Semantic Versioning (semver)](https://semver.org/) format.
76
-
2. Merge the change into `main` branch
77
-
3. Create a release from GitHub.
78
-
79
-
An official build with version matching the `package.json` will be published to [npmjs.com](https://www.npmjs.com/package/@tbd54566975/dwn-sdk-js).
106
+
107
+
1. Increment `version` in `package.json` in [Semantic Versioning (semver)](https://semver.org/) format.
108
+
2. Merge the change into `main` branch
109
+
3. Create a release from GitHub.
110
+
111
+
An official build with version matching the `package.json` will be published to [npmjs.com](https://www.npmjs.com/package/@tbd54566975/dwn-sdk-js).
80
112
81
113
### Unstable Build
114
+
82
115
Every push to the `main` branch will automatically trigger an unstable build to [npmjs.com](https://www.npmjs.com/package/@tbd54566975/dwn-sdk-js) for developers to experiment and test.
83
116
84
117
The version string contains the date as well as the commit hash of the last change.
@@ -91,17 +124,15 @@ An example version string:
91
124
-`2023-03-16` indicates the date of March 16th 2023
0 commit comments