1.0.3 • Published 2 years ago

merklecreator v1.0.3

Weekly downloads
-
License
ISC
Repository
-
Last release
2 years ago

RootMerkleCreator

This script allows you to get the hashRoot and the merkle proof for an array of given addresses. It uses the encrytage keccack256

How to use it?

Generate the hashRoot

  1. Import the function TreeRoot as import {TreeRoot} from "merklecreator";
  2. Create an array of string. The space and others will be cleaned. Let's call it "whitelist"
  3. Launch the function with the previous array as TreeRoot(whtitelist);. Check the file exemple.js in case of doubt

Obtain the merkle proof of an address

Once the hash root is generated, never modify the array. Otherwise you'll have to generate a new hashRoot!!

  1. Import the function ClaimProof as import {ClaimProof} from "merklecreator";
  2. Launch the function ClaimProof with the previous string array in parameter and the string requesting the proof as claimProof("0x04...........3eFE7641a", whtitelist);. Check the file exemple.js in case of doubt
1.0.3

2 years ago

1.0.2

2 years ago

1.0.1

2 years ago

1.0.0

2 years ago