<!-- 0Gkit docs — Packages
     Source: https://docs.0gkit.com/packages
     LLM-friendly Markdown twin of the page. -->

# 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**](/packages/core) — network presets, the
  viem client factory, `Receipt`, the `ZeroGError` taxonomy, canonical JSON,
  and the `Signer` interface.
- [**@foundryprotocol/0gkit-chain**](/packages/chain) — explorer URLs, native
  balance, `waitForReceipt`, the testnet faucet.
- [**@foundryprotocol/0gkit-storage**](/packages/storage) — `Storage`:
  `upload` / `download` / `computeRoot` / `exists`.
- [**@foundryprotocol/0gkit-compute**](/packages/compute) — `Compute`:
  provider discovery, broker inference, an OpenAI-compatible shim.
- [**@foundryprotocol/0gkit-da**](/packages/da) — `DA`: deterministic digest,
  encoder publish, local integrity verify.
- [**@foundryprotocol/0gkit-attestation**](/packages/attestation) — parse /
  sign / recover / verify / report a TEE attestation envelope (pure crypto).

## Wallet

- [**@foundryprotocol/0gkit-wallet**](/packages/wallet) — Node wallet loaders:
  `fromPrivateKey`, `fromFile` (keystore-v3), `fromEnv` (auto-pick), `fromKMS`
  (AWS KMS), and SIWE (EIP-4361) helpers. Returns a `Signer` every primitive
  accepts.
- [**@foundryprotocol/0gkit-wallet-react**](/packages/wallet-react) — React +
  wagmi v2 browser wallet: `ZeroGWalletProvider`, `useWallet`, `useConnect`,
  `useSwitchNetwork`, and `adaptWagmi`.

## The surfaces (build on the primitives)

- [**@foundryprotocol/0gkit-cli**](/packages/cli) — the `0g` command line.
- [**@foundryprotocol/0gkit-mcp**](/packages/mcp) — every primitive as an MCP
  `og_*` tool.
- [**@foundryprotocol/0gkit-react**](/packages/react) — `useUpload` /
  `useDownload` / `useInference` / `useAttestation`.

Dedicated guides expand the surfaces: [CLI reference](/cli),
[MCP guide](/mcp), [React guide](/react).
