Midnight Network Developer Tutorials

A portfolio of comprehensive tutorials, runnable code, and developer tools for the Midnight blockchain — covering smart contracts, privacy patterns, debugging, testing, and wallet integration.

13
Tutorials
13
GitHub Repos
40+
Code Modules
$4.3k–$7.6k
Total Bounty Value

Medium-Priority Tutorials

Security Checklist for Midnight dApps

Medium

8-phase security checklist covering nullifier patterns, selective disclosure, overflow guards, proof server testing, and post-deployment monitoring.

Security Compact Audit

Decoding Error 1010: Invalid Transaction

Medium

6 root causes mapped to diagnostic workflows. 6 TypeScript modules + automated Python diagnostic script for proof server, version, and encoding issues.

Debugging TypeScript Diagnostics

Getting NIGHT Tokens: Funding Guide

Medium

Interactive funding decision tree, exchange status checker, wallet setup guides, bridge walkthrough, and troubleshooting for NIGHT token acquisition.

Onboarding Exchanges Bridging

When Proofs Fail: Debugging ZK Generation

Medium

Bash diagnostic script (7 automated checks), TypeScript version checker, Docker Compose health templates for proof server troubleshooting.

ZK Proofs Docker Bash

Low-Priority Tutorials

Testing Compact Contracts

Low

Unit tests with vitest, 4 assertion patterns, nullifier testing, Docker integration test stack, GitHub Actions CI pipeline.

Testing CI/CD Docker

DApp Connector API: Wallet Integration

Low

V4 API wallet detection, transaction flow, state subscriptions. 3 TypeScript modules with XSS-safe rendering and polling fallback.

Wallet DApp V4 API

Integrating Midnight Proofs into Backend

Low

Express REST API with wallet, proof-client, contract-client modules. Health checks, error classification, retry strategies, production checklist.

Backend Node.js REST

Reading Contract State from Frontend

Low

React frontend with Apollo Client GraphQL, WebSocket real-time subscriptions, ledger field type parser, ContractStateViewer components.

React GraphQL Frontend

Verified Math in ZK Circuits

Low

4 Compact contracts (division, scaling, counter overflow, large amounts), Python static audit tool, 16 test cases for ZK math pitfalls.

ZK Math Compact Audit

DUST Sponsorship: Fee Delegation

Low

TypeScript sponsor service, client integration module, Python DUST analyzer. Covers ownPublicKey() behavior in sponsorship context.

DUST Sponsorship TypeScript

Contract Size Limits

Low

Lace 13-circuit limit, block weight, proof time scaling, 3 splitting strategies, cross-contract references. Python analyzer tool.

Optimization Circuits Compact

Time and Deadlines in Compact

Medium

Block-time query functions, Counter Uint16 ceiling, multi-counter cascade, hours-since-epoch, split timestamp patterns. Time audit tool.

Time Counters Compact

Oracle Patterns for Midnight

High

Signed witness with eddsa_verify, admin feed with timelock, cross-contract aggregation with fallback. Oracle audit tool.

Oracles Cross-Contract Compact

Tools & Utilities

Diagnostic & Audit Tools

Each repository includes runnable developer tools:

  • midnight_audit.py — Static security analyzer
  • diagnose_error_1010.py — Error 1010 root cause finder
  • diagnose_proof_server.sh — Proof server health checker
  • math_audit.py — ZK math trap detector
  • dust_analyzer.py — DUST sponsorship analyzer
  • contract_size_analyzer.py — Circuit budget tracker
  • funding_decision_tree.py — NIGHT token funding guide
  • exchange_status_checker.sh — Exchange availability
  • time_audit.py — Time-related issue detector
  • oracle_audit.py — Oracle pattern auditor