This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Account is account address provided as string | |
// App must have access to the specified account | |
const account = "0x012...bc" | |
// Key is returned as base64 | |
const keyB64 = await window.ethereum.request({ | |
method: 'eth_getEncryptionPublicKey', | |
params: [account], | |
}) as string; | |
const publicKey = Buffer.from(keyB64, 'base64'); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"USD": { | |
"symbol": "$", | |
"name": "US Dollar", | |
"symbol_native": "$", | |
"decimal_digits": 2, | |
"rounding": 0, | |
"code": "USD", | |
"name_plural": "US dollars" | |
}, |