docs(auth): ensure auth dapp/wallet readmes are relevant (#63)
* docs(auth): update wallet readme * docs(auth): update dapp readme
This commit is contained in:
parent
207c6871ba
commit
8146e37fc6
@ -1,9 +1,39 @@
|
||||
# Auth Client JS demo
|
||||
# React Auth dApp (React, Typescript, Next.js, Ethers)
|
||||
|
||||
This is a demo for the auth client
|
||||
🔗 Live dapp demo - https://react-auth-dapp.walletconnect.com/ <br />
|
||||
🔗 Live wallet demo - https://react-auth-wallet.walletconnect.com/ <br />
|
||||
📚 WalletConnect v2 Docs - https://docs.walletconnect.com/2.0
|
||||
|
||||
# Commands
|
||||
## Overview
|
||||
|
||||
`npm run dev` for development mode
|
||||
`npm run build` for building the application
|
||||
This example aims to demonstrate dapp-facing use cases enabled by WalletConnect Auth Alpha.
|
||||
|
||||
## Running locally
|
||||
|
||||
Install the app's dependencies:
|
||||
|
||||
```bash
|
||||
npm i
|
||||
```
|
||||
|
||||
Set up your local environment variables by copying the example into your own `.env.local` file:
|
||||
|
||||
```bash
|
||||
cp .env.local.example .env.local
|
||||
```
|
||||
|
||||
Your `.env.local` now contains the following environment variables:
|
||||
|
||||
- `NEXT_PUBLIC_PROJECT_ID` (placeholder) - You can generate your own ProjectId at https://cloud.walletconnect.com
|
||||
|
||||
## Develop
|
||||
|
||||
```bash
|
||||
npm run dev
|
||||
```
|
||||
|
||||
## Build
|
||||
|
||||
```bash
|
||||
npm run build
|
||||
```
|
||||
|
@ -1,11 +1,11 @@
|
||||
# Wallet Example (React, Typescript, Ethers, NextJS, Cosmos)
|
||||
# Auth Wallet Example (React, Typescript, Ethers, NextJS)
|
||||
|
||||
This example aims to demonstrate basic and advanced use cases enabled by WalletConnect. Please only use this for refference and development purposes, otherwise you are at risk of loosing your funds.
|
||||
This example aims to demonstrate wallet-facing use cases enabled by WalletConnect Auth Alpha. Please only use this for reference and development purposes, otherwise you are at risk of losing your funds.
|
||||
|
||||
# Useful links
|
||||
|
||||
🔗 Live wallet app - https://react-wallet.walletconnect.com <br />
|
||||
🔗 Live dapp - https://react-app.walletconnect.com <br />
|
||||
🔗 Live wallet app - https://react-auth-wallet.walletconnect.com/ <br />
|
||||
🔗 Live dapp - https://react-auth-dapp.walletconnect.com/ <br />
|
||||
📚 WalletConnect docs - https://docs.walletconnect.com/2.0
|
||||
|
||||
## Getting started
|
||||
@ -16,7 +16,7 @@ Example is built atop of [NextJS](https://nextjs.org/) in order to abstract comp
|
||||
|
||||
2. Add your project details in [WalletConnectUtil.ts](https://github.com/WalletConnect/web-examples/blob/main/wallets/react-wallet-v2/src/utils/WalletConnectUtil.ts) file
|
||||
|
||||
3. Install dependencies `yarn install` or `npm install`
|
||||
3. Install dependencies via `npm install`
|
||||
|
||||
4. Setup your environment variables
|
||||
|
||||
@ -29,16 +29,6 @@ Your `.env.local` now contains the following environment variables:
|
||||
- `NEXT_PUBLIC_PROJECT_ID` (placeholder) - You can generate your own ProjectId at https://cloud.walletconnect.com
|
||||
- `NEXT_PUBLIC_RELAY_URL` (already set)
|
||||
|
||||
5. Run `yarn dev` or `npm run dev` to start local development
|
||||
5. Run `npm run dev` to start local development
|
||||
|
||||
## Navigating through example
|
||||
|
||||
1. Initial setup and initializations happen in [_app.ts](https://github.com/WalletConnect/web-examples/blob/main/wallets/react-wallet-v2/src/pages/_app.tsx) file
|
||||
2. WalletConnect client, ethers and cosmos wallets are initialized in [useInitialization.ts ](https://github.com/WalletConnect/web-examples/blob/main/wallets/react-wallet-v2/src/hooks/useInitialization.ts) hook
|
||||
3. Subscription and handling of WalletConnect events happens in [useWalletConnectEventsManager.ts](https://github.com/WalletConnect/web-examples/blob/main/wallets/react-wallet-v2/src/hooks/useWalletConnectEventsManager.ts) hook, that oppens related [Modal views](https://github.com/WalletConnect/web-examples/tree/main/wallets/react-wallet-v2/src/views) and passes them all necesary data
|
||||
4. [Modal views](https://github.com/WalletConnect/web-examples/tree/main/wallets/react-wallet-v2/src/views) are responsible for data display and handling approval or rejection actions
|
||||
5. Uppon approval or rejection modals pass request data to [RequestHandlerUtil.ts](https://github.com/WalletConnect/web-examples/blob/main/wallets/react-wallet-v2/src/utils/RequestHandlerUtil.ts) that performs all necesary work based on request method and returns formated json rpc result data that can be then used for WallteConnect client responses
|
||||
|
||||
## Preview of wallet and dapp examples in action
|
||||
|
||||
https://user-images.githubusercontent.com/3154053/156764521-3492c232-7a93-47ba-88bd-2cee3f8366d4.mp4
|
||||
|
Loading…
Reference in New Issue
Block a user