This code repository introduces the smallest example to encrypt/decrypt messages making use of MetaMask.
There are 4 important screens:
- Connect wallet
- Request public key (so we can encrypt a message and send it to the user that is requesting it)
- Encrypt message (using the public key of the user we want to send information)
- Decrypt message (using our metamask account)
The code has been created using NextJS framework and Web3-React libraries from Uniswap team as a base.
You will be able to find the implementation in example
.
- You must have installed node 18 > (use of NextJS)
- Execute
yarn install
- Execute
yarn start
Execute sudo sst deploy
to deploy the static site to AWS
Note: To do so you will need to have installed aws-cli and set up the credentials with a profile
metamask-encrypt-decrypt
, you can change this fromsst.config.ts
If you have any questions, send them along with a hi to [email protected].