{"_id":"@aggris2/ssz","_rev":"4-2123afe231986aed58b01235abeb7fdb","name":"@aggris2/ssz","dist-tags":{"latest":"0.10.0"},"versions":{"0.9.2":{"name":"@aggris2/ssz","description":"Simple Serialize","license":"Apache-2.0","author":{"name":"ChainSafe Systems"},"homepage":"https://github.com/chainsafe/ssz","version":"0.9.2","main":"lib/index.js","scripts":{"build":"tsc -p tsconfig.build.json","build-web":"webpack --mode production --entry ./lib/web.js --output ./dist/ssz.min.js","build:docs":"typedoc --exclude src/index.ts,src/web.ts --out docs src","build:release":"yarn clean && yarn run build && yarn build-web && yarn run build:docs","check-types":"tsc --noEmit","clean":"rm -rf lib && rm -rf dist && rm -f tsconfig.tsbuildinfo","lint":"eslint --color --ext .ts src/ test/","lint:fix":"yarn run lint --fix","prepublishOnly":"yarn build","test":"yarn test:unit","benchmark":"node --max-old-space-size=4096 --expose-gc ../../node_modules/.bin/benchmark 'test/perf/*.test.ts'","benchmark:local":"yarn benchmark --local","test:perf":"mocha  \"test/perf/**/*.test.ts\"","test:unit":"nyc mocha  \"test/unit/**/*.test.ts\"","test:spec":"yarn test:spec-generic && yarn test:spec-static","test:spec-generic":"mocha  \"test/spec/generic/**/*.test.ts\"","test:spec-static":"yarn test:spec-static-minimal && yarn test:spec-static-mainnet","test:spec-static-minimal":"LODESTAR_PRESET=minimal mocha test/spec/ssz_static.test.ts","test:spec-static-mainnet":"LODESTAR_PRESET=mainnet mocha test/spec/ssz_static.test.ts","download-spec-tests":"node -r ts-node/register test/spec/downloadTests.ts"},"types":"lib/index.d.ts","dependencies":{"@chainsafe/as-sha256":"^0.3.1","@chainsafe/persistent-merkle-tree":"^0.4.2","case":"^1.6.3"},"devDependencies":{"@types/js-yaml":"^4.0.5","js-yaml":"^3.13.1","snappyjs":"^0.6.1"},"keywords":["ethereum","serenity","simple serialize","ssz"],"gitHead":"d0301303e0da5695b2e86d283f1763b27478a1d5","_id":"@aggris2/ssz@0.9.2","_nodeVersion":"16.18.0","_npmVersion":"8.19.2","dist":{"integrity":"sha512-YrMkS+I/U2+Mxlaq7CSkrblT6lc2VIjhTb3iKHr2KhCXHz3xqyOL3rnSFxb+vAz8ZhKC9DYdXR1onrAMl8xb4A==","shasum":"41c80d6e69197bcedfd1fe167198238757440b49","tarball":"https://registry.npmjs.org/@aggris2/ssz/-/ssz-0.9.2.tgz","fileCount":153,"unpackedSize":466023,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQC1n0na2jMOJ3MMIkZb596Kq1ybIqa0Ms7wZHH75B0PtwIgasR6i4WIpEoJ9gB+jIwDdTkIaV7O+7ZZL9+Bxs4JoGk="}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJje410ACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmq4BRAAgmN75eMQz0c4rAMaeQGNtTzPWqcbWc7RqlU/dICSY/LAF+YF\r\nilz4dpcRF3hTet3Zt/d9THahsgXrTE0yyweME+J5JG7mKIngY8IidNsHC1Rf\r\nqo8HUG4wTivQSWy2szDSzVtnhMQjlZFZJq7SWx/qW3tySnCFcJuOra/IRAtp\r\nXIVWdjC4gYsm7HRHXZzcJDaUSyVfKj4KtfvGDs0iIHoURoUgc2vgHoLfuBJq\r\nCrxZ8hj37EygtY/k4fDT2VPBLBZTx6NofD1rKuFgaGxeEwCs9vvzJ7wla4Ce\r\n34scdtpTk18GOyh9qZ1DhLCF+Mq7MZNYz5mEo2mHAzANDBTFk1SsflFan7El\r\nE142k5YlMqLS/vjEnXBLoUZ/jZesi0+3lqnrN1wIgjV1oxoL2HtKZdvJajNg\r\nIsVM7U0AaF+zJ0dDt5l7IEFSIpHr3PlpghzTpCcqmpJtStXEMKaH3qGx7WLQ\r\nruKh0zW4/lTNRaR0VCJy1QPcIqAHsI1cJHodUK2OkP+VXvRVJ1M3uHmWkxzZ\r\njCzkhC5xigonR6VgNm45Qz+OdG2jOz6TAO3swMSzLLQSO7pJ/JMe+0LFb+GI\r\nd5gdhw9DKVFQVecqA208nBQv7lsTWApQwaDguKrefyrO5n//iq4IdGfFZJ/r\r\n1lKPfvRnOzDqC5RlBsF+HoX7GDBIwak6oXs=\r\n=ib40\r\n-----END PGP SIGNATURE-----\r\n"},"_npmUser":{"name":"frienzy","email":"aggris2@gmail.com"},"directories":{},"maintainers":[{"name":"frienzy","email":"aggris2@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/ssz_0.9.2_1669041524340_0.7638456139049745"},"_hasShrinkwrap":false},"0.9.3":{"name":"@aggris2/ssz","description":"Simple Serialize","license":"Apache-2.0","author":{"name":"ChainSafe Systems"},"homepage":"https://github.com/chainsafe/ssz","version":"0.9.3","main":"lib/index.js","scripts":{"build":"tsc -p tsconfig.build.json","build-web":"webpack --mode production --entry ./lib/web.js --output ./dist/ssz.min.js","build:docs":"typedoc --exclude src/index.ts,src/web.ts --out docs src","build:release":"yarn clean && yarn run build && yarn build-web && yarn run build:docs","check-types":"tsc --noEmit","clean":"rm -rf lib && rm -rf dist && rm -f tsconfig.tsbuildinfo","lint":"eslint --color --ext .ts src/ test/","lint:fix":"yarn run lint --fix","prepublishOnly":"yarn build","test":"yarn test:unit","benchmark":"node --max-old-space-size=4096 --expose-gc ../../node_modules/.bin/benchmark 'test/perf/*.test.ts'","benchmark:local":"yarn benchmark --local","test:perf":"mocha  \"test/perf/**/*.test.ts\"","test:unit":"nyc mocha  \"test/unit/**/*.test.ts\"","test:spec":"yarn test:spec-generic && yarn test:spec-static","test:spec-generic":"mocha  \"test/spec/generic/**/*.test.ts\"","test:spec-static":"yarn test:spec-static-minimal && yarn test:spec-static-mainnet","test:spec-static-minimal":"LODESTAR_PRESET=minimal mocha test/spec/ssz_static.test.ts","test:spec-static-mainnet":"LODESTAR_PRESET=mainnet mocha test/spec/ssz_static.test.ts","download-spec-tests":"node -r ts-node/register test/spec/downloadTests.ts"},"types":"lib/index.d.ts","dependencies":{"@chainsafe/as-sha256":"^0.3.1","@chainsafe/persistent-merkle-tree":"^0.4.2","case":"^1.6.3"},"devDependencies":{"@types/js-yaml":"^4.0.5","js-yaml":"^3.13.1","snappyjs":"^0.6.1"},"keywords":["ethereum","serenity","simple serialize","ssz"],"gitHead":"d0301303e0da5695b2e86d283f1763b27478a1d5","_id":"@aggris2/ssz@0.9.3","_nodeVersion":"16.18.0","_npmVersion":"8.19.2","dist":{"integrity":"sha512-IpiP6K3HZQKR0RqGp54ZlR2FSKGFmvy61PO+ZUU+Im7CA3EBqT9fzqui5szriDahg8qmg+mbTmvRhzuD9RAJkQ==","shasum":"19f5d20db8f5c54b1fb84b3f1acfcdd9a4a11a8b","tarball":"https://registry.npmjs.org/@aggris2/ssz/-/ssz-0.9.3.tgz","fileCount":153,"unpackedSize":466023,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIHW3b9MxRQyJaJ11sFXag7DPzBb/kN9kJoUQDbMgVvFTAiEAlzYG5YqjjIO+O5RuRAH+OKL+QNzoOX/Fb1IT2TTH504="}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJje49TACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmqhjA/9FpBVZRY46LI229rkCCVC/lFyJc7wqMPHMmU+HGxO2ovVdJur\r\ngoydI5NojMXzbb5DZy3hksEtXLKYBCpaZ2daDePRIC1zKiKlesJMlTS2dNws\r\nCiNH+awxgimf7vXBmgs/1MM2dG6XKZlwgBmalL8qPfEl70uKrl23ATnCBwnZ\r\nFYHyyUQ1E9vqdYi2Ri1aFJrF0/SvLhiYWWefJ1mRcum0wnNfGx4ROn9xCHB+\r\n2ap9gBtj9sfUP0NII9m7jAe2WymRsITC2RdTTbhCTe2fXsDK80mSPFIAOeJK\r\nnrVeF5a4kbS+GQQLH5CRhq4vfBseTsLtdzDkIHVeFT0Ma1lgkl3pShAqHnHg\r\nFOV52NiWHPP9+ZRqtZ4dzK6vezBO28LFzvw9HJAW5dEOmdbfvHJy6tppIcPc\r\ngDtEi+myH53kyA7YaY8w8++lg0feMClVj2RWObFpMm8dZ2XQNMy2x03qx/pa\r\njKT02olvFfCc7BXPBuzbf+QxjFHs0jmeLhqasOPcsNec/fpFcmKYfAoxrFMb\r\n3sD3knq7fgbb7fP4BwqRINqfIl+vUFsbCFuRHwA2wqN322ZVgltJhqdx75Dk\r\nDa3DOsYJtdhVwnCQ7jc474B99WTLoTAm/yttNX881oqb5FFGzeSc5wYN4K0H\r\nUV/HppJCaDw4i5FgEr3q1wrFC4q1r6GWfFg=\r\n=7Ddy\r\n-----END PGP SIGNATURE-----\r\n"},"_npmUser":{"name":"frienzy","email":"aggris2@gmail.com"},"directories":{},"maintainers":[{"name":"frienzy","email":"aggris2@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/ssz_0.9.3_1669042003448_0.8727926766654637"},"_hasShrinkwrap":false},"0.9.4":{"name":"@aggris2/ssz","description":"Simple Serialize","license":"Apache-2.0","author":{"name":"ChainSafe Systems"},"homepage":"https://github.com/chainsafe/ssz","version":"0.9.4","main":"lib/index.js","scripts":{"build":"tsc -p tsconfig.build.json","build-web":"webpack --mode production --entry ./lib/web.js --output ./dist/ssz.min.js","build:docs":"typedoc --exclude src/index.ts,src/web.ts --out docs src","build:release":"yarn clean && yarn run build && yarn build-web && yarn run build:docs","check-types":"tsc --noEmit","clean":"rm -rf lib && rm -rf dist && rm -f tsconfig.tsbuildinfo","lint":"eslint --color --ext .ts src/ test/","lint:fix":"yarn run lint --fix","prepublishOnly":"yarn build","test":"yarn test:unit","benchmark":"node --max-old-space-size=4096 --expose-gc ../../node_modules/.bin/benchmark 'test/perf/*.test.ts'","benchmark:local":"yarn benchmark --local","test:perf":"mocha  \"test/perf/**/*.test.ts\"","test:unit":"nyc mocha  \"test/unit/**/*.test.ts\"","test:spec":"yarn test:spec-generic && yarn test:spec-static","test:spec-generic":"mocha  \"test/spec/generic/**/*.test.ts\"","test:spec-static":"yarn test:spec-static-minimal && yarn test:spec-static-mainnet","test:spec-static-minimal":"LODESTAR_PRESET=minimal mocha test/spec/ssz_static.test.ts","test:spec-static-mainnet":"LODESTAR_PRESET=mainnet mocha test/spec/ssz_static.test.ts","download-spec-tests":"node -r ts-node/register test/spec/downloadTests.ts"},"types":"lib/index.d.ts","dependencies":{"@chainsafe/as-sha256":"^0.3.1","@chainsafe/persistent-merkle-tree":"^0.4.2","case":"^1.6.3"},"devDependencies":{"@types/js-yaml":"^4.0.5","js-yaml":"^3.13.1","snappyjs":"^0.6.1"},"keywords":["ethereum","serenity","simple serialize","ssz"],"gitHead":"d0301303e0da5695b2e86d283f1763b27478a1d5","_id":"@aggris2/ssz@0.9.4","_nodeVersion":"16.18.0","_npmVersion":"8.19.2","dist":{"integrity":"sha512-tmyaN3QBYL/VWFfpahrj8PPihwCJBWcRQQ06Fmh5bFwycJCeqkUtGc89xSYS0l6RbVEWlPkiG9vdLi0F6qaytg==","shasum":"8137a2f1ef485d5caf86dad9de81fbdc275f61cd","tarball":"https://registry.npmjs.org/@aggris2/ssz/-/ssz-0.9.4.tgz","fileCount":153,"unpackedSize":466023,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCDFg7JfJHgYXUI+JGQ0XIL6UVamT99Az3ohWHtccClygIgUmS53AgbTl5ODR72j2p2cfQv0wMSkSRSA1cNQ5L50No="}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJje5FZACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmphAw//VGkW4ltCiQ/lBrXJh924GSyFhYELLcEGGYmjfClSyIuOxasx\r\n9kSBqyl+Oi0bQK+jAGjSn6PtHoWM+WKqQLDE2zx3EC5cgfMA19vZnh90XwVf\r\nyjbYGz2fI1irMmgqVSSzc8jROuWp5zuE0+chHkKgiAKoiNPkYjC7a0HHjA/u\r\nQxAn4YBCpbYlGleCDKcvmvBnuNtFZa2YdXk6cnlDkINFOdARcnPORlvA1CHO\r\nyLP1T7B8JD0+2cWZrwvlxsiBIiWghmdygO+kO6kpsQwlCpT6lng0geGtvI+a\r\ny0LfbbbU3k4T/GnmQXtueORU56C0KfoJqMFIUnrZUh4f1voWnxdMf7FNRPOK\r\nVlb4wvWz6qqFaA1BoO339ERIZ+EEfpkvMCNEqGd9W0woctusDxyf7nYIq2af\r\n+tYH9gz8HE6HoKkQdb9erNEAuNvqfJwS/THHcpdNqKK6WOQUZvEP62C/2Bj9\r\nszqPAKMrFD5LR5P2ZwSgP3a06NkYHkJOsoTCfVHm8EpGRdW/4dfANodQKt7O\r\neDGtsjtSmFSbbSioIdjPvSDyC5tX8aXoaT2oB7NKMaSZOxcjZE2zbWVVPP7W\r\n0wTUVEyzOi2CQJoGNkkmOgC5j9z2ncvAjuM0XKVy2iY8P0FxAAcUS1WfCR7K\r\nihE0ERPZLtjizIw+gLJGspAQluCvJxjtatc=\r\n=fYTp\r\n-----END PGP SIGNATURE-----\r\n"},"_npmUser":{"name":"frienzy","email":"aggris2@gmail.com"},"directories":{},"maintainers":[{"name":"frienzy","email":"aggris2@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/ssz_0.9.4_1669042521438_0.8850182103809532"},"_hasShrinkwrap":false},"0.9.5":{"name":"@aggris2/ssz","description":"Simple Serialize","license":"Apache-2.0","author":{"name":"ChainSafe Systems"},"homepage":"https://github.com/chainsafe/ssz","version":"0.9.5","main":"lib/index.js","scripts":{"build":"tsc -p tsconfig.build.json","build-web":"webpack --mode production --entry ./lib/web.js --output ./dist/ssz.min.js","build:docs":"typedoc --exclude src/index.ts,src/web.ts --out docs src","build:release":"yarn clean && yarn run build && yarn build-web && yarn run build:docs","check-types":"tsc --noEmit","clean":"rm -rf lib && rm -rf dist && rm -f tsconfig.tsbuildinfo","lint":"eslint --color --ext .ts src/ test/","lint:fix":"yarn run lint --fix","prepublishOnly":"yarn build","test":"yarn test:unit","benchmark":"node --max-old-space-size=4096 --expose-gc ../../node_modules/.bin/benchmark 'test/perf/*.test.ts'","benchmark:local":"yarn benchmark --local","test:perf":"mocha  \"test/perf/**/*.test.ts\"","test:unit":"nyc mocha  \"test/unit/**/*.test.ts\"","test:spec":"yarn test:spec-generic && yarn test:spec-static","test:spec-generic":"mocha  \"test/spec/generic/**/*.test.ts\"","test:spec-static":"yarn test:spec-static-minimal && yarn test:spec-static-mainnet","test:spec-static-minimal":"LODESTAR_PRESET=minimal mocha test/spec/ssz_static.test.ts","test:spec-static-mainnet":"LODESTAR_PRESET=mainnet mocha test/spec/ssz_static.test.ts","download-spec-tests":"node -r ts-node/register test/spec/downloadTests.ts"},"types":"lib/index.d.ts","dependencies":{"@chainsafe/as-sha256":"^0.3.1","@chainsafe/persistent-merkle-tree":"^0.4.2","case":"^1.6.3"},"devDependencies":{"@types/js-yaml":"^4.0.5","js-yaml":"^3.13.1","snappyjs":"^0.6.1"},"keywords":["ethereum","serenity","simple serialize","ssz"],"gitHead":"bc607ad5e83ead547a2a03ac197aebc51f0cfc97","_id":"@aggris2/ssz@0.9.5","_nodeVersion":"16.18.0","_npmVersion":"lerna/3.22.1/node@v16.18.0+x64 (linux)","dist":{"integrity":"sha512-ZDzjes+X0t/a7qEI3wUlGK2MPHWzs6tuIPs/EyADGwWjQZ4XMx/OGou8q2prB1Kpuz0mLzEy87sx2+WodPsKpw==","shasum":"ead1c9a6cac7e8e184ce9b52e12c7541bc43b66e","tarball":"https://registry.npmjs.org/@aggris2/ssz/-/ssz-0.9.5.tgz","fileCount":154,"unpackedSize":474775,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCICJ0rn6u1PY/EKzXazDc2qwthk3XpSLfY5JWHbsL/gH5AiAIHhSKZV9AA+oWq7X8NL/k1/HivX4uzu8oJMM8zBCPfw=="}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJje6FzACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmq45xAAlnHtUzyNgqcG4EkIADZO1Op8YU8OPIa6fP5BdKFlDmOtT7TD\r\n/WkdDK69VzSfIpOv1tev5H538Se79agTa6QCn64sAMl3Sz+BsjX1C0GaxH1N\r\n6um29ylPbsiilDhCMp+89q4qMSOImRED+7AOphr3Qgl6k9d6pl9oPPESNQdX\r\nRMEey6fAiy09Zgih/tbHr0qQRsFiyivrBH7gu3kHAmVD+jr5LrsifPrms/vZ\r\n9JYqMK2VVOfIiGRiqZK6bT43PYsSSfMp+ZmvopnHzklsVApJKdeCi4Vtp//M\r\nuWiDzaQQmQgMyfejwKex1PJ4Zw9Hu+1tN4pttrrlEbmLGSiqLT6tueaWudg1\r\nQlFqRjz82N7bWhTBrFuajliM1DQtiDmncX0XgAouEdt4R/CUZJx1He5BzYPr\r\nIU84xXT3pdsRQNGQZod2Z7NLivE+Rhuo1zrJ1Y1LNF3p0cTPq5BL95HNxm6/\r\nPu2YaL19LAWSQJe1+PCpoOLxu5U4rFC6awvVG3BfQQJaQ6Lk3NxpUJWXzmNI\r\nLS4jQz4EePsPKdYs+WweVJSwsmZU3uIJuwk7/LS7+byuXDiljuVZL6E0DAjf\r\nxDUjLKAykxPr9TmXEWYgV98EkdI82xRhCVCnlTtfxfz1mNSQ/ME1TVDX+Gf0\r\n70CtlifwYp1H52b1NK58qBHA5gISYmMUwVQ=\r\n=PXvA\r\n-----END PGP SIGNATURE-----\r\n"},"_npmUser":{"name":"frienzy","email":"aggris2@gmail.com"},"directories":{},"maintainers":[{"name":"frienzy","email":"aggris2@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/ssz_0.9.5_1669046643332_0.08502781106991764"},"_hasShrinkwrap":false},"0.10.0":{"name":"@aggris2/ssz","description":"Simple Serialize","license":"Apache-2.0","author":{"name":"ChainSafe Systems"},"homepage":"https://github.com/chainsafe/ssz","version":"0.10.0","main":"lib/index.js","scripts":{"build":"tsc -p tsconfig.build.json","build-web":"webpack --mode production --entry ./lib/web.js --output ./dist/ssz.min.js","build:docs":"typedoc --exclude src/index.ts,src/web.ts --out docs src","build:release":"yarn clean && yarn run build && yarn build-web && yarn run build:docs","check-types":"tsc --noEmit","clean":"rm -rf lib && rm -rf dist && rm -f tsconfig.tsbuildinfo","lint":"eslint --color --ext .ts src/ test/","lint:fix":"yarn run lint --fix","prepublishOnly":"yarn build","test":"yarn test:unit","benchmark":"node --max-old-space-size=4096 --expose-gc ../../node_modules/.bin/benchmark 'test/perf/*.test.ts'","benchmark:local":"yarn benchmark --local","test:perf":"mocha  \"test/perf/**/*.test.ts\"","test:unit":"nyc mocha  \"test/unit/**/*.test.ts\"","test:spec":"yarn test:spec-generic && yarn test:spec-static","test:spec-generic":"mocha  \"test/spec/generic/**/*.test.ts\"","test:spec-static":"yarn test:spec-static-minimal && yarn test:spec-static-mainnet","test:spec-static-minimal":"LODESTAR_PRESET=minimal mocha test/spec/ssz_static.test.ts","test:spec-static-mainnet":"LODESTAR_PRESET=mainnet mocha test/spec/ssz_static.test.ts","download-spec-tests":"node -r ts-node/register test/spec/downloadTests.ts"},"types":"lib/index.d.ts","dependencies":{"@chainsafe/as-sha256":"^0.3.2","@chainsafe/persistent-merkle-tree":"^0.4.3","case":"^1.6.3"},"devDependencies":{"@types/js-yaml":"^4.0.5","js-yaml":"^3.13.1","snappyjs":"^0.6.1"},"keywords":["ethereum","serenity","simple serialize","ssz"],"gitHead":"de63de6e1ae01f4f913de489387ec1f9ad87be15","_id":"@aggris2/ssz@0.10.0","_nodeVersion":"16.18.0","_npmVersion":"8.19.2","dist":{"integrity":"sha512-TGwAQ5Pfu3Es14uHEYbtXuQBI17CV4OjDbpMNgFvg3/1nvwp551xgfxO4qpTwUQNumD6fXe/9LRANFoe7oOZWQ==","shasum":"bac21ac4a8b464d4adbbb009189320d2c5eaafbf","tarball":"https://registry.npmjs.org/@aggris2/ssz/-/ssz-0.10.0.tgz","fileCount":153,"unpackedSize":466036,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIFxI7ESJcb0r9Mtq6Of0RK4GJzW1U1Og0qIvnReHciDjAiEAoLH6g5v6tfy+2qIAqIJSBYGRiRE7jBGZKNFEc6fuYcY="}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJje6UDACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmpMvg/8CNdtCIilNabsYlou37BAzcAKrxFbUEn5Wo2xid/jrtPTl0ud\r\nFnjQc4TAQoBsC6WMUQHNDsKzm0t+Lqv1cj6lq6ldJWIjxkFjnNMS0AvX7+IO\r\nNS7hT5zFo0aVzuJF/7O+asZH3IU2699+zr7tGlm0vKzKOJTM1T2tIzfxfV/1\r\nUZpIhk6zwpUXLaXTnkuqdm2BD/NF6thBXHpTQv/K1CsLF4AGDxUYZqFufZQ6\r\nd7e/dvpGMhQ++eFB7PgDJz3tAnwcYKyIAz2uD8narzGNomkcmOdsa3bFQSdK\r\npKN4oNX+Xv+Z5bijzAOVvzKg5lkg+Rp89nV0ryxF49a7Dq5qf4lTZs4p/uyw\r\ntD20M5/Yn+2RZu5YhMnrekp1nHfZVTkdFObjanf/ElL5iCxod2kxi1FWv446\r\nHEITZJgrKUSy8ADAU/LkEKxaNSM6UgEQvdKz0JVhe9LcYOerMtjUaQpaGZq9\r\nzph/Lg1f/0V0B7CMlKMoWQCBFOq0/LQjoDsECQ9BpdNmBL1bKW6KnykQQQGe\r\nC5dNKkHfOrZqhUi/vtS5Rz70papzgGt2IuJgvGW9CzmmHMmrPOI+qTkKXxvB\r\nxLGQSZnUfYQFOewj+Y0fIFNBohU8S/KjresT0bgwMd5NECnL7tsRHYXKi1Gg\r\nhZwMADQUgxPS1ZIyg5PAO0CaQfBNpAkB3tA=\r\n=4ojJ\r\n-----END PGP SIGNATURE-----\r\n"},"_npmUser":{"name":"frienzy","email":"aggris2@gmail.com"},"directories":{},"maintainers":[{"name":"frienzy","email":"aggris2@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/ssz_0.10.0_1669047554883_0.9049755317683938"},"_hasShrinkwrap":false}},"time":{"created":"2022-11-21T14:38:44.243Z","0.9.2":"2022-11-21T14:38:44.501Z","modified":"2022-11-21T16:19:15.181Z","0.9.3":"2022-11-21T14:46:43.629Z","0.9.4":"2022-11-21T14:55:21.642Z","0.9.5":"2022-11-21T16:04:03.534Z","0.10.0":"2022-11-21T16:19:15.089Z"},"maintainers":[{"name":"frienzy","email":"aggris2@gmail.com"}],"description":"Simple Serialize","homepage":"https://github.com/chainsafe/ssz","keywords":["ethereum","serenity","simple serialize","ssz"],"author":{"name":"ChainSafe Systems"},"license":"Apache-2.0","readme":"# ssz\n\n![ES Version](https://img.shields.io/badge/ES-2020-yellow)\n![Node Version](https://img.shields.io/badge/node-12.x-green)\n\n## Summary\n\n[Simple Serialize (SSZ)](https://github.com/ethereum/consensus-specs/blob/dev/ssz/simple-serialize.md) is a consensus layer standard that defines how consensus objects are serialized and merkleized.\n\nSSZ is a type system that defines:\n\n- efficient serialization / deserialization\n- stable merkleization\n- default constructor\n\nAdditionally, this library allows for additional operations:\n\n- create and consume proofs\n- to / from json-serializable object\n- copy / clone\n\n## Install\n\n`npm install @chainsafe/ssz`\n\n## Usage\n\n```typescript\nimport {ContainerType, ByteVectorType} from \"@chainsafe/ssz\";\n\n// Creates a \"Keypair\" SSZ data type (a private key of 32 bytes, a public key of 48 bytes)\nconst Keypair = new ContainerType({\n    privateKey: new ByteVectorType(32),\n    publicKey: new ByteVectorType(48),\n  },\n});\n\n// The type value of any SSZ types are derived with `ValueOf`\nimport {ValueOf} from \"@chainsafe/ssz\";\ntype Keypair = ValueOf<typeof Keypair>\n\n// Now you can perform different operations on Keypair objects\nconst keypair = Keypair.defaultValue(); // Create a default Keypair\n\nkeypair.privateKey; // => Uint8Array [0,0,0,...], length 32\nkeypair.publicKey; // => Uint8Array [0,0,0, ...], length 48\n\n// serialize the object to a byte array\nconst serialized: Uint8Array = Keypair.serialize(keypair);\n\n// get the merkle root of the object\nconst root: Uint8Array = Keypair.hashTreeRoot(keypair);\n\n// create a copy of the object\nconst keypair2: Keypair = Keypair.clone(kp);\n\n// deserialize a serialized object\nconst keypair3: Keypair = Keypair.deserialize(serialized);\n\n// Convert to JSON-serializable representation\n// (binary data is converted to hex strings)\nconst keypairJSON = Keypair.toJson(keypair);\nconst keypairJSONStr = JSON.stringify(jsonKp);\n\n// convert the json-serializable representation to the object\nconst keypair4: Keypair = Keypair.fromJson(keypairJSON);\n\n// The merkle-tree-backed representation of a Keypair may be created / operated on\nconst keypairView: TreeBacked<Keypair> = Keypair.toView(keypair)\n\n// All of the same operations can be performed on tree-backed values\nkeypairView.serialize();\n```\n\n### Ethereum consensus objects\n\nFor Ethereum consensus datatypes (eg: `BeaconBlock`, `DepositData`, `BeaconState`, etc), see [`@chainsafe/lodestar-types`](https://github.com/ChainSafe/lodestar/tree/master/packages/lodestar-types).\n\n## Additional notes\n\n### Backings\n\nThis library operates on values of two kinds of 'backings', or underlying representations of data. Each backing has runtime tradeoffs for the above operations that arise from the nature of the underlying representation.\n\nPrior versions of this library attempted to fully align the interfaces between operations on various backings. This has the side effect of obscuring the underlying representation in downstream code, which is undesirable when maintaining code that requires higher levels control, eg: performance-critical code. This library no longer supports interchanging values with different backings, and exported APIs clearly distinguish between backings.\n\nWe support the following backings:\n\n- Value - This backing has a native javascript type representation.\n\nContainers are constructed as Javascript Objects, vectors and lists as Arrays (or TypedArrays). Type methods `type.serialize`. `type.deserialize`, `type.hashTreeRoot`, and `type.defaultValue` all operate on values.\n\n- Tree - This backing has an immutable merkle tree representation.\n\nThe data is represented as a full merkle tree, composed of immutable, linked nodes. (See [`@chainsafe/persistent-merkle-tree`](https://github.com/ChainSafe/ssz/tree/master/packages/persistent-merkle-tree)), wrapped as a \"tree view\". Two types of tree view are provided, a simple wrapper, and a wrapper with more caching and batched updates.\n\n### Tree View\n\nA tree view is a wrapper around a `Tree` and a `Type` that provides methods for convenient property access and ssz operations.\n\nProperty getters return sub-views, except for basic types, which return native values. Setters, likewise, require sub-views, except for basic types, which require native views.\n\nThis tree view is a simple wrapper to tree backed data that commits any changes immediately to the tree. Changes are propagated upwards to the root parent tree.\n\n```ts\n// Create a type\nconst C = new ContainerType({\n  a: new VectorBasicType(new UintNumberType(1), 2),\n});\n\n// Create a tree view based on the default value\nconst c = C.defaultView();\n\n// SSZ operations\nc.serialize() === C.hashTreeRoot(C.defaultValue());\nconst root = c.hashTreeRoot();\n\n// Getters\nc.a.get(0) === 0;\n\n// Setters\n// Changes are applied immediately to the tree\nc.a.set(0, 1);\n\n// Subsequent calls to `hashTreeRoot` reflect the changes to the tree\nassert(root.toString() !== c.hashTreeRoot().toString());\n```\n\nIf you need to do many mutations at once see **ViewDU**, which defers all updates to a later `commit` step, paying the cost of updating the tree only once.\n\n**Subview behaviour**\n\nView implementations don't contain any internal caches beyond their internal `Tree`s, and setting one subview to another will not link the views.\n\n```ts\nconst c1 = C.toView({a: [0, 0]});\nconst c2 = C.toView({a: [1, 1]});\n\n// c1's Tree now includes the root node of `c2.a` but no references to `c2.a` view\n// Warning: this is different behaviour than ViewDU\nc1.a = c2.a;\n\n// This statement mutates ONLY c1 data\nc1.a.set(0, 2);\n// This statement mutates ONLY c2 data\nc2.a.set(0, 3);\n```\n\n### Tree ViewDU\n\nViewDU = View Deferred Update. This tree view caches all mutations to data and applies the changes to the tree only when requested by calling the `commit` method. This allows to pay to cost of navigating and updating the tree only once. This strategy is optimal for large tree manipulations that require very high performance (i.e. the Ethereum consensus beacon chain state transition).\n\n```ts\n// Create a type\nconst C = new ContainerType({\n  a: new VectorBasicType(new UintNumberType(1), 2),\n});\n\n// Create a tree view DU based on the default value\nconst c = C.defaultViewDU();\n\n// SSZ operations\nc.serialize() === C.hashTreeRoot(C.defaultValue());\nconst root = c.hashTreeRoot();\n\n// Getters\nc.a.get(0) === 0;\n\n// Setters\n// Changes are NOT applied immediately to the tree\nc.a.set(0, 1);\n\n// Subsequent calls to `hashTreeRoot` do NOT reflect the changes to the tree\nassert(root.toString() === c.hashTreeRoot().toString());\n\n// Until commit is called\nc.commit();\n\nassert(root.toString() !== c.hashTreeRoot().toString());\n```\n\n**Key features**\n\n- Defer tree updates until `commit` is called, allowing multiple nodes to tree to be set in a batch and navigating through the tree at most once\n- Persist caches of sub-properties to prevent tree navigation when re-reading data.\n\n**Subview behaviour**\n\nDue to having mutable caches for children properties, setting a subview from one view to the subview of another view will link the two by referencing the same underlying cache.\n\n```ts\nconst c1 = C.toViewDU({a: [0, 0]});\nconst c2 = C.toViewDU({a: [1, 1]});\n\n// Now both c1 and c2 have a reference to the exact same cached child view\n// Warning: this is different behaviour than View\nc1.a = c2.a;\n\n// This statement mutates c1 AND c2 data\nc1.a.set(0, 2);\n// This statement mutates c1 AND c2 data\nc2.a.set(0, 3);\n```\n\n## License\n\nApache 2.0\n","readmeFilename":"README.md"}