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!

22 Likes

Let’s go! Klever Community deserves the best!

5 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!

5 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

5 Likes