Compare commits
14
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
4389083ca3 | ||
|
|
4961b597a0 | ||
|
|
7e044c664d | ||
|
|
498df5d69a | ||
|
|
b8d4930305 | ||
|
|
2c0bb07899 | ||
|
|
72ada47596 | ||
|
|
dc9eee735c | ||
|
|
b4aee9b591 | ||
|
|
b5c6eedb38 | ||
|
|
8672c8533c | ||
|
|
bb207473f8 | ||
|
|
10b3a717da | ||
|
|
aa81bedaf2 |
@@ -1,5 +1,12 @@
|
|||||||
# @thirdweb-dev/auth
|
# @thirdweb-dev/auth
|
||||||
|
|
||||||
|
## 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.9",
|
||||||
"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,15 @@
|
|||||||
# @thirdweb-dev/chains
|
# @thirdweb-dev/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
|
||||||
|
|||||||
@@ -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,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;
|
||||||
@@ -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,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,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;
|
||||||
@@ -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;
|
||||||
@@ -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,
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "@thirdweb-dev/chains",
|
"name": "@thirdweb-dev/chains",
|
||||||
"version": "0.1.27",
|
"version": "0.1.28",
|
||||||
"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": {
|
||||||
|
|||||||
File diff suppressed because one or more lines are too long
@@ -1,5 +1,14 @@
|
|||||||
# thirdweb
|
# thirdweb
|
||||||
|
|
||||||
|
## 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.30",
|
||||||
"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,17 @@
|
|||||||
# @thirdweb-dev/react-core
|
# @thirdweb-dev/react-core
|
||||||
|
|
||||||
|
## 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.9",
|
||||||
"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,7 @@
|
|||||||
# @thirdweb-dev/react-native-compat
|
# @thirdweb-dev/react-native-compat
|
||||||
|
|
||||||
|
## 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.28",
|
||||||
"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,47 @@
|
|||||||
# @thirdweb-dev/react-native
|
# @thirdweb-dev/react-native
|
||||||
|
|
||||||
|
## 0.2.28
|
||||||
|
|
||||||
|
### Patch Changes
|
||||||
|
|
||||||
|
- [#1283](https://github.com/thirdweb-dev/js/pull/1283) [`8672c853`](https://github.com/thirdweb-dev/js/commit/8672c8533c694cad46242672ec23b883049bd526) Thanks [@iketw](https://github.com/iketw)! - SDK improvements:
|
||||||
|
|
||||||
|
1. You can now pass an `extraRows` prop to the ConnectWallet button. This will render the `extraRows` at the bottom of the connected wallet details modal.
|
||||||
|
|
||||||
|
```javascript
|
||||||
|
import {
|
||||||
|
BaseButton,
|
||||||
|
Box,
|
||||||
|
ConnectWallet,
|
||||||
|
Text,
|
||||||
|
} from "@thirdweb-dev/react-native";
|
||||||
|
|
||||||
|
const extraRows = () => {
|
||||||
|
return (
|
||||||
|
<Box>
|
||||||
|
<Text variant="bodySmallSecondary" textAlign="center" mt="sm">
|
||||||
|
Extra option
|
||||||
|
</Text>
|
||||||
|
</Box>
|
||||||
|
);
|
||||||
|
};
|
||||||
|
|
||||||
|
<ConnectWallet theme={"dark"} extraRows={extraRows} />;
|
||||||
|
```
|
||||||
|
|
||||||
|
2. You can now import a local wallet by a mnemoic as well.
|
||||||
|
|
||||||
|
When creating a Local/Guest Wallet the import wallet modal accepts both a privateKey or a mnemonic. This makes it easier for users to import their wallets into your app
|
||||||
|
|
||||||
|
- [#1309](https://github.com/thirdweb-dev/js/pull/1309) [`4961b597`](https://github.com/thirdweb-dev/js/commit/4961b597a098dae0a4eff01a9ef268a65fe1a352) Thanks [@jnsdls](https://github.com/jnsdls)! - unblock storage domains
|
||||||
|
|
||||||
|
- Updated dependencies [[`7e044c66`](https://github.com/thirdweb-dev/js/commit/7e044c664d8a034f5324b859ac3596860c86f9a5), [`72ada475`](https://github.com/thirdweb-dev/js/commit/72ada47596d5d5c08736c33215faeec636b7156a), [`2c0bb078`](https://github.com/thirdweb-dev/js/commit/2c0bb0789955f6cd397b6fdb8e990a505251c631), [`b5c6eedb`](https://github.com/thirdweb-dev/js/commit/b5c6eedb38aa3c52eb97f3d25ad83e38c55afe61), [`10b3a717`](https://github.com/thirdweb-dev/js/commit/10b3a717da606632a05769ac821bdd21d6b63a03), [`b4aee9b5`](https://github.com/thirdweb-dev/js/commit/b4aee9b59121bab5f9b3d9b7ecdc4bcb4cd66f58), [`4961b597`](https://github.com/thirdweb-dev/js/commit/4961b597a098dae0a4eff01a9ef268a65fe1a352)]:
|
||||||
|
- @thirdweb-dev/[email protected]
|
||||||
|
- @thirdweb-dev/[email protected]
|
||||||
|
- @thirdweb-dev/[email protected]
|
||||||
|
- @thirdweb-dev/[email protected]
|
||||||
|
- @thirdweb-dev/[email protected]
|
||||||
|
|
||||||
## 0.2.27
|
## 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.28",
|
||||||
"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,17 @@
|
|||||||
# @thirdweb-dev/react
|
# @thirdweb-dev/react
|
||||||
|
|
||||||
|
## 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.9",
|
||||||
"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),
|
||||||
|
|||||||
@@ -1,5 +1,20 @@
|
|||||||
# @thirdweb-dev/sdk
|
# @thirdweb-dev/sdk
|
||||||
|
|
||||||
|
## 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.29",
|
||||||
"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",
|
||||||
|
|||||||
@@ -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
|
||||||
|
|||||||
@@ -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,11 @@
|
|||||||
# @thirdweb-dev/storage
|
# @thirdweb-dev/storage
|
||||||
|
|
||||||
|
## 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.7",
|
||||||
"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}",
|
||||||
|
|||||||
@@ -431,7 +431,7 @@ describe("IPFS", async () => {
|
|||||||
getGatewayUrlForCid(
|
getGatewayUrlForCid(
|
||||||
DEFAULT_GATEWAY_URLS["ipfs://"][0],
|
DEFAULT_GATEWAY_URLS["ipfs://"][0],
|
||||||
// CID changes based on file contents (prod gateway vs staging gateway since they get written)
|
// CID changes based on file contents (prod gateway vs staging gateway since they get written)
|
||||||
`bafybeicctk76y3z3hapwjp73msfpeolfklkgpfw2wnrcyrudk3ypmibdva/0`,
|
`bafybeibexk3gfppyxtrnyy5sqjkgvsjdqzzvwqjndna374y2od4qemseua/0`,
|
||||||
),
|
),
|
||||||
);
|
);
|
||||||
});
|
});
|
||||||
|
|||||||
@@ -1,5 +1,18 @@
|
|||||||
# @thirdweb-dev/unity-js-bridge
|
# @thirdweb-dev/unity-js-bridge
|
||||||
|
|
||||||
|
## 0.2.46
|
||||||
|
|
||||||
|
### Patch Changes
|
||||||
|
|
||||||
|
- [#1293](https://github.com/thirdweb-dev/js/pull/1293) [`bb207473`](https://github.com/thirdweb-dev/js/commit/bb207473f886d9a4470bcef1880a3a65882b6851) Thanks [@0xFirekeeper](https://github.com/0xFirekeeper)! - add more default wallets to wcv2 default modal
|
||||||
|
|
||||||
|
- 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
|
||||||
|
- @thirdweb-dev/auth@3.2.9
|
||||||
|
|
||||||
## 0.2.45
|
## 0.2.45
|
||||||
|
|
||||||
### Patch Changes
|
### Patch Changes
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "@thirdweb-dev/unity-js-bridge",
|
"name": "@thirdweb-dev/unity-js-bridge",
|
||||||
"version": "0.2.45",
|
"version": "0.2.46",
|
||||||
"main": "dist/thirdweb-unity-bridge.js",
|
"main": "dist/thirdweb-unity-bridge.js",
|
||||||
"repository": "https://github.com/thirdweb-dev/js/tree/main/packages/unity-js-bridge",
|
"repository": "https://github.com/thirdweb-dev/js/tree/main/packages/unity-js-bridge",
|
||||||
"license": "Apache-2.0",
|
"license": "Apache-2.0",
|
||||||
|
|||||||
@@ -159,6 +159,50 @@ class ThirdwebBridge implements TWBridge {
|
|||||||
projectId: sdkOptions.wallet?.walletConnectProjectId,
|
projectId: sdkOptions.wallet?.walletConnectProjectId,
|
||||||
dappMetadata,
|
dappMetadata,
|
||||||
chains: defaultChains,
|
chains: defaultChains,
|
||||||
|
qrModalOptions: {
|
||||||
|
explorerRecommendedWalletIds: [
|
||||||
|
'c57ca95b47569778a828d19178114f4db188b89b763c899ba0be274e97267d96', // metamask
|
||||||
|
'4622a2b2d6af1c9844944291e5e7351a6aa24cd7b23099efac1b2fd875da31a0', // trustwallet
|
||||||
|
'225affb176778569276e484e1b92637ad061b01e13a048b35a9d280c3b58970f', // safe
|
||||||
|
'1ae92b26df02f0abca6304df07debccd18262fdf5fe82daa81593582dac9a369', // rainbow
|
||||||
|
'c03dfee351b6fcc421b4494ea33b9d4b92a984f87aa76d1663bb28705e95034a', // uniswap
|
||||||
|
'ecc4036f814562b41a5268adc86270fba1365471402006302e70169465b7ac18', // zerion
|
||||||
|
'ef333840daf915aafdc4a004525502d6d49d77bd9c65e0642dbaefb3c2893bef', // imtoken
|
||||||
|
'bc949c5d968ae81310268bf9193f9c9fb7bb4e1283e1284af8f2bd4992535fd6', // argent
|
||||||
|
'74f8092562bd79675e276d8b2062a83601a4106d30202f2d509195e30e19673d', // spot
|
||||||
|
'afbd95522f4041c71dd4f1a065f971fd32372865b416f95a0b1db759ae33f2a7', // omni
|
||||||
|
'f2436c67184f158d1beda5df53298ee84abfc367581e4505134b5bcf5f46697d', // crypto.com
|
||||||
|
'20459438007b75f4f4acb98bf29aa3b800550309646d375da5fd4aac6c2a2c66', // tokenpocket
|
||||||
|
'8837dd9413b1d9b585ee937d27a816590248386d9dbf59f5cd3422dbbb65683e', // robinhood wallet
|
||||||
|
'85db431492aa2e8672e93f4ea7acf10c88b97b867b0d373107af63dc4880f041', // frontier
|
||||||
|
'84b43e8ddfcd18e5fcb5d21e7277733f9cccef76f7d92c836d0e481db0c70c04', // blockchain.com
|
||||||
|
'0b415a746fb9ee99cce155c2ceca0c6f6061b1dbca2d722b3ba16381d0562150', // safepal
|
||||||
|
'38f5d18bd8522c244bdd70cb4a68e0e718865155811c043f052fb9f1c51de662', // bitkeep
|
||||||
|
'9414d5a85c8f4eabc1b5b15ebe0cd399e1a2a9d35643ab0ad22a6e4a32f596f0', // zengo
|
||||||
|
'c286eebc742a537cd1d6818363e9dc53b21759a1e8e5d9b263d0c03ec7703576', // 1inch
|
||||||
|
'8a0ee50d1f22f6651afcae7eb4253e52a3310b90af5daef78a8c4929a9bb99d4', // binance defi wallet
|
||||||
|
'e9ff15be73584489ca4a66f64d32c4537711797e30b6660dbcb71ea72a42b1f4', // exodus
|
||||||
|
'19177a98252e07ddfc9af2083ba8e07ef627cb6103467ffebb3f8f4205fd7927', // ledger live
|
||||||
|
'f5b4eeb6015d66be3f5940a895cbaa49ef3439e518cd771270e6b553b48f31d2', // mew wallet
|
||||||
|
'138f51c8d00ac7b9ac9d8dc75344d096a7dfe370a568aa167eabc0a21830ed98', // alpha wallet
|
||||||
|
'47bb07617af518642f3413a201ec5859faa63acb1dd175ca95085d35d38afb83', // keyring pro
|
||||||
|
'76a3d548a08cf402f5c7d021f24fd2881d767084b387a5325df88bc3d4b6f21b', // lobstr wallet
|
||||||
|
'dceb063851b1833cbb209e3717a0a0b06bf3fb500fe9db8cd3a553e4b1d02137', // onto
|
||||||
|
'7674bb4e353bf52886768a3ddc2a4562ce2f4191c80831291218ebd90f5f5e26', // math wallet
|
||||||
|
'8308656f4548bb81b3508afe355cfbb7f0cb6253d1cc7f998080601f838ecee3', // unstoppable domains
|
||||||
|
'031f0187049b7f96c6f039d1c9c8138ff7a17fd75d38b34350c7182232cc29aa', // obvious
|
||||||
|
'5864e2ced7c293ed18ac35e0db085c09ed567d67346ccb6f58a0327a75137489', // fireblocks
|
||||||
|
'2c81da3add65899baeac53758a07e652eea46dbb5195b8074772c62a77bbf568', // ambire wallet
|
||||||
|
'802a2041afdaf4c7e41a2903e98df333c8835897532699ad370f829390c6900f', // infinity wallet
|
||||||
|
'7424d97904535b14fe34f09f63d8ca66935546f798758dabd5b26c2309f2b1f9', // bridge wallet
|
||||||
|
'dd43441a6368ec9046540c46c5fdc58f79926d17ce61a176444568ca7c970dcd', // internet money wallet
|
||||||
|
'c482dfe368d4f004479977fd88e80dc9e81107f3245d706811581a6dfe69c534', // now wallet
|
||||||
|
'107bb20463699c4e614d3a2fb7b961e66f48774cb8f6d6c1aee789853280972c', // bitcoin.com wallet
|
||||||
|
'053ac0ac602e0969736941cf5aa07a3af57396d4601cb521a173a626e1015fb1', // au wallet
|
||||||
|
'2a3c89040ac3b723a1972a33a125b1db11e258a6975d3a61252cd64e6ea5ea01', // coin98 super app
|
||||||
|
'b956da9052132e3dabdcd78feb596d5194c99b7345d8c4bd7a47cabdcb69a25f', // abc wallet
|
||||||
|
]
|
||||||
|
},
|
||||||
});
|
});
|
||||||
break;
|
break;
|
||||||
case walletIds.coinbase:
|
case walletIds.coinbase:
|
||||||
|
|||||||
@@ -1,5 +1,17 @@
|
|||||||
# @thirdweb-dev/wallets
|
# @thirdweb-dev/wallets
|
||||||
|
|
||||||
|
## 1.0.5
|
||||||
|
|
||||||
|
### Patch Changes
|
||||||
|
|
||||||
|
- [#1292](https://github.com/thirdweb-dev/js/pull/1292) [`10b3a717`](https://github.com/thirdweb-dev/js/commit/10b3a717da606632a05769ac821bdd21d6b63a03) Thanks [@assimovt](https://github.com/assimovt)! - Handle authz errors from thirdweb Bundler in smart wallet paymaster and rpc
|
||||||
|
|
||||||
|
- [#1301](https://github.com/thirdweb-dev/js/pull/1301) [`b4aee9b5`](https://github.com/thirdweb-dev/js/commit/b4aee9b59121bab5f9b3d9b7ecdc4bcb4cd66f58) Thanks [@adam-maj](https://github.com/adam-maj)! - Add all supported chains to safe server urls
|
||||||
|
|
||||||
|
- 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
|
||||||
|
|
||||||
## 1.0.4
|
## 1.0.4
|
||||||
|
|
||||||
### Patch Changes
|
### Patch Changes
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "@thirdweb-dev/wallets",
|
"name": "@thirdweb-dev/wallets",
|
||||||
"version": "1.0.4",
|
"version": "1.0.5",
|
||||||
"main": "dist/thirdweb-dev-wallets.cjs.js",
|
"main": "dist/thirdweb-dev-wallets.cjs.js",
|
||||||
"module": "dist/thirdweb-dev-wallets.esm.js",
|
"module": "dist/thirdweb-dev-wallets.esm.js",
|
||||||
"types": "dist/thirdweb-dev-wallets.cjs.d.ts",
|
"types": "dist/thirdweb-dev-wallets.cjs.d.ts",
|
||||||
|
|||||||
@@ -2,16 +2,26 @@
|
|||||||
export const CHAIN_ID_TO_GNOSIS_SERVER_URL = {
|
export const CHAIN_ID_TO_GNOSIS_SERVER_URL = {
|
||||||
// mainnet
|
// mainnet
|
||||||
1: "https://safe-transaction-mainnet.safe.global",
|
1: "https://safe-transaction-mainnet.safe.global",
|
||||||
// avalanche
|
|
||||||
43114: "https://safe-transaction-avalanche.safe.global",
|
|
||||||
// polygon
|
|
||||||
137: "https://safe-transaction-polygon.safe.global",
|
|
||||||
// goerli
|
// goerli
|
||||||
5: "https://safe-transaction-goerli.safe.global",
|
5: "https://safe-transaction-goerli.safe.global",
|
||||||
// bsc
|
|
||||||
56: "https://safe-transaction-bsc.safe.global",
|
|
||||||
// optimism
|
// optimism
|
||||||
10: "https://safe-transaction-optimism.safe.global",
|
10: "https://safe-transaction-optimism.safe.global",
|
||||||
|
// bsc
|
||||||
|
56: "https://safe-transaction-bsc.safe.global",
|
||||||
|
// gnosis
|
||||||
|
100: "https://safe-transaction-gnosis-chain.safe.global",
|
||||||
|
// polygon
|
||||||
|
137: "https://safe-transaction-polygon.safe.global",
|
||||||
|
// avalanche
|
||||||
|
43114: "https://safe-transaction-avalanche.safe.global",
|
||||||
|
// arbitrum
|
||||||
|
42161: "https://safe-transaction-arbitrum.safe.global",
|
||||||
|
// celo
|
||||||
|
42220: "https://safe-transaction-celo.safe.global",
|
||||||
|
// base goerli
|
||||||
|
84531: "https://safe-transaction-base-testnet.safe.global",
|
||||||
|
// aurora
|
||||||
|
1313161554: "https://safe-transaction-aurora.safe.global",
|
||||||
} as const;
|
} as const;
|
||||||
|
|
||||||
export const SafeSupportedChainsSet = /* @__PURE__ */ (() =>
|
export const SafeSupportedChainsSet = /* @__PURE__ */ (() =>
|
||||||
|
|||||||
@@ -65,34 +65,45 @@ export class ERC4337EthersSigner extends Signer {
|
|||||||
|
|
||||||
unwrapError(errorIn: any): Error {
|
unwrapError(errorIn: any): Error {
|
||||||
try {
|
try {
|
||||||
|
let errorMsg = "Unknown Error";
|
||||||
|
|
||||||
if (errorIn.error) {
|
if (errorIn.error) {
|
||||||
const error = new Error(
|
errorMsg = `The bundler has failed to include UserOperation in a batch: ${errorIn.error}`;
|
||||||
`The bundler has failed to include UserOperation in a batch: ${errorIn.error}`,
|
} else if (errorIn.body && typeof errorIn.body === "string") {
|
||||||
);
|
|
||||||
error.stack = errorIn.stack;
|
|
||||||
return error;
|
|
||||||
}
|
|
||||||
if (errorIn.body && typeof errorIn.body === "object") {
|
|
||||||
const errorBody = JSON.parse(errorIn.body);
|
const errorBody = JSON.parse(errorIn.body);
|
||||||
let paymasterInfo: string = "";
|
const errorStatus = errorIn.status || "UNKNOWN";
|
||||||
let failedOpMessage: string | undefined =
|
const errorCode = errorBody?.code || "UNKNOWN";
|
||||||
errorBody?.error?.message || errorBody?.error?.data;
|
|
||||||
if (failedOpMessage?.includes("FailedOp") === true) {
|
let failedOpMessage =
|
||||||
|
errorBody?.error?.message ||
|
||||||
|
errorBody?.error?.data ||
|
||||||
|
errorBody?.error ||
|
||||||
|
errorIn.reason;
|
||||||
|
|
||||||
|
if (failedOpMessage?.includes("FailedOp")) {
|
||||||
|
let paymasterInfo: string = "";
|
||||||
// TODO: better error extraction methods will be needed
|
// TODO: better error extraction methods will be needed
|
||||||
const matched = failedOpMessage.match(/FailedOp\((.*)\)/);
|
const matched = failedOpMessage.match(/FailedOp\((.*)\)/);
|
||||||
|
|
||||||
if (matched) {
|
if (matched) {
|
||||||
const split = matched[1].split(",");
|
const split = matched[1].split(",");
|
||||||
paymasterInfo = `(paymaster address: ${split[1]})`;
|
paymasterInfo = `(paymaster address: ${split[1]})`;
|
||||||
failedOpMessage = split[2];
|
failedOpMessage = split[2];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
errorMsg = `The bundler has failed to include UserOperation in a batch: ${failedOpMessage} ${paymasterInfo}`;
|
||||||
|
} else {
|
||||||
|
errorMsg = `RPC error: ${failedOpMessage}
|
||||||
|
Status: ${errorStatus}
|
||||||
|
Code: ${errorCode}`;
|
||||||
}
|
}
|
||||||
const error = new Error(
|
|
||||||
`The bundler has failed to include UserOperation in a batch: ${failedOpMessage} ${paymasterInfo}`,
|
|
||||||
);
|
|
||||||
error.stack = errorIn.stack;
|
|
||||||
return error;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const error = new Error(errorMsg);
|
||||||
|
error.stack = errorIn.stack;
|
||||||
|
return error;
|
||||||
} catch (error: any) {}
|
} catch (error: any) {}
|
||||||
|
|
||||||
return errorIn;
|
return errorIn;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -22,32 +22,37 @@ class VerifyingPaymasterAPI extends PaymasterAPI {
|
|||||||
userOp: Partial<UserOperationStruct>,
|
userOp: Partial<UserOperationStruct>,
|
||||||
): Promise<string> {
|
): Promise<string> {
|
||||||
// Ask the paymaster to sign the transaction and return a valid paymasterAndData value.
|
// Ask the paymaster to sign the transaction and return a valid paymasterAndData value.
|
||||||
try {
|
const response = await fetch(this.paymasterUrl, {
|
||||||
const response = await fetch(this.paymasterUrl, {
|
method: "POST",
|
||||||
method: "POST",
|
headers: {
|
||||||
headers: {
|
"Content-Type": "application/json",
|
||||||
"Content-Type": "application/json",
|
"x-api-key": this.apiKey,
|
||||||
"x-api-key": this.apiKey,
|
},
|
||||||
},
|
body: JSON.stringify({
|
||||||
body: JSON.stringify({
|
jsonrpc: "2.0",
|
||||||
jsonrpc: "2.0",
|
id: 1,
|
||||||
id: 1,
|
method: "pm_sponsorUserOperation",
|
||||||
method: "pm_sponsorUserOperation",
|
params: [await toJSON(userOp), { entryPoint: this.entryPoint }],
|
||||||
params: [await toJSON(userOp), { entryPoint: this.entryPoint }],
|
}),
|
||||||
}),
|
});
|
||||||
});
|
const res = await response.json();
|
||||||
const res = await response.json();
|
|
||||||
if (res.result) {
|
if (!response.ok) {
|
||||||
const result = (res.result as any).paymasterAndData || res.result;
|
const error = res.error || response.statusText;
|
||||||
return result.toString();
|
const code = res.code || "UNKNOWN";
|
||||||
} else {
|
|
||||||
throw new Error(
|
throw new Error(
|
||||||
`Paymaster returned no result from: ${this.paymasterUrl}`,
|
`Paymaster error: ${error}
|
||||||
);
|
Status: ${response.status}
|
||||||
}
|
Code: ${code}`,
|
||||||
} catch (e) {
|
);
|
||||||
console.error("PM - error", (e as any).result?.error || e);
|
}
|
||||||
throw e;
|
|
||||||
|
if (res.result) {
|
||||||
|
const result = (res.result as any).paymasterAndData || res.result;
|
||||||
|
return result.toString();
|
||||||
|
} else {
|
||||||
|
throw new Error(`Paymaster returned no result from ${this.paymasterUrl}`);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Generated
+9
-41
@@ -1,9 +1,5 @@
|
|||||||
lockfileVersion: '6.0'
|
lockfileVersion: '6.0'
|
||||||
|
|
||||||
settings:
|
|
||||||
autoInstallPeers: true
|
|
||||||
excludeLinksFromLockfile: false
|
|
||||||
|
|
||||||
importers:
|
importers:
|
||||||
|
|
||||||
.:
|
.:
|
||||||
@@ -359,8 +355,8 @@ importers:
|
|||||||
packages/contracts-js:
|
packages/contracts-js:
|
||||||
dependencies:
|
dependencies:
|
||||||
'@thirdweb-dev/contracts':
|
'@thirdweb-dev/contracts':
|
||||||
specifier: 3.5.9
|
specifier: 3.6.0
|
||||||
version: 3.5.9
|
version: 3.6.0
|
||||||
devDependencies:
|
devDependencies:
|
||||||
'@babel/preset-env':
|
'@babel/preset-env':
|
||||||
specifier: ^7.22.5
|
specifier: ^7.22.5
|
||||||
@@ -10237,8 +10233,8 @@ packages:
|
|||||||
use-sync-external-store: 1.2.0([email protected])
|
use-sync-external-store: 1.2.0([email protected])
|
||||||
dev: false
|
dev: false
|
||||||
|
|
||||||
/@thirdweb-dev/contracts@3.5.9:
|
/@thirdweb-dev/contracts@3.6.0:
|
||||||
resolution: {integrity: sha512-RFKe4qFnqdd2cchuY8appDS5yyEckFV8nL8kE4HqQUKDil6LfQag42fE+cuzqRGTHsSTTfh9L/d84izdVtwzLw==}
|
resolution: {integrity: sha512-WPKyTb4Pqz8WZpQQ2RZEboIQIiki0YZruJBOvW20VfTZIt5rGUT2g9TkF6ca9O/SCdd1FM6ziQ7k0SV12QSxwg==}
|
||||||
dev: false
|
dev: false
|
||||||
|
|
||||||
/@tootallnate/[email protected]:
|
/@tootallnate/[email protected]:
|
||||||
@@ -15819,7 +15815,7 @@ packages:
|
|||||||
eslint: 8.43.0
|
eslint: 8.43.0
|
||||||
eslint-import-resolver-node: 0.3.7
|
eslint-import-resolver-node: 0.3.7
|
||||||
eslint-import-resolver-typescript: 3.5.3([email protected])([email protected])
|
eslint-import-resolver-typescript: 3.5.3([email protected])([email protected])
|
||||||
eslint-plugin-import: 2.27.5([email protected])
|
eslint-plugin-import: 2.27.5(@typescript-eslint/[email protected])([email protected])([email protected])
|
||||||
eslint-plugin-jsx-a11y: 6.7.1([email protected])
|
eslint-plugin-jsx-a11y: 6.7.1([email protected])
|
||||||
eslint-plugin-react: 7.32.2([email protected])
|
eslint-plugin-react: 7.32.2([email protected])
|
||||||
eslint-plugin-react-hooks: 4.6.0([email protected])
|
eslint-plugin-react-hooks: 4.6.0([email protected])
|
||||||
@@ -16017,38 +16013,6 @@ packages:
|
|||||||
- eslint-import-resolver-webpack
|
- eslint-import-resolver-webpack
|
||||||
- supports-color
|
- supports-color
|
||||||
|
|
||||||
/[email protected]([email protected]):
|
|
||||||
resolution: {integrity: sha512-LmEt3GVofgiGuiE+ORpnvP+kAm3h6MLZJ4Q5HCyHADofsb4VzXFsRiWj3c0OFiV+3DWFh0qg3v9gcPlfc3zRow==}
|
|
||||||
engines: {node: '>=4'}
|
|
||||||
peerDependencies:
|
|
||||||
'@typescript-eslint/parser': '*'
|
|
||||||
eslint: ^2 || ^3 || ^4 || ^5 || ^6 || ^7.2.0 || ^8
|
|
||||||
peerDependenciesMeta:
|
|
||||||
'@typescript-eslint/parser':
|
|
||||||
optional: true
|
|
||||||
dependencies:
|
|
||||||
array-includes: 3.1.6
|
|
||||||
array.prototype.flat: 1.3.1
|
|
||||||
array.prototype.flatmap: 1.3.1
|
|
||||||
debug: 3.2.7
|
|
||||||
doctrine: 2.1.0
|
|
||||||
eslint: 8.43.0
|
|
||||||
eslint-import-resolver-node: 0.3.7
|
|
||||||
eslint-module-utils: 2.7.4(@typescript-eslint/[email protected])([email protected])([email protected])([email protected])
|
|
||||||
has: 1.0.3
|
|
||||||
is-core-module: 2.11.0
|
|
||||||
is-glob: 4.0.3
|
|
||||||
minimatch: 3.1.2
|
|
||||||
object.values: 1.1.6
|
|
||||||
resolve: 1.22.1
|
|
||||||
semver: 6.3.0
|
|
||||||
tsconfig-paths: 3.14.2
|
|
||||||
transitivePeerDependencies:
|
|
||||||
- eslint-import-resolver-typescript
|
|
||||||
- eslint-import-resolver-webpack
|
|
||||||
- supports-color
|
|
||||||
dev: true
|
|
||||||
|
|
||||||
/[email protected]:
|
/[email protected]:
|
||||||
resolution: {integrity: sha512-RzPeSjuw1NYiTSQyFzYl2uTDgiPQWDUmFCiGAMCITmXN627DsWZ9rR4KNzrb8vnk/gLL5qdYr8oxh44xsrcO5Q==}
|
resolution: {integrity: sha512-RzPeSjuw1NYiTSQyFzYl2uTDgiPQWDUmFCiGAMCITmXN627DsWZ9rR4KNzrb8vnk/gLL5qdYr8oxh44xsrcO5Q==}
|
||||||
dependencies:
|
dependencies:
|
||||||
@@ -28901,3 +28865,7 @@ packages:
|
|||||||
version: 5.4.7
|
version: 5.4.7
|
||||||
engines: {node: '>=0.11'}
|
engines: {node: '>=0.11'}
|
||||||
dev: true
|
dev: true
|
||||||
|
|
||||||
|
settings:
|
||||||
|
autoInstallPeers: true
|
||||||
|
excludeLinksFromLockfile: false
|
||||||
|
|||||||
Reference in New Issue
Block a user