core-concepts:architecture

Official

Clarify Midnight architecture and transactions

Authordevrelaicom
Version1.0.0
Installs0

System Documentation

What problem does it solve?

Developers, auditors, and protocol designers need a concise, authoritative explanation of how Midnight composes Zswap token operations, Compact contract execution, and cryptographic binding into atomic, privacy-preserving transactions. This Skill clarifies transaction anatomy, the guaranteed vs fallible execution model, ledger state shape, and the cryptographic guarantees that prevent value injection, double-spend, and proof reuse.

Core Features & Use Cases

  • Transaction Anatomy: Explains guaranteed and fallible sections, Zswap offers, contract call transcripts, binding randomness, and fee handling.
  • Cryptographic Binding: Details Pedersen commitments, Schnorr segment bindings, ZK-SNARK composition, and why proofs cannot be reused across transactions.
  • State & Ledger: Describes the commitment Merkle tree, nullifier set, recent Merkle roots window, contract state storage, and verification key management.
  • Practical Patterns: Guidance for simple transfers, contract interactions, atomic swaps, and merging offers off-chain with validation rules.
  • Use Case: When building a Compact contract that accepts shielded tokens and must remain balance-safe across merged transactions, use this Skill to ensure correct transcript construction, proof binding, and state updates.

Quick Start

Explain the Midnight transaction anatomy, focusing on guaranteed vs fallible sections, Pedersen-based binding, and the verification order needed to safely build a contract that accepts shielded token inputs.

Dependency Matrix

Required Modules

None required

Components

references

💻 Claude Code Installation

Recommended: Let Claude install automatically. Simply copy and paste the text below to Claude Code.

Please help me install this Skill:
Name: core-concepts:architecture
Download link: https://github.com/devrelaicom/midnight-expert/archive/main.zip#core-concepts-architecture

Please download this .zip file, extract it, and install it in the .claude/skills/ directory.
View Source Repository

Agent Skills Search Helper

Install a tiny helper to your Agent, search and equip skill from 471,000+ vetted skills library on demand.