This document highlights key differences between CTL and other Cardano offchain frameworks.
- Lucid supports any CIP-30 compatible wallet. CTL supports a pre-defined list of wallets (however, the list can be extended easily).
- Both CTL and Lucid support using seed phrases and private keys.
- Lucid allows to use any address without a private key for querying - CTL does not allow that, but it's still possible to build transactions for other wallets to sign via other means.
Lucid uses a Provider
class that defines all available queries. CTL query methods are defined in QueryHandle
.
CTL supports the following queries that Lucid does not:
getScriptByHash
getTxMetadata
getChainTip
getCurrentEpoch
evaluateTx
(not needed for Lucid)getEraSummaries
getPoolIds
Lucid, on the other hand, provides a way to get a UTxO that contains a specified NFT (getUtxoByUnit
).
- Both CTL and Lucid support Blockfrost and Kupo+Ogmios
- Lucid supports Maestro
- Both CTL and Lucid allow for custom backends - Lucid via
Provider
interface implementation, and CTL via a customQueryHandle
.
Both CTL and Lucid support all operations with ADA delegations.
CTL uses Plutip, which is a tool to spawn real Cardano testnets on the fly, while Lucid uses an emulator.
Additionally, CTL supports testing with real wallets via headless browsers and provides an assertion library.
Lucid aims for simplicity, while CTL allows more fine-grained control over transaction building process.
- CTL uses
cardano-serialization-lib
, while Lucid uses a fork ofcardano-multiplatform-lib
. Lucid allows to use CML'sTxBuilder
or call CML directly, while CTL allows to alter the transaction arbitrarily as PureScript data type either before or after balancing. In CTL, CSL types and method wrappers are a part of the internal interface, but technically they can be used as well. - Plutus Data conversion is handled via a schema-enabled API in Lucid. CTL allows for automatic
ToData
/FromData
deriving for some types, viaHasPlutusSchema
.