Compare commits
10
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
b4676e1b4e | ||
|
|
0135a7790c | ||
|
|
2d088d367c | ||
|
|
546353a479 | ||
|
|
9daf044926 | ||
|
|
7054f9f016 | ||
|
|
a3bb17cb33 | ||
|
|
d03645aefd | ||
|
|
53626f8100 | ||
|
|
8a389f1295 |
+7
-7
@@ -34,19 +34,19 @@
|
||||
"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": {
|
||||
|
||||
@@ -1,5 +1,14 @@
|
||||
# @thirdweb-dev/auth
|
||||
|
||||
## 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
|
||||
|
||||
+19
-19
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@thirdweb-dev/auth",
|
||||
"version": "3.2.7",
|
||||
"version": "3.2.8",
|
||||
"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",
|
||||
|
||||
@@ -1,5 +1,13 @@
|
||||
# @thirdweb-dev/chains
|
||||
|
||||
## 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
|
||||
|
||||
@@ -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;
|
||||
@@ -5,6 +5,7 @@ export default {
|
||||
"rpc": [
|
||||
"https://rollux.rpc.thirdweb.com/${THIRDWEB_API_KEY}",
|
||||
"https://rpc.rollux.com",
|
||||
"https://rollux.public-rpc.com",
|
||||
"wss://rpc.rollux.com/wss",
|
||||
"https://rpc.ankr.com/rollux/${ANKR_API_KEY}"
|
||||
],
|
||||
|
||||
@@ -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;
|
||||
@@ -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",
|
||||
|
||||
@@ -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,
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@thirdweb-dev/chains",
|
||||
"version": "0.1.26",
|
||||
"version": "0.1.27",
|
||||
"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": [
|
||||
|
||||
File diff suppressed because one or more lines are too long
@@ -1,5 +1,18 @@
|
||||
# thirdweb
|
||||
|
||||
## 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
|
||||
|
||||
+15
-15
@@ -1,7 +1,7 @@
|
||||
{
|
||||
"name": "thirdweb",
|
||||
"main": "dist/cli/index.js",
|
||||
"version": "0.10.28",
|
||||
"version": "0.10.29",
|
||||
"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"
|
||||
|
||||
@@ -35,19 +35,19 @@ export async function deployApp(distPath = "dist", projectPath = ".") {
|
||||
case "yarn":
|
||||
await runCommand("yarn", ["build"], true);
|
||||
if (detectedFramework === "next") {
|
||||
await runCommand("yarn", ["export"], true);
|
||||
await runCommand("yarn", ["next", "export"], true);
|
||||
}
|
||||
break;
|
||||
case "npm":
|
||||
await runCommand("npm", ["run", "build"], true);
|
||||
if (detectedFramework === "next") {
|
||||
await runCommand("npm", ["run", "export"], true);
|
||||
await runCommand("npx", ["next", "export"], true);
|
||||
}
|
||||
break;
|
||||
case "pnpm":
|
||||
await runCommand("pnpm", ["build"], true);
|
||||
if (detectedFramework === "next") {
|
||||
await runCommand("pnpm", ["export"], true);
|
||||
await runCommand("pnpm", ["next", "export"], true);
|
||||
}
|
||||
break;
|
||||
default:
|
||||
|
||||
@@ -1,5 +1,11 @@
|
||||
# @thirdweb-dev/contracts-js
|
||||
|
||||
## 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
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@thirdweb-dev/contracts-js",
|
||||
"version": "1.3.7",
|
||||
"version": "1.3.8",
|
||||
"main": "dist/thirdweb-dev-contracts-js.cjs.js",
|
||||
"module": "dist/thirdweb-dev-contracts-js.esm.js",
|
||||
"browser": {
|
||||
@@ -13,17 +13,17 @@
|
||||
"@thirdweb-dev/contracts": "3.5.9"
|
||||
},
|
||||
"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,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"
|
||||
},
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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/**/*'",
|
||||
|
||||
@@ -1,5 +1,17 @@
|
||||
# @thirdweb-dev/react-core
|
||||
|
||||
## 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
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@thirdweb-dev/react-core",
|
||||
"version": "3.14.7",
|
||||
"version": "3.14.8",
|
||||
"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:*",
|
||||
|
||||
@@ -1,5 +1,11 @@
|
||||
# @thirdweb-dev/react-native-compat
|
||||
|
||||
## 0.2.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
|
||||
|
||||
## 0.2.26
|
||||
|
||||
## 0.2.25
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
{
|
||||
"name": "@thirdweb-dev/react-native-compat",
|
||||
"description": "Shims for Thirdweb in React Native Projects",
|
||||
"version": "0.2.26",
|
||||
"version": "0.2.27",
|
||||
"author": "thirdweb eng <[email protected]>",
|
||||
"repository": "https://github.com/thirdweb-dev/js/tree/main/packages/react-native-compat",
|
||||
"license": "Apache-2.0",
|
||||
@@ -22,10 +22,10 @@
|
||||
},
|
||||
"dependencies": {
|
||||
"@ethersproject/shims": "^5.7.0",
|
||||
"@walletconnect/react-native-compat": "^2.3.3",
|
||||
"@walletconnect/react-native-compat": "^2.8.6",
|
||||
"base-64": "^1.0.0",
|
||||
"big-integer": "^1.6.51",
|
||||
"react-native-get-random-values": "^1.8.0"
|
||||
"react-native-get-random-values": "^1.9.0"
|
||||
},
|
||||
"peerDependencies": {
|
||||
"ethers": "^5.5.1",
|
||||
@@ -34,12 +34,12 @@
|
||||
},
|
||||
"devDependencies": {
|
||||
"@thirdweb-dev/tsconfig": "workspace:*",
|
||||
"@types/node": "^18.0.0",
|
||||
"@types/node": "^18.16.18",
|
||||
"babel-plugin-module-resolver": "^5.0.0",
|
||||
"eslint-config-thirdweb": "workspace:*",
|
||||
"ethers": "^5.7.2",
|
||||
"react": "^18.2.0",
|
||||
"react-native": "^0.71.0",
|
||||
"typescript": "^4.7.4"
|
||||
"react-native": "^0.71.11",
|
||||
"typescript": "^5.1.6"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,5 +1,18 @@
|
||||
# @thirdweb-dev/react-native
|
||||
|
||||
## 0.2.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
|
||||
|
||||
- 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/react-core@3.14.8
|
||||
- @thirdweb-dev/wallets@1.0.4
|
||||
- @thirdweb-dev/chains@0.1.27
|
||||
- @thirdweb-dev/sdk@3.10.28
|
||||
|
||||
## 0.2.26
|
||||
|
||||
### Patch Changes
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@thirdweb-dev/react-native",
|
||||
"version": "0.2.26",
|
||||
"version": "0.2.27",
|
||||
"repository": "https://github.com/thirdweb-dev/js/tree/main/packages/react-native",
|
||||
"author": "thirdweb eng <[email protected]>",
|
||||
"license": "Apache-2.0",
|
||||
@@ -26,9 +26,9 @@
|
||||
"dependencies": {
|
||||
"@coinbase/wallet-mobile-sdk": "1.0.6",
|
||||
"@magic-sdk/provider": "17.2.0",
|
||||
"@magic-sdk/react-native-bare": "^18.3.0",
|
||||
"@shopify/restyle": "^2.4.1",
|
||||
"@tanstack/react-query": "^4.0.10",
|
||||
"@magic-sdk/react-native-bare": "^18.5.0",
|
||||
"@shopify/restyle": "^2.4.2",
|
||||
"@tanstack/react-query": "^4.29.19",
|
||||
"@thirdweb-dev/chains": "workspace:*",
|
||||
"@thirdweb-dev/react-core": "workspace:*",
|
||||
"@thirdweb-dev/sdk": "workspace:*",
|
||||
@@ -41,38 +41,38 @@
|
||||
"expo-secure-store": "^12.1.1",
|
||||
"react-native-mmkv": "2.5.1",
|
||||
"react-native-modal": "^13.0.1",
|
||||
"react-native-svg": "^13.8.0",
|
||||
"react-native-svg": "^13.9.0",
|
||||
"tiny-invariant": "^1.2.0"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@babel/core": "^7.19.3",
|
||||
"@babel/preset-env": "^7.1.6",
|
||||
"@react-native-async-storage/async-storage": "*",
|
||||
"@babel/core": "^7.22.5",
|
||||
"@babel/preset-env": "^7.22.5",
|
||||
"@react-native-async-storage/async-storage": "^1.18.2",
|
||||
"@react-native-community/eslint-config": "^3.0.2",
|
||||
"@thirdweb-dev/tsconfig": "workspace:*",
|
||||
"@types/jest": "^29.2.1",
|
||||
"@types/react": "^18.0.5",
|
||||
"@types/react-native": "^0.71.0",
|
||||
"@typescript-eslint/eslint-plugin": "^5.56.0",
|
||||
"@typescript-eslint/parser": "^5.56.0",
|
||||
"@types/jest": "^29.5.2",
|
||||
"@types/react": "^18.2.14",
|
||||
"@types/react-native": "^0.71.8",
|
||||
"@typescript-eslint/eslint-plugin": "^5.60.1",
|
||||
"@typescript-eslint/parser": "^5.60.1",
|
||||
"babel-jest": "^29.2.1",
|
||||
"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",
|
||||
"eslint-plugin-prettier": "^4.2.1",
|
||||
"ethers": "^5.7.2",
|
||||
"expo": "^47.0.0",
|
||||
"expo": "^47.0.14",
|
||||
"jest": "^29.4.3",
|
||||
"prettier": "^2.7.1",
|
||||
"prettier": "^2.8.8",
|
||||
"react": "^18.2.0",
|
||||
"react-native": "^0.71.0",
|
||||
"react-native": "^0.71.11",
|
||||
"react-native-camera": "^4.2.1",
|
||||
"react-native-device-info": "10.6.0",
|
||||
"react-native-safe-area-context": "4.5.3",
|
||||
"react-native-webview": "12.1.0",
|
||||
"typescript": "^4.7.4"
|
||||
"typescript": "^5.1.6"
|
||||
},
|
||||
"optionalDependencies": {
|
||||
"react-native-camera": "^4.2.1",
|
||||
|
||||
@@ -1,5 +1,19 @@
|
||||
# @thirdweb-dev/react
|
||||
|
||||
## 3.14.8
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- [#1282](https://github.com/thirdweb-dev/js/pull/1282) [`7054f9f0`](https://github.com/thirdweb-dev/js/commit/7054f9f01691e1c942ffbec3ee8042218aadd126) Thanks [@kien-ngo](https://github.com/kien-ngo)! - Fix issue #1201 - MediaRenderer HTML MimeType
|
||||
|
||||
- [#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), [`a3bb17cb`](https://github.com/thirdweb-dev/js/commit/a3bb17cb33f033846fb3b4c8a0a4809ba76cab96)]:
|
||||
- @thirdweb-dev/react-core@3.14.8
|
||||
- @thirdweb-dev/wallets@1.0.4
|
||||
- @thirdweb-dev/chains@0.1.27
|
||||
- @thirdweb-dev/sdk@3.10.28
|
||||
|
||||
## 3.14.7
|
||||
|
||||
### Patch Changes
|
||||
|
||||
+28
-28
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@thirdweb-dev/react",
|
||||
"version": "3.14.7",
|
||||
"version": "3.14.8",
|
||||
"repository": "https://github.com/thirdweb-dev/js/tree/main/packages/react",
|
||||
"author": "thirdweb eng <[email protected]>",
|
||||
"license": "Apache-2.0",
|
||||
@@ -81,15 +81,15 @@
|
||||
},
|
||||
"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-base": "^0.9.17",
|
||||
"@solana/wallet-adapter-phantom": "^0.9.17",
|
||||
"@solana/wallet-adapter-react": "^0.15.19",
|
||||
@@ -99,13 +99,13 @@
|
||||
"@thirdweb-dev/sdk": "workspace:*",
|
||||
"@thirdweb-dev/tsconfig": "workspace:*",
|
||||
"@types/color": "^3.0.3",
|
||||
"@types/react": "^18.0.5",
|
||||
"@types/react-dom": "^18.0.6",
|
||||
"@types/uuid": "^9.0.0",
|
||||
"@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",
|
||||
"@types/react-dom": "^18.2.6",
|
||||
"@types/uuid": "^9.0.2",
|
||||
"@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",
|
||||
@@ -113,25 +113,25 @@
|
||||
"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",
|
||||
"react-dom": "^18.2.0",
|
||||
"stream": "npm:stream-browserify@^3.0.0",
|
||||
"typescript": "^4.7.4"
|
||||
"typescript": "^5.1.6"
|
||||
},
|
||||
"dependencies": {
|
||||
"@emotion/react": "^11.10.0",
|
||||
"@emotion/styled": "^11.10.0",
|
||||
"@emotion/react": "^11.11.1",
|
||||
"@emotion/styled": "^11.11.0",
|
||||
"@google/model-viewer": "^2.1.1",
|
||||
"@radix-ui/colors": "^0.1.8",
|
||||
"@radix-ui/react-dialog": "^1.0.2",
|
||||
"@radix-ui/react-dropdown-menu": "^2.0.2",
|
||||
"@radix-ui/react-icons": "^1.1.1",
|
||||
"@radix-ui/react-popover": "^1.0.5",
|
||||
"@radix-ui/react-tabs": "^1.0.2",
|
||||
"@radix-ui/react-tooltip": "^1.0.4",
|
||||
"@radix-ui/colors": "^0.1.9",
|
||||
"@radix-ui/react-dialog": "^1.0.4",
|
||||
"@radix-ui/react-dropdown-menu": "^2.0.5",
|
||||
"@radix-ui/react-icons": "^1.3.0",
|
||||
"@radix-ui/react-popover": "^1.0.6",
|
||||
"@radix-ui/react-tabs": "^1.0.4",
|
||||
"@radix-ui/react-tooltip": "^1.0.6",
|
||||
"@react-icons/all-files": "^4.1.0",
|
||||
"@tanstack/react-query": "^4.0.10",
|
||||
"@tanstack/react-query": "^4.29.19",
|
||||
"@thirdweb-dev/chains": "workspace:*",
|
||||
"@thirdweb-dev/react-core": "workspace:*",
|
||||
"@thirdweb-dev/wallets": "workspace:*",
|
||||
|
||||
@@ -431,7 +431,7 @@ export const MediaRenderer = /* @__PURE__ */ React.forwardRef<
|
||||
alt={alt}
|
||||
/>
|
||||
);
|
||||
} else if (videoOrImageSrc.mimeType === "text/html") {
|
||||
} else if (videoOrImageSrc.mimeType.startsWith("text/html")) {
|
||||
return (
|
||||
<IframePlayer
|
||||
style={mergedStyle}
|
||||
|
||||
@@ -6,13 +6,14 @@ export function useInstalledWallets() {
|
||||
let isZerionWalletInstalled = false;
|
||||
let isTrustWalletInstalled = false;
|
||||
|
||||
if (assertWindowEthereum(globalThis.window)) {
|
||||
isMetamaskInstalled = !!globalThis.window.ethereum?.isMetaMask;
|
||||
const window_: Window | undefined = globalThis?.window;
|
||||
if (assertWindowEthereum(window_)) {
|
||||
isMetamaskInstalled = !!window_.ethereum?.isMetaMask;
|
||||
isCoinbaseWalletInstalled =
|
||||
!!globalThis.window.ethereum?.isCoinbaseWallet ||
|
||||
!!globalThis.window.ethereum?.providers?.some((p) => p.isCoinbaseWallet);
|
||||
isZerionWalletInstalled = !!globalThis.window.ethereum?.isZerion;
|
||||
isTrustWalletInstalled = !!globalThis.window.ethereum?.isTrust;
|
||||
!!window_.ethereum?.isCoinbaseWallet ||
|
||||
!!window_.ethereum?.providers?.some((p) => p.isCoinbaseWallet);
|
||||
isZerionWalletInstalled = !!window_.ethereum?.isZerion;
|
||||
isTrustWalletInstalled = !!window_.ethereum?.isTrust;
|
||||
}
|
||||
|
||||
return {
|
||||
|
||||
@@ -21,12 +21,11 @@ export const coinbaseWallet = (): WalletConfig<CoinbaseWallet> => {
|
||||
},
|
||||
connectUI: CoinbaseConnectUI,
|
||||
isInstalled() {
|
||||
if (assertWindowEthereum(globalThis.window)) {
|
||||
const window_: Window | undefined = globalThis?.window;
|
||||
if (assertWindowEthereum(window_)) {
|
||||
return (
|
||||
globalThis.window.ethereum?.isCoinbaseWallet ||
|
||||
globalThis.window.ethereum?.providers?.some(
|
||||
(p) => p.isCoinbaseWallet,
|
||||
) ||
|
||||
window_.ethereum?.isCoinbaseWallet ||
|
||||
window_.ethereum?.providers?.some((p) => p.isCoinbaseWallet) ||
|
||||
false
|
||||
);
|
||||
}
|
||||
|
||||
@@ -19,10 +19,11 @@ export const frameWallet = (): WalletConfig<FrameWallet> => ({
|
||||
},
|
||||
connectUI: FrameConnectUI,
|
||||
isInstalled() {
|
||||
if (assertWindowEthereum(globalThis.window)) {
|
||||
const window_: Window | undefined = globalThis?.window;
|
||||
if (assertWindowEthereum(window_)) {
|
||||
return (
|
||||
globalThis.window.ethereum?.isFrame ||
|
||||
globalThis.window.ethereum?.providers?.some((p) => p.isFrame) ||
|
||||
window_.ethereum?.isFrame ||
|
||||
window_.ethereum?.providers?.some((p) => p.isFrame) ||
|
||||
false
|
||||
);
|
||||
}
|
||||
|
||||
@@ -1,5 +1,18 @@
|
||||
# @thirdweb-dev/sdk
|
||||
|
||||
## 3.10.28
|
||||
|
||||
### 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
|
||||
|
||||
- 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/contracts-js@1.3.8
|
||||
- @thirdweb-dev/chains@0.1.27
|
||||
|
||||
## 3.10.27
|
||||
|
||||
### Patch Changes
|
||||
|
||||
+22
-22
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@thirdweb-dev/sdk",
|
||||
"version": "3.10.27",
|
||||
"version": "3.10.28",
|
||||
"description": "The main thirdweb SDK.",
|
||||
"repository": "https://github.com/thirdweb-dev/js/tree/main/packages/sdk",
|
||||
"license": "Apache-2.0",
|
||||
@@ -97,35 +97,35 @@
|
||||
"push": "yalc push"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@aws-sdk/client-secrets-manager": "^3.256.0",
|
||||
"@aws-sdk/client-secrets-manager": "^3.363.0",
|
||||
"@ethersproject/abstract-provider": "^5.7.0",
|
||||
"@metaplex-foundation/amman": "^0.12.1",
|
||||
"@metaplex-foundation/amman-client": "^0.2.4",
|
||||
"@metaplex-foundation/js": "^0.19.2",
|
||||
"@metaplex-foundation/mpl-token-metadata": "^2.11",
|
||||
"@microsoft/api-documenter": "^7.19.4",
|
||||
"@microsoft/api-extractor": "^7.29.2",
|
||||
"@metaplex-foundation/mpl-token-metadata": "^2.12.0",
|
||||
"@microsoft/api-documenter": "^7.22.21",
|
||||
"@microsoft/api-extractor": "^7.36.0",
|
||||
"@microsoft/tsdoc": "^0.14.1",
|
||||
"@nomiclabs/hardhat-ethers": "^2.0.5",
|
||||
"@preconstruct/cli": "^2.2.1",
|
||||
"@nomiclabs/hardhat-ethers": "^2.2.3",
|
||||
"@preconstruct/cli": "^2.7.0",
|
||||
"@project-serum/anchor": "^0.25.0",
|
||||
"@solana/spl-token": "^0.3.5",
|
||||
"@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/bn.js": "^5.1.1",
|
||||
"@types/chai": "^4.3.3",
|
||||
"@types/chai": "^4.3.5",
|
||||
"@types/deep-equal-in-any-order": "^1.0.1",
|
||||
"@types/mocha": "^10.0.0",
|
||||
"@types/node": "^18.0.0",
|
||||
"@types/uuid": "^9.0.0",
|
||||
"@typescript-eslint/eslint-plugin": "^5.33.0",
|
||||
"@typescript-eslint/parser": "^5.33.0",
|
||||
"@types/node": "^18.16.18",
|
||||
"@types/uuid": "^9.0.2",
|
||||
"@typescript-eslint/eslint-plugin": "^5.60.1",
|
||||
"@typescript-eslint/parser": "^5.60.1",
|
||||
"chai": "^4.3.6",
|
||||
"deep-equal-in-any-order": "^1.1.18",
|
||||
"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-better-tree-shaking": "0.0.3",
|
||||
"eslint-plugin-import": "^2.26.0",
|
||||
@@ -134,11 +134,11 @@
|
||||
"eslint-plugin-tsdoc": "^0.2.16",
|
||||
"ethers": "^5.7.2",
|
||||
"ethers-aws-kms-signer": "^1.3.2",
|
||||
"hardhat": "^2.9.3",
|
||||
"hardhat": "^2.16.1",
|
||||
"mocha": "^10.2.0",
|
||||
"nyc": "^15.1.0",
|
||||
"prettier": "^2.7.1",
|
||||
"typescript": "^4.7.4",
|
||||
"prettier": "^2.8.8",
|
||||
"typescript": "^5.1.6",
|
||||
"zksync-web3": "^0.14.3"
|
||||
},
|
||||
"peerDependencies": {
|
||||
@@ -187,14 +187,14 @@
|
||||
"bn.js": "^5.2.1",
|
||||
"bs58": "^5.0.0",
|
||||
"buffer": "^6.0.3",
|
||||
"cross-fetch": "^3.1.5",
|
||||
"eventemitter3": "^5.0.0",
|
||||
"cross-fetch": "^3.1.6",
|
||||
"eventemitter3": "^5.0.1",
|
||||
"fast-deep-equal": "^3.1.3",
|
||||
"merkletreejs": "^0.2.24",
|
||||
"tiny-invariant": "^1.2.0",
|
||||
"tweetnacl": "^1.0.3",
|
||||
"uuid": "^9.0.0",
|
||||
"yaml": "^2.1.1",
|
||||
"yaml": "^2.3.1",
|
||||
"zod": "^3.20.2"
|
||||
},
|
||||
"bugs": {
|
||||
|
||||
@@ -31,11 +31,17 @@ export type EIP712Domain = EIP712StandardDomain | EIP712PolygonDomain;
|
||||
* @internal
|
||||
*/
|
||||
export async function signTypedDataInternal(
|
||||
signer: Signer,
|
||||
signerInput: Signer,
|
||||
domain: EIP712Domain,
|
||||
types: Record<string, Array<TypedDataField>>,
|
||||
message: Record<string, any>,
|
||||
) {
|
||||
// Handle ERC4337Signer
|
||||
let signer = signerInput;
|
||||
if ((signerInput as any).originalSigner) {
|
||||
signer = (signerInput as any).originalSigner;
|
||||
}
|
||||
|
||||
const provider = signer?.provider as providers.JsonRpcProvider;
|
||||
if (!provider) {
|
||||
throw new Error("missing provider");
|
||||
@@ -60,7 +66,7 @@ export async function signTypedDataInternal(
|
||||
message,
|
||||
);
|
||||
} catch (err: any) {
|
||||
if (err?.message?.includes("Method eth_signTypedData_v4 not supported")) {
|
||||
if (err?.message?.includes("eth_signTypedData_v4")) {
|
||||
signature = await provider.send("eth_signTypedData", [
|
||||
signerAddress,
|
||||
JSON.stringify(payload),
|
||||
|
||||
@@ -259,7 +259,7 @@ export class Marketplace implements UpdateableNetwork {
|
||||
(l.type === ListingType.Auction &&
|
||||
BigNumber.from(l.endTimeInEpochSeconds).gt(now) &&
|
||||
BigNumber.from(l.startTimeInEpochSeconds).lte(now)) ||
|
||||
(l.type === ListingType.Direct && l.quantity > 0)
|
||||
(l.type === ListingType.Direct && BigNumber.from(l.quantity).gt(0))
|
||||
);
|
||||
});
|
||||
}
|
||||
|
||||
@@ -21,7 +21,7 @@ import {
|
||||
DirectListingInputParams,
|
||||
DirectListingInputParamsSchema,
|
||||
} from "../../schema/marketplacev3/direct-listings";
|
||||
import type { MarketplaceFilter } from "../../types/marketplace";
|
||||
import type { MarketplaceFilterWithoutOfferor } from "../../types/marketplace";
|
||||
import type { DirectListingV3 } from "../../types/marketplacev3";
|
||||
import { DetectableFeature } from "../interfaces/DetectableFeature";
|
||||
import { TransactionResultWithId } from "../types";
|
||||
@@ -116,7 +116,7 @@ export class MarketplaceV3DirectListings<TContract extends DirectListingsLogic>
|
||||
* @returns the Direct listing object array
|
||||
* @twfeature DirectListings
|
||||
*/
|
||||
public async getAll(filter?: MarketplaceFilter): Promise<DirectListingV3[]> {
|
||||
public async getAll(filter?: MarketplaceFilterWithoutOfferor): Promise<DirectListingV3[]> {
|
||||
const totalListings = await this.getTotalCount();
|
||||
|
||||
let start = BigNumber.from(filter?.start || 0).toNumber();
|
||||
@@ -156,7 +156,7 @@ export class MarketplaceV3DirectListings<TContract extends DirectListingsLogic>
|
||||
* @twfeature DirectListings
|
||||
*/
|
||||
public async getAllValid(
|
||||
filter?: MarketplaceFilter,
|
||||
filter?: MarketplaceFilterWithoutOfferor,
|
||||
): Promise<DirectListingV3[]> {
|
||||
const totalListings = await this.getTotalCount();
|
||||
|
||||
@@ -955,7 +955,7 @@ export class MarketplaceV3DirectListings<TContract extends DirectListingsLogic>
|
||||
|
||||
private async applyFilter(
|
||||
listings: IDirectListings.ListingStructOutput[],
|
||||
filter?: MarketplaceFilter,
|
||||
filter?: MarketplaceFilterWithoutOfferor,
|
||||
) {
|
||||
let rawListings = [...listings];
|
||||
|
||||
|
||||
@@ -11,7 +11,7 @@ import {
|
||||
EnglishAuctionInputParams,
|
||||
EnglishAuctionInputParamsSchema,
|
||||
} from "../../schema/marketplacev3/english-auctions";
|
||||
import type { MarketplaceFilter } from "../../types/marketplace";
|
||||
import type { MarketplaceFilterWithoutOfferor } from "../../types/marketplace";
|
||||
import { CurrencyValue, Price } from "../../types/currency";
|
||||
import { EnglishAuction, Bid } from "../../types/marketplacev3";
|
||||
import { DetectableFeature } from "../interfaces/DetectableFeature";
|
||||
@@ -104,7 +104,7 @@ export class MarketplaceV3EnglishAuctions<
|
||||
* @returns the Auction object array
|
||||
* @twfeature EnglishAuctions
|
||||
*/
|
||||
public async getAll(filter?: MarketplaceFilter): Promise<EnglishAuction[]> {
|
||||
public async getAll(filter?: MarketplaceFilterWithoutOfferor): Promise<EnglishAuction[]> {
|
||||
const totalAuctions = await this.getTotalCount();
|
||||
|
||||
let start = BigNumber.from(filter?.start || 0).toNumber();
|
||||
@@ -142,7 +142,7 @@ export class MarketplaceV3EnglishAuctions<
|
||||
* @twfeature EnglishAuctions
|
||||
*/
|
||||
public async getAllValid(
|
||||
filter?: MarketplaceFilter,
|
||||
filter?: MarketplaceFilterWithoutOfferor,
|
||||
): Promise<EnglishAuction[]> {
|
||||
const totalAuctions = await this.getTotalCount();
|
||||
|
||||
@@ -885,7 +885,7 @@ export class MarketplaceV3EnglishAuctions<
|
||||
|
||||
private async applyFilter(
|
||||
auctions: IEnglishAuctions.AuctionStructOutput[],
|
||||
filter?: MarketplaceFilter,
|
||||
filter?: MarketplaceFilterWithoutOfferor,
|
||||
) {
|
||||
let rawAuctions = [...auctions];
|
||||
|
||||
|
||||
@@ -14,7 +14,7 @@ import {
|
||||
OfferInputParams,
|
||||
OfferInputParamsSchema,
|
||||
} from "../../schema/marketplacev3/offer";
|
||||
import type { MarketplaceFilter } from "../../types/marketplace";
|
||||
import type { MarketplaceFilterWithoutSeller } from "../../types/marketplace";
|
||||
import { OfferV3 } from "../../types/marketplacev3";
|
||||
import { DetectableFeature } from "../interfaces/DetectableFeature";
|
||||
import { TransactionResultWithId } from "../types";
|
||||
@@ -96,7 +96,7 @@ export class MarketplaceV3Offers<TContract extends OffersLogic>
|
||||
* @returns the Offer object array
|
||||
* @twfeature Offers
|
||||
*/
|
||||
public async getAll(filter?: MarketplaceFilter): Promise<OfferV3[]> {
|
||||
public async getAll(filter?: MarketplaceFilterWithoutSeller): Promise<OfferV3[]> {
|
||||
const totalOffers = await this.getTotalCount();
|
||||
|
||||
let start = BigNumber.from(filter?.start || 0).toNumber();
|
||||
@@ -133,7 +133,7 @@ export class MarketplaceV3Offers<TContract extends OffersLogic>
|
||||
* @returns the Offer object array
|
||||
* @twfeature Offers
|
||||
*/
|
||||
public async getAllValid(filter?: MarketplaceFilter): Promise<OfferV3[]> {
|
||||
public async getAllValid(filter?: MarketplaceFilterWithoutSeller): Promise<OfferV3[]> {
|
||||
const totalOffers = await this.getTotalCount();
|
||||
|
||||
let start = BigNumber.from(filter?.start || 0).toNumber();
|
||||
@@ -457,7 +457,7 @@ export class MarketplaceV3Offers<TContract extends OffersLogic>
|
||||
|
||||
private async applyFilter(
|
||||
offers: IOffers.OfferStructOutput[],
|
||||
filter?: MarketplaceFilter,
|
||||
filter?: MarketplaceFilterWithoutSeller,
|
||||
) {
|
||||
let rawOffers = [...offers];
|
||||
|
||||
|
||||
@@ -11,3 +11,13 @@ export interface MarketplaceFilter extends QueryAllParams {
|
||||
tokenId?: BigNumberish;
|
||||
offeror?: AddressOrEns;
|
||||
}
|
||||
|
||||
/**
|
||||
* English auctions and Direct Listings V3 cannot be retrieved by offeror.
|
||||
*/
|
||||
export interface MarketplaceFilterWithoutOfferor extends Omit<MarketplaceFilter, 'offeror'> {}
|
||||
|
||||
/**
|
||||
* Offers V3 cannot be retrieved by seller.
|
||||
*/
|
||||
export interface MarketplaceFilterWithoutSeller extends Omit<MarketplaceFilter, 'seller'> {}
|
||||
@@ -1,7 +1,4 @@
|
||||
import { Keypair } from "@solana/web3.js";
|
||||
import fs from "fs";
|
||||
import os from "os";
|
||||
import path from "path";
|
||||
import yaml from "yaml";
|
||||
|
||||
/**
|
||||
@@ -9,14 +6,14 @@ import yaml from "yaml";
|
||||
*/
|
||||
function getConfig(): any {
|
||||
// Path to Solana CLI config file
|
||||
const CONFIG_FILE_PATH = path.resolve(
|
||||
os.homedir(),
|
||||
const CONFIG_FILE_PATH = require("path").resolve(
|
||||
require("os").homedir(),
|
||||
".config",
|
||||
"solana",
|
||||
"cli",
|
||||
"config.yml",
|
||||
);
|
||||
const configYml = fs.readFileSync(CONFIG_FILE_PATH, {
|
||||
const configYml = require("fs").readFileSync(CONFIG_FILE_PATH, {
|
||||
encoding: "utf8",
|
||||
});
|
||||
return yaml.parse(configYml);
|
||||
@@ -62,7 +59,9 @@ export function getPayer(): Keypair {
|
||||
* Create a Keypair from a secret key stored in file as bytes' array
|
||||
*/
|
||||
export function createKeypairFromFile(filePath: string): Keypair {
|
||||
const secretKeyString = fs.readFileSync(filePath, { encoding: "utf8" });
|
||||
const secretKeyString = require("fs").readFileSync(filePath, {
|
||||
encoding: "utf8",
|
||||
});
|
||||
const secretKey = Uint8Array.from(JSON.parse(secretKeyString));
|
||||
return Keypair.fromSecretKey(secretKey);
|
||||
}
|
||||
|
||||
@@ -1,5 +1,21 @@
|
||||
# @thirdweb-dev/storage
|
||||
|
||||
## 1.1.6
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- [#1286](https://github.com/thirdweb-dev/js/pull/1286) [`2d088d36`](https://github.com/thirdweb-dev/js/commit/2d088d367ca54233836dc69712fd411ab7924205) Thanks [@jnsdls](https://github.com/jnsdls)! - fix double `//` case
|
||||
|
||||
- [#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
|
||||
|
||||
- [#1232](https://github.com/thirdweb-dev/js/pull/1232) [`9daf0449`](https://github.com/thirdweb-dev/js/commit/9daf044926bf995ac8998929dbeca548c5eb8561) Thanks [@nessup](https://github.com/nessup)! - Switch over to the new `ipfs.thirdweb-storage.com` public gateway.
|
||||
Better fallback logic for if a gateway is down.
|
||||
Faster loading of files from the default gateway by skipping a roundtrip to redirect.
|
||||
|
||||
- [#1285](https://github.com/thirdweb-dev/js/pull/1285) [`546353a4`](https://github.com/thirdweb-dev/js/commit/546353a479c11533818ef917c0f6b4d6f8f69872) Thanks [@jnsdls](https://github.com/jnsdls)! - add additional fallback gateways
|
||||
|
||||
- [#1287](https://github.com/thirdweb-dev/js/pull/1287) [`0135a779`](https://github.com/thirdweb-dev/js/commit/0135a7790cf2acde6b701cb41ea10dd311da5ec3) Thanks [@jnsdls](https://github.com/jnsdls)! - fix uploaded-check
|
||||
|
||||
## 1.1.5
|
||||
|
||||
### Patch Changes
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@thirdweb-dev/storage",
|
||||
"version": "1.1.5",
|
||||
"version": "1.1.6",
|
||||
"main": "dist/thirdweb-dev-storage.cjs.js",
|
||||
"module": "dist/thirdweb-dev-storage.esm.js",
|
||||
"browser": {
|
||||
@@ -43,28 +43,29 @@
|
||||
}
|
||||
},
|
||||
"devDependencies": {
|
||||
"@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/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",
|
||||
"@swc-node/register": "^1.5.1",
|
||||
"@preconstruct/cli": "^2.7.0",
|
||||
"@swc-node/register": "^1.6.6",
|
||||
"@thirdweb-dev/tsconfig": "workspace:*",
|
||||
"@types/chai": "^4.3.3",
|
||||
"@types/chai": "^4.3.5",
|
||||
"@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",
|
||||
"eslint": "^8.42.0",
|
||||
"eslint": "^8.43.0",
|
||||
"eslint-config-thirdweb": "workspace:*",
|
||||
"esm": "^3.2.25",
|
||||
"mocha": "^10.2.0",
|
||||
"typescript": "^4.7.4"
|
||||
"typescript": "^5.1.6"
|
||||
},
|
||||
"dependencies": {
|
||||
"cross-fetch": "^3.1.5",
|
||||
"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"
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import { FileOrBufferOrString } from "../types";
|
||||
import { DEFAULT_GATEWAY_URLS } from "./urls";
|
||||
import { DEFAULT_GATEWAY_URLS, getGatewayUrlForCid } from "./urls";
|
||||
import { isBufferOrStringWithName } from "./utils";
|
||||
import fetch from "cross-fetch";
|
||||
import { importer } from "ipfs-unixfs-importer";
|
||||
@@ -67,7 +67,8 @@ export async function getCID(
|
||||
}
|
||||
|
||||
export async function isUploaded(cid: string) {
|
||||
const res = await fetch(`${DEFAULT_GATEWAY_URLS["ipfs://"][0]}${cid}`, {
|
||||
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
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
import { GatewayUrls } from "../types";
|
||||
import CIDTool from "cid-tool";
|
||||
|
||||
/**
|
||||
* @internal
|
||||
@@ -6,13 +7,12 @@ import { GatewayUrls } from "../types";
|
||||
export const DEFAULT_GATEWAY_URLS: GatewayUrls = {
|
||||
// Note: Gateway URLs should have trailing slashes (we clean this on user input)
|
||||
"ipfs://": [
|
||||
"https://ipfs-3.thirdwebcdn.com/ipfs/",
|
||||
"https://ipfs-4.thirdwebcdn.com/ipfs/",
|
||||
"https://ipfs-5.thirdwebcdn.com/ipfs/",
|
||||
"https://cloudflare-ipfs.com/ipfs/",
|
||||
"https://ipfs.io/ipfs/",
|
||||
// TODO this one can become the default again once it's stable (no more VT issues)
|
||||
"https://ipfs.thirdwebcdn.com/ipfs/",
|
||||
"https://{cid}.ipfs.thirdwebstorage.com/{path}",
|
||||
"https://{cid}.ipfs.thirdwebipfs.com/{path}",
|
||||
"https://{cid}.ipfs.thirdwebgateway.com/{path}",
|
||||
"https://{cid}.ipfs-public.thirdwebcdn.com/{path}",
|
||||
"https://cloudflare-ipfs.com/ipfs/{cid}/{path}",
|
||||
"https://ipfs.io/ipfs/{cid}/{path}",
|
||||
],
|
||||
};
|
||||
|
||||
@@ -41,6 +41,33 @@ export function parseGatewayUrls(
|
||||
return gatewayUrls || {};
|
||||
}
|
||||
|
||||
/**
|
||||
* @internal
|
||||
*/
|
||||
export function getGatewayUrlForCid(gatewayUrl: string, cid: string): string {
|
||||
const parts = cid.split("/");
|
||||
const hash = convertCidToV1(parts[0]);
|
||||
const filePath = parts.slice(1).join("/");
|
||||
|
||||
let url = gatewayUrl;
|
||||
|
||||
// If the URL contains {cid} or {path} tokens, replace them with the CID and path
|
||||
// Both tokens must be present for the URL to be valid
|
||||
if (gatewayUrl.includes("{cid}") && gatewayUrl.includes("{path}")) {
|
||||
url = url.replace("{cid}", hash).replace("{path}", filePath);
|
||||
}
|
||||
// If the URL contains only the {cid} token, replace it with the CID
|
||||
else if (gatewayUrl.includes("{cid}")) {
|
||||
url = url.replace("{cid}", hash);
|
||||
}
|
||||
// If those tokens don't exist, use the canonical gateway URL format
|
||||
else {
|
||||
url += `${hash}/${filePath}`;
|
||||
}
|
||||
|
||||
return url;
|
||||
}
|
||||
|
||||
/**
|
||||
* @internal
|
||||
*/
|
||||
@@ -53,9 +80,11 @@ export function prepareGatewayUrls(gatewayUrls?: GatewayUrls): GatewayUrls {
|
||||
for (const key of Object.keys(DEFAULT_GATEWAY_URLS)) {
|
||||
if (gatewayUrls && gatewayUrls[key]) {
|
||||
// Make sure that all user gateway URLs have trailing slashes
|
||||
const cleanedGatewayUrls = gatewayUrls[key].map(
|
||||
(url) => url.replace(/\/$/, "") + "/",
|
||||
const cleanedGatewayUrls = gatewayUrls[key].map((url) =>
|
||||
// don't add trailing slash if the URL contains {path} token
|
||||
url.includes("{path}") ? url : url.replace(/\/$/, "") + "/",
|
||||
);
|
||||
|
||||
allGatewayUrls[key] = [
|
||||
...cleanedGatewayUrls,
|
||||
...DEFAULT_GATEWAY_URLS[key],
|
||||
@@ -65,3 +94,17 @@ export function prepareGatewayUrls(gatewayUrls?: GatewayUrls): GatewayUrls {
|
||||
|
||||
return allGatewayUrls;
|
||||
}
|
||||
|
||||
/**
|
||||
* @internal
|
||||
*/
|
||||
export function convertCidToV1(cid: string) {
|
||||
let normalized: string;
|
||||
try {
|
||||
const hash = cid.split("/")[0];
|
||||
normalized = CIDTool.base32(hash);
|
||||
} catch (e) {
|
||||
throw new Error(`The CID ${cid} is not valid.`);
|
||||
}
|
||||
return normalized;
|
||||
}
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
import { BufferOrStringWithName, FileOrBuffer, GatewayUrls } from "../types";
|
||||
import { getGatewayUrlForCid } from "./urls";
|
||||
|
||||
/**
|
||||
* @internal
|
||||
@@ -85,6 +86,29 @@ export function isFileBufferOrStringEqual(input1: any, input2: any): boolean {
|
||||
return false;
|
||||
}
|
||||
|
||||
/**
|
||||
* @internal
|
||||
*/
|
||||
function parseCidAndPath(
|
||||
gatewayUrl: string,
|
||||
uri: string,
|
||||
): { hash?: string; path?: string; query?: string } | undefined {
|
||||
const regexString = gatewayUrl
|
||||
.replace("{cid}", "(?<hash>[^/]+)")
|
||||
.replace("{path}", "(?<path>[^?#]+)");
|
||||
|
||||
const regex = new RegExp(regexString);
|
||||
const match = uri.match(regex);
|
||||
|
||||
if (match) {
|
||||
const hash = match.groups?.hash;
|
||||
const path = match.groups?.path;
|
||||
const queryString = uri.includes("?") ? uri.substring(uri.indexOf("?") + 1) : "";
|
||||
|
||||
return { hash, path, query: queryString };
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* @internal
|
||||
*/
|
||||
@@ -93,9 +117,21 @@ export function replaceGatewayUrlWithScheme(
|
||||
gatewayUrls: GatewayUrls,
|
||||
): string {
|
||||
for (const scheme of Object.keys(gatewayUrls)) {
|
||||
for (const url of gatewayUrls[scheme]) {
|
||||
if (uri.startsWith(url)) {
|
||||
return uri.replace(url, scheme);
|
||||
for (const gatewayUrl of gatewayUrls[scheme]) {
|
||||
// If the url is a tokenized url, we need to convert it to a canonical url
|
||||
// Otherwise, we just need to check if the url is a prefix of the uri
|
||||
if (gatewayUrl.includes("{cid}")) {
|
||||
// Given the url is a tokenized url, we need to lift the cid and the path from the uri
|
||||
const parsed = parseCidAndPath(gatewayUrl, uri);
|
||||
if (parsed?.hash && parsed?.path) {
|
||||
const queryString = parsed?.query ? `?${parsed?.query}` : "";
|
||||
return `${scheme}${parsed?.hash}/${parsed?.path}${queryString}`;
|
||||
} else {
|
||||
// If we can't lift the cid and path from the uri, we can't replace the gateway url, return the orig string
|
||||
return uri;
|
||||
}
|
||||
} else if (uri.startsWith(gatewayUrl)) {
|
||||
return uri.replace(gatewayUrl, scheme);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -122,7 +158,8 @@ export function replaceSchemeWithGatewayUrl(
|
||||
return uri;
|
||||
}
|
||||
|
||||
return uri.replace(scheme, schemeGatewayUrls[index]);
|
||||
const path = uri.replace(scheme, "");
|
||||
return getGatewayUrlForCid(schemeGatewayUrls[index], path);
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -33,18 +33,39 @@ export class StorageDownloader implements IStorageDownloader {
|
||||
throw new Error(
|
||||
"[FAILED_TO_DOWNLOAD_ERROR] Unable to download from URI - all gateway URLs failed to respond.",
|
||||
);
|
||||
} else if (attempts > 0) {
|
||||
console.warn(`Retrying download with backup gateway URL: ${resolvedUri}`);
|
||||
}
|
||||
|
||||
const res = await fetch(resolvedUri);
|
||||
const resOrErr = await fetch(resolvedUri).catch((err) => err);
|
||||
|
||||
if (resOrErr.ok) {
|
||||
return resOrErr;
|
||||
}
|
||||
|
||||
// can't use instanceof "Response" in node...
|
||||
if ("status" in resOrErr) {
|
||||
if (resOrErr.status === 410 || resOrErr.status === 403) {
|
||||
// Don't retry if the content is blocklisted
|
||||
console.error(
|
||||
`Request to ${resolvedUri} failed because this content seems to be blocklisted. Search VirusTotal for this URL to confirm: ${resolvedUri} `,
|
||||
);
|
||||
return resOrErr;
|
||||
}
|
||||
|
||||
// If request to the current gateway fails, recursively try the next one we know about
|
||||
if (res.status >= 500 || res.status === 403 || res.status === 408) {
|
||||
console.warn(
|
||||
`Request to ${resolvedUri} failed with status ${res.status} - ${res.statusText}`,
|
||||
`Request to ${resolvedUri} failed with status ${resOrErr.status} - ${resOrErr.statusText}`,
|
||||
);
|
||||
return this.download(uri, gatewayUrls, attempts + 1);
|
||||
|
||||
// Don't retry if we see 408 or < 500 status codes that are likely to be resolved by trying another gateway
|
||||
if (resOrErr.status !== 408 && resOrErr.status < 500) {
|
||||
return resOrErr;
|
||||
}
|
||||
} else {
|
||||
console.warn(`Request to ${resolvedUri} failed with error`, resOrErr);
|
||||
}
|
||||
|
||||
return res;
|
||||
// Since the current gateway failed, recursively try the next one we know about
|
||||
return this.download(uri, gatewayUrls, attempts + 1);
|
||||
}
|
||||
}
|
||||
|
||||
+1
@@ -0,0 +1 @@
|
||||
declare module "cid-tool";
|
||||
@@ -1,5 +1,5 @@
|
||||
/* eslint-disable no-unused-expressions */
|
||||
import { IpfsUploader, ThirdwebStorage } from "../src";
|
||||
import { getGatewayUrlForCid, IpfsUploader, ThirdwebStorage } from "../src";
|
||||
import { DEFAULT_GATEWAY_URLS } from "../src/common/urls";
|
||||
import { expect } from "chai";
|
||||
import { readFileSync } from "fs";
|
||||
@@ -7,10 +7,35 @@ import { readFileSync } from "fs";
|
||||
describe("IPFS", async () => {
|
||||
const storage = new ThirdwebStorage();
|
||||
|
||||
it("Should replace tokens in tokenized gateway URL", async () => {
|
||||
const url = getGatewayUrlForCid(
|
||||
"https://{cid}.example.com/{path}",
|
||||
"QmYtBTkEnTGrzkns2L8R4rL3keowVg3nGcBhPbwrbAWTRP/1.jpg",
|
||||
);
|
||||
expect(url).to.equal(
|
||||
"https://bafybeie4vcsw3ew6io6paaltdvwkpcoeyn6uoewvu7op7fhhztpnivqnyy.example.com/1.jpg",
|
||||
);
|
||||
});
|
||||
|
||||
it("Should append path to canonical gateway URL", async () => {
|
||||
const url = getGatewayUrlForCid(
|
||||
"https://example.com/ipfs/",
|
||||
"QmYtBTkEnTGrzkns2L8R4rL3keowVg3nGcBhPbwrbAWTRP/1.jpg",
|
||||
);
|
||||
expect(url).to.equal(
|
||||
"https://example.com/ipfs/bafybeie4vcsw3ew6io6paaltdvwkpcoeyn6uoewvu7op7fhhztpnivqnyy/1.jpg",
|
||||
);
|
||||
});
|
||||
|
||||
it("Should resolve scheme with gateway URL", async () => {
|
||||
const uri = `ipfs://example`;
|
||||
const uri = `ipfs://QmYtBTkEnTGrzkns2L8R4rL3keowVg3nGcBhPbwrbAWTRP`;
|
||||
const url = storage.resolveScheme(uri);
|
||||
expect(url).to.equal(`${DEFAULT_GATEWAY_URLS["ipfs://"][0]}example`);
|
||||
expect(url).to.equal(
|
||||
getGatewayUrlForCid(
|
||||
DEFAULT_GATEWAY_URLS["ipfs://"][0],
|
||||
"bafybeie4vcsw3ew6io6paaltdvwkpcoeyn6uoewvu7op7fhhztpnivqnyy",
|
||||
),
|
||||
);
|
||||
});
|
||||
|
||||
it("Should upload buffer with file number", async () => {
|
||||
@@ -57,6 +82,37 @@ describe("IPFS", async () => {
|
||||
expect(data.properties.length).to.equal(1);
|
||||
});
|
||||
|
||||
it("Should retry download if gateways fail", async () => {
|
||||
const storageWithBadGateways = new ThirdwebStorage({
|
||||
gatewayUrls: {
|
||||
"ipfs://": [
|
||||
"http://thisshouldneverwork/",
|
||||
"http://thisshouldalsoneverwork/",
|
||||
...DEFAULT_GATEWAY_URLS["ipfs://"],
|
||||
],
|
||||
},
|
||||
});
|
||||
|
||||
const uri = await storageWithBadGateways.upload(
|
||||
{
|
||||
name: "Goku",
|
||||
description: "The strongest human in the world",
|
||||
properties: [
|
||||
{
|
||||
name: "Strength",
|
||||
value: "100",
|
||||
},
|
||||
],
|
||||
},
|
||||
{
|
||||
alwaysUpload: true,
|
||||
},
|
||||
);
|
||||
|
||||
const data = await storageWithBadGateways.download(uri);
|
||||
expect(data.status).to.equal(200);
|
||||
});
|
||||
|
||||
it("Should batch upload strings with names", async () => {
|
||||
const uris = await storage.uploadBatch(
|
||||
[
|
||||
@@ -254,7 +310,10 @@ describe("IPFS", async () => {
|
||||
it("Should replace gateway URLs with schemes on upload", async () => {
|
||||
const uri = await storage.upload(
|
||||
{
|
||||
image: `${DEFAULT_GATEWAY_URLS["ipfs://"][0]}QmbaNzUcv7KPgdwq9u2qegcptktpUK6CdRZF72eSjSa6iJ/0`,
|
||||
image: getGatewayUrlForCid(
|
||||
DEFAULT_GATEWAY_URLS["ipfs://"][0],
|
||||
`QmbaNzUcv7KPgdwq9u2qegcptktpUK6CdRZF72eSjSa6iJ/0`,
|
||||
),
|
||||
},
|
||||
{
|
||||
alwaysUpload: true,
|
||||
@@ -265,7 +324,7 @@ describe("IPFS", async () => {
|
||||
const json = await res.json();
|
||||
|
||||
expect(json.image).to.equal(
|
||||
"ipfs://QmbaNzUcv7KPgdwq9u2qegcptktpUK6CdRZF72eSjSa6iJ/0",
|
||||
"ipfs://bafybeigevrfayusjh2nvk7fqlydj6m3wcagluen5mizxewr6zfx2qk2sy4/0",
|
||||
);
|
||||
});
|
||||
|
||||
@@ -282,7 +341,10 @@ describe("IPFS", async () => {
|
||||
const json = await storage.downloadJSON(uri);
|
||||
|
||||
expect(json.image).to.equal(
|
||||
`${DEFAULT_GATEWAY_URLS["ipfs://"][0]}QmbaNzUcv7KPgdwq9u2qegcptktpUK6CdRZF72eSjSa6iJ/0`,
|
||||
getGatewayUrlForCid(
|
||||
DEFAULT_GATEWAY_URLS["ipfs://"][0],
|
||||
`QmbaNzUcv7KPgdwq9u2qegcptktpUK6CdRZF72eSjSa6iJ/0`,
|
||||
),
|
||||
);
|
||||
});
|
||||
|
||||
@@ -306,10 +368,16 @@ describe("IPFS", async () => {
|
||||
const json = await res.json();
|
||||
|
||||
expect(json.image).to.equal(
|
||||
`${DEFAULT_GATEWAY_URLS["ipfs://"][0]}QmcCJC4T37rykDjR6oorM8hpB9GQWHKWbAi2YR1uTabUZu/0`,
|
||||
getGatewayUrlForCid(
|
||||
DEFAULT_GATEWAY_URLS["ipfs://"][0],
|
||||
`QmcCJC4T37rykDjR6oorM8hpB9GQWHKWbAi2YR1uTabUZu/0`,
|
||||
),
|
||||
);
|
||||
expect(json.animation_url).to.equal(
|
||||
`${DEFAULT_GATEWAY_URLS["ipfs://"][0]}QmbaNzUcv7KPgdwq9u2qegcptktpUK6CdRZF72eSjSa6iJ/0`,
|
||||
getGatewayUrlForCid(
|
||||
DEFAULT_GATEWAY_URLS["ipfs://"][0],
|
||||
`QmbaNzUcv7KPgdwq9u2qegcptktpUK6CdRZF72eSjSa6iJ/0`,
|
||||
),
|
||||
);
|
||||
});
|
||||
|
||||
@@ -317,7 +385,10 @@ describe("IPFS", async () => {
|
||||
const uri = await storage.upload(
|
||||
{
|
||||
// Gateway URLs should first be converted back to ipfs:// and then all ipfs:// should convert to first gateway URL
|
||||
image: `${DEFAULT_GATEWAY_URLS["ipfs://"][1]}QmbaNzUcv7KPgdwq9u2qegcptktpUK6CdRZF72eSjSa6iJ/0`,
|
||||
image: getGatewayUrlForCid(
|
||||
DEFAULT_GATEWAY_URLS["ipfs://"][0],
|
||||
`QmbaNzUcv7KPgdwq9u2qegcptktpUK6CdRZF72eSjSa6iJ/0`,
|
||||
),
|
||||
animation_url:
|
||||
"ipfs://QmbaNzUcv7KPgdwq9u2qegcptktpUK6CdRZF72eSjSa6iJ/0",
|
||||
},
|
||||
@@ -331,10 +402,16 @@ describe("IPFS", async () => {
|
||||
const json = await res.json();
|
||||
|
||||
expect(json.image).to.equal(
|
||||
`${DEFAULT_GATEWAY_URLS["ipfs://"][0]}QmbaNzUcv7KPgdwq9u2qegcptktpUK6CdRZF72eSjSa6iJ/0`,
|
||||
getGatewayUrlForCid(
|
||||
DEFAULT_GATEWAY_URLS["ipfs://"][0],
|
||||
`QmbaNzUcv7KPgdwq9u2qegcptktpUK6CdRZF72eSjSa6iJ/0`,
|
||||
),
|
||||
);
|
||||
expect(json.animation_url).to.equal(
|
||||
`${DEFAULT_GATEWAY_URLS["ipfs://"][0]}QmbaNzUcv7KPgdwq9u2qegcptktpUK6CdRZF72eSjSa6iJ/0`,
|
||||
getGatewayUrlForCid(
|
||||
DEFAULT_GATEWAY_URLS["ipfs://"][0],
|
||||
`QmbaNzUcv7KPgdwq9u2qegcptktpUK6CdRZF72eSjSa6iJ/0`,
|
||||
),
|
||||
);
|
||||
});
|
||||
|
||||
@@ -350,8 +427,12 @@ describe("IPFS", async () => {
|
||||
},
|
||||
);
|
||||
|
||||
expect(uri.startsWith(`${DEFAULT_GATEWAY_URLS["ipfs://"][0]}`)).to.equal(
|
||||
true,
|
||||
expect(uri).to.equal(
|
||||
getGatewayUrlForCid(
|
||||
DEFAULT_GATEWAY_URLS["ipfs://"][0],
|
||||
// CID changes based on file contents (prod gateway vs staging gateway since they get written)
|
||||
`bafybeicctk76y3z3hapwjp73msfpeolfklkgpfw2wnrcyrudk3ypmibdva/0`,
|
||||
),
|
||||
);
|
||||
});
|
||||
|
||||
@@ -365,7 +446,10 @@ describe("IPFS", async () => {
|
||||
);
|
||||
|
||||
expect(uri).to.equal(
|
||||
`${DEFAULT_GATEWAY_URLS["ipfs://"][0]}QmcCJC4T37rykDjR6oorM8hpB9GQWHKWbAi2YR1uTabUZu/0`,
|
||||
getGatewayUrlForCid(
|
||||
DEFAULT_GATEWAY_URLS["ipfs://"][0],
|
||||
`QmcCJC4T37rykDjR6oorM8hpB9GQWHKWbAi2YR1uTabUZu/0`,
|
||||
),
|
||||
);
|
||||
});
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
{
|
||||
"extends": "@thirdweb-dev/tsconfig/base.json",
|
||||
"include": ["."],
|
||||
"exclude": ["dist", "build", "node_modules"]
|
||||
"exclude": ["dist", "build", "node_modules"],
|
||||
}
|
||||
|
||||
@@ -1,5 +1,19 @@
|
||||
# @thirdweb-dev/unity-js-bridge
|
||||
|
||||
## 0.2.45
|
||||
|
||||
### 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/auth@3.2.8
|
||||
- @thirdweb-dev/pay@0.1.2
|
||||
- @thirdweb-dev/sdk@3.10.28
|
||||
|
||||
## 0.2.44
|
||||
|
||||
### Patch Changes
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@thirdweb-dev/unity-js-bridge",
|
||||
"version": "0.2.44",
|
||||
"version": "0.2.45",
|
||||
"main": "dist/thirdweb-unity-bridge.js",
|
||||
"repository": "https://github.com/thirdweb-dev/js/tree/main/packages/unity-js-bridge",
|
||||
"license": "Apache-2.0",
|
||||
@@ -13,19 +13,19 @@
|
||||
],
|
||||
"dependencies": {
|
||||
"@thirdweb-dev/auth": "workspace:*",
|
||||
"@thirdweb-dev/chains": "workspace:*",
|
||||
"@thirdweb-dev/pay": "workspace:*",
|
||||
"@thirdweb-dev/sdk": "workspace:*",
|
||||
"@thirdweb-dev/storage": "workspace:*",
|
||||
"@thirdweb-dev/wallets": "workspace:*",
|
||||
"@thirdweb-dev/chains": "workspace:*",
|
||||
"ethers": "^5.7.2"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@thirdweb-dev/tsconfig": "workspace:*",
|
||||
"esbuild": "0.15.17",
|
||||
"node-stdlib-browser": "^1.2.0",
|
||||
"typescript": "^4.7.4",
|
||||
"eslint-config-thirdweb": "workspace:*",
|
||||
"@thirdweb-dev/tsconfig": "workspace:*"
|
||||
"node-stdlib-browser": "^1.2.0",
|
||||
"typescript": "^5.1.6"
|
||||
},
|
||||
"sideEffects": false,
|
||||
"scripts": {
|
||||
|
||||
@@ -1,5 +1,15 @@
|
||||
# @thirdweb-dev/wallets
|
||||
|
||||
## 1.0.4
|
||||
|
||||
### 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), [`a3bb17cb`](https://github.com/thirdweb-dev/js/commit/a3bb17cb33f033846fb3b4c8a0a4809ba76cab96)]:
|
||||
- @thirdweb-dev/chains@0.1.27
|
||||
- @thirdweb-dev/sdk@3.10.28
|
||||
|
||||
## 1.0.3
|
||||
|
||||
### Patch Changes
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@thirdweb-dev/wallets",
|
||||
"version": "1.0.3",
|
||||
"version": "1.0.4",
|
||||
"main": "dist/thirdweb-dev-wallets.cjs.js",
|
||||
"module": "dist/thirdweb-dev-wallets.esm.js",
|
||||
"types": "dist/thirdweb-dev-wallets.cjs.d.ts",
|
||||
@@ -321,28 +321,28 @@
|
||||
"@account-abstraction/contracts": "^0.5.0",
|
||||
"@account-abstraction/sdk": "^0.5.0",
|
||||
"@account-abstraction/utils": "^0.5.0",
|
||||
"@coinbase/wallet-sdk": "^3.6.3",
|
||||
"@magic-ext/connect": "^6.7.0",
|
||||
"@coinbase/wallet-sdk": "^3.7.1",
|
||||
"@magic-ext/connect": "^6.7.2",
|
||||
"@magic-ext/oauth": "^7.6.2",
|
||||
"@magic-sdk/provider": "^13.6.2",
|
||||
"@paperxyz/embedded-wallet-service-sdk": "^1.1.0",
|
||||
"@safe-global/safe-core-sdk": "^3.3.2",
|
||||
"@safe-global/safe-ethers-adapters": "^0.1.0-alpha.16",
|
||||
"@safe-global/safe-ethers-lib": "^1.9.2",
|
||||
"@safe-global/safe-core-sdk": "^3.3.3",
|
||||
"@safe-global/safe-ethers-adapters": "0.1.0-alpha.17",
|
||||
"@safe-global/safe-ethers-lib": "^1.9.3",
|
||||
"@thirdweb-dev/chains": "workspace:*",
|
||||
"@thirdweb-dev/sdk": "workspace:*",
|
||||
"@walletconnect/core": "^2.8.4",
|
||||
"@walletconnect/ethereum-provider": "^2.8.4",
|
||||
"@walletconnect/jsonrpc-utils": "^1.0.3",
|
||||
"@walletconnect/modal": "^2.5.4",
|
||||
"@walletconnect/types": "^2.8.4",
|
||||
"@walletconnect/utils": "^2.8.4",
|
||||
"@walletconnect/web3wallet": "^1.8.1",
|
||||
"@walletconnect/core": "^2.8.6",
|
||||
"@walletconnect/ethereum-provider": "^2.8.6",
|
||||
"@walletconnect/jsonrpc-utils": "^1.0.8",
|
||||
"@walletconnect/modal": "^2.5.9",
|
||||
"@walletconnect/types": "^2.8.6",
|
||||
"@walletconnect/utils": "^2.8.6",
|
||||
"@walletconnect/web3wallet": "^1.8.5",
|
||||
"buffer": "^6.0.3",
|
||||
"cross-fetch": "^3.1.5",
|
||||
"cross-fetch": "^3.1.6",
|
||||
"crypto-js": "^4.1.1",
|
||||
"eth-provider": "^0.13.6",
|
||||
"eventemitter3": "^5.0.0",
|
||||
"eventemitter3": "^5.0.1",
|
||||
"magic-sdk": "^13.6.2",
|
||||
"web3-core": "1.5.2"
|
||||
},
|
||||
@@ -379,9 +379,9 @@
|
||||
}
|
||||
},
|
||||
"devDependencies": {
|
||||
"@aws-sdk/client-secrets-manager": "^3.256.0",
|
||||
"@aws-sdk/client-secrets-manager": "^3.363.0",
|
||||
"@noble/ed25519": "^1.7.1",
|
||||
"@preconstruct/cli": "^2.2.1",
|
||||
"@preconstruct/cli": "^2.7.0",
|
||||
"@solana/web3.js": "^1.62.0",
|
||||
"@thirdweb-dev/tsconfig": "workspace:*",
|
||||
"@types/crypto-js": "^4.1.1",
|
||||
@@ -393,7 +393,7 @@
|
||||
"ethers": "^5.7.2",
|
||||
"ethers-aws-kms-signer": "^1.3.2",
|
||||
"tweetnacl": "^1.0.3",
|
||||
"typescript": "^4.7.4"
|
||||
"typescript": "^5.1.6"
|
||||
},
|
||||
"scripts": {
|
||||
"format": "prettier --write 'src/**/*'",
|
||||
|
||||
@@ -1,18 +1,14 @@
|
||||
import { AsyncStorage } from "./AsyncStorage";
|
||||
import fsModule from "fs";
|
||||
import path from "path";
|
||||
|
||||
const fs = fsModule.promises;
|
||||
|
||||
export class AsyncJsonFileStorage implements AsyncStorage {
|
||||
filePath: string;
|
||||
|
||||
constructor(filePath: string) {
|
||||
this.filePath = path.resolve(filePath);
|
||||
this.filePath = require("node:path").resolve(filePath);
|
||||
}
|
||||
|
||||
async getItem(key: string): Promise<string | null> {
|
||||
const content = await fs.readFile(this.filePath, {
|
||||
const content = await require("node:fs/promises").readFile(this.filePath, {
|
||||
encoding: "utf-8",
|
||||
});
|
||||
|
||||
@@ -28,27 +24,39 @@ export class AsyncJsonFileStorage implements AsyncStorage {
|
||||
// if the file doesn't exist, create it
|
||||
|
||||
try {
|
||||
const content = await fs.readFile(this.filePath, {
|
||||
encoding: "utf-8",
|
||||
});
|
||||
const content = await require("node:fs/promises").readFile(
|
||||
this.filePath,
|
||||
{
|
||||
encoding: "utf-8",
|
||||
},
|
||||
);
|
||||
|
||||
const data = content ? JSON.parse(content) : {};
|
||||
data[key] = value;
|
||||
|
||||
await fs.writeFile(this.filePath, JSON.stringify(data));
|
||||
await require("node:fs/promises").writeFile(
|
||||
this.filePath,
|
||||
JSON.stringify(data),
|
||||
);
|
||||
} catch {
|
||||
await fs.writeFile(this.filePath, JSON.stringify({ [key]: value }));
|
||||
await require("node:fs/promises").writeFile(
|
||||
this.filePath,
|
||||
JSON.stringify({ [key]: value }),
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
async removeItem(key: string): Promise<void> {
|
||||
const content = await fs.readFile(this.filePath, {
|
||||
const content = await require("node:fs/promises").readFile(this.filePath, {
|
||||
encoding: "utf-8",
|
||||
});
|
||||
|
||||
const data = JSON.parse(content);
|
||||
delete data[key];
|
||||
|
||||
await fs.writeFile(this.filePath, JSON.stringify(data));
|
||||
await require("node:fs/promises").writeFile(
|
||||
this.filePath,
|
||||
JSON.stringify(data),
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,7 +1,9 @@
|
||||
import type { Ethereum } from "../connectors/injected/types";
|
||||
|
||||
export function assertWindowEthereum(
|
||||
w: Window,
|
||||
): w is Window & { ethereum: Ethereum } {
|
||||
return typeof w !== "undefined" && "ethereum" in w;
|
||||
interface WindowWithEthereum extends Window {
|
||||
ethereum: Ethereum;
|
||||
}
|
||||
|
||||
export function assertWindowEthereum(w: Window): w is WindowWithEthereum {
|
||||
return typeof w !== "undefined" && !!w && "ethereum" in w;
|
||||
}
|
||||
|
||||
Generated
+3972
-3775
File diff suppressed because it is too large
Load Diff
@@ -11,15 +11,15 @@
|
||||
"@thirdweb-dev/react": "workspace:*",
|
||||
"@thirdweb-dev/sdk": "workspace:*",
|
||||
"ethers": "^5.7.2",
|
||||
"next": "^13.2.4",
|
||||
"next": "^13.4.7",
|
||||
"react": "^18.2.0",
|
||||
"react-dom": "^18.2.0"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@playwright/test": "1.31.2",
|
||||
"eslint": "^8.42.0",
|
||||
"eslint-config-next": "^13.2.4",
|
||||
"typescript": "^4.7.4"
|
||||
"eslint": "^8.43.0",
|
||||
"eslint-config-next": "^13.4.7",
|
||||
"typescript": "^5.1.6"
|
||||
},
|
||||
"repository": "https://github.com/thirdweb-dev/js/tree/main/test/e2e/next-12"
|
||||
}
|
||||
|
||||
@@ -18,7 +18,7 @@
|
||||
"@playwright/test": "1.31.2",
|
||||
"@vitejs/plugin-react": "^2",
|
||||
"serve": "^14.0.1",
|
||||
"vite": "^3",
|
||||
"vite": "^3.2.7",
|
||||
"vite-plugin-node-polyfills": "^0.7.0"
|
||||
},
|
||||
"repository": "https://github.com/thirdweb-dev/js/tree/main/test/e2e/vite-3"
|
||||
|
||||
Reference in New Issue
Block a user