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
- Graph
-
- Supertypes
-
trait BlockchainProvidertrait BlockchainReadertrait BlockchainProviderTF[Future]trait BlockchainReaderTF[Future]class Objecttrait Matchableclass AnyShow all
Members list
Value members
Concrete 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
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
- Definition Classes
Returns the current slot number.
Returns the current slot number.
Attributes
Returns the ExecutionContext captured by this reader.
Returns the ExecutionContext captured by this reader.
This is used internally by default method implementations. External code can use this when working with Futures returned by reader methods, or provide their own.
Attributes
- Definition Classes
Fetch account info by stake address. GET /accounts/{stake_address}
Fetch account info by stake address. GET /accounts/{stake_address}
Attributes
Fetch addresses associated with account. GET /accounts/{stake_address}/addresses
Fetch addresses associated with account. GET /accounts/{stake_address}/addresses
Attributes
Fetch account delegation history. GET /accounts/{stake_address}/delegations
Fetch account delegation history. GET /accounts/{stake_address}/delegations
Attributes
Fetch account registration history. GET /accounts/{stake_address}/registrations
Fetch account registration history. GET /accounts/{stake_address}/registrations
Attributes
Fetch account reward history. GET /accounts/{stake_address}/rewards
Fetch account reward history. GET /accounts/{stake_address}/rewards
Attributes
Fetch UTxOs for a stake address. GET /accounts/{stake_address}/utxos
Fetch UTxOs for a stake address. GET /accounts/{stake_address}/utxos
Attributes
Fetch address info. GET /addresses/{address}
Fetch address info. GET /addresses/{address}
Attributes
Fetch transactions for an address. GET /addresses/{address}/transactions
Fetch transactions for an address. GET /addresses/{address}/transactions
Attributes
Fetch transaction hashes for an address. GET /addresses/{address}/txs
Fetch transaction hashes for an address. GET /addresses/{address}/txs
Attributes
Fetch API root info. GET /
Fetch API root info. GET /
Attributes
Fetch asset info. GET /assets/{asset}
Fetch asset info. GET /assets/{asset}
Attributes
Fetch addresses holding an asset. GET /assets/{asset}/addresses
Fetch addresses holding an asset. GET /assets/{asset}/addresses
Attributes
Fetch transactions involving an asset. GET /assets/{asset}/transactions
Fetch transactions involving an asset. GET /assets/{asset}/transactions
Attributes
Fetch a block by hash or number. GET /blocks/{hash_or_number}
Fetch a block by hash or number. GET /blocks/{hash_or_number}
Attributes
Fetch addresses affected in a block. GET /blocks/{hash_or_number}/addresses
Fetch addresses affected in a block. GET /blocks/{hash_or_number}/addresses
Attributes
Fetch a block by slot number. GET /blocks/slot/{slot_number}
Fetch a block by slot number. GET /blocks/slot/{slot_number}
Attributes
Fetch subsequent blocks. GET /blocks/{hash_or_number}/next
Fetch subsequent blocks. GET /blocks/{hash_or_number}/next
Attributes
Fetch preceding blocks. GET /blocks/{hash_or_number}/previous
Fetch preceding blocks. GET /blocks/{hash_or_number}/previous
Attributes
Fetch transaction hashes in a block. GET /blocks/{hash_or_number}/txs
Fetch transaction hashes in a block. GET /blocks/{hash_or_number}/txs
Attributes
Fetch and parse datum by hash, returning a Data value.
Fetch and parse datum by hash, returning a Data value.
Attributes
Fetch datum CBOR by datum hash. GET /scripts/datum/{hash}/cbor
Fetch datum CBOR by datum hash. GET /scripts/datum/{hash}/cbor
Attributes
Fetch datum as JSON by datum hash. GET /scripts/datum/{hash}
Fetch datum as JSON by datum hash. GET /scripts/datum/{hash}
Attributes
Fetch DRep info by ID. GET /governance/dreps/{drep_id}
Fetch DRep info by ID. GET /governance/dreps/{drep_id}
Attributes
Fetch block hashes in an epoch. GET /epochs/{number}/blocks
Fetch block hashes in an epoch. GET /epochs/{number}/blocks
Attributes
Fetch blockchain genesis parameters. GET /genesis
Fetch blockchain genesis parameters. GET /genesis
Attributes
Fetch API health status. GET /health
Fetch API health status. GET /health
Attributes
Fetch API server clock. GET /health/clock
Fetch API server clock. GET /health/clock
Attributes
Fetch the latest block. GET /blocks/latest
Fetch the latest block. GET /blocks/latest
Attributes
Fetch transaction hashes in the latest block. GET /blocks/latest/txs
Fetch transaction hashes in the latest block. GET /blocks/latest/txs
Attributes
Fetches the latest protocol parameters from the network.
Fetches the latest protocol parameters from the network.
Attributes
Fetch transaction metadata by label as JSON. GET /metadata/txs/labels/{label}
Fetch transaction metadata by label as JSON. GET /metadata/txs/labels/{label}
Attributes
Fetch transaction metadata by label as CBOR. GET /metadata/txs/labels/{label}/cbor
Fetch transaction metadata by label as CBOR. GET /metadata/txs/labels/{label}/cbor
Attributes
Fetch network info (supply, stake). GET /network
Fetch network info (supply, stake). GET /network
Attributes
Fetch network era summaries. GET /network/eras
Fetch network era summaries. GET /network/eras
Attributes
Fetch pool delegators. GET /pools/{pool_id}/delegators
Fetch pool delegators. GET /pools/{pool_id}/delegators
Attributes
Fetch pool history. GET /pools/{pool_id}/history
Fetch pool history. GET /pools/{pool_id}/history
Attributes
Fetch extended pool list. GET /pools/extended
Fetch extended pool list. GET /pools/extended
Attributes
Fetch script CBOR by hash. GET /scripts/{hash}/cbor
Fetch script CBOR by hash. GET /scripts/{hash}/cbor
Attributes
Fetch script info by hash. GET /scripts/{hash}
Fetch script info by hash. GET /scripts/{hash}
Attributes
Fetch script as JSON (for native/timelock scripts). GET /scripts/{hash}/json
Fetch script as JSON (for native/timelock scripts). GET /scripts/{hash}/json
Attributes
Fetch transaction CBOR. GET /txs/{hash}/cbor
Fetch transaction CBOR. GET /txs/{hash}/cbor
Attributes
Fetch transaction delegation certificates. GET /txs/{hash}/delegations
Fetch transaction delegation certificates. GET /txs/{hash}/delegations
Returns empty sequence if the transaction has no delegations (404).
Attributes
Fetch transaction details. GET /txs/{hash}
Fetch transaction details. GET /txs/{hash}
Attributes
Fetch transaction metadata as JSON. GET /txs/{hash}/metadata
Fetch transaction metadata as JSON. GET /txs/{hash}/metadata
Returns empty sequence if the transaction has no metadata (404).
Attributes
Fetch transaction metadata as CBOR. GET /txs/{hash}/metadata/cbor
Fetch transaction metadata as CBOR. GET /txs/{hash}/metadata/cbor
Returns empty sequence if the transaction has no metadata (404).
Attributes
Fetch transaction MIR certificates. GET /txs/{hash}/mirs
Fetch transaction MIR certificates. GET /txs/{hash}/mirs
Returns empty sequence if the transaction has no MIRs (404).
Attributes
Fetch transaction pool retirement certificates. GET /txs/{hash}/pool_retires
Fetch transaction pool retirement certificates. GET /txs/{hash}/pool_retires
Returns empty sequence if the transaction has no pool retirements (404).
Attributes
Fetch transaction pool update certificates. GET /txs/{hash}/pool_updates
Fetch transaction pool update certificates. GET /txs/{hash}/pool_updates
Returns empty sequence if the transaction has no pool updates (404).
Attributes
Fetch transaction redeemers. GET /txs/{hash}/redeemers
Fetch transaction redeemers. GET /txs/{hash}/redeemers
Returns empty sequence if the transaction has no redeemers (404).
Attributes
Fetch transaction stake address certificates. GET /txs/{hash}/stakes
Fetch transaction stake address certificates. GET /txs/{hash}/stakes
Returns empty sequence if the transaction has no stake certificates (404).
Attributes
Fetch transaction withdrawals. GET /txs/{hash}/withdrawals
Fetch transaction withdrawals. GET /txs/{hash}/withdrawals
Returns empty sequence if the transaction has no withdrawals (404).
Attributes
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
- Definition Classes
Look up a datum by its hash. Returns None if unknown.
Look up a datum by its hash. Returns None if unknown.
Attributes
- Definition Classes
Poll for transaction confirmation.
Poll for transaction confirmation.
Default implementation for emulators: a single check is sufficient since confirmation is instant.
Attributes
- Definition Classes
Force refresh of cached CardanoInfo from the network.
Force refresh of cached CardanoInfo from the network.
Fetches latest protocol parameters and updates the internal cache. Use this for long-running applications that need to stay current with network changes.
Attributes
Submits a transaction to the network.
Submits a transaction to the network.
Attributes
- Definition Classes
Inherited methods
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 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
Query UTxOs using a lambda DSL.
Query UTxOs using a lambda DSL.
Translates the lambda to a UtxoQuery at compile time and returns a builder that can be further configured before execution. Effect-polymorphic — the resulting .execute() returns the reader's own F[Either[UtxoQueryError, Utxos]], so the same call shape works on Future-typed providers (Blockfrost, JS) and direct-style providers (ox Id).
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 UtxoQueryWithReaderTF builder over this reader's effect type
- Inherited from:
- BlockchainReaderTF
Submit a transaction and poll until confirmed.
Submit a transaction and poll until confirmed.
Default implementation composes submit and pollForConfirmation.
Attributes
- Inherited from:
- BlockchainProvider