JSPM

@authenticid-labs/merkle-tree-proof

0.0.3
  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 1
  • Score
    100M100P100Q37987F
  • License ISC

prove that an element is a valid member of a Merkle tree on chain with realid.eth

Package Exports

  • @authenticid-labs/merkle-tree-proof
  • @authenticid-labs/merkle-tree-proof/lib/index.js

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (@authenticid-labs/merkle-tree-proof) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

npm i @authenticid-labs/merkle-tree-proof

or

yarn add @authenticid-labs/merkle-tree-proof

Usage

const { generateMerkleTreeRoot, generateMerkleTree, doMerkleProof, getMerkleTreeRoot } = require('@authenticid-labs/merkle-tree-proof');

const root = await getMerkleTreeRoot(provider, wallet_address);
const tree = generateMerkleTree(input: string[]);
const success = doMerkleProof(tree: MerkleTree, toTest: string, root: string);