Compare commits
30
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
a4339818a0 | ||
|
|
b3394277c7 | ||
|
|
fdf19b0a26 | ||
|
|
9798a31a9a | ||
|
|
f93bd325e1 | ||
|
|
97ba1fbd42 | ||
|
|
28fc3736aa | ||
|
|
06805217c2 | ||
|
|
b833250053 | ||
|
|
9455912932 | ||
|
|
4c488aa31f | ||
|
|
b0ecfd2d8d | ||
|
|
2b4f1c8e55 | ||
|
|
e79b293562 | ||
|
|
2861dff1f0 | ||
|
|
61b6a00214 | ||
|
|
b02fb91a54 | ||
|
|
8bf3be88be | ||
|
|
fb5095bff5 | ||
|
|
d28097f508 | ||
|
|
a27b10c5c3 | ||
|
|
8c2d4e5ea7 | ||
|
|
507496627b | ||
|
|
f5b89987af | ||
|
|
4bb8f5b15e | ||
|
|
914befda16 | ||
|
|
b5bbe2bd43 | ||
|
|
68288436ac | ||
|
|
d4ce855e5f | ||
|
|
47b0ed5171 |
@@ -1,5 +1,19 @@
|
||||
# @thirdweb-dev/auth
|
||||
|
||||
## 4.1.13
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- Updated dependencies [[`8c2d4e5e`](https://github.com/thirdweb-dev/js/commit/8c2d4e5ea7c38b3efa4d8d94c9822a92d271e59b), [`2b4f1c8e`](https://github.com/thirdweb-dev/js/commit/2b4f1c8e55de091100fb5279887bcb19ea31d38c)]:
|
||||
- @thirdweb-dev/wallets@2.1.10
|
||||
|
||||
## 4.1.12
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- Updated dependencies [[`b5bbe2bd`](https://github.com/thirdweb-dev/js/commit/b5bbe2bd438179c38451bc2cfa20a54fc79e4f3a)]:
|
||||
- @thirdweb-dev/wallets@2.1.9
|
||||
|
||||
## 4.1.11
|
||||
|
||||
### Patch Changes
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@thirdweb-dev/auth",
|
||||
"version": "4.1.11",
|
||||
"version": "4.1.13",
|
||||
"main": "dist/thirdweb-dev-auth.cjs.js",
|
||||
"module": "dist/thirdweb-dev-auth.esm.js",
|
||||
"browser": {
|
||||
|
||||
@@ -1,5 +1,33 @@
|
||||
# @thirdweb-dev/chains
|
||||
|
||||
## 0.1.60
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- [#2019](https://github.com/thirdweb-dev/js/pull/2019) [`b8332500`](https://github.com/thirdweb-dev/js/commit/b833250053320c8608109053f5cffe2dc96ce70a) Thanks [@jnsdls](https://github.com/jnsdls)! - add & update chains
|
||||
|
||||
- [#2024](https://github.com/thirdweb-dev/js/pull/2024) [`28fc3736`](https://github.com/thirdweb-dev/js/commit/28fc3736aa30c89690084aa2c62556c183796352) Thanks [@kien-ngo](https://github.com/kien-ngo)! - Add Base Sepolia to defaultChains
|
||||
|
||||
- [#2023](https://github.com/thirdweb-dev/js/pull/2023) [`06805217`](https://github.com/thirdweb-dev/js/commit/06805217c26de203a57c21246acba22def8a78fa) Thanks [@kien-ngo](https://github.com/kien-ngo)! - Add Eth Sepolia to defaultChains
|
||||
|
||||
## 0.1.59
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- [#1967](https://github.com/thirdweb-dev/js/pull/1967) [`47b0ed51`](https://github.com/thirdweb-dev/js/commit/47b0ed5171be5608ae23c19481a1b04948443c6a) Thanks [@kien-ngo](https://github.com/kien-ngo)! - Add Arbitrum Sepolia to defaultChains
|
||||
|
||||
- [#1990](https://github.com/thirdweb-dev/js/pull/1990) [`d4ce855e`](https://github.com/thirdweb-dev/js/commit/d4ce855e5f5e6c4206a3efa250e92e690ae87281) Thanks [@jnsdls](https://github.com/jnsdls)! - deprecate `allChains` `getChainById` and `getChainBySlug`
|
||||
|
||||
all of these would (necessarily) pull in every single chain in the package (>600kb)
|
||||
|
||||
instead these can be replaced with their async variants:
|
||||
|
||||
- `allChains` -> `await fetchChains()`
|
||||
- `getChainById(chainId)` -> `await getChainByIdAsync(chainId)`
|
||||
- `getChainBySlug(chainSlug)` -> `await getChainBySlugAsync(chainSlug)`
|
||||
|
||||
these async functions will return the same data as their sync counterparts, but without having to pull in every single chain at build-time.
|
||||
|
||||
## 0.1.58
|
||||
|
||||
### Patch Changes
|
||||
|
||||
@@ -39,11 +39,11 @@ export default {
|
||||
},
|
||||
"networkId": 13308,
|
||||
"rpc": [
|
||||
"https://credit-smart-chain.rpc.thirdweb.com/${THIRDWEB_API_KEY}",
|
||||
"https://credit-smart-chain-credit.rpc.thirdweb.com/${THIRDWEB_API_KEY}",
|
||||
"https://13308.rpc.thirdweb.com/${THIRDWEB_API_KEY}",
|
||||
"https://rpc.creditsmartchain.com"
|
||||
],
|
||||
"shortName": "Credit",
|
||||
"slug": "credit-smart-chain",
|
||||
"slug": "credit-smart-chain-credit",
|
||||
"testnet": false
|
||||
} as const satisfies Chain;
|
||||
@@ -0,0 +1,34 @@
|
||||
import type { Chain } from "../src/types";
|
||||
export default {
|
||||
"chain": "BLITZ",
|
||||
"chainId": 1343,
|
||||
"explorers": [
|
||||
{
|
||||
"name": "BLITZ Explorer",
|
||||
"url": "https://subnets-test.avax.network/blitz",
|
||||
"standard": "EIP3091"
|
||||
}
|
||||
],
|
||||
"faucets": [],
|
||||
"features": [
|
||||
{
|
||||
"name": "EIP1559"
|
||||
}
|
||||
],
|
||||
"infoURL": "https://blitz.gg",
|
||||
"name": "Blitz Subnet",
|
||||
"nativeCurrency": {
|
||||
"name": "BLITZ GAS",
|
||||
"symbol": "BGAS",
|
||||
"decimals": 18
|
||||
},
|
||||
"networkId": 1343,
|
||||
"rpc": [
|
||||
"https://blitz-subnet.rpc.thirdweb.com/${THIRDWEB_API_KEY}",
|
||||
"https://1343.rpc.thirdweb.com/${THIRDWEB_API_KEY}",
|
||||
"https://subnets.avax.network/blitz/testnet/rpc"
|
||||
],
|
||||
"shortName": "blitz",
|
||||
"slug": "blitz-subnet",
|
||||
"testnet": true
|
||||
} as const satisfies Chain;
|
||||
@@ -0,0 +1,37 @@
|
||||
import type { Chain } from "../src/types";
|
||||
export default {
|
||||
"chain": "parallel-stormy-spica",
|
||||
"chainId": 1350216234,
|
||||
"explorers": [
|
||||
{
|
||||
"name": "Blockscout",
|
||||
"url": "https://parallel-stormy-spica.explorer.mainnet.skalenodes.com",
|
||||
"standard": "EIP3091"
|
||||
}
|
||||
],
|
||||
"faucets": [
|
||||
"https://sfuel.skale.network/"
|
||||
],
|
||||
"icon": {
|
||||
"url": "ipfs://bafkreiagrt5dhgltg2kmw7hf24kslstr5h42e745luuxwp2wbg24gm6zza",
|
||||
"width": 500,
|
||||
"height": 500,
|
||||
"format": "png"
|
||||
},
|
||||
"name": "SKALE Titan Hub",
|
||||
"nativeCurrency": {
|
||||
"name": "sFUEL",
|
||||
"symbol": "sFUEL",
|
||||
"decimals": 18
|
||||
},
|
||||
"networkId": 1350216234,
|
||||
"rpc": [
|
||||
"https://skale-titan-hub.rpc.thirdweb.com/${THIRDWEB_API_KEY}",
|
||||
"https://1350216234.rpc.thirdweb.com/${THIRDWEB_API_KEY}",
|
||||
"https://mainnet.skalenodes.com/v1/parallel-stormy-spica",
|
||||
"wss://mainnet.skalenodes.com/v1/ws/parallel-stormy-spica"
|
||||
],
|
||||
"shortName": "titan-mainnet",
|
||||
"slug": "skale-titan-hub",
|
||||
"testnet": false
|
||||
} as const satisfies Chain;
|
||||
@@ -33,6 +33,6 @@ export default {
|
||||
],
|
||||
"shortName": "testnet-zkEVM-mango",
|
||||
"slug": "polygon-zkevm-testnet",
|
||||
"testnet": false,
|
||||
"testnet": true,
|
||||
"title": "Polygon zkEVM Testnet"
|
||||
} as const satisfies Chain;
|
||||
@@ -4,20 +4,22 @@ export default {
|
||||
"chainId": 1482601649,
|
||||
"explorers": [
|
||||
{
|
||||
"name": "nebula",
|
||||
"name": "Blockscout",
|
||||
"url": "https://green-giddy-denebola.explorer.mainnet.skalenodes.com",
|
||||
"standard": "EIP3091",
|
||||
"icon": {
|
||||
"url": "ipfs://QmfQkfmQuoUUUKwF1yCcrPEzFcWLaqNyiSv5YMcSj6zs74",
|
||||
"width": 500,
|
||||
"height": 500,
|
||||
"format": "png"
|
||||
}
|
||||
"standard": "EIP3091"
|
||||
}
|
||||
],
|
||||
"faucets": [],
|
||||
"faucets": [
|
||||
"https://sfuel.skale.network/"
|
||||
],
|
||||
"icon": {
|
||||
"url": "ipfs://bafybeic5eexvd34wfy4kuebcyu73qpkv3x57s54ebzjyhyjsmeuni5jwcm",
|
||||
"width": 500,
|
||||
"height": 500,
|
||||
"format": "png"
|
||||
},
|
||||
"infoURL": "https://nebulachain.io/",
|
||||
"name": "Nebula Mainnet",
|
||||
"name": "SKALE Nebula Hub",
|
||||
"nativeCurrency": {
|
||||
"name": "sFUEL",
|
||||
"symbol": "sFUEL",
|
||||
@@ -25,12 +27,12 @@ export default {
|
||||
},
|
||||
"networkId": 1482601649,
|
||||
"rpc": [
|
||||
"https://nebula.rpc.thirdweb.com/${THIRDWEB_API_KEY}",
|
||||
"https://skale-nebula-hub.rpc.thirdweb.com/${THIRDWEB_API_KEY}",
|
||||
"https://1482601649.rpc.thirdweb.com/${THIRDWEB_API_KEY}",
|
||||
"https://mainnet.skalenodes.com/v1/green-giddy-denebola",
|
||||
"wss://mainnet-proxy.skalenodes.com/v1/ws/green-giddy-denebola"
|
||||
],
|
||||
"shortName": "nebula-mainnet",
|
||||
"slug": "nebula",
|
||||
"slug": "skale-nebula-hub",
|
||||
"testnet": false
|
||||
} as const satisfies Chain;
|
||||
@@ -0,0 +1,37 @@
|
||||
import type { Chain } from "../src/types";
|
||||
export default {
|
||||
"chain": "staging-aware-chief-gianfar",
|
||||
"chainId": 1517929550,
|
||||
"explorers": [
|
||||
{
|
||||
"name": "Blockscout",
|
||||
"url": "https://staging-aware-chief-gianfar.explorer.staging-v3.skalenodes.com",
|
||||
"standard": "EIP3091"
|
||||
}
|
||||
],
|
||||
"faucets": [
|
||||
"https://sfuel.dirtroad.dev/staging"
|
||||
],
|
||||
"icon": {
|
||||
"url": "ipfs://bafkreiagrt5dhgltg2kmw7hf24kslstr5h42e745luuxwp2wbg24gm6zza",
|
||||
"width": 500,
|
||||
"height": 500,
|
||||
"format": "png"
|
||||
},
|
||||
"name": "SKALE Titan Hub Testnet",
|
||||
"nativeCurrency": {
|
||||
"name": "sFUEL",
|
||||
"symbol": "sFUEL",
|
||||
"decimals": 18
|
||||
},
|
||||
"networkId": 1517929550,
|
||||
"rpc": [
|
||||
"https://skale-titan-hub-testnet.rpc.thirdweb.com/${THIRDWEB_API_KEY}",
|
||||
"https://1517929550.rpc.thirdweb.com/${THIRDWEB_API_KEY}",
|
||||
"https://staging-v3.skalenodes.com/v1/staging-aware-chief-gianfar",
|
||||
"wss://staging-v3.skalenodes.com/v1/ws/staging-aware-chief-gianfar"
|
||||
],
|
||||
"shortName": "titan-testnet",
|
||||
"slug": "skale-titan-hub-testnet",
|
||||
"testnet": true
|
||||
} as const satisfies Chain;
|
||||
@@ -0,0 +1,31 @@
|
||||
import type { Chain } from "../src/types";
|
||||
export default {
|
||||
"chain": "Avalanche",
|
||||
"chainId": 15535,
|
||||
"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": "QI M 11271",
|
||||
"nativeCurrency": {
|
||||
"name": "QI M 11271 Token",
|
||||
"symbol": "JZW",
|
||||
"decimals": 18
|
||||
},
|
||||
"networkId": 15535,
|
||||
"redFlags": [],
|
||||
"rpc": [
|
||||
"https://qi-m-11271.rpc.thirdweb.com/${THIRDWEB_API_KEY}",
|
||||
"https://15535.rpc.thirdweb.com/${THIRDWEB_API_KEY}",
|
||||
"https://subnets.avacloud-dev.io/a47e1c06-fa75-4536-a900-1574d198e197"
|
||||
],
|
||||
"shortName": "QI M 11271",
|
||||
"slug": "qi-m-11271",
|
||||
"testnet": true
|
||||
} as const satisfies Chain;
|
||||
@@ -6,20 +6,20 @@ export default {
|
||||
{
|
||||
"name": "Blockscout",
|
||||
"url": "https://honorable-steel-rasalhague.explorer.mainnet.skalenodes.com",
|
||||
"standard": "EIP3091",
|
||||
"icon": {
|
||||
"url": "ipfs://bafybeigyayzxvt7vosat4rtrbmhhnldgx57w2pfbutuniax7h6kswzi42m",
|
||||
"width": 1637,
|
||||
"height": 1636,
|
||||
"format": "png"
|
||||
}
|
||||
"standard": "EIP3091"
|
||||
}
|
||||
],
|
||||
"faucets": [
|
||||
"https://sfuel.dirtroad.dev"
|
||||
],
|
||||
"icon": {
|
||||
"url": "ipfs://bafybeigyayzxvt7vosat4rtrbmhhnldgx57w2pfbutuniax7h6kswzi42m",
|
||||
"width": 1637,
|
||||
"height": 1636,
|
||||
"format": "png"
|
||||
},
|
||||
"infoURL": "https://calypsohub.network/",
|
||||
"name": "Calypso NFT Hub (SKALE)",
|
||||
"name": "SKALE Calypso Hub",
|
||||
"nativeCurrency": {
|
||||
"name": "sFUEL",
|
||||
"symbol": "sFUEL",
|
||||
@@ -27,12 +27,11 @@ export default {
|
||||
},
|
||||
"networkId": 1564830818,
|
||||
"rpc": [
|
||||
"https://calypso-nft-hub-skale.rpc.thirdweb.com/${THIRDWEB_API_KEY}",
|
||||
"https://skale-calypso-hub.rpc.thirdweb.com/${THIRDWEB_API_KEY}",
|
||||
"https://1564830818.rpc.thirdweb.com/${THIRDWEB_API_KEY}",
|
||||
"https://mainnet.skalenodes.com/v1/honorable-steel-rasalhague"
|
||||
],
|
||||
"shortName": "calypso-mainnet",
|
||||
"slug": "calypso-nft-hub-skale",
|
||||
"testnet": false,
|
||||
"title": "Calypso NFT Hub Mainnet"
|
||||
"slug": "skale-calypso-hub",
|
||||
"testnet": false
|
||||
} as const satisfies Chain;
|
||||
@@ -1,35 +1,28 @@
|
||||
import type { Chain } from "../src/types";
|
||||
export default {
|
||||
"chain": "Yuma",
|
||||
"chain": "LQC",
|
||||
"chainId": 1662,
|
||||
"explorers": [],
|
||||
"faucets": [],
|
||||
"features": [
|
||||
"explorers": [
|
||||
{
|
||||
"name": "EIP155"
|
||||
},
|
||||
{
|
||||
"name": "EIP1559"
|
||||
"name": "Liquichain Mainnet",
|
||||
"url": "https://mainnet.liquichain.io",
|
||||
"standard": "EIP3091"
|
||||
}
|
||||
],
|
||||
"icon": {
|
||||
"url": "ipfs://QmSFMBk3rMyu45Sy9KQHjgArFj4HdywANNYrSosLMUdcti",
|
||||
"width": 1213,
|
||||
"height": 1213,
|
||||
"format": "png"
|
||||
},
|
||||
"infoURL": "https://horizen.io/",
|
||||
"name": "Horizen Yuma Testnet Deprecated",
|
||||
"faucets": [],
|
||||
"infoURL": "https://liquichain.io/",
|
||||
"name": "Liquichain",
|
||||
"nativeCurrency": {
|
||||
"name": "Testnet Zen",
|
||||
"symbol": "tZEN",
|
||||
"name": "Licoin",
|
||||
"symbol": "LCN",
|
||||
"decimals": 18
|
||||
},
|
||||
"networkId": 1662,
|
||||
"redFlags": [
|
||||
"reusedChainId"
|
||||
],
|
||||
"rpc": [],
|
||||
"shortName": "Yuma",
|
||||
"slip44": 121,
|
||||
"slug": "horizen-yuma-testnet-deprecated",
|
||||
"status": "deprecated",
|
||||
"testnet": true
|
||||
"shortName": "Liquichain",
|
||||
"slug": "liquichain",
|
||||
"testnet": false
|
||||
} as const satisfies Chain;
|
||||
@@ -41,6 +41,7 @@ export default {
|
||||
"https://faucet.holesky.ethpandaops.io",
|
||||
"https://holesky-faucet.pk910.de"
|
||||
],
|
||||
"features": [],
|
||||
"icon": {
|
||||
"url": "ipfs://QmdwQDr6vmBtXmK2TmknkEuZNoaDqTasFdZdu3DRw8b2wt",
|
||||
"width": 1000,
|
||||
@@ -55,6 +56,7 @@ export default {
|
||||
"decimals": 18
|
||||
},
|
||||
"networkId": 17000,
|
||||
"redFlags": [],
|
||||
"rpc": [
|
||||
"https://holesky.rpc.thirdweb.com/${THIRDWEB_API_KEY}",
|
||||
"https://17000.rpc.thirdweb.com/${THIRDWEB_API_KEY}",
|
||||
@@ -65,5 +67,6 @@ export default {
|
||||
"shortName": "holesky",
|
||||
"slug": "holesky",
|
||||
"status": "incubating",
|
||||
"testnet": true
|
||||
"testnet": true,
|
||||
"title": "Ethereum Testnet Holesky"
|
||||
} as const satisfies Chain;
|
||||
@@ -0,0 +1,41 @@
|
||||
import type { Chain } from "../src/types";
|
||||
export default {
|
||||
"chain": "ETH",
|
||||
"chainId": 17001,
|
||||
"explorers": [
|
||||
{
|
||||
"name": "Redstone Holesky Explorer",
|
||||
"url": "https://explorer.holesky.redstone.xyz",
|
||||
"standard": "EIP3091",
|
||||
"icon": {
|
||||
"url": "ipfs://QmdwQDr6vmBtXmK2TmknkEuZNoaDqTasFdZdu3DRw8b2wt",
|
||||
"width": 1000,
|
||||
"height": 1628,
|
||||
"format": "png"
|
||||
}
|
||||
}
|
||||
],
|
||||
"faucets": [],
|
||||
"icon": {
|
||||
"url": "ipfs://bafkreieyaqgkgntvxuo5tnhgseladga5q6gutc37dab7kqqfdguhq7vkxq",
|
||||
"width": 5836,
|
||||
"height": 5836,
|
||||
"format": "png"
|
||||
},
|
||||
"infoURL": "https://redstone.xyz/docs/network-info",
|
||||
"name": "Redstone Holesky Testnet",
|
||||
"nativeCurrency": {
|
||||
"name": "Redstone Testnet Ether",
|
||||
"symbol": "ETH",
|
||||
"decimals": 18
|
||||
},
|
||||
"networkId": 17001,
|
||||
"rpc": [
|
||||
"https://redstone-holesky-testnet.rpc.thirdweb.com/${THIRDWEB_API_KEY}",
|
||||
"https://17001.rpc.thirdweb.com/${THIRDWEB_API_KEY}",
|
||||
"https://rpc.holesky.redstone.xyz"
|
||||
],
|
||||
"shortName": "redstone",
|
||||
"slug": "redstone-holesky-testnet",
|
||||
"testnet": true
|
||||
} as const satisfies Chain;
|
||||
@@ -2,13 +2,7 @@ import type { Chain } from "../src/types";
|
||||
export default {
|
||||
"chain": "Roll",
|
||||
"chainId": 1748,
|
||||
"explorers": [
|
||||
{
|
||||
"name": "Blockscout",
|
||||
"url": "https://roll.calderaexplorer.xyz/",
|
||||
"standard": "EIP3091"
|
||||
}
|
||||
],
|
||||
"explorers": [],
|
||||
"faucets": [],
|
||||
"features": [],
|
||||
"icon": {
|
||||
@@ -26,7 +20,11 @@ export default {
|
||||
},
|
||||
"networkId": 1748,
|
||||
"redFlags": [],
|
||||
"rpc": [],
|
||||
"rpc": [
|
||||
"https://roll-testnet.rpc.thirdweb.com/${THIRDWEB_API_KEY}",
|
||||
"https://1748.rpc.thirdweb.com/${THIRDWEB_API_KEY}",
|
||||
"https://roll.calderachain.xyz/http"
|
||||
],
|
||||
"shortName": "Roll",
|
||||
"slug": "roll-testnet",
|
||||
"testnet": true,
|
||||
|
||||
@@ -1,33 +1,34 @@
|
||||
import type { Chain } from "../src/types";
|
||||
export default {
|
||||
"chain": "xgon",
|
||||
"chain": "X1",
|
||||
"chainId": 195,
|
||||
"explorers": [
|
||||
{
|
||||
"name": "OKLink",
|
||||
"url": "https://www.oklink.com/okbc-test",
|
||||
"url": "https://www.oklink.com/x1-test",
|
||||
"standard": "EIP3091"
|
||||
}
|
||||
],
|
||||
"faucets": [
|
||||
"https://www.oklink.com/okbc-test"
|
||||
"https://www.okx.com/x1/faucet"
|
||||
],
|
||||
"features": [],
|
||||
"infoURL": "https://www.okx.com/okbc/docs/dev/quick-start/introduction/introduction-to-okbchain",
|
||||
"name": "Xgon Testnet",
|
||||
"infoURL": "https://www.okx.com/x1",
|
||||
"name": "X1 Testnet",
|
||||
"nativeCurrency": {
|
||||
"name": "Xgon Global Utility Token in testnet",
|
||||
"name": "X1 Global Utility Token in testnet",
|
||||
"symbol": "OKB",
|
||||
"decimals": 18
|
||||
},
|
||||
"networkId": 195,
|
||||
"rpc": [
|
||||
"https://xgon-testnet.rpc.thirdweb.com/${THIRDWEB_API_KEY}",
|
||||
"https://x1-testnet.rpc.thirdweb.com/${THIRDWEB_API_KEY}",
|
||||
"https://195.rpc.thirdweb.com/${THIRDWEB_API_KEY}",
|
||||
"https://testrpc.xgon.io"
|
||||
"https://testrpc.x1.tech",
|
||||
"https://x1testrpc.okx.com"
|
||||
],
|
||||
"shortName": "tokb",
|
||||
"slug": "xgon-testnet",
|
||||
"slug": "x1-testnet",
|
||||
"status": "active",
|
||||
"testnet": true
|
||||
} as const satisfies Chain;
|
||||
@@ -1,21 +1,21 @@
|
||||
import type { Chain } from "../src/types";
|
||||
export default {
|
||||
"chain": "xgon",
|
||||
"chain": "X1",
|
||||
"chainId": 196,
|
||||
"explorers": [],
|
||||
"faucets": [],
|
||||
"features": [],
|
||||
"infoURL": "https://www.okx.com/okbc/docs/dev/quick-start/introduction/introduction-to-okbchain",
|
||||
"name": "Xgon Mainnet",
|
||||
"infoURL": "https://www.okx.com/x1",
|
||||
"name": "X1 Mainnet",
|
||||
"nativeCurrency": {
|
||||
"name": "Xgon Global Utility Token",
|
||||
"name": "X1 Global Utility Token",
|
||||
"symbol": "OKB",
|
||||
"decimals": 18
|
||||
},
|
||||
"networkId": 196,
|
||||
"rpc": [],
|
||||
"shortName": "okb",
|
||||
"slug": "xgon",
|
||||
"slug": "x1",
|
||||
"status": "incubating",
|
||||
"testnet": false
|
||||
} as const satisfies Chain;
|
||||
@@ -29,7 +29,8 @@ export default {
|
||||
"rpc": [
|
||||
"https://z-mainnet.rpc.thirdweb.com/${THIRDWEB_API_KEY}",
|
||||
"https://2016.rpc.thirdweb.com/${THIRDWEB_API_KEY}",
|
||||
"https://mainnet-rpc.mainnetz.io"
|
||||
"https://mainnet-rpc.mainnetz.io",
|
||||
"https://eu-rpc.mainnetz.io"
|
||||
],
|
||||
"shortName": "NetZm",
|
||||
"slug": "z-mainnet",
|
||||
|
||||
@@ -20,7 +20,7 @@ export default {
|
||||
"format": "png"
|
||||
},
|
||||
"infoURL": "https://europahub.network/",
|
||||
"name": "Europa SKALE Chain",
|
||||
"name": "SKALE Europa Hub",
|
||||
"nativeCurrency": {
|
||||
"name": "sFUEL",
|
||||
"symbol": "sFUEL",
|
||||
@@ -37,12 +37,12 @@ export default {
|
||||
]
|
||||
},
|
||||
"rpc": [
|
||||
"https://europa-skale-chain.rpc.thirdweb.com/${THIRDWEB_API_KEY}",
|
||||
"https://skale-europa-hub.rpc.thirdweb.com/${THIRDWEB_API_KEY}",
|
||||
"https://2046399126.rpc.thirdweb.com/${THIRDWEB_API_KEY}",
|
||||
"https://mainnet.skalenodes.com/v1/elated-tan-skat",
|
||||
"wss://mainnet.skalenodes.com/v1/elated-tan-skat"
|
||||
],
|
||||
"shortName": "europa",
|
||||
"slug": "europa-skale-chain",
|
||||
"slug": "skale-europa-hub",
|
||||
"testnet": false
|
||||
} as const satisfies Chain;
|
||||
@@ -0,0 +1,31 @@
|
||||
import type { Chain } from "../src/types";
|
||||
export default {
|
||||
"chain": "Avalanche",
|
||||
"chainId": 2121,
|
||||
"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": "M TEST 1103-2",
|
||||
"nativeCurrency": {
|
||||
"name": "M TEST 1103-2 Token",
|
||||
"symbol": "RJI",
|
||||
"decimals": 18
|
||||
},
|
||||
"networkId": 2121,
|
||||
"redFlags": [],
|
||||
"rpc": [
|
||||
"https://m-test-1103-2.rpc.thirdweb.com/${THIRDWEB_API_KEY}",
|
||||
"https://2121.rpc.thirdweb.com/${THIRDWEB_API_KEY}",
|
||||
"https://subnets.avacloud-dev.io/cb82eb40-2d0d-4188-905b-d50c4b09b40b"
|
||||
],
|
||||
"shortName": "M TEST 1103-2",
|
||||
"slug": "m-test-1103-2",
|
||||
"testnet": true
|
||||
} as const satisfies Chain;
|
||||
@@ -32,7 +32,8 @@ export default {
|
||||
"rpc": [
|
||||
"https://krest-network.rpc.thirdweb.com/${THIRDWEB_API_KEY}",
|
||||
"https://2241.rpc.thirdweb.com/${THIRDWEB_API_KEY}",
|
||||
"https://erpc-krest.peaq.network"
|
||||
"https://erpc-krest.peaq.network",
|
||||
"https://krest.unitedbloc.com"
|
||||
],
|
||||
"shortName": "KRST",
|
||||
"slug": "krest-network",
|
||||
|
||||
@@ -0,0 +1,31 @@
|
||||
import type { Chain } from "../src/types";
|
||||
export default {
|
||||
"chain": "Avalanche",
|
||||
"chainId": 23934,
|
||||
"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": "ST 11-16 v7 Regression",
|
||||
"nativeCurrency": {
|
||||
"name": "ST 11-16 v7 Regression Token",
|
||||
"symbol": "WLA",
|
||||
"decimals": 18
|
||||
},
|
||||
"networkId": 23934,
|
||||
"redFlags": [],
|
||||
"rpc": [
|
||||
"https://st-11-16-v7-regression.rpc.thirdweb.com/${THIRDWEB_API_KEY}",
|
||||
"https://23934.rpc.thirdweb.com/${THIRDWEB_API_KEY}",
|
||||
"https://subnets.avax.network/defi-kingdoms/dfk-chain/rpc"
|
||||
],
|
||||
"shortName": "ST 11-16 v7 Regression",
|
||||
"slug": "st-11-16-v7-regression",
|
||||
"testnet": true
|
||||
} as const satisfies Chain;
|
||||
@@ -13,9 +13,21 @@ export default {
|
||||
"height": 540,
|
||||
"format": "png"
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "etherscan",
|
||||
"url": "https://kromascan.com/",
|
||||
"standard": "EIP3091",
|
||||
"icon": {
|
||||
"url": "ipfs://QmYtUimyqHkkFxYdbXXRbUqNg2VLPUg6Uu2C2nmFWowiZM",
|
||||
"width": 551,
|
||||
"height": 540,
|
||||
"format": "png"
|
||||
}
|
||||
}
|
||||
],
|
||||
"faucets": [],
|
||||
"features": [],
|
||||
"icon": {
|
||||
"url": "ipfs://QmVpV2WET6ZrqnvvPfE9hCwoE2y5ygbPuniuugpaRoxrho",
|
||||
"width": 320,
|
||||
@@ -39,6 +51,7 @@ export default {
|
||||
}
|
||||
]
|
||||
},
|
||||
"redFlags": [],
|
||||
"rpc": [
|
||||
"https://kroma.rpc.thirdweb.com/${THIRDWEB_API_KEY}",
|
||||
"https://255.rpc.thirdweb.com/${THIRDWEB_API_KEY}",
|
||||
|
||||
@@ -6,8 +6,8 @@ export default {
|
||||
"faucets": [],
|
||||
"name": "DPU Chain",
|
||||
"nativeCurrency": {
|
||||
"name": "DGS",
|
||||
"symbol": "DGS",
|
||||
"name": "DGC",
|
||||
"symbol": "DGC",
|
||||
"decimals": 18
|
||||
},
|
||||
"networkId": 2611555,
|
||||
|
||||
@@ -0,0 +1,43 @@
|
||||
import type { Chain } from "../src/types";
|
||||
export default {
|
||||
"chain": "K-LAOS",
|
||||
"chainId": 2718,
|
||||
"explorers": [
|
||||
{
|
||||
"name": "blockscout",
|
||||
"url": "https://blockscout.klaos.laosfoundation.io",
|
||||
"standard": "EIP3091",
|
||||
"icon": {
|
||||
"url": "ipfs://QmW26eoxJeyUfikZ4DUT1Gfk78sBkvydEo8QzHa1BXjUUL",
|
||||
"width": 580,
|
||||
"height": 580,
|
||||
"format": "png"
|
||||
}
|
||||
}
|
||||
],
|
||||
"faucets": [],
|
||||
"icon": {
|
||||
"url": "ipfs://QmW26eoxJeyUfikZ4DUT1Gfk78sBkvydEo8QzHa1BXjUUL",
|
||||
"width": 580,
|
||||
"height": 580,
|
||||
"format": "png"
|
||||
},
|
||||
"infoURL": "https://www.laosfoundation.io/",
|
||||
"name": "K-LAOS",
|
||||
"nativeCurrency": {
|
||||
"name": "KLAOS",
|
||||
"symbol": "KLAOS",
|
||||
"decimals": 18
|
||||
},
|
||||
"networkId": 2718,
|
||||
"rpc": [
|
||||
"https://k-laos.rpc.thirdweb.com/${THIRDWEB_API_KEY}",
|
||||
"https://2718.rpc.thirdweb.com/${THIRDWEB_API_KEY}",
|
||||
"https://rpc.klaos.laosfoundation.io",
|
||||
"wss://rpc.klaos.laosfoundation.io"
|
||||
],
|
||||
"shortName": "k-laos",
|
||||
"slug": "k-laos",
|
||||
"testnet": false,
|
||||
"title": "K-LAOS: LAOS on Kusama"
|
||||
} as const satisfies Chain;
|
||||
@@ -5,8 +5,8 @@ export default {
|
||||
"explorers": [
|
||||
{
|
||||
"name": "HashScan",
|
||||
"url": "https://hashscan.io/mainnet/dashboard",
|
||||
"standard": "none"
|
||||
"url": "https://hashscan.io/mainnet",
|
||||
"standard": "EIP3091"
|
||||
},
|
||||
{
|
||||
"name": "Arkhia Explorer",
|
||||
|
||||
@@ -5,8 +5,8 @@ export default {
|
||||
"explorers": [
|
||||
{
|
||||
"name": "HashScan",
|
||||
"url": "https://hashscan.io/testnet/dashboard",
|
||||
"standard": "none"
|
||||
"url": "https://hashscan.io/testnet",
|
||||
"standard": "EIP3091"
|
||||
},
|
||||
{
|
||||
"name": "Arkhia Explorer",
|
||||
|
||||
@@ -5,8 +5,8 @@ export default {
|
||||
"explorers": [
|
||||
{
|
||||
"name": "HashScan",
|
||||
"url": "https://hashscan.io/previewnet/dashboard",
|
||||
"standard": "none"
|
||||
"url": "https://hashscan.io/previewnet",
|
||||
"standard": "EIP3091"
|
||||
}
|
||||
],
|
||||
"faucets": [
|
||||
|
||||
@@ -0,0 +1,31 @@
|
||||
import type { Chain } from "../src/types";
|
||||
export default {
|
||||
"chain": "Avalanche",
|
||||
"chainId": 30891,
|
||||
"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": "Jambon's Testnet",
|
||||
"nativeCurrency": {
|
||||
"name": "Jambon's Testnet Token",
|
||||
"symbol": "CXY",
|
||||
"decimals": 18
|
||||
},
|
||||
"networkId": 30891,
|
||||
"redFlags": [],
|
||||
"rpc": [
|
||||
"https://jambon-s-testnet.rpc.thirdweb.com/${THIRDWEB_API_KEY}",
|
||||
"https://30891.rpc.thirdweb.com/${THIRDWEB_API_KEY}",
|
||||
"https://subnets.avacloud-dev.io/e8b04790-d50c-4bb1-89ba-7bd140b674f3"
|
||||
],
|
||||
"shortName": "Jambon's Testnet",
|
||||
"slug": "jambon-s-testnet",
|
||||
"testnet": true
|
||||
} as const satisfies Chain;
|
||||
@@ -0,0 +1,34 @@
|
||||
import type { Chain } from "../src/types";
|
||||
export default {
|
||||
"chain": "CLOUDVERSE",
|
||||
"chainId": 33210,
|
||||
"explorers": [
|
||||
{
|
||||
"name": "CLOUDVERSE Explorer",
|
||||
"url": "https://subnets.avax.network/cloudverse",
|
||||
"standard": "EIP3091"
|
||||
}
|
||||
],
|
||||
"faucets": [],
|
||||
"features": [
|
||||
{
|
||||
"name": "EIP1559"
|
||||
}
|
||||
],
|
||||
"infoURL": "https://muadao.build/",
|
||||
"name": "Cloudverse Subnet",
|
||||
"nativeCurrency": {
|
||||
"name": "XCLOUD",
|
||||
"symbol": "XCLOUD",
|
||||
"decimals": 18
|
||||
},
|
||||
"networkId": 33210,
|
||||
"rpc": [
|
||||
"https://cloudverse-subnet.rpc.thirdweb.com/${THIRDWEB_API_KEY}",
|
||||
"https://33210.rpc.thirdweb.com/${THIRDWEB_API_KEY}",
|
||||
"https://subnets.avax.network/cloudverse/mainnet/rpc"
|
||||
],
|
||||
"shortName": "cloudverse",
|
||||
"slug": "cloudverse-subnet",
|
||||
"testnet": false
|
||||
} as const satisfies Chain;
|
||||
@@ -0,0 +1,31 @@
|
||||
import type { Chain } from "../src/types";
|
||||
export default {
|
||||
"chain": "Avalanche",
|
||||
"chainId": 33909,
|
||||
"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": "Reg1116test",
|
||||
"nativeCurrency": {
|
||||
"name": "Reg1116test Token",
|
||||
"symbol": "JUO",
|
||||
"decimals": 18
|
||||
},
|
||||
"networkId": 33909,
|
||||
"redFlags": [],
|
||||
"rpc": [
|
||||
"https://reg1116test.rpc.thirdweb.com/${THIRDWEB_API_KEY}",
|
||||
"https://33909.rpc.thirdweb.com/${THIRDWEB_API_KEY}",
|
||||
"https://subnets.avax.network/defi-kingdoms/dfk-chain/rpc"
|
||||
],
|
||||
"shortName": "Reg1116test",
|
||||
"slug": "reg1116test",
|
||||
"testnet": true
|
||||
} as const satisfies Chain;
|
||||
@@ -6,20 +6,20 @@ export default {
|
||||
{
|
||||
"name": "Blockscout",
|
||||
"url": "https://staging-utter-unripe-menkar.explorer.staging-v3.skalenodes.com",
|
||||
"standard": "EIP3091",
|
||||
"icon": {
|
||||
"url": "ipfs://bafybeigyayzxvt7vosat4rtrbmhhnldgx57w2pfbutuniax7h6kswzi42m",
|
||||
"width": 1637,
|
||||
"height": 1636,
|
||||
"format": "png"
|
||||
}
|
||||
"standard": "EIP3091"
|
||||
}
|
||||
],
|
||||
"faucets": [
|
||||
"https://sfuel.dirtroad.dev/staging"
|
||||
],
|
||||
"icon": {
|
||||
"url": "ipfs://bafybeigyayzxvt7vosat4rtrbmhhnldgx57w2pfbutuniax7h6kswzi42m",
|
||||
"width": 1637,
|
||||
"height": 1636,
|
||||
"format": "png"
|
||||
},
|
||||
"infoURL": "https://calypsohub.network/",
|
||||
"name": "Calypso NFT Hub (SKALE Testnet)",
|
||||
"name": "SKALE Calypso Hub Testnet",
|
||||
"nativeCurrency": {
|
||||
"name": "sFUEL",
|
||||
"symbol": "sFUEL",
|
||||
@@ -27,12 +27,12 @@ export default {
|
||||
},
|
||||
"networkId": 344106930,
|
||||
"rpc": [
|
||||
"https://calypso-nft-hub-skale-testnet.rpc.thirdweb.com/${THIRDWEB_API_KEY}",
|
||||
"https://skale-calypso-hub-testnet.rpc.thirdweb.com/${THIRDWEB_API_KEY}",
|
||||
"https://344106930.rpc.thirdweb.com/${THIRDWEB_API_KEY}",
|
||||
"https://staging-v3.skalenodes.com/v1/staging-utter-unripe-menkar"
|
||||
],
|
||||
"shortName": "calypso-testnet",
|
||||
"slug": "calypso-nft-hub-skale-testnet",
|
||||
"slug": "skale-calypso-hub-testnet",
|
||||
"testnet": true,
|
||||
"title": "Calypso NFT Hub Testnet"
|
||||
} as const satisfies Chain;
|
||||
@@ -0,0 +1,35 @@
|
||||
import type { Chain } from "../src/types";
|
||||
export default {
|
||||
"chain": "ETH",
|
||||
"chainId": 34443,
|
||||
"explorers": [
|
||||
{
|
||||
"name": "modescout",
|
||||
"url": "https://explorer.mode.network",
|
||||
"standard": "none"
|
||||
}
|
||||
],
|
||||
"faucets": [],
|
||||
"icon": {
|
||||
"url": "ipfs://bafkreidi5y7afj5z4xrz7uz5rkg2mcsv2p2n4ui4g7q4k4ecdz65i2agou",
|
||||
"width": 2160,
|
||||
"height": 2160,
|
||||
"format": "png"
|
||||
},
|
||||
"infoURL": "https://docs.mode.network/",
|
||||
"name": "Mode",
|
||||
"nativeCurrency": {
|
||||
"name": "Ether",
|
||||
"symbol": "ETH",
|
||||
"decimals": 18
|
||||
},
|
||||
"networkId": 34443,
|
||||
"rpc": [
|
||||
"https://mode.rpc.thirdweb.com/${THIRDWEB_API_KEY}",
|
||||
"https://34443.rpc.thirdweb.com/${THIRDWEB_API_KEY}",
|
||||
"https://mainnet.mode.network"
|
||||
],
|
||||
"shortName": "mode",
|
||||
"slug": "mode",
|
||||
"testnet": false
|
||||
} as const satisfies Chain;
|
||||
@@ -0,0 +1,28 @@
|
||||
import type { Chain } from "../src/types";
|
||||
export default {
|
||||
"chain": "DS2",
|
||||
"chainId": 363636,
|
||||
"explorers": [],
|
||||
"faucets": [],
|
||||
"icon": {
|
||||
"url": "ipfs://QmRiAUu3xV5uiX6Nk1iXD5w6qjki5ugGFETRVavzJ2h5QF",
|
||||
"width": 370,
|
||||
"height": 320,
|
||||
"format": "png"
|
||||
},
|
||||
"name": "Digit Soul Smart Chain 2",
|
||||
"nativeCurrency": {
|
||||
"name": "Digit Coin",
|
||||
"symbol": "DGC",
|
||||
"decimals": 18
|
||||
},
|
||||
"networkId": 363636,
|
||||
"rpc": [
|
||||
"https://digit-soul-smart-chain-2.rpc.thirdweb.com/${THIRDWEB_API_KEY}",
|
||||
"https://363636.rpc.thirdweb.com/${THIRDWEB_API_KEY}",
|
||||
"https://dgs-rpc.digitsoul.co.th"
|
||||
],
|
||||
"shortName": "DS2",
|
||||
"slug": "digit-soul-smart-chain-2",
|
||||
"testnet": false
|
||||
} as const satisfies Chain;
|
||||
@@ -43,5 +43,5 @@ export default {
|
||||
],
|
||||
"shortName": "tftm",
|
||||
"slug": "fantom-testnet",
|
||||
"testnet": false
|
||||
"testnet": true
|
||||
} as const satisfies Chain;
|
||||
@@ -15,9 +15,7 @@ export default {
|
||||
}
|
||||
}
|
||||
],
|
||||
"faucets": [
|
||||
"https://coinbase.com/faucets/optimism-goerli-faucet"
|
||||
],
|
||||
"faucets": [],
|
||||
"features": [],
|
||||
"icon": {
|
||||
"url": "ipfs://QmcxZHpyJa8T4i63xqjPYrZ6tKrt55tZJpbXcjSDKuKaf9/optimism/512.png",
|
||||
@@ -37,8 +35,6 @@ export default {
|
||||
"rpc": [
|
||||
"https://optimism-goerli.rpc.thirdweb.com/${THIRDWEB_API_KEY}",
|
||||
"https://420.rpc.thirdweb.com/${THIRDWEB_API_KEY}",
|
||||
"https://optimism-goerli.infura.io/v3/${INFURA_API_KEY}",
|
||||
"https://opt-goerli.g.alchemy.com/v2/${ALCHEMY_API_KEY}",
|
||||
"https://goerli.optimism.io",
|
||||
"https://optimism-goerli.publicnode.com",
|
||||
"wss://optimism-goerli.publicnode.com",
|
||||
@@ -47,5 +43,5 @@ export default {
|
||||
],
|
||||
"shortName": "ogor",
|
||||
"slug": "optimism-goerli",
|
||||
"testnet": false
|
||||
"testnet": true
|
||||
} as const satisfies Chain;
|
||||
@@ -38,14 +38,12 @@ export default {
|
||||
"rpc": [
|
||||
"https://arbitrum-goerli.rpc.thirdweb.com/${THIRDWEB_API_KEY}",
|
||||
"https://421613.rpc.thirdweb.com/${THIRDWEB_API_KEY}",
|
||||
"https://arbitrum-goerli.infura.io/v3/${INFURA_API_KEY}",
|
||||
"https://arb-goerli.g.alchemy.com/v2/${ALCHEMY_API_KEY}",
|
||||
"https://goerli-rollup.arbitrum.io/rpc",
|
||||
"https://arbitrum-goerli.publicnode.com",
|
||||
"wss://arbitrum-goerli.publicnode.com"
|
||||
],
|
||||
"shortName": "arb-goerli",
|
||||
"slug": "arbitrum-goerli",
|
||||
"testnet": false,
|
||||
"testnet": true,
|
||||
"title": "Arbitrum Goerli Rollup Testnet"
|
||||
} as const satisfies Chain;
|
||||
@@ -0,0 +1,35 @@
|
||||
import type { Chain } from "../src/types";
|
||||
export default {
|
||||
"chain": "Geso Verse",
|
||||
"chainId": 428,
|
||||
"explorers": [
|
||||
{
|
||||
"name": "Geso Verse Explorer",
|
||||
"url": "https://explorer.verse.gesoten.com",
|
||||
"standard": "EIP3091"
|
||||
}
|
||||
],
|
||||
"faucets": [],
|
||||
"icon": {
|
||||
"url": "ipfs://Qmb7oJY9zd9sTzxNNQNTVZQz2hkd1aA94mWm4cvXfJ9QxV",
|
||||
"width": 1280,
|
||||
"height": 1280,
|
||||
"format": "png"
|
||||
},
|
||||
"infoURL": "https://gesoten.com/",
|
||||
"name": "Geso Verse",
|
||||
"nativeCurrency": {
|
||||
"name": "OAS",
|
||||
"symbol": "OAS",
|
||||
"decimals": 18
|
||||
},
|
||||
"networkId": 428,
|
||||
"rpc": [
|
||||
"https://geso-verse.rpc.thirdweb.com/${THIRDWEB_API_KEY}",
|
||||
"https://428.rpc.thirdweb.com/${THIRDWEB_API_KEY}",
|
||||
"https://rpc.verse.gesoten.com/"
|
||||
],
|
||||
"shortName": "GSV",
|
||||
"slug": "geso-verse",
|
||||
"testnet": false
|
||||
} as const satisfies Chain;
|
||||
@@ -10,8 +10,7 @@ export default {
|
||||
}
|
||||
],
|
||||
"faucets": [
|
||||
"https://faucet.avax-test.network/",
|
||||
"https://faucet.avax.network/"
|
||||
"https://faucet.avax-test.network/"
|
||||
],
|
||||
"features": [],
|
||||
"icon": {
|
||||
@@ -32,12 +31,11 @@ export default {
|
||||
"rpc": [
|
||||
"https://avalanche-fuji.rpc.thirdweb.com/${THIRDWEB_API_KEY}",
|
||||
"https://43113.rpc.thirdweb.com/${THIRDWEB_API_KEY}",
|
||||
"https://avalanche-fuji.infura.io/v3/${INFURA_API_KEY}",
|
||||
"https://api.avax-test.network/ext/bc/C/rpc",
|
||||
"https://avalanche-fuji-c-chain.publicnode.com",
|
||||
"wss://avalanche-fuji-c-chain.publicnode.com"
|
||||
],
|
||||
"shortName": "Fuji",
|
||||
"slug": "avalanche-fuji",
|
||||
"testnet": false
|
||||
"testnet": true
|
||||
} as const satisfies Chain;
|
||||
@@ -0,0 +1,49 @@
|
||||
import type { Chain } from "../src/types";
|
||||
export default {
|
||||
"chain": "CREDIT",
|
||||
"chainId": 4400,
|
||||
"explorers": [
|
||||
{
|
||||
"name": "Creditscan",
|
||||
"url": "https://scan.creditsmartchain.com",
|
||||
"standard": "EIP3091",
|
||||
"icon": {
|
||||
"url": "ipfs://bafkreifbso3gd4wu5wxl27xyurxctmuae2jyuy37guqtzx23nga6ba4ag4",
|
||||
"width": 1000,
|
||||
"height": 1628,
|
||||
"format": "png"
|
||||
}
|
||||
}
|
||||
],
|
||||
"faucets": [],
|
||||
"features": [
|
||||
{
|
||||
"name": "EIP155"
|
||||
},
|
||||
{
|
||||
"name": "EIP1559"
|
||||
}
|
||||
],
|
||||
"icon": {
|
||||
"url": "ipfs://bafkreifbso3gd4wu5wxl27xyurxctmuae2jyuy37guqtzx23nga6ba4ag4",
|
||||
"width": 1000,
|
||||
"height": 1628,
|
||||
"format": "png"
|
||||
},
|
||||
"infoURL": "https://creditsmartchain.com",
|
||||
"name": "Credit Smart Chain Mainnet",
|
||||
"nativeCurrency": {
|
||||
"name": "Credit",
|
||||
"symbol": "CREDIT",
|
||||
"decimals": 18
|
||||
},
|
||||
"networkId": 4400,
|
||||
"rpc": [
|
||||
"https://credit-smart-chain.rpc.thirdweb.com/${THIRDWEB_API_KEY}",
|
||||
"https://4400.rpc.thirdweb.com/${THIRDWEB_API_KEY}",
|
||||
"https://rpc.creditsmartchain.com"
|
||||
],
|
||||
"shortName": "CreditEdge",
|
||||
"slug": "credit-smart-chain",
|
||||
"testnet": false
|
||||
} as const satisfies Chain;
|
||||
@@ -45,5 +45,5 @@ export default {
|
||||
"shortName": "synapse-sepolia",
|
||||
"slug": "synapse-chain-testnet",
|
||||
"status": "active",
|
||||
"testnet": false
|
||||
"testnet": true
|
||||
} as const satisfies Chain;
|
||||
@@ -4,8 +4,8 @@ export default {
|
||||
"chainId": 44787,
|
||||
"explorers": [
|
||||
{
|
||||
"name": "Celoscan",
|
||||
"url": "https://alfajores.celoscan.io/",
|
||||
"name": "Alfajoresscan",
|
||||
"url": "https://alfajores.celoscan.io",
|
||||
"standard": "EIP3091"
|
||||
}
|
||||
],
|
||||
@@ -31,5 +31,5 @@ export default {
|
||||
],
|
||||
"shortName": "ALFA",
|
||||
"slug": "celo-alfajores-testnet",
|
||||
"testnet": false
|
||||
"testnet": true
|
||||
} as const satisfies Chain;
|
||||
@@ -23,7 +23,6 @@ export default {
|
||||
"https://46.rpc.thirdweb.com/${THIRDWEB_API_KEY}",
|
||||
"https://rpc.darwinia.network",
|
||||
"https://darwinia-rpc.darwiniacommunitydao.xyz",
|
||||
"https://darwinia2.api.onfinality.io/public-ws",
|
||||
"https://darwinia-rpc.dwellir.com"
|
||||
],
|
||||
"shortName": "darwinia",
|
||||
|
||||
@@ -35,5 +35,5 @@ export default {
|
||||
],
|
||||
"shortName": "iotex-testnet",
|
||||
"slug": "iotex-network-testnet",
|
||||
"testnet": false
|
||||
"testnet": true
|
||||
} as const satisfies Chain;
|
||||
@@ -0,0 +1,38 @@
|
||||
import type { Chain } from "../src/types";
|
||||
export default {
|
||||
"chain": "staging-legal-crazy-castor",
|
||||
"chainId": 476158412,
|
||||
"explorers": [
|
||||
{
|
||||
"name": "Blockscout",
|
||||
"url": "https://staging-legal-crazy-castor.explorer.staging-v3.skalenodes.com",
|
||||
"standard": "EIP3091"
|
||||
}
|
||||
],
|
||||
"faucets": [
|
||||
"https://sfuel.dirtroad.dev/staging"
|
||||
],
|
||||
"icon": {
|
||||
"url": "ipfs://bafkreiezcwowhm6xjrkt44cmiu6ml36rhrxx3amcg3cfkcntv2vgcvgbre",
|
||||
"width": 600,
|
||||
"height": 600,
|
||||
"format": "png"
|
||||
},
|
||||
"infoURL": "https://europahub.network/",
|
||||
"name": "SKALE Europa Hub Testnet",
|
||||
"nativeCurrency": {
|
||||
"name": "sFUEL",
|
||||
"symbol": "sFUEL",
|
||||
"decimals": 18
|
||||
},
|
||||
"networkId": 476158412,
|
||||
"rpc": [
|
||||
"https://skale-europa-hub-testnet.rpc.thirdweb.com/${THIRDWEB_API_KEY}",
|
||||
"https://476158412.rpc.thirdweb.com/${THIRDWEB_API_KEY}",
|
||||
"https://staging-v3.skalenodes.com/v1/staging-legal-crazy-castor"
|
||||
],
|
||||
"shortName": "europa-testnet",
|
||||
"slug": "skale-europa-hub-testnet",
|
||||
"testnet": true,
|
||||
"title": "Europa Hub Testnet"
|
||||
} as const satisfies Chain;
|
||||
@@ -0,0 +1,35 @@
|
||||
import type { Chain } from "../src/types";
|
||||
export default {
|
||||
"chain": "GC",
|
||||
"chainId": 4893,
|
||||
"explorers": [
|
||||
{
|
||||
"name": "blockscout",
|
||||
"url": "https://gcscan.io",
|
||||
"standard": "none"
|
||||
}
|
||||
],
|
||||
"faucets": [],
|
||||
"icon": {
|
||||
"url": "ipfs://QmPRHDsVNpRZ72GoQgDbpa3R4wKENmrXCRNuYJkxocFRDb",
|
||||
"width": 306,
|
||||
"height": 293,
|
||||
"format": "png"
|
||||
},
|
||||
"infoURL": "https://gcscan.io",
|
||||
"name": "Globel Chain",
|
||||
"nativeCurrency": {
|
||||
"name": "Globel Chain",
|
||||
"symbol": "GC",
|
||||
"decimals": 18
|
||||
},
|
||||
"networkId": 4893,
|
||||
"rpc": [
|
||||
"https://globel-chain.rpc.thirdweb.com/${THIRDWEB_API_KEY}",
|
||||
"https://4893.rpc.thirdweb.com/${THIRDWEB_API_KEY}",
|
||||
"https://rpc.gcscan.io"
|
||||
],
|
||||
"shortName": "GC",
|
||||
"slug": "globel-chain",
|
||||
"testnet": false
|
||||
} as const satisfies Chain;
|
||||
@@ -26,8 +26,7 @@ export default {
|
||||
"faucets": [
|
||||
"http://fauceth.komputing.org?chain=5&address=${ADDRESS}",
|
||||
"https://goerli-faucet.slock.it?address=${ADDRESS}",
|
||||
"https://faucet.goerli.mudit.blog",
|
||||
"https://faucet.paradigm.xyz/"
|
||||
"https://faucet.goerli.mudit.blog"
|
||||
],
|
||||
"features": [],
|
||||
"icon": {
|
||||
@@ -50,7 +49,6 @@ export default {
|
||||
"https://5.rpc.thirdweb.com/${THIRDWEB_API_KEY}",
|
||||
"https://goerli.infura.io/v3/${INFURA_API_KEY}",
|
||||
"wss://goerli.infura.io/v3/${INFURA_API_KEY}",
|
||||
"https://eth-goerli.g.alchemy.com/v2/${ALCHEMY_API_KEY}",
|
||||
"https://rpc.goerli.mudit.blog/",
|
||||
"https://ethereum-goerli.publicnode.com",
|
||||
"wss://ethereum-goerli.publicnode.com",
|
||||
@@ -59,6 +57,6 @@ export default {
|
||||
],
|
||||
"shortName": "gor",
|
||||
"slug": "goerli",
|
||||
"testnet": false,
|
||||
"testnet": true,
|
||||
"title": "Ethereum Testnet Goerli"
|
||||
} as const satisfies Chain;
|
||||
@@ -4,20 +4,22 @@ export default {
|
||||
"chainId": 503129905,
|
||||
"explorers": [
|
||||
{
|
||||
"name": "nebula",
|
||||
"name": "Blockscout",
|
||||
"url": "https://staging-faint-slimy-achird.explorer.staging-v3.skalenodes.com",
|
||||
"standard": "EIP3091",
|
||||
"icon": {
|
||||
"url": "ipfs://QmfQkfmQuoUUUKwF1yCcrPEzFcWLaqNyiSv5YMcSj6zs74",
|
||||
"width": 500,
|
||||
"height": 500,
|
||||
"format": "png"
|
||||
}
|
||||
"standard": "EIP3091"
|
||||
}
|
||||
],
|
||||
"faucets": [],
|
||||
"faucets": [
|
||||
"https://sfuel.dirtroad.dev/staging"
|
||||
],
|
||||
"icon": {
|
||||
"url": "ipfs://bafybeic5eexvd34wfy4kuebcyu73qpkv3x57s54ebzjyhyjsmeuni5jwcm",
|
||||
"width": 500,
|
||||
"height": 500,
|
||||
"format": "png"
|
||||
},
|
||||
"infoURL": "https://nebulachain.io/",
|
||||
"name": "Nebula Staging",
|
||||
"name": "SKALE Nebula Hub Testnet",
|
||||
"nativeCurrency": {
|
||||
"name": "sFUEL",
|
||||
"symbol": "sFUEL",
|
||||
@@ -25,12 +27,12 @@ export default {
|
||||
},
|
||||
"networkId": 503129905,
|
||||
"rpc": [
|
||||
"https://nebula-staging.rpc.thirdweb.com/${THIRDWEB_API_KEY}",
|
||||
"https://skale-nebula-hub-testnet.rpc.thirdweb.com/${THIRDWEB_API_KEY}",
|
||||
"https://503129905.rpc.thirdweb.com/${THIRDWEB_API_KEY}",
|
||||
"https://staging-v3.skalenodes.com/v1/staging-faint-slimy-achird",
|
||||
"wss://staging-v3.skalenodes.com/v1/ws/staging-faint-slimy-achird"
|
||||
],
|
||||
"shortName": "nebula-staging",
|
||||
"slug": "nebula-staging",
|
||||
"testnet": false
|
||||
"shortName": "nebula-testnet",
|
||||
"slug": "skale-nebula-hub-testnet",
|
||||
"testnet": true
|
||||
} as const satisfies Chain;
|
||||
@@ -38,7 +38,9 @@ export default {
|
||||
"https://rpc1.bahamut.io",
|
||||
"https://rpc2.bahamut.io",
|
||||
"wss://ws1.sahara.bahamutchain.com",
|
||||
"wss://ws2.sahara.bahamutchain.com"
|
||||
"wss://ws2.sahara.bahamutchain.com",
|
||||
"https://bahamut.publicnode.com",
|
||||
"wss://bahamut.publicnode.com"
|
||||
],
|
||||
"shortName": "ftn",
|
||||
"slug": "bahamut",
|
||||
|
||||
@@ -24,7 +24,6 @@ export default {
|
||||
"https://rollux.rpc.thirdweb.com/${THIRDWEB_API_KEY}",
|
||||
"https://570.rpc.thirdweb.com/${THIRDWEB_API_KEY}",
|
||||
"https://rpc.rollux.com",
|
||||
"https://rollux.public-rpc.com",
|
||||
"wss://rpc.rollux.com/wss"
|
||||
],
|
||||
"shortName": "sys-rollux",
|
||||
|
||||
@@ -47,6 +47,7 @@ export default {
|
||||
}
|
||||
]
|
||||
},
|
||||
"redFlags": [],
|
||||
"rpc": [
|
||||
"https://sepolia-pgn-public-goods-network.rpc.thirdweb.com/${THIRDWEB_API_KEY}",
|
||||
"https://58008.rpc.thirdweb.com/${THIRDWEB_API_KEY}",
|
||||
@@ -54,5 +55,5 @@ export default {
|
||||
],
|
||||
"shortName": "sepPGN",
|
||||
"slug": "sepolia-pgn-public-goods-network",
|
||||
"testnet": false
|
||||
"testnet": true
|
||||
} as const satisfies Chain;
|
||||
@@ -44,5 +44,5 @@ export default {
|
||||
],
|
||||
"shortName": "metis-goerli",
|
||||
"slug": "metis-goerli-testnet",
|
||||
"testnet": false
|
||||
"testnet": true
|
||||
} as const satisfies Chain;
|
||||
@@ -0,0 +1,31 @@
|
||||
import type { Chain } from "../src/types";
|
||||
export default {
|
||||
"chain": "Avalanche",
|
||||
"chainId": 62278,
|
||||
"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": "qi1121i1",
|
||||
"nativeCurrency": {
|
||||
"name": "qi1121i1 Token",
|
||||
"symbol": "SJOX",
|
||||
"decimals": 18
|
||||
},
|
||||
"networkId": 62278,
|
||||
"redFlags": [],
|
||||
"rpc": [
|
||||
"https://qi1121i1.rpc.thirdweb.com/${THIRDWEB_API_KEY}",
|
||||
"https://62278.rpc.thirdweb.com/${THIRDWEB_API_KEY}",
|
||||
"https://subnets.avax.network/defi-kingdoms/dfk-chain/rpc"
|
||||
],
|
||||
"shortName": "qi1121i1",
|
||||
"slug": "qi1121i1",
|
||||
"testnet": true
|
||||
} as const satisfies Chain;
|
||||
@@ -0,0 +1,31 @@
|
||||
import type { Chain } from "../src/types";
|
||||
export default {
|
||||
"chain": "Avalanche",
|
||||
"chainId": 63079,
|
||||
"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": "MT 1121-2",
|
||||
"nativeCurrency": {
|
||||
"name": "MT 1121-2 Token",
|
||||
"symbol": "RCE",
|
||||
"decimals": 18
|
||||
},
|
||||
"networkId": 63079,
|
||||
"redFlags": [],
|
||||
"rpc": [
|
||||
"https://mt-1121-2.rpc.thirdweb.com/${THIRDWEB_API_KEY}",
|
||||
"https://63079.rpc.thirdweb.com/${THIRDWEB_API_KEY}",
|
||||
"https://subnets.avacloud-test.io/d76ea66a-e423-49f6-8ef1-4355260b47f1"
|
||||
],
|
||||
"shortName": "MT 1121-2",
|
||||
"slug": "mt-1121-2",
|
||||
"testnet": true
|
||||
} as const satisfies Chain;
|
||||
@@ -0,0 +1,28 @@
|
||||
import type { Chain } from "../src/types";
|
||||
export default {
|
||||
"chain": "DGS",
|
||||
"chainId": 6363,
|
||||
"explorers": [],
|
||||
"faucets": [],
|
||||
"icon": {
|
||||
"url": "ipfs://QmRiAUu3xV5uiX6Nk1iXD5w6qjki5ugGFETRVavzJ2h5QF",
|
||||
"width": 370,
|
||||
"height": 320,
|
||||
"format": "png"
|
||||
},
|
||||
"name": "Digit Soul Smart Chain",
|
||||
"nativeCurrency": {
|
||||
"name": "Digit Coin",
|
||||
"symbol": "DGC",
|
||||
"decimals": 18
|
||||
},
|
||||
"networkId": 6363,
|
||||
"rpc": [
|
||||
"https://digit-soul-smart-chain.rpc.thirdweb.com/${THIRDWEB_API_KEY}",
|
||||
"https://6363.rpc.thirdweb.com/${THIRDWEB_API_KEY}",
|
||||
"https://dsc-rpc.digitsoul.co.th"
|
||||
],
|
||||
"shortName": "DGS",
|
||||
"slug": "digit-soul-smart-chain",
|
||||
"testnet": false
|
||||
} as const satisfies Chain;
|
||||
@@ -0,0 +1,36 @@
|
||||
import type { Chain } from "../src/types";
|
||||
export default {
|
||||
"chain": "JanusNetwork",
|
||||
"chainId": 66988,
|
||||
"explorers": [
|
||||
{
|
||||
"name": "JanusNetwork Testnet Explorer",
|
||||
"url": "https://beta.scan.janusnetwork.io",
|
||||
"standard": "none"
|
||||
}
|
||||
],
|
||||
"faucets": [],
|
||||
"icon": {
|
||||
"url": "ipfs://bafkreifc3vnwf4hj3bo6fg4u5qlqmjgajjgezyeg236qjcihl4ha42siuq",
|
||||
"width": 819,
|
||||
"height": 792,
|
||||
"format": "png"
|
||||
},
|
||||
"infoURL": "https://janus-network.gitbook.io/janus",
|
||||
"name": "Janus Testnet",
|
||||
"nativeCurrency": {
|
||||
"name": "Janus",
|
||||
"symbol": "JNS",
|
||||
"decimals": 18
|
||||
},
|
||||
"networkId": 66988,
|
||||
"rpc": [
|
||||
"https://janus-testnet.rpc.thirdweb.com/${THIRDWEB_API_KEY}",
|
||||
"https://66988.rpc.thirdweb.com/${THIRDWEB_API_KEY}",
|
||||
"https://rpc.test.janusnetwork.io"
|
||||
],
|
||||
"shortName": "janusnetwork-testnet",
|
||||
"slug": "janus-testnet",
|
||||
"status": "active",
|
||||
"testnet": true
|
||||
} as const satisfies Chain;
|
||||
@@ -14,9 +14,9 @@ export default {
|
||||
],
|
||||
"features": [],
|
||||
"icon": {
|
||||
"url": "ipfs://QmTS1P9sh49zg5xL5BUsRLWDz3vVoJCtCNf9yN1TTnsuQ3",
|
||||
"width": 321,
|
||||
"height": 320,
|
||||
"url": "ipfs://QmRxeKFwBwrXyDksoN4NzNRp3R35s8pVnTBfBj4AJSCq5g",
|
||||
"width": 512,
|
||||
"height": 512,
|
||||
"format": "png"
|
||||
},
|
||||
"infoURL": "https://frame.xyz",
|
||||
|
||||
@@ -0,0 +1,26 @@
|
||||
import type { Chain } from "../src/types";
|
||||
export default {
|
||||
"chain": "Jambon's Devnet",
|
||||
"chainId": 72605,
|
||||
"explorers": [],
|
||||
"faucets": [],
|
||||
"features": [],
|
||||
"icon": {
|
||||
"url": "",
|
||||
"width": 256,
|
||||
"height": 256,
|
||||
"format": ".svg"
|
||||
},
|
||||
"name": "Jambon's Devnet",
|
||||
"nativeCurrency": {
|
||||
"name": "Jambon's Devnet",
|
||||
"symbol": "DOB",
|
||||
"decimals": 18
|
||||
},
|
||||
"networkId": 72605,
|
||||
"redFlags": [],
|
||||
"rpc": [],
|
||||
"shortName": "Jambon's Devnet",
|
||||
"slug": "jambon-s-devnet",
|
||||
"testnet": true
|
||||
} as const satisfies Chain;
|
||||
@@ -0,0 +1,38 @@
|
||||
import type { Chain } from "../src/types";
|
||||
export default {
|
||||
"chain": "MaalChain Testnet",
|
||||
"chainId": 7860,
|
||||
"explorers": [
|
||||
{
|
||||
"name": "maalscan testnet",
|
||||
"url": "https://testnet.maalscan.io",
|
||||
"standard": "EIP3091"
|
||||
}
|
||||
],
|
||||
"faucets": [
|
||||
"https://faucet-testnet.maalscan.io/"
|
||||
],
|
||||
"icon": {
|
||||
"url": "ipfs://bafkreiexfqfe2x4impvwhra3xxa5eb25gv25zi3kkaoatdnld7wbxdzf2a",
|
||||
"width": 512,
|
||||
"height": 512,
|
||||
"format": "png"
|
||||
},
|
||||
"infoURL": "https://www.maalchain.com/",
|
||||
"name": "MaalChain Testnet",
|
||||
"nativeCurrency": {
|
||||
"name": "MAAL",
|
||||
"symbol": "MAAL",
|
||||
"decimals": 18
|
||||
},
|
||||
"networkId": 7860,
|
||||
"rpc": [
|
||||
"https://maalchain-testnet.rpc.thirdweb.com/${THIRDWEB_API_KEY}",
|
||||
"https://7860.rpc.thirdweb.com/${THIRDWEB_API_KEY}",
|
||||
"https://node1.maalscan.io/",
|
||||
"https://rpc-bntest.maalscan.io/"
|
||||
],
|
||||
"shortName": "maal-test",
|
||||
"slug": "maalchain-testnet",
|
||||
"testnet": true
|
||||
} as const satisfies Chain;
|
||||
@@ -13,16 +13,28 @@ export default {
|
||||
"height": 512,
|
||||
"format": "png"
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "DOScan",
|
||||
"url": "https://explorer.doschain.com/",
|
||||
"standard": "EIP3091",
|
||||
"icon": {
|
||||
"url": "ipfs://QmV2Nowzo81F6pi2qFcHePA4MwmmdMKBMUzBJUrxcymxx4",
|
||||
"width": 512,
|
||||
"height": 512,
|
||||
"format": "png"
|
||||
}
|
||||
}
|
||||
],
|
||||
"faucets": [],
|
||||
"features": [],
|
||||
"icon": {
|
||||
"url": "ipfs://QmV2Nowzo81F6pi2qFcHePA4MwmmdMKBMUzBJUrxcymxx4",
|
||||
"width": 512,
|
||||
"height": 512,
|
||||
"format": "png"
|
||||
},
|
||||
"infoURL": "https://doschain.io",
|
||||
"infoURL": "https://doschain.com/",
|
||||
"name": "DOS Chain",
|
||||
"nativeCurrency": {
|
||||
"name": "DOS",
|
||||
@@ -30,6 +42,7 @@ export default {
|
||||
"decimals": 18
|
||||
},
|
||||
"networkId": 7979,
|
||||
"redFlags": [],
|
||||
"rpc": [
|
||||
"https://dos-chain.rpc.thirdweb.com/${THIRDWEB_API_KEY}",
|
||||
"https://7979.rpc.thirdweb.com/${THIRDWEB_API_KEY}",
|
||||
|
||||
@@ -31,8 +31,6 @@ export default {
|
||||
"rpc": [
|
||||
"https://mumbai.rpc.thirdweb.com/${THIRDWEB_API_KEY}",
|
||||
"https://80001.rpc.thirdweb.com/${THIRDWEB_API_KEY}",
|
||||
"https://polygon-mumbai.infura.io/v3/${INFURA_API_KEY}",
|
||||
"https://polygon-mumbai.g.alchemy.com/v2/${ALCHEMY_API_KEY}",
|
||||
"https://rpc-mumbai.maticvigil.com",
|
||||
"https://polygon-mumbai-bor.publicnode.com",
|
||||
"wss://polygon-mumbai-bor.publicnode.com",
|
||||
@@ -41,6 +39,6 @@ export default {
|
||||
],
|
||||
"shortName": "maticmum",
|
||||
"slug": "mumbai",
|
||||
"testnet": false,
|
||||
"testnet": true,
|
||||
"title": "Polygon Testnet Mumbai"
|
||||
} as const satisfies Chain;
|
||||
@@ -0,0 +1,41 @@
|
||||
import type { Chain } from "../src/types";
|
||||
export default {
|
||||
"chain": "TQF",
|
||||
"chainId": 8192,
|
||||
"explorers": [
|
||||
{
|
||||
"name": "blockscout",
|
||||
"url": "https://toruscan.com",
|
||||
"standard": "EIP3091",
|
||||
"icon": {
|
||||
"url": "ipfs://QmYtUimyqHkkFxYdbXXRbUqNg2VLPUg6Uu2C2nmFWowiZM",
|
||||
"width": 551,
|
||||
"height": 540,
|
||||
"format": "png"
|
||||
}
|
||||
}
|
||||
],
|
||||
"faucets": [],
|
||||
"icon": {
|
||||
"url": "ipfs://bafkreidchntjaxmq52cuqqoalpajk5ssk4p77k7n4jgywqmkpldo5qgobm",
|
||||
"width": 1200,
|
||||
"height": 1200,
|
||||
"format": "png"
|
||||
},
|
||||
"infoURL": "https://docs.toruschain.com",
|
||||
"name": "Torus Mainnet",
|
||||
"nativeCurrency": {
|
||||
"name": "TQF",
|
||||
"symbol": "TQF",
|
||||
"decimals": 18
|
||||
},
|
||||
"networkId": 8192,
|
||||
"rpc": [
|
||||
"https://torus.rpc.thirdweb.com/${THIRDWEB_API_KEY}",
|
||||
"https://8192.rpc.thirdweb.com/${THIRDWEB_API_KEY}",
|
||||
"https://rpc.toruschain.com"
|
||||
],
|
||||
"shortName": "tqf",
|
||||
"slug": "torus",
|
||||
"testnet": false
|
||||
} as const satisfies Chain;
|
||||
@@ -0,0 +1,31 @@
|
||||
import type { Chain } from "../src/types";
|
||||
export default {
|
||||
"chain": "zFirst AvaCloud Subnet Thirdweb",
|
||||
"chainId": 82807,
|
||||
"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": "zFirst AvaCloud Subnet Thirdweb",
|
||||
"nativeCurrency": {
|
||||
"name": "zFirst AvaCloud Subnet Thirdweb",
|
||||
"symbol": "YOOO",
|
||||
"decimals": 18
|
||||
},
|
||||
"networkId": 82807,
|
||||
"redFlags": [],
|
||||
"rpc": [
|
||||
"https://zfirst-avacloud-subnet-thirdweb.rpc.thirdweb.com/${THIRDWEB_API_KEY}",
|
||||
"https://82807.rpc.thirdweb.com/${THIRDWEB_API_KEY}",
|
||||
"https://subnets.avacloud-dev.io/f2ea180d-0fda-4b06-9b2e-53a65d3fd789"
|
||||
],
|
||||
"shortName": "zFirst AvaCloud Subnet Thirdweb",
|
||||
"slug": "zfirst-avacloud-subnet-thirdweb",
|
||||
"testnet": true
|
||||
} as const satisfies Chain;
|
||||
@@ -6,10 +6,22 @@ export default {
|
||||
{
|
||||
"name": "Dodao Explorer",
|
||||
"url": "https://tanssi-evmexplorer.netlify.app/?rpcUrl=https://fraa-dancebox-3041-rpc.a.dancebox.tanssi.network",
|
||||
"standard": "none"
|
||||
"standard": "EIP3091",
|
||||
"icon": {
|
||||
"url": "ipfs://QmdWsi6mhs6Agb3LF4uycUwx2fgNmwkuAGb7JmsLPkwd3j",
|
||||
"width": 636,
|
||||
"height": 629,
|
||||
"format": "png"
|
||||
}
|
||||
}
|
||||
],
|
||||
"faucets": [],
|
||||
"icon": {
|
||||
"url": "ipfs://QmdWsi6mhs6Agb3LF4uycUwx2fgNmwkuAGb7JmsLPkwd3j",
|
||||
"width": 636,
|
||||
"height": 629,
|
||||
"format": "png"
|
||||
},
|
||||
"infoURL": "https://dodao.dev/",
|
||||
"name": "Dodao",
|
||||
"nativeCurrency": {
|
||||
|
||||
@@ -42,5 +42,5 @@ export default {
|
||||
],
|
||||
"shortName": "bnbt",
|
||||
"slug": "binance-testnet",
|
||||
"testnet": false
|
||||
"testnet": true
|
||||
} as const satisfies Chain;
|
||||
@@ -0,0 +1,31 @@
|
||||
import type { Chain } from "../src/types";
|
||||
export default {
|
||||
"chain": "Avalanche",
|
||||
"chainId": 993535,
|
||||
"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": "qr1120y1",
|
||||
"nativeCurrency": {
|
||||
"name": "qr1120y1 Token",
|
||||
"symbol": "LMK",
|
||||
"decimals": 18
|
||||
},
|
||||
"networkId": 993535,
|
||||
"redFlags": [],
|
||||
"rpc": [
|
||||
"https://qr1120y1.rpc.thirdweb.com/${THIRDWEB_API_KEY}",
|
||||
"https://993535.rpc.thirdweb.com/${THIRDWEB_API_KEY}",
|
||||
"https://subnets.avax.network/qr1120y1/testnet/rpc"
|
||||
],
|
||||
"shortName": "qr1120y1",
|
||||
"slug": "qr1120y1",
|
||||
"testnet": true
|
||||
} as const satisfies Chain;
|
||||
@@ -29,6 +29,8 @@ export default {
|
||||
"https://9996.rpc.thirdweb.com/${THIRDWEB_API_KEY}",
|
||||
"https://rpc-msc.mindchain.info/",
|
||||
"https://seednode.mindchain.info",
|
||||
"https://archive.mindchain.info/",
|
||||
"wss://archive.mindchain.info/ws",
|
||||
"wss://seednode.mindchain.info/ws"
|
||||
],
|
||||
"shortName": "MIND",
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@thirdweb-dev/chains",
|
||||
"version": "0.1.58",
|
||||
"version": "0.1.60",
|
||||
"main": "dist/thirdweb-dev-chains.cjs.js",
|
||||
"module": "dist/thirdweb-dev-chains.esm.js",
|
||||
"exports": {
|
||||
|
||||
@@ -95,7 +95,11 @@ export * from "./types";
|
||||
export * from "./utils";
|
||||
export * from "./async";
|
||||
export const defaultChains = [c1, c5, c8453, c84531, c137, c80001, c42161, c421613, c10, c420, c56, c97, c250, c4002, c43114, c43113, c1337];
|
||||
// @ts-expect-error - TODO: fix this later
|
||||
|
||||
\/**
|
||||
* @deprecated use \`fetchChains()\` instead
|
||||
*\/
|
||||
\/\/ @ts-expect-error - TODO: fix this later
|
||||
export const allChains: Chain[] = [${exportNames.join(", ")}];
|
||||
|
||||
type ChainsById = {
|
||||
@@ -152,6 +156,9 @@ function isValidChainSlug(slug: string): slug is ChainSlug {
|
||||
return slug in chainIdsBySlug;
|
||||
}
|
||||
|
||||
/**
|
||||
* @deprecated use \`getChainByChainIdAsync()\` instead
|
||||
*/
|
||||
export function getChainByChainId<TChainId extends ChainId>(
|
||||
chainId: TChainId | (number & {}),
|
||||
) {
|
||||
@@ -162,6 +169,9 @@ export function getChainByChainId<TChainId extends ChainId>(
|
||||
throw new Error(\`Chain with chainId "\${chainId}" not found\`);
|
||||
}
|
||||
|
||||
/**
|
||||
* @deprecated use \`getChainBySlugAsync()\` instead
|
||||
*/
|
||||
export function getChainBySlug<TSlug extends ChainSlug>(
|
||||
slug: TSlug | (string & {}),
|
||||
) {
|
||||
|
||||
@@ -4,8 +4,16 @@ type FetchChainResponse = {
|
||||
data: Chain;
|
||||
error: unknown;
|
||||
};
|
||||
|
||||
// cache of chainId -> Chain
|
||||
const chainCache: Record<number, Chain> = {};
|
||||
// cache of slug -> chainId
|
||||
const slugToChainId: Record<string, keyof typeof chainCache> = {};
|
||||
export async function fetchChain(chainIdOrSlug: number | string) {
|
||||
if (typeof chainIdOrSlug === "string" && chainIdOrSlug in slugToChainId) {
|
||||
return chainCache[slugToChainId[chainIdOrSlug]];
|
||||
} else if (typeof chainIdOrSlug === "number" && chainIdOrSlug in chainCache) {
|
||||
return chainCache[chainIdOrSlug];
|
||||
}
|
||||
const res = await fetch(
|
||||
`https://api.thirdweb.com/v1/chains/${chainIdOrSlug}`,
|
||||
);
|
||||
@@ -19,6 +27,11 @@ export async function fetchChain(chainIdOrSlug: number | string) {
|
||||
console.debug("[chains] fetchChain() error", json.error);
|
||||
return null;
|
||||
}
|
||||
const chain = json.data;
|
||||
// store the chain in chainCache
|
||||
chainCache[chain.chainId] = chain;
|
||||
// store the slug<->chainId in slugToChainId
|
||||
slugToChainId[chain.slug] = chain.chainId;
|
||||
return json.data;
|
||||
} catch (err) {
|
||||
console.debug("[chains] fetchChain() failed", err);
|
||||
@@ -31,10 +44,16 @@ type FetchChainsResponse = {
|
||||
error: unknown;
|
||||
};
|
||||
|
||||
const fetchChainsCache: Record<string, Chain[]> = {};
|
||||
export async function fetchChains(options?: {
|
||||
limit?: number;
|
||||
offset?: number;
|
||||
}) {
|
||||
// cache key is based on limit and offset (options)
|
||||
const cacheKey = `l:${options?.limit ?? 0}o:${options?.offset ?? 0}`;
|
||||
if (cacheKey in fetchChainsCache) {
|
||||
return fetchChainsCache[cacheKey];
|
||||
}
|
||||
const url = new URL(`https://api.thirdweb.com/v1/chains`);
|
||||
if (options?.limit && options.limit >= 1) {
|
||||
url.searchParams.append("limit", options.limit.toString());
|
||||
@@ -53,9 +72,39 @@ export async function fetchChains(options?: {
|
||||
console.debug("[chains] fetchChain() error", json.error);
|
||||
return null;
|
||||
}
|
||||
fetchChainsCache[cacheKey] = json.data;
|
||||
return json.data;
|
||||
} catch (err) {
|
||||
console.debug("[chains] fetchChain() failed", err);
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @param chainId - the chainId of the chain to resolve
|
||||
* @returns a Promise that resolves to the Chain object
|
||||
* @throws if the chainId is not found
|
||||
*/
|
||||
export async function getChainByChainIdAsync(chainId: number): Promise<Chain> {
|
||||
const chain = await fetchChain(chainId);
|
||||
if (!chain) {
|
||||
throw new Error(`Chain with chainId "${chainId}" not found`);
|
||||
}
|
||||
|
||||
return chain;
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @param slug - the slug of the chain to resolve
|
||||
* @returns a Promise that resolves to the Chain object
|
||||
* @throws if the slug is not found
|
||||
*/
|
||||
export async function getChainBySlugAsync(slug: string): Promise<Chain> {
|
||||
const chain = await fetchChain(slug);
|
||||
if (!chain) {
|
||||
throw new Error(`Chain with slug "${slug}" not found`);
|
||||
}
|
||||
return chain;
|
||||
}
|
||||
|
||||
+134
-20
File diff suppressed because one or more lines are too long
@@ -1,5 +1,26 @@
|
||||
# thirdweb
|
||||
|
||||
## 0.13.21
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- Updated dependencies [[`8c2d4e5e`](https://github.com/thirdweb-dev/js/commit/8c2d4e5ea7c38b3efa4d8d94c9822a92d271e59b), [`b0ecfd2d`](https://github.com/thirdweb-dev/js/commit/b0ecfd2d8d5cda33dc8f5ea2d20119cb901a0bcb), [`d28097f5`](https://github.com/thirdweb-dev/js/commit/d28097f508739cdbd6625e09c2ed0fe25a922c0f), [`b8332500`](https://github.com/thirdweb-dev/js/commit/b833250053320c8608109053f5cffe2dc96ce70a), [`8bf3be88`](https://github.com/thirdweb-dev/js/commit/8bf3be88be051178a7142618c4371d2f2ef26271), [`b02fb91a`](https://github.com/thirdweb-dev/js/commit/b02fb91a548a3f66f7677ced24be9397e0f9a7ba), [`f93bd325`](https://github.com/thirdweb-dev/js/commit/f93bd325e119381ddc3380a5ea43fe63fbcf42c0), [`2861dff1`](https://github.com/thirdweb-dev/js/commit/2861dff1f013b5150314fdaccaeadddbcf0d21c9), [`61b6a002`](https://github.com/thirdweb-dev/js/commit/61b6a00214716454222e67fe5fdb47edba391070), [`28fc3736`](https://github.com/thirdweb-dev/js/commit/28fc3736aa30c89690084aa2c62556c183796352), [`06805217`](https://github.com/thirdweb-dev/js/commit/06805217c26de203a57c21246acba22def8a78fa), [`2b4f1c8e`](https://github.com/thirdweb-dev/js/commit/2b4f1c8e55de091100fb5279887bcb19ea31d38c)]:
|
||||
- @thirdweb-dev/wallets@2.1.10
|
||||
- @thirdweb-dev/sdk@4.0.18
|
||||
- @thirdweb-dev/chains@0.1.60
|
||||
- @thirdweb-dev/storage@2.0.6
|
||||
- @thirdweb-dev/auth@4.1.13
|
||||
|
||||
## 0.13.20
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- Updated dependencies [[`47b0ed51`](https://github.com/thirdweb-dev/js/commit/47b0ed5171be5608ae23c19481a1b04948443c6a), [`d4ce855e`](https://github.com/thirdweb-dev/js/commit/d4ce855e5f5e6c4206a3efa250e92e690ae87281), [`b5bbe2bd`](https://github.com/thirdweb-dev/js/commit/b5bbe2bd438179c38451bc2cfa20a54fc79e4f3a)]:
|
||||
- @thirdweb-dev/chains@0.1.59
|
||||
- @thirdweb-dev/wallets@2.1.9
|
||||
- @thirdweb-dev/sdk@4.0.17
|
||||
- @thirdweb-dev/auth@4.1.12
|
||||
|
||||
## 0.13.19
|
||||
|
||||
### Patch Changes
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
{
|
||||
"name": "thirdweb",
|
||||
"main": "dist/cli/index.js",
|
||||
"version": "0.13.19",
|
||||
"version": "0.13.21",
|
||||
"repository": "https://github.com/thirdweb-dev/js/tree/main/packages/cli",
|
||||
"author": "thirdweb eng <[email protected]>",
|
||||
"license": "Apache-2.0",
|
||||
|
||||
@@ -1,5 +1,52 @@
|
||||
# @thirdweb-dev/react-core
|
||||
|
||||
## 4.1.11
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- [#2007](https://github.com/thirdweb-dev/js/pull/2007) [`e79b2935`](https://github.com/thirdweb-dev/js/commit/e79b293562bbcf4af6fbcb4829b2acb4cb3e2cb4) Thanks [@kien-ngo](https://github.com/kien-ngo)! - Get the native token balance of a wallet address on the `activeChain` network set in the `ThirdwebProvider`
|
||||
|
||||
```ts
|
||||
const balanceQuery = useBalanceForAddress(walletAddress);
|
||||
|
||||
console.log(balanceQuery.data);
|
||||
```
|
||||
|
||||
- [#1926](https://github.com/thirdweb-dev/js/pull/1926) [`8c2d4e5e`](https://github.com/thirdweb-dev/js/commit/8c2d4e5ea7c38b3efa4d8d94c9822a92d271e59b) Thanks [@kien-ngo](https://github.com/kien-ngo)! - Add Rabby browser extension
|
||||
|
||||
- [#2001](https://github.com/thirdweb-dev/js/pull/2001) [`a27b10c5`](https://github.com/thirdweb-dev/js/commit/a27b10c5c3400500ef0138069acc550b3a07ffc6) Thanks [@iketw](https://github.com/iketw)! - Don't disconnect wallet if connecting
|
||||
|
||||
- [#2016](https://github.com/thirdweb-dev/js/pull/2016) [`94559129`](https://github.com/thirdweb-dev/js/commit/9455912932c71f3ef9b67461bf5604f1ea1f71e8) Thanks [@iketw](https://github.com/iketw)! - Share WalletConnectHandler between React and RN to support wallets as receivers
|
||||
|
||||
- [#1997](https://github.com/thirdweb-dev/js/pull/1997) [`50749662`](https://github.com/thirdweb-dev/js/commit/507496627bcd77b49bb027b24996a31c57e04819) Thanks [@MananTank](https://github.com/MananTank)! - - Fixes issue #1708
|
||||
|
||||
- Fixes smart wallet icon shown even after clicking on "Switch to Personal wallet" in ConnectWallet dropdown
|
||||
|
||||
- [#1987](https://github.com/thirdweb-dev/js/pull/1987) [`b3394277`](https://github.com/thirdweb-dev/js/commit/b3394277c77e4af130151111e056e27a28ac893a) Thanks [@MananTank](https://github.com/MananTank)! - Improved JSDoc comments and type exports
|
||||
|
||||
- [#1928](https://github.com/thirdweb-dev/js/pull/1928) [`2b4f1c8e`](https://github.com/thirdweb-dev/js/commit/2b4f1c8e55de091100fb5279887bcb19ea31d38c) Thanks [@kien-ngo](https://github.com/kien-ngo)! - Add Crypto.com Defi wallet
|
||||
|
||||
- [#2015](https://github.com/thirdweb-dev/js/pull/2015) [`4c488aa3`](https://github.com/thirdweb-dev/js/commit/4c488aa31f6fadc13759ff60f30230b929feb314) Thanks [@MananTank](https://github.com/MananTank)! - Fix auto-connecting a personal wallet for smart/safe wallet
|
||||
|
||||
- Updated dependencies [[`8c2d4e5e`](https://github.com/thirdweb-dev/js/commit/8c2d4e5ea7c38b3efa4d8d94c9822a92d271e59b), [`b0ecfd2d`](https://github.com/thirdweb-dev/js/commit/b0ecfd2d8d5cda33dc8f5ea2d20119cb901a0bcb), [`d28097f5`](https://github.com/thirdweb-dev/js/commit/d28097f508739cdbd6625e09c2ed0fe25a922c0f), [`b8332500`](https://github.com/thirdweb-dev/js/commit/b833250053320c8608109053f5cffe2dc96ce70a), [`8bf3be88`](https://github.com/thirdweb-dev/js/commit/8bf3be88be051178a7142618c4371d2f2ef26271), [`b02fb91a`](https://github.com/thirdweb-dev/js/commit/b02fb91a548a3f66f7677ced24be9397e0f9a7ba), [`f93bd325`](https://github.com/thirdweb-dev/js/commit/f93bd325e119381ddc3380a5ea43fe63fbcf42c0), [`2861dff1`](https://github.com/thirdweb-dev/js/commit/2861dff1f013b5150314fdaccaeadddbcf0d21c9), [`61b6a002`](https://github.com/thirdweb-dev/js/commit/61b6a00214716454222e67fe5fdb47edba391070), [`28fc3736`](https://github.com/thirdweb-dev/js/commit/28fc3736aa30c89690084aa2c62556c183796352), [`06805217`](https://github.com/thirdweb-dev/js/commit/06805217c26de203a57c21246acba22def8a78fa), [`2b4f1c8e`](https://github.com/thirdweb-dev/js/commit/2b4f1c8e55de091100fb5279887bcb19ea31d38c)]:
|
||||
- @thirdweb-dev/[email protected]
|
||||
- @thirdweb-dev/[email protected]
|
||||
- @thirdweb-dev/[email protected]
|
||||
- @thirdweb-dev/[email protected]
|
||||
- @thirdweb-dev/[email protected]
|
||||
|
||||
## 4.1.10
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- [#1996](https://github.com/thirdweb-dev/js/pull/1996) [`4bb8f5b1`](https://github.com/thirdweb-dev/js/commit/4bb8f5b15e58de39c5edccc7476da3e4907d7688) Thanks [@MananTank](https://github.com/MananTank)! - Revert commit fb0cb676b996fe386dcc53b5a6dab03f88e76175
|
||||
|
||||
- Updated dependencies [[`47b0ed51`](https://github.com/thirdweb-dev/js/commit/47b0ed5171be5608ae23c19481a1b04948443c6a), [`d4ce855e`](https://github.com/thirdweb-dev/js/commit/d4ce855e5f5e6c4206a3efa250e92e690ae87281), [`b5bbe2bd`](https://github.com/thirdweb-dev/js/commit/b5bbe2bd438179c38451bc2cfa20a54fc79e4f3a)]:
|
||||
- @thirdweb-dev/[email protected]
|
||||
- @thirdweb-dev/[email protected]
|
||||
- @thirdweb-dev/[email protected]
|
||||
- @thirdweb-dev/[email protected]
|
||||
|
||||
## 4.1.9
|
||||
|
||||
### Patch Changes
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@thirdweb-dev/react-core",
|
||||
"version": "4.1.9",
|
||||
"version": "4.1.11",
|
||||
"repository": "https://github.com/thirdweb-dev/js/tree/main/packages/react-core",
|
||||
"author": "thirdweb eng <[email protected]>",
|
||||
"license": "Apache-2.0",
|
||||
|
||||
@@ -29,10 +29,12 @@ type NetworkMetadata = {
|
||||
|
||||
/**
|
||||
*
|
||||
* @deprecated - use `useChain`, `useSwitchChain`, `useChainId` instead
|
||||
*
|
||||
* Hook for getting metadata about the network the current wallet is connected to and switching networks
|
||||
*
|
||||
* It's important to note that some wallet apps do not support programmatic network switching and switchNetwork will be undefined.
|
||||
* For those situations, you can typically switch networks in the wallet app this hook will still work.
|
||||
*
|
||||
* @example
|
||||
* ```javascript
|
||||
* import { useNetwork } from "@thirdweb-dev/react";
|
||||
@@ -47,12 +49,9 @@ type NetworkMetadata = {
|
||||
* </button>
|
||||
* );
|
||||
* };
|
||||
```
|
||||
* ```
|
||||
*
|
||||
* It's important to note that some wallet apps do not support programmatic network switching and switchNetwork will be undefined.
|
||||
* For those situations, you can typically switch networks in the wallet app this hook will still work.
|
||||
*
|
||||
* @public
|
||||
* @deprecated - use `useChain`, `useSwitchChain`, `useChainId` instead
|
||||
*/
|
||||
export function useNetwork(): [NetworkMetadata, SwitchNetwork | undefined] {
|
||||
const chain = useChain();
|
||||
|
||||
@@ -5,6 +5,7 @@ import type {
|
||||
Coin98Wallet,
|
||||
CoinbaseWallet,
|
||||
CoreWallet,
|
||||
CryptoDefiWallet,
|
||||
EmbeddedWallet,
|
||||
FrameWallet,
|
||||
LocalWallet,
|
||||
@@ -13,6 +14,7 @@ import type {
|
||||
OKXWallet,
|
||||
PaperWallet,
|
||||
PhantomWallet,
|
||||
RabbyWallet,
|
||||
RainbowWallet,
|
||||
SafeWallet,
|
||||
SmartWallet,
|
||||
@@ -45,6 +47,8 @@ type WalletIdToWalletTypeMap = {
|
||||
phantom: PhantomWallet;
|
||||
walletConnectV1: WalletConnect;
|
||||
okx: OKXWallet;
|
||||
cryptoDefiWallet: CryptoDefiWallet;
|
||||
rabby: RabbyWallet;
|
||||
};
|
||||
|
||||
/**
|
||||
|
||||
@@ -1,5 +1,8 @@
|
||||
import { createContext } from "react";
|
||||
|
||||
/**
|
||||
* @internal
|
||||
*/
|
||||
export const ThirdwebThemeContext = /* @__PURE__ */ createContext<
|
||||
"light" | "dark" | undefined
|
||||
>(undefined);
|
||||
|
||||
@@ -11,6 +11,9 @@ import {
|
||||
ConnectParams,
|
||||
CreateAsyncStorage,
|
||||
SignerWallet,
|
||||
WalletConnectHandler,
|
||||
WalletConnectReceiverConfig,
|
||||
WalletConnectV2Handler,
|
||||
walletIds,
|
||||
} from "@thirdweb-dev/wallets";
|
||||
import { Signer } from "ethers";
|
||||
@@ -24,6 +27,7 @@ import {
|
||||
useRef,
|
||||
useState,
|
||||
} from "react";
|
||||
import { isWalletConnectReceiverEnabled } from "../utils/receiver";
|
||||
|
||||
const LAST_CONNECTED_WALLET_STORAGE_KEY = "lastConnectedWallet";
|
||||
|
||||
@@ -65,16 +69,6 @@ const walletInstanceToConfig: Map<
|
||||
WalletConfig<any>
|
||||
> = new Map();
|
||||
|
||||
type PersonalWalletInfo = {
|
||||
signer?: Signer;
|
||||
wallet?: WalletInstance;
|
||||
walletConfig?: WalletConfig;
|
||||
connectionStatus: ConnectionStatus;
|
||||
chainId?: number;
|
||||
disconnect: () => Promise<void>;
|
||||
switchChain: (chainId: number) => Promise<void>;
|
||||
};
|
||||
|
||||
type ThirdwebWalletContextData = {
|
||||
wallets: WalletConfig[];
|
||||
signer?: Signer;
|
||||
@@ -102,20 +96,7 @@ type ThirdwebWalletContextData = {
|
||||
getWalletConfig: (walletInstance: WalletInstance) => WalletConfig | undefined;
|
||||
activeChainSetExplicitly: boolean;
|
||||
clientId?: string;
|
||||
/**
|
||||
* flag indicating whether to treat any wallet that gets connected after setting this flag as a "personal" wallet
|
||||
* If a wallet is treated as a "personal" wallet, It's details like signer, connectionStatus, wallet, walletConfig will be saved in `personalWalletInfo` object instead of the main context
|
||||
*/
|
||||
isConnectingToPersonalWallet: boolean;
|
||||
/**
|
||||
* Set value of `isConnectingToPersonalWallet` flag
|
||||
*/
|
||||
setIsConnectingToPersonalWallet: (value: boolean) => void;
|
||||
/**
|
||||
* object containing info about the connected personal wallet
|
||||
* When `isConnectingToPersonalWallet` is set to true, and a wallet is connected after that, all the info about the connected wallet will be stored in this object
|
||||
*/
|
||||
personalWalletInfo: PersonalWalletInfo;
|
||||
walletConnectHandler: WalletConnectHandler | undefined;
|
||||
};
|
||||
|
||||
const ThirdwebWalletContext = /* @__PURE__ */ createContext<
|
||||
@@ -137,31 +118,11 @@ export function ThirdwebWalletProvider(
|
||||
signerWallet?: WalletConfig<SignerWallet>;
|
||||
}>,
|
||||
) {
|
||||
const autoConnectTimeout = props.autoConnectTimeout || 15000;
|
||||
|
||||
if (!lastConnectedWalletStorage) {
|
||||
lastConnectedWalletStorage =
|
||||
props.createWalletStorage("coordinatorStorage");
|
||||
}
|
||||
|
||||
// if autoSwitch is enabled - enforce connection to activeChain
|
||||
const chainToConnect = props.autoSwitch ? props.activeChain : undefined;
|
||||
|
||||
const [isConnectingToPersonalWallet, setIsConnectingToPersonalWallet] =
|
||||
useState(false);
|
||||
|
||||
const personalWalletConnection = usePersonalWalletConnection();
|
||||
|
||||
const {
|
||||
wallet: personalWallet,
|
||||
setWallet: setPersonalWallet,
|
||||
setSigner: setPersonalWalletSigner,
|
||||
setStatus: setPersonalWalletStatus,
|
||||
setWalletConfig: setPersonalWalletConfig,
|
||||
} = personalWalletConnection;
|
||||
|
||||
const [signer, setSigner] = useState<Signer | undefined>(undefined);
|
||||
const [status, setStatus] = useState<ConnectionStatus>("unknown");
|
||||
const [connectionStatus, setConnectionStatus] =
|
||||
useState<ConnectionStatus>("unknown");
|
||||
|
||||
const autoConnectTimeout = props.autoConnectTimeout || 15000;
|
||||
|
||||
const [activeWallet, setActiveWallet] = useState<
|
||||
WalletInstance | undefined
|
||||
@@ -175,6 +136,17 @@ export function ThirdwebWalletProvider(
|
||||
WalletConfig | undefined
|
||||
>();
|
||||
|
||||
const [walletConnectHandler, setWalletConnectHandler] =
|
||||
useState<WalletConnectHandler>();
|
||||
|
||||
if (!lastConnectedWalletStorage) {
|
||||
lastConnectedWalletStorage =
|
||||
props.createWalletStorage("coordinatorStorage");
|
||||
}
|
||||
|
||||
// if autoSwitch is enabled - enforce connection to activeChain
|
||||
const chainToConnect = props.autoSwitch ? props.activeChain : undefined;
|
||||
|
||||
const walletParams: WalletOptions = useMemo(() => {
|
||||
return {
|
||||
chains: props.chains,
|
||||
@@ -201,25 +173,40 @@ export function ThirdwebWalletProvider(
|
||||
[walletParams],
|
||||
);
|
||||
|
||||
// if props.chains is updated, update the wallet's chains
|
||||
// if props.chains is updated, update the active wallet's chains
|
||||
useEffect(() => {
|
||||
if (activeWallet) {
|
||||
activeWallet.updateChains(props.chains);
|
||||
const _personalWallet = activeWallet.getPersonalWallet();
|
||||
if (_personalWallet instanceof AbstractClientWallet) {
|
||||
_personalWallet.updateChains(props.chains);
|
||||
}
|
||||
}
|
||||
}, [activeWallet, props.chains]);
|
||||
|
||||
useEffect(() => {
|
||||
if (!activeWallet) {
|
||||
return;
|
||||
}
|
||||
|
||||
if (isConnectingToPersonalWallet && personalWallet) {
|
||||
personalWallet.updateChains(props.chains);
|
||||
const initWCHandler = async () => {
|
||||
const wcReceiverOptions =
|
||||
activeWallet?.getOptions() as WalletConnectReceiverConfig;
|
||||
|
||||
const handler = new WalletConnectV2Handler(
|
||||
{
|
||||
walletConnectReceiver: {
|
||||
...(wcReceiverOptions?.walletConnectReceiver === true
|
||||
? {}
|
||||
: wcReceiverOptions?.walletConnectReceiver),
|
||||
},
|
||||
},
|
||||
activeWallet,
|
||||
);
|
||||
await handler.init();
|
||||
setWalletConnectHandler(handler);
|
||||
};
|
||||
|
||||
if (isWalletConnectReceiverEnabled(activeWallet)) {
|
||||
initWCHandler();
|
||||
}
|
||||
}, [
|
||||
activeWallet,
|
||||
props.chains,
|
||||
personalWallet,
|
||||
isConnectingToPersonalWallet,
|
||||
]);
|
||||
}, [activeWallet]);
|
||||
|
||||
const setConnectedWallet = useCallback(
|
||||
async (
|
||||
@@ -227,45 +214,23 @@ export function ThirdwebWalletProvider(
|
||||
connectParams?: ConnectParams<Record<string, any>>,
|
||||
isAutoConnect = false,
|
||||
) => {
|
||||
if (isConnectingToPersonalWallet) {
|
||||
setPersonalWallet(wallet);
|
||||
} else {
|
||||
setActiveWallet(wallet);
|
||||
}
|
||||
|
||||
setActiveWallet(wallet);
|
||||
const walletConfig = walletInstanceToConfig.get(wallet);
|
||||
if (!walletConfig) {
|
||||
throw new Error(
|
||||
"Wallet config not found for given wallet instance. Do not create a wallet instance manually - use the useCreateWalletInstance() hook instead",
|
||||
);
|
||||
}
|
||||
|
||||
if (isConnectingToPersonalWallet) {
|
||||
setPersonalWalletConfig(walletConfig);
|
||||
setPersonalWalletStatus("connected");
|
||||
} else {
|
||||
setActiveWalletConfig(walletConfig);
|
||||
setStatus("connected");
|
||||
}
|
||||
|
||||
setActiveWalletConfig(walletConfig);
|
||||
setConnectionStatus("connected");
|
||||
const _signer = await wallet.getSigner();
|
||||
setSigner(_signer);
|
||||
|
||||
if (isConnectingToPersonalWallet) {
|
||||
setPersonalWalletSigner(_signer);
|
||||
} else {
|
||||
setSigner(_signer);
|
||||
}
|
||||
|
||||
// it auto-connected, then the details is already saved in storage, no need to store again
|
||||
// it autoconnected, then the details is already saved in storage, no need to store again
|
||||
if (isAutoConnect) {
|
||||
return;
|
||||
}
|
||||
|
||||
// do not save connection details for personal wallet
|
||||
if (isConnectingToPersonalWallet) {
|
||||
return;
|
||||
}
|
||||
|
||||
// save to storage
|
||||
|
||||
const walletInfo: LastConnectedWalletInfo = {
|
||||
@@ -273,18 +238,16 @@ export function ThirdwebWalletProvider(
|
||||
connectParams: connectParams || wallet.getConnectParams(),
|
||||
};
|
||||
|
||||
// if personal wallet exists, we need to replace the connectParams.personalWallet to a serializable version
|
||||
const _personalWallet =
|
||||
wallet.getPersonalWallet() as AbstractClientWallet;
|
||||
// if personal wallet exists, we need to replace the connectParams.personalWallet to a stringifiable version
|
||||
const personalWallet = wallet.getPersonalWallet() as AbstractClientWallet;
|
||||
const personalWalletConfig = walletInstanceToConfig.get(personalWallet);
|
||||
|
||||
const _personalWalletConfig = walletInstanceToConfig.get(_personalWallet);
|
||||
|
||||
if (_personalWallet && _personalWalletConfig) {
|
||||
if (personalWallet && personalWalletConfig) {
|
||||
walletInfo.connectParams = {
|
||||
...walletInfo.connectParams,
|
||||
personalWallet: {
|
||||
walletId: _personalWalletConfig.id,
|
||||
connectParams: _personalWallet.getConnectParams(),
|
||||
walletId: personalWalletConfig.id,
|
||||
connectParams: personalWallet.getConnectParams(),
|
||||
},
|
||||
};
|
||||
|
||||
@@ -293,13 +256,7 @@ export function ThirdwebWalletProvider(
|
||||
saveLastConnectedWalletInfo(walletInfo);
|
||||
}
|
||||
},
|
||||
[
|
||||
isConnectingToPersonalWallet,
|
||||
setPersonalWallet,
|
||||
setPersonalWalletConfig,
|
||||
setPersonalWalletStatus,
|
||||
setPersonalWalletSigner,
|
||||
],
|
||||
[],
|
||||
);
|
||||
|
||||
const storeLastActiveChainId = useCallback(async (chainId: number) => {
|
||||
@@ -329,35 +286,22 @@ export function ThirdwebWalletProvider(
|
||||
|
||||
const switchChain = useCallback(
|
||||
async (chainId: number) => {
|
||||
const wallet = isConnectingToPersonalWallet
|
||||
? personalWallet
|
||||
: activeWallet;
|
||||
|
||||
if (!wallet) {
|
||||
if (!activeWallet) {
|
||||
throw new Error("No active wallet");
|
||||
}
|
||||
|
||||
await wallet.switchChain(chainId);
|
||||
const _signer = await wallet.getSigner();
|
||||
await activeWallet.switchChain(chainId);
|
||||
const _signer = await activeWallet.getSigner();
|
||||
await storeLastActiveChainId(chainId);
|
||||
|
||||
if (!isConnectingToPersonalWallet) {
|
||||
await storeLastActiveChainId(chainId);
|
||||
setSigner(_signer);
|
||||
} else {
|
||||
setPersonalWalletSigner(_signer);
|
||||
}
|
||||
setSigner(_signer);
|
||||
},
|
||||
[
|
||||
isConnectingToPersonalWallet,
|
||||
personalWallet,
|
||||
activeWallet,
|
||||
storeLastActiveChainId,
|
||||
setPersonalWalletSigner,
|
||||
],
|
||||
[activeWallet, storeLastActiveChainId],
|
||||
);
|
||||
|
||||
// Auto Connect
|
||||
const autoConnectTriggered = useRef(false);
|
||||
|
||||
// Auto Connect
|
||||
useEffect(() => {
|
||||
// do not auto connect if signerWallet is given
|
||||
if (props.signerWallet) {
|
||||
@@ -367,44 +311,66 @@ export function ThirdwebWalletProvider(
|
||||
if (autoConnectTriggered.current) {
|
||||
return;
|
||||
}
|
||||
// if explicitly set to false, don't auto connect
|
||||
// by default, auto connect
|
||||
if (props.shouldAutoConnect === false) {
|
||||
setStatus("disconnected");
|
||||
return;
|
||||
}
|
||||
|
||||
if (activeWallet) {
|
||||
// there's already an active wallet, don't auto connect
|
||||
return;
|
||||
}
|
||||
|
||||
if (status !== "unknown") {
|
||||
if (connectionStatus !== "unknown") {
|
||||
// only try to auto connect if we're in the unknown state
|
||||
return;
|
||||
}
|
||||
|
||||
// if explicitly set to false, don't auto connect
|
||||
// by default, auto connect
|
||||
if (props.shouldAutoConnect === false) {
|
||||
setConnectionStatus("disconnected");
|
||||
return;
|
||||
}
|
||||
|
||||
autoConnectTriggered.current = true;
|
||||
|
||||
async function autoConnect() {
|
||||
async function autoconnect() {
|
||||
const walletInfo = await getLastConnectedWalletInfo();
|
||||
|
||||
if (!walletInfo) {
|
||||
setStatus("disconnected");
|
||||
setConnectionStatus("disconnected");
|
||||
return;
|
||||
}
|
||||
|
||||
const walletObj = props.supportedWallets.find(
|
||||
let walletObj = props.supportedWallets.find(
|
||||
(W) => W.id === walletInfo.walletId,
|
||||
);
|
||||
|
||||
if (!walletObj) {
|
||||
// last connected wallet is no longer present in the supported wallets
|
||||
setStatus("disconnected");
|
||||
setConnectionStatus("disconnected");
|
||||
return;
|
||||
}
|
||||
|
||||
const personalWalletInfo = walletInfo.connectParams?.personalWallet;
|
||||
let _personalWalletInfo = walletInfo.connectParams?.personalWallet;
|
||||
|
||||
// when connecting to magicLink with social login, it redirects to other page
|
||||
// before redirecting, we save the walletInfo to local storage so that we can auto connect after redirect back to current page
|
||||
// when using smartWallet + magicLink combination - the walletInfo will only contain info about magicLink and not smartWallet because it was never connected
|
||||
// so if smartWallet + magicLink combination is used, we need to connect magicLink first and then connect smartWallet
|
||||
if (
|
||||
walletInfo.walletId === walletIds.magicLink &&
|
||||
walletInfo.connectParams &&
|
||||
"oauthProvider" in walletInfo.connectParams
|
||||
) {
|
||||
// if the wallet requires a personal wallet (like smartWallet), but the saved data does not have it
|
||||
if (walletObj.personalWallets && !_personalWalletInfo) {
|
||||
// fix the connectParams by adding the personal wallet info
|
||||
_personalWalletInfo = {
|
||||
walletId: walletInfo.walletId,
|
||||
connectParams: walletInfo.connectParams,
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
const personalWalletInfo = _personalWalletInfo;
|
||||
|
||||
if (personalWalletInfo) {
|
||||
const personalWallets = walletObj.personalWallets || [];
|
||||
@@ -430,7 +396,7 @@ export function ThirdwebWalletProvider(
|
||||
} catch (e) {
|
||||
console.error("Failed to auto connect personal wallet");
|
||||
console.error(e);
|
||||
setStatus("disconnected");
|
||||
setConnectionStatus("disconnected");
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -441,16 +407,29 @@ export function ThirdwebWalletProvider(
|
||||
};
|
||||
} else {
|
||||
// last used personal wallet is no longer present in the supported wallets
|
||||
setStatus("disconnected");
|
||||
setConnectionStatus("disconnected");
|
||||
return;
|
||||
}
|
||||
} else {
|
||||
// if walletObj requires a personal wallet, but the saved data does not have it
|
||||
// connect to personal wallet only ( this happens when user switches to personal wallet and reloads the page )
|
||||
if (walletObj.personalWallets) {
|
||||
// connect the personal wallet instead
|
||||
walletObj = walletObj.personalWallets.find(
|
||||
(w) => w.id === walletInfo.walletId,
|
||||
);
|
||||
if (!walletObj) {
|
||||
setConnectionStatus("disconnected");
|
||||
return;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// create a wallet instance and auto connect it
|
||||
const wallet = createWalletInstance(walletObj);
|
||||
|
||||
try {
|
||||
setStatus("connecting");
|
||||
setConnectionStatus("connecting");
|
||||
await timeoutPromise(wallet.autoConnect(walletInfo.connectParams), {
|
||||
ms: autoConnectTimeout,
|
||||
message: autoConnectTimeoutErrorMessage,
|
||||
@@ -467,21 +446,20 @@ export function ThirdwebWalletProvider(
|
||||
LAST_CONNECTED_WALLET_STORAGE_KEY,
|
||||
);
|
||||
}
|
||||
setStatus("disconnected");
|
||||
setConnectionStatus("disconnected");
|
||||
}
|
||||
}
|
||||
|
||||
autoConnect();
|
||||
autoconnect();
|
||||
}, [
|
||||
createWalletInstance,
|
||||
props.supportedWallets,
|
||||
setConnectedWallet,
|
||||
props.shouldAutoConnect,
|
||||
activeWallet,
|
||||
status,
|
||||
connectionStatus,
|
||||
autoConnectTimeout,
|
||||
props.signerWallet,
|
||||
setStatus,
|
||||
]);
|
||||
|
||||
const connectWallet = useCallback(
|
||||
@@ -494,12 +472,7 @@ export function ThirdwebWalletProvider(
|
||||
};
|
||||
|
||||
const wallet = createWalletInstance(WalletObj);
|
||||
if (isConnectingToPersonalWallet) {
|
||||
setPersonalWalletStatus("connecting");
|
||||
} else {
|
||||
setStatus("connecting");
|
||||
}
|
||||
|
||||
setConnectionStatus("connecting");
|
||||
try {
|
||||
// if magic is using social login - it will redirect the page - so need to save walletInfo before connecting
|
||||
// TODO: find a better way to handle this
|
||||
@@ -513,65 +486,41 @@ export function ThirdwebWalletProvider(
|
||||
setConnectedWallet(wallet, _connectedParams);
|
||||
} catch (e: any) {
|
||||
console.error(`Error connecting to wallet: ${e}`);
|
||||
if (isConnectingToPersonalWallet) {
|
||||
setPersonalWalletStatus("disconnected");
|
||||
} else {
|
||||
setStatus("disconnected");
|
||||
}
|
||||
setConnectionStatus("disconnected");
|
||||
throw e;
|
||||
}
|
||||
|
||||
return wallet;
|
||||
},
|
||||
[
|
||||
chainToConnect?.chainId,
|
||||
createWalletInstance,
|
||||
isConnectingToPersonalWallet,
|
||||
setPersonalWalletStatus,
|
||||
setConnectedWallet,
|
||||
],
|
||||
[createWalletInstance, setConnectedWallet, chainToConnect],
|
||||
);
|
||||
|
||||
const onWalletDisconnect = useCallback(async () => {
|
||||
await lastConnectedWalletStorage.removeItem(
|
||||
LAST_CONNECTED_WALLET_STORAGE_KEY,
|
||||
);
|
||||
if (isConnectingToPersonalWallet) {
|
||||
setPersonalWalletStatus("disconnected");
|
||||
setPersonalWalletSigner(undefined);
|
||||
setPersonalWallet(undefined);
|
||||
setPersonalWalletConfig(undefined);
|
||||
} else {
|
||||
setStatus("disconnected");
|
||||
setSigner(undefined);
|
||||
setActiveWallet(undefined);
|
||||
setActiveWalletConfig(undefined);
|
||||
}
|
||||
}, [
|
||||
isConnectingToPersonalWallet,
|
||||
setPersonalWallet,
|
||||
setPersonalWalletStatus,
|
||||
setPersonalWalletSigner,
|
||||
setPersonalWalletConfig,
|
||||
]);
|
||||
setConnectionStatus("disconnected");
|
||||
setSigner(undefined);
|
||||
setActiveWallet(undefined);
|
||||
setActiveWalletConfig(undefined);
|
||||
}, []);
|
||||
|
||||
const disconnectWallet = useCallback(async () => {
|
||||
const wallet = isConnectingToPersonalWallet ? personalWallet : activeWallet;
|
||||
|
||||
if (wallet) {
|
||||
const _personalWallet = wallet.getPersonalWallet();
|
||||
await wallet.disconnect();
|
||||
if (_personalWallet instanceof AbstractClientWallet) {
|
||||
await _personalWallet.disconnect();
|
||||
}
|
||||
// if disconnect is called before the wallet is connected
|
||||
if (!activeWallet) {
|
||||
onWalletDisconnect();
|
||||
return;
|
||||
}
|
||||
|
||||
const personalWallet = activeWallet.getPersonalWallet();
|
||||
await activeWallet.disconnect();
|
||||
|
||||
if (personalWallet) {
|
||||
await (personalWallet as AbstractClientWallet)?.disconnect();
|
||||
}
|
||||
|
||||
onWalletDisconnect();
|
||||
}, [
|
||||
activeWallet,
|
||||
isConnectingToPersonalWallet,
|
||||
onWalletDisconnect,
|
||||
personalWallet,
|
||||
]);
|
||||
}, [activeWallet, onWalletDisconnect]);
|
||||
|
||||
// when wallet's network or account is changed using the extension, update UI
|
||||
useEffect(() => {
|
||||
@@ -584,20 +533,19 @@ export function ThirdwebWalletProvider(
|
||||
setSigner(_signer);
|
||||
};
|
||||
|
||||
activeWallet.addListener("change", update);
|
||||
activeWallet.addListener("disconnect", onWalletDisconnect);
|
||||
activeWallet.addListener("change", () => {
|
||||
update();
|
||||
});
|
||||
|
||||
activeWallet.addListener("disconnect", () => {
|
||||
onWalletDisconnect();
|
||||
});
|
||||
|
||||
return () => {
|
||||
activeWallet.removeListener("change", update);
|
||||
activeWallet.removeListener("disconnect", onWalletDisconnect);
|
||||
activeWallet.removeListener("change");
|
||||
activeWallet.removeListener("disconnect");
|
||||
};
|
||||
}, [
|
||||
activeWallet,
|
||||
isConnectingToPersonalWallet,
|
||||
onWalletDisconnect,
|
||||
personalWallet,
|
||||
setPersonalWalletSigner,
|
||||
setSigner,
|
||||
]);
|
||||
}, [activeWallet, onWalletDisconnect]);
|
||||
|
||||
// connect signerWallet immediately if it's passed
|
||||
// and disconnect it if it's not passed
|
||||
@@ -626,17 +574,6 @@ export function ThirdwebWalletProvider(
|
||||
disconnectWallet,
|
||||
]);
|
||||
|
||||
const setConnectionStatus = useCallback(
|
||||
(value: ConnectionStatus) => {
|
||||
if (isConnectingToPersonalWallet) {
|
||||
setPersonalWalletStatus(value);
|
||||
} else {
|
||||
setStatus(value);
|
||||
}
|
||||
},
|
||||
[isConnectingToPersonalWallet, setPersonalWalletStatus],
|
||||
);
|
||||
|
||||
return (
|
||||
<ThirdwebWalletContext.Provider
|
||||
value={{
|
||||
@@ -646,8 +583,8 @@ export function ThirdwebWalletProvider(
|
||||
signer,
|
||||
activeWallet,
|
||||
activeWalletConfig,
|
||||
connectionStatus: status,
|
||||
setConnectionStatus: setConnectionStatus,
|
||||
connectionStatus,
|
||||
setConnectionStatus,
|
||||
createWalletInstance: createWalletInstance,
|
||||
createdWalletInstance: createdWalletInstance,
|
||||
createWalletStorage: props.createWalletStorage,
|
||||
@@ -660,17 +597,7 @@ export function ThirdwebWalletProvider(
|
||||
},
|
||||
activeChainSetExplicitly: props.activeChainSetExplicitly,
|
||||
clientId: props.clientId,
|
||||
isConnectingToPersonalWallet,
|
||||
setIsConnectingToPersonalWallet,
|
||||
personalWalletInfo: {
|
||||
wallet: personalWalletConnection.wallet,
|
||||
signer: personalWalletConnection.signer,
|
||||
walletConfig: personalWalletConnection.walletConfig,
|
||||
connectionStatus: personalWalletConnection.status,
|
||||
chainId: personalWalletConnection.chainId,
|
||||
disconnect: personalWalletConnection.disconnect,
|
||||
switchChain: personalWalletConnection.switchChain,
|
||||
},
|
||||
walletConnectHandler: walletConnectHandler,
|
||||
}}
|
||||
>
|
||||
{props.children}
|
||||
@@ -678,6 +605,9 @@ export function ThirdwebWalletProvider(
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* @internal
|
||||
*/
|
||||
export function useWalletContext() {
|
||||
const ctx = useContext(ThirdwebWalletContext);
|
||||
if (!ctx) {
|
||||
@@ -688,6 +618,16 @@ export function useWalletContext() {
|
||||
return ctx;
|
||||
}
|
||||
|
||||
export function useWalletConnectHandler() {
|
||||
const ctx = useWalletContext();
|
||||
if (!ctx) {
|
||||
throw new Error(
|
||||
`useWalletConnectHandler() can only be used inside <ThirdwebProvider />`,
|
||||
);
|
||||
}
|
||||
return ctx.walletConnectHandler;
|
||||
}
|
||||
|
||||
async function getLastConnectedWalletInfo() {
|
||||
const str = await lastConnectedWalletStorage.getItem(
|
||||
LAST_CONNECTED_WALLET_STORAGE_KEY,
|
||||
@@ -749,79 +689,3 @@ function timeoutPromise<T>(
|
||||
}
|
||||
|
||||
const autoConnectTimeoutErrorMessage = `Failed to Auto connect. Auto connect timed out. You can increase the timeout duration using the autoConnectTimeout prop on <ThirdwebProvider />`;
|
||||
|
||||
function usePersonalWalletConnection() {
|
||||
const [signer, setSigner] = useState<Signer | undefined>(undefined);
|
||||
const [status, setStatus] = useState<ConnectionStatus>("unknown");
|
||||
const [wallet, setWallet] = useState<WalletInstance | undefined>();
|
||||
const [walletConfig, setWalletConfig] = useState<WalletConfig | undefined>();
|
||||
const [chainId, setChainId] = useState<number | undefined>(undefined);
|
||||
|
||||
const handleDisconnect = useCallback(async () => {
|
||||
setStatus("disconnected");
|
||||
setSigner(undefined);
|
||||
setWallet(undefined);
|
||||
setWalletConfig(undefined);
|
||||
}, []);
|
||||
|
||||
const disconnect = useCallback(async () => {
|
||||
if (wallet) {
|
||||
await wallet.disconnect();
|
||||
}
|
||||
handleDisconnect();
|
||||
}, [wallet, handleDisconnect]);
|
||||
|
||||
useEffect(() => {
|
||||
if (wallet) {
|
||||
const updateChainId = () => {
|
||||
wallet?.getChainId().then((_chainId) => {
|
||||
setChainId(_chainId);
|
||||
});
|
||||
};
|
||||
|
||||
const update = async () => {
|
||||
updateChainId();
|
||||
const _signer = await wallet.getSigner();
|
||||
setSigner(_signer);
|
||||
};
|
||||
|
||||
updateChainId();
|
||||
wallet.addListener("change", update);
|
||||
wallet.addListener("disconnect", handleDisconnect);
|
||||
|
||||
return () => {
|
||||
wallet.removeListener("change", update);
|
||||
wallet.removeListener("disconnect", handleDisconnect);
|
||||
};
|
||||
} else {
|
||||
setChainId(undefined);
|
||||
}
|
||||
}, [disconnect, handleDisconnect, wallet]);
|
||||
|
||||
const switchChain = useCallback(
|
||||
async (_chainId: number) => {
|
||||
if (!wallet) {
|
||||
throw new Error("No active wallet");
|
||||
}
|
||||
|
||||
await wallet.switchChain(_chainId);
|
||||
const _signer = await wallet.getSigner();
|
||||
setSigner(_signer);
|
||||
},
|
||||
[wallet],
|
||||
);
|
||||
|
||||
return {
|
||||
signer: signer,
|
||||
setSigner: setSigner,
|
||||
wallet: wallet,
|
||||
setWallet: setWallet,
|
||||
walletConfig: walletConfig,
|
||||
setWalletConfig: setWalletConfig,
|
||||
status: status,
|
||||
setStatus: setStatus,
|
||||
chainId: chainId,
|
||||
disconnect,
|
||||
switchChain,
|
||||
};
|
||||
}
|
||||
|
||||
@@ -3,7 +3,7 @@ import invariant from "tiny-invariant";
|
||||
/**
|
||||
* Makes a parameter required to be passed, but still allows it to be null or undefined.
|
||||
*
|
||||
* @beta
|
||||
* @internal
|
||||
*/
|
||||
export type RequiredParam<T> = T | null | undefined;
|
||||
|
||||
|
||||
@@ -0,0 +1,10 @@
|
||||
import { WalletInstance } from "../types/wallet";
|
||||
|
||||
export const isWalletConnectReceiverEnabled = (wallet?: WalletInstance) => {
|
||||
const options = wallet?.getOptions();
|
||||
return (
|
||||
options &&
|
||||
"walletConnectReceiver" in options &&
|
||||
options.walletConnectReceiver
|
||||
);
|
||||
};
|
||||
@@ -10,6 +10,9 @@ import { WalletData } from "@thirdweb-dev/wallets";
|
||||
import { useLogout } from "../hooks/auth";
|
||||
import { useSwitchAccount } from "../hooks/auth/useSwitchAccount";
|
||||
|
||||
/**
|
||||
* @internal
|
||||
*/
|
||||
export const ThirdwebAuthProvider: React.FC<
|
||||
PropsWithChildren<{ value?: ThirdwebAuthConfig }>
|
||||
> = ({ value, children }) => {
|
||||
|
||||
@@ -9,7 +9,6 @@ export interface ISecureStorage {
|
||||
/**
|
||||
* The configuration to use the react SDK with an [auth](https://portal.thirdweb.com/auth) server.
|
||||
*
|
||||
* @beta
|
||||
*/
|
||||
export interface ThirdwebAuthConfig {
|
||||
/**
|
||||
|
||||
@@ -11,6 +11,9 @@ export const ThirdwebConfigContext = /* @__PURE__ */ createContext<
|
||||
ThirdwebConfigContext | undefined
|
||||
>(undefined);
|
||||
|
||||
/**
|
||||
* @internal
|
||||
*/
|
||||
export const ThirdwebConfigProvider: React.FC<
|
||||
PropsWithChildren<{
|
||||
value: ThirdwebConfigContext;
|
||||
@@ -21,6 +24,9 @@ export const ThirdwebConfigProvider: React.FC<
|
||||
</ThirdwebConfigContext.Provider>
|
||||
);
|
||||
|
||||
/**
|
||||
* @internal
|
||||
*/
|
||||
export function useThirdwebConfigContext() {
|
||||
const context = useContext(ThirdwebConfigContext);
|
||||
invariant(
|
||||
|
||||
@@ -34,7 +34,6 @@ import invariant from "tiny-invariant";
|
||||
* @returns a response object that includes an array of all accounts with their associated admin
|
||||
* @twfeature AccountFactory
|
||||
* @see {@link https://portal.thirdweb.com/react/react.useaccounts?utm_source=sdk | Documentation}
|
||||
* @beta
|
||||
*/
|
||||
export function useAccounts(
|
||||
contract: RequiredParam<SmartContract>,
|
||||
@@ -66,7 +65,6 @@ export function useAccounts(
|
||||
* @returns a response object that includes an array of all accounts associated with the address
|
||||
* @twfeature AccountFactory
|
||||
* @see {@link https://portal.thirdweb.com/react/react.useaccountsforaddress?utm_source=sdk | Documentation}
|
||||
* @beta
|
||||
*/
|
||||
export function useAccountsForAddress(
|
||||
contract: RequiredParam<SmartContract>,
|
||||
@@ -102,7 +100,6 @@ export function useAccountsForAddress(
|
||||
* @returns a boolean indicating if a account has been deployed for the given admin
|
||||
* @twfeature AccountFactory
|
||||
* @see {@link https://portal.thirdweb.com/react/react.useisaccountdeployed?utm_source=sdk | Documentation}
|
||||
* @beta
|
||||
*/
|
||||
export function useIsAccountDeployed(
|
||||
contract: RequiredParam<SmartContract>,
|
||||
@@ -160,7 +157,6 @@ export function useIsAccountDeployed(
|
||||
* @returns a mutation object that can be used to create a account
|
||||
* @twfeature AccountFactory
|
||||
* @see {@link https://portal.thirdweb.com/react/react.usecreateaccount?utm_source=sdk | Documentation}
|
||||
* @beta
|
||||
*/
|
||||
export function useCreateAccount(contract: RequiredParam<SmartContract>) {
|
||||
const activeChainId = useSDKChainId();
|
||||
|
||||
@@ -35,7 +35,6 @@ import { useWallet } from "../../../core/hooks/wallet-hooks";
|
||||
* @returns a response object that includes an array of all signers of the provided account
|
||||
* @twfeature Account
|
||||
* @see {@link https://portal.thirdweb.com/react/react.useaccountsigners?utm_source=sdk | Documentation}
|
||||
* @beta
|
||||
*/
|
||||
export function useAccountSigners(
|
||||
contract: RequiredParam<SmartContract>,
|
||||
@@ -67,7 +66,6 @@ export function useAccountSigners(
|
||||
* @returns a response object that includes an array of all admins of the provided account
|
||||
* @twfeature Account
|
||||
* @see {@link https://portal.thirdweb.com/react/react.useaccountadmins?utm_source=sdk | Documentation}
|
||||
* @beta
|
||||
*/
|
||||
export function useAccountAdmins(
|
||||
contract: RequiredParam<SmartContract>,
|
||||
@@ -99,7 +97,6 @@ export function useAccountAdmins(
|
||||
* @returns a response object that includes an array of all admins of the provided account
|
||||
* @twfeature Account
|
||||
* @see {@link https://portal.thirdweb.com/react/react.useaccountadmins?utm_source=sdk | Documentation}
|
||||
* @beta
|
||||
*/
|
||||
export function useAccountAdminsAndSigners(
|
||||
contract: RequiredParam<SmartContract>,
|
||||
|
||||
@@ -28,7 +28,6 @@ import invariant from "tiny-invariant";
|
||||
* @param contract - the {@link SmartContract} instance of the contract to get the appURI of
|
||||
* @returns a response object that includes the appURI of the contract
|
||||
* @twfeature AppURI
|
||||
* @beta
|
||||
*/
|
||||
export function useAppURI<TContract extends ValidContractInstance>(
|
||||
contract: RequiredParam<TContract>,
|
||||
@@ -75,7 +74,6 @@ export function useAppURI<TContract extends ValidContractInstance>(
|
||||
* @param contract - an instance of a {@link SmartContract}
|
||||
* @returns a mutation object that can be used to update the appURI of a contract
|
||||
* @twfeature AppUR
|
||||
* @beta
|
||||
*/
|
||||
export function useSetAppURI(
|
||||
contract: RequiredParam<ValidContractInstance>,
|
||||
|
||||
@@ -30,7 +30,6 @@ import invariant from "tiny-invariant";
|
||||
/**
|
||||
* The options to be passed as the second parameter to the {@link useClaimIneligibilityReasons} hook.
|
||||
*
|
||||
* @beta
|
||||
*/
|
||||
export type ClaimIneligibilityParams = {
|
||||
// the wallet address to check claim eligibility for
|
||||
@@ -42,7 +41,6 @@ export type ClaimIneligibilityParams = {
|
||||
/**
|
||||
* The params for the {@link useSetClaimConditions} hook mutation.
|
||||
*
|
||||
* @beta
|
||||
*/
|
||||
export type SetClaimConditionsParams = {
|
||||
phases: ClaimConditionInput[];
|
||||
@@ -66,7 +64,6 @@ export type SetClaimConditionsParams = {
|
||||
* @returns a response object with the currently active claim condition
|
||||
* @twfeature ERC20ClaimPhasesV2 | ERC20ClaimPhasesV1 | ERC20ClaimConditionsV2 | ERC20ClaimConditionsV1 | ERC721ClaimPhasesV2 | ERC721ClaimPhasesV1 | ERC721ClaimConditionsV2 | ERC721ClaimConditionsV1 | ERC1155ClaimPhasesV2 | ERC1155ClaimPhasesV1 | ERC1155ClaimConditionsV2 | ERC1155ClaimConditionsV1
|
||||
* @see {@link https://portal.thirdweb.com/react/react.useactiveclaimcondition?utm_source=sdk | Documentation}
|
||||
* @beta
|
||||
*/
|
||||
export function useActiveClaimCondition(
|
||||
contract: RequiredParam<DropContract>,
|
||||
@@ -122,7 +119,6 @@ export function useActiveClaimCondition(
|
||||
* @returns a response object with the snapshot for the provided address
|
||||
* @twfeature ERC20ClaimPhasesV2 | ERC20ClaimPhasesV1 | ERC20ClaimConditionsV2 | ERC20ClaimConditionsV1 | ERC721ClaimPhasesV2 | ERC721ClaimPhasesV1 | ERC721ClaimConditionsV2 | ERC721ClaimConditionsV1 | ERC1155ClaimPhasesV2 | ERC1155ClaimPhasesV1 | ERC1155ClaimConditionsV2 | ERC1155ClaimConditionsV1
|
||||
* @see {@link https://portal.thirdweb.com/react/react.useclaimerproofs?utm_source=sdk | Documentation}
|
||||
* @beta
|
||||
*/
|
||||
export function useClaimerProofs(
|
||||
contract: RequiredParam<DropContract>,
|
||||
@@ -186,7 +182,6 @@ export function useClaimerProofs(
|
||||
* @returns a response object with the list of claim conditions
|
||||
* @twfeature ERC20ClaimPhasesV2 | ERC20ClaimPhasesV1 | ERC20ClaimConditionsV2 | ERC20ClaimConditionsV1 | ERC721ClaimPhasesV2 | ERC721ClaimPhasesV1 | ERC721ClaimConditionsV2 | ERC721ClaimConditionsV1 | ERC1155ClaimPhasesV2 | ERC1155ClaimPhasesV1 | ERC1155ClaimConditionsV2 | ERC1155ClaimConditionsV1
|
||||
* @see {@link https://portal.thirdweb.com/react/react.useclaimconditions?utm_source=sdk | Documentation}
|
||||
* @beta
|
||||
*/
|
||||
export function useClaimConditions(
|
||||
contract: RequiredParam<DropContract>,
|
||||
@@ -241,7 +236,6 @@ export function useClaimConditions(
|
||||
* @returns a response object with the reasons for the claim ineligibility
|
||||
* @twfeature ERC20ClaimPhasesV2 | ERC20ClaimPhasesV1 | ERC20ClaimConditionsV2 | ERC20ClaimConditionsV1 | ERC721ClaimPhasesV2 | ERC721ClaimPhasesV1 | ERC721ClaimConditionsV2 | ERC721ClaimConditionsV1 | ERC1155ClaimPhasesV2 | ERC1155ClaimPhasesV1 | ERC1155ClaimConditionsV2 | ERC1155ClaimConditionsV1
|
||||
* @see {@link https://portal.thirdweb.com/react/react.useclaimineligibilityreasons?utm_source=sdk | Documentation}
|
||||
* @beta
|
||||
*/
|
||||
export function useClaimIneligibilityReasons(
|
||||
contract: RequiredParam<DropContract>,
|
||||
@@ -311,7 +305,6 @@ export function useClaimIneligibilityReasons(
|
||||
* @returns the active claim condition for the wallet address or null if there is no active claim condition
|
||||
* @twfeature ERC20ClaimPhasesV2 | ERC20ClaimPhasesV1 | ERC20ClaimConditionsV2 | ERC20ClaimConditionsV1 | ERC721ClaimPhasesV2 | ERC721ClaimPhasesV1 | ERC721ClaimConditionsV2 | ERC721ClaimConditionsV1 | ERC1155ClaimPhasesV2 | ERC1155ClaimPhasesV1 | ERC1155ClaimConditionsV2 | ERC1155ClaimConditionsV1
|
||||
* @see {@link https://portal.thirdweb.com/react/react.useactiveclaimconditionforwallet?utm_source=sdk | Documentation}
|
||||
* @beta
|
||||
*/
|
||||
export function useActiveClaimConditionForWallet(
|
||||
contract: RequiredParam<DropContract>,
|
||||
@@ -467,7 +460,6 @@ export function useActiveClaimConditionForWallet(
|
||||
* @returns a mutation object that can be used to set claim conditions
|
||||
* @twfeature ERC20ClaimPhasesV2 | ERC20ClaimPhasesV1 | ERC20ClaimConditionsV2 | ERC20ClaimConditionsV1 | ERC721ClaimPhasesV2 | ERC721ClaimPhasesV1 | ERC721ClaimConditionsV2 | ERC721ClaimConditionsV1 | ERC1155ClaimPhasesV2 | ERC1155ClaimPhasesV1 | ERC1155ClaimConditionsV2 | ERC1155ClaimConditionsV1
|
||||
* @see {@link https://portal.thirdweb.com/react/react.usesetclaimconditions?utm_source=sdk | Documentation}
|
||||
* @beta
|
||||
*/
|
||||
export function useSetClaimConditions(
|
||||
contract: RequiredParam<DropContract>,
|
||||
@@ -546,7 +538,6 @@ export function useSetClaimConditions(
|
||||
* @param contract - an instance of a {@link DropContract}
|
||||
* @returns a mutation object that can be used to reset claim conditions
|
||||
* @twfeature ERC20ClaimPhasesV2 | ERC20ClaimPhasesV1 | ERC20ClaimConditionsV2 | ERC20ClaimConditionsV1 | ERC721ClaimPhasesV2 | ERC721ClaimPhasesV1 | ERC721ClaimConditionsV2 | ERC721ClaimConditionsV1 | ERC1155ClaimPhasesV2 | ERC1155ClaimPhasesV1 | ERC1155ClaimConditionsV2 | ERC1155ClaimConditionsV1
|
||||
* @beta
|
||||
*/
|
||||
export function useResetClaimConditions(
|
||||
contract: RequiredParam<DropContract>,
|
||||
|
||||
@@ -37,7 +37,6 @@ import invariant from "tiny-invariant";
|
||||
* @returns the wallet address of the primary sales recipient
|
||||
* @twfeature PrimarySale
|
||||
* @see {@link https://portal.thirdweb.com/react/react.useprimarysalerecipient?utm_source=sdk | Documentation}
|
||||
* @beta
|
||||
*/
|
||||
export function usePrimarySaleRecipient(
|
||||
contract: RequiredParam<ValidContractInstance>,
|
||||
@@ -89,7 +88,6 @@ export function usePrimarySaleRecipient(
|
||||
* @returns a mutation object that can be used to update the primary sales recipient
|
||||
* @twfeature PrimarySale
|
||||
* @see {@link https://portal.thirdweb.com/react/react.useupdateprimarysalerecipient?utm_source=sdk | Documentation}
|
||||
* @beta
|
||||
*/
|
||||
export function useUpdatePrimarySaleRecipient(
|
||||
contract: RequiredParam<ValidContractInstance>,
|
||||
@@ -140,7 +138,6 @@ export function useUpdatePrimarySaleRecipient(
|
||||
* @returns an object containing recipient address and the royalty basis points
|
||||
* @twfeature Royalty
|
||||
* @see {@link https://portal.thirdweb.com/react/react.useroyaltysettings?utm_source=sdk | Documentation}
|
||||
* @beta
|
||||
*/
|
||||
export function useRoyaltySettings(
|
||||
contract: RequiredParam<ValidContractInstance>,
|
||||
@@ -192,7 +189,6 @@ export function useRoyaltySettings(
|
||||
* @returns a mutation object that can be used to update the royalty settings
|
||||
* @twfeature Royalty
|
||||
* @see {@link https://portal.thirdweb.com/react/react.useupdateroyaltysettings?utm_source=sdk | Documentation}
|
||||
* @beta
|
||||
*/
|
||||
export function useUpdateRoyaltySettings(
|
||||
contract: RequiredParam<ValidContractInstance>,
|
||||
@@ -239,7 +235,6 @@ export function useUpdateRoyaltySettings(
|
||||
* @returns an object containing the platform fee basis points and the fee recipient address
|
||||
* @twfeature PlatformFee
|
||||
* @see {@link https://portal.thirdweb.com/react/react.useplatformfees?utm_source=sdk | Documentation}
|
||||
* @beta
|
||||
*/
|
||||
export function usePlatformFees(
|
||||
contract: RequiredParam<ValidContractInstance>,
|
||||
@@ -290,7 +285,6 @@ export function usePlatformFees(
|
||||
* @returns a mutation object that can be used to update the platform fees settings
|
||||
* @twfeature PlatformFee
|
||||
* @see {@link https://portal.thirdweb.com/react/react.useupdateplatformfees?utm_source=sdk | Documentation}
|
||||
* @beta
|
||||
*/
|
||||
export function useUpdatePlatformFees(
|
||||
contract: RequiredParam<ValidContractInstance>,
|
||||
@@ -336,7 +330,6 @@ export function useUpdatePlatformFees(
|
||||
* @param contract - an instance of a {@link SmartContract}
|
||||
* @returns a {@link CustomContractMetadata} object containing the metadata
|
||||
* @see {@link https://portal.thirdweb.com/react/react.usemetadata?utm_source=sdk | Documentation}
|
||||
* @beta
|
||||
*/
|
||||
export function useMetadata(
|
||||
contract: RequiredParam<ValidContractInstance>,
|
||||
@@ -390,7 +383,6 @@ export function useMetadata(
|
||||
* @param contract - an instance of a {@link SmartContract}
|
||||
* @returns a mutation object that can be used to update the metadata
|
||||
* @see {@link https://portal.thirdweb.com/react/react.useupdatemetadata?utm_source=sdk | Documentation}
|
||||
* @beta
|
||||
*/
|
||||
export function useUpdateMetadata(
|
||||
contract: RequiredParam<ValidContractInstance>,
|
||||
|
||||
@@ -307,7 +307,6 @@ export function useContract(
|
||||
* @param contract - the {@link ValidContractInstance} instance of the contract to get the metadata for
|
||||
* @returns a response object that includes the contract metadata of the deployed contract
|
||||
* @twfeature ContractMetadata
|
||||
* @beta
|
||||
*/
|
||||
export function useContractMetadata<TContract extends ValidContractInstance>(
|
||||
contract: RequiredParam<TContract>,
|
||||
@@ -359,7 +358,6 @@ export function useContractMetadata<TContract extends ValidContractInstance>(
|
||||
* @param contract - the {@link ValidContractInstance} instance of the contract to get the metadata for
|
||||
* @returns a response object that includes the contract metadata of the deployed contract
|
||||
* @twfeature ContractMetadata
|
||||
* @beta
|
||||
*/
|
||||
export function useContractMetadataUpdate(
|
||||
contract: RequiredParam<ValidContractInstance>,
|
||||
@@ -417,7 +415,6 @@ export function useContractMetadataUpdate(
|
||||
* @param options - options includes the filters ({@link QueryAllEvents}) for the query as well as if you want to subscribe to real-time updates (default: true)
|
||||
* @returns a response object that includes the contract events
|
||||
* @see {@link https://portal.thirdweb.com/react/react.usecontractevents?utm_source=sdk | Documentation}
|
||||
* @beta
|
||||
*/
|
||||
export function useContractEvents(
|
||||
contract: RequiredParam<ValidContractInstance>,
|
||||
@@ -515,7 +512,6 @@ export function useContractEvents(
|
||||
* @param args - The arguments to pass to the function (if any), with optional call arguments as the last parameter
|
||||
* @returns a response object that includes the data returned by the function call
|
||||
* @see {@link https://portal.thirdweb.com/react/react.usecontractread?utm_source=sdk | Documentation}
|
||||
* @beta
|
||||
*/
|
||||
export function useContractRead<
|
||||
TContractAddress extends GeneratedContractAddress | ContractAddress,
|
||||
@@ -592,7 +588,6 @@ export function useContractRead<
|
||||
* @param functionName - the name of the function to call
|
||||
* @returns a response object that includes the write function to call
|
||||
* @see {@link https://portal.thirdweb.com/react/react.usecontractwrite?utm_source=sdk | Documentation}
|
||||
* @beta
|
||||
*/
|
||||
export function useContractWrite<
|
||||
TContractAddress extends GeneratedContractAddress | ContractAddress,
|
||||
|
||||
@@ -52,7 +52,6 @@ import invariant from "tiny-invariant";
|
||||
* @returns a response object that includes an array of NFTs that are unclaimed
|
||||
* @twfeature ERC721LazyMintable
|
||||
* @see {@link https://portal.thirdweb.com/react/react.useunclaimednfts?utm_source=sdk | Documentation}
|
||||
* @beta
|
||||
*/
|
||||
export function useUnclaimedNFTs(
|
||||
contract: RequiredParam<NFTDrop>,
|
||||
@@ -89,7 +88,6 @@ export function useUnclaimedNFTs(
|
||||
* @returns a response object that includes an array of NFTs that are claimed
|
||||
* @twfeature ERC721LazyMintable
|
||||
* @see {@link https://portal.thirdweb.com/react/react.useclaimednfts?utm_source=sdk | Documentation}
|
||||
* @beta
|
||||
*/
|
||||
export function useClaimedNFTs(
|
||||
contract: RequiredParam<NFTDrop>,
|
||||
@@ -226,7 +224,6 @@ export function useBatchesToReveal<TContract extends RevealableContract>(
|
||||
* @returns a mutation object that can be used to claim a NFT to the wallet specificed in the params
|
||||
* @twfeature ERC721Claimable | ERC1155Claimable | ERC721ClaimPhasesV2 | ERC721ClaimPhasesV1 | ERC721ClaimConditionsV2 | ERC721ClaimConditionsV1 | ERC1155ClaimPhasesV2 | ERC1155ClaimPhasesV1 | ERC1155ClaimConditionsV2 | ERC1155ClaimConditionsV1
|
||||
* @see {@link https://portal.thirdweb.com/react/react.useclaimnft?utm_source=sdk | Documentation}
|
||||
* @beta
|
||||
*/
|
||||
export function useClaimNFT<TContract extends DropContract>(
|
||||
contract: RequiredParam<TContract>,
|
||||
@@ -316,7 +313,6 @@ export function useClaimNFT<TContract extends DropContract>(
|
||||
* @returns a mutation object that can be used to lazy mint a batch of NFTs
|
||||
* @twfeature ERC721LazyMintable | ERC1155LazyMintable
|
||||
* @see {@link https://portal.thirdweb.com/react/react.uselazymint?utm_source=sdk | Documentation}
|
||||
* @beta
|
||||
*/
|
||||
export function useLazyMint<TContract extends DropContract>(
|
||||
contract: RequiredParam<TContract>,
|
||||
@@ -389,7 +385,6 @@ export function useLazyMint<TContract extends DropContract>(
|
||||
* @returns a mutation object that can be used to lazy mint a batch of NFTs
|
||||
* @twfeature ERC721Revealable | ERC1155Revealable
|
||||
* @see {@link https://portal.thirdweb.com/react/react.usedelayedreveallazymint?utm_source=sdk | Documentation}
|
||||
* @beta
|
||||
*/
|
||||
export function useDelayedRevealLazyMint<TContract extends RevealableContract>(
|
||||
contract: RequiredParam<TContract>,
|
||||
@@ -470,7 +465,6 @@ export function useDelayedRevealLazyMint<TContract extends RevealableContract>(
|
||||
* @returns a mutation object that can be used to reveal a batch of delayed reveal NFTs
|
||||
* @twfeature ERC721Revealable | ERC1155Revealable
|
||||
* @see {@link https://portal.thirdweb.com/react/react.usereveallazymint?utm_source=sdk | Documentation}
|
||||
* @beta
|
||||
*/
|
||||
export function useRevealLazyMint<TContract extends RevealableContract>(
|
||||
contract: RequiredParam<TContract>,
|
||||
|
||||
@@ -56,7 +56,6 @@ import invariant from "tiny-invariant";
|
||||
* @param listingId - the listing id to check
|
||||
* @returns a response object that includes the desired listing
|
||||
* @see {@link https://portal.thirdweb.com/react/react.uselisting?utm_source=sdk | Documentation}
|
||||
* @beta
|
||||
*/
|
||||
export function useListing(
|
||||
contract: RequiredParam<Marketplace>,
|
||||
@@ -163,7 +162,6 @@ export function useEnglishAuction(
|
||||
* @param filter - filter to pass to the query for the sake of pagination & filtering
|
||||
* @returns a response object that includes an array of listings
|
||||
* @see {@link https://portal.thirdweb.com/react/react.uselistings?utm_source=sdk | Documentation}
|
||||
* @beta
|
||||
*/
|
||||
export function useListings(
|
||||
contract: RequiredParam<Marketplace>,
|
||||
@@ -334,7 +332,6 @@ export function useValidEnglishAuctions(
|
||||
* @param contract - an instance of a marketplace contract
|
||||
* @returns a response object that includes the listing count
|
||||
* @see {@link https://portal.thirdweb.com/react/react.uselistingscount?utm_source=sdk | Documentation}
|
||||
* @beta
|
||||
*/
|
||||
export function useListingsCount(contract: RequiredParam<Marketplace>) {
|
||||
const contractAddress = contract?.getAddress();
|
||||
@@ -422,7 +419,6 @@ export function useEnglishAuctionsCount(
|
||||
* @param filter - filter to pass to the query for the sake of pagination & filtering
|
||||
* @returns a response object that includes an array of listings
|
||||
* @see {@link https://portal.thirdweb.com/react/react.useactivelistings?utm_source=sdk | Documentation}
|
||||
* @beta
|
||||
*/
|
||||
export function useActiveListings(
|
||||
contract: RequiredParam<Marketplace>,
|
||||
@@ -456,7 +452,6 @@ export function useActiveListings(
|
||||
* @param listingId - the listing id to check
|
||||
* @returns a response object that includes the {@link Offer} that is winning the auction
|
||||
* @see {@link https://portal.thirdweb.com/react/react.usewinningbid?utm_source=sdk | Documentation}
|
||||
* @beta
|
||||
*/
|
||||
export function useWinningBid(
|
||||
contract: RequiredParam<Marketplace>,
|
||||
@@ -585,7 +580,6 @@ export function useAuctionWinner(
|
||||
*
|
||||
* @param contract - an instance of a marketplace contract
|
||||
* @param listingId - the listing id to check (only necessary for marketplace v3)
|
||||
|
||||
* @returns a response object that includes an array of listings
|
||||
* @twfeature EnglishAuctions
|
||||
* @see {@link https://portal.thirdweb.com/react/react.usebidbuffer?utm_source=sdk | Documentation}
|
||||
@@ -694,7 +688,6 @@ export function useMinimumNextBid(
|
||||
* @param contract - an instance of a Marketplace contract
|
||||
* @param listingId - the id of the listing to fetch offers for
|
||||
* @see {@link https://portal.thirdweb.com/react/react.useoffers?utm_source=sdk | Documentation}
|
||||
* @beta
|
||||
*/
|
||||
export function useOffers(
|
||||
contract: RequiredParam<Marketplace>,
|
||||
@@ -902,7 +895,6 @@ export function useCreateAuctionListing<
|
||||
* @param contract - an instance of a Marketplace contract
|
||||
* @returns a mutation object that can be used to cancel a listing
|
||||
* @see {@link https://portal.thirdweb.com/react/react.usecancellisting?utm_source=sdk | Documentation}
|
||||
* @beta
|
||||
*/
|
||||
export function useCancelListing(
|
||||
contract: RequiredParam<Marketplace>,
|
||||
@@ -1107,7 +1099,6 @@ export function useCancelEnglishAuction(
|
||||
* @param contract - an instance of a Marketplace contract
|
||||
* @returns a mutation object that can be used to make a bid on an auction listing
|
||||
* @see {@link https://portal.thirdweb.com/react/react.usemakebid?utm_source=sdk | Documentation}
|
||||
* @beta
|
||||
*/
|
||||
export function useMakeBid(contract: RequiredParam<Marketplace>) {
|
||||
const activeChainId = useSDKChainId();
|
||||
@@ -1166,7 +1157,6 @@ export function useMakeBid(contract: RequiredParam<Marketplace>) {
|
||||
* @param contract - an instance of a Marketplace contract
|
||||
* @returns a mutation object that can be used to make a bid on an auction listing
|
||||
* @see {@link https://portal.thirdweb.com/react/react.usemakeoffer?utm_source=sdk | Documentation}
|
||||
* @beta
|
||||
*/
|
||||
export function useMakeOffer(contract: RequiredParam<Marketplace>) {
|
||||
const activeChainId = useSDKChainId();
|
||||
@@ -1286,7 +1276,6 @@ export function useAcceptDirectListingOffer(
|
||||
* @param contract - an instance of a Marketplace contract
|
||||
* @returns a mutation object that can be used to accept an offer on a direct listing
|
||||
* @see {@link https://portal.thirdweb.com/react/react.useexecuteauctionsale?utm_source=sdk | Documentation}
|
||||
* @beta
|
||||
*/
|
||||
export function useExecuteAuctionSale(contract: RequiredParam<Marketplace>) {
|
||||
const activeChainId = useSDKChainId();
|
||||
@@ -1344,7 +1333,6 @@ export function useExecuteAuctionSale(contract: RequiredParam<Marketplace>) {
|
||||
* @param contract - an instance of a Marketplace contract
|
||||
* @returns a mutation object that can be used to buy out an auction listing
|
||||
* @see {@link https://portal.thirdweb.com/react/react.usebuynow?utm_source=sdk | Documentation}
|
||||
* @beta
|
||||
*/
|
||||
export function useBuyNow(contract: RequiredParam<Marketplace>) {
|
||||
const activeChainId = useSDKChainId();
|
||||
@@ -1415,7 +1403,6 @@ export function useBuyNow(contract: RequiredParam<Marketplace>) {
|
||||
* @param contract - an instance of a MarketplaceV3 contract
|
||||
* @returns a mutation object that can be used to buy out a direct listing
|
||||
* @see {@link https://portal.thirdweb.com/react/react.useBuyDirectListing?utm_source=sdk | Documentation}
|
||||
* @beta
|
||||
*/
|
||||
export function useBuyDirectListing(contract: RequiredParam<MarketplaceV3>) {
|
||||
const activeChainId = useSDKChainId();
|
||||
|
||||
@@ -46,7 +46,6 @@ import invariant from "tiny-invariant";
|
||||
* @param contract - an instance of a {@link NFTContract}
|
||||
* @param tokenId - the tokenId to look up
|
||||
* @returns a response object that includes the metadata for the given tokenId
|
||||
* @beta
|
||||
* @twfeature ERC721 | ERC1155
|
||||
* @see {@link https://portal.thirdweb.com/react/react.usenft?utm_source=sdk | Documentation}
|
||||
*/
|
||||
@@ -90,7 +89,6 @@ export function useNFT<TContract extends NFTContract>(
|
||||
* @param queryParams - query params to pass to the query for pagination
|
||||
* @returns a response object that includes an array of NFTs
|
||||
* @twfeature ERC721Supply | ERC721Enumerable | ERC1155Enumerable
|
||||
* @beta
|
||||
* @see {@link https://portal.thirdweb.com/react/react.usenfts?utm_source=sdk | Documentation}
|
||||
*/
|
||||
export function useNFTs<TContract extends NFTContract>(
|
||||
@@ -132,7 +130,6 @@ export function useNFTs<TContract extends NFTContract>(
|
||||
*
|
||||
* @param contract - an instance of a {@link NFTContract}
|
||||
* @returns a response object that includes the total count of NFTs
|
||||
* @beta
|
||||
* @twfeature ERC721Supply | ERC1155Enumerable
|
||||
* @see {@link https://portal.thirdweb.com/react/react.usetotalcount?utm_source=sdk | Documentation}
|
||||
*/
|
||||
@@ -181,7 +178,6 @@ export function useTotalCount<TContract extends NFTContract>(
|
||||
* @param contract - an instance of a {@link NFTContract}
|
||||
* @param tokenId - required for ERC1155, the tokenId to look up
|
||||
* @returns a response object that includes the total minted supply
|
||||
* @beta
|
||||
* @twfeature ERC721Supply | ERC1155Enumerable
|
||||
* @see {@link https://portal.thirdweb.com/react/react.usetotalcirculatingsupply?utm_source=sdk | Documentation}
|
||||
*/
|
||||
@@ -235,7 +231,6 @@ export function useTotalCirculatingSupply(
|
||||
* @param ownerWalletAddress - the wallet address to get owned tokens for
|
||||
* @param queryParams - query params to pass to the query for pagination
|
||||
* @returns a response object that includes the list of owned tokens
|
||||
* @beta
|
||||
* @twfeature ERC721Enumerable | ERC1155Enumerable | ERC721Supply
|
||||
* @see {@link https://portal.thirdweb.com/react/react.useownednfts?utm_source=sdk | Documentation}
|
||||
*/
|
||||
@@ -283,7 +278,6 @@ export function useOwnedNFTs<TContract extends NFTContract>(
|
||||
* @returns a response object that includes the total balance of the owner
|
||||
* @twfeature ERC721 | ERC1155
|
||||
* @see {@link https://portal.thirdweb.com/react/react.usenftbalance?utm_source=sdk | Documentation}
|
||||
* @beta
|
||||
*/
|
||||
export function useNFTBalance(
|
||||
contract: RequiredParam<NFTContract>,
|
||||
@@ -337,7 +331,6 @@ export function useNFTBalance(
|
||||
* @returns a response object that includes the shared metadata of the contract
|
||||
* @twfeature ERC721SharedMetadata
|
||||
* @see {@link https://portal.thirdweb.com/react/react.usesharedmetadata?utm_source=sdk | Documentation}
|
||||
* @beta
|
||||
*/
|
||||
export function useSharedMetadata(
|
||||
contract: RequiredParam<NFTContract>,
|
||||
@@ -397,7 +390,6 @@ export function useSharedMetadata(
|
||||
*
|
||||
* @param contract - an instance of a {@link NFTContract}
|
||||
* @returns a mutation object that can be used to mint a new NFT token to the connected wallet
|
||||
* @beta
|
||||
* @twfeature ERC721Mintable | ERC1155Mintable
|
||||
* @see {@link https://portal.thirdweb.com/react/react.usemintnft?utm_source=sdk | Documentation}
|
||||
*/
|
||||
@@ -470,7 +462,6 @@ export function useMintNFT<TContract extends NFTContract>(
|
||||
*
|
||||
* @param contract - an instance of a {@link Erc1155}
|
||||
* @returns a mutation object that can be used to mint a more supply of a token id to the provided wallet
|
||||
* @beta
|
||||
* @twfeature ERC1155Mintable
|
||||
* @see {@link https://portal.thirdweb.com/react/react.usemintnftsupply?utm_source=sdk | Documentation}
|
||||
*/
|
||||
@@ -537,7 +528,6 @@ export function useMintNFTSupply(contract: Erc1155) {
|
||||
*
|
||||
* @param contract - an instance of a {@link NFTContract}
|
||||
* @returns a mutation object that can be used to transfer NFTs
|
||||
* @beta
|
||||
* @twfeature ERC721 | ERC1155
|
||||
* @see {@link https://portal.thirdweb.com/react/react.usetransfernft?utm_source=sdk | Documentation}
|
||||
*/
|
||||
@@ -624,7 +614,6 @@ export function useTransferNFT<TContract extends NFTContract>(
|
||||
* @returns a mutation object that can be used to transfer batch NFTs
|
||||
* @twfeature ERC1155
|
||||
* @see {@link https://portal.thirdweb.com/react/react.useairdropnft?utm_source=sdk | Documentation}
|
||||
* @beta
|
||||
*/
|
||||
export function useAirdropNFT(contract: Erc1155) {
|
||||
const activeChainId = useSDKChainId();
|
||||
@@ -681,7 +670,6 @@ export function useAirdropNFT(contract: Erc1155) {
|
||||
* @returns a mutation object that can be used to burn an NFT token from the connected wallet
|
||||
* @twfeature ERC721Burnable | ERC1155Burnable
|
||||
* @see {@link https://portal.thirdweb.com/react/react.useburnnft?utm_source=sdk | Documentation}
|
||||
* @beta
|
||||
*/
|
||||
export function useBurnNFT<TContract extends NFTContract>(
|
||||
contract: RequiredParam<TContract>,
|
||||
|
||||
@@ -57,7 +57,6 @@ type GetAllReturnType<TContract extends ContractWithRoles> = Promise<
|
||||
* @returns a list of addresses for all supported roles on the contract.
|
||||
* @twfeature PermissionsEnumerable
|
||||
* @see {@link https://portal.thirdweb.com/react/react.useallrolemembers?utm_source=sdk | Documentation}
|
||||
* @beta
|
||||
*/
|
||||
export function useAllRoleMembers<TContract extends ContractWithRoles>(
|
||||
contract: RequiredParam<TContract>,
|
||||
@@ -90,7 +89,6 @@ export function useAllRoleMembers<TContract extends ContractWithRoles>(
|
||||
* @returns a list of addresses that are members of the role
|
||||
* @twfeature Permissions
|
||||
* @see {@link https://portal.thirdweb.com/react/react.userolemembers?utm_source=sdk | Documentation}
|
||||
* @beta
|
||||
*/
|
||||
export function useRoleMembers<TContract extends ContractWithRoles>(
|
||||
contract: RequiredParam<TContract>,
|
||||
@@ -124,7 +122,6 @@ export function useRoleMembers<TContract extends ContractWithRoles>(
|
||||
* @returns true if the address is a member of the role, or false if not
|
||||
* @twfeature PermissionsEnumerable
|
||||
* @see {@link https://portal.thirdweb.com/react/react.useisaddressrole?utm_source=sdk | Documentation}
|
||||
* @beta
|
||||
*/
|
||||
export function useIsAddressRole<TContract extends ContractWithRoles>(
|
||||
contract: RequiredParam<TContract>,
|
||||
@@ -187,7 +184,6 @@ export function useIsAddressRole<TContract extends ContractWithRoles>(
|
||||
* @param contract - an instance of a {@link SmartContract}
|
||||
* @returns a mutation object that can be used to overwrite all roles on the contract
|
||||
* @twfeature Permissions
|
||||
* @beta
|
||||
*/
|
||||
export function useSetAllRoleMembers<TContract extends ContractWithRoles>(
|
||||
contract: RequiredParam<TContract>,
|
||||
@@ -247,7 +243,6 @@ export function useSetAllRoleMembers<TContract extends ContractWithRoles>(
|
||||
* @returns a mutation object that can be used to grant a member of a role on the contract
|
||||
* @twfeature Permissions | PermissionsEnumerable
|
||||
* @see {@link https://portal.thirdweb.com/react/react.usegrantrole?utm_source=sdk | Documentation}
|
||||
* @beta
|
||||
*/
|
||||
export function useGrantRole<TContract extends ContractWithRoles>(
|
||||
contract: RequiredParam<TContract>,
|
||||
@@ -308,7 +303,6 @@ export function useGrantRole<TContract extends ContractWithRoles>(
|
||||
* @returns a mutation object that can be used to revoke a role from a member on the contract
|
||||
* @twfeature Permissions | PermissionsEnumerable
|
||||
* @see {@link https://portal.thirdweb.com/react/react.userevokerole?utm_source=sdk | Documentation}
|
||||
* @beta
|
||||
*/
|
||||
export function useRevokeRole<TContract extends ContractWithRoles>(
|
||||
contract: RequiredParam<TContract>,
|
||||
|
||||
@@ -40,7 +40,6 @@ import invariant from "tiny-invariant";
|
||||
* @returns a response object that includes the total minted supply
|
||||
* @twfeature ERC20
|
||||
* @see {@link https://portal.thirdweb.com/react/react.usetokensupply?utm_source=sdk | Documentation}
|
||||
* @beta
|
||||
*/
|
||||
export function useTokenSupply(contract: RequiredParam<TokenContract>) {
|
||||
const contractAddress = contract?.getAddress();
|
||||
@@ -72,7 +71,6 @@ export function useTokenSupply(contract: RequiredParam<TokenContract>) {
|
||||
* @returns a response object that includes the balance of the address
|
||||
* @twfeature ERC20
|
||||
* @see {@link https://portal.thirdweb.com/react/react.usetokenbalance?utm_source=sdk | Documentation}
|
||||
* @beta
|
||||
*/
|
||||
export function useTokenBalance(
|
||||
contract: RequiredParam<TokenContract>,
|
||||
@@ -109,7 +107,6 @@ export function useTokenBalance(
|
||||
* @returns a response object that includes the decimals of the ERC20 token
|
||||
* @twfeature ERC20
|
||||
* @see {@link https://portal.thirdweb.com/react/react.usetokendecimals?utm_source=sdk | Documentation}
|
||||
* @beta
|
||||
*/
|
||||
export function useTokenDecimals(contract: RequiredParam<TokenContract>) {
|
||||
const contractAddress = contract?.getAddress();
|
||||
@@ -166,7 +163,6 @@ export function useTokenDecimals(contract: RequiredParam<TokenContract>) {
|
||||
* @returns a mutation object that can be used to mint new tokens to the connected wallet
|
||||
* @twfeature ERC20Mintable
|
||||
* @see {@link https://portal.thirdweb.com/react/react.useminttoken?utm_source=sdk | Documentation}
|
||||
* @beta
|
||||
*/
|
||||
export function useMintToken(
|
||||
contract: RequiredParam<TokenContract>,
|
||||
@@ -239,7 +235,6 @@ export function useMintToken(
|
||||
* @returns a mutation object that can be used to tokens to the wallet specified in the params
|
||||
* @twfeature ERC20ClaimPhasesV2 | ERC20ClaimPhasesV1 | ERC20ClaimConditionsV2 | ERC20ClaimConditionsV1
|
||||
* @see {@link https://portal.thirdweb.com/react/react.useclaimtoken?utm_source=sdk | Documentation}
|
||||
* @beta
|
||||
*/
|
||||
export function useClaimToken(contract: RequiredParam<TokenContract>) {
|
||||
const activeChainId = useSDKChainId();
|
||||
@@ -301,7 +296,6 @@ export function useClaimToken(contract: RequiredParam<TokenContract>) {
|
||||
* @returns a mutation object that can be used to transfer tokens
|
||||
* @twfeature ERC20
|
||||
* @see {@link https://portal.thirdweb.com/react/react.usetransfertoken?utm_source=sdk | Documentation}
|
||||
* @beta
|
||||
*/
|
||||
export function useTransferToken(contract: RequiredParam<TokenContract>) {
|
||||
const activeChainId = useSDKChainId();
|
||||
@@ -361,7 +355,6 @@ export function useTransferToken(contract: RequiredParam<TokenContract>) {
|
||||
* @returns a mutation object that can be used to transfer batch tokens
|
||||
* @twfeature ERC20
|
||||
* @see {@link https://portal.thirdweb.com/react/react.usetransferbatchtoken?utm_source=sdk | Documentation}
|
||||
* @beta
|
||||
*/
|
||||
export function useTransferBatchToken(contract: RequiredParam<TokenContract>) {
|
||||
const activeChainId = useSDKChainId();
|
||||
@@ -428,7 +421,6 @@ export function useTransferBatchToken(contract: RequiredParam<TokenContract>) {
|
||||
* @returns a mutation object that can be used to burn tokens from the connected wallet
|
||||
* @twfeature ERC20Burnable
|
||||
* @see {@link https://portal.thirdweb.com/react/react.useburntoken?utm_source=sdk | Documentation}
|
||||
* @beta
|
||||
*/
|
||||
export function useBurnToken(contract: RequiredParam<TokenContract>) {
|
||||
const activeChainId = useSDKChainId();
|
||||
|
||||
@@ -14,7 +14,6 @@ import { AUTH_TOKEN_STORAGE_KEY } from "../../../core/constants/auth";
|
||||
*
|
||||
* @see {@link https://portal.thirdweb.com/react/react.uselogin?utm_source=sdk | Documentation}
|
||||
*
|
||||
* @beta
|
||||
*/
|
||||
export function useLogin() {
|
||||
const queryClient = useQueryClient();
|
||||
|
||||
@@ -12,7 +12,6 @@ import invariant from "tiny-invariant";
|
||||
*
|
||||
* @see {@link https://portal.thirdweb.com/react/react.uselogout?utm_source=sdk | Documentation}
|
||||
*
|
||||
* @beta
|
||||
*/
|
||||
export function useLogout() {
|
||||
const queryClient = useQueryClient();
|
||||
|
||||
@@ -10,7 +10,6 @@ import invariant from "tiny-invariant";
|
||||
*
|
||||
* @see {@link https://portal.thirdweb.com/react/react.useswitchaccount?utm_source=sdk | Documentation}
|
||||
*
|
||||
* @beta
|
||||
*/
|
||||
export function useSwitchAccount() {
|
||||
const queryClient = useQueryClient();
|
||||
|
||||
@@ -19,7 +19,6 @@ export interface UserWithData<
|
||||
*
|
||||
* @see {@link https://portal.thirdweb.com/react/react.useuser?utm_source=sdk | Documentation}
|
||||
*
|
||||
* @beta
|
||||
*/
|
||||
export function useUser<
|
||||
TData extends Json = Json,
|
||||
|
||||
@@ -5,6 +5,9 @@ import { useAddress } from "./wallet";
|
||||
import { useSupportedChains } from "./useSupportedChains";
|
||||
import { useWalletContext } from "../../core/providers/thirdweb-wallet-provider";
|
||||
|
||||
/**
|
||||
* @internal
|
||||
*/
|
||||
export function useENS() {
|
||||
const address = useAddress();
|
||||
const supportedChains = useSupportedChains();
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user