Open wowok-ai opened 2 months ago
Hi, there should be a wallet.verifySignedMessage function for you to decrypt msg by using the signature and public key of the connected account. check details in https://kit.suiet.app/docs/Hooks/useWallet
And may I ask why do you use public key instead of private key to encrypt msg?
If the message I send you is encrypted with your public key, only you can see it, ensuring the privacy of data transmission on the chain.
@wowok-ai That is an interesting use case though. So it would be the capability that the DApp requests a wallet to use the account's private key to decrypt the given msg. However, I just checked the Sui wallet standard and there is not such a similar method. I suppose you could submit a feature request to sui's repo https://github.com/MystenLabs/sui/issues
I have a message that encrypt by Pubkey, And how to use Wallet to decrypt this message ?
Thx a lot.