eth_getEncryptionPublicKey
This method is deprecated and may be removed in the future. Requests that the user share their public encryption key. Returns a public encryption key, or rejects if the user denies the request. The public key is computed from entropy associated with the specified user account, using the NaCl implementation of the X25519_XSalsa20_Poly1305 algorithm.
Parameters
Address(string)requiredThe address of the Ethereum account that can decrypt the message.
Returns
Example request
await provider.request({
method: "eth_getEncryptionPublicKey",
params: [
"0x4B0897b0513FdBeEc7C469D9aF4fA6C0752aBea7"
]
});
Example response
{
"id": 1,
"jsonrpc": "2.0",
"result": "0x04bfcab3b7ca7e8b3f3b62b2f7f77e9e4b68080bbf8f0f4a1c8f890864d2c7c1d3c45d8b2e3f5f1c27dfeea4c2f5733e90bfc7484e2a690aa9b8ac4559d2e6a8d7"
}