midnight-cq:ledger-testing
OfficialDeterministic ledger tests for Midnight SDK
Software Engineering#serialization#cost-model#ledger-testing#ledger-v8#onchain-runtime#proof-staging#state-testing
Authordevrelaicom
Version1.0.0
Installs0
System Documentation
What problem does it solve?
This skill helps developers write deterministic, comprehensive tests for code that interacts directly with the Midnight ledger libraries by removing flaky test patterns and enforcing correct lifecycle transitions, fixture validity, and time control.
Core Features & Use Cases
- Proof staging validation: Verify transactions progress through unproven → proved → bound → proof-erased stages and assert stage-specific behaviors and type-enforced transitions.
- Ledger state and time control: Test ZswapLocalState and DustLocalState immutability, mutation return values, replayEvents, TTL expiry behavior with fixed dates, and watchFor/clearPending semantics.
- Crypto fixtures, cost model, and serialization: Use deterministic sample functions for hex-typed fixtures, assert deterministic coinCommitment and coinNullifier properties, validate cost model dimensions and fee calculations, perform encode/decode and serialize/deserialize round-trip checks. Use case: Build unit and integration tests that validate transaction construction, fee estimation, well-formedness rejection cases, and on-chain LedgerState.apply effects.
Quick Start
Create a deterministic test that builds an unproven transaction from an intent, advances it through prove and bind, asserts CostModel dimensions and well-formedness, and verifies serialize/deserialize at a fixed date.
Dependency Matrix
Required Modules
None requiredComponents
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: midnight-cq:ledger-testing Download link: https://github.com/devrelaicom/midnight-expert/archive/main.zip#midnight-cq-ledger-testing Please download this .zip file, extract it, and install it in the .claude/skills/ directory.
Agent Skills Search Helper
Install a tiny helper to your Agent, search and equip skill from 471,000+ vetted skills library on demand.