diff --git a/docs/README.md b/docs/README.md index 8626e69..226905a 100644 --- a/docs/README.md +++ b/docs/README.md @@ -43,6 +43,18 @@ From [NPM](https://www.npmjs.com/package/merkletreejs): npm install merkletreejs ``` +Import as ES6 module + +```js +import { MerkleTree } from 'merkletreejs' +``` + +Import as CommonJs + +```js +const { MerkleTree } = require('merkletreejs') +``` + ### CDN Available on [jsDelivr](https://www.jsdelivr.com/) CDN: @@ -51,6 +63,8 @@ Available on [jsDelivr](https://www.jsdelivr.com/) CDN: ``` +The exported classes will be available on `window` object, e.g. `window.MerkleTree` + ## Example [https://lab.miguelmota.com/merkletreejs](https://lab.miguelmota.com/merkletreejs) diff --git a/docs/classes/_src_merkletree_.merkletree.md b/docs/classes/_src_merkletree_.merkletree.md index dc155f7..20b90e0 100644 --- a/docs/classes/_src_merkletree_.merkletree.md +++ b/docs/classes/_src_merkletree_.merkletree.md @@ -349,7 +349,7 @@ ___ ### getHexLayers -▸ **getHexLayers**(): *string[]* +▸ **getHexLayers**(): *string[][]* getHexLayers @@ -360,7 +360,7 @@ getHexLayers const layers = tree.getHexLayers() ``` -**Returns:** *string[]* +**Returns:** *string[][]* ___ @@ -506,7 +506,7 @@ ___ ### getLayers -▸ **getLayers**(): *Buffer[]* +▸ **getLayers**(): *Buffer[][]* getLayers @@ -517,7 +517,7 @@ getLayers const layers = tree.getLayers() ``` -**Returns:** *Buffer[]* +**Returns:** *Buffer[][]* ___