{"_id":"@chainsafe/hashtree","_rev":"4639738","name":"@chainsafe/hashtree","description":"Simple NAPI wrapper around https://github.com/prysmaticlabs/hashtree","dist-tags":{"latest":"1.0.2"},"maintainers":[{"name":"philknows","email":""},{"name":"wemeetagain","email":""}],"time":{"modified":"2026-04-10T19:38:30.000Z","created":"2024-06-07T17:20:49.836Z","1.0.2":"2025-08-12T14:22:14.348Z","1.0.1":"2024-06-26T17:17:25.617Z","1.0.0":"2024-06-07T17:20:49.836Z"},"users":{},"author":{"name":"ChainSafe.io"},"repository":{"type":"git","url":"git+https://github.com/ChainSafe/hashtree-js.git"},"versions":{"1.0.2":{"name":"@chainsafe/hashtree","version":"1.0.2","author":{"name":"ChainSafe.io"},"contributors":[{"name":"Cayman Nava","email":"caymannava@gmail.com"},{"name":"Matthew Keil","email":"me@matthewkeil.com"}],"scripts":{"artifacts":"napi artifacts","check-package-versions":"ts-node ./scripts/checkPackageVersions","clean":"rm -rf ./target ./hashtree/target","build":"napi build --platform --release","build:debug":"napi build --platform","lint":"oxlint .","prepublishOnly":"napi prepublish -t npm","test":"jest"},"devDependencies":{"@napi-rs/cli":"^3.1.2","@types/jest":"^29.1.2","@types/node":"^20.13.0","jest":"^29.1.2","oxlint":"^1.9.0","ts-jest":"^29.1.2","ts-node":"^10.9.2","typescript":"^5.2.2"},"main":"index.js","types":"index.d.ts","keywords":["hash","hashtree","merkle","NAPI","N-API","sha256"],"napi":{"binaryName":"hashtree","targets":["aarch64-apple-darwin","x86_64-unknown-linux-gnu","aarch64-unknown-linux-gnu","x86_64-unknown-linux-musl","aarch64-unknown-linux-musl","x86_64-pc-windows-msvc"]},"license":"MIT","engines":{"node":">= 18"},"repository":{"type":"git","url":"git+https://github.com/ChainSafe/hashtree-js.git"},"bugs":{"url":"https://github.com/ChainSafe/hashtree-js/issues"},"homepage":"https://github.com/ChainSafe/hashtree-js#readme","packageManager":"yarn@4.9.2","optionalDependencies":{"@chainsafe/hashtree-darwin-arm64":"1.0.2","@chainsafe/hashtree-linux-x64-gnu":"1.0.2","@chainsafe/hashtree-linux-arm64-gnu":"1.0.2","@chainsafe/hashtree-linux-x64-musl":"1.0.2","@chainsafe/hashtree-linux-arm64-musl":"1.0.2","@chainsafe/hashtree-win32-x64-msvc":"1.0.2"},"_id":"@chainsafe/hashtree@1.0.2","gitHead":"8cf0ead9d8940938a3d82c91f3e1558c7eca3ea3","description":"Simple NAPI wrapper around https://github.com/prysmaticlabs/hashtree","_nodeVersion":"22.18.0","_npmVersion":"10.9.3","dist":{"shasum":"2a16b49e491bef9e5760cd1010363cb3d1351fb8","size":3838,"noattachment":false,"key":"/@chainsafe/hashtree/-/@chainsafe/hashtree-1.0.2.tgz","tarball":"http://registry.cnpm.dingdandao.com/@chainsafe/hashtree/download/@chainsafe/hashtree-1.0.2.tgz"},"_npmUser":{"name":"wemeetagain","email":"caymannava@gmail.com"},"directories":{},"maintainers":[{"name":"philknows","email":""},{"name":"wemeetagain","email":""}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/hashtree_1.0.2_1755008534179_0.2868208946680628"},"_hasShrinkwrap":false,"_cnpmcore_publish_time":"2025-08-12T14:22:14.348Z","publish_time":1755008534348,"_source_registry_name":"default","_cnpm_publish_time":1755008534348},"1.0.1":{"name":"@chainsafe/hashtree","version":"1.0.1","author":{"name":"ChainSafe.io"},"contributors":[{"name":"Cayman Nava","email":"caymannava@gmail.com"},{"name":"Matthew Keil","email":"me@matthewkeil.com"}],"scripts":{"artifacts":"napi artifacts","check-package-versions":"ts-node ./scripts/checkPackageVersions","clean":"rm -rf ./target ./hashtree/target","build":"napi build --platform --release","build:debug":"napi build --platform","prepublishOnly":"napi prepublish -t npm","test":"jest","universal":"napi universal","version":"napi version"},"devDependencies":{"@napi-rs/cli":"^2.18.0","@types/jest":"^29.1.2","@types/node":"^20.13.0","@typescript-eslint/eslint-plugin":"^6.14.0","@typescript-eslint/parser":"^6.14.0","eslint":"^8.55.0","eslint-plugin-import":"^2.29.0","eslint-plugin-jest":"^28.5.0","eslint-plugin-node":"^11.1.0","eslint-plugin-prettier":"^5.0.1","jest":"^29.1.2","prettier":"^3.1.1","ts-jest":"^29.1.2","ts-node":"^10.9.2","typescript":"^5.2.2"},"main":"index.js","types":"index.d.ts","keywords":["hash","hashtree","merkle","NAPI","N-API","sha256"],"napi":{"name":"hashtree","triples":{"defaults":false,"additional":["aarch64-apple-darwin","x86_64-unknown-linux-gnu","aarch64-unknown-linux-gnu"]}},"license":"MIT","engines":{"node":">= 18"},"repository":{"type":"git","url":"git+https://github.com/ChainSafe/hashtree-js.git"},"bugs":{"url":"https://github.com/ChainSafe/hashtree-js/issues"},"homepage":"https://github.com/ChainSafe/hashtree-js#readme","optionalDependencies":{"@chainsafe/hashtree-darwin-arm64":"1.0.1","@chainsafe/hashtree-linux-x64-gnu":"1.0.1","@chainsafe/hashtree-linux-arm64-gnu":"1.0.1"},"_id":"@chainsafe/hashtree@1.0.1","gitHead":"d48291ad8a7679fa6ced6a0dffea53fba459779b","description":"Simple NAPI wrapper around https://github.com/prysmaticlabs/hashtree","_nodeVersion":"20.15.0","_npmVersion":"10.7.0","dist":{"shasum":"587666a261e1da6a37904095ce875fddc53c7c89","size":3119,"noattachment":false,"key":"/@chainsafe/hashtree/-/@chainsafe/hashtree-1.0.1.tgz","tarball":"http://registry.cnpm.dingdandao.com/@chainsafe/hashtree/download/@chainsafe/hashtree-1.0.1.tgz"},"_npmUser":{"name":"wemeetagain","email":"caymannava@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/hashtree_1.0.1_1719422245440_0.20309953715059437"},"_hasShrinkwrap":false,"_cnpmcore_publish_time":"2024-06-26T17:17:25.617Z","publish_time":1719422245617,"_source_registry_name":"default","maintainers":[{"name":"philknows","email":""},{"name":"wemeetagain","email":""}],"_cnpm_publish_time":1719422245617},"1.0.0":{"name":"@chainsafe/hashtree","version":"1.0.0","author":{"name":"ChainSafe.io"},"contributors":[{"name":"Cayman Nava","email":"caymannava@gmail.com"},{"name":"Matthew Keil","email":"me@matthewkeil.com"}],"scripts":{"artifacts":"napi artifacts","check-package-versions":"ts-node ./scripts/checkPackageVersions","clean":"rm -rf ./target ./hashtree/target","build":"napi build --platform --release","build:debug":"napi build --platform","prepublishOnly":"napi prepublish -t npm","test":"jest","universal":"napi universal","version":"napi version"},"devDependencies":{"@napi-rs/cli":"^2.18.0","@types/jest":"^29.1.2","@types/node":"^20.13.0","@typescript-eslint/eslint-plugin":"^6.14.0","@typescript-eslint/parser":"^6.14.0","eslint":"^8.55.0","eslint-plugin-import":"^2.29.0","eslint-plugin-jest":"^28.5.0","eslint-plugin-node":"^11.1.0","eslint-plugin-prettier":"^5.0.1","jest":"^29.1.2","prettier":"^3.1.1","ts-jest":"^29.1.2","ts-node":"^10.9.2","typescript":"^5.2.2"},"peerDependencies":{"@chainsafe/hashtree-darwin-arm64":"1.0.0","@chainsafe/hashtree-linux-x64-gnu":"1.0.0","@chainsafe/hashtree-linux-arm64-gnu":"1.0.0"},"main":"index.js","types":"index.d.ts","napi":{"name":"hashtree","triples":{"defaults":false,"additional":["aarch64-unknown-linux-gnu"]}},"license":"MIT","engines":{"node":">= 18"},"repository":{"type":"git","url":"git+https://github.com/ChainSafe/hashtree-js.git"},"bugs":{"url":"https://github.com/ChainSafe/hashtree-js/issues"},"homepage":"https://github.com/ChainSafe/hashtree-js#readme","optionalDependencies":{"@chainsafe/hashtree-linux-arm64-gnu":"1.0.0"},"_id":"@chainsafe/hashtree@1.0.0","gitHead":"d0793b42a345bd42ef118f3baca98f7bf4768c71","description":"Simple NAPI wrapper around https://github.com/prysmaticlabs/hashtree","_nodeVersion":"20.14.0","_npmVersion":"10.7.0","dist":{"shasum":"529439fb07299758ca5bbe69a00d1dc4ad83a949","size":74708,"noattachment":false,"key":"/@chainsafe/hashtree/-/@chainsafe/hashtree-1.0.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/@chainsafe/hashtree/download/@chainsafe/hashtree-1.0.0.tgz"},"_npmUser":{"name":"wemeetagain","email":"caymannava@gmail.com"},"directories":{},"maintainers":[{"name":"philknows","email":""},{"name":"wemeetagain","email":""}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/hashtree_1.0.0_1717780849589_0.7976789752241327"},"_hasShrinkwrap":false,"_cnpmcore_publish_time":"2024-06-07T17:20:49.836Z","publish_time":1717780849836,"_source_registry_name":"default","_cnpm_publish_time":1717780849836}},"readme":"# @chainsafe/hashtree\n\nSimple NAPI wrapper around https://github.com/prysmaticlabs/hashtree\n\n\n## Example\n\n```ts\nimport {hash, hashInto} from \"@chainsafe/hashtree\"\n\n// input is a Uint8Array of concatenated left-right tuples\nconst input: Uint8Array = Buffer.concat([\n  Buffer.alloc(32), Buffer.alloc(32),\n  Buffer.alloc(32, 1), Buffer.alloc(32, 1),\n])\n\n// output will be a Uint8Array of concatenated output hashes\nconst output = hash(input)\n\n// for example, when compared to node:crypto usage:\nimport {createHash} from \"node:crypto\"\n\nBuffer.compare(\n  createHash(\"sha256\").update(input.slice(0, 64)).digest(),\n  output.slice(0, 32)\n) === 0\nBuffer.compare(\n  createHash(\"sha256\").update(input.slice(64)).digest(),\n  output.slice(32)\n) === 0\n\n// alternative interface with preallocated output\nconst output2 = new Uint8Array(input.length / 2)\nhashInto(input, output2)\n```\n\n## License\n\nMIT","_attachments":{},"homepage":"https://github.com/ChainSafe/hashtree-js#readme","bugs":{"url":"https://github.com/ChainSafe/hashtree-js/issues"},"license":"MIT"}