Skip to content
This repository has been archived by the owner on Oct 7, 2024. It is now read-only.

Question: regarding getEncryptionPublicKey #121

Open
cosminm-affnd opened this issue Aug 16, 2021 · 1 comment
Open

Question: regarding getEncryptionPublicKey #121

cosminm-affnd opened this issue Aug 16, 2021 · 1 comment

Comments

@cosminm-affnd
Copy link

Is the key returned by getEncryptionPublicKey intended to be the wallet public key? Or is it something else?

In other words, should this test be green:

      await keyring.deserialize([testAccount.key]);

      const encryptionPublicKeyB64 = await keyring.getEncryptionPublicKey(testAccount.address);
      const encryptionPublicKey = Buffer.from(naclUtil.decodeBase64(encryptionPublicKeyB64));
      
      const address = ethUtil.publicToAddress(encryptionPublicKey);
      const addressHex = ethUtil.bufferToHex(address);
      expect(addressHex).toBe(testAccount.address);
@twilz2024

This comment was marked as off-topic.

@MetaMask MetaMask locked as spam and limited conversation to collaborators Feb 28, 2024
@MetaMask MetaMask unlocked this conversation Feb 28, 2024
@MetaMask MetaMask locked and limited conversation to collaborators Feb 28, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants