Compare commits
15
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
6fd7497c15 | ||
|
|
25616ca794 | ||
|
|
2a345172a3 | ||
|
|
8cb002259a | ||
|
|
436d9baba2 | ||
|
|
e417f6ac64 | ||
|
|
65ea87425c | ||
|
|
0aea03e418 | ||
|
|
d8b488bbc9 | ||
|
|
cb0ef6a6a2 | ||
|
|
c377290b27 | ||
|
|
35bddd69c5 | ||
|
|
34be385a5c | ||
|
|
79c9e130fd | ||
|
|
9c884e2f55 |
@@ -1,5 +1,26 @@
|
||||
# @thirdweb-dev/auth
|
||||
|
||||
## 4.1.48
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- Updated dependencies []:
|
||||
- @thirdweb-dev/wallets@2.4.26
|
||||
|
||||
## 4.1.47
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- Updated dependencies []:
|
||||
- @thirdweb-dev/wallets@2.4.25
|
||||
|
||||
## 4.1.46
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- Updated dependencies [[`79c9e13`](https://github.com/thirdweb-dev/js/commit/79c9e130fdc6e1f7de1486894a5ac3e6d6776fa4)]:
|
||||
- @thirdweb-dev/wallets@2.4.24
|
||||
|
||||
## 4.1.45
|
||||
|
||||
### Patch Changes
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@thirdweb-dev/auth",
|
||||
"version": "4.1.45",
|
||||
"version": "4.1.48",
|
||||
"main": "dist/thirdweb-dev-auth.cjs.js",
|
||||
"module": "dist/thirdweb-dev-auth.esm.js",
|
||||
"browser": {
|
||||
|
||||
@@ -11,8 +11,8 @@ describe("Wallet Authentication - EVM - Smart Wallet", async () => {
|
||||
let auth: ThirdwebAuth;
|
||||
|
||||
before(async () => {
|
||||
const factoryAddress = "0x13947435c2fe6BE51ED82F6f59C38617a323dB9B";
|
||||
const chain = 80001;
|
||||
const factoryAddress = "0xbf1C9aA4B1A085f7DA890a44E82B0A1289A40052";
|
||||
const chain = 421614;
|
||||
const localWallet = new LocalWallet();
|
||||
await localWallet.generate();
|
||||
const smartWallet = new SmartWallet({
|
||||
@@ -48,12 +48,12 @@ describe("Wallet Authentication - EVM - Smart Wallet", async () => {
|
||||
it("Should verify logged in wallet with chain ID and expiration", async () => {
|
||||
const payload = await auth.login({
|
||||
expirationTime: new Date(Date.now() + 1000 * 60 * 5),
|
||||
chainId: "80001",
|
||||
chainId: "421614",
|
||||
});
|
||||
|
||||
auth.updateWallet(adminWallet);
|
||||
const address = await auth.verify(payload, {
|
||||
chainId: "80001",
|
||||
chainId: "421614",
|
||||
});
|
||||
|
||||
expect(address).to.equal(await signerWallet.getAddress());
|
||||
|
||||
@@ -1,5 +1,11 @@
|
||||
# @thirdweb-dev/chains
|
||||
|
||||
## 0.1.82
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- [#2527](https://github.com/thirdweb-dev/js/pull/2527) [`cb0ef6a`](https://github.com/thirdweb-dev/js/commit/cb0ef6a6a25cee255e18b8489fdb4123bb69c279) Thanks [@github-actions](https://github.com/apps/github-actions)! - Synced Chains Package
|
||||
|
||||
## 0.1.81
|
||||
|
||||
### Patch Changes
|
||||
|
||||
@@ -0,0 +1,30 @@
|
||||
import type { Chain } from "../src/types";
|
||||
export default {
|
||||
"chain": "Avalanche",
|
||||
"chainId": 10050,
|
||||
"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": "QR0327S1D Testnet",
|
||||
"nativeCurrency": {
|
||||
"name": "QR0327S1D Testnet Token",
|
||||
"symbol": "WZL",
|
||||
"decimals": 18
|
||||
},
|
||||
"networkId": 10050,
|
||||
"redFlags": [],
|
||||
"rpc": [
|
||||
"https://10050.rpc.thirdweb.com/${THIRDWEB_API_KEY}",
|
||||
"https://subnets.avax.network/qr0327s1dt/testnet/rpc"
|
||||
],
|
||||
"shortName": "QR0327S1D Testnet",
|
||||
"slug": "qr0327s1d-testnet",
|
||||
"testnet": true
|
||||
} as const satisfies Chain;
|
||||
@@ -0,0 +1,48 @@
|
||||
import type { Chain } from "../src/types";
|
||||
export default {
|
||||
"chain": "CTC",
|
||||
"chainId": 102031,
|
||||
"explorers": [
|
||||
{
|
||||
"name": "blockscout",
|
||||
"url": "https://creditcoin-testnet.blockscout.com",
|
||||
"standard": "EIP3091",
|
||||
"icon": {
|
||||
"url": "ipfs://QmYtUimyqHkkFxYdbXXRbUqNg2VLPUg6Uu2C2nmFWowiZM",
|
||||
"width": 551,
|
||||
"height": 540,
|
||||
"format": "png"
|
||||
}
|
||||
}
|
||||
],
|
||||
"faucets": [],
|
||||
"features": [
|
||||
{
|
||||
"name": "EIP155"
|
||||
},
|
||||
{
|
||||
"name": "EIP1559"
|
||||
}
|
||||
],
|
||||
"icon": {
|
||||
"url": "ipfs://QmTfecECALDCy51zwVbXBSXb6TokqowCYzVLv65etahLxX",
|
||||
"width": 1024,
|
||||
"height": 1024,
|
||||
"format": "png"
|
||||
},
|
||||
"infoURL": "https://creditcoin.org",
|
||||
"name": "Creditcoin Testnet",
|
||||
"nativeCurrency": {
|
||||
"name": "Testnet CTC",
|
||||
"symbol": "tCTC",
|
||||
"decimals": 18
|
||||
},
|
||||
"networkId": 102031,
|
||||
"rpc": [
|
||||
"https://102031.rpc.thirdweb.com/${THIRDWEB_API_KEY}",
|
||||
"https://rpc.cc3-testnet.creditcoin.network"
|
||||
],
|
||||
"shortName": "ctctest",
|
||||
"slug": "creditcoin-testnet",
|
||||
"testnet": true
|
||||
} as const satisfies Chain;
|
||||
@@ -0,0 +1,30 @@
|
||||
import type { Chain } from "../src/types";
|
||||
export default {
|
||||
"chain": "Avalanche",
|
||||
"chainId": 13396,
|
||||
"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": "Masa Network ",
|
||||
"nativeCurrency": {
|
||||
"name": "Masa Network Token",
|
||||
"symbol": "MASA",
|
||||
"decimals": 18
|
||||
},
|
||||
"networkId": 13396,
|
||||
"redFlags": [],
|
||||
"rpc": [
|
||||
"https://13396.rpc.thirdweb.com/${THIRDWEB_API_KEY}",
|
||||
"https://subnets.avax.network/masanetwork/mainnet/rpc"
|
||||
],
|
||||
"shortName": "Masa Network ",
|
||||
"slug": "masa-network",
|
||||
"testnet": false
|
||||
} as const satisfies Chain;
|
||||
@@ -6,9 +6,14 @@ export default {
|
||||
"registry": "0x57f1887a8BF19b14fC0dF6Fd9B2acc9Af147eA85"
|
||||
},
|
||||
"explorers": [
|
||||
{
|
||||
"name": "Blockscout Explorer",
|
||||
"url": "https://blockscout.defi-oracle.io",
|
||||
"standard": "none"
|
||||
},
|
||||
{
|
||||
"name": "Quorum Explorer",
|
||||
"url": "https://public-0138.defi-oracle.io",
|
||||
"url": "https://explorer.defi-oracle.io",
|
||||
"standard": "none"
|
||||
}
|
||||
],
|
||||
@@ -27,7 +32,7 @@ export default {
|
||||
"height": 1043,
|
||||
"format": "png"
|
||||
},
|
||||
"infoURL": "https://defi-oracle.io/",
|
||||
"infoURL": "https://info.defi-oracle.io/",
|
||||
"name": "Defi Oracle Meta Mainnet",
|
||||
"nativeCurrency": {
|
||||
"name": "Ether",
|
||||
@@ -37,8 +42,8 @@ export default {
|
||||
"networkId": 1,
|
||||
"rpc": [
|
||||
"https://138.rpc.thirdweb.com/${THIRDWEB_API_KEY}",
|
||||
"https://rpc.public-0138.defi-oracle.io",
|
||||
"wss://rpc.public-0138.defi-oracle.io"
|
||||
"https://rpc.defi-oracle.io",
|
||||
"wss://wss.defi-oracle.io"
|
||||
],
|
||||
"shortName": "dfio-meta-main",
|
||||
"slip44": 60,
|
||||
|
||||
@@ -0,0 +1,58 @@
|
||||
import type { Chain } from "../src/types";
|
||||
export default {
|
||||
"chain": "SETH",
|
||||
"chainId": 145,
|
||||
"explorers": [
|
||||
{
|
||||
"name": "blockscout",
|
||||
"url": "https://explorer.soraai.bot",
|
||||
"standard": "EIP3091",
|
||||
"icon": {
|
||||
"url": "ipfs://QmYtUimyqHkkFxYdbXXRbUqNg2VLPUg6Uu2C2nmFWowiZM",
|
||||
"width": 551,
|
||||
"height": 540,
|
||||
"format": "png"
|
||||
}
|
||||
}
|
||||
],
|
||||
"faucets": [],
|
||||
"features": [
|
||||
{
|
||||
"name": "EIP155"
|
||||
},
|
||||
{
|
||||
"name": "EIP1559"
|
||||
}
|
||||
],
|
||||
"icon": {
|
||||
"url": "ipfs://QmdwQDr6vmBtXmK2TmknkEuZNoaDqTasFdZdu3DRw8b2wt",
|
||||
"width": 1000,
|
||||
"height": 1628,
|
||||
"format": "png"
|
||||
},
|
||||
"infoURL": "https://soraai.bot",
|
||||
"name": "SoraAI Testnet",
|
||||
"nativeCurrency": {
|
||||
"name": "SoraETH",
|
||||
"symbol": "SETH",
|
||||
"decimals": 18
|
||||
},
|
||||
"networkId": 145,
|
||||
"parent": {
|
||||
"type": "L2",
|
||||
"chain": "eip155-1",
|
||||
"bridges": [
|
||||
{
|
||||
"url": "https://bridge.soraai.bot"
|
||||
}
|
||||
]
|
||||
},
|
||||
"rpc": [
|
||||
"https://145.rpc.thirdweb.com/${THIRDWEB_API_KEY}",
|
||||
"https://rpc-testnet.soraai.bot"
|
||||
],
|
||||
"shortName": "SETH",
|
||||
"slip44": 1,
|
||||
"slug": "soraai-testnet",
|
||||
"testnet": true
|
||||
} as const satisfies Chain;
|
||||
@@ -2,13 +2,7 @@ import type { Chain } from "../src/types";
|
||||
export default {
|
||||
"chain": "ETH",
|
||||
"chainId": 17186,
|
||||
"explorers": [
|
||||
{
|
||||
"name": "lazy crimson coral explorer",
|
||||
"url": "https://explorerl2new-lazy-crimson-coral-cotlv0ftqf.t.conduit.xyz",
|
||||
"standard": "standard"
|
||||
}
|
||||
],
|
||||
"explorers": [],
|
||||
"faucets": [],
|
||||
"features": [],
|
||||
"name": "lazy-crimson-coral",
|
||||
@@ -28,7 +22,10 @@ export default {
|
||||
]
|
||||
},
|
||||
"redFlags": [],
|
||||
"rpc": [],
|
||||
"rpc": [
|
||||
"https://17186.rpc.thirdweb.com/${THIRDWEB_API_KEY}",
|
||||
"https://l2-lazy-crimson-coral-cotlv0ftqf.t.conduit.xyz"
|
||||
],
|
||||
"shortName": "lazy-crimson-coral",
|
||||
"slug": "lazy-crimson-coral",
|
||||
"testnet": true
|
||||
|
||||
@@ -25,6 +25,6 @@ export default {
|
||||
"https://subnets.avax.network/defi-kingdoms/dfk-chain/rpc"
|
||||
],
|
||||
"shortName": "QaUser4 Testnet",
|
||||
"slug": "qauser4-testnet",
|
||||
"slug": "qauser4-testnet-qauser4 testnet-18898",
|
||||
"testnet": true
|
||||
} as const satisfies Chain;
|
||||
@@ -29,7 +29,10 @@ export default {
|
||||
"rpc": [
|
||||
"https://200810.rpc.thirdweb.com/${THIRDWEB_API_KEY}",
|
||||
"https://testnet-rpc.bitlayer.org",
|
||||
"wss://testnet-ws.bitlayer.org"
|
||||
"wss://testnet-ws.bitlayer.org",
|
||||
"https://testnet-rpc.bitlayer-rpc.com",
|
||||
"wss://testnet-ws.bitlayer-rpc.com",
|
||||
"https://rpc.ankr.com/bitlayer_testnet"
|
||||
],
|
||||
"shortName": "Bitlayer",
|
||||
"slip44": 1,
|
||||
|
||||
@@ -0,0 +1,28 @@
|
||||
import type { Chain } from "../src/types";
|
||||
export default {
|
||||
"chain": "YMTECH-BESU",
|
||||
"chainId": 202401,
|
||||
"explorers": [
|
||||
{
|
||||
"name": "YMTECH-BESU Chainlens",
|
||||
"url": "http://39.119.118.198",
|
||||
"standard": "none"
|
||||
}
|
||||
],
|
||||
"faucets": [],
|
||||
"infoURL": "https://www.ymtech.co.kr",
|
||||
"name": "YMTECH-BESU Testnet",
|
||||
"nativeCurrency": {
|
||||
"name": "ETH",
|
||||
"symbol": "ETH",
|
||||
"decimals": 18
|
||||
},
|
||||
"networkId": 202401,
|
||||
"rpc": [
|
||||
"https://202401.rpc.thirdweb.com/${THIRDWEB_API_KEY}",
|
||||
"http://39.119.118.216:8545"
|
||||
],
|
||||
"shortName": "YMTECH-BESU",
|
||||
"slug": "ymtech-besu-testnet",
|
||||
"testnet": true
|
||||
} as const satisfies Chain;
|
||||
@@ -0,0 +1,42 @@
|
||||
import type { Chain } from "../src/types";
|
||||
export default {
|
||||
"chain": "FTH",
|
||||
"chainId": 308,
|
||||
"explorers": [
|
||||
{
|
||||
"name": "Furthscan Network Explorer",
|
||||
"url": "http://furthscan.com/",
|
||||
"standard": "standard",
|
||||
"icon": {
|
||||
"url": "ipfs://QmaZCiLBHGvQptmspWseHHs6L9iCHGKZbqVTqZ7Cf557Vg",
|
||||
"width": 512,
|
||||
"height": 512,
|
||||
"format": "png"
|
||||
}
|
||||
}
|
||||
],
|
||||
"faucets": [],
|
||||
"features": [],
|
||||
"icon": {
|
||||
"url": "ipfs://QmaZCiLBHGvQptmspWseHHs6L9iCHGKZbqVTqZ7Cf557Vg",
|
||||
"width": 512,
|
||||
"height": 512,
|
||||
"format": "png"
|
||||
},
|
||||
"infoURL": "http://furthscan.com/",
|
||||
"name": "Furtheon Network",
|
||||
"nativeCurrency": {
|
||||
"name": "Furtheon",
|
||||
"symbol": "FTH",
|
||||
"decimals": 18
|
||||
},
|
||||
"networkId": 308,
|
||||
"redFlags": [],
|
||||
"rpc": [
|
||||
"https://308.rpc.thirdweb.com/${THIRDWEB_API_KEY}",
|
||||
"https://rpc.furtheon.org/"
|
||||
],
|
||||
"shortName": "FTH",
|
||||
"slug": "furtheon-network",
|
||||
"testnet": false
|
||||
} as const satisfies Chain;
|
||||
@@ -0,0 +1,30 @@
|
||||
import type { Chain } from "../src/types";
|
||||
export default {
|
||||
"chain": "Avalanche",
|
||||
"chainId": 30915,
|
||||
"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": "Deboard's Testnet",
|
||||
"nativeCurrency": {
|
||||
"name": "Deboard's Testnet Token",
|
||||
"symbol": "DEVAX",
|
||||
"decimals": 18
|
||||
},
|
||||
"networkId": 30915,
|
||||
"redFlags": [],
|
||||
"rpc": [
|
||||
"https://30915.rpc.thirdweb.com/${THIRDWEB_API_KEY}",
|
||||
"https://subnets.avax.network/deboardste/testnet/rpc"
|
||||
],
|
||||
"shortName": "Deboard's Testnet",
|
||||
"slug": "deboard-s-testnet",
|
||||
"testnet": true
|
||||
} as const satisfies Chain;
|
||||
@@ -0,0 +1,30 @@
|
||||
import type { Chain } from "../src/types";
|
||||
export default {
|
||||
"chain": "Avalanche",
|
||||
"chainId": 32517,
|
||||
"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": "QaUser4536 Testnet",
|
||||
"nativeCurrency": {
|
||||
"name": "QaUser4536 Testnet Token",
|
||||
"symbol": "ZKJ",
|
||||
"decimals": 18
|
||||
},
|
||||
"networkId": 32517,
|
||||
"redFlags": [],
|
||||
"rpc": [
|
||||
"https://32517.rpc.thirdweb.com/${THIRDWEB_API_KEY}",
|
||||
"https://subnets.avax.network/defi-kingdoms/dfk-chain/rpc"
|
||||
],
|
||||
"shortName": "QaUser4536 Testnet",
|
||||
"slug": "qauser4536-testnet",
|
||||
"testnet": true
|
||||
} as const satisfies Chain;
|
||||
@@ -0,0 +1,30 @@
|
||||
import type { Chain } from "../src/types";
|
||||
export default {
|
||||
"chain": "Avalanche",
|
||||
"chainId": 36746,
|
||||
"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": "QaUser1213 Testnet",
|
||||
"nativeCurrency": {
|
||||
"name": "QaUser1213 Testnet Token",
|
||||
"symbol": "ZKJ",
|
||||
"decimals": 18
|
||||
},
|
||||
"networkId": 36746,
|
||||
"redFlags": [],
|
||||
"rpc": [
|
||||
"https://36746.rpc.thirdweb.com/${THIRDWEB_API_KEY}",
|
||||
"https://subnets.avax.network/defi-kingdoms/dfk-chain/rpc"
|
||||
],
|
||||
"shortName": "QaUser1213 Testnet",
|
||||
"slug": "qauser1213-testnet",
|
||||
"testnet": true
|
||||
} as const satisfies Chain;
|
||||
@@ -0,0 +1,24 @@
|
||||
import type { Chain } from "../src/types";
|
||||
export default {
|
||||
"chain": "ETH",
|
||||
"chainId": 43111,
|
||||
"explorers": [],
|
||||
"faucets": [],
|
||||
"infoURL": "https://hemi.xyz",
|
||||
"name": "Hemi Network",
|
||||
"nativeCurrency": {
|
||||
"name": "Ether",
|
||||
"symbol": "ETH",
|
||||
"decimals": 18
|
||||
},
|
||||
"networkId": 43111,
|
||||
"parent": {
|
||||
"type": "L2",
|
||||
"chain": "eip155-1"
|
||||
},
|
||||
"rpc": [],
|
||||
"shortName": "hemi",
|
||||
"slug": "hemi-network",
|
||||
"status": "incubating",
|
||||
"testnet": false
|
||||
} as const satisfies Chain;
|
||||
@@ -0,0 +1,42 @@
|
||||
import type { Chain } from "../src/types";
|
||||
export default {
|
||||
"chain": "ETH",
|
||||
"chainId": 5151706,
|
||||
"explorers": [
|
||||
{
|
||||
"name": "Explorer",
|
||||
"url": "https://explorer.lootchain.com/",
|
||||
"standard": "EIP3091",
|
||||
"icon": {
|
||||
"url": "ipfs://QmdwQDr6vmBtXmK2TmknkEuZNoaDqTasFdZdu3DRw8b2wt",
|
||||
"width": 1000,
|
||||
"height": 1628,
|
||||
"format": "png"
|
||||
}
|
||||
}
|
||||
],
|
||||
"faucets": [],
|
||||
"features": [],
|
||||
"icon": {
|
||||
"url": "ipfs://QmdwQDr6vmBtXmK2TmknkEuZNoaDqTasFdZdu3DRw8b2wt",
|
||||
"width": 1000,
|
||||
"height": 1628,
|
||||
"format": "png"
|
||||
},
|
||||
"infoURL": "https://adventuregold.org/",
|
||||
"name": "Loot Chain Mainnet",
|
||||
"nativeCurrency": {
|
||||
"name": "AGLD",
|
||||
"symbol": "AGLD",
|
||||
"decimals": 18
|
||||
},
|
||||
"networkId": 5151706,
|
||||
"redFlags": [],
|
||||
"rpc": [
|
||||
"https://5151706.rpc.thirdweb.com/${THIRDWEB_API_KEY}",
|
||||
"https://rpc.lootchain.com/http "
|
||||
],
|
||||
"shortName": "AGLD",
|
||||
"slug": "loot-chain",
|
||||
"testnet": true
|
||||
} as const satisfies Chain;
|
||||
@@ -0,0 +1,38 @@
|
||||
import type { Chain } from "../src/types";
|
||||
export default {
|
||||
"chain": "Arcturus",
|
||||
"chainId": 5615,
|
||||
"explorers": [
|
||||
{
|
||||
"name": "explorer-arcturus-testnet",
|
||||
"url": "https://testnet.arcscan.net",
|
||||
"standard": "EIP3091"
|
||||
}
|
||||
],
|
||||
"faucets": [
|
||||
"https://faucet.arcturuschain.io"
|
||||
],
|
||||
"features": [
|
||||
{
|
||||
"name": "EIP155"
|
||||
},
|
||||
{
|
||||
"name": "EIP1559"
|
||||
}
|
||||
],
|
||||
"infoURL": "https://arcturuschain.io",
|
||||
"name": "Arcturus Testneet",
|
||||
"nativeCurrency": {
|
||||
"name": "tARC",
|
||||
"symbol": "tARC",
|
||||
"decimals": 18
|
||||
},
|
||||
"networkId": 5615,
|
||||
"rpc": [
|
||||
"https://5615.rpc.thirdweb.com/${THIRDWEB_API_KEY}",
|
||||
"https://rpc-testnet.arcturuschain.io/"
|
||||
],
|
||||
"shortName": "arcturus-testnet",
|
||||
"slug": "arcturus-testneet",
|
||||
"testnet": true
|
||||
} as const satisfies Chain;
|
||||
@@ -0,0 +1,30 @@
|
||||
import type { Chain } from "../src/types";
|
||||
export default {
|
||||
"chain": "Avalanche",
|
||||
"chainId": 56525,
|
||||
"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": "QaUser4 Testnet",
|
||||
"nativeCurrency": {
|
||||
"name": "QaUser4 Testnet Token",
|
||||
"symbol": "TSQ",
|
||||
"decimals": 18
|
||||
},
|
||||
"networkId": 56525,
|
||||
"redFlags": [],
|
||||
"rpc": [
|
||||
"https://56525.rpc.thirdweb.com/${THIRDWEB_API_KEY}",
|
||||
"https://subnets.avax.network/defi-kingdoms/dfk-chain/rpc"
|
||||
],
|
||||
"shortName": "QaUser4 Testnet",
|
||||
"slug": "qauser4-testnet-qauser4 testnet-56525",
|
||||
"testnet": true
|
||||
} as const satisfies Chain;
|
||||
@@ -7,9 +7,15 @@ export default {
|
||||
"name": "Blockscout zKyoto explorer",
|
||||
"url": "https://astar-zkyoto.blockscout.com",
|
||||
"standard": "EIP3091"
|
||||
},
|
||||
{
|
||||
"name": "Astar zkEVM Testnet zKyoto",
|
||||
"url": "hhttps://zkyoto.explorer.startale.com/",
|
||||
"standard": "EIP3091"
|
||||
}
|
||||
],
|
||||
"faucets": [],
|
||||
"features": [],
|
||||
"icon": {
|
||||
"url": "ipfs://QmRySLe3su59dE5x5JPm2b1GeZfz6DR9qUzcbp3rt4SD3A",
|
||||
"width": 300,
|
||||
@@ -27,15 +33,9 @@ export default {
|
||||
"parent": {
|
||||
"type": "L2",
|
||||
"chain": "eip155-11155111",
|
||||
"bridges": [
|
||||
{
|
||||
"url": "https://portal.astar.network"
|
||||
},
|
||||
{
|
||||
"url": "https://bridge.gelato.network/bridge/astar-zkyoto"
|
||||
}
|
||||
]
|
||||
"bridges": []
|
||||
},
|
||||
"redFlags": [],
|
||||
"rpc": [
|
||||
"https://6038361.rpc.thirdweb.com/${THIRDWEB_API_KEY}",
|
||||
"https://rpc.startale.com/zkyoto",
|
||||
|
||||
@@ -25,6 +25,6 @@ export default {
|
||||
"https://subnets.avax.network/defi-kingdoms/dfk-chain/rpc"
|
||||
],
|
||||
"shortName": "QaUser4 Testnet",
|
||||
"slug": "qauser4-testnet-qauser4 testnet",
|
||||
"slug": "qauser4-testnet-qauser4 testnet-71169",
|
||||
"testnet": true
|
||||
} as const satisfies Chain;
|
||||
@@ -0,0 +1,39 @@
|
||||
import type { Chain } from "../src/types";
|
||||
export default {
|
||||
"chain": "ETH",
|
||||
"chainId": 743111,
|
||||
"explorers": [
|
||||
{
|
||||
"name": "blockscout",
|
||||
"url": "https://testnet.explorer.hemi.network",
|
||||
"standard": "EIP3091",
|
||||
"icon": {
|
||||
"url": "ipfs://QmYtUimyqHkkFxYdbXXRbUqNg2VLPUg6Uu2C2nmFWowiZM",
|
||||
"width": 551,
|
||||
"height": 540,
|
||||
"format": "png"
|
||||
}
|
||||
}
|
||||
],
|
||||
"faucets": [],
|
||||
"infoURL": "https://hemi.xyz",
|
||||
"name": "Hemi Sepolia",
|
||||
"nativeCurrency": {
|
||||
"name": "Sepolia Ether",
|
||||
"symbol": "ETH",
|
||||
"decimals": 18
|
||||
},
|
||||
"networkId": 743111,
|
||||
"parent": {
|
||||
"type": "L2",
|
||||
"chain": "eip155-11155111"
|
||||
},
|
||||
"rpc": [
|
||||
"https://743111.rpc.thirdweb.com/${THIRDWEB_API_KEY}",
|
||||
"https://testnet.rpc.hemi.network/rpc"
|
||||
],
|
||||
"shortName": "hemi-sep",
|
||||
"slug": "hemi-sepolia",
|
||||
"status": "active",
|
||||
"testnet": true
|
||||
} as const satisfies Chain;
|
||||
@@ -0,0 +1,30 @@
|
||||
import type { Chain } from "../src/types";
|
||||
export default {
|
||||
"chain": "Avalanche",
|
||||
"chainId": 7872,
|
||||
"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": "QAUSer4 Testnet",
|
||||
"nativeCurrency": {
|
||||
"name": "QAUSer4 Testnet Token",
|
||||
"symbol": "VVC",
|
||||
"decimals": 18
|
||||
},
|
||||
"networkId": 7872,
|
||||
"redFlags": [],
|
||||
"rpc": [
|
||||
"https://7872.rpc.thirdweb.com/${THIRDWEB_API_KEY}",
|
||||
"https://subnets.avax.network/defi-kingdoms/dfk-chain/rpc"
|
||||
],
|
||||
"shortName": "QAUSer4 Testnet",
|
||||
"slug": "qauser4-testnet",
|
||||
"testnet": true
|
||||
} as const satisfies Chain;
|
||||
@@ -34,7 +34,7 @@ export default {
|
||||
"format": "png"
|
||||
},
|
||||
"infoURL": "https://github.com/Qitmeer",
|
||||
"name": "Qitmeer",
|
||||
"name": "Qitmeer Network Mainnet",
|
||||
"nativeCurrency": {
|
||||
"name": "Qitmeer",
|
||||
"symbol": "MEER",
|
||||
@@ -54,6 +54,6 @@ export default {
|
||||
],
|
||||
"shortName": "meer",
|
||||
"slip44": 813,
|
||||
"slug": "qitmeer",
|
||||
"slug": "qitmeer-network",
|
||||
"testnet": false
|
||||
} as const satisfies Chain;
|
||||
@@ -0,0 +1,36 @@
|
||||
import type { Chain } from "../src/types";
|
||||
export default {
|
||||
"chain": "Unit Zero",
|
||||
"chainId": 88819,
|
||||
"explorers": [
|
||||
{
|
||||
"name": "explorer-stagenet",
|
||||
"url": "https://explorer-stagenet.unit0.dev",
|
||||
"standard": "EIP3091"
|
||||
}
|
||||
],
|
||||
"faucets": [],
|
||||
"features": [
|
||||
{
|
||||
"name": "EIP155"
|
||||
},
|
||||
{
|
||||
"name": "EIP1559"
|
||||
}
|
||||
],
|
||||
"infoURL": "https://units.network",
|
||||
"name": "Unit Zero Stagenet",
|
||||
"nativeCurrency": {
|
||||
"name": "UNIT0",
|
||||
"symbol": "UNIT0",
|
||||
"decimals": 18
|
||||
},
|
||||
"networkId": 88819,
|
||||
"rpc": [
|
||||
"https://88819.rpc.thirdweb.com/${THIRDWEB_API_KEY}",
|
||||
"https://rpc-stagenet.unit0.dev"
|
||||
],
|
||||
"shortName": "unit0-stagenet",
|
||||
"slug": "unit-zero-stagenet",
|
||||
"testnet": false
|
||||
} as const satisfies Chain;
|
||||
@@ -0,0 +1,30 @@
|
||||
import type { Chain } from "../src/types";
|
||||
export default {
|
||||
"chain": "Avalanche",
|
||||
"chainId": 89283,
|
||||
"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": "QIS0326 Testnet",
|
||||
"nativeCurrency": {
|
||||
"name": "QIS0326 Testnet Token",
|
||||
"symbol": "AKK",
|
||||
"decimals": 18
|
||||
},
|
||||
"networkId": 89283,
|
||||
"redFlags": [],
|
||||
"rpc": [
|
||||
"https://89283.rpc.thirdweb.com/${THIRDWEB_API_KEY}",
|
||||
"https://subnets.avax.network/defi-kingdoms/dfk-chain/rpc"
|
||||
],
|
||||
"shortName": "QIS0326 Testnet",
|
||||
"slug": "qis0326-testnet",
|
||||
"testnet": true
|
||||
} as const satisfies Chain;
|
||||
@@ -32,7 +32,9 @@ export default {
|
||||
"networkId": 9025,
|
||||
"rpc": [
|
||||
"https://9025.rpc.thirdweb.com/${THIRDWEB_API_KEY}",
|
||||
"https://rpc-nodes.nexablockscan.io"
|
||||
"https://rpc-nodes.nexablockscan.io",
|
||||
"wss://wss-nodes.nexablockscan.io",
|
||||
"https://rpc-nodes-delta.nexablockscan.io"
|
||||
],
|
||||
"shortName": "Nexa",
|
||||
"slug": "nexa-block",
|
||||
|
||||
@@ -0,0 +1,30 @@
|
||||
import type { Chain } from "../src/types";
|
||||
export default {
|
||||
"chain": "Avalanche",
|
||||
"chainId": 9294,
|
||||
"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": "QaUser4 Testnet",
|
||||
"nativeCurrency": {
|
||||
"name": "QaUser4 Testnet Token",
|
||||
"symbol": "TQO",
|
||||
"decimals": 18
|
||||
},
|
||||
"networkId": 9294,
|
||||
"redFlags": [],
|
||||
"rpc": [
|
||||
"https://9294.rpc.thirdweb.com/${THIRDWEB_API_KEY}",
|
||||
"https://subnets.avax.network/defi-kingdoms/dfk-chain/rpc"
|
||||
],
|
||||
"shortName": "QaUser4 Testnet",
|
||||
"slug": "qauser4-testnet-qauser4 testnet",
|
||||
"testnet": true
|
||||
} as const satisfies Chain;
|
||||
@@ -0,0 +1,27 @@
|
||||
import type { Chain } from "../src/types";
|
||||
export default {
|
||||
"chain": "Avalanche",
|
||||
"chainId": 933326,
|
||||
"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": "QR0326T2TS Testnet",
|
||||
"nativeCurrency": {
|
||||
"name": "QR0326T2TS Testnet Token",
|
||||
"symbol": "XFT",
|
||||
"decimals": 18
|
||||
},
|
||||
"networkId": 933326,
|
||||
"redFlags": [],
|
||||
"rpc": [],
|
||||
"shortName": "QR0326T2TS Testnet",
|
||||
"slug": "qr0326t2ts-testnet",
|
||||
"testnet": true
|
||||
} as const satisfies Chain;
|
||||
@@ -0,0 +1,30 @@
|
||||
import type { Chain } from "../src/types";
|
||||
export default {
|
||||
"chain": "Avalanche",
|
||||
"chainId": 961256,
|
||||
"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": "QR0326T4TS Testnet",
|
||||
"nativeCurrency": {
|
||||
"name": "QR0326T4TS Testnet Token",
|
||||
"symbol": "HTF",
|
||||
"decimals": 18
|
||||
},
|
||||
"networkId": 961256,
|
||||
"redFlags": [],
|
||||
"rpc": [
|
||||
"https://961256.rpc.thirdweb.com/${THIRDWEB_API_KEY}",
|
||||
"https://subnets.avax.network/qr0326t4ts/testnet/rpc"
|
||||
],
|
||||
"shortName": "QR0326T4TS Testnet",
|
||||
"slug": "qr0326t4ts-testnet",
|
||||
"testnet": true
|
||||
} as const satisfies Chain;
|
||||
@@ -0,0 +1,30 @@
|
||||
import type { Chain } from "../src/types";
|
||||
export default {
|
||||
"chain": "Avalanche",
|
||||
"chainId": 96809,
|
||||
"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": "QaUser2368 Testnet",
|
||||
"nativeCurrency": {
|
||||
"name": "QaUser2368 Testnet Token",
|
||||
"symbol": "ZKJ",
|
||||
"decimals": 18
|
||||
},
|
||||
"networkId": 96809,
|
||||
"redFlags": [],
|
||||
"rpc": [
|
||||
"https://96809.rpc.thirdweb.com/${THIRDWEB_API_KEY}",
|
||||
"https://subnets.avax.network/defi-kingdoms/dfk-chain/rpc"
|
||||
],
|
||||
"shortName": "QaUser2368 Testnet",
|
||||
"slug": "qauser2368-testnet",
|
||||
"testnet": true
|
||||
} as const satisfies Chain;
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@thirdweb-dev/chains",
|
||||
"version": "0.1.81",
|
||||
"version": "0.1.82",
|
||||
"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,33 @@
|
||||
# thirdweb
|
||||
|
||||
## 0.13.56
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- Updated dependencies [[`436d9ba`](https://github.com/thirdweb-dev/js/commit/436d9baba24a56394422f485c2864f73065909e5), [`cb0ef6a`](https://github.com/thirdweb-dev/js/commit/cb0ef6a6a25cee255e18b8489fdb4123bb69c279)]:
|
||||
- @thirdweb-dev/sdk@4.0.50
|
||||
- @thirdweb-dev/chains@0.1.82
|
||||
- @thirdweb-dev/wallets@2.4.26
|
||||
- @thirdweb-dev/auth@4.1.48
|
||||
|
||||
## 0.13.55
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- Updated dependencies []:
|
||||
- @thirdweb-dev/sdk@4.0.49
|
||||
- @thirdweb-dev/storage@2.0.11
|
||||
- @thirdweb-dev/wallets@2.4.25
|
||||
- @thirdweb-dev/auth@4.1.47
|
||||
|
||||
## 0.13.54
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- Updated dependencies [[`79c9e13`](https://github.com/thirdweb-dev/js/commit/79c9e130fdc6e1f7de1486894a5ac3e6d6776fa4)]:
|
||||
- @thirdweb-dev/wallets@2.4.24
|
||||
- @thirdweb-dev/auth@4.1.46
|
||||
|
||||
## 0.13.53
|
||||
|
||||
### Patch Changes
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
{
|
||||
"name": "thirdweb",
|
||||
"main": "dist/cli/index.js",
|
||||
"version": "0.13.53",
|
||||
"version": "0.13.56",
|
||||
"repository": "https://github.com/thirdweb-dev/js/tree/main/packages/cli",
|
||||
"author": "thirdweb eng <[email protected]>",
|
||||
"license": "Apache-2.0",
|
||||
|
||||
@@ -1,5 +1,11 @@
|
||||
# @thirdweb-dev/crypto
|
||||
|
||||
## 0.2.2
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- [#2523](https://github.com/thirdweb-dev/js/pull/2523) [`35bddd6`](https://github.com/thirdweb-dev/js/commit/35bddd69c555c9277d8c3d703a93f23f74e0de77) Thanks [@nachoiacovino](https://github.com/nachoiacovino)! - Fix function for old js
|
||||
|
||||
## 0.2.1
|
||||
|
||||
### Patch Changes
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@thirdweb-dev/crypto",
|
||||
"version": "0.2.1",
|
||||
"version": "0.2.2",
|
||||
"main": "dist/thirdweb-dev-crypto.cjs.js",
|
||||
"module": "dist/thirdweb-dev-crypto.esm.js",
|
||||
"exports": {
|
||||
|
||||
@@ -41,10 +41,12 @@ export function concatUint8Arrays(arrays, totalLength) {
|
||||
return new Uint8Array(0);
|
||||
}
|
||||
|
||||
totalLength ??= arrays.reduce(
|
||||
(accumulator, currentValue) => accumulator + currentValue.length,
|
||||
0,
|
||||
);
|
||||
if (totalLength === null || totalLength === undefined) {
|
||||
totalLength = arrays.reduce(
|
||||
(accumulator, currentValue) => accumulator + currentValue.length,
|
||||
0,
|
||||
);
|
||||
}
|
||||
|
||||
const returnValue = new Uint8Array(totalLength);
|
||||
|
||||
|
||||
@@ -1,5 +1,12 @@
|
||||
# @thirdweb-dev/merkletree
|
||||
|
||||
## 0.2.2
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- Updated dependencies [[`35bddd6`](https://github.com/thirdweb-dev/js/commit/35bddd69c555c9277d8c3d703a93f23f74e0de77)]:
|
||||
- @thirdweb-dev/crypto@0.2.2
|
||||
|
||||
## 0.2.1
|
||||
|
||||
### Patch Changes
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@thirdweb-dev/merkletree",
|
||||
"version": "0.2.1",
|
||||
"version": "0.2.2",
|
||||
"main": "dist/thirdweb-dev-merkletree.cjs.js",
|
||||
"module": "dist/thirdweb-dev-merkletree.esm.js",
|
||||
"exports": {
|
||||
|
||||
@@ -1,5 +1,35 @@
|
||||
# @thirdweb-dev/react-core
|
||||
|
||||
## 4.4.24
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- Updated dependencies [[`436d9ba`](https://github.com/thirdweb-dev/js/commit/436d9baba24a56394422f485c2864f73065909e5), [`cb0ef6a`](https://github.com/thirdweb-dev/js/commit/cb0ef6a6a25cee255e18b8489fdb4123bb69c279)]:
|
||||
- @thirdweb-dev/sdk@4.0.50
|
||||
- @thirdweb-dev/chains@0.1.82
|
||||
- @thirdweb-dev/wallets@2.4.26
|
||||
- @thirdweb-dev/auth@4.1.48
|
||||
|
||||
## 4.4.23
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- Updated dependencies []:
|
||||
- @thirdweb-dev/sdk@4.0.49
|
||||
- @thirdweb-dev/storage@2.0.11
|
||||
- @thirdweb-dev/wallets@2.4.25
|
||||
- @thirdweb-dev/auth@4.1.47
|
||||
|
||||
## 4.4.22
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- [#2497](https://github.com/thirdweb-dev/js/pull/2497) [`79c9e13`](https://github.com/thirdweb-dev/js/commit/79c9e130fdc6e1f7de1486894a5ac3e6d6776fa4) Thanks [@makoshan](https://github.com/makoshan)! - Add imToken Wallet
|
||||
|
||||
- Updated dependencies [[`79c9e13`](https://github.com/thirdweb-dev/js/commit/79c9e130fdc6e1f7de1486894a5ac3e6d6776fa4)]:
|
||||
- @thirdweb-dev/wallets@2.4.24
|
||||
- @thirdweb-dev/auth@4.1.46
|
||||
|
||||
## 4.4.21
|
||||
|
||||
### Patch Changes
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@thirdweb-dev/react-core",
|
||||
"version": "4.4.21",
|
||||
"version": "4.4.24",
|
||||
"repository": "https://github.com/thirdweb-dev/js/tree/main/packages/react-core",
|
||||
"author": "thirdweb eng <[email protected]>",
|
||||
"license": "Apache-2.0",
|
||||
|
||||
@@ -8,6 +8,7 @@ import type {
|
||||
CryptoDefiWallet,
|
||||
EmbeddedWallet,
|
||||
FrameWallet,
|
||||
ImTokenWallet,
|
||||
LocalWallet,
|
||||
MagicEdenWallet,
|
||||
MagicLink,
|
||||
@@ -41,6 +42,7 @@ export type WalletIdToWalletTypeMap = {
|
||||
rainbowWallet: RainbowWallet;
|
||||
blocto: BloctoWallet;
|
||||
frame: FrameWallet;
|
||||
imToken: ImTokenWallet;
|
||||
localWallet: LocalWallet;
|
||||
magicLink: MagicLink;
|
||||
paper: PaperWallet;
|
||||
@@ -57,7 +59,7 @@ export type WalletIdToWalletTypeMap = {
|
||||
cryptoDefiWallet: CryptoDefiWallet;
|
||||
rabby: RabbyWallet;
|
||||
xdefi: XDEFIWallet;
|
||||
magicEden: MagicEdenWallet
|
||||
magicEden: MagicEdenWallet;
|
||||
};
|
||||
|
||||
/**
|
||||
|
||||
Binary file not shown.
@@ -1,5 +1,11 @@
|
||||
# @thirdweb-dev/react-native-compat
|
||||
|
||||
## 0.7.21
|
||||
|
||||
## 0.7.20
|
||||
|
||||
## 0.7.19
|
||||
|
||||
## 0.7.18
|
||||
|
||||
## 0.7.17
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
{
|
||||
"name": "@thirdweb-dev/react-native-compat",
|
||||
"description": "Shims for Thirdweb in React Native Projects",
|
||||
"version": "0.7.18",
|
||||
"version": "0.7.21",
|
||||
"author": "thirdweb eng <[email protected]>",
|
||||
"repository": "https://github.com/thirdweb-dev/js/tree/main/packages/react-native-compat",
|
||||
"license": "Apache-2.0",
|
||||
|
||||
@@ -1,5 +1,33 @@
|
||||
# @thirdweb-dev/react-native
|
||||
|
||||
## 0.7.21
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- Updated dependencies [[`436d9ba`](https://github.com/thirdweb-dev/js/commit/436d9baba24a56394422f485c2864f73065909e5), [`cb0ef6a`](https://github.com/thirdweb-dev/js/commit/cb0ef6a6a25cee255e18b8489fdb4123bb69c279)]:
|
||||
- @thirdweb-dev/sdk@4.0.50
|
||||
- @thirdweb-dev/chains@0.1.82
|
||||
- @thirdweb-dev/react-core@4.4.24
|
||||
- @thirdweb-dev/wallets@2.4.26
|
||||
|
||||
## 0.7.20
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- Updated dependencies []:
|
||||
- @thirdweb-dev/sdk@4.0.49
|
||||
- @thirdweb-dev/storage@2.0.11
|
||||
- @thirdweb-dev/wallets@2.4.25
|
||||
- @thirdweb-dev/react-core@4.4.23
|
||||
|
||||
## 0.7.19
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- Updated dependencies [[`79c9e13`](https://github.com/thirdweb-dev/js/commit/79c9e130fdc6e1f7de1486894a5ac3e6d6776fa4)]:
|
||||
- @thirdweb-dev/wallets@2.4.24
|
||||
- @thirdweb-dev/react-core@4.4.22
|
||||
|
||||
## 0.7.18
|
||||
|
||||
### Patch Changes
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@thirdweb-dev/react-native",
|
||||
"version": "0.7.18",
|
||||
"version": "0.7.21",
|
||||
"repository": "https://github.com/thirdweb-dev/js/tree/main/packages/react-native",
|
||||
"author": "thirdweb eng <[email protected]>",
|
||||
"license": "Apache-2.0",
|
||||
|
||||
Binary file not shown.
@@ -1,5 +1,34 @@
|
||||
# @thirdweb-dev/react
|
||||
|
||||
## 4.4.24
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- Updated dependencies [[`436d9ba`](https://github.com/thirdweb-dev/js/commit/436d9baba24a56394422f485c2864f73065909e5), [`cb0ef6a`](https://github.com/thirdweb-dev/js/commit/cb0ef6a6a25cee255e18b8489fdb4123bb69c279)]:
|
||||
- @thirdweb-dev/sdk@4.0.50
|
||||
- @thirdweb-dev/chains@0.1.82
|
||||
- @thirdweb-dev/react-core@4.4.24
|
||||
- @thirdweb-dev/wallets@2.4.26
|
||||
|
||||
## 4.4.23
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- Updated dependencies []:
|
||||
- @thirdweb-dev/sdk@4.0.49
|
||||
- @thirdweb-dev/wallets@2.4.25
|
||||
- @thirdweb-dev/react-core@4.4.23
|
||||
|
||||
## 4.4.22
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- [#2497](https://github.com/thirdweb-dev/js/pull/2497) [`79c9e13`](https://github.com/thirdweb-dev/js/commit/79c9e130fdc6e1f7de1486894a5ac3e6d6776fa4) Thanks [@makoshan](https://github.com/makoshan)! - Add imToken Wallet
|
||||
|
||||
- Updated dependencies [[`79c9e13`](https://github.com/thirdweb-dev/js/commit/79c9e130fdc6e1f7de1486894a5ac3e6d6776fa4)]:
|
||||
- @thirdweb-dev/wallets@2.4.24
|
||||
- @thirdweb-dev/react-core@4.4.22
|
||||
|
||||
## 4.4.21
|
||||
|
||||
### Patch Changes
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@thirdweb-dev/react",
|
||||
"version": "4.4.21",
|
||||
"version": "4.4.24",
|
||||
"repository": "https://github.com/thirdweb-dev/js/tree/main/packages/react",
|
||||
"author": "thirdweb eng <[email protected]>",
|
||||
"license": "Apache-2.0",
|
||||
|
||||
@@ -111,4 +111,5 @@ export {
|
||||
CryptoDefiWallet,
|
||||
RabbyWallet,
|
||||
Coin98Wallet,
|
||||
ImTokenWallet,
|
||||
} from "@thirdweb-dev/wallets";
|
||||
|
||||
@@ -171,6 +171,7 @@ export function enDefault(): ThirdwebLocale {
|
||||
xdefiWallet: extensionAndQRScanScreens("XDEFI"),
|
||||
rainbowWallet: extensionAndQRScanScreens("Rainbow"),
|
||||
trustWallet: extensionAndQRScanScreens("Trust"),
|
||||
imTokenWallet: extensionAndQRScanScreens("imToken"),
|
||||
zerionWallet: extensionAndQRScanScreens("Zerion"),
|
||||
coreWallet: extensionAndQRScanScreens("Core"),
|
||||
oneKeyWallet: extensionAndQRScanScreens("OneKey"),
|
||||
|
||||
@@ -176,6 +176,7 @@ export function esDefault(): ThirdwebLocale {
|
||||
xdefiWallet: extensionAndQRScanScreens("XDEFI"),
|
||||
rainbowWallet: extensionAndQRScanScreens("Rainbow"),
|
||||
trustWallet: extensionAndQRScanScreens("Trust"),
|
||||
imTokenWallet: extensionAndQRScanScreens("imToken"),
|
||||
zerionWallet: extensionAndQRScanScreens("Zerion"),
|
||||
oneKeyWallet: extensionAndQRScanScreens("OneKey"),
|
||||
cryptoDefiWallet: extensionAndQRScanScreens("Crypto Defi"),
|
||||
|
||||
@@ -176,6 +176,7 @@ export function jaDefault(): ThirdwebLocale {
|
||||
xdefiWallet: extensionAndQRScanScreens("XDEFI"),
|
||||
rainbowWallet: extensionAndQRScanScreens("Rainbow"),
|
||||
trustWallet: extensionAndQRScanScreens("Trust"),
|
||||
imTokenWallet: extensionAndQRScanScreens("imToken"),
|
||||
zerionWallet: extensionAndQRScanScreens("Zerion"),
|
||||
oneKeyWallet: extensionAndQRScanScreens("OneKey"),
|
||||
cryptoDefiWallet: extensionAndQRScanScreens("Crypto Defi"),
|
||||
|
||||
@@ -176,6 +176,7 @@ export function tlDefault(): ThirdwebLocale {
|
||||
xdefiWallet: extensionAndQRScanScreens("XDEFI"),
|
||||
rainbowWallet: extensionAndQRScanScreens("Rainbow"),
|
||||
trustWallet: extensionAndQRScanScreens("Trust"),
|
||||
imTokenWallet: extensionAndQRScanScreens("imToken"),
|
||||
zerionWallet: extensionAndQRScanScreens("Zerion"),
|
||||
coreWallet: extensionAndQRScanScreens("Core"),
|
||||
oneKeyWallet: extensionAndQRScanScreens("OneKey"),
|
||||
|
||||
@@ -183,6 +183,7 @@ export type ThirdwebLocale = {
|
||||
getStartedScreen: { instruction: string };
|
||||
scanScreen: { instruction: string };
|
||||
};
|
||||
trustWallet: ExtensionAndQRScreensLocale;
|
||||
localWallet: {
|
||||
confirmPasswordLabel: string;
|
||||
createScreen: {
|
||||
@@ -302,7 +303,7 @@ export type ThirdwebLocale = {
|
||||
title: string;
|
||||
};
|
||||
};
|
||||
trustWallet: ExtensionAndQRScreensLocale;
|
||||
imTokenWallet: ExtensionAndQRScreensLocale;
|
||||
walletConnect: { scanInstruction: string };
|
||||
zerionWallet: ExtensionAndQRScreensLocale;
|
||||
};
|
||||
|
||||
@@ -107,6 +107,11 @@ export {
|
||||
type Coin98WalletConfigOptions,
|
||||
} from "./wallet/wallets/coin98/coin98Wallet";
|
||||
|
||||
export {
|
||||
imTokenWallet,
|
||||
type ImTokenWalletConfigOptions,
|
||||
} from "./wallet/wallets/imtoken/imTokenWallet";
|
||||
|
||||
// theming
|
||||
export { darkTheme, lightTheme } from "./design-system/index";
|
||||
export type { Theme, ThemeOverrides } from "./design-system/index";
|
||||
|
||||
@@ -12,6 +12,7 @@ export function useInstalledWallets() {
|
||||
let isCoinbaseWalletInstalled = false;
|
||||
let isZerionWalletInstalled = false;
|
||||
let isTrustWalletInstalled = false;
|
||||
let isImTokenInstalled = false;
|
||||
|
||||
const window_: Window | undefined = globalThis?.window;
|
||||
if (assertWindowEthereum(window_)) {
|
||||
@@ -19,6 +20,7 @@ export function useInstalledWallets() {
|
||||
isCoinbaseWalletInstalled = !!getInjectedCoinbaseProvider();
|
||||
isZerionWalletInstalled = !!window_.ethereum?.isZerion;
|
||||
isTrustWalletInstalled = !!window_.ethereum?.isTrust;
|
||||
isImTokenInstalled = !!window_.ethereum?.isToken;
|
||||
}
|
||||
|
||||
return {
|
||||
@@ -26,5 +28,6 @@ export function useInstalledWallets() {
|
||||
coinbaseWallet: isCoinbaseWalletInstalled,
|
||||
trustWallet: isTrustWalletInstalled,
|
||||
zerionWallet: isZerionWalletInstalled,
|
||||
imtokenWallet: isImTokenInstalled,
|
||||
};
|
||||
}
|
||||
|
||||
@@ -0,0 +1,73 @@
|
||||
import type {
|
||||
WalletOptions,
|
||||
WalletConfig,
|
||||
ConnectUIProps,
|
||||
} from "@thirdweb-dev/react-core";
|
||||
import { ImTokenWallet, assertWindowEthereum } from "@thirdweb-dev/wallets";
|
||||
import { useTWLocale } from "../../../evm/providers/locale-provider";
|
||||
import { ExtensionOrWCConnectionUI } from "../_common/ExtensionORWCConnectionUI";
|
||||
|
||||
const imTokenWalletUris = {
|
||||
ios: "https://itunes.apple.com/us/app/imtoken2/id1384798940",
|
||||
android: "https://play.google.com/store/apps/details?id=im.token.app",
|
||||
};
|
||||
|
||||
export type ImTokenWalletConfigOptions = {
|
||||
projectId?: string;
|
||||
recommended?: boolean;
|
||||
};
|
||||
|
||||
export const imTokenWallet = (
|
||||
options?: ImTokenWalletConfigOptions,
|
||||
): WalletConfig<ImTokenWallet> => {
|
||||
return {
|
||||
id: ImTokenWallet.id,
|
||||
recommended: options?.recommended,
|
||||
meta: {
|
||||
...ImTokenWallet.meta,
|
||||
iconURL:
|
||||
"data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iODAiIGhlaWdodD0iODAiIHZpZXdCb3g9IjAgMCA4MCA4MCIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KPGcgY2xpcC1wYXRoPSJ1cmwoI2NsaXAwXzIyMl80NzgzKSI+CjxtYXNrIGlkPSJtYXNrMF8yMjJfNDc4MyIgc3R5bGU9Im1hc2stdHlwZTpsdW1pbmFuY2UiIG1hc2tVbml0cz0idXNlclNwYWNlT25Vc2UiIHg9IjAiIHk9IjAiIHdpZHRoPSI4MCIgaGVpZ2h0PSI4MCI+CjxwYXRoIGQ9Ik03OS44OTQ4IDBIMC4wNTA3ODEyVjgwSDc5Ljg5NDhWMFoiIGZpbGw9IndoaXRlIi8+CjwvbWFzaz4KPGcgbWFzaz0idXJsKCNtYXNrMF8yMjJfNDc4MykiPgo8cGF0aCBkPSJNNjIuMDI3NSAwSDE4LjA1MDlDOC4xNDYzOSAwIDAuMTE3MTg4IDguMDQ0ODggMC4xMTcxODggMTcuOTY4OFY2Mi4wMzEyQzAuMTE3MTg4IDcxLjk1NTEgOC4xNDYzOSA4MCAxOC4wNTA5IDgwSDYyLjAyNzVDNzEuOTMyIDgwIDc5Ljk2MTIgNzEuOTU1MSA3OS45NjEyIDYyLjAzMTJWMTcuOTY4OEM3OS45NjEyIDguMDQ0ODggNzEuOTMyIDAgNjIuMDI3NSAwWiIgZmlsbD0idXJsKCNwYWludDBfbGluZWFyXzIyMl80NzgzKSIvPgo8cGF0aCBkPSJNNjUuMDk4MSAyNC43MzNDNjYuNzU4NiA0Ny4yNjY3IDUyLjMwMjEgNTcuOTE3MiAzOS4zNDIzIDU5LjA1M0MyNy4yOTM1IDYwLjEwODcgMTUuOTUyIDUyLjY5MDggMTQuOTU3MSA0MS4yOTM2QzE0LjEzNjMgMzEuODc3NiAxOS45NDQ1IDI3Ljg2ODkgMjQuNTA4IDI3LjQ2OTRDMjkuMjAxNSAyNy4wNTcgMzMuMTQ1OCAzMC4zMDAxIDMzLjQ4NzkgMzQuMjI2OUMzMy44MTc1IDM4LjAwMiAzMS40NjY0IDM5LjcyMDUgMjkuODMxMyAzOS44NjM0QzI4LjUzODIgMzkuOTc3IDI2LjkxMTQgMzkuMTkwNSAyNi43NjQ1IDM3LjUwMTZDMjYuNjM4NSAzNi4wNTAzIDI3LjE4ODUgMzUuODUyNiAyNy4wNTQxIDM0LjMxMDlDMjYuODE0OSAzMS41NjYyIDI0LjQyNjEgMzEuMjQ2NiAyMy4xMTgzIDMxLjM2MDFDMjEuNTM1NyAzMS40OTkxIDE4LjY2NDEgMzMuMzQ5OCAxOS4wNjcgMzcuOTZDMTkuNDcyMiA0Mi42MTAxIDIzLjkyMjIgNDYuMjg0NSAyOS43NTU3IDQ1Ljc3MzRDMzYuMDUwOSA0NS4yMjIzIDQwLjQzMzcgNDAuMzExNCA0MC43NjM0IDMzLjQyMzRDNDAuNzYwMyAzMy4wNTg2IDQwLjgzNyAzMi42OTc1IDQwLjk4OCAzMi4zNjU1TDQwLjk5IDMyLjM1NzJDNDEuMDU3OCAzMi4yMTI4IDQxLjEzNzIgMzIuMDc0MiA0MS4yMjcyIDMxLjk0MjhDNDEuMzYxNiAzMS43NDA5IDQxLjUzMzggMzEuNTE4IDQxLjc1NjIgMzEuMjczOUM0MS43NTgzIDMxLjI2NzYgNDEuNzU4MyAzMS4yNjc2IDQxLjc2MjYgMzEuMjY3NkM0MS45MjQxIDMxLjA4NDcgNDIuMTE5NCAzMC44ODcgNDIuMzM5NyAzMC42NzQ1QzQ1LjA4OTcgMjguMDc1IDU0Ljk5MzEgMjEuOTQ0MiA2NC4zNTkyIDIzLjg4NTVDNjQuNTU3MyAyMy45MjggNjQuNzM2MSAyNC4wMzM0IDY0Ljg2OTMgMjQuMTg2MkM2NS4wMDI1IDI0LjMzOTEgNjUuMDgyNiAyNC41MzA4IDY1LjA5ODEgMjQuNzMzWiIgZmlsbD0id2hpdGUiLz4KPC9nPgo8L2c+CjxkZWZzPgo8bGluZWFyR3JhZGllbnQgaWQ9InBhaW50MF9saW5lYXJfMjIyXzQ3ODMiIHgxPSI3My41MDA5IiB5MT0iNS4zMTI1IiB4Mj0iMi44NzI0MSIgeTI9Ijc3LjY3NDciIGdyYWRpZW50VW5pdHM9InVzZXJTcGFjZU9uVXNlIj4KPHN0b3Agc3RvcC1jb2xvcj0iIzExQzREMSIvPgo8c3RvcCBvZmZzZXQ9IjEiIHN0b3AtY29sb3I9IiMwMDYyQUQiLz4KPC9saW5lYXJHcmFkaWVudD4KPGNsaXBQYXRoIGlkPSJjbGlwMF8yMjJfNDc4MyI+CjxyZWN0IHdpZHRoPSI4MCIgaGVpZ2h0PSI4MCIgZmlsbD0id2hpdGUiLz4KPC9jbGlwUGF0aD4KPC9kZWZzPgo8L3N2Zz4=",
|
||||
},
|
||||
create: (walletOptions: WalletOptions) => {
|
||||
const wallet = new ImTokenWallet({
|
||||
...walletOptions,
|
||||
projectId: options?.projectId,
|
||||
qrcode: false,
|
||||
});
|
||||
|
||||
return wallet;
|
||||
},
|
||||
connectUI: ConnectUI,
|
||||
isInstalled: isInstalled,
|
||||
};
|
||||
};
|
||||
|
||||
function isInstalled() {
|
||||
if (assertWindowEthereum(globalThis.window)) {
|
||||
return !!globalThis.window.ethereum.isImToken;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
function ConnectUI(props: ConnectUIProps<ImTokenWallet>) {
|
||||
const locale = useTWLocale();
|
||||
return (
|
||||
<ExtensionOrWCConnectionUI
|
||||
connect={props.connect}
|
||||
connected={props.connected}
|
||||
createWalletInstance={props.createWalletInstance}
|
||||
goBack={props.goBack}
|
||||
meta={props.walletConfig.meta}
|
||||
setConnectedWallet={(w) => props.setConnectedWallet(w as ImTokenWallet)}
|
||||
setConnectionStatus={props.setConnectionStatus}
|
||||
supportedWallets={props.supportedWallets}
|
||||
walletConnectUris={{
|
||||
ios: imTokenWalletUris.ios,
|
||||
android: imTokenWalletUris.android,
|
||||
other: imTokenWalletUris.android,
|
||||
}}
|
||||
walletLocale={locale.wallets.imTokenWallet}
|
||||
isInstalled={isInstalled}
|
||||
/>
|
||||
);
|
||||
}
|
||||
Binary file not shown.
@@ -1,5 +1,23 @@
|
||||
# @thirdweb-dev/sdk
|
||||
|
||||
## 4.0.50
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- [#2545](https://github.com/thirdweb-dev/js/pull/2545) [`436d9ba`](https://github.com/thirdweb-dev/js/commit/436d9baba24a56394422f485c2864f73065909e5) Thanks [@kumaryash90](https://github.com/kumaryash90)! - Add external links to publish metadata
|
||||
|
||||
- Updated dependencies [[`cb0ef6a`](https://github.com/thirdweb-dev/js/commit/cb0ef6a6a25cee255e18b8489fdb4123bb69c279)]:
|
||||
- @thirdweb-dev/chains@0.1.82
|
||||
|
||||
## 4.0.49
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- Updated dependencies [[`35bddd6`](https://github.com/thirdweb-dev/js/commit/35bddd69c555c9277d8c3d703a93f23f74e0de77)]:
|
||||
- @thirdweb-dev/crypto@0.2.2
|
||||
- @thirdweb-dev/merkletree@0.2.2
|
||||
- @thirdweb-dev/storage@2.0.11
|
||||
|
||||
## 4.0.48
|
||||
|
||||
### Patch Changes
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@thirdweb-dev/sdk",
|
||||
"version": "4.0.48",
|
||||
"version": "4.0.50",
|
||||
"description": "The main thirdweb SDK.",
|
||||
"repository": "https://github.com/thirdweb-dev/js/tree/main/packages/sdk",
|
||||
"license": "Apache-2.0",
|
||||
|
||||
@@ -202,6 +202,14 @@ export const ExtraPublishMetadataSchemaInput = /* @__PURE__ */ (() =>
|
||||
),
|
||||
displayName: z.string().optional(),
|
||||
description: z.string().optional(),
|
||||
externalLinks: z
|
||||
.array(
|
||||
z.object({
|
||||
name: z.string(),
|
||||
url: z.string(),
|
||||
}),
|
||||
)
|
||||
.optional(),
|
||||
readme: z.string().optional(),
|
||||
license: z.string().optional(),
|
||||
changelog: z.string().optional(),
|
||||
|
||||
Binary file not shown.
@@ -1,5 +1,11 @@
|
||||
# @thirdweb-dev/service-utils
|
||||
|
||||
## 0.4.23
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- [#2531](https://github.com/thirdweb-dev/js/pull/2531) [`0aea03e`](https://github.com/thirdweb-dev/js/commit/0aea03e418138f69745f286df1b7fd8f3a1827ad) Thanks [@arcoraven](https://github.com/arcoraven)! - Simplify HTTP logging helper
|
||||
|
||||
## 0.4.22
|
||||
|
||||
### Patch Changes
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@thirdweb-dev/service-utils",
|
||||
"version": "0.4.22",
|
||||
"version": "0.4.23",
|
||||
"main": "dist/thirdweb-dev-service-utils.cjs.js",
|
||||
"module": "dist/thirdweb-dev-service-utils.esm.js",
|
||||
"exports": {
|
||||
|
||||
@@ -175,7 +175,6 @@ function bufferToHex(buffer: ArrayBuffer) {
|
||||
}
|
||||
|
||||
export async function logHttpRequest({
|
||||
source,
|
||||
clientId,
|
||||
req,
|
||||
res,
|
||||
@@ -183,6 +182,7 @@ export async function logHttpRequest({
|
||||
statusMessage,
|
||||
latencyMs,
|
||||
}: AuthInput & {
|
||||
// @deprecated
|
||||
source: string;
|
||||
res: Response;
|
||||
isAuthed?: boolean;
|
||||
@@ -195,23 +195,23 @@ export async function logHttpRequest({
|
||||
|
||||
console.log(
|
||||
JSON.stringify({
|
||||
source,
|
||||
method: req.method,
|
||||
pathname: req.url,
|
||||
hasSecretKey: !!authorizationData.secretKey,
|
||||
hasClientId: !!authorizationData.clientId,
|
||||
hasJwt: !!authorizationData.jwt,
|
||||
clientId: authorizationData.clientId,
|
||||
isAuthed: !!isAuthed ?? null,
|
||||
isAuthed,
|
||||
status: res.status,
|
||||
sdkName: headers.get("x-sdk-name") ?? "unknown",
|
||||
sdkVersion: headers.get("x-sdk-version") ?? "unknown",
|
||||
platform: headers.get("x-sdk-platform") ?? "unknown",
|
||||
os: headers.get("x-sdk-os") ?? "unknown",
|
||||
latencyMs: latencyMs ?? null,
|
||||
sdkName: headers.get("x-sdk-name") ?? undefined,
|
||||
sdkVersion: headers.get("x-sdk-version") ?? undefined,
|
||||
platform: headers.get("x-sdk-platform") ?? undefined,
|
||||
os: headers.get("x-sdk-os") ?? undefined,
|
||||
latencyMs,
|
||||
}),
|
||||
);
|
||||
console.log(`statusMessage=${statusMessage ?? res.statusText}`);
|
||||
} catch (err) {
|
||||
console.error("Failed to log HTTP request:", err);
|
||||
}
|
||||
if (statusMessage) {
|
||||
console.log(`statusMessage=${statusMessage}`);
|
||||
}
|
||||
} catch (err) {}
|
||||
}
|
||||
|
||||
@@ -177,7 +177,6 @@ export function deriveClientIdFromSecretKeyHash(secretKeyHash: string) {
|
||||
}
|
||||
|
||||
export function logHttpRequest({
|
||||
source,
|
||||
clientId,
|
||||
req,
|
||||
res,
|
||||
@@ -185,6 +184,7 @@ export function logHttpRequest({
|
||||
statusMessage,
|
||||
latencyMs,
|
||||
}: AuthInput & {
|
||||
// @deprecated
|
||||
source: string;
|
||||
res: ServerResponse;
|
||||
isAuthed?: boolean;
|
||||
@@ -195,27 +195,23 @@ export function logHttpRequest({
|
||||
const authorizationData = extractAuthorizationData({ req, clientId });
|
||||
const headers = req.headers;
|
||||
|
||||
const _statusMessage = statusMessage ?? res.statusMessage;
|
||||
console.log(
|
||||
JSON.stringify({
|
||||
source,
|
||||
method: req.method,
|
||||
pathname: req.url,
|
||||
hasSecretKey: !!authorizationData.secretKey,
|
||||
hasClientId: !!authorizationData.clientId,
|
||||
hasJwt: !!authorizationData.jwt,
|
||||
clientId: authorizationData.clientId,
|
||||
isAuthed: !!isAuthed ?? null,
|
||||
isAuthed,
|
||||
status: res.statusCode,
|
||||
statusMessage: _statusMessage,
|
||||
sdkName: headers["x-sdk-name"] ?? "unknown",
|
||||
sdkVersion: headers["x-sdk-version"] ?? "unknown",
|
||||
platform: headers["x-sdk-platform"] ?? "unknown",
|
||||
os: headers["x-sdk-os"] ?? "unknown",
|
||||
latencyMs: latencyMs ?? null,
|
||||
statusMessage,
|
||||
sdkName: headers["x-sdk-name"] ?? undefined,
|
||||
sdkVersion: headers["x-sdk-version"] ?? undefined,
|
||||
platform: headers["x-sdk-platform"] ?? undefined,
|
||||
os: headers["x-sdk-os"] ?? undefined,
|
||||
latencyMs,
|
||||
}),
|
||||
);
|
||||
console.log(`statusMessage=${_statusMessage}`);
|
||||
} catch (err) {
|
||||
console.error("Failed to log HTTP request:", err);
|
||||
}
|
||||
} catch (err) {}
|
||||
}
|
||||
|
||||
@@ -1,5 +1,12 @@
|
||||
# @thirdweb-dev/storage
|
||||
|
||||
## 2.0.11
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- Updated dependencies [[`35bddd6`](https://github.com/thirdweb-dev/js/commit/35bddd69c555c9277d8c3d703a93f23f74e0de77)]:
|
||||
- @thirdweb-dev/crypto@0.2.2
|
||||
|
||||
## 2.0.10
|
||||
|
||||
### Patch Changes
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@thirdweb-dev/storage",
|
||||
"version": "2.0.10",
|
||||
"version": "2.0.11",
|
||||
"main": "dist/thirdweb-dev-storage.cjs.js",
|
||||
"module": "dist/thirdweb-dev-storage.esm.js",
|
||||
"exports": {
|
||||
|
||||
Binary file not shown.
@@ -1,5 +1,39 @@
|
||||
# @thirdweb-dev/unity-js-bridge
|
||||
|
||||
## 0.5.0
|
||||
|
||||
### Minor Changes
|
||||
|
||||
- [#2532](https://github.com/thirdweb-dev/js/pull/2532) [`65ea874`](https://github.com/thirdweb-dev/js/commit/65ea87425cc5e1033ea61690cd519afc4dddaa1c) Thanks [@0xFirekeeper](https://github.com/0xFirekeeper)! - Unity 4.8.0
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- Updated dependencies [[`436d9ba`](https://github.com/thirdweb-dev/js/commit/436d9baba24a56394422f485c2864f73065909e5), [`cb0ef6a`](https://github.com/thirdweb-dev/js/commit/cb0ef6a6a25cee255e18b8489fdb4123bb69c279)]:
|
||||
- @thirdweb-dev/sdk@4.0.50
|
||||
- @thirdweb-dev/chains@0.1.82
|
||||
- @thirdweb-dev/wallets@2.4.26
|
||||
- @thirdweb-dev/auth@4.1.48
|
||||
|
||||
## 0.4.13
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- Updated dependencies []:
|
||||
- @thirdweb-dev/sdk@4.0.49
|
||||
- @thirdweb-dev/storage@2.0.11
|
||||
- @thirdweb-dev/wallets@2.4.25
|
||||
- @thirdweb-dev/auth@4.1.47
|
||||
|
||||
## 0.4.12
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- [#2501](https://github.com/thirdweb-dev/js/pull/2501) [`9c884e2`](https://github.com/thirdweb-dev/js/commit/9c884e2f55f1d096555c1fcf65bc850684d258c9) Thanks [@0xFirekeeper](https://github.com/0xFirekeeper)! - [Unity] Expose additional WC QR Options
|
||||
|
||||
- Updated dependencies [[`79c9e13`](https://github.com/thirdweb-dev/js/commit/79c9e130fdc6e1f7de1486894a5ac3e6d6776fa4)]:
|
||||
- @thirdweb-dev/wallets@2.4.24
|
||||
- @thirdweb-dev/auth@4.1.46
|
||||
|
||||
## 0.4.11
|
||||
|
||||
### Patch Changes
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@thirdweb-dev/unity-js-bridge",
|
||||
"version": "0.4.11",
|
||||
"version": "0.5.0",
|
||||
"main": "dist/thirdweb-unity-bridge.js",
|
||||
"repository": "https://github.com/thirdweb-dev/js/tree/main/packages/unity-js-bridge",
|
||||
"license": "Apache-2.0",
|
||||
|
||||
@@ -151,7 +151,7 @@ class ThirdwebBridge implements TWBridge {
|
||||
}
|
||||
(globalThis as any).X_SDK_NAME = "UnitySDK_WebGL";
|
||||
(globalThis as any).X_SDK_PLATFORM = "unity";
|
||||
(globalThis as any).X_SDK_VERSION = "4.7.10";
|
||||
(globalThis as any).X_SDK_VERSION = "4.8.0";
|
||||
(globalThis as any).X_SDK_OS = browser?.os ?? "unknown";
|
||||
}
|
||||
this.initializedChain = chain;
|
||||
@@ -221,8 +221,18 @@ class ThirdwebBridge implements TWBridge {
|
||||
chains: supportedChains,
|
||||
clientId: sdkOptions.clientId,
|
||||
qrModalOptions: {
|
||||
enableExplorer:
|
||||
sdkOptions.wallet?.walletConnectEnableExplorer ?? false,
|
||||
explorerRecommendedWalletIds:
|
||||
sdkOptions.wallet?.walletConnectExplorerRecommendedWalletIds,
|
||||
sdkOptions.wallet?.walletConnectExplorerRecommendedWalletIds ??
|
||||
undefined,
|
||||
walletImages:
|
||||
sdkOptions.wallet?.walletConnectWalletImages ?? undefined,
|
||||
desktopWallets:
|
||||
sdkOptions.wallet?.walletConnectDesktopWallets ?? undefined,
|
||||
mobileWallets:
|
||||
sdkOptions.wallet?.walletConnectMobileWallets ?? undefined,
|
||||
themeMode: sdkOptions.wallet?.walletConnectThemeMode ?? undefined,
|
||||
},
|
||||
});
|
||||
break;
|
||||
|
||||
@@ -1,5 +1,27 @@
|
||||
# @thirdweb-dev/wallets
|
||||
|
||||
## 2.4.26
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- Updated dependencies [[`436d9ba`](https://github.com/thirdweb-dev/js/commit/436d9baba24a56394422f485c2864f73065909e5), [`cb0ef6a`](https://github.com/thirdweb-dev/js/commit/cb0ef6a6a25cee255e18b8489fdb4123bb69c279)]:
|
||||
- @thirdweb-dev/sdk@4.0.50
|
||||
- @thirdweb-dev/chains@0.1.82
|
||||
|
||||
## 2.4.25
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- Updated dependencies [[`35bddd6`](https://github.com/thirdweb-dev/js/commit/35bddd69c555c9277d8c3d703a93f23f74e0de77)]:
|
||||
- @thirdweb-dev/crypto@0.2.2
|
||||
- @thirdweb-dev/sdk@4.0.49
|
||||
|
||||
## 2.4.24
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- [#2497](https://github.com/thirdweb-dev/js/pull/2497) [`79c9e13`](https://github.com/thirdweb-dev/js/commit/79c9e130fdc6e1f7de1486894a5ac3e6d6776fa4) Thanks [@makoshan](https://github.com/makoshan)! - Add imToken Wallet
|
||||
|
||||
## 2.4.23
|
||||
|
||||
### Patch Changes
|
||||
|
||||
@@ -0,0 +1,7 @@
|
||||
{
|
||||
"main": "dist/thirdweb-dev-wallets-evm-connectors-imtoken.cjs.js",
|
||||
"module": "dist/thirdweb-dev-wallets-evm-connectors-imtoken.esm.js",
|
||||
"browser": {
|
||||
"./dist/thirdweb-dev-wallets-evm-connectors-imtoken.esm.js": "./dist/thirdweb-dev-wallets-evm-connectors-imtoken.browser.esm.js"
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,7 @@
|
||||
{
|
||||
"main": "dist/thirdweb-dev-wallets-evm-wallets-imtoken.cjs.js",
|
||||
"module": "dist/thirdweb-dev-wallets-evm-wallets-imtoken.esm.js",
|
||||
"browser": {
|
||||
"./dist/thirdweb-dev-wallets-evm-wallets-imtoken.esm.js": "./dist/thirdweb-dev-wallets-evm-wallets-imtoken.browser.esm.js"
|
||||
}
|
||||
}
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@thirdweb-dev/wallets",
|
||||
"version": "2.4.23",
|
||||
"version": "2.4.26",
|
||||
"main": "dist/thirdweb-dev-wallets.cjs.js",
|
||||
"module": "dist/thirdweb-dev-wallets.esm.js",
|
||||
"browser": {
|
||||
@@ -147,6 +147,13 @@
|
||||
},
|
||||
"default": "./evm/wallets/gcp-kms/dist/thirdweb-dev-wallets-evm-wallets-gcp-kms.cjs.js"
|
||||
},
|
||||
"./evm/wallets/imtoken": {
|
||||
"module": {
|
||||
"browser": "./evm/wallets/imtoken/dist/thirdweb-dev-wallets-evm-wallets-imtoken.browser.esm.js",
|
||||
"default": "./evm/wallets/imtoken/dist/thirdweb-dev-wallets-evm-wallets-imtoken.esm.js"
|
||||
},
|
||||
"default": "./evm/wallets/imtoken/dist/thirdweb-dev-wallets-evm-wallets-imtoken.cjs.js"
|
||||
},
|
||||
"./evm/wallets/phantom": {
|
||||
"module": {
|
||||
"browser": "./evm/wallets/phantom/dist/thirdweb-dev-wallets-evm-wallets-phantom.browser.esm.js",
|
||||
@@ -336,6 +343,13 @@
|
||||
},
|
||||
"default": "./evm/wallets/embedded-wallet/dist/thirdweb-dev-wallets-evm-wallets-embedded-wallet.cjs.js"
|
||||
},
|
||||
"./evm/connectors/imtoken": {
|
||||
"module": {
|
||||
"browser": "./evm/connectors/imtoken/dist/thirdweb-dev-wallets-evm-connectors-imtoken.browser.esm.js",
|
||||
"default": "./evm/connectors/imtoken/dist/thirdweb-dev-wallets-evm-connectors-imtoken.esm.js"
|
||||
},
|
||||
"default": "./evm/connectors/imtoken/dist/thirdweb-dev-wallets-evm-connectors-imtoken.cjs.js"
|
||||
},
|
||||
"./evm/connectors/phantom": {
|
||||
"module": {
|
||||
"browser": "./evm/connectors/phantom/dist/thirdweb-dev-wallets-evm-connectors-phantom.browser.esm.js",
|
||||
|
||||
@@ -0,0 +1,48 @@
|
||||
import { InjectedConnector, InjectedConnectorOptions } from "../injected";
|
||||
import { assertWindowEthereum } from "../../utils/assertWindowEthereum";
|
||||
import { Ethereum } from "../injected/types";
|
||||
import type { Chain } from "@thirdweb-dev/chains";
|
||||
import { AsyncStorage } from "../../../core/AsyncStorage";
|
||||
|
||||
type ImTokenConnectorConstructorArg = {
|
||||
chains?: Chain[];
|
||||
connectorStorage: AsyncStorage;
|
||||
options?: InjectedConnectorOptions;
|
||||
};
|
||||
|
||||
export class ImTokenConnector extends InjectedConnector {
|
||||
constructor(arg: ImTokenConnectorConstructorArg) {
|
||||
const defaultOptions = {
|
||||
name: "imToken",
|
||||
getProvider() {
|
||||
function getReady(ethereum?: Ethereum) {
|
||||
const isToken = !!ethereum?.isToken;
|
||||
if (!isToken) {
|
||||
return;
|
||||
}
|
||||
return ethereum;
|
||||
}
|
||||
|
||||
if (typeof window === "undefined") {
|
||||
return;
|
||||
}
|
||||
if (assertWindowEthereum(globalThis.window)) {
|
||||
if (globalThis.window.ethereum?.providers) {
|
||||
return globalThis.window.ethereum.providers.find(getReady);
|
||||
}
|
||||
|
||||
return getReady(globalThis.window.ethereum);
|
||||
}
|
||||
},
|
||||
};
|
||||
const options = {
|
||||
...defaultOptions,
|
||||
...arg.options,
|
||||
};
|
||||
super({
|
||||
chains: arg.chains,
|
||||
options,
|
||||
connectorStorage: arg.connectorStorage,
|
||||
});
|
||||
}
|
||||
}
|
||||
@@ -56,6 +56,8 @@ type InjectedProviderFlags = {
|
||||
isDefiWallet?: true;
|
||||
isRabbyWallet?: true;
|
||||
isCoin98Wallet?: true;
|
||||
// imToken
|
||||
isToken?: true;
|
||||
};
|
||||
type InjectedProviders = InjectedProviderFlags & {
|
||||
isMetaMask: true;
|
||||
|
||||
@@ -5,6 +5,7 @@ export const walletIds = {
|
||||
coreWallet: "coreWallet",
|
||||
cryptoDefiWallet: "cryptoDefiWallet",
|
||||
frame: "frame",
|
||||
imtoken: "imToken",
|
||||
localWallet: "localWallet",
|
||||
magicLink: "magicLink",
|
||||
metamask: "metamask",
|
||||
|
||||
@@ -32,6 +32,7 @@ export * from "./wallets/coinbase-wallet";
|
||||
export * from "./wallets/embedded-wallet";
|
||||
export * from "./wallets/ethers";
|
||||
export * from "./wallets/frame";
|
||||
export * from "./wallets/imtoken";
|
||||
export * from "./wallets/injected";
|
||||
export * from "./wallets/local-wallet";
|
||||
export * from "./wallets/signer";
|
||||
|
||||
@@ -0,0 +1,139 @@
|
||||
import type { WalletConnectConnector as WalletConnectConnectorType } from "../connectors/wallet-connect";
|
||||
import type { QRModalOptions } from "../connectors/wallet-connect/qrModalOptions";
|
||||
import { Connector, WagmiAdapter } from "../interfaces/connector";
|
||||
import { assertWindowEthereum } from "../utils/assertWindowEthereum";
|
||||
import { AbstractClientWallet, WalletOptions } from "./base";
|
||||
import type { ImTokenConnector as ImTokenConnectorType } from "../connectors/imtoken";
|
||||
import { walletIds } from "../constants/walletIds";
|
||||
import { TW_WC_PROJECT_ID } from "../constants/wc";
|
||||
|
||||
type ImTokenAdditionalOptions = {
|
||||
qrcode?: boolean;
|
||||
projectId?: string;
|
||||
qrModalOptions?: QRModalOptions;
|
||||
};
|
||||
|
||||
export type ImTokenWalletOptions = WalletOptions<ImTokenAdditionalOptions>;
|
||||
|
||||
type ConnectWithQrCodeArgs = {
|
||||
chainId?: number;
|
||||
onQrCodeUri: (uri: string) => void;
|
||||
onConnected: (accountAddress: string) => void;
|
||||
};
|
||||
|
||||
export class ImTokenWallet extends AbstractClientWallet<ImTokenAdditionalOptions> {
|
||||
connector?: Connector;
|
||||
walletConnectConnector?: WalletConnectConnectorType;
|
||||
imtokenConnector?: ImTokenConnectorType;
|
||||
isInjected: boolean;
|
||||
static id = walletIds.imtoken as string;
|
||||
|
||||
public get walletName() {
|
||||
return "imToken Wallet" as const;
|
||||
}
|
||||
|
||||
constructor(options: ImTokenWalletOptions) {
|
||||
super(ImTokenWallet.id, options);
|
||||
|
||||
if (assertWindowEthereum(globalThis.window)) {
|
||||
this.isInjected = !!globalThis.window.ethereum?.isImToken;
|
||||
} else {
|
||||
this.isInjected = false;
|
||||
}
|
||||
}
|
||||
|
||||
protected async getConnector(): Promise<Connector> {
|
||||
if (!this.connector) {
|
||||
if (this.isInjected) {
|
||||
// import the connector dynamically
|
||||
const { ImTokenConnector } = await import("../connectors/imtoken");
|
||||
const imtokenConnector = new ImTokenConnector({
|
||||
chains: this.chains,
|
||||
connectorStorage: this.walletStorage,
|
||||
options: {
|
||||
shimDisconnect: true,
|
||||
},
|
||||
});
|
||||
|
||||
this.imtokenConnector = imtokenConnector;
|
||||
|
||||
this.connector = new WagmiAdapter(imtokenConnector);
|
||||
} else {
|
||||
const { WalletConnectConnector } = await import(
|
||||
"../connectors/wallet-connect"
|
||||
);
|
||||
|
||||
const walletConnectConnector = new WalletConnectConnector({
|
||||
chains: this.chains,
|
||||
options: {
|
||||
projectId: this.options?.projectId || TW_WC_PROJECT_ID, // TODO,
|
||||
storage: this.walletStorage,
|
||||
qrcode: this.options?.qrcode,
|
||||
dappMetadata: this.dappMetadata,
|
||||
qrModalOptions: this.options?.qrModalOptions,
|
||||
},
|
||||
});
|
||||
|
||||
walletConnectConnector.getProvider().then((provider) => {
|
||||
provider.signer.client.on("session_request_sent", () => {
|
||||
this.emit("wc_session_request_sent");
|
||||
});
|
||||
});
|
||||
|
||||
// need to save this for getting the QR code URI
|
||||
this.walletConnectConnector = walletConnectConnector;
|
||||
this.connector = new WagmiAdapter(walletConnectConnector);
|
||||
}
|
||||
}
|
||||
|
||||
return this.connector;
|
||||
}
|
||||
|
||||
/**
|
||||
* Connect to the wallet using a QR code.
|
||||
* You can use this method to display a QR code. The user can scan this QR code using the Trust Wallet mobile app to connect to your dapp.
|
||||
*
|
||||
* @example
|
||||
* ```typescript
|
||||
* wallet.connectWithQrCode({
|
||||
* chainId: 1,
|
||||
* onQrCodeUri(qrCodeUri) {
|
||||
* // render the QR code with `qrCodeUri`
|
||||
* },
|
||||
* onConnected(accountAddress) {
|
||||
* // update UI to show connected state
|
||||
* },
|
||||
* })
|
||||
* ```
|
||||
*
|
||||
* @param options -
|
||||
* The options object contains the following properties/method:
|
||||
*
|
||||
* ### chainId (optional)
|
||||
* If provided, wallet will prompt the user to switch to the network with the given `chainId` after connecting.
|
||||
*
|
||||
* ### onQrCodeUri
|
||||
* A callback to get the QR code URI to display to the user.
|
||||
*
|
||||
* ### onConnected
|
||||
* A callback that is called when the user has connected their wallet using the QR code.
|
||||
*/
|
||||
async connectWithQrCode(options: ConnectWithQrCodeArgs) {
|
||||
await this.getConnector();
|
||||
const wcConnector = this.walletConnectConnector;
|
||||
|
||||
if (!wcConnector) {
|
||||
throw new Error("WalletConnect connector not found");
|
||||
}
|
||||
|
||||
const wcProvider = await wcConnector.getProvider();
|
||||
|
||||
// set a listener for display_uri event
|
||||
wcProvider.on("display_uri", (uri) => {
|
||||
options.onQrCodeUri(uri);
|
||||
});
|
||||
|
||||
// trigger connect flow
|
||||
this.connect({ chainId: options.chainId }).then(options.onConnected);
|
||||
}
|
||||
}
|
||||
@@ -1,7 +1,7 @@
|
||||
/* eslint-disable better-tree-shaking/no-top-level-side-effects */
|
||||
import { SmartWallet } from "../src/evm/wallets/smart-wallet";
|
||||
import { LocalWallet } from "../src/evm/wallets/local-wallet";
|
||||
import { Mumbai } from "@thirdweb-dev/chains";
|
||||
import { ArbitrumSepolia } from "@thirdweb-dev/chains";
|
||||
import { ThirdwebSDK, SmartContract } from "@thirdweb-dev/sdk";
|
||||
import { checkContractWalletSignature } from "../src/evm/connectors/smart-wallet/lib/check-contract-wallet-signature";
|
||||
|
||||
@@ -13,9 +13,9 @@ let smartWallet: SmartWallet;
|
||||
let smartWalletAddress: string;
|
||||
let personalWallet: LocalWallet;
|
||||
let contract: SmartContract;
|
||||
const factoryAddress = "0x13947435c2fe6BE51ED82F6f59C38617a323dB9B"; // pre 712
|
||||
const factoryAddressV2 = "0xC64d04AedecA895b3F20DC6866b4b532e0b22634"; // post 712
|
||||
const chain = Mumbai;
|
||||
const factoryAddress = "0x564cf6453a1b0FF8DB603E92EA4BbD410dea45F3"; // pre 712
|
||||
const factoryAddressV2 = "0xbf1C9aA4B1A085f7DA890a44E82B0A1289A40052"; // post 712
|
||||
const chain = ArbitrumSepolia;
|
||||
const SECRET_KEY = process.env.TW_SECRET_KEY;
|
||||
|
||||
const describeIf = (condition: boolean) =>
|
||||
@@ -35,7 +35,7 @@ beforeAll(async () => {
|
||||
secretKey: SECRET_KEY,
|
||||
});
|
||||
contract = await sdk.getContract(
|
||||
"0xD170A53dADb19f62C78AB9982236857B71dbc83A", // mumbai edition drop
|
||||
"0x6A7a26c9a595E6893C255C9dF0b593e77518e0c3", // arb sep edition drop
|
||||
);
|
||||
});
|
||||
|
||||
|
||||
Binary file not shown.
Reference in New Issue
Block a user