@rhinestone/deposit-modal 0.1.21 → 0.1.23

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.
@@ -0,0 +1,304 @@
1
+ "use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _nullishCoalesce(lhs, rhsFn) { if (lhs != null) { return lhs; } else { return rhsFn(); } } function _optionalChain(ops) { let lastAccessLHS = undefined; let value = ops[0]; let i = 1; while (i < ops.length) { const op = ops[i]; const fn = ops[i + 1]; i += 2; if ((op === 'optionalAccess' || op === 'optionalCall') && value == null) { return undefined; } if (op === 'access' || op === 'optionalAccess') { lastAccessLHS = value; value = fn(value); } else if (op === 'call' || op === 'optionalCall') { value = fn((...args) => value.call(lastAccessLHS, ...args)); lastAccessLHS = undefined; } } return value; }// src/core/constants.ts
2
+
3
+
4
+
5
+
6
+
7
+
8
+
9
+ var _chains = require('viem/chains');
10
+ var _sharedconfigs = require('@rhinestone/shared-configs');
11
+ var DEFAULT_BACKEND_URL = "https://v1.orchestrator.rhinestone.dev/deposit-widget";
12
+ var DEFAULT_SIGNER_ADDRESS = "0x177bfcdd15bc01e99013dcc5d2b09cd87a18ce9c";
13
+ var NATIVE_TOKEN_ADDRESS = "0x0000000000000000000000000000000000000000";
14
+ var ALL_CHAINS_BY_ID = {
15
+ [_chains.mainnet.id]: _chains.mainnet,
16
+ [_chains.base.id]: _chains.base,
17
+ [_chains.optimism.id]: _chains.optimism,
18
+ [_chains.arbitrum.id]: _chains.arbitrum,
19
+ [_chains.polygon.id]: _chains.polygon,
20
+ [_chains.bsc.id]: _chains.bsc
21
+ };
22
+ var SUPPORTED_TOKEN_MATRIX = {
23
+ ETH: [_chains.mainnet.id, _chains.base.id, _chains.arbitrum.id, _chains.optimism.id, _chains.polygon.id],
24
+ WETH: [_chains.mainnet.id, _chains.base.id, _chains.arbitrum.id, _chains.optimism.id, _chains.polygon.id],
25
+ USDC: [_chains.mainnet.id, _chains.base.id, _chains.arbitrum.id, _chains.optimism.id, _chains.polygon.id],
26
+ USDT: [_chains.mainnet.id, _chains.arbitrum.id, _chains.polygon.id, _chains.bsc.id]
27
+ };
28
+ var CHAIN_DISPLAY_ORDER = [
29
+ _chains.mainnet.id,
30
+ _chains.base.id,
31
+ _chains.arbitrum.id,
32
+ _chains.optimism.id,
33
+ _chains.polygon.id,
34
+ _chains.bsc.id
35
+ ];
36
+ var supportedChainSet = /* @__PURE__ */ new Set();
37
+ for (const chainIds of Object.values(SUPPORTED_TOKEN_MATRIX)) {
38
+ for (const chainId of chainIds) {
39
+ supportedChainSet.add(chainId);
40
+ }
41
+ }
42
+ var SUPPORTED_CHAIN_IDS = CHAIN_DISPLAY_ORDER.filter(
43
+ (chainId) => supportedChainSet.has(chainId) && Boolean(ALL_CHAINS_BY_ID[chainId])
44
+ );
45
+ var CHAIN_BY_ID = Object.fromEntries(
46
+ SUPPORTED_CHAIN_IDS.map((id) => [id, ALL_CHAINS_BY_ID[id]])
47
+ );
48
+ var SOURCE_CHAINS = SUPPORTED_CHAIN_IDS.map(
49
+ (id) => CHAIN_BY_ID[id]
50
+ );
51
+ var SUPPORTED_CHAINS = SOURCE_CHAINS;
52
+ var SUPPORTED_TOKENS_BY_CHAIN = Object.fromEntries(
53
+ SUPPORTED_CHAIN_IDS.map((chainId) => {
54
+ const symbols = Object.entries(SUPPORTED_TOKEN_MATRIX).filter(([, chainIds]) => chainIds.includes(chainId)).map(([symbol]) => symbol);
55
+ return [chainId, symbols];
56
+ })
57
+ );
58
+ var SYMBOL_ALIASES = {
59
+ USDT: ["USDT", "USDT0"]
60
+ };
61
+ var CANONICAL_SYMBOL_BY_REGISTRY_SYMBOL = {
62
+ USDT0: "USDT"
63
+ };
64
+ function getChainId(chain) {
65
+ return typeof chain === "number" ? chain : chain.id;
66
+ }
67
+ function getChainObject(chain) {
68
+ if (typeof chain === "number") {
69
+ return CHAIN_BY_ID[chain];
70
+ }
71
+ return chain;
72
+ }
73
+ function normalizeTokenSymbol(symbol) {
74
+ const trimmed = symbol.trim();
75
+ const wrapped = trimmed.match(/\(([^)]+)\)/);
76
+ if (_optionalChain([wrapped, 'optionalAccess', _ => _[1]])) {
77
+ return wrapped[1].trim().toUpperCase();
78
+ }
79
+ const upper = trimmed.toUpperCase();
80
+ return _nullishCoalesce(CANONICAL_SYMBOL_BY_REGISTRY_SYMBOL[upper], () => ( upper));
81
+ }
82
+ function isSymbolSupportedOnChain(symbol, chainId) {
83
+ const symbols = SUPPORTED_TOKENS_BY_CHAIN[chainId];
84
+ if (!symbols) return false;
85
+ return symbols.includes(normalizeTokenSymbol(symbol));
86
+ }
87
+ function getTokenFromRegistry(chainId, symbol) {
88
+ const chainEntry = _sharedconfigs.chainRegistry[String(chainId)];
89
+ if (!chainEntry) return void 0;
90
+ const normalized = normalizeTokenSymbol(symbol);
91
+ const candidates = _nullishCoalesce(SYMBOL_ALIASES[normalized], () => ( [normalized]));
92
+ for (const candidate of candidates) {
93
+ const token = chainEntry.tokens.find(
94
+ (t) => t.symbol.toUpperCase() === candidate
95
+ );
96
+ if (token) {
97
+ return { address: token.address, decimals: token.decimals };
98
+ }
99
+ }
100
+ return void 0;
101
+ }
102
+ function getUsdcAddress(chainId) {
103
+ const token = getTokenFromRegistry(chainId, "USDC");
104
+ return _optionalChain([token, 'optionalAccess', _2 => _2.address]);
105
+ }
106
+ function getUsdcDecimals(chainId) {
107
+ const token = getTokenFromRegistry(chainId, "USDC");
108
+ return _nullishCoalesce(_optionalChain([token, 'optionalAccess', _3 => _3.decimals]), () => ( 6));
109
+ }
110
+ function getTokenAddress(symbol, chainId) {
111
+ if (symbol.toUpperCase() === "ETH") {
112
+ if (!isSymbolSupportedOnChain("ETH", chainId)) {
113
+ return void 0;
114
+ }
115
+ return NATIVE_TOKEN_ADDRESS;
116
+ }
117
+ if (!isSymbolSupportedOnChain(symbol, chainId)) {
118
+ return void 0;
119
+ }
120
+ const token = getTokenFromRegistry(chainId, symbol);
121
+ return _optionalChain([token, 'optionalAccess', _4 => _4.address]);
122
+ }
123
+ function getTokenDecimals(symbol, chainId) {
124
+ if (symbol.toUpperCase() === "ETH") {
125
+ return 18;
126
+ }
127
+ const token = getTokenFromRegistry(chainId, symbol);
128
+ return _nullishCoalesce(_optionalChain([token, 'optionalAccess', _5 => _5.decimals]), () => ( 18));
129
+ }
130
+ function getSupportedTokenSymbolsForChain(chainId) {
131
+ const symbols = _nullishCoalesce(SUPPORTED_TOKENS_BY_CHAIN[chainId], () => ( []));
132
+ return [...symbols];
133
+ }
134
+ function getSupportedChainIds() {
135
+ return [...SUPPORTED_CHAIN_IDS];
136
+ }
137
+ function isSupportedTokenAddressForChain(token, chainId) {
138
+ const normalized = token.toLowerCase();
139
+ if (normalized === NATIVE_TOKEN_ADDRESS) {
140
+ return isSymbolSupportedOnChain("ETH", chainId);
141
+ }
142
+ const symbol = getTokenSymbol(token, chainId);
143
+ if (!symbol || symbol === "Token") return false;
144
+ if (!isSymbolSupportedOnChain(symbol, chainId)) return false;
145
+ const expected = getTokenFromRegistry(chainId, symbol);
146
+ if (!expected) return false;
147
+ return expected.address.toLowerCase() === normalized;
148
+ }
149
+ function getSupportedTargetTokens(chainId) {
150
+ const symbols = getSupportedTokenSymbolsForChain(chainId);
151
+ const options = [];
152
+ for (const symbol of symbols) {
153
+ const address = getTokenAddress(symbol, chainId);
154
+ if (!address) continue;
155
+ options.push({
156
+ symbol,
157
+ address,
158
+ decimals: getTokenDecimals(symbol, chainId)
159
+ });
160
+ }
161
+ return options;
162
+ }
163
+ function getTokenDecimalsByAddress(token, chainId) {
164
+ const normalized = token.toLowerCase();
165
+ if (normalized === NATIVE_TOKEN_ADDRESS) {
166
+ return 18;
167
+ }
168
+ if (chainId) {
169
+ const chainEntry = _sharedconfigs.chainRegistry[String(chainId)];
170
+ if (chainEntry) {
171
+ const found = chainEntry.tokens.find(
172
+ (t) => t.address.toLowerCase() === normalized
173
+ );
174
+ if (found) return found.decimals;
175
+ }
176
+ }
177
+ for (const chainEntry of Object.values(_sharedconfigs.chainRegistry)) {
178
+ const found = chainEntry.tokens.find(
179
+ (t) => t.address.toLowerCase() === normalized
180
+ );
181
+ if (found) return found.decimals;
182
+ }
183
+ return 18;
184
+ }
185
+ function findChainIdForToken(address) {
186
+ const normalized = address.toLowerCase();
187
+ for (const [chainIdStr, chainEntry] of Object.entries(_sharedconfigs.chainRegistry)) {
188
+ for (const token of chainEntry.tokens) {
189
+ if (token.address.toLowerCase() === normalized) {
190
+ return Number(chainIdStr);
191
+ }
192
+ }
193
+ }
194
+ return void 0;
195
+ }
196
+ function getTokenSymbol(token, chainId) {
197
+ const normalized = token.toLowerCase();
198
+ if (normalized === NATIVE_TOKEN_ADDRESS) {
199
+ return "ETH";
200
+ }
201
+ if (chainId) {
202
+ const chainEntry = _sharedconfigs.chainRegistry[String(chainId)];
203
+ if (chainEntry) {
204
+ const found = chainEntry.tokens.find(
205
+ (t) => t.address.toLowerCase() === normalized
206
+ );
207
+ if (found)
208
+ return _nullishCoalesce(CANONICAL_SYMBOL_BY_REGISTRY_SYMBOL[found.symbol.toUpperCase()], () => ( found.symbol));
209
+ }
210
+ }
211
+ for (const chainEntry of Object.values(_sharedconfigs.chainRegistry)) {
212
+ const found = chainEntry.tokens.find(
213
+ (t) => t.address.toLowerCase() === normalized
214
+ );
215
+ if (found)
216
+ return _nullishCoalesce(CANONICAL_SYMBOL_BY_REGISTRY_SYMBOL[found.symbol.toUpperCase()], () => ( found.symbol));
217
+ }
218
+ return "Token";
219
+ }
220
+ var CHAIN_BADGES = {
221
+ [_chains.mainnet.id]: { shortLabel: "ETH", color: "#627EEA", bg: "#EEF2FF" },
222
+ [_chains.base.id]: { shortLabel: "Base", color: "#0052FF", bg: "#E7F0FF" },
223
+ [_chains.optimism.id]: { shortLabel: "OP", color: "#FF0420", bg: "#FFE9EC" },
224
+ [_chains.arbitrum.id]: { shortLabel: "Arb", color: "#28A0F0", bg: "#E6F6FF" },
225
+ [_chains.polygon.id]: { shortLabel: "Matic", color: "#8247E5", bg: "#EFE7FF" },
226
+ [_chains.bsc.id]: { shortLabel: "BSC", color: "#F3BA2F", bg: "#FFF8E0" }
227
+ };
228
+ function getChainName(chainId) {
229
+ const chain = CHAIN_BY_ID[chainId];
230
+ if (chain) return chain.name;
231
+ const chainEntry = _sharedconfigs.chainRegistry[String(chainId)];
232
+ if (chainEntry) return chainEntry.name;
233
+ return `Chain ${chainId}`;
234
+ }
235
+ function getChainBadge(chainId) {
236
+ return CHAIN_BADGES[chainId] || {
237
+ shortLabel: "Net",
238
+ color: "#64748B",
239
+ bg: "#F1F5F9"
240
+ };
241
+ }
242
+ function getExplorerUrl(chainId) {
243
+ const chain = CHAIN_BY_ID[chainId];
244
+ return _optionalChain([chain, 'optionalAccess', _6 => _6.blockExplorers, 'optionalAccess', _7 => _7.default, 'optionalAccess', _8 => _8.url]);
245
+ }
246
+ function getExplorerTxUrl(chainId, txHash) {
247
+ const url = getExplorerUrl(chainId);
248
+ if (!url) return void 0;
249
+ return `${url}/tx/${txHash}`;
250
+ }
251
+ function getExplorerName(chainId) {
252
+ const chain = CHAIN_BY_ID[chainId];
253
+ return _nullishCoalesce(_optionalChain([chain, 'optionalAccess', _9 => _9.blockExplorers, 'optionalAccess', _10 => _10.default, 'optionalAccess', _11 => _11.name]), () => ( "Explorer"));
254
+ }
255
+ var CHAIN_ICONS = {
256
+ [_chains.mainnet.id]: "data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 784.37 1277.39'%3E%3Cpolygon fill='%23627EEA' points='392.07 0 383.5 29.11 383.5 873.74 392.07 882.29 784.13 650.54'/%3E%3Cpolygon fill='%23C0CBF6' points='392.07 0 0 650.54 392.07 882.29 392.07 472.33'/%3E%3Cpolygon fill='%238EA2F2' points='392.07 956.52 387.24 962.41 387.24 1263.28 392.07 1277.38 784.37 724.89'/%3E%3Cpolygon fill='%23C0CBF6' points='392.07 1277.38 392.07 956.52 0 724.89'/%3E%3Cpolygon fill='%23627EEA' points='392.07 882.29 784.13 650.54 392.07 472.33'/%3E%3Cpolygon fill='%238EA2F2' points='0 650.54 392.07 882.29 392.07 472.33'/%3E%3C/svg%3E",
257
+ [_chains.base.id]: "data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 111 111'%3E%3Ccircle cx='55.5' cy='55.5' r='55.5' fill='%230052FF'/%3E%3Cpath d='M54.921 93.4c20.942 0 37.92-16.978 37.92-37.921S75.863 17.558 54.92 17.558c-19.498 0-35.57 14.725-37.655 33.647h49.82v5.548h-49.82C19.351 75.675 35.423 93.4 54.921 93.4z' fill='%23fff'/%3E%3C/svg%3E",
258
+ [_chains.optimism.id]: "data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 500 500'%3E%3Ccircle cx='250' cy='250' r='250' fill='%23FF0420'/%3E%3Cpath fill='%23fff' d='M177.1 316.4c-14.9 0-27.1-3.5-36.6-10.5-9.4-7.1-14.1-17.3-14.1-30.4 0-2.8.3-6.1.9-10.1 1.6-9 3.9-19.8 6.9-32.5 8.5-34.4 30.5-51.6 65.9-51.6 9.6 0 18.3 1.6 25.9 4.9 7.6 3.1 13.6 7.9 18 14.3 4.4 6.3 6.6 13.8 6.6 22.5 0 2.6-.3 5.9-.9 9.9-1.9 11.1-4.1 22-6.8 32.5-4.4 17.1-11.9 30-22.7 38.5-10.6 8.2-25 12.3-42.9 12.3zm2.7-27c7 0 12.9-2.1 17.8-6.2 5-4.1 8.6-10.4 10.7-19 2.9-11.8 5.1-22 6.6-30.8.5-2.6.8-5.3.8-8.1 0-11.4-5.9-17.1-17.8-17.1-7 0-13 2.1-18 6.2-4.9 4.1-8.4 10.4-10.5 19-2.3 8.4-4.5 18.6-6.8 30.8-.5 2.5-.8 5.1-.8 7.9 0 11.6 6.1 17.3 18.1 17.3zm79.5 25.2c-1.4 0-2.4-.4-3.2-1.3-.6-1-.8-2.1-.6-3.4l25.9-122c.2-1.4.9-2.5 2.1-3.4 1.1-.9 2.3-1.3 3.6-1.3H337c13.9 0 25 2.9 33.4 8.6 8.5 5.8 12.8 14.1 12.8 25 0 3.1-.4 6.4-1.1 9.8-3.1 14.4-9.4 25-19 31.9-9.4 6.9-22.3 10.3-38.7 10.3h-25.3l-8.6 41.1c-.3 1.4-.9 2.5-2.1 3.4-1.1.9-2.3 1.3-3.6 1.3h-25.5zm66.4-71.7c5.3 0 9.8-1.4 13.7-4.3 4-2.9 6.6-7 7.9-12.4.4-2.1.6-4 .6-5.6 0-3.6-1.1-6.4-3.2-8.3-2.1-2-5.8-3-10.9-3h-22.5l-7.1 33.6h21.5z'/%3E%3C/svg%3E",
259
+ [_chains.arbitrum.id]: "data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 2500 2500'%3E%3Crect fill='none' width='2500' height='2500'/%3E%3Cpath fill='%23213147' d='M226 760v980c0 63 33 120 88 152l849 490c54 31 121 31 175 0l849-490c54-31 88-89 88-152V760c0-63-33-120-88-152l-849-490c-54-31-121-31-175 0L314 608c-54 31-87 89-87 152z'/%3E%3Cpath fill='%2312AAFF' d='M1435 1440l-121 332c-3 9-3 19 0 29l208 571 241-139-289-793c-7-18-32-18-39 0zm243-558c-7-18-32-18-39 0l-121 332c-3 9-3 19 0 29l341 935 241-139-422-1156z'/%3E%3Cpath fill='%239DCCED' d='M1250 155c6 0 12 2 17 5l918 530c11 6 17 18 17 30v1060c0 12-7 24-17 30l-918 530c-5 3-11 5-17 5s-12-2-17-5l-918-530c-11-6-17-18-17-30V719c0-12 7-24 17-30l918-530c5-3 11-5 17-5zm0-155c-33 0-65 8-95 25L237 555c-59 34-95 96-95 164v1060c0 68 36 130 95 164l918 530c29 17 62 25 95 25s65-8 95-25l918-530c59-34 95-96 95-164V719c0-68-36-130-95-164L1344 25c-29-17-62-25-95-25z'/%3E%3Cpolygon fill='%23213147' points='642 2179 727 1947 897 2088 738 2234'/%3E%3Cpath fill='%23fff' d='M1172 644H939c-17 0-33 11-39 27L401 2039l241 139 550-1507c5-14-5-28-19-28zm408 0h-233c-17 0-33 11-39 27L738 2233l241 139 620-1701c5-14-5-28-19-28z'/%3E%3C/svg%3E",
260
+ [_chains.polygon.id]: "data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 38 33'%3E%3Cpath fill='%238247E5' d='M29.6 10.1c-.4-.2-.9-.2-1.3 0l-3 1.7-2-1.2-3-1.7c-.4-.2-.9-.2-1.3 0l-3 1.7-2 1.2-3 1.7c-.4.2-.7.7-.7 1.1v3.5c0 .5.3.9.7 1.1l3 1.7 2 1.2 3 1.7c.4.2.9.2 1.3 0l3-1.7 2-1.2 3-1.7c.4-.2.7-.7.7-1.1v-3.5c0-.5-.3-.9-.7-1.1l-3-1.7 2-1.2 3-1.7c.4-.2.7-.7.7-1.1V8.4c0-.5-.3-.9-.7-1.1l-3-1.7-2-1.2-3-1.7c-.4-.2-.9-.2-1.3 0l-3 1.7-2 1.2-3 1.7c-.4.2-.7.7-.7 1.1v3.5c0 .5.3.9.7 1.1l3 1.7-2 1.2-3 1.7c-.4.2-.7.7-.7 1.1v3.5c0 .5.3.9.7 1.1l3 1.7 2 1.2 3 1.7c.4.2.9.2 1.3 0l3-1.7 2-1.2 3-1.7c.4-.2.7-.7.7-1.1v-3.5c0-.5-.3-.9-.7-1.1l-3-1.7 2-1.2 3-1.7c.4-.2.7-.7.7-1.1V11.2c0-.5-.3-.9-.7-1.1z'/%3E%3C/svg%3E",
261
+ [_chains.bsc.id]: "data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 96 96'%3E%3Ccircle cx='48' cy='48' r='48' fill='%23F3BA2F'/%3E%3Cpath fill='%23fff' d='M48 19.2l7.2 7.2-18 18-7.2-7.2 18-18zm18 18l7.2 7.2-18 18-7.2-7.2 18-18zM30 37.2l7.2 7.2-7.2 7.2-7.2-7.2 7.2-7.2zm36 0l7.2 7.2-7.2 7.2-7.2-7.2 7.2-7.2zm-18 18l7.2 7.2-7.2 7.2-7.2-7.2 7.2-7.2z'/%3E%3C/svg%3E"
262
+ };
263
+ var TOKEN_ICONS = {
264
+ USDC: "data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 2000 2000'%3E%3Cpath d='M1000 2000c554.17 0 1000-445.83 1000-1000S1554.17 0 1000 0 0 445.83 0 1000s445.83 1000 1000 1000z' fill='%232775ca'/%3E%3Cpath d='M1275 1158.33c0-145.83-87.5-195.83-262.5-216.66-125-16.67-150-50-150-108.34s41.67-95.83 125-95.83c75 0 116.67 25 137.5 87.5 4.17 12.5 16.67 20.83 29.17 20.83h66.66c16.67 0 29.17-12.5 29.17-29.16v-4.17c-16.67-91.67-91.67-162.5-187.5-170.83v-100c0-16.67-12.5-29.17-33.33-33.34h-62.5c-16.67 0-29.17 12.5-33.34 33.34v95.83c-125 16.67-204.16 100-204.16 204.17 0 137.5 83.33 191.66 258.33 212.5 116.67 20.83 154.17 45.83 154.17 112.5s-58.34 112.5-137.5 112.5c-108.34 0-145.84-45.84-158.34-108.34-4.16-16.66-16.66-25-29.16-25h-70.84c-16.66 0-29.16 12.5-29.16 29.17v4.17c16.66 104.16 83.33 179.16 220.83 200v100c0 16.66 12.5 29.16 33.33 33.33h62.5c16.67 0 29.17-12.5 33.34-33.33v-100c125-20.84 208.33-108.34 208.33-220.84z' fill='%23fff'/%3E%3Cpath d='M787.5 1595.83c-325-116.66-491.67-479.16-370.83-800 62.5-175 200-308.33 370.83-370.83 16.67-8.33 25-20.83 25-41.67V325c0-16.67-8.33-29.17-25-33.33-4.17 0-12.5 0-16.67 4.16-395.83 125-612.5 545.84-487.5 941.67 75 233.33 254.17 412.5 487.5 487.5 16.67 8.33 33.34 0 37.5-16.67 4.17-4.16 4.17-8.33 4.17-16.66v-58.34c0-12.5-12.5-29.16-25-37.5zm441.67-1300c-16.67-8.33-33.34 0-37.5 16.67-4.17 4.17-4.17 8.33-4.17 16.67v58.33c0 16.67 12.5 33.33 25 41.67 325 116.66 491.67 479.16 370.83 800-62.5 175-200 308.33-370.83 370.83-16.67 8.33-25 20.83-25 41.67V1700c0 16.67 8.33 29.17 25 33.33 4.17 0 12.5 0 16.67-4.16 395.83-125 612.5-545.84 487.5-941.67-75-237.5-258.34-416.67-487.5-491.67z' fill='%23fff'/%3E%3C/svg%3E",
265
+ ETH: "data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 784.37 1277.39'%3E%3Cpolygon fill='%23343434' points='392.07 0 383.5 29.11 383.5 873.74 392.07 882.29 784.13 650.54'/%3E%3Cpolygon fill='%238C8C8C' points='392.07 0 0 650.54 392.07 882.29 392.07 472.33'/%3E%3Cpolygon fill='%233C3C3B' points='392.07 956.52 387.24 962.41 387.24 1263.28 392.07 1277.38 784.37 724.89'/%3E%3Cpolygon fill='%238C8C8C' points='392.07 1277.38 392.07 956.52 0 724.89'/%3E%3Cpolygon fill='%23141414' points='392.07 882.29 784.13 650.54 392.07 472.33'/%3E%3Cpolygon fill='%23393939' points='0 650.54 392.07 882.29 392.07 472.33'/%3E%3C/svg%3E",
266
+ USDT: "data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 339.43 295.27'%3E%3Cpath fill='%2350AF95' d='M62.15 1.45l-61.89 130a2.52 2.52 0 00.54 2.94l167.15 160.17a2.55 2.55 0 003.53 0L339.62 134.4a2.52 2.52 0 00.54-2.94l-61.89-130A2.5 2.5 0 00276 0H64.45a2.5 2.5 0 00-2.3 1.45z'/%3E%3Cpath fill='%23fff' d='M191.19 144.8v-.12c-1.09.07-5.42.33-15.55.33-8.09 0-13.81-.22-15.83-.33v.13c-31.22-1.38-54.6-7.1-54.6-14s23.38-12.58 54.6-14v22.28c2.05.14 7.92.46 16 .46 9.67 0 14.31-.38 15.38-.46v-22.29c31.13 1.38 54.42 7.06 54.42 13.95s-23.29 12.58-54.42 13.96zm0-30.29v-19.85h43.17V66.35H105.49v28.31h43.17v19.84c-35.37 1.59-62 8.76-62 17.33s26.59 15.74 62 17.33v62h30.53v-62c35.29-1.58 61.84-8.74 61.84-17.32s-26.55-15.74-61.84-17.33z'/%3E%3C/svg%3E",
267
+ WETH: "data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 784.37 1277.39'%3E%3Cpolygon fill='%23EC1A79' points='392.07 0 383.5 29.11 383.5 873.74 392.07 882.29 784.13 650.54'/%3E%3Cpolygon fill='%23EC1A79' fill-opacity='0.6' points='392.07 0 0 650.54 392.07 882.29 392.07 472.33'/%3E%3Cpolygon fill='%239E1165' points='392.07 956.52 387.24 962.41 387.24 1263.28 392.07 1277.38 784.37 724.89'/%3E%3Cpolygon fill='%23EC1A79' fill-opacity='0.6' points='392.07 1277.38 392.07 956.52 0 724.89'/%3E%3Cpolygon fill='%239E1165' points='392.07 882.29 784.13 650.54 392.07 472.33'/%3E%3Cpolygon fill='%23EC1A79' fill-opacity='0.2' points='0 650.54 392.07 882.29 392.07 472.33'/%3E%3C/svg%3E"
268
+ };
269
+ function getChainIcon(chainId) {
270
+ return CHAIN_ICONS[chainId];
271
+ }
272
+ function getTokenIcon(symbol) {
273
+ return TOKEN_ICONS[symbol.toUpperCase()];
274
+ }
275
+
276
+
277
+
278
+
279
+
280
+
281
+
282
+
283
+
284
+
285
+
286
+
287
+
288
+
289
+
290
+
291
+
292
+
293
+
294
+
295
+
296
+
297
+
298
+
299
+
300
+
301
+
302
+
303
+
304
+ exports.chainRegistry = _sharedconfigs.chainRegistry; exports.DEFAULT_BACKEND_URL = DEFAULT_BACKEND_URL; exports.DEFAULT_SIGNER_ADDRESS = DEFAULT_SIGNER_ADDRESS; exports.NATIVE_TOKEN_ADDRESS = NATIVE_TOKEN_ADDRESS; exports.CHAIN_BY_ID = CHAIN_BY_ID; exports.SOURCE_CHAINS = SOURCE_CHAINS; exports.SUPPORTED_CHAINS = SUPPORTED_CHAINS; exports.getChainId = getChainId; exports.getChainObject = getChainObject; exports.getUsdcAddress = getUsdcAddress; exports.getUsdcDecimals = getUsdcDecimals; exports.getTokenAddress = getTokenAddress; exports.getTokenDecimals = getTokenDecimals; exports.getSupportedTokenSymbolsForChain = getSupportedTokenSymbolsForChain; exports.getSupportedChainIds = getSupportedChainIds; exports.isSupportedTokenAddressForChain = isSupportedTokenAddressForChain; exports.getSupportedTargetTokens = getSupportedTargetTokens; exports.getTokenDecimalsByAddress = getTokenDecimalsByAddress; exports.findChainIdForToken = findChainIdForToken; exports.getTokenSymbol = getTokenSymbol; exports.getChainName = getChainName; exports.getChainBadge = getChainBadge; exports.getExplorerUrl = getExplorerUrl; exports.getExplorerTxUrl = getExplorerTxUrl; exports.getExplorerName = getExplorerName; exports.getChainIcon = getChainIcon; exports.getTokenIcon = getTokenIcon;