Refactor/update readmes (#100)

* change variable names

* add web3wallet examples to main readme

Co-authored-by: Vanessa Mercado <finessevanes@Vanessas-MacBook-Pro.local>
This commit is contained in:
vanes 2023-01-05 11:00:23 -07:00 committed by GitHub
parent f3a04a8250
commit 90ea03070d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 12 additions and 6 deletions

View File

@ -1,8 +1,14 @@
# WalletConnect v2 Examples # WalletConnect v2 Examples
Catalogue of various wallet and dapp examples implementing WalletConnect's **Sign v2 and Auth SDKs**. Each example contains its own README with further instructions and explanations. Catalogue of various wallet and dapp examples implementing WalletConnect's **SDKs and APIs**. Each example contains its own README with further instructions and explanations.
### Sign SDK ### Web3Wallet SDK
**Wallets:**
- [React Web3Wallet SDK](https://github.com/WalletConnect/web-examples/tree/main/wallets/react-web3wallet) ([Demo](https://react-web3wallet.vercel.app))
### Sign API
**Wallets:** **Wallets:**
@ -14,7 +20,7 @@ Catalogue of various wallet and dapp examples implementing WalletConnect's **Sig
- [React dApp (with EthereumProvider + Ethers.js) - v2](https://github.com/WalletConnect/web-examples/tree/main/dapps/react-dapp-v2-with-ethers) ([Demo](https://react-dapp-v2-with-ethers.vercel.app/)) - [React dApp (with EthereumProvider + Ethers.js) - v2](https://github.com/WalletConnect/web-examples/tree/main/dapps/react-dapp-v2-with-ethers) ([Demo](https://react-dapp-v2-with-ethers.vercel.app/))
- [React dApp (with EthereumProvider + web3.js) - v2](https://github.com/WalletConnect/web-examples/tree/main/dapps/react-dapp-v2-with-web3js) ([Demo](https://react-dapp-v2-with-web3js.vercel.app/)) - [React dApp (with EthereumProvider + web3.js) - v2](https://github.com/WalletConnect/web-examples/tree/main/dapps/react-dapp-v2-with-web3js) ([Demo](https://react-dapp-v2-with-web3js.vercel.app/))
### Auth SDK ### Auth API
**Wallets:** **Wallets:**
@ -27,7 +33,7 @@ Catalogue of various wallet and dapp examples implementing WalletConnect's **Sig
- [Vue Auth dApp](https://github.com/WalletConnect/web-examples/tree/main/dapps/vue-dapp-auth) ([Demo](https://vue-dapp-auth.vercel.app/)) - [Vue Auth dApp](https://github.com/WalletConnect/web-examples/tree/main/dapps/vue-dapp-auth) ([Demo](https://vue-dapp-auth.vercel.app/))
### Chat SDK ### Chat API
**Wallets:** **Wallets:**

View File

@ -75,7 +75,7 @@ Your `.env.local` now contains the following environment variables:
```javascript ```javascript
/* old */ /* old */
signClient.on("session_proposal", async (proposal) => { signClient.on("session_proposal", async (proposal) => {
const { acknowledged } = await B.approve({ const { acknowledged } = await signClient.approve({
id: proposal.id, id: proposal.id,
namespaces, namespaces,
}); });
@ -225,7 +225,7 @@ Your `.env.local` now contains the following environment variables:
const iss = `did:pkh:eip155:1:${address}`; const iss = `did:pkh:eip155:1:${address}`;
web3wallet.on("auth_request", async (event) => { web3wallet.on("auth_request", async (event) => {
// format the payload // format the payload
const message = authClient.formatMessage(event.params.cacaoPayload, iss); const message = web3wallet.formatMessage(event.params.cacaoPayload, iss);
// prompt the user to sign the message // prompt the user to sign the message
const signature = await wallet.signMessage(message); const signature = await wallet.signMessage(message);
// respond // respond