Compare commits

...
Author SHA1 Message Date
github-actions[bot]GitHubgithub-actions[bot] <github-actions[bot]@users.noreply.github.com>
b28c3a5a67 Version Packages (#1327)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2023-07-12 18:29:43 -07:00
Adam MajmudarandGitHub 4068219145 [Chains] Add support for base (#1326) 2023-07-13 00:25:33 +00:00
github-actions[bot]GitHubgithub-actions[bot] <github-actions[bot]@users.noreply.github.com>
03d1a6d73b Version Packages (#1311)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2023-07-11 14:34:02 -07:00
YashandGitHub fd74d79180 [Chains] Update chains: Linea Mainnet (#1320) 2023-07-11 17:42:19 +00:00
Jonas DanielsandGitHub 35f20ceb4f [all] add package resolutions (#1315) 2023-07-11 01:27:22 +00:00
iketwandGitHub db68bd04cd Passes API key to all packages (#1314) 2023-07-10 23:06:05 +00:00
Manan TankandGitHub 3df86ad16f [react] ConnectWallet UI fixes (#1310) 2023-07-10 15:42:50 +00:00
github-actions[bot]GitHubgithub-actions[bot] <github-actions[bot]@users.noreply.github.com>
4389083ca3 Version Packages (#1294)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2023-07-09 22:16:24 -07:00
Jonas DanielsandGitHub 4961b597a0 unblock storage (#1309) 2023-07-10 04:54:23 +00:00
nkrishangandGitHub 7e044c664d [SDK] Create ERC721LoyaltyCard and ERC721UpdatableMetadata (#1299) 2023-07-08 00:55:24 +00:00
iketwandGitHub 498df5d69a [RN] Fix ImageSvgUri render by trying Image first (#1306) 2023-07-07 16:47:53 +00:00
Nacho IacovinoandGitHub b8d4930305 [SDK] Add social_urls to CommonContractSchema (#1305) 2023-07-07 16:30:51 +00:00
Nacho IacovinoandGitHub 2c0bb07899 [SDK] Fix pack code snippets (#1304) 2023-07-07 15:24:34 +00:00
Joaquim VergesandGitHub 72ada47596 [SDK] Proper handling of custom contract metadata types (#1298) 2023-07-07 04:38:27 +00:00
iketwandGitHub dc9eee735c [RN] Improve svg rendering (#1300) 2023-07-07 00:46:12 +00:00
Adam MajmudarandGitHub b4aee9b591 [Wallets] Add all supported chains to safe server urls (#1301) 2023-07-07 00:38:39 +00:00
FirekeeperandGitHub b5c6eedb38 Firekeeper/default chains zksync (#1297) 2023-07-06 22:22:02 +00:00
iketwandGitHub 8672c8533c Ike/demo (#1283) 2023-07-06 22:08:04 +00:00
FirekeeperandGitHub bb207473f8 Firekeeper/default wallets wcv2 (#1293) 2023-07-06 21:00:46 +00:00
Tair AsimandGitHub 10b3a717da fix: handling authz errors from smart wallet connector (#1292) 2023-07-06 19:08:49 +00:00
Josh SteinandGitHub aa81bedaf2 deps: change Taro to Bubs testnet (#1289) 2023-07-06 03:56:52 +00:00
github-actions[bot]GitHubgithub-actions[bot] <github-actions[bot]@users.noreply.github.com>
b4676e1b4e Version Packages (#1279)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2023-07-04 11:48:14 -07:00
Jonas DanielsandGitHub 0135a7790c [storage] - fix head request schema (#1287) 2023-07-04 18:22:56 +00:00
Jonas DanielsandGitHub 2d088d367c [storage] - fix double / case (#1286) 2023-07-04 17:43:01 +00:00
Jonas DanielsandGitHub 546353a479 [storage] - add additional fallback gateways (#1285) 2023-07-04 17:08:03 +00:00
9daf044926 [STORAGE] Use subdomain-based paths for our IPFS gateway (#1232)
Co-authored-by: Jonas Daniels <[email protected]>
2023-07-04 16:14:05 +00:00
Kien NgoandGitHub 7054f9f016 Fix #1201 (#1282) 2023-07-01 00:48:32 +00:00
nkrishangandGitHub a3bb17cb33 [SDK] Handle ERC4337Signer correctly in signTypedDataInternal (#1281) 2023-06-30 23:30:29 +00:00
d03645aefd Omit marketplacev3 filter parameters that have no effect (#1221)
Co-authored-by: Jonas Daniels <[email protected]>
2023-06-30 23:22:24 +00:00
Mariano FuentesandGitHub 53626f8100 Don't rely on package.json to run export (#1280) 2023-06-30 16:59:43 +00:00
Jonas DanielsandGitHub 8a389f1295 [all] - update dependencies (#1278) 2023-06-30 02:55:20 +00:00
github-actions[bot]GitHubgithub-actions[bot] <github-actions[bot]@users.noreply.github.com>
4e5eb13b82 Version Packages (#1266)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2023-06-29 19:11:03 -07:00
2b11353909 [SDK] remove ethers/lib/utils dependency (#1277)
Co-authored-by: Jonas Daniels <[email protected]>
2023-06-30 01:10:47 +00:00
Manan TankandGitHub 5882091eab [chains] Fix RPC override issue (#1276) 2023-06-29 22:27:59 +00:00
Mariano FuentesandGitHub 8fc5f204b0 Fix bugs with cli deploy (#1274) 2023-06-29 18:11:25 +00:00
nkrishangandGitHub c953571588 mass rename smart-wallet -> account (#1271) 2023-06-29 12:26:48 +00:00
Manan TankandGitHub edcd22d612 [react-core] Add autoConnectTimeout (#1273) 2023-06-29 12:19:43 +00:00
iketwandGitHub 0d5503aae9 [RN] Only handle link if coinbase in supportedWallets (#1270) 2023-06-28 21:56:12 +00:00
Manan TankandGitHub 998e521733 [wallets, react] expose advancedOptions in paper (#1269) 2023-06-28 21:08:34 +00:00
FirekeeperandGitHub be606dd3c9 [paper] set signer null on disconnect (#1267) 2023-06-28 17:26:35 +00:00
d794b8f9f4 update: Add zerion to useInstalledWallets (#1210)
Co-authored-by: Jonas Daniels <[email protected]>
2023-06-28 16:50:36 +00:00
YashandGitHub 21b29490d4 [SDK] Tests for new publish+deploy flow (#1244) 2023-06-28 16:23:36 +00:00
github-actions[bot]GitHubgithub-actions[bot] <github-actions[bot]@users.noreply.github.com>
7b1d62b323 Version Packages (#1262)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2023-06-28 08:07:57 -07:00
Manan TankandGitHub e78da6b36c [wallets] Wallet connect v2 corrections (#1265) 2023-06-28 13:34:42 +00:00
ed711c8cb2 [Wallets] Use min number of chains if user passes more than 50 chains (#1263)
Co-authored-by: Manan Tank <[email protected]>
2023-06-28 12:04:28 +00:00
05a7495a13 [Wallets] handle passing RPC urls to SmartWallet config (#1255)
Co-authored-by: Jonas Daniels <[email protected]>
2023-06-28 07:20:04 +00:00
github-actions[bot]GitHubgithub-actions[bot] <github-actions[bot]@users.noreply.github.com>
11bb053246 Version Packages (#1261)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2023-06-27 22:16:09 -07:00
efb3546ec8 [Wallets] Fix. Respect dev passed chains. (#1259)
Co-authored-by: Manan Tank <[email protected]>
2023-06-28 05:07:24 +00:00
github-actions[bot]GitHubgithub-actions[bot] <github-actions[bot]@users.noreply.github.com>
0a5d2b5bdd Version Packages (#1247)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2023-06-27 17:36:21 -07:00
FirekeeperandGitHub ac3e019cd1 [unity-js-bridge] wcv2 and paper support (#1256) 2023-06-28 00:28:16 +00:00
3c5dc4804a Migration to WalletConnectV2 (#1215)
Co-authored-by: Manan Tank <[email protected]>
2023-06-28 00:04:07 +00:00
Joaquim VergesandGitHub 30ac3aef84 [SDK] Handle base64 encoded NFTs (#1254) 2023-06-27 23:31:52 +00:00
YashandGitHub ef4cb09219 [SDK] Any EVM deployments: update EIP155 error substrings (#1249) 2023-06-27 22:55:16 +00:00
ad7dae3b16 [React] Stop using useActiveChain deprecated hook (#1253)
Co-authored-by: Nacho Iacovino <[email protected]>
2023-06-27 21:50:28 +00:00
0fd8aa04a9 fix(chains): Celo Alfajores Explorer URL (#1243)
Co-authored-by: Joaquim Verges <[email protected]>
Co-authored-by: Jonas Daniels <[email protected]>
2023-06-27 19:37:23 +00:00
620e89dc25 [React] Export smart wallet hooks (#1248)
Co-authored-by: Jonas Daniels <[email protected]>
2023-06-27 19:01:45 +00:00
Nacho IacovinoandGitHub 86d33c4b3e [React] Fix marketplace v3 cache keys (#1251) 2023-06-27 18:06:30 +00:00
Adam MajmudarandGitHub d43f6171d9 Allow setting login payload duration (#1250) 2023-06-27 18:04:33 +00:00
06ca1c407d [SDK] Add tests for SmartWallet and SmartWalletFactory; add smartWallet.setAccess and smartWallet.isAdmin (#1227)
Co-authored-by: Nacho Iacovino <[email protected]>
Co-authored-by: Nacho Iacovino <[email protected]>
2023-06-27 01:57:33 +00:00
github-actions[bot]GitHubgithub-actions[bot] <github-actions[bot]@users.noreply.github.com>
c578a437cc Version Packages (#1234)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2023-06-26 18:42:04 -07:00
Danny FridayandGitHub 0c5b03b8d6 Remove ipfs-2 gateway (#1246) 2023-06-27 00:31:06 +00:00
nkrishangandGitHub 9af346eead [SDK][React] SmartWalletFactory: use getAllAccounts instead of event logs of AccountCreated to get accounts of a factory (#1241) 2023-06-26 17:51:22 +00:00
iketwandGitHub d9fb134ad4 [RN] better design for custom details button (#1245) 2023-06-26 15:25:19 +00:00
Mariano FuentesandGitHub 1c7264b403 Fix install bug (#1240) 2023-06-24 00:59:52 +00:00
Joaquim VergesandGitHub a140ee99b2 add zora extension in auto docs (#1239) 2023-06-24 00:23:07 +00:00
iketwandGitHub 6e1fe6e582 [React] Add Rainbow and Trust wallets connection hooks (#1238) 2023-06-23 23:06:59 +00:00
iketwandGitHub 536b0f1240 [React] Add Rainbow Wallet (#1237) 2023-06-23 22:11:40 +00:00
b626782b0e [React/Wallets] Add Trust Wallet (#1236)
Co-authored-by: Manan Tank <[email protected]>
2023-06-23 21:23:13 +00:00
Nacho IacovinoandGitHub 1d76334dd3 [React] Fix required type for address on useSmartWalletsForAddress (#1235) 2023-06-23 18:44:00 +00:00
nkrishangandGitHub d498c79a91 [SDK] Fix smartWalletFactory.getAllWallets (#1233) 2023-06-23 18:20:03 +00:00
github-actions[bot]GitHubgithub-actions[bot] <github-actions[bot]@users.noreply.github.com>
736b45ac8e Version Packages (#1211)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2023-06-23 10:33:33 -07:00
Nacho IacovinoandGitHub b5e1d3bb2b [React] Add useSmartWalletsForAddress hook (#1230) 2023-06-23 12:00:37 +00:00
Jonas DanielsandGitHub 6816219ac1 [chains] - add/update chains (#1229) 2023-06-22 23:57:03 +00:00
Nacho IacovinoandGitHub 48065bcd91 [SDK] Accept string in shared metadata (#1222) 2023-06-22 23:39:34 +00:00
Manan TankandGitHub a388d07a3d Add Magic Connect support (#1226) 2023-06-22 20:28:04 +00:00
Nacho IacovinoandGitHub 483e2b9109 [SDK] Fix namespace for platformFees (#1225) 2023-06-22 19:24:04 +00:00
Nacho IacovinoandGitHub f7f4f20737 [React + SDK] Better return type for get shared metadata (#1224) 2023-06-22 18:46:57 +00:00
Joaquim VergesandGitHub 6aa6f7e0bd [SDK] fix maxId in getAll for Open Edition contracts (#1223) 2023-06-22 03:42:24 +00:00
d4d9550713 [React + SDK] Add get shared metadata (#1218)
Co-authored-by: Jonas Daniels <[email protected]>
2023-06-22 01:56:48 +00:00
iketwandGitHub 3cb298ac4b [RN/Wallets] Fix Coinbase Wallet connection rejection error (#1220) 2023-06-22 00:29:24 +00:00
Joaquim VergesandGitHub c747670b98 [SDK] Fix nextTokenIdToMint for open edition (#1219) 2023-06-22 00:08:55 +00:00
Joaquim VergesandGitHub c08e6ba988 [SDK] Fix claim counts for Open Edition contracts (#1216) 2023-06-21 23:49:27 +00:00
Manan TankandGitHub 60fb188943 [react] Fix safeWallet tree-shaking (#1212) 2023-06-21 20:17:13 +00:00
iketwandGitHub 1ce8558df4 [Wallets] Fix switchChain in WCV2 connector (#1214) 2023-06-21 16:28:16 +00:00
iketwandGitHub 3ce5f9a0c3 [RC/Wallets] Improve error messages for wc and auth (#1213) 2023-06-21 15:45:03 +00:00
3d615a62d0 [SDK] Code abstraction; import/export updates (#1188)
Co-authored-by: Manan Tank <[email protected]>
2023-06-21 14:40:12 +00:00
348 changed files with 56268 additions and 25668 deletions
+26 -7
View File
@@ -34,22 +34,41 @@
"packageManager": "[email protected]",
"dependencies": {
"@changesets/changelog-github": "^0.4.8",
"@changesets/cli": "^2.26.1",
"@changesets/get-dependents-graph": "^1.3.5",
"@changesets/get-release-plan": "^3.0.16",
"@changesets/cli": "^2.26.2",
"@changesets/get-dependents-graph": "^1.3.6",
"@changesets/get-release-plan": "^3.0.17",
"@changesets/parse": "^0.3.16",
"@manypkg/cli": "^0.20.0",
"@manypkg/get-packages": "^1.1.3",
"@playwright/test": "1.31.2",
"@trivago/prettier-plugin-sort-imports": "^4.1.1",
"@types/node": "^18.15.11",
"eslint": "^8.42.0",
"@types/node": "^18.16.18",
"eslint": "^8.43.0",
"mocha": "^10.2.0",
"prettier": "^2.8.7",
"turbo": "^1.9.8",
"prettier": "^2.8.8",
"turbo": "^1.10.6",
"yalc": "1.0.0-pre.53"
},
"manypkg": {
"defaultBranch": "main"
},
"pnpm": {
"overrides": {
"cross-fetch@>=3.0.0 <3.1.5": ">=3.1.5",
"got@<11.8.5": ">=11.8.5",
"glob-parent@<5.1.2": ">=5.1.2",
"node-fetch@<2.6.7": ">=2.6.7",
"nth-check@<2.0.1": ">=2.0.1",
"socket.io-parser@>=4.0.4 <4.2.3": ">=4.2.3",
"fast-xml-parser@<4.2.4": ">=4.2.4",
"@openzeppelin/contracts@>=4.3.0 <4.9.1": ">=4.9.1",
"@openzeppelin/contracts@>=4.7.0 <4.9.2": ">=4.9.2",
"xml2js@<0.5.0": ">=0.5.0",
"engine.io@>=5.1.0 <6.4.2": ">=6.4.2",
"semver@<7.5.2": ">=7.5.2",
"json5@<1.0.2": ">=1.0.2",
"protobufjs@>=6.10.0 <7.2.4": ">=7.2.4",
"tough-cookie@<4.1.3": ">=4.1.3"
}
}
}
+74
View File
@@ -1,5 +1,79 @@
# @thirdweb-dev/auth
## 3.2.11
### Patch Changes
- Updated dependencies []:
- @thirdweb-dev/wallets@1.0.7
## 3.2.10
### Patch Changes
- Updated dependencies []:
- @thirdweb-dev/wallets@1.0.6
## 3.2.9
### Patch Changes
- Updated dependencies [[`10b3a717`](https://github.com/thirdweb-dev/js/commit/10b3a717da606632a05769ac821bdd21d6b63a03), [`b4aee9b5`](https://github.com/thirdweb-dev/js/commit/b4aee9b59121bab5f9b3d9b7ecdc4bcb4cd66f58)]:
- @thirdweb-dev/wallets@1.0.5
## 3.2.8
### Patch Changes
- [#1278](https://github.com/thirdweb-dev/js/pull/1278) [`8a389f12`](https://github.com/thirdweb-dev/js/commit/8a389f1295d2bf726059997ea0ca10cf0424f2a2) Thanks [@jnsdls](https://github.com/jnsdls)! - updated various dependencies
- Updated dependencies [[`8a389f12`](https://github.com/thirdweb-dev/js/commit/8a389f1295d2bf726059997ea0ca10cf0424f2a2)]:
- @thirdweb-dev/wallets@1.0.4
## 3.2.7
### Patch Changes
- Updated dependencies [[`2b113539`](https://github.com/thirdweb-dev/js/commit/2b113539098384f910b3c4d54e1fde9d35a6f053), [`be606dd3`](https://github.com/thirdweb-dev/js/commit/be606dd3c93c1514834c1d970e864d7f949a07ab), [`998e5217`](https://github.com/thirdweb-dev/js/commit/998e521733efd6a67e42f9bf0beab5fbdccf08ae)]:
- @thirdweb-dev/wallets@1.0.3
## 3.2.6
### Patch Changes
- Updated dependencies [[`ed711c8c`](https://github.com/thirdweb-dev/js/commit/ed711c8cb2ed6a0deb1b2a5eeec06df1d4edc5e8), [`05a7495a`](https://github.com/thirdweb-dev/js/commit/05a7495a132aabab5f48abbdb80a468ff6f65df8), [`e78da6b3`](https://github.com/thirdweb-dev/js/commit/e78da6b36cfa6d954234820563201bf760186ed1)]:
- @thirdweb-dev/wallets@1.0.2
## 3.2.5
### Patch Changes
- Updated dependencies [[`efb3546e`](https://github.com/thirdweb-dev/js/commit/efb3546ec8268156be00301af28b9d83ecd5ab08)]:
- @thirdweb-dev/wallets@1.0.1
## 3.2.4
### Patch Changes
- [#1250](https://github.com/thirdweb-dev/js/pull/1250) [`d43f6171`](https://github.com/thirdweb-dev/js/commit/d43f6171d910e31b748b171b012174390aac3fff) Thanks [@adam-maj](https://github.com/adam-maj)! - Allow setting login payload validity duration
- Updated dependencies [[`ac3e019c`](https://github.com/thirdweb-dev/js/commit/ac3e019cd1776dbdb0d06b213420ad17586f678e), [`3c5dc480`](https://github.com/thirdweb-dev/js/commit/3c5dc4804abc56b933ec45e9e1da11eb182296cc)]:
- @thirdweb-dev/wallets@1.0.0
## 3.2.3
### Patch Changes
- Updated dependencies [[`536b0f12`](https://github.com/thirdweb-dev/js/commit/536b0f1240ab446aac22cf547a4e09e73ee6bf7b), [`b626782b`](https://github.com/thirdweb-dev/js/commit/b626782b0e8c6b76673472d3aee1c802dfb11b5f)]:
- @thirdweb-dev/wallets@0.3.3
## 3.2.2
### Patch Changes
- Updated dependencies [[`3cb298ac`](https://github.com/thirdweb-dev/js/commit/3cb298ac4b04d295899b5ac77c7fc5869ec2f5f2), [`3ce5f9a0`](https://github.com/thirdweb-dev/js/commit/3ce5f9a0c3fc7e99b5abf691a87048ab8475f6b1), [`a388d07a`](https://github.com/thirdweb-dev/js/commit/a388d07a3d449e56dc53fed9600931022f4a15e1), [`1ce8558d`](https://github.com/thirdweb-dev/js/commit/1ce8558df47186bcba5ee8564fdb04583bf115dd), [`60fb1889`](https://github.com/thirdweb-dev/js/commit/60fb18894372f14d9cd815fa9a239926d31bb273)]:
- @thirdweb-dev/wallets@0.3.2
## 3.2.1
### Patch Changes
+19 -19
View File
@@ -1,6 +1,6 @@
{
"name": "@thirdweb-dev/auth",
"version": "3.2.1",
"version": "3.2.11",
"main": "dist/thirdweb-dev-auth.cjs.js",
"module": "dist/thirdweb-dev-auth.esm.js",
"browser": {
@@ -80,29 +80,29 @@
}
},
"devDependencies": {
"@babel/core": "^7.19.3",
"@babel/preset-env": "^7.18.10",
"@babel/preset-typescript": "^7.18.6",
"@microsoft/api-documenter": "^7.19.4",
"@microsoft/api-extractor": "^7.29.2",
"@babel/core": "^7.22.5",
"@babel/preset-env": "^7.22.5",
"@babel/preset-typescript": "^7.22.5",
"@microsoft/api-documenter": "^7.22.21",
"@microsoft/api-extractor": "^7.36.0",
"@microsoft/tsdoc": "^0.14.1",
"@preconstruct/cli": "^2.2.1",
"@preconstruct/cli": "^2.7.0",
"@solana/web3.js": "^1.62.0",
"@swc-node/register": "^1.5.1",
"@swc/core": "^1.3.23",
"@swc-node/register": "^1.6.6",
"@swc/core": "^1.3.67",
"@thirdweb-dev/tsconfig": "workspace:*",
"@types/chai": "^4.3.3",
"@types/chai": "^4.3.5",
"@types/cookie": "^0.5.1",
"@types/cookie-parser": "^1.4.3",
"@types/express": "^4.17.13",
"@types/mocha": "^10.0.0",
"@types/uuid": "^9.0.0",
"@typescript-eslint/eslint-plugin": "^5.33.0",
"@typescript-eslint/parser": "^5.33.0",
"@types/uuid": "^9.0.2",
"@typescript-eslint/eslint-plugin": "^5.60.1",
"@typescript-eslint/parser": "^5.60.1",
"chai": "^4.3.6",
"cookie-parser": "^1.4.6",
"eslint": "^8.42.0",
"eslint-config-prettier": "^8.3.0",
"eslint": "^8.43.0",
"eslint-config-prettier": "^8.8.0",
"eslint-config-thirdweb": "workspace:*",
"eslint-plugin-import": "^2.26.0",
"eslint-plugin-inclusive-language": "^2.2.0",
@@ -111,10 +111,10 @@
"ethers": "^5.7.2",
"express": "^4.18.1",
"mocha": "^10.2.0",
"next": "^12.2.0",
"next-auth": "^4.20.1",
"prettier": "^2.7.1",
"typescript": "^4.7.4"
"next": "^12.3.4",
"next-auth": "^4.22.1",
"prettier": "^2.8.8",
"typescript": "^5.1.6"
},
"peerDependencies": {
"@solana/web3.js": "^1.73.0",
@@ -25,6 +25,11 @@ export default async function handler(
version: ctx.authOptions?.version,
chainId: parsedPayload.data.chainId || ctx.authOptions?.chainId,
resources: ctx.authOptions?.resources,
expirationTime: ctx.authOptions?.loginPayloadDurationInSeconds
? new Date(
Date.now() + 1000 * ctx.authOptions.loginPayloadDurationInSeconds,
)
: undefined,
});
return res.status(200).json({ payload });
+1
View File
@@ -44,6 +44,7 @@ export type ThirdwebAuthConfig<
validateTokenId?:
| ((tokenId: string) => void)
| ((tokenId: string) => Promise<void>);
loginPayloadDurationInSeconds?: number;
tokenDurationInSeconds?: number;
refreshIntervalInSeconds?: number;
};
+5
View File
@@ -25,6 +25,11 @@ export default async function handler(
version: ctx.authOptions?.version,
chainId: parsedPayload.data.chainId || ctx.authOptions?.chainId,
resources: ctx.authOptions?.resources,
expirationTime: ctx.authOptions?.loginPayloadDurationInSeconds
? new Date(
Date.now() + 1000 * ctx.authOptions.loginPayloadDurationInSeconds,
)
: undefined,
});
return res.status(200).json({ payload });
+1
View File
@@ -55,6 +55,7 @@ export type ThirdwebAuthConfig<
validateTokenId?:
| ((tokenId: string) => void)
| ((tokenId: string) => Promise<void>);
loginPayloadDurationInSeconds?: number;
tokenDurationInSeconds?: number;
refreshIntervalInSeconds?: number;
};
+58
View File
@@ -1,5 +1,63 @@
# @thirdweb-dev/chains
## 0.1.30
### Patch Changes
- [#1326](https://github.com/thirdweb-dev/js/pull/1326) [`40682191`](https://github.com/thirdweb-dev/js/commit/40682191450de08ad40b9d2957afced248657af2) Thanks [@adam-maj](https://github.com/adam-maj)! - Add base chain support
## 0.1.29
### Patch Changes
- [#1320](https://github.com/thirdweb-dev/js/pull/1320) [`fd74d791`](https://github.com/thirdweb-dev/js/commit/fd74d7918072cda03b52f852ebb3f8dccb84074d) Thanks [@kumaryash90](https://github.com/kumaryash90)! - Linea mainnet support
- [#1315](https://github.com/thirdweb-dev/js/pull/1315) [`35f20ceb`](https://github.com/thirdweb-dev/js/commit/35f20ceb4f943e95d9566105096f06412978da7a) Thanks [@jnsdls](https://github.com/jnsdls)! - add more chains
## 0.1.28
### Patch Changes
- [#1299](https://github.com/thirdweb-dev/js/pull/1299) [`7e044c66`](https://github.com/thirdweb-dev/js/commit/7e044c664d8a034f5324b859ac3596860c86f9a5) Thanks [@nkrishang](https://github.com/nkrishang)! - Add ERC721LoyaltyCard and ERC721UpdatableMetadata
- [#1297](https://github.com/thirdweb-dev/js/pull/1297) [`b5c6eedb`](https://github.com/thirdweb-dev/js/commit/b5c6eedb38aa3c52eb97f3d25ad83e38c55afe61) Thanks [@0xFirekeeper](https://github.com/0xFirekeeper)! - add zksync as default chain
- [#1309](https://github.com/thirdweb-dev/js/pull/1309) [`4961b597`](https://github.com/thirdweb-dev/js/commit/4961b597a098dae0a4eff01a9ef268a65fe1a352) Thanks [@jnsdls](https://github.com/jnsdls)! - unblock storage domains
## 0.1.27
### Patch Changes
- [#1278](https://github.com/thirdweb-dev/js/pull/1278) [`8a389f12`](https://github.com/thirdweb-dev/js/commit/8a389f1295d2bf726059997ea0ca10cf0424f2a2) Thanks [@jnsdls](https://github.com/jnsdls)! - updated various dependencies
- [#1281](https://github.com/thirdweb-dev/js/pull/1281) [`a3bb17cb`](https://github.com/thirdweb-dev/js/commit/a3bb17cb33f033846fb3b4c8a0a4809ba76cab96) Thanks [@nkrishang](https://github.com/nkrishang)! - Handle ERC4337Signer correctly for signTypedData
## 0.1.26
### Patch Changes
- [#1276](https://github.com/thirdweb-dev/js/pull/1276) [`5882091e`](https://github.com/thirdweb-dev/js/commit/5882091eab65978009a5a5305701f121851b10ad) Thanks [@MananTank](https://github.com/MananTank)! - Do not change order or RPCs in `getChainRPCs` to Fix RPC override issue
## 0.1.25
### Patch Changes
- [#1248](https://github.com/thirdweb-dev/js/pull/1248) [`620e89dc`](https://github.com/thirdweb-dev/js/commit/620e89dc25c91557e2164a602c7aedd733525087) Thanks [@nachoiacovino](https://github.com/nachoiacovino)! - update chains
- [#1243](https://github.com/thirdweb-dev/js/pull/1243) [`0fd8aa04`](https://github.com/thirdweb-dev/js/commit/0fd8aa04a9424497758d13a51a72363edcc30e19) Thanks [@therealharpaljadeja](https://github.com/therealharpaljadeja)! - update chains
## 0.1.24
### Patch Changes
- [#1241](https://github.com/thirdweb-dev/js/pull/1241) [`9af346ee`](https://github.com/thirdweb-dev/js/commit/9af346eeada1037be27c8d3c9e1777f7be11a8ea) Thanks [@nkrishang](https://github.com/nkrishang)! - Use fn getAllAccounts instead of event logs AccountCreated
## 0.1.23
### Patch Changes
- [#1229](https://github.com/thirdweb-dev/js/pull/1229) [`6816219a`](https://github.com/thirdweb-dev/js/commit/6816219ac13ae571a0c90db6ab389c319bc1f052) Thanks [@jnsdls](https://github.com/jnsdls)! - add/update chains
## 0.1.22
### Patch Changes
+1 -1
View File
@@ -10,9 +10,9 @@ export default {
},
"rpc": [
"https://ethereum.rpc.thirdweb.com/${THIRDWEB_API_KEY}",
"https://eth-mainnet.g.alchemy.com/v2/${ALCHEMY_API_KEY}",
"https://mainnet.infura.io/v3/${INFURA_API_KEY}",
"wss://mainnet.infura.io/ws/v3/${INFURA_API_KEY}",
"https://eth-mainnet.g.alchemy.com/v2/${ALCHEMY_API_KEY}",
"https://api.mycryptoapi.com/eth",
"https://cloudflare-eth.com",
"https://ethereum.publicnode.com"
+2 -2
View File
@@ -1,11 +1,11 @@
import type { Chain } from "../src/types";
export default {
"name": "Optimism",
"name": "OP Mainnet",
"chain": "ETH",
"rpc": [
"https://optimism.rpc.thirdweb.com/${THIRDWEB_API_KEY}",
"https://opt-mainnet.g.alchemy.com/v2/${ALCHEMY_API_KEY}",
"https://optimism-mainnet.infura.io/v3/${INFURA_API_KEY}",
"https://opt-mainnet.g.alchemy.com/v2/${ALCHEMY_API_KEY}",
"https://mainnet.optimism.io/"
],
"faucets": [],
@@ -20,12 +20,12 @@ export default {
"nativeCurrency": {
"name": "SMR",
"symbol": "SMR",
"decimals": 18
"decimals": 6
},
"infoURL": "https://shimmer.network",
"shortName": "shimmerevm-testnet",
"chainId": 1071,
"networkId": 1071,
"chainId": 1072,
"networkId": 1072,
"explorers": [
{
"name": "explorer",
+35
View File
@@ -0,0 +1,35 @@
import type { Chain } from "../src/types";
export default {
"name": "Mintara Testnet",
"title": "Mintara Testnet",
"chain": "Mintara",
"icon": {
"url": "ipfs://bafybeie7jzlzlpz7c3a3oh4x5joej23dj2qf3cexmchjyc72hv3fblcaja",
"width": 256,
"height": 256,
"format": "png"
},
"rpc": [
"https://mintara-testnet.rpc.thirdweb.com/${THIRDWEB_API_KEY}",
"https://subnets.avax.network/mintara/testnet/rpc"
],
"faucets": [],
"nativeCurrency": {
"name": "MINTARA",
"symbol": "MNTR",
"decimals": 18
},
"infoURL": "https://playthink.co.jp",
"shortName": "mintara-testnet",
"chainId": 1079,
"networkId": 1079,
"explorers": [
{
"name": "explorer",
"url": "https://subnets-test.avax.network/mintara",
"standard": "EIP3091"
}
],
"testnet": true,
"slug": "mintara-testnet"
} as const satisfies Chain;
+41
View File
@@ -0,0 +1,41 @@
import type { Chain } from "../src/types";
export default {
"name": "Metachain One Mainnet",
"chain": "METAO",
"icon": {
"url": "ipfs://QmTmo2QAtX5PbhX96vewnvH4Vc5H83Ft2DJGi6tAqTcFij",
"width": 1000,
"height": 981,
"format": "png"
},
"rpc": [
"https://metachain-one.rpc.thirdweb.com/${THIRDWEB_API_KEY}",
"https://rpc.metachain.one",
"https://rpc2.metachain.one"
],
"faucets": [],
"nativeCurrency": {
"name": "Metao",
"symbol": "METAO",
"decimals": 18
},
"infoURL": "https://metachain.one",
"shortName": "metao",
"chainId": 112358,
"networkId": 112358,
"explorers": [
{
"name": "blockscout",
"url": "https://explorer.metachain.one",
"icon": {
"url": "ipfs://bafybeifu5tpui7dk5cjoo54kde7pmuthvnl7sdykobuarsxgu7t2izurnq",
"width": 512,
"height": 512,
"format": "png"
},
"standard": "EIP3091"
}
],
"testnet": false,
"slug": "metachain-one"
} as const satisfies Chain;
+36
View File
@@ -0,0 +1,36 @@
import type { Chain } from "../src/types";
export default {
"name": "BRC Chain Mainnet",
"chain": "BRC",
"rpc": [
"https://brc-chain.rpc.thirdweb.com/${THIRDWEB_API_KEY}",
"https://rpc.brcchain.io"
],
"faucets": [
"https://faucet.brcchain.io"
],
"nativeCurrency": {
"name": "BRC Chain mainnet native token",
"symbol": "BRC",
"decimals": 18
},
"infoURL": "https://bridge.brcchain.io",
"shortName": "BRC",
"chainId": 12123,
"networkId": 12123,
"icon": {
"url": "ipfs://QmX8qGX7xoZqYUpHxA85uZwQX2fgbTHvmddE1NfseDyBED",
"width": 512,
"height": 512,
"format": "png"
},
"explorers": [
{
"name": "BRC Chain Explorer",
"url": "https://scan.brcchain.io",
"standard": "EIP3091"
}
],
"testnet": false,
"slug": "brc-chain"
} as const satisfies Chain;
+1 -1
View File
@@ -10,8 +10,8 @@ export default {
},
"rpc": [
"https://polygon.rpc.thirdweb.com/${THIRDWEB_API_KEY}",
"https://polygon-mainnet.g.alchemy.com/v2/${ALCHEMY_API_KEY}",
"https://polygon-mainnet.infura.io/v3/${INFURA_API_KEY}",
"https://polygon-mainnet.g.alchemy.com/v2/${ALCHEMY_API_KEY}",
"https://polygon-rpc.com/",
"https://rpc-mainnet.matic.network",
"https://matic-mainnet.chainstacklabs.com",
+9 -9
View File
@@ -1,8 +1,8 @@
import type { Chain } from "../src/types";
export default {
"name": "Taro Testnet",
"name": "Bubs Testnet",
"chain": "gETH",
"shortName": "Taro",
"shortName": "Bubs",
"chainId": 1582,
"testnet": true,
"icon": {
@@ -12,8 +12,8 @@ export default {
"height": 512
},
"rpc": [
"https://taro-testnet.rpc.thirdweb.com/${THIRDWEB_API_KEY}",
"https://taro-testnet.calderachain.xyz/http"
"https://bubs-testnet.rpc.thirdweb.com/${THIRDWEB_API_KEY}",
"https://bubs.calderachain.xyz/http"
],
"nativeCurrency": {
"decimals": 18,
@@ -22,15 +22,15 @@ export default {
},
"explorers": [
{
"url": "https://explorer.tarotestnet.com",
"name": "Taro Testnet Explorer",
"url": "https://explorer.bubstestnet.com",
"name": "Bubs Testnet Explorer",
"standard": "EIP3091"
}
],
"faucets": [
"https://tarotestnet.com"
"https://bubstestnet.com"
],
"infoURL": "https://tarotestnet.com",
"infoURL": "https://bubstestnet.com",
"networkId": 1582,
"slug": "taro-testnet"
"slug": "bubs-testnet"
} as const satisfies Chain;
+2 -2
View File
@@ -4,7 +4,7 @@ export default {
"chain": "ATH",
"rpc": [
"https://atheios.rpc.thirdweb.com/${THIRDWEB_API_KEY}",
"https://wallet.atheios.com:8797"
"https://rpc.atheios.org/"
],
"faucets": [],
"nativeCurrency": {
@@ -12,7 +12,7 @@ export default {
"symbol": "ATH",
"decimals": 18
},
"infoURL": "https://atheios.com",
"infoURL": "https://atheios.org",
"shortName": "ath",
"chainId": 1620,
"networkId": 11235813,
-51
View File
@@ -1,51 +0,0 @@
import type { Chain } from "../src/types";
export default {
"name": "Horizen Yuma Testnet",
"shortName": "Yuma",
"chain": "Yuma",
"icon": {
"url": "ipfs://QmSFMBk3rMyu45Sy9KQHjgArFj4HdywANNYrSosLMUdcti",
"width": 1213,
"height": 1213,
"format": "png"
},
"rpc": [
"https://horizen-yuma-testnet.rpc.thirdweb.com/${THIRDWEB_API_KEY}",
"https://yuma-testnet.horizenlabs.io/ethv1"
],
"features": [
{
"name": "EIP155"
},
{
"name": "EIP1559"
}
],
"faucets": [
"https://yuma-testnet-faucet.horizen.io"
],
"nativeCurrency": {
"name": "Testnet Zen",
"symbol": "tZEN",
"decimals": 18
},
"infoURL": "https://horizen.io/",
"chainId": 1662,
"networkId": 1662,
"slip44": 121,
"explorers": [
{
"name": "Yuma Testnet Block Explorer",
"url": "https://yuma-explorer.horizen.io",
"icon": {
"url": "ipfs://QmSFMBk3rMyu45Sy9KQHjgArFj4HdywANNYrSosLMUdcti",
"width": 1213,
"height": 1213,
"format": "png"
},
"standard": "EIP3091"
}
],
"testnet": true,
"slug": "horizen-yuma-testnet"
} as const satisfies Chain;
+2 -1
View File
@@ -11,7 +11,8 @@ export default {
},
"rpc": [
"https://horizen-gobi-testnet.rpc.thirdweb.com/${THIRDWEB_API_KEY}",
"https://gobi-testnet.horizenlabs.io/ethv1"
"https://gobi-testnet.horizenlabs.io/ethv1",
"https://rpc.ankr.com/horizen_testnet_evm"
],
"features": [
{
+34
View File
@@ -0,0 +1,34 @@
import type { Chain } from "../src/types";
export default {
"name": "MXC zkEVM Mainnet",
"chain": "MXC zkEVM",
"icon": {
"url": "ipfs://QmdGCthKA11K9kCZJdbTP5WPAyq1wiRZ3REn6KG58MrWaE",
"width": 159,
"height": 159,
"format": "png"
},
"rpc": [
"https://mxc-zkevm.rpc.thirdweb.com/${THIRDWEB_API_KEY}",
"https://rpc.mxc.com"
],
"faucets": [],
"nativeCurrency": {
"name": "MXC zkEVM Mainnet",
"symbol": "MXC",
"decimals": 18
},
"infoURL": "https://doc.mxc.com/docs/intro",
"shortName": "MXCzkEVM",
"chainId": 18686,
"networkId": 18686,
"explorers": [
{
"name": "MXC zkEVM Mainnet",
"url": "https://explorer.mxc.com",
"standard": "EIP3091"
}
],
"testnet": false,
"slug": "mxc-zkevm"
} as const satisfies Chain;
+37
View File
@@ -0,0 +1,37 @@
import type { Chain } from "../src/types";
export default {
"name": "Pego Network",
"chain": "PEGO",
"rpc": [
"https://pego-network.rpc.thirdweb.com/${THIRDWEB_API_KEY}",
"https://pegorpc.com",
"https://node1.pegorpc.com",
"https://node2.pegorpc.com",
"https://node3.pegorpc.com"
],
"faucets": [],
"nativeCurrency": {
"name": "Pego Native Token",
"symbol": "PG",
"decimals": 18
},
"infoURL": "https://pego.network",
"shortName": "pg",
"chainId": 20201022,
"networkId": 20201022,
"icon": {
"url": "ipfs://QmVf1afskRHuZjFSLCZH8397KrVNAoYgyAePX9VMBrPVtx",
"width": 246,
"height": 247,
"format": "png"
},
"explorers": [
{
"name": "Pego Network Explorer",
"url": "https://scan.pego.network",
"standard": "EIP3091"
}
],
"testnet": false,
"slug": "pego-network"
} as const satisfies Chain;
+44
View File
@@ -0,0 +1,44 @@
import type { Chain } from "../src/types";
export default {
"name": "Moonsama Network",
"chain": "MSN",
"rpc": [
"https://moonsama-network.rpc.thirdweb.com/${THIRDWEB_API_KEY}",
"https://rpc.moonsama.com",
"wss://rpc.moonsama.com/ws"
],
"faucets": [
"https://multiverse.moonsama.com/faucet"
],
"nativeCurrency": {
"name": "Sama Token",
"symbol": "SAMA",
"decimals": 18
},
"infoURL": "https://moonsama.com",
"shortName": "msn",
"chainId": 2199,
"networkId": 2199,
"slip44": 2199,
"icon": {
"url": "ipfs://QmaQxfwpXYTomUd24PMx5tKjosupXcm99z1jL1XLq9LWBS",
"width": 468,
"height": 468,
"format": "png"
},
"explorers": [
{
"name": "blockscout",
"url": "https://explorer.moonsama.com",
"icon": {
"url": "ipfs://bafybeifu5tpui7dk5cjoo54kde7pmuthvnl7sdykobuarsxgu7t2izurnq",
"width": 512,
"height": 512,
"format": "png"
},
"standard": "EIP3091"
}
],
"testnet": false,
"slug": "moonsama-network"
} as const satisfies Chain;
+36
View File
@@ -0,0 +1,36 @@
import type { Chain } from "../src/types";
export default {
"name": "Plinga Mainnet",
"chain": "Plinga",
"icon": {
"url": "ipfs://bafybeibpvlod5nyev6wyuvp6pbestmgvru3ovbadsul32odpno26xwld6y",
"width": 1039,
"height": 1022,
"format": "svg"
},
"rpc": [
"https://plinga.rpc.thirdweb.com/${THIRDWEB_API_KEY}",
"https://rpcurl.mainnet.plgchain.com",
"https://rpcurl.plgchain.blockchain.evmnode.online",
"https://rpcurl.mainnet.plgchain.plinga.technology"
],
"faucets": [],
"nativeCurrency": {
"name": "Plinga",
"symbol": "PLINGA",
"decimals": 18
},
"infoURL": "https://www.plinga.technology/",
"shortName": "plgchain",
"chainId": 242,
"networkId": 242,
"explorers": [
{
"name": "plgscan",
"url": "https://www.plgscan.com",
"standard": "EIP3091"
}
],
"testnet": false,
"slug": "plinga"
} as const satisfies Chain;
+6 -1
View File
@@ -4,7 +4,12 @@ export default {
"chain": "ETH",
"rpc": [
"https://boba-network.rpc.thirdweb.com/${THIRDWEB_API_KEY}",
"https://mainnet.boba.network/"
"https://mainnet.boba.network",
"https://replica.boba.network",
"http://boba-ethereum.gateway.tenderly.co",
"http://gateway.tenderly.co/public/boba-ethereum",
"wss://boba-ethereum.gateway.tenderly.co/",
"wss://gateway.tenderly.co/public/boba-ethereum"
],
"faucets": [],
"nativeCurrency": {
+4 -3
View File
@@ -4,7 +4,8 @@ export default {
"chain": "ETH",
"rpc": [
"https://boba-network-goerli-testnet.rpc.thirdweb.com/${THIRDWEB_API_KEY}",
"https://goerli.boba.network/"
"https://goerli.boba.network/",
"wss://wss.goerli.boba.network/"
],
"faucets": [],
"nativeCurrency": {
@@ -13,7 +14,7 @@ export default {
"decimals": 18
},
"infoURL": "https://boba.network",
"shortName": "Bobagoerli",
"shortName": "BobaGoerli",
"chainId": 2888,
"networkId": 2888,
"explorers": [
@@ -28,7 +29,7 @@ export default {
"chain": "eip155-5",
"bridges": [
{
"url": "https://gateway.goerli.boba.network"
"url": "https://gateway.boba.network"
}
]
},
+36
View File
@@ -0,0 +1,36 @@
import type { Chain } from "../src/types";
export default {
"name": "Botanix Testnet",
"chain": "BTC",
"icon": {
"url": "ipfs://Qmf2iSjcrZwUDKhCVY9ZzfbSV2He2HSssbcG2yMz1mDerm",
"width": 32,
"height": 32,
"format": "png"
},
"rpc": [
"https://botanix-testnet.rpc.thirdweb.com/${THIRDWEB_API_KEY}",
"https://testnet-rpc.btxtestchain.com"
],
"faucets": [
"https://faucet.btxtestchain.com"
],
"nativeCurrency": {
"name": "Botanix",
"symbol": "BTC",
"decimals": 18
},
"infoURL": "https://btxtestchain.com",
"shortName": "BTCt",
"chainId": 3636,
"networkId": 3636,
"explorers": [
{
"name": "Botanix",
"url": "https://testnet.btxtestchain.com",
"standard": "EIP3091"
}
],
"testnet": true,
"slug": "botanix-testnet"
} as const satisfies Chain;
+36
View File
@@ -0,0 +1,36 @@
import type { Chain } from "../src/types";
export default {
"name": "Botanix Mainnet",
"chain": "BTC",
"icon": {
"url": "ipfs://Qmf2iSjcrZwUDKhCVY9ZzfbSV2He2HSssbcG2yMz1mDerm",
"width": 32,
"height": 32,
"format": "png"
},
"rpc": [
"https://botanix.rpc.thirdweb.com/${THIRDWEB_API_KEY}",
"https://rpc.btxtestchain.com"
],
"faucets": [
"https://faucet.btxtestchain.com"
],
"nativeCurrency": {
"name": "Botanix",
"symbol": "BTC",
"decimals": 18
},
"infoURL": "https://btxtestchain.com",
"shortName": "BTCm",
"chainId": 3637,
"networkId": 3637,
"explorers": [
{
"name": "Botanix",
"url": "https://btxtestchain.com",
"standard": "EIP3091"
}
],
"testnet": true,
"slug": "botanix"
} as const satisfies Chain;
+36
View File
@@ -0,0 +1,36 @@
import type { Chain } from "../src/types";
export default {
"name": "SenjePowers Testnet",
"chain": "SPC",
"icon": {
"url": "ipfs://QmcpyTj4hUyHJZ2VmSdkXFpPpRcNKRP1VxMs7Cp1anymNy",
"width": 504,
"height": 495,
"format": "png"
},
"rpc": [
"https://senjepowers-testnet.rpc.thirdweb.com/${THIRDWEB_API_KEY}",
"https://testnet-rpc.senjepowersscan.com"
],
"faucets": [
"https://faucet.senjepowersscan.com"
],
"nativeCurrency": {
"name": "SenjePowers",
"symbol": "SPC",
"decimals": 18
},
"infoURL": "https://senjepowersscan.com",
"shortName": "SPCt",
"chainId": 3698,
"networkId": 3698,
"explorers": [
{
"name": "SenjePowers",
"url": "https://testnet.senjepowersscan.com",
"standard": "EIP3091"
}
],
"testnet": true,
"slug": "senjepowers-testnet"
} as const satisfies Chain;
+48
View File
@@ -0,0 +1,48 @@
import type { Chain } from "../src/types";
export default {
"name": "AltLayer Zero Gas Network",
"chain": "ETH",
"rpc": [
"https://altlayer-zero-gas-network.rpc.thirdweb.com/${THIRDWEB_API_KEY}",
"https://zero.alt.technology"
],
"faucets": [],
"nativeCurrency": {
"name": "ZERO",
"symbol": "ZERO",
"decimals": 18
},
"features": [
{
"name": "EIP155"
},
{
"name": "EIP1559"
}
],
"infoURL": "https://altlayer.io",
"shortName": "alt-zerogas",
"chainId": 4000003,
"networkId": 4000003,
"icon": {
"url": "ipfs://QmcEfZJU7NMn9ycTAcEooQgGNfa2nYBToSUZHdFCFadcjb",
"width": 1080,
"height": 1025,
"format": "png"
},
"explorers": [
{
"name": "blockscout",
"url": "https://zero-explorer.alt.technology",
"icon": {
"url": "ipfs://bafybeifu5tpui7dk5cjoo54kde7pmuthvnl7sdykobuarsxgu7t2izurnq",
"width": 512,
"height": 512,
"format": "png"
},
"standard": "EIP3091"
}
],
"testnet": false,
"slug": "altlayer-zero-gas-network"
} as const satisfies Chain;
+40
View File
@@ -0,0 +1,40 @@
import type { Chain } from "../src/types";
export default {
"name": "Peperium Chain Testnet",
"chain": "PERIUM",
"rpc": [
"https://peperium-chain-testnet.rpc.thirdweb.com/${THIRDWEB_API_KEY}",
"https://rpc-testnet.peperium.io"
],
"faucets": [],
"nativeCurrency": {
"name": "Peperium Chain Testnet",
"symbol": "PERIUM",
"decimals": 18
},
"infoURL": "https://peperium.io",
"shortName": "PERIUM",
"chainId": 4001,
"networkId": 4001,
"icon": {
"url": "ipfs://Qmag2hr5DQghRzKPN3oUFBkjWzqd5CndQzZeb5LfoiMCXf",
"width": 160,
"height": 160,
"format": "png"
},
"explorers": [
{
"name": "Peperium Chain Explorer",
"url": "https://scan-testnet.peperium.io",
"icon": {
"url": "ipfs://Qmag2hr5DQghRzKPN3oUFBkjWzqd5CndQzZeb5LfoiMCXf",
"width": 160,
"height": 160,
"format": "png"
},
"standard": "EIP3091"
}
],
"testnet": true,
"slug": "peperium-chain-testnet"
} as const satisfies Chain;
+24
View File
@@ -0,0 +1,24 @@
import type { Chain } from "../src/types";
export default {
"name": "Omega Mainnet",
"chain": "OmegaNetwork",
"shortName": "OmegaNetwork",
"chainId": 408,
"testnet": false,
"icon": {
"format": "png",
"url": "ipfs://bafkreig676zxfhwhcx5bvvvjxedx6ftr2wq4iiznrwm3c6ozrprbc4oxwm",
"height": 512,
"width": 512
},
"rpc": [
"https://omega.rpc.thirdweb.com/${THIRDWEB_API_KEY}",
"https://mainnet-rpc.omtch.com"
],
"nativeCurrency": {
"name": "Omega Network Coin",
"symbol": "OMN",
"decimals": 18
},
"slug": "omega"
} as const satisfies Chain;
+1 -1
View File
@@ -4,8 +4,8 @@ export default {
"chain": "ETH",
"rpc": [
"https://optimism-goerli.rpc.thirdweb.com/${THIRDWEB_API_KEY}",
"https://opt-goerli.g.alchemy.com/v2/${ALCHEMY_API_KEY}",
"https://optimism-goerli.infura.io/v3/${INFURA_API_KEY}",
"https://opt-goerli.g.alchemy.com/v2/${ALCHEMY_API_KEY}",
"https://goerli.optimism.io/"
],
"faucets": [
+1 -1
View File
@@ -13,8 +13,8 @@ export default {
},
"rpc": [
"https://arbitrum-goerli.rpc.thirdweb.com/${THIRDWEB_API_KEY}",
"https://arb-goerli.g.alchemy.com/v2/${ALCHEMY_API_KEY}",
"https://arbitrum-goerli.infura.io/v3/${INFURA_API_KEY}",
"https://arb-goerli.g.alchemy.com/v2/${ALCHEMY_API_KEY}",
"https://goerli-rollup.arbitrum.io/rpc/"
],
"faucets": [],
+57
View File
@@ -0,0 +1,57 @@
import type { Chain } from "../src/types";
export default {
"name": "PGN (Public Goods Network)",
"chain": "ETH",
"rpc": [
"https://pgn-public-goods-network.rpc.thirdweb.com/${THIRDWEB_API_KEY}",
"https://rpc.publicgoods.network"
],
"faucets": [],
"nativeCurrency": {
"name": "Ether",
"symbol": "ETH",
"decimals": 18
},
"features": [
{
"name": "EIP155"
},
{
"name": "EIP1559"
}
],
"infoURL": "https://publicgoods.network/",
"shortName": "PGN",
"chainId": 424,
"networkId": 424,
"icon": {
"url": "ipfs://QmUVJ7MLCEAfq3pHVPFLscqRMiyAY5biVgTkeDQCmAhHNS",
"width": 574,
"height": 574,
"format": "svg"
},
"explorers": [
{
"name": "blockscout",
"url": "https://explorer.publicgoods.network",
"icon": {
"url": "ipfs://bafybeifu5tpui7dk5cjoo54kde7pmuthvnl7sdykobuarsxgu7t2izurnq",
"width": 512,
"height": 512,
"format": "png"
},
"standard": "EIP3091"
}
],
"parent": {
"type": "L2",
"chain": "eip155-1",
"bridges": [
{
"url": "https://bridge.publicgoods.network"
}
]
},
"testnet": false,
"slug": "pgn-public-goods-network"
} as const satisfies Chain;
+10 -2
View File
@@ -6,8 +6,7 @@ export default {
"https://bobafuji-testnet.rpc.thirdweb.com/${THIRDWEB_API_KEY}",
"https://testnet.avax.boba.network",
"wss://wss.testnet.avax.boba.network",
"https://replica.testnet.avax.boba.network",
"wss://replica-wss.testnet.avax.boba.network"
"https://replica.testnet.avax.boba.network"
],
"faucets": [],
"nativeCurrency": {
@@ -26,6 +25,15 @@ export default {
"standard": "none"
}
],
"parent": {
"type": "L2",
"chain": "eip155-5",
"bridges": [
{
"url": "https://gateway.boba.network"
}
]
},
"testnet": true,
"slug": "bobafuji-testnet"
} as const satisfies Chain;
+9 -4
View File
@@ -12,15 +12,20 @@ export default {
},
"rpc": [
"https://celo-alfajores-testnet.rpc.thirdweb.com/${THIRDWEB_API_KEY}",
"https://alfajores-forno.celo-testnet.org",
"wss://alfajores-forno.celo-testnet.org/ws"
"wss://alfajores-forno.celo-testnet.org/ws",
"https://alfajores-forno.celo-testnet.org"
],
"faucets": [
"https://celo.org/developers/faucet",
"https://cauldron.pretoriaresearchlab.io/alfajores-faucet"
"https://cauldron.pretoriaresearchlab.io/alfajores-faucet",
"https://celo.org/developers/faucet"
],
"infoURL": "https://docs.celo.org/",
"explorers": [
{
"name": "Celoscan",
"url": "https://alfajores.celoscan.io/",
"standard": "EIP3091"
},
{
"name": "Celoscan",
"url": "https://celoscan.io",
+40
View File
@@ -0,0 +1,40 @@
import type { Chain } from "../src/types";
export default {
"name": "MEVerse Chain Testnet",
"chain": "MEVerse",
"rpc": [
"https://meverse-chain-testnet.rpc.thirdweb.com/${THIRDWEB_API_KEY}",
"https://rpc.meversetestnet.io"
],
"faucets": [],
"nativeCurrency": {
"name": "MEVerse",
"symbol": "MEV",
"decimals": 18
},
"infoURL": "https://www.meverse.sg",
"shortName": "TESTMEV",
"chainId": 4759,
"networkId": 4759,
"icon": {
"url": "ipfs://QmPuQ6gaCfUtNdRuaEDbdhot2m2KCy2ZHCJUvZXJAtdeyJ",
"width": 800,
"height": 800,
"format": "png"
},
"explorers": [
{
"name": "MEVerse Chain Testnet Explorer",
"url": "https://testnet.meversescan.io",
"standard": "none",
"icon": {
"url": "ipfs://QmPuQ6gaCfUtNdRuaEDbdhot2m2KCy2ZHCJUvZXJAtdeyJ",
"width": 800,
"height": 800,
"format": "png"
}
}
],
"testnet": true,
"slug": "meverse-chain-testnet"
} as const satisfies Chain;
+1 -1
View File
@@ -5,9 +5,9 @@ export default {
"chain": "ETH",
"rpc": [
"https://goerli.rpc.thirdweb.com/${THIRDWEB_API_KEY}",
"https://eth-goerli.g.alchemy.com/v2/${ALCHEMY_API_KEY}",
"https://goerli.infura.io/v3/${INFURA_API_KEY}",
"wss://goerli.infura.io/v3/${INFURA_API_KEY}",
"https://eth-goerli.g.alchemy.com/v2/${ALCHEMY_API_KEY}",
"https://rpc.goerli.mudit.blog/",
"https://ethereum-goerli.publicnode.com"
],
+30
View File
@@ -0,0 +1,30 @@
import type { Chain } from "../src/types";
export default {
"name": "Shinarium Beta",
"chain": "Shinarium",
"rpc": [
"https://shinarium-beta.rpc.thirdweb.com/${THIRDWEB_API_KEY}",
"https://rpc.shinarium.org"
],
"faucets": [
"https://faucet.shinarium.org"
],
"nativeCurrency": {
"name": "Shina Inu",
"symbol": "SHI",
"decimals": 18
},
"infoURL": "https://shinarium.org",
"shortName": "shi",
"chainId": 534849,
"networkId": 534849,
"explorers": [
{
"name": "shinascan",
"url": "https://shinascan.shinarium.org",
"standard": "EIP3091"
}
],
"testnet": false,
"slug": "shinarium-beta"
} as const satisfies Chain;
+9 -9
View File
@@ -1,9 +1,9 @@
import type { Chain } from "../src/types";
export default {
"name": "Binance Smart Chain Mainnet",
"name": "BNB Smart Chain Mainnet",
"chain": "BSC",
"rpc": [
"https://binance.rpc.thirdweb.com/${THIRDWEB_API_KEY}",
"https://bnb-smart-chain.rpc.thirdweb.com/${THIRDWEB_API_KEY}",
"wss://bsc-ws-node.nariox.org",
"https://bsc.publicnode.com",
"https://bsc-dataseed4.ninicoin.io",
@@ -14,20 +14,20 @@ export default {
"https://bsc-dataseed3.defibit.io",
"https://bsc-dataseed2.defibit.io",
"https://bsc-dataseed1.defibit.io",
"https://bsc-dataseed4.binance.org",
"https://bsc-dataseed3.binance.org",
"https://bsc-dataseed2.binance.org",
"https://bsc-dataseed1.binance.org"
"https://bsc-dataseed4.bnbchain.org",
"https://bsc-dataseed3.bnbchain.org",
"https://bsc-dataseed2.bnbchain.org",
"https://bsc-dataseed1.bnbchain.org"
],
"faucets": [
"https://free-online-app.com/faucet-for-eth-evm-chains/"
],
"nativeCurrency": {
"name": "Binance Chain Native Token",
"name": "BNB Chain Native Token",
"symbol": "BNB",
"decimals": 18
},
"infoURL": "https://www.binance.org",
"infoURL": "https://www.bnbchain.org/en",
"shortName": "bnb",
"chainId": 56,
"networkId": 56,
@@ -46,5 +46,5 @@ export default {
"format": "png"
},
"testnet": false,
"slug": "binance"
"slug": "bnb-smart-chain"
} as const satisfies Chain;
+35
View File
@@ -0,0 +1,35 @@
import type { Chain } from "../src/types";
export default {
"name": "opBNB",
"chain": "opBNB",
"shortName": "opBNB",
"chainId": 5611,
"testnet": true,
"nativeCurrency": {
"name": "Testnet bnb",
"symbol": "Tbnb",
"decimals": 18
},
"rpc": [
"https://opbnb.rpc.thirdweb.com/${THIRDWEB_API_KEY}",
"https://opbnb-testnet-rpc.bnbchain.org"
],
"explorers": [
{
"name": "opBNB Scan",
"url": "https://opbnbscan.com/",
"standard": ""
}
],
"faucets": [
"https://opbnb-testnet-bridge.bnbchain.org/"
],
"infoURL": "https://docs.bnbchain.org/",
"icon": {
"url": "ipfs://QmfFvfFsQKby3M32uqr8T55ENBnTHL8bkdeeu6rYVL2n4z/opbnblogo.svg",
"height": 512,
"width": 512,
"format": "svg"
},
"slug": "opbnb"
} as const satisfies Chain;
+13 -2
View File
@@ -5,9 +5,11 @@ export default {
"rpc": [
"https://boba-bnb.rpc.thirdweb.com/${THIRDWEB_API_KEY}",
"https://bnb.boba.network",
"wss://wss.bnb.boba.network",
"http://boba-bnb.gateway.tenderly.co/",
"http://gateway.tenderly.co/public/boba-bnb",
"https://replica.bnb.boba.network",
"wss://replica-wss.bnb.boba.network"
"wss://boba-bnb.gateway.tenderly.co/",
"wss://gateway.tenderly.co/public/boba-bnb"
],
"faucets": [],
"nativeCurrency": {
@@ -26,6 +28,15 @@ export default {
"standard": "none"
}
],
"parent": {
"type": "L2",
"chain": "eip155-5",
"bridges": [
{
"url": "https://gateway.boba.network"
}
]
},
"testnet": false,
"slug": "boba-bnb"
} as const satisfies Chain;
+3 -1
View File
@@ -5,7 +5,9 @@ export default {
"rpc": [
"https://rollux.rpc.thirdweb.com/${THIRDWEB_API_KEY}",
"https://rpc.rollux.com",
"wss://rpc.rollux.com/wss"
"https://rollux.public-rpc.com",
"wss://rpc.rollux.com/wss",
"https://rpc.ankr.com/rollux/${ANKR_API_KEY}"
],
"faucets": [
"https://rollux.id/faucetapp"
+57
View File
@@ -0,0 +1,57 @@
import type { Chain } from "../src/types";
export default {
"name": "Sepolia PGN (Public Goods Network)",
"chain": "ETH",
"rpc": [
"https://sepolia-pgn-public-goods-network.rpc.thirdweb.com/${THIRDWEB_API_KEY}",
"https://sepolia.publicgoods.network"
],
"faucets": [],
"nativeCurrency": {
"name": "Sepolia Ether",
"symbol": "ETH",
"decimals": 18
},
"features": [
{
"name": "EIP155"
},
{
"name": "EIP1559"
}
],
"infoURL": "https://publicgoods.network/",
"shortName": "sepPGN",
"chainId": 58008,
"networkId": 58008,
"icon": {
"url": "ipfs://QmUVJ7MLCEAfq3pHVPFLscqRMiyAY5biVgTkeDQCmAhHNS",
"width": 574,
"height": 574,
"format": "svg"
},
"explorers": [
{
"name": "blockscout",
"url": "https://explorer.sepolia.publicgoods.network",
"icon": {
"url": "ipfs://bafybeifu5tpui7dk5cjoo54kde7pmuthvnl7sdykobuarsxgu7t2izurnq",
"width": 512,
"height": 512,
"format": "png"
},
"standard": "EIP3091"
}
],
"parent": {
"type": "L2",
"chain": "eip155-11155111",
"bridges": [
{
"url": "https://pgn-bridge.vercel.app/bridge"
}
]
},
"testnet": false,
"slug": "sepolia-pgn-public-goods-network"
} as const satisfies Chain;
+3 -3
View File
@@ -5,10 +5,10 @@ export default {
"chain": "ETH",
"rpc": [
"https://linea-testnet.rpc.thirdweb.com/${THIRDWEB_API_KEY}",
"https://rpc.goerli.linea.build",
"wss://rpc.goerli.linea.build",
"https://linea-goerli.infura.io/v3/${INFURA_API_KEY}",
"wss://linea-goerli.infura.io/v3/${INFURA_API_KEY}"
"wss://linea-goerli.infura.io/v3/${INFURA_API_KEY}",
"https://rpc.goerli.linea.build",
"wss://rpc.goerli.linea.build"
],
"faucets": [
"https://faucetlink.to/goerli"
+32
View File
@@ -0,0 +1,32 @@
import type { Chain } from "../src/types";
export default {
"name": "Linea Mainnet",
"chain": "Linea Mainnet",
"shortName": "linea-mainnet",
"chainId": 59144,
"testnet": false,
"nativeCurrency": {
"name": "Ether",
"symbol": "ETH",
"decimals": 18
},
"rpc": [],
"explorers": [
{
"name": "Linea Scan",
"url": "https://lineascan.build",
"standard": ""
}
],
"faucets": [
"https://www.infura.io/faucet/linea"
],
"infoURL": "https://docs.linea.build/overview",
"icon": {
"url": "ipfs://QmURjritnHL7a8TwZgsFwp3f272DJmG5paaPtWDZ98QZwH",
"height": 512,
"width": 512,
"format": "svg"
},
"slug": "linea"
} as const satisfies Chain;
+1 -1
View File
@@ -4,7 +4,7 @@ export default {
"chain": "ETC",
"rpc": [
"https://ethereum-classic.rpc.thirdweb.com/${THIRDWEB_API_KEY}",
"https://www.ethercluster.com/etc"
"https://etc.rivet.link"
],
"faucets": [
"https://free-online-app.com/faucet-for-eth-evm-chains/?"
+53
View File
@@ -0,0 +1,53 @@
import type { Chain } from "../src/types";
export default {
"name": "Cascadia Testnet",
"chain": "Cascadia",
"rpc": [
"https://cascadia-testnet.rpc.thirdweb.com/${THIRDWEB_API_KEY}",
"https://testnet.cascadia.foundation"
],
"faucets": [
"https://www.cascadia.foundation/faucet"
],
"nativeCurrency": {
"name": "CC",
"symbol": "tCC",
"decimals": 18
},
"infoURL": "https://www.cascadia.foundation",
"shortName": "cascadia",
"chainId": 6102,
"networkId": 6102,
"icon": {
"url": "ipfs://QmQtcwxNiJ9D1QDz4k6jZ7qacLcqMk6CeW85TTBWBvNp3z",
"width": 256,
"height": 256,
"format": "png"
},
"explorers": [
{
"name": "Cascadia EVM Explorer",
"url": "https://explorer.cascadia.foundation",
"standard": "none",
"icon": {
"url": "ipfs://QmQtcwxNiJ9D1QDz4k6jZ7qacLcqMk6CeW85TTBWBvNp3z",
"width": 256,
"height": 256,
"format": "png"
}
},
{
"name": "Cascadia Cosmos Explorer",
"url": "https://validator.cascadia.foundation",
"standard": "none",
"icon": {
"url": "ipfs://QmQtcwxNiJ9D1QDz4k6jZ7qacLcqMk6CeW85TTBWBvNp3z",
"width": 256,
"height": 256,
"format": "png"
}
}
],
"testnet": true,
"slug": "cascadia-testnet"
} as const satisfies Chain;
+1 -1
View File
@@ -4,7 +4,7 @@ export default {
"chain": "ETC",
"rpc": [
"https://ethereum-classic-testnet-mordor.rpc.thirdweb.com/${THIRDWEB_API_KEY}",
"https://www.ethercluster.com/mordor"
"https://rpc.mordor.etccooperative.org"
],
"faucets": [],
"nativeCurrency": {
+40
View File
@@ -0,0 +1,40 @@
import type { Chain } from "../src/types";
export default {
"name": "Avocado",
"chain": "Avocado",
"rpc": [
"https://avocado.rpc.thirdweb.com/${THIRDWEB_API_KEY}",
"https://rpc.avocado.instadapp.io"
],
"faucets": [],
"nativeCurrency": {
"name": "USDC",
"symbol": "USDC",
"decimals": 18
},
"infoURL": "https://avocado.instadapp.io",
"shortName": "avocado",
"chainId": 634,
"networkId": 634,
"icon": {
"url": "ipfs://Qma9rJSgy32UL1iXtXKFZQJA6FjkcUcDU4HR6y13Wu1vjn",
"width": 600,
"height": 600,
"format": "png"
},
"explorers": [
{
"name": "avoscan",
"url": "https://avoscan.co",
"icon": {
"url": "ipfs://Qma9rJSgy32UL1iXtXKFZQJA6FjkcUcDU4HR6y13Wu1vjn",
"width": 600,
"height": 600,
"format": "png"
},
"standard": "none"
}
],
"testnet": false,
"slug": "avocado"
} as const satisfies Chain;
+34
View File
@@ -0,0 +1,34 @@
import type { Chain } from "../src/types";
export default {
"name": "ALL Mainnet",
"chain": "ALL",
"icon": {
"url": "ipfs://bafkreibqe2mgiqezi24sx272kunqt6pv7uzxhpkxuobvpbsptce3q6nn5i",
"width": 1000,
"height": 1000,
"format": "png"
},
"rpc": [
"https://all.rpc.thirdweb.com/${THIRDWEB_API_KEY}",
"https://mainnet-rpc.alltra.global"
],
"faucets": [],
"nativeCurrency": {
"name": "ALL",
"symbol": "ALL",
"decimals": 18
},
"infoURL": "https://alltra.world",
"shortName": "ALL",
"chainId": 651940,
"networkId": 651940,
"explorers": [
{
"name": "Alltra SmartChain Explorer",
"url": "https://alltra.global",
"standard": "EIP3091"
}
],
"testnet": false,
"slug": "all"
} as const satisfies Chain;
+1 -2
View File
@@ -10,8 +10,7 @@ export default {
},
"rpc": [
"https://zetachain-athens-testnet.rpc.thirdweb.com/${THIRDWEB_API_KEY}",
"https://zetachain-athens-evm.blockpi.network/v1/rpc/public",
"wss://zetachain-athens.blockpi.network/rpc/v1/public/websocket"
"https://api.athens2.zetachain.com/evm"
],
"faucets": [
"https://labs.zetachain.com/get-zeta"
+40
View File
@@ -0,0 +1,40 @@
import type { Chain } from "../src/types";
export default {
"name": "MEVerse Chain Mainnet",
"chain": "MEVerse",
"rpc": [
"https://meverse-chain.rpc.thirdweb.com/${THIRDWEB_API_KEY}",
"https://rpc.meversemainnet.io"
],
"faucets": [],
"nativeCurrency": {
"name": "MEVerse",
"symbol": "MEV",
"decimals": 18
},
"infoURL": "https://www.meverse.sg",
"shortName": "MEV",
"chainId": 7518,
"networkId": 7518,
"icon": {
"url": "ipfs://QmPuQ6gaCfUtNdRuaEDbdhot2m2KCy2ZHCJUvZXJAtdeyJ",
"width": 800,
"height": 800,
"format": "png"
},
"explorers": [
{
"name": "MEVerse Chain Explorer",
"url": "https://www.meversescan.io",
"standard": "none",
"icon": {
"url": "ipfs://QmPuQ6gaCfUtNdRuaEDbdhot2m2KCy2ZHCJUvZXJAtdeyJ",
"width": 800,
"height": 800,
"format": "png"
}
}
],
"testnet": false,
"slug": "meverse-chain"
} as const satisfies Chain;
+12 -12
View File
@@ -4,7 +4,7 @@ export default {
"chain": "ETH",
"rpc": [
"https://zora.rpc.thirdweb.com/${THIRDWEB_API_KEY}",
"https://rpc.zora.co/"
"https://rpc.zora.energy/"
],
"faucets": [],
"nativeCurrency": {
@@ -12,23 +12,23 @@ export default {
"symbol": "ETH",
"decimals": 18
},
"infoURL": "https://zora.co",
"shortName": "zora",
"chainId": 7777777,
"networkId": 7777777,
"explorers": [
{
"name": "Zora Network Explorer",
"url": "https://explorer.zora.co",
"standard": "EIP3091"
}
],
"icon": {
"url": "ipfs://QmZ6qaRwTPFEZUspwMUjaxC6KhmzcELdRQcQzS3P72Dzts/Vector.svg",
"height": 512,
"width": 512,
"format": "svg"
},
"infoURL": "https://zora.energy",
"shortName": "zora",
"chainId": 7777777,
"networkId": 7777777,
"explorers": [
{
"name": "Zora Network Explorer",
"url": "https://explorer.zora.energy",
"standard": "EIP3091"
}
],
"testnet": false,
"slug": "zora"
} as const satisfies Chain;
+27
View File
@@ -2,6 +2,12 @@ import type { Chain } from "../src/types";
export default {
"name": "Patex",
"chain": "ETH",
"icon": {
"url": "ipfs://QmTNTSNn3t5WpSEzQmUYbkxYkBKaH6QahyVdVrRKyPHChr",
"width": 800,
"height": 800,
"format": "png"
},
"rpc": [
"https://patex.rpc.thirdweb.com/${THIRDWEB_API_KEY}",
"https://rpc.patex.io/"
@@ -12,10 +18,31 @@ export default {
"symbol": "ETH",
"decimals": 18
},
"features": [
{
"name": "EIP155"
},
{
"name": "EIP1559"
}
],
"infoURL": "https://patex.io/",
"shortName": "peth",
"chainId": 789,
"networkId": 789,
"explorers": [
{
"name": "patexscan",
"url": "https://patexscan.io",
"icon": {
"url": "ipfs://QmTNTSNn3t5WpSEzQmUYbkxYkBKaH6QahyVdVrRKyPHChr",
"width": 800,
"height": 800,
"format": "png"
},
"standard": "EIP3091"
}
],
"testnet": false,
"slug": "patex"
} as const satisfies Chain;
+1 -1
View File
@@ -11,8 +11,8 @@ export default {
},
"rpc": [
"https://mumbai.rpc.thirdweb.com/${THIRDWEB_API_KEY}",
"https://polygon-mumbai.g.alchemy.com/v2/${ALCHEMY_API_KEY}",
"https://polygon-mumbai.infura.io/v3/${INFURA_API_KEY}",
"https://polygon-mumbai.g.alchemy.com/v2/${ALCHEMY_API_KEY}",
"https://matic-mumbai.chainstacklabs.com",
"https://rpc-mumbai.maticvigil.com",
"https://matic-testnet-archive-rpc.bwarelabs.com",
+15 -19
View File
@@ -1,39 +1,35 @@
import type { Chain } from "../src/types";
export default {
"name": "Shardeum Liberty 2.X",
"name": "Shardeum Sphinx DApp 1.X",
"shortName": "Sphinx",
"chain": "Shardeum",
"chainId": 8081,
"icon": {
"url": "ipfs://Qma1bfuubpepKn7DLDy4NPSKDeT3S4VPCNhu6UmdGrb6YD",
"width": 609,
"height": 533,
"height": 1200,
"width": 1200,
"url": "ipfs://QmQWzHUy4kmk1eGksDREGQL3GWrssdAPBxHt4aKGAFHSfJ",
"format": "png"
},
"rpc": [
"https://shardeum-liberty-2-x.rpc.thirdweb.com/${THIRDWEB_API_KEY}",
"https://liberty20.shardeum.org/"
],
"faucets": [
"https://faucet.liberty20.shardeum.org"
"https://shardeum-sphinx-dapp-1-x.rpc.thirdweb.com/${THIRDWEB_API_KEY}",
"https://dapps.shardeum.org/sphinx"
],
"nativeCurrency": {
"name": "Shardeum SHM",
"name": "Shardeum",
"symbol": "SHM",
"decimals": 18
},
"infoURL": "https://docs.shardeum.org/",
"shortName": "Liberty20",
"chainId": 8081,
"networkId": 8081,
"explorers": [
{
"name": "Shardeum Scan",
"url": "https://explorer-liberty20.shardeum.org",
"url": "https://explorer-dapps.shardeum.org",
"standard": "EIP3091"
}
],
"redFlags": [
"reusedChainId"
"faucets": [
"https://faucet-dapps.shardeum.org/"
],
"testnet": false,
"slug": "shardeum-liberty-2-x"
"infoURL": "https://docs.shardeum.org/",
"testnet": true,
"slug": "shardeum-sphinx-dapp-1-x"
} as const satisfies Chain;
+3 -1
View File
@@ -2,7 +2,9 @@ import type { Chain } from "../src/types";
export default {
"name": "Base",
"chain": "ETH",
"rpc": [],
"rpc": [
"https://base.rpc.thirdweb.com/${THIRDWEB_API_KEY}"
],
"faucets": [],
"nativeCurrency": {
"name": "Ether",
+2 -13
View File
@@ -26,19 +26,8 @@ export default {
},
"explorers": [
{
"name": "Evmos EVM Explorer",
"url": "https://evm.evmos.dev",
"standard": "EIP3091",
"icon": {
"url": "ipfs://QmeZW6VKUFTbz7PPW8PmDR3ZHa6osYPLBFPnW8T5LSU49c",
"width": 400,
"height": 400,
"format": "png"
}
},
{
"name": "Evmos Cosmos Explorer",
"url": "https://explorer.evmos.dev",
"name": "Evmos Explorer (Escan)",
"url": "https://testnet.escan.live",
"standard": "none",
"icon": {
"url": "ipfs://QmeZW6VKUFTbz7PPW8PmDR3ZHa6osYPLBFPnW8T5LSU49c",
+1 -13
View File
@@ -4,7 +4,6 @@ export default {
"chain": "Evmos",
"rpc": [
"https://evmos.rpc.thirdweb.com/${THIRDWEB_API_KEY}",
"https://eth.bd.evmos.org:8545",
"https://evmos-evm.publicnode.com"
],
"faucets": [],
@@ -25,7 +24,7 @@ export default {
},
"explorers": [
{
"name": "Evmos EVM Explorer (Escan)",
"name": "Evmos Explorer (Escan)",
"url": "https://escan.live",
"standard": "none",
"icon": {
@@ -34,17 +33,6 @@ export default {
"height": 400,
"format": "png"
}
},
{
"name": "Evmos Cosmos Explorer (Mintscan)",
"url": "https://www.mintscan.io/evmos",
"standard": "none",
"icon": {
"url": "ipfs://QmeZW6VKUFTbz7PPW8PmDR3ZHa6osYPLBFPnW8T5LSU49c",
"width": 400,
"height": 400,
"format": "png"
}
}
],
"testnet": false,
+12 -12
View File
@@ -1,26 +1,26 @@
import type { Chain } from "../src/types";
export default {
"name": "Binance Smart Chain Testnet",
"name": "BNB Smart Chain Testnet",
"chain": "BSC",
"rpc": [
"https://binance-testnet.rpc.thirdweb.com/${THIRDWEB_API_KEY}",
"https://bnb-smart-chain-testnet.rpc.thirdweb.com/${THIRDWEB_API_KEY}",
"https://bsc-testnet.publicnode.com",
"https://data-seed-prebsc-2-s3.binance.org:8545",
"https://data-seed-prebsc-1-s3.binance.org:8545",
"https://data-seed-prebsc-2-s2.binance.org:8545",
"https://data-seed-prebsc-1-s2.binance.org:8545",
"https://data-seed-prebsc-2-s1.binance.org:8545",
"https://data-seed-prebsc-1-s1.binance.org:8545"
"https://data-seed-prebsc-2-s3.bnbchain.org:8545",
"https://data-seed-prebsc-1-s3.bnbchain.org:8545",
"https://data-seed-prebsc-2-s2.bnbchain.org:8545",
"https://data-seed-prebsc-1-s2.bnbchain.org:8545",
"https://data-seed-prebsc-2-s1.bnbchain.org:8545",
"https://data-seed-prebsc-1-s1.bnbchain.org:8545"
],
"faucets": [
"https://testnet.binance.org/faucet-smart"
"https://testnet.bnbchain.org/faucet-smart"
],
"nativeCurrency": {
"name": "Binance Chain Native Token",
"name": "BNB Chain Native Token",
"symbol": "tBNB",
"decimals": 18
},
"infoURL": "https://testnet.binance.org/",
"infoURL": "https://www.bnbchain.org/en",
"shortName": "bnbt",
"chainId": 97,
"networkId": 97,
@@ -38,5 +38,5 @@ export default {
"format": "png"
},
"testnet": true,
"slug": "binance-testnet"
"slug": "bnb-smart-chain-testnet"
} as const satisfies Chain;
+9
View File
@@ -26,6 +26,15 @@ export default {
"standard": "none"
}
],
"parent": {
"type": "L2",
"chain": "eip155-5",
"bridges": [
{
"url": "https://gateway.boba.network"
}
]
},
"testnet": true,
"slug": "boba-bnb-testnet"
} as const satisfies Chain;
+7 -7
View File
@@ -3,9 +3,9 @@
/** @type {Omit<Chain, "slug">} */
export default {
name: "Taro Testnet",
name: "Bubs Testnet",
chain: "gETH",
shortName: "Taro",
shortName: "Bubs",
chainId: 1582,
testnet: true,
icon: {
@@ -14,7 +14,7 @@ export default {
width: 512,
height: 512,
},
rpc: ["https://taro-testnet.calderachain.xyz/http"],
rpc: ["https://bubs.calderachain.xyz/http"],
nativeCurrency: {
decimals: 18,
name: "Ether",
@@ -22,12 +22,12 @@ export default {
},
explorers: [
{
url: "https://explorer.tarotestnet.com",
name: "Taro Testnet Explorer",
url: "https://explorer.bubstestnet.com",
name: "Bubs Testnet Explorer",
standard: "EIP3091",
},
],
faucets: ["https://tarotestnet.com"],
infoURL: "https://tarotestnet.com",
faucets: ["https://bubstestnet.com"],
infoURL: "https://bubstestnet.com",
networkId: 1582,
};
+23
View File
@@ -0,0 +1,23 @@
// @ts-check
/** @typedef { import("../../src/types").Chain } Chain */
/** @type {Omit<Chain, "slug">} */
export default {
name: "Omega Mainnet",
chain: "OmegaNetwork",
shortName: "OmegaNetwork",
chainId: 408,
testnet: false,
icon: {
format: "png",
url: "ipfs://bafkreig676zxfhwhcx5bvvvjxedx6ftr2wq4iiznrwm3c6ozrprbc4oxwm",
height: 512,
width: 512,
},
rpc: ["https://mainnet-rpc.omtch.com"],
nativeCurrency: {
name: "Omega Network Coin",
symbol: "OMN",
decimals: 18,
},
};
+32
View File
@@ -0,0 +1,32 @@
// @ts-check
/** @typedef { import("../../src/types").Chain } Chain */
/** @type {Omit<Chain, "slug">} */
export default {
name: "opBNB",
chain: "opBNB",
shortName: "opBNB",
chainId: 5611,
testnet: true,
nativeCurrency: {
name: "Testnet bnb",
symbol: "Tbnb",
decimals: 18,
},
rpc: ["https://opbnb-testnet-rpc.bnbchain.org"],
explorers: [
{
name: "opBNB Scan",
url: "https://opbnbscan.com/",
standard: "",
},
],
faucets: ["https://opbnb-testnet-bridge.bnbchain.org/"],
infoURL: "https://docs.bnbchain.org/",
icon: {
url: "ipfs://QmfFvfFsQKby3M32uqr8T55ENBnTHL8bkdeeu6rYVL2n4z/opbnblogo.svg",
height: 512,
width: 512,
format: "svg",
},
};
+32
View File
@@ -0,0 +1,32 @@
// @ts-check
/** @typedef { import("../../src/types").Chain } Chain */
/** @type {Omit<Chain, "slug">} */
export default {
name: "Linea Mainnet",
chain: "Linea Mainnet",
shortName: "linea-mainnet",
chainId: 59144,
testnet: false,
nativeCurrency: {
name: "Ether",
symbol: "ETH",
decimals: 18,
},
rpc: [],
explorers: [
{
name: "Linea Scan",
url: "https://lineascan.build",
standard: "",
},
],
faucets: ["https://www.infura.io/faucet/linea"],
infoURL: "https://docs.linea.build/overview",
icon: {
url: "ipfs://QmURjritnHL7a8TwZgsFwp3f272DJmG5paaPtWDZ98QZwH",
height: 512,
width: 512,
format: "svg",
},
};
+32
View File
@@ -0,0 +1,32 @@
// @ts-check
/** @typedef { import("../../src/types").Chain } Chain */
/** @type {Omit<Chain, "slug">} */
export default {
name: "Shardeum Sphinx DApp 1.X",
shortName: "Sphinx",
chain: "Shardeum",
chainId: 8081,
icon: {
height: 1200,
width: 1200,
url: "ipfs://QmQWzHUy4kmk1eGksDREGQL3GWrssdAPBxHt4aKGAFHSfJ",
format: "png",
},
rpc: ["https://dapps.shardeum.org/sphinx"],
nativeCurrency: {
name: "Shardeum",
symbol: "SHM",
decimals: 18,
},
explorers: [
{
name: "Shardeum Scan",
url: "https://explorer-dapps.shardeum.org",
standard: "EIP3091",
},
],
faucets: ["https://faucet-dapps.shardeum.org/"],
infoURL: "https://docs.shardeum.org/",
testnet: true,
};
+13
View File
@@ -0,0 +1,13 @@
// @ts-check
/** @typedef { import("../../src/types").Chain } Chain */
/** @type {Partial<Chain>} */
export default {
explorers: [
{
name: "Celoscan",
url: "https://alfajores.celoscan.io/",
standard: "EIP3091",
},
],
};
+1
View File
@@ -10,4 +10,5 @@ export default {
width: 512,
format: "png",
},
rpc: ["https://base.rpc.thirdweb.com/${THIRDWEB_API_KEY}"],
};
+9 -9
View File
@@ -1,6 +1,6 @@
{
"name": "@thirdweb-dev/chains",
"version": "0.1.22",
"version": "0.1.30",
"main": "dist/thirdweb-dev-chains.cjs.js",
"module": "dist/thirdweb-dev-chains.esm.js",
"browser": {
@@ -23,18 +23,18 @@
},
"author": "thirdweb eng <[email protected]>",
"devDependencies": {
"@babel/core": "^7.19.3",
"@babel/preset-env": "^7.18.10",
"@babel/preset-typescript": "^7.18.6",
"@babel/runtime": "^7.19.0",
"@preconstruct/cli": "^2.2.1",
"@babel/core": "^7.22.5",
"@babel/preset-env": "^7.22.5",
"@babel/preset-typescript": "^7.22.5",
"@babel/runtime": "^7.22.5",
"@preconstruct/cli": "^2.7.0",
"@thirdweb-dev/tsconfig": "workspace:*",
"axios": "^1.3.4",
"deepmerge": "^4.3.0",
"axios": "^1.4.0",
"deepmerge": "^4.3.1",
"eslint-config-thirdweb": "workspace:*",
"jest": "^29.4.3",
"plop": "^3.1.2",
"typescript": "^4.7.4"
"typescript": "^5.1.6"
},
"preconstruct": {
"entrypoints": [
@@ -80,6 +80,33 @@ chains = chains
};
});
/**
* Sort RPCs in chain
* @param {Chain} chain
*/
function sortRPCs(chain) {
const thirdwebRPCs = [];
const alchemyRPCs = [];
const infuraRPCs = [];
const otherRPCs = [];
chain.rpc.forEach((rpc) => {
if (rpc.includes("${THIRDWEB_API_KEY}")) {
thirdwebRPCs.push(rpc);
} else if (rpc.includes("${ALCHEMY_API_KEY}")) {
alchemyRPCs.push(rpc);
} else if (rpc.includes("${INFURA_API_KEY}")) {
infuraRPCs.push(rpc);
} else {
otherRPCs.push(rpc);
}
});
chain.rpc = [...thirdwebRPCs, ...infuraRPCs, ...alchemyRPCs, ...otherRPCs];
}
chains.forEach(sortRPCs);
const imports = [];
const exports = [];
const exportNames = [];
@@ -146,6 +173,10 @@ function findSlug(chain) {
if (slug === "base-goerli-testnet") {
slug = "base-goerli";
}
// optimisim rename handling
if (slug === "op") {
slug = "optimism";
}
// end special cases
takenSlugs[slug] = true;
File diff suppressed because one or more lines are too long
+30 -44
View File
@@ -28,59 +28,45 @@ export function getChainRPCs(
...options,
};
const modeChains = chain.rpc.filter((rpc) => {
if (rpc.startsWith("http") && mode === "http") {
return true;
}
if (rpc.startsWith("ws") && mode === "ws") {
return true;
const processedRPCs: string[] = [];
chain.rpc.forEach((rpc) => {
// exclude RPC if mode mismatch
if (mode === "http" && !rpc.startsWith("http")) {
return;
}
return false;
if (mode === "ws" && !rpc.startsWith("ws")) {
return;
}
// Replace API_KEY placeholder with value
if (thirdwebApiKey && rpc.includes("${THIRDWEB_API_KEY}")) {
processedRPCs.push(rpc.replace("${THIRDWEB_API_KEY}", thirdwebApiKey));
} else if (infuraApiKey && rpc.includes("${INFURA_API_KEY}")) {
processedRPCs.push(rpc.replace("${INFURA_API_KEY}", infuraApiKey));
} else if (alchemyApiKey && rpc.includes("${ALCHEMY_API_KEY}")) {
processedRPCs.push(rpc.replace("${ALCHEMY_API_KEY}", alchemyApiKey));
}
// exclude RPCs with unknown placeholder
else if (rpc.includes("${")) {
return;
}
// add as is
else {
processedRPCs.push(rpc);
}
});
const thirdwebRPC = modeChains
.filter((rpc) => {
return rpc.includes("${THIRDWEB_API_KEY}") && thirdwebApiKey;
})
.map((rpc) =>
thirdwebApiKey ? rpc.replace("${THIRDWEB_API_KEY}", thirdwebApiKey) : rpc,
);
const alchemyRPC = modeChains
.filter((rpc) => {
return rpc.includes("${ALCHEMY_API_KEY}") && alchemyApiKey;
})
.map((rpc) =>
alchemyApiKey ? rpc.replace("${ALCHEMY_API_KEY}", alchemyApiKey) : rpc,
);
const infuraRPC = modeChains
.filter((rpc) => {
return rpc.includes("${INFURA_API_KEY}") && infuraApiKey;
})
.map((rpc) =>
infuraApiKey ? rpc.replace("${INFURA_API_KEY}", infuraApiKey) : rpc,
);
const allOtherRpcs = modeChains.filter((rpc) => {
return !rpc.includes("${");
});
const orderedRPCs = [
...thirdwebRPC,
...infuraRPC,
...alchemyRPC,
...allOtherRpcs,
];
if (orderedRPCs.length === 0) {
if (processedRPCs.length === 0) {
throw new Error(
`No RPC available for chainId "${chain.chainId}" with mode ${mode}`,
);
}
return orderedRPCs;
return processedRPCs;
}
/**
+76
View File
@@ -1,5 +1,81 @@
# thirdweb
## 0.10.32
### Patch Changes
- Updated dependencies [[`40682191`](https://github.com/thirdweb-dev/js/commit/40682191450de08ad40b9d2957afced248657af2)]:
- @thirdweb-dev/chains@0.1.30
- @thirdweb-dev/sdk@3.10.31
## 0.10.31
### Patch Changes
- Updated dependencies [[`db68bd04`](https://github.com/thirdweb-dev/js/commit/db68bd04cd8bb3ee6bff051d1d5b5a872353fde0), [`fd74d791`](https://github.com/thirdweb-dev/js/commit/fd74d7918072cda03b52f852ebb3f8dccb84074d), [`35f20ceb`](https://github.com/thirdweb-dev/js/commit/35f20ceb4f943e95d9566105096f06412978da7a)]:
- @thirdweb-dev/storage@1.1.8
- @thirdweb-dev/sdk@3.10.30
- @thirdweb-dev/chains@0.1.29
## 0.10.30
### Patch Changes
- Updated dependencies [[`7e044c66`](https://github.com/thirdweb-dev/js/commit/7e044c664d8a034f5324b859ac3596860c86f9a5), [`72ada475`](https://github.com/thirdweb-dev/js/commit/72ada47596d5d5c08736c33215faeec636b7156a), [`2c0bb078`](https://github.com/thirdweb-dev/js/commit/2c0bb0789955f6cd397b6fdb8e990a505251c631), [`b5c6eedb`](https://github.com/thirdweb-dev/js/commit/b5c6eedb38aa3c52eb97f3d25ad83e38c55afe61), [`4961b597`](https://github.com/thirdweb-dev/js/commit/4961b597a098dae0a4eff01a9ef268a65fe1a352)]:
- @thirdweb-dev/chains@0.1.28
- @thirdweb-dev/sdk@3.10.29
- @thirdweb-dev/storage@1.1.7
## 0.10.29
### Patch Changes
- [#1280](https://github.com/thirdweb-dev/js/pull/1280) [`53626f81`](https://github.com/thirdweb-dev/js/commit/53626f8100f400c46333617b14bd9fc144a7e801) Thanks [@Marfuen](https://github.com/Marfuen)! - Don't rely on package.json to export app
- [#1278](https://github.com/thirdweb-dev/js/pull/1278) [`8a389f12`](https://github.com/thirdweb-dev/js/commit/8a389f1295d2bf726059997ea0ca10cf0424f2a2) Thanks [@jnsdls](https://github.com/jnsdls)! - updated various dependencies
- Updated dependencies [[`2d088d36`](https://github.com/thirdweb-dev/js/commit/2d088d367ca54233836dc69712fd411ab7924205), [`8a389f12`](https://github.com/thirdweb-dev/js/commit/8a389f1295d2bf726059997ea0ca10cf0424f2a2), [`9daf0449`](https://github.com/thirdweb-dev/js/commit/9daf044926bf995ac8998929dbeca548c5eb8561), [`546353a4`](https://github.com/thirdweb-dev/js/commit/546353a479c11533818ef917c0f6b4d6f8f69872), [`a3bb17cb`](https://github.com/thirdweb-dev/js/commit/a3bb17cb33f033846fb3b4c8a0a4809ba76cab96), [`0135a779`](https://github.com/thirdweb-dev/js/commit/0135a7790cf2acde6b701cb41ea10dd311da5ec3)]:
- @thirdweb-dev/storage@1.1.6
- @thirdweb-dev/chains@0.1.27
- @thirdweb-dev/sdk@3.10.28
## 0.10.28
### Patch Changes
- [#1274](https://github.com/thirdweb-dev/js/pull/1274) [`8fc5f204`](https://github.com/thirdweb-dev/js/commit/8fc5f204b00733089c02beee92c86b0f1fcac271) Thanks [@Marfuen](https://github.com/Marfuen)! - Added all detections for deploy command and some minor bug fixes
- Updated dependencies [[`2b113539`](https://github.com/thirdweb-dev/js/commit/2b113539098384f910b3c4d54e1fde9d35a6f053), [`c9535715`](https://github.com/thirdweb-dev/js/commit/c95357158819abd42d4b0900ecc2fa40fcb957f8), [`5882091e`](https://github.com/thirdweb-dev/js/commit/5882091eab65978009a5a5305701f121851b10ad)]:
- @thirdweb-dev/sdk@3.10.27
- @thirdweb-dev/chains@0.1.26
## 0.10.27
### Patch Changes
- Updated dependencies [[`ef4cb092`](https://github.com/thirdweb-dev/js/commit/ef4cb092192c58c9b292b29590b888f45f9fd23d), [`30ac3aef`](https://github.com/thirdweb-dev/js/commit/30ac3aef840bde51a61acf786c709cffd3c47354), [`620e89dc`](https://github.com/thirdweb-dev/js/commit/620e89dc25c91557e2164a602c7aedd733525087), [`0fd8aa04`](https://github.com/thirdweb-dev/js/commit/0fd8aa04a9424497758d13a51a72363edcc30e19)]:
- @thirdweb-dev/sdk@3.10.26
- @thirdweb-dev/chains@0.1.25
## 0.10.26
### Patch Changes
- [#1240](https://github.com/thirdweb-dev/js/pull/1240) [`1c7264b4`](https://github.com/thirdweb-dev/js/commit/1c7264b40330d068ece67df537a0f5db0f6aedca) Thanks [@Marfuen](https://github.com/Marfuen)! - Small bug fix for updating packages using --nightly
- Updated dependencies [[`d498c79a`](https://github.com/thirdweb-dev/js/commit/d498c79a911d478077dfb8a2490eb1bf91523186), [`0c5b03b8`](https://github.com/thirdweb-dev/js/commit/0c5b03b8d6cc6a4e69bb2a4647d3626e69f1283c), [`9af346ee`](https://github.com/thirdweb-dev/js/commit/9af346eeada1037be27c8d3c9e1777f7be11a8ea)]:
- @thirdweb-dev/sdk@3.10.25
- @thirdweb-dev/storage@1.1.5
- @thirdweb-dev/chains@0.1.24
## 0.10.25
### Patch Changes
- Updated dependencies [[`6816219a`](https://github.com/thirdweb-dev/js/commit/6816219ac13ae571a0c90db6ab389c319bc1f052), [`48065bcd`](https://github.com/thirdweb-dev/js/commit/48065bcd91c13e1f44d54343b5c6c2646b9e86e4), [`6aa6f7e0`](https://github.com/thirdweb-dev/js/commit/6aa6f7e0bd2313e2e1ad96dd41aad91e6694d380), [`f7f4f207`](https://github.com/thirdweb-dev/js/commit/f7f4f20737ac5d78424ca9c91220f00b85adde6b), [`d4d95507`](https://github.com/thirdweb-dev/js/commit/d4d95507130b2b5408bfaa73ef3b708ca00c773e), [`483e2b91`](https://github.com/thirdweb-dev/js/commit/483e2b910934d75276a68bae64d04c47cd7d57e3), [`c08e6ba9`](https://github.com/thirdweb-dev/js/commit/c08e6ba988ad97aa27d5868cec8abe3498d07a0a), [`3d615a62`](https://github.com/thirdweb-dev/js/commit/3d615a62d0a6801f6fb0e63f9b95c2f98446add1)]:
- @thirdweb-dev/chains@0.1.23
- @thirdweb-dev/sdk@3.10.24
## 0.10.24
### Patch Changes
+1 -1
View File
@@ -2,7 +2,7 @@ import { CREATE_MESSAGES } from "../constants/constants";
import { prepareEnvironment } from "@gmrchk/cli-testing-library";
// this creates an app, can take some time that's fine
jest.setTimeout(120_000);
jest.setTimeout(240_000);
describe("npx thirdweb detect", () => {
it("should detect ERC721Base extensions", async () => {
+15 -15
View File
@@ -1,7 +1,7 @@
{
"name": "thirdweb",
"main": "dist/cli/index.js",
"version": "0.10.24",
"version": "0.10.32",
"repository": "https://github.com/thirdweb-dev/js/tree/main/packages/cli",
"author": "thirdweb eng <[email protected]>",
"license": "Apache-2.0",
@@ -14,25 +14,25 @@
"@types/async-retry": "^1.3.0",
"@types/cross-spawn": "^6.0.2",
"@types/inquirer": "^8.2.1",
"@types/jest": "^29.2.1",
"@types/jest": "^29.5.2",
"@types/js-yaml": "^4.0.5",
"@types/node": "^18.0.0",
"@types/prompts": "^2.0.14",
"@types/node": "^18.16.18",
"@types/prompts": "^2.4.4",
"@types/rimraf": "^3.0.0",
"@types/tar": "^6.1.2",
"@types/update-notifier": "^6.0.1",
"@types/tar": "^6.1.5",
"@types/update-notifier": "^6.0.4",
"@types/validate-npm-package-name": "^4.0.0",
"chalk": "^5.2.0",
"chalk": "^5.3.0",
"cross-spawn": "^7.0.3",
"eslint-config-thirdweb": "workspace:*",
"hardhat": "^2.9.3",
"hardhat": "^2.16.1",
"jest": "^29.4.3",
"ora": "^6.1.2",
"prettier": "^2.7.1",
"ts-jest": "^29.0.3",
"ora": "^6.3.1",
"prettier": "^2.8.8",
"ts-jest": "^29.1.0",
"ts-node": "^10.7.0",
"tsup": "^6.2.3",
"typescript": "^4.7.4"
"tsup": "^6.7.0",
"typescript": "^5.1.6"
},
"dependencies": {
"@iarna/toml": "^2.2.5",
@@ -53,10 +53,10 @@
"rimraf": "^3.0.2",
"solc": "0.8.17",
"sync-disk-cache": "^2.1.0",
"tar": "^6.1.11",
"tar": "^6.1.15",
"update-notifier": "^6.0.2",
"validate-npm-package-name": "^4.0.0",
"yaml": "^2.1.1"
"yaml": "^2.3.1"
},
"bin": {
"thirdweb": "./dist/cli/index.js"
@@ -1,27 +1,28 @@
import inquirer from "inquirer";
import { info } from "../helpers/logger";
import { FrameworkType, PackageManagerType } from "../types/ProjectType";
import inquirer from "inquirer";
import NextDetector from "./frameworks/next";
import CRADetector from "./frameworks/cra";
import RemixDetector from "./frameworks/remix";
import GatsbyDetector from "./frameworks/gatsby";
import VueDetector from "./frameworks/vue";
import ReactNativeCLIDetector from "./frameworks/reactNativeCli";
import DjangoDetector from "./frameworks/django";
import ExpoDetector from "./frameworks/expo";
import FoundryDetector from "./frameworks/foundry";
import HardhatDetector from "./frameworks/hardhat";
import { FrameworkDetector } from "./detector";
import TruffleDetector from "./frameworks/truffle";
import BrownieDetector from "./frameworks/brownie";
import FastAPIDetector from "./frameworks/fastAPI";
import FlaskDetector from "./frameworks/flask";
import PopulusDetector from "./frameworks/populus";
import FastifyDetector from "./frameworks/fastify";
import CRADetector from "./frameworks/cra";
import DjangoDetector from "./frameworks/django";
import EchoDetector from "./frameworks/echo";
import ExpoDetector from "./frameworks/expo";
import FastAPIDetector from "./frameworks/fastAPI";
import FastifyDetector from "./frameworks/fastify";
import FiberDetector from "./frameworks/fiber";
import FlaskDetector from "./frameworks/flask";
import FoundryDetector from "./frameworks/foundry";
import GatsbyDetector from "./frameworks/gatsby";
import GinDetector from "./frameworks/gin";
import HardhatDetector from "./frameworks/hardhat";
import NextDetector from "./frameworks/next";
import PopulusDetector from "./frameworks/populus";
import ReactNativeCLIDetector from "./frameworks/reactNativeCli";
import RemixDetector from "./frameworks/remix";
import RevelDetector from "./frameworks/revel";
import TruffleDetector from "./frameworks/truffle";
import ViteDetector from "./frameworks/vite";
import VueDetector from "./frameworks/vue";
import ZenjectDetector from "./frameworks/zenject";
export default async function detect(
@@ -50,6 +51,7 @@ export default async function detect(
new RevelDetector(),
new TruffleDetector(),
new VueDetector(),
new ViteDetector(),
new ZenjectDetector(),
];
@@ -1,13 +1,12 @@
import inquirer from "inquirer";
import { info } from "../helpers/logger";
import { LibraryType, PackageManagerType } from "../types/ProjectType";
import { LibraryDetector } from "./detector";
import inquirer from "inquirer";
import ReactDetector from "./libraries/react";
import ExpressDetector from "./libraries/express";
import ReactNativeDetector from "./libraries/reactNative";
import ViteDetector from "./libraries/vite";
import Web3PyDetector from "./libraries/web3py";
import PlayMakerDetector from "./libraries/playmaker";
import ReactDetector from "./libraries/react";
import ReactNativeDetector from "./libraries/reactNative";
import Web3PyDetector from "./libraries/web3py";
export default async function detect(
path: string,
@@ -19,7 +18,6 @@ export default async function detect(
new ExpressDetector(),
new ReactDetector(),
new ReactNativeDetector(),
new ViteDetector(),
new Web3PyDetector(),
new PlayMakerDetector(),
];
@@ -1,10 +1,10 @@
import { LibraryDetector } from "../detector";
import { existsSync, readFileSync } from "fs";
import { LibraryType } from "../../types/ProjectType";
import { parsePackageJson } from "../../../lib/utils";
import { FrameworkType } from "../../types/ProjectType";
import { FrameworkDetector } from "../detector";
export default class ViteDetector implements LibraryDetector {
public libraryType: LibraryType = "vite";
export default class ViteDetector implements FrameworkDetector {
public frameworkType: FrameworkType = "vite";
public matches(path: string): boolean {
const packageJsonPath = path + "/package.json";
@@ -16,7 +16,7 @@ export default class ViteDetector implements LibraryDetector {
const packageJson = readFileSync(packageJsonPath);
const { dependencies, devDependencies } = parsePackageJson(packageJson);
const viteDependencyExists =
dependencies["vite"] || devDependencies["vite"] || false;
!!dependencies["vite"] || !!devDependencies["vite"] || false;
return viteDependencyExists;
}
@@ -56,6 +56,7 @@ export type FrameworkType =
| "revel"
| "fiber"
| "zenject"
| "vite"
| "none";
export type LibraryType =
| "react"
+46 -19
View File
@@ -1,30 +1,57 @@
import NPMDetector from "../core/detection/npm";
import ViteDetector from "../core/detection/vite";
import YarnDetector from "../core/detection/yarn";
import { ThirdwebStorage } from "@thirdweb-dev/storage";
import detectFramework from "../core/detection/detectFramework";
import detectPackageManager from "../core/detection/detectPackageManager";
import { logger } from "../core/helpers/logger";
import { runCommand } from "../create/helpers/run-command";
import { upload } from "../storage/command";
import { ThirdwebStorage } from "@thirdweb-dev/storage";
export async function deployApp(distPath = "dist", projectPath = ".") {
const storage = new ThirdwebStorage();
const supportedFrameworks = [new ViteDetector()];
const detectedPackageManager = await detectPackageManager(projectPath, {});
const detectedFramework = await detectFramework(projectPath, {}, detectedPackageManager);
const possibleProjects = supportedFrameworks
.filter((detector) => detector.matches(projectPath))
.map((detector) => detector.projectType);
const hasYarn = new YarnDetector().matches(".");
const hasNPM = new NPMDetector().matches(".");
if (possibleProjects.length === 0) {
if (detectedFramework === "none") {
throw new Error("No supported project detected");
}
switch (detectedFramework) {
case "next":
distPath = "out";
break;
case "cra":
distPath = "build";
break;
default:
break;
}
logger.info(`Detected project type: ${detectedFramework}`);
logger.info(`Detected package manager: ${detectedPackageManager}`);
logger.info(`distPath: ${distPath}`);
logger.info(`projectPath: ${projectPath}`);
try {
if (hasYarn) {
await runCommand("yarn", ["build"]);
} else if (hasNPM) {
await runCommand("npm", ["build"]);
switch (detectedPackageManager) {
case "yarn":
await runCommand("yarn", ["build"], true);
if (detectedFramework === "next") {
await runCommand("yarn", ["next", "export"], true);
}
break;
case "npm":
await runCommand("npm", ["run", "build"], true);
if (detectedFramework === "next") {
await runCommand("npx", ["next", "export"], true);
}
break;
case "pnpm":
await runCommand("pnpm", ["build"], true);
if (detectedFramework === "next") {
await runCommand("pnpm", ["next", "export"], true);
}
break;
default:
throw new Error("No supported package manager detected");
}
} catch (err) {
console.error("Can't build project");
@@ -33,9 +60,9 @@ export async function deployApp(distPath = "dist", projectPath = ".") {
try {
const uri = await upload(storage, distPath);
return `https://thirdweb.com/app/deploy/${uri.replace("ipfs://", "")}`;
return `${uri.replace("ipfs://", "https://ipfs-public.thirdwebcdn.com/ipfs/")}`;
} catch (err) {
console.error("Can't upload project");
console.error("Can't upload project", err);
return Promise.reject("Can't upload project");
}
}
+5 -5
View File
@@ -1,8 +1,8 @@
import * as toml from "@iarna/toml";
import { PackageManagerType } from "../core/types/ProjectType";
import { existsSync, readFileSync } from "fs";
import { runCommand } from "../create/helpers/run-command";
import path from "path";
import { PackageManagerType } from "../core/types/ProjectType";
import { runCommand } from "../create/helpers/run-command";
import { IProcessAppTypeArgs, IProcessContractAppTypeArgs } from "./types";
export function convertDependenciesToStringFormat(dependenciesObject: object) {
@@ -174,7 +174,7 @@ export const installOrUpdate = async (packageManager: PackageManagerType, depend
case "npm":
runner = "npm";
installCommand = ["install"];
updateCommand = ["update"]
updateCommand = ["install", "--legacy-peer-deps"]
break;
case "yarn":
runner = "yarn";
@@ -223,7 +223,7 @@ export const installOrUpdate = async (packageManager: PackageManagerType, depend
}
if (typeOfAction === "install") {
if (!dependenciesToAdd.length) {return;}
if (!dependenciesToAdd.length) { return; }
const commands = [...installCommand, ...dependenciesToAdd];
await runCommand(runner, commands, printLogs);
@@ -233,7 +233,7 @@ export const installOrUpdate = async (packageManager: PackageManagerType, depend
}
}
if (typeOfAction === "update") {
if (!dependenciesToUpdate.length) {return;}
if (!dependenciesToUpdate.length) { return; }
const commands = [...updateCommand, ...dependenciesToUpdate];
await runCommand(runner, commands, printLogs);
}
+1 -1
View File
@@ -1,7 +1,7 @@
import { spinner } from "../core/helpers/logger";
import { BufferOrStringWithName, ThirdwebStorage } from "@thirdweb-dev/storage";
import fs from "fs";
import path from "path";
import { spinner } from "../core/helpers/logger";
function recurseFiles(
uploadPath: string,
+18
View File
@@ -1,5 +1,23 @@
# @thirdweb-dev/contracts-js
## 1.3.9
### Patch Changes
- [#1299](https://github.com/thirdweb-dev/js/pull/1299) [`7e044c66`](https://github.com/thirdweb-dev/js/commit/7e044c664d8a034f5324b859ac3596860c86f9a5) Thanks [@nkrishang](https://github.com/nkrishang)! - Add ERC721LoyaltyCard and ERC721UpdatableMetadata
## 1.3.8
### Patch Changes
- [#1278](https://github.com/thirdweb-dev/js/pull/1278) [`8a389f12`](https://github.com/thirdweb-dev/js/commit/8a389f1295d2bf726059997ea0ca10cf0424f2a2) Thanks [@jnsdls](https://github.com/jnsdls)! - updated various dependencies
## 1.3.7
### Patch Changes
- [#1241](https://github.com/thirdweb-dev/js/pull/1241) [`9af346ee`](https://github.com/thirdweb-dev/js/commit/9af346eeada1037be27c8d3c9e1777f7be11a8ea) Thanks [@nkrishang](https://github.com/nkrishang)! - Use fn getAllAccounts instead of event logs AccountCreated
## 1.3.6
### Patch Changes
+7 -7
View File
@@ -1,6 +1,6 @@
{
"name": "@thirdweb-dev/contracts-js",
"version": "1.3.6",
"version": "1.3.9",
"main": "dist/thirdweb-dev-contracts-js.cjs.js",
"module": "dist/thirdweb-dev-contracts-js.esm.js",
"browser": {
@@ -10,20 +10,20 @@
"license": "Apache-2.0",
"repository": "https://github.com/thirdweb-dev/js/tree/main/packages/contracts-js",
"dependencies": {
"@thirdweb-dev/contracts": "3.5.7"
"@thirdweb-dev/contracts": "3.6.0"
},
"devDependencies": {
"@babel/preset-env": "^7.18.10",
"@babel/preset-typescript": "^7.18.6",
"@babel/preset-env": "^7.22.5",
"@babel/preset-typescript": "^7.22.5",
"@ethersproject/abi": "^5.7.0",
"@ethersproject/providers": "^5.7.2",
"@preconstruct/cli": "^2.2.1",
"@preconstruct/cli": "^2.7.0",
"@thirdweb-dev/tsconfig": "workspace:*",
"@typechain/ethers-v5": "10.0.0",
"eslint-config-thirdweb": "workspace:*",
"ethers": "^5.7.2",
"typechain": "^8.1.0",
"typescript": "^4.7.4"
"typechain": "^8.2.0",
"typescript": "^5.1.6"
},
"peerDependencies": {
"ethers": "^5"
@@ -1,5 +1,11 @@
# eslint-config-thirdweb
## 0.1.5
### Patch Changes
- [#1278](https://github.com/thirdweb-dev/js/pull/1278) [`8a389f12`](https://github.com/thirdweb-dev/js/commit/8a389f1295d2bf726059997ea0ca10cf0424f2a2) Thanks [@jnsdls](https://github.com/jnsdls)! - updated various dependencies
## 0.1.4
### Patch Changes
+1 -1
View File
@@ -17,7 +17,7 @@ module.exports = {
// import rules
"import/first": "error",
"import/newline-after-import": "error",
"import/no-cycle": "warn",
"import/no-cycle": "error",
"import/no-useless-path-segments": "error",
//eslint
+4 -4
View File
@@ -1,13 +1,13 @@
{
"name": "eslint-config-thirdweb",
"version": "0.1.4",
"version": "0.1.5",
"main": "index.js",
"license": "Apache-2.0",
"dependencies": {
"@typescript-eslint/eslint-plugin": "^5.33.0",
"@typescript-eslint/parser": "^5.33.0",
"@typescript-eslint/eslint-plugin": "^5.60.1",
"@typescript-eslint/parser": "^5.60.1",
"eslint-config-next": "13.2.4",
"eslint-config-prettier": "^8.3.0",
"eslint-config-prettier": "^8.8.0",
"eslint-config-turbo": "^0.0.8",
"eslint-plugin-react": "^7.28.0"
},
+6
View File
@@ -1,5 +1,11 @@
# @thirdweb-dev/pay
## 0.1.2
### Patch Changes
- [#1278](https://github.com/thirdweb-dev/js/pull/1278) [`8a389f12`](https://github.com/thirdweb-dev/js/commit/8a389f1295d2bf726059997ea0ca10cf0424f2a2) Thanks [@jnsdls](https://github.com/jnsdls)! - updated various dependencies
## 0.1.1
### Patch Changes
+5 -5
View File
@@ -1,6 +1,6 @@
{
"name": "@thirdweb-dev/pay",
"version": "0.1.1",
"version": "0.1.2",
"main": "dist/thirdweb-dev-pay.cjs.js",
"module": "dist/thirdweb-dev-pay.esm.js",
"exports": {
@@ -33,13 +33,13 @@
},
"sideEffects": false,
"dependencies": {
"@coinbase/cbpay-js": "^1.6.0"
"@coinbase/cbpay-js": "^1.7.0"
},
"devDependencies": {
"@preconstruct/cli": "^2.2.1",
"typescript": "^4.7.4",
"@preconstruct/cli": "^2.7.0",
"@thirdweb-dev/tsconfig": "workspace:*",
"eslint-config-thirdweb": "workspace:*",
"@thirdweb-dev/tsconfig": "workspace:*"
"typescript": "^5.1.6"
},
"scripts": {
"format": "prettier --write 'src/**/*'",
+116
View File
@@ -1,5 +1,121 @@
# @thirdweb-dev/react-core
## 3.14.11
### Patch Changes
- Updated dependencies [[`40682191`](https://github.com/thirdweb-dev/js/commit/40682191450de08ad40b9d2957afced248657af2)]:
- @thirdweb-dev/chains@0.1.30
- @thirdweb-dev/sdk@3.10.31
- @thirdweb-dev/wallets@1.0.7
## 3.14.10
### Patch Changes
- Updated dependencies [[`db68bd04`](https://github.com/thirdweb-dev/js/commit/db68bd04cd8bb3ee6bff051d1d5b5a872353fde0), [`fd74d791`](https://github.com/thirdweb-dev/js/commit/fd74d7918072cda03b52f852ebb3f8dccb84074d), [`35f20ceb`](https://github.com/thirdweb-dev/js/commit/35f20ceb4f943e95d9566105096f06412978da7a)]:
- @thirdweb-dev/storage@1.1.8
- @thirdweb-dev/sdk@3.10.30
- @thirdweb-dev/chains@0.1.29
- @thirdweb-dev/wallets@1.0.6
## 3.14.9
### Patch Changes
- [#1309](https://github.com/thirdweb-dev/js/pull/1309) [`4961b597`](https://github.com/thirdweb-dev/js/commit/4961b597a098dae0a4eff01a9ef268a65fe1a352) Thanks [@jnsdls](https://github.com/jnsdls)! - unblock storage domains
- Updated dependencies [[`7e044c66`](https://github.com/thirdweb-dev/js/commit/7e044c664d8a034f5324b859ac3596860c86f9a5), [`72ada475`](https://github.com/thirdweb-dev/js/commit/72ada47596d5d5c08736c33215faeec636b7156a), [`2c0bb078`](https://github.com/thirdweb-dev/js/commit/2c0bb0789955f6cd397b6fdb8e990a505251c631), [`b5c6eedb`](https://github.com/thirdweb-dev/js/commit/b5c6eedb38aa3c52eb97f3d25ad83e38c55afe61), [`10b3a717`](https://github.com/thirdweb-dev/js/commit/10b3a717da606632a05769ac821bdd21d6b63a03), [`b4aee9b5`](https://github.com/thirdweb-dev/js/commit/b4aee9b59121bab5f9b3d9b7ecdc4bcb4cd66f58), [`4961b597`](https://github.com/thirdweb-dev/js/commit/4961b597a098dae0a4eff01a9ef268a65fe1a352)]:
- @thirdweb-dev/chains@0.1.28
- @thirdweb-dev/sdk@3.10.29
- @thirdweb-dev/wallets@1.0.5
- @thirdweb-dev/storage@1.1.7
## 3.14.8
### Patch Changes
- [#1278](https://github.com/thirdweb-dev/js/pull/1278) [`8a389f12`](https://github.com/thirdweb-dev/js/commit/8a389f1295d2bf726059997ea0ca10cf0424f2a2) Thanks [@jnsdls](https://github.com/jnsdls)! - updated various dependencies
- Updated dependencies [[`2d088d36`](https://github.com/thirdweb-dev/js/commit/2d088d367ca54233836dc69712fd411ab7924205), [`8a389f12`](https://github.com/thirdweb-dev/js/commit/8a389f1295d2bf726059997ea0ca10cf0424f2a2), [`9daf0449`](https://github.com/thirdweb-dev/js/commit/9daf044926bf995ac8998929dbeca548c5eb8561), [`546353a4`](https://github.com/thirdweb-dev/js/commit/546353a479c11533818ef917c0f6b4d6f8f69872), [`a3bb17cb`](https://github.com/thirdweb-dev/js/commit/a3bb17cb33f033846fb3b4c8a0a4809ba76cab96), [`0135a779`](https://github.com/thirdweb-dev/js/commit/0135a7790cf2acde6b701cb41ea10dd311da5ec3)]:
- @thirdweb-dev/storage@1.1.6
- @thirdweb-dev/wallets@1.0.4
- @thirdweb-dev/chains@0.1.27
- @thirdweb-dev/sdk@3.10.28
## 3.14.7
### Patch Changes
- [#1271](https://github.com/thirdweb-dev/js/pull/1271) [`c9535715`](https://github.com/thirdweb-dev/js/commit/c95357158819abd42d4b0900ecc2fa40fcb957f8) Thanks [@nkrishang](https://github.com/nkrishang)! - Rename smart wallets to account
- [#1273](https://github.com/thirdweb-dev/js/pull/1273) [`edcd22d6`](https://github.com/thirdweb-dev/js/commit/edcd22d61236edb2832f9b2f9796e891d58cb145) Thanks [@MananTank](https://github.com/MananTank)! - Add `autoConnectTimeout` to `ThirdwebProvider` to timeout wallet autoconnect
- Updated dependencies [[`2b113539`](https://github.com/thirdweb-dev/js/commit/2b113539098384f910b3c4d54e1fde9d35a6f053), [`c9535715`](https://github.com/thirdweb-dev/js/commit/c95357158819abd42d4b0900ecc2fa40fcb957f8), [`be606dd3`](https://github.com/thirdweb-dev/js/commit/be606dd3c93c1514834c1d970e864d7f949a07ab), [`5882091e`](https://github.com/thirdweb-dev/js/commit/5882091eab65978009a5a5305701f121851b10ad), [`998e5217`](https://github.com/thirdweb-dev/js/commit/998e521733efd6a67e42f9bf0beab5fbdccf08ae)]:
- @thirdweb-dev/wallets@1.0.3
- @thirdweb-dev/sdk@3.10.27
- @thirdweb-dev/chains@0.1.26
## 3.14.6
### Patch Changes
- Updated dependencies [[`ed711c8c`](https://github.com/thirdweb-dev/js/commit/ed711c8cb2ed6a0deb1b2a5eeec06df1d4edc5e8), [`05a7495a`](https://github.com/thirdweb-dev/js/commit/05a7495a132aabab5f48abbdb80a468ff6f65df8), [`e78da6b3`](https://github.com/thirdweb-dev/js/commit/e78da6b36cfa6d954234820563201bf760186ed1)]:
- @thirdweb-dev/wallets@1.0.2
## 3.14.5
### Patch Changes
- Updated dependencies [[`efb3546e`](https://github.com/thirdweb-dev/js/commit/efb3546ec8268156be00301af28b9d83ecd5ab08)]:
- @thirdweb-dev/wallets@1.0.1
## 3.14.4
### Patch Changes
- [#1227](https://github.com/thirdweb-dev/js/pull/1227) [`06ca1c40`](https://github.com/thirdweb-dev/js/commit/06ca1c407dfee9d3d1fdaed1b6223ad0f9b8857b) Thanks [@nkrishang](https://github.com/nkrishang)! - Add react hooks for smart wallet
- [#1248](https://github.com/thirdweb-dev/js/pull/1248) [`620e89dc`](https://github.com/thirdweb-dev/js/commit/620e89dc25c91557e2164a602c7aedd733525087) Thanks [@nachoiacovino](https://github.com/nachoiacovino)! - Export account hooks
- [#1253](https://github.com/thirdweb-dev/js/pull/1253) [`ad7dae3b`](https://github.com/thirdweb-dev/js/commit/ad7dae3b163e61c7a6eb57f654885a7fdaa4cbb6) Thanks [@rattrayd11](https://github.com/rattrayd11)! - Stop using useActiveChain deprecated hook
- Updated dependencies [[`ef4cb092`](https://github.com/thirdweb-dev/js/commit/ef4cb092192c58c9b292b29590b888f45f9fd23d), [`ac3e019c`](https://github.com/thirdweb-dev/js/commit/ac3e019cd1776dbdb0d06b213420ad17586f678e), [`30ac3aef`](https://github.com/thirdweb-dev/js/commit/30ac3aef840bde51a61acf786c709cffd3c47354), [`3c5dc480`](https://github.com/thirdweb-dev/js/commit/3c5dc4804abc56b933ec45e9e1da11eb182296cc), [`620e89dc`](https://github.com/thirdweb-dev/js/commit/620e89dc25c91557e2164a602c7aedd733525087), [`0fd8aa04`](https://github.com/thirdweb-dev/js/commit/0fd8aa04a9424497758d13a51a72363edcc30e19)]:
- @thirdweb-dev/sdk@3.10.26
- @thirdweb-dev/wallets@1.0.0
- @thirdweb-dev/chains@0.1.25
## 3.14.3
### Patch Changes
- [#1235](https://github.com/thirdweb-dev/js/pull/1235) [`1d76334d`](https://github.com/thirdweb-dev/js/commit/1d76334dd3884703629835422f241d2825128f6f) Thanks [@nachoiacovino](https://github.com/nachoiacovino)! - Fix required type for address on useSmartWalletsForAddress
- [#1241](https://github.com/thirdweb-dev/js/pull/1241) [`9af346ee`](https://github.com/thirdweb-dev/js/commit/9af346eeada1037be27c8d3c9e1777f7be11a8ea) Thanks [@nkrishang](https://github.com/nkrishang)! - Use fn getAllAccounts instead of event logs AccountCreated
- Updated dependencies [[`536b0f12`](https://github.com/thirdweb-dev/js/commit/536b0f1240ab446aac22cf547a4e09e73ee6bf7b), [`b626782b`](https://github.com/thirdweb-dev/js/commit/b626782b0e8c6b76673472d3aee1c802dfb11b5f), [`d498c79a`](https://github.com/thirdweb-dev/js/commit/d498c79a911d478077dfb8a2490eb1bf91523186), [`0c5b03b8`](https://github.com/thirdweb-dev/js/commit/0c5b03b8d6cc6a4e69bb2a4647d3626e69f1283c), [`9af346ee`](https://github.com/thirdweb-dev/js/commit/9af346eeada1037be27c8d3c9e1777f7be11a8ea)]:
- @thirdweb-dev/wallets@0.3.3
- @thirdweb-dev/sdk@3.10.25
- @thirdweb-dev/storage@1.1.5
- @thirdweb-dev/chains@0.1.24
## 3.14.2
### Patch Changes
- [#1230](https://github.com/thirdweb-dev/js/pull/1230) [`b5e1d3bb`](https://github.com/thirdweb-dev/js/commit/b5e1d3bb2b82785d6d3e5c899d27691bdb638625) Thanks [@nachoiacovino](https://github.com/nachoiacovino)! - Add useSmartWalletsForAddress hook
- [#1224](https://github.com/thirdweb-dev/js/pull/1224) [`f7f4f207`](https://github.com/thirdweb-dev/js/commit/f7f4f20737ac5d78424ca9c91220f00b85adde6b) Thanks [@nachoiacovino](https://github.com/nachoiacovino)! - Better return type for get shared metadata
- [#1213](https://github.com/thirdweb-dev/js/pull/1213) [`3ce5f9a0`](https://github.com/thirdweb-dev/js/commit/3ce5f9a0c3fc7e99b5abf691a87048ab8475f6b1) Thanks [@iketw](https://github.com/iketw)! - [ReactCore/Wallets] Improve error messages for wc and auth
- [#1218](https://github.com/thirdweb-dev/js/pull/1218) [`d4d95507`](https://github.com/thirdweb-dev/js/commit/d4d95507130b2b5408bfaa73ef3b708ca00c773e) Thanks [@nachoiacovino](https://github.com/nachoiacovino)! - Add get for shared metadata
- Updated dependencies [[`6816219a`](https://github.com/thirdweb-dev/js/commit/6816219ac13ae571a0c90db6ab389c319bc1f052), [`48065bcd`](https://github.com/thirdweb-dev/js/commit/48065bcd91c13e1f44d54343b5c6c2646b9e86e4), [`3cb298ac`](https://github.com/thirdweb-dev/js/commit/3cb298ac4b04d295899b5ac77c7fc5869ec2f5f2), [`6aa6f7e0`](https://github.com/thirdweb-dev/js/commit/6aa6f7e0bd2313e2e1ad96dd41aad91e6694d380), [`f7f4f207`](https://github.com/thirdweb-dev/js/commit/f7f4f20737ac5d78424ca9c91220f00b85adde6b), [`3ce5f9a0`](https://github.com/thirdweb-dev/js/commit/3ce5f9a0c3fc7e99b5abf691a87048ab8475f6b1), [`d4d95507`](https://github.com/thirdweb-dev/js/commit/d4d95507130b2b5408bfaa73ef3b708ca00c773e), [`a388d07a`](https://github.com/thirdweb-dev/js/commit/a388d07a3d449e56dc53fed9600931022f4a15e1), [`1ce8558d`](https://github.com/thirdweb-dev/js/commit/1ce8558df47186bcba5ee8564fdb04583bf115dd), [`483e2b91`](https://github.com/thirdweb-dev/js/commit/483e2b910934d75276a68bae64d04c47cd7d57e3), [`c08e6ba9`](https://github.com/thirdweb-dev/js/commit/c08e6ba988ad97aa27d5868cec8abe3498d07a0a), [`60fb1889`](https://github.com/thirdweb-dev/js/commit/60fb18894372f14d9cd815fa9a239926d31bb273), [`3d615a62`](https://github.com/thirdweb-dev/js/commit/3d615a62d0a6801f6fb0e63f9b95c2f98446add1)]:
- @thirdweb-dev/chains@0.1.23
- @thirdweb-dev/sdk@3.10.24
- @thirdweb-dev/wallets@0.3.2
## 3.14.1
### Patch Changes
+17 -21
View File
@@ -1,6 +1,6 @@
{
"name": "@thirdweb-dev/react-core",
"version": "3.14.1",
"version": "3.14.11",
"repository": "https://github.com/thirdweb-dev/js/tree/main/packages/react-core",
"author": "thirdweb eng <[email protected]>",
"license": "Apache-2.0",
@@ -66,26 +66,26 @@
},
"sideEffects:": false,
"devDependencies": {
"@babel/core": "^7.19.3",
"@babel/preset-env": "^7.18.10",
"@babel/preset-react": "^7.18.6",
"@babel/preset-typescript": "^7.18.6",
"@babel/runtime": "^7.19.0",
"@microsoft/api-documenter": "^7.19.4",
"@microsoft/api-extractor": "^7.29.2",
"@babel/core": "^7.22.5",
"@babel/preset-env": "^7.22.5",
"@babel/preset-react": "^7.22.5",
"@babel/preset-typescript": "^7.22.5",
"@babel/runtime": "^7.22.5",
"@microsoft/api-documenter": "^7.22.21",
"@microsoft/api-extractor": "^7.36.0",
"@microsoft/tsdoc": "^0.14.1",
"@preconstruct/cli": "^2.2.1",
"@preconstruct/cli": "^2.7.0",
"@solana/wallet-adapter-react": "^0.15.19",
"@solana/web3.js": "^1.62.0",
"@thirdweb-dev/auth": "workspace:*",
"@thirdweb-dev/tsconfig": "workspace:*",
"@types/js-cookie": "^3.0.3",
"@types/mime": "3.0.0",
"@types/react": "^18.0.5",
"@typescript-eslint/eslint-plugin": "^5.33.0",
"@typescript-eslint/parser": "^5.33.0",
"eslint": "^8.42.0",
"eslint-config-prettier": "^8.3.0",
"@types/react": "^18.2.14",
"@typescript-eslint/eslint-plugin": "^5.60.1",
"@typescript-eslint/parser": "^5.60.1",
"eslint": "^8.43.0",
"eslint-config-prettier": "^8.8.0",
"eslint-config-thirdweb": "workspace:*",
"eslint-plugin-better-tree-shaking": "0.0.3",
"eslint-plugin-import": "^2.26.0",
@@ -93,12 +93,12 @@
"eslint-plugin-prettier": "^4.2.1",
"eslint-plugin-tsdoc": "^0.2.16",
"ethers": "^5.7.2",
"prettier": "^2.7.1",
"prettier": "^2.8.8",
"react": "^18.2.0",
"typescript": "^4.7.4"
"typescript": "^5.1.6"
},
"dependencies": {
"@tanstack/react-query": "^4.0.10",
"@tanstack/react-query": "^4.29.19",
"@thirdweb-dev/chains": "workspace:*",
"@thirdweb-dev/generated-abis": "workspace:^",
"@thirdweb-dev/sdk": "workspace:*",
@@ -113,10 +113,6 @@
"ethers": ">=5.5.1",
"react": ">=18.0.0"
},
"resolutions": {
"ansi-regex": "^6.0.1",
"typescript": "^4.6.2"
},
"peerDependenciesMeta": {
"@solana/web3.js": {
"optional": true
@@ -1,6 +1,6 @@
import { Chain, defaultChains } from "@thirdweb-dev/chains";
import { useCallback, useState } from "react";
import { useActiveChain, useChainId } from "../../evm/hooks/wallet";
import { useChain, useChainId } from "../../evm/hooks/wallet";
import { useSupportedChains } from "../../evm/hooks/useSupportedChains";
import { useSwitchChain, useWallet } from "./wallet-hooks";
import { assertWindowEthereum, walletIds } from "@thirdweb-dev/wallets";
@@ -29,7 +29,7 @@ type NetworkMetadata = {
/**
*
* @deprecated - use `useActiveChain`, `useSwitchChain`, `useChainId` instead
* @deprecated - use `useChain`, `useSwitchChain`, `useChainId` instead
*
* Hook for getting metadata about the network the current wallet is connected to and switching networks
*
@@ -55,7 +55,7 @@ type NetworkMetadata = {
* @public
*/
export function useNetwork(): [NetworkMetadata, SwitchNetwork | undefined] {
const chain = useActiveChain();
const chain = useChain();
const chainId = useChainId();
const switchChain = useSwitchChain();
const supportedChains = useSupportedChains();
@@ -61,6 +61,15 @@ export interface ThirdwebProviderCoreProps<TChains extends Chain[]>
* Whether or not to automatically switch to wallet's network to active chain
*/
autoSwitch?: boolean;
/**
* Timeout for auto-connecting wallet in milliseconds
*
* If wallet fails to connect in this time, it will stop trying to connect and user will have to manually connect
*
* @defaultValue 15000
*/
autoConnectTimeout?: number;
}
export const ThirdwebProviderCore = <TChains extends Chain[]>({
@@ -145,6 +154,7 @@ export const ThirdwebProviderCore = <TChains extends Chain[]>({
dAppMeta={dAppMeta}
activeChain={activeChainWithKey}
autoSwitch={props.autoSwitch}
autoConnectTimeout={props.autoConnectTimeout}
>
<ThirdwebSDKProviderWrapper
queryClient={props.queryClient}
@@ -101,12 +101,15 @@ export function ThirdwebWalletProvider(
dAppMeta?: DAppMetaData;
chains: Chain[];
autoSwitch?: boolean;
autoConnectTimeout?: number;
}>,
) {
const [signer, setSigner] = useState<Signer | undefined>(undefined);
const [connectionStatus, setConnectionStatus] =
useState<ConnectionStatus>("unknown");
const autoConnectTimeout = props.autoConnectTimeout || 15000;
const [activeWallet, setActiveWallet] = useState<
WalletInstance | undefined
>();
@@ -311,8 +314,14 @@ export function ThirdwebWalletProvider(
const personalWalletInstance = createWalletInstance(personalWalleObj);
try {
await personalWalletInstance.autoConnect(
personalWalletInfo.connectParams,
await timeoutPromise(
personalWalletInstance.autoConnect(
personalWalletInfo.connectParams,
),
{
ms: autoConnectTimeout,
message: "Failed to Auto connect. Auto connect timed out.",
},
);
} catch (e) {
console.error(e);
@@ -337,7 +346,10 @@ export function ThirdwebWalletProvider(
try {
setConnectionStatus("connecting");
await wallet.autoConnect(walletInfo.connectParams);
await timeoutPromise(wallet.autoConnect(walletInfo.connectParams), {
ms: autoConnectTimeout,
message: "Failed to Auto connect. Auto connect timed out.",
});
setConnectedWallet(wallet, walletInfo.connectParams, true);
} catch (e) {
console.error(e);
@@ -356,6 +368,7 @@ export function ThirdwebWalletProvider(
props.shouldAutoConnect,
activeWallet,
connectionStatus,
autoConnectTimeout,
]);
const connectWallet = useCallback(
@@ -496,3 +509,32 @@ async function saveLastConnectedWalletInfo(
console.error("Error saving the last connected wallet info", e);
}
}
/**
* Timeout a promise with a given Error message if the promise does not resolve in given time
*
* @param promise - Promise to track for timeout
* @param option - timeout options
* @returns
*/
function timeoutPromise<T>(
promise: Promise<T>,
option: { ms: number; message: string },
) {
return new Promise<T>((resolve, reject) => {
const timeoutId = setTimeout(() => {
reject(new Error(option.message));
}, option.ms);
promise.then(
(res) => {
clearTimeout(timeoutId);
resolve(res);
},
(err) => {
clearTimeout(timeoutId);
reject(err);
},
);
});
}
@@ -1,25 +1,10 @@
import mime from "mime/lite.js";
import {
parseGatewayUrls,
prepareGatewayUrls,
replaceSchemeWithGatewayUrl,
} from "@thirdweb-dev/storage";
// TODO legacy remove this when possible
export interface IPFSResolverOptions {
gatewayUrl: string;
}
export function resolveIpfsUri(uri?: string, options?: IPFSResolverOptions) {
if (!uri) {
return undefined;
}
const gatewayUrls = prepareGatewayUrls(
parseGatewayUrls(options?.gatewayUrl ? [options?.gatewayUrl] : undefined),
);
return replaceSchemeWithGatewayUrl(uri, gatewayUrls);
}
export async function resolveMimeType(url?: string) {
if (!url) {
return undefined;
@@ -52,7 +52,7 @@ function ChangeActiveWalletOnAccountSwitch() {
try {
await switchAccount(data.address);
} catch (err) {
console.warn(
console.debug(
`[Auth] Failed to switch account to ${data.address} with error:\n`,
err,
);
@@ -63,7 +63,7 @@ function ChangeActiveWalletOnAccountSwitch() {
try {
await logout();
} catch (err) {
console.warn(`[Auth] Failed to logout with error:\n`, err);
console.debug(`[Auth] Failed to logout with error:\n`, err);
}
};
@@ -0,0 +1,185 @@
import {
RequiredParam,
requiredParamInvariant,
} from "../../../core/query-utils/required-param";
import { useSDKChainId } from "../../providers/thirdweb-sdk-provider";
import { WalletAddress } from "../../types";
import {
cacheKeys,
invalidateContractAndBalances,
} from "../../utils/cache-keys";
import { useQueryWithNetwork } from "../query-utils/useQueryWithNetwork";
import {
useMutation,
useQueryClient,
UseQueryResult,
} from "@tanstack/react-query";
import type { AccountEvent, SmartContract } from "@thirdweb-dev/sdk";
import type { BytesLike } from "ethers";
import invariant from "tiny-invariant";
/** **********************/
/** READ HOOKS **/
/** **********************/
/**
* Get all accounts
*
* @example
* ```javascript
* const { data: accounts, isLoading, error } = useAccounts(contract);
* ```
*
* @param contract - an instance of a account factory contract
* @returns a response object that includes an array of all accounts with their associated admin
* @twfeature AccountFactory
* @see {@link https://portal.thirdweb.com/react/react.useaccounts?utm_source=sdk | Documentation}
* @beta
*/
export function useAccounts(
contract: RequiredParam<SmartContract>,
): UseQueryResult<AccountEvent[]> {
const contractAddress = contract?.getAddress();
return useQueryWithNetwork(
cacheKeys.contract.accountFactory.getAll(contractAddress),
() => {
requiredParamInvariant(contract, "No Contract instance provided");
invariant(
contract.accountFactory.getAllAccounts,
"Contract instance does not support contract.accountFactory.getAllAccounts",
);
return contract.accountFactory.getAllAccounts();
},
{ enabled: !!contract },
);
}
/**
* Get all accounts associated with the provided address
*
* @example
* ```javascript
* const { data: accountsForAddress, isLoading, error } = useAccountsForAddress(contract, "{{account_address}}");
* ```
*
* @param contract - an instance of a account factory contract
* @returns a response object that includes an array of all accounts associated with the adress
* @twfeature AccountFactory
* @see {@link https://portal.thirdweb.com/react/react.useaccountsforaddress?utm_source=sdk | Documentation}
* @beta
*/
export function useAccountsForAddress(
contract: RequiredParam<SmartContract>,
address: RequiredParam<WalletAddress>,
): UseQueryResult<string[]> {
const contractAddress = contract?.getAddress();
return useQueryWithNetwork(
cacheKeys.contract.accountFactory.getAllForAddress(
contractAddress,
address,
),
() => {
requiredParamInvariant(contract, "No Contract instance provided");
invariant(
contract.accountFactory.getAssociatedAccounts,
"Contract instance does not support contract.accountFactory.getAssociatedAccounts",
);
return contract.accountFactory.getAssociatedAccounts(address || "");
},
{ enabled: !!contract },
);
}
/**
* Check if a account has been deployed for the given admin
*
* @example
* ```javascript
* const { data: isAccountDeployed, isLoading, error } = useIsAccountDeployed(contract);
* ```
*
* @param contract - an instance of a account factory contract
* @returns a boolean indicating if a account has been deployed for the given admin
* @twfeature AccountFactory
* @see {@link https://portal.thirdweb.com/react/react.useisaccountdeployed?utm_source=sdk | Documentation}
* @beta
*/
export function useIsAccountDeployed(
contract: RequiredParam<SmartContract>,
admin: RequiredParam<WalletAddress>,
extraData?: BytesLike,
): UseQueryResult<boolean> {
const contractAddress = contract?.getAddress();
return useQueryWithNetwork(
cacheKeys.contract.accountFactory.isAccountDeployed(contractAddress, admin),
() => {
requiredParamInvariant(contract, "No Contract instance provided");
invariant(
contract.accountFactory.isAccountDeployed,
"Contract instance does not support contract.accountFactory.getAllAccounts",
);
invariant(admin, "No account address provided");
return contract.accountFactory.isAccountDeployed(admin, extraData);
},
{ enabled: !!contract },
);
}
/** **********************/
/** WRITE HOOKS **/
/** **********************/
/**
* Create a account
*
* @example
* ```jsx
* const Component = () => {
* const { contract } = useContract("{{contract_address}}");
* const {
* mutate: createAccount,
* isLoading,
* error,
* } = useCreateAccount(contract);
*
* if (error) {
* console.error("failed to create account", error);
* }
*
* return (
* <button
* disabled={isLoading}
* onClick={() => createAccount("0x...")}
* >
* Create Account
* </button>
* );
* };
* ```
*
* @param contract - an instance of a account factory contract
* @returns a mutation object that can be used to create a account
* @twfeature AccountFactory
* @see {@link https://portal.thirdweb.com/react/react.usecreateaccount?utm_source=sdk | Documentation}
* @beta
*/
export function useCreateAccount(contract: RequiredParam<SmartContract>) {
const activeChainId = useSDKChainId();
const contractAddress = contract?.getAddress();
const queryClient = useQueryClient();
return useMutation(
async (admin: string, extraData?: BytesLike) => {
requiredParamInvariant(contract, "contract is undefined");
return contract.accountFactory.createAccount(admin, extraData);
},
{
onSettled: () =>
invalidateContractAndBalances(
queryClient,
contractAddress,
activeChainId,
),
},
);
}
@@ -0,0 +1,125 @@
import type { providers } from "ethers";
import {
RequiredParam,
requiredParamInvariant,
} from "../../../core/query-utils/required-param";
import { useSDKChainId } from "../../providers/thirdweb-sdk-provider";
import {
cacheKeys,
invalidateContractAndBalances,
} from "../../utils/cache-keys";
import { useQueryWithNetwork } from "../query-utils/useQueryWithNetwork";
import {
useMutation,
UseMutationResult,
useQueryClient,
UseQueryResult,
} from "@tanstack/react-query";
import type {
SignerWithRestrictions,
SignerWithRestrictionsBatchInput,
SmartContract,
} from "@thirdweb-dev/sdk";
import invariant from "tiny-invariant";
/** **********************/
/** READ HOOKS **/
/** **********************/
/**
* Get all accounts
*
* @example
* ```javascript
* const { data: accounts, isLoading, error } = useAccountSigners(contract);
* ```
*
* @param contract - an instance of a account
* @returns a response object that includes an array of all signers of the provided account
* @twfeature Account
* @see {@link https://portal.thirdweb.com/react/react.useaccountsigners?utm_source=sdk | Documentation}
* @beta
*/
export function useAccountSigners(
contract: RequiredParam<SmartContract>,
): UseQueryResult<SignerWithRestrictions[]> {
const contractAddress = contract?.getAddress();
return useQueryWithNetwork(
cacheKeys.contract.account.signers(contractAddress),
() => {
requiredParamInvariant(contract, "No Contract instance provided");
invariant(
contract.account.getSignersWithRestrictions,
"Contract instance does not support contract.account.getSignersWithRestrictions",
);
return contract.account.getSignersWithRestrictions();
},
{ enabled: !!contract },
);
}
/** **********************/
/** WRITE HOOKS **/
/** **********************/
/**
* Set the account's entire snapshot of permissions
*
* @example
* ```jsx
* const Component = () => {
* const { contract } = useContract("{{contract_address}}");
* const {
* mutate: setAccountSigners,
* isLoading,
* error,
* } = useSetAccountSigners(contract);
*
* if (error) {
* console.error("failed to set account signers", error);
* }
*
* return (
* <button
* disabled={isLoading}
* onClick={() => setAccountSigners("0x...")}
* >
* Set Account Signers
* </button>
* );
* };
* ```
*
* @param contract - an instance of a account contract
* @returns a mutation object that can be used to set the account signers
* @twfeature Account
* @see {@link https://portal.thirdweb.com/react/react.usesetaccountsigners?utm_source=sdk | Documentation}
* @beta
*/
export function useSetAccountSigners(
contract: RequiredParam<SmartContract>,
): UseMutationResult<
{ receipt: providers.TransactionReceipt },
unknown,
SignerWithRestrictionsBatchInput,
unknown
> {
const activeChainId = useSDKChainId();
const contractAddress = contract?.getAddress();
const queryClient = useQueryClient();
return useMutation(
async (permissionsSnapshot: SignerWithRestrictionsBatchInput) => {
requiredParamInvariant(contract, "contract is undefined");
return contract.account.setAccess(permissionsSnapshot);
},
{
onSettled: () =>
invalidateContractAndBalances(
queryClient,
contractAddress,
activeChainId,
),
},
);
}
@@ -328,7 +328,7 @@ export function useContractMetadata<TContract extends ValidContractInstance>(
cacheKeys.contract.metadata(contract?.getAddress()),
async () => {
requiredParamInvariant(contract, "contract is required");
return await contract.metadata.get();
return (await contract.metadata.get()) as any; // FIXME types
},
{
enabled: !!contract,

Some files were not shown because too many files have changed in this diff Show More