auth.andert.me/README.md

44 lines
1.1 KiB
Markdown
Raw Normal View History

2023-07-18 13:36:33 +00:00
# `signAndSaveAuthMessage` example
2023-07-18 13:36:33 +00:00
This is a [Next.js](https://nextjs.org/) example that demonstrates how to use the `signAndSaveAuthMessage` function from the `@lit-protocol/auth-browser` package with a **Connect Wallet** modal like [RainbowKit](https://www.rainbowkit.com/docs/introduction).
2023-07-18 13:36:33 +00:00
Note: This example uses prior versions of RainbowKit and `wagmi` that are compatible with `ethers`.
2023-07-18 13:36:33 +00:00
## 💻 Getting Started
2023-07-18 13:36:33 +00:00
1. Clone this repo and download dependencies:
2023-07-18 13:36:33 +00:00
```bash
git clone git@github.com:LIT-Protocol/sdk-examples.git
cd connect-wallet-authsig
npm install
# or
yarn
# or
pnpm
```
2023-07-18 13:36:33 +00:00
2. Add environment variables:
2023-04-15 08:47:35 +00:00
2023-07-18 13:36:33 +00:00
```bash
NEXT_PUBLIC_ENABLE_TESTNETS='<true or false>'
NEXT_PUBLIC_WC_PROJECT_ID='<Your WalletConnect project ID>'
```
2023-04-15 08:47:35 +00:00
2023-07-18 13:36:33 +00:00
3. Run the development server:
2023-04-15 17:05:46 +00:00
2023-07-18 13:36:33 +00:00
```bash
npm run dev
# or
yarn dev
# or
pnpm dev
```
Open [http://localhost:3000](http://localhost:3000) with your browser to see the result.
## 📚 Resources
- [Lit Protocol Developer Docs](https://developer.litprotocol.com/)
- [`@lit-protocol/auth-browser` API Docs](https://js-sdk.litprotocol.com/modules/auth_browser_src.html)