{"_id":"@0gfoundation/0g-storage-ts-sdk","_rev":"7-f3aa25c405f9e4f17ac9a05239ca369e","name":"@0gfoundation/0g-storage-ts-sdk","dist-tags":{"latest":"1.2.12"},"versions":{"1.2.8":{"name":"@0gfoundation/0g-storage-ts-sdk","version":"1.2.8","keywords":[],"author":{"name":"0G Labs"},"license":"ISC","_id":"@0gfoundation/0g-storage-ts-sdk@1.2.8","maintainers":[{"name":"overi","email":"ibrahim.over@0g.ai"},{"name":"0g-jiahao","email":"jiahao@0g.ai"},{"name":"0g-xie","email":"xie@0g.ai"},{"name":"0g-peterzhang","email":"peter@0g.ai"}],"homepage":"https://github.com/0gfoundation/0g-ts-sdk#readme","bugs":{"url":"https://github.com/0gfoundation/0g-ts-sdk/issues"},"dist":{"shasum":"1aa93acd62a5c4113afe05a3dec80895a458e95e","tarball":"https://registry.npmjs.org/@0gfoundation/0g-storage-ts-sdk/-/0g-storage-ts-sdk-1.2.8.tgz","fileCount":530,"integrity":"sha512-MpUAgCd96Sv769GKD0qTZtOSnOeEHERgyaCn+x+KMAgf4oKqSNrxPGEDGLxihrP3vV+Hz/xhRggmQnwBi64iLA==","signatures":[{"sig":"MEQCIH/2yzDeGpV8AIwCwsJaS6LGxc511l0TIza1NjjwzHshAiAAzLvyWxzUwyVJINNagoYNQLLtb1hxpaTD/Q7I7Zv6vA==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":5466071},"main":"./lib.commonjs/index.js","types":"./types/index.d.ts","module":"./lib.esm/index.js","exports":{".":{"types":"./types/index.d.ts","import":"./lib.esm/index.js","default":"./lib.esm/index.js","require":"./lib.commonjs/index.js"},"./browser":{"types":"./lib.esm/index.d.ts","import":"./dist/zgstorage.esm.js","default":"./dist/zgstorage.esm.min.js","require":"./dist/zgstorage.umd.min.js"}},"gitHead":"c55c1d5040c4de226b439194b8a7254da6b99e6f","scripts":{"test":"jest","clean":"rm -rf dist lib.esm lib.commonjs types","format":"prettier --write src.ts/**/*.ts src.ts/*.ts","release":"npm run build-all && npm run gen-type-package-json && npm run build-dist","build-all":"npm run clean && tsc -b tsconfig.esm.json tsconfig.commonjs.json tsconfig.types.json","build-cjs":"tsc --project tsconfig.commonjs.json","build-esm":"tsc --project tsconfig.esm.json","build-dist":"npm run build-esm && npm run _build-dist && npm run _dist-stats","_build-dist":"rollup -c && uglifyjs ./dist/zgstorage.esm.js -o ./dist/zgstorage.esm.min.js && uglifyjs ./dist/zgstorage.umd.js -o ./dist/zgstorage.umd.min.js","_dist-stats":"gzip -k9f -S '.gz' ./dist/zgstorage.esm.min.js && gzip -k9f -S '.gz' ./dist/zgstorage.umd.min.js && du -hs ./dist/*.gz && echo '' && du -hs ./dist/*.js","gen-type-package-json":"echo '{\"type\": \"commonjs\"}' > ./lib.commonjs/package.json && echo '{\"type\": \"module\"}' > ./lib.esm/package.json","gen-contract-type-flow":"typechain --target ethers-v6 --node16-modules --out-dir src.ts/contracts/flow '../0g-storage-contracts/artifacts/contracts/dataFlow/FixedPriceFlow.sol/FixedPriceFlow.json'","gen-contract-type-market":"typechain --target ethers-v6 --node16-modules --out-dir src.ts/contracts/market '../0g-storage-contracts/artifacts/contracts/market/FixedPrice.sol/FixedPrice.json'"},"_npmUser":{"name":"0g-peterzhang","email":"peter@0g.ai"},"repository":{"url":"git+https://github.com/0gfoundation/0g-ts-sdk.git","type":"git"},"_npmVersion":"11.7.0","description":"JS/TS SDK for 0G Storage","directories":{},"_nodeVersion":"20.19.1","dependencies":{"@noble/curves":"^1.9.7","@noble/hashes":"^1.8.0","@noble/ciphers":"^1.3.0","@ethersproject/bytes":"^5.7.0","open-jsonrpc-provider":"^0.2.1","@ethersproject/keccak256":"^5.7.0"},"_hasShrinkwrap":false,"packageManager":"pnpm@8.7.1","devDependencies":{"jest":"^29.6.4","tslib":"^2.6.2","rollup":"^3.28.1","js-sha3":"^0.9.1","ts-jest":"^29.1.1","ts-node":"^10.9.1","typechain":"^8.3.1","uglify-js":"^3.17.4","typescript":"^5.2.2","@types/jest":"^29.5.4","@types/node":"^20.5.9","@typechain/ethers-v6":"^0.5.0","@rollup/plugin-commonjs":"^25.0.4","@rollup/plugin-node-resolve":"^15.2.1","rollup-plugin-polyfill-node":"^0.12.0"},"peerDependencies":{"ethers":"6.13.1"},"_npmOperationalInternal":{"tmp":"tmp/0g-storage-ts-sdk_1.2.8_1777548266781_0.8858363221656271","host":"s3://npm-registry-packages-npm-production"}},"1.2.9":{"name":"@0gfoundation/0g-storage-ts-sdk","version":"1.2.9","keywords":[],"author":{"name":"0G Foundation"},"license":"ISC","_id":"@0gfoundation/0g-storage-ts-sdk@1.2.9","maintainers":[{"name":"overi","email":"ibrahim.over@0g.ai"},{"name":"0g-jiahao","email":"jiahao@0g.ai"},{"name":"0g-will","email":"will.riches@0g.ai"},{"name":"0g-xie","email":"xie@0g.ai"},{"name":"0g-peterzhang","email":"peter@0g.ai"}],"homepage":"https://github.com/0gfoundation/0g-storage-ts-sdk#readme","bugs":{"url":"https://github.com/0gfoundation/0g-storage-ts-sdk/issues"},"dist":{"shasum":"b8e7d4a489950e03fe434304066e7776bc464065","tarball":"https://registry.npmjs.org/@0gfoundation/0g-storage-ts-sdk/-/0g-storage-ts-sdk-1.2.9.tgz","fileCount":531,"integrity":"sha512-k8nugJe68EhF+6LiTcDTvgxoxKppo3SBgFT9mJD74IdOrhKALoFZEroFU1EFoPZ7X8TmS68a7FmtYAeWB9LrIg==","signatures":[{"sig":"MEQCIBsrs2w2HIFwlCV7XRPl69FrsRVMn+teAqryyaNmMHI1AiB8sViNUMJ6s/iMZQWU+jAV1LSG4jp6Cg0U0dvA8aMrFA==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":5468268},"main":"./lib.commonjs/index.js","_from":"file:0gfoundation-0g-storage-ts-sdk-1.2.9.tgz","types":"./types/index.d.ts","module":"./lib.esm/index.js","exports":{".":{"types":"./types/index.d.ts","import":"./lib.esm/index.js","default":"./lib.esm/index.js","require":"./lib.commonjs/index.js"},"./browser":{"types":"./lib.esm/index.d.ts","import":"./dist/zgstorage.esm.js","default":"./dist/zgstorage.esm.min.js","require":"./dist/zgstorage.umd.min.js"}},"scripts":{"test":"jest","clean":"rm -rf dist lib.esm lib.commonjs types","format":"prettier --write src.ts/**/*.ts src.ts/*.ts","release":"npm run build-all && npm run gen-type-package-json && npm run build-dist","build-all":"npm run clean && tsc -b tsconfig.esm.json tsconfig.commonjs.json tsconfig.types.json","build-cjs":"tsc --project tsconfig.commonjs.json","build-esm":"tsc --project tsconfig.esm.json","build-dist":"npm run build-esm && npm run _build-dist && npm run _dist-stats","_build-dist":"rollup -c && uglifyjs ./dist/zgstorage.esm.js -o ./dist/zgstorage.esm.min.js && uglifyjs ./dist/zgstorage.umd.js -o ./dist/zgstorage.umd.min.js","_dist-stats":"gzip -k9f -S '.gz' ./dist/zgstorage.esm.min.js && gzip -k9f -S '.gz' ./dist/zgstorage.umd.min.js && du -hs ./dist/*.gz && echo '' && du -hs ./dist/*.js","gen-type-package-json":"echo '{\"type\": \"commonjs\"}' > ./lib.commonjs/package.json && echo '{\"type\": \"module\"}' > ./lib.esm/package.json","gen-contract-type-flow":"typechain --target ethers-v6 --node16-modules --out-dir src.ts/contracts/flow '../0g-storage-contracts/artifacts/contracts/dataFlow/FixedPriceFlow.sol/FixedPriceFlow.json'","gen-contract-type-market":"typechain --target ethers-v6 --node16-modules --out-dir src.ts/contracts/market '../0g-storage-contracts/artifacts/contracts/market/FixedPrice.sol/FixedPrice.json'"},"_npmUser":{"name":"0g-will","email":"will.riches@0g.ai"},"_resolved":"/private/var/folders/nc/t8g1bhcs247219kjv6l163gr0000gn/T/54227a35463f45f1d1fb82841f946285/0gfoundation-0g-storage-ts-sdk-1.2.9.tgz","_integrity":"sha512-k8nugJe68EhF+6LiTcDTvgxoxKppo3SBgFT9mJD74IdOrhKALoFZEroFU1EFoPZ7X8TmS68a7FmtYAeWB9LrIg==","repository":{"url":"git+https://github.com/0gfoundation/0g-storage-ts-sdk.git","type":"git"},"_npmVersion":"11.6.2","description":"JS/TS SDK for 0G Storage","directories":{},"_nodeVersion":"25.2.0","dependencies":{"@noble/curves":"^1.9.7","@noble/hashes":"^1.8.0","@noble/ciphers":"^1.3.0","@ethersproject/bytes":"^5.7.0","open-jsonrpc-provider":"^0.2.1","@ethersproject/keccak256":"^5.7.0"},"_hasShrinkwrap":false,"packageManager":"pnpm@8.7.1","devDependencies":{"jest":"^29.6.4","tslib":"^2.6.2","rollup":"^3.28.1","js-sha3":"^0.9.1","ts-jest":"^29.1.1","ts-node":"^10.9.1","typechain":"^8.3.1","uglify-js":"^3.17.4","typescript":"^5.2.2","@types/jest":"^29.5.4","@types/node":"^20.5.9","@typechain/ethers-v6":"^0.5.0","@rollup/plugin-commonjs":"^25.0.4","@rollup/plugin-node-resolve":"^15.2.1","rollup-plugin-polyfill-node":"^0.12.0"},"peerDependencies":{"ethers":"6.13.1"},"_npmOperationalInternal":{"tmp":"tmp/0g-storage-ts-sdk_1.2.9_1777977118921_0.24949786268588126","host":"s3://npm-registry-packages-npm-production"}},"1.2.10":{"name":"@0gfoundation/0g-storage-ts-sdk","version":"1.2.10","keywords":[],"author":{"name":"0G Foundation"},"license":"ISC","_id":"@0gfoundation/0g-storage-ts-sdk@1.2.10","maintainers":[{"name":"overi","email":"ibrahim.over@0g.ai"},{"name":"0g-jiahao","email":"jiahao@0g.ai"},{"name":"0g-will","email":"will.riches@0g.ai"},{"name":"0g-xie","email":"xie@0g.ai"},{"name":"0g-peterzhang","email":"peter@0g.ai"}],"homepage":"https://github.com/0gfoundation/0g-storage-ts-sdk#readme","bugs":{"url":"https://github.com/0gfoundation/0g-storage-ts-sdk/issues"},"dist":{"shasum":"a422754795d3ba6a366fca008657c1907d539952","tarball":"https://registry.npmjs.org/@0gfoundation/0g-storage-ts-sdk/-/0g-storage-ts-sdk-1.2.10.tgz","fileCount":560,"integrity":"sha512-Ry2VXsFAZMSQMkv0hX6QPA9CyF+Eed2z3BNHggaQDi/pZTc9WP55MzGVTGiqxbNhCMwyJRrhTRJBY0ZAGgkkAw==","signatures":[{"sig":"MEQCIBHzGXBFFGd+4nZ0Uxg9bXmi8NaRo32GBnRWUaG22yEMAiA2yRmAvFDOd9ad3xjeGq3XYZQm41FmeT+Jn7p5qtVBLQ==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":5523741},"main":"./lib.commonjs/index.js","types":"./types/index.d.ts","module":"./lib.esm/index.js","exports":{".":{"types":"./types/index.d.ts","import":"./lib.esm/index.js","default":"./lib.esm/index.js","require":"./lib.commonjs/index.js"},"./browser":{"types":"./lib.esm/index.d.ts","import":"./dist/zgstorage.esm.js","default":"./dist/zgstorage.esm.min.js","require":"./dist/zgstorage.umd.min.js"}},"gitHead":"2b4b07d5011eeed64f0f2c7a63639e3df6198932","scripts":{"test":"jest","clean":"rm -rf dist lib.esm lib.commonjs types","format":"prettier --write src.ts/**/*.ts src.ts/*.ts","release":"npm run build-all && npm run gen-type-package-json && npm run build-dist","build-all":"npm run clean && tsc -b tsconfig.esm.json tsconfig.commonjs.json tsconfig.types.json","build-cjs":"tsc --project tsconfig.commonjs.json","build-esm":"tsc --project tsconfig.esm.json","build-dist":"npm run build-esm && npm run _build-dist && npm run _dist-stats","_build-dist":"rollup -c && uglifyjs ./dist/zgstorage.esm.js -o ./dist/zgstorage.esm.min.js && uglifyjs ./dist/zgstorage.umd.js -o ./dist/zgstorage.umd.min.js","_dist-stats":"gzip -k9f -S '.gz' ./dist/zgstorage.esm.min.js && gzip -k9f -S '.gz' ./dist/zgstorage.umd.min.js && du -hs ./dist/*.gz && echo '' && du -hs ./dist/*.js","gen-type-package-json":"echo '{\"type\": \"commonjs\"}' > ./lib.commonjs/package.json && echo '{\"type\": \"module\"}' > ./lib.esm/package.json","gen-contract-type-flow":"typechain --target ethers-v6 --node16-modules --out-dir src.ts/contracts/flow '../0g-storage-contracts/artifacts/contracts/dataFlow/FixedPriceFlow.sol/FixedPriceFlow.json'","gen-contract-type-market":"typechain --target ethers-v6 --node16-modules --out-dir src.ts/contracts/market '../0g-storage-contracts/artifacts/contracts/market/FixedPrice.sol/FixedPrice.json'"},"_npmUser":{"name":"0g-peterzhang","email":"peter@0g.ai"},"repository":{"url":"git+https://github.com/0gfoundation/0g-storage-ts-sdk.git","type":"git"},"_npmVersion":"11.7.0","description":"JS/TS SDK for 0G Storage","directories":{},"_nodeVersion":"20.19.1","dependencies":{"@noble/curves":"^1.9.7","@noble/hashes":"^1.8.0","@noble/ciphers":"^1.3.0","@ethersproject/bytes":"^5.7.0","open-jsonrpc-provider":"^0.2.1","@ethersproject/keccak256":"^5.7.0"},"_hasShrinkwrap":false,"packageManager":"pnpm@8.7.1","devDependencies":{"jest":"^29.6.4","tslib":"^2.6.2","rollup":"^3.28.1","js-sha3":"^0.9.1","ts-jest":"^29.1.1","ts-node":"^10.9.1","typechain":"^8.3.1","uglify-js":"^3.17.4","typescript":"^5.2.2","@types/jest":"^29.5.4","@types/node":"^20.5.9","@typechain/ethers-v6":"^0.5.0","@rollup/plugin-commonjs":"^25.0.4","@rollup/plugin-node-resolve":"^15.2.1","rollup-plugin-polyfill-node":"^0.12.0"},"peerDependencies":{"ethers":"6.13.1"},"_npmOperationalInternal":{"tmp":"tmp/0g-storage-ts-sdk_1.2.10_1780560828695_0.1662984638846876","host":"s3://npm-registry-packages-npm-production"}},"1.2.11":{"name":"@0gfoundation/0g-storage-ts-sdk","version":"1.2.11","keywords":[],"author":{"name":"0G Foundation"},"license":"ISC","_id":"@0gfoundation/0g-storage-ts-sdk@1.2.11","maintainers":[{"name":"overi","email":"ibrahim.over@0g.ai"},{"name":"0g-jiahao","email":"jiahao@0g.ai"},{"name":"0g-will","email":"will.riches@0g.ai"},{"name":"0g-xie","email":"xie@0g.ai"},{"name":"ymh357","email":"minghao.yu@0g.ai"},{"name":"0g-peterzhang","email":"peter@0g.ai"}],"homepage":"https://github.com/0gfoundation/0g-storage-ts-sdk#readme","bugs":{"url":"https://github.com/0gfoundation/0g-storage-ts-sdk/issues"},"dist":{"shasum":"df0492786cdd056bacc77296f44928452f6a7cb4","tarball":"https://registry.npmjs.org/@0gfoundation/0g-storage-ts-sdk/-/0g-storage-ts-sdk-1.2.11.tgz","fileCount":560,"integrity":"sha512-vlqP0UAn428MGn3vLefHwA5mfbltVnxehOGNMyyP/KMsMfjLq0hehfs6CBhOugK/XYS/+gOo5jLfAvLiOdPJuw==","signatures":[{"sig":"MEUCIBb+ZVt3xwVXmLTh1fxA8db5/8RPRO20WV7TuLa4wh2fAiEAjoohwIlGrCI0zhlV5m25BKTjhPweCV+6BTSKsGmRtf0=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":5523741},"main":"./lib.commonjs/index.js","types":"./types/index.d.ts","module":"./lib.esm/index.js","exports":{".":{"types":"./types/index.d.ts","import":"./lib.esm/index.js","default":"./lib.esm/index.js","require":"./lib.commonjs/index.js"},"./browser":{"types":"./lib.esm/index.d.ts","import":"./dist/zgstorage.esm.js","default":"./dist/zgstorage.esm.min.js","require":"./dist/zgstorage.umd.min.js"}},"gitHead":"2b4b07d5011eeed64f0f2c7a63639e3df6198932","scripts":{"test":"jest","clean":"rm -rf dist lib.esm lib.commonjs types","format":"prettier --write src.ts/**/*.ts src.ts/*.ts","release":"npm run build-all && npm run gen-type-package-json && npm run build-dist","build-all":"npm run clean && tsc -b tsconfig.esm.json tsconfig.commonjs.json tsconfig.types.json","build-cjs":"tsc --project tsconfig.commonjs.json","build-esm":"tsc --project tsconfig.esm.json","build-dist":"npm run build-esm && npm run _build-dist && npm run _dist-stats","_build-dist":"rollup -c && uglifyjs ./dist/zgstorage.esm.js -o ./dist/zgstorage.esm.min.js && uglifyjs ./dist/zgstorage.umd.js -o ./dist/zgstorage.umd.min.js","_dist-stats":"gzip -k9f -S '.gz' ./dist/zgstorage.esm.min.js && gzip -k9f -S '.gz' ./dist/zgstorage.umd.min.js && du -hs ./dist/*.gz && echo '' && du -hs ./dist/*.js","gen-type-package-json":"echo '{\"type\": \"commonjs\"}' > ./lib.commonjs/package.json && echo '{\"type\": \"module\"}' > ./lib.esm/package.json","gen-contract-type-flow":"typechain --target ethers-v6 --node16-modules --out-dir src.ts/contracts/flow '../0g-storage-contracts/artifacts/contracts/dataFlow/FixedPriceFlow.sol/FixedPriceFlow.json'","gen-contract-type-market":"typechain --target ethers-v6 --node16-modules --out-dir src.ts/contracts/market '../0g-storage-contracts/artifacts/contracts/market/FixedPrice.sol/FixedPrice.json'"},"_npmUser":{"name":"0g-peterzhang","email":"peter@0g.ai"},"repository":{"url":"git+https://github.com/0gfoundation/0g-storage-ts-sdk.git","type":"git"},"_npmVersion":"11.7.0","description":"JS/TS SDK for 0G Storage","directories":{},"_nodeVersion":"20.19.1","dependencies":{"@noble/curves":"^1.9.7","@noble/hashes":"^1.8.0","@noble/ciphers":"^1.3.0","@ethersproject/bytes":"^5.7.0","open-jsonrpc-provider":"^0.2.1","@ethersproject/keccak256":"^5.7.0"},"_hasShrinkwrap":false,"packageManager":"pnpm@8.7.1","devDependencies":{"jest":"^29.6.4","tslib":"^2.6.2","rollup":"^3.28.1","js-sha3":"^0.9.1","ts-jest":"^29.1.1","ts-node":"^10.9.1","typechain":"^8.3.1","uglify-js":"^3.17.4","typescript":"^5.2.2","@types/jest":"^29.5.4","@types/node":"^20.5.9","@typechain/ethers-v6":"^0.5.0","@rollup/plugin-commonjs":"^25.0.4","@rollup/plugin-node-resolve":"^15.2.1","rollup-plugin-polyfill-node":"^0.12.0"},"peerDependencies":{"ethers":"6.13.1"},"_npmOperationalInternal":{"tmp":"tmp/0g-storage-ts-sdk_1.2.11_1786029599090_0.47803544735905135","host":"s3://npm-registry-packages-npm-production"}},"1.2.12":{"name":"@0gfoundation/0g-storage-ts-sdk","version":"1.2.12","description":"JS/TS SDK for 0G Storage","main":"./lib.commonjs/index.js","module":"./lib.esm/index.js","types":"./types/index.d.ts","exports":{".":{"types":"./types/index.d.ts","require":"./lib.commonjs/index.js","import":"./lib.esm/index.js","default":"./lib.esm/index.js"},"./browser":{"types":"./lib.esm/index.d.ts","require":"./dist/zgstorage.umd.min.js","import":"./dist/zgstorage.esm.js","default":"./dist/zgstorage.esm.min.js"}},"packageManager":"pnpm@8.7.1","scripts":{"format":"prettier --write src.ts/**/*.ts src.ts/*.ts","test":"jest","_build-dist":"rollup -c && uglifyjs ./dist/zgstorage.esm.js -o ./dist/zgstorage.esm.min.js && uglifyjs ./dist/zgstorage.umd.js -o ./dist/zgstorage.umd.min.js","_dist-stats":"gzip -k9f -S '.gz' ./dist/zgstorage.esm.min.js && gzip -k9f -S '.gz' ./dist/zgstorage.umd.min.js && du -hs ./dist/*.gz && echo '' && du -hs ./dist/*.js","clean":"rm -rf dist lib.esm lib.commonjs types","build-dist":"npm run build-esm && npm run _build-dist && npm run _dist-stats","build-esm":"tsc --project tsconfig.esm.json","build-cjs":"tsc --project tsconfig.commonjs.json","build-all":"npm run clean && tsc -b tsconfig.esm.json tsconfig.commonjs.json tsconfig.types.json","gen-type-package-json":"echo '{\"type\": \"commonjs\"}' > ./lib.commonjs/package.json && echo '{\"type\": \"module\"}' > ./lib.esm/package.json","gen-contract-type-market":"typechain --target ethers-v6 --node16-modules --out-dir src.ts/contracts/market '../0g-storage-contracts/artifacts/contracts/market/FixedPrice.sol/FixedPrice.json'","gen-contract-type-flow":"typechain --target ethers-v6 --node16-modules --out-dir src.ts/contracts/flow '../0g-storage-contracts/artifacts/contracts/dataFlow/FixedPriceFlow.sol/FixedPriceFlow.json'","release":"npm run build-all && npm run gen-type-package-json && npm run build-dist"},"keywords":[],"author":{"name":"0G Foundation"},"license":"ISC","devDependencies":{"@rollup/plugin-commonjs":"^25.0.4","@rollup/plugin-node-resolve":"^15.2.1","@typechain/ethers-v6":"^0.5.0","@types/jest":"^29.5.4","@types/node":"^20.5.9","jest":"^29.6.4","js-sha3":"^0.9.1","rollup":"^3.28.1","rollup-plugin-polyfill-node":"^0.12.0","ts-jest":"^29.1.1","ts-node":"^10.9.1","tslib":"^2.6.2","typechain":"^8.3.1","typescript":"^5.2.2","uglify-js":"^3.17.4"},"dependencies":{"@ethersproject/bytes":"^5.7.0","@ethersproject/keccak256":"^5.7.0","@noble/ciphers":"^1.3.0","@noble/curves":"^1.9.7","@noble/hashes":"^1.8.0","open-jsonrpc-provider":"^0.2.1"},"peerDependencies":{"ethers":"6.13.1"},"repository":{"type":"git","url":"git+https://github.com/0gfoundation/0g-storage-ts-sdk.git"},"bugs":{"url":"https://github.com/0gfoundation/0g-storage-ts-sdk/issues"},"homepage":"https://github.com/0gfoundation/0g-storage-ts-sdk#readme","gitHead":"2f213c3145181e7766cd7dd02e0690ca98d3bd0e","_id":"@0gfoundation/0g-storage-ts-sdk@1.2.12","_nodeVersion":"20.19.1","_npmVersion":"11.7.0","dist":{"integrity":"sha512-Egu9o5xM4mTYf/troqSLCuFUmkrOfw82/SkqdUkUlLiwL1v7jw67ojcinyOC++9xrFX9eE8vk6wKktOhwOvvQQ==","shasum":"7147f337a040d5b208265fe8acd9ec8ba416158f","tarball":"https://registry.npmjs.org/@0gfoundation/0g-storage-ts-sdk/-/0g-storage-ts-sdk-1.2.12.tgz","fileCount":570,"unpackedSize":5647029,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEQCIAbSHQPDohAeZ0xhTQCTfIpOpO/ZFCD/yNGQmLfxoPNtAiALYHnL6Ny2woJshdeYrMBPVtsbuCXAfPhePBNTkY2WWw=="}]},"_npmUser":{"name":"0g-peterzhang","email":"peter@0g.ai"},"directories":{},"maintainers":[{"name":"overi","email":"ibrahim.over@0g.ai"},{"name":"0g-jiahao","email":"jiahao@0g.ai"},{"name":"0g-will","email":"will.riches@0g.ai"},{"name":"0g-xie","email":"xie@0g.ai"},{"name":"ymh357","email":"minghao.yu@0g.ai"},{"name":"wilbertwu","email":"wei@0g.ai"},{"name":"0g-peterzhang","email":"peter@0g.ai"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/0g-storage-ts-sdk_1.2.12_1788580448155_0.14662686917013268"},"_hasShrinkwrap":false}},"time":{"created":"2026-04-30T11:24:26.699Z","modified":"2026-09-05T03:54:08.470Z","1.2.8":"2026-04-30T11:24:27.052Z","1.2.9":"2026-05-05T10:31:59.181Z","1.2.10":"2026-06-04T08:13:48.928Z","1.2.11":"2026-08-06T15:19:59.339Z","1.2.12":"2026-09-05T03:54:08.322Z"},"bugs":{"url":"https://github.com/0gfoundation/0g-storage-ts-sdk/issues"},"author":{"name":"0G Foundation"},"license":"ISC","homepage":"https://github.com/0gfoundation/0g-storage-ts-sdk#readme","keywords":[],"repository":{"type":"git","url":"git+https://github.com/0gfoundation/0g-storage-ts-sdk.git"},"description":"JS/TS SDK for 0G Storage","maintainers":[{"name":"overi","email":"ibrahim.over@0g.ai"},{"name":"0g-jiahao","email":"jiahao@0g.ai"},{"name":"0g-will","email":"will.riches@0g.ai"},{"name":"0g-xie","email":"xie@0g.ai"},{"name":"ymh357","email":"minghao.yu@0g.ai"},{"name":"wilbertwu","email":"wei@0g.ai"},{"name":"0g-peterzhang","email":"peter@0g.ai"}],"readme":"# 0G Storage TS SDK\n\nThis is the TypeScript SDK for 0G Storage. Features include:\n\n- [x] File Merkle Tree Class\n- [x] Flow Contract Types\n- [x] RPC methods support\n- [x] File upload\n- [x] Support browser environment\n- [ ] Tests for different environments\n- [x] File download\n\n## Install\n\n```sh\nnpm install @0gfoundation/0g-storage-ts-sdk ethers\n```\n\n`ethers` is a peer dependency of this project.\n\n## Usage\n\n### Node.js environment ESM example:\n\nUse `ZgFile` to create a file object, then call `merkleTree` method to get the merkle tree of the file.\n\n```js\nimport { Indexer, ZgFile } from '@0gfoundation/0g-storage-ts-sdk';\nimport { ethers } from 'ethers';\nimport { exit } from 'process';\n\nconst file = await ZgFile.fromFilePath(<file_path>);\nvar [tree, err] = await file.merkleTree();\nif (err === null) {\n  console.log(\"File Root Hash: \", tree.rootHash());\n} else {\n  exit(1);\n}\nawait file.close();\n```\n\nUpload file to 0G Storage:\n\n```js\nimport { getFlowContract } from '@0gfoundation/0g-storage-ts-sdk';\nconst evmRpc = 'https://evmrpc-testnet.0g.ai';\nconst privateKey = ''; // with balance to pay for gas\nconst indRpc = 'https://indexer-storage-testnet-turbo.0g.ai'; // indexer rpc\n\nconst provider = new ethers.JsonRpcProvider(evmRpc);\nconst signer = new ethers.Wallet(privateKey, provider);\n\nconst indexer = new Indexer(indRpc);\n// need to pay fees to store data in storage nodes\nvar [tx, err] = await indexer.upload(file, evmRpc, signer);\nif (err === null) {\n  console.log(\"File uploaded successfully, tx: \", tx);\n} else {\n  console.log(\"Error uploading file: \", err);\n}\n```\n\nDownload file from 0G Storage\n\n```js\nerr = await indexer.download(<root_hash>, <output_file>, <with_proof>);\nif (err !== null) {\n  console.log(\"Error downloading file: \", err);\n}\n```\n\nUpload data to 0g-kv:\n\n```js\nvar [nodes, err] = await indexer.selectNodes(1);\nif (err !== null) {\n    console.log(\"Error selecting nodes: \", err);\n    stop();\n}\n\nconst batcher = new Batcher(1, nodes, flowContract, evmRpc);\n\nconst key1 = Uint8Array.from(Buffer.from(\"TESTKEY0\", 'utf-8'));\nconst val1 = Uint8Array.from(Buffer.from(\"TESTVALUE0\", 'utf-8'));\nconst key2 = Uint8Array.from(Buffer.from(\"TESTKEY1\", 'utf-8'));\nconst val2 = Uint8Array.from(Buffer.from(\"TESTVALUE1\", 'utf-8'));\nbatcher.streamDataBuilder.set(\"0x...\", key1, val1);\nbatcher.streamDataBuilder.set(\"0x...\", key2, val2);\n\nvar [tx, err] = await batcher.exec();\n\nif (err === null) {\n    console.log(\"Batcher executed successfully, tx: \", tx);\n} else {\n    console.log(\"Error executing batcher: \", err);\n}\n```\n\nDownload data from 0g-kv\n```js\nconst KvClientAddr = \"http://3.101.147.150:6789\"\n\nconst streamId = \"0x...\"\nconst kvClient = new KvClient(KvClientAddr)\n\nlet val = await kvClient.getValue(streamId, ethers.encodeBase64(key1));\nconsole.log(val)\n```\n\n### Browser environment example:\n\nImport `zgstorage.esm.js` in your html file:\n\n```html\n<script type=\"module\">\n  import { Blob, Indexer } from \"./dist/zgstorage.esm.js\";\n  // Your code here...\n</script>\n```\n\nCreate file object from blob:\n\n```js\nconst file = new Blob(blob);\nconst [tree, err] = await file.merkleTree();\nif (err === null) {\n  console.log(\"File Root Hash: \", tree.rootHash());\n}\n```\n\nFile upload is same with node.js environment with the following provider change\n\n```js\nimport { BrowserProvider } from 'ethers';  // or from ethers.js url\n\nlet provider = new BrowserProvider(window.ethereum) // metamask need to be installed\n```\n\n\n### Vite example:\n\nTo use the SDK with Vite, set up polyfills in your `vite.config.ts`:\n\n```ts\nimport { defineConfig } from 'vite';\nimport { nodePolyfills } from 'vite-plugin-node-polyfills';\n\nexport default defineConfig({\n  plugins: [\n    ...\n    nodePolyfills({\n      include: ['crypto', 'buffer', 'stream', 'util', 'events'],\n    }),\n  ],\n});\n```\n\nNow, you can import SDK files with the `/browser` suffix:\n\n```ts\nimport { Indexer, Blob } from '@0gfoundation/0g-storage-ts-sdk/browser';\n```\n\nCheck codes in [examples](./examples) for more details.\n\n## Contribute\n\nThis project uses [pnpm](https://pnpm.js.org/) as package manager. After cloning the project, run `pnpm install` to install dependencies.\n\n### Generate Contract Flow Types\n\nMake sure [0g-storage-contracts](https://github.com/0gfoundation/0g-storage-contracts) is in project sibling directory.\n\n```sh\npnpm gen-contract-type-flow\npnpm gen-contract-type-market\n```\n","readmeFilename":"README.md"}