Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@
- [BREAKING] Made `AccountProcedureIndexMap` construction infallible ([#2163](https://github.com/0xMiden/miden-base/pull/2163)).
- [BREAKING] Renamed `tracked_procedure_roots_slot` to `trigger_procedure_roots_slot` in ACL auth components for naming consistency ([#2166](https://github.com/0xMiden/miden-base/pull/2166)).
- [BREAKING] Refactored `AccountStorageDelta` to use a new `StorageSlotDelta` type ([#2182](https://github.com/0xMiden/miden-base/pull/2182)).
- Exposed the `errors` module from `miden-objects` and removed the root-level error re-exports ([#2196](https://github.com/0xMiden/miden-base/issues/2196)).

## 0.12.4 (2025-11-26)

Expand Down
3 changes: 2 additions & 1 deletion crates/miden-lib/src/account/auth/ecdsa_k256_keccak_acl.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
use alloc::vec::Vec;

use miden_objects::Word;
use miden_objects::account::auth::PublicKeyCommitment;
use miden_objects::account::{
AccountCode,
Expand All @@ -8,8 +9,8 @@ use miden_objects::account::{
StorageSlot,
StorageSlotName,
};
use miden_objects::errors::AccountError;
use miden_objects::utils::sync::LazyLock;
use miden_objects::{AccountError, Word};

use crate::account::components::ecdsa_k256_keccak_acl_library;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
use alloc::collections::BTreeSet;
use alloc::vec::Vec;

use miden_objects::Word;
use miden_objects::account::auth::PublicKeyCommitment;
use miden_objects::account::{AccountComponent, StorageMap, StorageSlot, StorageSlotName};
use miden_objects::errors::AccountError;
use miden_objects::utils::sync::LazyLock;
use miden_objects::{AccountError, Word};

use crate::account::components::ecdsa_k256_keccak_multisig_library;

Expand Down
3 changes: 2 additions & 1 deletion crates/miden-lib/src/account/auth/rpo_falcon_512_acl.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
use alloc::vec::Vec;

use miden_objects::Word;
use miden_objects::account::auth::PublicKeyCommitment;
use miden_objects::account::{
AccountCode,
Expand All @@ -8,8 +9,8 @@ use miden_objects::account::{
StorageSlot,
StorageSlotName,
};
use miden_objects::errors::AccountError;
use miden_objects::utils::sync::LazyLock;
use miden_objects::{AccountError, Word};

use crate::account::components::rpo_falcon_512_acl_library;

Expand Down
3 changes: 2 additions & 1 deletion crates/miden-lib/src/account/auth/rpo_falcon_512_multisig.rs
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
use alloc::collections::BTreeSet;
use alloc::vec::Vec;

use miden_objects::Word;
use miden_objects::account::auth::PublicKeyCommitment;
use miden_objects::account::{AccountComponent, StorageMap, StorageSlot, StorageSlotName};
use miden_objects::errors::AccountError;
use miden_objects::utils::sync::LazyLock;
use miden_objects::{AccountError, Word};

use crate::account::components::rpo_falcon_512_multisig_library;

Expand Down
3 changes: 2 additions & 1 deletion crates/miden-lib/src/account/faucets/mod.rs
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
use alloc::string::String;

use miden_objects::Felt;
use miden_objects::account::{Account, AccountStorage, AccountType, StorageSlotName};
use miden_objects::errors::{AccountError, TokenSymbolError};
use miden_objects::utils::sync::LazyLock;
use miden_objects::{AccountError, Felt, TokenSymbolError};
use thiserror::Error;

mod basic_fungible;
Expand Down
3 changes: 2 additions & 1 deletion crates/miden-lib/src/account/interface/test.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ use miden_objects::account::auth::PublicKeyCommitment;
use miden_objects::account::{AccountBuilder, AccountComponent, AccountType};
use miden_objects::asset::{FungibleAsset, NonFungibleAsset, TokenSymbol};
use miden_objects::crypto::rand::{FeltRng, RpoRandomCoin};
use miden_objects::errors::NoteError;
use miden_objects::note::{
Note,
NoteAssets,
Expand All @@ -17,7 +18,7 @@ use miden_objects::testing::account_id::{
ACCOUNT_ID_REGULAR_PUBLIC_ACCOUNT_IMMUTABLE_CODE,
ACCOUNT_ID_REGULAR_PUBLIC_ACCOUNT_IMMUTABLE_CODE_2,
};
use miden_objects::{Felt, NoteError, Word, ZERO};
use miden_objects::{Felt, Word, ZERO};

use crate::AuthScheme;
use crate::account::auth::{
Expand Down
3 changes: 2 additions & 1 deletion crates/miden-lib/src/account/wallets/mod.rs
Original file line number Diff line number Diff line change
@@ -1,13 +1,14 @@
use alloc::string::String;

use miden_objects::Word;
use miden_objects::account::{
Account,
AccountBuilder,
AccountComponent,
AccountStorageMode,
AccountType,
};
use miden_objects::{AccountError, Word};
use miden_objects::errors::AccountError;
use thiserror::Error;

use super::AuthScheme;
Expand Down
2 changes: 1 addition & 1 deletion crates/miden-lib/src/block/mod.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
use miden_objects::ProposedBlockError;
use miden_objects::block::{BlockBody, BlockHeader, ProposedBlock};
use miden_objects::errors::ProposedBlockError;

use crate::transaction::TransactionKernel;

Expand Down
3 changes: 2 additions & 1 deletion crates/miden-lib/src/note/mint_inputs.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
use miden_objects::errors::NoteError;
use miden_objects::note::{NoteExecutionHint, NoteInputs, NoteRecipient};
use miden_objects::{Felt, MAX_INPUTS_PER_NOTE, NoteError, Word};
use miden_objects::{Felt, MAX_INPUTS_PER_NOTE, Word};

/// Represents the different input formats for MINT notes.
/// - Private: Creates a private output note using a precomputed recipient digest (8 MINT note
Expand Down
3 changes: 2 additions & 1 deletion crates/miden-lib/src/note/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ use miden_objects::account::AccountId;
use miden_objects::asset::Asset;
use miden_objects::block::BlockNumber;
use miden_objects::crypto::rand::FeltRng;
use miden_objects::errors::NoteError;
use miden_objects::note::{
Note,
NoteAssets,
Expand All @@ -15,7 +16,7 @@ use miden_objects::note::{
NoteTag,
NoteType,
};
use miden_objects::{Felt, NoteError, Word};
use miden_objects::{Felt, Word};
use utils::build_swap_tag;

pub mod mint_inputs;
Expand Down
3 changes: 2 additions & 1 deletion crates/miden-lib/src/note/utils.rs
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
use miden_objects::account::AccountId;
use miden_objects::asset::Asset;
use miden_objects::block::BlockNumber;
use miden_objects::errors::NoteError;
use miden_objects::note::{NoteExecutionMode, NoteInputs, NoteRecipient, NoteTag, NoteType};
use miden_objects::{Felt, NoteError, Word};
use miden_objects::{Felt, Word};

use super::well_known_note::WellKnownNote;

Expand Down
3 changes: 2 additions & 1 deletion crates/miden-lib/src/testing/note.rs
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ use miden_objects::account::AccountId;
use miden_objects::assembly::debuginfo::{SourceLanguage, SourceManagerSync, Uri};
use miden_objects::assembly::{DefaultSourceManager, Library};
use miden_objects::asset::Asset;
use miden_objects::errors::NoteError;
use miden_objects::note::{
Note,
NoteAssets,
Expand All @@ -17,7 +18,7 @@ use miden_objects::note::{
NoteType,
};
use miden_objects::testing::note::DEFAULT_NOTE_CODE;
use miden_objects::{Felt, NoteError, Word, ZERO};
use miden_objects::{Felt, Word, ZERO};
use rand::Rng;

use crate::utils::CodeBuilder;
Expand Down
3 changes: 2 additions & 1 deletion crates/miden-lib/src/transaction/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,12 @@ use miden_objects::assembly::{Assembler, DefaultSourceManager, KernelLibrary};
use miden_objects::asset::FungibleAsset;
use miden_objects::block::BlockNumber;
use miden_objects::crypto::SequentialCommit;
use miden_objects::errors::TransactionOutputError;
use miden_objects::transaction::{OutputNote, OutputNotes, TransactionInputs, TransactionOutputs};
use miden_objects::utils::serde::Deserializable;
use miden_objects::utils::sync::LazyLock;
use miden_objects::vm::{AdviceInputs, Program, ProgramInfo, StackInputs, StackOutputs};
use miden_objects::{Felt, Hasher, TransactionOutputError, Word};
use miden_objects::{Felt, Hasher, Word};
use miden_stdlib::StdLibrary;

use super::MidenLib;
Expand Down
3 changes: 2 additions & 1 deletion crates/miden-lib/src/transaction/outputs.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
use miden_objects::account::{AccountHeader, AccountId};
use miden_objects::{AccountError, Felt, WORD_SIZE, Word, WordError};
use miden_objects::errors::AccountError;
use miden_objects::{Felt, WORD_SIZE, Word, WordError};

use super::memory::{
ACCT_CODE_COMMITMENT_OFFSET,
Expand Down
4 changes: 2 additions & 2 deletions crates/miden-objects/src/account/account_id/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,9 @@ use miden_core::utils::{ByteReader, Deserializable, Serializable};
use miden_crypto::utils::hex_to_bytes;
use miden_processor::DeserializationError;

use crate::Word;
use crate::address::NetworkId;
use crate::errors::AccountIdError;
use crate::{AccountError, Word};
use crate::errors::{AccountError, AccountIdError};

/// The identifier of an [`Account`](crate::account::Account).
///
Expand Down
3 changes: 2 additions & 1 deletion crates/miden-objects/src/account/account_id/seed.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,8 @@ use alloc::vec::Vec;
use crate::account::account_id::AccountIdVersion;
use crate::account::account_id::v0::{compute_digest, validate_prefix};
use crate::account::{AccountStorageMode, AccountType};
use crate::{AccountError, Felt, Word};
use crate::errors::AccountError;
use crate::{Felt, Word};

/// Finds and returns a seed suitable for creating an account ID for the specified account type
/// using the provided initial seed as a starting point.
Expand Down
4 changes: 2 additions & 2 deletions crates/miden-objects/src/account/account_id/v0/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,9 @@ use crate::account::account_id::account_type::{
use crate::account::account_id::storage_mode::{NETWORK, PRIVATE, PUBLIC};
use crate::account::{AccountIdVersion, AccountStorageMode, AccountType};
use crate::address::AddressType;
use crate::errors::{AccountIdError, Bech32Error};
use crate::errors::{AccountError, AccountIdError, Bech32Error};
use crate::utils::{ByteReader, Deserializable, DeserializationError, Serializable};
use crate::{AccountError, EMPTY_WORD, Felt, Hasher, Word};
use crate::{EMPTY_WORD, Felt, Hasher, Word};

// ACCOUNT ID VERSION 0
// ================================================================================================
Expand Down
3 changes: 2 additions & 1 deletion crates/miden-objects/src/account/auth.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,15 @@ use alloc::vec::Vec;
use rand::{CryptoRng, Rng};

use crate::crypto::dsa::{ecdsa_k256_keccak, rpo_falcon512};
use crate::errors::AuthSchemeError;
use crate::utils::serde::{
ByteReader,
ByteWriter,
Deserializable,
DeserializationError,
Serializable,
};
use crate::{AuthSchemeError, Felt, Hasher, Word};
use crate::{Felt, Hasher, Word};

// AUTH SCHEME
// ================================================================================================
Expand Down
3 changes: 2 additions & 1 deletion crates/miden-objects/src/account/builder/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,8 @@ use crate::account::{
AccountType,
};
use crate::asset::AssetVault;
use crate::{AccountError, Felt, Word};
use crate::errors::AccountError;
use crate::{Felt, Word};

/// A convenient builder for an [`Account`] allowing for safe construction of an account by
/// combining multiple [`AccountComponent`]s.
Expand Down
2 changes: 1 addition & 1 deletion crates/miden-objects/src/account/code/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -410,9 +410,9 @@ mod tests {
use miden_assembly::Assembler;

use super::{AccountCode, Deserializable, Serializable};
use crate::AccountError;
use crate::account::code::build_procedure_commitment;
use crate::account::{AccountComponent, AccountType};
use crate::errors::AccountError;
use crate::testing::account_code::CODE;
use crate::testing::noop_auth_component::NoopAuthComponent;

Expand Down
3 changes: 2 additions & 1 deletion crates/miden-objects/src/account/component/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,8 @@ pub use code::AccountComponentCode;

use crate::account::{AccountType, StorageSlot};
use crate::assembly::QualifiedProcedureName;
use crate::{AccountError, MastForest, Word};
use crate::errors::AccountError;
use crate::{MastForest, Word};

// ACCOUNT COMPONENT
// ================================================================================================
Expand Down
6 changes: 2 additions & 4 deletions crates/miden-objects/src/account/component/template/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,7 @@ use miden_processor::DeserializationError;
use semver::Version;

use super::AccountType;
use crate::AccountError;
use crate::errors::AccountComponentTemplateError;
use crate::errors::{AccountComponentTemplateError, AccountError};

mod storage;
pub use storage::*;
Expand Down Expand Up @@ -336,12 +335,11 @@ mod tests {
use semver::Version;

use super::{FeltRepresentation, test_package_with_metadata};
use crate::AccountError;
use crate::account::component::FieldIdentifier;
use crate::account::component::template::storage::StorageEntry;
use crate::account::component::template::{AccountComponentMetadata, InitStorageData};
use crate::account::{AccountComponent, StorageValueName};
use crate::errors::AccountComponentTemplateError;
use crate::errors::{AccountComponentTemplateError, AccountError};
use crate::testing::account_code::CODE;

fn default_felt_array() -> [FeltRepresentation; 4] {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -401,9 +401,9 @@ mod tests {
TemplateTypeError,
WordRepresentation,
};
use crate::errors::AccountComponentTemplateError;
use crate::errors::{AccountComponentTemplateError, AccountError};
use crate::testing::account_code::CODE;
use crate::{AccountError, word};
use crate::word;

#[test]
fn test_storage_entry_serialization() {
Expand Down
6 changes: 4 additions & 2 deletions crates/miden-objects/src/account/delta/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,9 @@ use crate::account::{
};
use crate::asset::AssetVault;
use crate::crypto::SequentialCommit;
use crate::errors::{AccountDeltaError, AccountError};
use crate::utils::{ByteReader, ByteWriter, Deserializable, DeserializationError, Serializable};
use crate::{AccountDeltaError, AccountError, Felt, Word, ZERO};
use crate::{Felt, Word, ZERO};

mod storage;
pub use storage::{AccountStorageDelta, StorageMapDelta, StorageSlotDelta};
Expand Down Expand Up @@ -608,12 +609,13 @@ mod tests {
NonFungibleAsset,
NonFungibleAssetDetails,
};
use crate::errors::AccountDeltaError;
use crate::testing::account_id::{
ACCOUNT_ID_PRIVATE_SENDER,
ACCOUNT_ID_REGULAR_PRIVATE_ACCOUNT_UPDATABLE_CODE,
AccountIdBuilder,
};
use crate::{AccountDeltaError, ONE, Word, ZERO};
use crate::{ONE, Word, ZERO};

#[test]
fn account_delta_nonce_validation() {
Expand Down
3 changes: 2 additions & 1 deletion crates/miden-objects/src/account/delta/storage.rs
Original file line number Diff line number Diff line change
Expand Up @@ -618,7 +618,8 @@ mod tests {

use super::{AccountStorageDelta, Deserializable, Serializable};
use crate::account::{StorageMapDelta, StorageSlotDelta, StorageSlotName};
use crate::{AccountDeltaError, ONE, Word};
use crate::errors::AccountDeltaError;
use crate::{ONE, Word};

#[test]
fn account_storage_delta_returns_err_on_slot_type_mismatch() {
Expand Down
5 changes: 3 additions & 2 deletions crates/miden-objects/src/account/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,15 @@ use alloc::string::ToString;
use alloc::vec::Vec;

use crate::asset::{Asset, AssetVault};
use crate::errors::AccountError;
use crate::utils::serde::{
ByteReader,
ByteWriter,
Deserializable,
DeserializationError,
Serializable,
};
use crate::{AccountError, Felt, Hasher, Word, ZERO};
use crate::{Felt, Hasher, Word, ZERO};

mod account_id;
pub use account_id::{
Expand Down Expand Up @@ -608,7 +609,6 @@ mod tests {
AccountStorageDelta,
AccountVaultDelta,
};
use crate::AccountError;
use crate::account::AccountStorageMode::Network;
use crate::account::{
Account,
Expand All @@ -624,6 +624,7 @@ mod tests {
StorageSlotName,
};
use crate::asset::{Asset, AssetVault, FungibleAsset, NonFungibleAsset};
use crate::errors::AccountError;
use crate::testing::account_id::{
ACCOUNT_ID_PRIVATE_SENDER,
ACCOUNT_ID_REGULAR_PUBLIC_ACCOUNT_IMMUTABLE_CODE,
Expand Down
3 changes: 2 additions & 1 deletion crates/miden-objects/src/account/partial.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,11 @@ use miden_core::utils::{Deserializable, Serializable};
use miden_core::{Felt, ZERO};

use super::{Account, AccountCode, AccountId, PartialStorage};
use crate::Word;
use crate::account::{hash_account, validate_account_seed};
use crate::asset::PartialVault;
use crate::errors::AccountError;
use crate::utils::serde::DeserializationError;
use crate::{AccountError, Word};

/// A partial representation of an account.
///
Expand Down
Loading