Compare commits

...
Author SHA1 Message Date
github-actions[bot]GitHubgithub-actions[bot] <github-actions[bot]@users.noreply.github.com>
1d32b299a0 Version Packages (#1337)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2023-07-13 16:02:54 -07:00
Tair AsimandGitHub cfa7ecbc9a service-utils: remove crypt + unfetch (#1339) 2023-07-13 22:20:42 +00:00
Jonas DanielsandGitHub 8dd7540c45 [storage] - remove HEAD request pre upload (#1338) 2023-07-13 21:57:30 +00:00
07c7d97c28 [service-utils] - initially add package (#1333)
Co-authored-by: Tair Asim <[email protected]>
2023-07-13 20:51:55 +00:00
github-actions[bot]GitHubgithub-actions[bot] <github-actions[bot]@users.noreply.github.com>
47e931e0dd Version Packages (#1336)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2023-07-13 09:25:13 -07:00
Jonas DanielsandGitHub 0407b2c2f3 [chains] update chains (#1335) 2023-07-13 16:01:04 +00:00
github-actions[bot]GitHubgithub-actions[bot] <github-actions[bot]@users.noreply.github.com>
55ffb176f2 Version Packages (#1331)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2023-07-12 19:28:04 -07:00
Adam MajmudarandGitHub a9093bcf28 Override binance chain slug (#1330) 2023-07-12 19:17:58 -07:00
github-actions[bot]GitHubgithub-actions[bot] <github-actions[bot]@users.noreply.github.com>
db964131b4 Version Packages (#1329)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2023-07-12 18:56:29 -07:00
Adam MajmudarandGitHub 4393b22805 Make base default chain (#1328) 2023-07-12 18:42:27 -07:00
github-actions[bot]GitHubgithub-actions[bot] <github-actions[bot]@users.noreply.github.com>
b28c3a5a67 Version Packages (#1327)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2023-07-12 18:29:43 -07:00
Adam MajmudarandGitHub 4068219145 [Chains] Add support for base (#1326) 2023-07-13 00:25:33 +00:00
github-actions[bot]GitHubgithub-actions[bot] <github-actions[bot]@users.noreply.github.com>
03d1a6d73b Version Packages (#1311)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2023-07-11 14:34:02 -07:00
YashandGitHub fd74d79180 [Chains] Update chains: Linea Mainnet (#1320) 2023-07-11 17:42:19 +00:00
Jonas DanielsandGitHub 35f20ceb4f [all] add package resolutions (#1315) 2023-07-11 01:27:22 +00:00
iketwandGitHub db68bd04cd Passes API key to all packages (#1314) 2023-07-10 23:06:05 +00:00
Manan TankandGitHub 3df86ad16f [react] ConnectWallet UI fixes (#1310) 2023-07-10 15:42:50 +00:00
github-actions[bot]GitHubgithub-actions[bot] <github-actions[bot]@users.noreply.github.com>
4389083ca3 Version Packages (#1294)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2023-07-09 22:16:24 -07:00
Jonas DanielsandGitHub 4961b597a0 unblock storage (#1309) 2023-07-10 04:54:23 +00:00
nkrishangandGitHub 7e044c664d [SDK] Create ERC721LoyaltyCard and ERC721UpdatableMetadata (#1299) 2023-07-08 00:55:24 +00:00
iketwandGitHub 498df5d69a [RN] Fix ImageSvgUri render by trying Image first (#1306) 2023-07-07 16:47:53 +00:00
Nacho IacovinoandGitHub b8d4930305 [SDK] Add social_urls to CommonContractSchema (#1305) 2023-07-07 16:30:51 +00:00
Nacho IacovinoandGitHub 2c0bb07899 [SDK] Fix pack code snippets (#1304) 2023-07-07 15:24:34 +00:00
Joaquim VergesandGitHub 72ada47596 [SDK] Proper handling of custom contract metadata types (#1298) 2023-07-07 04:38:27 +00:00
iketwandGitHub dc9eee735c [RN] Improve svg rendering (#1300) 2023-07-07 00:46:12 +00:00
Adam MajmudarandGitHub b4aee9b591 [Wallets] Add all supported chains to safe server urls (#1301) 2023-07-07 00:38:39 +00:00
FirekeeperandGitHub b5c6eedb38 Firekeeper/default chains zksync (#1297) 2023-07-06 22:22:02 +00:00
iketwandGitHub 8672c8533c Ike/demo (#1283) 2023-07-06 22:08:04 +00:00
FirekeeperandGitHub bb207473f8 Firekeeper/default wallets wcv2 (#1293) 2023-07-06 21:00:46 +00:00
Tair AsimandGitHub 10b3a717da fix: handling authz errors from smart wallet connector (#1292) 2023-07-06 19:08:49 +00:00
Josh SteinandGitHub aa81bedaf2 deps: change Taro to Bubs testnet (#1289) 2023-07-06 03:56:52 +00:00
132 changed files with 3877 additions and 1091 deletions
+19
View File
@@ -51,5 +51,24 @@
},
"manypkg": {
"defaultBranch": "main"
},
"pnpm": {
"overrides": {
"cross-fetch@>=3.0.0 <3.1.5": ">=3.1.5",
"got@<11.8.5": ">=11.8.5",
"glob-parent@<5.1.2": ">=5.1.2",
"node-fetch@<2.6.7": ">=2.6.7",
"nth-check@<2.0.1": ">=2.0.1",
"socket.io-parser@>=4.0.4 <4.2.3": ">=4.2.3",
"fast-xml-parser@<4.2.4": ">=4.2.4",
"@openzeppelin/contracts@>=4.3.0 <4.9.1": ">=4.9.1",
"@openzeppelin/contracts@>=4.7.0 <4.9.2": ">=4.9.2",
"xml2js@<0.5.0": ">=0.5.0",
"engine.io@>=5.1.0 <6.4.2": ">=6.4.2",
"semver@<7.5.2": ">=7.5.2",
"json5@<1.0.2": ">=1.0.2",
"protobufjs@>=6.10.0 <7.2.4": ">=7.2.4",
"tough-cookie@<4.1.3": ">=4.1.3"
}
}
}
+49
View File
@@ -1,5 +1,54 @@
# @thirdweb-dev/auth
## 3.2.15
### Patch Changes
- Updated dependencies []:
- @thirdweb-dev/wallets@1.0.11
## 3.2.14
### Patch Changes
- Updated dependencies []:
- @thirdweb-dev/wallets@1.0.10
## 3.2.13
### Patch Changes
- Updated dependencies []:
- @thirdweb-dev/wallets@1.0.9
## 3.2.12
### Patch Changes
- Updated dependencies []:
- @thirdweb-dev/wallets@1.0.8
## 3.2.11
### Patch Changes
- Updated dependencies []:
- @thirdweb-dev/wallets@1.0.7
## 3.2.10
### Patch Changes
- Updated dependencies []:
- @thirdweb-dev/wallets@1.0.6
## 3.2.9
### Patch Changes
- Updated dependencies [[`10b3a717`](https://github.com/thirdweb-dev/js/commit/10b3a717da606632a05769ac821bdd21d6b63a03), [`b4aee9b5`](https://github.com/thirdweb-dev/js/commit/b4aee9b59121bab5f9b3d9b7ecdc4bcb4cd66f58)]:
- @thirdweb-dev/wallets@1.0.5
## 3.2.8
### Patch Changes
+1 -1
View File
@@ -1,6 +1,6 @@
{
"name": "@thirdweb-dev/auth",
"version": "3.2.8",
"version": "3.2.15",
"main": "dist/thirdweb-dev-auth.cjs.js",
"module": "dist/thirdweb-dev-auth.esm.js",
"browser": {
+48
View File
@@ -1,5 +1,53 @@
# @thirdweb-dev/chains
## 0.1.34
### Patch Changes
- [#1338](https://github.com/thirdweb-dev/js/pull/1338) [`8dd7540c`](https://github.com/thirdweb-dev/js/commit/8dd7540c455aa70534f6d29986537592fd12169b) Thanks [@jnsdls](https://github.com/jnsdls)! - update chains
## 0.1.33
### Patch Changes
- [#1335](https://github.com/thirdweb-dev/js/pull/1335) [`0407b2c2`](https://github.com/thirdweb-dev/js/commit/0407b2c2f39b5f3fa06e613e671623b5644b3a28) Thanks [@jnsdls](https://github.com/jnsdls)! - update chains again
## 0.1.32
### Patch Changes
- [#1330](https://github.com/thirdweb-dev/js/pull/1330) [`a9093bcf`](https://github.com/thirdweb-dev/js/commit/a9093bcf287c01e3335fd780e2ccbfdb3380bf95) Thanks [@adam-maj](https://github.com/adam-maj)! - Override binance slug
## 0.1.31
### Patch Changes
- [#1328](https://github.com/thirdweb-dev/js/pull/1328) [`4393b228`](https://github.com/thirdweb-dev/js/commit/4393b2280505fd0b2284555d64eae6567e8401a5) Thanks [@adam-maj](https://github.com/adam-maj)! - Make base default chain
## 0.1.30
### Patch Changes
- [#1326](https://github.com/thirdweb-dev/js/pull/1326) [`40682191`](https://github.com/thirdweb-dev/js/commit/40682191450de08ad40b9d2957afced248657af2) Thanks [@adam-maj](https://github.com/adam-maj)! - Add base chain support
## 0.1.29
### Patch Changes
- [#1320](https://github.com/thirdweb-dev/js/pull/1320) [`fd74d791`](https://github.com/thirdweb-dev/js/commit/fd74d7918072cda03b52f852ebb3f8dccb84074d) Thanks [@kumaryash90](https://github.com/kumaryash90)! - Linea mainnet support
- [#1315](https://github.com/thirdweb-dev/js/pull/1315) [`35f20ceb`](https://github.com/thirdweb-dev/js/commit/35f20ceb4f943e95d9566105096f06412978da7a) Thanks [@jnsdls](https://github.com/jnsdls)! - add more chains
## 0.1.28
### Patch Changes
- [#1299](https://github.com/thirdweb-dev/js/pull/1299) [`7e044c66`](https://github.com/thirdweb-dev/js/commit/7e044c664d8a034f5324b859ac3596860c86f9a5) Thanks [@nkrishang](https://github.com/nkrishang)! - Add ERC721LoyaltyCard and ERC721UpdatableMetadata
- [#1297](https://github.com/thirdweb-dev/js/pull/1297) [`b5c6eedb`](https://github.com/thirdweb-dev/js/commit/b5c6eedb38aa3c52eb97f3d25ad83e38c55afe61) Thanks [@0xFirekeeper](https://github.com/0xFirekeeper)! - add zksync as default chain
- [#1309](https://github.com/thirdweb-dev/js/pull/1309) [`4961b597`](https://github.com/thirdweb-dev/js/commit/4961b597a098dae0a4eff01a9ef268a65fe1a352) Thanks [@jnsdls](https://github.com/jnsdls)! - unblock storage domains
## 0.1.27
### Patch Changes
@@ -20,12 +20,12 @@ export default {
"nativeCurrency": {
"name": "SMR",
"symbol": "SMR",
"decimals": 18
"decimals": 6
},
"infoURL": "https://shimmer.network",
"shortName": "shimmerevm-testnet",
"chainId": 1071,
"networkId": 1071,
"chainId": 1072,
"networkId": 1072,
"explorers": [
{
"name": "explorer",
+35
View File
@@ -0,0 +1,35 @@
import type { Chain } from "../src/types";
export default {
"name": "Mintara Testnet",
"title": "Mintara Testnet",
"chain": "Mintara",
"icon": {
"url": "ipfs://bafybeie7jzlzlpz7c3a3oh4x5joej23dj2qf3cexmchjyc72hv3fblcaja",
"width": 256,
"height": 256,
"format": "png"
},
"rpc": [
"https://mintara-testnet.rpc.thirdweb.com/${THIRDWEB_API_KEY}",
"https://subnets.avax.network/mintara/testnet/rpc"
],
"faucets": [],
"nativeCurrency": {
"name": "MINTARA",
"symbol": "MNTR",
"decimals": 18
},
"infoURL": "https://playthink.co.jp",
"shortName": "mintara-testnet",
"chainId": 1079,
"networkId": 1079,
"explorers": [
{
"name": "explorer",
"url": "https://subnets-test.avax.network/mintara",
"standard": "EIP3091"
}
],
"testnet": true,
"slug": "mintara-testnet"
} as const satisfies Chain;
+9 -9
View File
@@ -1,8 +1,8 @@
import type { Chain } from "../src/types";
export default {
"name": "Taro Testnet",
"name": "Bubs Testnet",
"chain": "gETH",
"shortName": "Taro",
"shortName": "Bubs",
"chainId": 1582,
"testnet": true,
"icon": {
@@ -12,8 +12,8 @@ export default {
"height": 512
},
"rpc": [
"https://taro-testnet.rpc.thirdweb.com/${THIRDWEB_API_KEY}",
"https://taro-testnet.calderachain.xyz/http"
"https://bubs-testnet.rpc.thirdweb.com/${THIRDWEB_API_KEY}",
"https://bubs.calderachain.xyz/http"
],
"nativeCurrency": {
"decimals": 18,
@@ -22,15 +22,15 @@ export default {
},
"explorers": [
{
"url": "https://explorer.tarotestnet.com",
"name": "Taro Testnet Explorer",
"url": "https://explorer.bubstestnet.com",
"name": "Bubs Testnet Explorer",
"standard": "EIP3091"
}
],
"faucets": [
"https://tarotestnet.com"
"https://bubstestnet.com"
],
"infoURL": "https://tarotestnet.com",
"infoURL": "https://bubstestnet.com",
"networkId": 1582,
"slug": "taro-testnet"
"slug": "bubs-testnet"
} as const satisfies Chain;
+34
View File
@@ -0,0 +1,34 @@
import type { Chain } from "../src/types";
export default {
"name": "MXC zkEVM Mainnet",
"chain": "MXC zkEVM",
"icon": {
"url": "ipfs://QmdGCthKA11K9kCZJdbTP5WPAyq1wiRZ3REn6KG58MrWaE",
"width": 159,
"height": 159,
"format": "png"
},
"rpc": [
"https://mxc-zkevm.rpc.thirdweb.com/${THIRDWEB_API_KEY}",
"https://rpc.mxc.com"
],
"faucets": [],
"nativeCurrency": {
"name": "MXC zkEVM Mainnet",
"symbol": "MXC",
"decimals": 18
},
"infoURL": "https://doc.mxc.com/docs/intro",
"shortName": "MXCzkEVM",
"chainId": 18686,
"networkId": 18686,
"explorers": [
{
"name": "MXC zkEVM Mainnet",
"url": "https://explorer.mxc.com",
"standard": "EIP3091"
}
],
"testnet": false,
"slug": "mxc-zkevm"
} as const satisfies Chain;
+44
View File
@@ -0,0 +1,44 @@
import type { Chain } from "../src/types";
export default {
"name": "Moonsama Network",
"chain": "MSN",
"rpc": [
"https://moonsama-network.rpc.thirdweb.com/${THIRDWEB_API_KEY}",
"https://rpc.moonsama.com",
"wss://rpc.moonsama.com/ws"
],
"faucets": [
"https://multiverse.moonsama.com/faucet"
],
"nativeCurrency": {
"name": "Sama Token",
"symbol": "SAMA",
"decimals": 18
},
"infoURL": "https://moonsama.com",
"shortName": "msn",
"chainId": 2199,
"networkId": 2199,
"slip44": 2199,
"icon": {
"url": "ipfs://QmaQxfwpXYTomUd24PMx5tKjosupXcm99z1jL1XLq9LWBS",
"width": 468,
"height": 468,
"format": "png"
},
"explorers": [
{
"name": "blockscout",
"url": "https://explorer.moonsama.com",
"icon": {
"url": "ipfs://bafybeifu5tpui7dk5cjoo54kde7pmuthvnl7sdykobuarsxgu7t2izurnq",
"width": 512,
"height": 512,
"format": "png"
},
"standard": "EIP3091"
}
],
"testnet": false,
"slug": "moonsama-network"
} as const satisfies Chain;
+36
View File
@@ -0,0 +1,36 @@
import type { Chain } from "../src/types";
export default {
"name": "Antofy Testnet",
"chain": "ABN",
"icon": {
"url": "ipfs://QmdTfku81ohnG9ECU1Xswmeumt678cBhwHWuFYZ7i1Qsto",
"width": 400,
"height": 400,
"format": "png"
},
"rpc": [
"https://antofy-testnet.rpc.thirdweb.com/${THIRDWEB_API_KEY}",
"https://testnet-rpc.antofy.io"
],
"faucets": [
"https://faucet.antofy.io"
],
"nativeCurrency": {
"name": "Antofy",
"symbol": "ABN",
"decimals": 18
},
"infoURL": "https://antofy.io",
"shortName": "ABNt",
"chainId": 23006,
"networkId": 23006,
"explorers": [
{
"name": "Antofy Testnet",
"url": "https://test.antofyscan.com",
"standard": "EIP3091"
}
],
"testnet": true,
"slug": "antofy-testnet"
} as const satisfies Chain;
+36
View File
@@ -0,0 +1,36 @@
import type { Chain } from "../src/types";
export default {
"name": "Plinga Mainnet",
"chain": "Plinga",
"icon": {
"url": "ipfs://bafybeibpvlod5nyev6wyuvp6pbestmgvru3ovbadsul32odpno26xwld6y",
"width": 1039,
"height": 1022,
"format": "svg"
},
"rpc": [
"https://plinga.rpc.thirdweb.com/${THIRDWEB_API_KEY}",
"https://rpcurl.mainnet.plgchain.com",
"https://rpcurl.plgchain.blockchain.evmnode.online",
"https://rpcurl.mainnet.plgchain.plinga.technology"
],
"faucets": [],
"nativeCurrency": {
"name": "Plinga",
"symbol": "PLINGA",
"decimals": 18
},
"infoURL": "https://www.plinga.technology/",
"shortName": "plgchain",
"chainId": 242,
"networkId": 242,
"explorers": [
{
"name": "plgscan",
"url": "https://www.plgscan.com",
"standard": "EIP3091"
}
],
"testnet": false,
"slug": "plinga"
} as const satisfies Chain;
+1 -4
View File
@@ -2,10 +2,7 @@ import type { Chain } from "../src/types";
export default {
"name": "Neon EVM MainNet",
"chain": "Solana",
"rpc": [
"https://neon-evm.rpc.thirdweb.com/${THIRDWEB_API_KEY}",
"https://mainnet.neonevm.org"
],
"rpc": [],
"faucets": [],
"icon": {
"url": "ipfs://Qmcxevb3v8PEvnvfYgcG3bCBuPhe5YAdsHeaufDChSSR3Q",
+6 -1
View File
@@ -4,7 +4,12 @@ export default {
"chain": "ETH",
"rpc": [
"https://boba-network.rpc.thirdweb.com/${THIRDWEB_API_KEY}",
"https://mainnet.boba.network/"
"https://mainnet.boba.network",
"https://replica.boba.network",
"http://boba-ethereum.gateway.tenderly.co",
"http://gateway.tenderly.co/public/boba-ethereum",
"wss://boba-ethereum.gateway.tenderly.co/",
"wss://gateway.tenderly.co/public/boba-ethereum"
],
"faucets": [],
"nativeCurrency": {
+4 -3
View File
@@ -4,7 +4,8 @@ export default {
"chain": "ETH",
"rpc": [
"https://boba-network-goerli-testnet.rpc.thirdweb.com/${THIRDWEB_API_KEY}",
"https://goerli.boba.network/"
"https://goerli.boba.network/",
"wss://wss.goerli.boba.network/"
],
"faucets": [],
"nativeCurrency": {
@@ -13,7 +14,7 @@ export default {
"decimals": 18
},
"infoURL": "https://boba.network",
"shortName": "Bobagoerli",
"shortName": "BobaGoerli",
"chainId": 2888,
"networkId": 2888,
"explorers": [
@@ -28,7 +29,7 @@ export default {
"chain": "eip155-5",
"bridges": [
{
"url": "https://gateway.goerli.boba.network"
"url": "https://gateway.boba.network"
}
]
},
+36
View File
@@ -0,0 +1,36 @@
import type { Chain } from "../src/types";
export default {
"name": "Botanix Testnet",
"chain": "BTC",
"icon": {
"url": "ipfs://Qmf2iSjcrZwUDKhCVY9ZzfbSV2He2HSssbcG2yMz1mDerm",
"width": 32,
"height": 32,
"format": "png"
},
"rpc": [
"https://botanix-testnet.rpc.thirdweb.com/${THIRDWEB_API_KEY}",
"https://testnet-rpc.btxtestchain.com"
],
"faucets": [
"https://faucet.btxtestchain.com"
],
"nativeCurrency": {
"name": "Botanix",
"symbol": "BTC",
"decimals": 18
},
"infoURL": "https://btxtestchain.com",
"shortName": "BTCt",
"chainId": 3636,
"networkId": 3636,
"explorers": [
{
"name": "Botanix",
"url": "https://testnet.btxtestchain.com",
"standard": "EIP3091"
}
],
"testnet": true,
"slug": "botanix-testnet"
} as const satisfies Chain;
+36
View File
@@ -0,0 +1,36 @@
import type { Chain } from "../src/types";
export default {
"name": "Botanix Mainnet",
"chain": "BTC",
"icon": {
"url": "ipfs://Qmf2iSjcrZwUDKhCVY9ZzfbSV2He2HSssbcG2yMz1mDerm",
"width": 32,
"height": 32,
"format": "png"
},
"rpc": [
"https://botanix.rpc.thirdweb.com/${THIRDWEB_API_KEY}",
"https://rpc.btxtestchain.com"
],
"faucets": [
"https://faucet.btxtestchain.com"
],
"nativeCurrency": {
"name": "Botanix",
"symbol": "BTC",
"decimals": 18
},
"infoURL": "https://btxtestchain.com",
"shortName": "BTCm",
"chainId": 3637,
"networkId": 3637,
"explorers": [
{
"name": "Botanix",
"url": "https://btxtestchain.com",
"standard": "EIP3091"
}
],
"testnet": true,
"slug": "botanix"
} as const satisfies Chain;
+36
View File
@@ -0,0 +1,36 @@
import type { Chain } from "../src/types";
export default {
"name": "SenjePowers Testnet",
"chain": "SPC",
"icon": {
"url": "ipfs://QmcpyTj4hUyHJZ2VmSdkXFpPpRcNKRP1VxMs7Cp1anymNy",
"width": 504,
"height": 495,
"format": "png"
},
"rpc": [
"https://senjepowers-testnet.rpc.thirdweb.com/${THIRDWEB_API_KEY}",
"https://testnet-rpc.senjepowersscan.com"
],
"faucets": [
"https://faucet.senjepowersscan.com"
],
"nativeCurrency": {
"name": "SenjePowers",
"symbol": "SPC",
"decimals": 18
},
"infoURL": "https://senjepowersscan.com",
"shortName": "SPCt",
"chainId": 3698,
"networkId": 3698,
"explorers": [
{
"name": "SenjePowers",
"url": "https://testnet.senjepowersscan.com",
"standard": "EIP3091"
}
],
"testnet": true,
"slug": "senjepowers-testnet"
} as const satisfies Chain;
+48
View File
@@ -0,0 +1,48 @@
import type { Chain } from "../src/types";
export default {
"name": "AltLayer Zero Gas Network",
"chain": "ETH",
"rpc": [
"https://altlayer-zero-gas-network.rpc.thirdweb.com/${THIRDWEB_API_KEY}",
"https://zero.alt.technology"
],
"faucets": [],
"nativeCurrency": {
"name": "ZERO",
"symbol": "ZERO",
"decimals": 18
},
"features": [
{
"name": "EIP155"
},
{
"name": "EIP1559"
}
],
"infoURL": "https://altlayer.io",
"shortName": "alt-zerogas",
"chainId": 4000003,
"networkId": 4000003,
"icon": {
"url": "ipfs://QmcEfZJU7NMn9ycTAcEooQgGNfa2nYBToSUZHdFCFadcjb",
"width": 1080,
"height": 1025,
"format": "png"
},
"explorers": [
{
"name": "blockscout",
"url": "https://zero-explorer.alt.technology",
"icon": {
"url": "ipfs://bafybeifu5tpui7dk5cjoo54kde7pmuthvnl7sdykobuarsxgu7t2izurnq",
"width": 512,
"height": 512,
"format": "png"
},
"standard": "EIP3091"
}
],
"testnet": false,
"slug": "altlayer-zero-gas-network"
} as const satisfies Chain;
+57
View File
@@ -0,0 +1,57 @@
import type { Chain } from "../src/types";
export default {
"name": "PGN (Public Goods Network)",
"chain": "ETH",
"rpc": [
"https://pgn-public-goods-network.rpc.thirdweb.com/${THIRDWEB_API_KEY}",
"https://rpc.publicgoods.network"
],
"faucets": [],
"nativeCurrency": {
"name": "Ether",
"symbol": "ETH",
"decimals": 18
},
"features": [
{
"name": "EIP155"
},
{
"name": "EIP1559"
}
],
"infoURL": "https://publicgoods.network/",
"shortName": "PGN",
"chainId": 424,
"networkId": 424,
"icon": {
"url": "ipfs://QmUVJ7MLCEAfq3pHVPFLscqRMiyAY5biVgTkeDQCmAhHNS",
"width": 574,
"height": 574,
"format": "svg"
},
"explorers": [
{
"name": "blockscout",
"url": "https://explorer.publicgoods.network",
"icon": {
"url": "ipfs://bafybeifu5tpui7dk5cjoo54kde7pmuthvnl7sdykobuarsxgu7t2izurnq",
"width": 512,
"height": 512,
"format": "png"
},
"standard": "EIP3091"
}
],
"parent": {
"type": "L2",
"chain": "eip155-1",
"bridges": [
{
"url": "https://bridge.publicgoods.network"
}
]
},
"testnet": false,
"slug": "pgn-public-goods-network"
} as const satisfies Chain;
+10 -2
View File
@@ -6,8 +6,7 @@ export default {
"https://bobafuji-testnet.rpc.thirdweb.com/${THIRDWEB_API_KEY}",
"https://testnet.avax.boba.network",
"wss://wss.testnet.avax.boba.network",
"https://replica.testnet.avax.boba.network",
"wss://replica-wss.testnet.avax.boba.network"
"https://replica.testnet.avax.boba.network"
],
"faucets": [],
"nativeCurrency": {
@@ -26,6 +25,15 @@ export default {
"standard": "none"
}
],
"parent": {
"type": "L2",
"chain": "eip155-5",
"bridges": [
{
"url": "https://gateway.boba.network"
}
]
},
"testnet": true,
"slug": "bobafuji-testnet"
} as const satisfies Chain;
+40
View File
@@ -0,0 +1,40 @@
import type { Chain } from "../src/types";
export default {
"name": "MEVerse Chain Testnet",
"chain": "MEVerse",
"rpc": [
"https://meverse-chain-testnet.rpc.thirdweb.com/${THIRDWEB_API_KEY}",
"https://rpc.meversetestnet.io"
],
"faucets": [],
"nativeCurrency": {
"name": "MEVerse",
"symbol": "MEV",
"decimals": 18
},
"infoURL": "https://www.meverse.sg",
"shortName": "TESTMEV",
"chainId": 4759,
"networkId": 4759,
"icon": {
"url": "ipfs://QmPuQ6gaCfUtNdRuaEDbdhot2m2KCy2ZHCJUvZXJAtdeyJ",
"width": 800,
"height": 800,
"format": "png"
},
"explorers": [
{
"name": "MEVerse Chain Testnet Explorer",
"url": "https://testnet.meversescan.io",
"standard": "none",
"icon": {
"url": "ipfs://QmPuQ6gaCfUtNdRuaEDbdhot2m2KCy2ZHCJUvZXJAtdeyJ",
"width": 800,
"height": 800,
"format": "png"
}
}
],
"testnet": true,
"slug": "meverse-chain-testnet"
} as const satisfies Chain;
+30
View File
@@ -0,0 +1,30 @@
import type { Chain } from "../src/types";
export default {
"name": "Shinarium Beta",
"chain": "Shinarium",
"rpc": [
"https://shinarium-beta.rpc.thirdweb.com/${THIRDWEB_API_KEY}",
"https://rpc.shinarium.org"
],
"faucets": [
"https://faucet.shinarium.org"
],
"nativeCurrency": {
"name": "Shina Inu",
"symbol": "SHI",
"decimals": 18
},
"infoURL": "https://shinarium.org",
"shortName": "shi",
"chainId": 534849,
"networkId": 534849,
"explorers": [
{
"name": "shinascan",
"url": "https://shinascan.shinarium.org",
"standard": "EIP3091"
}
],
"testnet": false,
"slug": "shinarium-beta"
} as const satisfies Chain;
+7 -7
View File
@@ -1,6 +1,6 @@
import type { Chain } from "../src/types";
export default {
"name": "Binance Smart Chain Mainnet",
"name": "BNB Smart Chain Mainnet",
"chain": "BSC",
"rpc": [
"https://binance.rpc.thirdweb.com/${THIRDWEB_API_KEY}",
@@ -14,20 +14,20 @@ export default {
"https://bsc-dataseed3.defibit.io",
"https://bsc-dataseed2.defibit.io",
"https://bsc-dataseed1.defibit.io",
"https://bsc-dataseed4.binance.org",
"https://bsc-dataseed3.binance.org",
"https://bsc-dataseed2.binance.org",
"https://bsc-dataseed1.binance.org"
"https://bsc-dataseed4.bnbchain.org",
"https://bsc-dataseed3.bnbchain.org",
"https://bsc-dataseed2.bnbchain.org",
"https://bsc-dataseed1.bnbchain.org"
],
"faucets": [
"https://free-online-app.com/faucet-for-eth-evm-chains/"
],
"nativeCurrency": {
"name": "Binance Chain Native Token",
"name": "BNB Chain Native Token",
"symbol": "BNB",
"decimals": 18
},
"infoURL": "https://www.binance.org",
"infoURL": "https://www.bnbchain.org/en",
"shortName": "bnb",
"chainId": 56,
"networkId": 56,
+13 -2
View File
@@ -5,9 +5,11 @@ export default {
"rpc": [
"https://boba-bnb.rpc.thirdweb.com/${THIRDWEB_API_KEY}",
"https://bnb.boba.network",
"wss://wss.bnb.boba.network",
"http://boba-bnb.gateway.tenderly.co/",
"http://gateway.tenderly.co/public/boba-bnb",
"https://replica.bnb.boba.network",
"wss://replica-wss.bnb.boba.network"
"wss://boba-bnb.gateway.tenderly.co/",
"wss://gateway.tenderly.co/public/boba-bnb"
],
"faucets": [],
"nativeCurrency": {
@@ -26,6 +28,15 @@ export default {
"standard": "none"
}
],
"parent": {
"type": "L2",
"chain": "eip155-5",
"bridges": [
{
"url": "https://gateway.boba.network"
}
]
},
"testnet": false,
"slug": "boba-bnb"
} as const satisfies Chain;
+57
View File
@@ -0,0 +1,57 @@
import type { Chain } from "../src/types";
export default {
"name": "Sepolia PGN (Public Goods Network)",
"chain": "ETH",
"rpc": [
"https://sepolia-pgn-public-goods-network.rpc.thirdweb.com/${THIRDWEB_API_KEY}",
"https://sepolia.publicgoods.network"
],
"faucets": [],
"nativeCurrency": {
"name": "Sepolia Ether",
"symbol": "ETH",
"decimals": 18
},
"features": [
{
"name": "EIP155"
},
{
"name": "EIP1559"
}
],
"infoURL": "https://publicgoods.network/",
"shortName": "sepPGN",
"chainId": 58008,
"networkId": 58008,
"icon": {
"url": "ipfs://QmUVJ7MLCEAfq3pHVPFLscqRMiyAY5biVgTkeDQCmAhHNS",
"width": 574,
"height": 574,
"format": "svg"
},
"explorers": [
{
"name": "blockscout",
"url": "https://explorer.sepolia.publicgoods.network",
"icon": {
"url": "ipfs://bafybeifu5tpui7dk5cjoo54kde7pmuthvnl7sdykobuarsxgu7t2izurnq",
"width": 512,
"height": 512,
"format": "png"
},
"standard": "EIP3091"
}
],
"parent": {
"type": "L2",
"chain": "eip155-11155111",
"bridges": [
{
"url": "https://pgn-bridge.vercel.app/bridge"
}
]
},
"testnet": false,
"slug": "sepolia-pgn-public-goods-network"
} as const satisfies Chain;
+32
View File
@@ -0,0 +1,32 @@
import type { Chain } from "../src/types";
export default {
"name": "Linea Mainnet",
"chain": "Linea Mainnet",
"shortName": "linea-mainnet",
"chainId": 59144,
"testnet": false,
"nativeCurrency": {
"name": "Ether",
"symbol": "ETH",
"decimals": 18
},
"rpc": [],
"explorers": [
{
"name": "Linea Scan",
"url": "https://lineascan.build",
"standard": ""
}
],
"faucets": [
"https://www.infura.io/faucet/linea"
],
"infoURL": "https://docs.linea.build/overview",
"icon": {
"url": "ipfs://QmURjritnHL7a8TwZgsFwp3f272DJmG5paaPtWDZ98QZwH",
"height": 512,
"width": 512,
"format": "svg"
},
"slug": "linea"
} as const satisfies Chain;
+40
View File
@@ -0,0 +1,40 @@
import type { Chain } from "../src/types";
export default {
"name": "Avocado",
"chain": "Avocado",
"rpc": [
"https://avocado.rpc.thirdweb.com/${THIRDWEB_API_KEY}",
"https://rpc.avocado.instadapp.io"
],
"faucets": [],
"nativeCurrency": {
"name": "USDC",
"symbol": "USDC",
"decimals": 18
},
"infoURL": "https://avocado.instadapp.io",
"shortName": "avocado",
"chainId": 634,
"networkId": 634,
"icon": {
"url": "ipfs://Qma9rJSgy32UL1iXtXKFZQJA6FjkcUcDU4HR6y13Wu1vjn",
"width": 600,
"height": 600,
"format": "png"
},
"explorers": [
{
"name": "avoscan",
"url": "https://avoscan.co",
"icon": {
"url": "ipfs://Qma9rJSgy32UL1iXtXKFZQJA6FjkcUcDU4HR6y13Wu1vjn",
"width": 600,
"height": 600,
"format": "png"
},
"standard": "none"
}
],
"testnet": false,
"slug": "avocado"
} as const satisfies Chain;
+34
View File
@@ -0,0 +1,34 @@
import type { Chain } from "../src/types";
export default {
"name": "ALL Mainnet",
"chain": "ALL",
"icon": {
"url": "ipfs://bafkreibqe2mgiqezi24sx272kunqt6pv7uzxhpkxuobvpbsptce3q6nn5i",
"width": 1000,
"height": 1000,
"format": "png"
},
"rpc": [
"https://all.rpc.thirdweb.com/${THIRDWEB_API_KEY}",
"https://mainnet-rpc.alltra.global"
],
"faucets": [],
"nativeCurrency": {
"name": "ALL",
"symbol": "ALL",
"decimals": 18
},
"infoURL": "https://alltra.world",
"shortName": "ALL",
"chainId": 651940,
"networkId": 651940,
"explorers": [
{
"name": "Alltra SmartChain Explorer",
"url": "https://alltra.global",
"standard": "EIP3091"
}
],
"testnet": false,
"slug": "all"
} as const satisfies Chain;
+1 -2
View File
@@ -10,8 +10,7 @@ export default {
},
"rpc": [
"https://zetachain-athens-testnet.rpc.thirdweb.com/${THIRDWEB_API_KEY}",
"https://zetachain-athens-evm.blockpi.network/v1/rpc/public",
"wss://zetachain-athens.blockpi.network/rpc/v1/public/websocket"
"https://api.athens2.zetachain.com/evm"
],
"faucets": [
"https://labs.zetachain.com/get-zeta"
+40
View File
@@ -0,0 +1,40 @@
import type { Chain } from "../src/types";
export default {
"name": "MEVerse Chain Mainnet",
"chain": "MEVerse",
"rpc": [
"https://meverse-chain.rpc.thirdweb.com/${THIRDWEB_API_KEY}",
"https://rpc.meversemainnet.io"
],
"faucets": [],
"nativeCurrency": {
"name": "MEVerse",
"symbol": "MEV",
"decimals": 18
},
"infoURL": "https://www.meverse.sg",
"shortName": "MEV",
"chainId": 7518,
"networkId": 7518,
"icon": {
"url": "ipfs://QmPuQ6gaCfUtNdRuaEDbdhot2m2KCy2ZHCJUvZXJAtdeyJ",
"width": 800,
"height": 800,
"format": "png"
},
"explorers": [
{
"name": "MEVerse Chain Explorer",
"url": "https://www.meversescan.io",
"standard": "none",
"icon": {
"url": "ipfs://QmPuQ6gaCfUtNdRuaEDbdhot2m2KCy2ZHCJUvZXJAtdeyJ",
"width": 800,
"height": 800,
"format": "png"
}
}
],
"testnet": false,
"slug": "meverse-chain"
} as const satisfies Chain;
+17 -2
View File
@@ -2,7 +2,10 @@ import type { Chain } from "../src/types";
export default {
"name": "Base",
"chain": "ETH",
"rpc": [],
"rpc": [
"https://base.rpc.thirdweb.com/${THIRDWEB_API_KEY}",
"https://developer-access-mainnet.base.org/"
],
"faucets": [],
"nativeCurrency": {
"name": "Ether",
@@ -13,13 +16,25 @@ export default {
"shortName": "base",
"chainId": 8453,
"networkId": 8453,
"status": "incubating",
"icon": {
"url": "ipfs://QmW5Vn15HeRkScMfPcW12ZdZcC2yUASpu6eCsECRdEmjjj/base-512.png",
"height": 512,
"width": 512,
"format": "png"
},
"explorers": [
{
"name": "basescout",
"url": "https://base.blockscout.com",
"standard": "none"
},
{
"name": "basescan",
"url": "https://basescan.org",
"standard": "none"
}
],
"status": "active",
"testnet": false,
"slug": "base"
} as const satisfies Chain;
+6 -6
View File
@@ -18,6 +18,12 @@ export default {
"shortName": "basegor",
"chainId": 84531,
"networkId": 84531,
"icon": {
"url": "ipfs://QmW5Vn15HeRkScMfPcW12ZdZcC2yUASpu6eCsECRdEmjjj/base-512.png",
"height": 512,
"width": 512,
"format": "png"
},
"explorers": [
{
"name": "basescout",
@@ -31,11 +37,5 @@ export default {
}
],
"testnet": true,
"icon": {
"url": "ipfs://QmW5Vn15HeRkScMfPcW12ZdZcC2yUASpu6eCsECRdEmjjj/base-512.png",
"height": 512,
"width": 512,
"format": "png"
},
"slug": "base-goerli"
} as const satisfies Chain;
+10 -10
View File
@@ -1,26 +1,26 @@
import type { Chain } from "../src/types";
export default {
"name": "Binance Smart Chain Testnet",
"name": "BNB Smart Chain Testnet",
"chain": "BSC",
"rpc": [
"https://binance-testnet.rpc.thirdweb.com/${THIRDWEB_API_KEY}",
"https://bsc-testnet.publicnode.com",
"https://data-seed-prebsc-2-s3.binance.org:8545",
"https://data-seed-prebsc-1-s3.binance.org:8545",
"https://data-seed-prebsc-2-s2.binance.org:8545",
"https://data-seed-prebsc-1-s2.binance.org:8545",
"https://data-seed-prebsc-2-s1.binance.org:8545",
"https://data-seed-prebsc-1-s1.binance.org:8545"
"https://data-seed-prebsc-2-s3.bnbchain.org:8545",
"https://data-seed-prebsc-1-s3.bnbchain.org:8545",
"https://data-seed-prebsc-2-s2.bnbchain.org:8545",
"https://data-seed-prebsc-1-s2.bnbchain.org:8545",
"https://data-seed-prebsc-2-s1.bnbchain.org:8545",
"https://data-seed-prebsc-1-s1.bnbchain.org:8545"
],
"faucets": [
"https://testnet.binance.org/faucet-smart"
"https://testnet.bnbchain.org/faucet-smart"
],
"nativeCurrency": {
"name": "Binance Chain Native Token",
"name": "BNB Chain Native Token",
"symbol": "tBNB",
"decimals": 18
},
"infoURL": "https://testnet.binance.org/",
"infoURL": "https://www.bnbchain.org/en",
"shortName": "bnbt",
"chainId": 97,
"networkId": 97,
+9
View File
@@ -26,6 +26,15 @@ export default {
"standard": "none"
}
],
"parent": {
"type": "L2",
"chain": "eip155-5",
"bridges": [
{
"url": "https://gateway.boba.network"
}
]
},
"testnet": true,
"slug": "boba-bnb-testnet"
} as const satisfies Chain;
+7 -7
View File
@@ -3,9 +3,9 @@
/** @type {Omit<Chain, "slug">} */
export default {
name: "Taro Testnet",
name: "Bubs Testnet",
chain: "gETH",
shortName: "Taro",
shortName: "Bubs",
chainId: 1582,
testnet: true,
icon: {
@@ -14,7 +14,7 @@ export default {
width: 512,
height: 512,
},
rpc: ["https://taro-testnet.calderachain.xyz/http"],
rpc: ["https://bubs.calderachain.xyz/http"],
nativeCurrency: {
decimals: 18,
name: "Ether",
@@ -22,12 +22,12 @@ export default {
},
explorers: [
{
url: "https://explorer.tarotestnet.com",
name: "Taro Testnet Explorer",
url: "https://explorer.bubstestnet.com",
name: "Bubs Testnet Explorer",
standard: "EIP3091",
},
],
faucets: ["https://tarotestnet.com"],
infoURL: "https://tarotestnet.com",
faucets: ["https://bubstestnet.com"],
infoURL: "https://bubstestnet.com",
networkId: 1582,
};
+32
View File
@@ -0,0 +1,32 @@
// @ts-check
/** @typedef { import("../../src/types").Chain } Chain */
/** @type {Omit<Chain, "slug">} */
export default {
name: "Linea Mainnet",
chain: "Linea Mainnet",
shortName: "linea-mainnet",
chainId: 59144,
testnet: false,
nativeCurrency: {
name: "Ether",
symbol: "ETH",
decimals: 18,
},
rpc: [],
explorers: [
{
name: "Linea Scan",
url: "https://lineascan.build",
standard: "",
},
],
faucets: ["https://www.infura.io/faucet/linea"],
infoURL: "https://docs.linea.build/overview",
icon: {
url: "ipfs://QmURjritnHL7a8TwZgsFwp3f272DJmG5paaPtWDZ98QZwH",
height: 512,
width: 512,
format: "svg",
},
};
+2
View File
@@ -10,4 +10,6 @@ export default {
width: 512,
format: "png",
},
rpc: ["https://base.rpc.thirdweb.com/${THIRDWEB_API_KEY}"],
status: "active",
};
+1 -1
View File
@@ -1,6 +1,6 @@
{
"name": "@thirdweb-dev/chains",
"version": "0.1.27",
"version": "0.1.34",
"main": "dist/thirdweb-dev-chains.cjs.js",
"module": "dist/thirdweb-dev-chains.esm.js",
"browser": {
+3 -3
View File
@@ -164,10 +164,10 @@ function findSlug(chain) {
if (slug === "arbitrum-one") {
slug = "arbitrum";
}
if (slug === "binance-smart-chain") {
if (slug === "bnb-smart-chain") {
slug = "binance";
}
if (slug === "binance-smart-chain-testnet") {
if (slug === "bnb-smart-chain-testnet") {
slug = "binance-testnet";
}
if (slug === "base-goerli-testnet") {
@@ -267,7 +267,7 @@ import type { Chain } from "./types";
${exports.join("\n")}
export * from "./types";
export * from "./utils";
export const defaultChains = [c1, c5, c84531, c137, c80001, c42161, c421613, c10, c420, c56, c97, c250, c4002, c43114, c43113, c1337];
export const defaultChains = [c1, c5, c8453, c84531, c137, c80001, c42161, c421613, c10, c420, c56, c97, c250, c4002, c43114, c43113, c1337];
export const allChains: Chain[] = [${exportNames.join(", ")}];
type ChainsById = {
File diff suppressed because one or more lines are too long
+59
View File
@@ -1,5 +1,64 @@
# thirdweb
## 0.10.36
### Patch Changes
- Updated dependencies [[`8dd7540c`](https://github.com/thirdweb-dev/js/commit/8dd7540c455aa70534f6d29986537592fd12169b), [`8dd7540c`](https://github.com/thirdweb-dev/js/commit/8dd7540c455aa70534f6d29986537592fd12169b)]:
- @thirdweb-dev/storage@1.1.9
- @thirdweb-dev/chains@0.1.34
- @thirdweb-dev/sdk@3.10.35
## 0.10.35
### Patch Changes
- Updated dependencies [[`0407b2c2`](https://github.com/thirdweb-dev/js/commit/0407b2c2f39b5f3fa06e613e671623b5644b3a28)]:
- @thirdweb-dev/chains@0.1.33
- @thirdweb-dev/sdk@3.10.34
## 0.10.34
### Patch Changes
- Updated dependencies [[`a9093bcf`](https://github.com/thirdweb-dev/js/commit/a9093bcf287c01e3335fd780e2ccbfdb3380bf95)]:
- @thirdweb-dev/chains@0.1.32
- @thirdweb-dev/sdk@3.10.33
## 0.10.33
### Patch Changes
- Updated dependencies [[`4393b228`](https://github.com/thirdweb-dev/js/commit/4393b2280505fd0b2284555d64eae6567e8401a5)]:
- @thirdweb-dev/chains@0.1.31
- @thirdweb-dev/sdk@3.10.32
## 0.10.32
### Patch Changes
- Updated dependencies [[`40682191`](https://github.com/thirdweb-dev/js/commit/40682191450de08ad40b9d2957afced248657af2)]:
- @thirdweb-dev/chains@0.1.30
- @thirdweb-dev/sdk@3.10.31
## 0.10.31
### Patch Changes
- Updated dependencies [[`db68bd04`](https://github.com/thirdweb-dev/js/commit/db68bd04cd8bb3ee6bff051d1d5b5a872353fde0), [`fd74d791`](https://github.com/thirdweb-dev/js/commit/fd74d7918072cda03b52f852ebb3f8dccb84074d), [`35f20ceb`](https://github.com/thirdweb-dev/js/commit/35f20ceb4f943e95d9566105096f06412978da7a)]:
- @thirdweb-dev/storage@1.1.8
- @thirdweb-dev/sdk@3.10.30
- @thirdweb-dev/chains@0.1.29
## 0.10.30
### Patch Changes
- Updated dependencies [[`7e044c66`](https://github.com/thirdweb-dev/js/commit/7e044c664d8a034f5324b859ac3596860c86f9a5), [`72ada475`](https://github.com/thirdweb-dev/js/commit/72ada47596d5d5c08736c33215faeec636b7156a), [`2c0bb078`](https://github.com/thirdweb-dev/js/commit/2c0bb0789955f6cd397b6fdb8e990a505251c631), [`b5c6eedb`](https://github.com/thirdweb-dev/js/commit/b5c6eedb38aa3c52eb97f3d25ad83e38c55afe61), [`4961b597`](https://github.com/thirdweb-dev/js/commit/4961b597a098dae0a4eff01a9ef268a65fe1a352)]:
- @thirdweb-dev/chains@0.1.28
- @thirdweb-dev/sdk@3.10.29
- @thirdweb-dev/storage@1.1.7
## 0.10.29
### Patch Changes
+1 -1
View File
@@ -1,7 +1,7 @@
{
"name": "thirdweb",
"main": "dist/cli/index.js",
"version": "0.10.29",
"version": "0.10.36",
"repository": "https://github.com/thirdweb-dev/js/tree/main/packages/cli",
"author": "thirdweb eng <[email protected]>",
"license": "Apache-2.0",
+6
View File
@@ -1,5 +1,11 @@
# @thirdweb-dev/contracts-js
## 1.3.9
### Patch Changes
- [#1299](https://github.com/thirdweb-dev/js/pull/1299) [`7e044c66`](https://github.com/thirdweb-dev/js/commit/7e044c664d8a034f5324b859ac3596860c86f9a5) Thanks [@nkrishang](https://github.com/nkrishang)! - Add ERC721LoyaltyCard and ERC721UpdatableMetadata
## 1.3.8
### Patch Changes
+2 -2
View File
@@ -1,6 +1,6 @@
{
"name": "@thirdweb-dev/contracts-js",
"version": "1.3.8",
"version": "1.3.9",
"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.5.9"
"@thirdweb-dev/contracts": "3.6.0"
},
"devDependencies": {
"@babel/preset-env": "^7.22.5",
+68
View File
@@ -1,5 +1,73 @@
# @thirdweb-dev/react-core
## 3.14.15
### Patch Changes
- Updated dependencies [[`8dd7540c`](https://github.com/thirdweb-dev/js/commit/8dd7540c455aa70534f6d29986537592fd12169b), [`8dd7540c`](https://github.com/thirdweb-dev/js/commit/8dd7540c455aa70534f6d29986537592fd12169b)]:
- @thirdweb-dev/storage@1.1.9
- @thirdweb-dev/chains@0.1.34
- @thirdweb-dev/sdk@3.10.35
- @thirdweb-dev/wallets@1.0.11
## 3.14.14
### Patch Changes
- Updated dependencies [[`0407b2c2`](https://github.com/thirdweb-dev/js/commit/0407b2c2f39b5f3fa06e613e671623b5644b3a28)]:
- @thirdweb-dev/chains@0.1.33
- @thirdweb-dev/sdk@3.10.34
- @thirdweb-dev/wallets@1.0.10
## 3.14.13
### Patch Changes
- Updated dependencies [[`a9093bcf`](https://github.com/thirdweb-dev/js/commit/a9093bcf287c01e3335fd780e2ccbfdb3380bf95)]:
- @thirdweb-dev/chains@0.1.32
- @thirdweb-dev/sdk@3.10.33
- @thirdweb-dev/wallets@1.0.9
## 3.14.12
### Patch Changes
- Updated dependencies [[`4393b228`](https://github.com/thirdweb-dev/js/commit/4393b2280505fd0b2284555d64eae6567e8401a5)]:
- @thirdweb-dev/chains@0.1.31
- @thirdweb-dev/sdk@3.10.32
- @thirdweb-dev/wallets@1.0.8
## 3.14.11
### Patch Changes
- Updated dependencies [[`40682191`](https://github.com/thirdweb-dev/js/commit/40682191450de08ad40b9d2957afced248657af2)]:
- @thirdweb-dev/chains@0.1.30
- @thirdweb-dev/sdk@3.10.31
- @thirdweb-dev/wallets@1.0.7
## 3.14.10
### Patch Changes
- Updated dependencies [[`db68bd04`](https://github.com/thirdweb-dev/js/commit/db68bd04cd8bb3ee6bff051d1d5b5a872353fde0), [`fd74d791`](https://github.com/thirdweb-dev/js/commit/fd74d7918072cda03b52f852ebb3f8dccb84074d), [`35f20ceb`](https://github.com/thirdweb-dev/js/commit/35f20ceb4f943e95d9566105096f06412978da7a)]:
- @thirdweb-dev/storage@1.1.8
- @thirdweb-dev/sdk@3.10.30
- @thirdweb-dev/chains@0.1.29
- @thirdweb-dev/wallets@1.0.6
## 3.14.9
### Patch Changes
- [#1309](https://github.com/thirdweb-dev/js/pull/1309) [`4961b597`](https://github.com/thirdweb-dev/js/commit/4961b597a098dae0a4eff01a9ef268a65fe1a352) Thanks [@jnsdls](https://github.com/jnsdls)! - unblock storage domains
- Updated dependencies [[`7e044c66`](https://github.com/thirdweb-dev/js/commit/7e044c664d8a034f5324b859ac3596860c86f9a5), [`72ada475`](https://github.com/thirdweb-dev/js/commit/72ada47596d5d5c08736c33215faeec636b7156a), [`2c0bb078`](https://github.com/thirdweb-dev/js/commit/2c0bb0789955f6cd397b6fdb8e990a505251c631), [`b5c6eedb`](https://github.com/thirdweb-dev/js/commit/b5c6eedb38aa3c52eb97f3d25ad83e38c55afe61), [`10b3a717`](https://github.com/thirdweb-dev/js/commit/10b3a717da606632a05769ac821bdd21d6b63a03), [`b4aee9b5`](https://github.com/thirdweb-dev/js/commit/b4aee9b59121bab5f9b3d9b7ecdc4bcb4cd66f58), [`4961b597`](https://github.com/thirdweb-dev/js/commit/4961b597a098dae0a4eff01a9ef268a65fe1a352)]:
- @thirdweb-dev/chains@0.1.28
- @thirdweb-dev/sdk@3.10.29
- @thirdweb-dev/wallets@1.0.5
- @thirdweb-dev/storage@1.1.7
## 3.14.8
### Patch Changes
+1 -1
View File
@@ -1,6 +1,6 @@
{
"name": "@thirdweb-dev/react-core",
"version": "3.14.8",
"version": "3.14.15",
"repository": "https://github.com/thirdweb-dev/js/tree/main/packages/react-core",
"author": "thirdweb eng <[email protected]>",
"license": "Apache-2.0",
@@ -1,25 +1,10 @@
import mime from "mime/lite.js";
import {
parseGatewayUrls,
prepareGatewayUrls,
replaceSchemeWithGatewayUrl,
} from "@thirdweb-dev/storage";
// TODO legacy remove this when possible
export interface IPFSResolverOptions {
gatewayUrl: string;
}
export function resolveIpfsUri(uri?: string, options?: IPFSResolverOptions) {
if (!uri) {
return undefined;
}
const gatewayUrls = prepareGatewayUrls(
parseGatewayUrls(options?.gatewayUrl ? [options?.gatewayUrl] : undefined),
);
return replaceSchemeWithGatewayUrl(uri, gatewayUrls);
}
export async function resolveMimeType(url?: string) {
if (!url) {
return undefined;
@@ -328,7 +328,7 @@ export function useContractMetadata<TContract extends ValidContractInstance>(
cacheKeys.contract.metadata(contract?.getAddress()),
async () => {
requiredParamInvariant(contract, "contract is required");
return await contract.metadata.get();
return (await contract.metadata.get()) as any; // FIXME types
},
{
enabled: !!contract,
+1 -1
View File
@@ -1,4 +1,4 @@
export { resolveIpfsUri, resolveMimeType } from "../core/utils/ipfs";
export { resolveMimeType } from "../core/utils/ipfs";
export { ThirdwebThemeContext } from "../core/providers/theme-context";
export { ThirdwebProviderCore } from "../core/providers/thirdweb-provider";
+14
View File
@@ -1,5 +1,19 @@
# @thirdweb-dev/react-native-compat
## 0.2.34
## 0.2.33
## 0.2.32
## 0.2.31
## 0.2.30
## 0.2.29
## 0.2.28
## 0.2.27
### Patch Changes
+1 -1
View File
@@ -1,7 +1,7 @@
{
"name": "@thirdweb-dev/react-native-compat",
"description": "Shims for Thirdweb in React Native Projects",
"version": "0.2.27",
"version": "0.2.34",
"author": "thirdweb eng <[email protected]>",
"repository": "https://github.com/thirdweb-dev/js/tree/main/packages/react-native-compat",
"license": "Apache-2.0",
+104
View File
@@ -1,5 +1,109 @@
# @thirdweb-dev/react-native
## 0.2.34
### Patch Changes
- Updated dependencies [[`8dd7540c`](https://github.com/thirdweb-dev/js/commit/8dd7540c455aa70534f6d29986537592fd12169b), [`8dd7540c`](https://github.com/thirdweb-dev/js/commit/8dd7540c455aa70534f6d29986537592fd12169b)]:
- @thirdweb-dev/storage@1.1.9
- @thirdweb-dev/chains@0.1.34
- @thirdweb-dev/react-core@3.14.15
- @thirdweb-dev/sdk@3.10.35
- @thirdweb-dev/wallets@1.0.11
## 0.2.33
### Patch Changes
- Updated dependencies [[`0407b2c2`](https://github.com/thirdweb-dev/js/commit/0407b2c2f39b5f3fa06e613e671623b5644b3a28)]:
- @thirdweb-dev/chains@0.1.33
- @thirdweb-dev/react-core@3.14.14
- @thirdweb-dev/sdk@3.10.34
- @thirdweb-dev/wallets@1.0.10
## 0.2.32
### Patch Changes
- Updated dependencies [[`a9093bcf`](https://github.com/thirdweb-dev/js/commit/a9093bcf287c01e3335fd780e2ccbfdb3380bf95)]:
- @thirdweb-dev/chains@0.1.32
- @thirdweb-dev/react-core@3.14.13
- @thirdweb-dev/sdk@3.10.33
- @thirdweb-dev/wallets@1.0.9
## 0.2.31
### Patch Changes
- Updated dependencies [[`4393b228`](https://github.com/thirdweb-dev/js/commit/4393b2280505fd0b2284555d64eae6567e8401a5)]:
- @thirdweb-dev/chains@0.1.31
- @thirdweb-dev/react-core@3.14.12
- @thirdweb-dev/sdk@3.10.32
- @thirdweb-dev/wallets@1.0.8
## 0.2.30
### Patch Changes
- Updated dependencies [[`40682191`](https://github.com/thirdweb-dev/js/commit/40682191450de08ad40b9d2957afced248657af2)]:
- @thirdweb-dev/chains@0.1.30
- @thirdweb-dev/react-core@3.14.11
- @thirdweb-dev/sdk@3.10.31
- @thirdweb-dev/wallets@1.0.7
## 0.2.29
### Patch Changes
- Updated dependencies [[`db68bd04`](https://github.com/thirdweb-dev/js/commit/db68bd04cd8bb3ee6bff051d1d5b5a872353fde0), [`fd74d791`](https://github.com/thirdweb-dev/js/commit/fd74d7918072cda03b52f852ebb3f8dccb84074d), [`35f20ceb`](https://github.com/thirdweb-dev/js/commit/35f20ceb4f943e95d9566105096f06412978da7a)]:
- @thirdweb-dev/storage@1.1.8
- @thirdweb-dev/sdk@3.10.30
- @thirdweb-dev/chains@0.1.29
- @thirdweb-dev/react-core@3.14.10
- @thirdweb-dev/wallets@1.0.6
## 0.2.28
### Patch Changes
- [#1283](https://github.com/thirdweb-dev/js/pull/1283) [`8672c853`](https://github.com/thirdweb-dev/js/commit/8672c8533c694cad46242672ec23b883049bd526) Thanks [@iketw](https://github.com/iketw)! - SDK improvements:
1. You can now pass an `extraRows` prop to the ConnectWallet button. This will render the `extraRows` at the bottom of the connected wallet details modal.
```javascript
import {
BaseButton,
Box,
ConnectWallet,
Text,
} from "@thirdweb-dev/react-native";
const extraRows = () => {
return (
<Box>
<Text variant="bodySmallSecondary" textAlign="center" mt="sm">
Extra option
</Text>
</Box>
);
};
<ConnectWallet theme={"dark"} extraRows={extraRows} />;
```
2. You can now import a local wallet by a mnemoic as well.
When creating a Local/Guest Wallet the import wallet modal accepts both a privateKey or a mnemonic. This makes it easier for users to import their wallets into your app
- [#1309](https://github.com/thirdweb-dev/js/pull/1309) [`4961b597`](https://github.com/thirdweb-dev/js/commit/4961b597a098dae0a4eff01a9ef268a65fe1a352) Thanks [@jnsdls](https://github.com/jnsdls)! - unblock storage domains
- Updated dependencies [[`7e044c66`](https://github.com/thirdweb-dev/js/commit/7e044c664d8a034f5324b859ac3596860c86f9a5), [`72ada475`](https://github.com/thirdweb-dev/js/commit/72ada47596d5d5c08736c33215faeec636b7156a), [`2c0bb078`](https://github.com/thirdweb-dev/js/commit/2c0bb0789955f6cd397b6fdb8e990a505251c631), [`b5c6eedb`](https://github.com/thirdweb-dev/js/commit/b5c6eedb38aa3c52eb97f3d25ad83e38c55afe61), [`10b3a717`](https://github.com/thirdweb-dev/js/commit/10b3a717da606632a05769ac821bdd21d6b63a03), [`b4aee9b5`](https://github.com/thirdweb-dev/js/commit/b4aee9b59121bab5f9b3d9b7ecdc4bcb4cd66f58), [`4961b597`](https://github.com/thirdweb-dev/js/commit/4961b597a098dae0a4eff01a9ef268a65fe1a352)]:
- @thirdweb-dev/[email protected]
- @thirdweb-dev/[email protected]
- @thirdweb-dev/[email protected]
- @thirdweb-dev/[email protected]
- @thirdweb-dev/[email protected]
## 0.2.27
### Patch Changes
+1 -1
View File
@@ -1,6 +1,6 @@
{
"name": "@thirdweb-dev/react-native",
"version": "0.2.27",
"version": "0.2.34",
"repository": "https://github.com/thirdweb-dev/js/tree/main/packages/react-native",
"author": "thirdweb eng <[email protected]>",
"license": "Apache-2.0",
@@ -14,6 +14,11 @@ export type ConnectWalletProps = {
* render a custom button to display the connected wallet details instead of the default button
*/
detailsButton?: ConnectWalletDetailsProps["detailsButton"];
/**
* render custom rows in the Connect Wallet Details modal
*/
extraRows?: ConnectWalletDetailsProps["extraRows"];
} & ConnectWalletButtonProps;
export const ConnectWallet = ({
@@ -21,6 +26,7 @@ export const ConnectWallet = ({
theme,
buttonTitle,
modalTitle,
extraRows,
}: ConnectWalletProps) => {
const fadeAnim = useRef(new Animated.Value(0)).current;
const address = useAddress();
@@ -40,6 +46,7 @@ export const ConnectWallet = ({
<WalletDetailsButton
address={address}
detailsButton={detailsButton}
extraRows={extraRows}
/>
) : (
<ConnectWalletButton
@@ -1,11 +1,11 @@
import { Linking, StyleSheet, View } from "react-native";
import { Dimensions, Linking, StyleSheet, View } from "react-native";
import Box from "../base/Box";
import { Toast } from "../base/Toast";
import { ExportLocalWalletModal } from "./ExportLocalWalletModal";
import { NetworkButton } from "../base/NetworkButton";
import { WalletDetailsModalHeader } from "./WalletDetailsModalHeader";
import {
useActiveChain,
useChain,
useDisconnect,
useSetConnectedWallet,
useWallet,
@@ -18,24 +18,34 @@ import { useSmartWallet } from "../../providers/context-provider";
import BaseButton from "../base/BaseButton";
import { SmartWalletAdditionalActions } from "./SmartWalletAdditionalActions";
import Text from "../base/Text";
import { useModalState } from "../../providers/ui-context-provider";
import { CLOSE_MODAL_STATE, WalletDetailsModal } from "../../utils/modalTypes";
import { useAppTheme } from "../../styles/hooks";
import { LocalWalletImportModal } from "../ConnectWalletFlow/LocalWalletImportModal";
import { IconTextButton } from "../base/IconTextButton";
import MoneyIcon from "../../assets/money";
import { TWModal } from "../base/modal/TWModal";
export const ConnectWalletDetailsModal = () => {
const MODAL_HEIGHT = Dimensions.get("window").height * 0.7;
const DEVICE_WIDTH = Dimensions.get("window").width;
export const ConnectWalletDetailsModal = ({
isVisible,
onClosePress,
extraRows,
address,
}: {
isVisible: boolean;
onClosePress: () => void;
extraRows?: React.FC;
address?: string;
}) => {
const theme = useAppTheme();
const [isExportModalVisible, setIsExportModalVisible] = useState(false);
const activeWallet = useWallet();
const chain = useActiveChain();
const chain = useChain();
const disconnect = useDisconnect();
const [smartWallet, setSmartWallet] = useSmartWallet();
const [addressCopied, setAddressCopied] = useState(false);
const [isImportModalVisible, setIsImportModalVisible] = useState(false);
const { modalState, setModalState } = useModalState();
const { address } = (modalState as WalletDetailsModal).data;
const setConnectedWallet = useSetConnectedWallet();
useEffect(() => {
@@ -50,8 +60,8 @@ export const ConnectWalletDetailsModal = () => {
const onDisconnectPress = () => {
disconnect().finally(() => {
setModalState(CLOSE_MODAL_STATE("ConnectWalletDetailsModal"));
setSmartWallet?.(undefined);
onClosePress();
});
};
@@ -176,45 +186,65 @@ export const ConnectWalletDetailsModal = () => {
]);
return (
<Box>
<ExportLocalWalletModal
isVisible={isExportModalVisible}
onClose={onExportModalClose}
/>
<WalletDetailsModalHeader
address={address}
onDisconnectPress={onDisconnectPress}
onAddressCopied={onAddressCopied}
/>
<View style={styles.currentNetwork}>
<Text variant="bodySmallSecondary">Current Network</Text>
<TWModal isVisible={isVisible} onBackdropPress={onClosePress}>
<View
style={[styles.modal, { backgroundColor: theme.colors.background }]}
>
<Box style={styles.contentContainer}>
<ExportLocalWalletModal
isVisible={isExportModalVisible}
onClose={onExportModalClose}
/>
<WalletDetailsModalHeader
address={address}
onDisconnectPress={onDisconnectPress}
onAddressCopied={onAddressCopied}
/>
<View style={styles.currentNetwork}>
<Text variant="bodySmallSecondary">Current Network</Text>
</View>
<NetworkButton
chainIconUrl={chain?.icon?.url || ""}
chainName={chain?.name || "Unknown Network"}
onPress={onChangeNetworkPress}
/>
{chain?.testnet && chain?.faucets?.length ? (
<IconTextButton
mt="xs"
text="Request Testnet Funds"
icon={<MoneyIcon height={10} width={10} />}
onPress={() => {
if (chain?.faucets?.[0]) {
Linking.openURL(chain.faucets[0]);
}
}}
/>
) : null}
{getAdditionalActions()}
{extraRows ? extraRows({}) : null}
{addressCopied === true ? (
<Toast text={"Address copied to clipboard"} />
) : null}
</Box>
</View>
<NetworkButton
chainIconUrl={chain?.icon?.url || ""}
chainName={chain?.name || "Unknown Network"}
onPress={onChangeNetworkPress}
/>
{chain?.testnet && chain?.faucets?.length ? (
<IconTextButton
mt="xs"
text="Request Testnet Funds"
icon={<MoneyIcon height={10} width={10} />}
onPress={() => {
if (chain?.faucets?.[0]) {
Linking.openURL(chain.faucets[0]);
}
}}
/>
) : null}
{getAdditionalActions()}
{addressCopied === true ? (
<Toast text={"Address copied to clipboard"} />
) : null}
</Box>
</TWModal>
);
};
const styles = StyleSheet.create({
modal: {
position: "absolute",
bottom: -20,
left: -20,
width: DEVICE_WIDTH,
borderTopLeftRadius: 24,
borderTopRightRadius: 24,
padding: 24,
},
contentContainer: {
maxHeight: MODAL_HEIGHT,
display: "flex",
},
exportWalletInfo: {
flex: 1,
justifyContent: "flex-start",
@@ -6,37 +6,47 @@ import { WalletIcon } from "../base/WalletIcon";
import { useWallet, useBalance, useChain } from "@thirdweb-dev/react-core";
import { StyleSheet } from "react-native";
import { LocalWallet } from "@thirdweb-dev/wallets";
import { useModalState } from "../../providers/ui-context-provider";
import Box from "../base/Box";
import { ConnectWalletDetailsModal } from "./ConnectWalletDetailsModal";
import { useState } from "react";
export type ConnectWalletDetailsProps = {
address: string;
address?: string;
detailsButton?: React.FC<{ onPress: () => void }>;
extraRows?: React.FC;
};
export const WalletDetailsButton = ({
address,
detailsButton,
extraRows,
}: ConnectWalletDetailsProps) => {
const activeWallet = useWallet();
const chain = useChain();
const balanceQuery = useBalance();
const { setModalState } = useModalState();
const [isModalVisible, setIsModalVisible] = useState(false);
const onPress = () => {
setModalState({
view: "WalletDetails",
data: {
address: address,
},
isOpen: true,
isSheet: true,
caller: "ConnectWalletDetails",
});
// setModalState({
// view: "WalletDetails",
// data: {
// address: address,
// },
// isOpen: true,
// isSheet: true,
// caller: "ConnectWalletDetails",
// });
setIsModalVisible(!isModalVisible);
};
return (
<>
<ConnectWalletDetailsModal
isVisible={isModalVisible}
onClosePress={onPress}
extraRows={extraRows}
address={address}
/>
{detailsButton ? (
detailsButton({ onPress })
) : (
@@ -12,7 +12,7 @@ import CopyIcon from "../../assets/copy";
import { useState } from "react";
interface WalletDetailsModalHeaderProps {
address: string;
address?: string;
onDisconnectPress: () => void;
onAddressCopied?: () => void;
loading?: boolean;
@@ -29,6 +29,9 @@ export const WalletDetailsModalHeader = ({
const [showLoading, setShowLoading] = useState(false);
const onAddressPress = async () => {
if (!address) {
return;
}
await Clipboard.setStringAsync(address);
onAddressCopied?.();
};
@@ -16,6 +16,7 @@ import * as FileSystem from "expo-file-system";
import { TWModal } from "../base/modal/TWModal";
import { localWallet } from "../../wallets/wallets/local-wallet";
import { TextInput } from "../base";
import { useAppTheme } from "../../styles/hooks";
export type LocalWalletImportModalProps = {
isVisible: boolean;
@@ -29,11 +30,14 @@ export const LocalWalletImportModal = ({
onWalletImported,
}: LocalWalletImportModalProps) => {
const [password, setPassword] = useState<string | undefined>();
const [privateKey, setPrivateKey] = useState<string | undefined>(undefined);
const [privateKeyOrMnemonic, setPrivateKeyOrMnemonic] = useState<
string | undefined
>(undefined);
const [jsonFile, setJsonFile] = useState<string | undefined>();
const [error, setError] = useState<string | undefined>();
const [isImporting, setIsImporting] = useState<boolean>(false);
const createWalletInstance = useCreateWalletInstance();
const theme = useAppTheme();
const createLocalWalletFromJsonFile = async () => {
if (!jsonFile || !password) {
@@ -65,17 +69,24 @@ export const LocalWalletImportModal = ({
};
const createLocalWalletPK = async () => {
if (!privateKey) {
if (!privateKeyOrMnemonic) {
return null;
}
const localWalletInstance = createWalletInstance(localWallet());
try {
await localWalletInstance.import({
privateKey: privateKey,
encryption: false,
});
if (privateKeyOrMnemonic.indexOf(" ") === -1) {
await localWalletInstance.import({
privateKey: privateKeyOrMnemonic,
encryption: false,
});
} else {
await localWalletInstance.import({
mnemonic: privateKeyOrMnemonic,
encryption: false,
});
}
} catch (err) {
console.error("Error importing the wallet", err);
return null;
@@ -88,27 +99,29 @@ export const LocalWalletImportModal = ({
setError(undefined);
setIsImporting(true);
let localWalletInstance = await createLocalWalletFromJsonFile();
setTimeout(async () => {
let localWalletInstance = await createLocalWalletFromJsonFile();
if (!localWalletInstance) {
localWalletInstance = await createLocalWalletPK();
}
if (!localWalletInstance) {
localWalletInstance = await createLocalWalletPK();
}
if (!localWalletInstance) {
setError("Please, double check your password or private key.");
setIsImporting(false);
return;
}
localWalletInstance.save({
strategy: "privateKey",
encryption: false,
});
onWalletImported(localWalletInstance);
if (!localWalletInstance) {
setError("Please, double check your password or private key.");
setIsImporting(false);
return;
}
localWalletInstance.save({
strategy: "privateKey",
encryption: false,
});
onWalletImported(localWalletInstance);
setIsImporting(false);
onCloseInternal();
onCloseInternal();
}, 0);
};
const onCloseInternal = () => {
@@ -139,7 +152,7 @@ export const LocalWalletImportModal = ({
};
const onPrivateKeyEntered = (text: string) => {
setPrivateKey(text);
setPrivateKeyOrMnemonic(text);
};
return (
@@ -180,11 +193,12 @@ export const LocalWalletImportModal = ({
{error}
</Text>
<Text variant="bodySmall" m="xs" textAlign="center">
---- Or enter a private key ----
---- Or Private key or Mnemonic ----
</Text>
<TextInput
secureTextEntry={true}
placeholder={"Private key"}
placeholder={"Private key / Mnemonic"}
placeholderTextColor={theme.colors.textSecondary}
onChangeText={onPrivateKeyEntered}
/>
<Box
@@ -2,7 +2,6 @@ import { useModalState } from "../providers/ui-context-provider";
import { ConnectWalletFlow } from "./ConnectWalletFlow/ConnectWalletFlow";
import { Dimensions, StyleSheet, View } from "react-native";
import { useMemo } from "react";
import { ConnectWalletDetailsModal } from "./ConnectWalletDetails/ConnectWalletDetailsModal";
import { CLOSE_MODAL_STATE } from "../utils/modalTypes";
import { ThemeProvider } from "../styles/ThemeProvider";
import { useAppTheme } from "../styles/hooks";
@@ -24,8 +23,8 @@ export const MainModal = () => {
switch (modalState?.view) {
case "ConnectWalletFlow":
return <ConnectWalletFlow />;
case "WalletDetails":
return <ConnectWalletDetailsModal />;
// case "WalletDetails":
// return <ConnectWalletDetailsModal />;
case "WalletConnectSessionRequestModal":
return <SessionRequestModal />;
case "WalletConnectSessionProposalModal":
@@ -23,7 +23,7 @@ export const IconTextButton = ({
}: IconTextProps) => {
return (
<BaseButton
p={p || "md"}
p={p || "sm"}
backgroundColor="background"
style={styles.networkContainer}
onPress={onPress}
@@ -1,4 +1,5 @@
import { resolveIpfsUri } from "@thirdweb-dev/react-core";
import { useStorage } from "@thirdweb-dev/react-core";
import { useState } from "react";
import { Image } from "react-native";
import { SvgUri } from "react-native-svg";
@@ -13,21 +14,35 @@ const ImageSvgUri = ({
height: number;
imageAlt?: string;
}) => {
const isSvg = imageUrl.toLowerCase().endsWith(".svg");
const resolvedImageUrl = resolveIpfsUri(imageUrl) || "";
const storage = useStorage();
const resolvedImageUrl = storage
? storage.resolveScheme(imageUrl)
: imageUrl.replace("ipfs://", "https://ipfs.io/ipfs/");
const [error, setError] = useState(false);
if (!resolvedImageUrl || resolvedImageUrl === "") {
return null;
}
if (isSvg) {
return <SvgUri width={width} height={height} uri={resolvedImageUrl} />;
if (error) {
return (
<SvgUri
width={width}
height={height}
uri={resolvedImageUrl}
onError={() => setError(true)}
/>
);
} else {
// always try to render Image first, if error then try to render svg
// Image from RN handles onError better than SvgUri
return (
<Image
alt={imageAlt}
source={{ uri: resolvedImageUrl }}
style={[{ width: width, height: height }]}
onError={() => setError(true)}
/>
);
}
@@ -1,21 +1,37 @@
import Box from "./Box";
import Text from "./Text";
import { StyleSheet } from "react-native";
type LabelProps = {
text: string;
};
export const Label = ({ text }: LabelProps) => {
} & (typeof Text)["arguments"];
export const Label = ({ text, ...props }: LabelProps) => {
return (
<Box
justifyContent="center"
flexDirection="row"
alignItems="center"
paddingVertical="xxs"
paddingHorizontal="xs"
borderRadius="lg"
borderRadius="md"
backgroundColor="labelBackground"
>
<Text variant="bodyLarge">{text}</Text>
<Text
variant="bodySmall"
style={{
...style.text,
...props,
}}
>
{text}
</Text>
</Box>
);
};
const style = StyleSheet.create({
text: {
textAlign: "center",
paddingVertical: 3,
paddingHorizontal: 8,
},
});
@@ -4,6 +4,7 @@ import { ThemeProviderProps } from "../styles/ThemeProvider";
import { Theme, darkTheme, lightTheme } from "../styles/theme";
import { useAppTheme } from "../styles/hooks";
import { useTheme } from "@shopify/restyle";
import { PropsWithChildren } from "react";
type UIContextType = {
modalState: ModalState;
@@ -25,7 +26,7 @@ const UIContext = createContext<UIContextType>({
setTheme: () => {},
});
export const UIContextProvider = (props: React.PropsWithChildren<{}>) => {
export const UIContextProvider = (props: PropsWithChildren<{}>) => {
const [modalState, setModalState] = useState<ModalState>({
view: "Closed",
data: {},
@@ -9,7 +9,7 @@ export class RainbowWallet extends WalletConnectV2 {
static meta = {
name: "Rainbow",
iconURL:
"https://registry.walletconnect.org/v2/logo/md/7a33d7f1-3d12-4b5c-f3ee-5cd83cb1b500",
"ipfs://QmSZn47p4DVVBfzvg9BAX2EqwnPxkT1YAE7rUnrtd9CybQ/rainbow-logo.png",
links: {
native: "rainbow:",
universal: "https://rnbwapp.com",
@@ -7,7 +7,7 @@ export class TrustWallet extends WalletConnectV2 {
static meta = {
name: "Trust Wallet",
iconURL:
"https://registry.walletconnect.org/v2/logo/md/0528ee7e-16d1-4089-21e3-bbfb41933100",
"ipfs://QmNigQbXk7wKZwDcgN38Znj1ZZQ3JEG3DD6fUKLBU8SUTP/trust%20wallet.svg",
links: {
native: "trust:",
universal: "https://link.trustwallet.com",
+79
View File
@@ -1,5 +1,84 @@
# @thirdweb-dev/react
## 3.14.15
### Patch Changes
- Updated dependencies [[`8dd7540c`](https://github.com/thirdweb-dev/js/commit/8dd7540c455aa70534f6d29986537592fd12169b)]:
- @thirdweb-dev/chains@0.1.34
- @thirdweb-dev/react-core@3.14.15
- @thirdweb-dev/sdk@3.10.35
- @thirdweb-dev/wallets@1.0.11
## 3.14.14
### Patch Changes
- Updated dependencies [[`0407b2c2`](https://github.com/thirdweb-dev/js/commit/0407b2c2f39b5f3fa06e613e671623b5644b3a28)]:
- @thirdweb-dev/chains@0.1.33
- @thirdweb-dev/react-core@3.14.14
- @thirdweb-dev/sdk@3.10.34
- @thirdweb-dev/wallets@1.0.10
## 3.14.13
### Patch Changes
- Updated dependencies [[`a9093bcf`](https://github.com/thirdweb-dev/js/commit/a9093bcf287c01e3335fd780e2ccbfdb3380bf95)]:
- @thirdweb-dev/chains@0.1.32
- @thirdweb-dev/react-core@3.14.13
- @thirdweb-dev/sdk@3.10.33
- @thirdweb-dev/wallets@1.0.9
## 3.14.12
### Patch Changes
- Updated dependencies [[`4393b228`](https://github.com/thirdweb-dev/js/commit/4393b2280505fd0b2284555d64eae6567e8401a5)]:
- @thirdweb-dev/chains@0.1.31
- @thirdweb-dev/react-core@3.14.12
- @thirdweb-dev/sdk@3.10.32
- @thirdweb-dev/wallets@1.0.8
## 3.14.11
### Patch Changes
- Updated dependencies [[`40682191`](https://github.com/thirdweb-dev/js/commit/40682191450de08ad40b9d2957afced248657af2)]:
- @thirdweb-dev/chains@0.1.30
- @thirdweb-dev/react-core@3.14.11
- @thirdweb-dev/sdk@3.10.31
- @thirdweb-dev/wallets@1.0.7
## 3.14.10
### Patch Changes
- [#1310](https://github.com/thirdweb-dev/js/pull/1310) [`3df86ad1`](https://github.com/thirdweb-dev/js/commit/3df86ad16f3daf1a0382d5b860ef6f24a69cc8d0) Thanks [@MananTank](https://github.com/MananTank)! - ConnectWallet UI fixes
- Hide Back button when not required
- Fix Rainbow wallet meta
- Fix backbutton not working on get-started screen when there's a single supported wallet
- Remove switchAccount button on mobile for metamask
- Updated dependencies [[`db68bd04`](https://github.com/thirdweb-dev/js/commit/db68bd04cd8bb3ee6bff051d1d5b5a872353fde0), [`fd74d791`](https://github.com/thirdweb-dev/js/commit/fd74d7918072cda03b52f852ebb3f8dccb84074d), [`35f20ceb`](https://github.com/thirdweb-dev/js/commit/35f20ceb4f943e95d9566105096f06412978da7a)]:
- @thirdweb-dev/sdk@3.10.30
- @thirdweb-dev/chains@0.1.29
- @thirdweb-dev/react-core@3.14.10
- @thirdweb-dev/wallets@1.0.6
## 3.14.9
### Patch Changes
- [#1309](https://github.com/thirdweb-dev/js/pull/1309) [`4961b597`](https://github.com/thirdweb-dev/js/commit/4961b597a098dae0a4eff01a9ef268a65fe1a352) Thanks [@jnsdls](https://github.com/jnsdls)! - unblock storage domains
- Updated dependencies [[`7e044c66`](https://github.com/thirdweb-dev/js/commit/7e044c664d8a034f5324b859ac3596860c86f9a5), [`72ada475`](https://github.com/thirdweb-dev/js/commit/72ada47596d5d5c08736c33215faeec636b7156a), [`2c0bb078`](https://github.com/thirdweb-dev/js/commit/2c0bb0789955f6cd397b6fdb8e990a505251c631), [`b5c6eedb`](https://github.com/thirdweb-dev/js/commit/b5c6eedb38aa3c52eb97f3d25ad83e38c55afe61), [`10b3a717`](https://github.com/thirdweb-dev/js/commit/10b3a717da606632a05769ac821bdd21d6b63a03), [`b4aee9b5`](https://github.com/thirdweb-dev/js/commit/b4aee9b59121bab5f9b3d9b7ecdc4bcb4cd66f58), [`4961b597`](https://github.com/thirdweb-dev/js/commit/4961b597a098dae0a4eff01a9ef268a65fe1a352)]:
- @thirdweb-dev/chains@0.1.28
- @thirdweb-dev/sdk@3.10.29
- @thirdweb-dev/wallets@1.0.5
- @thirdweb-dev/react-core@3.14.9
## 3.14.8
### Patch Changes
+1 -1
View File
@@ -1,6 +1,6 @@
{
"name": "@thirdweb-dev/react",
"version": "3.14.8",
"version": "3.14.15",
"repository": "https://github.com/thirdweb-dev/js/tree/main/packages/react",
"author": "thirdweb eng <[email protected]>",
"license": "Apache-2.0",
+9 -6
View File
@@ -1,11 +1,10 @@
import type { Theme } from "../design-system";
import styled from "@emotion/styled";
import { Chain } from "@thirdweb-dev/chains";
import { resolveIpfsUri } from "@thirdweb-dev/react-core";
import { useStorage } from "@thirdweb-dev/react-core";
const defaultChainIcon = /* @__PURE__ */ resolveIpfsUri(
"ipfs://QmcxZHpyJa8T4i63xqjPYrZ6tKrt55tZJpbXcjSDKuKaf9/ethereum/512.png",
);
const defaultChainIcon =
"ipfs://QmcxZHpyJa8T4i63xqjPYrZ6tKrt55tZJpbXcjSDKuKaf9/ethereum/512.png";
export const ChainIcon: React.FC<{
chain?: Chain;
@@ -14,8 +13,12 @@ export const ChainIcon: React.FC<{
className?: string;
loading?: "lazy" | "eager";
}> = (props) => {
const url = props.chain?.icon?.url;
const src = url ? resolveIpfsUri(url) : defaultChainIcon;
const url = props.chain?.icon?.url || defaultChainIcon;
const storage = useStorage();
const src = storage
? storage.resolveScheme(url)
: url.replace("ipfs://", "https://ipfs.io/ipfs/");
return (
<div
+7 -2
View File
@@ -1,4 +1,4 @@
import { resolveIpfsUri } from "@thirdweb-dev/react-core";
import { useStorage } from "@thirdweb-dev/react-core";
export const Img: React.FC<{
width: string;
@@ -8,11 +8,16 @@ export const Img: React.FC<{
loading?: "eager" | "lazy";
className?: string;
}> = (props) => {
const storage = useStorage();
return (
<img
width={props.width}
height={props.height}
src={resolveIpfsUri(props.src)}
src={
storage
? storage.resolveScheme(props.src)
: props.src.replace("ipfs://", "https://ipfs.io/ipfs/")
}
alt={props.alt || ""}
loading={props.loading}
decoding="async"
@@ -7,11 +7,7 @@ import {
CarbonPlayFilledAlt,
} from "./Icons";
import { useQuery } from "@tanstack/react-query";
import {
resolveIpfsUri,
resolveMimeType,
useStorage,
} from "@thirdweb-dev/react-core";
import { resolveMimeType, useStorage } from "@thirdweb-dev/react-core";
import React, {
useEffect,
useMemo,
@@ -547,18 +543,19 @@ export function useResolvedMediaType(
) {
const storage = useStorage();
const resolvedUrl = useMemo(
() =>
resolveIpfsUri(
uri,
gatewayUrl
? { gatewayUrl }
: storage
? { gatewayUrl: storage.gatewayUrls["ipfs://"][0] }
: undefined,
),
[uri, storage, gatewayUrl],
);
const resolvedUrl = useMemo(() => {
if (!uri) {
return "";
}
if (gatewayUrl) {
return uri.replace("ipfs://", gatewayUrl);
}
if (storage) {
return storage.resolveScheme(uri);
}
return uri.replace("ipfs://", "https://ipfs.io/ipfs/");
}, [uri, storage, gatewayUrl]);
const resolvedMimType = useQuery(
["mime-type", resolvedUrl],
() => resolveMimeType(resolvedUrl),
@@ -304,7 +304,8 @@ export const ConnectedWalletDetails: React.FC<{
{activeWalletConfig &&
activeWalletConfig.id === walletIds.metamask &&
activeWalletConfig.isInstalled &&
activeWalletConfig.isInstalled() && (
activeWalletConfig.isInstalled() &&
!isMobile() && (
<MenuButton
type="button"
onClick={() => {
@@ -16,10 +16,11 @@ export const ConnectingScreen: React.FC<{
walletIconURL: string;
walletName: string;
supportLink: string;
hideBackButton: boolean;
}> = (props) => {
return (
<>
<BackButton onClick={props.onBack} />
{!props.hideBackButton && <BackButton onClick={props.onBack} />}
<IconContainer>
<Img
src={props.walletIconURL}
@@ -17,7 +17,7 @@ export const ScanScreen: React.FC<{
qrCodeUri?: string;
walletName: string;
walletIconURL: string;
hideBackButton?: boolean;
hideBackButton: boolean;
}> = (props) => {
const walletName = props.walletName.toLowerCase().includes("wallet")
? props.walletName
@@ -18,6 +18,8 @@ export const CoinbaseConnectUI = ({
"connecting" | "loading" | "scanning" | "get-started"
>("loading");
const hideBackButton = supportedWallets.length === 1;
const connectPrompted = useRef(false);
useEffect(() => {
if (screen !== "loading") {
@@ -61,6 +63,7 @@ export const CoinbaseConnectUI = ({
if (screen === "connecting" || screen === "loading") {
return (
<ConnectingScreen
hideBackButton={hideBackButton}
onBack={goBack}
walletName={meta.name}
walletIconURL={meta.iconURL}
@@ -77,7 +80,9 @@ export const CoinbaseConnectUI = ({
chromeExtensionLink={meta.urls?.chrome}
googlePlayStoreLink={meta.urls?.android}
appleStoreLink={meta.urls?.ios}
onBack={goBack}
onBack={() => {
setScreen("scanning");
}}
/>
);
}
@@ -89,7 +94,7 @@ export const CoinbaseConnectUI = ({
onConnected={close}
onGetStarted={() => setScreen("get-started")}
walletConfig={walletConfig}
hideBackButton={supportedWallets.length === 1}
hideBackButton={hideBackButton}
/>
);
}
@@ -12,7 +12,7 @@ export const CoinbaseScan: React.FC<{
onGetStarted: () => void;
onConnected: () => void;
walletConfig: WalletConfig<CoinbaseWallet>;
hideBackButton?: boolean;
hideBackButton: boolean;
}> = ({ walletConfig, onConnected, onGetStarted, onBack, hideBackButton }) => {
const createInstance = useCreateWalletInstance();
const [qrCodeUri, setQrCodeUri] = useState<string | undefined>(undefined);
@@ -68,6 +68,7 @@ export const FrameConnectUI = (props: ConnectUIProps<FrameWallet>) => {
const { walletConfig, close, goBack } = props;
const downloadLink = "https://frame.sh";
const supportLink = "https://docs.frame.sh";
const hideBackButton = props.supportedWallets.length === 1;
useEffect(() => {
if (connectPrompted.current) {
@@ -98,6 +99,7 @@ export const FrameConnectUI = (props: ConnectUIProps<FrameWallet>) => {
if (screen === "connecting") {
return (
<ConnectingScreen
hideBackButton={hideBackButton}
onBack={goBack}
walletName={walletConfig.meta.name}
walletIconURL={walletConfig.meta.iconURL}
@@ -13,6 +13,8 @@ export const MetamaskConnectUI = (props: ConnectUIProps<MetaMaskWallet>) => {
const { walletConfig, close } = props;
const connect = useConnect();
const hideBackButton = props.supportedWallets.length === 1;
const { goBack } = props;
const connectPrompted = useRef(false);
@@ -56,6 +58,7 @@ export const MetamaskConnectUI = (props: ConnectUIProps<MetaMaskWallet>) => {
if (screen === "connecting") {
return (
<ConnectingScreen
hideBackButton={hideBackButton}
onBack={props.goBack}
walletName={walletConfig.meta.name}
walletIconURL={walletConfig.meta.iconURL}
@@ -72,7 +75,9 @@ export const MetamaskConnectUI = (props: ConnectUIProps<MetaMaskWallet>) => {
chromeExtensionLink={walletConfig.meta.urls?.chrome}
googlePlayStoreLink={walletConfig.meta.urls?.android}
appleStoreLink={walletConfig.meta.urls?.ios}
onBack={props.goBack}
onBack={() => {
setScreen("scanning");
}}
/>
);
}
@@ -80,11 +85,12 @@ export const MetamaskConnectUI = (props: ConnectUIProps<MetaMaskWallet>) => {
if (screen === "scanning") {
return (
<MetamaskScan
onBack={props.goBack}
onBack={goBack}
onConnected={close}
onGetStarted={() => {
setScreen("get-started");
}}
hideBackButton={hideBackButton}
walletConfig={walletConfig}
/>
);
@@ -12,7 +12,8 @@ export const MetamaskScan: React.FC<{
onGetStarted: () => void;
onConnected: () => void;
walletConfig: WalletConfig<MetaMaskWallet>;
}> = ({ onBack, onConnected, onGetStarted, walletConfig }) => {
hideBackButton: boolean;
}> = ({ onBack, onConnected, onGetStarted, walletConfig, hideBackButton }) => {
const createInstance = useCreateWalletInstance();
const [qrCodeUri, setQrCodeUri] = useState<string | undefined>();
const { setConnectedWallet, chainToConnect, setConnectionStatus } =
@@ -54,6 +55,7 @@ export const MetamaskScan: React.FC<{
qrCodeUri={qrCodeUri}
walletName={walletConfig.meta.name}
walletIconURL={walletConfig.meta.iconURL}
hideBackButton={hideBackButton}
/>
);
};
@@ -13,6 +13,8 @@ export const RainbowConnectUI = (props: ConnectUIProps<WalletConnect>) => {
const { walletConfig, close } = props;
const connect = useConnect();
const hideBackButton = props.supportedWallets.length === 1;
const { goBack } = props;
const connectPrompted = useRef(false);
@@ -36,6 +38,7 @@ export const RainbowConnectUI = (props: ConnectUIProps<WalletConnect>) => {
if (screen === "connecting") {
return (
<ConnectingScreen
hideBackButton={hideBackButton}
onBack={props.goBack}
walletName={walletConfig.meta.name}
walletIconURL={walletConfig.meta.iconURL}
@@ -52,7 +55,9 @@ export const RainbowConnectUI = (props: ConnectUIProps<WalletConnect>) => {
chromeExtensionLink={walletConfig.meta.urls?.chrome}
googlePlayStoreLink={walletConfig.meta.urls?.android}
appleStoreLink={walletConfig.meta.urls?.ios}
onBack={props.goBack}
onBack={() => {
setScreen("scanning");
}}
/>
);
}
@@ -65,6 +70,7 @@ export const RainbowConnectUI = (props: ConnectUIProps<WalletConnect>) => {
onGetStarted={() => {
setScreen("get-started");
}}
hideBackButton={hideBackButton}
walletConfig={walletConfig}
/>
);
@@ -12,7 +12,8 @@ export const RainbowScan: React.FC<{
onGetStarted: () => void;
onConnected: () => void;
walletConfig: WalletConfig<WalletConnect>;
}> = ({ onBack, onConnected, onGetStarted, walletConfig }) => {
hideBackButton: boolean;
}> = ({ onBack, onConnected, onGetStarted, walletConfig, hideBackButton }) => {
const createInstance = useCreateWalletInstance();
const [qrCodeUri, setQrCodeUri] = useState<string | undefined>();
const { setConnectedWallet, chainToConnect, setConnectionStatus } =
@@ -54,6 +55,7 @@ export const RainbowScan: React.FC<{
qrCodeUri={qrCodeUri}
walletName={walletConfig.meta.name}
walletIconURL={walletConfig.meta.iconURL}
hideBackButton={hideBackButton}
/>
);
};
@@ -21,6 +21,10 @@ export const rainbowWallet = (
name: "Rainbow Wallet",
iconURL:
"ipfs://QmSZn47p4DVVBfzvg9BAX2EqwnPxkT1YAE7rUnrtd9CybQ/rainbow-logo.png",
urls: {
android: "https://rnbwapp.com/e/Va41HWS6Oxb",
ios: "https://rnbwapp.com/e/OeMdmkJ6Oxb",
},
},
create: (walletOptions: WalletOptions) => {
return new WalletConnect({
@@ -12,6 +12,7 @@ export const TrustConnectUI = (props: ConnectUIProps<TrustWallet>) => {
>("connecting");
const { walletConfig, close } = props;
const connect = useConnect();
const hideBackButton = props.supportedWallets.length === 1;
const { goBack } = props;
@@ -54,6 +55,7 @@ export const TrustConnectUI = (props: ConnectUIProps<TrustWallet>) => {
if (screen === "connecting") {
return (
<ConnectingScreen
hideBackButton={hideBackButton}
onBack={props.goBack}
walletName={walletConfig.meta.name}
walletIconURL={walletConfig.meta.iconURL}
@@ -70,7 +72,9 @@ export const TrustConnectUI = (props: ConnectUIProps<TrustWallet>) => {
chromeExtensionLink={walletConfig.meta.urls?.chrome}
googlePlayStoreLink={walletConfig.meta.urls?.android}
appleStoreLink={walletConfig.meta.urls?.ios}
onBack={props.goBack}
onBack={() => {
setScreen("scanning");
}}
/>
);
}
@@ -78,6 +82,7 @@ export const TrustConnectUI = (props: ConnectUIProps<TrustWallet>) => {
if (screen === "scanning") {
return (
<TrustScan
hideBackButton={hideBackButton}
onBack={props.goBack}
onConnected={close}
onGetStarted={() => {
@@ -11,8 +11,9 @@ export const TrustScan: React.FC<{
onBack: () => void;
onGetStarted: () => void;
onConnected: () => void;
hideBackButton: boolean;
walletConfig: WalletConfig<TrustWallet>;
}> = ({ onBack, onConnected, onGetStarted, walletConfig }) => {
}> = ({ onBack, onConnected, onGetStarted, walletConfig, hideBackButton }) => {
const createInstance = useCreateWalletInstance();
const [qrCodeUri, setQrCodeUri] = useState<string | undefined>();
const { setConnectedWallet, chainToConnect, setConnectionStatus } =
@@ -54,6 +55,7 @@ export const TrustScan: React.FC<{
qrCodeUri={qrCodeUri}
walletName={walletConfig.meta.name}
walletIconURL={walletConfig.meta.iconURL}
hideBackButton={hideBackButton}
/>
);
};
@@ -12,6 +12,7 @@ export const ZerionConnectUI = (props: ConnectUIProps<ZerionWallet>) => {
>("connecting");
const { walletConfig, close } = props;
const connect = useConnect();
const hideBackButton = props.supportedWallets.length === 1;
const { goBack } = props;
@@ -54,6 +55,7 @@ export const ZerionConnectUI = (props: ConnectUIProps<ZerionWallet>) => {
if (screen === "connecting") {
return (
<ConnectingScreen
hideBackButton={hideBackButton}
onBack={props.goBack}
walletName={walletConfig.meta.name}
walletIconURL={walletConfig.meta.iconURL}
@@ -70,7 +72,9 @@ export const ZerionConnectUI = (props: ConnectUIProps<ZerionWallet>) => {
chromeExtensionLink={walletConfig.meta.urls?.chrome}
googlePlayStoreLink={walletConfig.meta.urls?.android}
appleStoreLink={walletConfig.meta.urls?.ios}
onBack={props.goBack}
onBack={() => {
setScreen("scanning");
}}
/>
);
}
@@ -78,6 +82,7 @@ export const ZerionConnectUI = (props: ConnectUIProps<ZerionWallet>) => {
if (screen === "scanning") {
return (
<ZerionScan
hideBackButton={hideBackButton}
onBack={props.goBack}
onConnected={close}
onGetStarted={() => {
@@ -87,6 +92,6 @@ export const ZerionConnectUI = (props: ConnectUIProps<ZerionWallet>) => {
/>
);
}
return null;
};
@@ -12,7 +12,8 @@ export const ZerionScan: React.FC<{
onGetStarted: () => void;
onConnected: () => void;
walletConfig: WalletConfig<ZerionWallet>;
}> = ({ onBack, onConnected, onGetStarted, walletConfig }) => {
hideBackButton: boolean;
}> = ({ onBack, onConnected, onGetStarted, walletConfig, hideBackButton }) => {
const createInstance = useCreateWalletInstance();
const [qrCodeUri, setQrCodeUri] = useState<string | undefined>();
const { setConnectedWallet, chainToConnect, setConnectionStatus } =
@@ -49,6 +50,7 @@ export const ZerionScan: React.FC<{
return (
<ScanScreen
hideBackButton={hideBackButton}
onBack={onBack}
onGetStarted={onGetStarted}
qrCodeUri={qrCodeUri}
+72
View File
@@ -1,5 +1,77 @@
# @thirdweb-dev/sdk
## 3.10.35
### Patch Changes
- Updated dependencies [[`8dd7540c`](https://github.com/thirdweb-dev/js/commit/8dd7540c455aa70534f6d29986537592fd12169b), [`8dd7540c`](https://github.com/thirdweb-dev/js/commit/8dd7540c455aa70534f6d29986537592fd12169b)]:
- @thirdweb-dev/storage@1.1.9
- @thirdweb-dev/chains@0.1.34
## 3.10.34
### Patch Changes
- Updated dependencies [[`0407b2c2`](https://github.com/thirdweb-dev/js/commit/0407b2c2f39b5f3fa06e613e671623b5644b3a28)]:
- @thirdweb-dev/chains@0.1.33
## 3.10.33
### Patch Changes
- Updated dependencies [[`a9093bcf`](https://github.com/thirdweb-dev/js/commit/a9093bcf287c01e3335fd780e2ccbfdb3380bf95)]:
- @thirdweb-dev/chains@0.1.32
## 3.10.32
### Patch Changes
- Updated dependencies [[`4393b228`](https://github.com/thirdweb-dev/js/commit/4393b2280505fd0b2284555d64eae6567e8401a5)]:
- @thirdweb-dev/chains@0.1.31
## 3.10.31
### Patch Changes
- Updated dependencies [[`40682191`](https://github.com/thirdweb-dev/js/commit/40682191450de08ad40b9d2957afced248657af2)]:
- @thirdweb-dev/chains@0.1.30
## 3.10.30
### Patch Changes
- [#1314](https://github.com/thirdweb-dev/js/pull/1314) [`db68bd04`](https://github.com/thirdweb-dev/js/commit/db68bd04cd8bb3ee6bff051d1d5b5a872353fde0) Thanks [@iketw](https://github.com/iketw)! - Passes API key to thirdweb storage ipfs uploader
If you want to use thirdweb's storage upload services you need to pass an API key.
You can grab one from: https://thirdweb.com/dashboard/settings
If using ThirdwebStorage directly:
```javascript
new ThirdwebStorage({
apiKey: <yourApiKey>,
});
```
- Updated dependencies [[`db68bd04`](https://github.com/thirdweb-dev/js/commit/db68bd04cd8bb3ee6bff051d1d5b5a872353fde0), [`fd74d791`](https://github.com/thirdweb-dev/js/commit/fd74d7918072cda03b52f852ebb3f8dccb84074d), [`35f20ceb`](https://github.com/thirdweb-dev/js/commit/35f20ceb4f943e95d9566105096f06412978da7a)]:
- @thirdweb-dev/storage@1.1.8
- @thirdweb-dev/chains@0.1.29
## 3.10.29
### Patch Changes
- [#1299](https://github.com/thirdweb-dev/js/pull/1299) [`7e044c66`](https://github.com/thirdweb-dev/js/commit/7e044c664d8a034f5324b859ac3596860c86f9a5) Thanks [@nkrishang](https://github.com/nkrishang)! - Add ERC721LoyaltyCard and ERC721UpdatableMetadata
- [#1298](https://github.com/thirdweb-dev/js/pull/1298) [`72ada475`](https://github.com/thirdweb-dev/js/commit/72ada47596d5d5c08736c33215faeec636b7156a) Thanks [@joaquim-verges](https://github.com/joaquim-verges)! - Proper types for contract.metadata.get() for custom contracts
- [#1304](https://github.com/thirdweb-dev/js/pull/1304) [`2c0bb078`](https://github.com/thirdweb-dev/js/commit/2c0bb0789955f6cd397b6fdb8e990a505251c631) Thanks [@nachoiacovino](https://github.com/nachoiacovino)! - Fix pack code snippets
- Updated dependencies [[`7e044c66`](https://github.com/thirdweb-dev/js/commit/7e044c664d8a034f5324b859ac3596860c86f9a5), [`b5c6eedb`](https://github.com/thirdweb-dev/js/commit/b5c6eedb38aa3c52eb97f3d25ad83e38c55afe61), [`4961b597`](https://github.com/thirdweb-dev/js/commit/4961b597a098dae0a4eff01a9ef268a65fe1a352)]:
- @thirdweb-dev/contracts-js@1.3.9
- @thirdweb-dev/chains@0.1.28
- @thirdweb-dev/storage@1.1.7
## 3.10.28
### Patch Changes
+1 -1
View File
@@ -1,6 +1,6 @@
{
"name": "@thirdweb-dev/sdk",
"version": "3.10.28",
"version": "3.10.35",
"description": "The main thirdweb SDK.",
"repository": "https://github.com/thirdweb-dev/js/tree/main/packages/sdk",
"license": "Apache-2.0",
+7 -2
View File
@@ -8,8 +8,13 @@ export function createStorage(
if (storage) {
return storage;
} else if (options?.gatewayUrls) {
return new ThirdwebStorage({ gatewayUrls: options.gatewayUrls });
return new ThirdwebStorage({
gatewayUrls: options.gatewayUrls,
apiKey: options.thirdwebApiKey,
});
} else {
return new ThirdwebStorage();
return new ThirdwebStorage({
apiKey: options?.thirdwebApiKey,
});
}
}
@@ -29,6 +29,8 @@ import {
FEATURE_NFT_SIGNATURE_MINTABLE_V2,
FEATURE_NFT_SHARED_METADATA,
FEATURE_NFT_CLAIM_ZORA,
FEATURE_NFT_LOYALTY_CARD,
FEATURE_NFT_UPDATABLE_METADATA,
} from "./erc721-features";
import {
FEATURE_EDITION,
@@ -98,6 +100,8 @@ export type Feature =
| typeof FEATURE_NFT_BURNABLE
| typeof FEATURE_NFT_TIERED_DROP
| typeof FEATURE_NFT_SHARED_METADATA
| typeof FEATURE_NFT_LOYALTY_CARD
| typeof FEATURE_NFT_UPDATABLE_METADATA
| typeof FEATURE_EDITION
| typeof FEATURE_EDITION_ENUMERABLE
| typeof FEATURE_EDITION_MINTABLE
@@ -172,4 +176,6 @@ export const SUPPORTED_FEATURES: Record<string, Feature> = /* @__PURE__ */ {
[FEATURE_OFFERS.name]: FEATURE_OFFERS,
[FEATURE_ACCOUNT_FACTORY.name]: FEATURE_ACCOUNT_FACTORY,
[FEATURE_ACCOUNT.name]: FEATURE_ACCOUNT,
[FEATURE_NFT_LOYALTY_CARD.name]: FEATURE_NFT_LOYALTY_CARD,
[FEATURE_NFT_UPDATABLE_METADATA.name]: FEATURE_NFT_UPDATABLE_METADATA,
};
@@ -16,6 +16,8 @@ import SignatureMintERC721_V1Abi from "@thirdweb-dev/contracts-js/dist/abis/ISig
import TieredDropAbi from "@thirdweb-dev/contracts-js/dist/abis/LazyMintWithTier.json";
import SharedMetadataAbi from "@thirdweb-dev/contracts-js/dist/abis/SharedMetadata.json";
import zora_IDropERC721 from "@thirdweb-dev/contracts-js/dist/abis/zora_IERC721Drop.json";
import ILoyaltyCardAbi from "@thirdweb-dev/contracts-js/dist/abis/ILoyaltyCard.json";
import INFTMetadataAbi from "@thirdweb-dev/contracts-js/dist/abis/INFTMetadata.json";
export const FEATURE_NFT_BURNABLE = {
name: "ERC721Burnable",
@@ -211,6 +213,30 @@ export const FEATURE_NFT_SHARED_METADATA = /* @__PURE__ */ {
features: {},
} as const;
export const FEATURE_NFT_LOYALTY_CARD = {
name: "ERC721LoyaltyCard",
namespace: "nft.loyaltyCard",
docLinks: {
// TODO
sdk: "",
contracts: "",
},
abis: [ILoyaltyCardAbi],
features: {},
} as const;
export const FEATURE_NFT_UPDATABLE_METADATA = {
name: "ERC721UpdatableMetadata",
namespace: "nft.metadata",
docLinks: {
// TODO
sdk: "",
contracts: "",
},
abis: [INFTMetadataAbi],
features: {},
} as const;
export const FEATURE_NFT = /* @__PURE__ */ {
name: "ERC721",
namespace: "nft",
@@ -234,5 +260,7 @@ export const FEATURE_NFT = /* @__PURE__ */ {
[FEATURE_NFT_CLAIM_PHASES_V1.name]: FEATURE_NFT_CLAIM_PHASES_V1,
[FEATURE_NFT_CLAIM_PHASES_V2.name]: FEATURE_NFT_CLAIM_PHASES_V2,
[FEATURE_NFT_SHARED_METADATA.name]: FEATURE_NFT_SHARED_METADATA,
[FEATURE_NFT_LOYALTY_CARD.name]: FEATURE_NFT_LOYALTY_CARD,
[FEATURE_NFT_UPDATABLE_METADATA.name]: FEATURE_NFT_UPDATABLE_METADATA,
},
} as const;
@@ -355,7 +355,7 @@ export class Pack extends StandardErc1155<PackContract> {
* // ERC20 rewards to be included in the pack
* erc20Rewards: [
* {
* assetContract: "0x...",
* contractAddress: "0x...",
* quantityPerReward: 5,
* quantity: 100,
* totalRewards: 20,
@@ -364,14 +364,14 @@ export class Pack extends StandardErc1155<PackContract> {
* // ERC721 rewards to be included in the pack
* erc721Rewards: [
* {
* assetContract: "0x...",
* contractAddress: "0x...",
* tokenId: 0,
* }
* ],
* // ERC1155 rewards to be included in the pack
* erc1155Rewards: [
* {
* assetContract: "0x...",
* contractAddress: "0x...",
* tokenId: 0,
* quantityPerReward: 1,
* totalRewards: 100,
@@ -404,7 +404,7 @@ export class Pack extends StandardErc1155<PackContract> {
* // ERC20 rewards to be included in the pack
* erc20Rewards: [
* {
* assetContract: "0x...",
* contractAddress: "0x...",
* quantityPerReward: 5,
* quantity: 100,
* totalRewards: 20,
@@ -413,14 +413,14 @@ export class Pack extends StandardErc1155<PackContract> {
* // ERC721 rewards to be included in the pack
* erc721Rewards: [
* {
* assetContract: "0x...",
* contractAddress: "0x...",
* tokenId: 0,
* }
* ],
* // ERC1155 rewards to be included in the pack
* erc1155Rewards: [
* {
* assetContract: "0x...",
* contractAddress: "0x...",
* tokenId: 0,
* quantityPerReward: 1,
* totalRewards: 100,
@@ -484,7 +484,7 @@ export class Pack extends StandardErc1155<PackContract> {
* // ERC20 rewards to be included in the pack
* erc20Rewards: [
* {
* assetContract: "0x...",
* contractAddress: "0x...",
* quantityPerReward: 5,
* quantity: 100,
* totalRewards: 20,
@@ -493,14 +493,14 @@ export class Pack extends StandardErc1155<PackContract> {
* // ERC721 rewards to be included in the pack
* erc721Rewards: [
* {
* assetContract: "0x...",
* contractAddress: "0x...",
* tokenId: 0,
* }
* ],
* // ERC1155 rewards to be included in the pack
* erc1155Rewards: [
* {
* assetContract: "0x...",
* contractAddress: "0x...",
* tokenId: 0,
* quantityPerReward: 1,
* totalRewards: 100,
@@ -109,7 +109,7 @@ export class SmartContract<
public estimator: GasCostEstimator<TContract>;
public publishedMetadata: ContractPublishedMetadata<TContract>;
public abi: Abi;
public metadata: ContractMetadata<BaseContract, any>;
public metadata: ContractMetadata<BaseContract, typeof CustomContractSchema>;
/**
* Handle royalties
@@ -84,7 +84,9 @@ export class ContractWrapper<
this.readContract = this.writeContract.connect(
this.getProvider(),
) as TContract;
this.#storage = new ThirdwebStorage();
this.#storage = new ThirdwebStorage({
apiKey: options?.thirdwebApiKey,
});
}
public override updateSignerOrProvider(network: NetworkInput): void {
@@ -0,0 +1,63 @@
import { buildTransactionFunction } from "../../common/transactions";
import { FEATURE_NFT_LOYALTY_CARD } from "../../constants/erc721-features";
import { DetectableFeature } from "../interfaces/DetectableFeature";
import { ContractWrapper } from "./contract-wrapper";
import { Transaction } from "./transactions";
import type { ILoyaltyCard } from "@thirdweb-dev/contracts-js";
import { BigNumberish } from "ethers";
export class Erc721LoyaltyCard implements DetectableFeature {
featureName = FEATURE_NFT_LOYALTY_CARD.name;
private contractWrapper: ContractWrapper<ILoyaltyCard>;
constructor(contractWrapper: ContractWrapper<ILoyaltyCard>) {
this.contractWrapper = contractWrapper;
}
/**
* Cancel loyalty card NFTs
*
* @remarks Cancel loyalty card NFTs held by the connected wallet
*
* @example
* ```javascript
* // The token ID of the loyalty card you want to cancel
* const tokenId = 0;
*
* await contract.nft.loyaltyCard.cancel(tokenId);
* ```
*/
cancel = /* @__PURE__ */ buildTransactionFunction(
async (tokenId: BigNumberish) => {
return Transaction.fromContractWrapper({
contractWrapper: this.contractWrapper,
method: "cancel",
args: [tokenId],
});
},
);
/**
* Revoke loyalty card NFTs
*
* @remarks Revoke loyalty card NFTs held by some owner.
*
* @example
* ```javascript
* // The token ID of the loyalty card you want to revoke
* const tokenId = 0;
*
* await contract.nft.loyaltyCard.revoke(tokenId);
* ```
*/
revoke = /* @__PURE__ */ buildTransactionFunction(
async (tokenId: BigNumberish) => {
return Transaction.fromContractWrapper({
contractWrapper: this.contractWrapper,
method: "revoke",
args: [tokenId],
});
},
);
}
@@ -0,0 +1,51 @@
import { NFTMetadataOrUri } from "../../../core/schema/nft";
import { uploadOrExtractURI } from "../../common/nft";
import { buildTransactionFunction } from "../../common/transactions";
import { FEATURE_NFT_UPDATABLE_METADATA } from "../../constants/erc721-features";
import { DetectableFeature } from "../interfaces/DetectableFeature";
import { ContractWrapper } from "./contract-wrapper";
import { Transaction } from "./transactions";
import type { INFTMetadata } from "@thirdweb-dev/contracts-js";
import type { ThirdwebStorage } from "@thirdweb-dev/storage";
import { BigNumberish } from "ethers";
export class Erc721UpdatableMetadata implements DetectableFeature {
featureName = FEATURE_NFT_UPDATABLE_METADATA.name;
private contractWrapper: ContractWrapper<INFTMetadata>;
private storage: ThirdwebStorage;
constructor(
contractWrapper: ContractWrapper<INFTMetadata>,
storage: ThirdwebStorage,
) {
this.contractWrapper = contractWrapper;
this.storage = storage;
}
/**
* Update the metadata of an NFT
*
* @remarks Update the metadata of an NFT
*
* @example
* ```javascript
* // The token ID of the NFT whose metadata you want to update
* const tokenId = 0;
* // The new metadata
* const metadata = { name: "My NFT", description: "My NFT description""}
*
* await contract.nft.metadata.update(tokenId, metadata);
* ```
*/
update = /* @__PURE__ */ buildTransactionFunction(
async (tokenId: BigNumberish, metadata: NFTMetadataOrUri) => {
const uri = await uploadOrExtractURI(metadata, this.storage);
return Transaction.fromContractWrapper({
contractWrapper: this.contractWrapper,
method: "setTokenURI",
args: [tokenId, uri],
});
},
);
}
@@ -27,6 +27,8 @@ import {
FEATURE_NFT_TIERED_DROP,
FEATURE_NFT_SIGNATURE_MINTABLE_V2,
FEATURE_NFT_SHARED_METADATA,
FEATURE_NFT_LOYALTY_CARD,
FEATURE_NFT_UPDATABLE_METADATA,
} from "../../constants/erc721-features";
import type { Address } from "../../schema/shared/Address";
import type { AddressOrEns } from "../../schema/shared/AddressOrEnsSchema";
@@ -58,6 +60,8 @@ import type {
Zora_IERC721Drop,
SharedMetadata,
OpenEditionERC721,
ILoyaltyCard,
INFTMetadata,
} from "@thirdweb-dev/contracts-js";
import type { ThirdwebStorage } from "@thirdweb-dev/storage";
import { BigNumber, BigNumberish, constants } from "ethers";
@@ -69,6 +73,8 @@ import { Erc721ClaimableWithConditions } from "./erc-721-claim-conditions";
import { Erc721Claimable } from "./erc-721-claimable";
import { Erc721SharedMetadata } from "./erc-721-shared-metadata";
import { Erc721ClaimableZora } from "./erc-721-claim-zora";
import { Erc721LoyaltyCard } from "./erc-721-loyalty-card";
import { Erc721UpdatableMetadata } from "./erc-721-metadata";
/**
* Standard ERC721 NFT functions
@@ -100,6 +106,8 @@ export class Erc721<
private claimCustom: Erc721Claimable | undefined;
private erc721SharedMetadata: Erc721SharedMetadata | undefined;
private claimZora: Erc721ClaimableZora | undefined;
private loyaltyCard: Erc721LoyaltyCard | undefined;
private updatableMetadata: Erc721UpdatableMetadata | undefined;
protected contractWrapper: ContractWrapper<T>;
protected storage: ThirdwebStorage;
@@ -125,6 +133,8 @@ export class Erc721<
this.claimCustom = this.detectErc721Claimable();
this.claimZora = this.detectErc721ClaimableZora();
this.erc721SharedMetadata = this.detectErc721SharedMetadata();
this.loyaltyCard = this.detectErc721LoyaltyCard();
this.updatableMetadata = this.detectErc721UpdatableMetadata();
this._chainId = chainId;
}
@@ -606,6 +616,54 @@ export class Erc721<
},
);
////// ERC721 Loyalty Card Extension //////
/**
* Cancel loyalty card NFTs
*
* @remarks Cancel loyalty card NFTs held by the connected wallet
*
* @example
* ```javascript
* // The token ID of the loyalty card you want to cancel
* const tokenId = 0;
*
* const result = await contract.erc721.cancel(tokenId);
* ```
* @twfeature ERC721LoyaltyCard
*/
cancel = /* @__PURE__ */ buildTransactionFunction(
async (tokenId: BigNumberish) => {
return assertEnabled(
this.loyaltyCard,
FEATURE_NFT_LOYALTY_CARD,
).cancel.prepare(tokenId);
},
);
/**
* Revoke loyalty card NFTs
*
* @remarks Revoke loyalty card NFTs held by some owner.
*
* @example
* ```javascript
* // The token ID of the loyalty card you want to revoke
* const tokenId = 0;
*
* const result = await contract.erc721.revoke(tokenId);
* ```
* @twfeature ERC721LoyaltyCard
*/
revoke = /* @__PURE__ */ buildTransactionFunction(
async (tokenId: BigNumberish) => {
return assertEnabled(
this.loyaltyCard,
FEATURE_NFT_LOYALTY_CARD,
).revoke.prepare(tokenId);
},
);
////// ERC721 LazyMint Extension //////
/**
@@ -649,6 +707,33 @@ export class Erc721<
},
);
////// ERC721 Metadata Extension //////
/**
* Update the metadata of an NFT
*
* @remarks Update the metadata of an NFT
*
* @example
* ```javascript
* // The token ID of the NFT whose metadata you want to update
* const tokenId = 0;
* // The new metadata
* const metadata = { name: "My NFT", description: "My NFT description""}
*
* await contract.erc721.update(tokenId, metadata);
* ```
* @twfeature ERC721UpdatableMetadata
*/
update = /* @__PURE__ */ buildTransactionFunction(
async (tokenId: BigNumberish, metadata: NFTMetadataOrUri) => {
return assertEnabled(
this.updatableMetadata,
FEATURE_NFT_UPDATABLE_METADATA,
).update.prepare(tokenId, metadata);
},
);
////// ERC721 Claimable Extension //////
/**
@@ -1120,4 +1205,28 @@ export class Erc721<
}
return undefined;
}
private detectErc721LoyaltyCard(): Erc721LoyaltyCard | undefined {
if (
detectContractFeature<ILoyaltyCard>(
this.contractWrapper,
"ERC721LoyaltyCard",
)
) {
return new Erc721LoyaltyCard(this.contractWrapper);
}
return undefined;
}
private detectErc721UpdatableMetadata(): Erc721UpdatableMetadata | undefined {
if (
detectContractFeature<INFTMetadata>(
this.contractWrapper,
"ERC721UpdatableMetadata",
)
) {
return new Erc721UpdatableMetadata(this.contractWrapper, this.storage);
}
return undefined;
}
}
+63 -2
View File
@@ -109,6 +109,8 @@ import {
PrecomputedDeploymentTransaction,
} from "../types/any-evm/deploy-data";
import { fetchContractMetadataFromAddress } from "../common/metadata-resolver";
import { LoyaltyCardContractDeploy } from "../schema/contracts/loyalty-card";
import { getDefaultTrustedForwarders } from "../constants";
/**
* The main entry point for the thirdweb SDK
@@ -708,7 +710,7 @@ export class ThirdwebSDK extends RPCConnectionHandler {
address,
chainId,
contractType: async () => "custom" as const,
metadata: async () => ({}),
metadata: async () => ({ name: "" }),
extensions: async () => [],
};
}
@@ -741,7 +743,7 @@ export class ThirdwebSDK extends RPCConnectionHandler {
address,
chainId,
contractType: async () => "custom" as const,
metadata: async () => ({}),
metadata: async () => ({ name: "" }),
extensions: async () => [],
};
}
@@ -945,6 +947,65 @@ export class ContractDeployer extends RPCConnectionHandler {
},
);
/**
* Deploys a new LoyaltyCard contract
*
* @remarks Deploys a LoyaltyCard contract and returns the address of the deployed contract
*
* @example
* ```javascript
* const contractAddress = await sdk.deployer.deployLoyaltyCard({
* name: "My Loyalty Program",
* primary_sale_recipient: "your-address",
* });
* ```
* @param metadata - the contract metadata
* @returns the address of the deployed contract
*/
deployLoyaltyCard = /* @__PURE__ */ buildDeployTransactionFunction(
async (
metadata: NFTContractDeployMetadata,
options?: DeployOptions,
): Promise<DeployTransaction> => {
const parsedMetadata = await LoyaltyCardContractDeploy.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,
parsedMetadata.platform_fee_basis_points,
parsedMetadata.platform_fee_recipient,
];
return await this.deployReleasedContract.prepare(
THIRDWEB_DEPLOYER,
"LoyaltyCard",
deployArgs,
options,
);
},
);
/**
* Deploys a new SignatureDrop contract
*
@@ -16,6 +16,7 @@ export const CommonContractSchema = /* @__PURE__ */ (() =>
image: FileOrBufferOrStringSchema.optional(),
external_link: z.string().optional(),
app_uri: z.string().optional(),
social_urls: z.record(z.string()).optional(),
}))();
export type CommonContractSchemaInput = z.input<typeof CommonContractSchema>;
@@ -37,7 +37,7 @@ export type CustomContractMetadata = z.input<typeof BYOCContractMetadataSchema>;
export const CustomContractInput = /* @__PURE__ */ (() =>
BYOCContractMetadataSchema.merge(
CommonRoyaltySchema.merge(MerkleSchema).merge(CommonSymbolSchema).partial(),
))();
).catchall(z.any()))();
/**
* @internal
@@ -45,7 +45,7 @@ export const CustomContractInput = /* @__PURE__ */ (() =>
export const CustomContractOutput = /* @__PURE__ */ (() =>
CommonContractOutputSchema.merge(
CommonRoyaltySchema.merge(MerkleSchema).merge(CommonSymbolSchema).partial(),
))();
).catchall(z.any()))();
/**
* @internal
@@ -0,0 +1,24 @@
import {
CommonContractOutputSchema,
CommonContractSchema,
CommonPlatformFeeSchema,
CommonPrimarySaleSchema,
CommonRoyaltySchema,
CommonSymbolSchema,
CommonTrustedForwarderSchema,
} from "./common";
export const LoyaltyCardContractInput =
/* @__PURE__ */ CommonContractSchema.merge(CommonRoyaltySchema).merge(
CommonSymbolSchema,
);
export const LoyaltyCardContractOutput =
/* @__PURE__ */ CommonContractOutputSchema.merge(CommonRoyaltySchema).merge(
CommonSymbolSchema,
);
export const LoyaltyCardContractDeploy =
/* @__PURE__ */ LoyaltyCardContractInput.merge(CommonPlatformFeeSchema)
.merge(CommonPrimarySaleSchema)
.merge(CommonTrustedForwarderSchema);

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