multiversx / mx-sdk-dapp

A library that holds the core functional logic of a dapp on the MultiversX
66 stars 65 forks source link

"signMessage" (sdk-dapp/utils/account) not supported on Maiar App, Web Wallet, Ledger #580

Closed newbreedofgeek closed 1 year ago

newbreedofgeek commented 1 year ago

Hi Team,

We've been trying to use signMessage at Itheum. We use it as a method to enable users to prove account ownership and session based access. (generate signature in front end, validate it in the backend)

import { signMessage } from '@multiversx/sdk-dapp/utils/account';

const signatureObj = await signMessage({ session });

Unfortunately, signMessage seems to ONLY work on DeFi Wallet. We get a Not yet implemented error on Maiar, Web Wallet and ledger.

image

Our largest userbase is from Maiar App - so this is a pretty big blocker for our next launch.

1) Any timeframe for when signMessage will be available for Maiar, Web Wallet and Ledger? 2) If it's not a priority right now; is there an alternate way to get user to "sign a message" (with a custom string value) so we can use the signature in the backend to prove account ownership - this kind of feature is a pretty standard way to prove account ownership so I'm sure you guys are doing it internally.

Thanks!

arhtudormorar commented 1 year ago

Hi @newbreedofgeek! This feature is in development right now. I will keep you posted here once it's ready.

radumojic commented 1 year ago

The message signing feature is available with WalletConnect V2

To activate the Wallet Connect V2 functionality you'll need a Project ID from https://cloud.walletconnect.com/app and set it in the <DappProvider> as walletConnectV2ProjectId

https://github.com/multiversx/mx-template-dapp/blob/66387e46ef28b5a934116ba1d36466347b6d51b3/src/App.tsx#L36

and set the isWalletConnectV2 flag on true on the login button: https://github.com/multiversx/mx-template-dapp/blob/66387e46ef28b5a934116ba1d36466347b6d51b3/src/pages/Unlock.tsx#L43

newbreedofgeek commented 1 year ago

tnx @radumojic

We will give this a go. Is isWalletConnectV2 production ready? (i.e. ready for use with our mainnet contracts?) Just checking if it's a alpha/beta feature or from a security point of view, it's ready for production/mainnet use. (any security risk)

newbreedofgeek commented 1 year ago

Just implemented isWalletConnectV2 as per your instructions @radumojic and it seems to work! Appreciate your help!

Only question I have now is:

Tnx again

radumojic commented 1 year ago

Hello,

Yes, WalletConnectV2 is production ready security and implementation wise.

We keep the beta identifier for the @multiversx/sdk-wallet-connect-provider provider due to some limited connectivity issues with some devices that will be addressed in the upcoming xPortal App

It's also recommended that you use WalletConnectV2 in your upcoming implementation as WalletConnect V1 will soon be deprecated: https://medium.com/walletconnect/walletconnect-v1-0-sunset-notice-and-migration-schedule-8af9d3720d2e

CiprianDraghici commented 1 year ago

Closed due to inactivity