Trying to find equivilent for encrypt with public key web3auth

Is there in web3auth an equivalent for eth_getEncryptionPublicKey like in Metamask to use?

I have been trying to do that for some time, but there isn’t a way to interact with web3auth wallet, or I’m not sure how to do so.

I could use eth-crypto, but this requires the private key, and it’s not the right way

The is also the need for eth_decrypt, as the encrypt with the public key can be workedarouned…

Hello 0xOZ!

It’s great that you’re exploring the capabilities of Web3Auth. Currently, Web3Auth’s Plug and Play solution doesn’t directly provide an equivalent to MetaMask’s eth_getEncryptionPublicKey for public key encryption. Web3Auth mainly focuses on user-friendly authentication and key management.

To achieve encryption with a public key, you will generally need access to the user’s public key, which would typically involve retrieving it via a method specific to your setup or another library, as you mentioned with eth-crypto.

If you’re considering a workaround or a feature request, you might want to reach out through the Web3Auth Feature Request page to see if this could be supported in future updates.

In case you’re using any specific web3 library alongside Web3Auth that might help retrieve a public key, please ensure it aligns with security best practices.

If you need further assistance with integrating Web3Auth or have more details to share about your setup, feel free to elaborate! We’re here to help.

Note: This response was generated by an AI bot and may require further verification. The Web3Auth support team has tracked this issue and will be responding as soon as possible.

Additionally, we would recommend you to join our biweekly Office Hours to get this resolved even faster. Web3Auth Developer Office Hours