Midnight RPC Node
Privacy Application Infrastructure

Explore Midnight's Substrate node interface, GraphQL indexer and Compact contract workflow. Keep public chain access separate from private state and proving.

Specification Midnight Network

Public chain interfaces and privacy application components

Midnight

Node RPC, GraphQL indexer and Compact contracts

Architecture Polkadot SDK / Substrate
Contracts Compact
Chain interface Substrate JSON-RPC
Application data GraphQL indexer
Private state Application-managed

Midnight combines public verification with private application data. Node RPC provides chain-level access, while the indexer, wallet and proof providers perform distinct jobs in a Compact application.

Integration components:

  • Substrate chain inspection
  • GraphQL public-data queries
  • Private state held by the application
  • Zero-knowledge proof workflow

Endpoint configuration

Choose matching node and indexer endpoints from Midnight's network documentation. Confirm the service and network available in your Crypto Chief dashboard before connecting.

Connecting Midnight applications to public and private state

Midnight separates blockchain access from the services that a privacy application needs. Its node is built with the Polkadot SDK and exposes Substrate JSON-RPC for chain inspection. A Midnight RPC endpoint can supply block headers and runtime information, while the indexer's GraphQL API supplies application queries and subscriptions. Neither interface is an Ethereum eth_call replacement. Choose the node and indexer for the same network before initializing a wallet or contract provider.

Compact contracts combine public ledger state with private state held by the application. Midnight.js coordinates separate providers for public data, private storage, proof generation, transaction balancing and submission. Keep witness processing under the application's privacy policy: a remote proof service can see information supplied for proving. Reading an RPC response cannot reveal somebody else's private contract state, and attaching an API key does not grant access to shielded information.

A practical integration check reads a known block through node RPC, compares its hash with the indexer and then follows a contract update through the complete transaction pipeline. Monitor indexer progress separately from node synchronization. Match compiler, ledger, wallet and indexer versions against Midnight's support matrix; an apparently healthy WebSocket connection does not establish that all these components can decode the same transaction format.

Official references: Midnight node architecture; Deploying and operating a Midnight contract; Midnight API reference

What is Midnight RPC?

Node data, indexer queries and private contract execution

A Midnight RPC node exposes the chain-level interface of Midnight's privacy blockchain through Substrate JSON-RPC. Applications also use a GraphQL indexer, wallet integration and proof generation when interacting with Compact contracts.

Midnight lets a contract distinguish public ledger information from private application state. A Midnight RPC URL gives access to public chain data; selective disclosure is implemented by contract logic and proofs rather than an RPC permission switch.

Zero-knowledge proofs let a Compact circuit demonstrate that its rules were followed without publishing every private input. The Midnight RPC API handles chain communication, while proving and private state management belong to separate application components.

Technical Documentation

Quick start for developers

Midnight node and application APIs

Use the node's Substrate JSON-RPC interface for chain inspection. Midnight.js applications also require an indexer and providers for private state, proof generation, wallet balancing and transaction submission. These components do not share one universal RPC namespace.

  • chain_getHeader and chain_getBlock inspect public blockchain records.
  • state_getMetadata describes the native runtime for compatible Substrate tooling.
  • The indexer exposes GraphQL queries and subscriptions for public application data.
  • Private state and witness data are handled outside public node RPC.
  • Compiler, ledger, SDK, node and indexer versions must follow the network's support matrix.

Validate the whole contract workflow

Check that the node and indexer report the same known block, then test a contract state update with compatible application providers. Proof generation has its own failure modes and privacy implications; inspect the complete pipeline before attributing every failed call to the node connection.

Got questions?
we are here to help

Midnight's node is based on Substrate and uses its native chain interface. Compact contract interaction uses Midnight tooling rather than Solidity ABI calls through eth_call.

No. A provider key authorizes access to a service. Private application state and selective disclosure are controlled by the application's contract and privacy design.

Yes. Pair the compiler, ledger, SDK, node and indexer using Midnight's current support matrix. A connected socket does not establish that all components understand the same transaction format.

No. Private state is managed by the application's private state provider. Node RPC and the GraphQL indexer expose the blockchain's public information.

The indexer provides GraphQL contract queries and subscriptions used by application providers. Substrate node RPC serves a different chain-level interface; both services must target compatible network and ledger versions.

Pricing that grows with your needs.

Free

Start building on Web3 — no credit card.

$0
  • 5 reqs/sec RPC
  • 5 reqs/min Unified API
  • 1 req/day AML
  • 10,000 EventStream events/month
  • Ultimate chains
  • WSS, Statistics
  • Community support

Pay for use

Flexible pay-as-you-go for any workload.

From $10
  • 400 reqs/sec RPC
  • 300 reqs/min Unified API
  • 5 reqs/sec AML
  • EventStream at $0.00005/event after 10,000 free
  • Ultimate chains
  • WSS, Whitelists, Statistics
  • Support portal

Subscription

From $500 monthly plus 20% extra value.

From $500
  • 400 reqs/sec RPC
  • 300 reqs/min Unified API
  • 5 reqs/sec AML
  • EventStream at $0.00005/event after 10,000 free
  • Ultimate chains
  • WSS, Whitelists, Statistics
  • Support portal

Enterprise

Tailored solution for expert builders

Custom terms

All Subscription features plus:

  • Flexible rate limits
  • Engineering team support
  • Custom SLA
  • Personal manager