Observed since 20 Oct, 22:35 UTC
No superseded metadata states collected. Unchanged observations do not create new revisions.
@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.
Put a seal on the 0G Storage log layer, and find it again by its own hash.
npm i @0x402/storage
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.
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.
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
Download counts and popularity will appear here as the collector receives them.
| Package / target | Requirement | Relationship |
|---|---|---|
viemEnvironment{
"local_name": "viem",
"alias": false,
"peer_metadata": null
} | ^2.23.2 | runtime |
ethersEnvironment{
"local_name": "ethers",
"alias": false,
"peer_metadata": null
} | 6.13.1 | runtime |
@0x402/sealEnvironment{
"local_name": "@0x402/seal",
"alias": false,
"peer_metadata": null
} | 0.1.0 | runtime |
@0x402/underwriterEnvironment{
"local_name": "@0x402/underwriter",
"alias": false,
"peer_metadata": null
} | 0.1.0 | runtime |
@0gfoundation/0g-storage-ts-sdkEnvironment{
"local_name": "@0gfoundation/0g-storage-ts-sdk",
"alias": false,
"peer_metadata": null
} | 1.2.12 | runtime |
vitestEnvironment{
"local_name": "vitest",
"alias": false,
"peer_metadata": null
} | ^3.0.5 | development |
Source distribution
{
"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
}Observed since 20 Oct, 22:35 UTC
No superseded metadata states collected. Unchanged observations do not create new revisions.
package_version:5ef71cef66f42e95de6c149837fbad0d469376fd60bc08d3beccd042e09b55d5