Packages
0gkit is eleven independently published packages under the
@foundryprotocol/0gkit-* scope (version 0.1.0). Each page below documents
the real exported API, derived from source, with copy-pasteable examples,
the errors it throws and how to handle them, and exactly where each package is
meant to run.
The primitives (build on @foundryprotocol/0gkit-core)
- @foundryprotocol/0gkit-core — network presets, the
viem client factory,
Receipt, theZeroGErrortaxonomy, canonical JSON, and theSignerinterface. - @foundryprotocol/0gkit-chain — explorer URLs, native
balance,
waitForReceipt, the testnet faucet. - @foundryprotocol/0gkit-storage —
Storage:upload/download/computeRoot/exists. - @foundryprotocol/0gkit-compute —
Compute: provider discovery, broker inference, an OpenAI-compatible shim. - @foundryprotocol/0gkit-da —
DA: deterministic digest, encoder publish, local integrity verify. - @foundryprotocol/0gkit-attestation — parse / sign / recover / verify / report a TEE attestation envelope (pure crypto).
Wallet
- @foundryprotocol/0gkit-wallet — Node wallet loaders:
fromPrivateKey,fromFile(keystore-v3),fromEnv(auto-pick),fromKMS(AWS KMS), and SIWE (EIP-4361) helpers. Returns aSignerevery primitive accepts. - @foundryprotocol/0gkit-wallet-react — React +
wagmi v2 browser wallet:
ZeroGWalletProvider,useWallet,useConnect,useSwitchNetwork, andadaptWagmi.
The surfaces (build on the primitives)
- @foundryprotocol/0gkit-cli — the
0gcommand line. - @foundryprotocol/0gkit-mcp — every primitive as an MCP
og_*tool. - @foundryprotocol/0gkit-react —
useUpload/useDownload/useInference/useAttestation.
Dedicated guides expand the surfaces: CLI reference, MCP guide, React guide.