Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
db964131b4 | ||
|
|
4393b22805 | ||
|
|
b28c3a5a67 | ||
|
|
4068219145 | ||
|
|
03d1a6d73b | ||
|
|
fd74d79180 | ||
|
|
35f20ceb4f | ||
|
|
db68bd04cd | ||
|
|
3df86ad16f | ||
|
|
4389083ca3 | ||
|
|
4961b597a0 | ||
|
|
7e044c664d | ||
|
|
498df5d69a | ||
|
|
b8d4930305 | ||
|
|
2c0bb07899 | ||
|
|
72ada47596 | ||
|
|
dc9eee735c | ||
|
|
b4aee9b591 | ||
|
|
b5c6eedb38 | ||
|
|
8672c8533c | ||
|
|
bb207473f8 | ||
|
|
10b3a717da | ||
|
|
aa81bedaf2 |
@@ -51,5 +51,24 @@
|
|||||||
},
|
},
|
||||||
"manypkg": {
|
"manypkg": {
|
||||||
"defaultBranch": "main"
|
"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"
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,5 +1,33 @@
|
|||||||
# @thirdweb-dev/auth
|
# @thirdweb-dev/auth
|
||||||
|
|
||||||
|
## 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
|
## 3.2.8
|
||||||
|
|
||||||
### Patch Changes
|
### Patch Changes
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "@thirdweb-dev/auth",
|
"name": "@thirdweb-dev/auth",
|
||||||
"version": "3.2.8",
|
"version": "3.2.12",
|
||||||
"main": "dist/thirdweb-dev-auth.cjs.js",
|
"main": "dist/thirdweb-dev-auth.cjs.js",
|
||||||
"module": "dist/thirdweb-dev-auth.esm.js",
|
"module": "dist/thirdweb-dev-auth.esm.js",
|
||||||
"browser": {
|
"browser": {
|
||||||
|
|||||||
@@ -1,5 +1,35 @@
|
|||||||
# @thirdweb-dev/chains
|
# @thirdweb-dev/chains
|
||||||
|
|
||||||
|
## 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
|
## 0.1.27
|
||||||
|
|
||||||
### Patch Changes
|
### Patch Changes
|
||||||
|
|||||||
@@ -20,12 +20,12 @@ export default {
|
|||||||
"nativeCurrency": {
|
"nativeCurrency": {
|
||||||
"name": "SMR",
|
"name": "SMR",
|
||||||
"symbol": "SMR",
|
"symbol": "SMR",
|
||||||
"decimals": 18
|
"decimals": 6
|
||||||
},
|
},
|
||||||
"infoURL": "https://shimmer.network",
|
"infoURL": "https://shimmer.network",
|
||||||
"shortName": "shimmerevm-testnet",
|
"shortName": "shimmerevm-testnet",
|
||||||
"chainId": 1071,
|
"chainId": 1072,
|
||||||
"networkId": 1071,
|
"networkId": 1072,
|
||||||
"explorers": [
|
"explorers": [
|
||||||
{
|
{
|
||||||
"name": "explorer",
|
"name": "explorer",
|
||||||
@@ -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;
|
||||||
@@ -1,8 +1,8 @@
|
|||||||
import type { Chain } from "../src/types";
|
import type { Chain } from "../src/types";
|
||||||
export default {
|
export default {
|
||||||
"name": "Taro Testnet",
|
"name": "Bubs Testnet",
|
||||||
"chain": "gETH",
|
"chain": "gETH",
|
||||||
"shortName": "Taro",
|
"shortName": "Bubs",
|
||||||
"chainId": 1582,
|
"chainId": 1582,
|
||||||
"testnet": true,
|
"testnet": true,
|
||||||
"icon": {
|
"icon": {
|
||||||
@@ -12,8 +12,8 @@ export default {
|
|||||||
"height": 512
|
"height": 512
|
||||||
},
|
},
|
||||||
"rpc": [
|
"rpc": [
|
||||||
"https://taro-testnet.rpc.thirdweb.com/${THIRDWEB_API_KEY}",
|
"https://bubs-testnet.rpc.thirdweb.com/${THIRDWEB_API_KEY}",
|
||||||
"https://taro-testnet.calderachain.xyz/http"
|
"https://bubs.calderachain.xyz/http"
|
||||||
],
|
],
|
||||||
"nativeCurrency": {
|
"nativeCurrency": {
|
||||||
"decimals": 18,
|
"decimals": 18,
|
||||||
@@ -22,15 +22,15 @@ export default {
|
|||||||
},
|
},
|
||||||
"explorers": [
|
"explorers": [
|
||||||
{
|
{
|
||||||
"url": "https://explorer.tarotestnet.com",
|
"url": "https://explorer.bubstestnet.com",
|
||||||
"name": "Taro Testnet Explorer",
|
"name": "Bubs Testnet Explorer",
|
||||||
"standard": "EIP3091"
|
"standard": "EIP3091"
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"faucets": [
|
"faucets": [
|
||||||
"https://tarotestnet.com"
|
"https://bubstestnet.com"
|
||||||
],
|
],
|
||||||
"infoURL": "https://tarotestnet.com",
|
"infoURL": "https://bubstestnet.com",
|
||||||
"networkId": 1582,
|
"networkId": 1582,
|
||||||
"slug": "taro-testnet"
|
"slug": "bubs-testnet"
|
||||||
} as const satisfies Chain;
|
} as const satisfies Chain;
|
||||||
@@ -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;
|
||||||
@@ -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;
|
||||||
@@ -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;
|
||||||
@@ -4,7 +4,12 @@ export default {
|
|||||||
"chain": "ETH",
|
"chain": "ETH",
|
||||||
"rpc": [
|
"rpc": [
|
||||||
"https://boba-network.rpc.thirdweb.com/${THIRDWEB_API_KEY}",
|
"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": [],
|
"faucets": [],
|
||||||
"nativeCurrency": {
|
"nativeCurrency": {
|
||||||
|
|||||||
@@ -4,7 +4,8 @@ export default {
|
|||||||
"chain": "ETH",
|
"chain": "ETH",
|
||||||
"rpc": [
|
"rpc": [
|
||||||
"https://boba-network-goerli-testnet.rpc.thirdweb.com/${THIRDWEB_API_KEY}",
|
"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": [],
|
"faucets": [],
|
||||||
"nativeCurrency": {
|
"nativeCurrency": {
|
||||||
@@ -13,7 +14,7 @@ export default {
|
|||||||
"decimals": 18
|
"decimals": 18
|
||||||
},
|
},
|
||||||
"infoURL": "https://boba.network",
|
"infoURL": "https://boba.network",
|
||||||
"shortName": "Bobagoerli",
|
"shortName": "BobaGoerli",
|
||||||
"chainId": 2888,
|
"chainId": 2888,
|
||||||
"networkId": 2888,
|
"networkId": 2888,
|
||||||
"explorers": [
|
"explorers": [
|
||||||
@@ -28,7 +29,7 @@ export default {
|
|||||||
"chain": "eip155-5",
|
"chain": "eip155-5",
|
||||||
"bridges": [
|
"bridges": [
|
||||||
{
|
{
|
||||||
"url": "https://gateway.goerli.boba.network"
|
"url": "https://gateway.boba.network"
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -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;
|
||||||
@@ -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;
|
||||||
@@ -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;
|
||||||
@@ -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;
|
||||||
@@ -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;
|
||||||
@@ -6,8 +6,7 @@ export default {
|
|||||||
"https://bobafuji-testnet.rpc.thirdweb.com/${THIRDWEB_API_KEY}",
|
"https://bobafuji-testnet.rpc.thirdweb.com/${THIRDWEB_API_KEY}",
|
||||||
"https://testnet.avax.boba.network",
|
"https://testnet.avax.boba.network",
|
||||||
"wss://wss.testnet.avax.boba.network",
|
"wss://wss.testnet.avax.boba.network",
|
||||||
"https://replica.testnet.avax.boba.network",
|
"https://replica.testnet.avax.boba.network"
|
||||||
"wss://replica-wss.testnet.avax.boba.network"
|
|
||||||
],
|
],
|
||||||
"faucets": [],
|
"faucets": [],
|
||||||
"nativeCurrency": {
|
"nativeCurrency": {
|
||||||
@@ -26,6 +25,15 @@ export default {
|
|||||||
"standard": "none"
|
"standard": "none"
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
|
"parent": {
|
||||||
|
"type": "L2",
|
||||||
|
"chain": "eip155-5",
|
||||||
|
"bridges": [
|
||||||
|
{
|
||||||
|
"url": "https://gateway.boba.network"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
"testnet": true,
|
"testnet": true,
|
||||||
"slug": "bobafuji-testnet"
|
"slug": "bobafuji-testnet"
|
||||||
} as const satisfies Chain;
|
} as const satisfies Chain;
|
||||||
@@ -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;
|
||||||
@@ -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;
|
||||||
@@ -1,9 +1,9 @@
|
|||||||
import type { Chain } from "../src/types";
|
import type { Chain } from "../src/types";
|
||||||
export default {
|
export default {
|
||||||
"name": "Binance Smart Chain Mainnet",
|
"name": "BNB Smart Chain Mainnet",
|
||||||
"chain": "BSC",
|
"chain": "BSC",
|
||||||
"rpc": [
|
"rpc": [
|
||||||
"https://binance.rpc.thirdweb.com/${THIRDWEB_API_KEY}",
|
"https://bnb-smart-chain.rpc.thirdweb.com/${THIRDWEB_API_KEY}",
|
||||||
"wss://bsc-ws-node.nariox.org",
|
"wss://bsc-ws-node.nariox.org",
|
||||||
"https://bsc.publicnode.com",
|
"https://bsc.publicnode.com",
|
||||||
"https://bsc-dataseed4.ninicoin.io",
|
"https://bsc-dataseed4.ninicoin.io",
|
||||||
@@ -14,20 +14,20 @@ export default {
|
|||||||
"https://bsc-dataseed3.defibit.io",
|
"https://bsc-dataseed3.defibit.io",
|
||||||
"https://bsc-dataseed2.defibit.io",
|
"https://bsc-dataseed2.defibit.io",
|
||||||
"https://bsc-dataseed1.defibit.io",
|
"https://bsc-dataseed1.defibit.io",
|
||||||
"https://bsc-dataseed4.binance.org",
|
"https://bsc-dataseed4.bnbchain.org",
|
||||||
"https://bsc-dataseed3.binance.org",
|
"https://bsc-dataseed3.bnbchain.org",
|
||||||
"https://bsc-dataseed2.binance.org",
|
"https://bsc-dataseed2.bnbchain.org",
|
||||||
"https://bsc-dataseed1.binance.org"
|
"https://bsc-dataseed1.bnbchain.org"
|
||||||
],
|
],
|
||||||
"faucets": [
|
"faucets": [
|
||||||
"https://free-online-app.com/faucet-for-eth-evm-chains/"
|
"https://free-online-app.com/faucet-for-eth-evm-chains/"
|
||||||
],
|
],
|
||||||
"nativeCurrency": {
|
"nativeCurrency": {
|
||||||
"name": "Binance Chain Native Token",
|
"name": "BNB Chain Native Token",
|
||||||
"symbol": "BNB",
|
"symbol": "BNB",
|
||||||
"decimals": 18
|
"decimals": 18
|
||||||
},
|
},
|
||||||
"infoURL": "https://www.binance.org",
|
"infoURL": "https://www.bnbchain.org/en",
|
||||||
"shortName": "bnb",
|
"shortName": "bnb",
|
||||||
"chainId": 56,
|
"chainId": 56,
|
||||||
"networkId": 56,
|
"networkId": 56,
|
||||||
@@ -46,5 +46,5 @@ export default {
|
|||||||
"format": "png"
|
"format": "png"
|
||||||
},
|
},
|
||||||
"testnet": false,
|
"testnet": false,
|
||||||
"slug": "binance"
|
"slug": "bnb-smart-chain"
|
||||||
} as const satisfies Chain;
|
} as const satisfies Chain;
|
||||||
@@ -5,9 +5,11 @@ export default {
|
|||||||
"rpc": [
|
"rpc": [
|
||||||
"https://boba-bnb.rpc.thirdweb.com/${THIRDWEB_API_KEY}",
|
"https://boba-bnb.rpc.thirdweb.com/${THIRDWEB_API_KEY}",
|
||||||
"https://bnb.boba.network",
|
"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",
|
"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": [],
|
"faucets": [],
|
||||||
"nativeCurrency": {
|
"nativeCurrency": {
|
||||||
@@ -26,6 +28,15 @@ export default {
|
|||||||
"standard": "none"
|
"standard": "none"
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
|
"parent": {
|
||||||
|
"type": "L2",
|
||||||
|
"chain": "eip155-5",
|
||||||
|
"bridges": [
|
||||||
|
{
|
||||||
|
"url": "https://gateway.boba.network"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
"testnet": false,
|
"testnet": false,
|
||||||
"slug": "boba-bnb"
|
"slug": "boba-bnb"
|
||||||
} as const satisfies Chain;
|
} as const satisfies Chain;
|
||||||
@@ -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;
|
||||||
@@ -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;
|
||||||
@@ -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;
|
||||||
@@ -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;
|
||||||
@@ -10,8 +10,7 @@ export default {
|
|||||||
},
|
},
|
||||||
"rpc": [
|
"rpc": [
|
||||||
"https://zetachain-athens-testnet.rpc.thirdweb.com/${THIRDWEB_API_KEY}",
|
"https://zetachain-athens-testnet.rpc.thirdweb.com/${THIRDWEB_API_KEY}",
|
||||||
"https://zetachain-athens-evm.blockpi.network/v1/rpc/public",
|
"https://api.athens2.zetachain.com/evm"
|
||||||
"wss://zetachain-athens.blockpi.network/rpc/v1/public/websocket"
|
|
||||||
],
|
],
|
||||||
"faucets": [
|
"faucets": [
|
||||||
"https://labs.zetachain.com/get-zeta"
|
"https://labs.zetachain.com/get-zeta"
|
||||||
|
|||||||
@@ -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;
|
||||||
@@ -2,7 +2,9 @@ import type { Chain } from "../src/types";
|
|||||||
export default {
|
export default {
|
||||||
"name": "Base",
|
"name": "Base",
|
||||||
"chain": "ETH",
|
"chain": "ETH",
|
||||||
"rpc": [],
|
"rpc": [
|
||||||
|
"https://base.rpc.thirdweb.com/${THIRDWEB_API_KEY}"
|
||||||
|
],
|
||||||
"faucets": [],
|
"faucets": [],
|
||||||
"nativeCurrency": {
|
"nativeCurrency": {
|
||||||
"name": "Ether",
|
"name": "Ether",
|
||||||
|
|||||||
@@ -1,26 +1,26 @@
|
|||||||
import type { Chain } from "../src/types";
|
import type { Chain } from "../src/types";
|
||||||
export default {
|
export default {
|
||||||
"name": "Binance Smart Chain Testnet",
|
"name": "BNB Smart Chain Testnet",
|
||||||
"chain": "BSC",
|
"chain": "BSC",
|
||||||
"rpc": [
|
"rpc": [
|
||||||
"https://binance-testnet.rpc.thirdweb.com/${THIRDWEB_API_KEY}",
|
"https://bnb-smart-chain-testnet.rpc.thirdweb.com/${THIRDWEB_API_KEY}",
|
||||||
"https://bsc-testnet.publicnode.com",
|
"https://bsc-testnet.publicnode.com",
|
||||||
"https://data-seed-prebsc-2-s3.binance.org:8545",
|
"https://data-seed-prebsc-2-s3.bnbchain.org:8545",
|
||||||
"https://data-seed-prebsc-1-s3.binance.org:8545",
|
"https://data-seed-prebsc-1-s3.bnbchain.org:8545",
|
||||||
"https://data-seed-prebsc-2-s2.binance.org:8545",
|
"https://data-seed-prebsc-2-s2.bnbchain.org:8545",
|
||||||
"https://data-seed-prebsc-1-s2.binance.org:8545",
|
"https://data-seed-prebsc-1-s2.bnbchain.org:8545",
|
||||||
"https://data-seed-prebsc-2-s1.binance.org:8545",
|
"https://data-seed-prebsc-2-s1.bnbchain.org:8545",
|
||||||
"https://data-seed-prebsc-1-s1.binance.org:8545"
|
"https://data-seed-prebsc-1-s1.bnbchain.org:8545"
|
||||||
],
|
],
|
||||||
"faucets": [
|
"faucets": [
|
||||||
"https://testnet.binance.org/faucet-smart"
|
"https://testnet.bnbchain.org/faucet-smart"
|
||||||
],
|
],
|
||||||
"nativeCurrency": {
|
"nativeCurrency": {
|
||||||
"name": "Binance Chain Native Token",
|
"name": "BNB Chain Native Token",
|
||||||
"symbol": "tBNB",
|
"symbol": "tBNB",
|
||||||
"decimals": 18
|
"decimals": 18
|
||||||
},
|
},
|
||||||
"infoURL": "https://testnet.binance.org/",
|
"infoURL": "https://www.bnbchain.org/en",
|
||||||
"shortName": "bnbt",
|
"shortName": "bnbt",
|
||||||
"chainId": 97,
|
"chainId": 97,
|
||||||
"networkId": 97,
|
"networkId": 97,
|
||||||
@@ -38,5 +38,5 @@ export default {
|
|||||||
"format": "png"
|
"format": "png"
|
||||||
},
|
},
|
||||||
"testnet": true,
|
"testnet": true,
|
||||||
"slug": "binance-testnet"
|
"slug": "bnb-smart-chain-testnet"
|
||||||
} as const satisfies Chain;
|
} as const satisfies Chain;
|
||||||
@@ -26,6 +26,15 @@ export default {
|
|||||||
"standard": "none"
|
"standard": "none"
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
|
"parent": {
|
||||||
|
"type": "L2",
|
||||||
|
"chain": "eip155-5",
|
||||||
|
"bridges": [
|
||||||
|
{
|
||||||
|
"url": "https://gateway.boba.network"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
"testnet": true,
|
"testnet": true,
|
||||||
"slug": "boba-bnb-testnet"
|
"slug": "boba-bnb-testnet"
|
||||||
} as const satisfies Chain;
|
} as const satisfies Chain;
|
||||||
@@ -3,9 +3,9 @@
|
|||||||
|
|
||||||
/** @type {Omit<Chain, "slug">} */
|
/** @type {Omit<Chain, "slug">} */
|
||||||
export default {
|
export default {
|
||||||
name: "Taro Testnet",
|
name: "Bubs Testnet",
|
||||||
chain: "gETH",
|
chain: "gETH",
|
||||||
shortName: "Taro",
|
shortName: "Bubs",
|
||||||
chainId: 1582,
|
chainId: 1582,
|
||||||
testnet: true,
|
testnet: true,
|
||||||
icon: {
|
icon: {
|
||||||
@@ -14,7 +14,7 @@ export default {
|
|||||||
width: 512,
|
width: 512,
|
||||||
height: 512,
|
height: 512,
|
||||||
},
|
},
|
||||||
rpc: ["https://taro-testnet.calderachain.xyz/http"],
|
rpc: ["https://bubs.calderachain.xyz/http"],
|
||||||
nativeCurrency: {
|
nativeCurrency: {
|
||||||
decimals: 18,
|
decimals: 18,
|
||||||
name: "Ether",
|
name: "Ether",
|
||||||
@@ -22,12 +22,12 @@ export default {
|
|||||||
},
|
},
|
||||||
explorers: [
|
explorers: [
|
||||||
{
|
{
|
||||||
url: "https://explorer.tarotestnet.com",
|
url: "https://explorer.bubstestnet.com",
|
||||||
name: "Taro Testnet Explorer",
|
name: "Bubs Testnet Explorer",
|
||||||
standard: "EIP3091",
|
standard: "EIP3091",
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
faucets: ["https://tarotestnet.com"],
|
faucets: ["https://bubstestnet.com"],
|
||||||
infoURL: "https://tarotestnet.com",
|
infoURL: "https://bubstestnet.com",
|
||||||
networkId: 1582,
|
networkId: 1582,
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -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",
|
||||||
|
},
|
||||||
|
};
|
||||||
@@ -10,4 +10,5 @@ export default {
|
|||||||
width: 512,
|
width: 512,
|
||||||
format: "png",
|
format: "png",
|
||||||
},
|
},
|
||||||
|
rpc: ["https://base.rpc.thirdweb.com/${THIRDWEB_API_KEY}"],
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "@thirdweb-dev/chains",
|
"name": "@thirdweb-dev/chains",
|
||||||
"version": "0.1.27",
|
"version": "0.1.31",
|
||||||
"main": "dist/thirdweb-dev-chains.cjs.js",
|
"main": "dist/thirdweb-dev-chains.cjs.js",
|
||||||
"module": "dist/thirdweb-dev-chains.esm.js",
|
"module": "dist/thirdweb-dev-chains.esm.js",
|
||||||
"browser": {
|
"browser": {
|
||||||
|
|||||||
@@ -267,7 +267,7 @@ import type { Chain } from "./types";
|
|||||||
${exports.join("\n")}
|
${exports.join("\n")}
|
||||||
export * from "./types";
|
export * from "./types";
|
||||||
export * from "./utils";
|
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(", ")}];
|
export const allChains: Chain[] = [${exportNames.join(", ")}];
|
||||||
|
|
||||||
type ChainsById = {
|
type ChainsById = {
|
||||||
|
|||||||
File diff suppressed because one or more lines are too long
@@ -1,5 +1,39 @@
|
|||||||
# thirdweb
|
# thirdweb
|
||||||
|
|
||||||
|
## 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
|
## 0.10.29
|
||||||
|
|
||||||
### Patch Changes
|
### Patch Changes
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
{
|
{
|
||||||
"name": "thirdweb",
|
"name": "thirdweb",
|
||||||
"main": "dist/cli/index.js",
|
"main": "dist/cli/index.js",
|
||||||
"version": "0.10.29",
|
"version": "0.10.33",
|
||||||
"repository": "https://github.com/thirdweb-dev/js/tree/main/packages/cli",
|
"repository": "https://github.com/thirdweb-dev/js/tree/main/packages/cli",
|
||||||
"author": "thirdweb eng <[email protected]>",
|
"author": "thirdweb eng <[email protected]>",
|
||||||
"license": "Apache-2.0",
|
"license": "Apache-2.0",
|
||||||
|
|||||||
@@ -1,5 +1,11 @@
|
|||||||
# @thirdweb-dev/contracts-js
|
# @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
|
## 1.3.8
|
||||||
|
|
||||||
### Patch Changes
|
### Patch Changes
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "@thirdweb-dev/contracts-js",
|
"name": "@thirdweb-dev/contracts-js",
|
||||||
"version": "1.3.8",
|
"version": "1.3.9",
|
||||||
"main": "dist/thirdweb-dev-contracts-js.cjs.js",
|
"main": "dist/thirdweb-dev-contracts-js.cjs.js",
|
||||||
"module": "dist/thirdweb-dev-contracts-js.esm.js",
|
"module": "dist/thirdweb-dev-contracts-js.esm.js",
|
||||||
"browser": {
|
"browser": {
|
||||||
@@ -10,7 +10,7 @@
|
|||||||
"license": "Apache-2.0",
|
"license": "Apache-2.0",
|
||||||
"repository": "https://github.com/thirdweb-dev/js/tree/main/packages/contracts-js",
|
"repository": "https://github.com/thirdweb-dev/js/tree/main/packages/contracts-js",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@thirdweb-dev/contracts": "3.5.9"
|
"@thirdweb-dev/contracts": "3.6.0"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@babel/preset-env": "^7.22.5",
|
"@babel/preset-env": "^7.22.5",
|
||||||
|
|||||||
@@ -1,5 +1,45 @@
|
|||||||
# @thirdweb-dev/react-core
|
# @thirdweb-dev/react-core
|
||||||
|
|
||||||
|
## 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
|
## 3.14.8
|
||||||
|
|
||||||
### Patch Changes
|
### Patch Changes
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "@thirdweb-dev/react-core",
|
"name": "@thirdweb-dev/react-core",
|
||||||
"version": "3.14.8",
|
"version": "3.14.12",
|
||||||
"repository": "https://github.com/thirdweb-dev/js/tree/main/packages/react-core",
|
"repository": "https://github.com/thirdweb-dev/js/tree/main/packages/react-core",
|
||||||
"author": "thirdweb eng <[email protected]>",
|
"author": "thirdweb eng <[email protected]>",
|
||||||
"license": "Apache-2.0",
|
"license": "Apache-2.0",
|
||||||
|
|||||||
@@ -1,25 +1,10 @@
|
|||||||
import mime from "mime/lite.js";
|
import mime from "mime/lite.js";
|
||||||
import {
|
|
||||||
parseGatewayUrls,
|
|
||||||
prepareGatewayUrls,
|
|
||||||
replaceSchemeWithGatewayUrl,
|
|
||||||
} from "@thirdweb-dev/storage";
|
|
||||||
|
|
||||||
// TODO legacy remove this when possible
|
// TODO legacy remove this when possible
|
||||||
export interface IPFSResolverOptions {
|
export interface IPFSResolverOptions {
|
||||||
gatewayUrl: string;
|
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) {
|
export async function resolveMimeType(url?: string) {
|
||||||
if (!url) {
|
if (!url) {
|
||||||
return undefined;
|
return undefined;
|
||||||
|
|||||||
@@ -328,7 +328,7 @@ export function useContractMetadata<TContract extends ValidContractInstance>(
|
|||||||
cacheKeys.contract.metadata(contract?.getAddress()),
|
cacheKeys.contract.metadata(contract?.getAddress()),
|
||||||
async () => {
|
async () => {
|
||||||
requiredParamInvariant(contract, "contract is required");
|
requiredParamInvariant(contract, "contract is required");
|
||||||
return await contract.metadata.get();
|
return (await contract.metadata.get()) as any; // FIXME types
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
enabled: !!contract,
|
enabled: !!contract,
|
||||||
|
|||||||
@@ -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 { ThirdwebThemeContext } from "../core/providers/theme-context";
|
||||||
export { ThirdwebProviderCore } from "../core/providers/thirdweb-provider";
|
export { ThirdwebProviderCore } from "../core/providers/thirdweb-provider";
|
||||||
|
|||||||
@@ -1,5 +1,13 @@
|
|||||||
# @thirdweb-dev/react-native-compat
|
# @thirdweb-dev/react-native-compat
|
||||||
|
|
||||||
|
## 0.2.31
|
||||||
|
|
||||||
|
## 0.2.30
|
||||||
|
|
||||||
|
## 0.2.29
|
||||||
|
|
||||||
|
## 0.2.28
|
||||||
|
|
||||||
## 0.2.27
|
## 0.2.27
|
||||||
|
|
||||||
### Patch Changes
|
### Patch Changes
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
{
|
{
|
||||||
"name": "@thirdweb-dev/react-native-compat",
|
"name": "@thirdweb-dev/react-native-compat",
|
||||||
"description": "Shims for Thirdweb in React Native Projects",
|
"description": "Shims for Thirdweb in React Native Projects",
|
||||||
"version": "0.2.27",
|
"version": "0.2.31",
|
||||||
"author": "thirdweb eng <[email protected]>",
|
"author": "thirdweb eng <[email protected]>",
|
||||||
"repository": "https://github.com/thirdweb-dev/js/tree/main/packages/react-native-compat",
|
"repository": "https://github.com/thirdweb-dev/js/tree/main/packages/react-native-compat",
|
||||||
"license": "Apache-2.0",
|
"license": "Apache-2.0",
|
||||||
|
|||||||
@@ -1,5 +1,78 @@
|
|||||||
# @thirdweb-dev/react-native
|
# @thirdweb-dev/react-native
|
||||||
|
|
||||||
|
## 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/chains@0.1.28
|
||||||
|
- @thirdweb-dev/sdk@3.10.29
|
||||||
|
- @thirdweb-dev/wallets@1.0.5
|
||||||
|
- @thirdweb-dev/react-core@3.14.9
|
||||||
|
- @thirdweb-dev/storage@1.1.7
|
||||||
|
|
||||||
## 0.2.27
|
## 0.2.27
|
||||||
|
|
||||||
### Patch Changes
|
### Patch Changes
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "@thirdweb-dev/react-native",
|
"name": "@thirdweb-dev/react-native",
|
||||||
"version": "0.2.27",
|
"version": "0.2.31",
|
||||||
"repository": "https://github.com/thirdweb-dev/js/tree/main/packages/react-native",
|
"repository": "https://github.com/thirdweb-dev/js/tree/main/packages/react-native",
|
||||||
"author": "thirdweb eng <[email protected]>",
|
"author": "thirdweb eng <[email protected]>",
|
||||||
"license": "Apache-2.0",
|
"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
|
* render a custom button to display the connected wallet details instead of the default button
|
||||||
*/
|
*/
|
||||||
detailsButton?: ConnectWalletDetailsProps["detailsButton"];
|
detailsButton?: ConnectWalletDetailsProps["detailsButton"];
|
||||||
|
|
||||||
|
/**
|
||||||
|
* render custom rows in the Connect Wallet Details modal
|
||||||
|
*/
|
||||||
|
extraRows?: ConnectWalletDetailsProps["extraRows"];
|
||||||
} & ConnectWalletButtonProps;
|
} & ConnectWalletButtonProps;
|
||||||
|
|
||||||
export const ConnectWallet = ({
|
export const ConnectWallet = ({
|
||||||
@@ -21,6 +26,7 @@ export const ConnectWallet = ({
|
|||||||
theme,
|
theme,
|
||||||
buttonTitle,
|
buttonTitle,
|
||||||
modalTitle,
|
modalTitle,
|
||||||
|
extraRows,
|
||||||
}: ConnectWalletProps) => {
|
}: ConnectWalletProps) => {
|
||||||
const fadeAnim = useRef(new Animated.Value(0)).current;
|
const fadeAnim = useRef(new Animated.Value(0)).current;
|
||||||
const address = useAddress();
|
const address = useAddress();
|
||||||
@@ -40,6 +46,7 @@ export const ConnectWallet = ({
|
|||||||
<WalletDetailsButton
|
<WalletDetailsButton
|
||||||
address={address}
|
address={address}
|
||||||
detailsButton={detailsButton}
|
detailsButton={detailsButton}
|
||||||
|
extraRows={extraRows}
|
||||||
/>
|
/>
|
||||||
) : (
|
) : (
|
||||||
<ConnectWalletButton
|
<ConnectWalletButton
|
||||||
|
|||||||
+73
-43
@@ -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 Box from "../base/Box";
|
||||||
import { Toast } from "../base/Toast";
|
import { Toast } from "../base/Toast";
|
||||||
import { ExportLocalWalletModal } from "./ExportLocalWalletModal";
|
import { ExportLocalWalletModal } from "./ExportLocalWalletModal";
|
||||||
import { NetworkButton } from "../base/NetworkButton";
|
import { NetworkButton } from "../base/NetworkButton";
|
||||||
import { WalletDetailsModalHeader } from "./WalletDetailsModalHeader";
|
import { WalletDetailsModalHeader } from "./WalletDetailsModalHeader";
|
||||||
import {
|
import {
|
||||||
useActiveChain,
|
useChain,
|
||||||
useDisconnect,
|
useDisconnect,
|
||||||
useSetConnectedWallet,
|
useSetConnectedWallet,
|
||||||
useWallet,
|
useWallet,
|
||||||
@@ -18,24 +18,34 @@ import { useSmartWallet } from "../../providers/context-provider";
|
|||||||
import BaseButton from "../base/BaseButton";
|
import BaseButton from "../base/BaseButton";
|
||||||
import { SmartWalletAdditionalActions } from "./SmartWalletAdditionalActions";
|
import { SmartWalletAdditionalActions } from "./SmartWalletAdditionalActions";
|
||||||
import Text from "../base/Text";
|
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 { useAppTheme } from "../../styles/hooks";
|
||||||
import { LocalWalletImportModal } from "../ConnectWalletFlow/LocalWalletImportModal";
|
import { LocalWalletImportModal } from "../ConnectWalletFlow/LocalWalletImportModal";
|
||||||
import { IconTextButton } from "../base/IconTextButton";
|
import { IconTextButton } from "../base/IconTextButton";
|
||||||
import MoneyIcon from "../../assets/money";
|
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 theme = useAppTheme();
|
||||||
const [isExportModalVisible, setIsExportModalVisible] = useState(false);
|
const [isExportModalVisible, setIsExportModalVisible] = useState(false);
|
||||||
const activeWallet = useWallet();
|
const activeWallet = useWallet();
|
||||||
const chain = useActiveChain();
|
const chain = useChain();
|
||||||
const disconnect = useDisconnect();
|
const disconnect = useDisconnect();
|
||||||
const [smartWallet, setSmartWallet] = useSmartWallet();
|
const [smartWallet, setSmartWallet] = useSmartWallet();
|
||||||
const [addressCopied, setAddressCopied] = useState(false);
|
const [addressCopied, setAddressCopied] = useState(false);
|
||||||
const [isImportModalVisible, setIsImportModalVisible] = useState(false);
|
const [isImportModalVisible, setIsImportModalVisible] = useState(false);
|
||||||
const { modalState, setModalState } = useModalState();
|
|
||||||
const { address } = (modalState as WalletDetailsModal).data;
|
|
||||||
const setConnectedWallet = useSetConnectedWallet();
|
const setConnectedWallet = useSetConnectedWallet();
|
||||||
|
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
@@ -50,8 +60,8 @@ export const ConnectWalletDetailsModal = () => {
|
|||||||
|
|
||||||
const onDisconnectPress = () => {
|
const onDisconnectPress = () => {
|
||||||
disconnect().finally(() => {
|
disconnect().finally(() => {
|
||||||
setModalState(CLOSE_MODAL_STATE("ConnectWalletDetailsModal"));
|
|
||||||
setSmartWallet?.(undefined);
|
setSmartWallet?.(undefined);
|
||||||
|
onClosePress();
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -176,45 +186,65 @@ export const ConnectWalletDetailsModal = () => {
|
|||||||
]);
|
]);
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<Box>
|
<TWModal isVisible={isVisible} onBackdropPress={onClosePress}>
|
||||||
<ExportLocalWalletModal
|
<View
|
||||||
isVisible={isExportModalVisible}
|
style={[styles.modal, { backgroundColor: theme.colors.background }]}
|
||||||
onClose={onExportModalClose}
|
>
|
||||||
/>
|
<Box style={styles.contentContainer}>
|
||||||
<WalletDetailsModalHeader
|
<ExportLocalWalletModal
|
||||||
address={address}
|
isVisible={isExportModalVisible}
|
||||||
onDisconnectPress={onDisconnectPress}
|
onClose={onExportModalClose}
|
||||||
onAddressCopied={onAddressCopied}
|
/>
|
||||||
/>
|
<WalletDetailsModalHeader
|
||||||
<View style={styles.currentNetwork}>
|
address={address}
|
||||||
<Text variant="bodySmallSecondary">Current Network</Text>
|
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>
|
</View>
|
||||||
<NetworkButton
|
</TWModal>
|
||||||
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>
|
|
||||||
);
|
);
|
||||||
};
|
};
|
||||||
|
|
||||||
const styles = StyleSheet.create({
|
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: {
|
exportWalletInfo: {
|
||||||
flex: 1,
|
flex: 1,
|
||||||
justifyContent: "flex-start",
|
justifyContent: "flex-start",
|
||||||
|
|||||||
+22
-12
@@ -6,37 +6,47 @@ import { WalletIcon } from "../base/WalletIcon";
|
|||||||
import { useWallet, useBalance, useChain } from "@thirdweb-dev/react-core";
|
import { useWallet, useBalance, useChain } from "@thirdweb-dev/react-core";
|
||||||
import { StyleSheet } from "react-native";
|
import { StyleSheet } from "react-native";
|
||||||
import { LocalWallet } from "@thirdweb-dev/wallets";
|
import { LocalWallet } from "@thirdweb-dev/wallets";
|
||||||
import { useModalState } from "../../providers/ui-context-provider";
|
|
||||||
import Box from "../base/Box";
|
import Box from "../base/Box";
|
||||||
|
import { ConnectWalletDetailsModal } from "./ConnectWalletDetailsModal";
|
||||||
|
import { useState } from "react";
|
||||||
|
|
||||||
export type ConnectWalletDetailsProps = {
|
export type ConnectWalletDetailsProps = {
|
||||||
address: string;
|
address?: string;
|
||||||
detailsButton?: React.FC<{ onPress: () => void }>;
|
detailsButton?: React.FC<{ onPress: () => void }>;
|
||||||
|
extraRows?: React.FC;
|
||||||
};
|
};
|
||||||
|
|
||||||
export const WalletDetailsButton = ({
|
export const WalletDetailsButton = ({
|
||||||
address,
|
address,
|
||||||
detailsButton,
|
detailsButton,
|
||||||
|
extraRows,
|
||||||
}: ConnectWalletDetailsProps) => {
|
}: ConnectWalletDetailsProps) => {
|
||||||
const activeWallet = useWallet();
|
const activeWallet = useWallet();
|
||||||
const chain = useChain();
|
const chain = useChain();
|
||||||
const balanceQuery = useBalance();
|
const balanceQuery = useBalance();
|
||||||
const { setModalState } = useModalState();
|
const [isModalVisible, setIsModalVisible] = useState(false);
|
||||||
|
|
||||||
const onPress = () => {
|
const onPress = () => {
|
||||||
setModalState({
|
// setModalState({
|
||||||
view: "WalletDetails",
|
// view: "WalletDetails",
|
||||||
data: {
|
// data: {
|
||||||
address: address,
|
// address: address,
|
||||||
},
|
// },
|
||||||
isOpen: true,
|
// isOpen: true,
|
||||||
isSheet: true,
|
// isSheet: true,
|
||||||
caller: "ConnectWalletDetails",
|
// caller: "ConnectWalletDetails",
|
||||||
});
|
// });
|
||||||
|
setIsModalVisible(!isModalVisible);
|
||||||
};
|
};
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<>
|
<>
|
||||||
|
<ConnectWalletDetailsModal
|
||||||
|
isVisible={isModalVisible}
|
||||||
|
onClosePress={onPress}
|
||||||
|
extraRows={extraRows}
|
||||||
|
address={address}
|
||||||
|
/>
|
||||||
{detailsButton ? (
|
{detailsButton ? (
|
||||||
detailsButton({ onPress })
|
detailsButton({ onPress })
|
||||||
) : (
|
) : (
|
||||||
|
|||||||
+4
-1
@@ -12,7 +12,7 @@ import CopyIcon from "../../assets/copy";
|
|||||||
import { useState } from "react";
|
import { useState } from "react";
|
||||||
|
|
||||||
interface WalletDetailsModalHeaderProps {
|
interface WalletDetailsModalHeaderProps {
|
||||||
address: string;
|
address?: string;
|
||||||
onDisconnectPress: () => void;
|
onDisconnectPress: () => void;
|
||||||
onAddressCopied?: () => void;
|
onAddressCopied?: () => void;
|
||||||
loading?: boolean;
|
loading?: boolean;
|
||||||
@@ -29,6 +29,9 @@ export const WalletDetailsModalHeader = ({
|
|||||||
const [showLoading, setShowLoading] = useState(false);
|
const [showLoading, setShowLoading] = useState(false);
|
||||||
|
|
||||||
const onAddressPress = async () => {
|
const onAddressPress = async () => {
|
||||||
|
if (!address) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
await Clipboard.setStringAsync(address);
|
await Clipboard.setStringAsync(address);
|
||||||
onAddressCopied?.();
|
onAddressCopied?.();
|
||||||
};
|
};
|
||||||
|
|||||||
+41
-27
@@ -16,6 +16,7 @@ import * as FileSystem from "expo-file-system";
|
|||||||
import { TWModal } from "../base/modal/TWModal";
|
import { TWModal } from "../base/modal/TWModal";
|
||||||
import { localWallet } from "../../wallets/wallets/local-wallet";
|
import { localWallet } from "../../wallets/wallets/local-wallet";
|
||||||
import { TextInput } from "../base";
|
import { TextInput } from "../base";
|
||||||
|
import { useAppTheme } from "../../styles/hooks";
|
||||||
|
|
||||||
export type LocalWalletImportModalProps = {
|
export type LocalWalletImportModalProps = {
|
||||||
isVisible: boolean;
|
isVisible: boolean;
|
||||||
@@ -29,11 +30,14 @@ export const LocalWalletImportModal = ({
|
|||||||
onWalletImported,
|
onWalletImported,
|
||||||
}: LocalWalletImportModalProps) => {
|
}: LocalWalletImportModalProps) => {
|
||||||
const [password, setPassword] = useState<string | undefined>();
|
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 [jsonFile, setJsonFile] = useState<string | undefined>();
|
||||||
const [error, setError] = useState<string | undefined>();
|
const [error, setError] = useState<string | undefined>();
|
||||||
const [isImporting, setIsImporting] = useState<boolean>(false);
|
const [isImporting, setIsImporting] = useState<boolean>(false);
|
||||||
const createWalletInstance = useCreateWalletInstance();
|
const createWalletInstance = useCreateWalletInstance();
|
||||||
|
const theme = useAppTheme();
|
||||||
|
|
||||||
const createLocalWalletFromJsonFile = async () => {
|
const createLocalWalletFromJsonFile = async () => {
|
||||||
if (!jsonFile || !password) {
|
if (!jsonFile || !password) {
|
||||||
@@ -65,17 +69,24 @@ export const LocalWalletImportModal = ({
|
|||||||
};
|
};
|
||||||
|
|
||||||
const createLocalWalletPK = async () => {
|
const createLocalWalletPK = async () => {
|
||||||
if (!privateKey) {
|
if (!privateKeyOrMnemonic) {
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
const localWalletInstance = createWalletInstance(localWallet());
|
const localWalletInstance = createWalletInstance(localWallet());
|
||||||
|
|
||||||
try {
|
try {
|
||||||
await localWalletInstance.import({
|
if (privateKeyOrMnemonic.indexOf(" ") === -1) {
|
||||||
privateKey: privateKey,
|
await localWalletInstance.import({
|
||||||
encryption: false,
|
privateKey: privateKeyOrMnemonic,
|
||||||
});
|
encryption: false,
|
||||||
|
});
|
||||||
|
} else {
|
||||||
|
await localWalletInstance.import({
|
||||||
|
mnemonic: privateKeyOrMnemonic,
|
||||||
|
encryption: false,
|
||||||
|
});
|
||||||
|
}
|
||||||
} catch (err) {
|
} catch (err) {
|
||||||
console.error("Error importing the wallet", err);
|
console.error("Error importing the wallet", err);
|
||||||
return null;
|
return null;
|
||||||
@@ -88,27 +99,29 @@ export const LocalWalletImportModal = ({
|
|||||||
setError(undefined);
|
setError(undefined);
|
||||||
setIsImporting(true);
|
setIsImporting(true);
|
||||||
|
|
||||||
let localWalletInstance = await createLocalWalletFromJsonFile();
|
setTimeout(async () => {
|
||||||
|
let localWalletInstance = await createLocalWalletFromJsonFile();
|
||||||
|
|
||||||
if (!localWalletInstance) {
|
if (!localWalletInstance) {
|
||||||
localWalletInstance = await createLocalWalletPK();
|
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);
|
setIsImporting(false);
|
||||||
return;
|
onCloseInternal();
|
||||||
}
|
}, 0);
|
||||||
|
|
||||||
localWalletInstance.save({
|
|
||||||
strategy: "privateKey",
|
|
||||||
encryption: false,
|
|
||||||
});
|
|
||||||
|
|
||||||
onWalletImported(localWalletInstance);
|
|
||||||
|
|
||||||
setIsImporting(false);
|
|
||||||
onCloseInternal();
|
|
||||||
};
|
};
|
||||||
|
|
||||||
const onCloseInternal = () => {
|
const onCloseInternal = () => {
|
||||||
@@ -139,7 +152,7 @@ export const LocalWalletImportModal = ({
|
|||||||
};
|
};
|
||||||
|
|
||||||
const onPrivateKeyEntered = (text: string) => {
|
const onPrivateKeyEntered = (text: string) => {
|
||||||
setPrivateKey(text);
|
setPrivateKeyOrMnemonic(text);
|
||||||
};
|
};
|
||||||
|
|
||||||
return (
|
return (
|
||||||
@@ -180,11 +193,12 @@ export const LocalWalletImportModal = ({
|
|||||||
{error}
|
{error}
|
||||||
</Text>
|
</Text>
|
||||||
<Text variant="bodySmall" m="xs" textAlign="center">
|
<Text variant="bodySmall" m="xs" textAlign="center">
|
||||||
---- Or enter a private key ----
|
---- Or Private key or Mnemonic ----
|
||||||
</Text>
|
</Text>
|
||||||
<TextInput
|
<TextInput
|
||||||
secureTextEntry={true}
|
secureTextEntry={true}
|
||||||
placeholder={"Private key"}
|
placeholder={"Private key / Mnemonic"}
|
||||||
|
placeholderTextColor={theme.colors.textSecondary}
|
||||||
onChangeText={onPrivateKeyEntered}
|
onChangeText={onPrivateKeyEntered}
|
||||||
/>
|
/>
|
||||||
<Box
|
<Box
|
||||||
|
|||||||
@@ -2,7 +2,6 @@ import { useModalState } from "../providers/ui-context-provider";
|
|||||||
import { ConnectWalletFlow } from "./ConnectWalletFlow/ConnectWalletFlow";
|
import { ConnectWalletFlow } from "./ConnectWalletFlow/ConnectWalletFlow";
|
||||||
import { Dimensions, StyleSheet, View } from "react-native";
|
import { Dimensions, StyleSheet, View } from "react-native";
|
||||||
import { useMemo } from "react";
|
import { useMemo } from "react";
|
||||||
import { ConnectWalletDetailsModal } from "./ConnectWalletDetails/ConnectWalletDetailsModal";
|
|
||||||
import { CLOSE_MODAL_STATE } from "../utils/modalTypes";
|
import { CLOSE_MODAL_STATE } from "../utils/modalTypes";
|
||||||
import { ThemeProvider } from "../styles/ThemeProvider";
|
import { ThemeProvider } from "../styles/ThemeProvider";
|
||||||
import { useAppTheme } from "../styles/hooks";
|
import { useAppTheme } from "../styles/hooks";
|
||||||
@@ -24,8 +23,8 @@ export const MainModal = () => {
|
|||||||
switch (modalState?.view) {
|
switch (modalState?.view) {
|
||||||
case "ConnectWalletFlow":
|
case "ConnectWalletFlow":
|
||||||
return <ConnectWalletFlow />;
|
return <ConnectWalletFlow />;
|
||||||
case "WalletDetails":
|
// case "WalletDetails":
|
||||||
return <ConnectWalletDetailsModal />;
|
// return <ConnectWalletDetailsModal />;
|
||||||
case "WalletConnectSessionRequestModal":
|
case "WalletConnectSessionRequestModal":
|
||||||
return <SessionRequestModal />;
|
return <SessionRequestModal />;
|
||||||
case "WalletConnectSessionProposalModal":
|
case "WalletConnectSessionProposalModal":
|
||||||
|
|||||||
@@ -23,7 +23,7 @@ export const IconTextButton = ({
|
|||||||
}: IconTextProps) => {
|
}: IconTextProps) => {
|
||||||
return (
|
return (
|
||||||
<BaseButton
|
<BaseButton
|
||||||
p={p || "md"}
|
p={p || "sm"}
|
||||||
backgroundColor="background"
|
backgroundColor="background"
|
||||||
style={styles.networkContainer}
|
style={styles.networkContainer}
|
||||||
onPress={onPress}
|
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 { Image } from "react-native";
|
||||||
import { SvgUri } from "react-native-svg";
|
import { SvgUri } from "react-native-svg";
|
||||||
|
|
||||||
@@ -13,21 +14,35 @@ const ImageSvgUri = ({
|
|||||||
height: number;
|
height: number;
|
||||||
imageAlt?: string;
|
imageAlt?: string;
|
||||||
}) => {
|
}) => {
|
||||||
const isSvg = imageUrl.toLowerCase().endsWith(".svg");
|
const storage = useStorage();
|
||||||
const resolvedImageUrl = resolveIpfsUri(imageUrl) || "";
|
const resolvedImageUrl = storage
|
||||||
|
? storage.resolveScheme(imageUrl)
|
||||||
|
: imageUrl.replace("ipfs://", "https://ipfs.io/ipfs/");
|
||||||
|
|
||||||
|
const [error, setError] = useState(false);
|
||||||
|
|
||||||
if (!resolvedImageUrl || resolvedImageUrl === "") {
|
if (!resolvedImageUrl || resolvedImageUrl === "") {
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (isSvg) {
|
if (error) {
|
||||||
return <SvgUri width={width} height={height} uri={resolvedImageUrl} />;
|
return (
|
||||||
|
<SvgUri
|
||||||
|
width={width}
|
||||||
|
height={height}
|
||||||
|
uri={resolvedImageUrl}
|
||||||
|
onError={() => setError(true)}
|
||||||
|
/>
|
||||||
|
);
|
||||||
} else {
|
} else {
|
||||||
|
// always try to render Image first, if error then try to render svg
|
||||||
|
// Image from RN handles onError better than SvgUri
|
||||||
return (
|
return (
|
||||||
<Image
|
<Image
|
||||||
alt={imageAlt}
|
alt={imageAlt}
|
||||||
source={{ uri: resolvedImageUrl }}
|
source={{ uri: resolvedImageUrl }}
|
||||||
style={[{ width: width, height: height }]}
|
style={[{ width: width, height: height }]}
|
||||||
|
onError={() => setError(true)}
|
||||||
/>
|
/>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,21 +1,37 @@
|
|||||||
import Box from "./Box";
|
import Box from "./Box";
|
||||||
import Text from "./Text";
|
import Text from "./Text";
|
||||||
|
import { StyleSheet } from "react-native";
|
||||||
|
|
||||||
type LabelProps = {
|
type LabelProps = {
|
||||||
text: string;
|
text: string;
|
||||||
};
|
} & (typeof Text)["arguments"];
|
||||||
export const Label = ({ text }: LabelProps) => {
|
|
||||||
|
export const Label = ({ text, ...props }: LabelProps) => {
|
||||||
return (
|
return (
|
||||||
<Box
|
<Box
|
||||||
justifyContent="center"
|
justifyContent="center"
|
||||||
flexDirection="row"
|
flexDirection="row"
|
||||||
alignItems="center"
|
alignItems="center"
|
||||||
paddingVertical="xxs"
|
borderRadius="md"
|
||||||
paddingHorizontal="xs"
|
|
||||||
borderRadius="lg"
|
|
||||||
backgroundColor="labelBackground"
|
backgroundColor="labelBackground"
|
||||||
>
|
>
|
||||||
<Text variant="bodyLarge">{text}</Text>
|
<Text
|
||||||
|
variant="bodySmall"
|
||||||
|
style={{
|
||||||
|
...style.text,
|
||||||
|
...props,
|
||||||
|
}}
|
||||||
|
>
|
||||||
|
{text}
|
||||||
|
</Text>
|
||||||
</Box>
|
</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 { Theme, darkTheme, lightTheme } from "../styles/theme";
|
||||||
import { useAppTheme } from "../styles/hooks";
|
import { useAppTheme } from "../styles/hooks";
|
||||||
import { useTheme } from "@shopify/restyle";
|
import { useTheme } from "@shopify/restyle";
|
||||||
|
import { PropsWithChildren } from "react";
|
||||||
|
|
||||||
type UIContextType = {
|
type UIContextType = {
|
||||||
modalState: ModalState;
|
modalState: ModalState;
|
||||||
@@ -25,7 +26,7 @@ const UIContext = createContext<UIContextType>({
|
|||||||
setTheme: () => {},
|
setTheme: () => {},
|
||||||
});
|
});
|
||||||
|
|
||||||
export const UIContextProvider = (props: React.PropsWithChildren<{}>) => {
|
export const UIContextProvider = (props: PropsWithChildren<{}>) => {
|
||||||
const [modalState, setModalState] = useState<ModalState>({
|
const [modalState, setModalState] = useState<ModalState>({
|
||||||
view: "Closed",
|
view: "Closed",
|
||||||
data: {},
|
data: {},
|
||||||
|
|||||||
@@ -9,7 +9,7 @@ export class RainbowWallet extends WalletConnectV2 {
|
|||||||
static meta = {
|
static meta = {
|
||||||
name: "Rainbow",
|
name: "Rainbow",
|
||||||
iconURL:
|
iconURL:
|
||||||
"https://registry.walletconnect.org/v2/logo/md/7a33d7f1-3d12-4b5c-f3ee-5cd83cb1b500",
|
"ipfs://QmSZn47p4DVVBfzvg9BAX2EqwnPxkT1YAE7rUnrtd9CybQ/rainbow-logo.png",
|
||||||
links: {
|
links: {
|
||||||
native: "rainbow:",
|
native: "rainbow:",
|
||||||
universal: "https://rnbwapp.com",
|
universal: "https://rnbwapp.com",
|
||||||
|
|||||||
@@ -7,7 +7,7 @@ export class TrustWallet extends WalletConnectV2 {
|
|||||||
static meta = {
|
static meta = {
|
||||||
name: "Trust Wallet",
|
name: "Trust Wallet",
|
||||||
iconURL:
|
iconURL:
|
||||||
"https://registry.walletconnect.org/v2/logo/md/0528ee7e-16d1-4089-21e3-bbfb41933100",
|
"ipfs://QmNigQbXk7wKZwDcgN38Znj1ZZQ3JEG3DD6fUKLBU8SUTP/trust%20wallet.svg",
|
||||||
links: {
|
links: {
|
||||||
native: "trust:",
|
native: "trust:",
|
||||||
universal: "https://link.trustwallet.com",
|
universal: "https://link.trustwallet.com",
|
||||||
|
|||||||
@@ -1,5 +1,54 @@
|
|||||||
# @thirdweb-dev/react
|
# @thirdweb-dev/react
|
||||||
|
|
||||||
|
## 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
|
## 3.14.8
|
||||||
|
|
||||||
### Patch Changes
|
### Patch Changes
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "@thirdweb-dev/react",
|
"name": "@thirdweb-dev/react",
|
||||||
"version": "3.14.8",
|
"version": "3.14.12",
|
||||||
"repository": "https://github.com/thirdweb-dev/js/tree/main/packages/react",
|
"repository": "https://github.com/thirdweb-dev/js/tree/main/packages/react",
|
||||||
"author": "thirdweb eng <[email protected]>",
|
"author": "thirdweb eng <[email protected]>",
|
||||||
"license": "Apache-2.0",
|
"license": "Apache-2.0",
|
||||||
|
|||||||
@@ -1,11 +1,10 @@
|
|||||||
import type { Theme } from "../design-system";
|
import type { Theme } from "../design-system";
|
||||||
import styled from "@emotion/styled";
|
import styled from "@emotion/styled";
|
||||||
import { Chain } from "@thirdweb-dev/chains";
|
import { Chain } from "@thirdweb-dev/chains";
|
||||||
import { resolveIpfsUri } from "@thirdweb-dev/react-core";
|
import { useStorage } from "@thirdweb-dev/react-core";
|
||||||
|
|
||||||
const defaultChainIcon = /* @__PURE__ */ resolveIpfsUri(
|
const defaultChainIcon =
|
||||||
"ipfs://QmcxZHpyJa8T4i63xqjPYrZ6tKrt55tZJpbXcjSDKuKaf9/ethereum/512.png",
|
"ipfs://QmcxZHpyJa8T4i63xqjPYrZ6tKrt55tZJpbXcjSDKuKaf9/ethereum/512.png";
|
||||||
);
|
|
||||||
|
|
||||||
export const ChainIcon: React.FC<{
|
export const ChainIcon: React.FC<{
|
||||||
chain?: Chain;
|
chain?: Chain;
|
||||||
@@ -14,8 +13,12 @@ export const ChainIcon: React.FC<{
|
|||||||
className?: string;
|
className?: string;
|
||||||
loading?: "lazy" | "eager";
|
loading?: "lazy" | "eager";
|
||||||
}> = (props) => {
|
}> = (props) => {
|
||||||
const url = props.chain?.icon?.url;
|
const url = props.chain?.icon?.url || defaultChainIcon;
|
||||||
const src = url ? resolveIpfsUri(url) : defaultChainIcon;
|
const storage = useStorage();
|
||||||
|
|
||||||
|
const src = storage
|
||||||
|
? storage.resolveScheme(url)
|
||||||
|
: url.replace("ipfs://", "https://ipfs.io/ipfs/");
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<div
|
<div
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
import { resolveIpfsUri } from "@thirdweb-dev/react-core";
|
import { useStorage } from "@thirdweb-dev/react-core";
|
||||||
|
|
||||||
export const Img: React.FC<{
|
export const Img: React.FC<{
|
||||||
width: string;
|
width: string;
|
||||||
@@ -8,11 +8,16 @@ export const Img: React.FC<{
|
|||||||
loading?: "eager" | "lazy";
|
loading?: "eager" | "lazy";
|
||||||
className?: string;
|
className?: string;
|
||||||
}> = (props) => {
|
}> = (props) => {
|
||||||
|
const storage = useStorage();
|
||||||
return (
|
return (
|
||||||
<img
|
<img
|
||||||
width={props.width}
|
width={props.width}
|
||||||
height={props.height}
|
height={props.height}
|
||||||
src={resolveIpfsUri(props.src)}
|
src={
|
||||||
|
storage
|
||||||
|
? storage.resolveScheme(props.src)
|
||||||
|
: props.src.replace("ipfs://", "https://ipfs.io/ipfs/")
|
||||||
|
}
|
||||||
alt={props.alt || ""}
|
alt={props.alt || ""}
|
||||||
loading={props.loading}
|
loading={props.loading}
|
||||||
decoding="async"
|
decoding="async"
|
||||||
|
|||||||
@@ -7,11 +7,7 @@ import {
|
|||||||
CarbonPlayFilledAlt,
|
CarbonPlayFilledAlt,
|
||||||
} from "./Icons";
|
} from "./Icons";
|
||||||
import { useQuery } from "@tanstack/react-query";
|
import { useQuery } from "@tanstack/react-query";
|
||||||
import {
|
import { resolveMimeType, useStorage } from "@thirdweb-dev/react-core";
|
||||||
resolveIpfsUri,
|
|
||||||
resolveMimeType,
|
|
||||||
useStorage,
|
|
||||||
} from "@thirdweb-dev/react-core";
|
|
||||||
import React, {
|
import React, {
|
||||||
useEffect,
|
useEffect,
|
||||||
useMemo,
|
useMemo,
|
||||||
@@ -547,18 +543,19 @@ export function useResolvedMediaType(
|
|||||||
) {
|
) {
|
||||||
const storage = useStorage();
|
const storage = useStorage();
|
||||||
|
|
||||||
const resolvedUrl = useMemo(
|
const resolvedUrl = useMemo(() => {
|
||||||
() =>
|
if (!uri) {
|
||||||
resolveIpfsUri(
|
return "";
|
||||||
uri,
|
}
|
||||||
gatewayUrl
|
if (gatewayUrl) {
|
||||||
? { gatewayUrl }
|
return uri.replace("ipfs://", gatewayUrl);
|
||||||
: storage
|
}
|
||||||
? { gatewayUrl: storage.gatewayUrls["ipfs://"][0] }
|
if (storage) {
|
||||||
: undefined,
|
return storage.resolveScheme(uri);
|
||||||
),
|
}
|
||||||
[uri, storage, gatewayUrl],
|
return uri.replace("ipfs://", "https://ipfs.io/ipfs/");
|
||||||
);
|
}, [uri, storage, gatewayUrl]);
|
||||||
|
|
||||||
const resolvedMimType = useQuery(
|
const resolvedMimType = useQuery(
|
||||||
["mime-type", resolvedUrl],
|
["mime-type", resolvedUrl],
|
||||||
() => resolveMimeType(resolvedUrl),
|
() => resolveMimeType(resolvedUrl),
|
||||||
|
|||||||
@@ -304,7 +304,8 @@ export const ConnectedWalletDetails: React.FC<{
|
|||||||
{activeWalletConfig &&
|
{activeWalletConfig &&
|
||||||
activeWalletConfig.id === walletIds.metamask &&
|
activeWalletConfig.id === walletIds.metamask &&
|
||||||
activeWalletConfig.isInstalled &&
|
activeWalletConfig.isInstalled &&
|
||||||
activeWalletConfig.isInstalled() && (
|
activeWalletConfig.isInstalled() &&
|
||||||
|
!isMobile() && (
|
||||||
<MenuButton
|
<MenuButton
|
||||||
type="button"
|
type="button"
|
||||||
onClick={() => {
|
onClick={() => {
|
||||||
|
|||||||
@@ -16,10 +16,11 @@ export const ConnectingScreen: React.FC<{
|
|||||||
walletIconURL: string;
|
walletIconURL: string;
|
||||||
walletName: string;
|
walletName: string;
|
||||||
supportLink: string;
|
supportLink: string;
|
||||||
|
hideBackButton: boolean;
|
||||||
}> = (props) => {
|
}> = (props) => {
|
||||||
return (
|
return (
|
||||||
<>
|
<>
|
||||||
<BackButton onClick={props.onBack} />
|
{!props.hideBackButton && <BackButton onClick={props.onBack} />}
|
||||||
<IconContainer>
|
<IconContainer>
|
||||||
<Img
|
<Img
|
||||||
src={props.walletIconURL}
|
src={props.walletIconURL}
|
||||||
|
|||||||
@@ -17,7 +17,7 @@ export const ScanScreen: React.FC<{
|
|||||||
qrCodeUri?: string;
|
qrCodeUri?: string;
|
||||||
walletName: string;
|
walletName: string;
|
||||||
walletIconURL: string;
|
walletIconURL: string;
|
||||||
hideBackButton?: boolean;
|
hideBackButton: boolean;
|
||||||
}> = (props) => {
|
}> = (props) => {
|
||||||
const walletName = props.walletName.toLowerCase().includes("wallet")
|
const walletName = props.walletName.toLowerCase().includes("wallet")
|
||||||
? props.walletName
|
? props.walletName
|
||||||
|
|||||||
@@ -18,6 +18,8 @@ export const CoinbaseConnectUI = ({
|
|||||||
"connecting" | "loading" | "scanning" | "get-started"
|
"connecting" | "loading" | "scanning" | "get-started"
|
||||||
>("loading");
|
>("loading");
|
||||||
|
|
||||||
|
const hideBackButton = supportedWallets.length === 1;
|
||||||
|
|
||||||
const connectPrompted = useRef(false);
|
const connectPrompted = useRef(false);
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
if (screen !== "loading") {
|
if (screen !== "loading") {
|
||||||
@@ -61,6 +63,7 @@ export const CoinbaseConnectUI = ({
|
|||||||
if (screen === "connecting" || screen === "loading") {
|
if (screen === "connecting" || screen === "loading") {
|
||||||
return (
|
return (
|
||||||
<ConnectingScreen
|
<ConnectingScreen
|
||||||
|
hideBackButton={hideBackButton}
|
||||||
onBack={goBack}
|
onBack={goBack}
|
||||||
walletName={meta.name}
|
walletName={meta.name}
|
||||||
walletIconURL={meta.iconURL}
|
walletIconURL={meta.iconURL}
|
||||||
@@ -77,7 +80,9 @@ export const CoinbaseConnectUI = ({
|
|||||||
chromeExtensionLink={meta.urls?.chrome}
|
chromeExtensionLink={meta.urls?.chrome}
|
||||||
googlePlayStoreLink={meta.urls?.android}
|
googlePlayStoreLink={meta.urls?.android}
|
||||||
appleStoreLink={meta.urls?.ios}
|
appleStoreLink={meta.urls?.ios}
|
||||||
onBack={goBack}
|
onBack={() => {
|
||||||
|
setScreen("scanning");
|
||||||
|
}}
|
||||||
/>
|
/>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
@@ -89,7 +94,7 @@ export const CoinbaseConnectUI = ({
|
|||||||
onConnected={close}
|
onConnected={close}
|
||||||
onGetStarted={() => setScreen("get-started")}
|
onGetStarted={() => setScreen("get-started")}
|
||||||
walletConfig={walletConfig}
|
walletConfig={walletConfig}
|
||||||
hideBackButton={supportedWallets.length === 1}
|
hideBackButton={hideBackButton}
|
||||||
/>
|
/>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -12,7 +12,7 @@ export const CoinbaseScan: React.FC<{
|
|||||||
onGetStarted: () => void;
|
onGetStarted: () => void;
|
||||||
onConnected: () => void;
|
onConnected: () => void;
|
||||||
walletConfig: WalletConfig<CoinbaseWallet>;
|
walletConfig: WalletConfig<CoinbaseWallet>;
|
||||||
hideBackButton?: boolean;
|
hideBackButton: boolean;
|
||||||
}> = ({ walletConfig, onConnected, onGetStarted, onBack, hideBackButton }) => {
|
}> = ({ walletConfig, onConnected, onGetStarted, onBack, hideBackButton }) => {
|
||||||
const createInstance = useCreateWalletInstance();
|
const createInstance = useCreateWalletInstance();
|
||||||
const [qrCodeUri, setQrCodeUri] = useState<string | undefined>(undefined);
|
const [qrCodeUri, setQrCodeUri] = useState<string | undefined>(undefined);
|
||||||
|
|||||||
@@ -68,6 +68,7 @@ export const FrameConnectUI = (props: ConnectUIProps<FrameWallet>) => {
|
|||||||
const { walletConfig, close, goBack } = props;
|
const { walletConfig, close, goBack } = props;
|
||||||
const downloadLink = "https://frame.sh";
|
const downloadLink = "https://frame.sh";
|
||||||
const supportLink = "https://docs.frame.sh";
|
const supportLink = "https://docs.frame.sh";
|
||||||
|
const hideBackButton = props.supportedWallets.length === 1;
|
||||||
|
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
if (connectPrompted.current) {
|
if (connectPrompted.current) {
|
||||||
@@ -98,6 +99,7 @@ export const FrameConnectUI = (props: ConnectUIProps<FrameWallet>) => {
|
|||||||
if (screen === "connecting") {
|
if (screen === "connecting") {
|
||||||
return (
|
return (
|
||||||
<ConnectingScreen
|
<ConnectingScreen
|
||||||
|
hideBackButton={hideBackButton}
|
||||||
onBack={goBack}
|
onBack={goBack}
|
||||||
walletName={walletConfig.meta.name}
|
walletName={walletConfig.meta.name}
|
||||||
walletIconURL={walletConfig.meta.iconURL}
|
walletIconURL={walletConfig.meta.iconURL}
|
||||||
|
|||||||
@@ -13,6 +13,8 @@ export const MetamaskConnectUI = (props: ConnectUIProps<MetaMaskWallet>) => {
|
|||||||
const { walletConfig, close } = props;
|
const { walletConfig, close } = props;
|
||||||
const connect = useConnect();
|
const connect = useConnect();
|
||||||
|
|
||||||
|
const hideBackButton = props.supportedWallets.length === 1;
|
||||||
|
|
||||||
const { goBack } = props;
|
const { goBack } = props;
|
||||||
|
|
||||||
const connectPrompted = useRef(false);
|
const connectPrompted = useRef(false);
|
||||||
@@ -56,6 +58,7 @@ export const MetamaskConnectUI = (props: ConnectUIProps<MetaMaskWallet>) => {
|
|||||||
if (screen === "connecting") {
|
if (screen === "connecting") {
|
||||||
return (
|
return (
|
||||||
<ConnectingScreen
|
<ConnectingScreen
|
||||||
|
hideBackButton={hideBackButton}
|
||||||
onBack={props.goBack}
|
onBack={props.goBack}
|
||||||
walletName={walletConfig.meta.name}
|
walletName={walletConfig.meta.name}
|
||||||
walletIconURL={walletConfig.meta.iconURL}
|
walletIconURL={walletConfig.meta.iconURL}
|
||||||
@@ -72,7 +75,9 @@ export const MetamaskConnectUI = (props: ConnectUIProps<MetaMaskWallet>) => {
|
|||||||
chromeExtensionLink={walletConfig.meta.urls?.chrome}
|
chromeExtensionLink={walletConfig.meta.urls?.chrome}
|
||||||
googlePlayStoreLink={walletConfig.meta.urls?.android}
|
googlePlayStoreLink={walletConfig.meta.urls?.android}
|
||||||
appleStoreLink={walletConfig.meta.urls?.ios}
|
appleStoreLink={walletConfig.meta.urls?.ios}
|
||||||
onBack={props.goBack}
|
onBack={() => {
|
||||||
|
setScreen("scanning");
|
||||||
|
}}
|
||||||
/>
|
/>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
@@ -80,11 +85,12 @@ export const MetamaskConnectUI = (props: ConnectUIProps<MetaMaskWallet>) => {
|
|||||||
if (screen === "scanning") {
|
if (screen === "scanning") {
|
||||||
return (
|
return (
|
||||||
<MetamaskScan
|
<MetamaskScan
|
||||||
onBack={props.goBack}
|
onBack={goBack}
|
||||||
onConnected={close}
|
onConnected={close}
|
||||||
onGetStarted={() => {
|
onGetStarted={() => {
|
||||||
setScreen("get-started");
|
setScreen("get-started");
|
||||||
}}
|
}}
|
||||||
|
hideBackButton={hideBackButton}
|
||||||
walletConfig={walletConfig}
|
walletConfig={walletConfig}
|
||||||
/>
|
/>
|
||||||
);
|
);
|
||||||
|
|||||||
@@ -12,7 +12,8 @@ export const MetamaskScan: React.FC<{
|
|||||||
onGetStarted: () => void;
|
onGetStarted: () => void;
|
||||||
onConnected: () => void;
|
onConnected: () => void;
|
||||||
walletConfig: WalletConfig<MetaMaskWallet>;
|
walletConfig: WalletConfig<MetaMaskWallet>;
|
||||||
}> = ({ onBack, onConnected, onGetStarted, walletConfig }) => {
|
hideBackButton: boolean;
|
||||||
|
}> = ({ onBack, onConnected, onGetStarted, walletConfig, hideBackButton }) => {
|
||||||
const createInstance = useCreateWalletInstance();
|
const createInstance = useCreateWalletInstance();
|
||||||
const [qrCodeUri, setQrCodeUri] = useState<string | undefined>();
|
const [qrCodeUri, setQrCodeUri] = useState<string | undefined>();
|
||||||
const { setConnectedWallet, chainToConnect, setConnectionStatus } =
|
const { setConnectedWallet, chainToConnect, setConnectionStatus } =
|
||||||
@@ -54,6 +55,7 @@ export const MetamaskScan: React.FC<{
|
|||||||
qrCodeUri={qrCodeUri}
|
qrCodeUri={qrCodeUri}
|
||||||
walletName={walletConfig.meta.name}
|
walletName={walletConfig.meta.name}
|
||||||
walletIconURL={walletConfig.meta.iconURL}
|
walletIconURL={walletConfig.meta.iconURL}
|
||||||
|
hideBackButton={hideBackButton}
|
||||||
/>
|
/>
|
||||||
);
|
);
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -13,6 +13,8 @@ export const RainbowConnectUI = (props: ConnectUIProps<WalletConnect>) => {
|
|||||||
const { walletConfig, close } = props;
|
const { walletConfig, close } = props;
|
||||||
const connect = useConnect();
|
const connect = useConnect();
|
||||||
|
|
||||||
|
const hideBackButton = props.supportedWallets.length === 1;
|
||||||
|
|
||||||
const { goBack } = props;
|
const { goBack } = props;
|
||||||
|
|
||||||
const connectPrompted = useRef(false);
|
const connectPrompted = useRef(false);
|
||||||
@@ -36,6 +38,7 @@ export const RainbowConnectUI = (props: ConnectUIProps<WalletConnect>) => {
|
|||||||
if (screen === "connecting") {
|
if (screen === "connecting") {
|
||||||
return (
|
return (
|
||||||
<ConnectingScreen
|
<ConnectingScreen
|
||||||
|
hideBackButton={hideBackButton}
|
||||||
onBack={props.goBack}
|
onBack={props.goBack}
|
||||||
walletName={walletConfig.meta.name}
|
walletName={walletConfig.meta.name}
|
||||||
walletIconURL={walletConfig.meta.iconURL}
|
walletIconURL={walletConfig.meta.iconURL}
|
||||||
@@ -52,7 +55,9 @@ export const RainbowConnectUI = (props: ConnectUIProps<WalletConnect>) => {
|
|||||||
chromeExtensionLink={walletConfig.meta.urls?.chrome}
|
chromeExtensionLink={walletConfig.meta.urls?.chrome}
|
||||||
googlePlayStoreLink={walletConfig.meta.urls?.android}
|
googlePlayStoreLink={walletConfig.meta.urls?.android}
|
||||||
appleStoreLink={walletConfig.meta.urls?.ios}
|
appleStoreLink={walletConfig.meta.urls?.ios}
|
||||||
onBack={props.goBack}
|
onBack={() => {
|
||||||
|
setScreen("scanning");
|
||||||
|
}}
|
||||||
/>
|
/>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
@@ -65,6 +70,7 @@ export const RainbowConnectUI = (props: ConnectUIProps<WalletConnect>) => {
|
|||||||
onGetStarted={() => {
|
onGetStarted={() => {
|
||||||
setScreen("get-started");
|
setScreen("get-started");
|
||||||
}}
|
}}
|
||||||
|
hideBackButton={hideBackButton}
|
||||||
walletConfig={walletConfig}
|
walletConfig={walletConfig}
|
||||||
/>
|
/>
|
||||||
);
|
);
|
||||||
|
|||||||
@@ -12,7 +12,8 @@ export const RainbowScan: React.FC<{
|
|||||||
onGetStarted: () => void;
|
onGetStarted: () => void;
|
||||||
onConnected: () => void;
|
onConnected: () => void;
|
||||||
walletConfig: WalletConfig<WalletConnect>;
|
walletConfig: WalletConfig<WalletConnect>;
|
||||||
}> = ({ onBack, onConnected, onGetStarted, walletConfig }) => {
|
hideBackButton: boolean;
|
||||||
|
}> = ({ onBack, onConnected, onGetStarted, walletConfig, hideBackButton }) => {
|
||||||
const createInstance = useCreateWalletInstance();
|
const createInstance = useCreateWalletInstance();
|
||||||
const [qrCodeUri, setQrCodeUri] = useState<string | undefined>();
|
const [qrCodeUri, setQrCodeUri] = useState<string | undefined>();
|
||||||
const { setConnectedWallet, chainToConnect, setConnectionStatus } =
|
const { setConnectedWallet, chainToConnect, setConnectionStatus } =
|
||||||
@@ -54,6 +55,7 @@ export const RainbowScan: React.FC<{
|
|||||||
qrCodeUri={qrCodeUri}
|
qrCodeUri={qrCodeUri}
|
||||||
walletName={walletConfig.meta.name}
|
walletName={walletConfig.meta.name}
|
||||||
walletIconURL={walletConfig.meta.iconURL}
|
walletIconURL={walletConfig.meta.iconURL}
|
||||||
|
hideBackButton={hideBackButton}
|
||||||
/>
|
/>
|
||||||
);
|
);
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -21,6 +21,10 @@ export const rainbowWallet = (
|
|||||||
name: "Rainbow Wallet",
|
name: "Rainbow Wallet",
|
||||||
iconURL:
|
iconURL:
|
||||||
"ipfs://QmSZn47p4DVVBfzvg9BAX2EqwnPxkT1YAE7rUnrtd9CybQ/rainbow-logo.png",
|
"ipfs://QmSZn47p4DVVBfzvg9BAX2EqwnPxkT1YAE7rUnrtd9CybQ/rainbow-logo.png",
|
||||||
|
urls: {
|
||||||
|
android: "https://rnbwapp.com/e/Va41HWS6Oxb",
|
||||||
|
ios: "https://rnbwapp.com/e/OeMdmkJ6Oxb",
|
||||||
|
},
|
||||||
},
|
},
|
||||||
create: (walletOptions: WalletOptions) => {
|
create: (walletOptions: WalletOptions) => {
|
||||||
return new WalletConnect({
|
return new WalletConnect({
|
||||||
|
|||||||
@@ -12,6 +12,7 @@ export const TrustConnectUI = (props: ConnectUIProps<TrustWallet>) => {
|
|||||||
>("connecting");
|
>("connecting");
|
||||||
const { walletConfig, close } = props;
|
const { walletConfig, close } = props;
|
||||||
const connect = useConnect();
|
const connect = useConnect();
|
||||||
|
const hideBackButton = props.supportedWallets.length === 1;
|
||||||
|
|
||||||
const { goBack } = props;
|
const { goBack } = props;
|
||||||
|
|
||||||
@@ -54,6 +55,7 @@ export const TrustConnectUI = (props: ConnectUIProps<TrustWallet>) => {
|
|||||||
if (screen === "connecting") {
|
if (screen === "connecting") {
|
||||||
return (
|
return (
|
||||||
<ConnectingScreen
|
<ConnectingScreen
|
||||||
|
hideBackButton={hideBackButton}
|
||||||
onBack={props.goBack}
|
onBack={props.goBack}
|
||||||
walletName={walletConfig.meta.name}
|
walletName={walletConfig.meta.name}
|
||||||
walletIconURL={walletConfig.meta.iconURL}
|
walletIconURL={walletConfig.meta.iconURL}
|
||||||
@@ -70,7 +72,9 @@ export const TrustConnectUI = (props: ConnectUIProps<TrustWallet>) => {
|
|||||||
chromeExtensionLink={walletConfig.meta.urls?.chrome}
|
chromeExtensionLink={walletConfig.meta.urls?.chrome}
|
||||||
googlePlayStoreLink={walletConfig.meta.urls?.android}
|
googlePlayStoreLink={walletConfig.meta.urls?.android}
|
||||||
appleStoreLink={walletConfig.meta.urls?.ios}
|
appleStoreLink={walletConfig.meta.urls?.ios}
|
||||||
onBack={props.goBack}
|
onBack={() => {
|
||||||
|
setScreen("scanning");
|
||||||
|
}}
|
||||||
/>
|
/>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
@@ -78,6 +82,7 @@ export const TrustConnectUI = (props: ConnectUIProps<TrustWallet>) => {
|
|||||||
if (screen === "scanning") {
|
if (screen === "scanning") {
|
||||||
return (
|
return (
|
||||||
<TrustScan
|
<TrustScan
|
||||||
|
hideBackButton={hideBackButton}
|
||||||
onBack={props.goBack}
|
onBack={props.goBack}
|
||||||
onConnected={close}
|
onConnected={close}
|
||||||
onGetStarted={() => {
|
onGetStarted={() => {
|
||||||
|
|||||||
@@ -11,8 +11,9 @@ export const TrustScan: React.FC<{
|
|||||||
onBack: () => void;
|
onBack: () => void;
|
||||||
onGetStarted: () => void;
|
onGetStarted: () => void;
|
||||||
onConnected: () => void;
|
onConnected: () => void;
|
||||||
|
hideBackButton: boolean;
|
||||||
walletConfig: WalletConfig<TrustWallet>;
|
walletConfig: WalletConfig<TrustWallet>;
|
||||||
}> = ({ onBack, onConnected, onGetStarted, walletConfig }) => {
|
}> = ({ onBack, onConnected, onGetStarted, walletConfig, hideBackButton }) => {
|
||||||
const createInstance = useCreateWalletInstance();
|
const createInstance = useCreateWalletInstance();
|
||||||
const [qrCodeUri, setQrCodeUri] = useState<string | undefined>();
|
const [qrCodeUri, setQrCodeUri] = useState<string | undefined>();
|
||||||
const { setConnectedWallet, chainToConnect, setConnectionStatus } =
|
const { setConnectedWallet, chainToConnect, setConnectionStatus } =
|
||||||
@@ -54,6 +55,7 @@ export const TrustScan: React.FC<{
|
|||||||
qrCodeUri={qrCodeUri}
|
qrCodeUri={qrCodeUri}
|
||||||
walletName={walletConfig.meta.name}
|
walletName={walletConfig.meta.name}
|
||||||
walletIconURL={walletConfig.meta.iconURL}
|
walletIconURL={walletConfig.meta.iconURL}
|
||||||
|
hideBackButton={hideBackButton}
|
||||||
/>
|
/>
|
||||||
);
|
);
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -12,6 +12,7 @@ export const ZerionConnectUI = (props: ConnectUIProps<ZerionWallet>) => {
|
|||||||
>("connecting");
|
>("connecting");
|
||||||
const { walletConfig, close } = props;
|
const { walletConfig, close } = props;
|
||||||
const connect = useConnect();
|
const connect = useConnect();
|
||||||
|
const hideBackButton = props.supportedWallets.length === 1;
|
||||||
|
|
||||||
const { goBack } = props;
|
const { goBack } = props;
|
||||||
|
|
||||||
@@ -54,6 +55,7 @@ export const ZerionConnectUI = (props: ConnectUIProps<ZerionWallet>) => {
|
|||||||
if (screen === "connecting") {
|
if (screen === "connecting") {
|
||||||
return (
|
return (
|
||||||
<ConnectingScreen
|
<ConnectingScreen
|
||||||
|
hideBackButton={hideBackButton}
|
||||||
onBack={props.goBack}
|
onBack={props.goBack}
|
||||||
walletName={walletConfig.meta.name}
|
walletName={walletConfig.meta.name}
|
||||||
walletIconURL={walletConfig.meta.iconURL}
|
walletIconURL={walletConfig.meta.iconURL}
|
||||||
@@ -70,7 +72,9 @@ export const ZerionConnectUI = (props: ConnectUIProps<ZerionWallet>) => {
|
|||||||
chromeExtensionLink={walletConfig.meta.urls?.chrome}
|
chromeExtensionLink={walletConfig.meta.urls?.chrome}
|
||||||
googlePlayStoreLink={walletConfig.meta.urls?.android}
|
googlePlayStoreLink={walletConfig.meta.urls?.android}
|
||||||
appleStoreLink={walletConfig.meta.urls?.ios}
|
appleStoreLink={walletConfig.meta.urls?.ios}
|
||||||
onBack={props.goBack}
|
onBack={() => {
|
||||||
|
setScreen("scanning");
|
||||||
|
}}
|
||||||
/>
|
/>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
@@ -78,6 +82,7 @@ export const ZerionConnectUI = (props: ConnectUIProps<ZerionWallet>) => {
|
|||||||
if (screen === "scanning") {
|
if (screen === "scanning") {
|
||||||
return (
|
return (
|
||||||
<ZerionScan
|
<ZerionScan
|
||||||
|
hideBackButton={hideBackButton}
|
||||||
onBack={props.goBack}
|
onBack={props.goBack}
|
||||||
onConnected={close}
|
onConnected={close}
|
||||||
onGetStarted={() => {
|
onGetStarted={() => {
|
||||||
@@ -87,6 +92,6 @@ export const ZerionConnectUI = (props: ConnectUIProps<ZerionWallet>) => {
|
|||||||
/>
|
/>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
return null;
|
return null;
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -12,7 +12,8 @@ export const ZerionScan: React.FC<{
|
|||||||
onGetStarted: () => void;
|
onGetStarted: () => void;
|
||||||
onConnected: () => void;
|
onConnected: () => void;
|
||||||
walletConfig: WalletConfig<ZerionWallet>;
|
walletConfig: WalletConfig<ZerionWallet>;
|
||||||
}> = ({ onBack, onConnected, onGetStarted, walletConfig }) => {
|
hideBackButton: boolean;
|
||||||
|
}> = ({ onBack, onConnected, onGetStarted, walletConfig, hideBackButton }) => {
|
||||||
const createInstance = useCreateWalletInstance();
|
const createInstance = useCreateWalletInstance();
|
||||||
const [qrCodeUri, setQrCodeUri] = useState<string | undefined>();
|
const [qrCodeUri, setQrCodeUri] = useState<string | undefined>();
|
||||||
const { setConnectedWallet, chainToConnect, setConnectionStatus } =
|
const { setConnectedWallet, chainToConnect, setConnectionStatus } =
|
||||||
@@ -49,6 +50,7 @@ export const ZerionScan: React.FC<{
|
|||||||
|
|
||||||
return (
|
return (
|
||||||
<ScanScreen
|
<ScanScreen
|
||||||
|
hideBackButton={hideBackButton}
|
||||||
onBack={onBack}
|
onBack={onBack}
|
||||||
onGetStarted={onGetStarted}
|
onGetStarted={onGetStarted}
|
||||||
qrCodeUri={qrCodeUri}
|
qrCodeUri={qrCodeUri}
|
||||||
|
|||||||
@@ -1,5 +1,55 @@
|
|||||||
# @thirdweb-dev/sdk
|
# @thirdweb-dev/sdk
|
||||||
|
|
||||||
|
## 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
|
## 3.10.28
|
||||||
|
|
||||||
### Patch Changes
|
### Patch Changes
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "@thirdweb-dev/sdk",
|
"name": "@thirdweb-dev/sdk",
|
||||||
"version": "3.10.28",
|
"version": "3.10.32",
|
||||||
"description": "The main thirdweb SDK.",
|
"description": "The main thirdweb SDK.",
|
||||||
"repository": "https://github.com/thirdweb-dev/js/tree/main/packages/sdk",
|
"repository": "https://github.com/thirdweb-dev/js/tree/main/packages/sdk",
|
||||||
"license": "Apache-2.0",
|
"license": "Apache-2.0",
|
||||||
|
|||||||
@@ -8,8 +8,13 @@ export function createStorage(
|
|||||||
if (storage) {
|
if (storage) {
|
||||||
return storage;
|
return storage;
|
||||||
} else if (options?.gatewayUrls) {
|
} else if (options?.gatewayUrls) {
|
||||||
return new ThirdwebStorage({ gatewayUrls: options.gatewayUrls });
|
return new ThirdwebStorage({
|
||||||
|
gatewayUrls: options.gatewayUrls,
|
||||||
|
apiKey: options.thirdwebApiKey,
|
||||||
|
});
|
||||||
} else {
|
} else {
|
||||||
return new ThirdwebStorage();
|
return new ThirdwebStorage({
|
||||||
|
apiKey: options?.thirdwebApiKey,
|
||||||
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -29,6 +29,8 @@ import {
|
|||||||
FEATURE_NFT_SIGNATURE_MINTABLE_V2,
|
FEATURE_NFT_SIGNATURE_MINTABLE_V2,
|
||||||
FEATURE_NFT_SHARED_METADATA,
|
FEATURE_NFT_SHARED_METADATA,
|
||||||
FEATURE_NFT_CLAIM_ZORA,
|
FEATURE_NFT_CLAIM_ZORA,
|
||||||
|
FEATURE_NFT_LOYALTY_CARD,
|
||||||
|
FEATURE_NFT_UPDATABLE_METADATA,
|
||||||
} from "./erc721-features";
|
} from "./erc721-features";
|
||||||
import {
|
import {
|
||||||
FEATURE_EDITION,
|
FEATURE_EDITION,
|
||||||
@@ -98,6 +100,8 @@ export type Feature =
|
|||||||
| typeof FEATURE_NFT_BURNABLE
|
| typeof FEATURE_NFT_BURNABLE
|
||||||
| typeof FEATURE_NFT_TIERED_DROP
|
| typeof FEATURE_NFT_TIERED_DROP
|
||||||
| typeof FEATURE_NFT_SHARED_METADATA
|
| typeof FEATURE_NFT_SHARED_METADATA
|
||||||
|
| typeof FEATURE_NFT_LOYALTY_CARD
|
||||||
|
| typeof FEATURE_NFT_UPDATABLE_METADATA
|
||||||
| typeof FEATURE_EDITION
|
| typeof FEATURE_EDITION
|
||||||
| typeof FEATURE_EDITION_ENUMERABLE
|
| typeof FEATURE_EDITION_ENUMERABLE
|
||||||
| typeof FEATURE_EDITION_MINTABLE
|
| typeof FEATURE_EDITION_MINTABLE
|
||||||
@@ -172,4 +176,6 @@ export const SUPPORTED_FEATURES: Record<string, Feature> = /* @__PURE__ */ {
|
|||||||
[FEATURE_OFFERS.name]: FEATURE_OFFERS,
|
[FEATURE_OFFERS.name]: FEATURE_OFFERS,
|
||||||
[FEATURE_ACCOUNT_FACTORY.name]: FEATURE_ACCOUNT_FACTORY,
|
[FEATURE_ACCOUNT_FACTORY.name]: FEATURE_ACCOUNT_FACTORY,
|
||||||
[FEATURE_ACCOUNT.name]: FEATURE_ACCOUNT,
|
[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 TieredDropAbi from "@thirdweb-dev/contracts-js/dist/abis/LazyMintWithTier.json";
|
||||||
import SharedMetadataAbi from "@thirdweb-dev/contracts-js/dist/abis/SharedMetadata.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 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 = {
|
export const FEATURE_NFT_BURNABLE = {
|
||||||
name: "ERC721Burnable",
|
name: "ERC721Burnable",
|
||||||
@@ -211,6 +213,30 @@ export const FEATURE_NFT_SHARED_METADATA = /* @__PURE__ */ {
|
|||||||
features: {},
|
features: {},
|
||||||
} as const;
|
} 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__ */ {
|
export const FEATURE_NFT = /* @__PURE__ */ {
|
||||||
name: "ERC721",
|
name: "ERC721",
|
||||||
namespace: "nft",
|
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_V1.name]: FEATURE_NFT_CLAIM_PHASES_V1,
|
||||||
[FEATURE_NFT_CLAIM_PHASES_V2.name]: FEATURE_NFT_CLAIM_PHASES_V2,
|
[FEATURE_NFT_CLAIM_PHASES_V2.name]: FEATURE_NFT_CLAIM_PHASES_V2,
|
||||||
[FEATURE_NFT_SHARED_METADATA.name]: FEATURE_NFT_SHARED_METADATA,
|
[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;
|
} as const;
|
||||||
|
|||||||
@@ -355,7 +355,7 @@ export class Pack extends StandardErc1155<PackContract> {
|
|||||||
* // ERC20 rewards to be included in the pack
|
* // ERC20 rewards to be included in the pack
|
||||||
* erc20Rewards: [
|
* erc20Rewards: [
|
||||||
* {
|
* {
|
||||||
* assetContract: "0x...",
|
* contractAddress: "0x...",
|
||||||
* quantityPerReward: 5,
|
* quantityPerReward: 5,
|
||||||
* quantity: 100,
|
* quantity: 100,
|
||||||
* totalRewards: 20,
|
* totalRewards: 20,
|
||||||
@@ -364,14 +364,14 @@ export class Pack extends StandardErc1155<PackContract> {
|
|||||||
* // ERC721 rewards to be included in the pack
|
* // ERC721 rewards to be included in the pack
|
||||||
* erc721Rewards: [
|
* erc721Rewards: [
|
||||||
* {
|
* {
|
||||||
* assetContract: "0x...",
|
* contractAddress: "0x...",
|
||||||
* tokenId: 0,
|
* tokenId: 0,
|
||||||
* }
|
* }
|
||||||
* ],
|
* ],
|
||||||
* // ERC1155 rewards to be included in the pack
|
* // ERC1155 rewards to be included in the pack
|
||||||
* erc1155Rewards: [
|
* erc1155Rewards: [
|
||||||
* {
|
* {
|
||||||
* assetContract: "0x...",
|
* contractAddress: "0x...",
|
||||||
* tokenId: 0,
|
* tokenId: 0,
|
||||||
* quantityPerReward: 1,
|
* quantityPerReward: 1,
|
||||||
* totalRewards: 100,
|
* totalRewards: 100,
|
||||||
@@ -404,7 +404,7 @@ export class Pack extends StandardErc1155<PackContract> {
|
|||||||
* // ERC20 rewards to be included in the pack
|
* // ERC20 rewards to be included in the pack
|
||||||
* erc20Rewards: [
|
* erc20Rewards: [
|
||||||
* {
|
* {
|
||||||
* assetContract: "0x...",
|
* contractAddress: "0x...",
|
||||||
* quantityPerReward: 5,
|
* quantityPerReward: 5,
|
||||||
* quantity: 100,
|
* quantity: 100,
|
||||||
* totalRewards: 20,
|
* totalRewards: 20,
|
||||||
@@ -413,14 +413,14 @@ export class Pack extends StandardErc1155<PackContract> {
|
|||||||
* // ERC721 rewards to be included in the pack
|
* // ERC721 rewards to be included in the pack
|
||||||
* erc721Rewards: [
|
* erc721Rewards: [
|
||||||
* {
|
* {
|
||||||
* assetContract: "0x...",
|
* contractAddress: "0x...",
|
||||||
* tokenId: 0,
|
* tokenId: 0,
|
||||||
* }
|
* }
|
||||||
* ],
|
* ],
|
||||||
* // ERC1155 rewards to be included in the pack
|
* // ERC1155 rewards to be included in the pack
|
||||||
* erc1155Rewards: [
|
* erc1155Rewards: [
|
||||||
* {
|
* {
|
||||||
* assetContract: "0x...",
|
* contractAddress: "0x...",
|
||||||
* tokenId: 0,
|
* tokenId: 0,
|
||||||
* quantityPerReward: 1,
|
* quantityPerReward: 1,
|
||||||
* totalRewards: 100,
|
* totalRewards: 100,
|
||||||
@@ -484,7 +484,7 @@ export class Pack extends StandardErc1155<PackContract> {
|
|||||||
* // ERC20 rewards to be included in the pack
|
* // ERC20 rewards to be included in the pack
|
||||||
* erc20Rewards: [
|
* erc20Rewards: [
|
||||||
* {
|
* {
|
||||||
* assetContract: "0x...",
|
* contractAddress: "0x...",
|
||||||
* quantityPerReward: 5,
|
* quantityPerReward: 5,
|
||||||
* quantity: 100,
|
* quantity: 100,
|
||||||
* totalRewards: 20,
|
* totalRewards: 20,
|
||||||
@@ -493,14 +493,14 @@ export class Pack extends StandardErc1155<PackContract> {
|
|||||||
* // ERC721 rewards to be included in the pack
|
* // ERC721 rewards to be included in the pack
|
||||||
* erc721Rewards: [
|
* erc721Rewards: [
|
||||||
* {
|
* {
|
||||||
* assetContract: "0x...",
|
* contractAddress: "0x...",
|
||||||
* tokenId: 0,
|
* tokenId: 0,
|
||||||
* }
|
* }
|
||||||
* ],
|
* ],
|
||||||
* // ERC1155 rewards to be included in the pack
|
* // ERC1155 rewards to be included in the pack
|
||||||
* erc1155Rewards: [
|
* erc1155Rewards: [
|
||||||
* {
|
* {
|
||||||
* assetContract: "0x...",
|
* contractAddress: "0x...",
|
||||||
* tokenId: 0,
|
* tokenId: 0,
|
||||||
* quantityPerReward: 1,
|
* quantityPerReward: 1,
|
||||||
* totalRewards: 100,
|
* totalRewards: 100,
|
||||||
|
|||||||
@@ -109,7 +109,7 @@ export class SmartContract<
|
|||||||
public estimator: GasCostEstimator<TContract>;
|
public estimator: GasCostEstimator<TContract>;
|
||||||
public publishedMetadata: ContractPublishedMetadata<TContract>;
|
public publishedMetadata: ContractPublishedMetadata<TContract>;
|
||||||
public abi: Abi;
|
public abi: Abi;
|
||||||
public metadata: ContractMetadata<BaseContract, any>;
|
public metadata: ContractMetadata<BaseContract, typeof CustomContractSchema>;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Handle royalties
|
* Handle royalties
|
||||||
|
|||||||
@@ -84,7 +84,9 @@ export class ContractWrapper<
|
|||||||
this.readContract = this.writeContract.connect(
|
this.readContract = this.writeContract.connect(
|
||||||
this.getProvider(),
|
this.getProvider(),
|
||||||
) as TContract;
|
) as TContract;
|
||||||
this.#storage = new ThirdwebStorage();
|
this.#storage = new ThirdwebStorage({
|
||||||
|
apiKey: options?.thirdwebApiKey,
|
||||||
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
public override updateSignerOrProvider(network: NetworkInput): void {
|
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_TIERED_DROP,
|
||||||
FEATURE_NFT_SIGNATURE_MINTABLE_V2,
|
FEATURE_NFT_SIGNATURE_MINTABLE_V2,
|
||||||
FEATURE_NFT_SHARED_METADATA,
|
FEATURE_NFT_SHARED_METADATA,
|
||||||
|
FEATURE_NFT_LOYALTY_CARD,
|
||||||
|
FEATURE_NFT_UPDATABLE_METADATA,
|
||||||
} from "../../constants/erc721-features";
|
} from "../../constants/erc721-features";
|
||||||
import type { Address } from "../../schema/shared/Address";
|
import type { Address } from "../../schema/shared/Address";
|
||||||
import type { AddressOrEns } from "../../schema/shared/AddressOrEnsSchema";
|
import type { AddressOrEns } from "../../schema/shared/AddressOrEnsSchema";
|
||||||
@@ -58,6 +60,8 @@ import type {
|
|||||||
Zora_IERC721Drop,
|
Zora_IERC721Drop,
|
||||||
SharedMetadata,
|
SharedMetadata,
|
||||||
OpenEditionERC721,
|
OpenEditionERC721,
|
||||||
|
ILoyaltyCard,
|
||||||
|
INFTMetadata,
|
||||||
} from "@thirdweb-dev/contracts-js";
|
} from "@thirdweb-dev/contracts-js";
|
||||||
import type { ThirdwebStorage } from "@thirdweb-dev/storage";
|
import type { ThirdwebStorage } from "@thirdweb-dev/storage";
|
||||||
import { BigNumber, BigNumberish, constants } from "ethers";
|
import { BigNumber, BigNumberish, constants } from "ethers";
|
||||||
@@ -69,6 +73,8 @@ import { Erc721ClaimableWithConditions } from "./erc-721-claim-conditions";
|
|||||||
import { Erc721Claimable } from "./erc-721-claimable";
|
import { Erc721Claimable } from "./erc-721-claimable";
|
||||||
import { Erc721SharedMetadata } from "./erc-721-shared-metadata";
|
import { Erc721SharedMetadata } from "./erc-721-shared-metadata";
|
||||||
import { Erc721ClaimableZora } from "./erc-721-claim-zora";
|
import { Erc721ClaimableZora } from "./erc-721-claim-zora";
|
||||||
|
import { Erc721LoyaltyCard } from "./erc-721-loyalty-card";
|
||||||
|
import { Erc721UpdatableMetadata } from "./erc-721-metadata";
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Standard ERC721 NFT functions
|
* Standard ERC721 NFT functions
|
||||||
@@ -100,6 +106,8 @@ export class Erc721<
|
|||||||
private claimCustom: Erc721Claimable | undefined;
|
private claimCustom: Erc721Claimable | undefined;
|
||||||
private erc721SharedMetadata: Erc721SharedMetadata | undefined;
|
private erc721SharedMetadata: Erc721SharedMetadata | undefined;
|
||||||
private claimZora: Erc721ClaimableZora | undefined;
|
private claimZora: Erc721ClaimableZora | undefined;
|
||||||
|
private loyaltyCard: Erc721LoyaltyCard | undefined;
|
||||||
|
private updatableMetadata: Erc721UpdatableMetadata | undefined;
|
||||||
protected contractWrapper: ContractWrapper<T>;
|
protected contractWrapper: ContractWrapper<T>;
|
||||||
protected storage: ThirdwebStorage;
|
protected storage: ThirdwebStorage;
|
||||||
|
|
||||||
@@ -125,6 +133,8 @@ export class Erc721<
|
|||||||
this.claimCustom = this.detectErc721Claimable();
|
this.claimCustom = this.detectErc721Claimable();
|
||||||
this.claimZora = this.detectErc721ClaimableZora();
|
this.claimZora = this.detectErc721ClaimableZora();
|
||||||
this.erc721SharedMetadata = this.detectErc721SharedMetadata();
|
this.erc721SharedMetadata = this.detectErc721SharedMetadata();
|
||||||
|
this.loyaltyCard = this.detectErc721LoyaltyCard();
|
||||||
|
this.updatableMetadata = this.detectErc721UpdatableMetadata();
|
||||||
this._chainId = chainId;
|
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 //////
|
////// 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 //////
|
////// ERC721 Claimable Extension //////
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -1120,4 +1205,28 @@ export class Erc721<
|
|||||||
}
|
}
|
||||||
return undefined;
|
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;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -109,6 +109,8 @@ import {
|
|||||||
PrecomputedDeploymentTransaction,
|
PrecomputedDeploymentTransaction,
|
||||||
} from "../types/any-evm/deploy-data";
|
} from "../types/any-evm/deploy-data";
|
||||||
import { fetchContractMetadataFromAddress } from "../common/metadata-resolver";
|
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
|
* The main entry point for the thirdweb SDK
|
||||||
@@ -708,7 +710,7 @@ export class ThirdwebSDK extends RPCConnectionHandler {
|
|||||||
address,
|
address,
|
||||||
chainId,
|
chainId,
|
||||||
contractType: async () => "custom" as const,
|
contractType: async () => "custom" as const,
|
||||||
metadata: async () => ({}),
|
metadata: async () => ({ name: "" }),
|
||||||
extensions: async () => [],
|
extensions: async () => [],
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
@@ -741,7 +743,7 @@ export class ThirdwebSDK extends RPCConnectionHandler {
|
|||||||
address,
|
address,
|
||||||
chainId,
|
chainId,
|
||||||
contractType: async () => "custom" as const,
|
contractType: async () => "custom" as const,
|
||||||
metadata: async () => ({}),
|
metadata: async () => ({ name: "" }),
|
||||||
extensions: async () => [],
|
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
|
* Deploys a new SignatureDrop contract
|
||||||
*
|
*
|
||||||
|
|||||||
@@ -16,6 +16,7 @@ export const CommonContractSchema = /* @__PURE__ */ (() =>
|
|||||||
image: FileOrBufferOrStringSchema.optional(),
|
image: FileOrBufferOrStringSchema.optional(),
|
||||||
external_link: z.string().optional(),
|
external_link: z.string().optional(),
|
||||||
app_uri: z.string().optional(),
|
app_uri: z.string().optional(),
|
||||||
|
social_urls: z.record(z.string()).optional(),
|
||||||
}))();
|
}))();
|
||||||
|
|
||||||
export type CommonContractSchemaInput = z.input<typeof CommonContractSchema>;
|
export type CommonContractSchemaInput = z.input<typeof CommonContractSchema>;
|
||||||
|
|||||||
@@ -37,7 +37,7 @@ export type CustomContractMetadata = z.input<typeof BYOCContractMetadataSchema>;
|
|||||||
export const CustomContractInput = /* @__PURE__ */ (() =>
|
export const CustomContractInput = /* @__PURE__ */ (() =>
|
||||||
BYOCContractMetadataSchema.merge(
|
BYOCContractMetadataSchema.merge(
|
||||||
CommonRoyaltySchema.merge(MerkleSchema).merge(CommonSymbolSchema).partial(),
|
CommonRoyaltySchema.merge(MerkleSchema).merge(CommonSymbolSchema).partial(),
|
||||||
))();
|
).catchall(z.any()))();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @internal
|
* @internal
|
||||||
@@ -45,7 +45,7 @@ export const CustomContractInput = /* @__PURE__ */ (() =>
|
|||||||
export const CustomContractOutput = /* @__PURE__ */ (() =>
|
export const CustomContractOutput = /* @__PURE__ */ (() =>
|
||||||
CommonContractOutputSchema.merge(
|
CommonContractOutputSchema.merge(
|
||||||
CommonRoyaltySchema.merge(MerkleSchema).merge(CommonSymbolSchema).partial(),
|
CommonRoyaltySchema.merge(MerkleSchema).merge(CommonSymbolSchema).partial(),
|
||||||
))();
|
).catchall(z.any()))();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @internal
|
* @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);
|
||||||
@@ -1,5 +1,28 @@
|
|||||||
# @thirdweb-dev/storage
|
# @thirdweb-dev/storage
|
||||||
|
|
||||||
|
## 1.1.8
|
||||||
|
|
||||||
|
### Patch Changes
|
||||||
|
|
||||||
|
- [#1314](https://github.com/thirdweb-dev/js/pull/1314) [`db68bd04`](https://github.com/thirdweb-dev/js/commit/db68bd04cd8bb3ee6bff051d1d5b5a872353fde0) Thanks [@iketw](https://github.com/iketw)! - Passes API key to thirdweb storage ipfs uploader
|
||||||
|
|
||||||
|
If you want to use thirdweb's storage upload services you need to pass an API key.
|
||||||
|
You can grab one from: https://thirdweb.com/dashboard/settings
|
||||||
|
|
||||||
|
If using ThirdwebStorage directly:
|
||||||
|
|
||||||
|
```javascript
|
||||||
|
new ThirdwebStorage({
|
||||||
|
apiKey: <yourApiKey>,
|
||||||
|
});
|
||||||
|
```
|
||||||
|
|
||||||
|
## 1.1.7
|
||||||
|
|
||||||
|
### Patch Changes
|
||||||
|
|
||||||
|
- [#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
|
||||||
|
|
||||||
## 1.1.6
|
## 1.1.6
|
||||||
|
|
||||||
### Patch Changes
|
### Patch Changes
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "@thirdweb-dev/storage",
|
"name": "@thirdweb-dev/storage",
|
||||||
"version": "1.1.6",
|
"version": "1.1.8",
|
||||||
"main": "dist/thirdweb-dev-storage.cjs.js",
|
"main": "dist/thirdweb-dev-storage.cjs.js",
|
||||||
"module": "dist/thirdweb-dev-storage.esm.js",
|
"module": "dist/thirdweb-dev-storage.esm.js",
|
||||||
"browser": {
|
"browser": {
|
||||||
|
|||||||
@@ -7,6 +7,10 @@ import CIDTool from "cid-tool";
|
|||||||
export const DEFAULT_GATEWAY_URLS: GatewayUrls = {
|
export const DEFAULT_GATEWAY_URLS: GatewayUrls = {
|
||||||
// Note: Gateway URLs should have trailing slashes (we clean this on user input)
|
// Note: Gateway URLs should have trailing slashes (we clean this on user input)
|
||||||
"ipfs://": [
|
"ipfs://": [
|
||||||
|
"https://{cid}.gateway.ipfscdn.io/{path}",
|
||||||
|
"https://{cid}.ipfs.twipfs.com/{path}",
|
||||||
|
"https://{cid}.ipfs.twgateway.com/{path}",
|
||||||
|
|
||||||
"https://{cid}.ipfs.thirdwebstorage.com/{path}",
|
"https://{cid}.ipfs.thirdwebstorage.com/{path}",
|
||||||
"https://{cid}.ipfs.thirdwebipfs.com/{path}",
|
"https://{cid}.ipfs.thirdwebipfs.com/{path}",
|
||||||
"https://{cid}.ipfs.thirdwebgateway.com/{path}",
|
"https://{cid}.ipfs.thirdwebgateway.com/{path}",
|
||||||
|
|||||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user