-
Notifications
You must be signed in to change notification settings - Fork 7
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
WalletConnect Encrypt/Decrypt/InvokeScript #4
Comments
hey @melanke |
I was thinking about something like this: const userPublicKey = 'abc123'
const friendPublicKey = '321cba'
const publicKeysThatCanDecrypt = [userPublicKey , friendPublicKey]
const encryptedResp = await wcSdk.encrypt("my secret message", publicKeysThatCanDecrypt)
console.log(encryptedResp) // ["message encrypted for user's key", "message encrypted for friend's key"]
const decryptedResp = await wcSdk.decrypt(encryptedResp[0])
console.log(decryptedResp) // "my secret message"
const decryptedResp = await wcSdk.decryptFromArray(encryptedResp) // will try to decrypt all messages, might take longer
console.log(decryptedResp) // { message: "my secret message", keyIndex: 0 } |
Done |
The text was updated successfully, but these errors were encountered: