Added explicit return to MerkleTree.getProof()

This commit is contained in:
Juan David Suárez 2022-10-27 13:42:14 -05:00 committed by GitHub
parent a048b00a66
commit 91ab13753e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -510,7 +510,7 @@ export class MerkleTree extends Base {
*const proof = tree.getProof(leaves[2], 2)
*```
*/
getProof (leaf: Buffer | string, index?: number):any[] {
getProof (leaf: Buffer | string, index?: number):{position: 'left' | 'right', data: Buffer}[] {
if (typeof leaf === 'undefined') {
throw new Error('leaf is required')
}