Compare commits
13
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
5ece04cdc0 | ||
|
|
1b15e7b1f2 | ||
|
|
a4086c6a39 | ||
|
|
1aaa63eec7 | ||
|
|
502c53ac0b | ||
|
|
e7ba698f3e | ||
|
|
6746416db9 | ||
|
|
2fb81bd4b7 | ||
|
|
841c86aa12 | ||
|
|
132b3cb45a | ||
|
|
b248afc160 | ||
|
|
9f42e4d241 | ||
|
|
901427c33c |
@@ -1,5 +1,12 @@
|
||||
# @thirdweb-dev/auth
|
||||
|
||||
## 4.1.92
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- Updated dependencies []:
|
||||
- @thirdweb-dev/wallets@2.5.34
|
||||
|
||||
## 4.1.91
|
||||
|
||||
### Patch Changes
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@thirdweb-dev/auth",
|
||||
"version": "4.1.91",
|
||||
"version": "4.1.92",
|
||||
"main": "dist/thirdweb-dev-auth.cjs.js",
|
||||
"module": "dist/thirdweb-dev-auth.esm.js",
|
||||
"browser": {
|
||||
|
||||
@@ -1,5 +1,11 @@
|
||||
# @thirdweb-dev/chains
|
||||
|
||||
## 0.1.118
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- [#3279](https://github.com/thirdweb-dev/js/pull/3279) [`9f42e4d`](https://github.com/thirdweb-dev/js/commit/9f42e4d2412df536d1b5f03a4e2a8b516911facb) Thanks [@github-actions](https://github.com/apps/github-actions)! - Synced Chains Package
|
||||
|
||||
## 0.1.117
|
||||
|
||||
### Patch Changes
|
||||
|
||||
@@ -0,0 +1,30 @@
|
||||
import type { Chain } from "../src/types";
|
||||
export default {
|
||||
"chain": "Avalanche",
|
||||
"chainId": 111223,
|
||||
"explorers": [],
|
||||
"faucets": [],
|
||||
"features": [],
|
||||
"icon": {
|
||||
"url": "https://images.ctfassets.net/9bazykntljf6/62CceHSYsRS4D9fgDSkLRB/877cb8f26954e1743ff535fd7fdaf78f/avacloud-placeholder.svg",
|
||||
"width": 256,
|
||||
"height": 256,
|
||||
"format": "svg"
|
||||
},
|
||||
"infoURL": "https://avacloud.io",
|
||||
"name": "Chennai Testnet",
|
||||
"nativeCurrency": {
|
||||
"name": "Chennai Testnet Token",
|
||||
"symbol": "ZOD",
|
||||
"decimals": 18
|
||||
},
|
||||
"networkId": 111223,
|
||||
"redFlags": [],
|
||||
"rpc": [
|
||||
"https://111223.rpc.thirdweb.com/${THIRDWEB_API_KEY}",
|
||||
"https://subnets.avax.network/chennai/testnet/rpc"
|
||||
],
|
||||
"shortName": "Chennai Testnet",
|
||||
"slug": "chennai-testnet",
|
||||
"testnet": true
|
||||
} as const satisfies Chain;
|
||||
@@ -0,0 +1,37 @@
|
||||
import type { Chain } from "../src/types";
|
||||
export default {
|
||||
"chain": "Sei",
|
||||
"chainId": 1328,
|
||||
"explorers": [
|
||||
{
|
||||
"name": "Seitrace",
|
||||
"url": "https://seitrace.com",
|
||||
"standard": "EIP3091"
|
||||
}
|
||||
],
|
||||
"faucets": [
|
||||
"https://atlantic-2.app.sei.io/faucet"
|
||||
],
|
||||
"icon": {
|
||||
"url": "ipfs://bafkreih3l3iisplmikofkbfyimqlox7nmixzlkzhjoewmpi4jbqitwryoa",
|
||||
"width": 600,
|
||||
"height": 600,
|
||||
"format": "png"
|
||||
},
|
||||
"infoURL": "https://www.sei.io",
|
||||
"name": "Sei Testnet",
|
||||
"nativeCurrency": {
|
||||
"name": "Sei",
|
||||
"symbol": "SEI",
|
||||
"decimals": 18
|
||||
},
|
||||
"networkId": 1328,
|
||||
"rpc": [
|
||||
"https://1328.rpc.thirdweb.com/${THIRDWEB_API_KEY}",
|
||||
"https://evm-rpc-testnet.sei-apis.com",
|
||||
"wss://evm-ws-testnet.sei-apis.com"
|
||||
],
|
||||
"shortName": "sei-testnet",
|
||||
"slug": "sei-testnet",
|
||||
"testnet": true
|
||||
} as const satisfies Chain;
|
||||
@@ -0,0 +1,30 @@
|
||||
import type { Chain } from "../src/types";
|
||||
export default {
|
||||
"chain": "Avalanche",
|
||||
"chainId": 14299,
|
||||
"explorers": [],
|
||||
"faucets": [],
|
||||
"features": [],
|
||||
"icon": {
|
||||
"url": "https://images.ctfassets.net/9bazykntljf6/62CceHSYsRS4D9fgDSkLRB/877cb8f26954e1743ff535fd7fdaf78f/avacloud-placeholder.svg",
|
||||
"width": 256,
|
||||
"height": 256,
|
||||
"format": "svg"
|
||||
},
|
||||
"infoURL": "https://avacloud.io",
|
||||
"name": "Diego's",
|
||||
"nativeCurrency": {
|
||||
"name": "Diego's Token",
|
||||
"symbol": "VMF",
|
||||
"decimals": 18
|
||||
},
|
||||
"networkId": 14299,
|
||||
"redFlags": [],
|
||||
"rpc": [
|
||||
"https://14299.rpc.thirdweb.com/${THIRDWEB_API_KEY}",
|
||||
"https://subnets.avax.network/diegos/testnet/rpc"
|
||||
],
|
||||
"shortName": "Diego's",
|
||||
"slug": "diego-s",
|
||||
"testnet": true
|
||||
} as const satisfies Chain;
|
||||
@@ -0,0 +1,30 @@
|
||||
import type { Chain } from "../src/types";
|
||||
export default {
|
||||
"chain": "Satori",
|
||||
"chainId": 14801,
|
||||
"explorers": [
|
||||
{
|
||||
"name": "satoriscan",
|
||||
"url": "https://satori.vanascan.io",
|
||||
"standard": "EIP3091"
|
||||
}
|
||||
],
|
||||
"faucets": [
|
||||
"https://faucet.vana.org"
|
||||
],
|
||||
"infoURL": "https://satori.vana.org",
|
||||
"name": "Vana Satori Testnet",
|
||||
"nativeCurrency": {
|
||||
"name": "DAT",
|
||||
"symbol": "DAT",
|
||||
"decimals": 18
|
||||
},
|
||||
"networkId": 14801,
|
||||
"rpc": [
|
||||
"https://14801.rpc.thirdweb.com/${THIRDWEB_API_KEY}",
|
||||
"http://rpc.satori.vana.org"
|
||||
],
|
||||
"shortName": "satori",
|
||||
"slug": "vana-satori-testnet",
|
||||
"testnet": true
|
||||
} as const satisfies Chain;
|
||||
@@ -0,0 +1,29 @@
|
||||
import type { Chain } from "../src/types";
|
||||
export default {
|
||||
"chain": "Parodychain",
|
||||
"chainId": 2078,
|
||||
"explorers": [],
|
||||
"faucets": [],
|
||||
"features": [],
|
||||
"icon": {
|
||||
"url": "ipfs://QmR2ovc7zeM7gdzpL6FdvWBEhLyE8dL1w8GWnooHEk9uEZ/parodychain-logo.png",
|
||||
"width": 512,
|
||||
"height": 512,
|
||||
"format": "png"
|
||||
},
|
||||
"name": "Parody Network",
|
||||
"nativeCurrency": {
|
||||
"name": "Parody",
|
||||
"symbol": "PDY",
|
||||
"decimals": 18
|
||||
},
|
||||
"networkId": 2078,
|
||||
"redFlags": [],
|
||||
"rpc": [
|
||||
"https://2078.rpc.thirdweb.com/${THIRDWEB_API_KEY}",
|
||||
"https://fraa-flashbox-4392-rpc.a.stagenet.tanssi.network"
|
||||
],
|
||||
"shortName": "Parody",
|
||||
"slug": "parody-network",
|
||||
"testnet": true
|
||||
} as const satisfies Chain;
|
||||
@@ -0,0 +1,30 @@
|
||||
import type { Chain } from "../src/types";
|
||||
export default {
|
||||
"chain": "Avalanche",
|
||||
"chainId": 2144,
|
||||
"explorers": [],
|
||||
"faucets": [],
|
||||
"features": [],
|
||||
"icon": {
|
||||
"url": "https://images.ctfassets.net/9bazykntljf6/62CceHSYsRS4D9fgDSkLRB/877cb8f26954e1743ff535fd7fdaf78f/avacloud-placeholder.svg",
|
||||
"width": 256,
|
||||
"height": 256,
|
||||
"format": "svg"
|
||||
},
|
||||
"infoURL": "https://avacloud.io",
|
||||
"name": "Test Subnet Resources",
|
||||
"nativeCurrency": {
|
||||
"name": "Test Subnet Resources Token",
|
||||
"symbol": "LNV",
|
||||
"decimals": 18
|
||||
},
|
||||
"networkId": 2144,
|
||||
"redFlags": [],
|
||||
"rpc": [
|
||||
"https://2144.rpc.thirdweb.com/${THIRDWEB_API_KEY}",
|
||||
"https://subnets.avax.network/testsubnet/testnet/rpc"
|
||||
],
|
||||
"shortName": "Test Subnet Resources",
|
||||
"slug": "test-subnet-resources",
|
||||
"testnet": true
|
||||
} as const satisfies Chain;
|
||||
@@ -7,20 +7,15 @@ export default {
|
||||
"name": "Blockscout",
|
||||
"url": "https://testnet-explorer-v2.xai-chain.net",
|
||||
"standard": "EIP3091"
|
||||
},
|
||||
{
|
||||
"name": "blockscout",
|
||||
"url": "https://testnet-explorer-v2.xai-chain.net/",
|
||||
"standard": "EIP3091"
|
||||
}
|
||||
],
|
||||
"faucets": [],
|
||||
"features": [],
|
||||
"icon": {
|
||||
"url": "ipfs://QmZKFekbHxDkB8gFmmmjWz89SLhwg38GkALmAKo3gn753N/2024-01-10%2012.50.15.jpg",
|
||||
"width": 512,
|
||||
"height": 512,
|
||||
"format": "jpg"
|
||||
"url": "ipfs://QmbWFbhjKw7zfsK5Rd9YxZgJgS43fpySPozjhYc98ibbEV/xai-icon.png",
|
||||
"width": 1024,
|
||||
"height": 1024,
|
||||
"format": "png"
|
||||
},
|
||||
"infoURL": "https://xai.games",
|
||||
"name": "Xai Sepolia",
|
||||
|
||||
@@ -0,0 +1,43 @@
|
||||
import type { Chain } from "../src/types";
|
||||
export default {
|
||||
"chain": "Bahamut",
|
||||
"chainId": 4058,
|
||||
"explorers": [
|
||||
{
|
||||
"name": "blockscout",
|
||||
"url": "https://ocean.ftnscan.com",
|
||||
"standard": "none"
|
||||
}
|
||||
],
|
||||
"faucets": [],
|
||||
"features": [
|
||||
{
|
||||
"name": "EIP155"
|
||||
},
|
||||
{
|
||||
"name": "EIP1559"
|
||||
}
|
||||
],
|
||||
"icon": {
|
||||
"url": "ipfs://QmSemioP83RXnDWwTZbet8VpwJxcFRboX4B3pcdhLZGodP",
|
||||
"width": 200,
|
||||
"height": 200,
|
||||
"format": "png"
|
||||
},
|
||||
"infoURL": "https://bahamut.io",
|
||||
"name": "Bahamut ocean",
|
||||
"nativeCurrency": {
|
||||
"name": "FTN",
|
||||
"symbol": "FTN",
|
||||
"decimals": 18
|
||||
},
|
||||
"networkId": 4058,
|
||||
"rpc": [
|
||||
"https://4058.rpc.thirdweb.com/${THIRDWEB_API_KEY}",
|
||||
"https://rpc1.ocean.bahamutchain.com"
|
||||
],
|
||||
"shortName": "ocean",
|
||||
"slug": "bahamut-ocean",
|
||||
"testnet": false,
|
||||
"title": "Bahamut ocean"
|
||||
} as const satisfies Chain;
|
||||
@@ -0,0 +1,50 @@
|
||||
import type { Chain } from "../src/types";
|
||||
export default {
|
||||
"chain": "Pentagon",
|
||||
"chainId": 555555,
|
||||
"explorers": [
|
||||
{
|
||||
"name": "Pentagon Testnet Explorer",
|
||||
"url": "https://explorer-testnet.pentagon.games",
|
||||
"standard": "EIP3091",
|
||||
"icon": {
|
||||
"url": "ipfs://QmfU7W3Tm3tGWgnHBTG9vjB4PXGMvcL7Cq8R6MaSaC33DC",
|
||||
"width": 512,
|
||||
"height": 512,
|
||||
"format": "png"
|
||||
}
|
||||
}
|
||||
],
|
||||
"faucets": [
|
||||
"https://bridge-testnet.pentagon.games"
|
||||
],
|
||||
"features": [
|
||||
{
|
||||
"name": "EIP155"
|
||||
},
|
||||
{
|
||||
"name": "EIP1559"
|
||||
}
|
||||
],
|
||||
"icon": {
|
||||
"url": "ipfs://QmfU7W3Tm3tGWgnHBTG9vjB4PXGMvcL7Cq8R6MaSaC33DC",
|
||||
"width": 512,
|
||||
"height": 512,
|
||||
"format": "png"
|
||||
},
|
||||
"infoURL": "https://pentagon.games",
|
||||
"name": "Pentagon Testnet",
|
||||
"nativeCurrency": {
|
||||
"name": "Pentagon",
|
||||
"symbol": "PEN",
|
||||
"decimals": 18
|
||||
},
|
||||
"networkId": 555555,
|
||||
"rpc": [
|
||||
"https://555555.rpc.thirdweb.com/${THIRDWEB_API_KEY}",
|
||||
"https://rpc-testnet.pentagon.games"
|
||||
],
|
||||
"shortName": "pentagon-testnet",
|
||||
"slug": "pentagon-testnet",
|
||||
"testnet": true
|
||||
} as const satisfies Chain;
|
||||
@@ -11,13 +11,13 @@ export default {
|
||||
],
|
||||
"faucets": [],
|
||||
"icon": {
|
||||
"url": "ipfs://QmWm9biSavZ4ixNNSe8KhxiYgYaejY6Y4xRaqmz9fXimo5",
|
||||
"width": 1136,
|
||||
"height": 1112,
|
||||
"url": "ipfs://QmYV6beVVg3iS9RGPno7GAASpgjyBDoKmWGUcvAKe2nXWK",
|
||||
"width": 50,
|
||||
"height": 50,
|
||||
"format": "png"
|
||||
},
|
||||
"infoURL": "https://explorer.coinsec.network/",
|
||||
"name": "COINSEC",
|
||||
"name": "COINSEC Network",
|
||||
"nativeCurrency": {
|
||||
"name": "COINSEC",
|
||||
"symbol": "SEC",
|
||||
@@ -29,7 +29,7 @@ export default {
|
||||
"https://mainnet-rpc.coinsec.network"
|
||||
],
|
||||
"shortName": "coinsecnetwork",
|
||||
"slug": "coinsec",
|
||||
"slug": "coinsec-network",
|
||||
"testnet": false,
|
||||
"title": "COINSEC Network"
|
||||
} as const satisfies Chain;
|
||||
@@ -12,10 +12,10 @@ export default {
|
||||
"faucets": [],
|
||||
"features": [],
|
||||
"icon": {
|
||||
"url": "ipfs://QmZKFekbHxDkB8gFmmmjWz89SLhwg38GkALmAKo3gn753N/2024-01-10%2012.50.15.jpg",
|
||||
"width": 512,
|
||||
"height": 512,
|
||||
"format": "jpg"
|
||||
"url": "ipfs://QmbWFbhjKw7zfsK5Rd9YxZgJgS43fpySPozjhYc98ibbEV/xai-icon.png",
|
||||
"width": 1024,
|
||||
"height": 1024,
|
||||
"format": "png"
|
||||
},
|
||||
"infoURL": "https://xai.games/",
|
||||
"name": "Xai Mainnet",
|
||||
|
||||
@@ -0,0 +1,30 @@
|
||||
import type { Chain } from "../src/types";
|
||||
export default {
|
||||
"chain": "Avalanche",
|
||||
"chainId": 74444,
|
||||
"explorers": [],
|
||||
"faucets": [],
|
||||
"features": [],
|
||||
"icon": {
|
||||
"url": "https://images.ctfassets.net/9bazykntljf6/62CceHSYsRS4D9fgDSkLRB/877cb8f26954e1743ff535fd7fdaf78f/avacloud-placeholder.svg",
|
||||
"width": 256,
|
||||
"height": 256,
|
||||
"format": "svg"
|
||||
},
|
||||
"infoURL": "https://avacloud.io",
|
||||
"name": "QR0612T1TS",
|
||||
"nativeCurrency": {
|
||||
"name": "QR0612T1TS Token",
|
||||
"symbol": "FYJ",
|
||||
"decimals": 18
|
||||
},
|
||||
"networkId": 74444,
|
||||
"redFlags": [],
|
||||
"rpc": [
|
||||
"https://74444.rpc.thirdweb.com/${THIRDWEB_API_KEY}",
|
||||
"https://subnets.avax.network/qr0612t1ts/testnet/rpc"
|
||||
],
|
||||
"shortName": "QR0612T1TS",
|
||||
"slug": "qr0612t1ts",
|
||||
"testnet": true
|
||||
} as const satisfies Chain;
|
||||
@@ -19,8 +19,8 @@ export default {
|
||||
"infoURL": "https://www.boraportal.com",
|
||||
"name": "BORAchain mainnet",
|
||||
"nativeCurrency": {
|
||||
"name": "BGAS",
|
||||
"symbol": "BGAS",
|
||||
"name": "BORA",
|
||||
"symbol": "BORA",
|
||||
"decimals": 18
|
||||
},
|
||||
"networkId": 77001,
|
||||
|
||||
@@ -16,6 +16,7 @@ export default {
|
||||
}
|
||||
],
|
||||
"faucets": [],
|
||||
"features": [],
|
||||
"icon": {
|
||||
"url": "ipfs://bafkreibqgh23s7yt7rikybybiwfivwtoh32n24scjykvgbgewo3ecbrcye",
|
||||
"width": 512,
|
||||
@@ -30,8 +31,10 @@ export default {
|
||||
"decimals": 18
|
||||
},
|
||||
"networkId": 8047,
|
||||
"redFlags": [],
|
||||
"rpc": [
|
||||
"https://8047.rpc.thirdweb.com/${THIRDWEB_API_KEY}",
|
||||
"https://rpc0.come.boats/",
|
||||
"https://rpc0.come.boat/"
|
||||
],
|
||||
"shortName": "boat",
|
||||
|
||||
@@ -0,0 +1,30 @@
|
||||
import type { Chain } from "../src/types";
|
||||
export default {
|
||||
"chain": "Avalanche",
|
||||
"chainId": 82529,
|
||||
"explorers": [],
|
||||
"faucets": [],
|
||||
"features": [],
|
||||
"icon": {
|
||||
"url": "https://images.ctfassets.net/9bazykntljf6/62CceHSYsRS4D9fgDSkLRB/877cb8f26954e1743ff535fd7fdaf78f/avacloud-placeholder.svg",
|
||||
"width": 256,
|
||||
"height": 256,
|
||||
"format": "svg"
|
||||
},
|
||||
"infoURL": "https://avacloud.io",
|
||||
"name": "Test Using Resources",
|
||||
"nativeCurrency": {
|
||||
"name": "Test Using Resources Token",
|
||||
"symbol": "JMH",
|
||||
"decimals": 18
|
||||
},
|
||||
"networkId": 82529,
|
||||
"redFlags": [],
|
||||
"rpc": [
|
||||
"https://82529.rpc.thirdweb.com/${THIRDWEB_API_KEY}",
|
||||
"https://subnets.avax.network/testsize/testnet/rpc"
|
||||
],
|
||||
"shortName": "Test Using Resources",
|
||||
"slug": "test-using-resources",
|
||||
"testnet": true
|
||||
} as const satisfies Chain;
|
||||
@@ -0,0 +1,31 @@
|
||||
import type { Chain } from "../src/types";
|
||||
export default {
|
||||
"chain": "Supernet Testnet",
|
||||
"chainId": 998899,
|
||||
"explorers": [
|
||||
{
|
||||
"name": "supernet-testnet-explorer",
|
||||
"url": "https://testnet-explorer.supernet.chaingames.io",
|
||||
"standard": "EIP3091"
|
||||
}
|
||||
],
|
||||
"faucets": [
|
||||
"https://faucet.chaingames.io"
|
||||
],
|
||||
"name": "Supernet Testnet",
|
||||
"nativeCurrency": {
|
||||
"name": "CHAIN",
|
||||
"symbol": "CHAIN",
|
||||
"decimals": 18
|
||||
},
|
||||
"networkId": 998899,
|
||||
"rpc": [
|
||||
"https://998899.rpc.thirdweb.com/${THIRDWEB_API_KEY}",
|
||||
"https://testnet-rpc.supernet.chaingames.io/"
|
||||
],
|
||||
"shortName": "supernetchain",
|
||||
"slip44": 1,
|
||||
"slug": "supernet-testnet",
|
||||
"testnet": true,
|
||||
"title": "Supernet Testnet"
|
||||
} as const satisfies Chain;
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@thirdweb-dev/chains",
|
||||
"version": "0.1.117",
|
||||
"version": "0.1.118",
|
||||
"main": "dist/thirdweb-dev-chains.cjs.js",
|
||||
"module": "dist/thirdweb-dev-chains.esm.js",
|
||||
"exports": {
|
||||
|
||||
File diff suppressed because one or more lines are too long
@@ -1,5 +1,15 @@
|
||||
# thirdweb
|
||||
|
||||
## 0.14.7
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- Updated dependencies [[`9f42e4d`](https://github.com/thirdweb-dev/js/commit/9f42e4d2412df536d1b5f03a4e2a8b516911facb)]:
|
||||
- @thirdweb-dev/chains@0.1.118
|
||||
- @thirdweb-dev/sdk@4.0.94
|
||||
- @thirdweb-dev/wallets@2.5.34
|
||||
- @thirdweb-dev/auth@4.1.92
|
||||
|
||||
## 0.14.6
|
||||
|
||||
### Patch Changes
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
{
|
||||
"name": "@thirdweb-dev/cli",
|
||||
"main": "dist/cli/index.js",
|
||||
"version": "0.14.6",
|
||||
"version": "0.14.7",
|
||||
"repository": "https://github.com/thirdweb-dev/js/tree/main/legacy_packages/cli",
|
||||
"author": "thirdweb eng <[email protected]>",
|
||||
"license": "Apache-2.0",
|
||||
|
||||
@@ -1,5 +1,15 @@
|
||||
# @thirdweb-dev/react-core
|
||||
|
||||
## 4.8.0
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- Updated dependencies [[`9f42e4d`](https://github.com/thirdweb-dev/js/commit/9f42e4d2412df536d1b5f03a4e2a8b516911facb)]:
|
||||
- @thirdweb-dev/chains@0.1.118
|
||||
- @thirdweb-dev/sdk@4.0.94
|
||||
- @thirdweb-dev/wallets@2.5.34
|
||||
- @thirdweb-dev/auth@4.1.92
|
||||
|
||||
## 4.7.0
|
||||
|
||||
### Patch Changes
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@thirdweb-dev/react-core",
|
||||
"version": "4.7.0",
|
||||
"version": "4.8.0",
|
||||
"repository": "https://github.com/thirdweb-dev/js/tree/main/legacy_packages/react-core",
|
||||
"author": "thirdweb eng <[email protected]>",
|
||||
"license": "Apache-2.0",
|
||||
|
||||
Binary file not shown.
@@ -1,5 +1,19 @@
|
||||
# @thirdweb-dev/react
|
||||
|
||||
## 4.8.0
|
||||
|
||||
### Minor Changes
|
||||
|
||||
- [#3296](https://github.com/thirdweb-dev/js/pull/3296) [`841c86a`](https://github.com/thirdweb-dev/js/commit/841c86aa125c5965f43472e5e6f54267eda65726) Thanks [@gregfromstl](https://github.com/gregfromstl)! - Adds private key export
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- Updated dependencies [[`9f42e4d`](https://github.com/thirdweb-dev/js/commit/9f42e4d2412df536d1b5f03a4e2a8b516911facb)]:
|
||||
- @thirdweb-dev/chains@0.1.118
|
||||
- @thirdweb-dev/sdk@4.0.94
|
||||
- @thirdweb-dev/react-core@4.8.0
|
||||
- @thirdweb-dev/wallets@2.5.34
|
||||
|
||||
## 4.7.0
|
||||
|
||||
### Minor Changes
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@thirdweb-dev/react",
|
||||
"version": "4.7.0",
|
||||
"version": "4.8.0",
|
||||
"repository": "https://github.com/thirdweb-dev/js/tree/main/legacy_packages/react",
|
||||
"author": "thirdweb eng <[email protected]>",
|
||||
"license": "Apache-2.0",
|
||||
|
||||
@@ -79,6 +79,7 @@ import { useChainQuery } from "../hooks/useChainQuery";
|
||||
import { SwapScreen } from "./screens/Buy/swap/SwapScreen";
|
||||
import { SwapTransactionsScreen } from "./screens/SwapTransactionsScreen";
|
||||
import { swapTransactionsStore } from "./screens/Buy/swap/pendingSwapTx";
|
||||
import { ExportPrivateKey } from "../wallets/embeddedWallet/ExportPrivateKey";
|
||||
|
||||
const TW_CONNECTED_WALLET = "tw-connected-wallet";
|
||||
|
||||
@@ -89,7 +90,8 @@ type WalletDetailsModalScreen =
|
||||
| "buy"
|
||||
| "receive"
|
||||
| "network-switcher"
|
||||
| "pending-tx";
|
||||
| "pending-tx"
|
||||
| "private-key";
|
||||
|
||||
export const ConnectedWalletDetails: React.FC<{
|
||||
onDisconnect: () => void;
|
||||
@@ -573,6 +575,23 @@ export const ConnectedWalletDetails: React.FC<{
|
||||
</div>
|
||||
)}
|
||||
|
||||
{/* Export Embedded Wallet */}
|
||||
{activeWallet?.walletId === walletIds.embeddedWallet && (
|
||||
<div>
|
||||
<MenuButton
|
||||
onClick={() => {
|
||||
setScreen("private-key");
|
||||
}}
|
||||
style={{
|
||||
fontSize: fontSize.sm,
|
||||
}}
|
||||
>
|
||||
<PinBottomIcon width={iconSize.md} height={iconSize.md} />
|
||||
<Text color="primaryText">{"Export Private Key"}</Text>
|
||||
</MenuButton>
|
||||
</div>
|
||||
)}
|
||||
|
||||
{props.detailsModalFooter && (
|
||||
<props.detailsModalFooter close={() => setIsOpen(false)} />
|
||||
)}
|
||||
@@ -645,6 +664,16 @@ export const ConnectedWalletDetails: React.FC<{
|
||||
}}
|
||||
/>
|
||||
);
|
||||
} else if (screen === "private-key") {
|
||||
content = (
|
||||
<ExportPrivateKey
|
||||
theme={props.theme}
|
||||
walletInstance={activeWallet}
|
||||
onBack={() => {
|
||||
setScreen("main");
|
||||
}}
|
||||
/>
|
||||
);
|
||||
} else if (screen === "send" && walletChainId) {
|
||||
content = (
|
||||
<SendFunds
|
||||
|
||||
@@ -0,0 +1,45 @@
|
||||
import {
|
||||
Container,
|
||||
ModalHeader,
|
||||
} from "../../../components/basic";
|
||||
import {
|
||||
WalletInstance,
|
||||
} from "@thirdweb-dev/react-core";
|
||||
import { Theme } from "../../../design-system";
|
||||
|
||||
export const ExportPrivateKey: React.FC<{
|
||||
onBack?: () => void;
|
||||
walletInstance?: WalletInstance;
|
||||
walletAddress?: string;
|
||||
theme: "light" | "dark" | Theme;
|
||||
}> = (props) => {
|
||||
|
||||
return (
|
||||
<Container fullHeight animate="fadein">
|
||||
<Container p="lg">
|
||||
<ModalHeader
|
||||
onBack={props.onBack}
|
||||
title="Export Private Key"
|
||||
/>
|
||||
</Container>
|
||||
<Container p="md">
|
||||
<iframe
|
||||
title="Export In-App Wallet"
|
||||
style={{
|
||||
width: "100%",
|
||||
height: "250px",
|
||||
|
||||
}}
|
||||
|
||||
allow="clipboard-read; clipboard-write"
|
||||
src={`https://embedded-wallet.thirdweb.com//sdk/2022-08-12/embedded-wallet/export-private-key?clientId=${
|
||||
props.walletInstance?.getOptions()?.clientId
|
||||
}&theme=${
|
||||
typeof props.theme === "string" ? props.theme : props.theme.type
|
||||
}`}
|
||||
/>
|
||||
</Container>
|
||||
</Container>
|
||||
);
|
||||
};
|
||||
|
||||
Binary file not shown.
@@ -1,5 +1,13 @@
|
||||
# @thirdweb-dev/sdk
|
||||
|
||||
## 4.0.94
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- Updated dependencies [[`b248afc`](https://github.com/thirdweb-dev/js/commit/b248afc16062f8fe0967e42535ae119642897003), [`9f42e4d`](https://github.com/thirdweb-dev/js/commit/9f42e4d2412df536d1b5f03a4e2a8b516911facb), [`132b3cb`](https://github.com/thirdweb-dev/js/commit/132b3cb45ae1d56f8de240a361b31c76d5b9b4a7), [`e7ba698`](https://github.com/thirdweb-dev/js/commit/e7ba698f3e60e0749f8739ad1aec76a8ab2c2fb3)]:
|
||||
- thirdweb@5.29.1
|
||||
- @thirdweb-dev/chains@0.1.118
|
||||
|
||||
## 4.0.93
|
||||
|
||||
### Patch Changes
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@thirdweb-dev/sdk",
|
||||
"version": "4.0.93",
|
||||
"version": "4.0.94",
|
||||
"description": "The main thirdweb SDK.",
|
||||
"repository": "https://github.com/thirdweb-dev/js/tree/main/legacy_packages/sdk",
|
||||
"license": "Apache-2.0",
|
||||
|
||||
@@ -78,7 +78,7 @@ export class ContractRoles<TContract extends IPermissions, TRole extends Role>
|
||||
/**
|
||||
* Get all members of a specific role
|
||||
* @remarks See {@link ContractRoles.getAll} to get get a list of addresses for all supported roles on the contract.
|
||||
* @param role - The Role to to get a memberlist for.
|
||||
* @param role - The Role to get a memberlist for.
|
||||
* @returns The list of addresses that are members of the specific role.
|
||||
* @throws If you are requesting a role that does not exist on the contract this will throw an error.
|
||||
*
|
||||
|
||||
@@ -9,7 +9,7 @@ import type {
|
||||
} from "ethers";
|
||||
import { ChainInfo } from "../schema/shared/ChainInfo";
|
||||
|
||||
// --- utility types extracted from from ts-toolbelt --- //
|
||||
// --- utility types extracted from ts-toolbelt --- //
|
||||
|
||||
// if
|
||||
type TBoolean = 0 | 1;
|
||||
|
||||
Binary file not shown.
Binary file not shown.
@@ -1,5 +1,15 @@
|
||||
# @thirdweb-dev/unity-js-bridge
|
||||
|
||||
## 0.6.43
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- Updated dependencies [[`9f42e4d`](https://github.com/thirdweb-dev/js/commit/9f42e4d2412df536d1b5f03a4e2a8b516911facb)]:
|
||||
- @thirdweb-dev/chains@0.1.118
|
||||
- @thirdweb-dev/sdk@4.0.94
|
||||
- @thirdweb-dev/wallets@2.5.34
|
||||
- @thirdweb-dev/auth@4.1.92
|
||||
|
||||
## 0.6.42
|
||||
|
||||
### Patch Changes
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@thirdweb-dev/unity-js-bridge",
|
||||
"version": "0.6.42",
|
||||
"version": "0.6.43",
|
||||
"main": "dist/thirdweb-unity-bridge.js",
|
||||
"repository": "https://github.com/thirdweb-dev/js/tree/main/packages/unity-js-bridge",
|
||||
"license": "Apache-2.0",
|
||||
|
||||
@@ -1,5 +1,13 @@
|
||||
# @thirdweb-dev/wallets
|
||||
|
||||
## 2.5.34
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- Updated dependencies [[`9f42e4d`](https://github.com/thirdweb-dev/js/commit/9f42e4d2412df536d1b5f03a4e2a8b516911facb)]:
|
||||
- @thirdweb-dev/chains@0.1.118
|
||||
- @thirdweb-dev/sdk@4.0.94
|
||||
|
||||
## 2.5.33
|
||||
|
||||
### Patch Changes
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@thirdweb-dev/wallets",
|
||||
"version": "2.5.33",
|
||||
"version": "2.5.34",
|
||||
"main": "dist/thirdweb-dev-wallets.cjs.js",
|
||||
"module": "dist/thirdweb-dev-wallets.esm.js",
|
||||
"browser": {
|
||||
|
||||
Binary file not shown.
@@ -1,5 +1,11 @@
|
||||
# @thirdweb-dev/service-utils
|
||||
|
||||
## 0.4.32
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- [#3286](https://github.com/thirdweb-dev/js/pull/3286) [`901427c`](https://github.com/thirdweb-dev/js/commit/901427c33c5daf330887b501ec8f9f42aa20ff85) Thanks [@ElasticBottle](https://github.com/ElasticBottle)! - add ecosystemId and ecosystemPartnerId to usage tracking schema for cf worker
|
||||
|
||||
## 0.4.31
|
||||
|
||||
### Patch Changes
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@thirdweb-dev/service-utils",
|
||||
"version": "0.4.31",
|
||||
"version": "0.4.32",
|
||||
"main": "dist/thirdweb-dev-service-utils.cjs.js",
|
||||
"module": "dist/thirdweb-dev-service-utils.esm.js",
|
||||
"exports": {
|
||||
|
||||
@@ -15,6 +15,7 @@ function getAws(options: ConstructorParameters<typeof AwsClient>[0]) {
|
||||
*/
|
||||
const usageEventSchema = z.object({
|
||||
source: z.enum([
|
||||
"ecosystemWallets",
|
||||
"embeddedWallets",
|
||||
"rpc",
|
||||
"storage",
|
||||
@@ -84,6 +85,9 @@ const usageEventSchema = z.object({
|
||||
"TRACE",
|
||||
])
|
||||
.optional(),
|
||||
// Used to identify the ecosystem that the an ecosystem wallet belongs too
|
||||
ecosystemId: z.string().optional(),
|
||||
ecosystemPartnerId: z.string().optional(),
|
||||
});
|
||||
export type UsageEvent = z.infer<typeof usageEventSchema>;
|
||||
|
||||
|
||||
@@ -1,5 +1,15 @@
|
||||
# thirdweb
|
||||
|
||||
## 5.29.1
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- [#3290](https://github.com/thirdweb-dev/js/pull/3290) [`b248afc`](https://github.com/thirdweb-dev/js/commit/b248afc16062f8fe0967e42535ae119642897003) Thanks [@alecananian](https://github.com/alecananian)! - Fixed Connect modal title not using custom title and icon in compact mode
|
||||
|
||||
- [#3292](https://github.com/thirdweb-dev/js/pull/3292) [`132b3cb`](https://github.com/thirdweb-dev/js/commit/132b3cb45ae1d56f8de240a361b31c76d5b9b4a7) Thanks [@alecananian](https://github.com/alecananian)! - Updated the `ConnectButton` `label` prop to be of type `ReactNode`
|
||||
|
||||
- [#3305](https://github.com/thirdweb-dev/js/pull/3305) [`e7ba698`](https://github.com/thirdweb-dev/js/commit/e7ba698f3e60e0749f8739ad1aec76a8ab2c2fb3) Thanks [@gregfromstl](https://github.com/gregfromstl)! - Fix default sale and royalty recipients for signature mints
|
||||
|
||||
## 5.29.0
|
||||
|
||||
### Minor Changes
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "thirdweb",
|
||||
"version": "5.29.0",
|
||||
"version": "5.29.1",
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "git+https://github.com/thirdweb-dev/js.git#main"
|
||||
|
||||
@@ -17,9 +17,15 @@ const CUSTOM_CHAIN_MAP = new Map<number, Chain>();
|
||||
* @param options The options for the chain.
|
||||
* @returns The defined chain.
|
||||
* @example
|
||||
* Just pass the chain ID to connect to:
|
||||
* ```ts
|
||||
* const chain = defineChain(1);
|
||||
* ```
|
||||
* Or pass your own RPC or custom values:
|
||||
* ```ts
|
||||
* const chain = defineChain({
|
||||
* id: 1,
|
||||
* rpc: "https://my-rpc.com",
|
||||
* nativeCurrency: {
|
||||
* name: "Ether",
|
||||
* symbol: "ETH",
|
||||
|
||||
@@ -14,4 +14,9 @@ export function isNativeTokenAddress(address: string) {
|
||||
/**
|
||||
* The zero address in Ethereum, represented as a hexadecimal string.
|
||||
*/
|
||||
export const ADDRESS_ZERO = "0x0000000000000000000000000000000000000000";
|
||||
export const ZERO_ADDRESS = "0x0000000000000000000000000000000000000000";
|
||||
|
||||
/**
|
||||
* @deprecated Use {@link ZERO_ADDRESS}.
|
||||
*/
|
||||
export const ADDRESS_ZERO = ZERO_ADDRESS;
|
||||
|
||||
@@ -8,7 +8,11 @@ declare module "abitype" {
|
||||
/**
|
||||
* CONSTANTS
|
||||
*/
|
||||
export { ADDRESS_ZERO, NATIVE_TOKEN_ADDRESS } from "../constants/addresses.js";
|
||||
export {
|
||||
ADDRESS_ZERO,
|
||||
ZERO_ADDRESS,
|
||||
NATIVE_TOKEN_ADDRESS,
|
||||
} from "../constants/addresses.js";
|
||||
|
||||
/**
|
||||
* CLIENT
|
||||
|
||||
@@ -135,15 +135,46 @@ export async function generateMintSignature(
|
||||
const startTime = mintRequest.validityStartTimestamp || new Date(0);
|
||||
const endTime = mintRequest.validityEndTimestamp || tenYearsFromNow();
|
||||
|
||||
let saleRecipient: Address;
|
||||
if (
|
||||
mintRequest.primarySaleRecipient?.length === 0 ||
|
||||
!mintRequest.primarySaleRecipient
|
||||
) {
|
||||
const { primarySaleRecipient } = await import(
|
||||
"../../common/__generated__/IPrimarySale/read/primarySaleRecipient.js"
|
||||
);
|
||||
saleRecipient = await primarySaleRecipient({
|
||||
contract,
|
||||
});
|
||||
} else {
|
||||
saleRecipient = mintRequest.primarySaleRecipient;
|
||||
}
|
||||
|
||||
let royaltyRecipient: Address;
|
||||
if (
|
||||
mintRequest.royaltyRecipient?.length === 0 ||
|
||||
!mintRequest.royaltyRecipient
|
||||
) {
|
||||
const { getDefaultRoyaltyInfo } = await import(
|
||||
"../../common/__generated__/IRoyalty/read/getDefaultRoyaltyInfo.js"
|
||||
);
|
||||
const royaltyInfo = await getDefaultRoyaltyInfo({
|
||||
contract,
|
||||
});
|
||||
royaltyRecipient = royaltyInfo[0];
|
||||
} else {
|
||||
royaltyRecipient = mintRequest.royaltyRecipient;
|
||||
}
|
||||
|
||||
const payload: PayloadType = {
|
||||
uri,
|
||||
currency,
|
||||
uid,
|
||||
price,
|
||||
to: mintRequest.to,
|
||||
royaltyRecipient: mintRequest.royaltyRecipient || account.address,
|
||||
royaltyRecipient: royaltyRecipient,
|
||||
royaltyBps: toBigInt(mintRequest.royaltyBps || 0),
|
||||
primarySaleRecipient: mintRequest.primarySaleRecipient || account.address,
|
||||
primarySaleRecipient: saleRecipient,
|
||||
validityStartTimestamp: dateToSeconds(startTime),
|
||||
validityEndTimestamp: dateToSeconds(endTime),
|
||||
};
|
||||
|
||||
@@ -4,6 +4,7 @@ import { TEST_CLIENT } from "../../../../test/src/test-clients.js";
|
||||
import {
|
||||
TEST_ACCOUNT_A,
|
||||
TEST_ACCOUNT_B,
|
||||
TEST_ACCOUNT_C,
|
||||
} from "../../../../test/src/test-wallets.js";
|
||||
import { NATIVE_TOKEN_ADDRESS } from "../../../constants/addresses.js";
|
||||
import {
|
||||
@@ -34,6 +35,8 @@ describe.runIf(process.env.TW_SECRET_KEY)(
|
||||
params: {
|
||||
name: "Test",
|
||||
symbol: "TST",
|
||||
royaltyRecipient: TEST_ACCOUNT_C.address,
|
||||
saleRecipient: TEST_ACCOUNT_B.address,
|
||||
},
|
||||
type: "TokenERC721",
|
||||
}),
|
||||
@@ -93,13 +96,9 @@ describe.runIf(process.env.TW_SECRET_KEY)(
|
||||
});
|
||||
|
||||
expect(payload.to).toBe("0x70997970C51812dc3A010C7d01b50e0d17dc79C8");
|
||||
expect(payload.royaltyRecipient).toBe(
|
||||
"0xf39Fd6e51aad88F6F4ce6aB8827279cffFb92266",
|
||||
);
|
||||
expect(payload.royaltyRecipient).toBe(TEST_ACCOUNT_C.address);
|
||||
expect(payload.royaltyBps).toBe(0n);
|
||||
expect(payload.primarySaleRecipient).toBe(
|
||||
"0xf39Fd6e51aad88F6F4ce6aB8827279cffFb92266",
|
||||
);
|
||||
expect(payload.primarySaleRecipient).toBe(TEST_ACCOUNT_B.address);
|
||||
expect(payload.uri).toBe("https://example.com/token");
|
||||
expect(payload.price).toBe(0n);
|
||||
expect(payload.currency).toBe(NATIVE_TOKEN_ADDRESS);
|
||||
@@ -156,5 +155,28 @@ describe.runIf(process.env.TW_SECRET_KEY)(
|
||||
);
|
||||
expect(signature.length).toBe(132);
|
||||
});
|
||||
|
||||
it("should default sale recipient to the contract's primarySaleRecipient when empty", async () => {
|
||||
const { payload, signature } = await generateMintSignature({
|
||||
mintRequest: {
|
||||
to: TEST_ACCOUNT_B.address,
|
||||
royaltyBps: 500,
|
||||
metadata: "https://example.com/token",
|
||||
price: "0.2",
|
||||
currency: erc20TokenContract.address,
|
||||
validityStartTimestamp: new Date(1635724800),
|
||||
validityEndTimestamp: new Date(1867260800),
|
||||
uid: toHex("abcdef1234567890", { size: 32 }),
|
||||
primarySaleRecipient: "",
|
||||
royaltyRecipient: "",
|
||||
},
|
||||
account: TEST_ACCOUNT_A,
|
||||
contract: erc721Contract,
|
||||
});
|
||||
|
||||
expect(payload.royaltyRecipient).toBe(TEST_ACCOUNT_C.address);
|
||||
expect(payload.primarySaleRecipient).toBe(TEST_ACCOUNT_B.address);
|
||||
expect(signature.length).toBe(132);
|
||||
});
|
||||
},
|
||||
);
|
||||
|
||||
@@ -193,7 +193,9 @@ function ConnectButtonInner(
|
||||
aria-label={
|
||||
connectionStatus === "connecting"
|
||||
? locale.connecting
|
||||
: connectButtonLabel
|
||||
: typeof connectButtonLabel === "string"
|
||||
? connectButtonLabel
|
||||
: locale.defaultButtonTitle
|
||||
}
|
||||
onClick={() => {
|
||||
setIsWalletModalOpen(true);
|
||||
|
||||
@@ -90,7 +90,7 @@ export type ConnectButton_connectButtonOptions = {
|
||||
* }} />
|
||||
* ```
|
||||
*/
|
||||
label?: string;
|
||||
label?: React.ReactNode;
|
||||
|
||||
/**
|
||||
* CSS class to apply to the button element
|
||||
|
||||
@@ -42,7 +42,7 @@ export function ModalHeader(props: {
|
||||
style={{
|
||||
display: "flex",
|
||||
alignItems: "center",
|
||||
justifyContent: "center",
|
||||
justifyContent: onBack ? "center" : "flex-start",
|
||||
position: "relative",
|
||||
}}
|
||||
>
|
||||
@@ -56,7 +56,7 @@ export function ModalHeader(props: {
|
||||
}}
|
||||
/>
|
||||
)}
|
||||
<Container flex="row" gap="xs" center="both">
|
||||
<Container flex="row" gap="xs" center={"both"}>
|
||||
{typeof title === "string" ? <ModalTitle>{title}</ModalTitle> : title}
|
||||
</Container>
|
||||
</div>
|
||||
|
||||
@@ -28,6 +28,7 @@ import { Spacer } from "../../ui/components/Spacer.js";
|
||||
import { TextDivider } from "../../ui/components/TextDivider.js";
|
||||
import { Container, ModalHeader } from "../../ui/components/basic.js";
|
||||
import { Button } from "../../ui/components/buttons.js";
|
||||
import { ModalTitle } from "../../ui/components/modalElements.js";
|
||||
import { InputSelectionUI } from "./InputSelectionUI.js";
|
||||
import type { InAppWalletLocale } from "./locale/types.js";
|
||||
import { openOauthSignInWindow } from "./openOauthSignInWindow.js";
|
||||
@@ -336,7 +337,7 @@ export const InAppWalletFormUI = (props: InAppWalletFormUIProps) => {
|
||||
*/
|
||||
export function InAppWalletFormUIScreen(props: InAppWalletFormUIProps) {
|
||||
const locale = props.locale.emailLoginScreen;
|
||||
const { connectModal } = useConnectUI();
|
||||
const { connectModal, client } = useConnectUI();
|
||||
const isCompact = connectModal.size === "compact";
|
||||
const { initialScreen, screen } = useScreenContext();
|
||||
|
||||
@@ -357,8 +358,23 @@ export function InAppWalletFormUIScreen(props: InAppWalletFormUIProps) {
|
||||
>
|
||||
{isCompact ? (
|
||||
<>
|
||||
<ModalHeader onBack={onBack} title={locale.title} />
|
||||
<Spacer y="sm" />
|
||||
<ModalHeader
|
||||
onBack={onBack}
|
||||
title={
|
||||
<>
|
||||
{!connectModal.titleIcon ? null : (
|
||||
<Img
|
||||
src={connectModal.titleIcon}
|
||||
width={iconSize.md}
|
||||
height={iconSize.md}
|
||||
client={client}
|
||||
/>
|
||||
)}
|
||||
<ModalTitle>{connectModal.title ?? locale.title}</ModalTitle>
|
||||
</>
|
||||
}
|
||||
/>
|
||||
<Spacer y="lg" />
|
||||
</>
|
||||
) : null}
|
||||
|
||||
|
||||
@@ -41,7 +41,7 @@ export function resolveScheme(options: ResolveSchemeOptions) {
|
||||
bundleId = (globalThis as any).Application.applicationId;
|
||||
}
|
||||
|
||||
// purposefully using SPLIT here and and not replace for CID to avoid cases where users don't know the schema
|
||||
// purposefully using SPLIT here and not replace for CID to avoid cases where users don't know the schema
|
||||
// also only splitting on `/ipfs` to avoid cases where people pass non `/` terminated gateway urls
|
||||
return `${
|
||||
gateway.replace("{clientId}", clientId).split("/ipfs")[0]
|
||||
|
||||
@@ -2,11 +2,14 @@ import type { Abi, AbiFunction } from "abitype";
|
||||
import type { WalletSendCallsParameters as ViemWalletSendCallsParameters } from "viem";
|
||||
import type { Chain } from "../../chains/types.js";
|
||||
import type { ThirdwebClient } from "../../client/client.js";
|
||||
import { toSerializableTransaction } from "../../transaction/actions/to-serializable-transaction.js";
|
||||
import { encode } from "../../transaction/actions/encode.js";
|
||||
import type { PreparedTransaction } from "../../transaction/prepare-transaction.js";
|
||||
import { type Address, getAddress } from "../../utils/address.js";
|
||||
import { type Hex, numberToHex } from "../../utils/encoding/hex.js";
|
||||
import type { PromisedObject } from "../../utils/promise/resolve-promised-value.js";
|
||||
import {
|
||||
type PromisedObject,
|
||||
resolvePromisedValue,
|
||||
} from "../../utils/promise/resolve-promised-value.js";
|
||||
import type { OneOf } from "../../utils/type-utils.js";
|
||||
import { isCoinbaseSDKWallet } from "../coinbase/coinbaseSDKWallet.js";
|
||||
import { isInAppWallet } from "../in-app/core/wallet/index.js";
|
||||
@@ -144,22 +147,23 @@ export async function sendCalls<const ID extends WalletId>(
|
||||
|
||||
const preparedCalls: EIP5792Call[] = await Promise.all(
|
||||
calls.map(async (call) => {
|
||||
const serializableTransaction = await toSerializableTransaction({
|
||||
transaction: call,
|
||||
from: account.address,
|
||||
});
|
||||
|
||||
const { to, data, value } = serializableTransaction;
|
||||
if (to === undefined && data === undefined) {
|
||||
const { to, value } = call;
|
||||
if (to === undefined && call.data === undefined) {
|
||||
throw new Error("Cannot send call, `to` or `data` must be provided.");
|
||||
}
|
||||
|
||||
const [_to, _data, _value] = await Promise.all([
|
||||
resolvePromisedValue(to),
|
||||
encode(call),
|
||||
resolvePromisedValue(value),
|
||||
]);
|
||||
|
||||
return {
|
||||
to: to as Address,
|
||||
data: data as Hex,
|
||||
to: _to as Address,
|
||||
data: _data as Hex,
|
||||
value:
|
||||
typeof value === "bigint" || typeof value === "number"
|
||||
? numberToHex(value)
|
||||
typeof _value === "bigint" || typeof _value === "number"
|
||||
? numberToHex(_value)
|
||||
: undefined,
|
||||
};
|
||||
}),
|
||||
|
||||
@@ -37,7 +37,7 @@ export async function inAppWalletSendCalls(args: {
|
||||
const { account, calls } = args;
|
||||
|
||||
const hashes: Hex[] = [];
|
||||
const bundleId = await randomBytesHex(65);
|
||||
const bundleId = randomBytesHex(65);
|
||||
bundlesToTransactions.set(bundleId, hashes);
|
||||
if (account.sendBatchTransaction) {
|
||||
const receipt = await sendBatchTransaction({
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import { beforeAll, describe, expect, it } from "vitest";
|
||||
import { TEST_CLIENT } from "../../../test/src/test-clients.js";
|
||||
import { ANVIL_PKEY_C } from "../../../test/src/test-wallets.js";
|
||||
import { ANVIL_PKEY_B } from "../../../test/src/test-wallets.js";
|
||||
import { zkSyncSepolia } from "../../chains/chain-definitions/zksync-sepolia.js";
|
||||
import { defineChain } from "../../chains/utils.js";
|
||||
import { getContract } from "../../contract/contract.js";
|
||||
@@ -25,7 +25,7 @@ const contract = getContract({
|
||||
client,
|
||||
});
|
||||
|
||||
describe.runIf(process.env.TW_SECRET_KEY)(
|
||||
describe.runIf(process.env.TW_SECRET_KEY).skip(
|
||||
"SmartWallet zksync tests",
|
||||
{
|
||||
retry: 0,
|
||||
@@ -35,7 +35,7 @@ describe.runIf(process.env.TW_SECRET_KEY)(
|
||||
beforeAll(async () => {
|
||||
personalAccount = privateKeyToAccount({
|
||||
client,
|
||||
privateKey: ANVIL_PKEY_C,
|
||||
privateKey: ANVIL_PKEY_B,
|
||||
});
|
||||
wallet = smartWallet({
|
||||
chain,
|
||||
|
||||
Binary file not shown.
Reference in New Issue
Block a user