Midnight providers are modular, pluggable components that each handle a specific capability required for transaction construction and submission to the Midnight blockchain. The provider packages include functionality for proof generation, private state management, public data queries, and transaction balancing and submission. In plain terms, they're the toolset that powers Midnight.js's architecture.

There are seven provider slots in total. Five of them — covering proof generation, private state, and public data — live in the Midnight.js API. The remaining two — for transaction balancing and submission — live in the Wallet SDK.

The five providers in Midnight.js

midnight-js-indexer-public-data-provider: This is a GraphQL-based blockchain data provider that offers query and subscription operations against public blockchain data.

midnight-js-level-private-state-provider: This provides AES-256-GCM encrypted persistent state storage via LevelDB.