Update docs
This commit is contained in:
parent
6c7fa932c8
commit
905a95c358
|
@ -43,6 +43,18 @@ From [NPM](https://www.npmjs.com/package/merkletreejs):
|
||||||
npm install merkletreejs
|
npm install merkletreejs
|
||||||
```
|
```
|
||||||
|
|
||||||
|
Import as ES6 module
|
||||||
|
|
||||||
|
```js
|
||||||
|
import { MerkleTree } from 'merkletreejs'
|
||||||
|
```
|
||||||
|
|
||||||
|
Import as CommonJs
|
||||||
|
|
||||||
|
```js
|
||||||
|
const { MerkleTree } = require('merkletreejs')
|
||||||
|
```
|
||||||
|
|
||||||
### CDN
|
### CDN
|
||||||
|
|
||||||
Available on [jsDelivr](https://www.jsdelivr.com/) CDN:
|
Available on [jsDelivr](https://www.jsdelivr.com/) CDN:
|
||||||
|
@ -51,6 +63,8 @@ Available on [jsDelivr](https://www.jsdelivr.com/) CDN:
|
||||||
<script src="https://cdn.jsdelivr.net/npm/merkletreejs@latest/merkletree.js"></script>
|
<script src="https://cdn.jsdelivr.net/npm/merkletreejs@latest/merkletree.js"></script>
|
||||||
```
|
```
|
||||||
|
|
||||||
|
The exported classes will be available on `window` object, e.g. `window.MerkleTree`
|
||||||
|
|
||||||
## Example
|
## Example
|
||||||
|
|
||||||
[https://lab.miguelmota.com/merkletreejs](https://lab.miguelmota.com/merkletreejs)
|
[https://lab.miguelmota.com/merkletreejs](https://lab.miguelmota.com/merkletreejs)
|
||||||
|
|
|
@ -349,7 +349,7 @@ ___
|
||||||
|
|
||||||
### getHexLayers
|
### getHexLayers
|
||||||
|
|
||||||
▸ **getHexLayers**(): *string[]*
|
▸ **getHexLayers**(): *string[][]*
|
||||||
|
|
||||||
getHexLayers
|
getHexLayers
|
||||||
|
|
||||||
|
@ -360,7 +360,7 @@ getHexLayers
|
||||||
const layers = tree.getHexLayers()
|
const layers = tree.getHexLayers()
|
||||||
```
|
```
|
||||||
|
|
||||||
**Returns:** *string[]*
|
**Returns:** *string[][]*
|
||||||
|
|
||||||
___
|
___
|
||||||
|
|
||||||
|
@ -506,7 +506,7 @@ ___
|
||||||
|
|
||||||
### getLayers
|
### getLayers
|
||||||
|
|
||||||
▸ **getLayers**(): *Buffer[]*
|
▸ **getLayers**(): *Buffer[][]*
|
||||||
|
|
||||||
getLayers
|
getLayers
|
||||||
|
|
||||||
|
@ -517,7 +517,7 @@ getLayers
|
||||||
const layers = tree.getLayers()
|
const layers = tree.getLayers()
|
||||||
```
|
```
|
||||||
|
|
||||||
**Returns:** *Buffer[]*
|
**Returns:** *Buffer[][]*
|
||||||
|
|
||||||
___
|
___
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue