Skip to content

Commit 6b61145

Browse files
more readme notes
1 parent 6d22841 commit 6b61145

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

README.md

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,10 @@ License: MIT
88
- In your project run `npm i https://github.com/LucasArmstrong/merkle-ts`
99
- For TypeScript projects you can import the module MerkleTree
1010
- For JavaScript projects you can build with `npm run build`
11-
- - Then require in your code like `const {MerkleTree} = require('./node_modules/merkle-ts/dist/src/merkle/MerkleTree.js');`
11+
- - Then require in your code like:
12+
- - `const {MerkleTree} = require('./node_modules/merkle-ts/dist/src/merkle/MerkleTree.js');`
13+
- - Example of using a merkle root in a jest test:
14+
- - `let tree = new MerkleTree([1]); expect(tree.root).toBe('6b86b273ff34fce19d6b804eff5a3f5747ada4eaa22f1d49c01e52ddb7875b4b');`
1215

1316
### Calculate a Merkle Root from a directory of files recursively
1417
- First set or export environment variable `ASSET_DIRECTORY_PATH` to the directory you want to process.

0 commit comments

Comments
 (0)