Security News
pnpm 10.0.0 Blocks Lifecycle Scripts by Default
pnpm 10 blocks lifecycle scripts by default to improve security, addressing supply chain attack risks but sparking debate over compatibility and workflow changes.
@checkerchain/elrond-merkle-tree-generator
Advanced tools
A JS Library to generate the merkle tree and gets it's root and proof for any given distribution for Elrond
A Simple Javascript library to generate Merkle Tree and get its root and proof for any type of Merkle Tree Distribution
The recommend way to use Merkle Tree Generator is to install it as a dependency:
# If you use npm:
npm i @checkerchain/elrond-merkle-tree-generator
# Or if you use Yarn:
yarn add @checkerchain/elrond-merkle-tree-generator
import { generateTree } from '@checkerchain/elrond-merkle-tree-generator';
or
const { generateTree } = require('@checkerchain/elrond-merkle-tree-generator');
The next step is to send a array of data to the generate tree function. The format of data should be:
data = [
{
index: '01',
wallet: 'erd13wsm72uc0c2fwgtpwjn0xlrzfdh7kg59jmrnfcjh9fhqsp7g5yas5sy69l',
amount: '1000000',
},
{
index: '02',
wallet: 'erd14pgqys8lzhdfnuseev4yh3hfrq2423u8wxkd3fkxsvvpvyannzrs88l2nt',
amount: '1000000',
},
....
]
const result = generateTree(data);
console.log(result);
And boom, you are done! It returns you with the merkle root and proof for all the passed wallets, which can be passed on Smart Contracts for claiming the rewards.
This is just the initial version of the package, feel free to contribute more to it.
FAQs
A JS Library to generate the merkle tree and gets it's root and proof for any given distribution for Elrond
We found that @checkerchain/elrond-merkle-tree-generator demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 4 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
pnpm 10 blocks lifecycle scripts by default to improve security, addressing supply chain attack risks but sparking debate over compatibility and workflow changes.
Product
Socket now supports uv.lock files to ensure consistent, secure dependency resolution for Python projects and enhance supply chain security.
Research
Security News
Socket researchers have discovered multiple malicious npm packages targeting Solana private keys, abusing Gmail to exfiltrate the data and drain Solana wallets.