Skip to content

Latest commit

 

History

History
64 lines (42 loc) · 3.4 KB

comparisons.md

File metadata and controls

64 lines (42 loc) · 3.4 KB

CTL vs. other offchain solutions

This document highlights key differences between CTL and other Cardano offchain frameworks.

Lucid

Wallet support

  • 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.

Query layer differences

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).

Supported backends

  • 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 custom QueryHandle.

Staking support

Both CTL and Lucid support all operations with ADA delegations.

Testing

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.

API design

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 of cardano-multiplatform-lib. Lucid allows to use CML's TxBuilder 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, via HasPlutusSchema.