Overview
Cardano Transaction Lib (CTL) is an open-source code library that lets app developers create, sign, and send the transactions behind a DApp (a blockchain-based app), such as paying into a smart contract (a program that runs on the blockchain) or delegating ADA to a stake pool1,2,3. It covers the "off-chain" part of an app: the logic that sits between the user interface and the code running on the blockchain4. CTL is written in PureScript, a programming language that compiles to JavaScript1,5.
MLabs, a software engineering firm focused on the Haskell programming language and Cardano, develops CTL on GitHub under the Plutonomicon organization1. Cardano Transaction Lib takes its design cues from the Plutus Application Backend (PAB), an earlier Cardano developer tool, but ships as a library that developers import rather than a separate program they run6. Backers named in its README include Input Output, a blockchain research and engineering company, and several funding rounds of Project Catalyst, a Cardano funding program1. They also include Intersect, a member-based organization for the Cardano ecosystem, and DApp teams such as Indigo Protocol and Liqwid Labs1.
Key Features
- Runs in the browser or on a server. CTL code can run in a web page that connects to a user's browser wallet through CIP-30, the standard that lets Cardano wallets talk to websites6. The same code can also run on Node.js, the usual way to run JavaScript outside a browser4.
- Choice of blockchain data source. CTL reads chain data through Ogmios and Kupo, two services that run alongside a Cardano node7, or through Blockfrost, a hosted data service that needs only an API key, a password-like access code8.
- Control over which coins pay. Balancing is the step that picks which coins fund a transaction and where the change goes. CTL lets developers steer it: add extra coins, keep chosen coins from being spent, set the change address, or balance a transaction on a server for another wallet to sign9.
- Staking built in. The CTL staking guide covers registering stake keys, delegating ADA to a stake pool, receiving and withdrawing rewards, and registering or retiring a stake pool2.
- Testing with real wallets. A CTL test engine opens a browser without a visible window and clicks through wallet pop-ups to approve transactions. Tests can also run on a local Cardano test network10.
What to Expect
CTL's documentation site holds a generated reference of its code modules and their dependencies, built from the newest development version of the code, while the how-to guides live in the doc folder of the GitHub repository1. The getting-started guide uses Nix, a tool for reproducible development setups, and a ready-made project template called ctl-scaffold3. Teams building web front ends can wrap CTL contracts as JavaScript packages on NPM, the main JavaScript package registry, so front-end developers can plug them into the user interface4.
CTL's own comparison page sets it against Lucid, another library among Cardano transaction builders, whose original repository is now archived and marked deprecated11. In that comparison, Lucid aims for simplicity, while CTL gives finer control over how each transaction is built6.
The README lists Indigo Protocol, Liqwid, Clarity, PlayerMint, and SingularityNET as production users1. Project Catalyst grants paid for specific upgrades, including Blockfrost support in Fund 912 and a Fund 11 project to shrink the download size of web apps built with CTL13. Intersect's Open Source Committee also approved an MLabs proposal for CTL and added it to its program14. Questions go to the Plutonomicon Discord server or the #ctl channel in MLabs' Slack15.
