Catalog npm
Back to packageRELEASE DETAILS

0.1.0

npm

@0x402/storage

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.

0gbrowsersealstorage
Published7 Sept 2026
Direct dependencies6
Transitive dependenciesNot calculated

README

Current package documentation

@0x402/storage

Put a seal on the 0G Storage log layer, and find it again by its own hash.

npm i @0x402/storage

Find one (browser-safe)

import { resolveSeal } from "@0x402/storage";

const located = await resolveSeal(sealHash, { rpcUrl, sender, indexerUrl });
located.seal; // the body, re-derivable to exactly that hash

The root export — and the ./locate and ./fetch subpaths — import nothing from node: and bring in neither ethers nor the 0G SDK, so a page can do this lookup in the visitor's browser. That is how a registry entry becomes a readable seal with no server in between.

Publish one (Node)

import { publishSeal } from "@0x402/storage/publish";

const receipt = await publishSeal(seal, { privateKey, rpcUrl, indexerUrl });
// { root, txHash, txSeq, sealHash, bytes }

./publish is the only subpath that pulls in ethers and the 0G SDK. Import it from a bundle and you will ship both.

How the lookup works

The upload is tagged with sealDigest(seal), so the chain's own Flow.Submit log is the index: given a hash, scan for the submission carrying that tag from that sender, fold the node roots into the file root, and fetch it from the indexer gateway. No key-value service, no server of ours, nothing to keep running. The bytes are the canonical encoding the signature covers, so a reader re-derives the hash and the signer without trusting the storage layer at all.


Repository · Site · MIT

Downloads & popularity

Awaiting observations

No metric observations yet

Download counts and popularity will appear here as the collector receives them.

Declared dependencies 6

Native requirements
6 direct targetsNot calculated transitive count
Package / targetRequirementRelationship
viem
Environment
{
  "local_name": "viem",
  "alias": false,
  "peer_metadata": null
}
^2.23.2runtime
ethers
Environment
{
  "local_name": "ethers",
  "alias": false,
  "peer_metadata": null
}
6.13.1runtime
@0x402/seal
Environment
{
  "local_name": "@0x402/seal",
  "alias": false,
  "peer_metadata": null
}
0.1.0runtime
@0x402/underwriter
Environment
{
  "local_name": "@0x402/underwriter",
  "alias": false,
  "peer_metadata": null
}
0.1.0runtime
@0gfoundation/0g-storage-ts-sdk
Environment
{
  "local_name": "@0gfoundation/0g-storage-ts-sdk",
  "alias": false,
  "peer_metadata": null
}
1.2.12runtime
vitest
Environment
{
  "local_name": "vitest",
  "alias": false,
  "peer_metadata": null
}
^3.0.5development

Distribution files

1 collected
Distribution 1

Source distribution

Source file
Checksums from source
{
  "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
}

Repository

PENDING
wayneal/0g

Shared repository data · GitHub

License detected in repository
Not collected

Metadata history

Meaningful changes
Current collected state Current

Observed since 20 Oct, 22:35 UTC

No superseded metadata states collected. Unchanged observations do not create new revisions.

Record identity

package_version:5ef71cef66f42e95de6c149837fbad0d469376fd60bc08d3beccd042e09b55d5

Other collected versions

0.1.28 Sept0.1.18 SeptView all collected versions →