/midnight-verify:verify-by-wallet-sourcefrom midnight-verify
Verifies claims about the Midnight Wallet SDK by inspecting source code from official repositories. Covers wallet packages, DApp Connector API, HD derivation, address encoding, and three-wallet architecture.
Ships in midnight-verify. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
None: SKILL.md is the whole skill.
You are verifying a claim about the Midnight Wallet SDK by reading the actual source code. Follow these steps in order.
Source code is evidence. Everything else is a hint.
| Source | Role | Rule |
|---|---|---|
| Source code definitions (function signatures, type exports, implementation) | Primary evidence | Always the target. Verdicts must cite source code. |
| Test files | Navigation aid | Follow test imports to find the right source code to inspect. Do not cite tests as evidence. Running tests (clone to /tmp, execute) is a last resort — realistically never needed. |
| docs-snippets, spec documents (Wallet Spec, DApp Connector Spec, Ledger Spec) | Hints only | Useful for orienting where to look. Never evidence on their own. Any claim derived from these must be corroborated by source code inspection. |
| ADRs, Design.md | Hints only | Can support "why" claims, but the "what" they describe must be verified via source. |
Repository routing — match the claim to the right repo and path:
| Claim About | Primary Repo | Key Paths |
|---|---|---|
| Facade API, unified wallet operations | midnightntwrk/midnight-wallet | packages/facade/src/ |
| Variant/runtime, hard-fork migration | midnightntwrk/midnight-wallet | packages/runtime/src/ |
| Shielded wallet, ZK coin management | midnightntwrk/midnight-wallet | packages/shielded-wallet/src/v1/ |
| Unshielded wallet, Night UTXO | midnightntwrk/midnight-wallet | packages/unshielded-wallet/src/v1/ |
| Dust wallet, fee mechanics | midnightntwrk/midnight-wallet | packages/dust-wallet/src/v1/ |
| Branded types, core abstractions | midnightntwrk/midnight-wallet | packages/abstractions/src/ |
| Coin selection, balancing, proving, submission | midnightntwrk/midnight-wallet | packages/capabilities/src/ |
| HD key derivation, BIP32/BIP39 | midnightntwrk/midnight-wallet | packages/hd/src/ |
| Bech32m address encoding | midnightntwrk/midnight-wallet | packages/address-format/src/ |
| Common utilities (EitherOps, ObservableOps) | midnightntwrk/midnight-wallet | packages/utilities/src/ |
| GraphQL indexer sync | midnightntwrk/midnight-wallet | packages/indexer-client/src/ |
| Polkadot RPC submission | midnightntwrk/midnight-wallet | packages/node-client/src/ |
| ZK proof generation client | midnightntwrk/midnight-wallet | packages/prover-client/src/ |
| DApp Connector API types and spec | midnightntwrk/midnight-dapp-connector-api | src/api.ts |
Package hierarchy context:
The wallet SDK is a monorepo with this dependency structure:
facade ← Unified API combining all wallet types
├── shielded-wallet
├── unshielded-wallet
└── dust-wallet
↓
runtime ← Wallet lifecycle/variant orchestration
├── abstractions ← Interfaces that variants must implement
└── capabilities ← Shared implementations (coin selection, balancing)
↓
utilities ← Common types and operations
External communication packages: indexer-client, node-client, prover-client.
Key management: hd (BIP32/BIP39), address-format (Bech32m).
Start with targeted lookups using the octocode-mcp tools:
githubSearchCode — search for specific function names, type names, export definitions in midnightntwrk/midnight-walletgithubGetFileContent — read a specific file once you know the pathgithubViewRepoStructure — understand the package layout if you're not sure where to lookSearch strategy:
src/index.ts exports first, then trace to the implementation filemidnightntwrk/midnight-dapp-connector-api source directlyIf octocode-mcp results are insufficient — tracing cross-package dependencies, counting exports, or following complex call chains across the monorepo — clone locally:
CLONE_DIR=$(mktemp -d)
git clone --depth 1 [email protected]:midnightntwrk/midnight-wallet.git "$CLONE_DIR/midnight-wallet"
For DApp Connector API claims:
git clone --depth 1 [email protected]:midnightntwrk/midnight-dapp-connector-api.git "$CLONE_DIR/midnight-dapp-connector-api"
Always use SSH protocol ([email protected]:), not HTTPS.
After investigation, clean up:
rm -rf "$CLONE_DIR"
What counts as evidence (ordered by strength):
Watch for:
Effect<A, E, R>, Either<A, E>, Stream.Stream<A, E, R> appear throughout. Understand that Effect describes side-effectful computation and Either describes pure synchronous results.Brand.nominal<T>()) are used for ProtocolVersion, WalletSeed, WalletState. These are compile-time distinctions — the runtime value is the underlying primitive.src/v1/). Claims about behavior must be checked against the correct version.Observable from RxJS is used at the facade API boundary. Internal code uses Effect Stream.Your report must include:
Report format:
### Source Investigation Report
**Claim:** [verbatim]
**Searched:** [repo(s) and method — octocode-mcp search / local clone]
**Found:**
- File: [repo/path/to/file.ext:line-range]
- Link: [full GitHub URL]
- Content: [relevant code snippet or summary]
**Interpretation:** [Confirmed / Refuted / Inconclusive] — [explanation of what the source shows and how it relates to the claim]
If inconclusive, explain:
What SKILL.md sets; muted values are Claude Code's defaults
npx claudepluginhub midnightntwrk/midnight-expert --plugin midnight-verify19 skills in this plugin
/verify-by-cli-executionmidnight-verify:verify-by-cli-executionVerification by running Compact CLI commands and observing output. Checks CLI availability, runs commands, captures stdout/stderr/exit code, inspects filesystem changes, and interprets results. Covers flag existence, flag behavior, output structure, error messages, exit codes, version info, and CLI-vs-compactc comparisons. Loaded by the cli-tester agent./verify-by-devnetmidnight-verify:verify-by-devnetVerification by running E2E scripts against a local Midnight devnet. Writes SDK test scripts (raw or using testkit-js) that exercise the full transaction pipeline: deploy, call circuits, observe state. Checks devnet health before proceeding. Loaded by the sdk-tester agent. Loads the `midnight-tooling:devnet` skill for infrastructure management./verify-by-executionmidnight-verify:verify-by-executionVerification by compilation and execution. Translates a Compact claim into a minimal test contract, compiles it with the Compact CLI, runs the compiled output with @midnight-ntwrk/compact-runtime, and interprets the result. Loaded by the contract-writer agent. Covers workspace setup (lazy init), contract writing, compilation, runner script creation, execution, and result interpretation. References midnight-tooling:compact-cli for compilation details.Other plugins' skills for the same job