Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
0b7010eccb | ||
|
|
041c01341b | ||
|
|
439a377aa7 | ||
|
|
4f52c29611 | ||
|
|
374671fd9a | ||
|
|
0a9fc269ff | ||
|
|
2e3cc7cdd4 | ||
|
|
3ba15366be | ||
|
|
771bd1e1b2 | ||
|
|
1baa98fba4 | ||
|
|
39e79282ac | ||
|
|
13d5b86ae5 | ||
|
|
8edb3f1b34 | ||
|
|
69c3eb910f | ||
|
|
c8f881c2b9 | ||
|
|
71ac41adae | ||
|
|
ddb2121c67 | ||
|
|
558dc10a63 | ||
|
|
c9f1fd8fc2 | ||
|
|
e75b48cfe9 | ||
|
|
173b3b2ad9 |
@@ -10,10 +10,12 @@ on:
|
|||||||
|
|
||||||
concurrency:
|
concurrency:
|
||||||
group: ${{ github.workflow }}-${{ github.ref }}
|
group: ${{ github.workflow }}-${{ github.ref }}
|
||||||
|
cancel-in-progress: true
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
release-artifacts:
|
release-artifacts:
|
||||||
runs-on: ubuntu-latest
|
timeout-minutes: 15
|
||||||
|
runs-on: ubuntu-latest-16
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout branch
|
- name: Checkout branch
|
||||||
uses: actions/checkout@v3
|
uses: actions/checkout@v3
|
||||||
@@ -51,12 +53,12 @@ jobs:
|
|||||||
git config --local user.email "[email protected]"
|
git config --local user.email "[email protected]"
|
||||||
git config --local user.name "GitHub Action"
|
git config --local user.name "GitHub Action"
|
||||||
git status
|
git status
|
||||||
git add packages/react/typedoc/documentation.json
|
git add packages/react/typedoc/documentation.json.gz
|
||||||
git add packages/react-core/typedoc/documentation.json
|
git add packages/react-core/typedoc/documentation.json.gz
|
||||||
git add packages/react-native/typedoc/documentation.json
|
git add packages/react-native/typedoc/documentation.json.gz
|
||||||
git add packages/sdk/typedoc/documentation.json
|
git add packages/sdk/typedoc/documentation.json.gz
|
||||||
git add packages/storage/typedoc/documentation.json
|
git add packages/storage/typedoc/documentation.json.gz
|
||||||
git add packages/wallets/typedoc/documentation.json
|
git add packages/wallets/typedoc/documentation.json.gz
|
||||||
git add snippets/feature_snippets_react.json
|
git add snippets/feature_snippets_react.json
|
||||||
git add snippets/feature_snippets_sdk.json
|
git add snippets/feature_snippets_sdk.json
|
||||||
git add snippets/snippets.json
|
git add snippets/snippets.json
|
||||||
|
|||||||
@@ -24,10 +24,23 @@ jobs:
|
|||||||
- name: Check for Changes
|
- name: Check for Changes
|
||||||
id: git-check
|
id: git-check
|
||||||
run: |
|
run: |
|
||||||
git diff --exit-code || echo "step.git-check.outputs.changes=true" >> $GITHUB_ENV
|
if git diff --quiet; then
|
||||||
|
echo "CHANGES_FOUND=false" >> $GITHUB_ENV
|
||||||
|
else
|
||||||
|
echo "CHANGES_FOUND=true" >> $GITHUB_ENV
|
||||||
|
fi
|
||||||
|
|
||||||
|
- name: Create or Update sync-chains.md
|
||||||
|
if: env.CHANGES_FOUND == 'true'
|
||||||
|
run: |
|
||||||
|
echo '---' > .changeset/sync-chains.md
|
||||||
|
echo '"@thirdweb-dev/chains": patch' >> .changeset/sync-chains.md
|
||||||
|
echo '---' >> .changeset/sync-chains.md
|
||||||
|
echo '' >> .changeset/sync-chains.md
|
||||||
|
echo 'Synced Chains Package' >> .changeset/sync-chains.md
|
||||||
|
|
||||||
- name: Commit Changes
|
- name: Commit Changes
|
||||||
if: env.step.git-check.outputs.changes == 'true'
|
if: env.CHANGES_FOUND == 'true'
|
||||||
run: |
|
run: |
|
||||||
git config --local user.email "[email protected]"
|
git config --local user.email "[email protected]"
|
||||||
git config --local user.name "GitHub Action"
|
git config --local user.name "GitHub Action"
|
||||||
@@ -35,10 +48,10 @@ jobs:
|
|||||||
git commit -m "chore(chains): sync from db"
|
git commit -m "chore(chains): sync from db"
|
||||||
|
|
||||||
- name: Create or Update Pull Request
|
- name: Create or Update Pull Request
|
||||||
if: env.step.git-check.outputs.changes == 'true'
|
if: env.CHANGES_FOUND == 'true'
|
||||||
uses: peter-evans/create-pull-request@v3
|
uses: peter-evans/create-pull-request@v3
|
||||||
with:
|
with:
|
||||||
title: "chore(chains): update chains"
|
title: "chore(chains): update chains"
|
||||||
branch: "sync-chains" # You can specify a different branch name if you wish
|
branch: "sync-chains"
|
||||||
body: "This PR was automatically created by a GitHub Action. It updates the chains package with the latest changes from the database."
|
body: "This PR was automatically created by a GitHub Action. It updates the chains package with the latest changes from the database."
|
||||||
commit-message: "chore(chains): sync from db"
|
commit-message: "chore(chains): sync from db"
|
||||||
|
|||||||
@@ -1,5 +1,26 @@
|
|||||||
# @thirdweb-dev/auth
|
# @thirdweb-dev/auth
|
||||||
|
|
||||||
|
## 4.1.29
|
||||||
|
|
||||||
|
### Patch Changes
|
||||||
|
|
||||||
|
- Updated dependencies []:
|
||||||
|
- @thirdweb-dev/wallets@2.4.7
|
||||||
|
|
||||||
|
## 4.1.28
|
||||||
|
|
||||||
|
### Patch Changes
|
||||||
|
|
||||||
|
- Updated dependencies [[`3ba15366`](https://github.com/thirdweb-dev/js/commit/3ba15366be8b57e577b871c44e386978dc9d4a8a)]:
|
||||||
|
- @thirdweb-dev/wallets@2.4.6
|
||||||
|
|
||||||
|
## 4.1.27
|
||||||
|
|
||||||
|
### Patch Changes
|
||||||
|
|
||||||
|
- Updated dependencies []:
|
||||||
|
- @thirdweb-dev/wallets@2.4.5
|
||||||
|
|
||||||
## 4.1.26
|
## 4.1.26
|
||||||
|
|
||||||
### Patch Changes
|
### Patch Changes
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "@thirdweb-dev/auth",
|
"name": "@thirdweb-dev/auth",
|
||||||
"version": "4.1.26",
|
"version": "4.1.29",
|
||||||
"main": "dist/thirdweb-dev-auth.cjs.js",
|
"main": "dist/thirdweb-dev-auth.cjs.js",
|
||||||
"module": "dist/thirdweb-dev-auth.esm.js",
|
"module": "dist/thirdweb-dev-auth.esm.js",
|
||||||
"browser": {
|
"browser": {
|
||||||
@@ -97,7 +97,7 @@
|
|||||||
"@types/mocha": "^10.0.0",
|
"@types/mocha": "^10.0.0",
|
||||||
"@types/uuid": "^9.0.5",
|
"@types/uuid": "^9.0.5",
|
||||||
"@typescript-eslint/eslint-plugin": "^6.2.0",
|
"@typescript-eslint/eslint-plugin": "^6.2.0",
|
||||||
"@typescript-eslint/parser": "^6.2.0",
|
"@typescript-eslint/parser": "^6.19.1",
|
||||||
"chai": "^4.3.6",
|
"chai": "^4.3.6",
|
||||||
"cookie-parser": "^1.4.6",
|
"cookie-parser": "^1.4.6",
|
||||||
"eslint": "^8.56.0",
|
"eslint": "^8.56.0",
|
||||||
@@ -109,7 +109,7 @@
|
|||||||
"eslint-plugin-tsdoc": "^0.2.16",
|
"eslint-plugin-tsdoc": "^0.2.16",
|
||||||
"ethers": "^5.7.2",
|
"ethers": "^5.7.2",
|
||||||
"express": "^4.18.1",
|
"express": "^4.18.1",
|
||||||
"fastify": "^4.24.2",
|
"fastify": "^4.25.2",
|
||||||
"mocha": "^10.2.0",
|
"mocha": "^10.2.0",
|
||||||
"next": "^13.4",
|
"next": "^13.4",
|
||||||
"next-auth": "^4.22.3",
|
"next-auth": "^4.22.3",
|
||||||
@@ -120,7 +120,7 @@
|
|||||||
"cookie-parser": "^1.4.6",
|
"cookie-parser": "^1.4.6",
|
||||||
"ethers": "^5",
|
"ethers": "^5",
|
||||||
"express": "^4",
|
"express": "^4",
|
||||||
"fastify": "^4.24.2",
|
"fastify": "^4.25.2",
|
||||||
"next": "^12 || ^13 || ^14",
|
"next": "^12 || ^13 || ^14",
|
||||||
"next-auth": "^4"
|
"next-auth": "^4"
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -1,5 +1,25 @@
|
|||||||
# @thirdweb-dev/chains
|
# @thirdweb-dev/chains
|
||||||
|
|
||||||
|
## 0.1.69
|
||||||
|
|
||||||
|
### Patch Changes
|
||||||
|
|
||||||
|
- [#2247](https://github.com/thirdweb-dev/js/pull/2247) [`374671fd`](https://github.com/thirdweb-dev/js/commit/374671fd9ac97a93263b09c6c0a53cfd129881d7) Thanks [@github-actions](https://github.com/apps/github-actions)! - Synced Chains Package
|
||||||
|
|
||||||
|
## 0.1.68
|
||||||
|
|
||||||
|
### Patch Changes
|
||||||
|
|
||||||
|
- [#2245](https://github.com/thirdweb-dev/js/pull/2245) [`771bd1e1`](https://github.com/thirdweb-dev/js/commit/771bd1e1b280681992195103c22aafa1fb98f7e0) Thanks [@github-actions](https://github.com/apps/github-actions)! - Synced Chains Package
|
||||||
|
|
||||||
|
## 0.1.67
|
||||||
|
|
||||||
|
### Patch Changes
|
||||||
|
|
||||||
|
- [#2243](https://github.com/thirdweb-dev/js/pull/2243) [`39e79282`](https://github.com/thirdweb-dev/js/commit/39e79282acb70959ba8140c779fa521c41c80a5f) Thanks [@github-actions](https://github.com/apps/github-actions)! - Synced Chains Package
|
||||||
|
|
||||||
|
- [#2240](https://github.com/thirdweb-dev/js/pull/2240) [`69c3eb91`](https://github.com/thirdweb-dev/js/commit/69c3eb910feb2265833a07b7472e32fac5a79d90) Thanks [@jnsdls](https://github.com/jnsdls)! - sync chains
|
||||||
|
|
||||||
## 0.1.66
|
## 0.1.66
|
||||||
|
|
||||||
### Patch Changes
|
### Patch Changes
|
||||||
|
|||||||
@@ -31,5 +31,5 @@ export default {
|
|||||||
"shortName": "Baobab",
|
"shortName": "Baobab",
|
||||||
"slip44": 1,
|
"slip44": 1,
|
||||||
"slug": "klaytn-testnet-baobab",
|
"slug": "klaytn-testnet-baobab",
|
||||||
"testnet": true
|
"testnet": false
|
||||||
} as const satisfies Chain;
|
} as const satisfies Chain;
|
||||||
@@ -0,0 +1,31 @@
|
|||||||
|
import type { Chain } from "../src/types";
|
||||||
|
export default {
|
||||||
|
"chain": "Avalanche",
|
||||||
|
"chainId": 103454,
|
||||||
|
"explorers": [],
|
||||||
|
"faucets": [],
|
||||||
|
"features": [],
|
||||||
|
"icon": {
|
||||||
|
"url": "https://images.ctfassets.net/9bazykntljf6/62CceHSYsRS4D9fgDSkLRB/877cb8f26954e1743ff535fd7fdaf78f/avacloud-placeholder.svg",
|
||||||
|
"width": 256,
|
||||||
|
"height": 256,
|
||||||
|
"format": "svg"
|
||||||
|
},
|
||||||
|
"infoURL": "https://avacloud.io",
|
||||||
|
"name": "Masa Testnet",
|
||||||
|
"nativeCurrency": {
|
||||||
|
"name": "Masa Testnet Token",
|
||||||
|
"symbol": "tMASA",
|
||||||
|
"decimals": 18
|
||||||
|
},
|
||||||
|
"networkId": 103454,
|
||||||
|
"redFlags": [],
|
||||||
|
"rpc": [
|
||||||
|
"https://masa-testnet.rpc.thirdweb.com/${THIRDWEB_API_KEY}",
|
||||||
|
"https://103454.rpc.thirdweb.com/${THIRDWEB_API_KEY}",
|
||||||
|
"https://subnets.avax.network/masatestne/testnet/rpc"
|
||||||
|
],
|
||||||
|
"shortName": "Masa Testnet",
|
||||||
|
"slug": "masa-testnet",
|
||||||
|
"testnet": true
|
||||||
|
} as const satisfies Chain;
|
||||||
@@ -42,11 +42,12 @@ export default {
|
|||||||
"https://humans-ai.rpc.thirdweb.com/${THIRDWEB_API_KEY}",
|
"https://humans-ai.rpc.thirdweb.com/${THIRDWEB_API_KEY}",
|
||||||
"https://1089.rpc.thirdweb.com/${THIRDWEB_API_KEY}",
|
"https://1089.rpc.thirdweb.com/${THIRDWEB_API_KEY}",
|
||||||
"https://jsonrpc.humans.nodestake.top",
|
"https://jsonrpc.humans.nodestake.top",
|
||||||
"https://humans-mainnet-evm.itrocket.net:443",
|
"https://humans-mainnet-evm.itrocket.net",
|
||||||
"https://humans-evm-rpc.staketab.org:443",
|
"https://humans-evm-rpc.staketab.org:443",
|
||||||
"https://evm.humans.stakepool.dev.br",
|
"https://evm.humans.stakepool.dev.br",
|
||||||
"https://mainnet-humans-evm.konsortech.xyz",
|
"https://mainnet-humans-evm.konsortech.xyz",
|
||||||
"https://evm-rpc.mainnet.humans.zone"
|
"https://evm-rpc.mainnet.humans.zone",
|
||||||
|
"https://json-rpc.humans.bh.rocks"
|
||||||
],
|
],
|
||||||
"shortName": "humans",
|
"shortName": "humans",
|
||||||
"slug": "humans-ai",
|
"slug": "humans-ai",
|
||||||
|
|||||||
@@ -0,0 +1,24 @@
|
|||||||
|
import type { Chain } from "../src/types";
|
||||||
|
export default {
|
||||||
|
"chain": "Dymension",
|
||||||
|
"chainId": 1100,
|
||||||
|
"explorers": [],
|
||||||
|
"faucets": [],
|
||||||
|
"infoURL": "https://dymension.xyz",
|
||||||
|
"name": "Dymension",
|
||||||
|
"nativeCurrency": {
|
||||||
|
"name": "DYM",
|
||||||
|
"symbol": "DYM",
|
||||||
|
"decimals": 18
|
||||||
|
},
|
||||||
|
"networkId": 1100,
|
||||||
|
"rpc": [
|
||||||
|
"https://dymension.rpc.thirdweb.com/${THIRDWEB_API_KEY}",
|
||||||
|
"https://1100.rpc.thirdweb.com/${THIRDWEB_API_KEY}",
|
||||||
|
"https://dymension-evm.blockpi.network/v1/rpc/public"
|
||||||
|
],
|
||||||
|
"shortName": "dymension",
|
||||||
|
"slug": "dymension",
|
||||||
|
"status": "incubating",
|
||||||
|
"testnet": false
|
||||||
|
} as const satisfies Chain;
|
||||||
@@ -18,6 +18,13 @@ export default {
|
|||||||
"faucets": [
|
"faucets": [
|
||||||
"https://app.optimism.io/faucet"
|
"https://app.optimism.io/faucet"
|
||||||
],
|
],
|
||||||
|
"features": [],
|
||||||
|
"icon": {
|
||||||
|
"url": "ipfs://QmcxZHpyJa8T4i63xqjPYrZ6tKrt55tZJpbXcjSDKuKaf9/optimism/512.png",
|
||||||
|
"width": 512,
|
||||||
|
"height": 512,
|
||||||
|
"format": "png"
|
||||||
|
},
|
||||||
"infoURL": "https://optimism.io",
|
"infoURL": "https://optimism.io",
|
||||||
"name": "OP Sepolia Testnet",
|
"name": "OP Sepolia Testnet",
|
||||||
"nativeCurrency": {
|
"nativeCurrency": {
|
||||||
@@ -26,6 +33,7 @@ export default {
|
|||||||
"decimals": 18
|
"decimals": 18
|
||||||
},
|
},
|
||||||
"networkId": 11155420,
|
"networkId": 11155420,
|
||||||
|
"redFlags": [],
|
||||||
"rpc": [
|
"rpc": [
|
||||||
"https://op-sepolia-testnet.rpc.thirdweb.com/${THIRDWEB_API_KEY}",
|
"https://op-sepolia-testnet.rpc.thirdweb.com/${THIRDWEB_API_KEY}",
|
||||||
"https://11155420.rpc.thirdweb.com/${THIRDWEB_API_KEY}",
|
"https://11155420.rpc.thirdweb.com/${THIRDWEB_API_KEY}",
|
||||||
|
|||||||
@@ -0,0 +1,35 @@
|
|||||||
|
import type { Chain } from "../src/types";
|
||||||
|
export default {
|
||||||
|
"chain": "BEVM",
|
||||||
|
"chainId": 11503,
|
||||||
|
"explorers": [
|
||||||
|
{
|
||||||
|
"name": "bevm testnet scan",
|
||||||
|
"url": "https://scan-testnet.bevm.io",
|
||||||
|
"standard": "none"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"faucets": [],
|
||||||
|
"icon": {
|
||||||
|
"url": "ipfs://QmfMXiYn4xF9JwdjaqM5YKhqoByox51XvnL68VvKJS6yyu",
|
||||||
|
"width": 1000,
|
||||||
|
"height": 1000,
|
||||||
|
"format": "png"
|
||||||
|
},
|
||||||
|
"infoURL": "https://bevm.io",
|
||||||
|
"name": "BEVM Testnet",
|
||||||
|
"nativeCurrency": {
|
||||||
|
"name": "BTC",
|
||||||
|
"symbol": "BTC",
|
||||||
|
"decimals": 18
|
||||||
|
},
|
||||||
|
"networkId": 11503,
|
||||||
|
"rpc": [
|
||||||
|
"https://bevm-testnet.rpc.thirdweb.com/${THIRDWEB_API_KEY}",
|
||||||
|
"https://11503.rpc.thirdweb.com/${THIRDWEB_API_KEY}",
|
||||||
|
"https://testnet.bevm.io/"
|
||||||
|
],
|
||||||
|
"shortName": "bevm",
|
||||||
|
"slug": "bevm-testnet",
|
||||||
|
"testnet": true
|
||||||
|
} as const satisfies Chain;
|
||||||
@@ -0,0 +1,37 @@
|
|||||||
|
import type { Chain } from "../src/types";
|
||||||
|
export default {
|
||||||
|
"chain": "MetaDAP",
|
||||||
|
"chainId": 119139,
|
||||||
|
"explorers": [
|
||||||
|
{
|
||||||
|
"name": "MetaDAP Enterprise Testnet explorer",
|
||||||
|
"url": "https://explorer.testnet.chain.metadap.io",
|
||||||
|
"standard": "none"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"faucets": [],
|
||||||
|
"icon": {
|
||||||
|
"url": "ipfs://QmcCFUTStKKJKfzTwrjfMFoVaPCMsvAvWXRdDkYMvCkEs3",
|
||||||
|
"width": 800,
|
||||||
|
"height": 800,
|
||||||
|
"format": "svg"
|
||||||
|
},
|
||||||
|
"infoURL": "https://metadap.io/",
|
||||||
|
"name": "MetaDAP Enterprise Testnet",
|
||||||
|
"nativeCurrency": {
|
||||||
|
"name": "DAP",
|
||||||
|
"symbol": "DAP",
|
||||||
|
"decimals": 18
|
||||||
|
},
|
||||||
|
"networkId": 119139,
|
||||||
|
"rpc": [
|
||||||
|
"https://metadap-enterprise-testnet.rpc.thirdweb.com/${THIRDWEB_API_KEY}",
|
||||||
|
"https://119139.rpc.thirdweb.com/${THIRDWEB_API_KEY}",
|
||||||
|
"https://rpc.testnet.chain.metadap.io",
|
||||||
|
"wss://rpc-ws.testnet.chain.metadap.io"
|
||||||
|
],
|
||||||
|
"shortName": "MetaDAP-T",
|
||||||
|
"slug": "metadap-enterprise-testnet",
|
||||||
|
"testnet": true,
|
||||||
|
"title": "MetaDAP Enterprise Testnet"
|
||||||
|
} as const satisfies Chain;
|
||||||
@@ -2,13 +2,7 @@ import type { Chain } from "../src/types";
|
|||||||
export default {
|
export default {
|
||||||
"chain": "1220",
|
"chain": "1220",
|
||||||
"chainId": 1220,
|
"chainId": 1220,
|
||||||
"explorers": [
|
"explorers": [],
|
||||||
{
|
|
||||||
"name": "flagscan",
|
|
||||||
"url": "https://testnet-scan.flagscan.io/",
|
|
||||||
"standard": "EIP3091"
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"faucets": [],
|
"faucets": [],
|
||||||
"features": [],
|
"features": [],
|
||||||
"icon": {
|
"icon": {
|
||||||
@@ -26,7 +20,11 @@ export default {
|
|||||||
},
|
},
|
||||||
"networkId": 1220,
|
"networkId": 1220,
|
||||||
"redFlags": [],
|
"redFlags": [],
|
||||||
"rpc": [],
|
"rpc": [
|
||||||
|
"https://flag-testnet.rpc.thirdweb.com/${THIRDWEB_API_KEY}",
|
||||||
|
"https://1220.rpc.thirdweb.com/${THIRDWEB_API_KEY}",
|
||||||
|
"https://testnet.flagscan.io"
|
||||||
|
],
|
||||||
"shortName": "Flag",
|
"shortName": "Flag",
|
||||||
"slug": "flag-testnet",
|
"slug": "flag-testnet",
|
||||||
"testnet": true
|
"testnet": true
|
||||||
|
|||||||
@@ -0,0 +1,35 @@
|
|||||||
|
import type { Chain } from "../src/types";
|
||||||
|
export default {
|
||||||
|
"chain": "NEAR",
|
||||||
|
"chainId": 1313161560,
|
||||||
|
"explorers": [
|
||||||
|
{
|
||||||
|
"name": "PowerGold explorer",
|
||||||
|
"url": "https://explorer.powergold.aurora.dev",
|
||||||
|
"standard": "EIP3091"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"faucets": [],
|
||||||
|
"icon": {
|
||||||
|
"url": "ipfs://bafkreib2sabb6vgfoskobp2wdr6if7v6s34f2xwjecfceui6qhjudmu4u4",
|
||||||
|
"width": 512,
|
||||||
|
"height": 512,
|
||||||
|
"format": "png"
|
||||||
|
},
|
||||||
|
"infoURL": "https://www.powergold.tech",
|
||||||
|
"name": "PowerGold",
|
||||||
|
"nativeCurrency": {
|
||||||
|
"name": "Ether",
|
||||||
|
"symbol": "ETH",
|
||||||
|
"decimals": 18
|
||||||
|
},
|
||||||
|
"networkId": 1313161560,
|
||||||
|
"rpc": [
|
||||||
|
"https://powergold.rpc.thirdweb.com/${THIRDWEB_API_KEY}",
|
||||||
|
"https://1313161560.rpc.thirdweb.com/${THIRDWEB_API_KEY}",
|
||||||
|
"https://powergold.aurora.dev"
|
||||||
|
],
|
||||||
|
"shortName": "powergold",
|
||||||
|
"slug": "powergold",
|
||||||
|
"testnet": false
|
||||||
|
} as const satisfies Chain;
|
||||||
@@ -0,0 +1,31 @@
|
|||||||
|
import type { Chain } from "../src/types";
|
||||||
|
export default {
|
||||||
|
"chain": "Avalanche",
|
||||||
|
"chainId": 13838,
|
||||||
|
"explorers": [],
|
||||||
|
"faucets": [],
|
||||||
|
"features": [],
|
||||||
|
"icon": {
|
||||||
|
"url": "https://images.ctfassets.net/9bazykntljf6/62CceHSYsRS4D9fgDSkLRB/877cb8f26954e1743ff535fd7fdaf78f/avacloud-placeholder.svg",
|
||||||
|
"width": 256,
|
||||||
|
"height": 256,
|
||||||
|
"format": "svg"
|
||||||
|
},
|
||||||
|
"infoURL": "https://avacloud.io",
|
||||||
|
"name": "XTraderlands Subnet Tesnet",
|
||||||
|
"nativeCurrency": {
|
||||||
|
"name": "XTraderlands Subnet Tesnet Token",
|
||||||
|
"symbol": "XTDL",
|
||||||
|
"decimals": 18
|
||||||
|
},
|
||||||
|
"networkId": 13838,
|
||||||
|
"redFlags": [],
|
||||||
|
"rpc": [
|
||||||
|
"https://xtraderlands-subnet-tesnet.rpc.thirdweb.com/${THIRDWEB_API_KEY}",
|
||||||
|
"https://13838.rpc.thirdweb.com/${THIRDWEB_API_KEY}",
|
||||||
|
"https://subnets.avax.network/xtraderlan/testnet/rpc"
|
||||||
|
],
|
||||||
|
"shortName": "XTraderlands Subnet Tesnet",
|
||||||
|
"slug": "xtraderlands-subnet-tesnet",
|
||||||
|
"testnet": true
|
||||||
|
} as const satisfies Chain;
|
||||||
@@ -0,0 +1,37 @@
|
|||||||
|
import type { Chain } from "../src/types";
|
||||||
|
export default {
|
||||||
|
"chain": "Puppynet Shibarium",
|
||||||
|
"chainId": 157,
|
||||||
|
"explorers": [
|
||||||
|
{
|
||||||
|
"name": "puppyscan",
|
||||||
|
"url": "https://puppyscan.shib.io",
|
||||||
|
"standard": "none"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"faucets": [
|
||||||
|
"https://beta.shibariumtech.com/faucet"
|
||||||
|
],
|
||||||
|
"icon": {
|
||||||
|
"url": "ipfs://QmYNVkoZgRjDBQzJz6kog9mA2yPzQFW2oSKvhnkwuBhLQE",
|
||||||
|
"width": 2000,
|
||||||
|
"height": 2000,
|
||||||
|
"format": "png"
|
||||||
|
},
|
||||||
|
"infoURL": "https://shibariumecosystem.com",
|
||||||
|
"name": "Puppynet Shibarium",
|
||||||
|
"nativeCurrency": {
|
||||||
|
"name": "BONE",
|
||||||
|
"symbol": "BONE",
|
||||||
|
"decimals": 18
|
||||||
|
},
|
||||||
|
"networkId": 157,
|
||||||
|
"rpc": [
|
||||||
|
"https://puppynet-shibarium.rpc.thirdweb.com/${THIRDWEB_API_KEY}",
|
||||||
|
"https://157.rpc.thirdweb.com/${THIRDWEB_API_KEY}",
|
||||||
|
"https://puppynet.shibrpc.com"
|
||||||
|
],
|
||||||
|
"shortName": "puppynet",
|
||||||
|
"slug": "puppynet-shibarium",
|
||||||
|
"testnet": false
|
||||||
|
} as const satisfies Chain;
|
||||||
@@ -10,6 +10,7 @@ export default {
|
|||||||
}
|
}
|
||||||
],
|
],
|
||||||
"faucets": [],
|
"faucets": [],
|
||||||
|
"features": [],
|
||||||
"icon": {
|
"icon": {
|
||||||
"url": "ipfs://QmcHdmVr5VRUJq13jnM6tgah5Ge7hn3Dm14eY6vwivJ5ui",
|
"url": "ipfs://QmcHdmVr5VRUJq13jnM6tgah5Ge7hn3Dm14eY6vwivJ5ui",
|
||||||
"width": 288,
|
"width": 288,
|
||||||
@@ -24,6 +25,7 @@ export default {
|
|||||||
"decimals": 18
|
"decimals": 18
|
||||||
},
|
},
|
||||||
"networkId": 167008,
|
"networkId": 167008,
|
||||||
|
"redFlags": [],
|
||||||
"rpc": [
|
"rpc": [
|
||||||
"https://taiko-katla-l2.rpc.thirdweb.com/${THIRDWEB_API_KEY}",
|
"https://taiko-katla-l2.rpc.thirdweb.com/${THIRDWEB_API_KEY}",
|
||||||
"https://167008.rpc.thirdweb.com/${THIRDWEB_API_KEY}",
|
"https://167008.rpc.thirdweb.com/${THIRDWEB_API_KEY}",
|
||||||
@@ -32,5 +34,5 @@ export default {
|
|||||||
"shortName": "tko-katla",
|
"shortName": "tko-katla",
|
||||||
"slug": "taiko-katla-l2",
|
"slug": "taiko-katla-l2",
|
||||||
"status": "active",
|
"status": "active",
|
||||||
"testnet": false
|
"testnet": true
|
||||||
} as const satisfies Chain;
|
} as const satisfies Chain;
|
||||||
@@ -0,0 +1,50 @@
|
|||||||
|
import type { Chain } from "../src/types";
|
||||||
|
export default {
|
||||||
|
"chain": "ETH",
|
||||||
|
"chainId": 1686,
|
||||||
|
"explorers": [
|
||||||
|
{
|
||||||
|
"name": "blockscout",
|
||||||
|
"url": "https://testnet-explorer.mintchain.io",
|
||||||
|
"standard": "EIP3091",
|
||||||
|
"icon": {
|
||||||
|
"url": "ipfs://QmQsYisbKkCTKoKG2YSVs94UGuWWMiBspirH4Af4FyZeZz",
|
||||||
|
"width": 80,
|
||||||
|
"height": 80,
|
||||||
|
"format": "png"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"faucets": [],
|
||||||
|
"icon": {
|
||||||
|
"url": "ipfs://QmQsYisbKkCTKoKG2YSVs94UGuWWMiBspirH4Af4FyZeZz",
|
||||||
|
"width": 80,
|
||||||
|
"height": 80,
|
||||||
|
"format": "png"
|
||||||
|
},
|
||||||
|
"infoURL": "https://www.mintchain.io",
|
||||||
|
"name": "Mint Testnet",
|
||||||
|
"nativeCurrency": {
|
||||||
|
"name": "Sepolia Ether",
|
||||||
|
"symbol": "ETH",
|
||||||
|
"decimals": 18
|
||||||
|
},
|
||||||
|
"networkId": 1686,
|
||||||
|
"parent": {
|
||||||
|
"type": "L2",
|
||||||
|
"chain": "eip155-1",
|
||||||
|
"bridges": [
|
||||||
|
{
|
||||||
|
"url": "https://testnet-bridge.mintchain.io"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"rpc": [
|
||||||
|
"https://mint-testnet.rpc.thirdweb.com/${THIRDWEB_API_KEY}",
|
||||||
|
"https://1686.rpc.thirdweb.com/${THIRDWEB_API_KEY}",
|
||||||
|
"https://testnet-rpc.mintchain.io"
|
||||||
|
],
|
||||||
|
"shortName": "minttest",
|
||||||
|
"slug": "mint-testnet",
|
||||||
|
"testnet": true
|
||||||
|
} as const satisfies Chain;
|
||||||
@@ -0,0 +1,31 @@
|
|||||||
|
import type { Chain } from "../src/types";
|
||||||
|
export default {
|
||||||
|
"chain": "Avalanche",
|
||||||
|
"chainId": 17511,
|
||||||
|
"explorers": [],
|
||||||
|
"faucets": [],
|
||||||
|
"features": [],
|
||||||
|
"icon": {
|
||||||
|
"url": "https://images.ctfassets.net/9bazykntljf6/62CceHSYsRS4D9fgDSkLRB/877cb8f26954e1743ff535fd7fdaf78f/avacloud-placeholder.svg",
|
||||||
|
"width": 256,
|
||||||
|
"height": 256,
|
||||||
|
"format": "svg"
|
||||||
|
},
|
||||||
|
"infoURL": "https://avacloud.io",
|
||||||
|
"name": "PST 1-17-24",
|
||||||
|
"nativeCurrency": {
|
||||||
|
"name": "PST 1-17-24 Token",
|
||||||
|
"symbol": "MUB",
|
||||||
|
"decimals": 18
|
||||||
|
},
|
||||||
|
"networkId": 17511,
|
||||||
|
"redFlags": [],
|
||||||
|
"rpc": [
|
||||||
|
"https://pst-1-17-24.rpc.thirdweb.com/${THIRDWEB_API_KEY}",
|
||||||
|
"https://17511.rpc.thirdweb.com/${THIRDWEB_API_KEY}",
|
||||||
|
"https://subnets.avax.network/defi-kingdoms/dfk-chain/rpc"
|
||||||
|
],
|
||||||
|
"shortName": "PST 1-17-24",
|
||||||
|
"slug": "pst-1-17-24",
|
||||||
|
"testnet": true
|
||||||
|
} as const satisfies Chain;
|
||||||
@@ -0,0 +1,31 @@
|
|||||||
|
import type { Chain } from "../src/types";
|
||||||
|
export default {
|
||||||
|
"chain": "Avalanche",
|
||||||
|
"chainId": 20139,
|
||||||
|
"explorers": [],
|
||||||
|
"faucets": [],
|
||||||
|
"features": [],
|
||||||
|
"icon": {
|
||||||
|
"url": "https://images.ctfassets.net/9bazykntljf6/62CceHSYsRS4D9fgDSkLRB/877cb8f26954e1743ff535fd7fdaf78f/avacloud-placeholder.svg",
|
||||||
|
"width": 256,
|
||||||
|
"height": 256,
|
||||||
|
"format": "svg"
|
||||||
|
},
|
||||||
|
"infoURL": "https://avacloud.io",
|
||||||
|
"name": "QR0129I1",
|
||||||
|
"nativeCurrency": {
|
||||||
|
"name": "QR0129I1 Token",
|
||||||
|
"symbol": "YOD",
|
||||||
|
"decimals": 18
|
||||||
|
},
|
||||||
|
"networkId": 20139,
|
||||||
|
"redFlags": [],
|
||||||
|
"rpc": [
|
||||||
|
"https://qr0129i1.rpc.thirdweb.com/${THIRDWEB_API_KEY}",
|
||||||
|
"https://20139.rpc.thirdweb.com/${THIRDWEB_API_KEY}",
|
||||||
|
"https://subnets.avax.network/qr0129i1/testnet/rpc"
|
||||||
|
],
|
||||||
|
"shortName": "QR0129I1",
|
||||||
|
"slug": "qr0129i1",
|
||||||
|
"testnet": true
|
||||||
|
} as const satisfies Chain;
|
||||||
@@ -1,32 +1,32 @@
|
|||||||
import type { Chain } from "../src/types";
|
import type { Chain } from "../src/types";
|
||||||
export default {
|
export default {
|
||||||
"chain": "MAP",
|
"chain": "MAPO",
|
||||||
"chainId": 212,
|
"chainId": 212,
|
||||||
"explorers": [
|
"explorers": [
|
||||||
{
|
{
|
||||||
"name": "mapscan",
|
"name": "maposcan",
|
||||||
"url": "https://testnet.mapscan.io",
|
"url": "https://testnet.maposcan.io",
|
||||||
"standard": "EIP3091"
|
"standard": "EIP3091"
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"faucets": [
|
"faucets": [
|
||||||
"https://faucet.maplabs.io"
|
"https://faucet.mapprotocol.io"
|
||||||
],
|
],
|
||||||
"infoURL": "https://maplabs.io",
|
"infoURL": "https://mapprotocol.io/",
|
||||||
"name": "MAP Makalu",
|
"name": "MAPO Makalu",
|
||||||
"nativeCurrency": {
|
"nativeCurrency": {
|
||||||
"name": "Makalu MAP",
|
"name": "Makalu MAPO",
|
||||||
"symbol": "MAP",
|
"symbol": "MAPO",
|
||||||
"decimals": 18
|
"decimals": 18
|
||||||
},
|
},
|
||||||
"networkId": 212,
|
"networkId": 212,
|
||||||
"rpc": [
|
"rpc": [
|
||||||
"https://map-makalu.rpc.thirdweb.com/${THIRDWEB_API_KEY}",
|
"https://mapo-makalu.rpc.thirdweb.com/${THIRDWEB_API_KEY}",
|
||||||
"https://212.rpc.thirdweb.com/${THIRDWEB_API_KEY}",
|
"https://212.rpc.thirdweb.com/${THIRDWEB_API_KEY}",
|
||||||
"https://testnet-rpc.maplabs.io"
|
"https://testnet-rpc.maplabs.io"
|
||||||
],
|
],
|
||||||
"shortName": "makalu",
|
"shortName": "makalu",
|
||||||
"slug": "map-makalu",
|
"slug": "mapo-makalu",
|
||||||
"testnet": true,
|
"testnet": true,
|
||||||
"title": "MAP Testnet Makalu"
|
"title": "MAPO Testnet Makalu"
|
||||||
} as const satisfies Chain;
|
} as const satisfies Chain;
|
||||||
@@ -1,11 +1,11 @@
|
|||||||
import type { Chain } from "../src/types";
|
import type { Chain } from "../src/types";
|
||||||
export default {
|
export default {
|
||||||
"chain": "MAP",
|
"chain": "MAPO",
|
||||||
"chainId": 22776,
|
"chainId": 22776,
|
||||||
"explorers": [
|
"explorers": [
|
||||||
{
|
{
|
||||||
"name": "mapscan",
|
"name": "maposcan",
|
||||||
"url": "https://mapscan.io",
|
"url": "https://maposcan.io",
|
||||||
"standard": "EIP3091"
|
"standard": "EIP3091"
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
@@ -16,8 +16,8 @@ export default {
|
|||||||
"height": 512,
|
"height": 512,
|
||||||
"format": "png"
|
"format": "png"
|
||||||
},
|
},
|
||||||
"infoURL": "https://maplabs.io",
|
"infoURL": "https://mapprotocol.io/",
|
||||||
"name": "MAP Mainnet",
|
"name": "MAP Protocol",
|
||||||
"nativeCurrency": {
|
"nativeCurrency": {
|
||||||
"name": "MAPO",
|
"name": "MAPO",
|
||||||
"symbol": "MAPO",
|
"symbol": "MAPO",
|
||||||
@@ -25,12 +25,12 @@ export default {
|
|||||||
},
|
},
|
||||||
"networkId": 22776,
|
"networkId": 22776,
|
||||||
"rpc": [
|
"rpc": [
|
||||||
"https://map.rpc.thirdweb.com/${THIRDWEB_API_KEY}",
|
"https://map-protocol.rpc.thirdweb.com/${THIRDWEB_API_KEY}",
|
||||||
"https://22776.rpc.thirdweb.com/${THIRDWEB_API_KEY}",
|
"https://22776.rpc.thirdweb.com/${THIRDWEB_API_KEY}",
|
||||||
"https://rpc.maplabs.io"
|
"https://rpc.maplabs.io"
|
||||||
],
|
],
|
||||||
"shortName": "map",
|
"shortName": "mapo",
|
||||||
"slip44": 60,
|
"slip44": 60,
|
||||||
"slug": "map",
|
"slug": "map-protocol",
|
||||||
"testnet": false
|
"testnet": false
|
||||||
} as const satisfies Chain;
|
} as const satisfies Chain;
|
||||||
@@ -0,0 +1,30 @@
|
|||||||
|
import type { Chain } from "../src/types";
|
||||||
|
export default {
|
||||||
|
"chain": "BPX",
|
||||||
|
"chainId": 279,
|
||||||
|
"explorers": [],
|
||||||
|
"faucets": [],
|
||||||
|
"icon": {
|
||||||
|
"url": "ipfs://bafkreiatcu42wbjlo24mr35jou4awvsqpaqys6iv4kxgkjhno3haovsiaq",
|
||||||
|
"width": 140,
|
||||||
|
"height": 140,
|
||||||
|
"format": "svg"
|
||||||
|
},
|
||||||
|
"infoURL": "https://bpxchain.cc",
|
||||||
|
"name": "BPX Blockchain",
|
||||||
|
"nativeCurrency": {
|
||||||
|
"name": "BPX",
|
||||||
|
"symbol": "BPX",
|
||||||
|
"decimals": 18
|
||||||
|
},
|
||||||
|
"networkId": 279,
|
||||||
|
"rpc": [
|
||||||
|
"https://bpx-blockchain.rpc.thirdweb.com/${THIRDWEB_API_KEY}",
|
||||||
|
"https://279.rpc.thirdweb.com/${THIRDWEB_API_KEY}",
|
||||||
|
"https://rpc.mainnet.bpxchain.cc",
|
||||||
|
"https://bpx-dataseed.infinex.cc"
|
||||||
|
],
|
||||||
|
"shortName": "bpx",
|
||||||
|
"slug": "bpx-blockchain",
|
||||||
|
"testnet": false
|
||||||
|
} as const satisfies Chain;
|
||||||
@@ -0,0 +1,39 @@
|
|||||||
|
import type { Chain } from "../src/types";
|
||||||
|
export default {
|
||||||
|
"chain": "XEN",
|
||||||
|
"chainId": 2941,
|
||||||
|
"explorers": [
|
||||||
|
{
|
||||||
|
"name": "Xenon testnet Explorer",
|
||||||
|
"url": "https://testnet.xenonchain.com",
|
||||||
|
"standard": "none"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"faucets": [
|
||||||
|
"https://xfaucet.xenonchain.com"
|
||||||
|
],
|
||||||
|
"icon": {
|
||||||
|
"url": "ipfs://QmNSoxDnj6MV8mPJWiuzzLbATcbk5op11NTwMTdzcr272F",
|
||||||
|
"width": 500,
|
||||||
|
"height": 500,
|
||||||
|
"format": "png"
|
||||||
|
},
|
||||||
|
"infoURL": "https://xenonchain.com",
|
||||||
|
"name": "Xenon Chain Testnet",
|
||||||
|
"nativeCurrency": {
|
||||||
|
"name": "Xenon Testnet",
|
||||||
|
"symbol": "tXEN",
|
||||||
|
"decimals": 18
|
||||||
|
},
|
||||||
|
"networkId": 2941,
|
||||||
|
"rpc": [
|
||||||
|
"https://xenon-chain-testnet.rpc.thirdweb.com/${THIRDWEB_API_KEY}",
|
||||||
|
"https://2941.rpc.thirdweb.com/${THIRDWEB_API_KEY}",
|
||||||
|
"https://testnet-chain.xenonchain.com/",
|
||||||
|
"https://testnet-dev.xenonchain.com/"
|
||||||
|
],
|
||||||
|
"shortName": "xenon",
|
||||||
|
"slip44": 1,
|
||||||
|
"slug": "xenon-chain-testnet",
|
||||||
|
"testnet": true
|
||||||
|
} as const satisfies Chain;
|
||||||
@@ -0,0 +1,37 @@
|
|||||||
|
import type { Chain } from "../src/types";
|
||||||
|
export default {
|
||||||
|
"chain": "Lovely",
|
||||||
|
"chainId": 307,
|
||||||
|
"explorers": [
|
||||||
|
{
|
||||||
|
"name": "Lovely Network Testnet",
|
||||||
|
"url": "https://tscan.lovely.network",
|
||||||
|
"standard": "EIP3091"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"faucets": [
|
||||||
|
"https://faucet.lovely.network"
|
||||||
|
],
|
||||||
|
"icon": {
|
||||||
|
"url": "ipfs://QmPB7uW7Wj8zWWdeuPnUHPJ5FhaiTL76tv4ZQ4oKWEpb1g",
|
||||||
|
"width": 897,
|
||||||
|
"height": 824,
|
||||||
|
"format": "png"
|
||||||
|
},
|
||||||
|
"infoURL": "https://lovely.network",
|
||||||
|
"name": "Lovely Network Testnet",
|
||||||
|
"nativeCurrency": {
|
||||||
|
"name": "Lovely",
|
||||||
|
"symbol": "LOVELY",
|
||||||
|
"decimals": 18
|
||||||
|
},
|
||||||
|
"networkId": 307,
|
||||||
|
"rpc": [
|
||||||
|
"https://lovely-network-testnet.rpc.thirdweb.com/${THIRDWEB_API_KEY}",
|
||||||
|
"https://307.rpc.thirdweb.com/${THIRDWEB_API_KEY}",
|
||||||
|
"https://trpc.lovely.network"
|
||||||
|
],
|
||||||
|
"shortName": "LOVELY-Testnet",
|
||||||
|
"slug": "lovely-network-testnet",
|
||||||
|
"testnet": true
|
||||||
|
} as const satisfies Chain;
|
||||||
@@ -0,0 +1,37 @@
|
|||||||
|
import type { Chain } from "../src/types";
|
||||||
|
export default {
|
||||||
|
"chain": "Bloom",
|
||||||
|
"chainId": 323213,
|
||||||
|
"explorers": [
|
||||||
|
{
|
||||||
|
"name": "Bloom Genesis Testnet",
|
||||||
|
"url": "https://testnet.bloomgenesis.com",
|
||||||
|
"standard": "EIP3091"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"faucets": [
|
||||||
|
"https://faucet.bloomgenesis.com"
|
||||||
|
],
|
||||||
|
"icon": {
|
||||||
|
"url": "ipfs://Qmetu9hMLvczYo7tDPRyjqjBHwwpHU8mEgW3PEPPre56su",
|
||||||
|
"width": 2794,
|
||||||
|
"height": 2711,
|
||||||
|
"format": "png"
|
||||||
|
},
|
||||||
|
"infoURL": "https://www.bloomgenesis.com",
|
||||||
|
"name": "Bloom Genesis Testnet",
|
||||||
|
"nativeCurrency": {
|
||||||
|
"name": "Bloom",
|
||||||
|
"symbol": "BGBC",
|
||||||
|
"decimals": 18
|
||||||
|
},
|
||||||
|
"networkId": 323213,
|
||||||
|
"rpc": [
|
||||||
|
"https://bloom-genesis-testnet.rpc.thirdweb.com/${THIRDWEB_API_KEY}",
|
||||||
|
"https://323213.rpc.thirdweb.com/${THIRDWEB_API_KEY}",
|
||||||
|
"https://testnet-rpc.bloomgenesis.com"
|
||||||
|
],
|
||||||
|
"shortName": "BGBC-Testnet",
|
||||||
|
"slug": "bloom-genesis-testnet",
|
||||||
|
"testnet": true
|
||||||
|
} as const satisfies Chain;
|
||||||
@@ -0,0 +1,35 @@
|
|||||||
|
import type { Chain } from "../src/types";
|
||||||
|
export default {
|
||||||
|
"chain": "Bloom",
|
||||||
|
"chainId": 333313,
|
||||||
|
"explorers": [
|
||||||
|
{
|
||||||
|
"name": "Bloom Genesis Mainnet",
|
||||||
|
"url": "https://explorer.bloomgenesis.com",
|
||||||
|
"standard": "EIP3091"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"faucets": [],
|
||||||
|
"icon": {
|
||||||
|
"url": "ipfs://Qmetu9hMLvczYo7tDPRyjqjBHwwpHU8mEgW3PEPPre56su",
|
||||||
|
"width": 2794,
|
||||||
|
"height": 2711,
|
||||||
|
"format": "png"
|
||||||
|
},
|
||||||
|
"infoURL": "https://www.bloomgenesis.com",
|
||||||
|
"name": "Bloom Genesis Mainnet",
|
||||||
|
"nativeCurrency": {
|
||||||
|
"name": "Bloom",
|
||||||
|
"symbol": "BGBC",
|
||||||
|
"decimals": 18
|
||||||
|
},
|
||||||
|
"networkId": 333313,
|
||||||
|
"rpc": [
|
||||||
|
"https://bloom-genesis.rpc.thirdweb.com/${THIRDWEB_API_KEY}",
|
||||||
|
"https://333313.rpc.thirdweb.com/${THIRDWEB_API_KEY}",
|
||||||
|
"https://mainnet-rpc.bloomgenesis.com"
|
||||||
|
],
|
||||||
|
"shortName": "BGBC",
|
||||||
|
"slug": "bloom-genesis",
|
||||||
|
"testnet": false
|
||||||
|
} as const satisfies Chain;
|
||||||
@@ -0,0 +1,36 @@
|
|||||||
|
import type { Chain } from "../src/types";
|
||||||
|
export default {
|
||||||
|
"chain": "ETH",
|
||||||
|
"chainId": 4202,
|
||||||
|
"explorers": [
|
||||||
|
{
|
||||||
|
"name": "liskscout",
|
||||||
|
"url": "https://sepolia-blockscout.lisk.com",
|
||||||
|
"standard": "EIP3091",
|
||||||
|
"icon": {
|
||||||
|
"url": "ipfs://QmYtUimyqHkkFxYdbXXRbUqNg2VLPUg6Uu2C2nmFWowiZM",
|
||||||
|
"width": 551,
|
||||||
|
"height": 540,
|
||||||
|
"format": "png"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"faucets": [],
|
||||||
|
"infoURL": "https://lisk.com",
|
||||||
|
"name": "Lisk Sepolia Testnet",
|
||||||
|
"nativeCurrency": {
|
||||||
|
"name": "Sepolia Ether",
|
||||||
|
"symbol": "ETH",
|
||||||
|
"decimals": 18
|
||||||
|
},
|
||||||
|
"networkId": 4202,
|
||||||
|
"rpc": [
|
||||||
|
"https://lisk-sepolia-testnet.rpc.thirdweb.com/${THIRDWEB_API_KEY}",
|
||||||
|
"https://4202.rpc.thirdweb.com/${THIRDWEB_API_KEY}",
|
||||||
|
"https://rpc.sepolia-api.lisk.com"
|
||||||
|
],
|
||||||
|
"shortName": "lisksep",
|
||||||
|
"slip44": 134,
|
||||||
|
"slug": "lisk-sepolia-testnet",
|
||||||
|
"testnet": true
|
||||||
|
} as const satisfies Chain;
|
||||||
@@ -0,0 +1,40 @@
|
|||||||
|
import type { Chain } from "../src/types";
|
||||||
|
export default {
|
||||||
|
"chain": "SYNDRSEPOLIA",
|
||||||
|
"chainId": 444444,
|
||||||
|
"explorers": [
|
||||||
|
{
|
||||||
|
"name": "Syndr L3 Sepolia Testnet Explorer",
|
||||||
|
"url": "https://sepolia-explorer.syndr.com",
|
||||||
|
"standard": "EIP3091"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"faucets": [],
|
||||||
|
"infoURL": "https://syndr.com",
|
||||||
|
"name": "Syndr L3 Sepolia",
|
||||||
|
"nativeCurrency": {
|
||||||
|
"name": "Sepolia Ether",
|
||||||
|
"symbol": "ETH",
|
||||||
|
"decimals": 18
|
||||||
|
},
|
||||||
|
"networkId": 444444,
|
||||||
|
"parent": {
|
||||||
|
"type": "L2",
|
||||||
|
"chain": "eip155-421614",
|
||||||
|
"bridges": [
|
||||||
|
{
|
||||||
|
"url": "https://sepolia-bridge.syndr.com"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"rpc": [
|
||||||
|
"https://syndr-l3-sepolia.rpc.thirdweb.com/${THIRDWEB_API_KEY}",
|
||||||
|
"https://444444.rpc.thirdweb.com/${THIRDWEB_API_KEY}",
|
||||||
|
"https://sepolia.syndr.com/http",
|
||||||
|
"wss://sepolia.syndr.com/ws"
|
||||||
|
],
|
||||||
|
"shortName": "syndr",
|
||||||
|
"slug": "syndr-l3-sepolia",
|
||||||
|
"testnet": true,
|
||||||
|
"title": "Syndr L3 Sepolia Rollup Testnet"
|
||||||
|
} as const satisfies Chain;
|
||||||
@@ -0,0 +1,31 @@
|
|||||||
|
import type { Chain } from "../src/types";
|
||||||
|
export default {
|
||||||
|
"chain": "Avalanche",
|
||||||
|
"chainId": 48267,
|
||||||
|
"explorers": [],
|
||||||
|
"faucets": [],
|
||||||
|
"features": [],
|
||||||
|
"icon": {
|
||||||
|
"url": "https://images.ctfassets.net/9bazykntljf6/62CceHSYsRS4D9fgDSkLRB/877cb8f26954e1743ff535fd7fdaf78f/avacloud-placeholder.svg",
|
||||||
|
"width": 256,
|
||||||
|
"height": 256,
|
||||||
|
"format": "svg"
|
||||||
|
},
|
||||||
|
"infoURL": "https://avacloud.io",
|
||||||
|
"name": "QI0130I2",
|
||||||
|
"nativeCurrency": {
|
||||||
|
"name": "QI0130I2 Token",
|
||||||
|
"symbol": "NZY",
|
||||||
|
"decimals": 18
|
||||||
|
},
|
||||||
|
"networkId": 48267,
|
||||||
|
"redFlags": [],
|
||||||
|
"rpc": [
|
||||||
|
"https://qi0130i2.rpc.thirdweb.com/${THIRDWEB_API_KEY}",
|
||||||
|
"https://48267.rpc.thirdweb.com/${THIRDWEB_API_KEY}",
|
||||||
|
"https://subnets.avax.network/defi-kingdoms/dfk-chain/rpc"
|
||||||
|
],
|
||||||
|
"shortName": "QI0130I2",
|
||||||
|
"slug": "qi0130i2",
|
||||||
|
"testnet": true
|
||||||
|
} as const satisfies Chain;
|
||||||
@@ -0,0 +1,31 @@
|
|||||||
|
import type { Chain } from "../src/types";
|
||||||
|
export default {
|
||||||
|
"chain": "Avalanche",
|
||||||
|
"chainId": 5042,
|
||||||
|
"explorers": [],
|
||||||
|
"faucets": [],
|
||||||
|
"features": [],
|
||||||
|
"icon": {
|
||||||
|
"url": "https://images.ctfassets.net/9bazykntljf6/62CceHSYsRS4D9fgDSkLRB/877cb8f26954e1743ff535fd7fdaf78f/avacloud-placeholder.svg",
|
||||||
|
"width": 256,
|
||||||
|
"height": 256,
|
||||||
|
"format": "svg"
|
||||||
|
},
|
||||||
|
"infoURL": "https://avacloud.io",
|
||||||
|
"name": "OMOCHI",
|
||||||
|
"nativeCurrency": {
|
||||||
|
"name": "OMOCHI Token",
|
||||||
|
"symbol": "OMCH",
|
||||||
|
"decimals": 18
|
||||||
|
},
|
||||||
|
"networkId": 5042,
|
||||||
|
"redFlags": [],
|
||||||
|
"rpc": [
|
||||||
|
"https://omochi.rpc.thirdweb.com/${THIRDWEB_API_KEY}",
|
||||||
|
"https://5042.rpc.thirdweb.com/${THIRDWEB_API_KEY}",
|
||||||
|
"https://subnets.avax.network/omochi/testnet/rpc"
|
||||||
|
],
|
||||||
|
"shortName": "OMOCHI",
|
||||||
|
"slug": "omochi",
|
||||||
|
"testnet": true
|
||||||
|
} as const satisfies Chain;
|
||||||
@@ -0,0 +1,49 @@
|
|||||||
|
import type { Chain } from "../src/types";
|
||||||
|
export default {
|
||||||
|
"chain": "DOID",
|
||||||
|
"chainId": 53277,
|
||||||
|
"explorers": [
|
||||||
|
{
|
||||||
|
"name": "DOID Scan",
|
||||||
|
"url": "https://scan.doid.tech",
|
||||||
|
"standard": "EIP3091",
|
||||||
|
"icon": {
|
||||||
|
"url": "ipfs://QmXYSMyMnMvBf2F1ih6dTcRVUhmMnpzvmuP7vieLjmNQo5",
|
||||||
|
"width": 41,
|
||||||
|
"height": 52,
|
||||||
|
"format": "svg"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"faucets": [],
|
||||||
|
"features": [
|
||||||
|
{
|
||||||
|
"name": "EIP155"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "EIP1559"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"icon": {
|
||||||
|
"url": "ipfs://QmXYSMyMnMvBf2F1ih6dTcRVUhmMnpzvmuP7vieLjmNQo5",
|
||||||
|
"width": 41,
|
||||||
|
"height": 52,
|
||||||
|
"format": "svg"
|
||||||
|
},
|
||||||
|
"infoURL": "https://doid.tech",
|
||||||
|
"name": "DOID",
|
||||||
|
"nativeCurrency": {
|
||||||
|
"name": "DOID",
|
||||||
|
"symbol": "DOID",
|
||||||
|
"decimals": 18
|
||||||
|
},
|
||||||
|
"networkId": 53277,
|
||||||
|
"rpc": [
|
||||||
|
"https://doid.rpc.thirdweb.com/${THIRDWEB_API_KEY}",
|
||||||
|
"https://53277.rpc.thirdweb.com/${THIRDWEB_API_KEY}",
|
||||||
|
"https://rpc.doid.tech"
|
||||||
|
],
|
||||||
|
"shortName": "DOID",
|
||||||
|
"slug": "doid",
|
||||||
|
"testnet": false
|
||||||
|
} as const satisfies Chain;
|
||||||
@@ -0,0 +1,49 @@
|
|||||||
|
import type { Chain } from "../src/types";
|
||||||
|
export default {
|
||||||
|
"chain": "DOID",
|
||||||
|
"chainId": 56797,
|
||||||
|
"explorers": [
|
||||||
|
{
|
||||||
|
"name": "DOID Testnet Scan",
|
||||||
|
"url": "https://scan.testnet.doid.tech",
|
||||||
|
"standard": "EIP3091",
|
||||||
|
"icon": {
|
||||||
|
"url": "ipfs://QmXYSMyMnMvBf2F1ih6dTcRVUhmMnpzvmuP7vieLjmNQo5",
|
||||||
|
"width": 41,
|
||||||
|
"height": 52,
|
||||||
|
"format": "svg"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"faucets": [],
|
||||||
|
"features": [
|
||||||
|
{
|
||||||
|
"name": "EIP155"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "EIP1559"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"icon": {
|
||||||
|
"url": "ipfs://QmXYSMyMnMvBf2F1ih6dTcRVUhmMnpzvmuP7vieLjmNQo5",
|
||||||
|
"width": 41,
|
||||||
|
"height": 52,
|
||||||
|
"format": "svg"
|
||||||
|
},
|
||||||
|
"infoURL": "https://doid.tech",
|
||||||
|
"name": "DOID Testnet",
|
||||||
|
"nativeCurrency": {
|
||||||
|
"name": "DOID",
|
||||||
|
"symbol": "DOID",
|
||||||
|
"decimals": 18
|
||||||
|
},
|
||||||
|
"networkId": 56797,
|
||||||
|
"rpc": [
|
||||||
|
"https://doid-testnet.rpc.thirdweb.com/${THIRDWEB_API_KEY}",
|
||||||
|
"https://56797.rpc.thirdweb.com/${THIRDWEB_API_KEY}",
|
||||||
|
"https://rpc.testnet.doid.tech"
|
||||||
|
],
|
||||||
|
"shortName": "doidTestnet",
|
||||||
|
"slug": "doid-testnet",
|
||||||
|
"testnet": true
|
||||||
|
} as const satisfies Chain;
|
||||||
@@ -27,10 +27,11 @@ export default {
|
|||||||
"rpc": [
|
"rpc": [
|
||||||
"https://zetachain.rpc.thirdweb.com/${THIRDWEB_API_KEY}",
|
"https://zetachain.rpc.thirdweb.com/${THIRDWEB_API_KEY}",
|
||||||
"https://7000.rpc.thirdweb.com/${THIRDWEB_API_KEY}",
|
"https://7000.rpc.thirdweb.com/${THIRDWEB_API_KEY}",
|
||||||
"https://api.mainnet.zetachain.com/evm"
|
"https://zetachain-evm.blockpi.network/v1/rpc/public",
|
||||||
|
"https://zetachain-mainnet-archive.allthatnode.com:8545"
|
||||||
],
|
],
|
||||||
"shortName": "zetachain-mainnet",
|
"shortName": "zetachain-mainnet",
|
||||||
"slug": "zetachain",
|
"slug": "zetachain",
|
||||||
"status": "incubating",
|
"status": "active",
|
||||||
"testnet": false
|
"testnet": false
|
||||||
} as const satisfies Chain;
|
} as const satisfies Chain;
|
||||||
@@ -0,0 +1,31 @@
|
|||||||
|
import type { Chain } from "../src/types";
|
||||||
|
export default {
|
||||||
|
"chain": "Avalanche",
|
||||||
|
"chainId": 710420,
|
||||||
|
"explorers": [],
|
||||||
|
"faucets": [],
|
||||||
|
"features": [],
|
||||||
|
"icon": {
|
||||||
|
"url": "https://images.ctfassets.net/9bazykntljf6/62CceHSYsRS4D9fgDSkLRB/877cb8f26954e1743ff535fd7fdaf78f/avacloud-placeholder.svg",
|
||||||
|
"width": 256,
|
||||||
|
"height": 256,
|
||||||
|
"format": "svg"
|
||||||
|
},
|
||||||
|
"infoURL": "https://avacloud.io",
|
||||||
|
"name": "Tiltyard",
|
||||||
|
"nativeCurrency": {
|
||||||
|
"name": "Tiltyard Token",
|
||||||
|
"symbol": "TILT",
|
||||||
|
"decimals": 18
|
||||||
|
},
|
||||||
|
"networkId": 710420,
|
||||||
|
"redFlags": [],
|
||||||
|
"rpc": [
|
||||||
|
"https://tiltyard.rpc.thirdweb.com/${THIRDWEB_API_KEY}",
|
||||||
|
"https://710420.rpc.thirdweb.com/${THIRDWEB_API_KEY}",
|
||||||
|
"https://subnets.avax.network/tiltyard/mainnet/rpc"
|
||||||
|
],
|
||||||
|
"shortName": "Tiltyard",
|
||||||
|
"slug": "tiltyard",
|
||||||
|
"testnet": false
|
||||||
|
} as const satisfies Chain;
|
||||||
@@ -0,0 +1,43 @@
|
|||||||
|
import type { Chain } from "../src/types";
|
||||||
|
export default {
|
||||||
|
"chain": "VRC",
|
||||||
|
"chainId": 713,
|
||||||
|
"explorers": [
|
||||||
|
{
|
||||||
|
"name": "vrcscan",
|
||||||
|
"url": "https://vrcscan.com",
|
||||||
|
"standard": "EIP3091"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "dxbscan",
|
||||||
|
"url": "https://dxb.vrcscan.com",
|
||||||
|
"standard": "EIP3091"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"faucets": [],
|
||||||
|
"icon": {
|
||||||
|
"url": "ipfs://QmasMkZJ6m7y77fgY6SooNnrH3Y4a3vVYNDWe9T3KusxeU",
|
||||||
|
"width": 512,
|
||||||
|
"height": 512,
|
||||||
|
"format": "png"
|
||||||
|
},
|
||||||
|
"infoURL": "https://vrccoin.com",
|
||||||
|
"name": "Vrcscan Mainnet",
|
||||||
|
"nativeCurrency": {
|
||||||
|
"name": "VRC Chain",
|
||||||
|
"symbol": "VRC",
|
||||||
|
"decimals": 18
|
||||||
|
},
|
||||||
|
"networkId": 713,
|
||||||
|
"rpc": [
|
||||||
|
"https://vrcscan.rpc.thirdweb.com/${THIRDWEB_API_KEY}",
|
||||||
|
"https://713.rpc.thirdweb.com/${THIRDWEB_API_KEY}",
|
||||||
|
"https://rpc-mainnet-5.vrcscan.com",
|
||||||
|
"https://rpc-mainnet-6.vrcscan.com",
|
||||||
|
"https://rpc-mainnet-7.vrcscan.com",
|
||||||
|
"https://rpc-mainnet-8.vrcscan.com"
|
||||||
|
],
|
||||||
|
"shortName": "vrc",
|
||||||
|
"slug": "vrcscan",
|
||||||
|
"testnet": false
|
||||||
|
} as const satisfies Chain;
|
||||||
@@ -0,0 +1,35 @@
|
|||||||
|
import type { Chain } from "../src/types";
|
||||||
|
export default {
|
||||||
|
"chain": "Lovely",
|
||||||
|
"chainId": 730,
|
||||||
|
"explorers": [
|
||||||
|
{
|
||||||
|
"name": "Lovely Network Mainnet",
|
||||||
|
"url": "https://scan.lovely.network",
|
||||||
|
"standard": "EIP3091"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"faucets": [],
|
||||||
|
"icon": {
|
||||||
|
"url": "ipfs://QmPB7uW7Wj8zWWdeuPnUHPJ5FhaiTL76tv4ZQ4oKWEpb1g",
|
||||||
|
"width": 897,
|
||||||
|
"height": 824,
|
||||||
|
"format": "png"
|
||||||
|
},
|
||||||
|
"infoURL": "https://lovely.network",
|
||||||
|
"name": "Lovely Network Mainnet",
|
||||||
|
"nativeCurrency": {
|
||||||
|
"name": "Lovely",
|
||||||
|
"symbol": "LOVELY",
|
||||||
|
"decimals": 18
|
||||||
|
},
|
||||||
|
"networkId": 730,
|
||||||
|
"rpc": [
|
||||||
|
"https://lovely-network.rpc.thirdweb.com/${THIRDWEB_API_KEY}",
|
||||||
|
"https://730.rpc.thirdweb.com/${THIRDWEB_API_KEY}",
|
||||||
|
"https://rpc.lovely.network"
|
||||||
|
],
|
||||||
|
"shortName": "LOVELY",
|
||||||
|
"slug": "lovely-network",
|
||||||
|
"testnet": false
|
||||||
|
} as const satisfies Chain;
|
||||||
@@ -8,10 +8,10 @@ export default {
|
|||||||
"url": "https://testnet-explorer.haven1.org",
|
"url": "https://testnet-explorer.haven1.org",
|
||||||
"standard": "EIP3091",
|
"standard": "EIP3091",
|
||||||
"icon": {
|
"icon": {
|
||||||
"url": "ipfs://QmbSwngVDEiGaw3JzdME7fz5mYBWKbbz1ZerTpimaAxNXR",
|
"url": "ipfs://bafkreih4jq33lz2mjwvu62hmo2ptt277et5l6oqi5ejuyxv2dir2iohsai",
|
||||||
"width": 32,
|
"width": 128,
|
||||||
"height": 33,
|
"height": 128,
|
||||||
"format": "svg"
|
"format": "png"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
@@ -27,10 +27,10 @@ export default {
|
|||||||
}
|
}
|
||||||
],
|
],
|
||||||
"icon": {
|
"icon": {
|
||||||
"url": "ipfs://QmbSwngVDEiGaw3JzdME7fz5mYBWKbbz1ZerTpimaAxNXR",
|
"url": "ipfs://bafkreih4jq33lz2mjwvu62hmo2ptt277et5l6oqi5ejuyxv2dir2iohsai",
|
||||||
"width": 32,
|
"width": 128,
|
||||||
"height": 33,
|
"height": 128,
|
||||||
"format": "svg"
|
"format": "png"
|
||||||
},
|
},
|
||||||
"infoURL": "https://www.haven1.org",
|
"infoURL": "https://www.haven1.org",
|
||||||
"name": "Haven1 Testnet",
|
"name": "Haven1 Testnet",
|
||||||
|
|||||||
@@ -0,0 +1,37 @@
|
|||||||
|
import type { Chain } from "../src/types";
|
||||||
|
export default {
|
||||||
|
"chain": "MetaDAP",
|
||||||
|
"chainId": 91120,
|
||||||
|
"explorers": [
|
||||||
|
{
|
||||||
|
"name": "MetaDAP Enterprise Mainnet explorer",
|
||||||
|
"url": "https://explorer.chain.metadap.io",
|
||||||
|
"standard": "none"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"faucets": [],
|
||||||
|
"icon": {
|
||||||
|
"url": "ipfs://QmcCFUTStKKJKfzTwrjfMFoVaPCMsvAvWXRdDkYMvCkEs3",
|
||||||
|
"width": 800,
|
||||||
|
"height": 800,
|
||||||
|
"format": "svg"
|
||||||
|
},
|
||||||
|
"infoURL": "https://metadap.io/",
|
||||||
|
"name": "MetaDAP Enterprise Mainnet",
|
||||||
|
"nativeCurrency": {
|
||||||
|
"name": "DAP",
|
||||||
|
"symbol": "DAP",
|
||||||
|
"decimals": 18
|
||||||
|
},
|
||||||
|
"networkId": 91120,
|
||||||
|
"rpc": [
|
||||||
|
"https://metadap-enterprise.rpc.thirdweb.com/${THIRDWEB_API_KEY}",
|
||||||
|
"https://91120.rpc.thirdweb.com/${THIRDWEB_API_KEY}",
|
||||||
|
"https://rpc.chain.metadap.io",
|
||||||
|
"wss://rpc-ws.chain.metadap.io"
|
||||||
|
],
|
||||||
|
"shortName": "MetaDAP",
|
||||||
|
"slug": "metadap-enterprise",
|
||||||
|
"testnet": false,
|
||||||
|
"title": "MetaDAP Enterprise Mainnet"
|
||||||
|
} as const satisfies Chain;
|
||||||
@@ -0,0 +1,31 @@
|
|||||||
|
import type { Chain } from "../src/types";
|
||||||
|
export default {
|
||||||
|
"chain": "Avalanche",
|
||||||
|
"chainId": 91558,
|
||||||
|
"explorers": [],
|
||||||
|
"faucets": [],
|
||||||
|
"features": [],
|
||||||
|
"icon": {
|
||||||
|
"url": "https://images.ctfassets.net/9bazykntljf6/62CceHSYsRS4D9fgDSkLRB/877cb8f26954e1743ff535fd7fdaf78f/avacloud-placeholder.svg",
|
||||||
|
"width": 256,
|
||||||
|
"height": 256,
|
||||||
|
"format": "svg"
|
||||||
|
},
|
||||||
|
"infoURL": "https://avacloud.io",
|
||||||
|
"name": "Shelby's Testnet 1-18",
|
||||||
|
"nativeCurrency": {
|
||||||
|
"name": "Shelby's Testnet 1-18 Token",
|
||||||
|
"symbol": "LIE",
|
||||||
|
"decimals": 18
|
||||||
|
},
|
||||||
|
"networkId": 91558,
|
||||||
|
"redFlags": [],
|
||||||
|
"rpc": [
|
||||||
|
"https://shelby-s-testnet-1-18.rpc.thirdweb.com/${THIRDWEB_API_KEY}",
|
||||||
|
"https://91558.rpc.thirdweb.com/${THIRDWEB_API_KEY}",
|
||||||
|
"https://subnets.avax.network/defi-kingdoms/dfk-chain/rpc"
|
||||||
|
],
|
||||||
|
"shortName": "Shelby's Testnet 1-18",
|
||||||
|
"slug": "shelby-s-testnet-1-18",
|
||||||
|
"testnet": true
|
||||||
|
} as const satisfies Chain;
|
||||||
@@ -0,0 +1,31 @@
|
|||||||
|
import type { Chain } from "../src/types";
|
||||||
|
export default {
|
||||||
|
"chain": "Avalanche",
|
||||||
|
"chainId": 95395,
|
||||||
|
"explorers": [],
|
||||||
|
"faucets": [],
|
||||||
|
"features": [],
|
||||||
|
"icon": {
|
||||||
|
"url": "https://images.ctfassets.net/9bazykntljf6/62CceHSYsRS4D9fgDSkLRB/877cb8f26954e1743ff535fd7fdaf78f/avacloud-placeholder.svg",
|
||||||
|
"width": 256,
|
||||||
|
"height": 256,
|
||||||
|
"format": "svg"
|
||||||
|
},
|
||||||
|
"infoURL": "https://avacloud.io",
|
||||||
|
"name": "Testnet",
|
||||||
|
"nativeCurrency": {
|
||||||
|
"name": "Testnet Token",
|
||||||
|
"symbol": "MFD",
|
||||||
|
"decimals": 18
|
||||||
|
},
|
||||||
|
"networkId": 95395,
|
||||||
|
"redFlags": [],
|
||||||
|
"rpc": [
|
||||||
|
"https://testnet-testnet.rpc.thirdweb.com/${THIRDWEB_API_KEY}",
|
||||||
|
"https://95395.rpc.thirdweb.com/${THIRDWEB_API_KEY}",
|
||||||
|
"https://subnets.avax.network/defi-kingdoms/dfk-chain/rpc"
|
||||||
|
],
|
||||||
|
"shortName": "Testnet",
|
||||||
|
"slug": "testnet-testnet",
|
||||||
|
"testnet": true
|
||||||
|
} as const satisfies Chain;
|
||||||
@@ -0,0 +1,31 @@
|
|||||||
|
import type { Chain } from "../src/types";
|
||||||
|
export default {
|
||||||
|
"chain": "Avalanche",
|
||||||
|
"chainId": 97622,
|
||||||
|
"explorers": [],
|
||||||
|
"faucets": [],
|
||||||
|
"features": [],
|
||||||
|
"icon": {
|
||||||
|
"url": "https://images.ctfassets.net/9bazykntljf6/62CceHSYsRS4D9fgDSkLRB/877cb8f26954e1743ff535fd7fdaf78f/avacloud-placeholder.svg",
|
||||||
|
"width": 256,
|
||||||
|
"height": 256,
|
||||||
|
"format": "svg"
|
||||||
|
},
|
||||||
|
"infoURL": "https://avacloud.io",
|
||||||
|
"name": "QI0130I1",
|
||||||
|
"nativeCurrency": {
|
||||||
|
"name": "QI0130I1 Token",
|
||||||
|
"symbol": "NZY",
|
||||||
|
"decimals": 18
|
||||||
|
},
|
||||||
|
"networkId": 97622,
|
||||||
|
"redFlags": [],
|
||||||
|
"rpc": [
|
||||||
|
"https://qi0130i1.rpc.thirdweb.com/${THIRDWEB_API_KEY}",
|
||||||
|
"https://97622.rpc.thirdweb.com/${THIRDWEB_API_KEY}",
|
||||||
|
"https://subnets.avax.network/defi-kingdoms/dfk-chain/rpc"
|
||||||
|
],
|
||||||
|
"shortName": "QI0130I1",
|
||||||
|
"slug": "qi0130i1",
|
||||||
|
"testnet": true
|
||||||
|
} as const satisfies Chain;
|
||||||
@@ -0,0 +1,31 @@
|
|||||||
|
import type { Chain } from "../src/types";
|
||||||
|
export default {
|
||||||
|
"chain": "Avalanche",
|
||||||
|
"chainId": 98557,
|
||||||
|
"explorers": [],
|
||||||
|
"faucets": [],
|
||||||
|
"features": [],
|
||||||
|
"icon": {
|
||||||
|
"url": "https://images.ctfassets.net/9bazykntljf6/62CceHSYsRS4D9fgDSkLRB/877cb8f26954e1743ff535fd7fdaf78f/avacloud-placeholder.svg",
|
||||||
|
"width": 256,
|
||||||
|
"height": 256,
|
||||||
|
"format": "svg"
|
||||||
|
},
|
||||||
|
"infoURL": "https://avacloud.io",
|
||||||
|
"name": "QR0201I1",
|
||||||
|
"nativeCurrency": {
|
||||||
|
"name": "QR0201I1 Token",
|
||||||
|
"symbol": "OCZ",
|
||||||
|
"decimals": 18
|
||||||
|
},
|
||||||
|
"networkId": 98557,
|
||||||
|
"redFlags": [],
|
||||||
|
"rpc": [
|
||||||
|
"https://qr0201i1.rpc.thirdweb.com/${THIRDWEB_API_KEY}",
|
||||||
|
"https://98557.rpc.thirdweb.com/${THIRDWEB_API_KEY}",
|
||||||
|
"https://subnets.avax.network/qr0201i1/testnet/rpc"
|
||||||
|
],
|
||||||
|
"shortName": "QR0201I1",
|
||||||
|
"slug": "qr0201i1",
|
||||||
|
"testnet": true
|
||||||
|
} as const satisfies Chain;
|
||||||
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "@thirdweb-dev/chains",
|
"name": "@thirdweb-dev/chains",
|
||||||
"version": "0.1.66",
|
"version": "0.1.69",
|
||||||
"main": "dist/thirdweb-dev-chains.cjs.js",
|
"main": "dist/thirdweb-dev-chains.cjs.js",
|
||||||
"module": "dist/thirdweb-dev-chains.esm.js",
|
"module": "dist/thirdweb-dev-chains.esm.js",
|
||||||
"exports": {
|
"exports": {
|
||||||
|
|||||||
File diff suppressed because one or more lines are too long
@@ -1,5 +1,36 @@
|
|||||||
# thirdweb
|
# thirdweb
|
||||||
|
|
||||||
|
## 0.13.37
|
||||||
|
|
||||||
|
### Patch Changes
|
||||||
|
|
||||||
|
- Updated dependencies [[`4f52c296`](https://github.com/thirdweb-dev/js/commit/4f52c2961131636eed323a66568a519246d9f91d), [`374671fd`](https://github.com/thirdweb-dev/js/commit/374671fd9ac97a93263b09c6c0a53cfd129881d7)]:
|
||||||
|
- @thirdweb-dev/sdk@4.0.32
|
||||||
|
- @thirdweb-dev/chains@0.1.69
|
||||||
|
- @thirdweb-dev/wallets@2.4.7
|
||||||
|
- @thirdweb-dev/auth@4.1.29
|
||||||
|
|
||||||
|
## 0.13.36
|
||||||
|
|
||||||
|
### Patch Changes
|
||||||
|
|
||||||
|
- Updated dependencies [[`3ba15366`](https://github.com/thirdweb-dev/js/commit/3ba15366be8b57e577b871c44e386978dc9d4a8a), [`771bd1e1`](https://github.com/thirdweb-dev/js/commit/771bd1e1b280681992195103c22aafa1fb98f7e0)]:
|
||||||
|
- @thirdweb-dev/storage@2.0.9
|
||||||
|
- @thirdweb-dev/wallets@2.4.6
|
||||||
|
- @thirdweb-dev/sdk@4.0.31
|
||||||
|
- @thirdweb-dev/chains@0.1.68
|
||||||
|
- @thirdweb-dev/auth@4.1.28
|
||||||
|
|
||||||
|
## 0.13.35
|
||||||
|
|
||||||
|
### Patch Changes
|
||||||
|
|
||||||
|
- Updated dependencies [[`39e79282`](https://github.com/thirdweb-dev/js/commit/39e79282acb70959ba8140c779fa521c41c80a5f), [`69c3eb91`](https://github.com/thirdweb-dev/js/commit/69c3eb910feb2265833a07b7472e32fac5a79d90)]:
|
||||||
|
- @thirdweb-dev/chains@0.1.67
|
||||||
|
- @thirdweb-dev/sdk@4.0.30
|
||||||
|
- @thirdweb-dev/wallets@2.4.5
|
||||||
|
- @thirdweb-dev/auth@4.1.27
|
||||||
|
|
||||||
## 0.13.34
|
## 0.13.34
|
||||||
|
|
||||||
### Patch Changes
|
### Patch Changes
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
{
|
{
|
||||||
"name": "thirdweb",
|
"name": "thirdweb",
|
||||||
"main": "dist/cli/index.js",
|
"main": "dist/cli/index.js",
|
||||||
"version": "0.13.34",
|
"version": "0.13.37",
|
||||||
"repository": "https://github.com/thirdweb-dev/js/tree/main/packages/cli",
|
"repository": "https://github.com/thirdweb-dev/js/tree/main/packages/cli",
|
||||||
"author": "thirdweb eng <[email protected]>",
|
"author": "thirdweb eng <[email protected]>",
|
||||||
"license": "Apache-2.0",
|
"license": "Apache-2.0",
|
||||||
|
|||||||
@@ -5,7 +5,7 @@
|
|||||||
"license": "Apache-2.0",
|
"license": "Apache-2.0",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@typescript-eslint/eslint-plugin": "^6.2.0",
|
"@typescript-eslint/eslint-plugin": "^6.2.0",
|
||||||
"@typescript-eslint/parser": "^6.2.0",
|
"@typescript-eslint/parser": "^6.19.1",
|
||||||
"eslint-config-next": "^13.2.12",
|
"eslint-config-next": "^13.2.12",
|
||||||
"eslint-config-prettier": "^8.9.0",
|
"eslint-config-prettier": "^8.9.0",
|
||||||
"eslint-config-turbo": "^0.0.8",
|
"eslint-config-turbo": "^0.0.8",
|
||||||
|
|||||||
@@ -1,5 +1,36 @@
|
|||||||
# @thirdweb-dev/react-core
|
# @thirdweb-dev/react-core
|
||||||
|
|
||||||
|
## 4.4.4
|
||||||
|
|
||||||
|
### Patch Changes
|
||||||
|
|
||||||
|
- Updated dependencies [[`4f52c296`](https://github.com/thirdweb-dev/js/commit/4f52c2961131636eed323a66568a519246d9f91d), [`374671fd`](https://github.com/thirdweb-dev/js/commit/374671fd9ac97a93263b09c6c0a53cfd129881d7)]:
|
||||||
|
- @thirdweb-dev/sdk@4.0.32
|
||||||
|
- @thirdweb-dev/chains@0.1.69
|
||||||
|
- @thirdweb-dev/wallets@2.4.7
|
||||||
|
- @thirdweb-dev/auth@4.1.29
|
||||||
|
|
||||||
|
## 4.4.3
|
||||||
|
|
||||||
|
### Patch Changes
|
||||||
|
|
||||||
|
- Updated dependencies [[`3ba15366`](https://github.com/thirdweb-dev/js/commit/3ba15366be8b57e577b871c44e386978dc9d4a8a), [`771bd1e1`](https://github.com/thirdweb-dev/js/commit/771bd1e1b280681992195103c22aafa1fb98f7e0)]:
|
||||||
|
- @thirdweb-dev/storage@2.0.9
|
||||||
|
- @thirdweb-dev/wallets@2.4.6
|
||||||
|
- @thirdweb-dev/sdk@4.0.31
|
||||||
|
- @thirdweb-dev/chains@0.1.68
|
||||||
|
- @thirdweb-dev/auth@4.1.28
|
||||||
|
|
||||||
|
## 4.4.2
|
||||||
|
|
||||||
|
### Patch Changes
|
||||||
|
|
||||||
|
- Updated dependencies [[`39e79282`](https://github.com/thirdweb-dev/js/commit/39e79282acb70959ba8140c779fa521c41c80a5f), [`69c3eb91`](https://github.com/thirdweb-dev/js/commit/69c3eb910feb2265833a07b7472e32fac5a79d90)]:
|
||||||
|
- @thirdweb-dev/chains@0.1.67
|
||||||
|
- @thirdweb-dev/sdk@4.0.30
|
||||||
|
- @thirdweb-dev/wallets@2.4.5
|
||||||
|
- @thirdweb-dev/auth@4.1.27
|
||||||
|
|
||||||
## 4.4.1
|
## 4.4.1
|
||||||
|
|
||||||
### Patch Changes
|
### Patch Changes
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "@thirdweb-dev/react-core",
|
"name": "@thirdweb-dev/react-core",
|
||||||
"version": "4.4.1",
|
"version": "4.4.4",
|
||||||
"repository": "https://github.com/thirdweb-dev/js/tree/main/packages/react-core",
|
"repository": "https://github.com/thirdweb-dev/js/tree/main/packages/react-core",
|
||||||
"author": "thirdweb eng <[email protected]>",
|
"author": "thirdweb eng <[email protected]>",
|
||||||
"license": "Apache-2.0",
|
"license": "Apache-2.0",
|
||||||
@@ -72,7 +72,7 @@
|
|||||||
"@types/mime": "3.0.0",
|
"@types/mime": "3.0.0",
|
||||||
"@types/react": "^18.2.17",
|
"@types/react": "^18.2.17",
|
||||||
"@typescript-eslint/eslint-plugin": "^6.2.0",
|
"@typescript-eslint/eslint-plugin": "^6.2.0",
|
||||||
"@typescript-eslint/parser": "^6.2.0",
|
"@typescript-eslint/parser": "^6.19.1",
|
||||||
"eslint": "^8.56.0",
|
"eslint": "^8.56.0",
|
||||||
"eslint-config-prettier": "^8.9.0",
|
"eslint-config-prettier": "^8.9.0",
|
||||||
"eslint-config-thirdweb": "workspace:*",
|
"eslint-config-thirdweb": "workspace:*",
|
||||||
|
|||||||
File diff suppressed because it is too large
Load Diff
Binary file not shown.
@@ -1,5 +1,15 @@
|
|||||||
# @thirdweb-dev/react-native-compat
|
# @thirdweb-dev/react-native-compat
|
||||||
|
|
||||||
|
## 0.7.1
|
||||||
|
|
||||||
|
## 0.7.0
|
||||||
|
|
||||||
|
### Minor Changes
|
||||||
|
|
||||||
|
- [#2225](https://github.com/thirdweb-dev/js/pull/2225) [`2e3cc7cd`](https://github.com/thirdweb-dev/js/commit/2e3cc7cdd4017df8a5b00ebdd6e37334432e0b82) Thanks [@iketw](https://github.com/iketw)! - Adds support for RN 0.73
|
||||||
|
|
||||||
|
## 0.6.5
|
||||||
|
|
||||||
## 0.6.4
|
## 0.6.4
|
||||||
|
|
||||||
## 0.6.3
|
## 0.6.3
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
{
|
{
|
||||||
"name": "@thirdweb-dev/react-native-compat",
|
"name": "@thirdweb-dev/react-native-compat",
|
||||||
"description": "Shims for Thirdweb in React Native Projects",
|
"description": "Shims for Thirdweb in React Native Projects",
|
||||||
"version": "0.6.4",
|
"version": "0.7.1",
|
||||||
"author": "thirdweb eng <[email protected]>",
|
"author": "thirdweb eng <[email protected]>",
|
||||||
"repository": "https://github.com/thirdweb-dev/js/tree/main/packages/react-native-compat",
|
"repository": "https://github.com/thirdweb-dev/js/tree/main/packages/react-native-compat",
|
||||||
"license": "Apache-2.0",
|
"license": "Apache-2.0",
|
||||||
@@ -22,7 +22,7 @@
|
|||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@ethersproject/shims": "^5.7.0",
|
"@ethersproject/shims": "^5.7.0",
|
||||||
"@walletconnect/react-native-compat": "^2.8.6",
|
"@walletconnect/react-native-compat": "2.9.2",
|
||||||
"base-64": "^1.0.0",
|
"base-64": "^1.0.0",
|
||||||
"big-integer": "^1.6.51",
|
"big-integer": "^1.6.51",
|
||||||
"react-native-get-random-values": "^1.10.0",
|
"react-native-get-random-values": "^1.10.0",
|
||||||
|
|||||||
@@ -1,5 +1,44 @@
|
|||||||
# @thirdweb-dev/react-native
|
# @thirdweb-dev/react-native
|
||||||
|
|
||||||
|
## 0.7.1
|
||||||
|
|
||||||
|
### Patch Changes
|
||||||
|
|
||||||
|
- Updated dependencies [[`4f52c296`](https://github.com/thirdweb-dev/js/commit/4f52c2961131636eed323a66568a519246d9f91d), [`374671fd`](https://github.com/thirdweb-dev/js/commit/374671fd9ac97a93263b09c6c0a53cfd129881d7)]:
|
||||||
|
- @thirdweb-dev/sdk@4.0.32
|
||||||
|
- @thirdweb-dev/chains@0.1.69
|
||||||
|
- @thirdweb-dev/react-core@4.4.4
|
||||||
|
- @thirdweb-dev/wallets@2.4.7
|
||||||
|
|
||||||
|
## 0.7.0
|
||||||
|
|
||||||
|
### Minor Changes
|
||||||
|
|
||||||
|
- [#2225](https://github.com/thirdweb-dev/js/pull/2225) [`2e3cc7cd`](https://github.com/thirdweb-dev/js/commit/2e3cc7cdd4017df8a5b00ebdd6e37334432e0b82) Thanks [@iketw](https://github.com/iketw)! - Adds support for RN 0.73
|
||||||
|
|
||||||
|
### Patch Changes
|
||||||
|
|
||||||
|
- [#2224](https://github.com/thirdweb-dev/js/pull/2224) [`3ba15366`](https://github.com/thirdweb-dev/js/commit/3ba15366be8b57e577b871c44e386978dc9d4a8a) Thanks [@0xFirekeeper](https://github.com/0xFirekeeper)! - Adds correct reporing headers
|
||||||
|
|
||||||
|
- [#2224](https://github.com/thirdweb-dev/js/pull/2224) [`3ba15366`](https://github.com/thirdweb-dev/js/commit/3ba15366be8b57e577b871c44e386978dc9d4a8a) Thanks [@0xFirekeeper](https://github.com/0xFirekeeper)! - Adds global sdk vars
|
||||||
|
|
||||||
|
- Updated dependencies [[`3ba15366`](https://github.com/thirdweb-dev/js/commit/3ba15366be8b57e577b871c44e386978dc9d4a8a), [`771bd1e1`](https://github.com/thirdweb-dev/js/commit/771bd1e1b280681992195103c22aafa1fb98f7e0)]:
|
||||||
|
- @thirdweb-dev/storage@2.0.9
|
||||||
|
- @thirdweb-dev/wallets@2.4.6
|
||||||
|
- @thirdweb-dev/sdk@4.0.31
|
||||||
|
- @thirdweb-dev/chains@0.1.68
|
||||||
|
- @thirdweb-dev/react-core@4.4.3
|
||||||
|
|
||||||
|
## 0.6.5
|
||||||
|
|
||||||
|
### Patch Changes
|
||||||
|
|
||||||
|
- Updated dependencies [[`39e79282`](https://github.com/thirdweb-dev/js/commit/39e79282acb70959ba8140c779fa521c41c80a5f), [`69c3eb91`](https://github.com/thirdweb-dev/js/commit/69c3eb910feb2265833a07b7472e32fac5a79d90)]:
|
||||||
|
- @thirdweb-dev/chains@0.1.67
|
||||||
|
- @thirdweb-dev/react-core@4.4.2
|
||||||
|
- @thirdweb-dev/sdk@4.0.30
|
||||||
|
- @thirdweb-dev/wallets@2.4.5
|
||||||
|
|
||||||
## 0.6.4
|
## 0.6.4
|
||||||
|
|
||||||
### Patch Changes
|
### Patch Changes
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "@thirdweb-dev/react-native",
|
"name": "@thirdweb-dev/react-native",
|
||||||
"version": "0.6.4",
|
"version": "0.7.1",
|
||||||
"repository": "https://github.com/thirdweb-dev/js/tree/main/packages/react-native",
|
"repository": "https://github.com/thirdweb-dev/js/tree/main/packages/react-native",
|
||||||
"author": "thirdweb eng <[email protected]>",
|
"author": "thirdweb eng <[email protected]>",
|
||||||
"license": "Apache-2.0",
|
"license": "Apache-2.0",
|
||||||
@@ -27,9 +27,7 @@
|
|||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@aws-sdk/client-lambda": "3.350.0",
|
"@aws-sdk/client-lambda": "3.350.0",
|
||||||
"@aws-sdk/credential-providers": "3.350.0",
|
"@aws-sdk/credential-providers": "3.350.0",
|
||||||
"@coinbase/wallet-mobile-sdk": "1.0.10",
|
"@coinbase/wallet-mobile-sdk": "1.0.13",
|
||||||
"@magic-sdk/provider": "17.2.0",
|
|
||||||
"@magic-sdk/react-native-bare": "^18.5.0",
|
|
||||||
"@paperxyz/embedded-wallet-service-sdk": "^1.2.4",
|
"@paperxyz/embedded-wallet-service-sdk": "^1.2.4",
|
||||||
"@shopify/restyle": "^2.4.2",
|
"@shopify/restyle": "^2.4.2",
|
||||||
"@tanstack/react-query": "^4.33.0",
|
"@tanstack/react-query": "^4.33.0",
|
||||||
@@ -41,7 +39,7 @@
|
|||||||
"abitype": "^0.2.5",
|
"abitype": "^0.2.5",
|
||||||
"aws-amplify": "^5.3.8",
|
"aws-amplify": "^5.3.8",
|
||||||
"expo-application": "^5.3.0",
|
"expo-application": "^5.3.0",
|
||||||
"expo-clipboard": "^4.1.2",
|
"expo-clipboard": "^4.5.0",
|
||||||
"expo-document-picker": "^11.2.2",
|
"expo-document-picker": "^11.2.2",
|
||||||
"expo-file-system": "^15.2.2",
|
"expo-file-system": "^15.2.2",
|
||||||
"expo-secure-store": "^12.1.1",
|
"expo-secure-store": "^12.1.1",
|
||||||
@@ -61,7 +59,7 @@
|
|||||||
"@types/react": "^18.2.17",
|
"@types/react": "^18.2.17",
|
||||||
"@types/react-native": "^0.71.8",
|
"@types/react-native": "^0.71.8",
|
||||||
"@typescript-eslint/eslint-plugin": "^6.2.0",
|
"@typescript-eslint/eslint-plugin": "^6.2.0",
|
||||||
"@typescript-eslint/parser": "^6.2.0",
|
"@typescript-eslint/parser": "^6.19.1",
|
||||||
"babel-jest": "^29.6.2",
|
"babel-jest": "^29.6.2",
|
||||||
"eslint": "^8.56.0",
|
"eslint": "^8.56.0",
|
||||||
"eslint-config-prettier": "^8.9.0",
|
"eslint-config-prettier": "^8.9.0",
|
||||||
@@ -77,9 +75,6 @@
|
|||||||
"react": "^18.2.0",
|
"react": "^18.2.0",
|
||||||
"react-native": "^0.71.11",
|
"react-native": "^0.71.11",
|
||||||
"react-native-camera": "^4.2.1",
|
"react-native-camera": "^4.2.1",
|
||||||
"react-native-device-info": "10.6.0",
|
|
||||||
"react-native-safe-area-context": "4.7.4",
|
|
||||||
"react-native-webview": "12.1.0",
|
|
||||||
"rimraf": "^3.0.2",
|
"rimraf": "^3.0.2",
|
||||||
"typedoc-gen": "workspace:*",
|
"typedoc-gen": "workspace:*",
|
||||||
"typescript": "^5.3.3"
|
"typescript": "^5.3.3"
|
||||||
@@ -88,16 +83,13 @@
|
|||||||
"amazon-cognito-identity-js": "^6.3.3",
|
"amazon-cognito-identity-js": "^6.3.3",
|
||||||
"react-native-aes-gcm-crypto": "^0.2.2",
|
"react-native-aes-gcm-crypto": "^0.2.2",
|
||||||
"react-native-camera": "^4.2.1",
|
"react-native-camera": "^4.2.1",
|
||||||
"react-native-device-info": "10.6.0",
|
|
||||||
"react-native-inappbrowser-reborn": "^3.7.0",
|
"react-native-inappbrowser-reborn": "^3.7.0",
|
||||||
"react-native-quick-base64": "^2.0.7",
|
"react-native-quick-base64": "^2.0.7",
|
||||||
"react-native-quick-crypto": "^0.6.1",
|
"react-native-quick-crypto": "^0.6.1"
|
||||||
"react-native-safe-area-context": "4.7.4",
|
|
||||||
"react-native-webview": "12.1.0"
|
|
||||||
},
|
},
|
||||||
"peerDependencies": {
|
"peerDependencies": {
|
||||||
"ethers": ">=5.5.1 <6",
|
"ethers": ">=5.5.1 <6",
|
||||||
"expo": ">=47 <50",
|
"expo": ">=47",
|
||||||
"react": ">=18.0.0",
|
"react": ">=18.0.0",
|
||||||
"react-native": ">=0.71.0",
|
"react-native": ">=0.71.0",
|
||||||
"react-native-mmkv": ">=2.11.0"
|
"react-native-mmkv": ">=2.11.0"
|
||||||
|
|||||||
@@ -5,8 +5,7 @@ import {
|
|||||||
TW_UPLOAD_SERVER_URL,
|
TW_UPLOAD_SERVER_URL,
|
||||||
} from "@thirdweb-dev/storage";
|
} from "@thirdweb-dev/storage";
|
||||||
import { IpfsUploaderOptions, UploadDataValue } from "./types";
|
import { IpfsUploaderOptions, UploadDataValue } from "./types";
|
||||||
import { appBundleId, packageVersion } from "../../evm/utils/version";
|
import { getAnalyticsHeaders, setAnalyticsHeaders } from "./utils";
|
||||||
import { BUNDLE_ID_HEADER } from "../../evm/constants/headers";
|
|
||||||
|
|
||||||
const METADATA_NAME = "Storage React Native SDK";
|
const METADATA_NAME = "Storage React Native SDK";
|
||||||
|
|
||||||
@@ -38,9 +37,6 @@ export class IpfsUploader implements IStorageUploader<IpfsUploadBatchOptions> {
|
|||||||
keyvalues: { ...options?.metadata },
|
keyvalues: { ...options?.metadata },
|
||||||
};
|
};
|
||||||
|
|
||||||
const { version, name: packageName } = packageVersion;
|
|
||||||
const platform = "react-native";
|
|
||||||
|
|
||||||
if ("uri" in data[0] && "type" in data[0] && "name" in data[0]) {
|
if ("uri" in data[0] && "type" in data[0] && "name" in data[0]) {
|
||||||
// then it's an array of files
|
// then it's an array of files
|
||||||
return new Promise(async (resolve, reject) => {
|
return new Promise(async (resolve, reject) => {
|
||||||
@@ -140,14 +136,11 @@ export class IpfsUploader implements IStorageUploader<IpfsUploadBatchOptions> {
|
|||||||
});
|
});
|
||||||
|
|
||||||
xhr.open("POST", `${TW_UPLOAD_SERVER_URL}/ipfs/upload`);
|
xhr.open("POST", `${TW_UPLOAD_SERVER_URL}/ipfs/upload`);
|
||||||
xhr.setRequestHeader(BUNDLE_ID_HEADER, appBundleId || ""); // only empty on web
|
|
||||||
if (this.clientId) {
|
if (this.clientId) {
|
||||||
xhr.setRequestHeader("x-client-id", this.clientId);
|
xhr.setRequestHeader("x-client-id", this.clientId);
|
||||||
}
|
}
|
||||||
|
|
||||||
xhr.setRequestHeader("x-sdk-version", version);
|
setAnalyticsHeaders(xhr);
|
||||||
xhr.setRequestHeader("x-sdk-name", packageName);
|
|
||||||
xhr.setRequestHeader("x-sdk-platform", platform);
|
|
||||||
|
|
||||||
xhr.send(form);
|
xhr.send(form);
|
||||||
});
|
});
|
||||||
@@ -165,12 +158,9 @@ export class IpfsUploader implements IStorageUploader<IpfsUploadBatchOptions> {
|
|||||||
{
|
{
|
||||||
method: "POST",
|
method: "POST",
|
||||||
headers: {
|
headers: {
|
||||||
[BUNDLE_ID_HEADER]: appBundleId || "", // only empty on web
|
|
||||||
...(this.clientId ? { "x-client-id": this.clientId } : {}),
|
...(this.clientId ? { "x-client-id": this.clientId } : {}),
|
||||||
"Content-Type": "application/json",
|
"Content-Type": "application/json",
|
||||||
"x-sdk-version": version,
|
...getAnalyticsHeaders(),
|
||||||
"x-sdk-name": packageName,
|
|
||||||
"x-sdk-platform": platform,
|
|
||||||
},
|
},
|
||||||
body: fetchBody,
|
body: fetchBody,
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -1,4 +1,6 @@
|
|||||||
import { DEFAULT_GATEWAY_URLS, GatewayUrls } from "@thirdweb-dev/storage";
|
import { DEFAULT_GATEWAY_URLS, GatewayUrls } from "@thirdweb-dev/storage";
|
||||||
|
import { Platform } from "react-native";
|
||||||
|
import { appBundleId, packageVersion } from "../../evm/utils/version";
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @internal
|
* @internal
|
||||||
@@ -32,3 +34,51 @@ export function prepareGatewayUrls(
|
|||||||
|
|
||||||
return allGatewayUrls;
|
return allGatewayUrls;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
export function setAnalyticsHeaders(xhr: XMLHttpRequest) {
|
||||||
|
const globals = getAnalyticsGlobals();
|
||||||
|
xhr.setRequestHeader("x-sdk-version", globals.x_sdk_version);
|
||||||
|
xhr.setRequestHeader("x-sdk-os", globals.x_sdk_os);
|
||||||
|
xhr.setRequestHeader("x-sdk-name", globals.x_sdk_name);
|
||||||
|
xhr.setRequestHeader("x-sdk-platform", globals.x_sdk_platform);
|
||||||
|
xhr.setRequestHeader("x-bundle-id", globals.app_bundle_id);
|
||||||
|
}
|
||||||
|
|
||||||
|
export function getAnalyticsHeaders() {
|
||||||
|
const globals = getAnalyticsGlobals();
|
||||||
|
return {
|
||||||
|
"x-sdk-version": globals.x_sdk_version,
|
||||||
|
"x-sdk-os": globals.x_sdk_os,
|
||||||
|
"x-sdk-name": globals.x_sdk_name,
|
||||||
|
"x-sdk-platform": globals.x_sdk_platform,
|
||||||
|
"x-bundle-id": globals.app_bundle_id,
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
|
export function getAnalyticsGlobals() {
|
||||||
|
if (typeof globalThis === "undefined") {
|
||||||
|
return {
|
||||||
|
x_sdk_name: packageVersion.name,
|
||||||
|
x_sdk_platform: "mobile",
|
||||||
|
x_sdk_version: packageVersion.version,
|
||||||
|
x_sdk_os: Platform.OS,
|
||||||
|
app_bundle_id: appBundleId,
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
|
if ((globalThis as any).X_SDK_NAME === undefined) {
|
||||||
|
(globalThis as any).X_SDK_NAME = packageVersion.name;
|
||||||
|
(globalThis as any).X_SDK_PLATFORM = "mobile";
|
||||||
|
(globalThis as any).X_SDK_VERSION = packageVersion.version;
|
||||||
|
(globalThis as any).X_SDK_OS = Platform.OS;
|
||||||
|
(globalThis as any).APP_BUNDLE_ID = appBundleId;
|
||||||
|
}
|
||||||
|
|
||||||
|
return {
|
||||||
|
x_sdk_name: (globalThis as any).X_SDK_NAME,
|
||||||
|
x_sdk_platform: (globalThis as any).X_SDK_PLATFORM,
|
||||||
|
x_sdk_version: (globalThis as any).X_SDK_VERSION,
|
||||||
|
x_sdk_os: (globalThis as any).X_SDK_OS,
|
||||||
|
app_bundle_id: (globalThis as any).APP_BUNDLE_ID,
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|||||||
+1
-4
@@ -49,15 +49,12 @@ export function ChooseWallet({
|
|||||||
|
|
||||||
const guestWallet = wallets.find((w) => w.id === walletIds.localWallet);
|
const guestWallet = wallets.find((w) => w.id === walletIds.localWallet);
|
||||||
const emailWallet = wallets.find(
|
const emailWallet = wallets.find(
|
||||||
(w) =>
|
(w) => w.id === walletIds.embeddedWallet && w.selectUI,
|
||||||
w.id === walletIds.magicLink ||
|
|
||||||
(w.id === walletIds.embeddedWallet && w.selectUI),
|
|
||||||
);
|
);
|
||||||
|
|
||||||
const walletsToDisplay = useMemo(() => {
|
const walletsToDisplay = useMemo(() => {
|
||||||
const filteredWallets = wallets.filter(
|
const filteredWallets = wallets.filter(
|
||||||
(wallet) =>
|
(wallet) =>
|
||||||
wallet.id !== walletIds.magicLink &&
|
|
||||||
wallet.id !== walletIds.embeddedWallet &&
|
wallet.id !== walletIds.embeddedWallet &&
|
||||||
wallet.id !== walletIds.localWallet,
|
wallet.id !== walletIds.localWallet,
|
||||||
);
|
);
|
||||||
|
|||||||
@@ -1 +0,0 @@
|
|||||||
export const BUNDLE_ID_HEADER = "x-bundle-id";
|
|
||||||
@@ -15,10 +15,6 @@ export { TrustWallet, trustWallet } from "./wallets/wallets/trust-wallet";
|
|||||||
export { smartWallet } from "./wallets/wallets/smart-wallet";
|
export { smartWallet } from "./wallets/wallets/smart-wallet";
|
||||||
export { localWallet } from "./wallets/wallets/local-wallet";
|
export { localWallet } from "./wallets/wallets/local-wallet";
|
||||||
export { LocalWallet } from "./wallets/wallets/LocalWallet";
|
export { LocalWallet } from "./wallets/wallets/LocalWallet";
|
||||||
export { magicWallet } from "./wallets/wallets/magic-link";
|
|
||||||
export { MagicWallet } from "./wallets/wallets/MagicLink";
|
|
||||||
export { MagicLink } from "./wallets/wallets/MagicLink";
|
|
||||||
export { magicLink } from "./wallets/wallets/magic-link";
|
|
||||||
export { EmbeddedWallet } from "./wallets/wallets/embedded/EmbeddedWallet";
|
export { EmbeddedWallet } from "./wallets/wallets/embedded/EmbeddedWallet";
|
||||||
export { embeddedWallet } from "./wallets/wallets/embedded/embedded-wallet";
|
export { embeddedWallet } from "./wallets/wallets/embedded/embedded-wallet";
|
||||||
export * from "./wallets/wallets/wallet-connect/WalletConnectBase";
|
export * from "./wallets/wallets/wallet-connect/WalletConnectBase";
|
||||||
|
|||||||
@@ -1,61 +1,27 @@
|
|||||||
import { SmartWallet, walletIds } from "@thirdweb-dev/wallets";
|
import { SmartWallet } from "@thirdweb-dev/wallets";
|
||||||
import {
|
import { createContext, useContext, useState } from "react";
|
||||||
createContext,
|
|
||||||
useCallback,
|
|
||||||
useContext,
|
|
||||||
useEffect,
|
|
||||||
useState,
|
|
||||||
} from "react";
|
|
||||||
import { useWalletConnectListener } from "../wallets/hooks/useWalletConnectListener";
|
import { useWalletConnectListener } from "../wallets/hooks/useWalletConnectListener";
|
||||||
import { MagicLink } from "../wallets/wallets/MagicLink";
|
|
||||||
import { useWalletContext } from "@thirdweb-dev/react-core";
|
|
||||||
|
|
||||||
type DappContextType = {
|
type DappContextType = {
|
||||||
smartWallet?: SmartWallet;
|
smartWallet?: SmartWallet;
|
||||||
setSmartWallet?: (value?: SmartWallet) => void;
|
setSmartWallet?: (value?: SmartWallet) => void;
|
||||||
magicLink?: MagicLink;
|
|
||||||
setMagicLink?: (value?: MagicLink) => void;
|
|
||||||
};
|
};
|
||||||
|
|
||||||
const DappContext = createContext<DappContextType>({});
|
const DappContext = createContext<DappContextType>({});
|
||||||
|
|
||||||
export const DappContextProvider = (props: React.PropsWithChildren) => {
|
export const DappContextProvider = (props: React.PropsWithChildren) => {
|
||||||
const [smartWallet, setSmartWallet] = useState<SmartWallet | undefined>();
|
const [smartWallet, setSmartWallet] = useState<SmartWallet | undefined>();
|
||||||
const [magicLink, setMagicLink] = useState<MagicLink | undefined>();
|
|
||||||
const createdWalletInstance = useWalletContext().createdWalletInstance;
|
|
||||||
|
|
||||||
useEffect(() => {
|
|
||||||
if (!createdWalletInstance) {
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (createdWalletInstance.walletId === walletIds.magicLink) {
|
|
||||||
setMagicLink(createdWalletInstance as MagicLink);
|
|
||||||
}
|
|
||||||
}, [createdWalletInstance, setMagicLink]);
|
|
||||||
|
|
||||||
useWalletConnectListener();
|
useWalletConnectListener();
|
||||||
|
|
||||||
const magicSDK = useCallback(() => {
|
|
||||||
if (magicLink) {
|
|
||||||
const magic = magicLink.getMagicSDK();
|
|
||||||
return <magic.Relayer />;
|
|
||||||
}
|
|
||||||
|
|
||||||
return null;
|
|
||||||
}, [magicLink]);
|
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<DappContext.Provider
|
<DappContext.Provider
|
||||||
value={{
|
value={{
|
||||||
smartWallet,
|
smartWallet,
|
||||||
setSmartWallet,
|
setSmartWallet,
|
||||||
magicLink: magicLink,
|
|
||||||
setMagicLink: setMagicLink,
|
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
{props.children}
|
{props.children}
|
||||||
{magicSDK()}
|
|
||||||
</DappContext.Provider>
|
</DappContext.Provider>
|
||||||
);
|
);
|
||||||
};
|
};
|
||||||
@@ -69,12 +35,3 @@ export const useSmartWallet = () => {
|
|||||||
|
|
||||||
return [context.smartWallet, context.setSmartWallet] as const;
|
return [context.smartWallet, context.setSmartWallet] as const;
|
||||||
};
|
};
|
||||||
|
|
||||||
export const useMagicLink = () => {
|
|
||||||
const context = useContext(DappContext);
|
|
||||||
|
|
||||||
return {
|
|
||||||
magicLink: context.magicLink,
|
|
||||||
setMagicLink: context.setMagicLink,
|
|
||||||
} as const;
|
|
||||||
};
|
|
||||||
|
|||||||
@@ -4,7 +4,7 @@ import {
|
|||||||
ThirdwebProviderCoreProps,
|
ThirdwebProviderCoreProps,
|
||||||
WalletConfig,
|
WalletConfig,
|
||||||
} from "@thirdweb-dev/react-core";
|
} from "@thirdweb-dev/react-core";
|
||||||
import { PropsWithChildren, useMemo } from "react";
|
import { PropsWithChildren } from "react";
|
||||||
import type { Chain, defaultChains } from "@thirdweb-dev/chains";
|
import type { Chain, defaultChains } from "@thirdweb-dev/chains";
|
||||||
import { SecureStorage } from "../../core/SecureStorage";
|
import { SecureStorage } from "../../core/SecureStorage";
|
||||||
import { useCoinbaseWalletListener } from "../wallets/hooks/useCoinbaseWalletListener";
|
import { useCoinbaseWalletListener } from "../wallets/hooks/useCoinbaseWalletListener";
|
||||||
@@ -13,10 +13,10 @@ import { DappContextProvider } from "./context-provider";
|
|||||||
import { UIContextProvider } from "./ui-context-provider";
|
import { UIContextProvider } from "./ui-context-provider";
|
||||||
import { MainModal } from "../components/MainModal";
|
import { MainModal } from "../components/MainModal";
|
||||||
import { ThemeProvider, ThemeType } from "../styles/ThemeProvider";
|
import { ThemeProvider, ThemeType } from "../styles/ThemeProvider";
|
||||||
import { SafeAreaProvider } from "react-native-safe-area-context";
|
|
||||||
import { walletIds } from "@thirdweb-dev/wallets";
|
import { walletIds } from "@thirdweb-dev/wallets";
|
||||||
import { ThirdwebStorage } from "../../core/storage/storage";
|
import { ThirdwebStorage } from "../../core/storage/storage";
|
||||||
import type { Locale } from "../i18n/types";
|
import type { Locale } from "../i18n/types";
|
||||||
|
import { getAnalyticsGlobals } from "../../core/storage/utils";
|
||||||
|
|
||||||
export interface ThirdwebProviderProps<TChains extends Chain[]>
|
export interface ThirdwebProviderProps<TChains extends Chain[]>
|
||||||
extends Omit<
|
extends Omit<
|
||||||
@@ -148,6 +148,8 @@ export const ThirdwebProvider = <TChains extends Chain[] = DefaultChains>(
|
|||||||
...restProps
|
...restProps
|
||||||
} = props;
|
} = props;
|
||||||
|
|
||||||
|
getAnalyticsGlobals();
|
||||||
|
|
||||||
const coinbaseWalletObj = supportedWallets.find(
|
const coinbaseWalletObj = supportedWallets.find(
|
||||||
(w) => w.id === walletIds.coinbase,
|
(w) => w.id === walletIds.coinbase,
|
||||||
);
|
);
|
||||||
@@ -158,11 +160,6 @@ export const ThirdwebProvider = <TChains extends Chain[] = DefaultChains>(
|
|||||||
coinbaseWalletObj?.config?.callbackURL,
|
coinbaseWalletObj?.config?.callbackURL,
|
||||||
);
|
);
|
||||||
|
|
||||||
const hasMagicConfig = useMemo(
|
|
||||||
() => !!supportedWallets.find((wc) => wc.id === walletIds.magicLink),
|
|
||||||
[supportedWallets],
|
|
||||||
);
|
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<ThirdwebProviderCore
|
<ThirdwebProviderCore
|
||||||
supportedWallets={supportedWallets}
|
supportedWallets={supportedWallets}
|
||||||
@@ -188,19 +185,10 @@ export const ThirdwebProvider = <TChains extends Chain[] = DefaultChains>(
|
|||||||
>
|
>
|
||||||
<ThemeProvider theme={theme ? theme : "dark"}>
|
<ThemeProvider theme={theme ? theme : "dark"}>
|
||||||
<UIContextProvider locale={locale}>
|
<UIContextProvider locale={locale}>
|
||||||
{hasMagicConfig ? (
|
<DappContextProvider>
|
||||||
<SafeAreaProvider>
|
{children}
|
||||||
<DappContextProvider>
|
<MainModal />
|
||||||
{children}
|
</DappContextProvider>
|
||||||
<MainModal />
|
|
||||||
</DappContextProvider>
|
|
||||||
</SafeAreaProvider>
|
|
||||||
) : (
|
|
||||||
<DappContextProvider>
|
|
||||||
{children}
|
|
||||||
<MainModal />
|
|
||||||
</DappContextProvider>
|
|
||||||
)}
|
|
||||||
</UIContextProvider>
|
</UIContextProvider>
|
||||||
</ThemeProvider>
|
</ThemeProvider>
|
||||||
</ThirdwebProviderCore>
|
</ThirdwebProviderCore>
|
||||||
|
|||||||
@@ -1,7 +0,0 @@
|
|||||||
export function isGlobalThisPresent() {
|
|
||||||
return typeof globalThis !== "undefined";
|
|
||||||
}
|
|
||||||
|
|
||||||
export function isAppBundleIdPresentInGlobal() {
|
|
||||||
return isGlobalThisPresent() && "APP_BUNDLE_ID" in globalThis;
|
|
||||||
}
|
|
||||||
@@ -41,12 +41,14 @@ import {
|
|||||||
} from "../types";
|
} from "../types";
|
||||||
import { InAppBrowser } from "react-native-inappbrowser-reborn";
|
import { InAppBrowser } from "react-native-inappbrowser-reborn";
|
||||||
import { createErrorMessage } from "./helpers/errors";
|
import { createErrorMessage } from "./helpers/errors";
|
||||||
import {
|
|
||||||
appBundleId,
|
|
||||||
reactNativePackageVersion,
|
|
||||||
} from "../../../../utils/version";
|
|
||||||
import { BUNDLE_ID_HEADER } from "../../../../constants/headers";
|
|
||||||
import { ANALYTICS } from "./helpers/analytics";
|
import { ANALYTICS } from "./helpers/analytics";
|
||||||
|
import { getAnalyticsHeaders } from "../../../../../core/storage/utils";
|
||||||
|
|
||||||
|
const HEADERS = {
|
||||||
|
[EWS_VERSION_HEADER]: (globalThis as any).X_SDK_VERSION,
|
||||||
|
[THIRDWEB_SESSION_NONCE_HEADER]: ANALYTICS.nonce,
|
||||||
|
...getAnalyticsHeaders(),
|
||||||
|
};
|
||||||
|
|
||||||
export async function sendVerificationEmail(options: {
|
export async function sendVerificationEmail(options: {
|
||||||
email: string;
|
email: string;
|
||||||
@@ -196,9 +198,7 @@ export async function socialLogin(oauthOptions: OauthOption, clientId: string) {
|
|||||||
|
|
||||||
const resp = await fetch(headlessLoginLinkWithParams, {
|
const resp = await fetch(headlessLoginLinkWithParams, {
|
||||||
headers: {
|
headers: {
|
||||||
[EWS_VERSION_HEADER]: reactNativePackageVersion,
|
...HEADERS,
|
||||||
[BUNDLE_ID_HEADER]: appBundleId,
|
|
||||||
[THIRDWEB_SESSION_NONCE_HEADER]: ANALYTICS.nonce,
|
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
|
|
||||||
@@ -279,9 +279,7 @@ export async function customJwt(authOptions: AuthOptions, clientId: string) {
|
|||||||
method: "POST",
|
method: "POST",
|
||||||
headers: {
|
headers: {
|
||||||
"Content-Type": "application/json",
|
"Content-Type": "application/json",
|
||||||
[EWS_VERSION_HEADER]: reactNativePackageVersion,
|
...HEADERS,
|
||||||
[BUNDLE_ID_HEADER]: appBundleId,
|
|
||||||
[THIRDWEB_SESSION_NONCE_HEADER]: ANALYTICS.nonce,
|
|
||||||
},
|
},
|
||||||
body: JSON.stringify({
|
body: JSON.stringify({
|
||||||
jwt: jwt,
|
jwt: jwt,
|
||||||
@@ -329,9 +327,7 @@ export async function authEndpoint(
|
|||||||
method: "POST",
|
method: "POST",
|
||||||
headers: {
|
headers: {
|
||||||
"Content-Type": "application/json",
|
"Content-Type": "application/json",
|
||||||
[EWS_VERSION_HEADER]: reactNativePackageVersion,
|
...HEADERS,
|
||||||
[BUNDLE_ID_HEADER]: appBundleId,
|
|
||||||
[THIRDWEB_SESSION_NONCE_HEADER]: ANALYTICS.nonce,
|
|
||||||
},
|
},
|
||||||
body: JSON.stringify({
|
body: JSON.stringify({
|
||||||
payload: payload,
|
payload: payload,
|
||||||
|
|||||||
+6
-13
@@ -20,20 +20,17 @@ import {
|
|||||||
VerifiedTokenResponse,
|
VerifiedTokenResponse,
|
||||||
} from "../../../types";
|
} from "../../../types";
|
||||||
import { createErrorMessage } from "../errors";
|
import { createErrorMessage } from "../errors";
|
||||||
import {
|
|
||||||
appBundleId,
|
|
||||||
reactNativePackageVersion,
|
|
||||||
} from "../../../../../../utils/version";
|
|
||||||
import { BUNDLE_ID_HEADER } from "../../../../../../constants/headers";
|
|
||||||
import { ANALYTICS } from "../analytics";
|
import { ANALYTICS } from "../analytics";
|
||||||
|
import { getAnalyticsHeaders } from "../../../../../../../core/storage/utils";
|
||||||
|
|
||||||
const EMBEDDED_WALLET_TOKEN_HEADER = "embedded-wallet-token";
|
const EMBEDDED_WALLET_TOKEN_HEADER = "embedded-wallet-token";
|
||||||
const PAPER_CLIENT_ID_HEADER = "x-thirdweb-client-id";
|
const PAPER_CLIENT_ID_HEADER = "x-thirdweb-client-id";
|
||||||
|
|
||||||
const HEADERS = {
|
const HEADERS = {
|
||||||
"Content-Type": "application/json",
|
"Content-Type": "application/json",
|
||||||
[BUNDLE_ID_HEADER]: appBundleId,
|
[EWS_VERSION_HEADER]: (globalThis as any).X_SDK_VERSION,
|
||||||
[EWS_VERSION_HEADER]: reactNativePackageVersion,
|
|
||||||
[THIRDWEB_SESSION_NONCE_HEADER]: ANALYTICS.nonce,
|
[THIRDWEB_SESSION_NONCE_HEADER]: ANALYTICS.nonce,
|
||||||
|
...getAnalyticsHeaders(),
|
||||||
};
|
};
|
||||||
|
|
||||||
export const verifyClientId = async (clientId: string) => {
|
export const verifyClientId = async (clientId: string) => {
|
||||||
@@ -68,19 +65,15 @@ export const authFetchEmbeddedWalletUser = async (
|
|||||||
Authorization: `Bearer ${EMBEDDED_WALLET_TOKEN_HEADER}:${
|
Authorization: `Bearer ${EMBEDDED_WALLET_TOKEN_HEADER}:${
|
||||||
authTokenClient || ""
|
authTokenClient || ""
|
||||||
}`,
|
}`,
|
||||||
[BUNDLE_ID_HEADER]: appBundleId,
|
|
||||||
[PAPER_CLIENT_ID_HEADER]: clientId,
|
[PAPER_CLIENT_ID_HEADER]: clientId,
|
||||||
[EWS_VERSION_HEADER]: reactNativePackageVersion,
|
...HEADERS,
|
||||||
[THIRDWEB_SESSION_NONCE_HEADER]: ANALYTICS.nonce,
|
|
||||||
}
|
}
|
||||||
: {
|
: {
|
||||||
Authorization: `Bearer ${EMBEDDED_WALLET_TOKEN_HEADER}:${
|
Authorization: `Bearer ${EMBEDDED_WALLET_TOKEN_HEADER}:${
|
||||||
authTokenClient || ""
|
authTokenClient || ""
|
||||||
}`,
|
}`,
|
||||||
[BUNDLE_ID_HEADER]: appBundleId,
|
|
||||||
[PAPER_CLIENT_ID_HEADER]: clientId,
|
[PAPER_CLIENT_ID_HEADER]: clientId,
|
||||||
[EWS_VERSION_HEADER]: reactNativePackageVersion,
|
...HEADERS,
|
||||||
[THIRDWEB_SESSION_NONCE_HEADER]: ANALYTICS.nonce,
|
|
||||||
};
|
};
|
||||||
return fetch(url, params);
|
return fetch(url, params);
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -1,198 +0,0 @@
|
|||||||
import {
|
|
||||||
Magic,
|
|
||||||
MagicSDKAdditionalConfiguration,
|
|
||||||
} from "@magic-sdk/react-native-bare";
|
|
||||||
import { Chain, Connector, normalizeChainId } from "@thirdweb-dev/wallets";
|
|
||||||
import { Signer, ethers, providers } from "ethers";
|
|
||||||
import { defaultChains } from "@thirdweb-dev/chains";
|
|
||||||
import { MagicConnectorOptions } from "./types";
|
|
||||||
|
|
||||||
export class MagicConnector extends Connector<MagicConnectorOptions> {
|
|
||||||
magicSDK: Magic;
|
|
||||||
magicOptions: MagicConnectorOptions;
|
|
||||||
provider: any | undefined;
|
|
||||||
chains: Chain[];
|
|
||||||
magicSdkConfiguration: MagicSDKAdditionalConfiguration | undefined;
|
|
||||||
connectedChainId: number | undefined;
|
|
||||||
|
|
||||||
constructor(options: MagicConnectorOptions) {
|
|
||||||
super();
|
|
||||||
|
|
||||||
this.magicOptions = options;
|
|
||||||
this.chains = options.chains ? options.chains : defaultChains;
|
|
||||||
this.magicSdkConfiguration = options.magicSdkConfiguration;
|
|
||||||
this.magicSDK = this.initializeMagicSDK({ chainId: options?.chainId || 0 });
|
|
||||||
}
|
|
||||||
|
|
||||||
async connect(options: MagicConnectorOptions): Promise<string> {
|
|
||||||
if (!this.magicOptions.apiKey) {
|
|
||||||
throw new Error("Magic API Key is not provided.");
|
|
||||||
}
|
|
||||||
|
|
||||||
// if (options.chainId) {
|
|
||||||
// this.initializeMagicSDK({ chainId: options.chainId });
|
|
||||||
// }
|
|
||||||
await this.getProvider();
|
|
||||||
this.setupListeners();
|
|
||||||
this.emit("message", { type: "connecting" });
|
|
||||||
|
|
||||||
// Check if there is a user logged in
|
|
||||||
const isAuthenticated = await this.isConnected();
|
|
||||||
|
|
||||||
// Check if we have a chainId, in case of error just assign 0 for legacy
|
|
||||||
let chainId: number;
|
|
||||||
try {
|
|
||||||
chainId = await this.getChainId();
|
|
||||||
} catch (e) {
|
|
||||||
chainId = 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
this.connectedChainId = chainId;
|
|
||||||
|
|
||||||
// if there is a user logged in, return the user
|
|
||||||
if (isAuthenticated) {
|
|
||||||
return await this.getAddress();
|
|
||||||
}
|
|
||||||
|
|
||||||
const magic = this.getMagicSDK();
|
|
||||||
|
|
||||||
// LOGIN WITH MAGIC LINK WITH EMAIL
|
|
||||||
if (options.email) {
|
|
||||||
await magic.auth.loginWithEmailOTP({
|
|
||||||
email: options.email,
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
// LOGIN WITH MAGIC LINK WITH PHONE NUMBER
|
|
||||||
if (options.phoneNumber) {
|
|
||||||
await magic.auth.loginWithSMS({
|
|
||||||
phoneNumber: options.phoneNumber,
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
const signer = await this.getSigner();
|
|
||||||
let address = await signer.getAddress();
|
|
||||||
if (!address.startsWith("0x")) {
|
|
||||||
address = `0x${address}`;
|
|
||||||
}
|
|
||||||
|
|
||||||
return address;
|
|
||||||
}
|
|
||||||
async disconnect(): Promise<void> {
|
|
||||||
const magic = this.getMagicSDK();
|
|
||||||
await magic.user.logout();
|
|
||||||
}
|
|
||||||
async getAddress(): Promise<string> {
|
|
||||||
const signer = await this.getSigner();
|
|
||||||
|
|
||||||
const account = await signer.getAddress();
|
|
||||||
if (account.startsWith("0x")) {
|
|
||||||
return account;
|
|
||||||
}
|
|
||||||
return `0x${account}`;
|
|
||||||
}
|
|
||||||
async getSigner(): Promise<Signer> {
|
|
||||||
const provider = new ethers.providers.Web3Provider(
|
|
||||||
(await this.getProvider()) as any, // TODO: fix type mismatch
|
|
||||||
);
|
|
||||||
const signer = await provider.getSigner();
|
|
||||||
return signer;
|
|
||||||
}
|
|
||||||
getProvider(): Promise<providers.Provider> {
|
|
||||||
if (this.provider) {
|
|
||||||
return this.provider;
|
|
||||||
}
|
|
||||||
const magic = this.getMagicSDK();
|
|
||||||
this.provider = magic.rpcProvider;
|
|
||||||
return this.provider;
|
|
||||||
}
|
|
||||||
switchChain(chainId: number): Promise<void> {
|
|
||||||
const chain = this.chains.find((c) => c.chainId === chainId);
|
|
||||||
|
|
||||||
if (!chain) {
|
|
||||||
throw new Error("Chain not found");
|
|
||||||
}
|
|
||||||
|
|
||||||
if (this.connectedChainId !== chainId) {
|
|
||||||
this.initializeMagicSDK({ chainId });
|
|
||||||
}
|
|
||||||
|
|
||||||
return Promise.resolve();
|
|
||||||
}
|
|
||||||
isConnected(): Promise<boolean> {
|
|
||||||
const magic = this.getMagicSDK();
|
|
||||||
try {
|
|
||||||
return magic.user.isLoggedIn();
|
|
||||||
} catch (e) {
|
|
||||||
return Promise.resolve(false);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
async setupListeners(): Promise<void> {
|
|
||||||
this.provider?.on("accountsChanged", () => {
|
|
||||||
throw new Error("Accounts changed not implemented");
|
|
||||||
});
|
|
||||||
this.provider?.on("chainChanged", this.onChainChanged);
|
|
||||||
this.provider?.on("disconnect", this.onDisconnect);
|
|
||||||
|
|
||||||
return Promise.resolve();
|
|
||||||
}
|
|
||||||
|
|
||||||
updateChains(chains: Chain[]): void {
|
|
||||||
this.chains = chains;
|
|
||||||
}
|
|
||||||
|
|
||||||
// my methods
|
|
||||||
|
|
||||||
onDisconnect(): void {
|
|
||||||
this.emit("disconnect");
|
|
||||||
}
|
|
||||||
|
|
||||||
getMagicSDK() {
|
|
||||||
if (!this.magicSDK) {
|
|
||||||
return this.initializeMagicSDK();
|
|
||||||
}
|
|
||||||
return this.magicSDK;
|
|
||||||
}
|
|
||||||
|
|
||||||
initializeMagicSDK({ chainId }: { chainId?: number } = {}) {
|
|
||||||
if (chainId) {
|
|
||||||
const chain = this.chains.find((c) => c.chainId === chainId);
|
|
||||||
if (chain) {
|
|
||||||
this.magicSdkConfiguration = this.magicSdkConfiguration || {};
|
|
||||||
this.magicSdkConfiguration.network = {
|
|
||||||
rpcUrl: chain.rpc[0],
|
|
||||||
chainId: chain.chainId,
|
|
||||||
};
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
this.magicSDK = new Magic(
|
|
||||||
this.magicOptions.apiKey,
|
|
||||||
this.magicSdkConfiguration,
|
|
||||||
);
|
|
||||||
this.provider = this.magicSDK.rpcProvider;
|
|
||||||
|
|
||||||
return this.magicSDK;
|
|
||||||
}
|
|
||||||
|
|
||||||
async getChainId(): Promise<number> {
|
|
||||||
const networkOptions = this.magicSdkConfiguration?.network;
|
|
||||||
if (typeof networkOptions === "object") {
|
|
||||||
const chainID = networkOptions.chainId;
|
|
||||||
if (chainID) {
|
|
||||||
return normalizeChainId(chainID);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
throw new Error("Chain ID is not defined");
|
|
||||||
}
|
|
||||||
|
|
||||||
protected isChainUnsupported(chainId: number) {
|
|
||||||
return !this.chains.some((x) => x.chainId === chainId);
|
|
||||||
}
|
|
||||||
|
|
||||||
protected onChainChanged(chainId: string | number): void {
|
|
||||||
const id = normalizeChainId(chainId);
|
|
||||||
const unsupported = this.isChainUnsupported(id);
|
|
||||||
this.emit("change", { chain: { id, unsupported } });
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -1,17 +0,0 @@
|
|||||||
import { MagicSDKAdditionalConfiguration } from "@magic-sdk/react-native-bare";
|
|
||||||
import { Chain } from "@thirdweb-dev/chains";
|
|
||||||
import { WalletOptions } from "@thirdweb-dev/wallets";
|
|
||||||
|
|
||||||
export interface MagicConnectorOptions {
|
|
||||||
apiKey: string;
|
|
||||||
magicSdkConfiguration?: MagicSDKAdditionalConfiguration;
|
|
||||||
chains?: Chain[];
|
|
||||||
chainId?: number;
|
|
||||||
email?: string;
|
|
||||||
phoneNumber?: string;
|
|
||||||
}
|
|
||||||
|
|
||||||
export type MagicLinkOptions = Omit<
|
|
||||||
WalletOptions<MagicConnectorOptions>,
|
|
||||||
"clientId"
|
|
||||||
>;
|
|
||||||
@@ -1,83 +0,0 @@
|
|||||||
import { AbstractClientWallet, walletIds } from "@thirdweb-dev/wallets";
|
|
||||||
import {
|
|
||||||
MagicConnectorOptions,
|
|
||||||
MagicLinkOptions,
|
|
||||||
} from "../connectors/magic/types";
|
|
||||||
import type { MagicConnector as MagicConnectorType } from "../connectors/magic/magic-connector";
|
|
||||||
import { MagicConnector } from "../connectors/magic/magic-connector";
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @deprecated We have deprecated magicLink in favor of our embeddedWallet which adds support for more sign in methods.
|
|
||||||
* To learn more, please see:
|
|
||||||
*
|
|
||||||
* Checkout the [Release Notes](https://portal.thirdweb.com/wallets/embedded-wallet/overview) and [Documentation](https://portal.thirdweb.com/react-native/v0/wallets/embedded-wallet) for more information.
|
|
||||||
*/
|
|
||||||
export class MagicLink extends AbstractClientWallet<
|
|
||||||
MagicLinkOptions,
|
|
||||||
MagicConnectorOptions
|
|
||||||
> {
|
|
||||||
connector?: MagicConnectorType;
|
|
||||||
options: MagicLinkOptions;
|
|
||||||
|
|
||||||
static meta = {
|
|
||||||
iconURL:
|
|
||||||
"ipfs://QmUMBFZGXxBpgDmZzZAHhbcCL5nYvZnVaYLTajsNjLcxMU/1-Icon_Magic_Color.svg",
|
|
||||||
name: "Magic Link",
|
|
||||||
};
|
|
||||||
|
|
||||||
static id = walletIds.magicLink;
|
|
||||||
|
|
||||||
constructor(options: MagicLinkOptions) {
|
|
||||||
super(walletIds.magicLink, options);
|
|
||||||
|
|
||||||
this.options = options;
|
|
||||||
|
|
||||||
this.initializeConnector();
|
|
||||||
}
|
|
||||||
|
|
||||||
async getConnector(): Promise<MagicConnectorType> {
|
|
||||||
if (!this.connector) {
|
|
||||||
return await this.initializeConnector();
|
|
||||||
}
|
|
||||||
return this.connector;
|
|
||||||
}
|
|
||||||
|
|
||||||
// my methods
|
|
||||||
|
|
||||||
initializeConnector() {
|
|
||||||
this.connector = new MagicConnector({
|
|
||||||
...this.options,
|
|
||||||
chainId: this.options.chainId,
|
|
||||||
chains: this.chains,
|
|
||||||
});
|
|
||||||
|
|
||||||
return this.connector;
|
|
||||||
}
|
|
||||||
|
|
||||||
getMagicSDK() {
|
|
||||||
return (this.connector as MagicConnector)?.getMagicSDK();
|
|
||||||
}
|
|
||||||
|
|
||||||
async autoConnect(options?: MagicConnectorOptions) {
|
|
||||||
this.connector?.initializeMagicSDK(options);
|
|
||||||
const magic = this.getMagicSDK();
|
|
||||||
if (await magic.user.isLoggedIn()) {
|
|
||||||
return super.autoConnect(options);
|
|
||||||
} else {
|
|
||||||
throw new Error("Magic user is not logged in");
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
async disconnect() {
|
|
||||||
const magic = this.getMagicSDK();
|
|
||||||
await magic.user.logout();
|
|
||||||
return super.disconnect();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @deprecated Use `MagicLink` instead
|
|
||||||
*
|
|
||||||
* Renamed for consistency with our React package
|
|
||||||
*/
|
|
||||||
export class MagicWallet extends MagicLink {}
|
|
||||||
@@ -1,192 +0,0 @@
|
|||||||
import { walletIds } from "@thirdweb-dev/wallets";
|
|
||||||
import {
|
|
||||||
ConnectUIProps,
|
|
||||||
SelectUIProps,
|
|
||||||
WalletConfig,
|
|
||||||
WalletOptions,
|
|
||||||
useCreateWalletInstance,
|
|
||||||
useSetConnectedWallet,
|
|
||||||
useSetConnectionStatus,
|
|
||||||
useWalletContext,
|
|
||||||
} from "@thirdweb-dev/react-core";
|
|
||||||
import { MagicLinkOptions } from "../connectors/magic/types";
|
|
||||||
import { MagicLink } from "./MagicLink";
|
|
||||||
import { useEffect, useRef } from "react";
|
|
||||||
import Box from "../../components/base/Box";
|
|
||||||
import { TextInput } from "../../components/base/TextInput";
|
|
||||||
import Text from "../../components/base/Text";
|
|
||||||
import { useMagicLink } from "../../providers/context-provider";
|
|
||||||
import BaseButton from "../../components/base/BaseButton";
|
|
||||||
import React from "react";
|
|
||||||
import { ConnectingWallet } from "../../components/ConnectWalletFlow/ConnectingWallet/ConnectingWallet";
|
|
||||||
import { useGlobalTheme, useLocale } from "../../providers/ui-context-provider";
|
|
||||||
|
|
||||||
/**
|
|
||||||
*
|
|
||||||
* @param magicLinkOptions - Options available to create a magic link wallet
|
|
||||||
* @returns A WalletConfig<MagicLink> object
|
|
||||||
*
|
|
||||||
* @deprecated We have deprecated magicLink in favor of our embeddedWallet which adds support for more sign in methods.
|
|
||||||
* To learn more, please see:
|
|
||||||
*
|
|
||||||
* Check out [Release Note](https://portal.thirdweb.com/wallets/embedded-wallet/overview) and [Documentation](https://portal.thirdweb.com/react-native/v0/wallets/embedded-wallet) for more details.
|
|
||||||
*/
|
|
||||||
export const magicLink = (
|
|
||||||
magicLinkOptions: MagicLinkOptions & { recommended?: boolean },
|
|
||||||
): WalletConfig<MagicLink> => {
|
|
||||||
return {
|
|
||||||
id: walletIds.magicLink,
|
|
||||||
meta: MagicLink.meta,
|
|
||||||
create: (options: WalletOptions) => {
|
|
||||||
return new MagicLink({
|
|
||||||
...options,
|
|
||||||
...magicLinkOptions,
|
|
||||||
chainId: options.chain.chainId,
|
|
||||||
});
|
|
||||||
},
|
|
||||||
/**
|
|
||||||
* UI for connecting wallet
|
|
||||||
*/
|
|
||||||
connectUI(props) {
|
|
||||||
return (
|
|
||||||
<MagicConnectionUI {...props} magicLinkOptions={magicLinkOptions} />
|
|
||||||
);
|
|
||||||
},
|
|
||||||
/**
|
|
||||||
* UI for selecting wallet - this UI is rendered in the wallet selection screen
|
|
||||||
*/
|
|
||||||
selectUI: MagicSelectionUI,
|
|
||||||
isInstalled: () => {
|
|
||||||
return true;
|
|
||||||
},
|
|
||||||
recommended: magicLinkOptions?.recommended,
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
const MagicSelectionUI: React.FC<SelectUIProps<MagicLink>> = (props) => {
|
|
||||||
const l = useLocale();
|
|
||||||
const theme = useGlobalTheme();
|
|
||||||
const [email, setEmail] = React.useState("");
|
|
||||||
|
|
||||||
const onContinuePress = () => {
|
|
||||||
if (!email) {
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
props.onSelect(email);
|
|
||||||
};
|
|
||||||
|
|
||||||
return (
|
|
||||||
<Box paddingHorizontal="xl" mt="lg">
|
|
||||||
<TextInput
|
|
||||||
textInputProps={{
|
|
||||||
placeholder: l.embedded_wallet.enter_your_email,
|
|
||||||
placeholderTextColor: theme.colors.textSecondary,
|
|
||||||
onChangeText: (text: string) => {
|
|
||||||
setEmail(text);
|
|
||||||
},
|
|
||||||
style: {
|
|
||||||
fontSize: 14,
|
|
||||||
color: theme.colors.textPrimary,
|
|
||||||
fontFamily: theme.textVariants.defaults.fontFamily,
|
|
||||||
lineHeight: 16,
|
|
||||||
padding: 0,
|
|
||||||
},
|
|
||||||
}}
|
|
||||||
containerProps={{
|
|
||||||
paddingHorizontal: "sm",
|
|
||||||
paddingVertical: "sm",
|
|
||||||
}}
|
|
||||||
/>
|
|
||||||
<BaseButton
|
|
||||||
mt="md"
|
|
||||||
paddingVertical="md"
|
|
||||||
borderRadius="lg"
|
|
||||||
borderWidth={1}
|
|
||||||
borderColor="border"
|
|
||||||
backgroundColor="accentButtonColor"
|
|
||||||
onPress={onContinuePress}
|
|
||||||
>
|
|
||||||
<Text
|
|
||||||
variant="bodySmall"
|
|
||||||
color="accentButtonTextColor"
|
|
||||||
fontWeight="700"
|
|
||||||
>
|
|
||||||
{l.common.continue}
|
|
||||||
</Text>
|
|
||||||
</BaseButton>
|
|
||||||
</Box>
|
|
||||||
);
|
|
||||||
};
|
|
||||||
|
|
||||||
const MagicConnectionUI: React.FC<
|
|
||||||
ConnectUIProps<MagicLink> & { magicLinkOptions: MagicLinkOptions }
|
|
||||||
> = ({ selectionData, walletConfig, connected, goBack, magicLinkOptions }) => {
|
|
||||||
const createWalletInstance = useCreateWalletInstance();
|
|
||||||
const setConnectedWallet = useSetConnectedWallet();
|
|
||||||
const chainToConnect = useWalletContext().chainToConnect;
|
|
||||||
const setConnectionStatus = useSetConnectionStatus();
|
|
||||||
const { magicLink: ctxMagicLink, setMagicLink } = useMagicLink();
|
|
||||||
|
|
||||||
useEffect(() => {
|
|
||||||
const inst = createWalletInstance(walletConfig);
|
|
||||||
setMagicLink?.(inst);
|
|
||||||
}, [createWalletInstance, setMagicLink, walletConfig]);
|
|
||||||
|
|
||||||
const connectPrompted = useRef(false);
|
|
||||||
|
|
||||||
useEffect(() => {
|
|
||||||
if (connectPrompted.current || !ctxMagicLink) {
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
connectPrompted.current = true;
|
|
||||||
const isEmail = (selectionData as string).includes("@");
|
|
||||||
|
|
||||||
(async () => {
|
|
||||||
// close();
|
|
||||||
try {
|
|
||||||
setConnectionStatus("connecting");
|
|
||||||
const connectParams = {
|
|
||||||
chainId: chainToConnect?.chainId,
|
|
||||||
...magicLinkOptions,
|
|
||||||
...(isEmail
|
|
||||||
? { email: selectionData }
|
|
||||||
: { phoneNumber: selectionData }),
|
|
||||||
};
|
|
||||||
connected();
|
|
||||||
await ctxMagicLink.connect(connectParams);
|
|
||||||
await ctxMagicLink.getMagicSDK().user.getMetadata();
|
|
||||||
|
|
||||||
setConnectedWallet(ctxMagicLink, connectParams);
|
|
||||||
setConnectionStatus("connected");
|
|
||||||
} catch (e) {
|
|
||||||
setConnectionStatus("disconnected");
|
|
||||||
console.error("Error connecting to magic", e);
|
|
||||||
}
|
|
||||||
})();
|
|
||||||
}, [
|
|
||||||
selectionData,
|
|
||||||
walletConfig,
|
|
||||||
connected,
|
|
||||||
ctxMagicLink,
|
|
||||||
setConnectedWallet,
|
|
||||||
setConnectionStatus,
|
|
||||||
chainToConnect?.chainId,
|
|
||||||
magicLinkOptions,
|
|
||||||
]);
|
|
||||||
|
|
||||||
return (
|
|
||||||
<ConnectingWallet
|
|
||||||
subHeaderText=""
|
|
||||||
wallet={walletConfig}
|
|
||||||
onClose={connected}
|
|
||||||
onBackPress={goBack}
|
|
||||||
/>
|
|
||||||
);
|
|
||||||
};
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @deprecated Use `magicLink()` instead
|
|
||||||
*
|
|
||||||
* Renamed for consistency with our React package
|
|
||||||
*/
|
|
||||||
export const magicWallet = magicLink;
|
|
||||||
@@ -1,8 +1 @@
|
|||||||
import { isGlobalThisPresent } from "./evm/utils/global";
|
|
||||||
import { appBundleId } from "./evm/utils/version";
|
|
||||||
|
|
||||||
export * from "./evm";
|
export * from "./evm";
|
||||||
|
|
||||||
if (isGlobalThisPresent()) {
|
|
||||||
(globalThis as any).APP_BUNDLE_ID = appBundleId;
|
|
||||||
}
|
|
||||||
|
|||||||
File diff suppressed because it is too large
Load Diff
Binary file not shown.
@@ -1,5 +1,50 @@
|
|||||||
# @thirdweb-dev/react
|
# @thirdweb-dev/react
|
||||||
|
|
||||||
|
## 4.4.4
|
||||||
|
|
||||||
|
### Patch Changes
|
||||||
|
|
||||||
|
- [#2252](https://github.com/thirdweb-dev/js/pull/2252) [`439a377a`](https://github.com/thirdweb-dev/js/commit/439a377aa77ce86631a78daa4a409e00e48f69be) Thanks [@MananTank](https://github.com/MananTank)! - Add `detailsModalFooter` prop on `<ConnectWallet />` component to allow rendering a custom UI at the bottom of the details modal.
|
||||||
|
|
||||||
|
```tsx
|
||||||
|
<ConnectWallet
|
||||||
|
detailsModalFooter={(props) => {
|
||||||
|
const { close } = props;
|
||||||
|
return <div> .... </div>;
|
||||||
|
}}
|
||||||
|
/>
|
||||||
|
```
|
||||||
|
|
||||||
|
- Updated dependencies [[`4f52c296`](https://github.com/thirdweb-dev/js/commit/4f52c2961131636eed323a66568a519246d9f91d), [`374671fd`](https://github.com/thirdweb-dev/js/commit/374671fd9ac97a93263b09c6c0a53cfd129881d7)]:
|
||||||
|
- @thirdweb-dev/sdk@4.0.32
|
||||||
|
- @thirdweb-dev/chains@0.1.69
|
||||||
|
- @thirdweb-dev/react-core@4.4.4
|
||||||
|
- @thirdweb-dev/wallets@2.4.7
|
||||||
|
|
||||||
|
## 4.4.3
|
||||||
|
|
||||||
|
### Patch Changes
|
||||||
|
|
||||||
|
- [#2224](https://github.com/thirdweb-dev/js/pull/2224) [`3ba15366`](https://github.com/thirdweb-dev/js/commit/3ba15366be8b57e577b871c44e386978dc9d4a8a) Thanks [@0xFirekeeper](https://github.com/0xFirekeeper)! - Adds correct reporing headers
|
||||||
|
|
||||||
|
- [#2224](https://github.com/thirdweb-dev/js/pull/2224) [`3ba15366`](https://github.com/thirdweb-dev/js/commit/3ba15366be8b57e577b871c44e386978dc9d4a8a) Thanks [@0xFirekeeper](https://github.com/0xFirekeeper)! - Adds global sdk vars
|
||||||
|
|
||||||
|
- Updated dependencies [[`3ba15366`](https://github.com/thirdweb-dev/js/commit/3ba15366be8b57e577b871c44e386978dc9d4a8a), [`771bd1e1`](https://github.com/thirdweb-dev/js/commit/771bd1e1b280681992195103c22aafa1fb98f7e0)]:
|
||||||
|
- @thirdweb-dev/wallets@2.4.6
|
||||||
|
- @thirdweb-dev/sdk@4.0.31
|
||||||
|
- @thirdweb-dev/chains@0.1.68
|
||||||
|
- @thirdweb-dev/react-core@4.4.3
|
||||||
|
|
||||||
|
## 4.4.2
|
||||||
|
|
||||||
|
### Patch Changes
|
||||||
|
|
||||||
|
- Updated dependencies [[`39e79282`](https://github.com/thirdweb-dev/js/commit/39e79282acb70959ba8140c779fa521c41c80a5f), [`69c3eb91`](https://github.com/thirdweb-dev/js/commit/69c3eb910feb2265833a07b7472e32fac5a79d90)]:
|
||||||
|
- @thirdweb-dev/chains@0.1.67
|
||||||
|
- @thirdweb-dev/react-core@4.4.2
|
||||||
|
- @thirdweb-dev/sdk@4.0.30
|
||||||
|
- @thirdweb-dev/wallets@2.4.5
|
||||||
|
|
||||||
## 4.4.1
|
## 4.4.1
|
||||||
|
|
||||||
### Patch Changes
|
### Patch Changes
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "@thirdweb-dev/react",
|
"name": "@thirdweb-dev/react",
|
||||||
"version": "4.4.1",
|
"version": "4.4.4",
|
||||||
"repository": "https://github.com/thirdweb-dev/js/tree/main/packages/react",
|
"repository": "https://github.com/thirdweb-dev/js/tree/main/packages/react",
|
||||||
"author": "thirdweb eng <[email protected]>",
|
"author": "thirdweb eng <[email protected]>",
|
||||||
"license": "Apache-2.0",
|
"license": "Apache-2.0",
|
||||||
@@ -89,7 +89,7 @@
|
|||||||
"@types/react-dom": "^18.2.7",
|
"@types/react-dom": "^18.2.7",
|
||||||
"@types/uuid": "^9.0.5",
|
"@types/uuid": "^9.0.5",
|
||||||
"@typescript-eslint/eslint-plugin": "^6.2.0",
|
"@typescript-eslint/eslint-plugin": "^6.2.0",
|
||||||
"@typescript-eslint/parser": "^6.2.0",
|
"@typescript-eslint/parser": "^6.19.1",
|
||||||
"eslint": "^8.56.0",
|
"eslint": "^8.56.0",
|
||||||
"eslint-config-prettier": "^8.9.0",
|
"eslint-config-prettier": "^8.9.0",
|
||||||
"eslint-config-thirdweb": "workspace:*",
|
"eslint-config-thirdweb": "workspace:*",
|
||||||
|
|||||||
@@ -21,13 +21,13 @@ export const ScreenBottomContainer = /* @__PURE__ */ StyledDiv(() => {
|
|||||||
};
|
};
|
||||||
});
|
});
|
||||||
|
|
||||||
export const noScrollBar: CSSObject = /* @__PURE__ */ {
|
export const noScrollBar = /* @__PURE__ */ {
|
||||||
scrollbarWidth: "none",
|
scrollbarWidth: "none",
|
||||||
"&::-webkit-scrollbar": {
|
"&::-webkit-scrollbar": {
|
||||||
width: 0,
|
width: 0,
|
||||||
display: "none",
|
display: "none",
|
||||||
},
|
},
|
||||||
};
|
} satisfies CSSObject;
|
||||||
|
|
||||||
export function ModalHeader(props: {
|
export function ModalHeader(props: {
|
||||||
onBack?: () => void;
|
onBack?: () => void;
|
||||||
|
|||||||
@@ -16,6 +16,7 @@ import { en } from "../locales/en";
|
|||||||
import { ThirdwebLocaleContext } from "./locale-provider";
|
import { ThirdwebLocaleContext } from "./locale-provider";
|
||||||
import { walletIds } from "@thirdweb-dev/wallets";
|
import { walletIds } from "@thirdweb-dev/wallets";
|
||||||
import { ThirdwebLocale } from "../locales/types";
|
import { ThirdwebLocale } from "../locales/types";
|
||||||
|
import { getAnalyticsGlobals } from "../utils/headers";
|
||||||
|
|
||||||
export interface ThirdwebProviderProps<TChains extends Chain[]>
|
export interface ThirdwebProviderProps<TChains extends Chain[]>
|
||||||
extends Omit<
|
extends Omit<
|
||||||
@@ -479,6 +480,8 @@ export const ThirdwebProvider = <TChains extends Chain[] = DefaultChains>(
|
|||||||
...restProps
|
...restProps
|
||||||
} = props;
|
} = props;
|
||||||
|
|
||||||
|
getAnalyticsGlobals();
|
||||||
|
|
||||||
const wallets: WalletConfig[] = supportedWallets || defaultWallets;
|
const wallets: WalletConfig[] = supportedWallets || defaultWallets;
|
||||||
const theme = _theme || "dark";
|
const theme = _theme || "dark";
|
||||||
|
|
||||||
|
|||||||
@@ -0,0 +1,30 @@
|
|||||||
|
import packageJson from "../../../package.json";
|
||||||
|
import { detectOS } from "./isMobile";
|
||||||
|
|
||||||
|
export function getAnalyticsGlobals() {
|
||||||
|
if (typeof globalThis === "undefined") {
|
||||||
|
return {
|
||||||
|
x_sdk_name: packageJson.name,
|
||||||
|
x_sdk_platform: "browser",
|
||||||
|
x_sdk_version: packageJson.version,
|
||||||
|
x_sdk_os: detectOS(),
|
||||||
|
app_bundle_id: undefined,
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
|
if ((globalThis as any).X_SDK_NAME === undefined) {
|
||||||
|
(globalThis as any).X_SDK_NAME = packageJson.name;
|
||||||
|
(globalThis as any).X_SDK_PLATFORM = "browser";
|
||||||
|
(globalThis as any).X_SDK_VERSION = packageJson.version;
|
||||||
|
(globalThis as any).X_SDK_OS = detectOS();
|
||||||
|
(globalThis as any).APP_BUNDLE_ID = undefined;
|
||||||
|
}
|
||||||
|
|
||||||
|
return {
|
||||||
|
x_sdk_name: (globalThis as any).X_SDK_NAME,
|
||||||
|
x_sdk_platform: (globalThis as any).X_SDK_PLATFORM,
|
||||||
|
x_sdk_version: (globalThis as any).X_SDK_VERSION,
|
||||||
|
x_sdk_os: (globalThis as any).X_SDK_OS,
|
||||||
|
app_bundle_id: (globalThis as any).APP_BUNDLE_ID,
|
||||||
|
};
|
||||||
|
}
|
||||||
@@ -41,7 +41,7 @@ export function isIOS(): boolean {
|
|||||||
/**
|
/**
|
||||||
* @internal
|
* @internal
|
||||||
*/
|
*/
|
||||||
function detectOS() {
|
export function detectOS() {
|
||||||
const env = detectEnv();
|
const env = detectEnv();
|
||||||
return env?.os ? env.os : undefined;
|
return env?.os ? env.os : undefined;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -12,7 +12,7 @@ import {
|
|||||||
useWalletContext,
|
useWalletContext,
|
||||||
useWallets,
|
useWallets,
|
||||||
} from "@thirdweb-dev/react-core";
|
} from "@thirdweb-dev/react-core";
|
||||||
import { useContext, useEffect, useMemo, useState } from "react";
|
import React, { useContext, useEffect, useMemo, useState } from "react";
|
||||||
import {
|
import {
|
||||||
SetModalConfigCtx,
|
SetModalConfigCtx,
|
||||||
useSetIsWalletModalOpen,
|
useSetIsWalletModalOpen,
|
||||||
@@ -337,6 +337,21 @@ export type ConnectWalletProps = {
|
|||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
onConnect?: () => void;
|
onConnect?: () => void;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Render custom UI at the bottom of the ConnectWallet Details Modal
|
||||||
|
* @param props - props passed to the footer component which includes a function to close the modal
|
||||||
|
* @example
|
||||||
|
* ```tsx
|
||||||
|
* <ConnectWallet
|
||||||
|
* detailsModalFooter={(props) => {
|
||||||
|
* const { close } = props;
|
||||||
|
* return <div> ... </div>
|
||||||
|
* })
|
||||||
|
* />
|
||||||
|
* ```
|
||||||
|
*/
|
||||||
|
detailsModalFooter?: (props: { close: () => void }) => JSX.Element;
|
||||||
};
|
};
|
||||||
|
|
||||||
const TW_CONNECT_WALLET = "tw-connect-wallet";
|
const TW_CONNECT_WALLET = "tw-connect-wallet";
|
||||||
@@ -559,6 +574,20 @@ const TW_CONNECT_WALLET = "tw-connect-wallet";
|
|||||||
* ```tsx
|
* ```tsx
|
||||||
* <ConnectWallet hideDisconnect={true} />
|
* <ConnectWallet hideDisconnect={true} />
|
||||||
* ```
|
* ```
|
||||||
|
*
|
||||||
|
* ### detailsModalFooter
|
||||||
|
* Render custom UI at the bottom of the ConnectWallet Details Modal.
|
||||||
|
*
|
||||||
|
* The given function is passed an object with a `close` function which can be used to close the modal.
|
||||||
|
*
|
||||||
|
* ```tsx
|
||||||
|
* <ConnectWallet
|
||||||
|
* detailsModalFooter={(props) => {
|
||||||
|
* const { close } = props;
|
||||||
|
* return <div> ... </div>
|
||||||
|
* })
|
||||||
|
* />
|
||||||
|
* ```
|
||||||
*/
|
*/
|
||||||
export function ConnectWallet(props: ConnectWalletProps) {
|
export function ConnectWallet(props: ConnectWalletProps) {
|
||||||
const activeWallet = useWallet();
|
const activeWallet = useWallet();
|
||||||
@@ -754,6 +783,7 @@ export function ConnectWallet(props: ConnectWalletProps) {
|
|||||||
}}
|
}}
|
||||||
hideSwitchToPersonalWallet={props.hideSwitchToPersonalWallet}
|
hideSwitchToPersonalWallet={props.hideSwitchToPersonalWallet}
|
||||||
hideDisconnect={props.hideDisconnect}
|
hideDisconnect={props.hideDisconnect}
|
||||||
|
detailsModalFooter={props.detailsModalFooter}
|
||||||
/>
|
/>
|
||||||
);
|
);
|
||||||
})()}
|
})()}
|
||||||
|
|||||||
@@ -96,6 +96,7 @@ export const ConnectedWalletDetails: React.FC<{
|
|||||||
displayBalanceToken?: Record<number, string>;
|
displayBalanceToken?: Record<number, string>;
|
||||||
hideSwitchToPersonalWallet?: boolean;
|
hideSwitchToPersonalWallet?: boolean;
|
||||||
hideDisconnect?: boolean;
|
hideDisconnect?: boolean;
|
||||||
|
detailsModalFooter?: (props: { close: () => void }) => JSX.Element;
|
||||||
}> = (props) => {
|
}> = (props) => {
|
||||||
const locale = useTWLocale().connectWallet;
|
const locale = useTWLocale().connectWallet;
|
||||||
const chain = useChain();
|
const chain = useChain();
|
||||||
@@ -517,6 +518,10 @@ export const ConnectedWalletDetails: React.FC<{
|
|||||||
</MenuButton>
|
</MenuButton>
|
||||||
</div>
|
</div>
|
||||||
)}
|
)}
|
||||||
|
|
||||||
|
{props.detailsModalFooter && (
|
||||||
|
<props.detailsModalFooter close={() => setIsOpen(false)} />
|
||||||
|
)}
|
||||||
</Container>
|
</Container>
|
||||||
|
|
||||||
<Spacer y="md" />
|
<Spacer y="md" />
|
||||||
|
|||||||
File diff suppressed because it is too large
Load Diff
Binary file not shown.
@@ -1,5 +1,31 @@
|
|||||||
# @thirdweb-dev/sdk
|
# @thirdweb-dev/sdk
|
||||||
|
|
||||||
|
## 4.0.32
|
||||||
|
|
||||||
|
### Patch Changes
|
||||||
|
|
||||||
|
- [#2248](https://github.com/thirdweb-dev/js/pull/2248) [`4f52c296`](https://github.com/thirdweb-dev/js/commit/4f52c2961131636eed323a66568a519246d9f91d) Thanks [@nachoiacovino](https://github.com/nachoiacovino)! - Update link for support
|
||||||
|
|
||||||
|
- Updated dependencies [[`374671fd`](https://github.com/thirdweb-dev/js/commit/374671fd9ac97a93263b09c6c0a53cfd129881d7)]:
|
||||||
|
- @thirdweb-dev/chains@0.1.69
|
||||||
|
|
||||||
|
## 4.0.31
|
||||||
|
|
||||||
|
### Patch Changes
|
||||||
|
|
||||||
|
- [#2224](https://github.com/thirdweb-dev/js/pull/2224) [`3ba15366`](https://github.com/thirdweb-dev/js/commit/3ba15366be8b57e577b871c44e386978dc9d4a8a) Thanks [@0xFirekeeper](https://github.com/0xFirekeeper)! - Adds correct reporing headers
|
||||||
|
|
||||||
|
- Updated dependencies [[`3ba15366`](https://github.com/thirdweb-dev/js/commit/3ba15366be8b57e577b871c44e386978dc9d4a8a), [`771bd1e1`](https://github.com/thirdweb-dev/js/commit/771bd1e1b280681992195103c22aafa1fb98f7e0)]:
|
||||||
|
- @thirdweb-dev/storage@2.0.9
|
||||||
|
- @thirdweb-dev/chains@0.1.68
|
||||||
|
|
||||||
|
## 4.0.30
|
||||||
|
|
||||||
|
### Patch Changes
|
||||||
|
|
||||||
|
- Updated dependencies [[`39e79282`](https://github.com/thirdweb-dev/js/commit/39e79282acb70959ba8140c779fa521c41c80a5f), [`69c3eb91`](https://github.com/thirdweb-dev/js/commit/69c3eb910feb2265833a07b7472e32fac5a79d90)]:
|
||||||
|
- @thirdweb-dev/chains@0.1.67
|
||||||
|
|
||||||
## 4.0.29
|
## 4.0.29
|
||||||
|
|
||||||
### Patch Changes
|
### Patch Changes
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "@thirdweb-dev/sdk",
|
"name": "@thirdweb-dev/sdk",
|
||||||
"version": "4.0.29",
|
"version": "4.0.32",
|
||||||
"description": "The main thirdweb SDK.",
|
"description": "The main thirdweb SDK.",
|
||||||
"repository": "https://github.com/thirdweb-dev/js/tree/main/packages/sdk",
|
"repository": "https://github.com/thirdweb-dev/js/tree/main/packages/sdk",
|
||||||
"license": "Apache-2.0",
|
"license": "Apache-2.0",
|
||||||
@@ -93,7 +93,7 @@
|
|||||||
"@types/node": "^18.17.1",
|
"@types/node": "^18.17.1",
|
||||||
"@types/uuid": "^9.0.5",
|
"@types/uuid": "^9.0.5",
|
||||||
"@typescript-eslint/eslint-plugin": "^6.2.0",
|
"@typescript-eslint/eslint-plugin": "^6.2.0",
|
||||||
"@typescript-eslint/parser": "^6.2.0",
|
"@typescript-eslint/parser": "^6.19.1",
|
||||||
"chai": "^4.3.6",
|
"chai": "^4.3.6",
|
||||||
"deep-equal-in-any-order": "^1.1.18",
|
"deep-equal-in-any-order": "^1.1.18",
|
||||||
"dotenv-mono": "^1.3.10",
|
"dotenv-mono": "^1.3.10",
|
||||||
|
|||||||
@@ -0,0 +1,338 @@
|
|||||||
|
/**
|
||||||
|
* @internal
|
||||||
|
*
|
||||||
|
* The code below comes from the package https://github.com/DamonOehlman/detect-browser
|
||||||
|
*/
|
||||||
|
|
||||||
|
export type DetectedInfoType =
|
||||||
|
| "browser"
|
||||||
|
| "node"
|
||||||
|
| "bot-device"
|
||||||
|
| "bot"
|
||||||
|
| "react-native";
|
||||||
|
|
||||||
|
interface DetectedInfo<
|
||||||
|
T extends DetectedInfoType,
|
||||||
|
N extends string,
|
||||||
|
O,
|
||||||
|
V = null,
|
||||||
|
> {
|
||||||
|
readonly type: T;
|
||||||
|
readonly name: N;
|
||||||
|
readonly version: V;
|
||||||
|
readonly os: O;
|
||||||
|
}
|
||||||
|
|
||||||
|
export class BrowserInfo
|
||||||
|
implements DetectedInfo<"browser", Browser, OperatingSystem | null, string>
|
||||||
|
{
|
||||||
|
public readonly type = "browser";
|
||||||
|
constructor(
|
||||||
|
public readonly name: Browser,
|
||||||
|
public readonly version: string,
|
||||||
|
public readonly os: OperatingSystem | null,
|
||||||
|
) {}
|
||||||
|
}
|
||||||
|
|
||||||
|
export class NodeInfo
|
||||||
|
implements DetectedInfo<"node", "node", NodeJS.Platform, string>
|
||||||
|
{
|
||||||
|
public readonly type = "node";
|
||||||
|
public readonly name = "node";
|
||||||
|
public readonly os: NodeJS.Platform = process.platform;
|
||||||
|
|
||||||
|
constructor(public readonly version: string) {}
|
||||||
|
}
|
||||||
|
|
||||||
|
export class SearchBotDeviceInfo
|
||||||
|
implements
|
||||||
|
DetectedInfo<"bot-device", Browser, OperatingSystem | null, string>
|
||||||
|
{
|
||||||
|
public readonly type = "bot-device";
|
||||||
|
constructor(
|
||||||
|
public readonly name: Browser,
|
||||||
|
public readonly version: string,
|
||||||
|
public readonly os: OperatingSystem | null,
|
||||||
|
public readonly bot: string,
|
||||||
|
) {}
|
||||||
|
}
|
||||||
|
|
||||||
|
export class BotInfo implements DetectedInfo<"bot", "bot", null, null> {
|
||||||
|
public readonly type = "bot";
|
||||||
|
public readonly bot = true; // NOTE: deprecated test name instead
|
||||||
|
public readonly name = "bot";
|
||||||
|
public readonly version: null = null;
|
||||||
|
public readonly os: null = null;
|
||||||
|
}
|
||||||
|
|
||||||
|
export class ReactNativeInfo
|
||||||
|
implements DetectedInfo<"react-native", "react-native", null, null>
|
||||||
|
{
|
||||||
|
public readonly type = "react-native";
|
||||||
|
public readonly name = "react-native";
|
||||||
|
public readonly version: null = null;
|
||||||
|
public readonly os: null = null;
|
||||||
|
}
|
||||||
|
|
||||||
|
export type Browser =
|
||||||
|
| "aol"
|
||||||
|
| "edge"
|
||||||
|
| "edge-ios"
|
||||||
|
| "yandexbrowser"
|
||||||
|
| "kakaotalk"
|
||||||
|
| "samsung"
|
||||||
|
| "silk"
|
||||||
|
| "miui"
|
||||||
|
| "beaker"
|
||||||
|
| "edge-chromium"
|
||||||
|
| "chrome"
|
||||||
|
| "chromium-webview"
|
||||||
|
| "phantomjs"
|
||||||
|
| "crios"
|
||||||
|
| "firefox"
|
||||||
|
| "fxios"
|
||||||
|
| "opera-mini"
|
||||||
|
| "opera"
|
||||||
|
| "pie"
|
||||||
|
| "netfront"
|
||||||
|
| "ie"
|
||||||
|
| "bb10"
|
||||||
|
| "android"
|
||||||
|
| "ios"
|
||||||
|
| "safari"
|
||||||
|
| "facebook"
|
||||||
|
| "instagram"
|
||||||
|
| "ios-webview"
|
||||||
|
| "curl"
|
||||||
|
| "searchbot";
|
||||||
|
export type OperatingSystem =
|
||||||
|
| "iOS"
|
||||||
|
| "Android OS"
|
||||||
|
| "BlackBerry OS"
|
||||||
|
| "Windows Mobile"
|
||||||
|
| "Amazon OS"
|
||||||
|
| "Windows 3.11"
|
||||||
|
| "Windows 95"
|
||||||
|
| "Windows 98"
|
||||||
|
| "Windows 2000"
|
||||||
|
| "Windows XP"
|
||||||
|
| "Windows Server 2003"
|
||||||
|
| "Windows Vista"
|
||||||
|
| "Windows 7"
|
||||||
|
| "Windows 8"
|
||||||
|
| "Windows 8.1"
|
||||||
|
| "Windows 10"
|
||||||
|
| "Windows ME"
|
||||||
|
| "Windows CE"
|
||||||
|
| "Open BSD"
|
||||||
|
| "Sun OS"
|
||||||
|
| "Linux"
|
||||||
|
| "Mac OS"
|
||||||
|
| "QNX"
|
||||||
|
| "BeOS"
|
||||||
|
| "OS/2"
|
||||||
|
| "Chrome OS";
|
||||||
|
type UserAgentRule = [Browser, RegExp];
|
||||||
|
type UserAgentMatch = [Browser, RegExpExecArray] | false;
|
||||||
|
type OperatingSystemRule = [OperatingSystem, RegExp];
|
||||||
|
|
||||||
|
// tslint:disable-next-line:max-line-length
|
||||||
|
const SEARCHBOX_UA_REGEX =
|
||||||
|
/alexa|bot|crawl(er|ing)|facebookexternalhit|feedburner|google web preview|nagios|postrank|pingdom|slurp|spider|yahoo!|yandex/;
|
||||||
|
const SEARCHBOT_OS_REGEX =
|
||||||
|
/(nuhk|curl|Googlebot|Yammybot|Openbot|Slurp|MSNBot|Ask\ Jeeves\/Teoma|ia_archiver)/;
|
||||||
|
const REQUIRED_VERSION_PARTS = 3;
|
||||||
|
|
||||||
|
const userAgentRules: UserAgentRule[] = [
|
||||||
|
["aol", /AOLShield\/([0-9\._]+)/],
|
||||||
|
["edge", /Edge\/([0-9\._]+)/],
|
||||||
|
["edge-ios", /EdgiOS\/([0-9\._]+)/],
|
||||||
|
["yandexbrowser", /YaBrowser\/([0-9\._]+)/],
|
||||||
|
["kakaotalk", /KAKAOTALK\s([0-9\.]+)/],
|
||||||
|
["samsung", /SamsungBrowser\/([0-9\.]+)/],
|
||||||
|
["silk", /\bSilk\/([0-9._-]+)\b/],
|
||||||
|
["miui", /MiuiBrowser\/([0-9\.]+)$/],
|
||||||
|
["beaker", /BeakerBrowser\/([0-9\.]+)/],
|
||||||
|
["edge-chromium", /EdgA?\/([0-9\.]+)/],
|
||||||
|
[
|
||||||
|
"chromium-webview",
|
||||||
|
/(?!Chrom.*OPR)wv\).*Chrom(?:e|ium)\/([0-9\.]+)(:?\s|$)/,
|
||||||
|
],
|
||||||
|
["chrome", /(?!Chrom.*OPR)Chrom(?:e|ium)\/([0-9\.]+)(:?\s|$)/],
|
||||||
|
["phantomjs", /PhantomJS\/([0-9\.]+)(:?\s|$)/],
|
||||||
|
["crios", /CriOS\/([0-9\.]+)(:?\s|$)/],
|
||||||
|
["firefox", /Firefox\/([0-9\.]+)(?:\s|$)/],
|
||||||
|
["fxios", /FxiOS\/([0-9\.]+)/],
|
||||||
|
["opera-mini", /Opera Mini.*Version\/([0-9\.]+)/],
|
||||||
|
["opera", /Opera\/([0-9\.]+)(?:\s|$)/],
|
||||||
|
["opera", /OPR\/([0-9\.]+)(:?\s|$)/],
|
||||||
|
["pie", /^Microsoft Pocket Internet Explorer\/(\d+\.\d+)$/],
|
||||||
|
[
|
||||||
|
"pie",
|
||||||
|
/^Mozilla\/\d\.\d+\s\(compatible;\s(?:MSP?IE|MSInternet Explorer) (\d+\.\d+);.*Windows CE.*\)$/,
|
||||||
|
],
|
||||||
|
["netfront", /^Mozilla\/\d\.\d+.*NetFront\/(\d.\d)/],
|
||||||
|
["ie", /Trident\/7\.0.*rv\:([0-9\.]+).*\).*Gecko$/],
|
||||||
|
["ie", /MSIE\s([0-9\.]+);.*Trident\/[4-7].0/],
|
||||||
|
["ie", /MSIE\s(7\.0)/],
|
||||||
|
["bb10", /BB10;\sTouch.*Version\/([0-9\.]+)/],
|
||||||
|
["android", /Android\s([0-9\.]+)/],
|
||||||
|
["ios", /Version\/([0-9\._]+).*Mobile.*Safari.*/],
|
||||||
|
["safari", /Version\/([0-9\._]+).*Safari/],
|
||||||
|
["facebook", /FB[AS]V\/([0-9\.]+)/],
|
||||||
|
["instagram", /Instagram\s([0-9\.]+)/],
|
||||||
|
["ios-webview", /AppleWebKit\/([0-9\.]+).*Mobile/],
|
||||||
|
["ios-webview", /AppleWebKit\/([0-9\.]+).*Gecko\)$/],
|
||||||
|
["curl", /^curl\/([0-9\.]+)$/],
|
||||||
|
["searchbot", SEARCHBOX_UA_REGEX],
|
||||||
|
];
|
||||||
|
const operatingSystemRules: OperatingSystemRule[] = [
|
||||||
|
["iOS", /iP(hone|od|ad)/],
|
||||||
|
["Android OS", /Android/],
|
||||||
|
["BlackBerry OS", /BlackBerry|BB10/],
|
||||||
|
["Windows Mobile", /IEMobile/],
|
||||||
|
["Amazon OS", /Kindle/],
|
||||||
|
["Windows 3.11", /Win16/],
|
||||||
|
["Windows 95", /(Windows 95)|(Win95)|(Windows_95)/],
|
||||||
|
["Windows 98", /(Windows 98)|(Win98)/],
|
||||||
|
["Windows 2000", /(Windows NT 5.0)|(Windows 2000)/],
|
||||||
|
["Windows XP", /(Windows NT 5.1)|(Windows XP)/],
|
||||||
|
["Windows Server 2003", /(Windows NT 5.2)/],
|
||||||
|
["Windows Vista", /(Windows NT 6.0)/],
|
||||||
|
["Windows 7", /(Windows NT 6.1)/],
|
||||||
|
["Windows 8", /(Windows NT 6.2)/],
|
||||||
|
["Windows 8.1", /(Windows NT 6.3)/],
|
||||||
|
["Windows 10", /(Windows NT 10.0)/],
|
||||||
|
["Windows ME", /Windows ME/],
|
||||||
|
["Windows CE", /Windows CE|WinCE|Microsoft Pocket Internet Explorer/],
|
||||||
|
["Open BSD", /OpenBSD/],
|
||||||
|
["Sun OS", /SunOS/],
|
||||||
|
["Chrome OS", /CrOS/],
|
||||||
|
["Linux", /(Linux)|(X11)/],
|
||||||
|
["Mac OS", /(Mac_PowerPC)|(Macintosh)/],
|
||||||
|
["QNX", /QNX/],
|
||||||
|
["BeOS", /BeOS/],
|
||||||
|
["OS/2", /OS\/2/],
|
||||||
|
];
|
||||||
|
|
||||||
|
export function detect(
|
||||||
|
userAgent?: string,
|
||||||
|
):
|
||||||
|
| BrowserInfo
|
||||||
|
| SearchBotDeviceInfo
|
||||||
|
| BotInfo
|
||||||
|
| NodeInfo
|
||||||
|
| ReactNativeInfo
|
||||||
|
| null {
|
||||||
|
if (!!userAgent) {
|
||||||
|
return parseUserAgent(userAgent);
|
||||||
|
}
|
||||||
|
|
||||||
|
if (
|
||||||
|
typeof document === "undefined" &&
|
||||||
|
typeof navigator !== "undefined" &&
|
||||||
|
navigator.product === "ReactNative"
|
||||||
|
) {
|
||||||
|
return new ReactNativeInfo();
|
||||||
|
}
|
||||||
|
|
||||||
|
if (typeof navigator !== "undefined") {
|
||||||
|
return parseUserAgent(navigator.userAgent);
|
||||||
|
}
|
||||||
|
|
||||||
|
return getNodeVersion();
|
||||||
|
}
|
||||||
|
|
||||||
|
function matchUserAgent(ua: string): UserAgentMatch {
|
||||||
|
// opted for using reduce here rather than Array#first with a regex.test call
|
||||||
|
// this is primarily because using the reduce we only perform the regex
|
||||||
|
// execution once rather than once for the test and for the exec again below
|
||||||
|
// probably something that needs to be benchmarked though
|
||||||
|
return (
|
||||||
|
ua !== "" &&
|
||||||
|
userAgentRules.reduce<UserAgentMatch>(
|
||||||
|
(matched: UserAgentMatch, [browser, regex]) => {
|
||||||
|
if (matched) {
|
||||||
|
return matched;
|
||||||
|
}
|
||||||
|
|
||||||
|
const uaMatch = regex.exec(ua);
|
||||||
|
return !!uaMatch && [browser, uaMatch];
|
||||||
|
},
|
||||||
|
false,
|
||||||
|
)
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
export function browserName(ua: string): Browser | null {
|
||||||
|
const data = matchUserAgent(ua);
|
||||||
|
return data ? data[0] : null;
|
||||||
|
}
|
||||||
|
|
||||||
|
export function parseUserAgent(
|
||||||
|
ua: string,
|
||||||
|
): BrowserInfo | SearchBotDeviceInfo | BotInfo | null {
|
||||||
|
const matchedRule: UserAgentMatch = matchUserAgent(ua);
|
||||||
|
|
||||||
|
if (!matchedRule) {
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
|
const [name, match] = matchedRule;
|
||||||
|
if (name === "searchbot") {
|
||||||
|
return new BotInfo();
|
||||||
|
}
|
||||||
|
// Do not use RegExp for split operation as some browser do not support it (See: http://blog.stevenlevithan.com/archives/cross-browser-split)
|
||||||
|
let versionParts =
|
||||||
|
match[1] && match[1].split(".").join("_").split("_").slice(0, 3);
|
||||||
|
if (versionParts) {
|
||||||
|
if (versionParts.length < REQUIRED_VERSION_PARTS) {
|
||||||
|
versionParts = [
|
||||||
|
...versionParts,
|
||||||
|
...createVersionParts(REQUIRED_VERSION_PARTS - versionParts.length),
|
||||||
|
];
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
versionParts = [];
|
||||||
|
}
|
||||||
|
|
||||||
|
const version = versionParts.join(".");
|
||||||
|
const os = detectOS(ua);
|
||||||
|
const searchBotMatch = SEARCHBOT_OS_REGEX.exec(ua);
|
||||||
|
|
||||||
|
if (searchBotMatch && searchBotMatch[1]) {
|
||||||
|
return new SearchBotDeviceInfo(name, version, os, searchBotMatch[1]);
|
||||||
|
}
|
||||||
|
|
||||||
|
return new BrowserInfo(name, version, os);
|
||||||
|
}
|
||||||
|
|
||||||
|
export function detectOS(ua: string): OperatingSystem | null {
|
||||||
|
for (let ii = 0, count = operatingSystemRules.length; ii < count; ii++) {
|
||||||
|
const result = operatingSystemRules[ii];
|
||||||
|
if (!result) {
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
const [os, regex] = result;
|
||||||
|
const match = regex.exec(ua);
|
||||||
|
if (match) {
|
||||||
|
return os;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
|
export function getNodeVersion(): NodeInfo | null {
|
||||||
|
const isNode = typeof process !== "undefined" && process.version;
|
||||||
|
return isNode ? new NodeInfo(process.version.slice(1)) : null;
|
||||||
|
}
|
||||||
|
|
||||||
|
function createVersionParts(count: number): string[] {
|
||||||
|
const output = [];
|
||||||
|
for (let ii = 0; ii < count; ii++) {
|
||||||
|
output.push("0");
|
||||||
|
}
|
||||||
|
|
||||||
|
return output;
|
||||||
|
}
|
||||||
@@ -0,0 +1,68 @@
|
|||||||
|
import pkg from "../../../package.json";
|
||||||
|
import { getOperatingSystem } from "./os";
|
||||||
|
|
||||||
|
export function setAnalyticsHeaders(headers: Record<string, string>) {
|
||||||
|
const globals = getAnalyticsGlobals();
|
||||||
|
|
||||||
|
headers["x-sdk-version"] = globals.x_sdk_version;
|
||||||
|
headers["x-sdk-name"] = globals.x_sdk_name;
|
||||||
|
headers["x-sdk-platform"] = globals.x_sdk_platform;
|
||||||
|
headers["x-sdk-os"] = globals.x_sdk_os;
|
||||||
|
}
|
||||||
|
|
||||||
|
export function setAnalyticsHeadersForXhr(xhr: XMLHttpRequest) {
|
||||||
|
const globals = getAnalyticsGlobals();
|
||||||
|
|
||||||
|
xhr.setRequestHeader("x-sdk-version", globals.x_sdk_version);
|
||||||
|
xhr.setRequestHeader("x-sdk-os", globals.x_sdk_os);
|
||||||
|
xhr.setRequestHeader("x-sdk-name", globals.x_sdk_name);
|
||||||
|
xhr.setRequestHeader("x-sdk-platform", globals.x_sdk_platform);
|
||||||
|
xhr.setRequestHeader("x-bundle-id", globals.app_bundle_id);
|
||||||
|
}
|
||||||
|
|
||||||
|
export function getAnalyticsHeaders() {
|
||||||
|
const globals = getAnalyticsGlobals();
|
||||||
|
return {
|
||||||
|
"x-sdk-version": globals.x_sdk_version,
|
||||||
|
"x-sdk-os": globals.x_sdk_os,
|
||||||
|
"x-sdk-name": globals.x_sdk_name,
|
||||||
|
"x-sdk-platform": globals.x_sdk_platform,
|
||||||
|
"x-bundle-id": globals.app_bundle_id,
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
|
export function getAnalyticsGlobals() {
|
||||||
|
if (typeof globalThis === "undefined") {
|
||||||
|
return {
|
||||||
|
x_sdk_name: pkg.name,
|
||||||
|
x_sdk_platform: getPlatform(),
|
||||||
|
x_sdk_version: pkg.version,
|
||||||
|
x_sdk_os: getOperatingSystem(),
|
||||||
|
app_bundle_id: undefined,
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
|
if ((globalThis as any).X_SDK_NAME === undefined) {
|
||||||
|
(globalThis as any).X_SDK_NAME = pkg.name;
|
||||||
|
(globalThis as any).X_SDK_PLATFORM = getPlatform();
|
||||||
|
(globalThis as any).X_SDK_VERSION = pkg.version;
|
||||||
|
(globalThis as any).X_SDK_OS = getOperatingSystem();
|
||||||
|
(globalThis as any).APP_BUNDLE_ID = undefined;
|
||||||
|
}
|
||||||
|
|
||||||
|
return {
|
||||||
|
x_sdk_name: (globalThis as any).X_SDK_NAME,
|
||||||
|
x_sdk_platform: (globalThis as any).X_SDK_PLATFORM,
|
||||||
|
x_sdk_version: (globalThis as any).X_SDK_VERSION,
|
||||||
|
x_sdk_os: (globalThis as any).X_SDK_OS,
|
||||||
|
app_bundle_id: (globalThis as any).APP_BUNDLE_ID || "", // if react, this will be empty
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
|
export function getPlatform() {
|
||||||
|
return typeof navigator !== "undefined" && navigator.product === "ReactNative"
|
||||||
|
? "mobile"
|
||||||
|
: typeof window !== "undefined"
|
||||||
|
? "browser"
|
||||||
|
: "node";
|
||||||
|
}
|
||||||
@@ -0,0 +1,13 @@
|
|||||||
|
import { detectOS } from "./detect-browser";
|
||||||
|
|
||||||
|
export function getOperatingSystem() {
|
||||||
|
if (typeof navigator !== "undefined" && navigator.product === "ReactNative") {
|
||||||
|
return "";
|
||||||
|
} else if (typeof window !== "undefined") {
|
||||||
|
const userAgent = navigator.userAgent;
|
||||||
|
|
||||||
|
return detectOS(userAgent) || "";
|
||||||
|
} else {
|
||||||
|
return process.platform;
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -358,7 +358,7 @@ export class TransactionError extends Error {
|
|||||||
}
|
}
|
||||||
|
|
||||||
errorMessage += `\n\n\n╔═════════════════════╗\n║ DEBUGGING RESOURCES ║\n╚═════════════════════╝\n\n`;
|
errorMessage += `\n\n\n╔═════════════════════╗\n║ DEBUGGING RESOURCES ║\n╚═════════════════════╝\n\n`;
|
||||||
errorMessage += `Need helping debugging? Join our Discord: https://discord.gg/thirdweb`;
|
errorMessage += `Need helping debugging? Visit our support site: https://thirdweb.com/support`;
|
||||||
errorMessage += `\n\n`;
|
errorMessage += `\n\n`;
|
||||||
|
|
||||||
super(errorMessage);
|
super(errorMessage);
|
||||||
|
|||||||
@@ -14,6 +14,7 @@ import { constructAbiFromBytecode } from "./feature-detection/getAllDetectedFeat
|
|||||||
import { SDKOptions } from "../schema/sdk-options";
|
import { SDKOptions } from "../schema/sdk-options";
|
||||||
import { Polygon } from "@thirdweb-dev/chains";
|
import { Polygon } from "@thirdweb-dev/chains";
|
||||||
import { createLruCache } from "./utils";
|
import { createLruCache } from "./utils";
|
||||||
|
import { getAnalyticsHeaders } from "../../core/utils/headers";
|
||||||
|
|
||||||
const CONTRACT_RESOLVER_BASE_URL = "https://contract.thirdweb.com/metadata";
|
const CONTRACT_RESOLVER_BASE_URL = "https://contract.thirdweb.com/metadata";
|
||||||
|
|
||||||
@@ -68,6 +69,11 @@ export async function fetchContractMetadataFromAddress(
|
|||||||
try {
|
try {
|
||||||
const response = await fetch(
|
const response = await fetch(
|
||||||
`${CONTRACT_RESOLVER_BASE_URL}/${chainId}/${address}`,
|
`${CONTRACT_RESOLVER_BASE_URL}/${chainId}/${address}`,
|
||||||
|
{
|
||||||
|
headers: {
|
||||||
|
...getAnalyticsHeaders(),
|
||||||
|
},
|
||||||
|
},
|
||||||
);
|
);
|
||||||
if (response.ok) {
|
if (response.ok) {
|
||||||
const resolvedData = await response.json();
|
const resolvedData = await response.json();
|
||||||
|
|||||||
@@ -474,9 +474,8 @@ async function fetchDeployBytecodeFromPublishedContractMetadata(
|
|||||||
getChainProvider("polygon", {}),
|
getChainProvider("polygon", {}),
|
||||||
) as ContractPublisher;
|
) as ContractPublisher;
|
||||||
|
|
||||||
const publishedMetadataUri = await contract.getPublishedUriFromCompilerUri(
|
const publishedMetadataUri =
|
||||||
compilerMetaUri,
|
await contract.getPublishedUriFromCompilerUri(compilerMetaUri);
|
||||||
);
|
|
||||||
if (publishedMetadataUri.length === 0) {
|
if (publishedMetadataUri.length === 0) {
|
||||||
throw Error(
|
throw Error(
|
||||||
`Could not resolve published metadata URI from ${compilerMetaUri}`,
|
`Could not resolve published metadata URI from ${compilerMetaUri}`,
|
||||||
|
|||||||
@@ -8,9 +8,8 @@ import { getValidChainRPCs } from "@thirdweb-dev/chains";
|
|||||||
import type { Chain } from "@thirdweb-dev/chains";
|
import type { Chain } from "@thirdweb-dev/chains";
|
||||||
import { providers } from "ethers";
|
import { providers } from "ethers";
|
||||||
import type { Signer } from "ethers";
|
import type { Signer } from "ethers";
|
||||||
import pkg from "../../../package.json";
|
|
||||||
import { isBrowser } from "@thirdweb-dev/storage";
|
|
||||||
import { sha256HexSync } from "@thirdweb-dev/crypto";
|
import { sha256HexSync } from "@thirdweb-dev/crypto";
|
||||||
|
import { setAnalyticsHeaders } from "../../core/utils/headers";
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @internal
|
* @internal
|
||||||
@@ -252,6 +251,8 @@ export function getProviderFromRpcUrl(
|
|||||||
headers["x-authorize-wallet"] = "true";
|
headers["x-authorize-wallet"] = "true";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
setAnalyticsHeaders(headers);
|
||||||
|
|
||||||
const bundleId =
|
const bundleId =
|
||||||
typeof globalThis !== "undefined" && "APP_BUNDLE_ID" in globalThis
|
typeof globalThis !== "undefined" && "APP_BUNDLE_ID" in globalThis
|
||||||
? ((globalThis as any).APP_BUNDLE_ID as string)
|
? ((globalThis as any).APP_BUNDLE_ID as string)
|
||||||
@@ -259,16 +260,6 @@ export function getProviderFromRpcUrl(
|
|||||||
if (!rpcUrl.includes("bundleId")) {
|
if (!rpcUrl.includes("bundleId")) {
|
||||||
rpcUrl = rpcUrl + (bundleId ? `?bundleId=${bundleId}` : "");
|
rpcUrl = rpcUrl + (bundleId ? `?bundleId=${bundleId}` : "");
|
||||||
}
|
}
|
||||||
|
|
||||||
headers["x-sdk-version"] = pkg.version;
|
|
||||||
headers["x-sdk-name"] = pkg.name;
|
|
||||||
headers["x-sdk-platform"] = bundleId
|
|
||||||
? "react-native"
|
|
||||||
: isBrowser()
|
|
||||||
? (window as any).bridge !== undefined
|
|
||||||
? "webGL"
|
|
||||||
: "browser"
|
|
||||||
: "node";
|
|
||||||
}
|
}
|
||||||
const match = rpcUrl.match(/^(ws|http)s?:/i);
|
const match = rpcUrl.match(/^(ws|http)s?:/i);
|
||||||
// Try the JSON batch provider if available
|
// Try the JSON batch provider if available
|
||||||
@@ -292,7 +283,8 @@ export function getProviderFromRpcUrl(
|
|||||||
"TW_SKIP_FETCH_SETUP" in globalThis &&
|
"TW_SKIP_FETCH_SETUP" in globalThis &&
|
||||||
typeof (globalThis as any).TW_SKIP_FETCH_SETUP === "boolean"
|
typeof (globalThis as any).TW_SKIP_FETCH_SETUP === "boolean"
|
||||||
) {
|
) {
|
||||||
_skipFetchSetup = (globalThis as any).TW_SKIP_FETCH_SETUP as boolean;
|
_skipFetchSetup = (globalThis as any)
|
||||||
|
.TW_SKIP_FETCH_SETUP as boolean;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Otherwise, create a new provider on the specific network
|
// Otherwise, create a new provider on the specific network
|
||||||
|
|||||||
@@ -592,9 +592,8 @@ export class ThirdwebSDK extends RPCConnectionHandler {
|
|||||||
} catch (e) {
|
} catch (e) {
|
||||||
// fallback to
|
// fallback to
|
||||||
// try resolving the contract type (legacy contracts)
|
// try resolving the contract type (legacy contracts)
|
||||||
const resolvedContractType = await this.resolveContractType(
|
const resolvedContractType =
|
||||||
resolvedAddress,
|
await this.resolveContractType(resolvedAddress);
|
||||||
);
|
|
||||||
if (resolvedContractType && resolvedContractType !== "custom") {
|
if (resolvedContractType && resolvedContractType !== "custom") {
|
||||||
// otherwise if it's a prebuilt contract we can just use the contract type
|
// otherwise if it's a prebuilt contract we can just use the contract type
|
||||||
const contractAbi = await PREBUILT_CONTRACTS_MAP[
|
const contractAbi = await PREBUILT_CONTRACTS_MAP[
|
||||||
@@ -721,9 +720,8 @@ export class ThirdwebSDK extends RPCConnectionHandler {
|
|||||||
walletAddress: AddressOrEns,
|
walletAddress: AddressOrEns,
|
||||||
chains: Chain[] = defaultChains,
|
chains: Chain[] = defaultChains,
|
||||||
): Promise<ContractWithMetadata[]> {
|
): Promise<ContractWithMetadata[]> {
|
||||||
const contracts = await this.multiChainRegistry.getContractAddresses(
|
const contracts =
|
||||||
walletAddress,
|
await this.multiChainRegistry.getContractAddresses(walletAddress);
|
||||||
);
|
|
||||||
|
|
||||||
const chainMap = chains.reduce(
|
const chainMap = chains.reduce(
|
||||||
(acc, chain) => {
|
(acc, chain) => {
|
||||||
@@ -1019,9 +1017,8 @@ export class ContractDeployer extends RPCConnectionHandler {
|
|||||||
metadata: NFTContractDeployMetadata,
|
metadata: NFTContractDeployMetadata,
|
||||||
options?: DeployOptions,
|
options?: DeployOptions,
|
||||||
): Promise<DeployTransaction> => {
|
): Promise<DeployTransaction> => {
|
||||||
const parsedMetadata = await LoyaltyCardContractDeploy.parseAsync(
|
const parsedMetadata =
|
||||||
metadata,
|
await LoyaltyCardContractDeploy.parseAsync(metadata);
|
||||||
);
|
|
||||||
const contractURI = await this.storage.upload(parsedMetadata);
|
const contractURI = await this.storage.upload(parsedMetadata);
|
||||||
|
|
||||||
const trustedForwarders: string[] = [];
|
const trustedForwarders: string[] = [];
|
||||||
@@ -1078,9 +1075,8 @@ export class ContractDeployer extends RPCConnectionHandler {
|
|||||||
metadata: OpenEditionContractDeployMetadata,
|
metadata: OpenEditionContractDeployMetadata,
|
||||||
options?: DeployOptions,
|
options?: DeployOptions,
|
||||||
): Promise<DeployTransaction> => {
|
): Promise<DeployTransaction> => {
|
||||||
const parsedMetadata = await DropErc721ContractSchema.deploy.parseAsync(
|
const parsedMetadata =
|
||||||
metadata,
|
await DropErc721ContractSchema.deploy.parseAsync(metadata);
|
||||||
);
|
|
||||||
const contractURI = await this.storage.upload(parsedMetadata);
|
const contractURI = await this.storage.upload(parsedMetadata);
|
||||||
|
|
||||||
const trustedForwarders: string[] = [];
|
const trustedForwarders: string[] = [];
|
||||||
@@ -1938,9 +1934,8 @@ export class ContractDeployer extends RPCConnectionHandler {
|
|||||||
?.factoryDeploymentData?.customFactoryInput?.customFactoryAddresses[
|
?.factoryDeploymentData?.customFactoryInput?.customFactoryAddresses[
|
||||||
chainId
|
chainId
|
||||||
] as AddressOrEns;
|
] as AddressOrEns;
|
||||||
const resolvedCustomFactoryAddress = await resolveAddress(
|
const resolvedCustomFactoryAddress =
|
||||||
customFactoryAddress,
|
await resolveAddress(customFactoryAddress);
|
||||||
);
|
|
||||||
|
|
||||||
invariant(
|
invariant(
|
||||||
resolvedCustomFactoryAddress,
|
resolvedCustomFactoryAddress,
|
||||||
|
|||||||
File diff suppressed because it is too large
Load Diff
Binary file not shown.
@@ -1,5 +1,13 @@
|
|||||||
# @thirdweb-dev/service-utils
|
# @thirdweb-dev/service-utils
|
||||||
|
|
||||||
|
## 0.4.14
|
||||||
|
|
||||||
|
### Patch Changes
|
||||||
|
|
||||||
|
- [#2235](https://github.com/thirdweb-dev/js/pull/2235) [`173b3b2a`](https://github.com/thirdweb-dev/js/commit/173b3b2ad97bbe1935432f3ffd51b1bd959e5a08) Thanks [@farhanW3](https://github.com/farhanW3)! - added 'engine' as a source to usage event schema & updated schema to accomodate new values
|
||||||
|
|
||||||
|
- [#2238](https://github.com/thirdweb-dev/js/pull/2238) [`c9f1fd8f`](https://github.com/thirdweb-dev/js/commit/c9f1fd8fc225eea0342ce2111751212169791e09) Thanks [@joaquim-verges](https://github.com/joaquim-verges)! - Update types
|
||||||
|
|
||||||
## 0.4.13
|
## 0.4.13
|
||||||
|
|
||||||
### Patch Changes
|
### Patch Changes
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "@thirdweb-dev/service-utils",
|
"name": "@thirdweb-dev/service-utils",
|
||||||
"version": "0.4.13",
|
"version": "0.4.14",
|
||||||
"main": "dist/thirdweb-dev-service-utils.cjs.js",
|
"main": "dist/thirdweb-dev-service-utils.cjs.js",
|
||||||
"module": "dist/thirdweb-dev-service-utils.esm.js",
|
"module": "dist/thirdweb-dev-service-utils.esm.js",
|
||||||
"exports": {
|
"exports": {
|
||||||
@@ -46,7 +46,7 @@
|
|||||||
"@types/jest": "^29.5.3",
|
"@types/jest": "^29.5.3",
|
||||||
"@types/node": "^18.17.1",
|
"@types/node": "^18.17.1",
|
||||||
"@typescript-eslint/eslint-plugin": "^6.2.0",
|
"@typescript-eslint/eslint-plugin": "^6.2.0",
|
||||||
"@typescript-eslint/parser": "^6.2.0",
|
"@typescript-eslint/parser": "^6.19.1",
|
||||||
"eslint": "^8.56.0",
|
"eslint": "^8.56.0",
|
||||||
"eslint-config-prettier": "^8.9.0",
|
"eslint-config-prettier": "^8.9.0",
|
||||||
"eslint-config-thirdweb": "workspace:*",
|
"eslint-config-thirdweb": "workspace:*",
|
||||||
|
|||||||
@@ -23,6 +23,7 @@ const usageEventSchema = z.object({
|
|||||||
"relayer",
|
"relayer",
|
||||||
"connectWallet",
|
"connectWallet",
|
||||||
"checkout",
|
"checkout",
|
||||||
|
"engine",
|
||||||
]),
|
]),
|
||||||
action: z.string(),
|
action: z.string(),
|
||||||
|
|
||||||
@@ -52,6 +53,15 @@ const usageEventSchema = z.object({
|
|||||||
sdkVersion: z.string().optional(),
|
sdkVersion: z.string().optional(),
|
||||||
sdkPlatform: z.string().optional(),
|
sdkPlatform: z.string().optional(),
|
||||||
productName: z.string().optional(),
|
productName: z.string().optional(),
|
||||||
|
transactionValue: z.string().optional(),
|
||||||
|
pathname: z.string().optional(),
|
||||||
|
contractAddress: z.string().optional(),
|
||||||
|
errorCode: z.string().optional(),
|
||||||
|
httpStatusCode: z.number().int().nonnegative().optional(),
|
||||||
|
functionName: z.string().optional(),
|
||||||
|
extension: z.string().optional(),
|
||||||
|
retryCount: z.number().int().nonnegative().optional(),
|
||||||
|
policyId: z.string().optional(),
|
||||||
});
|
});
|
||||||
export type UsageEvent = z.infer<typeof usageEventSchema>;
|
export type UsageEvent = z.infer<typeof usageEventSchema>;
|
||||||
|
|
||||||
|
|||||||
@@ -8,6 +8,7 @@ export type UserOpData = {
|
|||||||
};
|
};
|
||||||
|
|
||||||
export type PolicyResult = {
|
export type PolicyResult = {
|
||||||
|
policyId: string | null;
|
||||||
isAllowed: boolean;
|
isAllowed: boolean;
|
||||||
reason: string;
|
reason: string;
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -1,5 +1,11 @@
|
|||||||
# @thirdweb-dev/storage
|
# @thirdweb-dev/storage
|
||||||
|
|
||||||
|
## 2.0.9
|
||||||
|
|
||||||
|
### Patch Changes
|
||||||
|
|
||||||
|
- [#2224](https://github.com/thirdweb-dev/js/pull/2224) [`3ba15366`](https://github.com/thirdweb-dev/js/commit/3ba15366be8b57e577b871c44e386978dc9d4a8a) Thanks [@0xFirekeeper](https://github.com/0xFirekeeper)! - Adds correct reporing headers
|
||||||
|
|
||||||
## 2.0.8
|
## 2.0.8
|
||||||
|
|
||||||
### Patch Changes
|
### Patch Changes
|
||||||
|
|||||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user