scalus.cardano.node
Members list
Type members
Classlikes
Provider for Cardano blockchain operations.
Provider for Cardano blockchain operations.
Provider is the cross-platform interface for interacting with Cardano nodes. All methods return Future values and work on both JVM and JavaScript platforms.
Extends BlockchainReader with transaction submission capability.
Implementations capture their ExecutionContext at construction time, so callers don't need to provide it for each method call.
Use scalus.utils.await extension for blocking operations on JVM when needed.
Attributes
- Supertypes
-
trait BlockchainReadertrait BlockchainProviderTF[Future]trait BlockchainReaderTF[Future]class Objecttrait Matchableclass AnyShow all
- Known subtypes
Trait for blockchain providers with generic effect type. (TF is for "tagless final" style, often term used in FP literature).
Trait for blockchain providers with generic effect type. (TF is for "tagless final" style, often term used in FP literature).
Extends BlockchainReaderTF with transaction submission capability.
Attributes
- Supertypes
- Known subtypes
Read-only provider for Cardano blockchain operations.
Read-only provider for Cardano blockchain operations.
BlockchainReader provides read-only access to blockchain state without the ability to submit transactions. This is useful for:
- Snapshot-based testing where state should not be modified
- Transaction building that only needs to query UTxOs
- APIs that should not have submit capability
Use BlockchainProvider when you also need to submit transactions.
Implementations capture their ExecutionContext at construction time, so callers don't need to provide it for each method call.
Attributes
- Supertypes
- Known subtypes
Read-only blockchain operations with generic effect type. (TF is for "tagless final" style, often term used in FP literature).
Read-only blockchain operations with generic effect type. (TF is for "tagless final" style, often term used in FP literature).
This trait provides read-only access to blockchain state. Use BlockchainProviderTF when you also need to submit transactions.
Attributes
- Supertypes
-
class Objecttrait Matchableclass Any
- Known subtypes
-
trait BlockchainProviderTF[F]trait BlockchainProviderclass BlockfrostProvidertrait EmulatorBaseclass Emulatortrait BlockchainReaderShow all
Blockfrost-based Provider for Cardano blockchain operations.
Blockfrost-based Provider for Cardano blockchain operations.
Use the async factory methods in the companion object to create instances: BlockfrostProvider.preview(apiKey), BlockfrostProvider.mainnet(apiKey), etc. These fetch protocol parameters during construction so that cardanoInfo is immediately available.
Value parameters
- apiKey
-
Blockfrost API key
- baseUrl
-
Blockfrost API base URL
- initialCardanoInfo
-
CardanoInfo with protocol parameters (fetched during async construction)
- maxConcurrentRequests
-
Maximum concurrent HTTP requests
Attributes
- Companion
- object
- Supertypes
-
trait BlockchainProvidertrait BlockchainReadertrait BlockchainProviderTF[Future]trait BlockchainReaderTF[Future]class Objecttrait Matchableclass AnyShow all
Companion object for BlockfrostProvider with factory methods and utilities.
Companion object for BlockfrostProvider with factory methods and utilities.
Attributes
- Companion
- class
- Supertypes
-
class Objecttrait Matchableclass Any
- Self type
-
BlockfrostProvider.type
JVM-specific platform support for BlockfrostProvider.
JVM-specific platform support for BlockfrostProvider.
Attributes
- Supertypes
-
class Objecttrait Matchableclass Any
- Self type
Limits the number of concurrent futures that can be executing. Cross-platform (JVM/JS) and non-blocking.
Limits the number of concurrent futures that can be executing. Cross-platform (JVM/JS) and non-blocking.
Value parameters
- maxConcurrent
-
Maximum number of futures that can execute concurrently
Attributes
- Supertypes
-
class Objecttrait Matchableclass Any
An in-memory bare-bones node implementation (JVM version with thread-safe state).
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
- Supertypes
-
trait EmulatorBasetrait BlockchainProvidertrait BlockchainReadertrait BlockchainProviderTF[Future]trait BlockchainReaderTF[Future]class Objecttrait Matchableclass AnyShow all
Base trait for Emulator implementations containing shared logic.
Base trait for Emulator implementations containing shared logic.
Platform-specific implementations (JVM/JS) extend this trait and provide thread-safe or single-threaded state management as appropriate.
Attributes
- Companion
- object
- Supertypes
-
trait BlockchainProvidertrait BlockchainReadertrait BlockchainProviderTF[Future]trait BlockchainReaderTF[Future]class Objecttrait Matchableclass AnyShow all
- Known subtypes
-
class Emulator
Attributes
- Companion
- trait
- Supertypes
-
class Objecttrait Matchableclass Any
- Self type
-
EmulatorBase.type
Network-level errors that occur during communication with the node/provider.
Network-level errors that occur during communication with the node/provider.
These errors are typically transient and may be worth retrying.
Attributes
- Companion
- object
- Supertypes
- Known subtypes
-
class AuthenticationErrorclass Bannedclass ConnectionErrorclass InternalErrorclass MempoolFullclass RateLimitedShow all
Attributes
- Companion
- trait
- Supertypes
-
trait Sumtrait Mirrorclass Objecttrait Matchableclass Any
- Self type
-
NetworkSubmitError.type
Node validation errors that occur when the transaction is rejected by the ledger.
Node validation errors that occur when the transaction is rejected by the ledger.
These errors indicate the transaction is invalid and needs to be modified before resubmission.
Attributes
- Companion
- object
- Supertypes
- Known subtypes
-
class ScriptFailureclass TransactionExpiredclass UtxoNotAvailableclass ValidationErrorclass ValueNotConserved
Attributes
- Companion
- trait
- Supertypes
-
trait Sumtrait Mirrorclass Objecttrait Matchableclass Any
- Self type
-
NodeSubmitError.type
Error returned when submitting a transaction fails.
Error returned when submitting a transaction fails.
Errors are organized into two categories:
- NetworkSubmitError: Communication/operational errors (connection, auth, rate limits)
- NodeSubmitError: Transaction validation errors (invalid inputs, expired, script failures)
Attributes
- Companion
- object
- Supertypes
-
class Objecttrait Matchableclass Any
- Known subtypes
-
trait NetworkSubmitErrorclass AuthenticationErrorclass Bannedclass ConnectionErrorclass InternalErrorclass MempoolFullclass RateLimitedtrait NodeSubmitErrorclass ScriptFailureclass TransactionExpiredclass UtxoNotAvailableclass ValidationErrorclass ValueNotConservedShow all
Attributes
- Companion
- trait
- Supertypes
-
trait Sumtrait Mirrorclass Objecttrait Matchableclass Any
- Self type
-
SubmitError.type
Filter specifies optional refinements to apply after fetching from source.
Filter specifies optional refinements to apply after fetching from source.
Attributes
- Companion
- object
- Supertypes
-
class Objecttrait Matchableclass Any
- Known subtypes
-
class Andclass AtInputsclass HasAssetclass HasDatumclass HasDatumHashclass MinLovelaceclass Notclass OrShow all
Attributes
- Companion
- trait
- Supertypes
-
trait Sumtrait Mirrorclass Objecttrait Matchableclass Any
- Self type
-
UtxoFilter.type
A query for UTxOs. Can be a simple query with source/filter/pagination, or a combination of queries using Or.
Errors that can occur when executing a UTxO query
Errors that can occur when executing a UTxO query
Attributes
- Supertypes
-
trait Enumtrait Serializabletrait Producttrait Equalsclass Objecttrait Matchableclass AnyShow all
Macro utilities for building UtxoQuery from lambda expressions at compile time.
Macro utilities for building UtxoQuery from lambda expressions at compile time.
This provides a HOAS (Higher-Order Abstract Syntax) embedding that translates lambda expressions to the UtxoQuery ADT.
Example:
import scalus.cardano.node.UtxoQueryMacros.buildQuery
val query = buildQuery { u =>
u.output.address == myAddress && u.output.value.hasAsset(policyId, assetName)
}
// Compiles to: UtxoQuery(FromAddress(myAddress)) && HasAsset(policyId, assetName)
Attributes
- Supertypes
-
class Objecttrait Matchableclass Any
- Self type
-
UtxoQueryMacros.type
A query builder that combines a BlockchainReader with a UtxoQuery.
A query builder that combines a BlockchainReader with a UtxoQuery.
Allows chaining configuration methods before executing the query.
Value parameters
- query
-
The query to execute
- reader
-
The reader to execute the query against
Attributes
- Supertypes
-
trait Serializabletrait Producttrait Equalsclass Objecttrait Matchableclass AnyShow all
Source specifies WHERE to look for UTxOs. This is required - a query must start from a source.
Source specifies WHERE to look for UTxOs. This is required - a query must start from a source.
Attributes
- Companion
- object
- Supertypes
-
class Objecttrait Matchableclass Any
- Known subtypes
-
class Andclass FromAddressclass FromAssetclass FromInputsclass FromTransactionclass OrShow all
Attributes
- Companion
- trait
- Supertypes
-
trait Sumtrait Mirrorclass Objecttrait Matchableclass Any
- Self type
-
UtxoSource.type
Deprecated types
Attributes
- Deprecated
-
[Since version 0.14.2]Use BlockchainProvider instead
Attributes
- Deprecated
-
[Since version 0.14.2]Use UtxoQueryWithReader insteadUse UtxoQueryWithReader instead
Value members
Deprecated fields
Attributes
- Deprecated
-
[Since version 0.14.2]Use UtxoQueryWithReader insteadUse UtxoQueryWithReader instead