Compare commits

...
Author SHA1 Message Date
github-actions[bot]GitHubgithub-actions[bot] <github-actions[bot]@users.noreply.github.com>
1d32b299a0 Version Packages (#1337)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2023-07-13 16:02:54 -07:00
Tair AsimandGitHub cfa7ecbc9a service-utils: remove crypt + unfetch (#1339) 2023-07-13 22:20:42 +00:00
Jonas DanielsandGitHub 8dd7540c45 [storage] - remove HEAD request pre upload (#1338) 2023-07-13 21:57:30 +00:00
07c7d97c28 [service-utils] - initially add package (#1333)
Co-authored-by: Tair Asim <[email protected]>
2023-07-13 20:51:55 +00:00
github-actions[bot]GitHubgithub-actions[bot] <github-actions[bot]@users.noreply.github.com>
47e931e0dd Version Packages (#1336)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2023-07-13 09:25:13 -07:00
Jonas DanielsandGitHub 0407b2c2f3 [chains] update chains (#1335) 2023-07-13 16:01:04 +00:00
github-actions[bot]GitHubgithub-actions[bot] <github-actions[bot]@users.noreply.github.com>
55ffb176f2 Version Packages (#1331)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2023-07-12 19:28:04 -07:00
Adam MajmudarandGitHub a9093bcf28 Override binance chain slug (#1330) 2023-07-12 19:17:58 -07:00
github-actions[bot]GitHubgithub-actions[bot] <github-actions[bot]@users.noreply.github.com>
db964131b4 Version Packages (#1329)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2023-07-12 18:56:29 -07:00
Adam MajmudarandGitHub 4393b22805 Make base default chain (#1328) 2023-07-12 18:42:27 -07:00
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
82 changed files with 2572 additions and 864 deletions
+19
View File
@@ -51,5 +51,24 @@
},
"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"
}
}
}
+42
View File
@@ -1,5 +1,47 @@
# @thirdweb-dev/auth
## 3.2.15
### Patch Changes
- Updated dependencies []:
- @thirdweb-dev/wallets@1.0.11
## 3.2.14
### Patch Changes
- Updated dependencies []:
- @thirdweb-dev/wallets@1.0.10
## 3.2.13
### Patch Changes
- Updated dependencies []:
- @thirdweb-dev/wallets@1.0.9
## 3.2.12
### Patch Changes
- Updated dependencies []:
- @thirdweb-dev/wallets@1.0.8
## 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
+1 -1
View File
@@ -1,6 +1,6 @@
{
"name": "@thirdweb-dev/auth",
"version": "3.2.9",
"version": "3.2.15",
"main": "dist/thirdweb-dev-auth.cjs.js",
"module": "dist/thirdweb-dev-auth.esm.js",
"browser": {
+38
View File
@@ -1,5 +1,43 @@
# @thirdweb-dev/chains
## 0.1.34
### Patch Changes
- [#1338](https://github.com/thirdweb-dev/js/pull/1338) [`8dd7540c`](https://github.com/thirdweb-dev/js/commit/8dd7540c455aa70534f6d29986537592fd12169b) Thanks [@jnsdls](https://github.com/jnsdls)! - update chains
## 0.1.33
### Patch Changes
- [#1335](https://github.com/thirdweb-dev/js/pull/1335) [`0407b2c2`](https://github.com/thirdweb-dev/js/commit/0407b2c2f39b5f3fa06e613e671623b5644b3a28) Thanks [@jnsdls](https://github.com/jnsdls)! - update chains again
## 0.1.32
### Patch Changes
- [#1330](https://github.com/thirdweb-dev/js/pull/1330) [`a9093bcf`](https://github.com/thirdweb-dev/js/commit/a9093bcf287c01e3335fd780e2ccbfdb3380bf95) Thanks [@adam-maj](https://github.com/adam-maj)! - Override binance slug
## 0.1.31
### Patch Changes
- [#1328](https://github.com/thirdweb-dev/js/pull/1328) [`4393b228`](https://github.com/thirdweb-dev/js/commit/4393b2280505fd0b2284555d64eae6567e8401a5) Thanks [@adam-maj](https://github.com/adam-maj)! - Make base default chain
## 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
@@ -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",
+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;
+36
View File
@@ -0,0 +1,36 @@
import type { Chain } from "../src/types";
export default {
"name": "Antofy Testnet",
"chain": "ABN",
"icon": {
"url": "ipfs://QmdTfku81ohnG9ECU1Xswmeumt678cBhwHWuFYZ7i1Qsto",
"width": 400,
"height": 400,
"format": "png"
},
"rpc": [
"https://antofy-testnet.rpc.thirdweb.com/${THIRDWEB_API_KEY}",
"https://testnet-rpc.antofy.io"
],
"faucets": [
"https://faucet.antofy.io"
],
"nativeCurrency": {
"name": "Antofy",
"symbol": "ABN",
"decimals": 18
},
"infoURL": "https://antofy.io",
"shortName": "ABNt",
"chainId": 23006,
"networkId": 23006,
"explorers": [
{
"name": "Antofy Testnet",
"url": "https://test.antofyscan.com",
"standard": "EIP3091"
}
],
"testnet": true,
"slug": "antofy-testnet"
} as const satisfies Chain;
+1 -4
View File
@@ -2,10 +2,7 @@ import type { Chain } from "../src/types";
export default {
"name": "Neon EVM MainNet",
"chain": "Solana",
"rpc": [
"https://neon-evm.rpc.thirdweb.com/${THIRDWEB_API_KEY}",
"https://mainnet.neonevm.org"
],
"rpc": [],
"faucets": [],
"icon": {
"url": "ipfs://Qmcxevb3v8PEvnvfYgcG3bCBuPhe5YAdsHeaufDChSSR3Q",
+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": "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;
+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;
+7 -7
View File
@@ -1,6 +1,6 @@
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}",
@@ -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,
+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;
+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;
+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;
+17 -2
View File
@@ -2,7 +2,10 @@ import type { Chain } from "../src/types";
export default {
"name": "Base",
"chain": "ETH",
"rpc": [],
"rpc": [
"https://base.rpc.thirdweb.com/${THIRDWEB_API_KEY}",
"https://developer-access-mainnet.base.org/"
],
"faucets": [],
"nativeCurrency": {
"name": "Ether",
@@ -13,13 +16,25 @@ export default {
"shortName": "base",
"chainId": 8453,
"networkId": 8453,
"status": "incubating",
"icon": {
"url": "ipfs://QmW5Vn15HeRkScMfPcW12ZdZcC2yUASpu6eCsECRdEmjjj/base-512.png",
"height": 512,
"width": 512,
"format": "png"
},
"explorers": [
{
"name": "basescout",
"url": "https://base.blockscout.com",
"standard": "none"
},
{
"name": "basescan",
"url": "https://basescan.org",
"standard": "none"
}
],
"status": "active",
"testnet": false,
"slug": "base"
} as const satisfies Chain;
+6 -6
View File
@@ -18,6 +18,12 @@ export default {
"shortName": "basegor",
"chainId": 84531,
"networkId": 84531,
"icon": {
"url": "ipfs://QmW5Vn15HeRkScMfPcW12ZdZcC2yUASpu6eCsECRdEmjjj/base-512.png",
"height": 512,
"width": 512,
"format": "png"
},
"explorers": [
{
"name": "basescout",
@@ -31,11 +37,5 @@ export default {
}
],
"testnet": true,
"icon": {
"url": "ipfs://QmW5Vn15HeRkScMfPcW12ZdZcC2yUASpu6eCsECRdEmjjj/base-512.png",
"height": 512,
"width": 512,
"format": "png"
},
"slug": "base-goerli"
} as const satisfies Chain;
+10 -10
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://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,
+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;
+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",
},
};
+2
View File
@@ -10,4 +10,6 @@ export default {
width: 512,
format: "png",
},
rpc: ["https://base.rpc.thirdweb.com/${THIRDWEB_API_KEY}"],
status: "active",
};
+1 -1
View File
@@ -1,6 +1,6 @@
{
"name": "@thirdweb-dev/chains",
"version": "0.1.28",
"version": "0.1.34",
"main": "dist/thirdweb-dev-chains.cjs.js",
"module": "dist/thirdweb-dev-chains.esm.js",
"browser": {
+3 -3
View File
@@ -164,10 +164,10 @@ function findSlug(chain) {
if (slug === "arbitrum-one") {
slug = "arbitrum";
}
if (slug === "binance-smart-chain") {
if (slug === "bnb-smart-chain") {
slug = "binance";
}
if (slug === "binance-smart-chain-testnet") {
if (slug === "bnb-smart-chain-testnet") {
slug = "binance-testnet";
}
if (slug === "base-goerli-testnet") {
@@ -267,7 +267,7 @@ import type { Chain } from "./types";
${exports.join("\n")}
export * from "./types";
export * from "./utils";
export const defaultChains = [c1, c5, c84531, c137, c80001, c42161, c421613, c10, c420, c56, c97, c250, c4002, c43114, c43113, c1337];
export const defaultChains = [c1, c5, c8453, c84531, c137, c80001, c42161, c421613, c10, c420, c56, c97, c250, c4002, c43114, c43113, c1337];
export const allChains: Chain[] = [${exportNames.join(", ")}];
type ChainsById = {
File diff suppressed because one or more lines are too long
+50
View File
@@ -1,5 +1,55 @@
# thirdweb
## 0.10.36
### Patch Changes
- Updated dependencies [[`8dd7540c`](https://github.com/thirdweb-dev/js/commit/8dd7540c455aa70534f6d29986537592fd12169b), [`8dd7540c`](https://github.com/thirdweb-dev/js/commit/8dd7540c455aa70534f6d29986537592fd12169b)]:
- @thirdweb-dev/storage@1.1.9
- @thirdweb-dev/chains@0.1.34
- @thirdweb-dev/sdk@3.10.35
## 0.10.35
### Patch Changes
- Updated dependencies [[`0407b2c2`](https://github.com/thirdweb-dev/js/commit/0407b2c2f39b5f3fa06e613e671623b5644b3a28)]:
- @thirdweb-dev/chains@0.1.33
- @thirdweb-dev/sdk@3.10.34
## 0.10.34
### Patch Changes
- Updated dependencies [[`a9093bcf`](https://github.com/thirdweb-dev/js/commit/a9093bcf287c01e3335fd780e2ccbfdb3380bf95)]:
- @thirdweb-dev/chains@0.1.32
- @thirdweb-dev/sdk@3.10.33
## 0.10.33
### Patch Changes
- Updated dependencies [[`4393b228`](https://github.com/thirdweb-dev/js/commit/4393b2280505fd0b2284555d64eae6567e8401a5)]:
- @thirdweb-dev/chains@0.1.31
- @thirdweb-dev/sdk@3.10.32
## 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
+1 -1
View File
@@ -1,7 +1,7 @@
{
"name": "thirdweb",
"main": "dist/cli/index.js",
"version": "0.10.30",
"version": "0.10.36",
"repository": "https://github.com/thirdweb-dev/js/tree/main/packages/cli",
"author": "thirdweb eng <[email protected]>",
"license": "Apache-2.0",
+56
View File
@@ -1,5 +1,61 @@
# @thirdweb-dev/react-core
## 3.14.15
### Patch Changes
- Updated dependencies [[`8dd7540c`](https://github.com/thirdweb-dev/js/commit/8dd7540c455aa70534f6d29986537592fd12169b), [`8dd7540c`](https://github.com/thirdweb-dev/js/commit/8dd7540c455aa70534f6d29986537592fd12169b)]:
- @thirdweb-dev/storage@1.1.9
- @thirdweb-dev/chains@0.1.34
- @thirdweb-dev/sdk@3.10.35
- @thirdweb-dev/wallets@1.0.11
## 3.14.14
### Patch Changes
- Updated dependencies [[`0407b2c2`](https://github.com/thirdweb-dev/js/commit/0407b2c2f39b5f3fa06e613e671623b5644b3a28)]:
- @thirdweb-dev/chains@0.1.33
- @thirdweb-dev/sdk@3.10.34
- @thirdweb-dev/wallets@1.0.10
## 3.14.13
### Patch Changes
- Updated dependencies [[`a9093bcf`](https://github.com/thirdweb-dev/js/commit/a9093bcf287c01e3335fd780e2ccbfdb3380bf95)]:
- @thirdweb-dev/chains@0.1.32
- @thirdweb-dev/sdk@3.10.33
- @thirdweb-dev/wallets@1.0.9
## 3.14.12
### Patch Changes
- Updated dependencies [[`4393b228`](https://github.com/thirdweb-dev/js/commit/4393b2280505fd0b2284555d64eae6567e8401a5)]:
- @thirdweb-dev/chains@0.1.31
- @thirdweb-dev/sdk@3.10.32
- @thirdweb-dev/wallets@1.0.8
## 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
+1 -1
View File
@@ -1,6 +1,6 @@
{
"name": "@thirdweb-dev/react-core",
"version": "3.14.9",
"version": "3.14.15",
"repository": "https://github.com/thirdweb-dev/js/tree/main/packages/react-core",
"author": "thirdweb eng <[email protected]>",
"license": "Apache-2.0",
+12
View File
@@ -1,5 +1,17 @@
# @thirdweb-dev/react-native-compat
## 0.2.34
## 0.2.33
## 0.2.32
## 0.2.31
## 0.2.30
## 0.2.29
## 0.2.28
## 0.2.27
+1 -1
View File
@@ -1,7 +1,7 @@
{
"name": "@thirdweb-dev/react-native-compat",
"description": "Shims for Thirdweb in React Native Projects",
"version": "0.2.28",
"version": "0.2.34",
"author": "thirdweb eng <[email protected]>",
"repository": "https://github.com/thirdweb-dev/js/tree/main/packages/react-native-compat",
"license": "Apache-2.0",
+62
View File
@@ -1,5 +1,67 @@
# @thirdweb-dev/react-native
## 0.2.34
### Patch Changes
- Updated dependencies [[`8dd7540c`](https://github.com/thirdweb-dev/js/commit/8dd7540c455aa70534f6d29986537592fd12169b), [`8dd7540c`](https://github.com/thirdweb-dev/js/commit/8dd7540c455aa70534f6d29986537592fd12169b)]:
- @thirdweb-dev/storage@1.1.9
- @thirdweb-dev/chains@0.1.34
- @thirdweb-dev/react-core@3.14.15
- @thirdweb-dev/sdk@3.10.35
- @thirdweb-dev/wallets@1.0.11
## 0.2.33
### Patch Changes
- Updated dependencies [[`0407b2c2`](https://github.com/thirdweb-dev/js/commit/0407b2c2f39b5f3fa06e613e671623b5644b3a28)]:
- @thirdweb-dev/chains@0.1.33
- @thirdweb-dev/react-core@3.14.14
- @thirdweb-dev/sdk@3.10.34
- @thirdweb-dev/wallets@1.0.10
## 0.2.32
### Patch Changes
- Updated dependencies [[`a9093bcf`](https://github.com/thirdweb-dev/js/commit/a9093bcf287c01e3335fd780e2ccbfdb3380bf95)]:
- @thirdweb-dev/chains@0.1.32
- @thirdweb-dev/react-core@3.14.13
- @thirdweb-dev/sdk@3.10.33
- @thirdweb-dev/wallets@1.0.9
## 0.2.31
### Patch Changes
- Updated dependencies [[`4393b228`](https://github.com/thirdweb-dev/js/commit/4393b2280505fd0b2284555d64eae6567e8401a5)]:
- @thirdweb-dev/chains@0.1.31
- @thirdweb-dev/react-core@3.14.12
- @thirdweb-dev/sdk@3.10.32
- @thirdweb-dev/wallets@1.0.8
## 0.2.30
### Patch Changes
- Updated dependencies [[`40682191`](https://github.com/thirdweb-dev/js/commit/40682191450de08ad40b9d2957afced248657af2)]:
- @thirdweb-dev/chains@0.1.30
- @thirdweb-dev/react-core@3.14.11
- @thirdweb-dev/sdk@3.10.31
- @thirdweb-dev/wallets@1.0.7
## 0.2.29
### 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/react-core@3.14.10
- @thirdweb-dev/wallets@1.0.6
## 0.2.28
### Patch Changes
+1 -1
View File
@@ -1,6 +1,6 @@
{
"name": "@thirdweb-dev/react-native",
"version": "0.2.28",
"version": "0.2.34",
"repository": "https://github.com/thirdweb-dev/js/tree/main/packages/react-native",
"author": "thirdweb eng <[email protected]>",
"license": "Apache-2.0",
+67
View File
@@ -1,5 +1,72 @@
# @thirdweb-dev/react
## 3.14.15
### Patch Changes
- Updated dependencies [[`8dd7540c`](https://github.com/thirdweb-dev/js/commit/8dd7540c455aa70534f6d29986537592fd12169b)]:
- @thirdweb-dev/chains@0.1.34
- @thirdweb-dev/react-core@3.14.15
- @thirdweb-dev/sdk@3.10.35
- @thirdweb-dev/wallets@1.0.11
## 3.14.14
### Patch Changes
- Updated dependencies [[`0407b2c2`](https://github.com/thirdweb-dev/js/commit/0407b2c2f39b5f3fa06e613e671623b5644b3a28)]:
- @thirdweb-dev/chains@0.1.33
- @thirdweb-dev/react-core@3.14.14
- @thirdweb-dev/sdk@3.10.34
- @thirdweb-dev/wallets@1.0.10
## 3.14.13
### Patch Changes
- Updated dependencies [[`a9093bcf`](https://github.com/thirdweb-dev/js/commit/a9093bcf287c01e3335fd780e2ccbfdb3380bf95)]:
- @thirdweb-dev/chains@0.1.32
- @thirdweb-dev/react-core@3.14.13
- @thirdweb-dev/sdk@3.10.33
- @thirdweb-dev/wallets@1.0.9
## 3.14.12
### Patch Changes
- Updated dependencies [[`4393b228`](https://github.com/thirdweb-dev/js/commit/4393b2280505fd0b2284555d64eae6567e8401a5)]:
- @thirdweb-dev/chains@0.1.31
- @thirdweb-dev/react-core@3.14.12
- @thirdweb-dev/sdk@3.10.32
- @thirdweb-dev/wallets@1.0.8
## 3.14.11
### Patch Changes
- Updated dependencies [[`40682191`](https://github.com/thirdweb-dev/js/commit/40682191450de08ad40b9d2957afced248657af2)]:
- @thirdweb-dev/chains@0.1.30
- @thirdweb-dev/react-core@3.14.11
- @thirdweb-dev/sdk@3.10.31
- @thirdweb-dev/wallets@1.0.7
## 3.14.10
### Patch Changes
- [#1310](https://github.com/thirdweb-dev/js/pull/1310) [`3df86ad1`](https://github.com/thirdweb-dev/js/commit/3df86ad16f3daf1a0382d5b860ef6f24a69cc8d0) Thanks [@MananTank](https://github.com/MananTank)! - ConnectWallet UI fixes
- Hide Back button when not required
- Fix Rainbow wallet meta
- Fix backbutton not working on get-started screen when there's a single supported wallet
- Remove switchAccount button on mobile for metamask
- 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/sdk@3.10.30
- @thirdweb-dev/chains@0.1.29
- @thirdweb-dev/react-core@3.14.10
- @thirdweb-dev/wallets@1.0.6
## 3.14.9
### Patch Changes
+1 -1
View File
@@ -1,6 +1,6 @@
{
"name": "@thirdweb-dev/react",
"version": "3.14.9",
"version": "3.14.15",
"repository": "https://github.com/thirdweb-dev/js/tree/main/packages/react",
"author": "thirdweb eng <[email protected]>",
"license": "Apache-2.0",
@@ -304,7 +304,8 @@ export const ConnectedWalletDetails: React.FC<{
{activeWalletConfig &&
activeWalletConfig.id === walletIds.metamask &&
activeWalletConfig.isInstalled &&
activeWalletConfig.isInstalled() && (
activeWalletConfig.isInstalled() &&
!isMobile() && (
<MenuButton
type="button"
onClick={() => {
@@ -16,10 +16,11 @@ export const ConnectingScreen: React.FC<{
walletIconURL: string;
walletName: string;
supportLink: string;
hideBackButton: boolean;
}> = (props) => {
return (
<>
<BackButton onClick={props.onBack} />
{!props.hideBackButton && <BackButton onClick={props.onBack} />}
<IconContainer>
<Img
src={props.walletIconURL}
@@ -17,7 +17,7 @@ export const ScanScreen: React.FC<{
qrCodeUri?: string;
walletName: string;
walletIconURL: string;
hideBackButton?: boolean;
hideBackButton: boolean;
}> = (props) => {
const walletName = props.walletName.toLowerCase().includes("wallet")
? props.walletName
@@ -18,6 +18,8 @@ export const CoinbaseConnectUI = ({
"connecting" | "loading" | "scanning" | "get-started"
>("loading");
const hideBackButton = supportedWallets.length === 1;
const connectPrompted = useRef(false);
useEffect(() => {
if (screen !== "loading") {
@@ -61,6 +63,7 @@ export const CoinbaseConnectUI = ({
if (screen === "connecting" || screen === "loading") {
return (
<ConnectingScreen
hideBackButton={hideBackButton}
onBack={goBack}
walletName={meta.name}
walletIconURL={meta.iconURL}
@@ -77,7 +80,9 @@ export const CoinbaseConnectUI = ({
chromeExtensionLink={meta.urls?.chrome}
googlePlayStoreLink={meta.urls?.android}
appleStoreLink={meta.urls?.ios}
onBack={goBack}
onBack={() => {
setScreen("scanning");
}}
/>
);
}
@@ -89,7 +94,7 @@ export const CoinbaseConnectUI = ({
onConnected={close}
onGetStarted={() => setScreen("get-started")}
walletConfig={walletConfig}
hideBackButton={supportedWallets.length === 1}
hideBackButton={hideBackButton}
/>
);
}
@@ -12,7 +12,7 @@ export const CoinbaseScan: React.FC<{
onGetStarted: () => void;
onConnected: () => void;
walletConfig: WalletConfig<CoinbaseWallet>;
hideBackButton?: boolean;
hideBackButton: boolean;
}> = ({ walletConfig, onConnected, onGetStarted, onBack, hideBackButton }) => {
const createInstance = useCreateWalletInstance();
const [qrCodeUri, setQrCodeUri] = useState<string | undefined>(undefined);
@@ -68,6 +68,7 @@ export const FrameConnectUI = (props: ConnectUIProps<FrameWallet>) => {
const { walletConfig, close, goBack } = props;
const downloadLink = "https://frame.sh";
const supportLink = "https://docs.frame.sh";
const hideBackButton = props.supportedWallets.length === 1;
useEffect(() => {
if (connectPrompted.current) {
@@ -98,6 +99,7 @@ export const FrameConnectUI = (props: ConnectUIProps<FrameWallet>) => {
if (screen === "connecting") {
return (
<ConnectingScreen
hideBackButton={hideBackButton}
onBack={goBack}
walletName={walletConfig.meta.name}
walletIconURL={walletConfig.meta.iconURL}
@@ -13,6 +13,8 @@ export const MetamaskConnectUI = (props: ConnectUIProps<MetaMaskWallet>) => {
const { walletConfig, close } = props;
const connect = useConnect();
const hideBackButton = props.supportedWallets.length === 1;
const { goBack } = props;
const connectPrompted = useRef(false);
@@ -56,6 +58,7 @@ export const MetamaskConnectUI = (props: ConnectUIProps<MetaMaskWallet>) => {
if (screen === "connecting") {
return (
<ConnectingScreen
hideBackButton={hideBackButton}
onBack={props.goBack}
walletName={walletConfig.meta.name}
walletIconURL={walletConfig.meta.iconURL}
@@ -72,7 +75,9 @@ export const MetamaskConnectUI = (props: ConnectUIProps<MetaMaskWallet>) => {
chromeExtensionLink={walletConfig.meta.urls?.chrome}
googlePlayStoreLink={walletConfig.meta.urls?.android}
appleStoreLink={walletConfig.meta.urls?.ios}
onBack={props.goBack}
onBack={() => {
setScreen("scanning");
}}
/>
);
}
@@ -80,11 +85,12 @@ export const MetamaskConnectUI = (props: ConnectUIProps<MetaMaskWallet>) => {
if (screen === "scanning") {
return (
<MetamaskScan
onBack={props.goBack}
onBack={goBack}
onConnected={close}
onGetStarted={() => {
setScreen("get-started");
}}
hideBackButton={hideBackButton}
walletConfig={walletConfig}
/>
);
@@ -12,7 +12,8 @@ export const MetamaskScan: React.FC<{
onGetStarted: () => void;
onConnected: () => void;
walletConfig: WalletConfig<MetaMaskWallet>;
}> = ({ onBack, onConnected, onGetStarted, walletConfig }) => {
hideBackButton: boolean;
}> = ({ onBack, onConnected, onGetStarted, walletConfig, hideBackButton }) => {
const createInstance = useCreateWalletInstance();
const [qrCodeUri, setQrCodeUri] = useState<string | undefined>();
const { setConnectedWallet, chainToConnect, setConnectionStatus } =
@@ -54,6 +55,7 @@ export const MetamaskScan: React.FC<{
qrCodeUri={qrCodeUri}
walletName={walletConfig.meta.name}
walletIconURL={walletConfig.meta.iconURL}
hideBackButton={hideBackButton}
/>
);
};
@@ -13,6 +13,8 @@ export const RainbowConnectUI = (props: ConnectUIProps<WalletConnect>) => {
const { walletConfig, close } = props;
const connect = useConnect();
const hideBackButton = props.supportedWallets.length === 1;
const { goBack } = props;
const connectPrompted = useRef(false);
@@ -36,6 +38,7 @@ export const RainbowConnectUI = (props: ConnectUIProps<WalletConnect>) => {
if (screen === "connecting") {
return (
<ConnectingScreen
hideBackButton={hideBackButton}
onBack={props.goBack}
walletName={walletConfig.meta.name}
walletIconURL={walletConfig.meta.iconURL}
@@ -52,7 +55,9 @@ export const RainbowConnectUI = (props: ConnectUIProps<WalletConnect>) => {
chromeExtensionLink={walletConfig.meta.urls?.chrome}
googlePlayStoreLink={walletConfig.meta.urls?.android}
appleStoreLink={walletConfig.meta.urls?.ios}
onBack={props.goBack}
onBack={() => {
setScreen("scanning");
}}
/>
);
}
@@ -65,6 +70,7 @@ export const RainbowConnectUI = (props: ConnectUIProps<WalletConnect>) => {
onGetStarted={() => {
setScreen("get-started");
}}
hideBackButton={hideBackButton}
walletConfig={walletConfig}
/>
);
@@ -12,7 +12,8 @@ export const RainbowScan: React.FC<{
onGetStarted: () => void;
onConnected: () => void;
walletConfig: WalletConfig<WalletConnect>;
}> = ({ onBack, onConnected, onGetStarted, walletConfig }) => {
hideBackButton: boolean;
}> = ({ onBack, onConnected, onGetStarted, walletConfig, hideBackButton }) => {
const createInstance = useCreateWalletInstance();
const [qrCodeUri, setQrCodeUri] = useState<string | undefined>();
const { setConnectedWallet, chainToConnect, setConnectionStatus } =
@@ -54,6 +55,7 @@ export const RainbowScan: React.FC<{
qrCodeUri={qrCodeUri}
walletName={walletConfig.meta.name}
walletIconURL={walletConfig.meta.iconURL}
hideBackButton={hideBackButton}
/>
);
};
@@ -21,6 +21,10 @@ export const rainbowWallet = (
name: "Rainbow Wallet",
iconURL:
"ipfs://QmSZn47p4DVVBfzvg9BAX2EqwnPxkT1YAE7rUnrtd9CybQ/rainbow-logo.png",
urls: {
android: "https://rnbwapp.com/e/Va41HWS6Oxb",
ios: "https://rnbwapp.com/e/OeMdmkJ6Oxb",
},
},
create: (walletOptions: WalletOptions) => {
return new WalletConnect({
@@ -12,6 +12,7 @@ export const TrustConnectUI = (props: ConnectUIProps<TrustWallet>) => {
>("connecting");
const { walletConfig, close } = props;
const connect = useConnect();
const hideBackButton = props.supportedWallets.length === 1;
const { goBack } = props;
@@ -54,6 +55,7 @@ export const TrustConnectUI = (props: ConnectUIProps<TrustWallet>) => {
if (screen === "connecting") {
return (
<ConnectingScreen
hideBackButton={hideBackButton}
onBack={props.goBack}
walletName={walletConfig.meta.name}
walletIconURL={walletConfig.meta.iconURL}
@@ -70,7 +72,9 @@ export const TrustConnectUI = (props: ConnectUIProps<TrustWallet>) => {
chromeExtensionLink={walletConfig.meta.urls?.chrome}
googlePlayStoreLink={walletConfig.meta.urls?.android}
appleStoreLink={walletConfig.meta.urls?.ios}
onBack={props.goBack}
onBack={() => {
setScreen("scanning");
}}
/>
);
}
@@ -78,6 +82,7 @@ export const TrustConnectUI = (props: ConnectUIProps<TrustWallet>) => {
if (screen === "scanning") {
return (
<TrustScan
hideBackButton={hideBackButton}
onBack={props.goBack}
onConnected={close}
onGetStarted={() => {
@@ -11,8 +11,9 @@ export const TrustScan: React.FC<{
onBack: () => void;
onGetStarted: () => void;
onConnected: () => void;
hideBackButton: boolean;
walletConfig: WalletConfig<TrustWallet>;
}> = ({ onBack, onConnected, onGetStarted, walletConfig }) => {
}> = ({ onBack, onConnected, onGetStarted, walletConfig, hideBackButton }) => {
const createInstance = useCreateWalletInstance();
const [qrCodeUri, setQrCodeUri] = useState<string | undefined>();
const { setConnectedWallet, chainToConnect, setConnectionStatus } =
@@ -54,6 +55,7 @@ export const TrustScan: React.FC<{
qrCodeUri={qrCodeUri}
walletName={walletConfig.meta.name}
walletIconURL={walletConfig.meta.iconURL}
hideBackButton={hideBackButton}
/>
);
};
@@ -12,6 +12,7 @@ export const ZerionConnectUI = (props: ConnectUIProps<ZerionWallet>) => {
>("connecting");
const { walletConfig, close } = props;
const connect = useConnect();
const hideBackButton = props.supportedWallets.length === 1;
const { goBack } = props;
@@ -54,6 +55,7 @@ export const ZerionConnectUI = (props: ConnectUIProps<ZerionWallet>) => {
if (screen === "connecting") {
return (
<ConnectingScreen
hideBackButton={hideBackButton}
onBack={props.goBack}
walletName={walletConfig.meta.name}
walletIconURL={walletConfig.meta.iconURL}
@@ -70,7 +72,9 @@ export const ZerionConnectUI = (props: ConnectUIProps<ZerionWallet>) => {
chromeExtensionLink={walletConfig.meta.urls?.chrome}
googlePlayStoreLink={walletConfig.meta.urls?.android}
appleStoreLink={walletConfig.meta.urls?.ios}
onBack={props.goBack}
onBack={() => {
setScreen("scanning");
}}
/>
);
}
@@ -78,6 +82,7 @@ export const ZerionConnectUI = (props: ConnectUIProps<ZerionWallet>) => {
if (screen === "scanning") {
return (
<ZerionScan
hideBackButton={hideBackButton}
onBack={props.goBack}
onConnected={close}
onGetStarted={() => {
@@ -87,6 +92,6 @@ export const ZerionConnectUI = (props: ConnectUIProps<ZerionWallet>) => {
/>
);
}
return null;
};
@@ -12,7 +12,8 @@ export const ZerionScan: React.FC<{
onGetStarted: () => void;
onConnected: () => void;
walletConfig: WalletConfig<ZerionWallet>;
}> = ({ onBack, onConnected, onGetStarted, walletConfig }) => {
hideBackButton: boolean;
}> = ({ onBack, onConnected, onGetStarted, walletConfig, hideBackButton }) => {
const createInstance = useCreateWalletInstance();
const [qrCodeUri, setQrCodeUri] = useState<string | undefined>();
const { setConnectedWallet, chainToConnect, setConnectionStatus } =
@@ -49,6 +50,7 @@ export const ZerionScan: React.FC<{
return (
<ScanScreen
hideBackButton={hideBackButton}
onBack={onBack}
onGetStarted={onGetStarted}
qrCodeUri={qrCodeUri}
+57
View File
@@ -1,5 +1,62 @@
# @thirdweb-dev/sdk
## 3.10.35
### Patch Changes
- Updated dependencies [[`8dd7540c`](https://github.com/thirdweb-dev/js/commit/8dd7540c455aa70534f6d29986537592fd12169b), [`8dd7540c`](https://github.com/thirdweb-dev/js/commit/8dd7540c455aa70534f6d29986537592fd12169b)]:
- @thirdweb-dev/storage@1.1.9
- @thirdweb-dev/chains@0.1.34
## 3.10.34
### Patch Changes
- Updated dependencies [[`0407b2c2`](https://github.com/thirdweb-dev/js/commit/0407b2c2f39b5f3fa06e613e671623b5644b3a28)]:
- @thirdweb-dev/chains@0.1.33
## 3.10.33
### Patch Changes
- Updated dependencies [[`a9093bcf`](https://github.com/thirdweb-dev/js/commit/a9093bcf287c01e3335fd780e2ccbfdb3380bf95)]:
- @thirdweb-dev/chains@0.1.32
## 3.10.32
### Patch Changes
- Updated dependencies [[`4393b228`](https://github.com/thirdweb-dev/js/commit/4393b2280505fd0b2284555d64eae6567e8401a5)]:
- @thirdweb-dev/chains@0.1.31
## 3.10.31
### Patch Changes
- Updated dependencies [[`40682191`](https://github.com/thirdweb-dev/js/commit/40682191450de08ad40b9d2957afced248657af2)]:
- @thirdweb-dev/chains@0.1.30
## 3.10.30
### Patch Changes
- [#1314](https://github.com/thirdweb-dev/js/pull/1314) [`db68bd04`](https://github.com/thirdweb-dev/js/commit/db68bd04cd8bb3ee6bff051d1d5b5a872353fde0) Thanks [@iketw](https://github.com/iketw)! - Passes API key to thirdweb storage ipfs uploader
If you want to use thirdweb's storage upload services you need to pass an API key.
You can grab one from: https://thirdweb.com/dashboard/settings
If using ThirdwebStorage directly:
```javascript
new ThirdwebStorage({
apiKey: <yourApiKey>,
});
```
- 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/[email protected]
- @thirdweb-dev/[email protected]
## 3.10.29
### Patch Changes
+1 -1
View File
@@ -1,6 +1,6 @@
{
"name": "@thirdweb-dev/sdk",
"version": "3.10.29",
"version": "3.10.35",
"description": "The main thirdweb SDK.",
"repository": "https://github.com/thirdweb-dev/js/tree/main/packages/sdk",
"license": "Apache-2.0",
+7 -2
View File
@@ -8,8 +8,13 @@ export function createStorage(
if (storage) {
return storage;
} else if (options?.gatewayUrls) {
return new ThirdwebStorage({ gatewayUrls: options.gatewayUrls });
return new ThirdwebStorage({
gatewayUrls: options.gatewayUrls,
apiKey: options.thirdwebApiKey,
});
} else {
return new ThirdwebStorage();
return new ThirdwebStorage({
apiKey: options?.thirdwebApiKey,
});
}
}
@@ -84,7 +84,9 @@ export class ContractWrapper<
this.readContract = this.writeContract.connect(
this.getProvider(),
) as TContract;
this.#storage = new ThirdwebStorage();
this.#storage = new ThirdwebStorage({
apiKey: options?.thirdwebApiKey,
});
}
public override updateSignerOrProvider(network: NetworkInput): void {
+6
View File
@@ -0,0 +1,6 @@
{
"presets": [
"@babel/preset-typescript",
["@babel/preset-env", { "targets": "defaults, not ie 11" }]
]
}
+4
View File
@@ -0,0 +1,4 @@
# folders
dist/
# files
+4
View File
@@ -0,0 +1,4 @@
module.exports = {
root: true,
extends: ["thirdweb"],
};
+11
View File
@@ -0,0 +1,11 @@
# @thirdweb-dev/service-utils
## 0.1.0
### Minor Changes
- [#1333](https://github.com/thirdweb-dev/js/pull/1333) [`07c7d97c`](https://github.com/thirdweb-dev/js/commit/07c7d97c288063f7a5a65819e37ebe3f51095faf) Thanks [@jnsdls](https://github.com/jnsdls)! - add package
### Patch Changes
- [#1339](https://github.com/thirdweb-dev/js/pull/1339) [`cfa7ecbc`](https://github.com/thirdweb-dev/js/commit/cfa7ecbc9ab8f1c5031f82d5c23a6ee0a800c9f4) Thanks [@assimovt](https://github.com/assimovt)! - Remove crypto and unfetch node dependencies
+1
View File
@@ -0,0 +1 @@
### todo
+53
View File
@@ -0,0 +1,53 @@
{
"name": "@thirdweb-dev/service-utils",
"version": "0.1.0",
"main": "dist/thirdweb-dev-service-utils.cjs.js",
"module": "dist/thirdweb-dev-service-utils.esm.js",
"exports": {
".": {
"module": "./dist/thirdweb-dev-service-utils.esm.js",
"default": "./dist/thirdweb-dev-service-utils.cjs.js"
},
"./package.json": "./package.json"
},
"repository": "https://github.com/thirdweb-dev/js/tree/main/packages/pay",
"license": "Apache-2.0",
"bugs": {
"url": "https://github.com/thirdweb-dev/js/issues"
},
"author": "thirdweb eng <[email protected]>",
"files": [
"dist/"
],
"preconstruct": {
"entrypoints": [
"index.ts"
],
"exports": true
},
"sideEffects": false,
"devDependencies": {
"@cloudflare/workers-types": "^4.20230710.0",
"@types/node": "^20.4.1",
"@typescript-eslint/eslint-plugin": "^6.0.0",
"@typescript-eslint/parser": "^6.0.0",
"eslint": "^8.44.0",
"eslint-config-prettier": "^8.8.0",
"lint-staged": "^13.2.3",
"prettier": "^3.0.0",
"sort-package-json": "^2.5.1",
"ts-node": "^10.9.1",
"@preconstruct/cli": "^2.7.0",
"@thirdweb-dev/tsconfig": "workspace:*",
"eslint-config-thirdweb": "workspace:*",
"typescript": "^5.1.6"
},
"scripts": {
"format": "prettier --write 'src/**/*'",
"lint": "eslint src/",
"fix": "eslint src/ --fix",
"clean": "rm -rf dist/",
"build": "tsc && preconstruct build",
"push": "yalc push"
}
}
+253
View File
@@ -0,0 +1,253 @@
import {
ApiKey,
ApiResponse,
ServiceConfiguration,
AuthorizationResponse,
AuthorizationValidations,
AuthorizeCFWorkerOptions,
AuthorizeNodeServiceOptions,
AuthOptions,
} from "./types";
export async function authorizeCFWorkerService(
options: AuthorizeCFWorkerOptions,
) {
const { kvStore, ctx, authOptions, serviceConfig, validations } = options;
const { clientId } = authOptions;
let cachedKey;
// first, check if the key is in KV
try {
const kvKey = await kvStore.get(clientId);
if (kvKey) {
cachedKey = JSON.parse(kvKey) as ApiKey;
}
} catch (err) {
// ignore JSON parse, assuming not valid
}
const updateKv = async (keyData: ApiKey) => {
kvStore.put(clientId as string, JSON.stringify(keyData), {
expirationTtl: serviceConfig.cacheTtl || 60,
});
};
return authorize({
authOptions,
serviceConfig: {
...serviceConfig,
cachedKey,
onRefetchComplete: (keyData: ApiKey) => {
ctx.waitUntil(updateKv(keyData));
},
},
validations,
});
}
export async function authorizeNodeService(
options: AuthorizeNodeServiceOptions,
) {
const { authOptions, serviceConfig, validations } = options;
return authorize({
authOptions,
serviceConfig,
validations,
});
}
/**
* Authorizes a request for a given client ID
*
* @returns The Promise AuthorizationResponse
*/
async function authorize(options: {
authOptions: AuthOptions;
serviceConfig: ServiceConfiguration;
validations: AuthorizationValidations;
}): Promise<AuthorizationResponse> {
try {
const { authOptions, serviceConfig, validations } = options;
const { clientId } = authOptions;
const { apiUrl, scope, serviceKey, cachedKey, onRefetchComplete } =
serviceConfig;
let keyData = cachedKey;
// no cached key, re-fetch from API
if (!keyData) {
const response = await fetch(
`${apiUrl}/v1/keys/use/?scope=${scope}&clientId=${clientId}`,
{
method: "GET",
headers: {
"x-service-api-key": serviceKey,
"content-type": "application/json",
},
},
);
const apiResponse = (await response.json()) as ApiResponse;
if (!response.ok) {
const { error } = apiResponse;
return {
authorized: false,
errorMessage: error.message,
errorCode: error.code || "",
statusCode: error.statusCode || 401,
};
}
keyData = apiResponse.data as ApiKey;
if (onRefetchComplete) {
onRefetchComplete(keyData);
}
}
//
// Run validations
//
const authResponse = authAccess(authOptions, keyData);
if (!authResponse?.authorized) {
return authResponse;
}
const authzResponse = authzServices(validations, keyData, scope);
if (!authzResponse?.authorized) {
return authzResponse;
}
// FIXME: validate bundleId
return {
authorized: true,
data: keyData,
};
} catch (err) {
console.error("Failed to authorize this key.", err);
return {
authorized: false,
errorMessage: "Internal error",
errorCode: "INTERNAL_ERROR",
statusCode: 500,
};
}
}
function authAccess(authOptions: AuthOptions, apiKey: ApiKey) {
const { origin, secretHash: providedSecretHash } = authOptions;
const { domains, secretHash } = apiKey;
if (providedSecretHash) {
if (secretHash !== providedSecretHash) {
return {
authorized: false,
errorMessage: "The secret is invalid.",
errorCode: "SECRET_INVALID",
statusCode: 401,
};
}
return {
authorized: true,
};
}
// validate domains
if (origin) {
if (
// find matching domain, or if all domains allowed
domains.find((d) => {
if (d === "*") {
return true;
}
// If the allowedDomain has a wildcard,
// we'll check that the ending of our domain matches the wildcard
if (d.startsWith("*.")) {
const domainRoot = d.slice(2);
return origin.endsWith(domainRoot);
}
// If there's no wildcard, we'll check for an exact match
return d === origin;
})
) {
return {
authorized: true,
};
}
return {
authorized: false,
errorMessage: "The origin is not authorized for this key.",
errorCode: "ORIGIN_UNAUTHORIZED",
statusCode: 401,
};
}
// FIXME: validate bundle id
return {
authorized: false,
errorMessage: "The keys are invalid.",
errorCode: "UNAUTHORIZED",
statusCode: 401,
};
}
function authzServices(
validations: AuthorizationValidations,
apiKey: ApiKey,
scope: string,
) {
const { services } = apiKey;
const { serviceTargetAddresses, serviceAction } = validations;
// validate services
const service = services.find((srv) => srv.name === scope);
if (!service) {
return {
authorized: false,
errorMessage: `The service "${scope}" is not authorized for this key.`,
errorCode: "SERVICE_UNAUTHORIZED",
statusCode: 403,
};
}
// validate service actions
if (serviceAction) {
if (!service.actions.includes(serviceAction)) {
return {
authorized: false,
errorMessage: `The service "${scope}" action "${serviceAction}" is not authorized for this key.`,
errorCode: "SERVICE_ACTION_UNAUTHORIZED",
statusCode: 403,
};
}
}
// validate service target addresses
if (
serviceTargetAddresses &&
!service.targetAddresses.find(
(addr) => addr === "*" || serviceTargetAddresses.includes(addr),
)
) {
return {
authorized: false,
errorMessage: `The service "${scope}" target address is not authorized for this key.`,
errorCode: "SERVICE_TARGET_ADDRESS_UNAUTHORIZED",
statusCode: 403,
};
}
return {
authorized: true,
};
}
+68
View File
@@ -0,0 +1,68 @@
import { KVNamespace, ExecutionContext } from "@cloudflare/workers-types";
import { ServiceName } from "../types";
export interface AuthOptions {
clientId: string;
secretHash?: string;
bundleId?: string;
origin?: string;
}
export interface AuthorizeCFWorkerOptions {
ctx: ExecutionContext;
kvStore: KVNamespace<string>;
authOptions: AuthOptions;
serviceConfig: ServiceConfiguration;
validations: AuthorizationValidations;
}
export interface AuthorizeNodeServiceOptions {
authOptions: AuthOptions;
serviceConfig: ServiceConfiguration;
validations: AuthorizationValidations;
}
export interface ServiceConfiguration {
apiUrl: string;
scope: ServiceName;
serviceKey: string;
cachedKey?: ApiKey;
cacheTtl?: number;
onRefetchComplete?: (key: ApiKey) => void;
}
export interface AuthorizationValidations {
serviceTargetAddresses?: string[];
serviceAction?: string;
}
export interface AuthorizationResponse {
authorized: boolean;
errorMessage?: string;
errorCode?: string;
statusCode?: number;
data?: ApiKey;
}
export interface ApiResponse {
data: ApiKey | null;
error: {
code: string;
statusCode: number;
message: string;
};
}
export interface ApiKey {
id: string;
key: string;
secretHash: string;
walletAddresses: string[];
domains: string[];
bundleIds: string[];
services: {
name: string;
targetAddresses: string[];
actions: string[];
}[];
}
+8
View File
@@ -0,0 +1,8 @@
import { SERVICES } from "./types";
export function getServiceByName(name: string) {
return SERVICES.find((srv) => srv.name === name);
}
export * from "./types";
export * from "./auth";
+50
View File
@@ -0,0 +1,50 @@
export const SERVICE_NAMES = ["bundler", "rpc", "storage"] as const;
export const SERVICES: Service[] = [
{
name: "storage",
title: "Storage",
description: "IPFS Upload and Download",
actions: [
{
name: "read",
title: "Download",
description: "Download a file from Storage",
},
{
name: "write",
title: "Upload",
description: "Upload a file to Storage",
},
],
},
{
name: "rpc",
title: "RPC",
description: "Accelerated RPC Edge",
// all actions allowed
actions: [],
},
{
name: "bundler",
title: "Smart Wallets",
description: "Bundler & Paymaster services",
// all actions allowed
actions: [],
},
];
export type ServiceName = (typeof SERVICE_NAMES)[number];
export interface ServiceAction {
name: string;
title: string;
description?: string;
}
export interface Service {
name: ServiceName;
title: string;
description?: string;
actions: ServiceAction[];
}
+5
View File
@@ -0,0 +1,5 @@
{
"extends": "@thirdweb-dev/tsconfig/sdk.json",
"include": ["src", "types"],
"exclude": ["dist", "build", "node_modules"]
}
+23
View File
@@ -1,5 +1,28 @@
# @thirdweb-dev/storage
## 1.1.9
### Patch Changes
- [#1338](https://github.com/thirdweb-dev/js/pull/1338) [`8dd7540c`](https://github.com/thirdweb-dev/js/commit/8dd7540c455aa70534f6d29986537592fd12169b) Thanks [@jnsdls](https://github.com/jnsdls)! - no longer check if file exists on gateway before uploading, always upload
## 1.1.8
### Patch Changes
- [#1314](https://github.com/thirdweb-dev/js/pull/1314) [`db68bd04`](https://github.com/thirdweb-dev/js/commit/db68bd04cd8bb3ee6bff051d1d5b5a872353fde0) Thanks [@iketw](https://github.com/iketw)! - Passes API key to thirdweb storage ipfs uploader
If you want to use thirdweb's storage upload services you need to pass an API key.
You can grab one from: https://thirdweb.com/dashboard/settings
If using ThirdwebStorage directly:
```javascript
new ThirdwebStorage({
apiKey: <yourApiKey>,
});
```
## 1.1.7
### Patch Changes
+1 -2
View File
@@ -1,6 +1,6 @@
{
"name": "@thirdweb-dev/storage",
"version": "1.1.7",
"version": "1.1.9",
"main": "dist/thirdweb-dev-storage.cjs.js",
"module": "dist/thirdweb-dev-storage.esm.js",
"browser": {
@@ -67,7 +67,6 @@
"cid-tool": "^3.0.0",
"cross-fetch": "^3.1.6",
"form-data": "^4.0.0",
"ipfs-unixfs-importer": "^7.0.1",
"uuid": "^9.0.0"
}
}
-79
View File
@@ -1,79 +0,0 @@
import { FileOrBufferOrString } from "../types";
import { DEFAULT_GATEWAY_URLS, getGatewayUrlForCid } from "./urls";
import { isBufferOrStringWithName } from "./utils";
import fetch from "cross-fetch";
import { importer } from "ipfs-unixfs-importer";
type CIDVersion = 0 | 1;
type ContentWithPath = {
path?: string;
content: Uint8Array;
};
export async function getCIDForUpload(
data: FileOrBufferOrString[],
fileNames: string[],
wrapWithDirectory = true,
cidVersion: CIDVersion = 0,
) {
const contentWithPath: ContentWithPath[] = await Promise.all(
data.map(async (file, i) => {
const path = fileNames[i];
let content: Uint8Array;
if (typeof file === "string") {
content = new TextEncoder().encode(file);
} else if (isBufferOrStringWithName(file)) {
if (typeof file.data === "string") {
content = new TextEncoder().encode(file.data);
} else {
content = file.data as Uint8Array;
}
} else if (Buffer.isBuffer(file)) {
content = file as Uint8Array;
} else {
const buffer = await file.arrayBuffer();
content = new Uint8Array(buffer);
}
return { path, content };
}),
);
return getCID(contentWithPath, wrapWithDirectory, cidVersion);
}
export async function getCID(
content: ContentWithPath[],
wrapWithDirectory = true,
cidVersion: CIDVersion = 0,
) {
const options = { onlyHash: true, wrapWithDirectory, cidVersion };
const dummyBlockstore = {
put: async () => {},
};
let lastCid;
for await (const { cid } of importer(
content as any,
dummyBlockstore as any,
options,
)) {
lastCid = cid;
}
return `${lastCid}`;
}
export async function isUploaded(cid: string) {
const url = getGatewayUrlForCid(DEFAULT_GATEWAY_URLS["ipfs://"][0], cid);
const res = await fetch(url, {
method: "HEAD",
headers: {
// tell the gateway to skip fetching from origin in order to fail fast on 404s and just re-upload in those cases
"x-skip-origin": "true",
},
});
return res.ok;
}
-1
View File
@@ -1,3 +1,2 @@
export * from "./urls";
export * from "./utils";
export * from "./cid";
+5 -1
View File
@@ -53,7 +53,11 @@ export class ThirdwebStorage<T extends UploadOptions = IpfsUploadBatchOptions> {
public gatewayUrls: GatewayUrls;
constructor(options?: ThirdwebStorageOptions<T>) {
this.uploader = options?.uploader || new IpfsUploader();
this.uploader =
options?.uploader ||
new IpfsUploader({
apiKey: options?.apiKey,
});
this.downloader = options?.downloader || new StorageDownloader();
this.gatewayUrls = prepareGatewayUrls(
parseGatewayUrls(options?.gatewayUrls),
@@ -1,4 +1,3 @@
import { getCIDForUpload, isUploaded } from "../../common";
import { PINATA_IPFS_URL, TW_IPFS_SERVER_URL } from "../../common/urls";
import {
isBrowser,
@@ -37,9 +36,11 @@ import FormData from "form-data";
*/
export class IpfsUploader implements IStorageUploader<IpfsUploadBatchOptions> {
public uploadWithGatewayUrl: boolean;
private apiKey?: string;
constructor(options?: IpfsUploaderOptions) {
this.uploadWithGatewayUrl = options?.uploadWithGatewayUrl || false;
this.apiKey = options?.apiKey || "";
}
async uploadBatch(
@@ -55,30 +56,6 @@ export class IpfsUploader implements IStorageUploader<IpfsUploadBatchOptions> {
const formData = new FormData();
const { form, fileNames } = this.buildFormData(formData, data, options);
try {
const cid = await getCIDForUpload(
data,
fileNames.map((name) => decodeURIComponent(name)),
!options?.uploadWithoutDirectory,
);
if ((await isUploaded(cid)) && !options?.alwaysUpload) {
if (options?.onProgress) {
options?.onProgress({
progress: 100,
total: 100,
});
}
if (options?.uploadWithoutDirectory) {
return [`ipfs://${cid}`];
} else {
return fileNames.map((name) => `ipfs://${cid}/${name}`);
}
}
} catch {
// no-op
}
if (isBrowser()) {
return this.uploadBatchBrowser(form, fileNames, options);
} else {
@@ -101,10 +78,19 @@ export class IpfsUploader implements IStorageUploader<IpfsUploadBatchOptions> {
process.env.NODE_ENV === "test" || !!process.env.CI
? "Storage SDK CI"
: "Storage SDK",
Authorization: `Bearer ${this.apiKey}`,
},
});
if (!res.ok) {
throw new Error(`Failed to get upload token`);
const response = await res.json();
// throw new Error(`Failed to get upload token`);
const error = response.error || response.statusText;
const code = response.code || "UNKNOWN";
throw new Error(
`IpfsUploader error: ${error} Status: ${response.status} Code: ${code}`,
);
}
const body = await res.text();
return body;
+1
View File
@@ -5,6 +5,7 @@ export type ThirdwebStorageOptions<T extends UploadOptions> = {
uploader?: IStorageUploader<T>;
downloader?: IStorageDownloader;
gatewayUrls?: GatewayUrls | string[];
apiKey?: string;
};
export * from "./download";
+5
View File
@@ -46,6 +46,11 @@ export type IpfsUploaderOptions = {
* Whether or not to replace any URLs with schemes with resolved URLs before upload
*/
uploadWithGatewayUrl?: boolean;
/**
* Optional apiKey to associate with the IpfsUploader.
* You can get an API key here: https://thirdweb.com/settings
*/
apiKey?: string;
};
/**
-30
View File
@@ -1,30 +0,0 @@
import { getCID } from "../src";
import { expect } from "chai";
import fs from "fs";
describe("CID", async () => {
it("Should correctly get CID of a string", async () => {
const cid = await getCID(
[{ content: new TextEncoder().encode("hello world") }],
false,
);
expect(cid).to.equal("Qmf412jQZiuVUtdgnB36FXFX7xg5V6KEbSJ4dpQuhkLyfD");
});
it("Should correctly get CID of a file", async () => {
const cid = await getCID(
[{ content: fs.readFileSync("test/files/0.jpg") }],
false,
);
expect(cid).to.equal("QmSBs7aGB52CF2kXdQaHS6kvQuFACufCbfMKjrB5gSytiT");
});
it("Should correctly upload directory", async () => {
const files = [
{ path: "0.jpg", content: fs.readFileSync("test/files/0.jpg") },
{ path: "1.jpg", content: fs.readFileSync("test/files/1.jpg") },
];
const cid = await getCID(files);
expect(cid).to.equal("QmYtBTkEnTGrzkns2L8R4rL3keowVg3nGcBhPbwrbAWTRP");
});
});
+75
View File
@@ -1,5 +1,80 @@
# @thirdweb-dev/unity-js-bridge
## 0.2.52
### Patch Changes
- Updated dependencies [[`8dd7540c`](https://github.com/thirdweb-dev/js/commit/8dd7540c455aa70534f6d29986537592fd12169b), [`8dd7540c`](https://github.com/thirdweb-dev/js/commit/8dd7540c455aa70534f6d29986537592fd12169b)]:
- @thirdweb-dev/storage@1.1.9
- @thirdweb-dev/chains@0.1.34
- @thirdweb-dev/sdk@3.10.35
- @thirdweb-dev/wallets@1.0.11
- @thirdweb-dev/auth@3.2.15
## 0.2.51
### Patch Changes
- Updated dependencies [[`0407b2c2`](https://github.com/thirdweb-dev/js/commit/0407b2c2f39b5f3fa06e613e671623b5644b3a28)]:
- @thirdweb-dev/chains@0.1.33
- @thirdweb-dev/sdk@3.10.34
- @thirdweb-dev/wallets@1.0.10
- @thirdweb-dev/auth@3.2.14
## 0.2.50
### Patch Changes
- Updated dependencies [[`a9093bcf`](https://github.com/thirdweb-dev/js/commit/a9093bcf287c01e3335fd780e2ccbfdb3380bf95)]:
- @thirdweb-dev/chains@0.1.32
- @thirdweb-dev/sdk@3.10.33
- @thirdweb-dev/wallets@1.0.9
- @thirdweb-dev/auth@3.2.13
## 0.2.49
### Patch Changes
- Updated dependencies [[`4393b228`](https://github.com/thirdweb-dev/js/commit/4393b2280505fd0b2284555d64eae6567e8401a5)]:
- @thirdweb-dev/chains@0.1.31
- @thirdweb-dev/sdk@3.10.32
- @thirdweb-dev/wallets@1.0.8
- @thirdweb-dev/auth@3.2.12
## 0.2.48
### 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
- @thirdweb-dev/auth@3.2.11
## 0.2.47
### Patch Changes
- [#1314](https://github.com/thirdweb-dev/js/pull/1314) [`db68bd04`](https://github.com/thirdweb-dev/js/commit/db68bd04cd8bb3ee6bff051d1d5b5a872353fde0) Thanks [@iketw](https://github.com/iketw)! - Passes API key to thirdweb storage ipfs uploader
If you want to use thirdweb's storage upload services you need to pass an API key.
You can grab one from: https://thirdweb.com/dashboard/settings
If using ThirdwebStorage directly:
```javascript
new ThirdwebStorage({
apiKey: <yourApiKey>,
});
```
- 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/[email protected]
- @thirdweb-dev/[email protected]
- @thirdweb-dev/[email protected]
- @thirdweb-dev/[email protected]
- @thirdweb-dev/[email protected]
## 0.2.46
### Patch Changes
+1 -1
View File
@@ -1,6 +1,6 @@
{
"name": "@thirdweb-dev/unity-js-bridge",
"version": "0.2.46",
"version": "0.2.52",
"main": "dist/thirdweb-unity-bridge.js",
"repository": "https://github.com/thirdweb-dev/js/tree/main/packages/unity-js-bridge",
"license": "Apache-2.0",
@@ -17,6 +17,7 @@ esbuild.build({
splitting: false,
write: true,
sourcemap: false,
inject: [require.resolve("node-stdlib-browser/helpers/esbuild/shim")],
define: {
process: JSON.stringify({
+46 -46
View File
@@ -28,8 +28,6 @@ declare global {
}
}
const API_KEY =
"339d65590ba0fa79e4c8be0af33d64eda709e13652acb02c6be63f5a1fbef9c3";
const SEPARATOR = "/";
const SUB_SEPARATOR = "#";
@@ -128,9 +126,11 @@ class ThirdwebBridge implements TWBridge {
gatewayUrls: {
"ipfs://": [sdkOptions.storage.ipfsGatewayUrl],
},
apiKey: sdkOptions.apiKey,
})
: new ThirdwebStorage();
sdkOptions.thirdwebApiKey = sdkOptions.thirdwebApiKey || API_KEY;
: new ThirdwebStorage({
apiKey: sdkOptions.apiKey,
});
this.activeSDK = new ThirdwebSDK(chain, sdkOptions, storage);
for (let possibleWallet of WALLETS) {
let walletInstance: AbstractClientWallet;
@@ -161,47 +161,47 @@ class ThirdwebBridge implements TWBridge {
chains: defaultChains,
qrModalOptions: {
explorerRecommendedWalletIds: [
'c57ca95b47569778a828d19178114f4db188b89b763c899ba0be274e97267d96', // metamask
'4622a2b2d6af1c9844944291e5e7351a6aa24cd7b23099efac1b2fd875da31a0', // trustwallet
'225affb176778569276e484e1b92637ad061b01e13a048b35a9d280c3b58970f', // safe
'1ae92b26df02f0abca6304df07debccd18262fdf5fe82daa81593582dac9a369', // rainbow
'c03dfee351b6fcc421b4494ea33b9d4b92a984f87aa76d1663bb28705e95034a', // uniswap
'ecc4036f814562b41a5268adc86270fba1365471402006302e70169465b7ac18', // zerion
'ef333840daf915aafdc4a004525502d6d49d77bd9c65e0642dbaefb3c2893bef', // imtoken
'bc949c5d968ae81310268bf9193f9c9fb7bb4e1283e1284af8f2bd4992535fd6', // argent
'74f8092562bd79675e276d8b2062a83601a4106d30202f2d509195e30e19673d', // spot
'afbd95522f4041c71dd4f1a065f971fd32372865b416f95a0b1db759ae33f2a7', // omni
'f2436c67184f158d1beda5df53298ee84abfc367581e4505134b5bcf5f46697d', // crypto.com
'20459438007b75f4f4acb98bf29aa3b800550309646d375da5fd4aac6c2a2c66', // tokenpocket
'8837dd9413b1d9b585ee937d27a816590248386d9dbf59f5cd3422dbbb65683e', // robinhood wallet
'85db431492aa2e8672e93f4ea7acf10c88b97b867b0d373107af63dc4880f041', // frontier
'84b43e8ddfcd18e5fcb5d21e7277733f9cccef76f7d92c836d0e481db0c70c04', // blockchain.com
'0b415a746fb9ee99cce155c2ceca0c6f6061b1dbca2d722b3ba16381d0562150', // safepal
'38f5d18bd8522c244bdd70cb4a68e0e718865155811c043f052fb9f1c51de662', // bitkeep
'9414d5a85c8f4eabc1b5b15ebe0cd399e1a2a9d35643ab0ad22a6e4a32f596f0', // zengo
'c286eebc742a537cd1d6818363e9dc53b21759a1e8e5d9b263d0c03ec7703576', // 1inch
'8a0ee50d1f22f6651afcae7eb4253e52a3310b90af5daef78a8c4929a9bb99d4', // binance defi wallet
'e9ff15be73584489ca4a66f64d32c4537711797e30b6660dbcb71ea72a42b1f4', // exodus
'19177a98252e07ddfc9af2083ba8e07ef627cb6103467ffebb3f8f4205fd7927', // ledger live
'f5b4eeb6015d66be3f5940a895cbaa49ef3439e518cd771270e6b553b48f31d2', // mew wallet
'138f51c8d00ac7b9ac9d8dc75344d096a7dfe370a568aa167eabc0a21830ed98', // alpha wallet
'47bb07617af518642f3413a201ec5859faa63acb1dd175ca95085d35d38afb83', // keyring pro
'76a3d548a08cf402f5c7d021f24fd2881d767084b387a5325df88bc3d4b6f21b', // lobstr wallet
'dceb063851b1833cbb209e3717a0a0b06bf3fb500fe9db8cd3a553e4b1d02137', // onto
'7674bb4e353bf52886768a3ddc2a4562ce2f4191c80831291218ebd90f5f5e26', // math wallet
'8308656f4548bb81b3508afe355cfbb7f0cb6253d1cc7f998080601f838ecee3', // unstoppable domains
'031f0187049b7f96c6f039d1c9c8138ff7a17fd75d38b34350c7182232cc29aa', // obvious
'5864e2ced7c293ed18ac35e0db085c09ed567d67346ccb6f58a0327a75137489', // fireblocks
'2c81da3add65899baeac53758a07e652eea46dbb5195b8074772c62a77bbf568', // ambire wallet
'802a2041afdaf4c7e41a2903e98df333c8835897532699ad370f829390c6900f', // infinity wallet
'7424d97904535b14fe34f09f63d8ca66935546f798758dabd5b26c2309f2b1f9', // bridge wallet
'dd43441a6368ec9046540c46c5fdc58f79926d17ce61a176444568ca7c970dcd', // internet money wallet
'c482dfe368d4f004479977fd88e80dc9e81107f3245d706811581a6dfe69c534', // now wallet
'107bb20463699c4e614d3a2fb7b961e66f48774cb8f6d6c1aee789853280972c', // bitcoin.com wallet
'053ac0ac602e0969736941cf5aa07a3af57396d4601cb521a173a626e1015fb1', // au wallet
'2a3c89040ac3b723a1972a33a125b1db11e258a6975d3a61252cd64e6ea5ea01', // coin98 super app
'b956da9052132e3dabdcd78feb596d5194c99b7345d8c4bd7a47cabdcb69a25f', // abc wallet
]
"c57ca95b47569778a828d19178114f4db188b89b763c899ba0be274e97267d96", // metamask
"4622a2b2d6af1c9844944291e5e7351a6aa24cd7b23099efac1b2fd875da31a0", // trustwallet
"225affb176778569276e484e1b92637ad061b01e13a048b35a9d280c3b58970f", // safe
"1ae92b26df02f0abca6304df07debccd18262fdf5fe82daa81593582dac9a369", // rainbow
"c03dfee351b6fcc421b4494ea33b9d4b92a984f87aa76d1663bb28705e95034a", // uniswap
"ecc4036f814562b41a5268adc86270fba1365471402006302e70169465b7ac18", // zerion
"ef333840daf915aafdc4a004525502d6d49d77bd9c65e0642dbaefb3c2893bef", // imtoken
"bc949c5d968ae81310268bf9193f9c9fb7bb4e1283e1284af8f2bd4992535fd6", // argent
"74f8092562bd79675e276d8b2062a83601a4106d30202f2d509195e30e19673d", // spot
"afbd95522f4041c71dd4f1a065f971fd32372865b416f95a0b1db759ae33f2a7", // omni
"f2436c67184f158d1beda5df53298ee84abfc367581e4505134b5bcf5f46697d", // crypto.com
"20459438007b75f4f4acb98bf29aa3b800550309646d375da5fd4aac6c2a2c66", // tokenpocket
"8837dd9413b1d9b585ee937d27a816590248386d9dbf59f5cd3422dbbb65683e", // robinhood wallet
"85db431492aa2e8672e93f4ea7acf10c88b97b867b0d373107af63dc4880f041", // frontier
"84b43e8ddfcd18e5fcb5d21e7277733f9cccef76f7d92c836d0e481db0c70c04", // blockchain.com
"0b415a746fb9ee99cce155c2ceca0c6f6061b1dbca2d722b3ba16381d0562150", // safepal
"38f5d18bd8522c244bdd70cb4a68e0e718865155811c043f052fb9f1c51de662", // bitkeep
"9414d5a85c8f4eabc1b5b15ebe0cd399e1a2a9d35643ab0ad22a6e4a32f596f0", // zengo
"c286eebc742a537cd1d6818363e9dc53b21759a1e8e5d9b263d0c03ec7703576", // 1inch
"8a0ee50d1f22f6651afcae7eb4253e52a3310b90af5daef78a8c4929a9bb99d4", // binance defi wallet
"e9ff15be73584489ca4a66f64d32c4537711797e30b6660dbcb71ea72a42b1f4", // exodus
"19177a98252e07ddfc9af2083ba8e07ef627cb6103467ffebb3f8f4205fd7927", // ledger live
"f5b4eeb6015d66be3f5940a895cbaa49ef3439e518cd771270e6b553b48f31d2", // mew wallet
"138f51c8d00ac7b9ac9d8dc75344d096a7dfe370a568aa167eabc0a21830ed98", // alpha wallet
"47bb07617af518642f3413a201ec5859faa63acb1dd175ca95085d35d38afb83", // keyring pro
"76a3d548a08cf402f5c7d021f24fd2881d767084b387a5325df88bc3d4b6f21b", // lobstr wallet
"dceb063851b1833cbb209e3717a0a0b06bf3fb500fe9db8cd3a553e4b1d02137", // onto
"7674bb4e353bf52886768a3ddc2a4562ce2f4191c80831291218ebd90f5f5e26", // math wallet
"8308656f4548bb81b3508afe355cfbb7f0cb6253d1cc7f998080601f838ecee3", // unstoppable domains
"031f0187049b7f96c6f039d1c9c8138ff7a17fd75d38b34350c7182232cc29aa", // obvious
"5864e2ced7c293ed18ac35e0db085c09ed567d67346ccb6f58a0327a75137489", // fireblocks
"2c81da3add65899baeac53758a07e652eea46dbb5195b8074772c62a77bbf568", // ambire wallet
"802a2041afdaf4c7e41a2903e98df333c8835897532699ad370f829390c6900f", // infinity wallet
"7424d97904535b14fe34f09f63d8ca66935546f798758dabd5b26c2309f2b1f9", // bridge wallet
"dd43441a6368ec9046540c46c5fdc58f79926d17ce61a176444568ca7c970dcd", // internet money wallet
"c482dfe368d4f004479977fd88e80dc9e81107f3245d706811581a6dfe69c534", // now wallet
"107bb20463699c4e614d3a2fb7b961e66f48774cb8f6d6c1aee789853280972c", // bitcoin.com wallet
"053ac0ac602e0969736941cf5aa07a3af57396d4601cb521a173a626e1015fb1", // au wallet
"2a3c89040ac3b723a1972a33a125b1db11e258a6975d3a61252cd64e6ea5ea01", // coin98 super app
"b956da9052132e3dabdcd78feb596d5194c99b7345d8c4bd7a47cabdcb69a25f", // abc wallet
],
},
});
break;
@@ -237,7 +237,7 @@ class ThirdwebBridge implements TWBridge {
const config: SmartWalletConfig = {
chain: chain,
factoryAddress: sdkOptions.smartWalletConfig?.factoryAddress,
thirdwebApiKey: sdkOptions.smartWalletConfig?.thirdwebApiKey,
thirdwebApiKey: sdkOptions.apiKey,
gasless: sdkOptions.smartWalletConfig?.gasless,
bundlerUrl: sdkOptions.smartWalletConfig?.bundlerUrl,
paymasterUrl: sdkOptions.smartWalletConfig?.paymasterUrl,
+48
View File
@@ -1,5 +1,53 @@
# @thirdweb-dev/wallets
## 1.0.11
### Patch Changes
- Updated dependencies [[`8dd7540c`](https://github.com/thirdweb-dev/js/commit/8dd7540c455aa70534f6d29986537592fd12169b)]:
- @thirdweb-dev/chains@0.1.34
- @thirdweb-dev/sdk@3.10.35
## 1.0.10
### Patch Changes
- Updated dependencies [[`0407b2c2`](https://github.com/thirdweb-dev/js/commit/0407b2c2f39b5f3fa06e613e671623b5644b3a28)]:
- @thirdweb-dev/chains@0.1.33
- @thirdweb-dev/sdk@3.10.34
## 1.0.9
### Patch Changes
- Updated dependencies [[`a9093bcf`](https://github.com/thirdweb-dev/js/commit/a9093bcf287c01e3335fd780e2ccbfdb3380bf95)]:
- @thirdweb-dev/chains@0.1.32
- @thirdweb-dev/sdk@3.10.33
## 1.0.8
### Patch Changes
- Updated dependencies [[`4393b228`](https://github.com/thirdweb-dev/js/commit/4393b2280505fd0b2284555d64eae6567e8401a5)]:
- @thirdweb-dev/chains@0.1.31
- @thirdweb-dev/sdk@3.10.32
## 1.0.7
### 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
## 1.0.6
### 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/sdk@3.10.30
- @thirdweb-dev/chains@0.1.29
## 1.0.5
### Patch Changes
+1 -1
View File
@@ -1,6 +1,6 @@
{
"name": "@thirdweb-dev/wallets",
"version": "1.0.5",
"version": "1.0.11",
"main": "dist/thirdweb-dev-wallets.cjs.js",
"module": "dist/thirdweb-dev-wallets.esm.js",
"types": "dist/thirdweb-dev-wallets.cjs.d.ts",
+1005 -601
View File
File diff suppressed because it is too large Load Diff