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
- fee
std - Funding support for running the test helpers against a fee-charging chain.
- 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§
- Client
Data Store - Wrapper structure that implements
DataStoreover anyStore. - 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. - Mock
Transaction - Represents all needed data for executing a transaction, or arbitrary code.
- Mock
Transaction Builder - A builder for a
MockTransactionthat is coupled to a concreteMockChain. - Note
Builder
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.
- Mock
Transaction Input - Helper type to abstract over the account input to
MockChain::build_transaction. See that method’s docs for details.
Traits§
- Data
Store - The data store the executor reads from, along with the trait whose methods it serves. Exposed here so that tests can exercise it on its own, without going through a transaction or a note screening pass. The DataStore trait defines the interface that transaction objects use to fetch data required for transaction execution.