Wallet Connect for Klever DApps

Hey KleverWallet Team!

I previously asked @Bruno_Campos about the possibility of implementing a Wallet Connect feature similar to TON Connect, enabling Klever transactions to be approved directly within a web app without relying on the KleverWallet browser. He mentioned that this could be implemented and that your team would be open to assisting with it.

Could you please provide more details on how to proceed with this?

Thank you in advance!

25 Likes

Let’s go! Klever Community deserves the best!

7 Likes

Hey everyone!

It would be amazing to see a Klever Connect community-driven open-source project take shape, built by and for the community. :rocket:

The idea here is to create a “Wallet Connect” feature, enabling users to log into dApps using KleverChain’s stack and securely validate authorization. Essentially, this feature would involve building an authorization protocol based on KleverChain’s ed25519 cryptographic elliptic curve.

Proposal for Implementation

My initial thought is to leverage a challenge-response authorization process using the existing implementations of:

• sign_message (Code)

• verify_message_signature (Code)

Here’s how the process might look:

  1. Challenge Creation (Server-Side):

• The server generates a unique, random challenge string (e.g., a UUID) and sends it to the user.

  1. Message Signing (Client-Side):

• The user’s wallet signs the challenge using their private key via sign_message.

  1. Signature Verification (Server-Side):

• The server receives the signed message and the public address from the wallet.

• Using verify_message_signature, the server validates:

• The signature is valid.

• The signature corresponds to the provided KleverChain address.

  1. Authorization Confirmation:

• If verification succeeds, the server confirms the wallet’s ownership of the address and grants access.

Why this Approach?

• Off-Chain Validation: This process avoids unnecessary on-chain operations, reducing costs and increasing speed.

• Secure Ownership Proof: The challenge-response flow ensures the user truly owns the wallet private key without ever exposing it.

• Alignment with KleverChain: By utilizing kos-rs’s built-in tools, we ensure seamless integration and reliability.

I’d love to hear your thoughts on this!

6 Likes

Sounds great! Let’s make this happen together. We’ll discuss it with the team and keep you updated as soon as we’re ready to move forward

7 Likes

Hi Bruno,

We’ve made great progress on KleverGate since our last discussion and would love to continue this collaboration.

We’d be happy to give you and the Klever team access to our private repository so you can explore the implementation, architecture, and current state of the project.

Our goal isn’t to impose a specific product or branding. We see KleverGate as an open protocol that can be integrated and adapted however it best fits the Klever ecosystem. We hope it can eventually power seamless wallet connectivity across products like KleverScan and Bitcoin.me DEX while remaining fully compatible with whatever direction the ecosystem takes.

Looking forward to hearing your thoughts and building this together. @Bruno_Campos @Duka

5 Likes