Build a dapp on Chia
एंड-टू-एंड: एक React ऐप स्कैफोल्ड करें, dig-sdk के साथ इन-पेज Chia वॉलेट (window.chia + WalletConnect फॉलबैक) वायर करें, chip35 wasm के ज़रिए एक spend बनाएं और साइन करें, फिर ऑन-चेन डिप्लॉय करें और एक कस्टम डोमेन जोड़ें — हर DIG प्रिमिटिव से गुज़रने वाला एक थ्रेड।
Changelog
What changed across the DIG developer surfaces — the digstore CLI, the dig RPC, and the window.chia provider — including breaking changes and the versioning rules for each.
Concepts & glossary
मुख्य DIG Network entities का वन-पेज इंडेक्स — capsule, store, generation, URN, retrieval key, dig RPC, chia:// protocol, और on-chain anchoring — हर एक को एक बार परिभाषित किया गया और उसके गहन डॉक से लिंक किया गया।
Configure dig-node
Configure a dig-node: listen ports and listeners, the cache cap, and the upstream the node blind-fetches from — via config and DIGNODE_* environment variables.
Conformance & parity
The cross-implementation parity discipline: frozen canonical()/retrieval_key() goldens, the C8 crypto fixtures, the shared URN conformance vectors, the OpenRPC-vs-server diff test, and what every reimplementation MUST pass.
Conformance & Security
Blind serving model, decoy streams, CORS, caching, rate limiting, and conformance checklist for dig RPC endpoints.
DIG Network
DigStore (कंटेंट-एड्रेसेबल पब्लिशिंग के लिए), dig RPC (ब्लाइंड होस्टिंग और रिट्रीवल के लिए), और DIG Browser (कंटेंट एक्सेस के लिए) — DIG Network के प्रिमिटिव्स का अवलोकन।
Error codes
Every DIG error code in one place: dig RPC JSON-RPC codes, digstore CLI exit codes, and DIGHUb user-facing codes — each with what it means and what to do.
For integration developers
एक पूरी तरह मशीन-रीडेबल प्लेटफॉर्म — OpenAPI/OpenRPC, एक कैटलॉग्ड एरर टैक्सोनॉमी, लाइव प्राइसिंग, JWKS, प्रति-पेज JSON, और एक टाइप्ड @dignetwork/dig-sdk — ताकि आप बिना मानव प्रोज़ की एक भी लाइन स्क्रैप किए अपने ऐप में एक वॉलेट + सत्यापित reads वायर कर सकें।
Get help
Where to get help with DIG — the community Discord, GitHub issues, and how to file a report that gets answered fast.
How do I… integrate DIG into my app?
The shortest path for integrating developers: connect a wallet, read verified content, build a spend the right way, and deploy from CI — using the typed @dignetwork/dig-sdk and the dig RPC, no prose-scraping required.
Inclusion vs execution proofs
Two proof types: synchronous Merkle inclusion proofs that pin served bytes to an on-chain root, and asynchronous ZK / risc0 execution receipts that attest faithful serving — gated on the control plane.
Install anywhere — the universal installer
The cross-platform dig-node installer for Windows, macOS, and any Linux: one curl | sh (or a direct download), installs the service and the digstore CLI, and registers dig.local.
Install on Ubuntu/Debian (apt)
Install dig-node and the digstore CLI on Ubuntu/Debian from the apt.dig.net repository, and run dig-node as a managed systemd service.
L1 · BLS signatures & domain separation
Chia AugScheme (G1 48B / G2 96B), the five mutually-distinct role DSTs (PUSH/NODE/TOMB/REQ/ATTEST) with their exact signing-message preimages, rogue-key rejection, and the host↔guest parity fixtures.
L2/L3 · The self-defending module
Fixed-size obfuscation (128 MiB uniform blob, deterministic ChaCha20 filler), WASM injection memory layout (BINDING D2: 2 MiB offset, 384 MiB ceiling), the self-serving guest pipeline, oblivious gather, decoy generation, and the disabled host-attestation gate.
L5 · §21 transport & push
The §21 transport: dig:// locator resolution, the REST surface, the JSON-outer / Chia-codec-inner envelope, 2-leg push v1 (inline | presigned), the authenticated head (PUSH_DST), per-request §21.9 auth with exact signing messages, ETag/delta/pull, tombstone revocation, and decoy indistinguishability.
L6 · The blind host model
The provider-blindness invariant, serve_blind (framing-only decode), the root-pinned immutable response cache, the *.on.dig.net + custom-domain resolver, the /v1 control plane (CHIP-0002 login, JWT sessions, refresh reuse-detection, action re-auth, GitHub-OIDC CI), and the accept-on-signature push trust model.
L6 · The dig RPC (machine interface)
The dig RPC is THE machine interface of the protocol: JSON-RPC 2.0 over HTTP POST, the full 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 vs the network profile.
L6 · Verification, provenance & anchoring
The four ordered integrity gates (merkle inclusion → authenticated decryption → anchored-root pinning → risc0 execution), anchored-root pinning against the CHIP-0035 singleton via coinset.org, the authenticated head, tombstones, the MOCK-by-default risc0 caveat, the freshness contract, and provenance UX surfacing.
L7 · DIG Node peer network
The normative node↔node protocol: mTLS peer identity (peer_id = SHA-256(TLS SPKI DER)), the two RPC tiers (mTLS-authenticated PEER/CONTROL vs anonymous PUBLIC-READ so browsers can retrieve content), the ordered NAT-traversal ladder (direct → UPnP → NAT-PMP → PCP → relay-coordinated hole-punch (signalling only) → relayed/TURN transport), the relay's four roles (STUN, introducer, hole-punch signalling, relayed transport), STUN reflexive-address discovery, introducer + gossip peer discovery, PEX peer-exchange (node↔node stream + the RLY-008 relay introducer binding), the Kademlia DHT with provider records that locate which peers hold content (find_node/find_providers/add_provider/ping over a framed dig-nat mTLS stream; content-key = SHA-256(domain-tag ‖ store_id[‖root[‖retrieval_key]])), the relay RelayMessage wire (RLY-001..RLY-008), the peer RPC methods (dig.getPeers/dig.announce/dig.getNetworkInfo/dig.getAvailability/dig.listInventory/dig.fetchRange), and the relay-last-fallback invariant (prefer hole-punch signalling over full relaying).
L7 · Private retrieval (onion routing)
The normative privacy-mode content-retrieval protocol: the per-request speed-vs-privacy toggle on the dig RPC surface, how a private read is onion-routed end-to-end (requester → guard/entry → middle → exit → providers → back) with a who-knows-what table, telescoping circuit construction over dig-nat mTLS (ntor X25519 + HKDF-SHA256 handshake, fixed-size 512-byte ChaCha20-Poly1305 layered cells, the RELAY command set), the onion-relay directory (dig-dht tag 0x04) and relay advertisement, guard nodes, the exit reusing the ordinary merkle-verified content read, and the honest threat model (partial-adversary unlinkability, stronger than Tor on exit integrity, weaker on anonymity-set size and Sybil cost).
Machine-readable surfaces
Every machine-readable entry point: /openrpc.json, /error-codes.json, /llms.txt, /knowledge-graph.json, the sitemap, and per-page schema.org JSON-LD — so an agent integrates DIG without scraping a single line of human prose.
Manage your node
Operate a running dig-node: the control.* admin RPCs (status, cache, peers) and the DIG Browser's My Node UI that drives them.
Methods
Complete dig RPC method set: dig.getContent, dig.getProof, dig.getCapsule, dig.getManifest, dig.listCapsules, dig.listCollectionItems, dig.getCollection, and service discovery methods.
Point a consumer at your node
Make the DIG Browser or extension read from your local dig-node first (dig.local → localhost), falling back to rpc.dig.net — local-first reads that share one .dig cache.
Protocol: Overview
DIG Protocol को सात bottom-up layers के रूप में, नॉर्मेटिव और implementation-defined। capsule (storeId:rootHash) मूल इकाई है; host ब्लाइंड है और पाठक चेन के विरुद्ध सत्यापित करता है। यह अथॉरिटेटिव प्रोटोकॉल संदर्भ है।
Run a DIG node
एक dig-node क्या है, आप एक क्यों चलाएंगे, और इसे कैसे इंस्टॉल करें — Ubuntu/Debian के लिए apt repository या क्रॉस-प्लेटफॉर्म यूनिवर्सल इंस्टॉलर।
Sharing over a remote
Publishing stores to remotes, downloading with verification, revoking roots, and understanding public vs. private access models.
Status
Where to check the health of the DIG services — the dig RPC (rpc.dig.net), DIGHUb (hub.dig.net), and the resolver (on.dig.net) — plus how RPC and provider versions are signalled.
Streaming
Streaming chunk model for byte methods: chunk object structure, 64 KiB alignment, reassembly, proof verification, and reference client loop.
The DIG SDK
@dignetwork/dig-sdk — ChiaProvider (injected window.chia + WalletConnect→Sage), DigClient (verified reads), Paywall (pay-to-unlock / NFT-gating), and the canonical CHIP-0035 spends at the /spend subpath.
The dig:// remote (clone/pull/push)
Git-style remote protocol via dig:// URLs, per-request BLS signing, clone/pull/push operations, and self-hosted node setup.
Troubleshooting — get unstuck
हर विफलता आपको एक स्थिर कोड और एक request-id देती है जो सीधे सर्वर लॉग से जुड़ती है, ऑन-चेन spends रेस-गार्डेड हैं ताकि आप कभी दोगुना भुगतान न करें, और स्पष्ट pre-flight गार्ड्स $DIG खर्च करने से पहले बर्बाद capsules को रोकते हैं।
Using the public network RPC
Public RPC endpoint usage, portability across nodes, operating your own node, and rate limiting policies.
What is the dig RPC?
JSON-RPC 2.0 के ज़रिए DigStore capsules के लिए नेटवर्क-व्यापी read इंटरफेस; संरचना से ब्लाइंड, बिना भरोसे के सत्यापन योग्य, और किसी भी साइज़ पर स्ट्रीम करने योग्य।