Skip to main content
Version: 0.15 (unstable)

Account Components

Standard account components are prebuilt modules you can compose into accounts. They give an account a recognizable interface, such as "can receive assets", "can authenticate with this signature scheme", "can mint fungible tokens", or "uses this access-control model".

Use these components from Rust when you build accounts with the SDK, or import the underlying MASM modules when you are writing lower-level account code. The same standards surface is what note scripts and transaction scripts rely on when they call account procedures.

Common standards surfaces

SurfaceUse it forRust module
BasicWalletHolding assets, receiving assets from standard notes, and moving assets into output notes.miden_standards::account::wallets
FungibleFaucetMinting, sending, receiving, and burning fungible assets from faucet accounts.miden_standards::account::faucets
AuthSingleSigSingle-signature authentication of transactions.miden_standards::account::auth
AuthSingleSigAclSingle-signature authentication with an access-control list.miden_standards::account::auth
AuthMultisig / AuthMultisigSmartThreshold or policy-aware multisig authentication.miden_standards::account::auth
AuthGuardedMultisigMultisig guarded by a guardian configuration.miden_standards::account::auth
AuthNetworkAccountAuthentication through note allowlists for network accounts.miden_standards::account::auth
Ownable2StepAccess control for account owners.miden_standards::account::access
RoleBasedAccessControlRole-based authorization for token policy management.miden_standards::account::access
AuthorityShared authority component used by policy-management standards.miden_standards::account::access
TokenPolicyManagerRegistering and updating mint, burn, send, and receive token policies.miden_standards::account::policies
BasicBlocklistBlocking specific native accounts in send and receive transfer-policy checks.miden_standards::account::policies
BasicAllowlistAllowing only specific native accounts in send and receive transfer-policy checks.miden_standards::account::policies

These are building blocks. They do not prevent you from adding custom components to the same account.

The v0.14 snapshot uses separate BasicFungibleFaucet and NetworkFungibleFaucet components and does not include RBAC, authority, guarded multisig, smart multisig, network-account auth, TokenPolicyManager, BasicBlocklist, or BasicAllowlist in the same form. Use the v0.14 versioned docs when building against the v0.14 crates.

Start with wallet and auth

Most regular accounts need:

  • an authentication component, such as AuthSingleSig or AuthMultisig
  • the BasicWallet component

AuthSingleSig controls transaction authorization. BasicWallet exposes the standard wallet procedures used by common notes, including the ability to receive assets and move assets into output notes.

Compose a regular account with standard auth and wallet components
use miden_protocol::Word;
use miden_protocol::account::auth::{AuthScheme, PublicKeyCommitment};
use miden_protocol::account::{AccountBuilder, AccountStorageMode, AccountType};
use miden_standards::account::auth::AuthSingleSig;
use miden_standards::account::wallets::BasicWallet;

fn build_wallet_account() -> Result<(), Box<dyn std::error::Error>> {
let public_key = PublicKeyCommitment::from(Word::from([1, 2, 3, 4u32]));

let account = AccountBuilder::new([1; 32])
.account_type(AccountType::RegularAccountImmutableCode)
.storage_mode(AccountStorageMode::Public)
.with_auth_component(AuthSingleSig::new(public_key, AuthScheme::Falcon512Poseidon2))
.with_component(BasicWallet)
.build()?;

assert_eq!(account.account_type(), AccountType::RegularAccountImmutableCode);
Ok(())
}

For authentication details, see Authentication. For how component methods are authored in Rust, see Components.

Check note compatibility

Standard notes assume the consuming account exposes the procedures they need. For example, P2ID and P2IDE notes need a wallet-compatible account that can receive assets. SWAP notes additionally need the wallet procedure that moves the requested asset into the payback note.

At the builder level, the practical rule is:

  • Add BasicWallet to accounts that should receive standard asset-transfer notes.
  • Add FungibleFaucet to faucet accounts that should mint or burn fungible assets.
  • For local or user accounts, add an auth component to reject unauthorized transactions.
  • For network accounts, add an access-control component to gate the account procedures notes can call.

Prefer building on top of BasicWallet: compose it with a custom extension component for application-specific methods. If you replace the wallet interface entirely, test consumption of the relevant standard notes deliberately.

Rust and MASM entry points

Rust APIs are the usual entry point for account composition. MASM modules are available when you need exact low-level behavior.

AreaRust moduleMASM module family
Walletsmiden_standards::account::walletsmiden::standards::wallets::*
Authenticationmiden_standards::account::authmiden::standards::auth::*
Access controlmiden_standards::account::accessmiden::standards::access::*
Faucetsmiden_standards::account::faucetsmiden::standards::faucets::*
Metadatamiden_standards::account::metadatamiden::standards::metadata::*

Reach for MASM directly when you are implementing low-level behavior, integrating a custom component with a standard procedure, or verifying exact stack effects.