Skip to content

Commit

Permalink
Merge branch 'main' into enable-permission-validator-v2-with-wc-cosigner
Browse files Browse the repository at this point in the history
  • Loading branch information
KannuSingh committed Jul 22, 2024
2 parents fdf50ab + 909c7e1 commit ff26dac
Show file tree
Hide file tree
Showing 24 changed files with 6,242 additions and 56 deletions.
6 changes: 3 additions & 3 deletions advanced/dapps/react-dapp-v2/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,9 @@
"@polkadot/util-crypto": "^10.1.2",
"@solana/web3.js": "^1.36.0",
"@walletconnect/encoding": "^1.0.1",
"@walletconnect/sign-client": "2.13.3",
"@walletconnect/types": "2.13.3",
"@walletconnect/utils": "2.13.3",
"@walletconnect/sign-client": "2.14.0",
"@walletconnect/types": "2.14.0",
"@walletconnect/utils": "2.14.0",
"@web3modal/standalone": "2.4.3",
"axios": "^1.0.0",
"blockies-ts": "^1.0.0",
Expand Down
44 changes: 22 additions & 22 deletions advanced/dapps/react-dapp-v2/yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -3693,10 +3693,10 @@
"@typescript-eslint/types" "5.59.7"
eslint-visitor-keys "^3.3.0"

"@walletconnect/core@2.13.3":
version "2.13.3"
resolved "https://registry.yarnpkg.com/@walletconnect/core/-/core-2.13.3.tgz#d98fccefe36c6b365812fd0f7237a0f9634bafb6"
integrity sha512-TdF+rC6rONJGyOUtt/nLkbyQWjnkwbD3kXq3ZA0Q7+tYtmSjTDE4wbArlLbHIbtf69g+9/DpEVEQimWWcEOn2g==
"@walletconnect/core@2.14.0":
version "2.14.0"
resolved "https://registry.yarnpkg.com/@walletconnect/core/-/core-2.14.0.tgz#e8afb01455968b02aaf26c74f3bfcc9b82678a39"
integrity sha512-E/dgBM9q3judXnTfZQ5ILvDpeSdDpabBLsXtYXa3Nyc26cfNplfLJ2nXm9FgtTdhM1nZ7yx4+zDPiXawBRZl2g==
dependencies:
"@walletconnect/heartbeat" "1.2.2"
"@walletconnect/jsonrpc-provider" "1.0.14"
Expand All @@ -3709,8 +3709,8 @@
"@walletconnect/relay-auth" "1.0.4"
"@walletconnect/safe-json" "1.0.2"
"@walletconnect/time" "1.0.2"
"@walletconnect/types" "2.13.3"
"@walletconnect/utils" "2.13.3"
"@walletconnect/types" "2.14.0"
"@walletconnect/utils" "2.14.0"
events "3.3.0"
isomorphic-unfetch "3.1.0"
lodash.isequal "4.5.0"
Expand Down Expand Up @@ -3911,19 +3911,19 @@
dependencies:
tslib "1.14.1"

"@walletconnect/sign-client@2.13.3":
version "2.13.3"
resolved "https://registry.yarnpkg.com/@walletconnect/sign-client/-/sign-client-2.13.3.tgz#9f8c826000bf3d6ea782f7325bc87e9f260e71ce"
integrity sha512-3Pcq6trHWdBZn5X0VUFQ3zJaaqyEbMW9WNVKcZ2SakIpQAwySd08Mztvq48G98jfucdgP3tjGPbBvzHX9vJX7w==
"@walletconnect/sign-client@2.14.0":
version "2.14.0"
resolved "https://registry.yarnpkg.com/@walletconnect/sign-client/-/sign-client-2.14.0.tgz#36533ef0976a869d815624217527482c90937fc8"
integrity sha512-UrB3S3eLjPYfBLCN3WJ5u7+WcZ8kFMe/QIDqLf76Jk6TaLwkSUy563LvnSw4KW/kA+/cY1KBSdUDfX1tzYJJXg==
dependencies:
"@walletconnect/core" "2.13.3"
"@walletconnect/core" "2.14.0"
"@walletconnect/events" "1.0.1"
"@walletconnect/heartbeat" "1.2.2"
"@walletconnect/jsonrpc-utils" "1.0.8"
"@walletconnect/logger" "2.1.2"
"@walletconnect/time" "1.0.2"
"@walletconnect/types" "2.13.3"
"@walletconnect/utils" "2.13.3"
"@walletconnect/types" "2.14.0"
"@walletconnect/utils" "2.14.0"
events "3.3.0"

"@walletconnect/sign-client@~2.8.1":
Expand All @@ -3948,10 +3948,10 @@
dependencies:
tslib "1.14.1"

"@walletconnect/types@2.13.3":
version "2.13.3"
resolved "https://registry.yarnpkg.com/@walletconnect/types/-/types-2.13.3.tgz#0280b5c64df9a2e07752c4121eeb81dc4a59b2c2"
integrity sha512-9UdtLoQqwGFfepCPprUAXeUbKg9zyDarPRmEJVco51OWXHCOpvRgroWk54fQHDhCUIfDELjObY6XNAzNrmNYUA==
"@walletconnect/types@2.14.0":
version "2.14.0"
resolved "https://registry.yarnpkg.com/@walletconnect/types/-/types-2.14.0.tgz#af3d4799b8ac5d166251af12bc024276f82f9b91"
integrity sha512-vevMi4jZLJ55vLuFOicQFmBBbLyb+S0sZS4IsaBdZkQflfGIq34HkN13c/KPl4Ye0aoR4/cUcUSitmGIzEQM5g==
dependencies:
"@walletconnect/events" "1.0.1"
"@walletconnect/heartbeat" "1.2.2"
Expand All @@ -3972,10 +3972,10 @@
"@walletconnect/logger" "^2.0.1"
events "^3.3.0"

"@walletconnect/utils@2.13.3":
version "2.13.3"
resolved "https://registry.yarnpkg.com/@walletconnect/utils/-/utils-2.13.3.tgz#500d88342c193ce92ab9d2fae3bd343be71821b2"
integrity sha512-hjyyNhnhTCezGNr6OCfKRzqRsiak+p+YP57iRo1Tsf222fsj/9JD++MP97YiDwc4e4xXaZp/boiLB+8hJHsCog==
"@walletconnect/utils@2.14.0":
version "2.14.0"
resolved "https://registry.yarnpkg.com/@walletconnect/utils/-/utils-2.14.0.tgz#48493ffe1e902815fda3cbd5cc5409288a066d35"
integrity sha512-vRVomYQEtEAyCK2c5bzzEvtgxaGGITF8mWuIL+WYSAMyEJLY97mirP2urDucNwcUczwxUgI+no9RiNFbUHreQQ==
dependencies:
"@stablelib/chacha20poly1305" "1.0.1"
"@stablelib/hkdf" "1.0.1"
Expand All @@ -3985,7 +3985,7 @@
"@walletconnect/relay-api" "1.0.10"
"@walletconnect/safe-json" "1.0.2"
"@walletconnect/time" "1.0.2"
"@walletconnect/types" "2.13.3"
"@walletconnect/types" "2.14.0"
"@walletconnect/window-getters" "1.0.1"
"@walletconnect/window-metadata" "1.0.1"
detect-browser "5.3.0"
Expand Down
2 changes: 1 addition & 1 deletion advanced/wallets/react-wallet-v2/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@
"@taquito/signer": "^15.1.0",
"@taquito/taquito": "^15.1.0",
"@types/semver": "^7.5.8",
"@walletconnect/web3wallet": "1.12.3",
"@walletconnect/web3wallet": "1.13.0",
"@zerodev/ecdsa-validator": "5.3.0",
"@zerodev/presets": "5.3.0",
"@zerodev/sdk": "5.3.1",
Expand Down
60 changes: 30 additions & 30 deletions advanced/wallets/react-wallet-v2/yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -2706,10 +2706,10 @@
events "^3.3.0"
isomorphic-unfetch "^3.1.0"

"@walletconnect/core@2.13.3":
version "2.13.3"
resolved "https://registry.yarnpkg.com/@walletconnect/core/-/core-2.13.3.tgz#d98fccefe36c6b365812fd0f7237a0f9634bafb6"
integrity sha512-TdF+rC6rONJGyOUtt/nLkbyQWjnkwbD3kXq3ZA0Q7+tYtmSjTDE4wbArlLbHIbtf69g+9/DpEVEQimWWcEOn2g==
"@walletconnect/core@2.14.0":
version "2.14.0"
resolved "https://registry.yarnpkg.com/@walletconnect/core/-/core-2.14.0.tgz#e8afb01455968b02aaf26c74f3bfcc9b82678a39"
integrity sha512-E/dgBM9q3judXnTfZQ5ILvDpeSdDpabBLsXtYXa3Nyc26cfNplfLJ2nXm9FgtTdhM1nZ7yx4+zDPiXawBRZl2g==
dependencies:
"@walletconnect/heartbeat" "1.2.2"
"@walletconnect/jsonrpc-provider" "1.0.14"
Expand All @@ -2722,8 +2722,8 @@
"@walletconnect/relay-auth" "1.0.4"
"@walletconnect/safe-json" "1.0.2"
"@walletconnect/time" "1.0.2"
"@walletconnect/types" "2.13.3"
"@walletconnect/utils" "2.13.3"
"@walletconnect/types" "2.14.0"
"@walletconnect/utils" "2.14.0"
events "3.3.0"
isomorphic-unfetch "3.1.0"
lodash.isequal "4.5.0"
Expand Down Expand Up @@ -2896,19 +2896,19 @@
dependencies:
tslib "1.14.1"

"@walletconnect/sign-client@2.13.3":
version "2.13.3"
resolved "https://registry.yarnpkg.com/@walletconnect/sign-client/-/sign-client-2.13.3.tgz#9f8c826000bf3d6ea782f7325bc87e9f260e71ce"
integrity sha512-3Pcq6trHWdBZn5X0VUFQ3zJaaqyEbMW9WNVKcZ2SakIpQAwySd08Mztvq48G98jfucdgP3tjGPbBvzHX9vJX7w==
"@walletconnect/sign-client@2.14.0":
version "2.14.0"
resolved "https://registry.yarnpkg.com/@walletconnect/sign-client/-/sign-client-2.14.0.tgz#36533ef0976a869d815624217527482c90937fc8"
integrity sha512-UrB3S3eLjPYfBLCN3WJ5u7+WcZ8kFMe/QIDqLf76Jk6TaLwkSUy563LvnSw4KW/kA+/cY1KBSdUDfX1tzYJJXg==
dependencies:
"@walletconnect/core" "2.13.3"
"@walletconnect/core" "2.14.0"
"@walletconnect/events" "1.0.1"
"@walletconnect/heartbeat" "1.2.2"
"@walletconnect/jsonrpc-utils" "1.0.8"
"@walletconnect/logger" "2.1.2"
"@walletconnect/time" "1.0.2"
"@walletconnect/types" "2.13.3"
"@walletconnect/utils" "2.13.3"
"@walletconnect/types" "2.14.0"
"@walletconnect/utils" "2.14.0"
events "3.3.0"

"@walletconnect/[email protected]", "@walletconnect/time@^1.0.2":
Expand All @@ -2930,10 +2930,10 @@
"@walletconnect/logger" "^2.0.1"
events "^3.3.0"

"@walletconnect/types@2.13.3":
version "2.13.3"
resolved "https://registry.yarnpkg.com/@walletconnect/types/-/types-2.13.3.tgz#0280b5c64df9a2e07752c4121eeb81dc4a59b2c2"
integrity sha512-9UdtLoQqwGFfepCPprUAXeUbKg9zyDarPRmEJVco51OWXHCOpvRgroWk54fQHDhCUIfDELjObY6XNAzNrmNYUA==
"@walletconnect/types@2.14.0":
version "2.14.0"
resolved "https://registry.yarnpkg.com/@walletconnect/types/-/types-2.14.0.tgz#af3d4799b8ac5d166251af12bc024276f82f9b91"
integrity sha512-vevMi4jZLJ55vLuFOicQFmBBbLyb+S0sZS4IsaBdZkQflfGIq34HkN13c/KPl4Ye0aoR4/cUcUSitmGIzEQM5g==
dependencies:
"@walletconnect/events" "1.0.1"
"@walletconnect/heartbeat" "1.2.2"
Expand Down Expand Up @@ -2962,10 +2962,10 @@
query-string "7.1.3"
uint8arrays "^3.1.0"

"@walletconnect/utils@2.13.3":
version "2.13.3"
resolved "https://registry.yarnpkg.com/@walletconnect/utils/-/utils-2.13.3.tgz#500d88342c193ce92ab9d2fae3bd343be71821b2"
integrity sha512-hjyyNhnhTCezGNr6OCfKRzqRsiak+p+YP57iRo1Tsf222fsj/9JD++MP97YiDwc4e4xXaZp/boiLB+8hJHsCog==
"@walletconnect/utils@2.14.0":
version "2.14.0"
resolved "https://registry.yarnpkg.com/@walletconnect/utils/-/utils-2.14.0.tgz#48493ffe1e902815fda3cbd5cc5409288a066d35"
integrity sha512-vRVomYQEtEAyCK2c5bzzEvtgxaGGITF8mWuIL+WYSAMyEJLY97mirP2urDucNwcUczwxUgI+no9RiNFbUHreQQ==
dependencies:
"@stablelib/chacha20poly1305" "1.0.1"
"@stablelib/hkdf" "1.0.1"
Expand All @@ -2975,26 +2975,26 @@
"@walletconnect/relay-api" "1.0.10"
"@walletconnect/safe-json" "1.0.2"
"@walletconnect/time" "1.0.2"
"@walletconnect/types" "2.13.3"
"@walletconnect/types" "2.14.0"
"@walletconnect/window-getters" "1.0.1"
"@walletconnect/window-metadata" "1.0.1"
detect-browser "5.3.0"
query-string "7.1.3"
uint8arrays "3.1.0"

"@walletconnect/web3wallet@1.12.3":
version "1.12.3"
resolved "https://registry.yarnpkg.com/@walletconnect/web3wallet/-/web3wallet-1.12.3.tgz#26765f52cb653bd3696198ce4cc871df2061a01e"
integrity sha512-HBzYDjf3ZVzyTCqycyMjJnn/1sQtRe0beGc3qtq9bLX/dmezkO6Oc1lg1WlvxT7KtTqKx41usw5tjiwfNZ2+ug==
"@walletconnect/web3wallet@1.13.0":
version "1.13.0"
resolved "https://registry.yarnpkg.com/@walletconnect/web3wallet/-/web3wallet-1.13.0.tgz#e3994a13f9aabdffef4ed8d67b03b921339b7154"
integrity sha512-5fAe4rIe7B0Q8NpyEYfyYBjrbtC5H4/VZMSgg9LHxpChXIpjUX01hj7jdTPvE7EOzN1mt2w7hgnpI5jY883gXg==
dependencies:
"@walletconnect/auth-client" "2.1.2"
"@walletconnect/core" "2.13.3"
"@walletconnect/core" "2.14.0"
"@walletconnect/jsonrpc-provider" "1.0.14"
"@walletconnect/jsonrpc-utils" "1.0.8"
"@walletconnect/logger" "2.1.2"
"@walletconnect/sign-client" "2.13.3"
"@walletconnect/types" "2.13.3"
"@walletconnect/utils" "2.13.3"
"@walletconnect/sign-client" "2.14.0"
"@walletconnect/types" "2.14.0"
"@walletconnect/utils" "2.14.0"

"@walletconnect/[email protected]", "@walletconnect/window-getters@^1.0.1":
version "1.0.1"
Expand Down
1 change: 1 addition & 0 deletions dapps/universal-provider-tron/.codesandbox/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
FROM node:21-bullseye
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
31 changes: 31 additions & 0 deletions dapps/universal-provider-tron/.codesandbox/tasks.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
{
// These tasks will run in order when initializing your CodeSandbox project.
"setupTasks": [
{
"name": "Install Dependencies",
"command": "yarn install"
}
],

// These tasks can be run from CodeSandbox. Running one will open a log in the app.
"tasks": {
"dev": {
"name": "dev",
"command": "yarn dev",
"runAtStart": true,
"preview": {
"port": 5173
}
},
"build": {
"name": "build",
"command": "yarn build",
"runAtStart": false
},
"preview": {
"name": "preview",
"command": "yarn preview",
"runAtStart": false
}
}
}
12 changes: 12 additions & 0 deletions dapps/universal-provider-tron/.codesandbox/template.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
{
"title": "React (Vite + TS)",
"description": "React running from the Vite dev server!",
"iconUrl": "https://github.com/codesandbox/sandbox-templates/blob/main/react-vite-ts/.codesandbox/icon.png?raw=true",
"tags": [
"react",
"vite",
"javascript",
"typescript"
],
"published": true
}
1 change: 1 addition & 0 deletions dapps/universal-provider-tron/.env.example
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
VITE_PROJECT_ID=YOUR_PROJECT_ID
36 changes: 36 additions & 0 deletions dapps/universal-provider-tron/.eslintrc.cjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
module.exports = {
"env": {
"browser": true,
"es2021": true
},
"extends": [
"eslint:recommended",
"plugin:@typescript-eslint/recommended",
"plugin:react/recommended"
],
"overrides": [
{
"env": {
"node": true
},
"files": [
".eslintrc.{js,cjs}"
],
"parserOptions": {
"sourceType": "script"
}
}
],
"parser": "@typescript-eslint/parser",
"parserOptions": {
"ecmaVersion": "latest",
"sourceType": "module"
},
"plugins": [
"@typescript-eslint",
"react"
],
"rules": {
"react/react-in-jsx-scope": "off"
}
}
24 changes: 24 additions & 0 deletions dapps/universal-provider-tron/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
# Logs
logs
*.log
npm-debug.log*
yarn-debug.log*
yarn-error.log*
pnpm-debug.log*
lerna-debug.log*

node_modules
dist
dist-ssr
*.local

# Editor directories and files
.vscode/*
!.vscode/extensions.json
.idea
.DS_Store
*.suo
*.ntvs*
*.njsproj
*.sln
*.sw?
18 changes: 18 additions & 0 deletions dapps/universal-provider-tron/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
# TRON + WalletConnect Example

## Usage

1. Go to [WalletConnect Cloud](https://cloud.walletconnect.com) and create a new project.
2. Copy your `Project ID`
3. Rename `.env.example` to `.env` and paste your `Project ID` as the value for `VITE_PROJECT_ID`
4. Run `pnpm install` to install dependencies
5. Run `pnpm dev` to start the development server

click the connect button to connect your wallet and you will be able to Get Balance, Sign a Message and Send a Transaction.

## Resources

- [CodeSandbox — Docs](https://codesandbox.io/docs/learn)
- [CodeSandbox — Discord](https://discord.gg/Ggarp3pX5H)
- [Vite — GitHub](https://github.com/vitejs/vite)
- [Vite — Docs](https://vitejs.dev/guide/)
13 changes: 13 additions & 0 deletions dapps/universal-provider-tron/index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<link rel="icon" type="image/svg+xml" href="/vite.svg" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Vite + React + TS</title>
</head>
<body>
<div id="root"></div>
<script type="module" src="/src/main.tsx"></script>
</body>
</html>
Loading

0 comments on commit ff26dac

Please sign in to comment.