Last updated 2 years ago
The cardano CLI is to cumbersome to use on large & complex transactions
A high level, declarative, transaction editor that fully integrates with your wallet, cardano-node and your text editor.
This is the total amount allocated to Transaction Editor & wallet.
** Executive Summary. Why do we need this?
You want to participate in the Cardano revolution, yet to do anything interesting you need to work with the cardano-cli. It is a powerful tool, yet too cumbersome to make good use of it. Tutorial after tutorial, and you only upgrade from commands to bash scripts. That is not a scalable user interface, it is error-prone and you waste countless hours in the discord or forums asking for help trying to figure out why your token mint or your swap contract does not work.
You need a different user interface. One where you can specify what you want and let the computer figure out which commands it needs to create your transaction. You move away from writing serial instructions into a declarative interface. You start using templates instead of memorizing commands or trying to reuse that last script that worked and now doesn't.
I want a tool like that. A powerful tool to interact with the cardano-node, which has all the features, does not get cumbersome as you increase the complexity of your tasks, and empowers you as a user. I couldn't find such a tool, thus I started building it myself. A text editable interface as a wallet for Cardano to craft my transactions. A tool that embraces the power of my text editor instead of the limitations of the command line.
Have look at this short example
This tool is growing into a fully-featured wallet. It already supports token mints, metadata, delegation certificates, unlocking of Plutus Smart contracts, and (work in progress) it uses cardano-address to work with Hierarchical Deterministic wallets. You won't need anymore to keep track of all those random keys the cardano-cli creates.
The GitHub repository is live and running.
https://github.com/Titan-C/cardano.el
** Impact & target group
I keep seeing people struggling with the CLI tool, through constant posts on the Cardano discord. Whether you are a developer, stake-pool operator, or a creator launching an NFT collection, you need to craft complex transactions and the cardano-cli is not easy. We all need help on how to do some tasks with the cli.
User interfaces define the usability of a product. It is not enough to provide a tool that does the job, it must enable the user to do the job. The user and the job to be done define the requirements of the user interface. There is never a UX that fits everybody.
This proposal offers an interface for people that need low-level access to the cardano-node to perform different transaction types and thus prefer not to rely on rigid shell scripts. The text interface, embedded in a text editor, provides high flexibility, fine control, and straightforward composability.
The declarative interface of this tool lets you focus on understanding the transactions you work on. The tool provides you with context & templates. You stop worrying about the cli and its instructions.
Better tools open more possibilities.
** Feasibility(Skill required)
Implementation is on Emacs because, at the moment, it has the richest ecosystem to develop text-editor-based interfaces. I understand Emacs is not everybody's favorite editor, and that is fine. Yet, it is an editor everybody can use for dedicated tasks. If you only use the transaction editor package, it can be set up ready to use upon install. Because Emacs packaging system is self-contained, you can use it off-line on your air-gapped PC for signing from cold storage.
Emacs as a text editor has highly developed APIs. Emacs has a very powerful programming language(despite unpopular), to edit text, interact with foreign processes, use foreign modules and do web requests.
I already have a working prototype of this tool, and it was awarded in the Plutus Pioneer Capstone Challenge during the Cardano Summit 2021. This tool is already in its third prototype stage, when I first started it was an interactive tool providing dialogs to select wallets, UTxOs, and addresses. I was emulating what people generally do when automating with bash scripts, only that it was an interactive workflow instead of programing in bash. However, it was still very cumbersome, it was pipelined, it only works in one way. A task had a flow of actions, and like a bash script, if you do a mistake, you must abort it and start all over again.
My breakthrough moment came when working on continuous integration configurations. There, you declare things, you move a level higher, from actions to tasks. You can always review, change your mind, and edit. Because there are no actions or instructions, there is no intermediate state, there are only end goals. What that means in our case is that: what the transaction should look like is what the interface must look like.
The prototype works and I like the workflow it provides. Wrapping a command-line interface is a common task to do in Emacs. The cardano-cli is a moving target and care needs to be taken to still create a flexible wrapper that supports updates on the CLI tool. I have modules to connect even to cardano-address and even the cardano-wallet to make use of mnemonic phrases for wallet creation, HD key derivation, and the coin selection algorithm.
Wrapping the commands to use Plutus scripts is simple. Yet, I still iterate on the design of that interface. A database of Data and Datumhashes. A store of contracts. A translator of the Haskell isData type into the JSON values or typed JSON files is still on the design works.
Wrapping the cardano-cli is simple because it is a stand-alone binary to execute. The same holds for cardano-address(although it provides a different interphase, with heavy use of Unix pipes). Integrating with cardano-wallet is more challenging, as it is a service that must be running and requires a configuration of its own. I will work on that during the implementation of this project. I haven't solved all problems at the outset of this proposal, because that would already imply a finished product.
** Auditability
The rate of work is a part-time occupation. Weekly sprints of 3 workdays(Fri, Sat, Sun) (I do work part-time in my main occupation). This spaced work is very beneficial, as it gives time for the community of users to test the tool and deliver feedback. It also helps me as a developer to gather ideas over the week, while thinking about other tasks. This influences thought, rest, and openness.
Every week, the sprint starts on Fridays with community feedback review and planning of tasks. The development follows until the end of Saturday. Sunday is reviews and reports day. Completed features are documented in a newsletter form and posted on the Cardano forum. These features are documented as part of the Handbook of the tool. A demo video is recorded, edited, and posted online(on YouTube). Yes, a full day of work is dedicated to communication. New Features are important, but getting them into the hands of users is what counts. People, even technical ones, read more tutorials and documentation than the actual source code.
All work is available on GitHub licensed GPL3. All communication takes place openly on the Cardano forum.
** KPI
- Users can use the cardano-address interface to use Hierarchical Deterministic wallets with the cardano-cli. (weekend 2 release)
- All exercises of the Alonzo-Testnet are solvable with this tool.
- Tool's internal SQLite db stores transaction annotations, datum & redeemer and makes it available to the editor
- Tool is released in MELPA for easy installation.
** Success evolution
- 3 Months: Project is launched and I gathered a small community of users during the open development
- 6 Months: There is a community response to write blogpost and videos using this tool instead of the CLI
- 12 Months: New text based interfaces show up as other developers find model more this useful than CLI too for large structured work. The guild-operator repository also incorporates this tool & templates on top of the scripts for stake pool operators.
** Timeline
Everyone has a plan until they get punched in the face -- Mike Tyson.
I propose a 10 Week action plan, on dedicated focus for this tool. I have been working on this before the start of Fund 6 with varying degrees of focus. The editor works and is close to becoming my main wallet.
Most software development is unpredictable and has little to do with the task at hand. It always requires investigating and solving problems related to dependencies. It all takes an unpredictable amount of time. Despite that, this is the best realizable timeline.
- Weekend-01: (Head start) Release new video tutorials of current TX editor. Spending transactions, Stake delegation, Mary native Token minting with metadata, Stake reward withdrawals, Output balancing.
- Weekend-02: Release the cardano-address functionalities to use "Hierarchical Deterministic" Wallets instead of the random key files generally used by the cardano-cli
- Weekend-03: Wrapper for cardano-wallet REST API. Include easy setup with guix package manager
- Weekend-04: SQLite database integration for data management. Link to cardano-wallet yet keep own database for transaction annotation.
- Weekend-05: Design and prototype, Data and Plutus-scripts management tool.
- Weekend-06: Review and release Data and Plutus-scripts management tool.
- Weekend-07: Design a UTxOs query tool. Some Plutus contracts need to track state via an NFT. A tool to inspect UTxOs and find specific ones becomes relevant, beyond the coin selection algorithm.
- Weekend-08: Design and Review wallet balances view. Tree view for UTxOs becomes cumbersome with many UTxOs and Multiasset. Test constrained tabular views and filtering.
- Weekend-09: Release UTxOs query tool and balances view features.
- Weekend-10: Wrap up, clean up, deal with outstanding bugs, make a stable release. Release on MELPA
** Budget
1200 USD Cloud Infrastructure 12 months. Includes Continuous Integration & build servers. VPS to run cardano-nodes on mainnet, public testnet.
The rest of the budget is for work compensation at an average rate of 60USD/hr. On the various tasks of Software design and implementation, documentation writing, tutorial video recording & editing, project stewardship, and other communication.
The budget does not include(it is discounted off), all my previous work done on this tool. Funding for this project is to make it my focus priority and include more user adoption. I proposed this tool already in Fund 6, and although well received and highly praised by CA it did not receive enough voting support to be funded. I keep working on it nevertheless because this is a valuable tool. On the road to a successful product, you must be your user too, if you don't want it nobody will.
Don't you find it annoying to edit your command line instructions in your editor to later copy them to the terminal? And you are still forced to consider linebreak marks and escaping or quoting. You remain constrained by the behavior and one-dimensionality of the command line, even when working already from the editor.
** My experience
- Plutus pioneer first cohort, "Completed/Survived/Graduated". Awarded NFT 117 of class photo, Titan-C
- Second Place on the Plutus Pioneer Capstone Challenge on the Cardano Summit 2021 for this same tool
*** Contributions to cardano
See for example my pull request and issues to IOHK repos.
- https://github.com/input-output-hk/cardano-node/pull/3082
- https://github.com/input-output-hk/Alonzo-testnet/issues/54
That is part of parallel work done while developing the transaction editor.
*** Released Emacs projects.
- cardano.el(this project) :: https://github.com/Titan-C/cardano.el
- org-cv :: https://titan-c.gitlab.io/org-cv/
- Cal-sync(spinoff-rewrite of org-caldav) :: https://github.com/Titan-C/org-caldav
*** Most successful Open-Source project
- Sphinx-Gallery :: https://sphinx-gallery.github.io/stable/index.html
Grew this project to become the standard documentation tool for Scientific Python projects.
*** Other
Currently employed to develop for checkmk. https://github.com/tribe29/checkmk
Work ranging from tools to analyze monitoring data, to the user interface. Always with a direct dialog with customers.
I hold a Ph.D. in Theoretical Physics developing simulations for correlated electrons systems.
Everything summarizes into: I'm a tool builder. I build the tools I need to get the job done.
NB: Monthly reporting was deprecated from January 2024 and replaced fully by the Milestones Program framework. Learn more here
Working prototype for transactions, with token mints and unlocking Plutus scripts. Prize winner on the Plutus Pioneer Capstone challenge.