A demonstration project showcasing CIP-158 implementation and peer-to-peer transaction signing between devices in the Cardano ecosystem.
This project serves two primary purposes:
-
CIP-158 Demo: Demonstrates the implementation of CIP-158 for secure communication between decentralized applications and wallets.
-
P2P Transaction Signing: Provides a peer-to-peer connection mechanism between two devices, enabling secure transaction signing without relying on centralized infrastructure.
The project is structured into two main components:
The decentralized application component that initiates transactions and interacts with the wallet.
Tech Stack:
- Framework: React and Vite.js
- Communication Protocol: CIP-158
The wallet component used for emulating behavior of a wallet.
Tech Stack:
- Framework: Native Java Android App + HTML/JS/CSS Wallet Connector with PeerJS
- Communication Protocol: PeerJS/WebRTC
- Secure peer-to-peer communication between dApp and wallet
- CIP-158 compliant implementation
- Decentralized transaction signing
- No centralized server required for P2P connection
- Cross-device compatibility
In cardano-client run:
npm installOpen in Android Studio and run in an Emulator or on Device
npm run dev -- --hostFor testing the CIP-158 in App Browser, open the dApp in a Browser and click on Open Wallet in the Dropdown menu. This should open the installed Demo Wallet via DeepLink and load the dApp in the in App Browser.
For Testing the QR p2p Connection open the dApp in any Browser and scan the QR Code in the Dropdown menu with the demo Wallet.
- PeerJS sometimes cant make a connection/ wont give a PeerID to a client. Im unsure why at the moment.
- The in App Browser currently only loads the dApp but cant communicate with the wallet. This is tbd.
- Currently the dApp and the wallet can make a connection via PeerJS but signing is not finished yet.
Contributions are welcome! Please feel free to submit a Pull Request.