@circle-fin/bridge-kit 1.3.0 → 1.5.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +14 -0
- package/QUICKSTART.md +3 -3
- package/README.md +57 -20
- package/chains.cjs +91 -2
- package/chains.d.ts +87 -3
- package/chains.mjs +90 -3
- package/index.cjs +225 -14
- package/index.d.ts +2380 -11
- package/index.mjs +225 -14
- package/package.json +2 -2
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,19 @@
|
|
|
1
1
|
# @circle-fin/bridge-kit
|
|
2
2
|
|
|
3
|
+
## 1.5.0
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- **Monad support**: Bridge Kit now supports Monad mainnet and testnet. You can include Monad in cross-chain USDC transfer flows without additional configuration or changes to existing integrations.
|
|
8
|
+
|
|
9
|
+
- **Automatic re-attestation for fast transfers**: When retrying a failed CCTP v2 fast transfer, the kit now automatically detects if the mint failed due to an expired attestation and triggers re-attestation. This eliminates manual intervention when attestations expire before the mint transaction completes.
|
|
10
|
+
|
|
11
|
+
## 1.4.0
|
|
12
|
+
|
|
13
|
+
### Minor Changes
|
|
14
|
+
|
|
15
|
+
- Add optional filtering to `getSupportedChains()` method to filter chains by type (EVM, Solana) and network (mainnet/testnet)
|
|
16
|
+
|
|
3
17
|
## 1.3.0
|
|
4
18
|
|
|
5
19
|
### Minor Changes
|
package/QUICKSTART.md
CHANGED
|
@@ -273,7 +273,7 @@ const adapter = createViemAdapterFromPrivateKey({
|
|
|
273
273
|
createPublicClient({
|
|
274
274
|
chain,
|
|
275
275
|
transport: http(
|
|
276
|
-
`https://eth-mainnet.
|
|
276
|
+
`https://eth-mainnet.g.alchemy.com/v2/${process.env.ALCHEMY_KEY}`,
|
|
277
277
|
{
|
|
278
278
|
retryCount: 3,
|
|
279
279
|
timeout: 10000,
|
|
@@ -1150,7 +1150,7 @@ import { mainnet } from 'viem/chains'
|
|
|
1150
1150
|
const publicClient = createPublicClient({
|
|
1151
1151
|
chain: mainnet,
|
|
1152
1152
|
transport: fallback([
|
|
1153
|
-
http('https://eth-mainnet.
|
|
1153
|
+
http('https://eth-mainnet.g.alchemy.com/v2/your-key'),
|
|
1154
1154
|
http('https://mainnet.infura.io/v3/your-key'),
|
|
1155
1155
|
http(), // Default public RPC as fallback
|
|
1156
1156
|
]),
|
|
@@ -1421,7 +1421,7 @@ const attestation = await retryWithBackoff(
|
|
|
1421
1421
|
|
|
1422
1422
|
## Next Steps
|
|
1423
1423
|
|
|
1424
|
-
- **Explore Examples**: Check out the [examples directory](https://github.com/
|
|
1424
|
+
- **Explore Examples**: Check out the [examples directory](https://github.com/crcl-main/stablecoin-kits-private/tree/main/examples) for more detailed implementations
|
|
1425
1425
|
- **Join the community**: Connect with other developers on [discord](https://discord.com/invite/buildoncircle) building on Circle's stablecoin infrastructure
|
|
1426
1426
|
|
|
1427
1427
|
Ready to start bridging? Let's make cross-chain bridging as easy as a single function call! 🌉
|
package/README.md
CHANGED
|
@@ -72,9 +72,9 @@ The Bridge Kit enables cross-chain stablecoin transfers via a type-safe, develop
|
|
|
72
72
|
- **🔧 Bring your own infrastructure**: Seamlessly integrate with your existing setup when needed
|
|
73
73
|
- **🔒 Production-ready security**: Leverages Circle's CCTPv2 with deterministic quotes and finality tracking
|
|
74
74
|
- **🚀 Developer experience**: Complete TypeScript support, comprehensive validation, and instant connectivity
|
|
75
|
-
- **🌍 Cross-chain bridging**: The Bridge Kit supports **
|
|
76
|
-
- **Mainnet (
|
|
77
|
-
- **Testnet (
|
|
75
|
+
- **🌍 Cross-chain bridging**: The Bridge Kit supports **37 chains** with **666 total bridge routes** through Circle's CCTPv2
|
|
76
|
+
- **Mainnet (18 chains)**: Arbitrum, Avalanche, Base, Codex, Ethereum, HyperEVM, Ink, Linea, Monad, OP Mainnet, Plume, Polygon PoS, Sei, Solana, Sonic, Unichain, World Chain, XDC
|
|
77
|
+
- **Testnet (19 chains)**: Arc Testnet, Arbitrum Sepolia, Avalanche Fuji, Base Sepolia, Codex Testnet, Ethereum Sepolia, HyperEVM Testnet, Ink Testnet, Linea Sepolia, Monad Testnet, OP Sepolia, Plume Testnet, Polygon PoS Amoy, Sei Testnet, Solana Devnet, Sonic Testnet, Unichain Sepolia, World Chain Sepolia, XDC Apothem
|
|
78
78
|
- **🎯 Flexible adapters**: Supporting EVM (Viem, Ethers) and Solana (@solana/web3)
|
|
79
79
|
- **⚙️ Configurable bridge speeds**: FAST/SLOW options with fee optimization
|
|
80
80
|
- **📡 Real-time event monitoring**: Track progress throughout the transfer lifecycle
|
|
@@ -194,26 +194,50 @@ const resultWithDifferentAdapter = await kit.bridge({
|
|
|
194
194
|
|
|
195
195
|
**Best for**: Production applications, better reliability, custom configuration
|
|
196
196
|
|
|
197
|
+
Bridging involves **two chains** (source and destination), and both require properly configured RPC endpoints. Use dynamic RPC mapping by chain ID to support multiple chains in a single adapter:
|
|
198
|
+
|
|
197
199
|
```typescript
|
|
198
|
-
import
|
|
200
|
+
import 'dotenv/config'
|
|
201
|
+
import { BridgeKit } from '@circle-fin/bridge-kit'
|
|
202
|
+
import { Ethereum, Base } from '@circle-fin/bridge-kit/chains'
|
|
203
|
+
import { createViemAdapterFromPrivateKey } from '@circle-fin/adapter-viem-v2'
|
|
204
|
+
import { createPublicClient, http, fallback } from 'viem'
|
|
205
|
+
|
|
206
|
+
// Define RPCs mapped by chain ID
|
|
207
|
+
const RPC_BY_CHAIN_ID: Record<number, string[]> = {
|
|
208
|
+
// The array allows providing multiple RPC URLs for fallback, e.g.,
|
|
209
|
+
// `[ "https://primary-rpc-url.com/...", "https://secondary-rpc-url.com/..." ]`
|
|
210
|
+
[Ethereum.chainId]: [
|
|
211
|
+
`https://eth-mainnet.g.alchemy.com/v2/${process.env.ALCHEMY_KEY}`,
|
|
212
|
+
],
|
|
213
|
+
[Base.chainId]: [
|
|
214
|
+
`https://base-mainnet.g.alchemy.com/v2/${process.env.ALCHEMY_KEY}`,
|
|
215
|
+
],
|
|
216
|
+
}
|
|
199
217
|
|
|
200
|
-
// Production-ready setup with custom RPC endpoints
|
|
201
218
|
const adapter = createViemAdapterFromPrivateKey({
|
|
202
|
-
privateKey: process.env.PRIVATE_KEY as string
|
|
203
|
-
getPublicClient: ({ chain }) =>
|
|
204
|
-
|
|
219
|
+
privateKey: process.env.PRIVATE_KEY as `0x${string}`,
|
|
220
|
+
getPublicClient: ({ chain }) => {
|
|
221
|
+
const rpcUrls = RPC_BY_CHAIN_ID[chain.id]
|
|
222
|
+
if (!rpcUrls) {
|
|
223
|
+
throw new Error(`No RPC configured for chainId=${chain.id}`)
|
|
224
|
+
}
|
|
225
|
+
return createPublicClient({
|
|
205
226
|
chain,
|
|
206
|
-
transport:
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
227
|
+
transport: fallback(
|
|
228
|
+
rpcUrls.map((url) =>
|
|
229
|
+
http(url, {
|
|
230
|
+
timeout: 10_000,
|
|
231
|
+
retryCount: 3,
|
|
232
|
+
}),
|
|
233
|
+
),
|
|
212
234
|
),
|
|
213
|
-
})
|
|
235
|
+
})
|
|
236
|
+
},
|
|
214
237
|
})
|
|
215
238
|
|
|
216
|
-
|
|
239
|
+
const kit = new BridgeKit()
|
|
240
|
+
|
|
217
241
|
const result = await kit.bridge({
|
|
218
242
|
from: { adapter, chain: 'Ethereum' },
|
|
219
243
|
to: { adapter, chain: 'Base' },
|
|
@@ -221,13 +245,22 @@ const result = await kit.bridge({
|
|
|
221
245
|
})
|
|
222
246
|
```
|
|
223
247
|
|
|
248
|
+
**Best practices:**
|
|
249
|
+
|
|
250
|
+
- **Use paid RPC providers** (Alchemy, Infura, QuickNode) for improved reliability
|
|
251
|
+
- **Implement `fallback()` transport** for automatic failover between endpoints
|
|
252
|
+
- **Configure timeout and retry options** to handle network variability
|
|
253
|
+
|
|
224
254
|
### 🌐 Browser/Wallet Provider Support
|
|
225
255
|
|
|
226
256
|
**Best for**: Browser applications, wallet integrations, user-controlled transactions
|
|
227
257
|
|
|
228
258
|
```typescript
|
|
259
|
+
import { BridgeKit } from '@circle-fin/bridge-kit'
|
|
229
260
|
import { createViemAdapterFromProvider } from '@circle-fin/adapter-viem-v2'
|
|
230
261
|
|
|
262
|
+
const kit = new BridgeKit()
|
|
263
|
+
|
|
231
264
|
// Create adapters from browser wallet providers
|
|
232
265
|
const adapter = await createViemAdapterFromProvider({
|
|
233
266
|
provider: window.ethereum,
|
|
@@ -254,10 +287,10 @@ import { privateKeyToAccount } from 'viem/accounts'
|
|
|
254
287
|
|
|
255
288
|
const account = privateKeyToAccount(process.env.PRIVATE_KEY as string)
|
|
256
289
|
|
|
257
|
-
// Chain-specific RPC URLs
|
|
258
|
-
const rpcUrls = {
|
|
259
|
-
[Ethereum.
|
|
260
|
-
[Base.
|
|
290
|
+
// Chain-specific RPC URLs mapped by chain ID
|
|
291
|
+
const rpcUrls: Record<number, string> = {
|
|
292
|
+
[Ethereum.chainId]: 'https://eth-mainnet.g.alchemy.com/v2/YOUR_KEY',
|
|
293
|
+
[Base.chainId]: 'https://base-mainnet.g.alchemy.com/v2/YOUR_KEY',
|
|
261
294
|
}
|
|
262
295
|
|
|
263
296
|
// Create one multi-chain adapter with chain-specific RPC configuration
|
|
@@ -445,8 +478,12 @@ For dynamic fee calculation across all transfers, use kit-level policies:
|
|
|
445
478
|
|
|
446
479
|
```typescript
|
|
447
480
|
import { BridgeKit } from '@circle-fin/bridge-kit'
|
|
481
|
+
import { createViemAdapterFromPrivateKey } from '@circle-fin/adapter-viem-v2'
|
|
448
482
|
|
|
449
483
|
const kit = new BridgeKit()
|
|
484
|
+
const adapter = createViemAdapterFromPrivateKey({
|
|
485
|
+
privateKey: process.env.PRIVATE_KEY as `0x${string}`,
|
|
486
|
+
})
|
|
450
487
|
|
|
451
488
|
kit.setCustomFeePolicy({
|
|
452
489
|
computeFee: (params) => {
|
package/chains.cjs
CHANGED
|
@@ -62,6 +62,8 @@ var Blockchain;
|
|
|
62
62
|
Blockchain["Ink_Testnet"] = "Ink_Testnet";
|
|
63
63
|
Blockchain["Linea"] = "Linea";
|
|
64
64
|
Blockchain["Linea_Sepolia"] = "Linea_Sepolia";
|
|
65
|
+
Blockchain["Monad"] = "Monad";
|
|
66
|
+
Blockchain["Monad_Testnet"] = "Monad_Testnet";
|
|
65
67
|
Blockchain["NEAR"] = "NEAR";
|
|
66
68
|
Blockchain["NEAR_Testnet"] = "NEAR_Testnet";
|
|
67
69
|
Blockchain["Noble"] = "Noble";
|
|
@@ -153,6 +155,7 @@ exports.BridgeChain = void 0;
|
|
|
153
155
|
BridgeChain["HyperEVM"] = "HyperEVM";
|
|
154
156
|
BridgeChain["Ink"] = "Ink";
|
|
155
157
|
BridgeChain["Linea"] = "Linea";
|
|
158
|
+
BridgeChain["Monad"] = "Monad";
|
|
156
159
|
BridgeChain["Optimism"] = "Optimism";
|
|
157
160
|
BridgeChain["Plume"] = "Plume";
|
|
158
161
|
BridgeChain["Polygon"] = "Polygon";
|
|
@@ -172,6 +175,7 @@ exports.BridgeChain = void 0;
|
|
|
172
175
|
BridgeChain["HyperEVM_Testnet"] = "HyperEVM_Testnet";
|
|
173
176
|
BridgeChain["Ink_Testnet"] = "Ink_Testnet";
|
|
174
177
|
BridgeChain["Linea_Sepolia"] = "Linea_Sepolia";
|
|
178
|
+
BridgeChain["Monad_Testnet"] = "Monad_Testnet";
|
|
175
179
|
BridgeChain["Optimism_Sepolia"] = "Optimism_Sepolia";
|
|
176
180
|
BridgeChain["Plume_Testnet"] = "Plume_Testnet";
|
|
177
181
|
BridgeChain["Polygon_Amoy_Testnet"] = "Polygon_Amoy_Testnet";
|
|
@@ -366,8 +370,11 @@ const ArcTestnet = defineChain({
|
|
|
366
370
|
name: 'Arc Testnet',
|
|
367
371
|
title: 'ArcTestnet',
|
|
368
372
|
nativeCurrency: {
|
|
369
|
-
name: '
|
|
370
|
-
symbol: '
|
|
373
|
+
name: 'USDC',
|
|
374
|
+
symbol: 'USDC',
|
|
375
|
+
// Arc uses native USDC with 18 decimals for gas payments (EVM standard).
|
|
376
|
+
// Note: The ERC-20 USDC contract at usdcAddress uses 6 decimals.
|
|
377
|
+
// See: https://docs.arc.network/arc/references/contract-addresses
|
|
371
378
|
decimals: 18,
|
|
372
379
|
},
|
|
373
380
|
chainId: 5042002,
|
|
@@ -1155,6 +1162,86 @@ const LineaSepolia = defineChain({
|
|
|
1155
1162
|
},
|
|
1156
1163
|
});
|
|
1157
1164
|
|
|
1165
|
+
/**
|
|
1166
|
+
* Monad Mainnet chain definition
|
|
1167
|
+
* @remarks
|
|
1168
|
+
* This represents the official production network for the Monad blockchain.
|
|
1169
|
+
* Monad is a high-performance EVM-compatible Layer-1 blockchain featuring
|
|
1170
|
+
* over 10,000 TPS, sub-second finality, and near-zero gas fees.
|
|
1171
|
+
*/
|
|
1172
|
+
const Monad = defineChain({
|
|
1173
|
+
type: 'evm',
|
|
1174
|
+
chain: Blockchain.Monad,
|
|
1175
|
+
name: 'Monad',
|
|
1176
|
+
title: 'Monad Mainnet',
|
|
1177
|
+
nativeCurrency: {
|
|
1178
|
+
name: 'Monad',
|
|
1179
|
+
symbol: 'MON',
|
|
1180
|
+
decimals: 18,
|
|
1181
|
+
},
|
|
1182
|
+
chainId: 143,
|
|
1183
|
+
isTestnet: false,
|
|
1184
|
+
explorerUrl: 'https://monadscan.com/tx/{hash}',
|
|
1185
|
+
rpcEndpoints: ['https://rpc.monad.xyz'],
|
|
1186
|
+
eurcAddress: null,
|
|
1187
|
+
usdcAddress: '0x754704Bc059F8C67012fEd69BC8A327a5aafb603',
|
|
1188
|
+
cctp: {
|
|
1189
|
+
domain: 15,
|
|
1190
|
+
contracts: {
|
|
1191
|
+
v2: {
|
|
1192
|
+
type: 'split',
|
|
1193
|
+
tokenMessenger: '0x28b5a0e9C621a5BadaA536219b3a228C8168cf5d',
|
|
1194
|
+
messageTransmitter: '0x81D40F21F12A8F0E3252Bccb954D722d4c464B64',
|
|
1195
|
+
confirmations: 1,
|
|
1196
|
+
fastConfirmations: 1,
|
|
1197
|
+
},
|
|
1198
|
+
},
|
|
1199
|
+
},
|
|
1200
|
+
kitContracts: {
|
|
1201
|
+
bridge: BRIDGE_CONTRACT_EVM_MAINNET,
|
|
1202
|
+
},
|
|
1203
|
+
});
|
|
1204
|
+
|
|
1205
|
+
/**
|
|
1206
|
+
* Monad Testnet chain definition
|
|
1207
|
+
* @remarks
|
|
1208
|
+
* This represents the official test network for the Monad blockchain.
|
|
1209
|
+
* Monad is a high-performance EVM-compatible Layer-1 blockchain featuring
|
|
1210
|
+
* over 10,000 TPS, sub-second finality, and near-zero gas fees.
|
|
1211
|
+
*/
|
|
1212
|
+
const MonadTestnet = defineChain({
|
|
1213
|
+
type: 'evm',
|
|
1214
|
+
chain: Blockchain.Monad_Testnet,
|
|
1215
|
+
name: 'Monad Testnet',
|
|
1216
|
+
title: 'Monad Testnet',
|
|
1217
|
+
nativeCurrency: {
|
|
1218
|
+
name: 'Monad',
|
|
1219
|
+
symbol: 'MON',
|
|
1220
|
+
decimals: 18,
|
|
1221
|
+
},
|
|
1222
|
+
chainId: 10143,
|
|
1223
|
+
isTestnet: true,
|
|
1224
|
+
explorerUrl: 'https://testnet.monadscan.com/tx/{hash}',
|
|
1225
|
+
rpcEndpoints: ['https://testnet-rpc.monad.xyz'],
|
|
1226
|
+
eurcAddress: null,
|
|
1227
|
+
usdcAddress: '0x534b2f3A21130d7a60830c2Df862319e593943A3',
|
|
1228
|
+
cctp: {
|
|
1229
|
+
domain: 15,
|
|
1230
|
+
contracts: {
|
|
1231
|
+
v2: {
|
|
1232
|
+
type: 'split',
|
|
1233
|
+
tokenMessenger: '0x8FE6B999Dc680CcFDD5Bf7EB0974218be2542DAA',
|
|
1234
|
+
messageTransmitter: '0xE737e5cEBEEBa77EFE34D4aa090756590b1CE275',
|
|
1235
|
+
confirmations: 1,
|
|
1236
|
+
fastConfirmations: 1,
|
|
1237
|
+
},
|
|
1238
|
+
},
|
|
1239
|
+
},
|
|
1240
|
+
kitContracts: {
|
|
1241
|
+
bridge: BRIDGE_CONTRACT_EVM_TESTNET,
|
|
1242
|
+
},
|
|
1243
|
+
});
|
|
1244
|
+
|
|
1158
1245
|
/**
|
|
1159
1246
|
* NEAR Protocol Mainnet chain definition
|
|
1160
1247
|
* @remarks
|
|
@@ -2416,6 +2503,8 @@ exports.Ink = Ink;
|
|
|
2416
2503
|
exports.InkTestnet = InkTestnet;
|
|
2417
2504
|
exports.Linea = Linea;
|
|
2418
2505
|
exports.LineaSepolia = LineaSepolia;
|
|
2506
|
+
exports.Monad = Monad;
|
|
2507
|
+
exports.MonadTestnet = MonadTestnet;
|
|
2419
2508
|
exports.Optimism = Optimism;
|
|
2420
2509
|
exports.OptimismSepolia = OptimismSepolia;
|
|
2421
2510
|
exports.Plume = Plume;
|
package/chains.d.ts
CHANGED
|
@@ -54,6 +54,8 @@ declare enum Blockchain {
|
|
|
54
54
|
Ink_Testnet = "Ink_Testnet",
|
|
55
55
|
Linea = "Linea",
|
|
56
56
|
Linea_Sepolia = "Linea_Sepolia",
|
|
57
|
+
Monad = "Monad",
|
|
58
|
+
Monad_Testnet = "Monad_Testnet",
|
|
57
59
|
NEAR = "NEAR",
|
|
58
60
|
NEAR_Testnet = "NEAR_Testnet",
|
|
59
61
|
Noble = "Noble",
|
|
@@ -140,6 +142,7 @@ declare enum BridgeChain {
|
|
|
140
142
|
HyperEVM = "HyperEVM",
|
|
141
143
|
Ink = "Ink",
|
|
142
144
|
Linea = "Linea",
|
|
145
|
+
Monad = "Monad",
|
|
143
146
|
Optimism = "Optimism",
|
|
144
147
|
Plume = "Plume",
|
|
145
148
|
Polygon = "Polygon",
|
|
@@ -158,6 +161,7 @@ declare enum BridgeChain {
|
|
|
158
161
|
HyperEVM_Testnet = "HyperEVM_Testnet",
|
|
159
162
|
Ink_Testnet = "Ink_Testnet",
|
|
160
163
|
Linea_Sepolia = "Linea_Sepolia",
|
|
164
|
+
Monad_Testnet = "Monad_Testnet",
|
|
161
165
|
Optimism_Sepolia = "Optimism_Sepolia",
|
|
162
166
|
Plume_Testnet = "Plume_Testnet",
|
|
163
167
|
Polygon_Amoy_Testnet = "Polygon_Amoy_Testnet",
|
|
@@ -184,8 +188,8 @@ declare const ArcTestnet: {
|
|
|
184
188
|
readonly name: "Arc Testnet";
|
|
185
189
|
readonly title: "ArcTestnet";
|
|
186
190
|
readonly nativeCurrency: {
|
|
187
|
-
readonly name: "
|
|
188
|
-
readonly symbol: "
|
|
191
|
+
readonly name: "USDC";
|
|
192
|
+
readonly symbol: "USDC";
|
|
189
193
|
readonly decimals: 18;
|
|
190
194
|
};
|
|
191
195
|
readonly chainId: 5042002;
|
|
@@ -873,6 +877,86 @@ declare const LineaSepolia: {
|
|
|
873
877
|
};
|
|
874
878
|
};
|
|
875
879
|
|
|
880
|
+
/**
|
|
881
|
+
* Monad Mainnet chain definition
|
|
882
|
+
* @remarks
|
|
883
|
+
* This represents the official production network for the Monad blockchain.
|
|
884
|
+
* Monad is a high-performance EVM-compatible Layer-1 blockchain featuring
|
|
885
|
+
* over 10,000 TPS, sub-second finality, and near-zero gas fees.
|
|
886
|
+
*/
|
|
887
|
+
declare const Monad: {
|
|
888
|
+
readonly type: "evm";
|
|
889
|
+
readonly chain: Blockchain.Monad;
|
|
890
|
+
readonly name: "Monad";
|
|
891
|
+
readonly title: "Monad Mainnet";
|
|
892
|
+
readonly nativeCurrency: {
|
|
893
|
+
readonly name: "Monad";
|
|
894
|
+
readonly symbol: "MON";
|
|
895
|
+
readonly decimals: 18;
|
|
896
|
+
};
|
|
897
|
+
readonly chainId: 143;
|
|
898
|
+
readonly isTestnet: false;
|
|
899
|
+
readonly explorerUrl: "https://monadscan.com/tx/{hash}";
|
|
900
|
+
readonly rpcEndpoints: readonly ["https://rpc.monad.xyz"];
|
|
901
|
+
readonly eurcAddress: null;
|
|
902
|
+
readonly usdcAddress: "0x754704Bc059F8C67012fEd69BC8A327a5aafb603";
|
|
903
|
+
readonly cctp: {
|
|
904
|
+
readonly domain: 15;
|
|
905
|
+
readonly contracts: {
|
|
906
|
+
readonly v2: {
|
|
907
|
+
readonly type: "split";
|
|
908
|
+
readonly tokenMessenger: "0x28b5a0e9C621a5BadaA536219b3a228C8168cf5d";
|
|
909
|
+
readonly messageTransmitter: "0x81D40F21F12A8F0E3252Bccb954D722d4c464B64";
|
|
910
|
+
readonly confirmations: 1;
|
|
911
|
+
readonly fastConfirmations: 1;
|
|
912
|
+
};
|
|
913
|
+
};
|
|
914
|
+
};
|
|
915
|
+
readonly kitContracts: {
|
|
916
|
+
readonly bridge: "0xB3FA262d0fB521cc93bE83d87b322b8A23DAf3F0";
|
|
917
|
+
};
|
|
918
|
+
};
|
|
919
|
+
|
|
920
|
+
/**
|
|
921
|
+
* Monad Testnet chain definition
|
|
922
|
+
* @remarks
|
|
923
|
+
* This represents the official test network for the Monad blockchain.
|
|
924
|
+
* Monad is a high-performance EVM-compatible Layer-1 blockchain featuring
|
|
925
|
+
* over 10,000 TPS, sub-second finality, and near-zero gas fees.
|
|
926
|
+
*/
|
|
927
|
+
declare const MonadTestnet: {
|
|
928
|
+
readonly type: "evm";
|
|
929
|
+
readonly chain: Blockchain.Monad_Testnet;
|
|
930
|
+
readonly name: "Monad Testnet";
|
|
931
|
+
readonly title: "Monad Testnet";
|
|
932
|
+
readonly nativeCurrency: {
|
|
933
|
+
readonly name: "Monad";
|
|
934
|
+
readonly symbol: "MON";
|
|
935
|
+
readonly decimals: 18;
|
|
936
|
+
};
|
|
937
|
+
readonly chainId: 10143;
|
|
938
|
+
readonly isTestnet: true;
|
|
939
|
+
readonly explorerUrl: "https://testnet.monadscan.com/tx/{hash}";
|
|
940
|
+
readonly rpcEndpoints: readonly ["https://testnet-rpc.monad.xyz"];
|
|
941
|
+
readonly eurcAddress: null;
|
|
942
|
+
readonly usdcAddress: "0x534b2f3A21130d7a60830c2Df862319e593943A3";
|
|
943
|
+
readonly cctp: {
|
|
944
|
+
readonly domain: 15;
|
|
945
|
+
readonly contracts: {
|
|
946
|
+
readonly v2: {
|
|
947
|
+
readonly type: "split";
|
|
948
|
+
readonly tokenMessenger: "0x8FE6B999Dc680CcFDD5Bf7EB0974218be2542DAA";
|
|
949
|
+
readonly messageTransmitter: "0xE737e5cEBEEBa77EFE34D4aa090756590b1CE275";
|
|
950
|
+
readonly confirmations: 1;
|
|
951
|
+
readonly fastConfirmations: 1;
|
|
952
|
+
};
|
|
953
|
+
};
|
|
954
|
+
};
|
|
955
|
+
readonly kitContracts: {
|
|
956
|
+
readonly bridge: "0xC5567a5E3370d4DBfB0540025078e283e36A363d";
|
|
957
|
+
};
|
|
958
|
+
};
|
|
959
|
+
|
|
876
960
|
/**
|
|
877
961
|
* Optimism Mainnet chain definition
|
|
878
962
|
* @remarks
|
|
@@ -1611,4 +1695,4 @@ declare const XDCApothem: {
|
|
|
1611
1695
|
};
|
|
1612
1696
|
};
|
|
1613
1697
|
|
|
1614
|
-
export { Arbitrum, ArbitrumSepolia, ArcTestnet, Avalanche, AvalancheFuji, Base, BaseSepolia, BridgeChain, Codex, CodexTestnet, Ethereum, EthereumSepolia, HyperEVM, HyperEVMTestnet, Ink, InkTestnet, Linea, LineaSepolia, Optimism, OptimismSepolia, Plume, PlumeTestnet, Polygon, PolygonAmoy, Sei, SeiTestnet, Solana, SolanaDevnet, Sonic, SonicTestnet, Unichain, UnichainSepolia, WorldChain, WorldChainSepolia, XDC, XDCApothem };
|
|
1698
|
+
export { Arbitrum, ArbitrumSepolia, ArcTestnet, Avalanche, AvalancheFuji, Base, BaseSepolia, BridgeChain, Codex, CodexTestnet, Ethereum, EthereumSepolia, HyperEVM, HyperEVMTestnet, Ink, InkTestnet, Linea, LineaSepolia, Monad, MonadTestnet, Optimism, OptimismSepolia, Plume, PlumeTestnet, Polygon, PolygonAmoy, Sei, SeiTestnet, Solana, SolanaDevnet, Sonic, SonicTestnet, Unichain, UnichainSepolia, WorldChain, WorldChainSepolia, XDC, XDCApothem };
|
package/chains.mjs
CHANGED
|
@@ -60,6 +60,8 @@ var Blockchain;
|
|
|
60
60
|
Blockchain["Ink_Testnet"] = "Ink_Testnet";
|
|
61
61
|
Blockchain["Linea"] = "Linea";
|
|
62
62
|
Blockchain["Linea_Sepolia"] = "Linea_Sepolia";
|
|
63
|
+
Blockchain["Monad"] = "Monad";
|
|
64
|
+
Blockchain["Monad_Testnet"] = "Monad_Testnet";
|
|
63
65
|
Blockchain["NEAR"] = "NEAR";
|
|
64
66
|
Blockchain["NEAR_Testnet"] = "NEAR_Testnet";
|
|
65
67
|
Blockchain["Noble"] = "Noble";
|
|
@@ -151,6 +153,7 @@ var BridgeChain;
|
|
|
151
153
|
BridgeChain["HyperEVM"] = "HyperEVM";
|
|
152
154
|
BridgeChain["Ink"] = "Ink";
|
|
153
155
|
BridgeChain["Linea"] = "Linea";
|
|
156
|
+
BridgeChain["Monad"] = "Monad";
|
|
154
157
|
BridgeChain["Optimism"] = "Optimism";
|
|
155
158
|
BridgeChain["Plume"] = "Plume";
|
|
156
159
|
BridgeChain["Polygon"] = "Polygon";
|
|
@@ -170,6 +173,7 @@ var BridgeChain;
|
|
|
170
173
|
BridgeChain["HyperEVM_Testnet"] = "HyperEVM_Testnet";
|
|
171
174
|
BridgeChain["Ink_Testnet"] = "Ink_Testnet";
|
|
172
175
|
BridgeChain["Linea_Sepolia"] = "Linea_Sepolia";
|
|
176
|
+
BridgeChain["Monad_Testnet"] = "Monad_Testnet";
|
|
173
177
|
BridgeChain["Optimism_Sepolia"] = "Optimism_Sepolia";
|
|
174
178
|
BridgeChain["Plume_Testnet"] = "Plume_Testnet";
|
|
175
179
|
BridgeChain["Polygon_Amoy_Testnet"] = "Polygon_Amoy_Testnet";
|
|
@@ -364,8 +368,11 @@ const ArcTestnet = defineChain({
|
|
|
364
368
|
name: 'Arc Testnet',
|
|
365
369
|
title: 'ArcTestnet',
|
|
366
370
|
nativeCurrency: {
|
|
367
|
-
name: '
|
|
368
|
-
symbol: '
|
|
371
|
+
name: 'USDC',
|
|
372
|
+
symbol: 'USDC',
|
|
373
|
+
// Arc uses native USDC with 18 decimals for gas payments (EVM standard).
|
|
374
|
+
// Note: The ERC-20 USDC contract at usdcAddress uses 6 decimals.
|
|
375
|
+
// See: https://docs.arc.network/arc/references/contract-addresses
|
|
369
376
|
decimals: 18,
|
|
370
377
|
},
|
|
371
378
|
chainId: 5042002,
|
|
@@ -1153,6 +1160,86 @@ const LineaSepolia = defineChain({
|
|
|
1153
1160
|
},
|
|
1154
1161
|
});
|
|
1155
1162
|
|
|
1163
|
+
/**
|
|
1164
|
+
* Monad Mainnet chain definition
|
|
1165
|
+
* @remarks
|
|
1166
|
+
* This represents the official production network for the Monad blockchain.
|
|
1167
|
+
* Monad is a high-performance EVM-compatible Layer-1 blockchain featuring
|
|
1168
|
+
* over 10,000 TPS, sub-second finality, and near-zero gas fees.
|
|
1169
|
+
*/
|
|
1170
|
+
const Monad = defineChain({
|
|
1171
|
+
type: 'evm',
|
|
1172
|
+
chain: Blockchain.Monad,
|
|
1173
|
+
name: 'Monad',
|
|
1174
|
+
title: 'Monad Mainnet',
|
|
1175
|
+
nativeCurrency: {
|
|
1176
|
+
name: 'Monad',
|
|
1177
|
+
symbol: 'MON',
|
|
1178
|
+
decimals: 18,
|
|
1179
|
+
},
|
|
1180
|
+
chainId: 143,
|
|
1181
|
+
isTestnet: false,
|
|
1182
|
+
explorerUrl: 'https://monadscan.com/tx/{hash}',
|
|
1183
|
+
rpcEndpoints: ['https://rpc.monad.xyz'],
|
|
1184
|
+
eurcAddress: null,
|
|
1185
|
+
usdcAddress: '0x754704Bc059F8C67012fEd69BC8A327a5aafb603',
|
|
1186
|
+
cctp: {
|
|
1187
|
+
domain: 15,
|
|
1188
|
+
contracts: {
|
|
1189
|
+
v2: {
|
|
1190
|
+
type: 'split',
|
|
1191
|
+
tokenMessenger: '0x28b5a0e9C621a5BadaA536219b3a228C8168cf5d',
|
|
1192
|
+
messageTransmitter: '0x81D40F21F12A8F0E3252Bccb954D722d4c464B64',
|
|
1193
|
+
confirmations: 1,
|
|
1194
|
+
fastConfirmations: 1,
|
|
1195
|
+
},
|
|
1196
|
+
},
|
|
1197
|
+
},
|
|
1198
|
+
kitContracts: {
|
|
1199
|
+
bridge: BRIDGE_CONTRACT_EVM_MAINNET,
|
|
1200
|
+
},
|
|
1201
|
+
});
|
|
1202
|
+
|
|
1203
|
+
/**
|
|
1204
|
+
* Monad Testnet chain definition
|
|
1205
|
+
* @remarks
|
|
1206
|
+
* This represents the official test network for the Monad blockchain.
|
|
1207
|
+
* Monad is a high-performance EVM-compatible Layer-1 blockchain featuring
|
|
1208
|
+
* over 10,000 TPS, sub-second finality, and near-zero gas fees.
|
|
1209
|
+
*/
|
|
1210
|
+
const MonadTestnet = defineChain({
|
|
1211
|
+
type: 'evm',
|
|
1212
|
+
chain: Blockchain.Monad_Testnet,
|
|
1213
|
+
name: 'Monad Testnet',
|
|
1214
|
+
title: 'Monad Testnet',
|
|
1215
|
+
nativeCurrency: {
|
|
1216
|
+
name: 'Monad',
|
|
1217
|
+
symbol: 'MON',
|
|
1218
|
+
decimals: 18,
|
|
1219
|
+
},
|
|
1220
|
+
chainId: 10143,
|
|
1221
|
+
isTestnet: true,
|
|
1222
|
+
explorerUrl: 'https://testnet.monadscan.com/tx/{hash}',
|
|
1223
|
+
rpcEndpoints: ['https://testnet-rpc.monad.xyz'],
|
|
1224
|
+
eurcAddress: null,
|
|
1225
|
+
usdcAddress: '0x534b2f3A21130d7a60830c2Df862319e593943A3',
|
|
1226
|
+
cctp: {
|
|
1227
|
+
domain: 15,
|
|
1228
|
+
contracts: {
|
|
1229
|
+
v2: {
|
|
1230
|
+
type: 'split',
|
|
1231
|
+
tokenMessenger: '0x8FE6B999Dc680CcFDD5Bf7EB0974218be2542DAA',
|
|
1232
|
+
messageTransmitter: '0xE737e5cEBEEBa77EFE34D4aa090756590b1CE275',
|
|
1233
|
+
confirmations: 1,
|
|
1234
|
+
fastConfirmations: 1,
|
|
1235
|
+
},
|
|
1236
|
+
},
|
|
1237
|
+
},
|
|
1238
|
+
kitContracts: {
|
|
1239
|
+
bridge: BRIDGE_CONTRACT_EVM_TESTNET,
|
|
1240
|
+
},
|
|
1241
|
+
});
|
|
1242
|
+
|
|
1156
1243
|
/**
|
|
1157
1244
|
* NEAR Protocol Mainnet chain definition
|
|
1158
1245
|
* @remarks
|
|
@@ -2397,5 +2484,5 @@ z.union([
|
|
|
2397
2484
|
})),
|
|
2398
2485
|
]);
|
|
2399
2486
|
|
|
2400
|
-
export { Arbitrum, ArbitrumSepolia, ArcTestnet, Avalanche, AvalancheFuji, Base, BaseSepolia, BridgeChain, Codex, CodexTestnet, Ethereum, EthereumSepolia, HyperEVM, HyperEVMTestnet, Ink, InkTestnet, Linea, LineaSepolia, Optimism, OptimismSepolia, Plume, PlumeTestnet, Polygon, PolygonAmoy, Sei, SeiTestnet, Solana, SolanaDevnet, Sonic, SonicTestnet, Unichain, UnichainSepolia, WorldChain, WorldChainSepolia, XDC, XDCApothem };
|
|
2487
|
+
export { Arbitrum, ArbitrumSepolia, ArcTestnet, Avalanche, AvalancheFuji, Base, BaseSepolia, BridgeChain, Codex, CodexTestnet, Ethereum, EthereumSepolia, HyperEVM, HyperEVMTestnet, Ink, InkTestnet, Linea, LineaSepolia, Monad, MonadTestnet, Optimism, OptimismSepolia, Plume, PlumeTestnet, Polygon, PolygonAmoy, Sei, SeiTestnet, Solana, SolanaDevnet, Sonic, SonicTestnet, Unichain, UnichainSepolia, WorldChain, WorldChainSepolia, XDC, XDCApothem };
|
|
2401
2488
|
//# sourceMappingURL=chains.mjs.map
|