{"_id":"@0x402/storage","_rev":"3-23e053297967408ccedee9c2cfe5a072","name":"@0x402/storage","dist-tags":{"latest":"0.1.2"},"versions":{"0.1.0":{"name":"@0x402/storage","version":"0.1.0","keywords":["0g","storage","seal","browser"],"author":{"name":"Wayne Kuo"},"license":"MIT","_id":"@0x402/storage@0.1.0","maintainers":[{"name":"waynekuo","email":"wayne.k@typuslab.com"}],"homepage":"https://wayneal.github.io/0G","bugs":{"url":"https://github.com/WayneAl/0G/issues"},"dist":{"shasum":"37eba62d0ec9494d421758381c5654e99de07868","tarball":"https://registry.npmjs.org/@0x402/storage/-/storage-0.1.0.tgz","fileCount":11,"integrity":"sha512-pA7yIpZpGinAkTfyC/WVnp7nTwUWIIAs4XC3BqfhF5TqksRdl9BxQ3PXH3zZPv9xJ5C+R7Fy2XUfG++in84EYA==","signatures":[{"sig":"MEUCICEHgVH5f589nA4ZSaHKThzfqEtZII/Y3/1np1JJuAiDAiEAzBnNwH0TZi0H6AduhAB7p48Ie6mpPuQriKZz8Y9hEms=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":21900},"main":"./dist/index.js","type":"module","_from":"file:0x402-storage-0.1.0.tgz","types":"./dist/index.d.ts","exports":{".":{"types":"./dist/index.d.ts","default":"./dist/index.js"},"./fetch":{"types":"./dist/fetch.d.ts","default":"./dist/fetch.js"},"./locate":{"types":"./dist/locate.d.ts","default":"./dist/locate.js"},"./publish":{"types":"./dist/publish.d.ts","default":"./dist/publish.js"}},"scripts":{"test":"vitest run","build":"tsc -p tsconfig.build.json","typecheck":"tsc --noEmit"},"_npmUser":{"name":"waynekuo","email":"wayne.k@typuslab.com"},"_resolved":"/private/var/folders/v9/gfr09p7j5nj2hsj_v0h5cq480000gn/T/5cb7e4fcbe8f9bc0a2006a64c36e9e04/0x402-storage-0.1.0.tgz","_integrity":"sha512-pA7yIpZpGinAkTfyC/WVnp7nTwUWIIAs4XC3BqfhF5TqksRdl9BxQ3PXH3zZPv9xJ5C+R7Fy2XUfG++in84EYA==","repository":{"url":"git+https://github.com/WayneAl/0G.git","type":"git","directory":"packages/storage"},"_npmVersion":"11.11.0","description":"Put a seal on the 0G Storage log layer and find it again by its own hash. The root export is isomorphic — no ethers, no SDK — so a browser can do the lookup.","directories":{},"_nodeVersion":"24.14.1","dependencies":{"viem":"^2.23.2","ethers":"6.13.1","@0x402/seal":"0.1.0","@0x402/underwriter":"0.1.0","@0gfoundation/0g-storage-ts-sdk":"1.2.12"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"vitest":"^3.0.5"},"_npmOperationalInternal":{"tmp":"tmp/storage_0.1.0_1788793224838_0.79639327280528","host":"s3://npm-registry-packages-npm-production"}},"0.1.1":{"name":"@0x402/storage","version":"0.1.1","keywords":["0g","storage","seal","browser"],"author":{"name":"Wayne Kuo"},"license":"MIT","_id":"@0x402/storage@0.1.1","maintainers":[{"name":"waynekuo","email":"wayne.k@typuslab.com"}],"homepage":"https://wayneal.github.io/0G","bugs":{"url":"https://github.com/WayneAl/0G/issues"},"dist":{"shasum":"52383199988cc70b8cede1719e16c110e6f903ed","tarball":"https://registry.npmjs.org/@0x402/storage/-/storage-0.1.1.tgz","fileCount":11,"integrity":"sha512-QggwWR1OLT72ViLRbMct+U7qJlwmVUByj2eUtDQafUjnxwSoU3Un7Hf7JwLPU7DxdxkCtNxNCIduNUajdE9saw==","signatures":[{"sig":"MEQCIDrAv+lfAzJUgEr99KdCLhJTTB7U3yGUR0TvJC9YUIZCAiAazsgYCQc3nqNyfqriyt+3Rz7sl/aYzhOn1PcYe1uk7w==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":21900},"main":"./dist/index.js","type":"module","_from":"file:0x402-storage-0.1.1.tgz","types":"./dist/index.d.ts","exports":{".":{"types":"./dist/index.d.ts","default":"./dist/index.js"},"./fetch":{"types":"./dist/fetch.d.ts","default":"./dist/fetch.js"},"./locate":{"types":"./dist/locate.d.ts","default":"./dist/locate.js"},"./publish":{"types":"./dist/publish.d.ts","default":"./dist/publish.js"}},"scripts":{"test":"vitest run","build":"tsc -p tsconfig.build.json","typecheck":"tsc --noEmit"},"_npmUser":{"name":"waynekuo","email":"wayne.k@typuslab.com"},"_resolved":"/private/var/folders/v9/gfr09p7j5nj2hsj_v0h5cq480000gn/T/e8f250588778b65da3e59da6656e5459/0x402-storage-0.1.1.tgz","_integrity":"sha512-QggwWR1OLT72ViLRbMct+U7qJlwmVUByj2eUtDQafUjnxwSoU3Un7Hf7JwLPU7DxdxkCtNxNCIduNUajdE9saw==","repository":{"url":"git+https://github.com/WayneAl/0G.git","type":"git","directory":"packages/storage"},"_npmVersion":"11.11.0","description":"Put a seal on the 0G Storage log layer and find it again by its own hash. The root export is isomorphic — no ethers, no SDK — so a browser can do the lookup.","directories":{},"_nodeVersion":"24.14.1","dependencies":{"viem":"^2.23.2","ethers":"6.13.1","@0x402/seal":"0.1.1","@0x402/underwriter":"0.1.1","@0gfoundation/0g-storage-ts-sdk":"1.2.12"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"vitest":"^3.0.5"},"_npmOperationalInternal":{"tmp":"tmp/storage_0.1.1_1788838313693_0.7533153611023746","host":"s3://npm-registry-packages-npm-production"}},"0.1.2":{"name":"@0x402/storage","version":"0.1.2","description":"Put a seal on the 0G Storage log layer and find it again by its own hash. The root export is isomorphic — no ethers, no SDK — so a browser can do the lookup.","license":"MIT","author":{"name":"Wayne Kuo"},"homepage":"https://wayneal.github.io/0G","repository":{"type":"git","url":"git+https://github.com/WayneAl/0G.git","directory":"packages/storage"},"bugs":{"url":"https://github.com/WayneAl/0G/issues"},"keywords":["0g","storage","seal","browser"],"type":"module","main":"./dist/index.js","exports":{".":{"types":"./dist/index.d.ts","default":"./dist/index.js"},"./publish":{"types":"./dist/publish.d.ts","default":"./dist/publish.js"},"./locate":{"types":"./dist/locate.d.ts","default":"./dist/locate.js"},"./fetch":{"types":"./dist/fetch.d.ts","default":"./dist/fetch.js"}},"publishConfig":{"access":"public"},"dependencies":{"@0gfoundation/0g-storage-ts-sdk":"1.2.12","ethers":"6.13.1","viem":"^2.23.2","@0x402/seal":"0.1.2","@0x402/underwriter":"0.1.2"},"devDependencies":{"vitest":"^3.0.5"},"scripts":{"build":"tsc -p tsconfig.build.json","test":"vitest run","typecheck":"tsc --noEmit"},"types":"./dist/index.d.ts","_id":"@0x402/storage@0.1.2","_integrity":"sha512-CEbgmlZDQNIbtv59sakVtYNLKlwr4gGPAQr8F5joKPFSjIQtYiLnatM0GVS0CWTLNyOOQRh+ng3pZKqsSyGh4w==","_resolved":"/private/var/folders/v9/gfr09p7j5nj2hsj_v0h5cq480000gn/T/08f41406245f26061dca748d142e860c/0x402-storage-0.1.2.tgz","_from":"file:0x402-storage-0.1.2.tgz","_nodeVersion":"24.14.1","_npmVersion":"11.11.0","dist":{"integrity":"sha512-CEbgmlZDQNIbtv59sakVtYNLKlwr4gGPAQr8F5joKPFSjIQtYiLnatM0GVS0CWTLNyOOQRh+ng3pZKqsSyGh4w==","shasum":"82a0a8885ae82ce7a37abc9c88eaa566079e339f","tarball":"https://registry.npmjs.org/@0x402/storage/-/storage-0.1.2.tgz","fileCount":11,"unpackedSize":21900,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEQCIFHkyT+aciV2rXNbpbWXz9MuNgLMzPEYcOPM3KAzDLJSAiBRSvWFQJ8pUNqtQAi6MOnUY0jbTKLU2mqkZfsvtqW0Pg=="}]},"_npmUser":{"name":"waynekuo","email":"wayne.k@typuslab.com"},"directories":{},"maintainers":[{"name":"waynekuo","email":"wayne.k@typuslab.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/storage_0.1.2_1788845357516_0.23044443756834077"},"_hasShrinkwrap":false}},"time":{"created":"2026-09-07T15:00:24.637Z","modified":"2026-09-08T05:29:17.800Z","0.1.0":"2026-09-07T15:00:24.978Z","0.1.1":"2026-09-08T03:31:53.825Z","0.1.2":"2026-09-08T05:29:17.661Z"},"bugs":{"url":"https://github.com/WayneAl/0G/issues"},"author":{"name":"Wayne Kuo"},"license":"MIT","homepage":"https://wayneal.github.io/0G","keywords":["0g","storage","seal","browser"],"repository":{"type":"git","url":"git+https://github.com/WayneAl/0G.git","directory":"packages/storage"},"description":"Put a seal on the 0G Storage log layer and find it again by its own hash. The root export is isomorphic — no ethers, no SDK — so a browser can do the lookup.","maintainers":[{"name":"waynekuo","email":"wayne.k@typuslab.com"}],"readme":"# @0x402/storage\n\nPut a seal on the 0G Storage log layer, and find it again by its own hash.\n\n```bash\nnpm i @0x402/storage\n```\n\n## Find one (browser-safe)\n\n```ts\nimport { resolveSeal } from \"@0x402/storage\";\n\nconst located = await resolveSeal(sealHash, { rpcUrl, sender, indexerUrl });\nlocated.seal; // the body, re-derivable to exactly that hash\n```\n\nThe root export — and the `./locate` and `./fetch` subpaths — import nothing from\n`node:` and bring in neither `ethers` nor the 0G SDK, so a page can do this lookup in\nthe visitor's browser. That is how a registry entry becomes a readable seal with no\nserver in between.\n\n## Publish one (Node)\n\n```ts\nimport { publishSeal } from \"@0x402/storage/publish\";\n\nconst receipt = await publishSeal(seal, { privateKey, rpcUrl, indexerUrl });\n// { root, txHash, txSeq, sealHash, bytes }\n```\n\n`./publish` is the only subpath that pulls in `ethers` and the 0G SDK. Import it from\na bundle and you will ship both.\n\n## How the lookup works\n\nThe upload is tagged with `sealDigest(seal)`, so the chain's own `Flow.Submit` log is\nthe index: given a hash, scan for the submission carrying that tag from that sender,\nfold the node roots into the file root, and fetch it from the indexer gateway. No\nkey-value service, no server of ours, nothing to keep running. The bytes are the\ncanonical encoding the signature covers, so a reader re-derives the hash and the\nsigner without trusting the storage layer at all.\n\n---\n\n[Repository](https://github.com/WayneAl/0G) · [Site](https://wayneal.github.io/0G) · MIT\n","readmeFilename":"README.md"}