Urgent.News

600+ sources. One page. See who else covered it.

Editions

Tech

Midnight Providers: What They Are, Where They Live, and Why We Use Them

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…

Midnight providers are specialized components that each tackle a specific task in the construction and submission of transactions to the Midnight blockchain. These packages contain features for proof creation, private state management, public data inquiries, and transaction balancing and submission. Collectively, they form the foundation of Midnight.js architecture. There are a total of seven provider slots, with five residing in the Midnight.js API and the remaining two within the Wallet SDK.

The five providers in the Midnight.js API include a GraphQL-based blockchain data provider, a provider that offers AES-256-GCM encrypted persistent state storage, an HTTP client for the Midnight proof server, a browser-compatible zero-knowledge artifact provider, and a Node.js filesystem-based zero-knowledge artifact provider. Additionally, there's a variation called midnight-js-dapp-connector-proof-provider, which offloads proof generation to the DApp Connector wallet instead of communicating with an HTTP proof server.

On the other hand, the two providers in the Wallet SDK manage transaction balancing and signing, as well as transaction submission to the network. These two providers are provided by the Wallet SDK, not Midnight.js itself. When a single wallet class is implemented, it can handle both slots simultaneously.

To use these providers, one would create an object called `providers` and assign each provider to its respective slot. This setup allows for an optional eighth slot, loggerProvider, for diagnostic logging, which is not mandatory but can be utilized for structured logs across the provider layer. The clean separation of providers between Midnight.js and the Wallet SDK is crucial, as it enables the swapping of wallet implementations without affecting the proof or state logic, and vice versa.

This separation simplifies the overall structure and enhances flexibility when building upon the functionalities offered by Midnight.js, such as contract deployment and circuit calls.

Written by urgent.news from Dev.to's reporting — not their text. Machine-written — may contain errors; check the original before relying on it.

Read the original at dev.to →

More in Tech

Discord Giveaway Bot

A free, multilingual giveaway bot that keeps running through a restart. Entry with a single button click, customisable emoji, label and style Poll-based scheduler, so no giveaway is lost or orphaned…

  • Open-source, multilingual giveaway bot developed for Discord.
  • Allows custom emojis, labels, styles, and weighted bonus system.
  • Web-based dashboard for monitoring and managing public results.

Discord Ticket Bot

A free, self-hosted ticket bot for Discord support teams. You run it yourself, so your ticket data never leaves your server.

  • Discord Ticket Bot is free and self-hosted
  • Up to 25 customizable ticket types available
  • Operates on SQLite or MySQL databases

Kubernetes for Beginners: From Local to Production – May the Pods Be With You

The Quest Begins (The "Why") I remember the first time I tried to take a weekend side‑project from my laptop to something that felt “real”.

  • Developers transition simple weekend project to production-like environment.
  • Kubernetes introduced as declarative orchestrator for defining application state.
  • Key components: Pods, Deployments, Services, and Ingress for scalable deployments.

My CI Doesn't Know Which Free Model It's Calling Anymore

At 2:13 a.m. last Tuesday, my GitLab job went red. The stack trace ended with 404: /v1/chat/completions not found . I checked my code. Nothing had changed. The free model route had moved.

  • GitLab job failed due to 404 status code for missing /v1/chat/completions route
  • Sidecar service resolves current model endpoint, eliminating endpoint babysitting
  • Sidecar configuration test ensures proper baseurl, model, and timeouts

More from Saturday 15 August →