Available on crate feature
testing only.Expand description
Provides test utilities for working with accounts and account IDs
within the Miden network. This module is only available when the testing feature is
enabled.
Modules§
- account_
id - asserts
- Assertion macro for note-lifecycle checks in tests.
- common
std - executor
- mock
- note_
transport - standards
- Raw access to
miden-standardstesting modules for items not curated bymiden-client. - utils
Macros§
- assert_
execution_ error - Asserts that a
Result<_, ExecError>failed as expected. - assert_
note_ created - Asserts the tx emitted a note matching the spec. Fields are optional; unset ones are skipped.
- assert_
transaction_ executor_ error - Same as
assert_execution_error!, but forTransactionExecutorError. Thematchesand$expectedarms unwrapTransactionProgramExecutionFailed(_)and match against the innerExecutionError.
Structs§
- Exec
Error - A newtype wrapper around
ExecutionErrorthat provides better error messages by usingPrintDiagnosticfor display formatting. - Mock
Chain - The
MockChainsimulates a simplified blockchain environment for testing purposes. - Mock
Chain Builder - A builder for a
MockChain’s genesis block. - Note
Builder - Transaction
Context - Represents all needed data for executing a transaction, or arbitrary code.
- Transaction
Context Builder - TransactionContextBuilder is a utility to construct TransactionContext for testing purposes. It allows users to build accounts, create notes, provide advice inputs, and execute code. The VM process can be inspected afterward.
Enums§
- Account
State - Helper type for increased readability at call-sites. Indicates whether to build a new (nonce = ZERO) or existing account (nonce = ONE).
- Auth
- Specifies which authentication mechanism is desired for accounts
- Mock
Chain Note - Represents a note that is stored in the mock chain.
- TxContext
Input - Helper type to abstract over the inputs to
MockChain::build_tx_context. See that method’s docs for details.