ton-connect / sdk

SDK for TON Connect 2.0 — a comprehensive communication protocol between wallets and apps in TON ecosystem
Apache License 2.0
326 stars 92 forks source link

SDK: Adding support for Metamask Snap in Ton-Connect SDK #193

Open Gaurav1327 opened 4 months ago

Gaurav1327 commented 4 months ago

Is your feature request related to a problem?

While TON benefits greatly from the native Telegram base, attracting existing web3 liquidity and interest from web3 developers is crucial to long term success. A significant barrier for users looking to explore new web3 ecosystems though, is the requirement to set up a new wallet. There is a major opportunity for building an integration with MetaMask, which has a user base of over 30 million. By adding MetaMask Snap support to the TON Connect SDK, we can lower this barrier and potentially attract a large number of new users to the TON ecosystem.

Describe the solution you'd like

We propose adding support for MetaMask Snaps to the TON Connect SDK. This would involve:

Basically, we would need to add separate logic for handling dapps requests and invoking the corresponding snap methods rather than using the regular js-bridge methods. The goal is to allow TON dApps to seamlessly interact with MetaMask wallets through the Snap, just as they currently do with native TON wallets.

Describe alternatives you've considered

We have thought of potential alternatives to add support for snap without changing the SDK by creating a separate SDK specifically for MetaMask Snap integration. However, this would require dApp developers to implement two different SDKs, which is not ideal.

We believe that directly integrating MetaMask Snap support into the TON Connect SDK is the most efficient and user-friendly approach.

Additional context

Our team at Leap Wallet (operating under the name Cannon for TON-related projects) has experience developing the canonical MetaMask Snap for Cosmos, demonstrating our:

  1. Deep understanding of Snaps technology and its associated challenges.
  2. Strong partnership with the MetaMask team, crucial for the success of this project.
  3. Robust go-to-market and marketing strategies required to make this a success, as evidenced by our active presence on Twitter.

We're willing to collaborate closely with the TON Connect SDK maintainers to ensure the implementation meets all necessary standards and requirements. We also aim to add the minimum code necessary to support this functionality, maintaining the SDK's current performance and reliability.

We're open to discussion and feedback on this proposal and look forward to potentially collaborating on this feature.