Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
318b274aae | ||
|
|
77f0474b88 | ||
|
|
5ffb1cba03 | ||
|
|
0bf29745b0 | ||
|
|
00d0d01e61 | ||
|
|
72b8b9829e | ||
|
|
26cd91ffe1 | ||
|
|
1c3a846045 | ||
|
|
4a69f8c85d | ||
|
|
c7c2530c7f | ||
|
|
7012513bc2 | ||
|
|
28b5d1eb6d | ||
|
|
1e9fad779f | ||
|
|
7e7a507f03 | ||
|
|
5a67d5d894 | ||
|
|
fc96e14750 | ||
|
|
8f962bc15c | ||
|
|
f12a80a475 | ||
|
|
0186721bc4 | ||
|
|
5d67b2807f | ||
|
|
1e4ac67272 | ||
|
|
465d8e2c3d | ||
|
|
a8b790652c | ||
|
|
4828c87691 | ||
|
|
45d2ffcf89 | ||
|
|
bf6df26711 | ||
|
|
e22e4a47d7 | ||
|
|
d2c7f6d758 | ||
|
|
7af99d9a6d | ||
|
|
f0279c2288 | ||
|
|
07194b06e5 | ||
|
|
255c5dcae8 | ||
|
|
8cfb4f38ed | ||
|
|
7c15913e46 | ||
|
|
477324ec85 | ||
|
|
c9ee9b32f0 | ||
|
|
3010d84595 | ||
|
|
81770647ab | ||
|
|
26644d63b5 | ||
|
|
09fae984e7 | ||
|
|
0b1f522906 | ||
|
|
ec36df5f75 | ||
|
|
c93edc4999 | ||
|
|
29146e009d | ||
|
|
ea04edf478 | ||
|
|
c2fec93052 | ||
|
|
d8b54a6f91 | ||
|
|
664d1cd0dd | ||
|
|
4275c8e739 | ||
|
|
82bea3fa10 | ||
|
|
8e8ceaa344 | ||
|
|
77224646d5 | ||
|
|
72db2dc3e1 | ||
|
|
abe88599b6 | ||
|
|
a6610f1211 | ||
|
|
bfdd84939d | ||
|
|
06cc1df3b7 | ||
|
|
4acb2b5561 | ||
|
|
00f4355f1a | ||
|
|
430a5f7934 | ||
|
|
51e6b4146e | ||
|
|
49922de9d9 | ||
|
|
603e24f1e2 | ||
|
|
c9027fced0 | ||
|
|
ac8fa0b345 | ||
|
|
81a32b4dd2 | ||
|
|
bd0bb4fed7 | ||
|
|
b616dca7eb | ||
|
|
59434aac4f | ||
|
|
cef16471f4 | ||
|
|
0db0cc7564 | ||
|
|
229a47413e | ||
|
|
b75bcef55b | ||
|
|
2545a440dc |
@@ -1,5 +1,62 @@
|
||||
# @thirdweb-dev/auth
|
||||
|
||||
## 3.0.16
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- [#958](https://github.com/thirdweb-dev/js/pull/958) [`72b8b982`](https://github.com/thirdweb-dev/js/commit/72b8b9829eb11d51a63530af62e5634f182c0d03) Thanks [@adam-maj](https://github.com/adam-maj)! - Add extra options to cookie on logout
|
||||
|
||||
- Updated dependencies [[`7012513b`](https://github.com/thirdweb-dev/js/commit/7012513bc20f283b2cde46c0b938af33fe3a1a20), [`5d67b280`](https://github.com/thirdweb-dev/js/commit/5d67b2807f2504add4c202d2eb18897415662fb6), [`f12a80a4`](https://github.com/thirdweb-dev/js/commit/f12a80a4758aa91c43084acedb212de9f36a7371), [`5a67d5d8`](https://github.com/thirdweb-dev/js/commit/5a67d5d89474eac9a638ffaddba139b62965deff), [`d2c7f6d7`](https://github.com/thirdweb-dev/js/commit/d2c7f6d758787fab102ecc0cec16ac74f3c87a1f), [`c7c2530c`](https://github.com/thirdweb-dev/js/commit/c7c2530c7f2ef412f1e40428391e85decf504392), [`e22e4a47`](https://github.com/thirdweb-dev/js/commit/e22e4a47d73e1bbc6e3f0ae7ed56717b44e5ffcd), [`1e4ac672`](https://github.com/thirdweb-dev/js/commit/1e4ac672720c2fb01046bec195877a074ffbda06), [`fc96e147`](https://github.com/thirdweb-dev/js/commit/fc96e14750175b19cb66fa7d50cdbad65b42153a), [`4a69f8c8`](https://github.com/thirdweb-dev/js/commit/4a69f8c85dec420615e9eda8d1ad5b5ef0b87713), [`26cd91ff`](https://github.com/thirdweb-dev/js/commit/26cd91ffe18dad37133a18988f21185c13d64cfb), [`0186721b`](https://github.com/thirdweb-dev/js/commit/0186721bc455aa1f8454839a1a25fa4062b45102), [`1e9fad77`](https://github.com/thirdweb-dev/js/commit/1e9fad779f3ebe535d32c0ce76905a3a8033f2fa), [`7af99d9a`](https://github.com/thirdweb-dev/js/commit/7af99d9a6d54492a29a90288a25b30773a8a10a7), [`8cfb4f38`](https://github.com/thirdweb-dev/js/commit/8cfb4f38ed89c26ad04f19d27c65c24cefa976b6)]:
|
||||
- @thirdweb-dev/wallets@0.2.17
|
||||
|
||||
## 3.0.15
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- [#874](https://github.com/thirdweb-dev/js/pull/874) [`49922de9`](https://github.com/thirdweb-dev/js/commit/49922de9d9c1258e58a3a05e656b229db469b1dd) Thanks [@iketw](https://github.com/iketw)! - [RN] Adds Auth to React Native
|
||||
|
||||
- Adds an optional `secureStorage` to authConfig
|
||||
- Adds `expo-secure-store` to store the JWT token securely in React Native, passing a default value
|
||||
- Stores the token in secure storage to be accessed by subsequent calls
|
||||
- Returns the token in `useLogin` to be used by the user
|
||||
|
||||
How I tested:
|
||||
|
||||
- Tested in Android/iOS/Web
|
||||
|
||||
Usage:
|
||||
|
||||
```
|
||||
<ThirdwebProvider
|
||||
activeChain="ethereum"
|
||||
supportedWallets={[metamaskWallet(), rainbowWallet()]}
|
||||
authConfig={{
|
||||
domain: https://your-domain.com,
|
||||
authUrl: '/api/auth',
|
||||
}}>
|
||||
<AppInner />
|
||||
</ThirdwebProvider>
|
||||
```
|
||||
|
||||
```
|
||||
const { login } = useLogin();
|
||||
const { logout } = useLogout();
|
||||
const { user, isLoggedIn } = useUser();
|
||||
...
|
||||
|
||||
const token = await login();
|
||||
```
|
||||
|
||||
- Updated dependencies [[`4acb2b55`](https://github.com/thirdweb-dev/js/commit/4acb2b5561118dde5c7372400d4d754b879aef2e), [`82bea3fa`](https://github.com/thirdweb-dev/js/commit/82bea3fa10294eb3c5c7327fb047e3d1b2c62ff9), [`664d1cd0`](https://github.com/thirdweb-dev/js/commit/664d1cd0dd03f32337c2cf532f0ad860e5aa5ea8), [`c2fec930`](https://github.com/thirdweb-dev/js/commit/c2fec930520e2df89532ec0027ead4563c7708cf)]:
|
||||
- @thirdweb-dev/[email protected]
|
||||
|
||||
## 3.0.14
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- Updated dependencies [[`b616dca7`](https://github.com/thirdweb-dev/js/commit/b616dca7eb861cd1d2adba3f3d1fe9c3b50f259e), [`2545a440`](https://github.com/thirdweb-dev/js/commit/2545a440dc272690cacbc23023f7b0a68f390c6e), [`229a4741`](https://github.com/thirdweb-dev/js/commit/229a47413e422952ad946b8c09af32cc1fcdc7f0)]:
|
||||
- @thirdweb-dev/[email protected]
|
||||
|
||||
## 3.0.13
|
||||
|
||||
### Patch Changes
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@thirdweb-dev/auth",
|
||||
"version": "3.0.13",
|
||||
"version": "3.0.16",
|
||||
"main": "dist/thirdweb-dev-auth.cjs.js",
|
||||
"module": "dist/thirdweb-dev-auth.esm.js",
|
||||
"browser": {
|
||||
@@ -60,7 +60,8 @@
|
||||
"lint": "eslint src/",
|
||||
"fix": "eslint src/ --fix",
|
||||
"clean": "rm -rf dist/ && rm -rf node_modules/",
|
||||
"test": "mocha --config './test/.mocharc.json' --timeout 30000 --parallel './test/**/*.test.ts'"
|
||||
"test": "mocha --config './test/.mocharc.json' --timeout 30000 --parallel './test/**/*.test.ts'",
|
||||
"push": "yalc push"
|
||||
},
|
||||
"preconstruct": {
|
||||
"entrypoints": [
|
||||
|
||||
@@ -49,9 +49,7 @@ export class ThirdwebAuth {
|
||||
address: await this.wallet.getAddress(),
|
||||
statement: parsedOptions?.statement,
|
||||
version: parsedOptions?.version,
|
||||
uri:
|
||||
parsedOptions?.uri ||
|
||||
(isBrowser() ? window.location.origin : undefined),
|
||||
uri: parsedOptions?.uri,
|
||||
chain_id: chainId,
|
||||
nonce: parsedOptions?.nonce,
|
||||
expiration_time:
|
||||
|
||||
@@ -27,7 +27,10 @@ export default async function handler(
|
||||
serialize("thirdweb_auth_token", "", {
|
||||
domain: ctx.cookieOptions?.domain,
|
||||
path: ctx.cookieOptions?.path || "/",
|
||||
sameSite: ctx.cookieOptions?.sameSite || "none",
|
||||
expires: new Date(Date.now() + 5 * 1000),
|
||||
httpOnly: true,
|
||||
secure: true,
|
||||
}),
|
||||
);
|
||||
|
||||
|
||||
@@ -27,7 +27,10 @@ export default async function handler(
|
||||
serialize("thirdweb_auth_token", "", {
|
||||
domain: ctx.cookieOptions?.domain,
|
||||
path: ctx.cookieOptions?.path || "/",
|
||||
sameSite: ctx.cookieOptions?.sameSite || "none",
|
||||
expires: new Date(Date.now() + 5 * 1000),
|
||||
httpOnly: true,
|
||||
secure: true,
|
||||
}),
|
||||
);
|
||||
|
||||
|
||||
@@ -1,5 +1,21 @@
|
||||
# @thirdweb-dev/chains
|
||||
|
||||
## 0.1.13
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- [#787](https://github.com/thirdweb-dev/js/pull/787) [`d2c7f6d7`](https://github.com/thirdweb-dev/js/commit/d2c7f6d758787fab102ecc0cec16ac74f3c87a1f) Thanks [@iketw](https://github.com/iketw)! - [ReactNative] Adds Device Wallet
|
||||
|
||||
- [#931](https://github.com/thirdweb-dev/js/pull/931) [`f12a80a4`](https://github.com/thirdweb-dev/js/commit/f12a80a4758aa91c43084acedb212de9f36a7371) Thanks [@joaquim-verges](https://github.com/joaquim-verges)! - Updated chains
|
||||
|
||||
## 0.1.12
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- [#896](https://github.com/thirdweb-dev/js/pull/896) [`a6610f12`](https://github.com/thirdweb-dev/js/commit/a6610f1211e9359885b948bf69a66d834707ec07) Thanks [@atharvadeosthale](https://github.com/atharvadeosthale)! - Added links to portal
|
||||
|
||||
- [#903](https://github.com/thirdweb-dev/js/pull/903) [`77224646`](https://github.com/thirdweb-dev/js/commit/77224646d542db3171394d744b455497cd057633) Thanks [@joaquim-verges](https://github.com/joaquim-verges)! - new chains
|
||||
|
||||
## 0.1.11
|
||||
|
||||
### Patch Changes
|
||||
|
||||
@@ -10,7 +10,7 @@ export default {
|
||||
},
|
||||
"rpc": [
|
||||
"https://nebula-testnet.rpc.thirdweb.com/${THIRDWEB_API_KEY}",
|
||||
"https://testnet.rpc.novanetwork.io:9070"
|
||||
"https://testnet.rpc.novanetwork.io"
|
||||
],
|
||||
"faucets": [
|
||||
"https://faucet.novanetwork.io"
|
||||
|
||||
@@ -0,0 +1,37 @@
|
||||
import type { Chain } from "../src/types";
|
||||
export default {
|
||||
"name": "Alphabet Mainnet",
|
||||
"chain": "Alphabet Network",
|
||||
"icon": {
|
||||
"url": "ipfs://QmfTeudwVJcu7jzySBcpD9H5ZVK66nPJKRnicxend1bxfq",
|
||||
"width": 500,
|
||||
"height": 500,
|
||||
"format": "svg"
|
||||
},
|
||||
"rpc": [
|
||||
"https://alphabet.rpc.thirdweb.com/${THIRDWEB_API_KEY}",
|
||||
"https://londonpublic.alphabetnetwork.org",
|
||||
"wss://londonpublic.alphabetnetwork.org/ws/",
|
||||
"https://main-rpc.com",
|
||||
"wss://main-rpc.com/ws/"
|
||||
],
|
||||
"faucets": [],
|
||||
"nativeCurrency": {
|
||||
"name": "ALT",
|
||||
"symbol": "ALT",
|
||||
"decimals": 18
|
||||
},
|
||||
"infoURL": "https://alphabetnetwork.org",
|
||||
"shortName": "alphabet",
|
||||
"chainId": 111222333444,
|
||||
"networkId": 111222333444,
|
||||
"explorers": [
|
||||
{
|
||||
"name": "Alphabet Explorer",
|
||||
"url": "https://scan.alphabetnetwork.org",
|
||||
"standard": "EIP3091"
|
||||
}
|
||||
],
|
||||
"testnet": false,
|
||||
"slug": "alphabet"
|
||||
} as const satisfies Chain;
|
||||
@@ -2,6 +2,12 @@ import type { Chain } from "../src/types";
|
||||
export default {
|
||||
"name": "Palm Testnet",
|
||||
"chain": "Palm",
|
||||
"icon": {
|
||||
"url": "ipfs://bafkreihifvvbq6xzviygveivayogqiotdtpjvilu27bgqobduqemzeq7o4",
|
||||
"width": 72,
|
||||
"height": 72,
|
||||
"format": "svg"
|
||||
},
|
||||
"rpc": [
|
||||
"https://palm-testnet.rpc.thirdweb.com/${THIRDWEB_API_KEY}",
|
||||
"https://palm-testnet.infura.io/v3/${INFURA_API_KEY}"
|
||||
|
||||
@@ -2,6 +2,12 @@ import type { Chain } from "../src/types";
|
||||
export default {
|
||||
"name": "Palm",
|
||||
"chain": "Palm",
|
||||
"icon": {
|
||||
"url": "ipfs://bafkreihifvvbq6xzviygveivayogqiotdtpjvilu27bgqobduqemzeq7o4",
|
||||
"width": 72,
|
||||
"height": 72,
|
||||
"format": "svg"
|
||||
},
|
||||
"rpc": [
|
||||
"https://palm.rpc.thirdweb.com/${THIRDWEB_API_KEY}",
|
||||
"https://palm-mainnet.infura.io/v3/${INFURA_API_KEY}"
|
||||
|
||||
@@ -0,0 +1,40 @@
|
||||
import type { Chain } from "../src/types";
|
||||
export default {
|
||||
"name": "Symplexia Smart Chain",
|
||||
"chain": "Plexchain",
|
||||
"rpc": [
|
||||
"https://symplexia-smart-chain.rpc.thirdweb.com/${THIRDWEB_API_KEY}",
|
||||
"https://plex-rpc.plexfinance.us"
|
||||
],
|
||||
"faucets": [],
|
||||
"nativeCurrency": {
|
||||
"name": "Plex Native Token",
|
||||
"symbol": "PLEX",
|
||||
"decimals": 18
|
||||
},
|
||||
"infoURL": "https://plexfinance.us/",
|
||||
"shortName": "Plexchain",
|
||||
"chainId": 1149,
|
||||
"networkId": 1149,
|
||||
"icon": {
|
||||
"url": "ipfs://QmcXzfMNSQ7SZzKemNquVoXyG5ergdqCGeLWjRYETGBTUM",
|
||||
"width": 256,
|
||||
"height": 256,
|
||||
"format": "png"
|
||||
},
|
||||
"explorers": [
|
||||
{
|
||||
"name": "Plexchain Explorer",
|
||||
"url": "https://explorer.plexfinance.us",
|
||||
"icon": {
|
||||
"url": "ipfs://QmcXzfMNSQ7SZzKemNquVoXyG5ergdqCGeLWjRYETGBTUM",
|
||||
"width": 256,
|
||||
"height": 256,
|
||||
"format": "png"
|
||||
},
|
||||
"standard": "EIP3091"
|
||||
}
|
||||
],
|
||||
"testnet": false,
|
||||
"slug": "symplexia-smart-chain"
|
||||
} as const satisfies Chain;
|
||||
@@ -3,6 +3,12 @@ export default {
|
||||
"name": "Rikeza Network Testnet",
|
||||
"title": "Rikeza Network Testnet",
|
||||
"chain": "Rikeza",
|
||||
"icon": {
|
||||
"url": "ipfs://QmfJ1Qxpzi6CSLeFeWY1Bwe435CpT5za5WfrLUE7vNzZfy",
|
||||
"width": 512,
|
||||
"height": 512,
|
||||
"format": "png"
|
||||
},
|
||||
"rpc": [
|
||||
"https://rikeza-network-testnet.rpc.thirdweb.com/${THIRDWEB_API_KEY}",
|
||||
"https://testnet-rpc.rikscan.com"
|
||||
|
||||
@@ -0,0 +1,37 @@
|
||||
import type { Chain } from "../src/types";
|
||||
export default {
|
||||
"name": "Chaos (SKALE Testnet)",
|
||||
"title": "Chaos Testnet",
|
||||
"chain": "staging-fast-active-bellatrix",
|
||||
"rpc": [
|
||||
"https://chaos-skale-testnet.rpc.thirdweb.com/${THIRDWEB_API_KEY}",
|
||||
"https://staging-v3.skalenodes.com/v1/staging-fast-active-bellatrix"
|
||||
],
|
||||
"faucets": [
|
||||
"https://sfuel.skale.network/staging/chaos"
|
||||
],
|
||||
"nativeCurrency": {
|
||||
"name": "sFUEL",
|
||||
"symbol": "sFUEL",
|
||||
"decimals": 18
|
||||
},
|
||||
"infoURL": "https://docs.skale.network/develop/",
|
||||
"shortName": "chaos-tenet",
|
||||
"chainId": 1351057110,
|
||||
"networkId": 1351057110,
|
||||
"explorers": [
|
||||
{
|
||||
"name": "Blockscout",
|
||||
"url": "https://staging-fast-active-bellatrix.explorer.staging-v3.skalenodes.com",
|
||||
"icon": {
|
||||
"url": "ipfs://QmbYYCoU2G4LUfRr9ofGowF3eatfvWv9FiPVhqKndZeqwA",
|
||||
"width": 400,
|
||||
"height": 400,
|
||||
"format": "png"
|
||||
},
|
||||
"standard": "EIP3091"
|
||||
}
|
||||
],
|
||||
"testnet": true,
|
||||
"slug": "chaos-skale-testnet"
|
||||
} as const satisfies Chain;
|
||||
@@ -0,0 +1,40 @@
|
||||
import type { Chain } from "../src/types";
|
||||
export default {
|
||||
"name": "Deamchain Mainnet",
|
||||
"chain": "Deamchain",
|
||||
"icon": {
|
||||
"url": "ipfs://QmXvHWmjfXKdZMSz7x82NR4SjEqigKdJELVHbnzUPkj17F",
|
||||
"width": 512,
|
||||
"height": 512,
|
||||
"format": "svg"
|
||||
},
|
||||
"rpc": [
|
||||
"https://deamchain.rpc.thirdweb.com/${THIRDWEB_API_KEY}",
|
||||
"https://mainnet.deamchain.com"
|
||||
],
|
||||
"faucets": [],
|
||||
"nativeCurrency": {
|
||||
"name": "Deamchain Native Token",
|
||||
"symbol": "DEAM",
|
||||
"decimals": 18
|
||||
},
|
||||
"infoURL": "https://deamchain.com",
|
||||
"shortName": "deam",
|
||||
"chainId": 136,
|
||||
"networkId": 136,
|
||||
"explorers": [
|
||||
{
|
||||
"name": "Deamchain Block Explorer",
|
||||
"url": "https://scan.deamchain.com",
|
||||
"standard": "EIP3091",
|
||||
"icon": {
|
||||
"url": "ipfs://QmXvHWmjfXKdZMSz7x82NR4SjEqigKdJELVHbnzUPkj17F",
|
||||
"width": 512,
|
||||
"height": 512,
|
||||
"format": "svg"
|
||||
}
|
||||
}
|
||||
],
|
||||
"testnet": false,
|
||||
"slug": "deamchain"
|
||||
} as const satisfies Chain;
|
||||
@@ -0,0 +1,34 @@
|
||||
import type { Chain } from "../src/types";
|
||||
export default {
|
||||
"name": "Zafirium Mainnet",
|
||||
"chain": "ZAFIC",
|
||||
"icon": {
|
||||
"url": "ipfs://QmZT1Wq3P4YbgKBSUmCtgbs5ijPF5d91BzaMPh7Aub8d8t",
|
||||
"width": 192,
|
||||
"height": 192,
|
||||
"format": "png"
|
||||
},
|
||||
"rpc": [
|
||||
"https://zafirium.rpc.thirdweb.com/${THIRDWEB_API_KEY}",
|
||||
"https://mainnet.zakumi.io"
|
||||
],
|
||||
"faucets": [],
|
||||
"nativeCurrency": {
|
||||
"name": "Zakumi Chain Native Token",
|
||||
"symbol": "ZAFIC",
|
||||
"decimals": 18
|
||||
},
|
||||
"infoURL": "https://www.zakumi.io",
|
||||
"shortName": "zafic",
|
||||
"chainId": 1369,
|
||||
"networkId": 1369,
|
||||
"explorers": [
|
||||
{
|
||||
"name": "zafirium-explorer",
|
||||
"url": "https://explorer.zakumi.io",
|
||||
"standard": "none"
|
||||
}
|
||||
],
|
||||
"testnet": false,
|
||||
"slug": "zafirium"
|
||||
} as const satisfies Chain;
|
||||
@@ -0,0 +1,34 @@
|
||||
import type { Chain } from "../src/types";
|
||||
export default {
|
||||
"name": "ICPlaza Mainnet",
|
||||
"chain": "ICPlaza",
|
||||
"icon": {
|
||||
"url": "ipfs://QmQpKKwpqrx77VA4SJLEWhuv9eLFMcVV9uvxRCLb6gdgCX",
|
||||
"width": 847,
|
||||
"height": 906,
|
||||
"format": "png"
|
||||
},
|
||||
"rpc": [
|
||||
"https://icplaza.rpc.thirdweb.com/${THIRDWEB_API_KEY}",
|
||||
"https://rpcmainnet.ic-plaza.org/"
|
||||
],
|
||||
"faucets": [],
|
||||
"nativeCurrency": {
|
||||
"name": "ict",
|
||||
"symbol": "ict",
|
||||
"decimals": 18
|
||||
},
|
||||
"infoURL": "https://docs.ic-plaza.org/",
|
||||
"shortName": "ICPlaza",
|
||||
"chainId": 142857,
|
||||
"networkId": 142857,
|
||||
"explorers": [
|
||||
{
|
||||
"name": "ICPlaza",
|
||||
"url": "https://browsemainnet.ic-plaza.org/index",
|
||||
"standard": "none"
|
||||
}
|
||||
],
|
||||
"testnet": false,
|
||||
"slug": "icplaza"
|
||||
} as const satisfies Chain;
|
||||
@@ -3,6 +3,12 @@ export default {
|
||||
"name": "Rikeza Network Mainnet",
|
||||
"title": "Rikeza Network Mainnet",
|
||||
"chain": "Rikeza",
|
||||
"icon": {
|
||||
"url": "ipfs://QmfJ1Qxpzi6CSLeFeWY1Bwe435CpT5za5WfrLUE7vNzZfy",
|
||||
"width": 512,
|
||||
"height": 512,
|
||||
"format": "png"
|
||||
},
|
||||
"rpc": [
|
||||
"https://rikeza-network.rpc.thirdweb.com/${THIRDWEB_API_KEY}",
|
||||
"https://rpc.rikscan.com"
|
||||
|
||||
@@ -0,0 +1,42 @@
|
||||
import type { Chain } from "../src/types";
|
||||
export default {
|
||||
"name": "Six Protocol Testnet",
|
||||
"chain": "FIVENET",
|
||||
"icon": {
|
||||
"url": "ipfs://QmP93z696v8Hetu13peY2oEHDXq8Bj5CqaDRwpVkpnM15A",
|
||||
"width": 512,
|
||||
"height": 512,
|
||||
"format": "png"
|
||||
},
|
||||
"rpc": [
|
||||
"https://six-protocol-testnet.rpc.thirdweb.com/${THIRDWEB_API_KEY}",
|
||||
"https://rpc-evm.fivenet.sixprotocol.net"
|
||||
],
|
||||
"faucets": [
|
||||
"https://faucet.sixprotocol.net"
|
||||
],
|
||||
"nativeCurrency": {
|
||||
"name": "SIX testnet evm token",
|
||||
"symbol": "tSIX",
|
||||
"decimals": 18
|
||||
},
|
||||
"infoURL": "https://six.network/",
|
||||
"shortName": "sixt",
|
||||
"chainId": 150,
|
||||
"networkId": 150,
|
||||
"explorers": [
|
||||
{
|
||||
"name": "SIX Scan fivenet",
|
||||
"url": "https://sixscan.io/fivenet",
|
||||
"standard": "none",
|
||||
"icon": {
|
||||
"url": "ipfs://QmP93z696v8Hetu13peY2oEHDXq8Bj5CqaDRwpVkpnM15A",
|
||||
"width": 512,
|
||||
"height": 512,
|
||||
"format": "png"
|
||||
}
|
||||
}
|
||||
],
|
||||
"testnet": true,
|
||||
"slug": "six-protocol-testnet"
|
||||
} as const satisfies Chain;
|
||||
@@ -0,0 +1,43 @@
|
||||
import type { Chain } from "../src/types";
|
||||
export default {
|
||||
"name": "EOS EVM Network Testnet",
|
||||
"chain": "EOS",
|
||||
"icon": {
|
||||
"url": "ipfs://QmXkK5D5GWizvY1FmL6pV8cYLAbhehKETubktCgh6qDJZb",
|
||||
"width": 500,
|
||||
"height": 750,
|
||||
"format": "png"
|
||||
},
|
||||
"rpc": [
|
||||
"https://eos-evm-network-testnet.rpc.thirdweb.com/${THIRDWEB_API_KEY}",
|
||||
"https://api.testnet.evm.eosnetwork.com"
|
||||
],
|
||||
"faucets": [],
|
||||
"nativeCurrency": {
|
||||
"name": "EOS",
|
||||
"symbol": "EOS",
|
||||
"decimals": 18
|
||||
},
|
||||
"infoURL": "https://eosnetwork.com/eos-evm",
|
||||
"shortName": "eos-testnet",
|
||||
"chainId": 15557,
|
||||
"networkId": 15557,
|
||||
"explorers": [
|
||||
{
|
||||
"name": "EOS EVM Explorer",
|
||||
"url": "https://explorer.testnet.evm.eosnetwork.com",
|
||||
"standard": "EIP3091"
|
||||
}
|
||||
],
|
||||
"parent": {
|
||||
"type": "L2",
|
||||
"chain": "eip155-1",
|
||||
"bridges": [
|
||||
{
|
||||
"url": "https://bridge.testnet.evm.eosnetwork.com"
|
||||
}
|
||||
]
|
||||
},
|
||||
"testnet": true,
|
||||
"slug": "eos-evm-network-testnet"
|
||||
} as const satisfies Chain;
|
||||
@@ -0,0 +1,42 @@
|
||||
import type { Chain } from "../src/types";
|
||||
export default {
|
||||
"name": "OEBlock Testnet",
|
||||
"chain": "OEBt",
|
||||
"features": [
|
||||
{
|
||||
"name": "EIP155"
|
||||
},
|
||||
{
|
||||
"name": "EIP1559"
|
||||
}
|
||||
],
|
||||
"rpc": [
|
||||
"https://oeblock-testnet.rpc.thirdweb.com/${THIRDWEB_API_KEY}",
|
||||
"https://testnet-rpc.oeblock.com"
|
||||
],
|
||||
"faucets": [],
|
||||
"nativeCurrency": {
|
||||
"name": "OEBlock",
|
||||
"symbol": "OEB",
|
||||
"decimals": 18
|
||||
},
|
||||
"infoURL": "https://www.oeblock.com/",
|
||||
"shortName": "obe",
|
||||
"chainId": 156,
|
||||
"networkId": 156,
|
||||
"icon": {
|
||||
"url": "ipfs://QmdoQUfYqtkWMfjtoPv2KWDY4MxDDSsyWgwXtCx6jfkezz",
|
||||
"width": 155,
|
||||
"height": 177,
|
||||
"format": "png"
|
||||
},
|
||||
"explorers": [
|
||||
{
|
||||
"name": "OEScan explorer",
|
||||
"url": "https://testnet.oescan.io",
|
||||
"standard": "EIP3091"
|
||||
}
|
||||
],
|
||||
"testnet": true,
|
||||
"slug": "oeblock-testnet"
|
||||
} as const satisfies Chain;
|
||||
@@ -0,0 +1,51 @@
|
||||
import type { Chain } from "../src/types";
|
||||
export default {
|
||||
"name": "Horizen Gobi Testnet",
|
||||
"shortName": "Gobi",
|
||||
"chain": "Gobi",
|
||||
"icon": {
|
||||
"url": "ipfs://QmSFMBk3rMyu45Sy9KQHjgArFj4HdywANNYrSosLMUdcti",
|
||||
"width": 1213,
|
||||
"height": 1213,
|
||||
"format": "png"
|
||||
},
|
||||
"rpc": [
|
||||
"https://horizen-gobi-testnet.rpc.thirdweb.com/${THIRDWEB_API_KEY}",
|
||||
"https://gobi-testnet.horizenlabs.io/ethv1"
|
||||
],
|
||||
"features": [
|
||||
{
|
||||
"name": "EIP155"
|
||||
},
|
||||
{
|
||||
"name": "EIP1559"
|
||||
}
|
||||
],
|
||||
"faucets": [
|
||||
"https://faucet.horizen.io"
|
||||
],
|
||||
"nativeCurrency": {
|
||||
"name": "Testnet Zen",
|
||||
"symbol": "tZEN",
|
||||
"decimals": 18
|
||||
},
|
||||
"infoURL": "https://horizen.io/",
|
||||
"chainId": 1663,
|
||||
"networkId": 1663,
|
||||
"slip44": 121,
|
||||
"explorers": [
|
||||
{
|
||||
"name": "Gobi Testnet Block Explorer",
|
||||
"url": "https://gobi-explorer.horizen.io",
|
||||
"icon": {
|
||||
"url": "ipfs://QmSFMBk3rMyu45Sy9KQHjgArFj4HdywANNYrSosLMUdcti",
|
||||
"width": 1213,
|
||||
"height": 1213,
|
||||
"format": "png"
|
||||
},
|
||||
"standard": "EIP3091"
|
||||
}
|
||||
],
|
||||
"testnet": true,
|
||||
"slug": "horizen-gobi-testnet"
|
||||
} as const satisfies Chain;
|
||||
@@ -0,0 +1,48 @@
|
||||
import type { Chain } from "../src/types";
|
||||
export default {
|
||||
"name": "IRIShub Testnet",
|
||||
"chain": "IRIShub",
|
||||
"rpc": [
|
||||
"https://irishub-testnet.rpc.thirdweb.com/${THIRDWEB_API_KEY}",
|
||||
"http://34.80.202.172:8545"
|
||||
],
|
||||
"features": [
|
||||
{
|
||||
"name": "EIP155"
|
||||
},
|
||||
{
|
||||
"name": "EIP1559"
|
||||
}
|
||||
],
|
||||
"faucets": [],
|
||||
"nativeCurrency": {
|
||||
"name": "Eris",
|
||||
"symbol": "ERIS",
|
||||
"decimals": 18
|
||||
},
|
||||
"infoURL": "https://www.irisnet.org",
|
||||
"shortName": "nyancat",
|
||||
"chainId": 16688,
|
||||
"networkId": 16688,
|
||||
"icon": {
|
||||
"url": "ipfs://QmRaSx7AX1VDgcqjwLgSDP4WZmKBHPdHhbjkcEEXPA2Fnc",
|
||||
"width": 1062,
|
||||
"height": 822,
|
||||
"format": "png"
|
||||
},
|
||||
"explorers": [
|
||||
{
|
||||
"name": "IRISHub Testnet Cosmos Explorer (IOBScan)",
|
||||
"url": "https://nyancat.iobscan.io",
|
||||
"standard": "none",
|
||||
"icon": {
|
||||
"url": "ipfs://QmRaSx7AX1VDgcqjwLgSDP4WZmKBHPdHhbjkcEEXPA2Fnc",
|
||||
"width": 1062,
|
||||
"height": 822,
|
||||
"format": "png"
|
||||
}
|
||||
}
|
||||
],
|
||||
"testnet": true,
|
||||
"slug": "irishub-testnet"
|
||||
} as const satisfies Chain;
|
||||
@@ -14,7 +14,7 @@ export default {
|
||||
},
|
||||
"features": [],
|
||||
"infoURL": "https://hashpalette.com/",
|
||||
"shortName": "PaletteChain",
|
||||
"shortName": "PCM",
|
||||
"chainId": 1718,
|
||||
"networkId": 1718,
|
||||
"icon": {
|
||||
|
||||
@@ -0,0 +1,41 @@
|
||||
import type { Chain } from "../src/types";
|
||||
export default {
|
||||
"name": "Palette Chain Testnet",
|
||||
"chain": "PLT",
|
||||
"rpc": [
|
||||
"https://palette-chain-testnet.rpc.thirdweb.com/${THIRDWEB_API_KEY}",
|
||||
"https://palette-opennet.com:22000"
|
||||
],
|
||||
"faucets": [],
|
||||
"nativeCurrency": {
|
||||
"name": "Palette Token",
|
||||
"symbol": "PLT",
|
||||
"decimals": 18
|
||||
},
|
||||
"features": [],
|
||||
"infoURL": "https://hashpalette.com/",
|
||||
"shortName": "PCT",
|
||||
"chainId": 17180,
|
||||
"networkId": 17180,
|
||||
"icon": {
|
||||
"url": "ipfs://QmPCEGZD1p1keTT2YfPp725azx1r9Ci41hejeUuGL2whFA",
|
||||
"width": 800,
|
||||
"height": 800,
|
||||
"format": "png"
|
||||
},
|
||||
"explorers": [
|
||||
{
|
||||
"name": "Palettescan",
|
||||
"url": "https://testnet.palettescan.com",
|
||||
"icon": {
|
||||
"url": "ipfs://QmPCEGZD1p1keTT2YfPp725azx1r9Ci41hejeUuGL2whFA",
|
||||
"width": 800,
|
||||
"height": 800,
|
||||
"format": "png"
|
||||
},
|
||||
"standard": "none"
|
||||
}
|
||||
],
|
||||
"testnet": true,
|
||||
"slug": "palette-chain-testnet"
|
||||
} as const satisfies Chain;
|
||||
@@ -0,0 +1,42 @@
|
||||
import type { Chain } from "../src/types";
|
||||
export default {
|
||||
"name": "PartyChain",
|
||||
"chain": "mainnet",
|
||||
"rpc": [
|
||||
"https://partychain.rpc.thirdweb.com/${THIRDWEB_API_KEY}",
|
||||
"https://tea.mining4people.com/rpc",
|
||||
"http://172.104.194.36:8545"
|
||||
],
|
||||
"faucets": [],
|
||||
"nativeCurrency": {
|
||||
"name": "Grams",
|
||||
"symbol": "GRAMS",
|
||||
"decimals": 18
|
||||
},
|
||||
"infoURL": "TeaPartyCrypto.com",
|
||||
"shortName": "TeaParty",
|
||||
"chainId": 1773,
|
||||
"networkId": 1773,
|
||||
"icon": {
|
||||
"url": "ipfs://QmerDBFoXvgev2xx9U71gAaAK4CtxaaQVaAPf9Qi6UF9MS",
|
||||
"width": 400,
|
||||
"height": 400,
|
||||
"format": "jpg"
|
||||
},
|
||||
"status": "incubating",
|
||||
"explorers": [
|
||||
{
|
||||
"name": "PartyExplorer",
|
||||
"url": "https://partyexplorer.co",
|
||||
"icon": {
|
||||
"url": "ipfs://QmerDBFoXvgev2xx9U71gAaAK4CtxaaQVaAPf9Qi6UF9MS",
|
||||
"width": 400,
|
||||
"height": 400,
|
||||
"format": "jpg"
|
||||
},
|
||||
"standard": "EIP3091"
|
||||
}
|
||||
],
|
||||
"testnet": false,
|
||||
"slug": "partychain"
|
||||
} as const satisfies Chain;
|
||||
@@ -0,0 +1,46 @@
|
||||
import type { Chain } from "../src/types";
|
||||
export default {
|
||||
"name": "EOS EVM Network",
|
||||
"chain": "EOS",
|
||||
"icon": {
|
||||
"url": "ipfs://QmXkK5D5GWizvY1FmL6pV8cYLAbhehKETubktCgh6qDJZb",
|
||||
"width": 500,
|
||||
"height": 750,
|
||||
"format": "png"
|
||||
},
|
||||
"rpc": [
|
||||
"https://eos-evm-network.rpc.thirdweb.com/${THIRDWEB_API_KEY}",
|
||||
"https://api.evm.eosnetwork.com"
|
||||
],
|
||||
"faucets": [],
|
||||
"nativeCurrency": {
|
||||
"name": "EOS",
|
||||
"symbol": "EOS",
|
||||
"decimals": 18
|
||||
},
|
||||
"infoURL": "https://eosnetwork.com/eos-evm",
|
||||
"shortName": "eos",
|
||||
"chainId": 17777,
|
||||
"networkId": 17777,
|
||||
"explorers": [
|
||||
{
|
||||
"name": "EOS EVM Explorer",
|
||||
"url": "https://explorer.evm.eosnetwork.com",
|
||||
"standard": "EIP3091"
|
||||
}
|
||||
],
|
||||
"parent": {
|
||||
"type": "L2",
|
||||
"chain": "eip155-1",
|
||||
"bridges": [
|
||||
{
|
||||
"url": "https://bridge.evm.eosnetwork.com"
|
||||
},
|
||||
{
|
||||
"url": "https://app.multichain.org"
|
||||
}
|
||||
]
|
||||
},
|
||||
"testnet": false,
|
||||
"slug": "eos-evm-network"
|
||||
} as const satisfies Chain;
|
||||
@@ -16,19 +16,25 @@ export default {
|
||||
"shortName": "GTH",
|
||||
"chainId": 192837465,
|
||||
"networkId": 192837465,
|
||||
"explorers": [
|
||||
{
|
||||
"name": "Blockscout",
|
||||
"url": "https://explorer.gather.network",
|
||||
"standard": "none"
|
||||
}
|
||||
],
|
||||
"icon": {
|
||||
"url": "ipfs://Qmc9AJGg9aNhoH56n3deaZeUc8Ty1jDYJsW6Lu6hgSZH4S",
|
||||
"height": 512,
|
||||
"width": 512,
|
||||
"format": "png"
|
||||
},
|
||||
"explorers": [
|
||||
{
|
||||
"name": "Blockscout",
|
||||
"url": "https://explorer.gather.network",
|
||||
"icon": {
|
||||
"url": "ipfs://QmTYR8CeFiNbJ1zJHnE3DK2wEN18r2y2vqSKUcLweUT2Gz",
|
||||
"width": 1080,
|
||||
"height": 1080,
|
||||
"format": "svg"
|
||||
},
|
||||
"standard": "none"
|
||||
}
|
||||
],
|
||||
"testnet": false,
|
||||
"slug": "gather-network"
|
||||
} as const satisfies Chain;
|
||||
@@ -28,7 +28,7 @@ export default {
|
||||
"explorers": [
|
||||
{
|
||||
"name": "edexa-testnet",
|
||||
"url": "https://explorer.edexa.com",
|
||||
"url": "https://explorer.testnet.edexa.com",
|
||||
"standard": "EIP3091"
|
||||
}
|
||||
],
|
||||
|
||||
@@ -0,0 +1,40 @@
|
||||
import type { Chain } from "../src/types";
|
||||
export default {
|
||||
"name": "Metaplayerone Network",
|
||||
"chain": "MP1 Dubai-Testnet",
|
||||
"icon": {
|
||||
"url": "ipfs://QmfJKxmubJrqYWDcR2PnPvmpukxPz4fYDu3hqTaSnpJDxC",
|
||||
"width": 42,
|
||||
"height": 23,
|
||||
"format": "svg"
|
||||
},
|
||||
"rpc": [
|
||||
"https://metaplayerone-network.rpc.thirdweb.com/${THIRDWEB_API_KEY}",
|
||||
"https://rpc-dubai.mp1network.com/"
|
||||
],
|
||||
"faucets": [],
|
||||
"nativeCurrency": {
|
||||
"name": "Metaunit",
|
||||
"symbol": "MEU",
|
||||
"decimals": 18
|
||||
},
|
||||
"infoURL": "https://docs.metaplayer.one/",
|
||||
"shortName": "MEU",
|
||||
"chainId": 2124,
|
||||
"networkId": 2124,
|
||||
"explorers": [
|
||||
{
|
||||
"name": "MP1Scan",
|
||||
"url": "https://dubai.mp1scan.io",
|
||||
"icon": {
|
||||
"url": "ipfs://QmfJKxmubJrqYWDcR2PnPvmpukxPz4fYDu3hqTaSnpJDxC",
|
||||
"width": 42,
|
||||
"height": 23,
|
||||
"format": "svg"
|
||||
},
|
||||
"standard": "EIP3091"
|
||||
}
|
||||
],
|
||||
"testnet": true,
|
||||
"slug": "metaplayerone-network"
|
||||
} as const satisfies Chain;
|
||||
@@ -9,11 +9,11 @@ export default {
|
||||
"faucets": [],
|
||||
"nativeCurrency": {
|
||||
"name": "Bitcoin",
|
||||
"symbol": "eBTC",
|
||||
"symbol": "BTC",
|
||||
"decimals": 18
|
||||
},
|
||||
"infoURL": "https://bitcoinevm.com",
|
||||
"shortName": "eBTC",
|
||||
"shortName": "BTC",
|
||||
"chainId": 2203,
|
||||
"networkId": 2203,
|
||||
"icon": {
|
||||
|
||||
@@ -0,0 +1,30 @@
|
||||
import type { Chain } from "../src/types";
|
||||
export default {
|
||||
"name": "Kanazawa",
|
||||
"title": "Meld Testnet Kanazawa",
|
||||
"chain": "Kanazawa",
|
||||
"rpc": [
|
||||
"https://kanazawa.rpc.thirdweb.com/${THIRDWEB_API_KEY}",
|
||||
"https://rpc-kanazawa.meldlabs.dev/ext/bc/2Ci7VYrUd4fTBqGA5D2HA6UPHzQ4LQyr8rZQww9MGSv9rNkRzn/rpc"
|
||||
],
|
||||
"faucets": [],
|
||||
"features": [],
|
||||
"nativeCurrency": {
|
||||
"name": "gMeld",
|
||||
"symbol": "gMELD",
|
||||
"decimals": 18
|
||||
},
|
||||
"icon": {
|
||||
"url": "ipfs://QmRhB4AbjDrhvwfSAQi2JvKirFiDWxzJvKEvG8S8AdDdED",
|
||||
"width": 4000,
|
||||
"height": 4000,
|
||||
"format": "png"
|
||||
},
|
||||
"infoURL": "https://meld.com",
|
||||
"shortName": "kanazawa",
|
||||
"chainId": 222000222,
|
||||
"networkId": 222000222,
|
||||
"explorers": [],
|
||||
"testnet": true,
|
||||
"slug": "kanazawa"
|
||||
} as const satisfies Chain;
|
||||
@@ -0,0 +1,29 @@
|
||||
import type { Chain } from "../src/types";
|
||||
export default {
|
||||
"name": "SwapDEX",
|
||||
"chain": "SDX",
|
||||
"rpc": [
|
||||
"https://swapdex.rpc.thirdweb.com/${THIRDWEB_API_KEY}",
|
||||
"https://rpc.swapdex.network",
|
||||
"wss://ss.swapdex.network"
|
||||
],
|
||||
"faucets": [],
|
||||
"nativeCurrency": {
|
||||
"name": "SwapDEX",
|
||||
"symbol": "SDX",
|
||||
"decimals": 18
|
||||
},
|
||||
"infoURL": "https://swapdex.network/",
|
||||
"shortName": "SDX",
|
||||
"chainId": 230,
|
||||
"networkId": 230,
|
||||
"explorers": [
|
||||
{
|
||||
"name": "SwapDEX",
|
||||
"url": "https://evm.swapdex.network",
|
||||
"standard": "none"
|
||||
}
|
||||
],
|
||||
"testnet": false,
|
||||
"slug": "swapdex"
|
||||
} as const satisfies Chain;
|
||||
@@ -1,9 +1,9 @@
|
||||
import type { Chain } from "../src/types";
|
||||
export default {
|
||||
"name": "WEMIX Kanvas Sepolia",
|
||||
"title": "WEMIX Kanvas Testnet Sepolia",
|
||||
"name": "Kroma Sepolia",
|
||||
"title": "Kroma Testnet Sepolia",
|
||||
"chainId": 2357,
|
||||
"shortName": "kanvas-aqua",
|
||||
"shortName": "kroma-sepolia",
|
||||
"chain": "ETH",
|
||||
"networkId": 2357,
|
||||
"nativeCurrency": {
|
||||
@@ -12,13 +12,13 @@ export default {
|
||||
"decimals": 18
|
||||
},
|
||||
"rpc": [
|
||||
"https://wemix-kanvas-sepolia.rpc.thirdweb.com/${THIRDWEB_API_KEY}",
|
||||
"https://api.aqua.wemixkanvas.io"
|
||||
"https://kroma-sepolia.rpc.thirdweb.com/${THIRDWEB_API_KEY}",
|
||||
"https://api.sepolia.kroma.network"
|
||||
],
|
||||
"faucets": [],
|
||||
"infoURL": "https://wemixkanvas.io",
|
||||
"infoURL": "https://kroma.network",
|
||||
"icon": {
|
||||
"url": "ipfs://QmVcVxsHsVg5BMii3EJ1MUSnLBZkQicpjmXjSmW66bCEUF",
|
||||
"url": "ipfs://QmcYafk2je5rMqgnFPDZJTaLi6dgFgq96vmX2Li6DX441B",
|
||||
"width": 320,
|
||||
"height": 320,
|
||||
"format": "svg"
|
||||
@@ -26,9 +26,9 @@ export default {
|
||||
"explorers": [
|
||||
{
|
||||
"name": "blockscout",
|
||||
"url": "https://blockscout.aqua.wemixkanvas.io",
|
||||
"url": "https://blockscout.sepolia.kroma.network",
|
||||
"icon": {
|
||||
"url": "ipfs://QmVcVxsHsVg5BMii3EJ1MUSnLBZkQicpjmXjSmW66bCEUF",
|
||||
"url": "ipfs://QmcYafk2je5rMqgnFPDZJTaLi6dgFgq96vmX2Li6DX441B",
|
||||
"width": 320,
|
||||
"height": 320,
|
||||
"format": "svg"
|
||||
@@ -41,10 +41,10 @@ export default {
|
||||
"chain": "eip155-11155111",
|
||||
"bridges": [
|
||||
{
|
||||
"url": "https://wemixkanvas.io/bridge"
|
||||
"url": "https://kroma.network/bridge"
|
||||
}
|
||||
]
|
||||
},
|
||||
"testnet": true,
|
||||
"slug": "wemix-kanvas-sepolia"
|
||||
"slug": "kroma-sepolia"
|
||||
} as const satisfies Chain;
|
||||
@@ -0,0 +1,42 @@
|
||||
import type { Chain } from "../src/types";
|
||||
export default {
|
||||
"name": "Deamchain Testnet",
|
||||
"chain": "Deamchain",
|
||||
"icon": {
|
||||
"url": "ipfs://QmXvHWmjfXKdZMSz7x82NR4SjEqigKdJELVHbnzUPkj17F",
|
||||
"width": 512,
|
||||
"height": 512,
|
||||
"format": "svg"
|
||||
},
|
||||
"rpc": [
|
||||
"https://deamchain-testnet.rpc.thirdweb.com/${THIRDWEB_API_KEY}",
|
||||
"https://testnet.deamchain.com"
|
||||
],
|
||||
"faucets": [
|
||||
"https://faucet.deamchain.com"
|
||||
],
|
||||
"nativeCurrency": {
|
||||
"name": "Deamchain Native Token",
|
||||
"symbol": "DEAM",
|
||||
"decimals": 18
|
||||
},
|
||||
"infoURL": "https://deamchain.com",
|
||||
"shortName": "deamtest",
|
||||
"chainId": 236,
|
||||
"networkId": 236,
|
||||
"explorers": [
|
||||
{
|
||||
"name": "Deamchain Testnet Explorer",
|
||||
"url": "https://testnet-scan.deamchain.com",
|
||||
"standard": "EIP3091",
|
||||
"icon": {
|
||||
"url": "ipfs://QmXvHWmjfXKdZMSz7x82NR4SjEqigKdJELVHbnzUPkj17F",
|
||||
"width": 512,
|
||||
"height": 512,
|
||||
"format": "svg"
|
||||
}
|
||||
}
|
||||
],
|
||||
"testnet": true,
|
||||
"slug": "deamchain-testnet"
|
||||
} as const satisfies Chain;
|
||||
@@ -0,0 +1,40 @@
|
||||
import type { Chain } from "../src/types";
|
||||
export default {
|
||||
"name": "Neonlink Mainnet",
|
||||
"chain": "Neonlink",
|
||||
"rpc": [
|
||||
"https://neonlink.rpc.thirdweb.com/${THIRDWEB_API_KEY}",
|
||||
"https://mainnet.neonlink.io"
|
||||
],
|
||||
"faucets": [],
|
||||
"nativeCurrency": {
|
||||
"name": "Neonlink Native Token",
|
||||
"symbol": "NEON",
|
||||
"decimals": 18
|
||||
},
|
||||
"infoURL": "https://neonlink.io",
|
||||
"shortName": "neon",
|
||||
"chainId": 259,
|
||||
"networkId": 259,
|
||||
"icon": {
|
||||
"url": "ipfs://QmX3hBv8WyvVfYjh1gmgDfJCpJBvKk4TYG9wFX9sC8WAjz",
|
||||
"width": 512,
|
||||
"height": 512,
|
||||
"format": "svg"
|
||||
},
|
||||
"explorers": [
|
||||
{
|
||||
"name": "Neon Blockchain Explorer",
|
||||
"url": "https://scan.neonlink.io",
|
||||
"standard": "EIP3091",
|
||||
"icon": {
|
||||
"url": "ipfs://QmX3hBv8WyvVfYjh1gmgDfJCpJBvKk4TYG9wFX9sC8WAjz",
|
||||
"width": 512,
|
||||
"height": 512,
|
||||
"format": "svg"
|
||||
}
|
||||
}
|
||||
],
|
||||
"testnet": false,
|
||||
"slug": "neonlink"
|
||||
} as const satisfies Chain;
|
||||
@@ -0,0 +1,38 @@
|
||||
import type { Chain } from "../src/types";
|
||||
export default {
|
||||
"name": "Ferrum Testnet",
|
||||
"chain": "tFRM",
|
||||
"rpc": [
|
||||
"https://ferrum-testnet.rpc.thirdweb.com/${THIRDWEB_API_KEY}",
|
||||
"http://testnet.dev.svcs.ferrumnetwork.io:9933"
|
||||
],
|
||||
"faucets": [
|
||||
"https://testnet.faucet.ferrumnetwork.io"
|
||||
],
|
||||
"nativeCurrency": {
|
||||
"name": "Ferrum",
|
||||
"symbol": "tFRM",
|
||||
"decimals": 18
|
||||
},
|
||||
"features": [
|
||||
{
|
||||
"name": "EIP155"
|
||||
},
|
||||
{
|
||||
"name": "EIP1559"
|
||||
}
|
||||
],
|
||||
"infoURL": "https://ferrum.network",
|
||||
"shortName": "frm",
|
||||
"chainId": 26026,
|
||||
"networkId": 26026,
|
||||
"explorers": [
|
||||
{
|
||||
"name": "polkadotjs",
|
||||
"url": "https://polkadot.js.org/apps/?rpc=wss%3A%2F%2Ftestnet.dev.svcs.ferrumnetwork.io#/explorer",
|
||||
"standard": "none"
|
||||
}
|
||||
],
|
||||
"testnet": true,
|
||||
"slug": "ferrum-testnet"
|
||||
} as const satisfies Chain;
|
||||
@@ -0,0 +1,34 @@
|
||||
import type { Chain } from "../src/types";
|
||||
export default {
|
||||
"name": "Zilliqa EVM",
|
||||
"chain": "ZIL",
|
||||
"rpc": [
|
||||
"https://zilliqa-evm.rpc.thirdweb.com/${THIRDWEB_API_KEY}",
|
||||
"https://api.zilliqa.com"
|
||||
],
|
||||
"faucets": [],
|
||||
"nativeCurrency": {
|
||||
"name": "Zilliqa",
|
||||
"symbol": "ZIL",
|
||||
"decimals": 18
|
||||
},
|
||||
"infoURL": "https://www.zilliqa.com/",
|
||||
"shortName": "zil",
|
||||
"chainId": 32769,
|
||||
"networkId": 32769,
|
||||
"icon": {
|
||||
"url": "ipfs://QmTREXNgGtUhSoxFsrkhTe5LUnDBTKL5byaX8kpET6UuKp",
|
||||
"width": 2048,
|
||||
"height": 2048,
|
||||
"format": "png"
|
||||
},
|
||||
"explorers": [
|
||||
{
|
||||
"name": "Zilliqa EVM Explorer",
|
||||
"url": "https://evmx.zilliqa.com",
|
||||
"standard": "none"
|
||||
}
|
||||
],
|
||||
"testnet": false,
|
||||
"slug": "zilliqa-evm"
|
||||
} as const satisfies Chain;
|
||||
@@ -0,0 +1,42 @@
|
||||
import type { Chain } from "../src/types";
|
||||
export default {
|
||||
"name": "TTcoin Smart Chain Mainnet",
|
||||
"chain": "TSC",
|
||||
"icon": {
|
||||
"url": "ipfs://QmS7ipvvyZ16weG1DM7AZbi1v9ixYwU2FjP25Jj5jkLiuf",
|
||||
"width": 512,
|
||||
"height": 512,
|
||||
"format": "png"
|
||||
},
|
||||
"rpc": [
|
||||
"https://ttcoin-smart-chain.rpc.thirdweb.com/${THIRDWEB_API_KEY}",
|
||||
"https://mainnet-rpc.tscscan.com"
|
||||
],
|
||||
"faucets": [
|
||||
"https://faucet.tscscan.com"
|
||||
],
|
||||
"nativeCurrency": {
|
||||
"name": "TTcoin",
|
||||
"symbol": "TC",
|
||||
"decimals": 18
|
||||
},
|
||||
"infoURL": "https://ttcoin.info/",
|
||||
"shortName": "tc",
|
||||
"chainId": 330844,
|
||||
"networkId": 330844,
|
||||
"explorers": [
|
||||
{
|
||||
"name": "TTcoin Smart Chain Explorer",
|
||||
"url": "https://tscscan.com",
|
||||
"standard": "EIP3091",
|
||||
"icon": {
|
||||
"url": "ipfs://QmS7ipvvyZ16weG1DM7AZbi1v9ixYwU2FjP25Jj5jkLiuf",
|
||||
"width": 512,
|
||||
"height": 512,
|
||||
"format": "png"
|
||||
}
|
||||
}
|
||||
],
|
||||
"testnet": false,
|
||||
"slug": "ttcoin-smart-chain"
|
||||
} as const satisfies Chain;
|
||||
@@ -0,0 +1,30 @@
|
||||
import type { Chain } from "../src/types";
|
||||
export default {
|
||||
"name": "Meld",
|
||||
"title": "Meld Mainnet",
|
||||
"chain": "MELD",
|
||||
"rpc": [
|
||||
"https://meld.rpc.thirdweb.com/${THIRDWEB_API_KEY}",
|
||||
"https://network-rpc.meld.com"
|
||||
],
|
||||
"faucets": [],
|
||||
"features": [],
|
||||
"nativeCurrency": {
|
||||
"name": "gMeld",
|
||||
"symbol": "gMELD",
|
||||
"decimals": 18
|
||||
},
|
||||
"icon": {
|
||||
"url": "ipfs://QmRhB4AbjDrhvwfSAQi2JvKirFiDWxzJvKEvG8S8AdDdED",
|
||||
"width": 4000,
|
||||
"height": 4000,
|
||||
"format": "png"
|
||||
},
|
||||
"infoURL": "https://meld.com",
|
||||
"shortName": "meld",
|
||||
"chainId": 333000333,
|
||||
"networkId": 333000333,
|
||||
"explorers": [],
|
||||
"testnet": false,
|
||||
"slug": "meld"
|
||||
} as const satisfies Chain;
|
||||
@@ -18,19 +18,25 @@ export default {
|
||||
"shortName": "tGTH",
|
||||
"chainId": 356256156,
|
||||
"networkId": 356256156,
|
||||
"explorers": [
|
||||
{
|
||||
"name": "Blockscout",
|
||||
"url": "https://testnet-explorer.gather.network",
|
||||
"standard": "none"
|
||||
}
|
||||
],
|
||||
"testnet": true,
|
||||
"icon": {
|
||||
"url": "ipfs://Qmc9AJGg9aNhoH56n3deaZeUc8Ty1jDYJsW6Lu6hgSZH4S",
|
||||
"height": 512,
|
||||
"width": 512,
|
||||
"format": "png"
|
||||
},
|
||||
"explorers": [
|
||||
{
|
||||
"name": "Blockscout",
|
||||
"url": "https://testnet-explorer.gather.network",
|
||||
"icon": {
|
||||
"url": "ipfs://QmTYR8CeFiNbJ1zJHnE3DK2wEN18r2y2vqSKUcLweUT2Gz",
|
||||
"width": 1080,
|
||||
"height": 1080,
|
||||
"format": "svg"
|
||||
},
|
||||
"standard": "none"
|
||||
}
|
||||
],
|
||||
"testnet": true,
|
||||
"slug": "gather-testnet-network"
|
||||
} as const satisfies Chain;
|
||||
@@ -0,0 +1,29 @@
|
||||
import type { Chain } from "../src/types";
|
||||
export default {
|
||||
"name": "Markr Go",
|
||||
"chain": "Unified",
|
||||
"icon": {
|
||||
"url": "ipfs://QmVMBTZVPawyLBD2B5VbG68dfWLfZ1CnB8V59xduBe2kwh",
|
||||
"width": 84,
|
||||
"height": 84,
|
||||
"format": "png"
|
||||
},
|
||||
"rpc": [
|
||||
"https://markr-go.rpc.thirdweb.com/${THIRDWEB_API_KEY}",
|
||||
"https://rpc.markr.io/ext/"
|
||||
],
|
||||
"faucets": [],
|
||||
"nativeCurrency": {
|
||||
"name": "Avalanche",
|
||||
"symbol": "AVAX",
|
||||
"decimals": 18
|
||||
},
|
||||
"infoURL": "https://www.markr.io/",
|
||||
"shortName": "markr-go",
|
||||
"chainId": 431140,
|
||||
"networkId": 431140,
|
||||
"explorers": [],
|
||||
"status": "incubating",
|
||||
"testnet": false,
|
||||
"slug": "markr-go"
|
||||
} as const satisfies Chain;
|
||||
@@ -6,7 +6,8 @@ export default {
|
||||
"https://xinfin-xdc-network.rpc.thirdweb.com/${THIRDWEB_API_KEY}",
|
||||
"https://erpc.xinfin.network",
|
||||
"https://rpc.xinfin.network",
|
||||
"https://rpc1.xinfin.network"
|
||||
"https://rpc1.xinfin.network",
|
||||
"https://rpc-xdc.icecreamswap.com"
|
||||
],
|
||||
"faucets": [],
|
||||
"nativeCurrency": {
|
||||
|
||||
@@ -0,0 +1,34 @@
|
||||
import type { Chain } from "../src/types";
|
||||
export default {
|
||||
"name": "MXC Wannsee zkEVM Testnet",
|
||||
"chain": "MXC zkEVM",
|
||||
"icon": {
|
||||
"url": "ipfs://QmdGCthKA11K9kCZJdbTP5WPAyq1wiRZ3REn6KG58MrWaE",
|
||||
"width": 159,
|
||||
"height": 159,
|
||||
"format": "png"
|
||||
},
|
||||
"rpc": [
|
||||
"https://mxc-wannsee-zkevm-testnet.rpc.thirdweb.com/${THIRDWEB_API_KEY}",
|
||||
"https://wannsee-rpc.mxc.com"
|
||||
],
|
||||
"faucets": [],
|
||||
"nativeCurrency": {
|
||||
"name": "MXC Wannsee zkEVM Testnet",
|
||||
"symbol": "MXC",
|
||||
"decimals": 18
|
||||
},
|
||||
"infoURL": "https://wannsee.mxc.com/docs/intro",
|
||||
"shortName": "MXC",
|
||||
"chainId": 5167003,
|
||||
"networkId": 5167003,
|
||||
"explorers": [
|
||||
{
|
||||
"name": "MXC Wannsee zkEVM Testnet",
|
||||
"url": "https://wannsee-explorer.mxc.com",
|
||||
"standard": "EIP3091"
|
||||
}
|
||||
],
|
||||
"testnet": true,
|
||||
"slug": "mxc-wannsee-zkevm-testnet"
|
||||
} as const satisfies Chain;
|
||||
@@ -0,0 +1,36 @@
|
||||
import type { Chain } from "../src/types";
|
||||
export default {
|
||||
"name": "SatoshiChain Testnet",
|
||||
"chain": "SATS",
|
||||
"icon": {
|
||||
"url": "ipfs://QmRegpZQBW4o1imYNsW3d27MQjygBSU23Gf6JKje26nvs7",
|
||||
"width": 1251,
|
||||
"height": 1251,
|
||||
"format": "png"
|
||||
},
|
||||
"rpc": [
|
||||
"https://satoshichain-testnet.rpc.thirdweb.com/${THIRDWEB_API_KEY}",
|
||||
"https://rpc.satoshichain.io"
|
||||
],
|
||||
"faucets": [
|
||||
"https://faucet.satoshichain.io"
|
||||
],
|
||||
"nativeCurrency": {
|
||||
"name": "SatoshiChain Coin",
|
||||
"symbol": "SATS",
|
||||
"decimals": 18
|
||||
},
|
||||
"infoURL": "https://satoshichain.net",
|
||||
"shortName": "sats",
|
||||
"chainId": 5758,
|
||||
"networkId": 5758,
|
||||
"explorers": [
|
||||
{
|
||||
"name": "SatoshiChain Explorer",
|
||||
"url": "https://satoshiscan.io",
|
||||
"standard": "EIP3091"
|
||||
}
|
||||
],
|
||||
"testnet": true,
|
||||
"slug": "satoshichain-testnet"
|
||||
} as const satisfies Chain;
|
||||
@@ -1,28 +0,0 @@
|
||||
import type { Chain } from "../src/types";
|
||||
export default {
|
||||
"name": "EOS Mainnet",
|
||||
"chain": "EOS",
|
||||
"rpc": [
|
||||
"https://eos.rpc.thirdweb.com/${THIRDWEB_API_KEY}",
|
||||
"https://api.eosargentina.io"
|
||||
],
|
||||
"faucets": [],
|
||||
"nativeCurrency": {
|
||||
"name": "EOS",
|
||||
"symbol": "EOS",
|
||||
"decimals": 18
|
||||
},
|
||||
"infoURL": "https://eoscommunity.org/",
|
||||
"shortName": "EOSMainnet",
|
||||
"chainId": 59,
|
||||
"networkId": 59,
|
||||
"explorers": [
|
||||
{
|
||||
"name": "bloks",
|
||||
"url": "https://bloks.eosargentina.io",
|
||||
"standard": "EIP3091"
|
||||
}
|
||||
],
|
||||
"testnet": false,
|
||||
"slug": "eos"
|
||||
} as const satisfies Chain;
|
||||
@@ -1,17 +1,20 @@
|
||||
import type { Chain } from "../src/types";
|
||||
export default {
|
||||
"name": "Linea Testnet",
|
||||
"title": "Linea Testnet",
|
||||
"title": "Linea Goerli Testnet",
|
||||
"chain": "ETH",
|
||||
"rpc": [
|
||||
"https://linea-testnet.rpc.thirdweb.com/${THIRDWEB_API_KEY}",
|
||||
"https://rpc.goerli.linea.build"
|
||||
"https://rpc.goerli.linea.build",
|
||||
"wss://rpc.goerli.linea.build",
|
||||
"https://consensys-zkevm-goerli-prealpha.infura.io/v3/${INFURA_API_KEY}",
|
||||
"wss://consensys-zkevm-goerli-prealpha.infura.io/v3/${INFURA_API_KEY}"
|
||||
],
|
||||
"faucets": [
|
||||
"https://faucetlink.to/goerli"
|
||||
],
|
||||
"nativeCurrency": {
|
||||
"name": "Goerli Ether",
|
||||
"name": "Linea Ether",
|
||||
"symbol": "ETH",
|
||||
"decimals": 18
|
||||
},
|
||||
@@ -20,9 +23,9 @@ export default {
|
||||
"chainId": 59140,
|
||||
"networkId": 59140,
|
||||
"icon": {
|
||||
"url": "ipfs://QmP6rcphqMTeByPxomeYeR5XRPZaFpwGbZxHkGQKyao4Le",
|
||||
"width": 115,
|
||||
"height": 115,
|
||||
"url": "ipfs://QmURjritnHL7a8TwZgsFwp3f272DJmG5paaPtWDZ98QZwH",
|
||||
"width": 97,
|
||||
"height": 102,
|
||||
"format": "svg"
|
||||
},
|
||||
"parent": {
|
||||
@@ -36,13 +39,13 @@ export default {
|
||||
},
|
||||
"explorers": [
|
||||
{
|
||||
"name": "Linea Testnet Explorer",
|
||||
"name": "blockscout",
|
||||
"url": "https://explorer.goerli.linea.build",
|
||||
"standard": "EIP3091",
|
||||
"icon": {
|
||||
"url": "ipfs://QmP6rcphqMTeByPxomeYeR5XRPZaFpwGbZxHkGQKyao4Le",
|
||||
"width": 115,
|
||||
"height": 115,
|
||||
"url": "ipfs://QmURjritnHL7a8TwZgsFwp3f272DJmG5paaPtWDZ98QZwH",
|
||||
"width": 97,
|
||||
"height": 102,
|
||||
"format": "svg"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,22 @@
|
||||
import type { Chain } from "../src/types";
|
||||
export default {
|
||||
"name": "Peerpay",
|
||||
"chain": "P2P",
|
||||
"rpc": [
|
||||
"https://peerpay.rpc.thirdweb.com/${THIRDWEB_API_KEY}",
|
||||
"https://peerpay.su.gy/p2p"
|
||||
],
|
||||
"faucets": [],
|
||||
"nativeCurrency": {
|
||||
"name": "Peerpay",
|
||||
"symbol": "P2P",
|
||||
"decimals": 18
|
||||
},
|
||||
"infoURL": "https://peerpay.su.gy",
|
||||
"shortName": "Peerpay",
|
||||
"chainId": 6502,
|
||||
"networkId": 6502,
|
||||
"explorers": [],
|
||||
"testnet": false,
|
||||
"slug": "peerpay"
|
||||
} as const satisfies Chain;
|
||||
@@ -0,0 +1,48 @@
|
||||
import type { Chain } from "../src/types";
|
||||
export default {
|
||||
"name": "IRIShub",
|
||||
"chain": "IRIShub",
|
||||
"rpc": [
|
||||
"https://irishub.rpc.thirdweb.com/${THIRDWEB_API_KEY}",
|
||||
"https://evmrpc.irishub-1.irisnet.org"
|
||||
],
|
||||
"features": [
|
||||
{
|
||||
"name": "EIP155"
|
||||
},
|
||||
{
|
||||
"name": "EIP1559"
|
||||
}
|
||||
],
|
||||
"faucets": [],
|
||||
"nativeCurrency": {
|
||||
"name": "Eris",
|
||||
"symbol": "ERIS",
|
||||
"decimals": 18
|
||||
},
|
||||
"infoURL": "https://www.irisnet.org",
|
||||
"shortName": "iris",
|
||||
"chainId": 6688,
|
||||
"networkId": 6688,
|
||||
"icon": {
|
||||
"url": "ipfs://QmTKgKs7kJiWDhdjbELE4Y2HVZ36KS4bYkNCbXdsXk66sW",
|
||||
"width": 1062,
|
||||
"height": 1062,
|
||||
"format": "png"
|
||||
},
|
||||
"explorers": [
|
||||
{
|
||||
"name": "IRISHub Cosmos Explorer (IOBScan)",
|
||||
"url": "https://irishub.iobscan.io",
|
||||
"standard": "none",
|
||||
"icon": {
|
||||
"url": "ipfs://QmTKgKs7kJiWDhdjbELE4Y2HVZ36KS4bYkNCbXdsXk66sW",
|
||||
"width": 1062,
|
||||
"height": 1062,
|
||||
"format": "png"
|
||||
}
|
||||
}
|
||||
],
|
||||
"testnet": false,
|
||||
"slug": "irishub"
|
||||
} as const satisfies Chain;
|
||||
@@ -0,0 +1,21 @@
|
||||
import type { Chain } from "../src/types";
|
||||
export default {
|
||||
"name": "Cosmic Chain",
|
||||
"chain": "COSMIC",
|
||||
"rpc": [
|
||||
"https://cosmic-chain.rpc.thirdweb.com/${THIRDWEB_API_KEY}",
|
||||
"http://testnet.cosmicchain.site:3344"
|
||||
],
|
||||
"faucets": [],
|
||||
"nativeCurrency": {
|
||||
"name": "Cosmic Chain",
|
||||
"symbol": "COSMIC",
|
||||
"decimals": 18
|
||||
},
|
||||
"infoURL": "https://cosmicchain.site",
|
||||
"shortName": "Cosmic",
|
||||
"chainId": 67588,
|
||||
"networkId": 3344,
|
||||
"testnet": true,
|
||||
"slug": "cosmic-chain"
|
||||
} as const satisfies Chain;
|
||||
@@ -0,0 +1,34 @@
|
||||
import type { Chain } from "../src/types";
|
||||
export default {
|
||||
"name": "Adil Chain V2 Mainnet",
|
||||
"chain": "ADIL",
|
||||
"icon": {
|
||||
"url": "ipfs://QmeHNYUx6n8CjUFSLWNT17oAtDYrUq6r8buyvGCUBXCJw6",
|
||||
"width": 500,
|
||||
"height": 500,
|
||||
"format": "png"
|
||||
},
|
||||
"rpc": [
|
||||
"https://adil-chain-v2.rpc.thirdweb.com/${THIRDWEB_API_KEY}",
|
||||
"https://adilchain-rpc.io"
|
||||
],
|
||||
"faucets": [],
|
||||
"nativeCurrency": {
|
||||
"name": "ADIL",
|
||||
"symbol": "ADIL",
|
||||
"decimals": 18
|
||||
},
|
||||
"infoURL": "https://adilchain.io",
|
||||
"shortName": "adil",
|
||||
"chainId": 7576,
|
||||
"networkId": 7576,
|
||||
"explorers": [
|
||||
{
|
||||
"name": "ADIL Mainnet Explorer",
|
||||
"url": "https://adilchain-scan.io",
|
||||
"standard": "EIP3091"
|
||||
}
|
||||
],
|
||||
"testnet": false,
|
||||
"slug": "adil-chain-v2"
|
||||
} as const satisfies Chain;
|
||||
@@ -21,7 +21,7 @@ export default {
|
||||
{
|
||||
"name": "rootnet",
|
||||
"url": "https://explorer.rootnet.live",
|
||||
"standard": "none"
|
||||
"standard": "EIP3091"
|
||||
}
|
||||
],
|
||||
"testnet": false,
|
||||
|
||||
@@ -21,7 +21,7 @@ export default {
|
||||
{
|
||||
"name": "rootnet",
|
||||
"url": "https://explorer.rootnet.cloud",
|
||||
"standard": "none"
|
||||
"standard": "EIP3091"
|
||||
}
|
||||
],
|
||||
"testnet": true,
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import type { Chain } from "../src/types";
|
||||
export default {
|
||||
"name": "Qitmeer Network Mixnext",
|
||||
"name": "Qitmeer Network Mixnet",
|
||||
"chain": "MEER",
|
||||
"rpc": [],
|
||||
"faucets": [],
|
||||
@@ -21,5 +21,5 @@ export default {
|
||||
"networkId": 8132,
|
||||
"status": "incubating",
|
||||
"testnet": false,
|
||||
"slug": "qitmeer-network-mixnext"
|
||||
"slug": "qitmeer-network-mixnet"
|
||||
} as const satisfies Chain;
|
||||
@@ -6,7 +6,7 @@ export default {
|
||||
"faucets": [],
|
||||
"nativeCurrency": {
|
||||
"name": "Amana Testnet",
|
||||
"symbol": "MEER-t",
|
||||
"symbol": "MEER-T",
|
||||
"decimals": 18
|
||||
},
|
||||
"infoURL": "https://github.com/Qitmeer",
|
||||
|
||||
@@ -6,7 +6,7 @@ export default {
|
||||
"faucets": [],
|
||||
"nativeCurrency": {
|
||||
"name": "Amana Mixnet",
|
||||
"symbol": "MEER-m",
|
||||
"symbol": "MEER-M",
|
||||
"decimals": 18
|
||||
},
|
||||
"infoURL": "https://github.com/Qitmeer",
|
||||
|
||||
@@ -6,7 +6,7 @@ export default {
|
||||
"faucets": [],
|
||||
"nativeCurrency": {
|
||||
"name": "Amana Privnet",
|
||||
"symbol": "MEER-p",
|
||||
"symbol": "MEER-P",
|
||||
"decimals": 18
|
||||
},
|
||||
"infoURL": "https://github.com/Qitmeer",
|
||||
|
||||
@@ -6,7 +6,7 @@ export default {
|
||||
"faucets": [],
|
||||
"nativeCurrency": {
|
||||
"name": "Flana Testnet",
|
||||
"symbol": "MEER-t",
|
||||
"symbol": "MEER-T",
|
||||
"decimals": 18
|
||||
},
|
||||
"infoURL": "https://github.com/Qitmeer",
|
||||
|
||||
@@ -6,7 +6,7 @@ export default {
|
||||
"faucets": [],
|
||||
"nativeCurrency": {
|
||||
"name": "Flana Mixnet",
|
||||
"symbol": "MEER-m",
|
||||
"symbol": "MEER-M",
|
||||
"decimals": 18
|
||||
},
|
||||
"infoURL": "https://github.com/Qitmeer",
|
||||
|
||||
@@ -6,7 +6,7 @@ export default {
|
||||
"faucets": [],
|
||||
"nativeCurrency": {
|
||||
"name": "Flana Privnet",
|
||||
"symbol": "MEER-p",
|
||||
"symbol": "MEER-P",
|
||||
"decimals": 18
|
||||
},
|
||||
"infoURL": "https://github.com/Qitmeer",
|
||||
|
||||
@@ -6,7 +6,7 @@ export default {
|
||||
"faucets": [],
|
||||
"nativeCurrency": {
|
||||
"name": "Mizana Testnet",
|
||||
"symbol": "MEER-t",
|
||||
"symbol": "MEER-T",
|
||||
"decimals": 18
|
||||
},
|
||||
"infoURL": "https://github.com/Qitmeer",
|
||||
|
||||
@@ -6,7 +6,7 @@ export default {
|
||||
"faucets": [],
|
||||
"nativeCurrency": {
|
||||
"name": "Mizana Mixnet",
|
||||
"symbol": "MEER-m",
|
||||
"symbol": "MEER-M",
|
||||
"decimals": 18
|
||||
},
|
||||
"infoURL": "https://github.com/Qitmeer",
|
||||
|
||||
@@ -6,7 +6,7 @@ export default {
|
||||
"faucets": [],
|
||||
"nativeCurrency": {
|
||||
"name": "Mizana Privnet",
|
||||
"symbol": "MEER-p",
|
||||
"symbol": "MEER-P",
|
||||
"decimals": 18
|
||||
},
|
||||
"infoURL": "https://github.com/Qitmeer",
|
||||
|
||||
@@ -0,0 +1,28 @@
|
||||
import type { Chain } from "../src/types";
|
||||
export default {
|
||||
"name": "Linqto Devnet",
|
||||
"chain": "LNQ",
|
||||
"rpc": [
|
||||
"https://linqto-devnet.rpc.thirdweb.com/${THIRDWEB_API_KEY}",
|
||||
"https://linqto-dev.com"
|
||||
],
|
||||
"faucets": [],
|
||||
"nativeCurrency": {
|
||||
"name": "XRP",
|
||||
"symbol": "XRP",
|
||||
"decimals": 18
|
||||
},
|
||||
"infoURL": "https://linqto.com",
|
||||
"shortName": "linqto-devnet",
|
||||
"chainId": 84,
|
||||
"networkId": 84,
|
||||
"explorers": [
|
||||
{
|
||||
"name": "Linqto Devnet Explorer",
|
||||
"url": "https://explorer.linqto-dev.com",
|
||||
"standard": "EIP3091"
|
||||
}
|
||||
],
|
||||
"testnet": false,
|
||||
"slug": "linqto-devnet"
|
||||
} as const satisfies Chain;
|
||||
@@ -1,24 +0,0 @@
|
||||
import type { Chain } from "../src/types";
|
||||
export default {
|
||||
"name": "PulseChain Testnet",
|
||||
"shortName": "tpls",
|
||||
"chain": "tPLS",
|
||||
"chainId": 940,
|
||||
"networkId": 940,
|
||||
"infoURL": "https://pulsechain.com/",
|
||||
"rpc": [
|
||||
"https://pulsechain-testnet.rpc.thirdweb.com/${THIRDWEB_API_KEY}",
|
||||
"https://rpc.v2.testnet.pulsechain.com/",
|
||||
"wss://rpc.v2.testnet.pulsechain.com/"
|
||||
],
|
||||
"faucets": [
|
||||
"https://faucet.v2.testnet.pulsechain.com/"
|
||||
],
|
||||
"nativeCurrency": {
|
||||
"name": "Test Pulse",
|
||||
"symbol": "tPLS",
|
||||
"decimals": 18
|
||||
},
|
||||
"testnet": true,
|
||||
"slug": "pulsechain-testnet"
|
||||
} as const satisfies Chain;
|
||||
@@ -1,24 +0,0 @@
|
||||
import type { Chain } from "../src/types";
|
||||
export default {
|
||||
"name": "PulseChain Testnet v2b",
|
||||
"shortName": "t2bpls",
|
||||
"chain": "t2bPLS",
|
||||
"chainId": 941,
|
||||
"networkId": 941,
|
||||
"infoURL": "https://pulsechain.com/",
|
||||
"rpc": [
|
||||
"https://pulsechain-testnet-v2b.rpc.thirdweb.com/${THIRDWEB_API_KEY}",
|
||||
"https://rpc.v2b.testnet.pulsechain.com/",
|
||||
"wss://rpc.v2b.testnet.pulsechain.com/"
|
||||
],
|
||||
"faucets": [
|
||||
"https://faucet.v2b.testnet.pulsechain.com/"
|
||||
],
|
||||
"nativeCurrency": {
|
||||
"name": "Test Pulse",
|
||||
"symbol": "tPLS",
|
||||
"decimals": 18
|
||||
},
|
||||
"testnet": true,
|
||||
"slug": "pulsechain-testnet-v2b"
|
||||
} as const satisfies Chain;
|
||||
@@ -0,0 +1,43 @@
|
||||
import type { Chain } from "../src/types";
|
||||
export default {
|
||||
"name": "PulseChain Testnet v4",
|
||||
"shortName": "t4pls",
|
||||
"chain": "t4PLS",
|
||||
"chainId": 943,
|
||||
"networkId": 943,
|
||||
"icon": {
|
||||
"url": "ipfs://Qmckj9B9F3jWDk9bv9HwoPmfjrx2Ju8J2BQSNoPFdYGduj",
|
||||
"width": 433,
|
||||
"height": 402,
|
||||
"format": "png"
|
||||
},
|
||||
"infoURL": "https://pulsechain.com",
|
||||
"rpc": [
|
||||
"https://pulsechain-testnet-v4.rpc.thirdweb.com/${THIRDWEB_API_KEY}",
|
||||
"https://rpc.v4.testnet.pulsechain.com/",
|
||||
"wss://rpc.v4.testnet.pulsechain.com/"
|
||||
],
|
||||
"features": [
|
||||
{
|
||||
"name": "EIP155"
|
||||
},
|
||||
{
|
||||
"name": "EIP1559"
|
||||
}
|
||||
],
|
||||
"faucets": [
|
||||
"https://faucet.v4.testnet.pulsechain.com/"
|
||||
],
|
||||
"ens": {
|
||||
"registry": "0x00000000000C2E074eC69A0dFb2997BA6C7d2e1e"
|
||||
},
|
||||
"status": "incubating",
|
||||
"explorers": [],
|
||||
"nativeCurrency": {
|
||||
"name": "Test Pulse",
|
||||
"symbol": "tPLS",
|
||||
"decimals": 18
|
||||
},
|
||||
"testnet": true,
|
||||
"slug": "pulsechain-testnet-v4"
|
||||
} as const satisfies Chain;
|
||||
@@ -1,28 +0,0 @@
|
||||
import type { Chain } from "../src/types";
|
||||
export default {
|
||||
"name": "CryptoKylin Testnet",
|
||||
"chain": "EOS",
|
||||
"rpc": [
|
||||
"https://cryptokylin-testnet.rpc.thirdweb.com/${THIRDWEB_API_KEY}",
|
||||
"https://kylin.eosargentina.io"
|
||||
],
|
||||
"faucets": [],
|
||||
"nativeCurrency": {
|
||||
"name": "EOS",
|
||||
"symbol": "EOS",
|
||||
"decimals": 18
|
||||
},
|
||||
"infoURL": "https://www.cryptokylin.io/",
|
||||
"shortName": "KylinTestnet",
|
||||
"chainId": 95,
|
||||
"networkId": 95,
|
||||
"explorers": [
|
||||
{
|
||||
"name": "eosq",
|
||||
"url": "https://kylin.eosargentina.io",
|
||||
"standard": "EIP3091"
|
||||
}
|
||||
],
|
||||
"testnet": true,
|
||||
"slug": "cryptokylin-testnet"
|
||||
} as const satisfies Chain;
|
||||
@@ -0,0 +1,42 @@
|
||||
import type { Chain } from "../src/types";
|
||||
export default {
|
||||
"name": "Neonlink Testnet",
|
||||
"chain": "Neonlink",
|
||||
"rpc": [
|
||||
"https://neonlink-testnet.rpc.thirdweb.com/${THIRDWEB_API_KEY}",
|
||||
"https://testnet.neonlink.io"
|
||||
],
|
||||
"faucets": [
|
||||
"https://faucet.neonlink.io/"
|
||||
],
|
||||
"nativeCurrency": {
|
||||
"name": "Neonlink Native Token",
|
||||
"symbol": "tNEON",
|
||||
"decimals": 18
|
||||
},
|
||||
"infoURL": "https://neonlink.io",
|
||||
"shortName": "testneon",
|
||||
"chainId": 9559,
|
||||
"networkId": 9559,
|
||||
"icon": {
|
||||
"url": "ipfs://QmX3hBv8WyvVfYjh1gmgDfJCpJBvKk4TYG9wFX9sC8WAjz",
|
||||
"width": 512,
|
||||
"height": 512,
|
||||
"format": "svg"
|
||||
},
|
||||
"explorers": [
|
||||
{
|
||||
"name": "Neon Blockchain Explorer",
|
||||
"url": "https://testnet-scan.neonlink.io",
|
||||
"standard": "EIP3091",
|
||||
"icon": {
|
||||
"url": "ipfs://QmX3hBv8WyvVfYjh1gmgDfJCpJBvKk4TYG9wFX9sC8WAjz",
|
||||
"width": 512,
|
||||
"height": 512,
|
||||
"format": "svg"
|
||||
}
|
||||
}
|
||||
],
|
||||
"testnet": true,
|
||||
"slug": "neonlink-testnet"
|
||||
} as const satisfies Chain;
|
||||
@@ -0,0 +1,28 @@
|
||||
import type { Chain } from "../src/types";
|
||||
export default {
|
||||
"name": "Carbon EVM",
|
||||
"chain": "Carbon",
|
||||
"icon": {
|
||||
"url": "ipfs://QmQUHqi1gyuTuKmJQHqt9EyhN1FPmmmLNUK8u93nMGrxAy",
|
||||
"width": 1600,
|
||||
"height": 1600,
|
||||
"format": "png"
|
||||
},
|
||||
"rpc": [
|
||||
"https://carbon-evm.rpc.thirdweb.com/${THIRDWEB_API_KEY}",
|
||||
"https://evm-api.carbon.network/"
|
||||
],
|
||||
"faucets": [],
|
||||
"nativeCurrency": {
|
||||
"name": "swth",
|
||||
"symbol": "SWTH",
|
||||
"decimals": 18
|
||||
},
|
||||
"infoURL": "https://carbon.network/",
|
||||
"shortName": "carbon",
|
||||
"chainId": 9790,
|
||||
"networkId": 9790,
|
||||
"explorers": [],
|
||||
"testnet": false,
|
||||
"slug": "carbon-evm"
|
||||
} as const satisfies Chain;
|
||||
@@ -0,0 +1,28 @@
|
||||
import type { Chain } from "../src/types";
|
||||
export default {
|
||||
"name": "Carbon EVM Testnet",
|
||||
"chain": "Carbon",
|
||||
"icon": {
|
||||
"url": "ipfs://QmQUHqi1gyuTuKmJQHqt9EyhN1FPmmmLNUK8u93nMGrxAy",
|
||||
"width": 1600,
|
||||
"height": 1600,
|
||||
"format": "png"
|
||||
},
|
||||
"rpc": [
|
||||
"https://carbon-evm-testnet.rpc.thirdweb.com/${THIRDWEB_API_KEY}",
|
||||
"https://test-evm-api.carbon.network/"
|
||||
],
|
||||
"faucets": [],
|
||||
"nativeCurrency": {
|
||||
"name": "swth",
|
||||
"symbol": "SWTH",
|
||||
"decimals": 18
|
||||
},
|
||||
"infoURL": "https://carbon.network/",
|
||||
"shortName": "carbon-testnet",
|
||||
"chainId": 9792,
|
||||
"networkId": 9792,
|
||||
"explorers": [],
|
||||
"testnet": true,
|
||||
"slug": "carbon-evm-testnet"
|
||||
} as const satisfies Chain;
|
||||
@@ -0,0 +1,40 @@
|
||||
import type { Chain } from "../src/types";
|
||||
export default {
|
||||
"name": "Six Protocol",
|
||||
"chain": "SIXNET",
|
||||
"icon": {
|
||||
"url": "ipfs://QmP93z696v8Hetu13peY2oEHDXq8Bj5CqaDRwpVkpnM15A",
|
||||
"width": 512,
|
||||
"height": 512,
|
||||
"format": "png"
|
||||
},
|
||||
"rpc": [
|
||||
"https://six-protocol.rpc.thirdweb.com/${THIRDWEB_API_KEY}",
|
||||
"https://sixnet-rpc-evm.sixprotocol.net"
|
||||
],
|
||||
"faucets": [],
|
||||
"nativeCurrency": {
|
||||
"name": "SIX evm token",
|
||||
"symbol": "SIX",
|
||||
"decimals": 18
|
||||
},
|
||||
"infoURL": "https://six.network/",
|
||||
"shortName": "six",
|
||||
"chainId": 98,
|
||||
"networkId": 98,
|
||||
"explorers": [
|
||||
{
|
||||
"name": "SIX Scan",
|
||||
"url": "https://sixscan.io/sixnet",
|
||||
"standard": "none",
|
||||
"icon": {
|
||||
"url": "ipfs://QmP93z696v8Hetu13peY2oEHDXq8Bj5CqaDRwpVkpnM15A",
|
||||
"width": 512,
|
||||
"height": 512,
|
||||
"format": "png"
|
||||
}
|
||||
}
|
||||
],
|
||||
"testnet": false,
|
||||
"slug": "six-protocol"
|
||||
} as const satisfies Chain;
|
||||
@@ -0,0 +1,42 @@
|
||||
import type { Chain } from "../src/types";
|
||||
export default {
|
||||
"name": "5ireChain Thunder",
|
||||
"chain": "5ireChain",
|
||||
"rpc": [
|
||||
"https://5irechain-thunder.rpc.thirdweb.com/${THIRDWEB_API_KEY}",
|
||||
"https://rpc-testnet.5ire.network"
|
||||
],
|
||||
"faucets": [
|
||||
"https://explorer.5ire.network/faucet"
|
||||
],
|
||||
"nativeCurrency": {
|
||||
"name": "5ire Token",
|
||||
"symbol": "5ire",
|
||||
"decimals": 18
|
||||
},
|
||||
"infoURL": "https://5ire.org",
|
||||
"shortName": "5ire",
|
||||
"chainId": 997,
|
||||
"networkId": 997,
|
||||
"icon": {
|
||||
"url": "ipfs://QmaZDNDFLWESH4i3XqwEWfWBb1HPnQSNbDAr74nr2x8QAk",
|
||||
"width": 800,
|
||||
"height": 800,
|
||||
"format": "svg"
|
||||
},
|
||||
"explorers": [
|
||||
{
|
||||
"name": "5ireChain Explorer",
|
||||
"url": "https://explorer.5ire.network",
|
||||
"standard": "none",
|
||||
"icon": {
|
||||
"url": "ipfs://QmaZDNDFLWESH4i3XqwEWfWBb1HPnQSNbDAr74nr2x8QAk",
|
||||
"width": 800,
|
||||
"height": 800,
|
||||
"format": "svg"
|
||||
}
|
||||
}
|
||||
],
|
||||
"testnet": true,
|
||||
"slug": "5irechain-thunder"
|
||||
} as const satisfies Chain;
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@thirdweb-dev/chains",
|
||||
"version": "0.1.11",
|
||||
"version": "0.1.13",
|
||||
"main": "dist/thirdweb-dev-chains.cjs.js",
|
||||
"module": "dist/thirdweb-dev-chains.esm.js",
|
||||
"browser": {
|
||||
|
||||
+2658
-1674
File diff suppressed because one or more lines are too long
@@ -1,5 +1,33 @@
|
||||
# thirdweb
|
||||
|
||||
## 0.10.13
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- Updated dependencies [[`d2c7f6d7`](https://github.com/thirdweb-dev/js/commit/d2c7f6d758787fab102ecc0cec16ac74f3c87a1f), [`f12a80a4`](https://github.com/thirdweb-dev/js/commit/f12a80a4758aa91c43084acedb212de9f36a7371), [`bf6df267`](https://github.com/thirdweb-dev/js/commit/bf6df2671131d7ed38650e2bed806081b32dc244), [`8f962bc1`](https://github.com/thirdweb-dev/js/commit/8f962bc15c35da52ed5bc4025bb4cd18b69079e3), [`28b5d1eb`](https://github.com/thirdweb-dev/js/commit/28b5d1eb6d0142d3ebefb8bd078c30949f77fe61), [`0bf29745`](https://github.com/thirdweb-dev/js/commit/0bf29745b0e842763c271ad8773312f0836ea00f), [`f0279c22`](https://github.com/thirdweb-dev/js/commit/f0279c228829b86ff1f828219bcef4fe16901f67), [`1e9fad77`](https://github.com/thirdweb-dev/js/commit/1e9fad779f3ebe535d32c0ce76905a3a8033f2fa), [`00d0d01e`](https://github.com/thirdweb-dev/js/commit/00d0d01e619ff5c60b9f31386f51a55b5e466efa), [`fc96e147`](https://github.com/thirdweb-dev/js/commit/fc96e14750175b19cb66fa7d50cdbad65b42153a)]:
|
||||
- @thirdweb-dev/chains@0.1.13
|
||||
- @thirdweb-dev/sdk@3.10.12
|
||||
- @thirdweb-dev/storage@1.1.2
|
||||
|
||||
## 0.10.12
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- [#894](https://github.com/thirdweb-dev/js/pull/894) [`72db2dc3`](https://github.com/thirdweb-dev/js/commit/72db2dc3e1c63e82ba4d73b6bd5ad4b2f8bbd559) Thanks [@adam-maj](https://github.com/adam-maj)! - Add more clear error messages to thirdweb generate
|
||||
|
||||
- Updated dependencies [[`abe88599`](https://github.com/thirdweb-dev/js/commit/abe88599b634699aa3b876fe344bfddc6c1a92d4), [`4acb2b55`](https://github.com/thirdweb-dev/js/commit/4acb2b5561118dde5c7372400d4d754b879aef2e), [`ea04edf4`](https://github.com/thirdweb-dev/js/commit/ea04edf47867617ff74f0aca1471a40b8d9c9f7c), [`77224646`](https://github.com/thirdweb-dev/js/commit/77224646d542db3171394d744b455497cd057633), [`c9ee9b32`](https://github.com/thirdweb-dev/js/commit/c9ee9b32f0a275f7c03d50243f23a7332f148ae5), [`00f4355f`](https://github.com/thirdweb-dev/js/commit/00f4355f1aa8843bb534b173e4d8e0a19dd18b47), [`a6610f12`](https://github.com/thirdweb-dev/js/commit/a6610f1211e9359885b948bf69a66d834707ec07), [`29146e00`](https://github.com/thirdweb-dev/js/commit/29146e009db655304f5753904ae7f8569c12f4ca), [`77224646`](https://github.com/thirdweb-dev/js/commit/77224646d542db3171394d744b455497cd057633), [`bfdd8493`](https://github.com/thirdweb-dev/js/commit/bfdd84939d7cf9c6635b83c971bcc8967b52538c)]:
|
||||
- @thirdweb-dev/sdk@3.10.11
|
||||
- @thirdweb-dev/chains@0.1.12
|
||||
|
||||
## 0.10.11
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- [#877](https://github.com/thirdweb-dev/js/pull/877) [`cef16471`](https://github.com/thirdweb-dev/js/commit/cef16471f4493d7c2c1897a81ffebf84a743716e) Thanks [@iketw](https://github.com/iketw)! - [CLI] Update min ruby version supported to 2.7.6 for React Native templates
|
||||
|
||||
- Updated dependencies [[`ac8fa0b3`](https://github.com/thirdweb-dev/js/commit/ac8fa0b34545a2bc0b489a0551d476a9f560e851), [`b75bcef5`](https://github.com/thirdweb-dev/js/commit/b75bcef55bfdedc260b5b62bb4aff10a7d5c47b6), [`c9027fce`](https://github.com/thirdweb-dev/js/commit/c9027fced0fffbf757bf0080bc4a49f5464df647)]:
|
||||
- @thirdweb-dev/sdk@3.10.10
|
||||
|
||||
## 0.10.10
|
||||
|
||||
### Patch Changes
|
||||
|
||||
@@ -63,7 +63,7 @@ Deploying published contracts give deployers access to automatic SDKs to integra
|
||||
npx thirdweb@latest detect
|
||||
```
|
||||
|
||||
As you're developing your contracts, you may want to implement [Extensions](https://portal.thirdweb.com/contractkit) to unlock functionality on the SDKs (ie. nft minting with automatic upload to IPFS) and the dashboard (ie. generated UI to manage permissions). This command will show what extensions were detected on your contract, unlocking the corresponding functionality on the SDKs and dashboard.
|
||||
As you're developing your contracts, you may want to implement [Extensions](https://portal.thirdweb.com/solidity/extensions) to unlock functionality on the SDKs (ie. nft minting with automatic upload to IPFS) and the dashboard (ie. generated UI to manage permissions). This command will show what extensions were detected on your contract, unlocking the corresponding functionality on the SDKs and dashboard.
|
||||
|
||||
---
|
||||
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
{
|
||||
"name": "thirdweb",
|
||||
"main": "dist/cli/index.js",
|
||||
"version": "0.10.10",
|
||||
"version": "0.10.13",
|
||||
"repository": "https://github.com/thirdweb-dev/js/tree/main/packages/cli",
|
||||
"author": "thirdweb eng <[email protected]>",
|
||||
"license": "Apache-2.0",
|
||||
|
||||
@@ -412,10 +412,6 @@ const main = async () => {
|
||||
"Preload ABIs and generate types for your smart contract to strongly type the thirdweb SDK",
|
||||
)
|
||||
.option("-p, --path <project-path>", "path to project", ".")
|
||||
.option(
|
||||
"-d, --deployer <deployer-address>",
|
||||
"address of the contract deployer",
|
||||
)
|
||||
.action(async (options) => {
|
||||
await generate(options);
|
||||
});
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
import { runCommand } from "./run-command";
|
||||
import chalk from "chalk";
|
||||
|
||||
export const SUPPORTED_RUBY_VERSION = "2.7.5";
|
||||
export const SUPPORTED_RUBY_VERSION = "2.7.6";
|
||||
|
||||
/**
|
||||
* Checks if the current ruby version is supported by the project.
|
||||
|
||||
@@ -1,51 +0,0 @@
|
||||
/* eslint-disable import/no-extraneous-dependencies */
|
||||
import { runCommand } from "./run-command";
|
||||
import fs from "fs";
|
||||
import path from "path";
|
||||
|
||||
/**
|
||||
* Checks if the current ruby version is supported by the project.
|
||||
*
|
||||
* @returns A Promise that resolves once the ruby version is checked. True if it changed, false otherwise.
|
||||
*/
|
||||
export function setRubyVersion(root: string): Promise<boolean> {
|
||||
/**
|
||||
* Return a Promise that resolves once the installation is finished.
|
||||
*/
|
||||
return new Promise(async (resolve, reject) => {
|
||||
try {
|
||||
await runCommand("ruby", ["-v"], false, (dataBfr) => {
|
||||
const data = String(dataBfr);
|
||||
const systemVersion = data.split(" ")[1];
|
||||
|
||||
let rubyVersionFile = path.join(root, ".ruby-version");
|
||||
let rubyProjectVersionString = "";
|
||||
|
||||
try {
|
||||
rubyProjectVersionString = String(fs.readFileSync(rubyVersionFile));
|
||||
} catch (error) {
|
||||
rubyVersionFile = path.join(root, "_ruby-version");
|
||||
rubyProjectVersionString = String(fs.readFileSync(rubyVersionFile));
|
||||
}
|
||||
|
||||
try {
|
||||
if (systemVersion.includes(rubyProjectVersionString)) {
|
||||
// same version, no need to update
|
||||
resolve(false);
|
||||
} else {
|
||||
const systemVersionWithoutPatch = systemVersion.split("p")[0];
|
||||
fs.writeFileSync(rubyVersionFile, systemVersionWithoutPatch);
|
||||
resolve(true);
|
||||
}
|
||||
} catch (e) {
|
||||
console.log(
|
||||
"Failed to update ruby version. Please, set your ruby version to a minimum of 2.6 and try again.",
|
||||
);
|
||||
console.log();
|
||||
}
|
||||
});
|
||||
} catch (error) {
|
||||
reject(error);
|
||||
}
|
||||
});
|
||||
}
|
||||
@@ -5,7 +5,7 @@ import {
|
||||
getChainProvider,
|
||||
} from "@thirdweb-dev/sdk";
|
||||
import { ThirdwebStorage } from "@thirdweb-dev/storage";
|
||||
import { spinner, info } from "../core/helpers/logger";
|
||||
import { info } from "../core/helpers/logger";
|
||||
import { allChains } from "@thirdweb-dev/chains";
|
||||
import fs from "fs";
|
||||
import prompts from "prompts";
|
||||
@@ -95,9 +95,7 @@ export async function generate(options: GenerateOptions) {
|
||||
}
|
||||
|
||||
// Attempt to download the ABI for each contract
|
||||
const abiSpinner = spinner(
|
||||
`Downloading ABIs for contracts configured in 'thirdweb.json'`,
|
||||
);
|
||||
ora(`Downloading ABIs for contracts configured in 'thirdweb.json'`).info();
|
||||
const storage = new ThirdwebStorage();
|
||||
const metadata: {
|
||||
address: string;
|
||||
@@ -115,6 +113,9 @@ export async function generate(options: GenerateOptions) {
|
||||
);
|
||||
} catch {
|
||||
// If metadata for a contract fails, just go onto the next one
|
||||
ora(
|
||||
`Unable to download ABI for contract ${contract.address}, skipping.`,
|
||||
).warn();
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -128,9 +129,10 @@ export async function generate(options: GenerateOptions) {
|
||||
// Store the ABIs in the the SDKs ABI cache files
|
||||
const packagePath = `${projectPath}/node_modules/@thirdweb-dev/generated-abis/dist`;
|
||||
if (!fs.existsSync(packagePath)) {
|
||||
throw new Error(
|
||||
`Unable to cache ABIs. Please ensure that you're using the latest @thirdweb-dev/sdk package`,
|
||||
);
|
||||
ora(
|
||||
`Unable to cache ABIs. Please ensure that you have the latest @thirdweb-dev/sdk package installed.`,
|
||||
).fail();
|
||||
process.exit(1);
|
||||
}
|
||||
|
||||
const filePaths = [
|
||||
@@ -176,11 +178,11 @@ export async function generate(options: GenerateOptions) {
|
||||
fs.writeFileSync(typeFilePath, updatedFile);
|
||||
}
|
||||
|
||||
abiSpinner.succeed(
|
||||
`Downloaded and cached ABIs for ${contracts.length} smart contract${
|
||||
contracts.length === 1 ? "" : "s"
|
||||
ora(
|
||||
`Downloaded and cached ABIs for ${metadata.length} smart contract${
|
||||
metadata.length === 1 ? "" : "s"
|
||||
}`,
|
||||
);
|
||||
).succeed();
|
||||
|
||||
// Add generate command to postinstall
|
||||
const packageJsonPath = `${projectPath}/package.json`;
|
||||
|
||||
@@ -1,5 +1,17 @@
|
||||
# @thirdweb-dev/contracts-js
|
||||
|
||||
## 1.3.4
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- [#959](https://github.com/thirdweb-dev/js/pull/959) [`00d0d01e`](https://github.com/thirdweb-dev/js/commit/00d0d01e619ff5c60b9f31386f51a55b5e466efa) Thanks [@joaquim-verges](https://github.com/joaquim-verges)! - Update contracts package to 3.4.6
|
||||
|
||||
## 1.3.3
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- [#756](https://github.com/thirdweb-dev/js/pull/756) [`b75bcef5`](https://github.com/thirdweb-dev/js/commit/b75bcef55bfdedc260b5b62bb4aff10a7d5c47b6) Thanks [@kumaryash90](https://github.com/kumaryash90)! - Any EVM deploy flow with Create2 factory
|
||||
|
||||
## 1.3.2
|
||||
|
||||
### Patch Changes
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@thirdweb-dev/contracts-js",
|
||||
"version": "1.3.2",
|
||||
"version": "1.3.4",
|
||||
"main": "dist/thirdweb-dev-contracts-js.cjs.js",
|
||||
"module": "dist/thirdweb-dev-contracts-js.esm.js",
|
||||
"browser": {
|
||||
@@ -10,7 +10,7 @@
|
||||
"license": "Apache-2.0",
|
||||
"repository": "https://github.com/thirdweb-dev/js/tree/main/packages/contracts-js",
|
||||
"dependencies": {
|
||||
"@thirdweb-dev/contracts": "3.4.4"
|
||||
"@thirdweb-dev/contracts": "3.4.7-0"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@babel/preset-env": "^7.18.10",
|
||||
|
||||
@@ -25,5 +25,8 @@
|
||||
"sideEffects": false,
|
||||
"files": [
|
||||
"dist/"
|
||||
]
|
||||
],
|
||||
"scripts": {
|
||||
"push": "yalc push"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,5 +1,88 @@
|
||||
# @thirdweb-dev/react-core
|
||||
|
||||
## 3.11.9
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- [#937](https://github.com/thirdweb-dev/js/pull/937) [`7012513b`](https://github.com/thirdweb-dev/js/commit/7012513bc20f283b2cde46c0b938af33fe3a1a20) Thanks [@iketw](https://github.com/iketw)! - [ReactNative] Adding Smart Wallet to React Native as an option in the ConnectWallet button
|
||||
|
||||
- [#941](https://github.com/thirdweb-dev/js/pull/941) [`5d67b280`](https://github.com/thirdweb-dev/js/commit/5d67b2807f2504add4c202d2eb18897415662fb6) Thanks [@MananTank](https://github.com/MananTank)! - Add Magic Link
|
||||
|
||||
- [#787](https://github.com/thirdweb-dev/js/pull/787) [`d2c7f6d7`](https://github.com/thirdweb-dev/js/commit/d2c7f6d758787fab102ecc0cec16ac74f3c87a1f) Thanks [@iketw](https://github.com/iketw)! - [ReactNative] Adds Device Wallet
|
||||
|
||||
- [#955](https://github.com/thirdweb-dev/js/pull/955) [`c7c2530c`](https://github.com/thirdweb-dev/js/commit/c7c2530c7f2ef412f1e40428391e85decf504392) Thanks [@MananTank](https://github.com/MananTank)! - Local wallet UI refactor and other fixes
|
||||
|
||||
- [#927](https://github.com/thirdweb-dev/js/pull/927) [`1e9fad77`](https://github.com/thirdweb-dev/js/commit/1e9fad779f3ebe535d32c0ce76905a3a8033f2fa) Thanks [@MananTank](https://github.com/MananTank)! - safe, deviceWallet and smartWallet autoconnect
|
||||
|
||||
- Updated dependencies [[`7012513b`](https://github.com/thirdweb-dev/js/commit/7012513bc20f283b2cde46c0b938af33fe3a1a20), [`5d67b280`](https://github.com/thirdweb-dev/js/commit/5d67b2807f2504add4c202d2eb18897415662fb6), [`f12a80a4`](https://github.com/thirdweb-dev/js/commit/f12a80a4758aa91c43084acedb212de9f36a7371), [`5a67d5d8`](https://github.com/thirdweb-dev/js/commit/5a67d5d89474eac9a638ffaddba139b62965deff), [`d2c7f6d7`](https://github.com/thirdweb-dev/js/commit/d2c7f6d758787fab102ecc0cec16ac74f3c87a1f), [`c7c2530c`](https://github.com/thirdweb-dev/js/commit/c7c2530c7f2ef412f1e40428391e85decf504392), [`f12a80a4`](https://github.com/thirdweb-dev/js/commit/f12a80a4758aa91c43084acedb212de9f36a7371), [`bf6df267`](https://github.com/thirdweb-dev/js/commit/bf6df2671131d7ed38650e2bed806081b32dc244), [`e22e4a47`](https://github.com/thirdweb-dev/js/commit/e22e4a47d73e1bbc6e3f0ae7ed56717b44e5ffcd), [`1e4ac672`](https://github.com/thirdweb-dev/js/commit/1e4ac672720c2fb01046bec195877a074ffbda06), [`fc96e147`](https://github.com/thirdweb-dev/js/commit/fc96e14750175b19cb66fa7d50cdbad65b42153a), [`4a69f8c8`](https://github.com/thirdweb-dev/js/commit/4a69f8c85dec420615e9eda8d1ad5b5ef0b87713), [`26cd91ff`](https://github.com/thirdweb-dev/js/commit/26cd91ffe18dad37133a18988f21185c13d64cfb), [`8f962bc1`](https://github.com/thirdweb-dev/js/commit/8f962bc15c35da52ed5bc4025bb4cd18b69079e3), [`28b5d1eb`](https://github.com/thirdweb-dev/js/commit/28b5d1eb6d0142d3ebefb8bd078c30949f77fe61), [`0186721b`](https://github.com/thirdweb-dev/js/commit/0186721bc455aa1f8454839a1a25fa4062b45102), [`0bf29745`](https://github.com/thirdweb-dev/js/commit/0bf29745b0e842763c271ad8773312f0836ea00f), [`f0279c22`](https://github.com/thirdweb-dev/js/commit/f0279c228829b86ff1f828219bcef4fe16901f67), [`1e9fad77`](https://github.com/thirdweb-dev/js/commit/1e9fad779f3ebe535d32c0ce76905a3a8033f2fa), [`7af99d9a`](https://github.com/thirdweb-dev/js/commit/7af99d9a6d54492a29a90288a25b30773a8a10a7), [`00d0d01e`](https://github.com/thirdweb-dev/js/commit/00d0d01e619ff5c60b9f31386f51a55b5e466efa), [`fc96e147`](https://github.com/thirdweb-dev/js/commit/fc96e14750175b19cb66fa7d50cdbad65b42153a), [`8cfb4f38`](https://github.com/thirdweb-dev/js/commit/8cfb4f38ed89c26ad04f19d27c65c24cefa976b6)]:
|
||||
- @thirdweb-dev/wallets@0.2.17
|
||||
- @thirdweb-dev/chains@0.1.13
|
||||
- @thirdweb-dev/sdk@3.10.12
|
||||
- @thirdweb-dev/storage@1.1.2
|
||||
|
||||
## 3.11.8
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- [#874](https://github.com/thirdweb-dev/js/pull/874) [`49922de9`](https://github.com/thirdweb-dev/js/commit/49922de9d9c1258e58a3a05e656b229db469b1dd) Thanks [@iketw](https://github.com/iketw)! - [RN] Adds Auth to React Native
|
||||
|
||||
- Adds an optional `secureStorage` to authConfig
|
||||
- Adds `expo-secure-store` to store the JWT token securely in React Native, passing a default value
|
||||
- Stores the token in secure storage to be accessed by subsequent calls
|
||||
- Returns the token in `useLogin` to be used by the user
|
||||
|
||||
How I tested:
|
||||
|
||||
- Tested in Android/iOS/Web
|
||||
|
||||
Usage:
|
||||
|
||||
```
|
||||
<ThirdwebProvider
|
||||
activeChain="ethereum"
|
||||
supportedWallets={[metamaskWallet(), rainbowWallet()]}
|
||||
authConfig={{
|
||||
domain: https://your-domain.com,
|
||||
authUrl: '/api/auth',
|
||||
}}>
|
||||
<AppInner />
|
||||
</ThirdwebProvider>
|
||||
```
|
||||
|
||||
```
|
||||
const { login } = useLogin();
|
||||
const { logout } = useLogout();
|
||||
const { user, isLoggedIn } = useUser();
|
||||
...
|
||||
|
||||
const token = await login();
|
||||
```
|
||||
|
||||
- [#892](https://github.com/thirdweb-dev/js/pull/892) [`4acb2b55`](https://github.com/thirdweb-dev/js/commit/4acb2b5561118dde5c7372400d4d754b879aef2e) Thanks [@MananTank](https://github.com/MananTank)! - Add Switch Account button for MetaMask
|
||||
|
||||
- [#896](https://github.com/thirdweb-dev/js/pull/896) [`a6610f12`](https://github.com/thirdweb-dev/js/commit/a6610f1211e9359885b948bf69a66d834707ec07) Thanks [@atharvadeosthale](https://github.com/atharvadeosthale)! - Added links to portal
|
||||
|
||||
- [#895](https://github.com/thirdweb-dev/js/pull/895) [`06cc1df3`](https://github.com/thirdweb-dev/js/commit/06cc1df3b7906584c9e2e69fddc4a2d831c237f9) Thanks [@MananTank](https://github.com/MananTank)! - Fix supportedChains not having the activeChain for wallets
|
||||
|
||||
- [#887](https://github.com/thirdweb-dev/js/pull/887) [`430a5f79`](https://github.com/thirdweb-dev/js/commit/430a5f793419173775a434e0b2a21f70223e3813) Thanks [@MananTank](https://github.com/MananTank)! - export Configurable NetworkSelector
|
||||
|
||||
- [#922](https://github.com/thirdweb-dev/js/pull/922) [`477324ec`](https://github.com/thirdweb-dev/js/commit/477324ec85b800dcbc54b709430c77fb63b16537) Thanks [@adam-maj](https://github.com/adam-maj)! - Add useAuth back to react-core
|
||||
|
||||
- Updated dependencies [[`abe88599`](https://github.com/thirdweb-dev/js/commit/abe88599b634699aa3b876fe344bfddc6c1a92d4), [`4acb2b55`](https://github.com/thirdweb-dev/js/commit/4acb2b5561118dde5c7372400d4d754b879aef2e), [`82bea3fa`](https://github.com/thirdweb-dev/js/commit/82bea3fa10294eb3c5c7327fb047e3d1b2c62ff9), [`ea04edf4`](https://github.com/thirdweb-dev/js/commit/ea04edf47867617ff74f0aca1471a40b8d9c9f7c), [`77224646`](https://github.com/thirdweb-dev/js/commit/77224646d542db3171394d744b455497cd057633), [`c9ee9b32`](https://github.com/thirdweb-dev/js/commit/c9ee9b32f0a275f7c03d50243f23a7332f148ae5), [`00f4355f`](https://github.com/thirdweb-dev/js/commit/00f4355f1aa8843bb534b173e4d8e0a19dd18b47), [`a6610f12`](https://github.com/thirdweb-dev/js/commit/a6610f1211e9359885b948bf69a66d834707ec07), [`29146e00`](https://github.com/thirdweb-dev/js/commit/29146e009db655304f5753904ae7f8569c12f4ca), [`77224646`](https://github.com/thirdweb-dev/js/commit/77224646d542db3171394d744b455497cd057633), [`664d1cd0`](https://github.com/thirdweb-dev/js/commit/664d1cd0dd03f32337c2cf532f0ad860e5aa5ea8), [`bfdd8493`](https://github.com/thirdweb-dev/js/commit/bfdd84939d7cf9c6635b83c971bcc8967b52538c), [`c2fec930`](https://github.com/thirdweb-dev/js/commit/c2fec930520e2df89532ec0027ead4563c7708cf)]:
|
||||
- @thirdweb-dev/sdk@3.10.11
|
||||
- @thirdweb-dev/wallets@0.2.16
|
||||
- @thirdweb-dev/chains@0.1.12
|
||||
|
||||
## 3.11.7
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- [#876](https://github.com/thirdweb-dev/js/pull/876) [`0db0cc75`](https://github.com/thirdweb-dev/js/commit/0db0cc756436dba8f9df0cf8678b87c009acc283) Thanks [@nachoiacovino](https://github.com/nachoiacovino)! - Fix useContractEvents cache not storing individual events
|
||||
|
||||
- Updated dependencies [[`ac8fa0b3`](https://github.com/thirdweb-dev/js/commit/ac8fa0b34545a2bc0b489a0551d476a9f560e851), [`b616dca7`](https://github.com/thirdweb-dev/js/commit/b616dca7eb861cd1d2adba3f3d1fe9c3b50f259e), [`2545a440`](https://github.com/thirdweb-dev/js/commit/2545a440dc272690cacbc23023f7b0a68f390c6e), [`b75bcef5`](https://github.com/thirdweb-dev/js/commit/b75bcef55bfdedc260b5b62bb4aff10a7d5c47b6), [`229a4741`](https://github.com/thirdweb-dev/js/commit/229a47413e422952ad946b8c09af32cc1fcdc7f0), [`c9027fce`](https://github.com/thirdweb-dev/js/commit/c9027fced0fffbf757bf0080bc4a49f5464df647)]:
|
||||
- @thirdweb-dev/sdk@3.10.10
|
||||
- @thirdweb-dev/wallets@0.2.15
|
||||
|
||||
## 3.11.6
|
||||
|
||||
### Patch Changes
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@thirdweb-dev/react-core",
|
||||
"version": "3.11.6",
|
||||
"version": "3.11.9",
|
||||
"repository": "https://github.com/thirdweb-dev/js/tree/main/packages/react-core",
|
||||
"author": "thirdweb eng <[email protected]>",
|
||||
"license": "Apache-2.0",
|
||||
|
||||
@@ -0,0 +1 @@
|
||||
export const AUTH_TOKEN_STORAGE_KEY = "auth_token_storage_key";
|
||||
@@ -3,7 +3,7 @@ import { useCallback, useState } from "react";
|
||||
import { useActiveChain, useChainId } from "../../evm/hooks/wallet";
|
||||
import { useSupportedChains } from "../../evm/hooks/useSupportedChains";
|
||||
import { useSwitchChain, useWallet } from "./wallet-hooks";
|
||||
import { assertWindowEthereum } from "@thirdweb-dev/wallets";
|
||||
import { assertWindowEthereum, walletIds } from "@thirdweb-dev/wallets";
|
||||
|
||||
// this hook is only for backwards compatibility
|
||||
|
||||
@@ -72,10 +72,10 @@ export function useNetwork(): [NetworkMetadata, SwitchNetwork | undefined] {
|
||||
// switch not supported if connected to a mobile wallet
|
||||
const switchChainNotSupported =
|
||||
!wallet ||
|
||||
wallet.walletId === "walletConnectV1" ||
|
||||
wallet.walletId === "walletConnect" ||
|
||||
(wallet.walletId === "metamask" && !isMetamaskInstalled) ||
|
||||
(wallet.walletId === "coinbaseWallet" && !isCoinbaseInstalled);
|
||||
wallet.walletId === walletIds.walletConnectV1 ||
|
||||
wallet.walletId === walletIds.walletConnect ||
|
||||
(wallet.walletId === walletIds.metamask && !isMetamaskInstalled) ||
|
||||
(wallet.walletId === walletIds.coinbase && !isCoinbaseInstalled);
|
||||
|
||||
// error when switching network
|
||||
const [error, setError] = useState<Error | undefined>(undefined);
|
||||
|
||||
@@ -72,6 +72,23 @@ export function useConnectionStatus() {
|
||||
return context.connectionStatus;
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @returns if the wallet is currently connecting
|
||||
*
|
||||
*/
|
||||
export function useIsConnecting() {
|
||||
const context = useThirdwebWallet();
|
||||
invariant(
|
||||
context,
|
||||
"useConnectionStatus() must be used within a <ThirdwebProvider/>",
|
||||
);
|
||||
return (
|
||||
context.connectionStatus === "connecting" ||
|
||||
context.connectionStatus === "unknown"
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @returns a method to create an instance of given wallet class
|
||||
|
||||
@@ -67,9 +67,34 @@ export const ThirdwebProviderCore = <TChains extends Chain[]>({
|
||||
createWalletStorage = createAsyncLocalStorage,
|
||||
...props
|
||||
}: React.PropsWithChildren<ThirdwebProviderCoreProps<TChains>>) => {
|
||||
const supportedChainsNonNull = useMemo(() => {
|
||||
return props.supportedChains || (defaultChains as any as TChains);
|
||||
}, [props.supportedChains]);
|
||||
const { activeChain } = props;
|
||||
|
||||
const supportedChainsNonNull: Chain[] = useMemo(() => {
|
||||
const isActiveChainObject =
|
||||
typeof activeChain === "object" && activeChain !== null;
|
||||
|
||||
if (!isActiveChainObject) {
|
||||
return props.supportedChains || defaultChains;
|
||||
}
|
||||
|
||||
if (!props.supportedChains) {
|
||||
return [...defaultChains, activeChain];
|
||||
}
|
||||
|
||||
const isActiveChainInSupportedChains = props.supportedChains.find(
|
||||
(c) => c.chainId === activeChain.chainId,
|
||||
);
|
||||
|
||||
// if activeChain is not in supportedChains - add it
|
||||
if (!isActiveChainInSupportedChains) {
|
||||
return [...props.supportedChains, activeChain];
|
||||
}
|
||||
|
||||
// if active chain is in supportedChains - replace it with object in activeChain
|
||||
return props.supportedChains.map((c) =>
|
||||
c.chainId === activeChain.chainId ? activeChain : c,
|
||||
);
|
||||
}, [props.supportedChains, activeChain]);
|
||||
|
||||
const [supportedChainsWithKey, activeChainIdOrObjWithKey] =
|
||||
useUpdateChainsWithApiKeys(
|
||||
@@ -82,14 +107,27 @@ export const ThirdwebProviderCore = <TChains extends Chain[]>({
|
||||
|
||||
const activeChainWithKey = useMemo(() => {
|
||||
if (typeof activeChainIdOrObjWithKey === "number") {
|
||||
return supportedChainsWithKey.find(
|
||||
const resolveChain = supportedChainsWithKey.find(
|
||||
(chain) => chain.chainId === activeChainIdOrObjWithKey,
|
||||
);
|
||||
if (!resolveChain) {
|
||||
throw new Error(
|
||||
`Invalid chainId: ${activeChainIdOrObjWithKey}. It is not one of supportedChains`,
|
||||
);
|
||||
}
|
||||
return resolveChain;
|
||||
}
|
||||
|
||||
if (typeof activeChainIdOrObjWithKey === "string") {
|
||||
return supportedChainsWithKey.find(
|
||||
const resolvedChain = supportedChainsWithKey.find(
|
||||
(chain) => chain.slug === activeChainIdOrObjWithKey,
|
||||
);
|
||||
if (!resolvedChain) {
|
||||
throw new Error(
|
||||
`Invalid chain: "${activeChainIdOrObjWithKey}". It is not one of supportedChains`,
|
||||
);
|
||||
}
|
||||
return resolvedChain;
|
||||
}
|
||||
|
||||
return activeChainIdOrObjWithKey;
|
||||
|
||||
@@ -3,6 +3,7 @@ import type { Wallet, WalletInstance } from "../types/wallet";
|
||||
import { ThirdwebThemeContext } from "./theme-context";
|
||||
import { Chain } from "@thirdweb-dev/chains";
|
||||
import {
|
||||
AbstractClientWallet,
|
||||
AsyncStorage,
|
||||
ConnectParams,
|
||||
CreateAsyncStorage,
|
||||
@@ -20,7 +21,18 @@ import {
|
||||
} from "react";
|
||||
|
||||
const LAST_CONNECTED_WALLET_STORAGE_KEY = "lastConnectedWallet";
|
||||
let coordinatorStorage: AsyncStorage;
|
||||
|
||||
let lastConnectedWalletStorage: AsyncStorage;
|
||||
|
||||
type LastConnectedWalletInfo = {
|
||||
walletId: string;
|
||||
connectParams?: ConnectParams & {
|
||||
personalWallet?: {
|
||||
walletId: string;
|
||||
connectParams?: ConnectParams;
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
type NonNullable<T> = T extends null | undefined ? never : T;
|
||||
type WalletConnectParams<I extends WalletInstance> = Parameters<
|
||||
@@ -50,7 +62,7 @@ type ThirdwebWalletContextData = {
|
||||
createWalletStorage: CreateAsyncStorage;
|
||||
switchChain: (chain: number) => Promise<void>;
|
||||
chainToConnect?: Chain;
|
||||
activeChain?: Chain;
|
||||
activeChain: Chain;
|
||||
handleWalletConnect: (
|
||||
wallet: WalletInstance,
|
||||
params?: ConnectParams<Record<string, any>>,
|
||||
@@ -63,7 +75,7 @@ const ThirdwebWalletContext = createContext<
|
||||
|
||||
export function ThirdwebWalletProvider(
|
||||
props: PropsWithChildren<{
|
||||
activeChain?: Chain;
|
||||
activeChain: Chain;
|
||||
supportedWallets: Wallet[];
|
||||
shouldAutoConnect?: boolean;
|
||||
createWalletStorage: CreateAsyncStorage;
|
||||
@@ -80,8 +92,9 @@ export function ThirdwebWalletProvider(
|
||||
WalletInstance | undefined
|
||||
>();
|
||||
|
||||
if (!coordinatorStorage) {
|
||||
coordinatorStorage = props.createWalletStorage("coordinatorStorage");
|
||||
if (!lastConnectedWalletStorage) {
|
||||
lastConnectedWalletStorage =
|
||||
props.createWalletStorage("coordinatorStorage");
|
||||
}
|
||||
|
||||
// if autoSwitch is enabled - enforce connection to activeChain
|
||||
@@ -120,33 +133,47 @@ export function ThirdwebWalletProvider(
|
||||
const handleWalletConnect = useCallback(
|
||||
async (
|
||||
wallet: WalletInstance,
|
||||
params?: ConnectParams<Record<string, any>>,
|
||||
connectParams?: ConnectParams<Record<string, any>>,
|
||||
isAutoConnect = false,
|
||||
) => {
|
||||
const connectParams = params || walletParams;
|
||||
const lastConnectedWallet = {
|
||||
walletId: wallet.walletId,
|
||||
connectParams,
|
||||
};
|
||||
|
||||
try {
|
||||
await coordinatorStorage.setItem(
|
||||
LAST_CONNECTED_WALLET_STORAGE_KEY,
|
||||
JSON.stringify(lastConnectedWallet),
|
||||
);
|
||||
} catch (e) {
|
||||
console.error(e);
|
||||
}
|
||||
|
||||
const _signer = await wallet.getSigner();
|
||||
setSigner(_signer);
|
||||
setActiveWallet(wallet);
|
||||
setConnectionStatus("connected");
|
||||
|
||||
// it autoconnected, then the details is already saved in storage, no need to store again
|
||||
if (isAutoConnect) {
|
||||
return;
|
||||
}
|
||||
|
||||
// save to storage
|
||||
const walletInfo: LastConnectedWalletInfo = {
|
||||
walletId: wallet.walletId,
|
||||
connectParams,
|
||||
};
|
||||
|
||||
// if personal wallet exists, we need to replace the connectParams.personalWallet to a stringifiable version
|
||||
const personalWallet = wallet.getPersonalWallet() as AbstractClientWallet;
|
||||
|
||||
if (personalWallet) {
|
||||
walletInfo.connectParams = {
|
||||
...walletInfo.connectParams,
|
||||
personalWallet: {
|
||||
walletId: personalWallet.walletId,
|
||||
connectParams: personalWallet.getConnectParams(),
|
||||
},
|
||||
};
|
||||
|
||||
saveLastConnectedWalletInfo(walletInfo);
|
||||
} else {
|
||||
saveLastConnectedWalletInfo(walletInfo);
|
||||
}
|
||||
},
|
||||
[walletParams],
|
||||
[],
|
||||
);
|
||||
|
||||
const storeLastActiveChainId = useCallback(async (chainId: number) => {
|
||||
const lastConnectedWallet = await coordinatorStorage.getItem(
|
||||
const lastConnectedWallet = await lastConnectedWalletStorage.getItem(
|
||||
LAST_CONNECTED_WALLET_STORAGE_KEY,
|
||||
);
|
||||
|
||||
@@ -157,7 +184,7 @@ export function ThirdwebWalletProvider(
|
||||
try {
|
||||
const parsedWallet = JSON.parse(lastConnectedWallet as string);
|
||||
parsedWallet.connectParams.chainId = chainId;
|
||||
await coordinatorStorage.setItem(
|
||||
await lastConnectedWalletStorage.setItem(
|
||||
LAST_CONNECTED_WALLET_STORAGE_KEY,
|
||||
JSON.stringify(parsedWallet),
|
||||
);
|
||||
@@ -206,52 +233,83 @@ export function ThirdwebWalletProvider(
|
||||
}
|
||||
|
||||
autoConnectTriggered.current = true;
|
||||
(async () => {
|
||||
const lastConnectedWalletInfo = await coordinatorStorage.getItem(
|
||||
LAST_CONNECTED_WALLET_STORAGE_KEY,
|
||||
|
||||
async function autoconnect() {
|
||||
const walletInfo = await getLastConnectedWalletInfo();
|
||||
|
||||
if (!walletInfo) {
|
||||
setConnectionStatus("disconnected");
|
||||
return;
|
||||
}
|
||||
|
||||
const walletObj = props.supportedWallets.find(
|
||||
(W) => W.id === walletInfo.walletId,
|
||||
);
|
||||
|
||||
if (!lastConnectedWalletInfo) {
|
||||
if (!walletObj) {
|
||||
// last connected wallet is no longer present in the supported wallets
|
||||
setConnectionStatus("disconnected");
|
||||
return;
|
||||
}
|
||||
|
||||
let parsedParams: ConnectParams<Record<string, any>> | undefined;
|
||||
let lastConnectedWalletId: string | undefined;
|
||||
const personalWalletInfo = walletInfo.connectParams?.personalWallet;
|
||||
|
||||
try {
|
||||
const parsedWallet = JSON.parse(lastConnectedWalletInfo as string);
|
||||
parsedParams = parsedWallet.connectParams;
|
||||
lastConnectedWalletId = parsedWallet.walletId;
|
||||
} catch (error) {
|
||||
console.error(`Error parsing the last connected wallet: ${error}`);
|
||||
if (personalWalletInfo) {
|
||||
type Config = {
|
||||
personalWallets: Wallet[];
|
||||
};
|
||||
|
||||
const personalWallets =
|
||||
"config" in walletObj
|
||||
? (walletObj.config as Config).personalWallets
|
||||
: [];
|
||||
|
||||
const personalWalleObj = personalWallets.find(
|
||||
(W) => W.id === personalWalletInfo.walletId,
|
||||
);
|
||||
if (personalWalleObj) {
|
||||
// create a personal wallet instance and auto connect it
|
||||
const personalWalletInstance = createWalletInstance(personalWalleObj);
|
||||
|
||||
try {
|
||||
await personalWalletInstance.autoConnect(
|
||||
personalWalletInfo.connectParams,
|
||||
);
|
||||
} catch (e) {
|
||||
console.error(e);
|
||||
setConnectionStatus("disconnected");
|
||||
return;
|
||||
}
|
||||
|
||||
// set the personal wallet instance to the connectParams
|
||||
walletInfo.connectParams = {
|
||||
...walletInfo.connectParams,
|
||||
personalWallet: personalWalletInstance,
|
||||
};
|
||||
} else {
|
||||
// last used personal wallet is no longer present in the supported wallets
|
||||
setConnectionStatus("disconnected");
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
if (!lastConnectedWalletId) {
|
||||
setConnectionStatus("disconnected");
|
||||
return;
|
||||
}
|
||||
// create a wallet instance and auto connect it
|
||||
const wallet = createWalletInstance(walletObj);
|
||||
|
||||
let lastConnectedWallet = props.supportedWallets.find(
|
||||
(W) => W.id === lastConnectedWalletId,
|
||||
);
|
||||
|
||||
if (!lastConnectedWallet) {
|
||||
setConnectionStatus("disconnected");
|
||||
return;
|
||||
}
|
||||
|
||||
const wallet = createWalletInstance(lastConnectedWallet);
|
||||
try {
|
||||
setConnectionStatus("connecting");
|
||||
await wallet.autoConnect(parsedParams);
|
||||
handleWalletConnect(wallet, parsedParams);
|
||||
await wallet.autoConnect(walletInfo.connectParams);
|
||||
handleWalletConnect(wallet, walletInfo.connectParams, true);
|
||||
} catch (e) {
|
||||
coordinatorStorage.removeItem(LAST_CONNECTED_WALLET_STORAGE_KEY);
|
||||
lastConnectedWalletStorage.removeItem(
|
||||
LAST_CONNECTED_WALLET_STORAGE_KEY,
|
||||
);
|
||||
setConnectionStatus("disconnected");
|
||||
throw e;
|
||||
}
|
||||
})();
|
||||
}
|
||||
|
||||
autoconnect();
|
||||
}, [
|
||||
createWalletInstance,
|
||||
props.supportedWallets,
|
||||
@@ -285,7 +343,9 @@ export function ThirdwebWalletProvider(
|
||||
);
|
||||
|
||||
const onWalletDisconnect = useCallback(async () => {
|
||||
await coordinatorStorage.removeItem(LAST_CONNECTED_WALLET_STORAGE_KEY);
|
||||
await lastConnectedWalletStorage.removeItem(
|
||||
LAST_CONNECTED_WALLET_STORAGE_KEY,
|
||||
);
|
||||
setConnectionStatus("disconnected");
|
||||
setSigner(undefined);
|
||||
setActiveWallet(undefined);
|
||||
@@ -299,6 +359,12 @@ export function ThirdwebWalletProvider(
|
||||
}
|
||||
|
||||
await activeWallet.disconnect();
|
||||
if (activeWallet.getPersonalWallet()) {
|
||||
await (
|
||||
activeWallet.getPersonalWallet() as AbstractClientWallet
|
||||
)?.disconnect();
|
||||
}
|
||||
|
||||
onWalletDisconnect();
|
||||
}, [activeWallet, onWalletDisconnect]);
|
||||
|
||||
@@ -351,5 +417,35 @@ export function ThirdwebWalletProvider(
|
||||
}
|
||||
|
||||
export function useThirdwebWallet() {
|
||||
return useContext(ThirdwebWalletContext);
|
||||
const ctx = useContext(ThirdwebWalletContext);
|
||||
if (!ctx) {
|
||||
throw new Error(
|
||||
`useThirdwebWallet() can only be used inside <ThirdwebProvider />`,
|
||||
);
|
||||
}
|
||||
return ctx;
|
||||
}
|
||||
|
||||
async function getLastConnectedWalletInfo() {
|
||||
const str = await lastConnectedWalletStorage.getItem(
|
||||
LAST_CONNECTED_WALLET_STORAGE_KEY,
|
||||
);
|
||||
if (!str) {
|
||||
return null;
|
||||
}
|
||||
|
||||
return JSON.parse(str) as LastConnectedWalletInfo;
|
||||
}
|
||||
|
||||
async function saveLastConnectedWalletInfo(
|
||||
walletInfo: LastConnectedWalletInfo,
|
||||
) {
|
||||
try {
|
||||
await lastConnectedWalletStorage.setItem(
|
||||
LAST_CONNECTED_WALLET_STORAGE_KEY,
|
||||
JSON.stringify(walletInfo),
|
||||
);
|
||||
} catch (e) {
|
||||
console.error("Error saving the last connected wallet info", e);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import type {
|
||||
AbstractBrowserWallet,
|
||||
AbstractClientWallet,
|
||||
Chain,
|
||||
DAppMetaData,
|
||||
} from "@thirdweb-dev/wallets";
|
||||
@@ -15,16 +15,23 @@ export type WalletOptions = {
|
||||
dappMetadata?: DAppMetaData;
|
||||
} & ExtraCoreWalletOptions;
|
||||
|
||||
export type WalletInstance = InstanceType<typeof AbstractBrowserWallet>;
|
||||
export type WalletInstance = InstanceType<typeof AbstractClientWallet>;
|
||||
|
||||
export type WalletClass<I extends WalletInstance = WalletInstance> = {
|
||||
id: string;
|
||||
new (options: WalletOptions): I;
|
||||
meta: (typeof AbstractBrowserWallet)["meta"];
|
||||
meta: (typeof AbstractClientWallet)["meta"];
|
||||
};
|
||||
|
||||
export type Wallet<I extends WalletInstance = WalletInstance> = {
|
||||
export type Wallet<
|
||||
I extends WalletInstance = WalletInstance,
|
||||
Config extends Record<string, any> | undefined = undefined,
|
||||
> = {
|
||||
id: string;
|
||||
meta: (typeof AbstractBrowserWallet)["meta"];
|
||||
meta: (typeof AbstractClientWallet)["meta"];
|
||||
create: (options: WalletOptions) => I;
|
||||
};
|
||||
} & (Config extends undefined
|
||||
? {}
|
||||
: {
|
||||
config: Config;
|
||||
});
|
||||
|
||||
@@ -5,8 +5,12 @@ import { getChainRPCs, ChainRPCOptions, Chain } from "@thirdweb-dev/chains";
|
||||
* use the keys and return a new chain object with updated RPCs
|
||||
*/
|
||||
export const updateChainRPCs = (chain: Chain, options: ChainRPCOptions) => {
|
||||
return {
|
||||
...chain,
|
||||
rpc: getChainRPCs(chain, options),
|
||||
};
|
||||
try {
|
||||
return {
|
||||
...chain,
|
||||
rpc: getChainRPCs(chain, options),
|
||||
};
|
||||
} catch (error) {
|
||||
return chain;
|
||||
}
|
||||
};
|
||||
|
||||
@@ -5,6 +5,12 @@ import React, {
|
||||
useMemo,
|
||||
} from "react";
|
||||
|
||||
export interface ISecureStorage {
|
||||
getItem(key: string): Promise<string | null>;
|
||||
setItem(key: string, value: string): Promise<void>;
|
||||
removeItem(key: string): Promise<void>;
|
||||
}
|
||||
|
||||
/**
|
||||
* The configuration to use the react SDK with an [auth](https://portal.thirdweb.com/auth) server.
|
||||
*
|
||||
@@ -22,6 +28,17 @@ export interface ThirdwebAuthConfig {
|
||||
* This domain should match the domain used on your auth backend.
|
||||
*/
|
||||
domain: string;
|
||||
|
||||
/**
|
||||
* Secure storage to use for storing the auth token when using JWT tokens.
|
||||
*
|
||||
* Do not use a storage option that stores values accessible outside
|
||||
* your aplication (like localStorage on web environments) since you may
|
||||
* be exposing your auth token to malicious actors.
|
||||
*
|
||||
* ** By default auth uses cookies so no need to set this unless you want to specifically use JWT tokens **
|
||||
*/
|
||||
secureStorage?: ISecureStorage;
|
||||
}
|
||||
|
||||
interface ThirdwebAuthContext extends ThirdwebAuthConfig {}
|
||||
|
||||
@@ -65,6 +65,7 @@ export type SetClaimConditionsParams = {
|
||||
* @param tokenId - the id of the token to fetch the claim conditions for (if the contract is an ERC1155 contract)
|
||||
* @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(
|
||||
@@ -120,6 +121,7 @@ export function useActiveClaimCondition(
|
||||
* @param claimConditionId - optional the claim condition id to get the proofs for
|
||||
* @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(
|
||||
@@ -183,6 +185,7 @@ export function useClaimerProofs(
|
||||
* @param tokenId - the id of the token to fetch the claim conditions for (if the contract is an ERC1155 contract)
|
||||
* @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(
|
||||
@@ -237,6 +240,7 @@ export function useClaimConditions(
|
||||
* @param tokenId - the id of the token to fetch the claim conditions for (if the contract is an ERC1155 contract)
|
||||
* @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(
|
||||
@@ -306,7 +310,7 @@ export function useClaimIneligibilityReasons(
|
||||
* @param tokenId - the id of the token to fetch the claim conditions for (if the contract is an ERC1155 contract)
|
||||
* @returns the active claim conditon 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(
|
||||
@@ -462,6 +466,7 @@ export function useActiveClaimConditionForWallet(
|
||||
* @param contract - an instance of a {@link DropContract}
|
||||
* @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(
|
||||
|
||||
@@ -36,6 +36,7 @@ import invariant from "tiny-invariant";
|
||||
* @param contract - an instance of a {@link SmartContract}
|
||||
* @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(
|
||||
@@ -87,6 +88,7 @@ export function usePrimarySaleRecipient(
|
||||
* @param contract - an instance of a {@link SmartContract}
|
||||
* @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(
|
||||
@@ -137,6 +139,7 @@ export function useUpdatePrimarySaleRecipient(
|
||||
* @param contract - an instance of a {@link SmartContract}
|
||||
* @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(
|
||||
@@ -188,6 +191,7 @@ export function useRoyaltySettings(
|
||||
* @param contract - an instance of a {@link SmartContract}
|
||||
* @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(
|
||||
@@ -234,6 +238,7 @@ export function useUpdateRoyaltySettings(
|
||||
* @param contract - an instance of a {@link SmartContract}
|
||||
* @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(
|
||||
@@ -284,6 +289,7 @@ export function usePlatformFees(
|
||||
* @param contract - an instance of a {@link SmartContract}
|
||||
* @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(
|
||||
@@ -329,6 +335,7 @@ 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(
|
||||
@@ -382,6 +389,7 @@ 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(
|
||||
|
||||
@@ -160,6 +160,7 @@ export type UseContractResult<
|
||||
*
|
||||
* @param contractAddress - the address of the deployed contract
|
||||
* @returns a response object that includes the contract once it is resolved
|
||||
* @see {@link https://portal.thirdweb.com/react/react.usecontract?utm_source=sdk | Documentation}
|
||||
* @public
|
||||
*/
|
||||
export function useContract(
|
||||
@@ -177,6 +178,7 @@ export function useContract(
|
||||
* @param contractAddress - the address of the deployed contract
|
||||
* @param _contractType - the type of the contract
|
||||
* @returns a response object that includes the contract once it is resolved
|
||||
* @see {@link https://portal.thirdweb.com/react/react.usecontract?utm_source=sdk | Documentation}
|
||||
* @public
|
||||
*/
|
||||
export function useContract<TContractType extends ContractType>(
|
||||
@@ -199,6 +201,7 @@ export function useContract<TContractType extends ContractType>(
|
||||
* @param contractAddress - the address of the deployed contract
|
||||
* @param _abi - the ABI of the contract to use
|
||||
* @returns a response object that includes the contract once it is resolved
|
||||
* @see {@link https://portal.thirdweb.com/react/react.usecontract?utm_source=sdk | Documentation}
|
||||
* @public
|
||||
*/
|
||||
|
||||
@@ -409,6 +412,7 @@ export function useContractMetadataUpdate(
|
||||
* @param eventName - the name of the event to query for (omit this or pass `undefined` to query for all events)
|
||||
* @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(
|
||||
@@ -427,11 +431,11 @@ export function useContractEvents(
|
||||
() =>
|
||||
createCacheKeyWithNetwork(
|
||||
eventName
|
||||
? cacheKeys.contract.events.getAllEvents(contractAddress)
|
||||
: cacheKeys.contract.events.getEvents(
|
||||
? cacheKeys.contract.events.getEvents(
|
||||
contractAddress,
|
||||
eventName as string,
|
||||
),
|
||||
)
|
||||
: cacheKeys.contract.events.getAllEvents(contractAddress),
|
||||
activeChainId,
|
||||
),
|
||||
[activeChainId, contractAddress, eventName],
|
||||
@@ -506,7 +510,7 @@ export function useContractEvents(
|
||||
* @param functionName - the name of the function to call
|
||||
* @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<
|
||||
@@ -553,7 +557,7 @@ export function useContractRead<
|
||||
* @param contract - the contract instance of the contract to call a function on
|
||||
* @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<
|
||||
|
||||
@@ -51,6 +51,7 @@ import invariant from "tiny-invariant";
|
||||
* @param queryParams - query params to pass to the query for the sake of pagination
|
||||
* @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(
|
||||
@@ -87,6 +88,7 @@ export function useUnclaimedNFTs(
|
||||
* @param queryParams - query params to pass to the query for the sake of pagination
|
||||
* @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(
|
||||
@@ -114,6 +116,7 @@ export function useClaimedNFTs(
|
||||
* @param contract - an instance of a contract that extends the ERC721 spec (NFT drop, Signature Drop, or any custom contract that extends the ERC721 spec)
|
||||
* @returns a response object that includes the number of NFTs that are unclaimed
|
||||
* @twfeature ERC721LazyMintable
|
||||
* @see {@link https://portal.thirdweb.com/react/react.useunclaimednftsupply?utm_source=sdk | Documentation}
|
||||
*/
|
||||
export function useUnclaimedNFTSupply(
|
||||
contract: RequiredParam<NFTDrop | SignatureDrop | SmartContract | null>,
|
||||
@@ -140,6 +143,7 @@ export function useUnclaimedNFTSupply(
|
||||
* @param contract - an instance of a contract that extends the ERC721 spec (NFT drop, Signature Drop, or any custom contract that extends the ERC721 spec)
|
||||
* @returns a response object that includes the number of NFTs that are claimed
|
||||
* @twfeature ERC721LazyMintable
|
||||
* @see {@link https://portal.thirdweb.com/react/react.useclaimednftsupply?utm_source=sdk | Documentation}
|
||||
*/
|
||||
export function useClaimedNFTSupply(
|
||||
contract: RequiredParam<NFTDrop | SignatureDrop | SmartContract | null>,
|
||||
@@ -165,6 +169,7 @@ export function useClaimedNFTSupply(
|
||||
* @param contract - an instance of a {@link RevealableContract}
|
||||
* @returns a response object that gets the batches to still be revealed
|
||||
* @twfeature ERC721Revealable | ERC1155Revealable
|
||||
* @see {@link https://portal.thirdweb.com/react/react.usebatchestoreveal?utm_source=sdk | Documentation}
|
||||
*/
|
||||
export function useBatchesToReveal<TContract extends RevealableContract>(
|
||||
contract: RequiredParam<TContract>,
|
||||
@@ -220,6 +225,7 @@ export function useBatchesToReveal<TContract extends RevealableContract>(
|
||||
* @param contract - an instance of a {@link DropContract}
|
||||
* @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>(
|
||||
@@ -309,6 +315,7 @@ export function useClaimNFT<TContract extends DropContract>(
|
||||
* @param onProgress - an optional callback that will be called with the progress of the upload
|
||||
* @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>(
|
||||
@@ -381,6 +388,7 @@ export function useLazyMint<TContract extends DropContract>(
|
||||
* @param onProgress - an optional callback that will be called with the progress of the upload
|
||||
* @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>(
|
||||
@@ -461,6 +469,7 @@ export function useDelayedRevealLazyMint<TContract extends RevealableContract>(
|
||||
* @param contract - an instance of a {@link 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>(
|
||||
|
||||
@@ -54,6 +54,7 @@ import invariant from "tiny-invariant";
|
||||
* @param contract - an instance of a marketplace contract
|
||||
* @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(
|
||||
@@ -88,6 +89,7 @@ export function useListing(
|
||||
* @param listingId - the listing id to check
|
||||
* @returns a response object that includes the desired direct listing
|
||||
* @twfeature DirectListings
|
||||
* @see {@link https://portal.thirdweb.com/react/react.usedirectlisting?utm_source=sdk | Documentation}
|
||||
*/
|
||||
export function useDirectListing(
|
||||
contract: RequiredParam<MarketplaceV3>,
|
||||
@@ -124,6 +126,7 @@ export function useDirectListing(
|
||||
* @param auctionId - the auction id to check
|
||||
* @returns a response object that includes the desired english auction
|
||||
* @twfeature EnglishAuctions
|
||||
* @see {@link https://portal.thirdweb.com/react/react.useenglishauctions?utm_source=sdk | Documentation}
|
||||
*/
|
||||
export function useEnglishAuction(
|
||||
contract: RequiredParam<MarketplaceV3>,
|
||||
@@ -158,6 +161,7 @@ export function useEnglishAuction(
|
||||
* @param contract - an instance of a marketplace contract
|
||||
* @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(
|
||||
@@ -190,6 +194,7 @@ export function useListings(
|
||||
* @param filter - filter to pass to the query for the sake of pagination & filtering
|
||||
* @returns a response object that includes an array of direct listings
|
||||
* @twfeature DirectListings
|
||||
* @see {@link https://portal.thirdweb.com/react/react.usedirectlistings?utm_source=sdk | Documentation}
|
||||
*/
|
||||
export function useDirectListings(
|
||||
contract: RequiredParam<MarketplaceV3>,
|
||||
@@ -224,6 +229,7 @@ export function useDirectListings(
|
||||
* @param filter - filter to pass to the query for the sake of pagination & filtering
|
||||
* @returns a response object that includes an array of direct listings
|
||||
* @twfeature DirectListings
|
||||
* @see {@link https://portal.thirdweb.com/react/react.usevaliddirectlistings?utm_source=sdk | Documentation}
|
||||
*/
|
||||
export function useValidDirectListings(
|
||||
contract: RequiredParam<MarketplaceV3>,
|
||||
@@ -258,6 +264,7 @@ export function useValidDirectListings(
|
||||
* @param filter - filter to pass to the query for the sake of pagination & filtering
|
||||
* @returns a response object that includes an array of english auctions
|
||||
* @twfeature EnglishAuctions
|
||||
* @see {@link https://portal.thirdweb.com/react/react.useenglishauctions?utm_source=sdk | Documentation}
|
||||
*/
|
||||
export function useEnglishAuctions(
|
||||
contract: RequiredParam<MarketplaceV3>,
|
||||
@@ -292,6 +299,7 @@ export function useEnglishAuctions(
|
||||
* @param filter - filter to pass to the query for the sake of pagination & filtering
|
||||
* @returns a response object that includes an array of english auctions
|
||||
* @twfeature EnglishAuctions
|
||||
* @see {@link https://portal.thirdweb.com/react/react.usevalidenglishauctions?utm_source=sdk | Documentation}
|
||||
*/
|
||||
export function useValidEnglishAuctions(
|
||||
contract: RequiredParam<MarketplaceV3>,
|
||||
@@ -324,6 +332,7 @@ 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>) {
|
||||
@@ -351,6 +360,7 @@ export function useListingsCount(contract: RequiredParam<Marketplace>) {
|
||||
* @param contract - an instance of a marketplace v3 contract
|
||||
* @returns a response object that includes the direct listings count
|
||||
* @twfeature DirectListings
|
||||
* @see {@link https://portal.thirdweb.com/react/react.usedirectlistingscount?utm_source=sdk | Documentation}
|
||||
*/
|
||||
export function useDirectListingsCount(contract: RequiredParam<MarketplaceV3>) {
|
||||
const contractAddress = contract?.getAddress();
|
||||
@@ -379,6 +389,7 @@ export function useDirectListingsCount(contract: RequiredParam<MarketplaceV3>) {
|
||||
* @param contract - an instance of a marketplace v3 contract
|
||||
* @returns a response object that includes the direct english actions count
|
||||
* @twfeature EnglishAuctions
|
||||
* @see {@link https://portal.thirdweb.com/react/react.useenglishauctionscount?utm_source=sdk | Documentation}
|
||||
*/
|
||||
export function useEnglishAuctionsCount(
|
||||
contract: RequiredParam<MarketplaceV3>,
|
||||
@@ -409,6 +420,7 @@ export function useEnglishAuctionsCount(
|
||||
* @param contract - an instance of a marketplace contract
|
||||
* @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(
|
||||
@@ -442,6 +454,7 @@ export function useActiveListings(
|
||||
* @param contract - an instance of a marketplace contract
|
||||
* @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(
|
||||
@@ -482,6 +495,7 @@ export function useWinningBid(
|
||||
* @param auctionId - the auction id to check
|
||||
* @returns a response object that includes the {@link Bid} that is winning the auction
|
||||
* @twfeature EnglishAuctions
|
||||
* @see {@link https://portal.thirdweb.com/react/react.useenglishauctionwinningbid?utm_source=sdk | Documentation}
|
||||
*/
|
||||
export function useEnglishAuctionWinningBid(
|
||||
contract: RequiredParam<MarketplaceV3>,
|
||||
@@ -521,6 +535,7 @@ export function useEnglishAuctionWinningBid(
|
||||
* @param listingId - the listing id to check
|
||||
* @returns a response object that includes the address of the winner of the auction or undefined if there is no winner yet
|
||||
* @twfeature EnglishAuctions
|
||||
* @see {@link https://portal.thirdweb.com/react/react.useauctionwinner?utm_source=sdk | Documentation}
|
||||
*/
|
||||
export function useAuctionWinner(
|
||||
contract: RequiredParam<Marketplace | MarketplaceV3>,
|
||||
@@ -572,6 +587,7 @@ export function useAuctionWinner(
|
||||
|
||||
* @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}
|
||||
*/
|
||||
export function useBidBuffer(
|
||||
contract: RequiredParam<Marketplace | MarketplaceV3>,
|
||||
@@ -622,6 +638,7 @@ export function useBidBuffer(
|
||||
* @param listingId - the listing id to check
|
||||
* @returns a response object that includes the minimum next bid for the auction listing
|
||||
* @twfeature EnglishAucton
|
||||
* @see {@link https://portal.thirdweb.com/react/react.useminimumnextbid?utm_source=sdk | Documentation}
|
||||
*/
|
||||
export function useMinimumNextBid(
|
||||
contract: RequiredParam<Marketplace | MarketplaceV3>,
|
||||
@@ -672,6 +689,7 @@ 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(
|
||||
@@ -722,6 +740,7 @@ export function useOffers(
|
||||
* @param contract - an instance of a Marketplace contract
|
||||
* @returns a mutation object that can be used to create a new direct listing
|
||||
* @twfeature DirectListings
|
||||
* @see {@link https://portal.thirdweb.com/react/react.usecreatedirectlisting?utm_source=sdk | Documentation}
|
||||
*/
|
||||
export function useCreateDirectListing<
|
||||
TMarketplace extends Marketplace | MarketplaceV3,
|
||||
@@ -800,6 +819,7 @@ export function useCreateDirectListing<
|
||||
* @param contract - an instance of a Marketplace contract
|
||||
* @returns a mutation object that can be used to create a new auction listing
|
||||
* @twfeature EnglishAuctions
|
||||
* @see {@link https://portal.thirdweb.com/react/react.usecreateauctionlisting?utm_source=sdk | Documentation}
|
||||
*/
|
||||
export function useCreateAuctionListing<
|
||||
TMarketplace extends Marketplace | MarketplaceV3,
|
||||
@@ -877,6 +897,7 @@ 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(
|
||||
@@ -958,6 +979,7 @@ export function useCancelListing(
|
||||
* @param contract - an instance of a Marketplace v3 contract
|
||||
* @returns a mutation object that can be used to cancel a direct listing
|
||||
* @twfeature DirectListings
|
||||
* @see {@link https://portal.thirdweb.com/react/react.usecanceldirectlisting?utm_source=sdk | Documentation}
|
||||
*/
|
||||
export function useCancelDirectListing(contract: RequiredParam<MarketplaceV3>) {
|
||||
const activeChainId = useSDKChainId();
|
||||
@@ -1018,6 +1040,7 @@ export function useCancelDirectListing(contract: RequiredParam<MarketplaceV3>) {
|
||||
* @param contract - an instance of a Marketplace v3 contract
|
||||
* @returns a mutation object that can be used to cancel an english auction
|
||||
* @twfeature EnglishAuctions
|
||||
* @see {@link https://portal.thirdweb.com/react/react.usecancelenglishauction?utm_source=sdk | Documentation}
|
||||
*/
|
||||
export function useCancelEnglishAuction(
|
||||
contract: RequiredParam<MarketplaceV3>,
|
||||
@@ -1079,6 +1102,7 @@ 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>) {
|
||||
@@ -1137,6 +1161,7 @@ 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>) {
|
||||
@@ -1197,6 +1222,7 @@ export function useMakeOffer(contract: RequiredParam<Marketplace>) {
|
||||
*
|
||||
* @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.useacceptdirectlistingoffer?utm_source=sdk | Documentation}
|
||||
*/
|
||||
export function useAcceptDirectListingOffer(
|
||||
contract: RequiredParam<Marketplace>,
|
||||
@@ -1255,6 +1281,7 @@ 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>) {
|
||||
@@ -1312,6 +1339,7 @@ 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>) {
|
||||
|
||||
@@ -46,6 +46,7 @@ import invariant from "tiny-invariant";
|
||||
* @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}
|
||||
*/
|
||||
export function useNFT<TContract extends NFTContract>(
|
||||
contract: RequiredParam<TContract>,
|
||||
@@ -88,6 +89,7 @@ export function useNFT<TContract extends NFTContract>(
|
||||
* @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>(
|
||||
contract: RequiredParam<TContract>,
|
||||
@@ -130,6 +132,7 @@ export function useNFTs<TContract extends 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}
|
||||
*/
|
||||
export function useTotalCount<TContract extends NFTContract>(
|
||||
contract: RequiredParam<TContract>,
|
||||
@@ -178,6 +181,7 @@ export function useTotalCount<TContract extends NFTContract>(
|
||||
* @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}
|
||||
*/
|
||||
export function useTotalCirculatingSupply(
|
||||
contract: RequiredParam<NFTContract>,
|
||||
@@ -227,6 +231,7 @@ export function useTotalCirculatingSupply(
|
||||
* @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}
|
||||
*/
|
||||
export function useOwnedNFTs<TContract extends NFTContract>(
|
||||
contract: RequiredParam<TContract>,
|
||||
@@ -270,6 +275,7 @@ export function useOwnedNFTs<TContract extends NFTContract>(
|
||||
* @param tokenId - required for ERC1155, the tokenId to look up
|
||||
* @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(
|
||||
@@ -348,6 +354,7 @@ export function useNFTBalance(
|
||||
* @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}
|
||||
*/
|
||||
export function useMintNFT<TContract extends NFTContract>(
|
||||
contract: RequiredParam<TContract>,
|
||||
@@ -420,6 +427,7 @@ export function useMintNFT<TContract extends NFTContract>(
|
||||
* @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}
|
||||
*/
|
||||
export function useMintNFTSupply(contract: Erc1155) {
|
||||
const activeChainId = useSDKChainId();
|
||||
@@ -486,6 +494,7 @@ export function useMintNFTSupply(contract: Erc1155) {
|
||||
* @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}
|
||||
*/
|
||||
export function useTransferNFT<TContract extends NFTContract>(
|
||||
contract: RequiredParam<TContract>,
|
||||
@@ -569,6 +578,7 @@ export function useTransferNFT<TContract extends NFTContract>(
|
||||
* @param contract - an instance of a {@link Erc1155}
|
||||
* @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) {
|
||||
@@ -629,6 +639,7 @@ export function useAirdropNFT(contract: Erc1155) {
|
||||
* @param contract - an instance of a {@link NFTContract}
|
||||
* @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>(
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user