Please describe your proposed solution.
Problem
Testing Cardano web apps utilizing light wallets presents unique challenges due to the complexity of CIP-30 wallet interfaces, the difficulties in automating or mocking them, and the lack of wallet state reproducibility.
For example:
- It's impossible to test CIP-30-powered dApps on a private testnet in the browser because existing wallets simply do not provide this feature
- It's not clear what state the wallet has and there is no way to inspect or modify its responses or view its logs
- Wallet UIs are often inconvenient for testing purposes because of the need to use passwords to backup mnemonic phrases and to click through pop-up windows
Solution
The proposed solution is to create a light wallet targeted at developers and testers, that will provide the following features:
- Manually overwriting CIP-30 responses to provide made-up data to the app
- Saving the wallet state (to make it reproducible)
- Faking different wallet states (presence of collateral, UTxO distribution)
- Faking different wallet modes (single-address vs. multi-address mode (Eternl))
- Starting local Cardano testnets with pre-funded wallets to connect to (using Plutip, a tool for automatic Cardano network setup). This would allow making not only faking wallet state but actually reproducing it on a private Cardano testnet (with several limitations, most notably the inability to save and restore tokens)
- CIP-30 call logging to simplify dApps debugging
- UI that simplifies development: no recovery phrase re-entering, instant confirmation of all operations
For the implementation, we can use cardano-transaction-library (CTL for short, <u>https://github.com/Plutonomicon/cardano-transaction-lib/</u>) - a tool that has been developed in the past thanks to Cardano Catalyst funds 8 and 9. CTL already has most of the components needed to create a light wallet, including:
- Interaction with Cardano query layers (Blockfrost, Kupo, Ogmios)
- Private key management, address derivation
- Derivation of private keys from mnemonic passphrases
- CIP-30 method implementation - CTL already has a special module called Cip30Mock which is basically a complete implementation of the CIP-30 interface (<u>https://github.com/Plutonomicon/cardano-transaction-lib/blob/develop/src/Internal/Wallet/Cip30Mock.purs</u>)
The features above can be built on top of existing CTL functionality.
The main missing parts are, sorted by descending complexity:
- Graphical user interface design, development, and integration into a WebExtension
- multi-address mode support (CTL only provides single-address wallet mode in its Cip30Mock)
- Plutip interaction for Cardano cluster startup (parts of existing code can be reused)
- CIP-30 call logging
- Implementation of wallet state saving, viewing and modification
Market
The target audience of this project consists of:
- dApps developers
- dApp testers
- Cardano power users.
How does your proposed solution address the challenge and what benefits will this bring to the Cardano ecosystem?
Challenge statement: Development Ecosystem - The Evolution. How do we equip and support developers with tools and working infrastructure? How do we make Cardano their first choice when it comes to building dApps, innovating and collaborating?
The proposal, if implemented, will provide a useful testing tool for dApp developers, which may influence their preference towards Cardano.
How do you intend to measure the success of your project?
Success can be measured by the number of users. Since the potential user audience is tiny (but very impactful!) in comparison to production wallets, we can target just 1000+ installs and consider it a success.
Please describe your plans to share the outputs and results of your project?
MLabs maintains a social presence on Twitter and in the Plutonomicon Discord, where updates could be posted. Additionally, the release could be announced on IOG technical Discord.