
Security News
AGENTS.md Gains Traction as an Open Format for AI Coding Agents
AGENTS.md is a fast-growing open format giving AI coding agents a shared, predictable way to understand project setup, style, and workflows.
geoduck-js-sdk
Advanced tools
Self-contained repo for interacting with the zkp-merkle-airdrop-contracts. A browser usage example of this library can be found in zkp-merkle-airdrop-fe-ex.
import { MerkleTree } from 'zkp-merkle-airdrop-lib';
let merkleTreeStorageString = ...; // Load the file from network or local into a string
let mt = MerkleTree.createFromStorageString(merkleTreeStorageString);
import { MerkleTree } from 'zkp-merkle-airdrop-lib';
let treeHeight = 2**13;
// Create an array of BigNumbers to enter as leaves
let leaves: BigNumber[] = new Array(treeHeight).fill(0).map(_ => randomBigNumber());
let mt = MerkleTree.createFromLeaves(leaves)
import { MerkleTree } from 'zkp-merkle-airdrop-lib';
let mt: MerkleTree = ...;
let storageString = mt.getStorageString();
fs.WriteFileSync("./file/path/text.txt', storageString);
import { MerkleTree, pedersenhashConcat, generateProofCallData } from 'zk-merkle-airdrop-lib';
let KEY = "0x00d8d681994b73f635532cc3f0a7e3f02e10d55a6e107e1bd374b1c23bead940";
let SEC = "0x00b87f2a60e72cc5c6f334833c56aaed80aef550b76bd94837a86070c10dd061";
let airdropToAddress = "0x0"; // Reciever address -- caller of PrivateAirdrop.collectAirdrop()
// Optional: Compute commitment
let commitment: BigInt = pedersenhashConcat(BigInt(KEY), BigInt(SEC));
// Load tree into string
let merkleTreeStorageString: string = ...;
// Load dep files into buffers
let wasmBuffer: Buffer = ...;
let zkeyBuffer: Buffer = ...;
// Create MerkleTree
let mt = MerkleTree.createFromStorageString(merkleTreeStorageString);
// Optional: Check leaf exists
if (!mt.leafExists(commitment)) {
alert("Commitment does not exist as leaf in tree!);
}
// Compute proof -- long running operation
let proof = await generateProofCallData(mt, BigInt(key), BigInt(secret), airdropToAddress, wasmBuffer, zkeyBuffer);
npm install --save file:zkp-merkle-airdrop-lib
witness_calculator
is copied from those generated by the circom library with a BigInt adjustment to work in the browser.npm i
npm run build
These smart contracts are being provided as is. No guarantee, representation or warranty is being made, express or implied, as to the safety or correctness of the user interface or the smart contracts. They have not been audited and as such there can be no assurance they will work as intended, and users may experience delays, failures, errors, omissions or loss of transmitted information. In addition, any airdrop using these smart contracts should be conducted in accordance with applicable law. Nothing in this repo should be construed as investment advice or legal advice for any particular facts or circumstances and is not meant to replace competent counsel. It is strongly advised for you to contact a reputable attorney in your jurisdiction for any questions or concerns with respect thereto. a16z is not liable for any use of the foregoing and users should proceed with caution and use at their own risk. See a16z.com/disclosure for more info.
FAQs
Library for interacting with the zk merkle tree.
We found that geoduck-js-sdk demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer 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
AGENTS.md is a fast-growing open format giving AI coding agents a shared, predictable way to understand project setup, style, and workflows.
Security News
/Research
Malicious npm package impersonates Nodemailer and drains wallets by hijacking crypto transactions across multiple blockchains.
Security News
This episode explores the hard problem of reachability analysis, from static analysis limits to handling dynamic languages and massive dependency trees.