Skip to content

Latest commit

 

History

History
43 lines (34 loc) · 2.81 KB

File metadata and controls

43 lines (34 loc) · 2.81 KB

Midnight Wallet SDK Reference

Snapshot from @midnight-ntwrk/wallet-sdk v3.0.0, taken 2026-03-28.

The authoritative source is the midnight-wallet repository.

Architecture & Design

  • Design -- Three-wallet model, facade pattern, variant/runtime structure, services and capabilities
  • Functional Programming -- Effect/Either patterns, immutability rules, typeclass patterns, canonical examples

Package APIs

  • facade -- Unified API combining shielded, unshielded, and dust wallets
  • shielded-wallet -- ZK private token operations
  • unshielded-wallet -- Transparent token operations
  • dust-wallet -- Fee management and dust generation
  • hd -- BIP-32/BIP-44 hierarchical deterministic key derivation
  • address-format -- Bech32m address encoding/decoding
  • capabilities -- Transaction balancing, coin selection, imbalance tracking
  • node-client -- Polkadot.js RPC client for the Midnight node
  • prover-client -- ZK proof generation service client
  • indexer-client -- GraphQL client for the Midnight indexer

Code Examples

Runnable snippets from the docs-snippets package: