@circle-fin/app-kit 1.10.0 → 1.12.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 +73 -0
- package/README.md +56 -25
- package/bridge.cjs +297 -48
- package/bridge.d.cts +891 -2
- package/bridge.d.mts +891 -2
- package/bridge.d.ts +891 -2
- package/bridge.mjs +297 -48
- package/chains.cjs +117 -1
- package/chains.d.cts +96 -2
- package/chains.d.mts +96 -2
- package/chains.d.ts +96 -2
- package/chains.mjs +116 -2
- package/context.cjs +11 -0
- package/context.d.cts +891 -2
- package/context.d.mts +891 -2
- package/context.d.ts +891 -2
- package/context.mjs +11 -0
- package/earn.cjs +2343 -175
- package/earn.d.cts +891 -2
- package/earn.d.mts +891 -2
- package/earn.d.ts +891 -2
- package/earn.mjs +2343 -175
- package/estimateBridge.cjs +297 -48
- package/estimateBridge.d.cts +891 -2
- package/estimateBridge.d.mts +891 -2
- package/estimateBridge.d.ts +891 -2
- package/estimateBridge.mjs +297 -48
- package/estimateSwap.cjs +391 -39
- package/estimateSwap.d.cts +890 -2
- package/estimateSwap.d.mts +890 -2
- package/estimateSwap.d.ts +890 -2
- package/estimateSwap.mjs +391 -39
- package/index.cjs +2591 -315
- package/index.d.cts +2382 -1632
- package/index.d.mts +2382 -1632
- package/index.d.ts +2382 -1632
- package/index.mjs +2590 -316
- package/package.json +7 -6
- package/swap.cjs +391 -39
- package/swap.d.cts +890 -2
- package/swap.d.mts +890 -2
- package/swap.d.ts +890 -2
- package/swap.mjs +391 -39
- package/unifiedBalance.cjs +411 -132
- package/unifiedBalance.d.cts +30 -5
- package/unifiedBalance.d.mts +30 -5
- package/unifiedBalance.d.ts +30 -5
- package/unifiedBalance.mjs +411 -132
package/chains.cjs
CHANGED
|
@@ -18,6 +18,17 @@
|
|
|
18
18
|
|
|
19
19
|
'use strict';
|
|
20
20
|
|
|
21
|
+
// Buffer polyfill setup - executes before any other code
|
|
22
|
+
// Ensures globalThis.Buffer is available for Solana libraries
|
|
23
|
+
const { Buffer } = require('buffer');
|
|
24
|
+
if (typeof globalThis !== 'undefined' && typeof globalThis.Buffer === 'undefined') {
|
|
25
|
+
globalThis.Buffer = Buffer;
|
|
26
|
+
}
|
|
27
|
+
if (typeof window !== 'undefined' && typeof window.Buffer === 'undefined') {
|
|
28
|
+
window.Buffer = Buffer;
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
|
|
21
32
|
var zod = require('zod');
|
|
22
33
|
|
|
23
34
|
/**
|
|
@@ -113,6 +124,8 @@ var zod = require('zod');
|
|
|
113
124
|
Blockchain["World_Chain_Sepolia"] = "World_Chain_Sepolia";
|
|
114
125
|
Blockchain["XDC"] = "XDC";
|
|
115
126
|
Blockchain["XDC_Apothem"] = "XDC_Apothem";
|
|
127
|
+
Blockchain["X_Layer"] = "X_Layer";
|
|
128
|
+
Blockchain["X_Layer_Testnet"] = "X_Layer_Testnet";
|
|
116
129
|
Blockchain["ZKSync_Era"] = "ZKSync_Era";
|
|
117
130
|
Blockchain["ZKSync_Sepolia"] = "ZKSync_Sepolia";
|
|
118
131
|
})(Blockchain || (Blockchain = {}));
|
|
@@ -166,6 +179,7 @@ var BridgeChain;
|
|
|
166
179
|
BridgeChain["Unichain"] = "Unichain";
|
|
167
180
|
BridgeChain["World_Chain"] = "World_Chain";
|
|
168
181
|
BridgeChain["XDC"] = "XDC";
|
|
182
|
+
BridgeChain["X_Layer"] = "X_Layer";
|
|
169
183
|
// Testnet chains with CCTPv2 support
|
|
170
184
|
BridgeChain["Arc_Testnet"] = "Arc_Testnet";
|
|
171
185
|
BridgeChain["Arbitrum_Sepolia"] = "Arbitrum_Sepolia";
|
|
@@ -191,6 +205,7 @@ var BridgeChain;
|
|
|
191
205
|
BridgeChain["Unichain_Sepolia"] = "Unichain_Sepolia";
|
|
192
206
|
BridgeChain["World_Chain_Sepolia"] = "World_Chain_Sepolia";
|
|
193
207
|
BridgeChain["XDC_Apothem"] = "XDC_Apothem";
|
|
208
|
+
BridgeChain["X_Layer_Testnet"] = "X_Layer_Testnet";
|
|
194
209
|
})(BridgeChain || (BridgeChain = {}));
|
|
195
210
|
var UnifiedBalanceChain;
|
|
196
211
|
(function(UnifiedBalanceChain) {
|
|
@@ -2728,7 +2743,8 @@ var EarnChain;
|
|
|
2728
2743
|
isTestnet: true,
|
|
2729
2744
|
explorerUrl: 'https://amoy.polygonscan.com/tx/{hash}',
|
|
2730
2745
|
rpcEndpoints: [
|
|
2731
|
-
'https://
|
|
2746
|
+
'https://polygon-amoy-bor-rpc.publicnode.com',
|
|
2747
|
+
'https://polygon-amoy.drpc.org'
|
|
2732
2748
|
],
|
|
2733
2749
|
eurcAddress: null,
|
|
2734
2750
|
usdcAddress: '0x41e94eb019c0762f9bfcf9fb1e58725bfb0e7582',
|
|
@@ -3593,6 +3609,104 @@ var EarnChain;
|
|
|
3593
3609
|
}
|
|
3594
3610
|
});
|
|
3595
3611
|
|
|
3612
|
+
/**
|
|
3613
|
+
* X Layer Mainnet chain definition
|
|
3614
|
+
* @remarks
|
|
3615
|
+
* This represents the official production network for the X Layer blockchain.
|
|
3616
|
+
* X Layer is an EVM-compatible OP Stack Layer-2 blockchain built by OKX,
|
|
3617
|
+
* using OKB as its native gas token. (Migrated from Polygon zkEVM/CDK to the
|
|
3618
|
+
* OP Stack on 2025-10-27; older docs describing it as zkEVM are obsolete.)
|
|
3619
|
+
*/ const XLayer = defineChain({
|
|
3620
|
+
type: 'evm',
|
|
3621
|
+
chain: Blockchain.X_Layer,
|
|
3622
|
+
name: 'X Layer',
|
|
3623
|
+
title: 'X Layer Mainnet',
|
|
3624
|
+
nativeCurrency: {
|
|
3625
|
+
name: 'OKB',
|
|
3626
|
+
symbol: 'OKB',
|
|
3627
|
+
decimals: 18
|
|
3628
|
+
},
|
|
3629
|
+
chainId: 196,
|
|
3630
|
+
isTestnet: false,
|
|
3631
|
+
explorerUrl: 'https://www.oklink.com/xlayer/tx/{hash}',
|
|
3632
|
+
rpcEndpoints: [
|
|
3633
|
+
'https://xlayerrpc.okx.com'
|
|
3634
|
+
],
|
|
3635
|
+
eurcAddress: null,
|
|
3636
|
+
usdcAddress: '0xB6CEceAB302E2E4948951eE7843FC24E92933061',
|
|
3637
|
+
usdtAddress: null,
|
|
3638
|
+
cctp: {
|
|
3639
|
+
domain: 37,
|
|
3640
|
+
contracts: {
|
|
3641
|
+
v2: {
|
|
3642
|
+
type: 'split',
|
|
3643
|
+
tokenMessenger: '0x28b5a0e9C621a5BadaA536219b3a228C8168cf5d',
|
|
3644
|
+
messageTransmitter: '0x81D40F21F12A8F0E3252Bccb954D722d4c464B64',
|
|
3645
|
+
confirmations: 65,
|
|
3646
|
+
fastConfirmations: 1
|
|
3647
|
+
}
|
|
3648
|
+
},
|
|
3649
|
+
forwarderSupported: {
|
|
3650
|
+
source: false,
|
|
3651
|
+
destination: false
|
|
3652
|
+
}
|
|
3653
|
+
},
|
|
3654
|
+
kitContracts: {
|
|
3655
|
+
bridge: BRIDGE_CONTRACT_EVM_MAINNET
|
|
3656
|
+
}
|
|
3657
|
+
});
|
|
3658
|
+
|
|
3659
|
+
/**
|
|
3660
|
+
* X Layer Testnet chain definition
|
|
3661
|
+
* @remarks
|
|
3662
|
+
* This represents the official test network for the X Layer blockchain.
|
|
3663
|
+
* X Layer is an EVM-compatible OP Stack Layer-2 blockchain built by OKX,
|
|
3664
|
+
* using OKB as its native gas token. (Migrated from Polygon zkEVM/CDK to the
|
|
3665
|
+
* OP Stack on 2025-10-27; older docs describing it as zkEVM are obsolete.)
|
|
3666
|
+
*/ const XLayerTestnet = defineChain({
|
|
3667
|
+
type: 'evm',
|
|
3668
|
+
chain: Blockchain.X_Layer_Testnet,
|
|
3669
|
+
name: 'X Layer Testnet',
|
|
3670
|
+
title: 'X Layer Testnet',
|
|
3671
|
+
nativeCurrency: {
|
|
3672
|
+
name: 'OKB',
|
|
3673
|
+
symbol: 'OKB',
|
|
3674
|
+
decimals: 18
|
|
3675
|
+
},
|
|
3676
|
+
chainId: 1952,
|
|
3677
|
+
isTestnet: true,
|
|
3678
|
+
// Deliberately not oklink.com (used for mainnet): viem's bundled OKLink
|
|
3679
|
+
// testnet URL targets the deprecated pre-rebrand chain ID 195, not this
|
|
3680
|
+
// chain's ID (1952). Verified against the internal chain-expansion-scripts
|
|
3681
|
+
// config (`v2config.sandbox.yml`) — do not "normalize" this to match mainnet.
|
|
3682
|
+
explorerUrl: 'https://web3.okx.com/explorer/x-layer-testnet/tx/{hash}',
|
|
3683
|
+
rpcEndpoints: [
|
|
3684
|
+
'https://testrpc.xlayer.tech'
|
|
3685
|
+
],
|
|
3686
|
+
eurcAddress: null,
|
|
3687
|
+
usdcAddress: '0xDec90b78111Ba2fc6FC6d84d8B9ec159A2d4b9B3',
|
|
3688
|
+
usdtAddress: null,
|
|
3689
|
+
cctp: {
|
|
3690
|
+
domain: 37,
|
|
3691
|
+
contracts: {
|
|
3692
|
+
v2: {
|
|
3693
|
+
type: 'split',
|
|
3694
|
+
tokenMessenger: '0x8FE6B999Dc680CcFDD5Bf7EB0974218be2542DAA',
|
|
3695
|
+
messageTransmitter: '0xE737e5cEBEEBa77EFE34D4aa090756590b1CE275',
|
|
3696
|
+
confirmations: 65,
|
|
3697
|
+
fastConfirmations: 1
|
|
3698
|
+
}
|
|
3699
|
+
},
|
|
3700
|
+
forwarderSupported: {
|
|
3701
|
+
source: false,
|
|
3702
|
+
destination: false
|
|
3703
|
+
}
|
|
3704
|
+
},
|
|
3705
|
+
kitContracts: {
|
|
3706
|
+
bridge: BRIDGE_CONTRACT_EVM_TESTNET
|
|
3707
|
+
}
|
|
3708
|
+
});
|
|
3709
|
+
|
|
3596
3710
|
/**
|
|
3597
3711
|
* ZKSync Era Mainnet chain definition
|
|
3598
3712
|
* @remarks
|
|
@@ -4095,4 +4209,6 @@ exports.WorldChain = WorldChain;
|
|
|
4095
4209
|
exports.WorldChainSepolia = WorldChainSepolia;
|
|
4096
4210
|
exports.XDC = XDC;
|
|
4097
4211
|
exports.XDCApothem = XDCApothem;
|
|
4212
|
+
exports.XLayer = XLayer;
|
|
4213
|
+
exports.XLayerTestnet = XLayerTestnet;
|
|
4098
4214
|
//# sourceMappingURL=chains.cjs.map
|
package/chains.d.cts
CHANGED
|
@@ -94,6 +94,8 @@ declare enum Blockchain {
|
|
|
94
94
|
World_Chain_Sepolia = "World_Chain_Sepolia",
|
|
95
95
|
XDC = "XDC",
|
|
96
96
|
XDC_Apothem = "XDC_Apothem",
|
|
97
|
+
X_Layer = "X_Layer",
|
|
98
|
+
X_Layer_Testnet = "X_Layer_Testnet",
|
|
97
99
|
ZKSync_Era = "ZKSync_Era",
|
|
98
100
|
ZKSync_Sepolia = "ZKSync_Sepolia"
|
|
99
101
|
}
|
|
@@ -1338,7 +1340,7 @@ declare const PolygonAmoy: {
|
|
|
1338
1340
|
readonly chainId: 80002;
|
|
1339
1341
|
readonly isTestnet: true;
|
|
1340
1342
|
readonly explorerUrl: "https://amoy.polygonscan.com/tx/{hash}";
|
|
1341
|
-
readonly rpcEndpoints: readonly ["https://
|
|
1343
|
+
readonly rpcEndpoints: readonly ["https://polygon-amoy-bor-rpc.publicnode.com", "https://polygon-amoy.drpc.org"];
|
|
1342
1344
|
readonly eurcAddress: null;
|
|
1343
1345
|
readonly usdcAddress: "0x41e94eb019c0762f9bfcf9fb1e58725bfb0e7582";
|
|
1344
1346
|
readonly usdtAddress: null;
|
|
@@ -2060,4 +2062,96 @@ declare const XDCApothem: {
|
|
|
2060
2062
|
};
|
|
2061
2063
|
};
|
|
2062
2064
|
|
|
2063
|
-
|
|
2065
|
+
/**
|
|
2066
|
+
* X Layer Mainnet chain definition
|
|
2067
|
+
* @remarks
|
|
2068
|
+
* This represents the official production network for the X Layer blockchain.
|
|
2069
|
+
* X Layer is an EVM-compatible OP Stack Layer-2 blockchain built by OKX,
|
|
2070
|
+
* using OKB as its native gas token. (Migrated from Polygon zkEVM/CDK to the
|
|
2071
|
+
* OP Stack on 2025-10-27; older docs describing it as zkEVM are obsolete.)
|
|
2072
|
+
*/
|
|
2073
|
+
declare const XLayer: {
|
|
2074
|
+
readonly type: "evm";
|
|
2075
|
+
readonly chain: Blockchain.X_Layer;
|
|
2076
|
+
readonly name: "X Layer";
|
|
2077
|
+
readonly title: "X Layer Mainnet";
|
|
2078
|
+
readonly nativeCurrency: {
|
|
2079
|
+
readonly name: "OKB";
|
|
2080
|
+
readonly symbol: "OKB";
|
|
2081
|
+
readonly decimals: 18;
|
|
2082
|
+
};
|
|
2083
|
+
readonly chainId: 196;
|
|
2084
|
+
readonly isTestnet: false;
|
|
2085
|
+
readonly explorerUrl: "https://www.oklink.com/xlayer/tx/{hash}";
|
|
2086
|
+
readonly rpcEndpoints: readonly ["https://xlayerrpc.okx.com"];
|
|
2087
|
+
readonly eurcAddress: null;
|
|
2088
|
+
readonly usdcAddress: "0xB6CEceAB302E2E4948951eE7843FC24E92933061";
|
|
2089
|
+
readonly usdtAddress: null;
|
|
2090
|
+
readonly cctp: {
|
|
2091
|
+
readonly domain: 37;
|
|
2092
|
+
readonly contracts: {
|
|
2093
|
+
readonly v2: {
|
|
2094
|
+
readonly type: "split";
|
|
2095
|
+
readonly tokenMessenger: "0x28b5a0e9C621a5BadaA536219b3a228C8168cf5d";
|
|
2096
|
+
readonly messageTransmitter: "0x81D40F21F12A8F0E3252Bccb954D722d4c464B64";
|
|
2097
|
+
readonly confirmations: 65;
|
|
2098
|
+
readonly fastConfirmations: 1;
|
|
2099
|
+
};
|
|
2100
|
+
};
|
|
2101
|
+
readonly forwarderSupported: {
|
|
2102
|
+
readonly source: false;
|
|
2103
|
+
readonly destination: false;
|
|
2104
|
+
};
|
|
2105
|
+
};
|
|
2106
|
+
readonly kitContracts: {
|
|
2107
|
+
readonly bridge: "0xB3FA262d0fB521cc93bE83d87b322b8A23DAf3F0";
|
|
2108
|
+
};
|
|
2109
|
+
};
|
|
2110
|
+
|
|
2111
|
+
/**
|
|
2112
|
+
* X Layer Testnet chain definition
|
|
2113
|
+
* @remarks
|
|
2114
|
+
* This represents the official test network for the X Layer blockchain.
|
|
2115
|
+
* X Layer is an EVM-compatible OP Stack Layer-2 blockchain built by OKX,
|
|
2116
|
+
* using OKB as its native gas token. (Migrated from Polygon zkEVM/CDK to the
|
|
2117
|
+
* OP Stack on 2025-10-27; older docs describing it as zkEVM are obsolete.)
|
|
2118
|
+
*/
|
|
2119
|
+
declare const XLayerTestnet: {
|
|
2120
|
+
readonly type: "evm";
|
|
2121
|
+
readonly chain: Blockchain.X_Layer_Testnet;
|
|
2122
|
+
readonly name: "X Layer Testnet";
|
|
2123
|
+
readonly title: "X Layer Testnet";
|
|
2124
|
+
readonly nativeCurrency: {
|
|
2125
|
+
readonly name: "OKB";
|
|
2126
|
+
readonly symbol: "OKB";
|
|
2127
|
+
readonly decimals: 18;
|
|
2128
|
+
};
|
|
2129
|
+
readonly chainId: 1952;
|
|
2130
|
+
readonly isTestnet: true;
|
|
2131
|
+
readonly explorerUrl: "https://web3.okx.com/explorer/x-layer-testnet/tx/{hash}";
|
|
2132
|
+
readonly rpcEndpoints: readonly ["https://testrpc.xlayer.tech"];
|
|
2133
|
+
readonly eurcAddress: null;
|
|
2134
|
+
readonly usdcAddress: "0xDec90b78111Ba2fc6FC6d84d8B9ec159A2d4b9B3";
|
|
2135
|
+
readonly usdtAddress: null;
|
|
2136
|
+
readonly cctp: {
|
|
2137
|
+
readonly domain: 37;
|
|
2138
|
+
readonly contracts: {
|
|
2139
|
+
readonly v2: {
|
|
2140
|
+
readonly type: "split";
|
|
2141
|
+
readonly tokenMessenger: "0x8FE6B999Dc680CcFDD5Bf7EB0974218be2542DAA";
|
|
2142
|
+
readonly messageTransmitter: "0xE737e5cEBEEBa77EFE34D4aa090756590b1CE275";
|
|
2143
|
+
readonly confirmations: 65;
|
|
2144
|
+
readonly fastConfirmations: 1;
|
|
2145
|
+
};
|
|
2146
|
+
};
|
|
2147
|
+
readonly forwarderSupported: {
|
|
2148
|
+
readonly source: false;
|
|
2149
|
+
readonly destination: false;
|
|
2150
|
+
};
|
|
2151
|
+
};
|
|
2152
|
+
readonly kitContracts: {
|
|
2153
|
+
readonly bridge: "0xC5567a5E3370d4DBfB0540025078e283e36A363d";
|
|
2154
|
+
};
|
|
2155
|
+
};
|
|
2156
|
+
|
|
2157
|
+
export { Arbitrum, ArbitrumSepolia, ArcTestnet, Avalanche, AvalancheFuji, Base, BaseSepolia, 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, XLayer, XLayerTestnet };
|
package/chains.d.mts
CHANGED
|
@@ -94,6 +94,8 @@ declare enum Blockchain {
|
|
|
94
94
|
World_Chain_Sepolia = "World_Chain_Sepolia",
|
|
95
95
|
XDC = "XDC",
|
|
96
96
|
XDC_Apothem = "XDC_Apothem",
|
|
97
|
+
X_Layer = "X_Layer",
|
|
98
|
+
X_Layer_Testnet = "X_Layer_Testnet",
|
|
97
99
|
ZKSync_Era = "ZKSync_Era",
|
|
98
100
|
ZKSync_Sepolia = "ZKSync_Sepolia"
|
|
99
101
|
}
|
|
@@ -1338,7 +1340,7 @@ declare const PolygonAmoy: {
|
|
|
1338
1340
|
readonly chainId: 80002;
|
|
1339
1341
|
readonly isTestnet: true;
|
|
1340
1342
|
readonly explorerUrl: "https://amoy.polygonscan.com/tx/{hash}";
|
|
1341
|
-
readonly rpcEndpoints: readonly ["https://
|
|
1343
|
+
readonly rpcEndpoints: readonly ["https://polygon-amoy-bor-rpc.publicnode.com", "https://polygon-amoy.drpc.org"];
|
|
1342
1344
|
readonly eurcAddress: null;
|
|
1343
1345
|
readonly usdcAddress: "0x41e94eb019c0762f9bfcf9fb1e58725bfb0e7582";
|
|
1344
1346
|
readonly usdtAddress: null;
|
|
@@ -2060,4 +2062,96 @@ declare const XDCApothem: {
|
|
|
2060
2062
|
};
|
|
2061
2063
|
};
|
|
2062
2064
|
|
|
2063
|
-
|
|
2065
|
+
/**
|
|
2066
|
+
* X Layer Mainnet chain definition
|
|
2067
|
+
* @remarks
|
|
2068
|
+
* This represents the official production network for the X Layer blockchain.
|
|
2069
|
+
* X Layer is an EVM-compatible OP Stack Layer-2 blockchain built by OKX,
|
|
2070
|
+
* using OKB as its native gas token. (Migrated from Polygon zkEVM/CDK to the
|
|
2071
|
+
* OP Stack on 2025-10-27; older docs describing it as zkEVM are obsolete.)
|
|
2072
|
+
*/
|
|
2073
|
+
declare const XLayer: {
|
|
2074
|
+
readonly type: "evm";
|
|
2075
|
+
readonly chain: Blockchain.X_Layer;
|
|
2076
|
+
readonly name: "X Layer";
|
|
2077
|
+
readonly title: "X Layer Mainnet";
|
|
2078
|
+
readonly nativeCurrency: {
|
|
2079
|
+
readonly name: "OKB";
|
|
2080
|
+
readonly symbol: "OKB";
|
|
2081
|
+
readonly decimals: 18;
|
|
2082
|
+
};
|
|
2083
|
+
readonly chainId: 196;
|
|
2084
|
+
readonly isTestnet: false;
|
|
2085
|
+
readonly explorerUrl: "https://www.oklink.com/xlayer/tx/{hash}";
|
|
2086
|
+
readonly rpcEndpoints: readonly ["https://xlayerrpc.okx.com"];
|
|
2087
|
+
readonly eurcAddress: null;
|
|
2088
|
+
readonly usdcAddress: "0xB6CEceAB302E2E4948951eE7843FC24E92933061";
|
|
2089
|
+
readonly usdtAddress: null;
|
|
2090
|
+
readonly cctp: {
|
|
2091
|
+
readonly domain: 37;
|
|
2092
|
+
readonly contracts: {
|
|
2093
|
+
readonly v2: {
|
|
2094
|
+
readonly type: "split";
|
|
2095
|
+
readonly tokenMessenger: "0x28b5a0e9C621a5BadaA536219b3a228C8168cf5d";
|
|
2096
|
+
readonly messageTransmitter: "0x81D40F21F12A8F0E3252Bccb954D722d4c464B64";
|
|
2097
|
+
readonly confirmations: 65;
|
|
2098
|
+
readonly fastConfirmations: 1;
|
|
2099
|
+
};
|
|
2100
|
+
};
|
|
2101
|
+
readonly forwarderSupported: {
|
|
2102
|
+
readonly source: false;
|
|
2103
|
+
readonly destination: false;
|
|
2104
|
+
};
|
|
2105
|
+
};
|
|
2106
|
+
readonly kitContracts: {
|
|
2107
|
+
readonly bridge: "0xB3FA262d0fB521cc93bE83d87b322b8A23DAf3F0";
|
|
2108
|
+
};
|
|
2109
|
+
};
|
|
2110
|
+
|
|
2111
|
+
/**
|
|
2112
|
+
* X Layer Testnet chain definition
|
|
2113
|
+
* @remarks
|
|
2114
|
+
* This represents the official test network for the X Layer blockchain.
|
|
2115
|
+
* X Layer is an EVM-compatible OP Stack Layer-2 blockchain built by OKX,
|
|
2116
|
+
* using OKB as its native gas token. (Migrated from Polygon zkEVM/CDK to the
|
|
2117
|
+
* OP Stack on 2025-10-27; older docs describing it as zkEVM are obsolete.)
|
|
2118
|
+
*/
|
|
2119
|
+
declare const XLayerTestnet: {
|
|
2120
|
+
readonly type: "evm";
|
|
2121
|
+
readonly chain: Blockchain.X_Layer_Testnet;
|
|
2122
|
+
readonly name: "X Layer Testnet";
|
|
2123
|
+
readonly title: "X Layer Testnet";
|
|
2124
|
+
readonly nativeCurrency: {
|
|
2125
|
+
readonly name: "OKB";
|
|
2126
|
+
readonly symbol: "OKB";
|
|
2127
|
+
readonly decimals: 18;
|
|
2128
|
+
};
|
|
2129
|
+
readonly chainId: 1952;
|
|
2130
|
+
readonly isTestnet: true;
|
|
2131
|
+
readonly explorerUrl: "https://web3.okx.com/explorer/x-layer-testnet/tx/{hash}";
|
|
2132
|
+
readonly rpcEndpoints: readonly ["https://testrpc.xlayer.tech"];
|
|
2133
|
+
readonly eurcAddress: null;
|
|
2134
|
+
readonly usdcAddress: "0xDec90b78111Ba2fc6FC6d84d8B9ec159A2d4b9B3";
|
|
2135
|
+
readonly usdtAddress: null;
|
|
2136
|
+
readonly cctp: {
|
|
2137
|
+
readonly domain: 37;
|
|
2138
|
+
readonly contracts: {
|
|
2139
|
+
readonly v2: {
|
|
2140
|
+
readonly type: "split";
|
|
2141
|
+
readonly tokenMessenger: "0x8FE6B999Dc680CcFDD5Bf7EB0974218be2542DAA";
|
|
2142
|
+
readonly messageTransmitter: "0xE737e5cEBEEBa77EFE34D4aa090756590b1CE275";
|
|
2143
|
+
readonly confirmations: 65;
|
|
2144
|
+
readonly fastConfirmations: 1;
|
|
2145
|
+
};
|
|
2146
|
+
};
|
|
2147
|
+
readonly forwarderSupported: {
|
|
2148
|
+
readonly source: false;
|
|
2149
|
+
readonly destination: false;
|
|
2150
|
+
};
|
|
2151
|
+
};
|
|
2152
|
+
readonly kitContracts: {
|
|
2153
|
+
readonly bridge: "0xC5567a5E3370d4DBfB0540025078e283e36A363d";
|
|
2154
|
+
};
|
|
2155
|
+
};
|
|
2156
|
+
|
|
2157
|
+
export { Arbitrum, ArbitrumSepolia, ArcTestnet, Avalanche, AvalancheFuji, Base, BaseSepolia, 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, XLayer, XLayerTestnet };
|
package/chains.d.ts
CHANGED
|
@@ -94,6 +94,8 @@ declare enum Blockchain {
|
|
|
94
94
|
World_Chain_Sepolia = "World_Chain_Sepolia",
|
|
95
95
|
XDC = "XDC",
|
|
96
96
|
XDC_Apothem = "XDC_Apothem",
|
|
97
|
+
X_Layer = "X_Layer",
|
|
98
|
+
X_Layer_Testnet = "X_Layer_Testnet",
|
|
97
99
|
ZKSync_Era = "ZKSync_Era",
|
|
98
100
|
ZKSync_Sepolia = "ZKSync_Sepolia"
|
|
99
101
|
}
|
|
@@ -1338,7 +1340,7 @@ declare const PolygonAmoy: {
|
|
|
1338
1340
|
readonly chainId: 80002;
|
|
1339
1341
|
readonly isTestnet: true;
|
|
1340
1342
|
readonly explorerUrl: "https://amoy.polygonscan.com/tx/{hash}";
|
|
1341
|
-
readonly rpcEndpoints: readonly ["https://
|
|
1343
|
+
readonly rpcEndpoints: readonly ["https://polygon-amoy-bor-rpc.publicnode.com", "https://polygon-amoy.drpc.org"];
|
|
1342
1344
|
readonly eurcAddress: null;
|
|
1343
1345
|
readonly usdcAddress: "0x41e94eb019c0762f9bfcf9fb1e58725bfb0e7582";
|
|
1344
1346
|
readonly usdtAddress: null;
|
|
@@ -2060,4 +2062,96 @@ declare const XDCApothem: {
|
|
|
2060
2062
|
};
|
|
2061
2063
|
};
|
|
2062
2064
|
|
|
2063
|
-
|
|
2065
|
+
/**
|
|
2066
|
+
* X Layer Mainnet chain definition
|
|
2067
|
+
* @remarks
|
|
2068
|
+
* This represents the official production network for the X Layer blockchain.
|
|
2069
|
+
* X Layer is an EVM-compatible OP Stack Layer-2 blockchain built by OKX,
|
|
2070
|
+
* using OKB as its native gas token. (Migrated from Polygon zkEVM/CDK to the
|
|
2071
|
+
* OP Stack on 2025-10-27; older docs describing it as zkEVM are obsolete.)
|
|
2072
|
+
*/
|
|
2073
|
+
declare const XLayer: {
|
|
2074
|
+
readonly type: "evm";
|
|
2075
|
+
readonly chain: Blockchain.X_Layer;
|
|
2076
|
+
readonly name: "X Layer";
|
|
2077
|
+
readonly title: "X Layer Mainnet";
|
|
2078
|
+
readonly nativeCurrency: {
|
|
2079
|
+
readonly name: "OKB";
|
|
2080
|
+
readonly symbol: "OKB";
|
|
2081
|
+
readonly decimals: 18;
|
|
2082
|
+
};
|
|
2083
|
+
readonly chainId: 196;
|
|
2084
|
+
readonly isTestnet: false;
|
|
2085
|
+
readonly explorerUrl: "https://www.oklink.com/xlayer/tx/{hash}";
|
|
2086
|
+
readonly rpcEndpoints: readonly ["https://xlayerrpc.okx.com"];
|
|
2087
|
+
readonly eurcAddress: null;
|
|
2088
|
+
readonly usdcAddress: "0xB6CEceAB302E2E4948951eE7843FC24E92933061";
|
|
2089
|
+
readonly usdtAddress: null;
|
|
2090
|
+
readonly cctp: {
|
|
2091
|
+
readonly domain: 37;
|
|
2092
|
+
readonly contracts: {
|
|
2093
|
+
readonly v2: {
|
|
2094
|
+
readonly type: "split";
|
|
2095
|
+
readonly tokenMessenger: "0x28b5a0e9C621a5BadaA536219b3a228C8168cf5d";
|
|
2096
|
+
readonly messageTransmitter: "0x81D40F21F12A8F0E3252Bccb954D722d4c464B64";
|
|
2097
|
+
readonly confirmations: 65;
|
|
2098
|
+
readonly fastConfirmations: 1;
|
|
2099
|
+
};
|
|
2100
|
+
};
|
|
2101
|
+
readonly forwarderSupported: {
|
|
2102
|
+
readonly source: false;
|
|
2103
|
+
readonly destination: false;
|
|
2104
|
+
};
|
|
2105
|
+
};
|
|
2106
|
+
readonly kitContracts: {
|
|
2107
|
+
readonly bridge: "0xB3FA262d0fB521cc93bE83d87b322b8A23DAf3F0";
|
|
2108
|
+
};
|
|
2109
|
+
};
|
|
2110
|
+
|
|
2111
|
+
/**
|
|
2112
|
+
* X Layer Testnet chain definition
|
|
2113
|
+
* @remarks
|
|
2114
|
+
* This represents the official test network for the X Layer blockchain.
|
|
2115
|
+
* X Layer is an EVM-compatible OP Stack Layer-2 blockchain built by OKX,
|
|
2116
|
+
* using OKB as its native gas token. (Migrated from Polygon zkEVM/CDK to the
|
|
2117
|
+
* OP Stack on 2025-10-27; older docs describing it as zkEVM are obsolete.)
|
|
2118
|
+
*/
|
|
2119
|
+
declare const XLayerTestnet: {
|
|
2120
|
+
readonly type: "evm";
|
|
2121
|
+
readonly chain: Blockchain.X_Layer_Testnet;
|
|
2122
|
+
readonly name: "X Layer Testnet";
|
|
2123
|
+
readonly title: "X Layer Testnet";
|
|
2124
|
+
readonly nativeCurrency: {
|
|
2125
|
+
readonly name: "OKB";
|
|
2126
|
+
readonly symbol: "OKB";
|
|
2127
|
+
readonly decimals: 18;
|
|
2128
|
+
};
|
|
2129
|
+
readonly chainId: 1952;
|
|
2130
|
+
readonly isTestnet: true;
|
|
2131
|
+
readonly explorerUrl: "https://web3.okx.com/explorer/x-layer-testnet/tx/{hash}";
|
|
2132
|
+
readonly rpcEndpoints: readonly ["https://testrpc.xlayer.tech"];
|
|
2133
|
+
readonly eurcAddress: null;
|
|
2134
|
+
readonly usdcAddress: "0xDec90b78111Ba2fc6FC6d84d8B9ec159A2d4b9B3";
|
|
2135
|
+
readonly usdtAddress: null;
|
|
2136
|
+
readonly cctp: {
|
|
2137
|
+
readonly domain: 37;
|
|
2138
|
+
readonly contracts: {
|
|
2139
|
+
readonly v2: {
|
|
2140
|
+
readonly type: "split";
|
|
2141
|
+
readonly tokenMessenger: "0x8FE6B999Dc680CcFDD5Bf7EB0974218be2542DAA";
|
|
2142
|
+
readonly messageTransmitter: "0xE737e5cEBEEBa77EFE34D4aa090756590b1CE275";
|
|
2143
|
+
readonly confirmations: 65;
|
|
2144
|
+
readonly fastConfirmations: 1;
|
|
2145
|
+
};
|
|
2146
|
+
};
|
|
2147
|
+
readonly forwarderSupported: {
|
|
2148
|
+
readonly source: false;
|
|
2149
|
+
readonly destination: false;
|
|
2150
|
+
};
|
|
2151
|
+
};
|
|
2152
|
+
readonly kitContracts: {
|
|
2153
|
+
readonly bridge: "0xC5567a5E3370d4DBfB0540025078e283e36A363d";
|
|
2154
|
+
};
|
|
2155
|
+
};
|
|
2156
|
+
|
|
2157
|
+
export { Arbitrum, ArbitrumSepolia, ArcTestnet, Avalanche, AvalancheFuji, Base, BaseSepolia, 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, XLayer, XLayerTestnet };
|
package/chains.mjs
CHANGED
|
@@ -16,6 +16,17 @@
|
|
|
16
16
|
* limitations under the License.
|
|
17
17
|
*/
|
|
18
18
|
|
|
19
|
+
// Buffer polyfill setup - executes before any other code
|
|
20
|
+
// Ensures globalThis.Buffer is available for Solana libraries
|
|
21
|
+
import { Buffer } from 'buffer';
|
|
22
|
+
if (typeof globalThis !== 'undefined' && typeof globalThis.Buffer === 'undefined') {
|
|
23
|
+
globalThis.Buffer = Buffer;
|
|
24
|
+
}
|
|
25
|
+
if (typeof window !== 'undefined' && typeof window.Buffer === 'undefined') {
|
|
26
|
+
window.Buffer = Buffer;
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
|
|
19
30
|
import { z } from 'zod';
|
|
20
31
|
|
|
21
32
|
/**
|
|
@@ -111,6 +122,8 @@ import { z } from 'zod';
|
|
|
111
122
|
Blockchain["World_Chain_Sepolia"] = "World_Chain_Sepolia";
|
|
112
123
|
Blockchain["XDC"] = "XDC";
|
|
113
124
|
Blockchain["XDC_Apothem"] = "XDC_Apothem";
|
|
125
|
+
Blockchain["X_Layer"] = "X_Layer";
|
|
126
|
+
Blockchain["X_Layer_Testnet"] = "X_Layer_Testnet";
|
|
114
127
|
Blockchain["ZKSync_Era"] = "ZKSync_Era";
|
|
115
128
|
Blockchain["ZKSync_Sepolia"] = "ZKSync_Sepolia";
|
|
116
129
|
})(Blockchain || (Blockchain = {}));
|
|
@@ -164,6 +177,7 @@ var BridgeChain;
|
|
|
164
177
|
BridgeChain["Unichain"] = "Unichain";
|
|
165
178
|
BridgeChain["World_Chain"] = "World_Chain";
|
|
166
179
|
BridgeChain["XDC"] = "XDC";
|
|
180
|
+
BridgeChain["X_Layer"] = "X_Layer";
|
|
167
181
|
// Testnet chains with CCTPv2 support
|
|
168
182
|
BridgeChain["Arc_Testnet"] = "Arc_Testnet";
|
|
169
183
|
BridgeChain["Arbitrum_Sepolia"] = "Arbitrum_Sepolia";
|
|
@@ -189,6 +203,7 @@ var BridgeChain;
|
|
|
189
203
|
BridgeChain["Unichain_Sepolia"] = "Unichain_Sepolia";
|
|
190
204
|
BridgeChain["World_Chain_Sepolia"] = "World_Chain_Sepolia";
|
|
191
205
|
BridgeChain["XDC_Apothem"] = "XDC_Apothem";
|
|
206
|
+
BridgeChain["X_Layer_Testnet"] = "X_Layer_Testnet";
|
|
192
207
|
})(BridgeChain || (BridgeChain = {}));
|
|
193
208
|
var UnifiedBalanceChain;
|
|
194
209
|
(function(UnifiedBalanceChain) {
|
|
@@ -2726,7 +2741,8 @@ var EarnChain;
|
|
|
2726
2741
|
isTestnet: true,
|
|
2727
2742
|
explorerUrl: 'https://amoy.polygonscan.com/tx/{hash}',
|
|
2728
2743
|
rpcEndpoints: [
|
|
2729
|
-
'https://
|
|
2744
|
+
'https://polygon-amoy-bor-rpc.publicnode.com',
|
|
2745
|
+
'https://polygon-amoy.drpc.org'
|
|
2730
2746
|
],
|
|
2731
2747
|
eurcAddress: null,
|
|
2732
2748
|
usdcAddress: '0x41e94eb019c0762f9bfcf9fb1e58725bfb0e7582',
|
|
@@ -3591,6 +3607,104 @@ var EarnChain;
|
|
|
3591
3607
|
}
|
|
3592
3608
|
});
|
|
3593
3609
|
|
|
3610
|
+
/**
|
|
3611
|
+
* X Layer Mainnet chain definition
|
|
3612
|
+
* @remarks
|
|
3613
|
+
* This represents the official production network for the X Layer blockchain.
|
|
3614
|
+
* X Layer is an EVM-compatible OP Stack Layer-2 blockchain built by OKX,
|
|
3615
|
+
* using OKB as its native gas token. (Migrated from Polygon zkEVM/CDK to the
|
|
3616
|
+
* OP Stack on 2025-10-27; older docs describing it as zkEVM are obsolete.)
|
|
3617
|
+
*/ const XLayer = defineChain({
|
|
3618
|
+
type: 'evm',
|
|
3619
|
+
chain: Blockchain.X_Layer,
|
|
3620
|
+
name: 'X Layer',
|
|
3621
|
+
title: 'X Layer Mainnet',
|
|
3622
|
+
nativeCurrency: {
|
|
3623
|
+
name: 'OKB',
|
|
3624
|
+
symbol: 'OKB',
|
|
3625
|
+
decimals: 18
|
|
3626
|
+
},
|
|
3627
|
+
chainId: 196,
|
|
3628
|
+
isTestnet: false,
|
|
3629
|
+
explorerUrl: 'https://www.oklink.com/xlayer/tx/{hash}',
|
|
3630
|
+
rpcEndpoints: [
|
|
3631
|
+
'https://xlayerrpc.okx.com'
|
|
3632
|
+
],
|
|
3633
|
+
eurcAddress: null,
|
|
3634
|
+
usdcAddress: '0xB6CEceAB302E2E4948951eE7843FC24E92933061',
|
|
3635
|
+
usdtAddress: null,
|
|
3636
|
+
cctp: {
|
|
3637
|
+
domain: 37,
|
|
3638
|
+
contracts: {
|
|
3639
|
+
v2: {
|
|
3640
|
+
type: 'split',
|
|
3641
|
+
tokenMessenger: '0x28b5a0e9C621a5BadaA536219b3a228C8168cf5d',
|
|
3642
|
+
messageTransmitter: '0x81D40F21F12A8F0E3252Bccb954D722d4c464B64',
|
|
3643
|
+
confirmations: 65,
|
|
3644
|
+
fastConfirmations: 1
|
|
3645
|
+
}
|
|
3646
|
+
},
|
|
3647
|
+
forwarderSupported: {
|
|
3648
|
+
source: false,
|
|
3649
|
+
destination: false
|
|
3650
|
+
}
|
|
3651
|
+
},
|
|
3652
|
+
kitContracts: {
|
|
3653
|
+
bridge: BRIDGE_CONTRACT_EVM_MAINNET
|
|
3654
|
+
}
|
|
3655
|
+
});
|
|
3656
|
+
|
|
3657
|
+
/**
|
|
3658
|
+
* X Layer Testnet chain definition
|
|
3659
|
+
* @remarks
|
|
3660
|
+
* This represents the official test network for the X Layer blockchain.
|
|
3661
|
+
* X Layer is an EVM-compatible OP Stack Layer-2 blockchain built by OKX,
|
|
3662
|
+
* using OKB as its native gas token. (Migrated from Polygon zkEVM/CDK to the
|
|
3663
|
+
* OP Stack on 2025-10-27; older docs describing it as zkEVM are obsolete.)
|
|
3664
|
+
*/ const XLayerTestnet = defineChain({
|
|
3665
|
+
type: 'evm',
|
|
3666
|
+
chain: Blockchain.X_Layer_Testnet,
|
|
3667
|
+
name: 'X Layer Testnet',
|
|
3668
|
+
title: 'X Layer Testnet',
|
|
3669
|
+
nativeCurrency: {
|
|
3670
|
+
name: 'OKB',
|
|
3671
|
+
symbol: 'OKB',
|
|
3672
|
+
decimals: 18
|
|
3673
|
+
},
|
|
3674
|
+
chainId: 1952,
|
|
3675
|
+
isTestnet: true,
|
|
3676
|
+
// Deliberately not oklink.com (used for mainnet): viem's bundled OKLink
|
|
3677
|
+
// testnet URL targets the deprecated pre-rebrand chain ID 195, not this
|
|
3678
|
+
// chain's ID (1952). Verified against the internal chain-expansion-scripts
|
|
3679
|
+
// config (`v2config.sandbox.yml`) — do not "normalize" this to match mainnet.
|
|
3680
|
+
explorerUrl: 'https://web3.okx.com/explorer/x-layer-testnet/tx/{hash}',
|
|
3681
|
+
rpcEndpoints: [
|
|
3682
|
+
'https://testrpc.xlayer.tech'
|
|
3683
|
+
],
|
|
3684
|
+
eurcAddress: null,
|
|
3685
|
+
usdcAddress: '0xDec90b78111Ba2fc6FC6d84d8B9ec159A2d4b9B3',
|
|
3686
|
+
usdtAddress: null,
|
|
3687
|
+
cctp: {
|
|
3688
|
+
domain: 37,
|
|
3689
|
+
contracts: {
|
|
3690
|
+
v2: {
|
|
3691
|
+
type: 'split',
|
|
3692
|
+
tokenMessenger: '0x8FE6B999Dc680CcFDD5Bf7EB0974218be2542DAA',
|
|
3693
|
+
messageTransmitter: '0xE737e5cEBEEBa77EFE34D4aa090756590b1CE275',
|
|
3694
|
+
confirmations: 65,
|
|
3695
|
+
fastConfirmations: 1
|
|
3696
|
+
}
|
|
3697
|
+
},
|
|
3698
|
+
forwarderSupported: {
|
|
3699
|
+
source: false,
|
|
3700
|
+
destination: false
|
|
3701
|
+
}
|
|
3702
|
+
},
|
|
3703
|
+
kitContracts: {
|
|
3704
|
+
bridge: BRIDGE_CONTRACT_EVM_TESTNET
|
|
3705
|
+
}
|
|
3706
|
+
});
|
|
3707
|
+
|
|
3594
3708
|
/**
|
|
3595
3709
|
* ZKSync Era Mainnet chain definition
|
|
3596
3710
|
* @remarks
|
|
@@ -4058,5 +4172,5 @@ const swapTokenEnumSchema = z.enum([
|
|
|
4058
4172
|
* ```
|
|
4059
4173
|
*/ z.string().transform((value)=>value.toUpperCase()).pipe(swapTokenEnumSchema);
|
|
4060
4174
|
|
|
4061
|
-
export { Arbitrum, ArbitrumSepolia, ArcTestnet, Avalanche, AvalancheFuji, Base, BaseSepolia, 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 };
|
|
4175
|
+
export { Arbitrum, ArbitrumSepolia, ArcTestnet, Avalanche, AvalancheFuji, Base, BaseSepolia, 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, XLayer, XLayerTestnet };
|
|
4062
4176
|
//# sourceMappingURL=chains.mjs.map
|