Compare commits
31
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
4f79053ec3 | ||
|
|
2a91113a76 | ||
|
|
b103872daf | ||
|
|
7f54012ec6 | ||
|
|
df36e27f32 | ||
|
|
8c0dc9c880 | ||
|
|
074a3eb01c | ||
|
|
a5d0be939a | ||
|
|
5ec0f064d2 | ||
|
|
becbb63736 | ||
|
|
5ee700e804 | ||
|
|
67b145b94d | ||
|
|
c0a6d2f182 | ||
|
|
fd9816556f | ||
|
|
2a3cd62dc9 | ||
|
|
c9bf4f05c1 | ||
|
|
9f5adc5c5c | ||
|
|
d01e6396d1 | ||
|
|
2283d21027 | ||
|
|
ab36d84f1c | ||
|
|
a9f2ff73c9 | ||
|
|
9a7b2098ee | ||
|
|
2b96f71e19 | ||
|
|
3b6b0746b3 | ||
|
|
b0ec1d8083 | ||
|
|
0af916e42e | ||
|
|
fbde927a0c | ||
|
|
952009cd73 | ||
|
|
580e77b170 | ||
|
|
d275493c59 | ||
|
|
256ee0d5ec |
@@ -1,5 +1,42 @@
|
||||
# @thirdweb-dev/auth
|
||||
|
||||
## 3.2.26
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- Updated dependencies []:
|
||||
- @thirdweb-dev/wallets@1.1.9
|
||||
|
||||
## 3.2.25
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- Updated dependencies [[`a9f2ff73`](https://github.com/thirdweb-dev/js/commit/a9f2ff73c9f83f05c3e2d3c53b23b2843e8a2576), [`fd981655`](https://github.com/thirdweb-dev/js/commit/fd9816556fe595b0c764e34dbcf15b0ad1677edb)]:
|
||||
- @thirdweb-dev/wallets@1.1.8
|
||||
|
||||
## 3.2.24
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- Updated dependencies [[`3b6b0746`](https://github.com/thirdweb-dev/js/commit/3b6b0746b3fc792f4c5092814a7abfabcbc9801e), [`b0ec1d80`](https://github.com/thirdweb-dev/js/commit/b0ec1d80839efccad11b50afbf2216c2c132cf7e)]:
|
||||
- @thirdweb-dev/wallets@1.1.7
|
||||
|
||||
## 3.2.23
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- Updated dependencies [[`fbde927a`](https://github.com/thirdweb-dev/js/commit/fbde927a0cb36a6269e045d8e577536f23164ef7)]:
|
||||
- @thirdweb-dev/wallets@1.1.6
|
||||
|
||||
## 3.2.22
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- [#1415](https://github.com/thirdweb-dev/js/pull/1415) [`256ee0d5`](https://github.com/thirdweb-dev/js/commit/256ee0d5ec9c8598aa79cd4cb1fd839c6cc7d390) Thanks [@joaquim-verges](https://github.com/joaquim-verges)! - Downgrade preconstruct to 2.7.0
|
||||
|
||||
- Updated dependencies [[`256ee0d5`](https://github.com/thirdweb-dev/js/commit/256ee0d5ec9c8598aa79cd4cb1fd839c6cc7d390)]:
|
||||
- @thirdweb-dev/wallets@1.1.5
|
||||
|
||||
## 3.2.21
|
||||
|
||||
### Patch Changes
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@thirdweb-dev/auth",
|
||||
"version": "3.2.21",
|
||||
"version": "3.2.26",
|
||||
"main": "dist/thirdweb-dev-auth.cjs.js",
|
||||
"module": "dist/thirdweb-dev-auth.esm.js",
|
||||
"browser": {
|
||||
@@ -86,7 +86,7 @@
|
||||
"@microsoft/api-documenter": "^7.22.30",
|
||||
"@microsoft/api-extractor": "^7.36.3",
|
||||
"@microsoft/tsdoc": "^0.14.1",
|
||||
"@preconstruct/cli": "^2.8.1",
|
||||
"@preconstruct/cli": "2.7.0",
|
||||
"@solana/web3.js": "^1.62.0",
|
||||
"@swc-node/register": "^1.6.6",
|
||||
"@swc/core": "^1.3.71",
|
||||
|
||||
@@ -1,5 +1,19 @@
|
||||
# @thirdweb-dev/chains
|
||||
|
||||
## 0.1.41
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- [#1436](https://github.com/thirdweb-dev/js/pull/1436) [`fd981655`](https://github.com/thirdweb-dev/js/commit/fd9816556fe595b0c764e34dbcf15b0ad1677edb) Thanks [@joaquim-verges](https://github.com/joaquim-verges)! - Updated chains
|
||||
|
||||
- [#1432](https://github.com/thirdweb-dev/js/pull/1432) [`9f5adc5c`](https://github.com/thirdweb-dev/js/commit/9f5adc5c5c2782ffb878759df481e5fb1e1740e5) Thanks [@jnsdls](https://github.com/jnsdls)! - update chains
|
||||
|
||||
## 0.1.40
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- [#1415](https://github.com/thirdweb-dev/js/pull/1415) [`256ee0d5`](https://github.com/thirdweb-dev/js/commit/256ee0d5ec9c8598aa79cd4cb1fd839c6cc7d390) Thanks [@joaquim-verges](https://github.com/joaquim-verges)! - Downgrade preconstruct to 2.7.0
|
||||
|
||||
## 0.1.39
|
||||
|
||||
### Patch Changes
|
||||
|
||||
@@ -0,0 +1,35 @@
|
||||
import type { Chain } from "../src/types";
|
||||
export default {
|
||||
"name": "Mintara Mainnet",
|
||||
"title": "Mintara Mainnet",
|
||||
"chain": "Mintara",
|
||||
"icon": {
|
||||
"url": "ipfs://bafybeie7jzlzlpz7c3a3oh4x5joej23dj2qf3cexmchjyc72hv3fblcaja",
|
||||
"width": 256,
|
||||
"height": 256,
|
||||
"format": "png"
|
||||
},
|
||||
"rpc": [
|
||||
"https://mintara.rpc.thirdweb.com/${THIRDWEB_API_KEY}",
|
||||
"https://subnets.avax.network/mintara/mainnet/rpc"
|
||||
],
|
||||
"faucets": [],
|
||||
"nativeCurrency": {
|
||||
"name": "MINTARA",
|
||||
"symbol": "MNTR",
|
||||
"decimals": 18
|
||||
},
|
||||
"infoURL": "https://playthink.co.jp",
|
||||
"shortName": "mintara",
|
||||
"chainId": 1080,
|
||||
"networkId": 1080,
|
||||
"explorers": [
|
||||
{
|
||||
"name": "explorer",
|
||||
"url": "https://subnets.avax.network/mintara",
|
||||
"standard": "EIP3091"
|
||||
}
|
||||
],
|
||||
"testnet": false,
|
||||
"slug": "mintara"
|
||||
} as const satisfies Chain;
|
||||
@@ -0,0 +1,40 @@
|
||||
import type { Chain } from "../src/types";
|
||||
export default {
|
||||
"name": "Kalar Chain",
|
||||
"chain": "KLC",
|
||||
"icon": {
|
||||
"url": "ipfs://bafkreihfoy2kgf2rebaoicso7z5h7ju46z6gtr64mskkths3qbfkrtnkjm",
|
||||
"width": 190,
|
||||
"height": 170,
|
||||
"format": "png"
|
||||
},
|
||||
"rpc": [
|
||||
"https://kalar-chain.rpc.thirdweb.com/${THIRDWEB_API_KEY}",
|
||||
"https://rpc-api.kalarchain.tech"
|
||||
],
|
||||
"faucets": [],
|
||||
"nativeCurrency": {
|
||||
"name": "Kalar",
|
||||
"symbol": "KLC",
|
||||
"decimals": 18
|
||||
},
|
||||
"infoURL": "https://kalarchain.tech",
|
||||
"shortName": "KLC",
|
||||
"chainId": 1379,
|
||||
"networkId": 1379,
|
||||
"explorers": [
|
||||
{
|
||||
"name": "kalarscan",
|
||||
"url": "https://explorer.kalarchain.tech",
|
||||
"icon": {
|
||||
"url": "ipfs://bafkreidbzzv3lrwlzquhlpl4jcmr54sifhi5ufoek6olb5kjh3h3kvktdq",
|
||||
"width": 411,
|
||||
"height": 159,
|
||||
"format": "png"
|
||||
},
|
||||
"standard": "EIP3091"
|
||||
}
|
||||
],
|
||||
"testnet": false,
|
||||
"slug": "kalar-chain"
|
||||
} as const satisfies Chain;
|
||||
@@ -5,17 +5,23 @@ export default {
|
||||
"rpc": [
|
||||
"https://harmony-shard-0.rpc.thirdweb.com/${THIRDWEB_API_KEY}",
|
||||
"https://api.harmony.one",
|
||||
"https://api.s0.t.hmny.io"
|
||||
],
|
||||
"faucets": [
|
||||
"https://free-online-app.com/faucet-for-eth-evm-chains/"
|
||||
"https://a.api.s0.t.hmny.io",
|
||||
"https://api.s0.t.hmny.io",
|
||||
"https://rpc.ankr.com/harmony",
|
||||
"https://harmony.api.onfinality.io/public",
|
||||
"https://1rpc.io/one"
|
||||
],
|
||||
"faucets": [],
|
||||
"nativeCurrency": {
|
||||
"name": "ONE",
|
||||
"symbol": "ONE",
|
||||
"decimals": 18
|
||||
},
|
||||
"infoURL": "https://www.harmony.one/",
|
||||
"slip44": 1023,
|
||||
"ens": {
|
||||
"registry": "0x4cd2563118e57b19179d8dc033f2b0c5b5d69ff5"
|
||||
},
|
||||
"shortName": "hmy-s0",
|
||||
"chainId": 1666600000,
|
||||
"networkId": 1666600000,
|
||||
|
||||
@@ -13,9 +13,17 @@ export default {
|
||||
"decimals": 18
|
||||
},
|
||||
"infoURL": "https://www.harmony.one/",
|
||||
"slip44": 1023,
|
||||
"shortName": "hmy-s1",
|
||||
"chainId": 1666600001,
|
||||
"networkId": 1666600001,
|
||||
"explorers": [
|
||||
{
|
||||
"name": "Harmony Block Explorer",
|
||||
"url": "https://explorer.harmony.one/blocks/shard/1",
|
||||
"standard": "none"
|
||||
}
|
||||
],
|
||||
"testnet": false,
|
||||
"slug": "harmony-shard-1"
|
||||
} as const satisfies Chain;
|
||||
@@ -13,9 +13,17 @@ export default {
|
||||
"decimals": 18
|
||||
},
|
||||
"infoURL": "https://www.harmony.one/",
|
||||
"slip44": 1023,
|
||||
"shortName": "hmy-s2",
|
||||
"chainId": 1666600002,
|
||||
"networkId": 1666600002,
|
||||
"explorers": [
|
||||
{
|
||||
"name": "Harmony Block Explorer",
|
||||
"url": "https://explorer.harmony.one/blocks/shard/2",
|
||||
"standard": "none"
|
||||
}
|
||||
],
|
||||
"testnet": false,
|
||||
"slug": "harmony-shard-2"
|
||||
} as const satisfies Chain;
|
||||
@@ -13,9 +13,17 @@ export default {
|
||||
"decimals": 18
|
||||
},
|
||||
"infoURL": "https://www.harmony.one/",
|
||||
"slip44": 1023,
|
||||
"shortName": "hmy-s3",
|
||||
"chainId": 1666600003,
|
||||
"networkId": 1666600003,
|
||||
"explorers": [
|
||||
{
|
||||
"name": "Harmony Block Explorer",
|
||||
"url": "https://explorer.harmony.one/blocks/shard/3",
|
||||
"standard": "none"
|
||||
}
|
||||
],
|
||||
"testnet": false,
|
||||
"slug": "harmony-shard-3"
|
||||
} as const satisfies Chain;
|
||||
@@ -21,7 +21,7 @@ export default {
|
||||
"explorers": [
|
||||
{
|
||||
"name": "Harmony Testnet Block Explorer",
|
||||
"url": "https://explorer.pops.one",
|
||||
"url": "https://explorer.testnet.harmony.one",
|
||||
"standard": "EIP3091"
|
||||
}
|
||||
],
|
||||
|
||||
@@ -6,7 +6,9 @@ export default {
|
||||
"https://harmony-testnet-shard-1.rpc.thirdweb.com/${THIRDWEB_API_KEY}",
|
||||
"https://api.s1.b.hmny.io"
|
||||
],
|
||||
"faucets": [],
|
||||
"faucets": [
|
||||
"https://faucet.pops.one"
|
||||
],
|
||||
"nativeCurrency": {
|
||||
"name": "ONE",
|
||||
"symbol": "ONE",
|
||||
@@ -16,6 +18,13 @@ export default {
|
||||
"shortName": "hmy-b-s1",
|
||||
"chainId": 1666700001,
|
||||
"networkId": 1666700001,
|
||||
"explorers": [
|
||||
{
|
||||
"name": "Harmony Block Explorer",
|
||||
"url": "https://explorer.testnet.harmony.one",
|
||||
"standard": "none"
|
||||
}
|
||||
],
|
||||
"testnet": true,
|
||||
"slug": "harmony-testnet-shard-1"
|
||||
} as const satisfies Chain;
|
||||
@@ -1,21 +0,0 @@
|
||||
import type { Chain } from "../src/types";
|
||||
export default {
|
||||
"name": "Harmony Testnet Shard 2",
|
||||
"chain": "Harmony",
|
||||
"rpc": [
|
||||
"https://harmony-testnet-shard-2.rpc.thirdweb.com/${THIRDWEB_API_KEY}",
|
||||
"https://api.s2.b.hmny.io"
|
||||
],
|
||||
"faucets": [],
|
||||
"nativeCurrency": {
|
||||
"name": "ONE",
|
||||
"symbol": "ONE",
|
||||
"decimals": 18
|
||||
},
|
||||
"infoURL": "https://www.harmony.one/",
|
||||
"shortName": "hmy-b-s2",
|
||||
"chainId": 1666700002,
|
||||
"networkId": 1666700002,
|
||||
"testnet": true,
|
||||
"slug": "harmony-testnet-shard-2"
|
||||
} as const satisfies Chain;
|
||||
@@ -1,21 +0,0 @@
|
||||
import type { Chain } from "../src/types";
|
||||
export default {
|
||||
"name": "Harmony Testnet Shard 3",
|
||||
"chain": "Harmony",
|
||||
"rpc": [
|
||||
"https://harmony-testnet-shard-3.rpc.thirdweb.com/${THIRDWEB_API_KEY}",
|
||||
"https://api.s3.b.hmny.io"
|
||||
],
|
||||
"faucets": [],
|
||||
"nativeCurrency": {
|
||||
"name": "ONE",
|
||||
"symbol": "ONE",
|
||||
"decimals": 18
|
||||
},
|
||||
"infoURL": "https://www.harmony.one/",
|
||||
"shortName": "hmy-b-s3",
|
||||
"chainId": 1666700003,
|
||||
"networkId": 1666700003,
|
||||
"testnet": true,
|
||||
"slug": "harmony-testnet-shard-3"
|
||||
} as const satisfies Chain;
|
||||
@@ -4,11 +4,9 @@ export default {
|
||||
"chain": "Harmony",
|
||||
"rpc": [
|
||||
"https://harmony-devnet-shard-0.rpc.thirdweb.com/${THIRDWEB_API_KEY}",
|
||||
"https://api.s1.ps.hmny.io"
|
||||
],
|
||||
"faucets": [
|
||||
"http://dev.faucet.easynode.one/"
|
||||
"https://api.s0.ps.hmny.io"
|
||||
],
|
||||
"faucets": [],
|
||||
"nativeCurrency": {
|
||||
"name": "ONE",
|
||||
"symbol": "ONE",
|
||||
@@ -18,13 +16,7 @@ export default {
|
||||
"shortName": "hmy-ps-s0",
|
||||
"chainId": 1666900000,
|
||||
"networkId": 1666900000,
|
||||
"explorers": [
|
||||
{
|
||||
"name": "Harmony Block Explorer",
|
||||
"url": "https://explorer.ps.hmny.io",
|
||||
"standard": "EIP3091"
|
||||
}
|
||||
],
|
||||
"explorers": [],
|
||||
"testnet": false,
|
||||
"slug": "harmony-devnet-shard-0"
|
||||
} as const satisfies Chain;
|
||||
@@ -0,0 +1,22 @@
|
||||
import type { Chain } from "../src/types";
|
||||
export default {
|
||||
"name": "Harmony Devnet Shard 1",
|
||||
"chain": "Harmony",
|
||||
"rpc": [
|
||||
"https://harmony-devnet-shard-1.rpc.thirdweb.com/${THIRDWEB_API_KEY}",
|
||||
"https://api.s1.ps.hmny.io"
|
||||
],
|
||||
"faucets": [],
|
||||
"nativeCurrency": {
|
||||
"name": "ONE",
|
||||
"symbol": "ONE",
|
||||
"decimals": 18
|
||||
},
|
||||
"infoURL": "https://www.harmony.one/",
|
||||
"shortName": "hmy-ps-s1",
|
||||
"chainId": 1666900001,
|
||||
"networkId": 1666900001,
|
||||
"explorers": [],
|
||||
"testnet": false,
|
||||
"slug": "harmony-devnet-shard-1"
|
||||
} as const satisfies Chain;
|
||||
@@ -0,0 +1,34 @@
|
||||
import type { Chain } from "../src/types";
|
||||
export default {
|
||||
"name": "WhiteBIT Network",
|
||||
"chain": "WBT",
|
||||
"rpc": [
|
||||
"https://whitebit-network.rpc.thirdweb.com/${THIRDWEB_API_KEY}",
|
||||
"https://rpc.whitebit.network"
|
||||
],
|
||||
"faucets": [],
|
||||
"nativeCurrency": {
|
||||
"name": "WhiteBIT Coin",
|
||||
"symbol": "WBT",
|
||||
"decimals": 18
|
||||
},
|
||||
"infoURL": "https://whitebit.network",
|
||||
"shortName": "wbt",
|
||||
"chainId": 1875,
|
||||
"networkId": 1875,
|
||||
"icon": {
|
||||
"url": "ipfs://Qmbi6cqsQyDjkQSoxbNTTUy8WGyVEFqCtATX2aF4KLmCcZ",
|
||||
"width": 512,
|
||||
"height": 512,
|
||||
"format": "png"
|
||||
},
|
||||
"explorers": [
|
||||
{
|
||||
"name": "wb-explorer",
|
||||
"url": "https://explorer.whitebit.network",
|
||||
"standard": "EIP3091"
|
||||
}
|
||||
],
|
||||
"testnet": false,
|
||||
"slug": "whitebit-network"
|
||||
} as const satisfies Chain;
|
||||
@@ -1,9 +1,9 @@
|
||||
import type { Chain } from "../src/types";
|
||||
export default {
|
||||
"name": "Cronos Mainnet Beta",
|
||||
"name": "Cronos Mainnet",
|
||||
"chain": "CRO",
|
||||
"rpc": [
|
||||
"https://cronos-beta.rpc.thirdweb.com/${THIRDWEB_API_KEY}",
|
||||
"https://cronos.rpc.thirdweb.com/${THIRDWEB_API_KEY}",
|
||||
"https://evm.cronos.org",
|
||||
"https://cronos-evm.publicnode.com"
|
||||
],
|
||||
@@ -30,5 +30,5 @@ export default {
|
||||
}
|
||||
],
|
||||
"testnet": false,
|
||||
"slug": "cronos-beta"
|
||||
"slug": "cronos"
|
||||
} as const satisfies Chain;
|
||||
@@ -0,0 +1,42 @@
|
||||
import type { Chain } from "../src/types";
|
||||
export default {
|
||||
"name": "Manta Pacific Testnet",
|
||||
"chain": "Manta Pacific",
|
||||
"rpc": [
|
||||
"https://manta-pacific-testnet.rpc.thirdweb.com/${THIRDWEB_API_KEY}",
|
||||
"https://manta-testnet.calderachain.xyz/http"
|
||||
],
|
||||
"faucets": [],
|
||||
"nativeCurrency": {
|
||||
"name": "Manta",
|
||||
"symbol": "MANTA",
|
||||
"decimals": 18
|
||||
},
|
||||
"features": [
|
||||
{
|
||||
"name": "EIP155"
|
||||
},
|
||||
{
|
||||
"name": "EIP1559"
|
||||
}
|
||||
],
|
||||
"infoURL": "https://manta-testnet.caldera.dev/",
|
||||
"shortName": "manta",
|
||||
"chainId": 3441005,
|
||||
"networkId": 3441005,
|
||||
"icon": {
|
||||
"url": "ipfs://QmTckcVTViRZ3NqT36MTt8AvgBSmudrbgU3pi8AaNtthoV",
|
||||
"width": 834,
|
||||
"height": 834,
|
||||
"format": "png"
|
||||
},
|
||||
"explorers": [
|
||||
{
|
||||
"name": "manta-testnet Explorer",
|
||||
"url": "https://manta-testnet.calderaexplorer.xyz",
|
||||
"standard": "EIP3091"
|
||||
}
|
||||
],
|
||||
"testnet": true,
|
||||
"slug": "manta-pacific-testnet"
|
||||
} as const satisfies Chain;
|
||||
@@ -1,8 +1,20 @@
|
||||
import type { Chain } from "../src/types";
|
||||
export default {
|
||||
"name": "Acala Mandala Testnet",
|
||||
"name": "Acala Mandala Testnet TC9",
|
||||
"chain": "mACA",
|
||||
"rpc": [],
|
||||
"rpc": [
|
||||
"https://acala-mandala-testnet-tc9.rpc.thirdweb.com/${THIRDWEB_API_KEY}",
|
||||
"https://eth-rpc-tc9.aca-staging.network",
|
||||
"wss://eth-rpc-tc9.aca-staging.network"
|
||||
],
|
||||
"features": [
|
||||
{
|
||||
"name": "EIP155"
|
||||
},
|
||||
{
|
||||
"name": "EIP1559"
|
||||
}
|
||||
],
|
||||
"faucets": [],
|
||||
"nativeCurrency": {
|
||||
"name": "Acala Mandala Token",
|
||||
@@ -13,6 +25,14 @@ export default {
|
||||
"shortName": "maca",
|
||||
"chainId": 595,
|
||||
"networkId": 595,
|
||||
"slip44": 595,
|
||||
"explorers": [
|
||||
{
|
||||
"name": "blockscout",
|
||||
"url": "https://blockscout.mandala.aca-staging.network",
|
||||
"standard": "EIP3091"
|
||||
}
|
||||
],
|
||||
"testnet": true,
|
||||
"slug": "acala-mandala-testnet"
|
||||
"slug": "acala-mandala-testnet-tc9"
|
||||
} as const satisfies Chain;
|
||||
@@ -2,7 +2,11 @@ import type { Chain } from "../src/types";
|
||||
export default {
|
||||
"name": "Karura Network Testnet",
|
||||
"chain": "KAR",
|
||||
"rpc": [],
|
||||
"rpc": [
|
||||
"https://karura-network-testnet.rpc.thirdweb.com/${THIRDWEB_API_KEY}",
|
||||
"https://eth-rpc-karura-testnet.aca-staging.network",
|
||||
"wss://eth-rpc-karura-testnet.aca-staging.network"
|
||||
],
|
||||
"faucets": [],
|
||||
"nativeCurrency": {
|
||||
"name": "Karura Token",
|
||||
@@ -14,6 +18,13 @@ export default {
|
||||
"chainId": 596,
|
||||
"networkId": 596,
|
||||
"slip44": 596,
|
||||
"explorers": [
|
||||
{
|
||||
"name": "blockscout",
|
||||
"url": "https://blockscout.karura-testnet.aca-staging.network",
|
||||
"standard": "EIP3091"
|
||||
}
|
||||
],
|
||||
"testnet": true,
|
||||
"slug": "karura-network-testnet"
|
||||
} as const satisfies Chain;
|
||||
@@ -2,7 +2,11 @@ import type { Chain } from "../src/types";
|
||||
export default {
|
||||
"name": "Acala Network Testnet",
|
||||
"chain": "ACA",
|
||||
"rpc": [],
|
||||
"rpc": [
|
||||
"https://acala-network-testnet.rpc.thirdweb.com/${THIRDWEB_API_KEY}",
|
||||
"https://eth-rpc-acala-testnet.aca-staging.network",
|
||||
"wss://eth-rpc-acala-testnet.aca-staging.network"
|
||||
],
|
||||
"faucets": [],
|
||||
"nativeCurrency": {
|
||||
"name": "Acala Token",
|
||||
@@ -14,6 +18,13 @@ export default {
|
||||
"chainId": 597,
|
||||
"networkId": 597,
|
||||
"slip44": 597,
|
||||
"explorers": [
|
||||
{
|
||||
"name": "blockscout",
|
||||
"url": "https://blockscout.acala-dev.aca-dev.network",
|
||||
"standard": "EIP3091"
|
||||
}
|
||||
],
|
||||
"testnet": true,
|
||||
"slug": "acala-network-testnet"
|
||||
} as const satisfies Chain;
|
||||
@@ -0,0 +1,42 @@
|
||||
import type { Chain } from "../src/types";
|
||||
export default {
|
||||
"name": "PEER Testnet",
|
||||
"chain": "PEER",
|
||||
"rpc": [
|
||||
"https://peer-testnet.rpc.thirdweb.com/${THIRDWEB_API_KEY}",
|
||||
"http://testnet-polka-host-232813573.us-west-1.elb.amazonaws.com"
|
||||
],
|
||||
"faucets": [
|
||||
"https://testnet.peer.inc"
|
||||
],
|
||||
"nativeCurrency": {
|
||||
"name": "PEER Token",
|
||||
"symbol": "PEER",
|
||||
"decimals": 18
|
||||
},
|
||||
"infoURL": "https://peer.inc",
|
||||
"shortName": "PEER",
|
||||
"chainId": 601,
|
||||
"networkId": 601,
|
||||
"icon": {
|
||||
"url": "ipfs://QmPKKCdjEhP6CHekLD8YnhR2VsdjzprHapapDj7Wzqm52b",
|
||||
"width": 1363,
|
||||
"height": 760,
|
||||
"format": "png"
|
||||
},
|
||||
"explorers": [
|
||||
{
|
||||
"name": "PEER Explorer",
|
||||
"url": "https://testnet.peer.inc",
|
||||
"standard": "none",
|
||||
"icon": {
|
||||
"url": "ipfs://QmPKKCdjEhP6CHekLD8YnhR2VsdjzprHapapDj7Wzqm52b",
|
||||
"width": 1363,
|
||||
"height": 760,
|
||||
"format": "png"
|
||||
}
|
||||
}
|
||||
],
|
||||
"testnet": true,
|
||||
"slug": "peer-testnet"
|
||||
} as const satisfies Chain;
|
||||
@@ -2,18 +2,37 @@ import type { Chain } from "../src/types";
|
||||
export default {
|
||||
"name": "Karura Network",
|
||||
"chain": "KAR",
|
||||
"rpc": [],
|
||||
"rpc": [
|
||||
"https://karura-network.rpc.thirdweb.com/${THIRDWEB_API_KEY}",
|
||||
"https://eth-rpc-karura.aca-api.network",
|
||||
"wss://eth-rpc-karura.aca-api.network"
|
||||
],
|
||||
"features": [
|
||||
{
|
||||
"name": "EIP155"
|
||||
},
|
||||
{
|
||||
"name": "EIP1559"
|
||||
}
|
||||
],
|
||||
"faucets": [],
|
||||
"nativeCurrency": {
|
||||
"name": "Karura Token",
|
||||
"symbol": "KAR",
|
||||
"decimals": 18
|
||||
},
|
||||
"infoURL": "https://karura.network",
|
||||
"infoURL": "https://acala.network/karura",
|
||||
"shortName": "kar",
|
||||
"chainId": 686,
|
||||
"networkId": 686,
|
||||
"slip44": 686,
|
||||
"explorers": [
|
||||
{
|
||||
"name": "blockscout",
|
||||
"url": "https://blockscout.karura.network",
|
||||
"standard": "EIP3091"
|
||||
}
|
||||
],
|
||||
"testnet": false,
|
||||
"slug": "karura-network"
|
||||
} as const satisfies Chain;
|
||||
@@ -1,6 +1,6 @@
|
||||
import type { Chain } from "../src/types";
|
||||
export default {
|
||||
"name": "ZetaChain Athens Testnet",
|
||||
"name": "ZetaChain Athens 3 Testnet",
|
||||
"chain": "ZetaChain",
|
||||
"icon": {
|
||||
"url": "ipfs://QmP4Gnf4Lkp8q5LQVePNjAWxSqrw8vU2JAf7amcFz4vEUy",
|
||||
@@ -9,8 +9,8 @@ export default {
|
||||
"format": "png"
|
||||
},
|
||||
"rpc": [
|
||||
"https://zetachain-athens-testnet.rpc.thirdweb.com/${THIRDWEB_API_KEY}",
|
||||
"https://api.athens2.zetachain.com/evm"
|
||||
"https://zetachain-athens-3-testnet.rpc.thirdweb.com/${THIRDWEB_API_KEY}",
|
||||
"https://rpc.ankr.com/zetachain_evm_athens_testnet"
|
||||
],
|
||||
"faucets": [
|
||||
"https://labs.zetachain.com/get-zeta"
|
||||
@@ -39,10 +39,10 @@ export default {
|
||||
},
|
||||
{
|
||||
"name": "ZetaChain Athens Testnet Explorer",
|
||||
"url": "https://explorer.athens.zetachain.com",
|
||||
"url": "https://athens3.explorer.zetachain.com",
|
||||
"standard": "none"
|
||||
}
|
||||
],
|
||||
"testnet": true,
|
||||
"slug": "zetachain-athens-testnet"
|
||||
"slug": "zetachain-athens-3-testnet"
|
||||
} as const satisfies Chain;
|
||||
@@ -2,7 +2,19 @@ import type { Chain } from "../src/types";
|
||||
export default {
|
||||
"name": "Acala Network",
|
||||
"chain": "ACA",
|
||||
"rpc": [],
|
||||
"rpc": [
|
||||
"https://acala-network.rpc.thirdweb.com/${THIRDWEB_API_KEY}",
|
||||
"https://eth-rpc-acala.aca-api.network",
|
||||
"wss://eth-rpc-acala.aca-api.network"
|
||||
],
|
||||
"features": [
|
||||
{
|
||||
"name": "EIP155"
|
||||
},
|
||||
{
|
||||
"name": "EIP1559"
|
||||
}
|
||||
],
|
||||
"faucets": [],
|
||||
"nativeCurrency": {
|
||||
"name": "Acala Token",
|
||||
@@ -14,6 +26,13 @@ export default {
|
||||
"chainId": 787,
|
||||
"networkId": 787,
|
||||
"slip44": 787,
|
||||
"explorers": [
|
||||
{
|
||||
"name": "blockscout",
|
||||
"url": "https://blockscout.acala.network",
|
||||
"standard": "EIP3091"
|
||||
}
|
||||
],
|
||||
"testnet": false,
|
||||
"slug": "acala-network"
|
||||
} as const satisfies Chain;
|
||||
@@ -4,7 +4,7 @@ export default {
|
||||
"chain": "ETH",
|
||||
"rpc": [
|
||||
"https://base.rpc.thirdweb.com/${THIRDWEB_API_KEY}",
|
||||
"https://developer-access-mainnet.base.org/"
|
||||
"https://mainnet.base.org/"
|
||||
],
|
||||
"faucets": [],
|
||||
"nativeCurrency": {
|
||||
|
||||
@@ -0,0 +1,39 @@
|
||||
import type { Chain } from "../src/types";
|
||||
export default {
|
||||
"name": "IMPERIUM TESTNET",
|
||||
"chain": "tIMP",
|
||||
"rpc": [],
|
||||
"faucets": [
|
||||
"https://faucet.imperiumchain.com/"
|
||||
],
|
||||
"nativeCurrency": {
|
||||
"name": "tIMP",
|
||||
"symbol": "tIMP",
|
||||
"decimals": 18
|
||||
},
|
||||
"infoURL": "https://imperiumchain.com",
|
||||
"shortName": "tIMP",
|
||||
"chainId": 9818,
|
||||
"networkId": 9818,
|
||||
"icon": {
|
||||
"url": "ipfs://QmcNGLzKyc7Gu2dgpBFF6t3KJwFuKC79D56DW8GTc5DWRw",
|
||||
"width": 200,
|
||||
"height": 200,
|
||||
"format": "png"
|
||||
},
|
||||
"explorers": [
|
||||
{
|
||||
"name": "IMPERIUM TESTNET Explorer",
|
||||
"icon": {
|
||||
"url": "ipfs://QmcNGLzKyc7Gu2dgpBFF6t3KJwFuKC79D56DW8GTc5DWRw",
|
||||
"width": 200,
|
||||
"height": 200,
|
||||
"format": "png"
|
||||
},
|
||||
"url": "https://network.impscan.com",
|
||||
"standard": "none"
|
||||
}
|
||||
],
|
||||
"testnet": true,
|
||||
"slug": "imperium-testnet"
|
||||
} as const satisfies Chain;
|
||||
@@ -0,0 +1,39 @@
|
||||
import type { Chain } from "../src/types";
|
||||
export default {
|
||||
"name": "IMPERIUM MAINNET",
|
||||
"chain": "IMP",
|
||||
"rpc": [],
|
||||
"faucets": [
|
||||
"https://faucet.imperiumchain.com/"
|
||||
],
|
||||
"nativeCurrency": {
|
||||
"name": "IMP",
|
||||
"symbol": "IMP",
|
||||
"decimals": 18
|
||||
},
|
||||
"infoURL": "https://imperiumchain.com",
|
||||
"shortName": "IMP",
|
||||
"chainId": 9819,
|
||||
"networkId": 9819,
|
||||
"icon": {
|
||||
"url": "ipfs://QmcNGLzKyc7Gu2dgpBFF6t3KJwFuKC79D56DW8GTc5DWRw",
|
||||
"width": 200,
|
||||
"height": 200,
|
||||
"format": "png"
|
||||
},
|
||||
"explorers": [
|
||||
{
|
||||
"name": "IMPERIUM Explorer",
|
||||
"icon": {
|
||||
"url": "ipfs://QmcNGLzKyc7Gu2dgpBFF6t3KJwFuKC79D56DW8GTc5DWRw",
|
||||
"width": 200,
|
||||
"height": 200,
|
||||
"format": "png"
|
||||
},
|
||||
"url": "https://impscan.com",
|
||||
"standard": "none"
|
||||
}
|
||||
],
|
||||
"testnet": false,
|
||||
"slug": "imperium"
|
||||
} as const satisfies Chain;
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@thirdweb-dev/chains",
|
||||
"version": "0.1.39",
|
||||
"version": "0.1.41",
|
||||
"main": "dist/thirdweb-dev-chains.cjs.js",
|
||||
"module": "dist/thirdweb-dev-chains.esm.js",
|
||||
"browser": {
|
||||
@@ -27,7 +27,7 @@
|
||||
"@babel/preset-env": "^7.22.9",
|
||||
"@babel/preset-typescript": "^7.22.5",
|
||||
"@babel/runtime": "^7.22.6",
|
||||
"@preconstruct/cli": "^2.8.1",
|
||||
"@preconstruct/cli": "2.7.0",
|
||||
"@thirdweb-dev/tsconfig": "workspace:*",
|
||||
"@types/jest": "^29.5.3",
|
||||
"axios": "^1.4.0",
|
||||
|
||||
File diff suppressed because one or more lines are too long
@@ -1,5 +1,43 @@
|
||||
# thirdweb
|
||||
|
||||
## 0.11.9
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- [#1442](https://github.com/thirdweb-dev/js/pull/1442) [`7f54012e`](https://github.com/thirdweb-dev/js/commit/7f54012ec648b727b60784990e71b0efb4690934) Thanks [@Marfuen](https://github.com/Marfuen)! - - Warn users on windows to not use the powershell as there are some compatibility issues with it at the moment.
|
||||
- Warn users if they are pasting a client id instead of a secret key.
|
||||
- Updated dependencies [[`2a91113a`](https://github.com/thirdweb-dev/js/commit/2a91113a760733fcff2aec90041f69e15de33905)]:
|
||||
- @thirdweb-dev/sdk@3.10.45
|
||||
|
||||
## 0.11.8
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- [#1443](https://github.com/thirdweb-dev/js/pull/1443) [`8c0dc9c8`](https://github.com/thirdweb-dev/js/commit/8c0dc9c88084efcd184a416ed372c50c2fb8a209) Thanks [@nessup](https://github.com/nessup)! - Switch IPFS download domain used in CLI
|
||||
|
||||
- Updated dependencies [[`a5d0be93`](https://github.com/thirdweb-dev/js/commit/a5d0be939a143095e769b68cf86360bfe4720744), [`c0a6d2f1`](https://github.com/thirdweb-dev/js/commit/c0a6d2f18231310d143c9b0cb1b2ff59315087a4), [`becbb637`](https://github.com/thirdweb-dev/js/commit/becbb637367285ed3d8d7d131e1020bf23e38298), [`fd981655`](https://github.com/thirdweb-dev/js/commit/fd9816556fe595b0c764e34dbcf15b0ad1677edb), [`c9bf4f05`](https://github.com/thirdweb-dev/js/commit/c9bf4f05c161707c6eb799ecef82f462e4a82405), [`67b145b9`](https://github.com/thirdweb-dev/js/commit/67b145b94dafb2fb1d90553ed4829f0ed22e2907), [`5ee700e8`](https://github.com/thirdweb-dev/js/commit/5ee700e80438650fa253c25c0bee6658ce68d2cf), [`9f5adc5c`](https://github.com/thirdweb-dev/js/commit/9f5adc5c5c2782ffb878759df481e5fb1e1740e5)]:
|
||||
- @thirdweb-dev/sdk@3.10.44
|
||||
- @thirdweb-dev/chains@0.1.41
|
||||
|
||||
## 0.11.7
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- [#1419](https://github.com/thirdweb-dev/js/pull/1419) [`2b96f71e`](https://github.com/thirdweb-dev/js/commit/2b96f71e191d7f69c2c75f9c6a9ee4537bac65aa) Thanks [@Marfuen](https://github.com/Marfuen)! - Fix path of cache to work with windows.
|
||||
|
||||
- Updated dependencies [[`3b6b0746`](https://github.com/thirdweb-dev/js/commit/3b6b0746b3fc792f4c5092814a7abfabcbc9801e)]:
|
||||
- @thirdweb-dev/storage@1.2.3
|
||||
- @thirdweb-dev/sdk@3.10.43
|
||||
|
||||
## 0.11.6
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- Updated dependencies [[`256ee0d5`](https://github.com/thirdweb-dev/js/commit/256ee0d5ec9c8598aa79cd4cb1fd839c6cc7d390)]:
|
||||
- @thirdweb-dev/storage@1.2.2
|
||||
- @thirdweb-dev/chains@0.1.40
|
||||
- @thirdweb-dev/sdk@3.10.42
|
||||
|
||||
## 0.11.5
|
||||
|
||||
### Patch Changes
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
{
|
||||
"name": "thirdweb",
|
||||
"main": "dist/cli/index.js",
|
||||
"version": "0.11.5",
|
||||
"version": "0.11.9",
|
||||
"repository": "https://github.com/thirdweb-dev/js/tree/main/packages/cli",
|
||||
"author": "thirdweb eng <[email protected]>",
|
||||
"license": "Apache-2.0",
|
||||
|
||||
@@ -2,6 +2,7 @@ import chalk from "chalk";
|
||||
import prompts from "prompts";
|
||||
import Cache, { CacheEntry } from "sync-disk-cache";
|
||||
import { ApiResponse } from "../lib/types";
|
||||
import os from "os";
|
||||
|
||||
export async function loginUser(
|
||||
cache: Cache,
|
||||
@@ -40,6 +41,10 @@ export function getSession(cache: Cache) {
|
||||
|
||||
export async function createSession(cache: Cache) {
|
||||
try {
|
||||
const isWindows = os.type() === "Windows_NT";
|
||||
if (isWindows) {
|
||||
console.log(chalk.yellow("Windows detected: if you are using powershell, there are some known issues with it that we are actively working on, please use git bash or the command prompt. Thank you for your understanding."));
|
||||
}
|
||||
const response = await prompts({
|
||||
type: "invisible",
|
||||
name: "apiSecretKey",
|
||||
@@ -48,6 +53,20 @@ export async function createSession(cache: Cache) {
|
||||
)}`,
|
||||
});
|
||||
|
||||
const keyPassed = response.apiSecretKey;
|
||||
if (!keyPassed) {
|
||||
console.log(chalk.red("You need to pass an API secret key"));
|
||||
process.exit(1);
|
||||
}
|
||||
|
||||
if (keyPassed.length === 32) {
|
||||
console.log(chalk.red(`This is not a valid secret key. To get your secret key
|
||||
1. Create an API key at https://thirdweb.com/create-api-key
|
||||
2. Store and copy your Secret Key. This will be shown only once.
|
||||
3. Paste it in the CLI when prompted`));
|
||||
process.exit(1);
|
||||
}
|
||||
|
||||
try {
|
||||
await validateKey(response.apiSecretKey);
|
||||
} catch (error) {
|
||||
|
||||
@@ -26,7 +26,7 @@ const main = async () => {
|
||||
const skipIntro = process.env.THIRDWEB_CLI_SKIP_INTRO === "true";
|
||||
|
||||
const program = new Command();
|
||||
const cache = new Cache("thirdweb:cli", {
|
||||
const cache = new Cache("thirdweb-cli", {
|
||||
location: path.join(os.homedir(), ".thirdweb", "creds"),
|
||||
});
|
||||
|
||||
|
||||
@@ -70,10 +70,7 @@ export async function deployApp(
|
||||
|
||||
try {
|
||||
const uri = await upload(storage, distPath);
|
||||
return `${uri.replace(
|
||||
"ipfs://",
|
||||
"https://ipfs-public.thirdwebcdn.com/ipfs/",
|
||||
)}`;
|
||||
return storage.resolveScheme(uri);
|
||||
} catch (err) {
|
||||
console.error("Can't upload project", err);
|
||||
return Promise.reject("Can't upload project");
|
||||
|
||||
@@ -1,5 +1,11 @@
|
||||
# @thirdweb-dev/contracts-js
|
||||
|
||||
## 1.3.11
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- [#1432](https://github.com/thirdweb-dev/js/pull/1432) [`9f5adc5c`](https://github.com/thirdweb-dev/js/commit/9f5adc5c5c2782ffb878759df481e5fb1e1740e5) Thanks [@jnsdls](https://github.com/jnsdls)! - upgrade contracts package
|
||||
|
||||
## 1.3.10
|
||||
|
||||
### Patch Changes
|
||||
|
||||
@@ -1,4 +0,0 @@
|
||||
{
|
||||
"main": "dist/thirdweb-dev-contracts-js-factories-TWRegistryLegacy__factory.cjs.js",
|
||||
"module": "dist/thirdweb-dev-contracts-js-factories-TWRegistryLegacy__factory.esm.js"
|
||||
}
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@thirdweb-dev/contracts-js",
|
||||
"version": "1.3.10",
|
||||
"version": "1.3.11",
|
||||
"main": "dist/thirdweb-dev-contracts-js.cjs.js",
|
||||
"module": "dist/thirdweb-dev-contracts-js.esm.js",
|
||||
"browser": {
|
||||
@@ -10,7 +10,7 @@
|
||||
"license": "Apache-2.0",
|
||||
"repository": "https://github.com/thirdweb-dev/js/tree/main/packages/contracts-js",
|
||||
"dependencies": {
|
||||
"@thirdweb-dev/contracts": "3.8.1-0"
|
||||
"@thirdweb-dev/contracts": "3.8.3"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@babel/preset-env": "^7.22.9",
|
||||
|
||||
@@ -1,5 +1,11 @@
|
||||
# @thirdweb-dev/pay
|
||||
|
||||
## 0.1.4
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- [#1415](https://github.com/thirdweb-dev/js/pull/1415) [`256ee0d5`](https://github.com/thirdweb-dev/js/commit/256ee0d5ec9c8598aa79cd4cb1fd839c6cc7d390) Thanks [@joaquim-verges](https://github.com/joaquim-verges)! - Downgrade preconstruct to 2.7.0
|
||||
|
||||
## 0.1.3
|
||||
|
||||
### Patch Changes
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@thirdweb-dev/pay",
|
||||
"version": "0.1.3",
|
||||
"version": "0.1.4",
|
||||
"main": "dist/thirdweb-dev-pay.cjs.js",
|
||||
"module": "dist/thirdweb-dev-pay.esm.js",
|
||||
"exports": {
|
||||
@@ -36,7 +36,7 @@
|
||||
"@coinbase/cbpay-js": "^1.7.0"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@preconstruct/cli": "^2.8.1",
|
||||
"@preconstruct/cli": "2.7.0",
|
||||
"@thirdweb-dev/tsconfig": "workspace:*",
|
||||
"eslint-config-thirdweb": "workspace:*",
|
||||
"typescript": "^5.1.6"
|
||||
|
||||
@@ -1,5 +1,56 @@
|
||||
# @thirdweb-dev/react-core
|
||||
|
||||
## 3.14.26
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- Updated dependencies [[`2a91113a`](https://github.com/thirdweb-dev/js/commit/2a91113a760733fcff2aec90041f69e15de33905)]:
|
||||
- @thirdweb-dev/sdk@3.10.45
|
||||
- @thirdweb-dev/wallets@1.1.9
|
||||
|
||||
## 3.14.25
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- [#1423](https://github.com/thirdweb-dev/js/pull/1423) [`2283d210`](https://github.com/thirdweb-dev/js/commit/2283d21027503e047c25df5ebb21bdde0734be9e) Thanks [@nkrishang](https://github.com/nkrishang)! - Create useAccountAdmins hook
|
||||
|
||||
- [#1429](https://github.com/thirdweb-dev/js/pull/1429) [`ab36d84f`](https://github.com/thirdweb-dev/js/commit/ab36d84f1ce5647fa52475b4a35ea29d5007ad9b) Thanks [@iketw](https://github.com/iketw)! - Pass secretKey in the React SDK for server-side rendering
|
||||
|
||||
- [#1437](https://github.com/thirdweb-dev/js/pull/1437) [`5ee700e8`](https://github.com/thirdweb-dev/js/commit/5ee700e80438650fa253c25c0bee6658ce68d2cf) Thanks [@farhanW3](https://github.com/farhanW3)! - Updated the error messages
|
||||
|
||||
- Updated dependencies [[`a5d0be93`](https://github.com/thirdweb-dev/js/commit/a5d0be939a143095e769b68cf86360bfe4720744), [`c0a6d2f1`](https://github.com/thirdweb-dev/js/commit/c0a6d2f18231310d143c9b0cb1b2ff59315087a4), [`a9f2ff73`](https://github.com/thirdweb-dev/js/commit/a9f2ff73c9f83f05c3e2d3c53b23b2843e8a2576), [`fd981655`](https://github.com/thirdweb-dev/js/commit/fd9816556fe595b0c764e34dbcf15b0ad1677edb), [`becbb637`](https://github.com/thirdweb-dev/js/commit/becbb637367285ed3d8d7d131e1020bf23e38298), [`fd981655`](https://github.com/thirdweb-dev/js/commit/fd9816556fe595b0c764e34dbcf15b0ad1677edb), [`c9bf4f05`](https://github.com/thirdweb-dev/js/commit/c9bf4f05c161707c6eb799ecef82f462e4a82405), [`67b145b9`](https://github.com/thirdweb-dev/js/commit/67b145b94dafb2fb1d90553ed4829f0ed22e2907), [`5ee700e8`](https://github.com/thirdweb-dev/js/commit/5ee700e80438650fa253c25c0bee6658ce68d2cf), [`9f5adc5c`](https://github.com/thirdweb-dev/js/commit/9f5adc5c5c2782ffb878759df481e5fb1e1740e5)]:
|
||||
- @thirdweb-dev/sdk@3.10.44
|
||||
- @thirdweb-dev/wallets@1.1.8
|
||||
- @thirdweb-dev/chains@0.1.41
|
||||
|
||||
## 3.14.24
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- Updated dependencies [[`3b6b0746`](https://github.com/thirdweb-dev/js/commit/3b6b0746b3fc792f4c5092814a7abfabcbc9801e), [`b0ec1d80`](https://github.com/thirdweb-dev/js/commit/b0ec1d80839efccad11b50afbf2216c2c132cf7e)]:
|
||||
- @thirdweb-dev/storage@1.2.3
|
||||
- @thirdweb-dev/wallets@1.1.7
|
||||
- @thirdweb-dev/sdk@3.10.43
|
||||
|
||||
## 3.14.23
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- Updated dependencies [[`fbde927a`](https://github.com/thirdweb-dev/js/commit/fbde927a0cb36a6269e045d8e577536f23164ef7)]:
|
||||
- @thirdweb-dev/wallets@1.1.6
|
||||
|
||||
## 3.14.22
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- [#1415](https://github.com/thirdweb-dev/js/pull/1415) [`256ee0d5`](https://github.com/thirdweb-dev/js/commit/256ee0d5ec9c8598aa79cd4cb1fd839c6cc7d390) Thanks [@joaquim-verges](https://github.com/joaquim-verges)! - Downgrade preconstruct to 2.7.0
|
||||
|
||||
- Updated dependencies [[`256ee0d5`](https://github.com/thirdweb-dev/js/commit/256ee0d5ec9c8598aa79cd4cb1fd839c6cc7d390)]:
|
||||
- @thirdweb-dev/storage@1.2.2
|
||||
- @thirdweb-dev/wallets@1.1.5
|
||||
- @thirdweb-dev/chains@0.1.40
|
||||
- @thirdweb-dev/sdk@3.10.42
|
||||
|
||||
## 3.14.21
|
||||
|
||||
### Patch Changes
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@thirdweb-dev/react-core",
|
||||
"version": "3.14.21",
|
||||
"version": "3.14.26",
|
||||
"repository": "https://github.com/thirdweb-dev/js/tree/main/packages/react-core",
|
||||
"author": "thirdweb eng <[email protected]>",
|
||||
"license": "Apache-2.0",
|
||||
@@ -74,7 +74,7 @@
|
||||
"@microsoft/api-documenter": "^7.22.30",
|
||||
"@microsoft/api-extractor": "^7.36.3",
|
||||
"@microsoft/tsdoc": "^0.14.1",
|
||||
"@preconstruct/cli": "^2.8.1",
|
||||
"@preconstruct/cli": "2.7.0",
|
||||
"@solana/wallet-adapter-react": "^0.15.19",
|
||||
"@solana/web3.js": "^1.62.0",
|
||||
"@thirdweb-dev/auth": "workspace:*",
|
||||
|
||||
@@ -161,6 +161,7 @@ export const ThirdwebProviderCore = <TChains extends Chain[]>({
|
||||
storageInterface={props.storageInterface}
|
||||
authConfig={props.authConfig}
|
||||
clientId={props.clientId}
|
||||
secretKey={props.secretKey}
|
||||
>
|
||||
<ThirdwebAuthProvider value={props.authConfig}>
|
||||
{props.children}
|
||||
|
||||
@@ -321,6 +321,7 @@ export function ThirdwebWalletProvider(
|
||||
},
|
||||
);
|
||||
} catch (e) {
|
||||
console.error("Failed to auto connect wallet");
|
||||
console.error(e);
|
||||
setConnectionStatus("disconnected");
|
||||
return;
|
||||
@@ -349,6 +350,7 @@ export function ThirdwebWalletProvider(
|
||||
});
|
||||
setConnectedWallet(wallet, walletInfo.connectParams, true);
|
||||
} catch (e) {
|
||||
console.error("Failed to auto connect wallet");
|
||||
console.error(e);
|
||||
lastConnectedWalletStorage.removeItem(
|
||||
LAST_CONNECTED_WALLET_STORAGE_KEY,
|
||||
|
||||
@@ -21,13 +21,14 @@ import type {
|
||||
SmartContract,
|
||||
} from "@thirdweb-dev/sdk";
|
||||
import invariant from "tiny-invariant";
|
||||
import { WalletAddress } from "../../types";
|
||||
|
||||
/** **********************/
|
||||
/** READ HOOKS **/
|
||||
/** **********************/
|
||||
|
||||
/**
|
||||
* Get all accounts
|
||||
* Get all signers of account
|
||||
*
|
||||
* @example
|
||||
* ```javascript
|
||||
@@ -50,7 +51,7 @@ export function useAccountSigners(
|
||||
requiredParamInvariant(contract, "No Contract instance provided");
|
||||
invariant(
|
||||
contract.account.getAllSigners,
|
||||
"Contract instance does not support contract.account.getSignersWithRestrictions",
|
||||
"Contract instance does not support contract.account.getAllSigners",
|
||||
);
|
||||
return contract.account.getAllSigners();
|
||||
},
|
||||
@@ -58,6 +59,71 @@ export function useAccountSigners(
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* Get all admins of account
|
||||
*
|
||||
* @example
|
||||
* ```javascript
|
||||
* const { data: accounts, isLoading, error } = useAccountSigners(contract);
|
||||
* ```
|
||||
*
|
||||
* @param contract - an instance of a account
|
||||
* @returns a response object that includes an array of all admins of the provided account
|
||||
* @twfeature Account
|
||||
* @see {@link https://portal.thirdweb.com/react/react.useaccountadmins?utm_source=sdk | Documentation}
|
||||
* @beta
|
||||
*/
|
||||
export function useAccountAdmins(
|
||||
contract: RequiredParam<SmartContract>,
|
||||
): UseQueryResult<WalletAddress[]> {
|
||||
const contractAddress = contract?.getAddress();
|
||||
return useQueryWithNetwork(
|
||||
cacheKeys.contract.account.signers(contractAddress),
|
||||
() => {
|
||||
requiredParamInvariant(contract, "No Contract instance provided");
|
||||
invariant(
|
||||
contract.account.getAllAdmins,
|
||||
"Contract instance does not support contract.account.getAllAdmins",
|
||||
);
|
||||
return contract.account.getAllAdmins();
|
||||
},
|
||||
{ enabled: !!contract },
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* Get all signers and admins of account
|
||||
*
|
||||
* @example
|
||||
* ```javascript
|
||||
* const { data: accounts, isLoading, error } = useAccountSigners(contract);
|
||||
* ```
|
||||
*
|
||||
* @param contract - an instance of a account
|
||||
* @returns a response object that includes an array of all admins of the provided account
|
||||
* @twfeature Account
|
||||
* @see {@link https://portal.thirdweb.com/react/react.useaccountadmins?utm_source=sdk | Documentation}
|
||||
* @beta
|
||||
*/
|
||||
export function useAccountAdminsAndSigners(
|
||||
contract: RequiredParam<SmartContract>,
|
||||
): UseQueryResult<SignerWithPermissions[]> {
|
||||
const contractAddress = contract?.getAddress();
|
||||
return useQueryWithNetwork(
|
||||
cacheKeys.contract.account.signers(contractAddress),
|
||||
() => {
|
||||
requiredParamInvariant(contract, "No Contract instance provided");
|
||||
invariant(
|
||||
contract.account.getAllAdminsAndSigners,
|
||||
"Contract instance does not support contract.account.getAllAdminsAndSigners",
|
||||
);
|
||||
|
||||
return contract.account.getAllAdminsAndSigners();
|
||||
},
|
||||
{ enabled: !!contract },
|
||||
);
|
||||
}
|
||||
|
||||
/** **********************/
|
||||
/** WRITE HOOKS **/
|
||||
/** **********************/
|
||||
|
||||
@@ -203,7 +203,12 @@ export {
|
||||
} from "./hooks/async/account-factory";
|
||||
|
||||
// account
|
||||
export { useAccountSigners, useSetAccountSigners } from "./hooks/async/account";
|
||||
export {
|
||||
useAccountSigners,
|
||||
useSetAccountSigners,
|
||||
useAccountAdmins,
|
||||
useAccountAdminsAndSigners,
|
||||
} from "./hooks/async/account";
|
||||
|
||||
// thirdweb hooks (work as long as at least `<ThirdwebSdkProvider>` is used)
|
||||
|
||||
|
||||
@@ -21,6 +21,7 @@ const WrappedThirdwebSDKProvider = <TChains extends Chain[]>({
|
||||
signer,
|
||||
children,
|
||||
clientId,
|
||||
secretKey,
|
||||
}: React.PropsWithChildren<
|
||||
{ supportedChains: Readonly<TChains> } & Omit<
|
||||
ThirdwebSDKProviderProps<TChains>,
|
||||
@@ -92,7 +93,7 @@ const WrappedThirdwebSDKProvider = <TChains extends Chain[]>({
|
||||
// sdk from chainId
|
||||
sdk_ = new ThirdwebSDK(
|
||||
chainId,
|
||||
{ ...mergedOptions, clientId },
|
||||
{ ...mergedOptions, clientId, secretKey },
|
||||
storageInterface,
|
||||
);
|
||||
}
|
||||
@@ -113,7 +114,14 @@ const WrappedThirdwebSDKProvider = <TChains extends Chain[]>({
|
||||
(sdk_ as any)._chainId = chainId;
|
||||
|
||||
return sdk_;
|
||||
}, [activeChainId, supportedChains, sdkOptions, storageInterface, clientId]);
|
||||
}, [
|
||||
activeChainId,
|
||||
supportedChains,
|
||||
sdkOptions,
|
||||
storageInterface,
|
||||
clientId,
|
||||
secretKey,
|
||||
]);
|
||||
|
||||
useEffect(() => {
|
||||
// if we have an sdk and a signer update the signer
|
||||
@@ -163,7 +171,7 @@ export const ThirdwebSDKProvider = <TChains extends Chain[]>({
|
||||
}: React.PropsWithChildren<ThirdwebSDKProviderProps<TChains>>) => {
|
||||
if (!clientId) {
|
||||
checkClientIdOrSecretKey(
|
||||
"No clientId provided in ThirdwebSDK. You will have limited access to thirdweb's services for storage, RPC, and account abstraction. You can get a clientId from https://thirdweb.com/create-api-key",
|
||||
"No API key. Please provide a clientId. It is required to access thirdweb's services. You can create a key at https://thirdweb.com/create-api-key",
|
||||
clientId,
|
||||
undefined,
|
||||
);
|
||||
|
||||
@@ -45,4 +45,7 @@ export interface ThirdwebSDKProviderProps<TChains extends Chain[]>
|
||||
|
||||
// client Id for thirdweb services
|
||||
clientId?: string;
|
||||
|
||||
// pass in a secret key when doing server side rendering
|
||||
secretKey?: string;
|
||||
}
|
||||
|
||||
@@ -1,5 +1,15 @@
|
||||
# @thirdweb-dev/react-native-compat
|
||||
|
||||
## 0.2.45
|
||||
|
||||
## 0.2.44
|
||||
|
||||
## 0.2.43
|
||||
|
||||
## 0.2.42
|
||||
|
||||
## 0.2.41
|
||||
|
||||
## 0.2.40
|
||||
|
||||
### Patch Changes
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
{
|
||||
"name": "@thirdweb-dev/react-native-compat",
|
||||
"description": "Shims for Thirdweb in React Native Projects",
|
||||
"version": "0.2.40",
|
||||
"version": "0.2.45",
|
||||
"author": "thirdweb eng <[email protected]>",
|
||||
"repository": "https://github.com/thirdweb-dev/js/tree/main/packages/react-native-compat",
|
||||
"license": "Apache-2.0",
|
||||
|
||||
@@ -1,5 +1,55 @@
|
||||
# @thirdweb-dev/react-native
|
||||
|
||||
## 0.2.45
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- Updated dependencies [[`2a91113a`](https://github.com/thirdweb-dev/js/commit/2a91113a760733fcff2aec90041f69e15de33905)]:
|
||||
- @thirdweb-dev/sdk@3.10.45
|
||||
- @thirdweb-dev/react-core@3.14.26
|
||||
- @thirdweb-dev/wallets@1.1.9
|
||||
|
||||
## 0.2.44
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- [#1429](https://github.com/thirdweb-dev/js/pull/1429) [`ab36d84f`](https://github.com/thirdweb-dev/js/commit/ab36d84f1ce5647fa52475b4a35ea29d5007ad9b) Thanks [@iketw](https://github.com/iketw)! - Pass secretKey in the React SDK for server-side rendering
|
||||
|
||||
- Updated dependencies [[`a5d0be93`](https://github.com/thirdweb-dev/js/commit/a5d0be939a143095e769b68cf86360bfe4720744), [`c0a6d2f1`](https://github.com/thirdweb-dev/js/commit/c0a6d2f18231310d143c9b0cb1b2ff59315087a4), [`a9f2ff73`](https://github.com/thirdweb-dev/js/commit/a9f2ff73c9f83f05c3e2d3c53b23b2843e8a2576), [`fd981655`](https://github.com/thirdweb-dev/js/commit/fd9816556fe595b0c764e34dbcf15b0ad1677edb), [`becbb637`](https://github.com/thirdweb-dev/js/commit/becbb637367285ed3d8d7d131e1020bf23e38298), [`2283d210`](https://github.com/thirdweb-dev/js/commit/2283d21027503e047c25df5ebb21bdde0734be9e), [`fd981655`](https://github.com/thirdweb-dev/js/commit/fd9816556fe595b0c764e34dbcf15b0ad1677edb), [`ab36d84f`](https://github.com/thirdweb-dev/js/commit/ab36d84f1ce5647fa52475b4a35ea29d5007ad9b), [`c9bf4f05`](https://github.com/thirdweb-dev/js/commit/c9bf4f05c161707c6eb799ecef82f462e4a82405), [`67b145b9`](https://github.com/thirdweb-dev/js/commit/67b145b94dafb2fb1d90553ed4829f0ed22e2907), [`5ee700e8`](https://github.com/thirdweb-dev/js/commit/5ee700e80438650fa253c25c0bee6658ce68d2cf), [`9f5adc5c`](https://github.com/thirdweb-dev/js/commit/9f5adc5c5c2782ffb878759df481e5fb1e1740e5)]:
|
||||
- @thirdweb-dev/sdk@3.10.44
|
||||
- @thirdweb-dev/wallets@1.1.8
|
||||
- @thirdweb-dev/react-core@3.14.25
|
||||
- @thirdweb-dev/chains@0.1.41
|
||||
|
||||
## 0.2.43
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- Updated dependencies [[`3b6b0746`](https://github.com/thirdweb-dev/js/commit/3b6b0746b3fc792f4c5092814a7abfabcbc9801e), [`b0ec1d80`](https://github.com/thirdweb-dev/js/commit/b0ec1d80839efccad11b50afbf2216c2c132cf7e)]:
|
||||
- @thirdweb-dev/storage@1.2.3
|
||||
- @thirdweb-dev/wallets@1.1.7
|
||||
- @thirdweb-dev/sdk@3.10.43
|
||||
- @thirdweb-dev/react-core@3.14.24
|
||||
|
||||
## 0.2.42
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- Updated dependencies [[`fbde927a`](https://github.com/thirdweb-dev/js/commit/fbde927a0cb36a6269e045d8e577536f23164ef7)]:
|
||||
- @thirdweb-dev/wallets@1.1.6
|
||||
- @thirdweb-dev/react-core@3.14.23
|
||||
|
||||
## 0.2.41
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- Updated dependencies [[`256ee0d5`](https://github.com/thirdweb-dev/js/commit/256ee0d5ec9c8598aa79cd4cb1fd839c6cc7d390)]:
|
||||
- @thirdweb-dev/react-core@3.14.22
|
||||
- @thirdweb-dev/storage@1.2.2
|
||||
- @thirdweb-dev/wallets@1.1.5
|
||||
- @thirdweb-dev/chains@0.1.40
|
||||
- @thirdweb-dev/sdk@3.10.42
|
||||
|
||||
## 0.2.40
|
||||
|
||||
### Patch Changes
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@thirdweb-dev/react-native",
|
||||
"version": "0.2.40",
|
||||
"version": "0.2.45",
|
||||
"repository": "https://github.com/thirdweb-dev/js/tree/main/packages/react-native",
|
||||
"author": "thirdweb eng <[email protected]>",
|
||||
"license": "Apache-2.0",
|
||||
|
||||
@@ -18,7 +18,10 @@ import { walletIds } from "@thirdweb-dev/wallets";
|
||||
import { ThirdwebStorage } from "../../core/storage/storage";
|
||||
|
||||
interface ThirdwebProviderProps<TChains extends Chain[]>
|
||||
extends Omit<ThirdwebProviderCoreProps<TChains>, "supportedWallets"> {
|
||||
extends Omit<
|
||||
ThirdwebProviderCoreProps<TChains>,
|
||||
"supportedWallets" | "secretKey"
|
||||
> {
|
||||
/**
|
||||
* Wallets that will be supported by the dApp
|
||||
* @defaultValue [MetaMaskWallet, CoinbaseWallet]
|
||||
|
||||
@@ -1,5 +1,57 @@
|
||||
# @thirdweb-dev/react
|
||||
|
||||
## 3.14.26
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- Updated dependencies [[`2a91113a`](https://github.com/thirdweb-dev/js/commit/2a91113a760733fcff2aec90041f69e15de33905)]:
|
||||
- @thirdweb-dev/sdk@3.10.45
|
||||
- @thirdweb-dev/react-core@3.14.26
|
||||
- @thirdweb-dev/wallets@1.1.9
|
||||
|
||||
## 3.14.25
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- [#1429](https://github.com/thirdweb-dev/js/pull/1429) [`ab36d84f`](https://github.com/thirdweb-dev/js/commit/ab36d84f1ce5647fa52475b4a35ea29d5007ad9b) Thanks [@iketw](https://github.com/iketw)! - Pass secretKey in the React SDK for server-side rendering
|
||||
|
||||
- [#1430](https://github.com/thirdweb-dev/js/pull/1430) [`a9f2ff73`](https://github.com/thirdweb-dev/js/commit/a9f2ff73c9f83f05c3e2d3c53b23b2843e8a2576) Thanks [@MananTank](https://github.com/MananTank)! - - Add base-gor as a valid safe address prefix
|
||||
- Log failed to autoconnect error on react-core too
|
||||
- Updated dependencies [[`a5d0be93`](https://github.com/thirdweb-dev/js/commit/a5d0be939a143095e769b68cf86360bfe4720744), [`c0a6d2f1`](https://github.com/thirdweb-dev/js/commit/c0a6d2f18231310d143c9b0cb1b2ff59315087a4), [`a9f2ff73`](https://github.com/thirdweb-dev/js/commit/a9f2ff73c9f83f05c3e2d3c53b23b2843e8a2576), [`fd981655`](https://github.com/thirdweb-dev/js/commit/fd9816556fe595b0c764e34dbcf15b0ad1677edb), [`becbb637`](https://github.com/thirdweb-dev/js/commit/becbb637367285ed3d8d7d131e1020bf23e38298), [`2283d210`](https://github.com/thirdweb-dev/js/commit/2283d21027503e047c25df5ebb21bdde0734be9e), [`fd981655`](https://github.com/thirdweb-dev/js/commit/fd9816556fe595b0c764e34dbcf15b0ad1677edb), [`ab36d84f`](https://github.com/thirdweb-dev/js/commit/ab36d84f1ce5647fa52475b4a35ea29d5007ad9b), [`c9bf4f05`](https://github.com/thirdweb-dev/js/commit/c9bf4f05c161707c6eb799ecef82f462e4a82405), [`67b145b9`](https://github.com/thirdweb-dev/js/commit/67b145b94dafb2fb1d90553ed4829f0ed22e2907), [`5ee700e8`](https://github.com/thirdweb-dev/js/commit/5ee700e80438650fa253c25c0bee6658ce68d2cf), [`9f5adc5c`](https://github.com/thirdweb-dev/js/commit/9f5adc5c5c2782ffb878759df481e5fb1e1740e5)]:
|
||||
- @thirdweb-dev/sdk@3.10.44
|
||||
- @thirdweb-dev/wallets@1.1.8
|
||||
- @thirdweb-dev/react-core@3.14.25
|
||||
- @thirdweb-dev/chains@0.1.41
|
||||
|
||||
## 3.14.24
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- Updated dependencies [[`3b6b0746`](https://github.com/thirdweb-dev/js/commit/3b6b0746b3fc792f4c5092814a7abfabcbc9801e), [`b0ec1d80`](https://github.com/thirdweb-dev/js/commit/b0ec1d80839efccad11b50afbf2216c2c132cf7e)]:
|
||||
- @thirdweb-dev/wallets@1.1.7
|
||||
- @thirdweb-dev/sdk@3.10.43
|
||||
- @thirdweb-dev/react-core@3.14.24
|
||||
|
||||
## 3.14.23
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- Updated dependencies [[`fbde927a`](https://github.com/thirdweb-dev/js/commit/fbde927a0cb36a6269e045d8e577536f23164ef7)]:
|
||||
- @thirdweb-dev/wallets@1.1.6
|
||||
- @thirdweb-dev/react-core@3.14.23
|
||||
|
||||
## 3.14.22
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- [#1415](https://github.com/thirdweb-dev/js/pull/1415) [`256ee0d5`](https://github.com/thirdweb-dev/js/commit/256ee0d5ec9c8598aa79cd4cb1fd839c6cc7d390) Thanks [@joaquim-verges](https://github.com/joaquim-verges)! - Downgrade preconstruct to 2.7.0
|
||||
|
||||
- Updated dependencies [[`256ee0d5`](https://github.com/thirdweb-dev/js/commit/256ee0d5ec9c8598aa79cd4cb1fd839c6cc7d390)]:
|
||||
- @thirdweb-dev/react-core@3.14.22
|
||||
- @thirdweb-dev/wallets@1.1.5
|
||||
- @thirdweb-dev/chains@0.1.40
|
||||
- @thirdweb-dev/sdk@3.10.42
|
||||
|
||||
## 3.14.21
|
||||
|
||||
### Patch Changes
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@thirdweb-dev/react",
|
||||
"version": "3.14.21",
|
||||
"version": "3.14.26",
|
||||
"repository": "https://github.com/thirdweb-dev/js/tree/main/packages/react",
|
||||
"author": "thirdweb eng <[email protected]>",
|
||||
"license": "Apache-2.0",
|
||||
@@ -89,7 +89,7 @@
|
||||
"@microsoft/api-documenter": "^7.22.30",
|
||||
"@microsoft/api-extractor": "^7.36.3",
|
||||
"@microsoft/tsdoc": "^0.14.1",
|
||||
"@preconstruct/cli": "^2.8.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",
|
||||
|
||||
@@ -56,7 +56,6 @@ interface ThirdwebProviderProps<TChains extends Chain[]>
|
||||
export const ThirdwebProvider = <
|
||||
TChains extends Chain[] = typeof defaultChains,
|
||||
>({
|
||||
clientId: clientId,
|
||||
supportedWallets,
|
||||
theme,
|
||||
children,
|
||||
@@ -69,7 +68,6 @@ export const ThirdwebProvider = <
|
||||
<ThemeProvider theme={theme === "dark" ? darkTheme : lightTheme}>
|
||||
<ThirdwebProviderCore
|
||||
theme={theme}
|
||||
clientId={clientId}
|
||||
supportedWallets={wallets}
|
||||
{...restProps}
|
||||
>
|
||||
|
||||
@@ -39,6 +39,7 @@ export const gnosisAddressPrefixToChainId = {
|
||||
bnb: 56,
|
||||
oeth: 10,
|
||||
gor: 5,
|
||||
"base-gor": 84531,
|
||||
} as const;
|
||||
|
||||
export const SelectAccount: React.FC<{
|
||||
|
||||
@@ -1,5 +1,50 @@
|
||||
# @thirdweb-dev/sdk
|
||||
|
||||
## 3.10.45
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- [#1449](https://github.com/thirdweb-dev/js/pull/1449) [`2a91113a`](https://github.com/thirdweb-dev/js/commit/2a91113a760733fcff2aec90041f69e15de33905) Thanks [@joaquim-verges](https://github.com/joaquim-verges)! - Revert sanitizing inputs
|
||||
|
||||
## 3.10.44
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- [#1444](https://github.com/thirdweb-dev/js/pull/1444) [`a5d0be93`](https://github.com/thirdweb-dev/js/commit/a5d0be939a143095e769b68cf86360bfe4720744) Thanks [@joaquim-verges](https://github.com/joaquim-verges)! - Optimize claimConditions.getAll()
|
||||
|
||||
- [#1438](https://github.com/thirdweb-dev/js/pull/1438) [`c0a6d2f1`](https://github.com/thirdweb-dev/js/commit/c0a6d2f18231310d143c9b0cb1b2ff59315087a4) Thanks [@joaquim-verges](https://github.com/joaquim-verges)! - Add sdk.deployer.deployOpenEdition() convenience function
|
||||
|
||||
- [#1441](https://github.com/thirdweb-dev/js/pull/1441) [`becbb637`](https://github.com/thirdweb-dev/js/commit/becbb637367285ed3d8d7d131e1020bf23e38298) Thanks [@joaquim-verges](https://github.com/joaquim-verges)! - Sanitize NFT description input strings
|
||||
|
||||
- [#1433](https://github.com/thirdweb-dev/js/pull/1433) [`c9bf4f05`](https://github.com/thirdweb-dev/js/commit/c9bf4f05c161707c6eb799ecef82f462e4a82405) Thanks [@iketw](https://github.com/iketw)! - Pass empty string when clientId is undefined
|
||||
|
||||
- [#1439](https://github.com/thirdweb-dev/js/pull/1439) [`67b145b9`](https://github.com/thirdweb-dev/js/commit/67b145b94dafb2fb1d90553ed4829f0ed22e2907) Thanks [@joaquim-verges](https://github.com/joaquim-verges)! - Expose deployPublishContract alias
|
||||
|
||||
- [#1437](https://github.com/thirdweb-dev/js/pull/1437) [`5ee700e8`](https://github.com/thirdweb-dev/js/commit/5ee700e80438650fa253c25c0bee6658ce68d2cf) Thanks [@farhanW3](https://github.com/farhanW3)! - Updated the error messages
|
||||
|
||||
- Updated dependencies [[`fd981655`](https://github.com/thirdweb-dev/js/commit/fd9816556fe595b0c764e34dbcf15b0ad1677edb), [`9f5adc5c`](https://github.com/thirdweb-dev/js/commit/9f5adc5c5c2782ffb878759df481e5fb1e1740e5), [`9f5adc5c`](https://github.com/thirdweb-dev/js/commit/9f5adc5c5c2782ffb878759df481e5fb1e1740e5)]:
|
||||
- @thirdweb-dev/chains@0.1.41
|
||||
- @thirdweb-dev/contracts-js@1.3.11
|
||||
|
||||
## 3.10.43
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- [#1411](https://github.com/thirdweb-dev/js/pull/1411) [`3b6b0746`](https://github.com/thirdweb-dev/js/commit/3b6b0746b3fc792f4c5092814a7abfabcbc9801e) Thanks [@jnsdls](https://github.com/jnsdls)! - add auth token
|
||||
|
||||
- Updated dependencies [[`3b6b0746`](https://github.com/thirdweb-dev/js/commit/3b6b0746b3fc792f4c5092814a7abfabcbc9801e)]:
|
||||
- @thirdweb-dev/storage@1.2.3
|
||||
|
||||
## 3.10.42
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- [#1415](https://github.com/thirdweb-dev/js/pull/1415) [`256ee0d5`](https://github.com/thirdweb-dev/js/commit/256ee0d5ec9c8598aa79cd4cb1fd839c6cc7d390) Thanks [@joaquim-verges](https://github.com/joaquim-verges)! - Downgrade preconstruct to 2.7.0
|
||||
|
||||
- Updated dependencies [[`256ee0d5`](https://github.com/thirdweb-dev/js/commit/256ee0d5ec9c8598aa79cd4cb1fd839c6cc7d390)]:
|
||||
- @thirdweb-dev/storage@1.2.2
|
||||
- @thirdweb-dev/chains@0.1.40
|
||||
|
||||
## 3.10.41
|
||||
|
||||
### Patch Changes
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@thirdweb-dev/sdk",
|
||||
"version": "3.10.41",
|
||||
"version": "3.10.45",
|
||||
"description": "The main thirdweb SDK.",
|
||||
"repository": "https://github.com/thirdweb-dev/js/tree/main/packages/sdk",
|
||||
"license": "Apache-2.0",
|
||||
@@ -107,7 +107,7 @@
|
||||
"@microsoft/api-extractor": "^7.36.3",
|
||||
"@microsoft/tsdoc": "^0.14.1",
|
||||
"@nomiclabs/hardhat-ethers": "^2.2.3",
|
||||
"@preconstruct/cli": "^2.8.1",
|
||||
"@preconstruct/cli": "2.7.0",
|
||||
"@project-serum/anchor": "^0.25.0",
|
||||
"@solana/spl-token": "^0.3.5",
|
||||
"@solana/web3.js": "^1.62.0",
|
||||
|
||||
@@ -60,7 +60,7 @@ export function getChainProvider(
|
||||
// if we still don't have an url fall back to just using the chainId or slug in the rpc and try that
|
||||
if (!rpcUrl) {
|
||||
rpcUrl = `https://${chainId || network}.rpc.thirdweb.com/${
|
||||
options.clientId
|
||||
options.clientId || ""
|
||||
}`;
|
||||
}
|
||||
|
||||
@@ -158,7 +158,7 @@ export function getProviderFromRpcUrl(
|
||||
chainId?: number,
|
||||
) {
|
||||
try {
|
||||
const headers: Record<string, string> = {};
|
||||
const headers: HeadersInit = {};
|
||||
if (isTwUrl(rpcUrl)) {
|
||||
if (sdkOptions?.clientId) {
|
||||
headers["x-client-id"] = sdkOptions?.clientId;
|
||||
@@ -173,6 +173,12 @@ export function getProviderFromRpcUrl(
|
||||
} else if (sdkOptions?.secretKey) {
|
||||
headers["x-secret-key"] = sdkOptions?.secretKey;
|
||||
}
|
||||
// if we have a tw auth token on global context add it to the headers
|
||||
if (typeof globalThis !== "undefined" && "TW_AUTH_TOKEN" in globalThis) {
|
||||
headers["authorization"] = `Bearer ${
|
||||
(globalThis as any).TW_AUTH_TOKEN as string
|
||||
}`;
|
||||
}
|
||||
}
|
||||
const match = rpcUrl.match(/^(ws|http)s?:/i);
|
||||
// Try the JSON batch provider if available
|
||||
|
||||
@@ -270,6 +270,39 @@ export class Account<TContract extends IAccountCore>
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* Get all admins and non-admin signers with permissions to use the account.
|
||||
*
|
||||
* @example
|
||||
* ```javascript
|
||||
* const allAdminsAndSigners = await contract.account.getAllAdminsAndSigners();
|
||||
* ```
|
||||
*
|
||||
* @returns all admins and non-admin signers with permissions to use the account.
|
||||
*
|
||||
* @twfeature Account
|
||||
*/
|
||||
public async getAllAdminsAndSigners(): Promise<SignerWithPermissions[]> {
|
||||
const allAdmins = await this.getAllAdmins();
|
||||
const transformedAdmins: SignerWithPermissions[] = allAdmins.map(
|
||||
(admin) => {
|
||||
return {
|
||||
isAdmin: true,
|
||||
signer: admin,
|
||||
permissions: {
|
||||
startDate: new Date(0),
|
||||
expirationDate: new Date(0),
|
||||
nativeTokenLimitPerTransaction: BigNumber.from(0),
|
||||
approvedCallTargets: [],
|
||||
},
|
||||
};
|
||||
},
|
||||
);
|
||||
const allSigners = await this.getAllSigners();
|
||||
|
||||
return [...transformedAdmins, ...allSigners];
|
||||
}
|
||||
|
||||
/*********************************
|
||||
* WRITE FUNCTIONS
|
||||
********************************/
|
||||
|
||||
@@ -158,14 +158,17 @@ export class DropClaimConditions<
|
||||
await this.contractWrapper.readContract.claimCondition();
|
||||
const startId = currentStartId.toNumber();
|
||||
const count = countBn.toNumber();
|
||||
const conditions: AbstractClaimConditionContractStruct[] = [];
|
||||
const conditions: Promise<AbstractClaimConditionContractStruct>[] = [];
|
||||
for (let i = startId; i < startId + count; i++) {
|
||||
conditions.push(await this.get(i));
|
||||
conditions.push(this.get(i));
|
||||
}
|
||||
const metadata = await this.metadata.get();
|
||||
const decimals = await this.getTokenDecimals();
|
||||
const [metadata, decimals, ...fetchedConditions] = await Promise.all([
|
||||
this.metadata.get(),
|
||||
this.getTokenDecimals(),
|
||||
...conditions,
|
||||
]);
|
||||
return Promise.all(
|
||||
conditions.map((c) =>
|
||||
fetchedConditions.map((c) =>
|
||||
transformResultToClaimCondition(
|
||||
c,
|
||||
decimals,
|
||||
|
||||
@@ -89,6 +89,7 @@ import type {
|
||||
DeployOptions,
|
||||
DeployMetadata,
|
||||
DeployEvent,
|
||||
OpenEditionContractDeployMetadata,
|
||||
} from "../types/deploy";
|
||||
import type { ContractWithMetadata } from "../types/registry";
|
||||
import { DeploySchemaForPrebuiltContractType } from "../contracts";
|
||||
@@ -113,6 +114,7 @@ import { LoyaltyCardContractDeploy } from "../schema/contracts/loyalty-card";
|
||||
import { getDefaultTrustedForwarders } from "../constants";
|
||||
import { checkClientIdOrSecretKey } from "../../core/utils/apiKey";
|
||||
import { getProcessEnv } from "../../core/utils/process";
|
||||
import { DropErc721ContractSchema } from "../schema";
|
||||
|
||||
/**
|
||||
* The main entry point for the thirdweb SDK
|
||||
@@ -263,11 +265,11 @@ export class ThirdwebSDK extends RPCConnectionHandler {
|
||||
storage?: IThirdwebStorage,
|
||||
) {
|
||||
const apiKeyType = typeof window !== "undefined" ? "clientId" : "secretKey";
|
||||
checkClientIdOrSecretKey(
|
||||
`No ${apiKeyType} provided in ThirdwebSDK. You will have limited access to thirdweb's services for storage, RPC, and account abstraction. You can get a ${apiKeyType} from https://thirdweb.com/create-api-key`,
|
||||
options.clientId,
|
||||
options.secretKey,
|
||||
);
|
||||
let warnMessage = `No API key. Please provide a ${apiKeyType}. It is required to access thirdweb's services. You can create a key at https://thirdweb.com/create-api-key`;
|
||||
if (typeof window === "undefined" && !options.secretKey) {
|
||||
warnMessage = `Please provide a secret key instead of the clientId. Create a new API Key at https://thirdweb.com/create-api-key`;
|
||||
}
|
||||
checkClientIdOrSecretKey(warnMessage, options.clientId, options.secretKey);
|
||||
|
||||
if (isChainConfig(network)) {
|
||||
options = {
|
||||
@@ -1021,6 +1023,63 @@ export class ContractDeployer extends RPCConnectionHandler {
|
||||
},
|
||||
);
|
||||
|
||||
/**
|
||||
* Deploys a new OpenEditionERC721 contract
|
||||
*
|
||||
* @remarks Deploys a OpenEdition contract and returns the address of the deployed contract
|
||||
*
|
||||
* @example
|
||||
* ```javascript
|
||||
* const contractAddress = await sdk.deployer.deployOpenEdition({
|
||||
* name: "My Open Edition",
|
||||
* primary_sale_recipient: "your-address",
|
||||
* });
|
||||
* ```
|
||||
* @param metadata - the contract metadata
|
||||
* @returns the address of the deployed contract
|
||||
*/
|
||||
deployOpenEdition = /* @__PURE__ */ buildDeployTransactionFunction(
|
||||
async (
|
||||
metadata: OpenEditionContractDeployMetadata,
|
||||
options?: DeployOptions,
|
||||
): Promise<DeployTransaction> => {
|
||||
const parsedMetadata = await DropErc721ContractSchema.deploy.parseAsync(
|
||||
metadata,
|
||||
);
|
||||
const contractURI = await this.storage.upload(parsedMetadata);
|
||||
|
||||
const chainId = (await this.getProvider().getNetwork()).chainId;
|
||||
const trustedForwarders = getDefaultTrustedForwarders(chainId);
|
||||
// add default forwarders to any custom forwarders passed in
|
||||
if (
|
||||
metadata.trusted_forwarders &&
|
||||
metadata.trusted_forwarders.length > 0
|
||||
) {
|
||||
trustedForwarders.push(...metadata.trusted_forwarders);
|
||||
}
|
||||
|
||||
const signerAddress = await this.getSigner()?.getAddress();
|
||||
|
||||
const deployArgs = [
|
||||
signerAddress,
|
||||
parsedMetadata.name,
|
||||
parsedMetadata.symbol,
|
||||
contractURI,
|
||||
trustedForwarders,
|
||||
parsedMetadata.primary_sale_recipient,
|
||||
parsedMetadata.fee_recipient,
|
||||
parsedMetadata.seller_fee_basis_points,
|
||||
];
|
||||
|
||||
return await this.deployReleasedContract.prepare(
|
||||
THIRDWEB_DEPLOYER,
|
||||
"OpenEditionERC721",
|
||||
deployArgs,
|
||||
options,
|
||||
);
|
||||
},
|
||||
);
|
||||
|
||||
/**
|
||||
* Deploys a new SignatureDrop contract
|
||||
*
|
||||
@@ -1457,6 +1516,8 @@ export class ContractDeployer extends RPCConnectionHandler {
|
||||
* @param publisherAddress the address of the publisher
|
||||
* @param contractName the name of the contract to deploy
|
||||
* @param constructorParams the constructor params to pass to the contract
|
||||
*
|
||||
* @deprecated use deployPublishedContract instead
|
||||
*/
|
||||
deployReleasedContract = /* @__PURE__ */ buildDeployTransactionFunction(
|
||||
async (
|
||||
@@ -1479,6 +1540,16 @@ export class ContractDeployer extends RPCConnectionHandler {
|
||||
},
|
||||
);
|
||||
|
||||
/**
|
||||
* Deploy any published contract by its name
|
||||
* @param publisherAddress the address of the publisher
|
||||
* @param contractName the name of the contract to deploy
|
||||
* @param constructorParams the constructor params to pass to the contract
|
||||
* @param version Optional: the version of the contract to deploy or "latest"
|
||||
* @param options Optional: the deploy options
|
||||
*/
|
||||
deployPublishedContract = this.deployReleasedContract;
|
||||
|
||||
/**
|
||||
* Deploy a proxy contract of a given implementation via the given factory
|
||||
* @param factoryAddress
|
||||
|
||||
@@ -23,6 +23,7 @@ export type SignerPermissionsInput = z.input<typeof SignerPermissionsSchema>;
|
||||
export type SignerPermissionsOutput = z.output<typeof SignerPermissionsSchema>;
|
||||
|
||||
export type SignerWithPermissions = {
|
||||
isAdmin?: boolean;
|
||||
signer: string;
|
||||
permissions: SignerPermissions;
|
||||
};
|
||||
|
||||
@@ -58,6 +58,53 @@ export interface NFTContractDeployMetadata {
|
||||
app_uri?: string;
|
||||
}
|
||||
|
||||
/**
|
||||
* Options for deploying an OpenEdition contract
|
||||
* @public
|
||||
*/
|
||||
export interface OpenEditionContractDeployMetadata {
|
||||
/**
|
||||
* name of the contract
|
||||
*/
|
||||
name: string;
|
||||
/**
|
||||
* Optional description of the contract
|
||||
*/
|
||||
description?: string;
|
||||
/**
|
||||
* Optional image for the contract
|
||||
*/
|
||||
image?: FileOrBufferOrString;
|
||||
/**
|
||||
* Optional url for the contract
|
||||
*/
|
||||
external_link?: string;
|
||||
/**
|
||||
* Symbol for the NFTs
|
||||
*/
|
||||
symbol?: string;
|
||||
/**
|
||||
* Custom gasless trusted forwarder addresses
|
||||
*/
|
||||
trusted_forwarders?: AddressOrEns[];
|
||||
/**
|
||||
* The address that will receive the proceeds from primary sales
|
||||
*/
|
||||
primary_sale_recipient: AddressOrEns;
|
||||
/**
|
||||
* The address that will receive the proceeds from secondary sales (royalties)
|
||||
*/
|
||||
fee_recipient?: AddressOrEns;
|
||||
/**
|
||||
* The percentage (in basis points) of royalties for secondary sales
|
||||
*/
|
||||
seller_fee_basis_points?: number;
|
||||
/**
|
||||
* The default app for this contract
|
||||
*/
|
||||
app_uri?: string;
|
||||
}
|
||||
|
||||
/**
|
||||
* Options for deploying a Token contract
|
||||
* @public
|
||||
|
||||
@@ -1,5 +1,45 @@
|
||||
# @thirdweb-dev/service-utils
|
||||
|
||||
## 0.3.1
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- [#1447](https://github.com/thirdweb-dev/js/pull/1447) [`b103872d`](https://github.com/thirdweb-dev/js/commit/b103872daff87b032082a433713d16b9dee13082) Thanks [@nessup](https://github.com/nessup)! - Export extractAuthorizationData for CF Workers
|
||||
|
||||
## 0.3.0
|
||||
|
||||
### Minor Changes
|
||||
|
||||
- [#1424](https://github.com/thirdweb-dev/js/pull/1424) [`d01e6396`](https://github.com/thirdweb-dev/js/commit/d01e6396d176a162aaacb10792f0d9abade62a1f) Thanks [@arcoraven](https://github.com/arcoraven)! - Add helper to publish usage events from backend services
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- [#1440](https://github.com/thirdweb-dev/js/pull/1440) [`5ec0f064`](https://github.com/thirdweb-dev/js/commit/5ec0f064d27acbd5225934dfe8ea2cd2c5af3997) Thanks [@arcoraven](https://github.com/arcoraven)! - [service-utils] Switch to aws4fetch to call AWS services
|
||||
|
||||
- [#1437](https://github.com/thirdweb-dev/js/pull/1437) [`5ee700e8`](https://github.com/thirdweb-dev/js/commit/5ee700e80438650fa253c25c0bee6658ce68d2cf) Thanks [@farhanW3](https://github.com/farhanW3)! - Updated the error messages
|
||||
|
||||
- [#1435](https://github.com/thirdweb-dev/js/pull/1435) [`2a3cd62d`](https://github.com/thirdweb-dev/js/commit/2a3cd62dc9af6accae5c2c48ef4956d139a637e4) Thanks [@arcoraven](https://github.com/arcoraven)! - Use string type for gasPricePerUnit
|
||||
|
||||
## 0.2.5
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- [#1411](https://github.com/thirdweb-dev/js/pull/1411) [`3b6b0746`](https://github.com/thirdweb-dev/js/commit/3b6b0746b3fc792f4c5092814a7abfabcbc9801e) Thanks [@jnsdls](https://github.com/jnsdls)! - allow account level auth via jwt
|
||||
|
||||
## 0.2.4
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- [#1420](https://github.com/thirdweb-dev/js/pull/1420) [`952009cd`](https://github.com/thirdweb-dev/js/commit/952009cd73a1851dfef7a8f8c29ab6d73d580508) Thanks [@joaquim-verges](https://github.com/joaquim-verges)! - Handle \* domain as public
|
||||
|
||||
- [#1417](https://github.com/thirdweb-dev/js/pull/1417) [`580e77b1`](https://github.com/thirdweb-dev/js/commit/580e77b17088a439208bd1411c71e9fb0c2cbb79) Thanks [@joaquim-verges](https://github.com/joaquim-verges)! - Return accountId from authorize service call
|
||||
|
||||
## 0.2.3
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- [#1415](https://github.com/thirdweb-dev/js/pull/1415) [`256ee0d5`](https://github.com/thirdweb-dev/js/commit/256ee0d5ec9c8598aa79cd4cb1fd839c6cc7d390) Thanks [@joaquim-verges](https://github.com/joaquim-verges)! - Downgrade preconstruct to 2.7.0
|
||||
|
||||
## 0.2.2
|
||||
|
||||
### Patch Changes
|
||||
|
||||
@@ -1 +1,7 @@
|
||||
### todo
|
||||
# Service Utils
|
||||
|
||||
This repository contains utilities that handle common requirements for thirdweb services.
|
||||
|
||||
- `/cf-worker`: for use only in Cloudflare Worker services
|
||||
- `/node`: for use in self-hosted services
|
||||
- `/core`: for use in any service
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@thirdweb-dev/service-utils",
|
||||
"version": "0.2.2",
|
||||
"version": "0.3.1",
|
||||
"main": "dist/thirdweb-dev-service-utils.cjs.js",
|
||||
"module": "dist/thirdweb-dev-service-utils.esm.js",
|
||||
"exports": {
|
||||
@@ -40,7 +40,8 @@
|
||||
"sideEffects": false,
|
||||
"devDependencies": {
|
||||
"@cloudflare/workers-types": "^4.20230724.0",
|
||||
"@preconstruct/cli": "^2.8.1",
|
||||
"@preconstruct/cli": "2.7.0",
|
||||
"@smithy/types": "^2.0.2",
|
||||
"@thirdweb-dev/tsconfig": "workspace:*",
|
||||
"@types/jest": "^29.5.3",
|
||||
"@types/node": "^18.17.1",
|
||||
@@ -61,5 +62,9 @@
|
||||
"build": "tsc && preconstruct build",
|
||||
"push": "yalc push",
|
||||
"test": "jest"
|
||||
},
|
||||
"dependencies": {
|
||||
"aws4fetch": "^1.0.17",
|
||||
"zod": "^3.20.2"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,5 +1,9 @@
|
||||
import type { ExecutionContext, KVNamespace } from "@cloudflare/workers-types";
|
||||
import type { ApiKeyMetadata, CoreServiceConfig } from "../core/api";
|
||||
import type {
|
||||
ApiKeyMetadata,
|
||||
AccountMetadata,
|
||||
CoreServiceConfig,
|
||||
} from "../core/api";
|
||||
import { authorize } from "../core/authorize";
|
||||
|
||||
import type { Request } from "@cloudflare/workers-types";
|
||||
@@ -8,6 +12,7 @@ import type { AuthorizationResult } from "../core/authorize/types";
|
||||
import type { CoreAuthInput } from "../core/types";
|
||||
|
||||
export * from "../core/services";
|
||||
export * from "./usage";
|
||||
|
||||
type WorkerServiceConfig = CoreServiceConfig & {
|
||||
kvStore: KVNamespace;
|
||||
@@ -47,7 +52,7 @@ export async function authorizeWorker(
|
||||
|
||||
return await authorize(authData, serviceConfig, {
|
||||
get: async (clientId: string) => serviceConfig.kvStore.get(clientId),
|
||||
put: (clientId: string, apiKeyMeta: ApiKeyMetadata) =>
|
||||
put: (clientId: string, apiKeyMeta: ApiKeyMetadata | AccountMetadata) =>
|
||||
serviceConfig.ctx.waitUntil(
|
||||
serviceConfig.kvStore.put(
|
||||
clientId,
|
||||
@@ -68,7 +73,7 @@ export async function authorizeWorker(
|
||||
});
|
||||
}
|
||||
|
||||
async function extractAuthorizationData(
|
||||
export async function extractAuthorizationData(
|
||||
authInput: AuthInput,
|
||||
): Promise<AuthorizationInput> {
|
||||
const requestUrl = new URL(authInput.req.url);
|
||||
@@ -124,7 +129,20 @@ async function extractAuthorizationData(
|
||||
clientId = derivedClientId;
|
||||
}
|
||||
|
||||
let jwt: string | null = null;
|
||||
if (headers.has("authorization")) {
|
||||
const authHeader = headers.get("authorization");
|
||||
if (authHeader) {
|
||||
const [type, token] = authHeader.split(" ");
|
||||
if (type.toLowerCase() === "bearer") {
|
||||
jwt = token;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return {
|
||||
jwt,
|
||||
hashedJWT: jwt ? await hashSecretKey(jwt) : null,
|
||||
secretKey,
|
||||
clientId,
|
||||
origin,
|
||||
|
||||
@@ -0,0 +1,96 @@
|
||||
import { AwsClient } from "aws4fetch";
|
||||
import { z } from "zod";
|
||||
|
||||
// Initialize a singleton for aws usage.
|
||||
let _aws: AwsClient | undefined;
|
||||
function getAws(options: ConstructorParameters<typeof AwsClient>[0]) {
|
||||
if (!_aws) {
|
||||
_aws = new AwsClient(options);
|
||||
}
|
||||
return _aws;
|
||||
}
|
||||
|
||||
/**
|
||||
* Types
|
||||
*/
|
||||
const usageEventSchema = z.object({
|
||||
source: z.enum([
|
||||
"wallet",
|
||||
"rpc",
|
||||
"storage",
|
||||
"bundler",
|
||||
"paymaster",
|
||||
"relayer",
|
||||
]),
|
||||
action: z.string(),
|
||||
accountId: z.string(),
|
||||
|
||||
// Optional
|
||||
apiKeyId: z.string().optional(),
|
||||
creatorWalletAddress: z.string().optional(),
|
||||
clientId: z.string().optional(),
|
||||
walletAddress: z.string().optional(),
|
||||
chainId: z.number().int().positive().optional(),
|
||||
provider: z.string().optional(),
|
||||
mimeType: z.string().optional(),
|
||||
fileSize: z.number().int().nonnegative().optional(),
|
||||
fileCid: z.string().optional(),
|
||||
transactionHash: z.string().optional(),
|
||||
gasLimit: z.number().nonnegative().optional(),
|
||||
gasPricePerUnit: z.string().optional(),
|
||||
});
|
||||
export type UsageEvent = z.infer<typeof usageEventSchema>;
|
||||
|
||||
/**
|
||||
* Publish usage events. Provide the relevant fields for your application.
|
||||
*
|
||||
* Usage in Cloudflare Workers:
|
||||
* ctx.waitUntil(
|
||||
* publishUsageEvents(
|
||||
* [event1, event2],
|
||||
* { queueUrl, accessKeyId, secretAccessKey },
|
||||
* )
|
||||
* )
|
||||
*
|
||||
* @param usageEvents
|
||||
* @param config
|
||||
*/
|
||||
export async function publishUsageEvents(
|
||||
usageEvents: UsageEvent[],
|
||||
config: {
|
||||
queueUrl: string;
|
||||
accessKeyId: string;
|
||||
secretAccessKey: string;
|
||||
region?: string;
|
||||
},
|
||||
): Promise<string> {
|
||||
const {
|
||||
queueUrl,
|
||||
accessKeyId,
|
||||
secretAccessKey,
|
||||
region = "us-west-2",
|
||||
} = config;
|
||||
|
||||
const entries = usageEvents.map((event) => ({
|
||||
Id: crypto.randomUUID(),
|
||||
MessageBody: JSON.stringify(event),
|
||||
}));
|
||||
|
||||
const aws = getAws({
|
||||
accessKeyId,
|
||||
secretAccessKey,
|
||||
region,
|
||||
});
|
||||
const res = await aws.fetch(`https://sqs.${region}.amazonaws.com`, {
|
||||
headers: {
|
||||
"X-Amz-Target": "AmazonSQS.SendMessageBatch",
|
||||
"X-Amz-Date": new Date().toISOString(),
|
||||
"Content-Type": "application/x-amz-json-1.0",
|
||||
},
|
||||
body: JSON.stringify({
|
||||
QueueUrl: queueUrl,
|
||||
Entries: entries,
|
||||
}),
|
||||
});
|
||||
return await res.text();
|
||||
}
|
||||
@@ -11,6 +11,7 @@ export type CoreServiceConfig = {
|
||||
export type ApiKeyMetadata = {
|
||||
id: string;
|
||||
key: string;
|
||||
accountId: string;
|
||||
creatorWalletAddress: string;
|
||||
secretHash: string;
|
||||
walletAddresses: string[];
|
||||
@@ -23,6 +24,12 @@ export type ApiKeyMetadata = {
|
||||
}[];
|
||||
};
|
||||
|
||||
export type AccountMetadata = {
|
||||
id: string;
|
||||
name: string;
|
||||
creatorWalletAddress: string;
|
||||
};
|
||||
|
||||
export type ApiResponse = {
|
||||
data: ApiKeyMetadata | null;
|
||||
error: {
|
||||
@@ -32,6 +39,15 @@ export type ApiResponse = {
|
||||
};
|
||||
};
|
||||
|
||||
export type ApiAccountResponse = {
|
||||
data: AccountMetadata | null;
|
||||
error: {
|
||||
code: string;
|
||||
statusCode: number;
|
||||
message: string;
|
||||
};
|
||||
};
|
||||
|
||||
export async function fetchKeyMetadataFromApi(
|
||||
clientId: string,
|
||||
config: CoreServiceConfig,
|
||||
@@ -52,3 +68,23 @@ export async function fetchKeyMetadataFromApi(
|
||||
}
|
||||
return (await response.json()) as ApiResponse;
|
||||
}
|
||||
|
||||
export async function fetchAccountFromApi(
|
||||
jwt: string,
|
||||
config: CoreServiceConfig,
|
||||
): Promise<ApiAccountResponse> {
|
||||
const { apiUrl, serviceApiKey } = config;
|
||||
const url = `${apiUrl}/v1/account/me`;
|
||||
const response = await fetch(url, {
|
||||
method: "GET",
|
||||
headers: {
|
||||
"x-service-api-key": serviceApiKey,
|
||||
"content-type": "application/json",
|
||||
authorization: `Bearer ${jwt}`,
|
||||
},
|
||||
});
|
||||
if (!response.ok) {
|
||||
throw new Error(`Error fetching account from API: ${response.statusText}`);
|
||||
}
|
||||
return (await response.json()) as ApiAccountResponse;
|
||||
}
|
||||
|
||||
@@ -17,6 +17,8 @@ describe("authorizeClient", () => {
|
||||
origin: null,
|
||||
bundleId: null,
|
||||
secretKeyHash: null,
|
||||
hashedJWT: null,
|
||||
jwt: null,
|
||||
},
|
||||
validServiceConfig,
|
||||
)) as any;
|
||||
@@ -33,6 +35,8 @@ describe("authorizeClient", () => {
|
||||
origin: null,
|
||||
bundleId: null,
|
||||
secretKeyHash: null,
|
||||
hashedJWT: null,
|
||||
jwt: null,
|
||||
},
|
||||
{ ...validServiceConfig, enforceAuth: true },
|
||||
)) as any;
|
||||
|
||||
@@ -11,6 +11,7 @@ describe("authorizeClient", () => {
|
||||
domains: ["example.com", "*.example.com"],
|
||||
bundleIds: ["com.example.app"],
|
||||
services: [],
|
||||
accountId: "test-account-id",
|
||||
};
|
||||
|
||||
const validAuthOptions: ClientAuthorizationPayload = {
|
||||
@@ -40,6 +41,26 @@ describe("authorizeClient", () => {
|
||||
expect(result.apiKeyMeta).toEqual(validApiKeyMeta);
|
||||
});
|
||||
|
||||
it("should authorize client with any domain w/o origin check", () => {
|
||||
const authOptionsWithAnyDomain: ClientAuthorizationPayload = {
|
||||
secretKeyHash: null,
|
||||
bundleId: null,
|
||||
origin: null,
|
||||
};
|
||||
|
||||
const validApiKeyMetaAnyDomain = {
|
||||
...validApiKeyMeta,
|
||||
domains: ["*"],
|
||||
};
|
||||
|
||||
const result = authorizeClient(
|
||||
authOptionsWithAnyDomain,
|
||||
validApiKeyMetaAnyDomain,
|
||||
) as any;
|
||||
expect(result.authorized).toBe(true);
|
||||
expect(result.apiKeyMeta).toEqual(validApiKeyMetaAnyDomain);
|
||||
});
|
||||
|
||||
it("should not authorize client with non-matching bundle id", () => {
|
||||
const authOptionsWithBundleId: ClientAuthorizationPayload = {
|
||||
secretKeyHash: null,
|
||||
@@ -53,7 +74,7 @@ describe("authorizeClient", () => {
|
||||
) as any;
|
||||
expect(result.authorized).toBe(false);
|
||||
expect(result.errorMessage).toBe(
|
||||
"The bundleId: com.foo.bar, is not authorized for this key. Please update your key permissions on the thirdweb dashboard",
|
||||
"Invalid request: Unauthorized Bundle ID: com.foo.bar. You can view the restrictions on this API key at https://thirdweb.com/create-api-key",
|
||||
);
|
||||
expect(result.errorCode).toBe("BUNDLE_UNAUTHORIZED");
|
||||
expect(result.status).toBe(401);
|
||||
@@ -72,7 +93,7 @@ describe("authorizeClient", () => {
|
||||
) as any;
|
||||
expect(result.authorized).toBe(false);
|
||||
expect(result.errorMessage).toBe(
|
||||
"The secret is invalid. Please check you secret-key",
|
||||
"Incorrect key provided. You can view your active API keys at https://thirdweb.com/dashboard/settings",
|
||||
);
|
||||
expect(result.errorCode).toBe("SECRET_INVALID");
|
||||
expect(result.status).toBe(401);
|
||||
@@ -91,7 +112,7 @@ describe("authorizeClient", () => {
|
||||
) as any;
|
||||
expect(result.authorized).toBe(false);
|
||||
expect(result.errorMessage).toBe(
|
||||
"The domain: unauthorized.com, is not authorized for this key. Please update your key permissions on the thirdweb dashboard",
|
||||
"Invalid request: Unauthorized domain: unauthorized.com. You can view the restrictions on this API key at https://thirdweb.com/create-api-key",
|
||||
);
|
||||
expect(result.errorCode).toBe("ORIGIN_UNAUTHORIZED");
|
||||
expect(result.status).toBe(401);
|
||||
|
||||
@@ -14,19 +14,35 @@ export function authorizeClient(
|
||||
const { origin, bundleId, secretKeyHash: providedSecretHash } = authOptions;
|
||||
const { domains, bundleIds, secretHash } = apiKeyMeta;
|
||||
|
||||
const authResult: AuthorizationResult = {
|
||||
authorized: true,
|
||||
apiKeyMeta,
|
||||
accountMeta: {
|
||||
id: apiKeyMeta.accountId,
|
||||
// TODO update this later
|
||||
name: "",
|
||||
creatorWalletAddress: apiKeyMeta.creatorWalletAddress,
|
||||
},
|
||||
};
|
||||
|
||||
// check for public restrictions
|
||||
if (domains.includes("*")) {
|
||||
return authResult;
|
||||
}
|
||||
|
||||
// check for secretHash
|
||||
if (providedSecretHash) {
|
||||
if (secretHash !== providedSecretHash) {
|
||||
return {
|
||||
authorized: false,
|
||||
errorMessage: "The secret is invalid. Please check you secret-key",
|
||||
errorMessage:
|
||||
"Incorrect key provided. You can view your active API keys at https://thirdweb.com/dashboard/settings",
|
||||
errorCode: "SECRET_INVALID",
|
||||
status: 401,
|
||||
};
|
||||
}
|
||||
return {
|
||||
authorized: true,
|
||||
apiKeyMeta,
|
||||
};
|
||||
|
||||
return authResult;
|
||||
}
|
||||
|
||||
// validate domains
|
||||
@@ -34,14 +50,22 @@ export function authorizeClient(
|
||||
if (
|
||||
// find matching domain, or if all domains allowed
|
||||
domains.find((d) => {
|
||||
// if any domain is allowed, we'll return true
|
||||
if (d === "*") {
|
||||
return true;
|
||||
}
|
||||
|
||||
// special rule for `localhost`
|
||||
// if the domain is localhost, we'll allow any origin that starts with localhost
|
||||
if (d === "localhost" && origin.startsWith("localhost")) {
|
||||
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);
|
||||
// get rid of the * and check if it ends with the `.<domain>.<tld>`
|
||||
const domainRoot = d.slice(1);
|
||||
return origin.endsWith(domainRoot);
|
||||
}
|
||||
|
||||
@@ -49,15 +73,12 @@ export function authorizeClient(
|
||||
return d === origin;
|
||||
})
|
||||
) {
|
||||
return {
|
||||
authorized: true,
|
||||
apiKeyMeta,
|
||||
};
|
||||
return authResult;
|
||||
}
|
||||
|
||||
return {
|
||||
authorized: false,
|
||||
errorMessage: `The domain: ${origin}, is not authorized for this key. Please update your key permissions on the thirdweb dashboard`,
|
||||
errorMessage: `Invalid request: Unauthorized domain: ${origin}. You can view the restrictions on this API key at https://thirdweb.com/create-api-key`,
|
||||
errorCode: "ORIGIN_UNAUTHORIZED",
|
||||
status: 401,
|
||||
};
|
||||
@@ -75,15 +96,12 @@ export function authorizeClient(
|
||||
return b === bundleId;
|
||||
})
|
||||
) {
|
||||
return {
|
||||
authorized: true,
|
||||
apiKeyMeta,
|
||||
};
|
||||
return authResult;
|
||||
}
|
||||
|
||||
return {
|
||||
authorized: false,
|
||||
errorMessage: `The bundleId: ${bundleId}, is not authorized for this key. Please update your key permissions on the thirdweb dashboard`,
|
||||
errorMessage: `Invalid request: Unauthorized Bundle ID: ${bundleId}. You can view the restrictions on this API key at https://thirdweb.com/create-api-key`,
|
||||
errorCode: "BUNDLE_UNAUTHORIZED",
|
||||
status: 401,
|
||||
};
|
||||
|
||||
@@ -1,6 +1,8 @@
|
||||
import {
|
||||
AccountMetadata,
|
||||
ApiKeyMetadata,
|
||||
CoreServiceConfig,
|
||||
fetchAccountFromApi,
|
||||
fetchKeyMetadataFromApi,
|
||||
} from "../api";
|
||||
import { authorizeClient } from "./client";
|
||||
@@ -13,36 +15,124 @@ export type AuthorizationInput = {
|
||||
origin: string | null;
|
||||
bundleId: string | null;
|
||||
secretKeyHash: string | null;
|
||||
jwt: string | null;
|
||||
hashedJWT: string | null;
|
||||
targetAddress?: string | string[];
|
||||
};
|
||||
|
||||
type CacheOptions = {
|
||||
get: (clientId: string) => Promise<string | null>;
|
||||
put: (clientId: string, data: ApiKeyMetadata) => Promise<void> | void;
|
||||
put: (
|
||||
clientId: string,
|
||||
data: ApiKeyMetadata | AccountMetadata,
|
||||
) => Promise<void> | void;
|
||||
cacheTtlSeconds: number;
|
||||
};
|
||||
|
||||
type CacheWithPossibleTtl =
|
||||
type ApiKeyCacheWithPossibleTTL =
|
||||
| {
|
||||
apiKeyMeta: ApiKeyMetadata;
|
||||
updatedAt: number;
|
||||
}
|
||||
| ApiKeyMetadata;
|
||||
|
||||
type AccountCacheWithPossibleTTL =
|
||||
| {
|
||||
apiKeyMeta: AccountMetadata;
|
||||
updatedAt: number;
|
||||
}
|
||||
| AccountMetadata;
|
||||
|
||||
export async function authorize(
|
||||
authData: AuthorizationInput,
|
||||
serviceConfig: CoreServiceConfig,
|
||||
cacheOptions?: CacheOptions,
|
||||
): Promise<AuthorizationResult> {
|
||||
const { clientId, targetAddress, secretKeyHash } = authData;
|
||||
const { clientId, targetAddress, secretKeyHash, jwt, hashedJWT } = authData;
|
||||
const { enforceAuth } = serviceConfig;
|
||||
|
||||
// BACKWARDS COMPAT: if auth not enforced and
|
||||
// we don't have auth credentials bypass
|
||||
// BACKWARDS COMPAT: if auth not enforced and we don't have auth credentials bypass
|
||||
if (!enforceAuth && !clientId && !secretKeyHash) {
|
||||
return {
|
||||
authorized: true,
|
||||
apiKeyMeta: null,
|
||||
accountMeta: null,
|
||||
};
|
||||
}
|
||||
// if we come in with a JWT then we only check the account is valid
|
||||
if (jwt && hashedJWT) {
|
||||
let accountMeta: AccountMetadata | null = null;
|
||||
if (cacheOptions) {
|
||||
try {
|
||||
const cachedAccountInfo = await cacheOptions.get(hashedJWT);
|
||||
if (cachedAccountInfo) {
|
||||
const parsed = JSON.parse(
|
||||
cachedAccountInfo,
|
||||
) as AccountCacheWithPossibleTTL;
|
||||
if ("updatedAt" in parsed) {
|
||||
// we want to compare the updatedAt time to the current time
|
||||
// if the difference is greater than the cacheTtl we want to ignore the cached data
|
||||
const now = Date.now();
|
||||
const diff = now - parsed.updatedAt;
|
||||
const cacheTtl = cacheOptions.cacheTtlSeconds * 1000;
|
||||
// only if the diff is less than the cacheTtl do we want to use the cached key
|
||||
if (diff < cacheTtl * 1000) {
|
||||
accountMeta = parsed.apiKeyMeta;
|
||||
}
|
||||
} else {
|
||||
accountMeta = parsed;
|
||||
}
|
||||
}
|
||||
} catch (err) {
|
||||
// ignore errors, proceed as if not in cache
|
||||
}
|
||||
}
|
||||
if (!accountMeta) {
|
||||
try {
|
||||
const { data, error } = await fetchAccountFromApi(jwt, serviceConfig);
|
||||
if (error) {
|
||||
return {
|
||||
authorized: false,
|
||||
errorCode: error.code,
|
||||
errorMessage: error.message,
|
||||
status: error.statusCode,
|
||||
};
|
||||
} else if (!data) {
|
||||
return {
|
||||
authorized: false,
|
||||
errorCode: "NO_ACCOUNT",
|
||||
errorMessage: "No error but also no account returned.",
|
||||
status: 500,
|
||||
};
|
||||
}
|
||||
accountMeta = data;
|
||||
if (cacheOptions) {
|
||||
await cacheOptions.put(hashedJWT, accountMeta);
|
||||
}
|
||||
} catch (err) {
|
||||
console.warn("failed to fetch account from api", err);
|
||||
return {
|
||||
authorized: false,
|
||||
status: 500,
|
||||
errorMessage: "Failed to account information.",
|
||||
errorCode: "FAILED_TO_ACCOUNT",
|
||||
};
|
||||
}
|
||||
}
|
||||
// if we still don't have an accountMeta at this point we can't authorize
|
||||
if (!accountMeta) {
|
||||
return {
|
||||
authorized: false,
|
||||
status: 401,
|
||||
errorMessage: "Missing account information.",
|
||||
errorCode: "MISSING_ACCOUNT",
|
||||
};
|
||||
}
|
||||
// otherwise we want to return early with the accountMeta
|
||||
return {
|
||||
authorized: true,
|
||||
apiKeyMeta: null,
|
||||
accountMeta,
|
||||
};
|
||||
}
|
||||
|
||||
@@ -62,7 +152,7 @@ export async function authorize(
|
||||
try {
|
||||
const cachedKey = await cacheOptions.get(clientId);
|
||||
if (cachedKey) {
|
||||
const parsed = JSON.parse(cachedKey) as CacheWithPossibleTtl;
|
||||
const parsed = JSON.parse(cachedKey) as ApiKeyCacheWithPossibleTTL;
|
||||
if ("updatedAt" in parsed) {
|
||||
// we want to compare the updatedAt time to the current time
|
||||
// if the difference is greater than the cacheTtl we want to ignore the cached data
|
||||
@@ -161,5 +251,11 @@ export async function authorize(
|
||||
return {
|
||||
authorized: true,
|
||||
apiKeyMeta,
|
||||
accountMeta: {
|
||||
id: apiKeyMeta.accountId,
|
||||
// TODO update this later
|
||||
name: "",
|
||||
creatorWalletAddress: apiKeyMeta.creatorWalletAddress,
|
||||
},
|
||||
};
|
||||
}
|
||||
|
||||
@@ -10,6 +10,7 @@ describe("authorizeService", () => {
|
||||
walletAddresses: [],
|
||||
domains: [],
|
||||
bundleIds: [],
|
||||
accountId: "test-account-id",
|
||||
services: [
|
||||
{
|
||||
name: "storage",
|
||||
@@ -79,7 +80,7 @@ describe("authorizeService", () => {
|
||||
) as any;
|
||||
expect(result.authorized).toBe(false);
|
||||
expect(result.errorMessage).toBe(
|
||||
'The service "rpc" is not authorized for this key. Please update your key permissions on the thirdweb dashboard.',
|
||||
"Invalid request: Unauthorized service: rpc. You can view the restrictions on this API key in your dashboard: https://thirdweb.com/create-api-key",
|
||||
);
|
||||
expect(result.errorCode).toBe("SERVICE_UNAUTHORIZED");
|
||||
expect(result.status).toBe(403);
|
||||
@@ -100,7 +101,7 @@ describe("authorizeService", () => {
|
||||
) as any;
|
||||
expect(result.authorized).toBe(false);
|
||||
expect(result.errorMessage).toBe(
|
||||
'The service "storage" action "unauthorized-action" is not authorized for this key. Please update your key permissions on the thirdweb dashboard.',
|
||||
"Invalid request: Unauthorized action: storage unauthorized-action. You can view the restrictions on this API key in your dashboard: https://thirdweb.com/create-api-key",
|
||||
);
|
||||
expect(result.errorCode).toBe("SERVICE_ACTION_UNAUTHORIZED");
|
||||
expect(result.status).toBe(403);
|
||||
@@ -118,7 +119,7 @@ describe("authorizeService", () => {
|
||||
) as any;
|
||||
expect(result.authorized).toBe(false);
|
||||
expect(result.errorMessage).toBe(
|
||||
'The target address: unauthorized-target, for service "storage" is not authorized for this key. Please update your key permissions on the thirdweb dashboard.',
|
||||
"Invalid request: Unauthorized address: storage unauthorized-target. You can view the restrictions on this API key in your dashboard: https://thirdweb.com/create-api-key",
|
||||
);
|
||||
expect(result.errorCode).toBe("SERVICE_TARGET_ADDRESS_UNAUTHORIZED");
|
||||
expect(result.status).toBe(403);
|
||||
@@ -136,7 +137,7 @@ describe("authorizeService", () => {
|
||||
) as any;
|
||||
expect(result.authorized).toBe(false);
|
||||
expect(result.errorMessage).toBe(
|
||||
'The target address: target1,target2,target3, for service "storage" is not authorized for this key. Please update your key permissions on the thirdweb dashboard.',
|
||||
"Invalid request: Unauthorized address: storage target1,target2,target3. You can view the restrictions on this API key in your dashboard: https://thirdweb.com/create-api-key",
|
||||
);
|
||||
expect(result.errorCode).toBe("SERVICE_TARGET_ADDRESS_UNAUTHORIZED");
|
||||
expect(result.status).toBe(403);
|
||||
|
||||
@@ -16,7 +16,7 @@ export function authorizeService(
|
||||
if (!service) {
|
||||
return {
|
||||
authorized: false,
|
||||
errorMessage: `The service "${serviceConfig.serviceScope}" is not authorized for this key. Please update your key permissions on the thirdweb dashboard.`,
|
||||
errorMessage: `Invalid request: Unauthorized service: ${serviceConfig.serviceScope}. You can view the restrictions on this API key in your dashboard: https://thirdweb.com/create-api-key`,
|
||||
errorCode: "SERVICE_UNAUTHORIZED",
|
||||
status: 403,
|
||||
};
|
||||
@@ -30,7 +30,7 @@ export function authorizeService(
|
||||
if (!isActionAllowed) {
|
||||
return {
|
||||
authorized: false,
|
||||
errorMessage: `The service "${serviceConfig.serviceScope}" action "${serviceConfig.serviceAction}" is not authorized for this key. Please update your key permissions on the thirdweb dashboard.`,
|
||||
errorMessage: `Invalid request: Unauthorized action: ${serviceConfig.serviceScope} ${serviceConfig.serviceAction}. You can view the restrictions on this API key in your dashboard: https://thirdweb.com/create-api-key`,
|
||||
errorCode: "SERVICE_ACTION_UNAUTHORIZED",
|
||||
status: 403,
|
||||
};
|
||||
@@ -52,7 +52,7 @@ export function authorizeService(
|
||||
) {
|
||||
return {
|
||||
authorized: false,
|
||||
errorMessage: `The target address: ${checkedAddresses}, for service "${serviceConfig.serviceScope}" is not authorized for this key. Please update your key permissions on the thirdweb dashboard.`,
|
||||
errorMessage: `Invalid request: Unauthorized address: ${serviceConfig.serviceScope} ${checkedAddresses}. You can view the restrictions on this API key in your dashboard: https://thirdweb.com/create-api-key`,
|
||||
errorCode: "SERVICE_TARGET_ADDRESS_UNAUTHORIZED",
|
||||
status: 403,
|
||||
};
|
||||
@@ -61,6 +61,11 @@ export function authorizeService(
|
||||
|
||||
return {
|
||||
authorized: true,
|
||||
accountMeta: {
|
||||
id: apiKeyMetadata.accountId,
|
||||
name: "",
|
||||
creatorWalletAddress: apiKeyMetadata.creatorWalletAddress,
|
||||
},
|
||||
apiKeyMeta: apiKeyMetadata,
|
||||
};
|
||||
}
|
||||
|
||||
@@ -1,9 +1,10 @@
|
||||
import { ApiKeyMetadata } from "../api";
|
||||
import { AccountMetadata, ApiKeyMetadata } from "../api";
|
||||
|
||||
export type AuthorizationResult =
|
||||
| {
|
||||
authorized: true;
|
||||
apiKeyMeta: ApiKeyMetadata | null;
|
||||
accountMeta: AccountMetadata | null;
|
||||
}
|
||||
| {
|
||||
authorized: false;
|
||||
|
||||
@@ -1,2 +1,2 @@
|
||||
// only exports the public service definitions
|
||||
// Exports the public service definitions.
|
||||
export * from "./core/services";
|
||||
|
||||
@@ -118,7 +118,19 @@ export function extractAuthorizationData(
|
||||
clientId = derivedClientId;
|
||||
}
|
||||
|
||||
let jwt: null | string = null;
|
||||
// check for authorization header on the request
|
||||
const authorizationHeader = getHeader(headers, "authorization");
|
||||
if (authorizationHeader) {
|
||||
const [type, token] = authorizationHeader.split(" ");
|
||||
if (type.toLowerCase() === "bearer") {
|
||||
jwt = token;
|
||||
}
|
||||
}
|
||||
|
||||
return {
|
||||
jwt,
|
||||
hashedJWT: jwt ? hashSecretKey(jwt) : null,
|
||||
secretKeyHash,
|
||||
secretKey,
|
||||
clientId,
|
||||
|
||||
@@ -1,5 +1,17 @@
|
||||
# @thirdweb-dev/storage
|
||||
|
||||
## 1.2.3
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- [#1411](https://github.com/thirdweb-dev/js/pull/1411) [`3b6b0746`](https://github.com/thirdweb-dev/js/commit/3b6b0746b3fc792f4c5092814a7abfabcbc9801e) Thanks [@jnsdls](https://github.com/jnsdls)! - add auth token
|
||||
|
||||
## 1.2.2
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- [#1415](https://github.com/thirdweb-dev/js/pull/1415) [`256ee0d5`](https://github.com/thirdweb-dev/js/commit/256ee0d5ec9c8598aa79cd4cb1fd839c6cc7d390) Thanks [@joaquim-verges](https://github.com/joaquim-verges)! - Downgrade preconstruct to 2.7.0
|
||||
|
||||
## 1.2.1
|
||||
|
||||
### Patch Changes
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@thirdweb-dev/storage",
|
||||
"version": "1.2.1",
|
||||
"version": "1.2.3",
|
||||
"main": "dist/thirdweb-dev-storage.cjs.js",
|
||||
"module": "dist/thirdweb-dev-storage.esm.js",
|
||||
"browser": {
|
||||
@@ -48,7 +48,7 @@
|
||||
"@microsoft/api-documenter": "^7.22.30",
|
||||
"@microsoft/api-extractor": "^7.36.3",
|
||||
"@microsoft/tsdoc": "^0.14.1",
|
||||
"@preconstruct/cli": "^2.8.1",
|
||||
"@preconstruct/cli": "2.7.0",
|
||||
"@swc-node/register": "^1.6.6",
|
||||
"@thirdweb-dev/tsconfig": "workspace:*",
|
||||
"@types/chai": "^4.3.5",
|
||||
|
||||
@@ -70,7 +70,7 @@ export class StorageDownloader implements IStorageDownloader {
|
||||
console.warn(`Retrying download with backup gateway URL: ${resolvedUri}`);
|
||||
}
|
||||
|
||||
let headers;
|
||||
let headers: HeadersInit = {};
|
||||
if (isTwGatewayUrl(resolvedUri)) {
|
||||
if (this.secretKey) {
|
||||
headers = { "x-secret-key": this.secretKey };
|
||||
@@ -87,6 +87,15 @@ export class StorageDownloader implements IStorageDownloader {
|
||||
"x-client-Id": this.clientId,
|
||||
};
|
||||
}
|
||||
// if we have a authorization token on global context then add that to the headers
|
||||
if (typeof globalThis !== "undefined" && "TW_AUTH_TOKEN" in globalThis) {
|
||||
headers = {
|
||||
...headers,
|
||||
authorization: `Bearer ${
|
||||
(globalThis as any).TW_AUTH_TOKEN as string
|
||||
}`,
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
if (isTooManyRequests(resolvedUri)) {
|
||||
|
||||
@@ -270,18 +270,27 @@ export class IpfsUploader implements IStorageUploader<IpfsUploadBatchOptions> {
|
||||
|
||||
xhr.open("POST", `${TW_UPLOAD_SERVER_URL}/ipfs/upload`);
|
||||
|
||||
if (this.secretKey && this.clientId) {
|
||||
throw new Error(
|
||||
"Cannot use both secret key and client ID. Please use secretKey for server-side applications and clientId for client-side applications.",
|
||||
);
|
||||
}
|
||||
|
||||
if (this.secretKey) {
|
||||
xhr.setRequestHeader("x-secret-key", this.secretKey);
|
||||
} else if (this.clientId) {
|
||||
xhr.setRequestHeader("x-client-id", this.clientId);
|
||||
}
|
||||
|
||||
if (typeof globalThis !== "undefined" && "APP_BUNDLE_ID" in globalThis) {
|
||||
xhr.setRequestHeader(
|
||||
"x-bundle-id",
|
||||
(globalThis as any).APP_BUNDLE_ID as string,
|
||||
);
|
||||
}
|
||||
|
||||
// if we have a authorization token on global context then add that to the headers
|
||||
if (typeof globalThis !== "undefined" && "TW_AUTH_TOKEN" in globalThis) {
|
||||
xhr.setRequestHeader(
|
||||
"authorization",
|
||||
`Bearer ${(globalThis as any).TW_AUTH_TOKEN as string}`,
|
||||
);
|
||||
}
|
||||
|
||||
xhr.send(form as any);
|
||||
});
|
||||
}
|
||||
@@ -295,12 +304,6 @@ export class IpfsUploader implements IStorageUploader<IpfsUploadBatchOptions> {
|
||||
console.warn("The onProgress option is only supported in the browser");
|
||||
}
|
||||
|
||||
if (this.secretKey && this.clientId) {
|
||||
throw new Error(
|
||||
"Cannot use both secret key and client ID. Please use secretKey for server-side applications and clientId for client-side applications.",
|
||||
);
|
||||
}
|
||||
|
||||
const headers: HeadersInit = {};
|
||||
if (this.secretKey) {
|
||||
headers["x-secret-key"] = this.secretKey;
|
||||
@@ -308,6 +311,18 @@ export class IpfsUploader implements IStorageUploader<IpfsUploadBatchOptions> {
|
||||
headers["x-client-id"] = this.clientId;
|
||||
}
|
||||
|
||||
// if we have a bundle id on global context then add that to the headers
|
||||
if (typeof globalThis !== "undefined" && "APP_BUNDLE_ID" in globalThis) {
|
||||
headers["x-bundle-id"] = (globalThis as any).APP_BUNDLE_ID as string;
|
||||
}
|
||||
|
||||
// if we have a authorization token on global context then add that to the headers
|
||||
if (typeof globalThis !== "undefined" && "TW_AUTH_TOKEN" in globalThis) {
|
||||
headers["authorization"] = `Bearer ${
|
||||
(globalThis as any).TW_AUTH_TOKEN as string
|
||||
}`;
|
||||
}
|
||||
|
||||
const res = await fetch(`${TW_UPLOAD_SERVER_URL}/ipfs/upload`, {
|
||||
method: "POST",
|
||||
headers: {
|
||||
|
||||
@@ -1,5 +1,54 @@
|
||||
# @thirdweb-dev/unity-js-bridge
|
||||
|
||||
## 0.2.63
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- Updated dependencies [[`2a91113a`](https://github.com/thirdweb-dev/js/commit/2a91113a760733fcff2aec90041f69e15de33905)]:
|
||||
- @thirdweb-dev/sdk@3.10.45
|
||||
- @thirdweb-dev/wallets@1.1.9
|
||||
- @thirdweb-dev/auth@3.2.26
|
||||
|
||||
## 0.2.62
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- Updated dependencies [[`a5d0be93`](https://github.com/thirdweb-dev/js/commit/a5d0be939a143095e769b68cf86360bfe4720744), [`c0a6d2f1`](https://github.com/thirdweb-dev/js/commit/c0a6d2f18231310d143c9b0cb1b2ff59315087a4), [`a9f2ff73`](https://github.com/thirdweb-dev/js/commit/a9f2ff73c9f83f05c3e2d3c53b23b2843e8a2576), [`fd981655`](https://github.com/thirdweb-dev/js/commit/fd9816556fe595b0c764e34dbcf15b0ad1677edb), [`becbb637`](https://github.com/thirdweb-dev/js/commit/becbb637367285ed3d8d7d131e1020bf23e38298), [`fd981655`](https://github.com/thirdweb-dev/js/commit/fd9816556fe595b0c764e34dbcf15b0ad1677edb), [`c9bf4f05`](https://github.com/thirdweb-dev/js/commit/c9bf4f05c161707c6eb799ecef82f462e4a82405), [`67b145b9`](https://github.com/thirdweb-dev/js/commit/67b145b94dafb2fb1d90553ed4829f0ed22e2907), [`5ee700e8`](https://github.com/thirdweb-dev/js/commit/5ee700e80438650fa253c25c0bee6658ce68d2cf), [`9f5adc5c`](https://github.com/thirdweb-dev/js/commit/9f5adc5c5c2782ffb878759df481e5fb1e1740e5)]:
|
||||
- @thirdweb-dev/sdk@3.10.44
|
||||
- @thirdweb-dev/wallets@1.1.8
|
||||
- @thirdweb-dev/chains@0.1.41
|
||||
- @thirdweb-dev/auth@3.2.25
|
||||
|
||||
## 0.2.61
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- Updated dependencies [[`3b6b0746`](https://github.com/thirdweb-dev/js/commit/3b6b0746b3fc792f4c5092814a7abfabcbc9801e), [`b0ec1d80`](https://github.com/thirdweb-dev/js/commit/b0ec1d80839efccad11b50afbf2216c2c132cf7e)]:
|
||||
- @thirdweb-dev/storage@1.2.3
|
||||
- @thirdweb-dev/wallets@1.1.7
|
||||
- @thirdweb-dev/sdk@3.10.43
|
||||
- @thirdweb-dev/auth@3.2.24
|
||||
|
||||
## 0.2.60
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- Updated dependencies [[`fbde927a`](https://github.com/thirdweb-dev/js/commit/fbde927a0cb36a6269e045d8e577536f23164ef7)]:
|
||||
- @thirdweb-dev/wallets@1.1.6
|
||||
- @thirdweb-dev/auth@3.2.23
|
||||
|
||||
## 0.2.59
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- Updated dependencies [[`256ee0d5`](https://github.com/thirdweb-dev/js/commit/256ee0d5ec9c8598aa79cd4cb1fd839c6cc7d390)]:
|
||||
- @thirdweb-dev/storage@1.2.2
|
||||
- @thirdweb-dev/wallets@1.1.5
|
||||
- @thirdweb-dev/chains@0.1.40
|
||||
- @thirdweb-dev/auth@3.2.22
|
||||
- @thirdweb-dev/pay@0.1.4
|
||||
- @thirdweb-dev/sdk@3.10.42
|
||||
|
||||
## 0.2.58
|
||||
|
||||
### Patch Changes
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@thirdweb-dev/unity-js-bridge",
|
||||
"version": "0.2.58",
|
||||
"version": "0.2.63",
|
||||
"main": "dist/thirdweb-unity-bridge.js",
|
||||
"repository": "https://github.com/thirdweb-dev/js/tree/main/packages/unity-js-bridge",
|
||||
"license": "Apache-2.0",
|
||||
|
||||
@@ -2,5 +2,10 @@
|
||||
"presets": [
|
||||
"@babel/preset-typescript",
|
||||
["@babel/preset-env", { "targets": "defaults, not ie 11" }]
|
||||
],
|
||||
"plugins": [
|
||||
"@babel/plugin-transform-flow-strip-types",
|
||||
"@babel/plugin-transform-private-methods",
|
||||
"@babel/plugin-proposal-class-properties"
|
||||
]
|
||||
}
|
||||
|
||||
@@ -1,5 +1,52 @@
|
||||
# @thirdweb-dev/wallets
|
||||
|
||||
## 1.1.9
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- Updated dependencies [[`2a91113a`](https://github.com/thirdweb-dev/js/commit/2a91113a760733fcff2aec90041f69e15de33905)]:
|
||||
- @thirdweb-dev/sdk@3.10.45
|
||||
|
||||
## 1.1.8
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- [#1430](https://github.com/thirdweb-dev/js/pull/1430) [`a9f2ff73`](https://github.com/thirdweb-dev/js/commit/a9f2ff73c9f83f05c3e2d3c53b23b2843e8a2576) Thanks [@MananTank](https://github.com/MananTank)! - Handle error on Metamask Disconnect properly
|
||||
|
||||
- [#1436](https://github.com/thirdweb-dev/js/pull/1436) [`fd981655`](https://github.com/thirdweb-dev/js/commit/fd9816556fe595b0c764e34dbcf15b0ad1677edb) Thanks [@joaquim-verges](https://github.com/joaquim-verges)! - Better gas estimations pre account deploy
|
||||
|
||||
- Updated dependencies [[`a5d0be93`](https://github.com/thirdweb-dev/js/commit/a5d0be939a143095e769b68cf86360bfe4720744), [`c0a6d2f1`](https://github.com/thirdweb-dev/js/commit/c0a6d2f18231310d143c9b0cb1b2ff59315087a4), [`becbb637`](https://github.com/thirdweb-dev/js/commit/becbb637367285ed3d8d7d131e1020bf23e38298), [`fd981655`](https://github.com/thirdweb-dev/js/commit/fd9816556fe595b0c764e34dbcf15b0ad1677edb), [`c9bf4f05`](https://github.com/thirdweb-dev/js/commit/c9bf4f05c161707c6eb799ecef82f462e4a82405), [`67b145b9`](https://github.com/thirdweb-dev/js/commit/67b145b94dafb2fb1d90553ed4829f0ed22e2907), [`5ee700e8`](https://github.com/thirdweb-dev/js/commit/5ee700e80438650fa253c25c0bee6658ce68d2cf), [`9f5adc5c`](https://github.com/thirdweb-dev/js/commit/9f5adc5c5c2782ffb878759df481e5fb1e1740e5), [`9f5adc5c`](https://github.com/thirdweb-dev/js/commit/9f5adc5c5c2782ffb878759df481e5fb1e1740e5)]:
|
||||
- @thirdweb-dev/sdk@3.10.44
|
||||
- @thirdweb-dev/chains@0.1.41
|
||||
- @thirdweb-dev/contracts-js@1.3.11
|
||||
|
||||
## 1.1.7
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- [#1411](https://github.com/thirdweb-dev/js/pull/1411) [`3b6b0746`](https://github.com/thirdweb-dev/js/commit/3b6b0746b3fc792f4c5092814a7abfabcbc9801e) Thanks [@jnsdls](https://github.com/jnsdls)! - add auth token
|
||||
|
||||
- [#1425](https://github.com/thirdweb-dev/js/pull/1425) [`b0ec1d80`](https://github.com/thirdweb-dev/js/commit/b0ec1d80839efccad11b50afbf2216c2c132cf7e) Thanks [@iketw](https://github.com/iketw)! - Adding plugin-transform-flow-strip-types plugin to solve issues with RN FlatList
|
||||
|
||||
- Updated dependencies [[`3b6b0746`](https://github.com/thirdweb-dev/js/commit/3b6b0746b3fc792f4c5092814a7abfabcbc9801e)]:
|
||||
- @thirdweb-dev/sdk@3.10.43
|
||||
|
||||
## 1.1.6
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- [#1421](https://github.com/thirdweb-dev/js/pull/1421) [`fbde927a`](https://github.com/thirdweb-dev/js/commit/fbde927a0cb36a6269e045d8e577536f23164ef7) Thanks [@iketw](https://github.com/iketw)! - Add private methods transform plugin to the wallets package for ReactNative support
|
||||
|
||||
## 1.1.5
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- [#1415](https://github.com/thirdweb-dev/js/pull/1415) [`256ee0d5`](https://github.com/thirdweb-dev/js/commit/256ee0d5ec9c8598aa79cd4cb1fd839c6cc7d390) Thanks [@joaquim-verges](https://github.com/joaquim-verges)! - Downgrade preconstruct to 2.7.0
|
||||
|
||||
- Updated dependencies [[`256ee0d5`](https://github.com/thirdweb-dev/js/commit/256ee0d5ec9c8598aa79cd4cb1fd839c6cc7d390)]:
|
||||
- @thirdweb-dev/chains@0.1.40
|
||||
- @thirdweb-dev/sdk@3.10.42
|
||||
|
||||
## 1.1.4
|
||||
|
||||
### Patch Changes
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@thirdweb-dev/wallets",
|
||||
"version": "1.1.4",
|
||||
"version": "1.1.9",
|
||||
"main": "dist/thirdweb-dev-wallets.cjs.js",
|
||||
"module": "dist/thirdweb-dev-wallets.esm.js",
|
||||
"types": "dist/thirdweb-dev-wallets.cjs.d.ts",
|
||||
@@ -396,8 +396,11 @@
|
||||
},
|
||||
"devDependencies": {
|
||||
"@aws-sdk/client-secrets-manager": "^3.378.0",
|
||||
"@babel/plugin-transform-flow-strip-types": "^7.22.5",
|
||||
"@babel/plugin-transform-private-methods": "7.22.5",
|
||||
"@babel/plugin-proposal-class-properties": "7.18.6",
|
||||
"@noble/ed25519": "^1.7.1",
|
||||
"@preconstruct/cli": "^2.8.1",
|
||||
"@preconstruct/cli": "2.7.0",
|
||||
"@solana/web3.js": "^1.62.0",
|
||||
"@thirdweb-dev/tsconfig": "workspace:*",
|
||||
"@types/crypto-js": "^4.1.1",
|
||||
|
||||
@@ -417,9 +417,13 @@ export class InjectedConnector extends WagmiConnector<
|
||||
if ((error as ProviderRpcError).code === 1013) {
|
||||
const provider = await this.getProvider();
|
||||
if (provider) {
|
||||
const isAuthorized = await this.getAccount();
|
||||
if (isAuthorized) {
|
||||
return;
|
||||
try {
|
||||
const isAuthorized = await this.getAccount();
|
||||
if (isAuthorized) {
|
||||
return;
|
||||
}
|
||||
} catch {
|
||||
// If we can't get the account anymore, continue with disconnect
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -206,9 +206,16 @@ export abstract class BaseAccountAPI {
|
||||
let callGasLimit;
|
||||
const isPhantom = await this.checkAccountPhantom();
|
||||
if (isPhantom) {
|
||||
// when the account is not deployed yet, the estimation will return something like 25k gas (revert cost)
|
||||
// there's no way to know the actual cost, so we just use a fixed value of 500k which should cover most txcosts.
|
||||
callGasLimit = BigNumber.from(500_000);
|
||||
// when the account is not deployed yet, we simulate the call to the target contract directly
|
||||
callGasLimit = await this.provider.estimateGas({
|
||||
from: this.getAccountAddress(),
|
||||
to: detailsForUserOp.target,
|
||||
data: detailsForUserOp.data,
|
||||
});
|
||||
// if the estimation is too low, we use a fixed value of 500k
|
||||
if (callGasLimit.lt(30000)) {
|
||||
callGasLimit = BigNumber.from(500000);
|
||||
}
|
||||
} else {
|
||||
callGasLimit =
|
||||
parseNumber(detailsForUserOp.gasLimit) ??
|
||||
|
||||
@@ -45,6 +45,12 @@ export class HttpRpcClient {
|
||||
headers["x-bundle-id"] = (globalThis as any).APP_BUNDLE_ID as string;
|
||||
}
|
||||
}
|
||||
|
||||
if (typeof globalThis !== "undefined" && "TW_AUTH_TOKEN" in globalThis) {
|
||||
headers["authorization"] = `Bearer ${
|
||||
(globalThis as any).TW_AUTH_TOKEN as string
|
||||
}`;
|
||||
}
|
||||
}
|
||||
|
||||
this.userOpJsonRpcProvider = new providers.JsonRpcProvider(
|
||||
|
||||
@@ -34,12 +34,6 @@ class VerifyingPaymasterAPI extends PaymasterAPI {
|
||||
};
|
||||
|
||||
if (isTwUrl(this.paymasterUrl)) {
|
||||
if (this.secretKey && this.clientId) {
|
||||
throw new Error(
|
||||
"Cannot use both secret key and client ID. Please use secretKey for server-side applications and clientId for client-side applications.",
|
||||
);
|
||||
}
|
||||
|
||||
if (this.secretKey) {
|
||||
headers["x-secret-key"] = this.secretKey;
|
||||
} else if (this.clientId) {
|
||||
@@ -52,6 +46,11 @@ class VerifyingPaymasterAPI extends PaymasterAPI {
|
||||
headers["x-bundle-id"] = (globalThis as any).APP_BUNDLE_ID as string;
|
||||
}
|
||||
}
|
||||
if (typeof globalThis !== "undefined" && "TW_AUTH_TOKEN" in globalThis) {
|
||||
headers["authorization"] = `Bearer ${
|
||||
(globalThis as any).TW_AUTH_TOKEN as string
|
||||
}`;
|
||||
}
|
||||
}
|
||||
|
||||
// Ask the paymaster to sign the transaction and return a valid paymasterAndData value.
|
||||
|
||||
@@ -1,3 +1,6 @@
|
||||
export function isTwUrl(url: string): boolean {
|
||||
return new URL(url).hostname.endsWith('.thirdweb.com');
|
||||
}
|
||||
const host = new URL(url).hostname;
|
||||
return (
|
||||
host.endsWith(".thirdweb.com") || host === "localhost" || host === "0.0.0.0"
|
||||
);
|
||||
}
|
||||
|
||||
Generated
+204
-86
@@ -1,5 +1,9 @@
|
||||
lockfileVersion: '6.0'
|
||||
|
||||
settings:
|
||||
autoInstallPeers: true
|
||||
excludeLinksFromLockfile: false
|
||||
|
||||
overrides:
|
||||
cross-fetch@>=3.0.0 <3.1.5: '>=3.1.5'
|
||||
got@<11.8.5: '>=11.8.5'
|
||||
@@ -101,8 +105,8 @@ importers:
|
||||
specifier: ^0.14.1
|
||||
version: 0.14.2
|
||||
'@preconstruct/cli':
|
||||
specifier: ^2.8.1
|
||||
version: 2.8.1
|
||||
specifier: 2.7.0
|
||||
version: 2.7.0
|
||||
'@solana/web3.js':
|
||||
specifier: ^1.62.0
|
||||
version: 1.73.3
|
||||
@@ -156,7 +160,7 @@ importers:
|
||||
version: link:../eslint-config-thirdweb
|
||||
eslint-plugin-import:
|
||||
specifier: ^2.26.0
|
||||
version: 2.27.5(@typescript-eslint/parser@5.60.1)([email protected])([email protected])
|
||||
version: 2.27.5(@typescript-eslint/parser@6.2.0)([email protected])
|
||||
eslint-plugin-inclusive-language:
|
||||
specifier: ^2.2.0
|
||||
version: 2.2.0
|
||||
@@ -203,8 +207,8 @@ importers:
|
||||
specifier: ^7.22.6
|
||||
version: 7.22.6
|
||||
'@preconstruct/cli':
|
||||
specifier: ^2.8.1
|
||||
version: 2.8.1
|
||||
specifier: 2.7.0
|
||||
version: 2.7.0
|
||||
'@thirdweb-dev/tsconfig':
|
||||
specifier: workspace:*
|
||||
version: link:../tw-tsconfig
|
||||
@@ -378,8 +382,8 @@ importers:
|
||||
packages/contracts-js:
|
||||
dependencies:
|
||||
'@thirdweb-dev/contracts':
|
||||
specifier: 3.8.1-0
|
||||
version: 3.8.1-0
|
||||
specifier: 3.8.3
|
||||
version: 3.8.3
|
||||
devDependencies:
|
||||
'@babel/preset-env':
|
||||
specifier: ^7.22.9
|
||||
@@ -445,8 +449,8 @@ importers:
|
||||
version: 1.7.0
|
||||
devDependencies:
|
||||
'@preconstruct/cli':
|
||||
specifier: ^2.8.1
|
||||
version: 2.8.1
|
||||
specifier: 2.7.0
|
||||
version: 2.7.0
|
||||
'@thirdweb-dev/tsconfig':
|
||||
specifier: workspace:*
|
||||
version: link:../tw-tsconfig
|
||||
@@ -548,8 +552,8 @@ importers:
|
||||
specifier: ^0.14.1
|
||||
version: 0.14.2
|
||||
'@preconstruct/cli':
|
||||
specifier: ^2.8.1
|
||||
version: 2.8.1
|
||||
specifier: 2.7.0
|
||||
version: 2.7.0
|
||||
'@solana/wallet-adapter-base':
|
||||
specifier: ^0.9.17
|
||||
version: 0.9.22(@solana/[email protected])
|
||||
@@ -606,7 +610,7 @@ importers:
|
||||
version: 0.0.3([email protected])
|
||||
eslint-plugin-import:
|
||||
specifier: ^2.26.0
|
||||
version: 2.27.5(@typescript-eslint/parser@5.60.1)([email protected])([email protected])
|
||||
version: 2.27.5(@typescript-eslint/parser@6.2.0)([email protected])
|
||||
eslint-plugin-inclusive-language:
|
||||
specifier: ^2.2.0
|
||||
version: 2.2.0
|
||||
@@ -687,8 +691,8 @@ importers:
|
||||
specifier: ^0.14.1
|
||||
version: 0.14.2
|
||||
'@preconstruct/cli':
|
||||
specifier: ^2.8.1
|
||||
version: 2.8.1
|
||||
specifier: 2.7.0
|
||||
version: 2.7.0
|
||||
'@solana/wallet-adapter-react':
|
||||
specifier: ^0.15.19
|
||||
version: 0.15.31(@solana/[email protected])([email protected])([email protected])([email protected])
|
||||
@@ -730,7 +734,7 @@ importers:
|
||||
version: 0.0.3([email protected])
|
||||
eslint-plugin-import:
|
||||
specifier: ^2.26.0
|
||||
version: 2.27.5(@typescript-eslint/parser@5.60.1)([email protected])([email protected])
|
||||
version: 2.27.5(@typescript-eslint/parser@6.2.0)([email protected])
|
||||
eslint-plugin-inclusive-language:
|
||||
specifier: ^2.2.0
|
||||
version: 2.2.0
|
||||
@@ -873,7 +877,7 @@ importers:
|
||||
version: link:../eslint-config-thirdweb
|
||||
eslint-plugin-import:
|
||||
specifier: ^2.26.0
|
||||
version: 2.27.5(@typescript-eslint/parser@5.60.1)([email protected])([email protected])
|
||||
version: 2.27.5(@typescript-eslint/parser@6.2.0)([email protected])
|
||||
eslint-plugin-inclusive-language:
|
||||
specifier: ^2.2.0
|
||||
version: 2.2.0
|
||||
@@ -1036,8 +1040,8 @@ importers:
|
||||
specifier: ^2.2.3
|
||||
version: 2.2.3([email protected])([email protected])
|
||||
'@preconstruct/cli':
|
||||
specifier: ^2.8.1
|
||||
version: 2.8.1
|
||||
specifier: 2.7.0
|
||||
version: 2.7.0
|
||||
'@project-serum/anchor':
|
||||
specifier: ^0.25.0
|
||||
version: 0.25.0
|
||||
@@ -1103,7 +1107,7 @@ importers:
|
||||
version: 0.0.3([email protected])
|
||||
eslint-plugin-import:
|
||||
specifier: ^2.26.0
|
||||
version: 2.27.5(@typescript-eslint/parser@5.60.1)([email protected])([email protected])
|
||||
version: 2.27.5(@typescript-eslint/parser@6.2.0)([email protected])
|
||||
eslint-plugin-inclusive-language:
|
||||
specifier: ^2.2.0
|
||||
version: 2.2.0
|
||||
@@ -1139,13 +1143,23 @@ importers:
|
||||
version: 0.14.3([email protected])
|
||||
|
||||
packages/service-utils:
|
||||
dependencies:
|
||||
aws4fetch:
|
||||
specifier: ^1.0.17
|
||||
version: 1.0.17
|
||||
zod:
|
||||
specifier: ^3.20.2
|
||||
version: 3.21.4
|
||||
devDependencies:
|
||||
'@cloudflare/workers-types':
|
||||
specifier: ^4.20230724.0
|
||||
version: 4.20230724.0
|
||||
'@preconstruct/cli':
|
||||
specifier: ^2.8.1
|
||||
version: 2.8.1
|
||||
specifier: 2.7.0
|
||||
version: 2.7.0
|
||||
'@smithy/types':
|
||||
specifier: ^2.0.2
|
||||
version: 2.0.2
|
||||
'@thirdweb-dev/tsconfig':
|
||||
specifier: workspace:*
|
||||
version: link:../tw-tsconfig
|
||||
@@ -1211,8 +1225,8 @@ importers:
|
||||
specifier: ^0.14.1
|
||||
version: 0.14.2
|
||||
'@preconstruct/cli':
|
||||
specifier: ^2.8.1
|
||||
version: 2.8.1
|
||||
specifier: 2.7.0
|
||||
version: 2.7.0
|
||||
'@swc-node/register':
|
||||
specifier: ^1.6.6
|
||||
version: 1.6.6(@swc/[email protected])([email protected])
|
||||
@@ -1388,12 +1402,21 @@ importers:
|
||||
'@aws-sdk/client-secrets-manager':
|
||||
specifier: ^3.378.0
|
||||
version: 3.378.0
|
||||
'@babel/plugin-proposal-class-properties':
|
||||
specifier: 7.18.6
|
||||
version: 7.18.6(@babel/[email protected])
|
||||
'@babel/plugin-transform-flow-strip-types':
|
||||
specifier: ^7.22.5
|
||||
version: 7.22.5(@babel/[email protected])
|
||||
'@babel/plugin-transform-private-methods':
|
||||
specifier: 7.22.5
|
||||
version: 7.22.5(@babel/[email protected])
|
||||
'@noble/ed25519':
|
||||
specifier: ^1.7.1
|
||||
version: 1.7.3
|
||||
'@preconstruct/cli':
|
||||
specifier: ^2.8.1
|
||||
version: 2.8.1
|
||||
specifier: 2.7.0
|
||||
version: 2.7.0
|
||||
'@solana/web3.js':
|
||||
specifier: ^1.62.0
|
||||
version: 1.73.3
|
||||
@@ -1450,7 +1473,7 @@ importers:
|
||||
version: 18.2.0([email protected])
|
||||
react-scripts:
|
||||
specifier: ^5
|
||||
version: 5.0.1(@babel/plugin-syntax-flow@7.18.6)(@babel/[email protected])([email protected])([email protected])([email protected])
|
||||
version: 5.0.1(@babel/plugin-syntax-flow@7.22.5)(@babel/[email protected])([email protected])([email protected])([email protected])
|
||||
devDependencies:
|
||||
'@playwright/test':
|
||||
specifier: 1.31.2
|
||||
@@ -2053,10 +2076,6 @@ packages:
|
||||
dependencies:
|
||||
'@babel/highlight': 7.22.5
|
||||
|
||||
/@babel/[email protected]:
|
||||
resolution: {integrity: sha512-4Jc/YuIaYqKnDDz892kPIledykKg12Aw1PYX5i/TY28anJtacvM1Rrr8wbieB9GfEJwlzqT0hUEao0CxEebiDA==}
|
||||
engines: {node: '>=6.9.0'}
|
||||
|
||||
/@babel/[email protected]:
|
||||
resolution: {integrity: sha512-5UamI7xkUcJ3i9qVDS+KFDEK8/7oJ55/sJMB1Ge7IEapr7KfdfV/HErR+koZwOfd+SgtFKOKRhRakdg++DcJpQ==}
|
||||
engines: {node: '>=6.9.0'}
|
||||
@@ -2114,13 +2133,6 @@ packages:
|
||||
'@jridgewell/trace-mapping': 0.3.18
|
||||
jsesc: 2.5.2
|
||||
|
||||
/@babel/[email protected]:
|
||||
resolution: {integrity: sha512-duORpUiYrEpzKIop6iNbjnwKLAKnJ47csTyRACyEmWj0QdUrm5aqNJGHSSEQSUAvNW0ojX0dOmK9dZduvkfeXA==}
|
||||
engines: {node: '>=6.9.0'}
|
||||
dependencies:
|
||||
'@babel/types': 7.22.5
|
||||
dev: true
|
||||
|
||||
/@babel/[email protected]:
|
||||
resolution: {integrity: sha512-LvBTxu8bQSQkcyKOU+a1btnNFQ1dMAd0R6PyW3arXes06F6QLWLIrd681bxRPIXlrMGR3XYnW9JyML7dP3qgxg==}
|
||||
engines: {node: '>=6.9.0'}
|
||||
@@ -2160,7 +2172,7 @@ packages:
|
||||
'@babel/helper-optimise-call-expression': 7.22.5
|
||||
'@babel/helper-replace-supers': 7.22.5
|
||||
'@babel/helper-skip-transparent-expression-wrappers': 7.22.5
|
||||
'@babel/helper-split-export-declaration': 7.22.5
|
||||
'@babel/helper-split-export-declaration': 7.22.6
|
||||
semver: 7.5.4
|
||||
transitivePeerDependencies:
|
||||
- supports-color
|
||||
@@ -2301,6 +2313,7 @@ packages:
|
||||
engines: {node: '>=6.9.0'}
|
||||
dependencies:
|
||||
'@babel/types': 7.22.5
|
||||
dev: false
|
||||
|
||||
/@babel/[email protected]:
|
||||
resolution: {integrity: sha512-AsUnxuLhRYsisFiaJwvp1QF+I3KjD5FOxut14q/GzovUe6orHLesW2C7d754kRm53h5gqrz6sFl6sxc4BVtE/g==}
|
||||
@@ -2462,7 +2475,7 @@ packages:
|
||||
peerDependencies:
|
||||
'@babel/core': ^7.0.0-0
|
||||
dependencies:
|
||||
'@babel/compat-data': 7.22.5
|
||||
'@babel/compat-data': 7.22.9
|
||||
'@babel/core': 7.22.9
|
||||
'@babel/helper-compilation-targets': 7.22.9(@babel/[email protected])
|
||||
'@babel/helper-plugin-utils': 7.22.5
|
||||
@@ -2603,8 +2616,8 @@ packages:
|
||||
'@babel/core': 7.22.9
|
||||
'@babel/helper-plugin-utils': 7.22.5
|
||||
|
||||
/@babel/plugin-syntax-flow@7.18.6(@babel/[email protected]):
|
||||
resolution: {integrity: sha512-LUbR+KNTBWCUAqRG9ex5Gnzu2IOkt8jRJbHHXFT9q+L9zm7M/QQbEqXyw1n1pohYvOyWC8CjeyjrSaIwiYjK7A==}
|
||||
/@babel/plugin-syntax-flow@7.22.5(@babel/[email protected]):
|
||||
resolution: {integrity: sha512-9RdCl0i+q0QExayk2nOS7853w08yLucnnPML6EN9S8fgMPVtdLDCdx/cOQ/i44Lb9UeQX9A35yaqBBOMMZxPxQ==}
|
||||
engines: {node: '>=6.9.0'}
|
||||
peerDependencies:
|
||||
'@babel/core': ^7.0.0-0
|
||||
@@ -2833,7 +2846,7 @@ packages:
|
||||
'@babel/helper-optimise-call-expression': 7.22.5
|
||||
'@babel/helper-plugin-utils': 7.22.5
|
||||
'@babel/helper-replace-supers': 7.22.5
|
||||
'@babel/helper-split-export-declaration': 7.22.5
|
||||
'@babel/helper-split-export-declaration': 7.22.6
|
||||
globals: 11.12.0
|
||||
transitivePeerDependencies:
|
||||
- supports-color
|
||||
@@ -2925,15 +2938,15 @@ packages:
|
||||
'@babel/helper-plugin-utils': 7.22.5
|
||||
'@babel/plugin-syntax-export-namespace-from': 7.8.3(@babel/[email protected])
|
||||
|
||||
/@babel/[email protected]1.0(@babel/[email protected]):
|
||||
resolution: {integrity: sha512-FlFA2Mj87a6sDkW4gfGrQQqwY/dLlBAyJa2dJEZ+FHXUVHBflO2wyKvg+OOEzXfrKYIa4HWl0mgmbCzt0cMb7w==}
|
||||
/@babel/[email protected]2.5(@babel/[email protected]):
|
||||
resolution: {integrity: sha512-tujNbZdxdG0/54g/oua8ISToaXTFBf8EnSb5PgQSciIXWOWKX3S4+JR7ZE9ol8FZwf9kxitzkGQ+QWeov/mCiA==}
|
||||
engines: {node: '>=6.9.0'}
|
||||
peerDependencies:
|
||||
'@babel/core': ^7.0.0-0
|
||||
dependencies:
|
||||
'@babel/core': 7.22.9
|
||||
'@babel/helper-plugin-utils': 7.22.5
|
||||
'@babel/plugin-syntax-flow': 7.18.6(@babel/[email protected])
|
||||
'@babel/plugin-syntax-flow': 7.22.5(@babel/[email protected])
|
||||
|
||||
/@babel/[email protected](@babel/[email protected]):
|
||||
resolution: {integrity: sha512-3kxQjX1dU9uudwSshyLeEipvrLjBCVthCgeTp6CzE/9JYrlAIaeekVxRpCWsDDfYTfRZRoCeZatCQvwo+wvK8A==}
|
||||
@@ -3228,7 +3241,7 @@ packages:
|
||||
'@babel/core': ^7.0.0-0
|
||||
dependencies:
|
||||
'@babel/core': 7.22.9
|
||||
'@babel/helper-annotate-as-pure': 7.18.6
|
||||
'@babel/helper-annotate-as-pure': 7.22.5
|
||||
'@babel/helper-module-imports': 7.22.5
|
||||
'@babel/helper-plugin-utils': 7.22.5
|
||||
'@babel/plugin-syntax-jsx': 7.22.5(@babel/[email protected])
|
||||
@@ -3491,7 +3504,7 @@ packages:
|
||||
'@babel/core': 7.22.9
|
||||
'@babel/helper-plugin-utils': 7.22.5
|
||||
'@babel/helper-validator-option': 7.22.5
|
||||
'@babel/plugin-transform-flow-strip-types': 7.21.0(@babel/[email protected])
|
||||
'@babel/plugin-transform-flow-strip-types': 7.22.5(@babel/[email protected])
|
||||
|
||||
/@babel/[email protected](@babel/[email protected]):
|
||||
resolution: {integrity: sha512-A57th6YRG7oR3cq/yt/Y84MvGgE0eJG2F1JLhKuyG+jFxEgrd/HAMJatiFtmOiZurz+0DkrvbheCLaV5f2JfjA==}
|
||||
@@ -7236,6 +7249,52 @@ packages:
|
||||
config-chain: 1.1.13
|
||||
dev: false
|
||||
|
||||
/@preconstruct/[email protected]:
|
||||
resolution: {integrity: sha512-reluhXnOCPYhltV9wZZe07v9Eir6+9HiwQtdsUgvmm6UndtDr1kRr2jtObnDtXTjt7LEpU4+TD43+3+Tu7Qebw==}
|
||||
hasBin: true
|
||||
dependencies:
|
||||
'@babel/code-frame': 7.22.5
|
||||
'@babel/core': 7.22.9
|
||||
'@babel/helper-module-imports': 7.22.5
|
||||
'@babel/runtime': 7.22.6
|
||||
'@preconstruct/hook': 0.4.0
|
||||
'@rollup/plugin-alias': 3.1.9([email protected])
|
||||
'@rollup/plugin-commonjs': 15.1.0([email protected])
|
||||
'@rollup/plugin-json': 4.1.0([email protected])
|
||||
'@rollup/plugin-node-resolve': 11.2.1([email protected])
|
||||
'@rollup/plugin-replace': 2.4.2([email protected])
|
||||
builtin-modules: 3.3.0
|
||||
chalk: 4.1.2
|
||||
dataloader: 2.2.2
|
||||
detect-indent: 6.1.0
|
||||
enquirer: 2.3.6
|
||||
estree-walker: 2.0.2
|
||||
fast-deep-equal: 2.0.1
|
||||
fast-glob: 3.2.12
|
||||
fs-extra: 9.1.0
|
||||
is-ci: 2.0.0
|
||||
is-reference: 1.2.1
|
||||
jest-worker: 26.6.2
|
||||
magic-string: 0.30.0
|
||||
meow: 7.1.1
|
||||
ms: 2.1.3
|
||||
normalize-path: 3.0.0
|
||||
npm-packlist: 2.2.2
|
||||
p-limit: 3.1.0
|
||||
parse-glob: 3.0.4
|
||||
parse-json: 5.2.0
|
||||
quick-lru: 5.1.1
|
||||
resolve: 1.22.1
|
||||
resolve-from: 5.0.0
|
||||
rollup: 2.79.1
|
||||
semver: 7.5.4
|
||||
terser: 5.18.2
|
||||
v8-compile-cache: 2.3.0
|
||||
zod: 3.21.4
|
||||
transitivePeerDependencies:
|
||||
- supports-color
|
||||
dev: true
|
||||
|
||||
/@preconstruct/[email protected]:
|
||||
resolution: {integrity: sha512-PX5w+au06iY/QaT+9RLmRlIfavRCRoMTC/krwtNrgPEnubR9e6P+QlywrKmwiEvkzbR9AEzGnRZL8uNRDDMzrQ==}
|
||||
hasBin: true
|
||||
@@ -8086,7 +8145,7 @@ packages:
|
||||
'@react-native-community/cli-tools': 10.1.1
|
||||
chalk: 4.1.2
|
||||
execa: 1.0.0
|
||||
fast-xml-parser: 4.1.3
|
||||
fast-xml-parser: 4.2.5
|
||||
glob: 7.2.3
|
||||
ora: 5.4.1
|
||||
transitivePeerDependencies:
|
||||
@@ -8184,7 +8243,7 @@ packages:
|
||||
fs-extra: 8.1.0
|
||||
graceful-fs: 4.2.11
|
||||
prompts: 2.4.2
|
||||
semver: 7.5.3
|
||||
semver: 7.5.4
|
||||
transitivePeerDependencies:
|
||||
- '@babel/core'
|
||||
- bufferutil
|
||||
@@ -10224,8 +10283,8 @@ packages:
|
||||
use-sync-external-store: 1.2.0([email protected])
|
||||
dev: false
|
||||
|
||||
/@thirdweb-dev/[email protected].1-0:
|
||||
resolution: {integrity: sha512-yb2W403bh4STD2XujBjK37/rzkF24Y0cdHvgrdl5TKSjt3tR0qTrtRI8m46+E+AmuL64d+nCw+5DNDBqXPypDA==}
|
||||
/@thirdweb-dev/[email protected].3:
|
||||
resolution: {integrity: sha512-J1CRG8bZ/Y9x7jgd0kmu0LDgV3l+s6wBO/ohCJeOamxuXp9ubYMXr1DFmFHnNphmEHnQfLt459nu8qwGJ9ip6Q==}
|
||||
dev: false
|
||||
|
||||
/@tootallnate/[email protected]:
|
||||
@@ -12523,8 +12582,8 @@ packages:
|
||||
peerDependencies:
|
||||
postcss: ^8.1.0
|
||||
dependencies:
|
||||
browserslist: 4.21.5
|
||||
caniuse-lite: 1.0.30001466
|
||||
browserslist: 4.21.9
|
||||
caniuse-lite: 1.0.30001517
|
||||
fraction.js: 4.2.0
|
||||
normalize-range: 0.1.2
|
||||
picocolors: 1.0.0
|
||||
@@ -12552,6 +12611,10 @@ packages:
|
||||
xml2js: 0.6.0
|
||||
dev: true
|
||||
|
||||
/[email protected]:
|
||||
resolution: {integrity: sha512-4IbOvsxqxeOSxI4oA+8xEO8SzBMVlzbSTgGy/EF83rHnQ/aKtP6Sc6YV/k0oiW0mqrcxuThlbDosnvetGOuO+g==}
|
||||
dev: false
|
||||
|
||||
/[email protected]:
|
||||
resolution: {integrity: sha512-/BQzOX780JhsxDnPpH4ZiyrJAzcd8AfzFPkv+89veFSr1rcMjuq2JDCwypKaPeB6ljHp9KjXhPpjgCvQlWYuqg==}
|
||||
engines: {node: '>=4'}
|
||||
@@ -12841,7 +12904,7 @@ packages:
|
||||
'@babel/plugin-proposal-class-properties': 7.18.6(@babel/[email protected])
|
||||
'@babel/plugin-proposal-object-rest-spread': 7.20.7(@babel/[email protected])
|
||||
'@babel/plugin-syntax-class-properties': 7.12.13(@babel/[email protected])
|
||||
'@babel/plugin-syntax-flow': 7.18.6(@babel/[email protected])
|
||||
'@babel/plugin-syntax-flow': 7.22.5(@babel/[email protected])
|
||||
'@babel/plugin-syntax-jsx': 7.22.5(@babel/[email protected])
|
||||
'@babel/plugin-syntax-object-rest-spread': 7.8.3(@babel/[email protected])
|
||||
'@babel/plugin-transform-arrow-functions': 7.22.5(@babel/[email protected])
|
||||
@@ -12850,7 +12913,7 @@ packages:
|
||||
'@babel/plugin-transform-classes': 7.22.5(@babel/[email protected])
|
||||
'@babel/plugin-transform-computed-properties': 7.22.5(@babel/[email protected])
|
||||
'@babel/plugin-transform-destructuring': 7.22.5(@babel/[email protected])
|
||||
'@babel/plugin-transform-flow-strip-types': 7.21.0(@babel/[email protected])
|
||||
'@babel/plugin-transform-flow-strip-types': 7.22.5(@babel/[email protected])
|
||||
'@babel/plugin-transform-for-of': 7.22.5(@babel/[email protected])
|
||||
'@babel/plugin-transform-function-name': 7.22.5(@babel/[email protected])
|
||||
'@babel/plugin-transform-literals': 7.22.5(@babel/[email protected])
|
||||
@@ -12901,7 +12964,7 @@ packages:
|
||||
'@babel/plugin-proposal-optional-chaining': 7.21.0(@babel/[email protected])
|
||||
'@babel/plugin-proposal-private-methods': 7.18.6(@babel/[email protected])
|
||||
'@babel/plugin-proposal-private-property-in-object': 7.21.0(@babel/[email protected])
|
||||
'@babel/plugin-transform-flow-strip-types': 7.21.0(@babel/[email protected])
|
||||
'@babel/plugin-transform-flow-strip-types': 7.22.5(@babel/[email protected])
|
||||
'@babel/plugin-transform-react-display-name': 7.22.5(@babel/[email protected])
|
||||
'@babel/plugin-transform-runtime': 7.21.0(@babel/[email protected])
|
||||
'@babel/preset-env': 7.22.9(@babel/[email protected])
|
||||
@@ -13451,7 +13514,7 @@ packages:
|
||||
/[email protected]:
|
||||
resolution: {integrity: sha512-qwVpFEHNfhYJIzNRBvd2C1kyo6jz3ZSMPyyuR47OPdiKWlbYnZNyDWuyR175qDnAJLiCo5fBBqPb3RiXgWlkOQ==}
|
||||
dependencies:
|
||||
semver: 7.5.3
|
||||
semver: 7.5.4
|
||||
dev: false
|
||||
|
||||
/[email protected]([email protected]):
|
||||
@@ -14114,7 +14177,7 @@ packages:
|
||||
- supports-color
|
||||
|
||||
/[email protected]:
|
||||
resolution: {integrity: sha1-2Klr13/Wjfd5OnMDajug1UBdR3s=}
|
||||
resolution: {integrity: sha512-/Srv4dswyQNBfohGpz9o6Yb3Gz3SrUDqBH5rTuhGR7ahtlbYKnVxw2bCFMRljaA7EXHaXZ8wsHdodFvbkhKmqg==}
|
||||
|
||||
/[email protected]:
|
||||
resolution: {integrity: sha512-qj+f8APARXHrM0hraqXYb2/bOVSV4PvJQlNZ/DVj0QrmNM2q2euizkeuVckQ57J+W0mRH6Hvi+k50M4Jul2VRQ==}
|
||||
@@ -15857,7 +15920,7 @@ packages:
|
||||
eslint: 8.45.0
|
||||
eslint-import-resolver-node: 0.3.7
|
||||
eslint-import-resolver-typescript: 3.5.3([email protected])([email protected])
|
||||
eslint-plugin-import: 2.27.5(@typescript-eslint/parser@5.60.1)([email protected])([email protected])
|
||||
eslint-plugin-import: 2.27.5(@typescript-eslint/parser@6.2.0)([email protected])
|
||||
eslint-plugin-jsx-a11y: 6.7.1([email protected])
|
||||
eslint-plugin-react: 7.33.0([email protected])
|
||||
eslint-plugin-react-hooks: 5.0.0-canary-7118f5dd7-20230705([email protected])
|
||||
@@ -15874,7 +15937,7 @@ packages:
|
||||
dependencies:
|
||||
eslint: 8.45.0
|
||||
|
||||
/[email protected](@babel/plugin-syntax-flow@7.18.6)(@babel/[email protected])([email protected])([email protected])([email protected]):
|
||||
/[email protected](@babel/plugin-syntax-flow@7.22.5)(@babel/[email protected])([email protected])([email protected])([email protected]):
|
||||
resolution: {integrity: sha512-K6rNzvkIeHaTd8m/QEh1Zko0KI7BACWkkneSs6s9cKZC/J27X3eZR6Upt1jkmZ/4FK+XUOPPxMEN7+lbUXfSlA==}
|
||||
engines: {node: '>=14.0.0'}
|
||||
peerDependencies:
|
||||
@@ -15892,8 +15955,8 @@ packages:
|
||||
babel-preset-react-app: 10.0.1
|
||||
confusing-browser-globals: 1.0.11
|
||||
eslint: 8.45.0
|
||||
eslint-plugin-flowtype: 8.0.3(@babel/plugin-syntax-flow@7.18.6)(@babel/[email protected])([email protected])
|
||||
eslint-plugin-import: 2.27.5(@typescript-eslint/[email protected])(eslint[email protected])(eslint@8.45.0)
|
||||
eslint-plugin-flowtype: 8.0.3(@babel/plugin-syntax-flow@7.22.5)(@babel/[email protected])([email protected])
|
||||
eslint-plugin-import: 2.27.5(@typescript-eslint/[email protected])([email protected])
|
||||
eslint-plugin-jest: 25.7.0(@typescript-eslint/[email protected])([email protected])([email protected])([email protected])
|
||||
eslint-plugin-jsx-a11y: 6.7.1([email protected])
|
||||
eslint-plugin-react: 7.33.0([email protected])
|
||||
@@ -15937,7 +16000,7 @@ packages:
|
||||
debug: 4.3.4([email protected])
|
||||
enhanced-resolve: 5.12.0
|
||||
eslint: 8.45.0
|
||||
eslint-plugin-import: 2.27.5(@typescript-eslint/parser@5.60.1)([email protected])([email protected])
|
||||
eslint-plugin-import: 2.27.5(@typescript-eslint/parser@6.2.0)([email protected])
|
||||
get-tsconfig: 4.4.0
|
||||
globby: 13.1.3
|
||||
is-core-module: 2.11.0
|
||||
@@ -15974,6 +16037,35 @@ packages:
|
||||
eslint-import-resolver-typescript: 3.5.3([email protected])([email protected])
|
||||
transitivePeerDependencies:
|
||||
- supports-color
|
||||
dev: false
|
||||
|
||||
/[email protected](@typescript-eslint/[email protected])([email protected])([email protected]):
|
||||
resolution: {integrity: sha512-j4GT+rqzCoRKHwURX7pddtIPGySnX9Si/cgMI5ztrcqOPtk5dDEeZ34CQVPphnqkJytlc97Vuk05Um2mJ3gEQA==}
|
||||
engines: {node: '>=4'}
|
||||
peerDependencies:
|
||||
'@typescript-eslint/parser': '*'
|
||||
eslint: '*'
|
||||
eslint-import-resolver-node: '*'
|
||||
eslint-import-resolver-typescript: '*'
|
||||
eslint-import-resolver-webpack: '*'
|
||||
peerDependenciesMeta:
|
||||
'@typescript-eslint/parser':
|
||||
optional: true
|
||||
eslint:
|
||||
optional: true
|
||||
eslint-import-resolver-node:
|
||||
optional: true
|
||||
eslint-import-resolver-typescript:
|
||||
optional: true
|
||||
eslint-import-resolver-webpack:
|
||||
optional: true
|
||||
dependencies:
|
||||
'@typescript-eslint/parser': 6.2.0([email protected])([email protected])
|
||||
debug: 3.2.7
|
||||
eslint: 8.45.0
|
||||
eslint-import-resolver-node: 0.3.7
|
||||
transitivePeerDependencies:
|
||||
- supports-color
|
||||
|
||||
/[email protected]([email protected]):
|
||||
resolution: {integrity: sha512-U5OjauLSVcXvlh2La3ptPwIs6JwLPJKP20OQdTDBe2oh0cHvBeEwhQ8mjFrEoCMdQdmMdrSBkSRLG3gLxFjK3A==}
|
||||
@@ -15994,7 +16086,7 @@ packages:
|
||||
ignore: 5.2.4
|
||||
dev: true
|
||||
|
||||
/[email protected](@babel/plugin-syntax-flow@7.18.6)(@babel/[email protected])([email protected]):
|
||||
/[email protected](@babel/plugin-syntax-flow@7.22.5)(@babel/[email protected])([email protected]):
|
||||
resolution: {integrity: sha512-dX8l6qUL6O+fYPtpNRideCFSpmWOUVx5QcaGLVqe/vlDiBSe4vYljDWDETwnyFzpl7By/WVIu6rcrniCgH9BqQ==}
|
||||
engines: {node: '>=12.0.0'}
|
||||
peerDependencies:
|
||||
@@ -16002,7 +16094,7 @@ packages:
|
||||
'@babel/plugin-transform-react-jsx': ^7.14.9
|
||||
eslint: ^8.1.0
|
||||
dependencies:
|
||||
'@babel/plugin-syntax-flow': 7.18.6(@babel/[email protected])
|
||||
'@babel/plugin-syntax-flow': 7.22.5(@babel/[email protected])
|
||||
'@babel/plugin-transform-react-jsx': 7.22.5(@babel/[email protected])
|
||||
eslint: 8.45.0
|
||||
lodash: 4.17.21
|
||||
@@ -16022,7 +16114,7 @@ packages:
|
||||
string-natural-compare: 3.0.1
|
||||
dev: true
|
||||
|
||||
/[email protected](@typescript-eslint/[email protected])(eslint[email protected])(eslint@8.45.0):
|
||||
/[email protected](@typescript-eslint/[email protected])([email protected]):
|
||||
resolution: {integrity: sha512-LmEt3GVofgiGuiE+ORpnvP+kAm3h6MLZJ4Q5HCyHADofsb4VzXFsRiWj3c0OFiV+3DWFh0qg3v9gcPlfc3zRow==}
|
||||
engines: {node: '>=4'}
|
||||
peerDependencies:
|
||||
@@ -16053,6 +16145,39 @@ packages:
|
||||
- eslint-import-resolver-typescript
|
||||
- eslint-import-resolver-webpack
|
||||
- supports-color
|
||||
dev: false
|
||||
|
||||
/[email protected](@typescript-eslint/[email protected])([email protected]):
|
||||
resolution: {integrity: sha512-LmEt3GVofgiGuiE+ORpnvP+kAm3h6MLZJ4Q5HCyHADofsb4VzXFsRiWj3c0OFiV+3DWFh0qg3v9gcPlfc3zRow==}
|
||||
engines: {node: '>=4'}
|
||||
peerDependencies:
|
||||
'@typescript-eslint/parser': '*'
|
||||
eslint: ^2 || ^3 || ^4 || ^5 || ^6 || ^7.2.0 || ^8
|
||||
peerDependenciesMeta:
|
||||
'@typescript-eslint/parser':
|
||||
optional: true
|
||||
dependencies:
|
||||
'@typescript-eslint/parser': 6.2.0([email protected])([email protected])
|
||||
array-includes: 3.1.6
|
||||
array.prototype.flat: 1.3.1
|
||||
array.prototype.flatmap: 1.3.1
|
||||
debug: 3.2.7
|
||||
doctrine: 2.1.0
|
||||
eslint: 8.45.0
|
||||
eslint-import-resolver-node: 0.3.7
|
||||
eslint-module-utils: 2.7.4(@typescript-eslint/[email protected])([email protected])([email protected])
|
||||
has: 1.0.3
|
||||
is-core-module: 2.11.0
|
||||
is-glob: 4.0.3
|
||||
minimatch: 3.1.2
|
||||
object.values: 1.1.6
|
||||
resolve: 1.22.1
|
||||
semver: 7.5.3
|
||||
tsconfig-paths: 3.14.2
|
||||
transitivePeerDependencies:
|
||||
- eslint-import-resolver-typescript
|
||||
- eslint-import-resolver-webpack
|
||||
- supports-color
|
||||
|
||||
/[email protected]:
|
||||
resolution: {integrity: sha512-RzPeSjuw1NYiTSQyFzYl2uTDgiPQWDUmFCiGAMCITmXN627DsWZ9rR4KNzrb8vnk/gLL5qdYr8oxh44xsrcO5Q==}
|
||||
@@ -17021,12 +17146,6 @@ packages:
|
||||
punycode: 1.4.1
|
||||
dev: true
|
||||
|
||||
/[email protected]:
|
||||
resolution: {integrity: sha512-LsNDahCiCcJPe8NO7HijcnukHB24tKbfDDA5IILx9dmW3Frb52lhbeX6MPNUSvyGNfav2VTYpJ/OqkRoVLrh2Q==}
|
||||
hasBin: true
|
||||
dependencies:
|
||||
strnum: 1.0.5
|
||||
|
||||
/[email protected]:
|
||||
resolution: {integrity: sha512-B9/wizE4WngqQftFPmdaMYlXoJlJOYxGQOanC77fq9k8+Z0v5dDSVh+3glErdIROP//s/jgb7ZuxKfB8nVyo0g==}
|
||||
hasBin: true
|
||||
@@ -17627,6 +17746,7 @@ packages:
|
||||
|
||||
/[email protected]:
|
||||
resolution: {integrity: sha512-MKZeRNyYZAVVVG1oZeLaWie1uweH40m9AZwIwxyPbTSX4hHrVYSzLg0Ro5Z5R7XKkIX+Cc6oD1rqeDJnwsB8/A==}
|
||||
requiresBuild: true
|
||||
dependencies:
|
||||
inflight: 1.0.6
|
||||
inherits: 2.0.4
|
||||
@@ -21142,7 +21262,7 @@ packages:
|
||||
'@babel/plugin-proposal-optional-chaining': 7.21.0(@babel/[email protected])
|
||||
'@babel/plugin-syntax-dynamic-import': 7.8.3(@babel/[email protected])
|
||||
'@babel/plugin-syntax-export-default-from': 7.18.6(@babel/[email protected])
|
||||
'@babel/plugin-syntax-flow': 7.18.6(@babel/[email protected])
|
||||
'@babel/plugin-syntax-flow': 7.22.5(@babel/[email protected])
|
||||
'@babel/plugin-syntax-nullish-coalescing-operator': 7.8.3(@babel/[email protected])
|
||||
'@babel/plugin-syntax-optional-chaining': 7.8.3(@babel/[email protected])
|
||||
'@babel/plugin-transform-arrow-functions': 7.22.5(@babel/[email protected])
|
||||
@@ -21152,7 +21272,7 @@ packages:
|
||||
'@babel/plugin-transform-computed-properties': 7.22.5(@babel/[email protected])
|
||||
'@babel/plugin-transform-destructuring': 7.22.5(@babel/[email protected])
|
||||
'@babel/plugin-transform-exponentiation-operator': 7.22.5(@babel/[email protected])
|
||||
'@babel/plugin-transform-flow-strip-types': 7.21.0(@babel/[email protected])
|
||||
'@babel/plugin-transform-flow-strip-types': 7.22.5(@babel/[email protected])
|
||||
'@babel/plugin-transform-function-name': 7.22.5(@babel/[email protected])
|
||||
'@babel/plugin-transform-literals': 7.22.5(@babel/[email protected])
|
||||
'@babel/plugin-transform-modules-commonjs': 7.22.5(@babel/[email protected])
|
||||
@@ -21189,7 +21309,7 @@ packages:
|
||||
'@babel/plugin-proposal-optional-chaining': 7.21.0(@babel/[email protected])
|
||||
'@babel/plugin-syntax-dynamic-import': 7.8.3(@babel/[email protected])
|
||||
'@babel/plugin-syntax-export-default-from': 7.18.6(@babel/[email protected])
|
||||
'@babel/plugin-syntax-flow': 7.18.6(@babel/[email protected])
|
||||
'@babel/plugin-syntax-flow': 7.22.5(@babel/[email protected])
|
||||
'@babel/plugin-syntax-nullish-coalescing-operator': 7.8.3(@babel/[email protected])
|
||||
'@babel/plugin-syntax-optional-chaining': 7.8.3(@babel/[email protected])
|
||||
'@babel/plugin-transform-arrow-functions': 7.22.5(@babel/[email protected])
|
||||
@@ -21198,7 +21318,7 @@ packages:
|
||||
'@babel/plugin-transform-classes': 7.22.5(@babel/[email protected])
|
||||
'@babel/plugin-transform-computed-properties': 7.22.5(@babel/[email protected])
|
||||
'@babel/plugin-transform-destructuring': 7.22.5(@babel/[email protected])
|
||||
'@babel/plugin-transform-flow-strip-types': 7.21.0(@babel/[email protected])
|
||||
'@babel/plugin-transform-flow-strip-types': 7.22.5(@babel/[email protected])
|
||||
'@babel/plugin-transform-function-name': 7.22.5(@babel/[email protected])
|
||||
'@babel/plugin-transform-literals': 7.22.5(@babel/[email protected])
|
||||
'@babel/plugin-transform-modules-commonjs': 7.22.5(@babel/[email protected])
|
||||
@@ -21753,6 +21873,7 @@ packages:
|
||||
/[email protected]:
|
||||
resolution: {integrity: sha512-zIdGUrPRFTUELUvr3Gmc7KZ2Sw/h1PiVM0Af/oHB6zgnV1ikqSfRk+TOufi79aHYCW3NiOXmr1BP5nWbzojLaA==}
|
||||
hasBin: true
|
||||
requiresBuild: true
|
||||
optional: true
|
||||
|
||||
/[email protected]:
|
||||
@@ -23610,7 +23731,7 @@ packages:
|
||||
'@csstools/postcss-trigonometric-functions': 1.0.2([email protected])
|
||||
'@csstools/postcss-unset-value': 1.0.2([email protected])
|
||||
autoprefixer: 10.4.14([email protected])
|
||||
browserslist: 4.21.5
|
||||
browserslist: 4.21.9
|
||||
css-blank-pseudo: 3.0.3([email protected])
|
||||
css-has-pseudo: 3.0.4([email protected])
|
||||
css-prefers-color-scheme: 6.0.3([email protected])
|
||||
@@ -24178,7 +24299,7 @@ packages:
|
||||
dependencies:
|
||||
'@babel/code-frame': 7.22.5
|
||||
address: 1.2.2
|
||||
browserslist: 4.21.5
|
||||
browserslist: 4.21.9
|
||||
chalk: 4.1.2
|
||||
cross-spawn: 7.0.3
|
||||
detect-port-alt: 1.1.6
|
||||
@@ -24519,7 +24640,7 @@ packages:
|
||||
use-sidecar: 1.1.2(@types/[email protected])([email protected])
|
||||
dev: false
|
||||
|
||||
/[email protected](@babel/plugin-syntax-flow@7.18.6)(@babel/[email protected])([email protected])([email protected])([email protected]):
|
||||
/[email protected](@babel/plugin-syntax-flow@7.22.5)(@babel/[email protected])([email protected])([email protected])([email protected]):
|
||||
resolution: {integrity: sha512-8VAmEm/ZAwQzJ+GOMLbBsTdDKOpuZh7RPs0UymvBR2vRk4iZWCskjbFnxqjrzoIvlNNRZ3QJFx6/qDSi6zSnaQ==}
|
||||
engines: {node: '>=14.0.0'}
|
||||
hasBin: true
|
||||
@@ -24547,7 +24668,7 @@ packages:
|
||||
dotenv: 10.0.0
|
||||
dotenv-expand: 5.1.0
|
||||
eslint: 8.45.0
|
||||
eslint-config-react-app: 7.0.1(@babel/plugin-syntax-flow@7.18.6)(@babel/[email protected])([email protected])([email protected])([email protected])
|
||||
eslint-config-react-app: 7.0.1(@babel/plugin-syntax-flow@7.22.5)(@babel/[email protected])([email protected])([email protected])([email protected])
|
||||
eslint-webpack-plugin: 3.2.0([email protected])([email protected])
|
||||
file-loader: 6.2.0([email protected])
|
||||
fs-extra: 10.1.0
|
||||
@@ -25061,6 +25182,7 @@ packages:
|
||||
/[email protected]:
|
||||
resolution: {integrity: sha512-J5xnxTyqaiw06JjMftq7L9ouA448dw/E7dKghkP9WpKNuwmARNNg+Gk8/u5ryb9N/Yo2+z3MCwuqFK/+qPOPfQ==}
|
||||
hasBin: true
|
||||
requiresBuild: true
|
||||
dependencies:
|
||||
glob: 6.0.4
|
||||
optional: true
|
||||
@@ -25353,7 +25475,7 @@ packages:
|
||||
resolution: {integrity: sha512-0Ju4+6A8iOnpL/Thra7dZsSlOHYAHIeMxfhWQRI1/VLcT3WDBZKKtQt/QkBOsiIN9ZpuvHE6cGZ0x4glCMmfiA==}
|
||||
engines: {node: '>=12'}
|
||||
dependencies:
|
||||
semver: 7.5.3
|
||||
semver: 7.5.4
|
||||
dev: false
|
||||
|
||||
/[email protected]:
|
||||
@@ -28085,7 +28207,7 @@ packages:
|
||||
'@webassemblyjs/wasm-parser': 1.11.1
|
||||
acorn: 8.10.0
|
||||
acorn-import-assertions: 1.8.0([email protected])
|
||||
browserslist: 4.21.5
|
||||
browserslist: 4.21.9
|
||||
chrome-trace-event: 1.0.3
|
||||
enhanced-resolve: 5.12.0
|
||||
es-module-lexer: 0.9.3
|
||||
@@ -28844,7 +28966,3 @@ packages:
|
||||
version: 5.4.7
|
||||
engines: {node: '>=0.11'}
|
||||
dev: true
|
||||
|
||||
settings:
|
||||
autoInstallPeers: true
|
||||
excludeLinksFromLockfile: false
|
||||
|
||||
Reference in New Issue
Block a user