Account Changes
The v0.15 release simplifies the account ID so that its prefix no longer encodes whether the account is a faucet or regular account, whether its code is mutable, or whether it is a network account. The old AccountType enum is removed, AccountStorageMode is renamed to AccountType ({ Private, Public }), and the account ID version is renamed 0 → 1. All of the changes below require code updates when migrating from v0.14.
AccountType removed; AccountStorageMode renamed to AccountType
Summary
The account ID was simplified so its prefix no longer encodes whether the account is a faucet/regular account or whether its code is mutable. As a result:
- The old
AccountTypeenum (FungibleFaucet,NonFungibleFaucet,RegularAccountImmutableCode,RegularAccountUpdatableCode) is removed. AccountStorageModeis renamed toAccountTypeand trimmed to{ Private, Public }(theNetworkvariant is gone — see the next section).- The
AccountIdaccessorsis_faucet(),is_regular_account(),storage_mode(),is_network(), and the oldaccount_type()semantics no longer exist.AccountId::account_type()now returns the visibility‑styleAccountType(Private/Public). - The account ID version is renamed 0 → 1; encoded version
0is now invalid.
Faucet‑vs‑regular is now a property of the account's code/components, not its ID.
Affected Code
// 0.15 — new API:
use miden_protocol::account::AccountType; // formerly AccountStorageMode
let kind: AccountType = account_id.account_type(); // Private / Public
let is_pub = account_id.is_public();
// "is this a faucet?" now comes from the account's code/interface, not the id.
AccountId::new(seed, version, ..) keeps the same parameters, but version must be AccountIdVersion::Version1 (Version0 no longer exists).
Migration Steps
- Replace imports of
AccountStorageModewithAccountType; the variants arePrivate/Public. - Delete the old
AccountTypeimport (Regular*/*Faucet); that enum is gone. - Replace
id.storage_mode()withid.account_type()(orid.is_public()/id.is_private()). - Replace
id.is_faucet()/id.is_regular_account()with checks on the account's code/components. - Replace
AccountIdVersion::Version0withVersion1; regenerate any persisted account IDs.
AccountStorageMode::Network removed; network accounts via an allowlist
Summary
The Network storage mode was removed (AccountStorageMode itself is now AccountType). An account is now recognised as a network account by the presence of a standardized NetworkAccountNoteAllowlist storage slot, with helpers NetworkAccount (a wrapper for identification) and the AuthNetworkAccount auth component. AccountId::is_network() is gone.
Migration Steps
- Remove any use of
AccountStorageMode::Network; pickPublicand add the network‑account components (AuthNetworkAccount::with_allowed_notes(...)). - Replace
id.is_network()withNetworkAccount::new(account)/ theNetworkAccountNoteAllowlistslot check.
AuthNetworkAccount gains a tx‑script allowlist
Summary
(v0.15.2) The AuthNetworkAccount auth component previously banned transaction scripts outright. It now gates them with a root allowlist, so approved tx scripts (e.g. setting the expiration delta) can run. The note‑allowlist constructor with_allowlist was renamed to with_allowed_notes to pair with the new with_allowed_tx_scripts setter.
Migration Steps
- Rename
AuthNetworkAccount::with_allowlist(...)towith_allowed_notes(...). - To permit specific transaction scripts, chain
.with_allowed_tx_scripts(roots)(an empty set — the default — permits none).
procedure_digest! → procedure_root!; new NoteScriptRoot / AccountComponentName
Summary
Several root/identifier values gained dedicated newtypes:
- The
procedure_digest!macro is renamedprocedure_root!. It now returns anAccountProcedureRoot(instead ofWord) and takes anAccountComponentCode(Component::code()) instead of a library‑producing closure. NoteScript::root()returns a newNoteScriptRootnewtype instead ofWord(convert with.into()).- A new
AccountComponentNamestring wrapper validates component names.
Migration Steps
- Rename
procedure_digest!→procedure_root!and passComponent::code()as the last argument; the static is now aLazyLock<AccountProcedureRoot>. - Update bindings of
note_script.root()toNoteScriptRoot(convert with.into()/Word::from(..)where aWordis needed). - Use
AccountComponentName::new(...)where a validated component name is required.
is_compatible_with removed; auth/policy renames
Summary
A handful of standards‑library APIs changed:
StandardNote::is_compatible_withandAccountInterfaceExt::is_compatible_withwere removed — perform compatibility checks via the account interface directly.- The guarded‑multisig API was renamed
AuthMultisigGuardian→AuthGuardedMultisig(theguardianauth namespace is retained). OwnerControlledBlocklistwas renamedBlocklistOwnerControlled.- New standard components were added:
Pausable,Authority, allowlist/blocklist transfer policies, andFungibleTokenMetadata.