# DIG Network Documentation > DIG Network is a Proof-of-Stake Layer 2 on Chia — a decentralized network for publishing, addressing, and serving content without trusting the host. These are the developer docs for the network and its primitives: DigStore (the content-addressable, encrypted store format and CLI), the dig RPC (the network-wide read interface), and the DIG Browser (a browser with the native chia:// protocol and an injected Chia wallet). The unifying concept is the **capsule**: one immutable store generation — the pair `(storeId, rootHash)`, written `storeId:rootHash`. It is the network's atomic unit of compilation (one fixed-size WASM module), pricing (a uniform per-capsule price in $DIG to mint or commit), retrieval (a URN names one capsule), caching, and provenance. A store is a sequence of capsules, one per commit. This definition is identical across DigStore, the dig RPC, and the DIG Browser. The docs are organized in two top-level sections: **Using DIG** (one track per audience — each track's landing carries a 10-second "why" + the mental model, then the task-oriented how-to) and the **Protocol** spec (a pure, first-class specification defined as seven bottom-up layers, with the IMPLEMENTATION as the source of truth). Audiences: app developers, NFT developers, integration developers, node operators, content consumers, troubleshooting. ## Start here - [DIG Network overview](https://docs.dig.net/docs/): the primitives at a glance and the audience-first paths. - [Quickstart](https://docs.dig.net/docs/quickstart): ship your first site — free to build and preview, you pay the uniform capsule price in $DIG only when you publish a capsule. Web-first path (connect a wallet only at the end) plus a parallel CLI track. - [Concepts & glossary](https://docs.dig.net/docs/concepts): every core entity defined once (capsule, store, generation, URN, retrieval key, the dig RPC, chia:// protocol, dig-node, on-chain anchoring), each linked to its deep doc. The human-readable spine of the knowledge graph. - [Protocol spec (overview)](https://docs.dig.net/docs/protocol-deep-dive): the seven-layer model, the capsule as the fundamental unit, the blind-host + client-side-verify thesis. The authoritative protocol reference. - [Tags index](https://docs.dig.net/docs/tags): the controlled vocabulary of entities, each tag listing every doc about it. ## Using DIG — by audience (each landing = 10-sec why + mental model) - [For app developers](https://docs.dig.net/docs/audiences/app-developers): publish a site/app you own — build free, pay a uniform $DIG price per published capsule; two front doors (DIGHUb web + the digstore CLI/CI). - [For NFT developers](https://docs.dig.net/docs/audiences/nft-developers): mint CHIP-0007 collections whose art lives in a tamper-evident capsule; spends built by the canonical CHIP-0035 wasm, never hand-rolled. - [For integration developers](https://docs.dig.net/docs/audiences/integration-developers): a fully machine-readable platform + a typed @dignetwork/dig-sdk; two surfaces (the hub /v1 REST control plane and the dig JSON-RPC read path). - [For node operators](https://docs.dig.net/docs/run-a-node/): serve content provably and provider-blind; the blind host only ever touches ciphertext keyed by hashes. - [For content consumers](https://docs.dig.net/docs/audiences/content-consumers): open chia:// content your own browser verifies against the chain; latest vs pinned; public vs private (?salt=). - [Troubleshooting](https://docs.dig.net/docs/audiences/troubleshooting): find your failure by its stable code; pre-flight guards (doctor, --dry-run, --if-changed) stop wasted capsules. ## Core concepts - [What is DigStore?](https://docs.dig.net/docs/digstore/what-is-digstore): a Git-shaped, encrypted, content-addressable store that compiles to a single self-defending WebAssembly module — both the data and the server that gates it. - [The DigStore WASM Store Format](https://docs.dig.net/docs/digstore/format/overview): the whole format in one read — store, generation/capsule, URN, and compiled module. - [Store structure](https://docs.dig.net/docs/digstore/format/store-structure): store identity (the on-chain singleton launcher id), generations and root hashes, the on-disk layout, and the compiled module. - [URNs & Encryption](https://docs.dig.net/docs/digstore/format/urns-and-encryption): the URN that is both address and key; retrieval key = SHA-256(canonical_urn); AES-256-GCM-SIV; public vs private stores. - [Proofs & Security](https://docs.dig.net/docs/digstore/format/proofs-and-security): Merkle inclusion proofs over ciphertext, signed roots, revocation, host attestation, and the threat model. - [On-chain anchoring](https://docs.dig.net/docs/digstore/cli/onchain-anchoring): every store is a Chia mainnet singleton; init mints it, commit anchors each root; DIG + XCH costs paid atomically in one spend. ## Quickstarts (Hub users & frontend deployers) - [CLI quick start](https://docs.dig.net/docs/digstore/cli/quickstart): create a store, commit a file, and read it back in minutes. - [Using DigStore in your project](https://docs.dig.net/docs/digstore/cli/project-workflow): capture a build directory, manage staging, run multiple stores in one workspace, the release loop. - [Publish from the web (DIGHUb)](https://hub.dig.net/new): deploy a capsule with no CLI. ## Build a dapp (integrating developers) - [Build a dapp on Chia](https://docs.dig.net/docs/build-a-dapp/tutorial): the end-to-end thread — scaffold a React app (digstore new / npm create dig-app), develop free (digstore dev), wire the in-page wallet (window.chia + WalletConnect fallback via @dignetwork/dig-sdk), build and sign a spend (chip35 wasm via the SDK /spend subpath), deploy on-chain (the uniform capsule price in $DIG), and add a custom domain. - [Scaffold an app (create-dig-app)](https://docs.dig.net/docs/build-a-dapp/scaffold): npm create dig-app — the JS front door; scaffolds a runnable starter (app + dig.toml + the DIG SDK on wallet templates) from five templates (static, vite-react, next-static, nft-drop, dapp-window-chia). Free to scaffold/build/preview; the uniform capsule price in $DIG only at publish. The npm companion to the Rust CLI's digstore new. - [Example gallery](https://docs.dig.net/docs/build-a-dapp/example-gallery): example projects mapped to scaffold templates — static, vite-react, nft-drop, next-static, dapp-window-chia (example repo links are placeholders during pre-release). ## DigStore CLI (integrating developers) - [Installing the CLI](https://docs.dig.net/docs/digstore/cli/install): self-contained installer per OS, or build from source with Rust. - [Command reference](https://docs.dig.net/docs/digstore/cli/command-reference): every digstore command — wallet, store, staging, history, content, remote, maintenance. - [Project config & build-time values](https://docs.dig.net/docs/digstore/cli/configuration): the committable dig.toml manifest (store-id, output-dir, build-command, …; flags > env > dig.toml > defaults) and how to inject PUBLIC build-time config; the rule that a blind static capsule holds no server secrets. - [Deploy from GitHub Actions](https://docs.dig.net/docs/digstore/cli/deploy-from-github-actions): git-push-to-deploy with dig-network/deploy-action@v1 — installs digstore, runs digstore deploy (advances the store, never mints), and reports the capsule + URLs + cost as a PR comment + GitHub deployment status. if-changed makes unchanged pushes a no-op (no spend); preview-per-PR is scaffolded. v1 puts a dedicated deploy wallet's seed in CI (passphrase + mnemonic); scoped deploy tokens are the planned safe replacement. - [Sharing over a remote](https://docs.dig.net/docs/digstore/cli/sharing): publish, clone/pull with verification, revoke, public vs private sharing. - [Streaming & retrieval keys](https://docs.dig.net/docs/digstore/cli/streaming-and-keys): cat by URN (decrypted) or retrieval key (encrypted); list keys; checkout a whole generation. ## The dig RPC (integrating developers) - [What is the dig RPC?](https://docs.dig.net/docs/rpc/what-is-the-dig-rpc): network-wide read interface over JSON-RPC 2.0 — blind by construction, verifiable without trust, streamable at any size. - [Methods](https://docs.dig.net/docs/rpc/methods): dig.getContent, dig.getProof, dig.getProofStatus, dig.getCapsule, dig.getManifest, dig.getMetadata, dig.listCapsules, dig.health, dig.methods. - [Streaming](https://docs.dig.net/docs/rpc/streaming): the chunk object, 64 KiB alignment, reassembly, inclusion-proof verification, and a reference client loop. - [Conformance & Security](https://docs.dig.net/docs/rpc/conformance): the blind serving model, decoy streams (no existence oracle), CORS, and the node conformance checklist. - [Using the public network RPC](https://docs.dig.net/docs/rpc/public-network-rpc): rpc.dig.net, node portability, running your own node, rate limits. - [The dig:// remote](https://docs.dig.net/docs/rpc/dig-remote): git-style clone/pull/push over dig:// URLs with per-request BLS identity-key auth. ## DIG Browser (integrating developers) - [The chia:// protocol](https://docs.dig.net/docs/browser/chia-protocol): the browser's native content-address scheme — the typeable front end of the urn:dig: URN; addressing forms and the shared parser grammar. - [Using window.chia](https://docs.dig.net/docs/browser/using-window-chia): the injected CHIP-0002 wallet provider — detect, connect (per-origin), and call key/signing methods; a drop-in WalletConnect alternative. ## SDK, spends & machine surfaces (integration developers) - [The DIG SDK](https://docs.dig.net/docs/sdk): @dignetwork/dig-sdk — ChiaProvider (injected window.chia + WalletConnect→Sage), DigClient (verified reads), Paywall (pay-to-unlock / NFT-or-collection gating), capabilities(), and the canonical CHIP-0035 spends at the /spend subpath. - [Building spends](https://docs.dig.net/docs/spends): the build (wasm) → sign (wallet) → broadcast split; never hand-roll a spend bundle; delegation is built the same way. - [Machine-readable surfaces](https://docs.dig.net/docs/machine-surfaces): /openrpc.json, /error-codes.json, /llms.txt, /knowledge-graph.json, /sitemap.xml, per-page schema.org JSON-LD, the hub /v1 OpenAPI + JWKS + live pricing, and the CLI/SDK discovery affordances. ## Run a node (operators / deployers) - [Run a DIG node](https://docs.dig.net/docs/run-a-node/): what a dig-node is — the headless content SERVER (serve side) that exposes the dig RPC and shares the local .dig cache; serving vs. consuming (the browser/extension consume from a local dig-node when present, else rpc.dig.net); all install paths. Pre-release. - [Install on Ubuntu/Debian (apt)](https://docs.dig.net/docs/run-a-node/apt): the Debian-native path — add the apt.dig.net signing key + source, apt install dig-node digstore, then systemctl enable --now dig-node (systemd service) and status/journalctl. Cross-references the cross-platform universal installer (curl|sh) and the DIG Browser. Pre-release (apt.dig.net being provisioned). - [Install anywhere — the universal installer](https://docs.dig.net/docs/run-a-node/universal-installer): the cross-platform curl|sh installer (Windows service / systemd / launchd) + the digstore CLI; registers dig.local for same-host consumers. Pre-release. - [Point a consumer at your node](https://docs.dig.net/docs/run-a-node/point-a-consumer): make the DIG Browser/extension read local-first (dig.local→localhost, else rpc.dig.net) and share one .dig cache; every byte is still verified client-side. - [Configure dig-node](https://docs.dig.net/docs/run-a-node/configure): listeners/ports, the cache cap, and the upstream the node blind-fetches from, via config + DIGNODE_* env vars. - [Manage your node](https://docs.dig.net/docs/run-a-node/manage): the control.* admin RPCs (status, cache, peers/upstream) and the DIG Browser My Node UI that drives them — distinct from the public read RPC. ## Protocol spec (protocol developers — the authoritative protocol reference; implementation is the source of truth) The protocol is specified as SEVEN bottom-up layers, each naming its canonical crate/file. The dig RPC + §21 transport are the protocol's machine interface. - [Protocol: Overview](https://docs.dig.net/docs/protocol-deep-dive): the seven-layer model, the capsule (storeId:rootHash) as the fundamental unit, the blind-host + client-side-verify + chain-anchored-root thesis. - [L0 · Identity & naming](https://docs.dig.net/docs/protocol/identity-and-naming): store vs capsule vs generation; store_id = the CHIP-0035 singleton launcher id; RootHistory ordering. - [L0 · URN & addressing](https://docs.dig.net/docs/protocol/urn-and-addressing): the urn:dig:chia grammar; rootless retrieval_key = SHA-256(canonical); resourceKey normalization; the three-way scheme split (chia:// content vs §21 dig:// transport vs dig://* browser internal); the ?salt= extension. - [L1 · Cryptography](https://docs.dig.net/docs/protocol/cryptography): HKDF-SHA256 KDF (salt-mixed secret), AES-256-GCM-SIV fixed-nonce seal, the byte-exact constants, the one-crypto-implementation invariant. - [L1 · Merkle inclusion proofs](https://docs.dig.net/docs/protocol/merkle-proofs): the D5 per-resource UNTAGGED leaf = SHA-256(ciphertext), the NODE_TAG fold, odd-node carry-up, proof length ≤ ceil(log2 n) (D8), the base64 X-Dig-Inclusion-Proof wire layout. - [L1 · BLS signatures & DSTs](https://docs.dig.net/docs/protocol/bls-signatures): Chia AugScheme (G1 48B/G2 96B), the five role DSTs (PUSH/NODE/TOMB/REQ/ATTEST) with exact preimages, rogue-key rejection, host↔guest parity fixtures. - [L2 · Capsule format](https://docs.dig.net/docs/protocol/capsule-format): the DIGS data section (BINDING D1) — big-endian byte layout, all 12 SectionIds (KeyTable D3, ChunkPool D4, MerkleNodes D5, ChainState, Filler). - [L2/L3 · The self-defending module](https://docs.dig.net/docs/protocol/self-defending-module): fixed-size obfuscation (128 MiB uniform blob, deterministic ChaCha20 filler), WASM injection memory layout (D2: 2 MiB offset, 384 MiB ceiling), the self-serving guest pipeline, oblivious gather, decoys, the disabled host-attestation gate. - [L4 · On-chain anchoring (CHIP-0035)](https://docs.dig.net/docs/protocol/on-chain-anchoring): store = singleton (free mint), capsule = root-advance (DIG-CAT); owner-discovery memo hint; admin/writer/oracle delegation as the Teams/deploy-token primitive. - [L4 · DIG CAT payment & pricing](https://docs.dig.net/docs/protocol/dig-cat-payment): DIG_ASSET_ID, the treasury inner ph, 3-decimal units, the dynamic USD-pegged per-capsule amount (no protocol constant), the client-side all-or-nothing commit bundle and off-chain payment reconciliation. - [L6 · The dig RPC (machine interface)](https://docs.dig.net/docs/protocol/dig-rpc): JSON-RPC 2.0 over POST, the method catalogue, the chunk wire object (chunk_lens first-window-only, NO decoy field), range/window math, error codes incl. -32004 and the node-profile -32006, the node profile vs the network profile. - [L5 · §21 transport & push](https://docs.dig.net/docs/protocol/transport-and-push): dig:// locator resolution, the REST surface, JSON-outer/Chia-codec-inner envelope, 2-leg push v1, the authenticated head (PUSH_DST), per-request §21.9 auth, tombstones, decoy indistinguishability. - [L7 · DIG Node peer network](https://docs.dig.net/docs/protocol/peer-network): the normative node↔node protocol — mTLS peer identity (peer_id = SHA-256(TLS SubjectPublicKeyInfo DER)), the ordered NAT-traversal ladder (direct → UPnP → NAT-PMP → PCP → relay-coordinated hole-punch (signalling only) → relayed/TURN transport, relay-data-last), the relay's four roles (STUN, introducer, hole-punch signalling, relayed transport), STUN reflexive-address discovery, introducer + gossip peer discovery, the Kademlia DHT (§4c) with provider records that locate WHICH peers hold content — content-key = SHA-256(domain-tag ‖ store_id[‖root[‖retrieval_key]]) (tags 0x01/0x02/0x03), node id = peer_id, distance = XOR, bucket = 255−leading_zeros; the four DHT RPC methods (find_node / find_providers / add_provider / ping + error envelope, type-tagged JSON u32-BE length-prefixed over a dig-nat mTLS stream — NOT JSON-RPC 2.0) returning Contact / ProviderRecord shapes (addresses byte-compatible with dig.getPeers), provider records TTL'd + republished + GC'd and every inbound RPC folding the mTLS-verified caller into the routing table — the relay RelayMessage JSON wire (RLY-001..RLY-007), streaming-first content transport over a multiplexed stream connection, availability/inventory queries (dig.getAvailability batch has_store/has_root/has_capsule + dig.listInventory) as the pre-fetch step, byte-range multi-source content/.dig fetch (dig.fetchRange) with per-range merkle integrity + resume, the peer RPC methods (dig.getPeers / dig.announce / dig.getNetworkInfo / dig.getAvailability / dig.listInventory / dig.fetchRange + -32006 / -32007), and the relay-last-fallback invariant. The anchor dig-nat/dig-relay/dig-gossip/dig-dht/dig-node conform to. - [L6 · Verification, provenance & anchoring](https://docs.dig.net/docs/protocol/verification-and-provenance): the four ordered integrity gates (merkle → authenticated decryption → anchored-root pinning → risc0), anchored-root pinning against the singleton via coinset.org, the MOCK-by-default risc0 caveat, provenance UX. - [L6 · The blind host model](https://docs.dig.net/docs/protocol/blind-host-model): provider-blindness, serve_blind (framing-only decode), the resolver (*.on.dig.net + custom domains), the /v1 control plane (CHIP-0002 login, JWT sessions, refresh reuse-detection, action re-auth, GitHub-OIDC CI), accept-on-signature push trust. - [Conformance & parity](https://docs.dig.net/docs/protocol/conformance-and-parity): the cross-impl parity discipline (frozen canonical()/retrieval_key() goldens, C8 crypto fixtures), the URN conformance vectors, the OpenRPC-vs-server diff. - [The window.chia provider spec](https://docs.dig.net/docs/protocol/window-chia-provider): the normative, versioned specification of the window.chia provider — the provider object shape, the EIP-1193-style request/connect contract, every CHIP-0002 method, capability/version feature-detection, and EIP-6963-style multi-provider discovery. - [Inclusion vs execution proofs](https://docs.dig.net/docs/inclusion-vs-execution-proofs): synchronous per-read Merkle inclusion proofs (pin served bytes to the on-chain root) vs asynchronous ZK/risc0 execution receipts (attest faithful serving, gated/budgeted on the hub control plane). - [CHIP-0035 store-coin spends & delegation](https://docs.dig.net/docs/chip-0035-spends-and-delegation): a store is a CHIP-0035 DataLayer singleton; the canonical wasm builds every store-coin spend; admin/writer/oracle delegation is the on-chain primitive behind Teams and revocable CI deploy tokens (a deploy token = a revocable writer key). ## Support - [Get help](https://docs.dig.net/docs/support/get-help): community Discord, GitHub issues, and how to file a report that gets answered. - [Troubleshooting](https://docs.dig.net/docs/support/troubleshooting): fixes for the common failures — insufficient DIG, confirmation timeout, non-fast-forward, verification failed, wallet/session. - [FAQ](https://docs.dig.net/docs/support/faq): what it costs (uniform per-capsule price in $DIG), iterate-for-free, blind hosting, custom domains, updates, public vs private. - [Error codes](https://docs.dig.net/docs/support/error-codes): one table for every code — dig RPC JSON-RPC (-32xxx), digstore CLI exit codes (0–16), and DIGHUb user-facing codes (DIG_INSUFFICIENT, SLUG_TAKEN, WALLET_DECLINED, …). - [Changelog](https://docs.dig.net/docs/support/changelog): what changed across the developer surfaces — digstore CLI (semver), dig RPC (method set + chunk wire format), window.chia provider, dig-sdk and chip35-dl-coin-wasm (npm) — plus how each is versioned and any breaking changes. - [Status](https://docs.dig.net/docs/support/status): health of the DIG services (rpc.dig.net, hub.dig.net, on.dig.net) and the RPC + provider versioning notes (a live dashboard is planned). ## Machine-readable - [dig RPC OpenRPC document — network profile](https://docs.dig.net/openrpc.json): the canonical machine-readable spec for the dig JSON-RPC 2.0 read interface served by rpc.dig.net — every method (dig.getContent, dig.getProof, dig.getProofStatus, dig.getCapsule, dig.getManifest, dig.getMetadata, dig.listCapsules, dig.health, dig.methods), request/response JSON Schemas (StoreId, RetrievalKey, Root, ChunkObject with chunk_lens and no decoy field, …), and the catalogued JSON-RPC error responses incl. -32004. Server: https://rpc.dig.net. Generate a typed client from this. Human page: https://docs.dig.net/docs/protocol/dig-rpc - [dig RPC OpenRPC document — node profile](https://docs.dig.net/openrpc-node.json): the distinct, smaller surface of the local dig-node / dig-companion / in-process DIG Browser node — dig.getContent (local-first) PLUS node-only methods the security model depends on (dig.getAnchoredRoot = the CHIP-0035 on-chain head, dig.stage, cache.*) AND the peer-network methods (dig.getPeers, dig.announce, dig.getNetworkInfo, dig.getAvailability + dig.listInventory — the batch pre-fetch availability/inventory check of whether a peer holds a store/root/capsule — and dig.fetchRange, the streaming byte-range multi-source content/.dig fetch that returns RangeFrame chunks with per-range merkle integrity — with PeerId/CandidateAddress/PeerRecord/AvailabilityItem/AvailabilityAnswer/RangeFrame schemas + the -32006 PEER_UNREACHABLE and -32007 RANGE_NOT_SATISFIABLE errors). Gate on dig.methods rather than assuming one uniform surface. Human page: https://docs.dig.net/docs/protocol/dig-rpc#node-profile - [DIG DHT RPC wire](https://docs.dig.net/dht-methods.json): the Kademlia content-discovery wire (dig-dht) — a DISTINCT framed wire, NOT JSON-RPC 2.0: type-tagged JSON carried as a u32 big-endian length-prefixed body over an authenticated dig-nat mTLS stream (same framing as the relay control messages). The four methods (find_node / find_providers / add_provider / ping + the error envelope), the Contact / ProviderRecord / CandidateAddr shapes (addresses byte-compatible with dig.getPeers), the content-key derivation (SHA-256(domain-tag ‖ store_id[‖root[‖retrieval_key]]), tags 0x01 store / 0x02 root-capsule / 0x03 resource; node id = peer_id; distance = XOR; bucket = 255−leading_zeros), and the provider-record lifecycle (announce on hold → TTL'd expires_at → republish before expiry → withdraw on removal → GC when stale; every inbound RPC folds the mTLS-verified caller into the routing table). Human page: https://docs.dig.net/docs/protocol/peer-network#dht - [Error codes catalog](https://docs.dig.net/error-codes.json): the ecosystem cross-surface error catalog — `[{surface, code, http_or_exit, description}]` across `dig-rpc` (JSON-RPC -32xxx incl. the node-profile -32006 PEER_UNREACHABLE + -32007 RANGE_NOT_SATISFIABLE), `digstore-cli` (exit codes 0–16), `dighub` (the hub's user-facing codes + their HTTP status / wire code), and `dig-loader` (the dig:// content-loader DIG_ERR_* codes). Indexed by surface under `bySurface`. Human page: https://docs.dig.net/docs/support/error-codes - [Knowledge graph](https://docs.dig.net/knowledge-graph.json): nodes (concepts + docs) and typed edges (defines, part-of, requires, relates-to, see-also) derived from tags and related-links. - [Sitemap](https://docs.dig.net/sitemap.xml): every public route. - [Hub REST OpenAPI](https://hub.dig.net/v1/openapi.json): the OpenAPI 3 document for the DIGHUb `/v1` control plane (account/auth/store/domain/badge lifecycle). Served by the hub, not docs.dig.net — listed here as the canonical entrypoint for the hub's REST surface. The core concepts an agent should resolve first: the **capsule** (`storeId:rootHash` — one immutable store generation) and the **store** (a sequence of capsules); both are defined at https://docs.dig.net/docs/concepts. Canonical entrypoints: docs https://docs.dig.net, hub (publish/manage) https://hub.dig.net, dig RPC endpoint https://rpc.dig.net, project home https://dig.net. ## Optional - [DigStore source](https://github.com/DIG-Network/digstore): the open-source (GPL-2.0) CLI and store format. - [DIG Network site](https://dig.net): the project home. - [DIGHUb](https://hub.dig.net): publish and manage capsules from the web. ## Locales These docs ship in 14 locales: en (default, unprefixed paths, e.g. https://docs.dig.net/docs/quickstart), zh-CN, zh-TW, ko, ja, ru, es, pt-BR, fr, de, tr, vi, id, hi (each prefixed, e.g. https://docs.dig.net/de/docs/quickstart). Every page declares its full set of locale alternates via `` in its own `` and in each locale's `/sitemap.xml`; this file itself is served identically at every locale's root (e.g. https://docs.dig.net/de/llms.txt) — link targets above are the canonical English paths.