An in-memory bare-bones node implementation (JVM version with thread-safe state).
Allows submitting transaction and querying UTxO state. Runs validators and mutators against all submitted transactions. The default validator and mutator lists reflect the Cardano Node UTxO related ledger rules.
Attributes
- See also
-
scalus.cardano.ledger.rules for the ledger rules
- Companion
- object
- Graph
-
- Supertypes
-
trait EmulatorBasetrait BlockchainProvidertrait BlockchainReadertrait BlockchainProviderTF[Future]trait BlockchainReaderTF[Future]class Objecttrait Matchableclass AnyShow all
Members list
Value members
Concrete methods
Synchronously submit a transaction with debug scripts for diagnostic replay.
Synchronously submit a transaction with debug scripts for diagnostic replay.
Attributes
Inherited methods
Returns CardanoInfo for this reader.
Returns CardanoInfo for this reader.
This is always available synchronously after the reader is constructed. For emulators, this returns the current context. For remote providers like BlockfrostProvider, the CardanoInfo is fetched during async construction.
Attributes
- Definition Classes
- Inherited from:
- EmulatorBase
Check the status of a transaction on the blockchain.
Check the status of a transaction on the blockchain.
Default implementation checks for UTxOs from the transaction. For emulators without a mempool concept, this returns either Confirmed or NotFound.
Attributes
- Inherited from:
- BlockchainReader
Returns the current slot number.
Emulator uses parasitic EC since all operations are synchronous.
Emulator uses parasitic EC since all operations are synchronous.
Attributes
- Definition Classes
- Inherited from:
- EmulatorBase
Fetches the latest protocol parameters from the network.
Find a single UTxO by its transaction input.
Find a single UTxO by its transaction input.
Value parameters
- input
-
the transaction input to look up
Attributes
- Returns
-
Either a UtxoQueryError or the found Utxo
- Inherited from:
- BlockchainReader
Find UTxOs using a type-safe query.
Find UTxOs using a type-safe query.
Value parameters
- query
-
The query specifying source, filters, and pagination
Attributes
- Returns
-
Either a UtxoQueryError or the matching UTxOs
- Inherited from:
- EmulatorBase
Find all UTxOs at the given address.
Find all UTxOs at the given address.
Value parameters
- address
-
the address to query
Attributes
- Returns
-
Either a UtxoQueryError or the found UTxOs
- Inherited from:
- BlockchainReader
Find UTxOs by a set of transaction inputs.
Find UTxOs by a set of transaction inputs.
Value parameters
- inputs
-
the transaction inputs to look up
Attributes
- Returns
-
Either a UtxoQueryError or the found UTxOs (fails if not all inputs are found)
- Inherited from:
- BlockchainReader
Poll for transaction confirmation.
Poll for transaction confirmation.
Default implementation for emulators: a single check is sufficient since confirmation is instant.
Attributes
- Inherited from:
- BlockchainProvider
Query UTxOs using lambda DSL.
Query UTxOs using lambda DSL.
This method translates a lambda expression to a UtxoQuery at compile time and returns a builder that can be further configured before execution.
Example:
// Simple query - execute immediately
reader.queryUtxos { u =>
u.output.address == myAddress
}.execute()
// With pagination and minimum total
reader.queryUtxos { u =>
u.output.address == myAddress && u.output.value.hasAsset(policyId, assetName)
}.minTotal(Coin.ada(100)).limit(10).execute()
Supported expressions:
u.output.address == addr- query by addressu.input.transactionId == txId- query by transactionu.output.value.hasAsset(policyId, assetName)- query/filter by assetu.output.value.coin >= amount- filter by minimum lovelaceu.output.hasDatumHash(hash)- filter by datum hash&&- AND combination||- OR combination
Value parameters
- f
-
Lambda expression from Utxo to Boolean
Attributes
- Returns
-
A UtxoQueryWithReader builder that can be configured and executed
- Inherited from:
- BlockchainReader
Submit a transaction with debug scripts for diagnostic replay.
Submit a transaction with debug scripts for diagnostic replay.
When a release script fails with empty logs, the evaluator replays it using the debug script to produce diagnostic output.
Value parameters
- debugScripts
-
map from release script hash to debug script for diagnostic replay
- transaction
-
the transaction to submit
Attributes
- Inherited from:
- EmulatorBase
Submits a transaction to the network.
Submit a transaction and poll until confirmed.
Submit a transaction and poll until confirmed.
Default implementation composes submit and pollForConfirmation.
Attributes
- Inherited from:
- BlockchainProvider
Deprecated and Inherited methods
Find a single UTxO by address and optional filters.
Find a single UTxO by address and optional filters.
Attributes
- Deprecated
-
[Since version 0.14.2]Use findUtxos(UtxoQuery) insteadUse findUtxos(UtxoQuery) instead
- Inherited from:
- BlockchainProvider
Find UTxOs by address and optional filters.
Find UTxOs by address and optional filters.
Attributes
- Deprecated
-
[Since version 0.14.2]Use findUtxos(UtxoQuery) insteadUse findUtxos(UtxoQuery) instead
- Inherited from:
- BlockchainProvider