c5dfc1e9af
* implement encryption with relay server * implement minting pkp with relay server * revert yarn.lock changes |
||
---|---|---|
public | ||
src | ||
tools | ||
.gitignore | ||
package.json | ||
README.md | ||
yarn.lock |
Lit Protocol Oauth -> Wallet example
This project lets you start using Ethereum with just a Google Account. It's a simple example of how to use the Lit Protocol Oauth service to authenticate users and then use their Ethereum address.
This project specifically:
- Uses Google Oauth to auth the user
- Mints a PKP token for the user, with their Google account as a valid auth method
- Uses the PKP token to get an Ethereum address for the user
- Generates a local session key for the user and stores it in LocalStorage
- Uses the Lit Protocol's PKP Session Signing service to sign that session key with their PKP
- Uses the local session key to sign a request to encrypt and decrypt a string that only the user can decrypt.
How to run
First, run yarn install
. Then run yarn start
to run this project. You'll need a Metamask wallet set to the Mumbai network with some testnet MATIC in it.
Sign in with Google and wait until it says "PKP Minted". Then, click the "Encrypt then Decrypt with Lit" button. If you see the word "Success!" at the top, then it worked! Open the dev console to see how it works.