Inspiration

The Constellation Network offers unique scalability and security through its directed acyclic graph (DAG) architecture. However, integrating its native token and ecosystem into widely-used wallets like MetaMask has been challenging. Our inspiration came from the need to bridge this gap, creating a seamless user experience for interacting with DAG and Metagraph tokens directly within MetaMask, while ensuring compatibility with existing blockchain tools.

What it does

The Constellation Network Snap for MetaMask introduces essential functionalities for interacting with the Constellation Network:

  • Snap Homepage: Displays a custom interface showcasing the Constellation Network's logo and description.
  • Account Creation: Automatically generates DAG accounts using BIP44 and BIP32 entropy with DAG4.js.
  • Send and Receive DAG: Users can send and receive Constellation DAG tokens. Account Balance: Displays the user's DAG account balance within MetaMask.
  • Transaction Signing: Allows users to sign DAG transactions for a secure and integrated experience.
  • The accompanying dApp, built in ReactJS, complements the Snap by offering a user-friendly interface for these operations.

How we built it

The project is built on two primary components:

  • Metamask Snap: Implemented using MetaMask's Snaps API and DAG4.js, allowing for DAG account management, transaction signing, and token transfers.
  • ReactJS Companion dApp: This frontend application provides a simplified UI for users to interact with their Constellation accounts and perform key operations, leveraging React components for account balance display, token transfers, and more.

Challenges we ran into

One of the key challenges was integrating DAG account creation and transaction functionality into the Metamask Snap architecture, which was not initially designed to support DAG. We had to utilize DAG4.js and BIP44/BIP32 entropy generation in novel ways to handle the Constellation Network’s unique account system. Additionally, ensuring smooth communication between the Snap and the companion dApp required troubleshooting various data synchronization and state management issues.

Accomplishments that we're proud of

We successfully implemented a seamless user experience where Metamask users can create, manage, and transact with their Constellation Network accounts directly in the wallet. Additionally, the ability to send and receive DAG tokens, view account balances, and sign transactions are major milestones. The integration of DAG4.js into a widely-used tool like Metamask marks a significant achievement in bringing the Constellation Network closer to mainstream blockchain users.

What we learned

This project deepened our understanding of blockchain wallet extensions, particularly Metamask Snaps, and how to adapt them to non-EVM-compatible networks like Constellation. We also gained experience in working with stardust collective's DAG4.js, account and keys management with BIP44 and BIP32, and how to handle complex state management between Snaps and dApps.

What's next for Constellation Network Snap

Future plans for the Constellation Network Snap include:

  • Metagraph Tokens: Expanding support to create and add metagraph tokens to user accounts.
  • Message Signing: Allowing users to sign messages, enhancing the use cases for decentralized identity and data integrity.
  • Enhanced UI: Further improvements to the companion dApp, including transaction history, network fee estimation, and improved error handling.
  • Broader Adoption: Promoting the Snap and companion dApp to the Constellation and blockchain communities for broader usage and feedback.

Built With

Share this project:

Updates