Fix typedoc

This commit is contained in:
Miguel Mota 2019-06-07 01:00:36 -07:00
parent 6f0ee08069
commit d84aa0e8a9
No known key found for this signature in database
GPG Key ID: 67EC1161588A00F9
4 changed files with 17 additions and 25 deletions

View File

@ -432,13 +432,6 @@ ___
## Options
### Properties
* [duplicateOdd](#duplicateodd)
* [hashLeaves](#hashleaves)
* [isBitcoinTree](#isbitcointree)
* [sort](#sort)
## Properties
<a id="duplicateodd"></a>
@ -447,6 +440,8 @@ ___
**● duplicateOdd**: *`boolean`*
If set to `true`, an odd node will be duplicated and combined to make a pair to generate the layer hash.
___
<a id="hashleaves"></a>
@ -454,6 +449,8 @@ ___
**● hashLeaves**: *`boolean`*
If set to `true`, the leaves will hashed using the set hashing algorithms.
___
<a id="isbitcointree"></a>
@ -461,6 +458,8 @@ ___
**● isBitcoinTree**: *`boolean`*
If set to `true`, constructs the Merkle Tree using the [Bitcoin Merkle Tree implementation](http://www.righto.com/2014/02/bitcoin-mining-hard-way-algorithms.html). Enable it when you need to replicate Bitcoin constructed Merkle Trees. In Bitcoin Merkle Trees, single nodes are combined with themselves, and each output hash is hashed again.
___
<a id="sort"></a>
@ -468,6 +467,8 @@ ___
**● sort**: *`boolean`*
If set to `true`, the leaves and hashing pairs will be sorted.
## Test

10
dist/index.d.ts vendored
View File

@ -1,7 +1,11 @@
interface Options {
/** If set to `true`, an odd node will be duplicated and combined to make a pair to generate the layer hash. */
duplicateOdd: boolean;
/** If set to `true`, the leaves will hashed using the set hashing algorithms. */
hashLeaves: boolean;
/** If set to `true`, constructs the Merkle Tree using the [Bitcoin Merkle Tree implementation](http://www.righto.com/2014/02/bitcoin-mining-hard-way-algorithms.html). Enable it when you need to replicate Bitcoin constructed Merkle Trees. In Bitcoin Merkle Trees, single nodes are combined with themselves, and each output hash is hashed again. */
isBitcoinTree: boolean;
/** If set to `true`, the leaves and hashing pairs will be sorted. */
sort: boolean;
}
/**
@ -23,12 +27,6 @@ export declare class MerkleTree {
* @param {Buffer[]} leaves - Array of hashed leaves. Each leaf must be a Buffer.
* @param {Function} hashAlgorithm - Algorithm used for hashing leaves and nodes
* @param {Object} options - Additional options
* @param {Boolean} options.sort - If set to `true`, the leaves and hashing pairs will be sorted.
* @param {Boolean} options.hashLeaves - If set to `true`, the leaves will hashed using the set hashing algorithms.
* @param {Boolean} options.isBitcoinTree - If set to `true`, constructs the Merkle
* Tree using the [Bitcoin Merkle Tree implementation](http://www.righto.com/2014/02/bitcoin-mining-hard-way-algorithms.html). Enable it when you need
* to replicate Bitcoin constructed Merkle Trees. In Bitcoin Merkle Trees, single nodes are combined with themselves, and each output hash is hashed again.
* @param {Boolean} options.duplicateOdd - If set to `true`, an odd node will be duplicated and combined to make a pair to generate the layer hash.
* @example
*```js
*const MerkleTree = require('merkletreejs')

6
dist/index.js vendored
View File

@ -15,12 +15,6 @@ var MerkleTree = /** @class */ (function () {
* @param {Buffer[]} leaves - Array of hashed leaves. Each leaf must be a Buffer.
* @param {Function} hashAlgorithm - Algorithm used for hashing leaves and nodes
* @param {Object} options - Additional options
* @param {Boolean} options.sort - If set to `true`, the leaves and hashing pairs will be sorted.
* @param {Boolean} options.hashLeaves - If set to `true`, the leaves will hashed using the set hashing algorithms.
* @param {Boolean} options.isBitcoinTree - If set to `true`, constructs the Merkle
* Tree using the [Bitcoin Merkle Tree implementation](http://www.righto.com/2014/02/bitcoin-mining-hard-way-algorithms.html). Enable it when you need
* to replicate Bitcoin constructed Merkle Trees. In Bitcoin Merkle Trees, single nodes are combined with themselves, and each output hash is hashed again.
* @param {Boolean} options.duplicateOdd - If set to `true`, an odd node will be duplicated and combined to make a pair to generate the layer hash.
* @example
*```js
*const MerkleTree = require('merkletreejs')

View File

@ -3,12 +3,17 @@ import * as CryptoJS from 'crypto-js'
import * as treeify from 'treeify'
interface Options {
/** If set to `true`, an odd node will be duplicated and combined to make a pair to generate the layer hash. */
duplicateOdd: boolean
/** If set to `true`, the leaves will hashed using the set hashing algorithms. */
hashLeaves: boolean
/** If set to `true`, constructs the Merkle Tree using the [Bitcoin Merkle Tree implementation](http://www.righto.com/2014/02/bitcoin-mining-hard-way-algorithms.html). Enable it when you need to replicate Bitcoin constructed Merkle Trees. In Bitcoin Merkle Trees, single nodes are combined with themselves, and each output hash is hashed again. */
isBitcoinTree: boolean
/** If set to `true`, the leaves and hashing pairs will be sorted. */
sort: boolean
}
/**
* Class reprensenting a Merkle Tree
* @namespace MerkleTree
@ -29,12 +34,6 @@ export class MerkleTree {
* @param {Buffer[]} leaves - Array of hashed leaves. Each leaf must be a Buffer.
* @param {Function} hashAlgorithm - Algorithm used for hashing leaves and nodes
* @param {Object} options - Additional options
* @param {Boolean} options.sort - If set to `true`, the leaves and hashing pairs will be sorted.
* @param {Boolean} options.hashLeaves - If set to `true`, the leaves will hashed using the set hashing algorithms.
* @param {Boolean} options.isBitcoinTree - If set to `true`, constructs the Merkle
* Tree using the [Bitcoin Merkle Tree implementation](http://www.righto.com/2014/02/bitcoin-mining-hard-way-algorithms.html). Enable it when you need
* to replicate Bitcoin constructed Merkle Trees. In Bitcoin Merkle Trees, single nodes are combined with themselves, and each output hash is hashed again.
* @param {Boolean} options.duplicateOdd - If set to `true`, an odd node will be duplicated and combined to make a pair to generate the layer hash.
* @example
*```js
*const MerkleTree = require('merkletreejs')