Skip to main content
Version: 0.14

Miden Standards

Miden Standards are reusable building blocks for common smart-contract behavior: wallet interfaces, authentication components, token faucets, note scripts, and policy modules.

Use them when you want your account, note, or transaction flow to interoperate with the rest of the Miden ecosystem instead of defining every interface from scratch.

This page describes the v0.14 standards surface. Current unstable docs include newer names and modules, including a unified FungibleFaucet, role-based access control, richer token policies, and PSWAP notes.

This section is a builder guide, not the canonical standards specification. It explains which standard to reach for, how it fits into the smart-contract model, and where to switch to reference docs when you need exact procedure names, storage schemas, or script roots.

How standards fit into smart contracts

Smart Contracts is the domain. Rust and Miden Assembly are authoring paths inside that domain.

LayerRole
RustCompose standard account components and construct standard notes through Rust APIs.
Miden AssemblyImport and call standard MASM modules directly when writing low-level account, note, transaction, or library code.
Miden StandardsShared account components, note scripts, faucet policies, and helper modules used by both authoring paths.

What this section covers

When to use standards

Use a standard component or note when:

  • You want other accounts, note scripts, clients, or tooling to recognize your account interface.
  • Your behavior matches an existing pattern, such as holding assets, receiving a P2ID transfer, minting a fungible token, or verifying a single signature.
  • You need a stable building block before adding custom application logic.

Write custom components or note scripts when:

  • The authorization rules are application-specific.
  • The note consumption condition is not covered by P2ID, P2IDE, SWAP, mint, or burn notes.
  • The account's state model needs custom storage and custom exported methods.

You can mix both approaches. A typical application account starts with standard authentication and wallet components, then adds one or more custom components for protocol-specific logic.