@ape.swap/bonds-sdk 1.0.164 → 1.0.166

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,452 @@
1
+ var __extends = (this && this.__extends) || (function () {
2
+ var extendStatics = function (d, b) {
3
+ extendStatics = Object.setPrototypeOf ||
4
+ ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
5
+ function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
6
+ return extendStatics(d, b);
7
+ };
8
+ return function (d, b) {
9
+ if (typeof b !== "function" && b !== null)
10
+ throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
11
+ extendStatics(d, b);
12
+ function __() { this.constructor = d; }
13
+ d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
14
+ };
15
+ })();
16
+ var __assign = (this && this.__assign) || function () {
17
+ __assign = Object.assign || function(t) {
18
+ for (var s, i = 1, n = arguments.length; i < n; i++) {
19
+ s = arguments[i];
20
+ for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
21
+ t[p] = s[p];
22
+ }
23
+ return t;
24
+ };
25
+ return __assign.apply(this, arguments);
26
+ };
27
+ var _a;
28
+ import { Ether, NativeCurrency, Token, WETH9 } from '@ape.swap/sdk-core';
29
+ import invariant from 'tiny-invariant';
30
+ import { ChainId } from './chains';
31
+ export var NATIVE_CHAIN_ID = 'NATIVE';
32
+ export var WRAPPED_NATIVE_CURRENCY = __assign(__assign({}, WETH9), (_a = {}, _a[ChainId.POLYGON] = new Token(ChainId.POLYGON, '0x0d500B1d8E8eF31E21C99d1Db9A6444d3ADf1270', 18, 'WMATIC', 'Wrapped MATIC'), _a[ChainId.BSC] = new Token(ChainId.BSC, '0xbb4CdB9CBd36B01bD1cBaEBF2De08d9173bc095c', 18, 'WBNB', 'Wrapped BNB'), _a[ChainId.BSC_TESTNET] = new Token(ChainId.BSC_TESTNET, '0xbb4CdB9CBd36B01bD1cBaEBF2De08d9173bc095c', //this is wrong
33
+ 18, 'WBNB', 'Wrapped BNB'), _a[ChainId.TLOS] = new Token(ChainId.TLOS, '0xbb4CdB9CBd36B01bD1cBaEBF2De08d9173bc095c', 18, 'WTLOS', 'Wrapped TLOS'), _a[ChainId.AVALANCHE] = new Token(ChainId.AVALANCHE, '0xB31f66AA3C1e785363F0875A1B74E27b85FD66c7', 18, 'WAVAX', 'Wrapped AVAX'), _a[ChainId.FANTOM] = new Token(ChainId.FANTOM, '0x21be370d5312f44cb42ce377bc9b8a0cef1a4c83', 18, 'WFTM', 'Wrapped Fantom'), _a[ChainId.POLYGON_ZK] = new Token(ChainId.POLYGON_ZK, '0x4F9A0e7FD2Bf6067db6994CF12E4495Df938E6e9', 18, 'WETH', 'Wrapped ETH'), _a[ChainId.CELO] = new Token(ChainId.CELO, '0x471EcE3750Da237f93B8E339c536989b8978a438', 18, 'CELO', 'CELO'), _a[ChainId.CRONOS] = new Token(ChainId.CRONOS, '0x5C7F8A570d578ED84E63fdFA7b1eE72dEae1AE23', 18, 'WCRO', 'Wrapped CRO'), _a[ChainId.GNOSIS] = new Token(ChainId.GNOSIS, '0xe91D153E0b41518A2Ce8Dd3D7944Fa863463a97d', 18, 'WXDAI', 'Wrapped xDAI'), _a[ChainId.INJECTED_EVM_TESTNET] = new Token(ChainId.INJECTED_EVM_TESTNET, '0xe91D153E0b41518A2Ce8Dd3D7944Fa863463a97d', //this is wrong
34
+ 18, 'WINJ', 'Wrapped INJ'), _a[ChainId.INEVM] = new Token(ChainId.INEVM, '0x69011706b3f6C6eaeD7D2Bc13801558B4fd94CBF', 18, 'WINJ', 'Wrapped INJ'), _a[ChainId.SEPOLIA] = new Token(ChainId.SEPOLIA, '0xe91D153E0b41518A2Ce8Dd3D7944Fa863463a97d', //this is wrong
35
+ 18, 'WETH', 'Wrapped ETH'), _a[ChainId.LINEA] = new Token(ChainId.LINEA, '0xe5D7C2a44FfDDf6b295A15c148167daaAf5Cf34f', 18, 'WETH', 'Wrapped ETH'), _a[ChainId.LIGHTLINK] = new Token(ChainId.LIGHTLINK, '0x7EbeF2A4b1B09381Ec5B9dF8C5c6f2dBECA59c73', 18, 'WETH', 'Wrapped ETH'), _a[ChainId.IOTA] = new Token(ChainId.IOTA, '0x6e47f8d48a01b44DF3fFF35d258A10A3AEdC114c', 18, 'WIOTA', 'Wrapped IOTA'), _a[ChainId.BASE] = new Token(ChainId.BASE, '0x4200000000000000000000000000000000000006', 18, 'WETH', 'Wrapped ETH'), _a));
36
+ function isMatic(chainId) {
37
+ return chainId === ChainId.POLYGON;
38
+ }
39
+ function isBNB(chainId) {
40
+ return chainId === ChainId.BSC;
41
+ }
42
+ function isBNB_Testnet(chainId) {
43
+ return chainId === ChainId.BSC_TESTNET;
44
+ }
45
+ function isAvax(chainId) {
46
+ return chainId === ChainId.AVALANCHE;
47
+ }
48
+ function isFantom(chainId) {
49
+ return chainId === ChainId.FANTOM;
50
+ }
51
+ function isCronos(chainId) {
52
+ return chainId === ChainId.CRONOS;
53
+ }
54
+ function isGnosis(chainId) {
55
+ return chainId === ChainId.GNOSIS;
56
+ }
57
+ function isINJ_EVM_TESTNET(chainId) {
58
+ return chainId === ChainId.INJECTED_EVM_TESTNET;
59
+ }
60
+ function isINEVM(chainId) {
61
+ return chainId === ChainId.INEVM;
62
+ }
63
+ function isSepolia(chainId) {
64
+ return chainId === ChainId.SEPOLIA;
65
+ }
66
+ function isLinea(chainId) {
67
+ return chainId === ChainId.LINEA;
68
+ }
69
+ function isIota(chainId) {
70
+ return chainId === ChainId.IOTA;
71
+ }
72
+ function isBase(chainId) {
73
+ return chainId === ChainId.BASE;
74
+ }
75
+ var GnosisNativeCurrency = /** @class */ (function (_super) {
76
+ __extends(GnosisNativeCurrency, _super);
77
+ function GnosisNativeCurrency(chainId) {
78
+ if (!isGnosis(chainId))
79
+ throw new Error('Not Gnosis');
80
+ return _super.call(this, chainId, 18, 'xDAI', 'xDai') || this;
81
+ }
82
+ GnosisNativeCurrency.prototype.equals = function (other) {
83
+ return other.isNative && other.chainId === this.chainId;
84
+ };
85
+ Object.defineProperty(GnosisNativeCurrency.prototype, "wrapped", {
86
+ get: function () {
87
+ if (!isGnosis(this.chainId))
88
+ throw new Error('Not Gnosis');
89
+ var wrapped = WRAPPED_NATIVE_CURRENCY[this.chainId];
90
+ invariant(wrapped instanceof Token);
91
+ return wrapped;
92
+ },
93
+ enumerable: false,
94
+ configurable: true
95
+ });
96
+ return GnosisNativeCurrency;
97
+ }(NativeCurrency));
98
+ var CronosNativeCurrency = /** @class */ (function (_super) {
99
+ __extends(CronosNativeCurrency, _super);
100
+ function CronosNativeCurrency(chainId) {
101
+ if (!isCronos(chainId))
102
+ throw new Error('Not Cronos');
103
+ return _super.call(this, chainId, 18, 'CRO', 'CRO') || this;
104
+ }
105
+ CronosNativeCurrency.prototype.equals = function (other) {
106
+ return other.isNative && other.chainId === this.chainId;
107
+ };
108
+ Object.defineProperty(CronosNativeCurrency.prototype, "wrapped", {
109
+ get: function () {
110
+ if (!isCronos(this.chainId))
111
+ throw new Error('Not Cronos');
112
+ var wrapped = WRAPPED_NATIVE_CURRENCY[this.chainId];
113
+ invariant(wrapped instanceof Token);
114
+ return wrapped;
115
+ },
116
+ enumerable: false,
117
+ configurable: true
118
+ });
119
+ return CronosNativeCurrency;
120
+ }(NativeCurrency));
121
+ var FantomNativeCurrency = /** @class */ (function (_super) {
122
+ __extends(FantomNativeCurrency, _super);
123
+ function FantomNativeCurrency(chainId) {
124
+ if (!isFantom(chainId))
125
+ throw new Error('Not Fantom');
126
+ return _super.call(this, chainId, 18, 'FTM', 'FTM') || this;
127
+ }
128
+ FantomNativeCurrency.prototype.equals = function (other) {
129
+ return other.isNative && other.chainId === this.chainId;
130
+ };
131
+ Object.defineProperty(FantomNativeCurrency.prototype, "wrapped", {
132
+ get: function () {
133
+ if (!isFantom(this.chainId))
134
+ throw new Error('Not Fantom');
135
+ var wrapped = WRAPPED_NATIVE_CURRENCY[this.chainId];
136
+ invariant(wrapped instanceof Token);
137
+ return wrapped;
138
+ },
139
+ enumerable: false,
140
+ configurable: true
141
+ });
142
+ return FantomNativeCurrency;
143
+ }(NativeCurrency));
144
+ var AvaxNativeCurrency = /** @class */ (function (_super) {
145
+ __extends(AvaxNativeCurrency, _super);
146
+ function AvaxNativeCurrency(chainId) {
147
+ if (!isAvax(chainId))
148
+ throw new Error('Not Avax');
149
+ return _super.call(this, chainId, 18, 'AVAX', 'Avax') || this;
150
+ }
151
+ AvaxNativeCurrency.prototype.equals = function (other) {
152
+ return other.isNative && other.chainId === this.chainId;
153
+ };
154
+ Object.defineProperty(AvaxNativeCurrency.prototype, "wrapped", {
155
+ get: function () {
156
+ if (!isAvax(this.chainId))
157
+ throw new Error('Not Avax');
158
+ var wrapped = WRAPPED_NATIVE_CURRENCY[this.chainId];
159
+ invariant(wrapped instanceof Token);
160
+ return wrapped;
161
+ },
162
+ enumerable: false,
163
+ configurable: true
164
+ });
165
+ return AvaxNativeCurrency;
166
+ }(NativeCurrency));
167
+ var MaticNativeCurrency = /** @class */ (function (_super) {
168
+ __extends(MaticNativeCurrency, _super);
169
+ function MaticNativeCurrency(chainId) {
170
+ if (!isMatic(chainId))
171
+ throw new Error('Not matic');
172
+ return _super.call(this, chainId, 18, 'MATIC', 'MATIC Matic') || this;
173
+ }
174
+ MaticNativeCurrency.prototype.equals = function (other) {
175
+ return other.isNative && other.chainId === this.chainId;
176
+ };
177
+ Object.defineProperty(MaticNativeCurrency.prototype, "wrapped", {
178
+ get: function () {
179
+ if (!isMatic(this.chainId))
180
+ throw new Error('Not matic');
181
+ var wrapped = WRAPPED_NATIVE_CURRENCY[this.chainId];
182
+ invariant(wrapped instanceof Token);
183
+ return wrapped;
184
+ },
185
+ enumerable: false,
186
+ configurable: true
187
+ });
188
+ return MaticNativeCurrency;
189
+ }(NativeCurrency));
190
+ var BNBNativeCurrency = /** @class */ (function (_super) {
191
+ __extends(BNBNativeCurrency, _super);
192
+ function BNBNativeCurrency(chainId) {
193
+ if (!isBNB(chainId))
194
+ throw new Error('Not bnb');
195
+ return _super.call(this, chainId, 18, 'BNB', '') || this;
196
+ }
197
+ BNBNativeCurrency.prototype.equals = function (other) {
198
+ return other.isNative && other.chainId === this.chainId;
199
+ };
200
+ Object.defineProperty(BNBNativeCurrency.prototype, "wrapped", {
201
+ get: function () {
202
+ if (!isBNB(this.chainId))
203
+ throw new Error('Not bnb');
204
+ var wrapped = WRAPPED_NATIVE_CURRENCY[this.chainId];
205
+ invariant(wrapped instanceof Token);
206
+ return wrapped;
207
+ },
208
+ enumerable: false,
209
+ configurable: true
210
+ });
211
+ return BNBNativeCurrency;
212
+ }(NativeCurrency));
213
+ var tBNBNativeCurrency = /** @class */ (function (_super) {
214
+ __extends(tBNBNativeCurrency, _super);
215
+ function tBNBNativeCurrency(chainId) {
216
+ if (!isBNB_Testnet(chainId))
217
+ throw new Error('Not bnb testnet');
218
+ return _super.call(this, chainId, 18, 'tBNB', '') || this;
219
+ }
220
+ tBNBNativeCurrency.prototype.equals = function (other) {
221
+ return other.isNative && other.chainId === this.chainId;
222
+ };
223
+ Object.defineProperty(tBNBNativeCurrency.prototype, "wrapped", {
224
+ get: function () {
225
+ if (!isBNB_Testnet(this.chainId))
226
+ throw new Error('Not bnb testnet');
227
+ var wrapped = WRAPPED_NATIVE_CURRENCY[this.chainId];
228
+ invariant(wrapped instanceof Token);
229
+ return wrapped;
230
+ },
231
+ enumerable: false,
232
+ configurable: true
233
+ });
234
+ return tBNBNativeCurrency;
235
+ }(NativeCurrency));
236
+ var ExtendedEther = /** @class */ (function (_super) {
237
+ __extends(ExtendedEther, _super);
238
+ function ExtendedEther() {
239
+ return _super !== null && _super.apply(this, arguments) || this;
240
+ }
241
+ Object.defineProperty(ExtendedEther.prototype, "wrapped", {
242
+ get: function () {
243
+ var wrapped = WRAPPED_NATIVE_CURRENCY[this.chainId];
244
+ if (wrapped)
245
+ return wrapped;
246
+ throw new Error('Unsupported chain ID');
247
+ },
248
+ enumerable: false,
249
+ configurable: true
250
+ });
251
+ ExtendedEther.onChain = function (chainId) {
252
+ var _a;
253
+ return (_a = this._cachedExtendedEther[chainId]) !== null && _a !== void 0 ? _a : (this._cachedExtendedEther[chainId] = new ExtendedEther(chainId));
254
+ };
255
+ ExtendedEther._cachedExtendedEther = {};
256
+ return ExtendedEther;
257
+ }(Ether));
258
+ var INJ_EVM_TESTNET_NativeCurrency = /** @class */ (function (_super) {
259
+ __extends(INJ_EVM_TESTNET_NativeCurrency, _super);
260
+ function INJ_EVM_TESTNET_NativeCurrency(chainId) {
261
+ if (!isINJ_EVM_TESTNET(chainId))
262
+ throw new Error('Not INJ test');
263
+ return _super.call(this, chainId, 18, 'INJ', '') || this;
264
+ }
265
+ INJ_EVM_TESTNET_NativeCurrency.prototype.equals = function (other) {
266
+ return other.isNative && other.chainId === this.chainId;
267
+ };
268
+ Object.defineProperty(INJ_EVM_TESTNET_NativeCurrency.prototype, "wrapped", {
269
+ get: function () {
270
+ if (!isINJ_EVM_TESTNET(this.chainId))
271
+ throw new Error('Not INJ test');
272
+ var wrapped = WRAPPED_NATIVE_CURRENCY[this.chainId];
273
+ invariant(wrapped instanceof Token);
274
+ return wrapped;
275
+ },
276
+ enumerable: false,
277
+ configurable: true
278
+ });
279
+ return INJ_EVM_TESTNET_NativeCurrency;
280
+ }(NativeCurrency));
281
+ var INEVM_NativeCurrency = /** @class */ (function (_super) {
282
+ __extends(INEVM_NativeCurrency, _super);
283
+ function INEVM_NativeCurrency(chainId) {
284
+ if (!isINEVM(chainId))
285
+ throw new Error('Not INEVM');
286
+ return _super.call(this, chainId, 18, 'INJ', '') || this;
287
+ }
288
+ INEVM_NativeCurrency.prototype.equals = function (other) {
289
+ return other.isNative && other.chainId === this.chainId;
290
+ };
291
+ Object.defineProperty(INEVM_NativeCurrency.prototype, "wrapped", {
292
+ get: function () {
293
+ if (!isINEVM(this.chainId))
294
+ throw new Error('Not INEVM');
295
+ var wrapped = WRAPPED_NATIVE_CURRENCY[this.chainId];
296
+ invariant(wrapped instanceof Token);
297
+ return wrapped;
298
+ },
299
+ enumerable: false,
300
+ configurable: true
301
+ });
302
+ return INEVM_NativeCurrency;
303
+ }(NativeCurrency));
304
+ var Sepolia_NativeCurrency = /** @class */ (function (_super) {
305
+ __extends(Sepolia_NativeCurrency, _super);
306
+ function Sepolia_NativeCurrency(chainId) {
307
+ if (!isSepolia(chainId))
308
+ throw new Error('Not Sepolia');
309
+ return _super.call(this, chainId, 18, 'ETH', '') || this;
310
+ }
311
+ Sepolia_NativeCurrency.prototype.equals = function (other) {
312
+ return other.isNative && other.chainId === this.chainId;
313
+ };
314
+ Object.defineProperty(Sepolia_NativeCurrency.prototype, "wrapped", {
315
+ get: function () {
316
+ if (!isSepolia(this.chainId))
317
+ throw new Error('Not Sepolia');
318
+ var wrapped = WRAPPED_NATIVE_CURRENCY[this.chainId];
319
+ invariant(wrapped instanceof Token);
320
+ return wrapped;
321
+ },
322
+ enumerable: false,
323
+ configurable: true
324
+ });
325
+ return Sepolia_NativeCurrency;
326
+ }(NativeCurrency));
327
+ var LineaNativeCurrency = /** @class */ (function (_super) {
328
+ __extends(LineaNativeCurrency, _super);
329
+ function LineaNativeCurrency(chainId) {
330
+ if (!isLinea(chainId))
331
+ throw new Error('Not linea');
332
+ return _super.call(this, chainId, 18, 'ETH', '') || this;
333
+ }
334
+ LineaNativeCurrency.prototype.equals = function (other) {
335
+ return other.isNative && other.chainId === this.chainId;
336
+ };
337
+ Object.defineProperty(LineaNativeCurrency.prototype, "wrapped", {
338
+ get: function () {
339
+ if (!isLinea(this.chainId))
340
+ throw new Error('Not linea');
341
+ var wrapped = WRAPPED_NATIVE_CURRENCY[this.chainId];
342
+ invariant(wrapped instanceof Token);
343
+ return wrapped;
344
+ },
345
+ enumerable: false,
346
+ configurable: true
347
+ });
348
+ return LineaNativeCurrency;
349
+ }(NativeCurrency));
350
+ var IotaNativeCurrency = /** @class */ (function (_super) {
351
+ __extends(IotaNativeCurrency, _super);
352
+ function IotaNativeCurrency(chainId) {
353
+ if (!isIota(chainId))
354
+ throw new Error('Not iota');
355
+ return _super.call(this, chainId, 18, 'IOTA', '') || this;
356
+ }
357
+ IotaNativeCurrency.prototype.equals = function (other) {
358
+ return other.isNative && other.chainId === this.chainId;
359
+ };
360
+ Object.defineProperty(IotaNativeCurrency.prototype, "wrapped", {
361
+ get: function () {
362
+ if (!isIota(this.chainId))
363
+ throw new Error('Not iota');
364
+ var wrapped = WRAPPED_NATIVE_CURRENCY[this.chainId];
365
+ invariant(wrapped instanceof Token);
366
+ return wrapped;
367
+ },
368
+ enumerable: false,
369
+ configurable: true
370
+ });
371
+ return IotaNativeCurrency;
372
+ }(NativeCurrency));
373
+ var BaseNativeCurrency = /** @class */ (function (_super) {
374
+ __extends(BaseNativeCurrency, _super);
375
+ function BaseNativeCurrency(chainId) {
376
+ if (!isBase(chainId))
377
+ throw new Error('Not Base');
378
+ return _super.call(this, chainId, 18, 'ETH', '') || this;
379
+ }
380
+ BaseNativeCurrency.prototype.equals = function (other) {
381
+ return other.isNative && other.chainId === this.chainId;
382
+ };
383
+ Object.defineProperty(BaseNativeCurrency.prototype, "wrapped", {
384
+ get: function () {
385
+ if (!isBase(this.chainId))
386
+ throw new Error('Not Base');
387
+ var wrapped = WRAPPED_NATIVE_CURRENCY[this.chainId];
388
+ invariant(wrapped instanceof Token);
389
+ return wrapped;
390
+ },
391
+ enumerable: false,
392
+ configurable: true
393
+ });
394
+ return BaseNativeCurrency;
395
+ }(NativeCurrency));
396
+ var cachedNativeCurrency = {};
397
+ export function nativeOnChain(chainId) {
398
+ if (cachedNativeCurrency[chainId])
399
+ return cachedNativeCurrency[chainId];
400
+ var nativeCurrency;
401
+ //TODO: find a more elegant solution
402
+ var selectedChain;
403
+ if (typeof chainId === 'string') {
404
+ selectedChain = parseInt(chainId);
405
+ }
406
+ else {
407
+ selectedChain = chainId;
408
+ }
409
+ if (isMatic(selectedChain)) {
410
+ nativeCurrency = new MaticNativeCurrency(selectedChain);
411
+ }
412
+ else if (isBNB(selectedChain)) {
413
+ nativeCurrency = new BNBNativeCurrency(selectedChain);
414
+ }
415
+ else if (isBNB_Testnet(selectedChain)) {
416
+ nativeCurrency = new tBNBNativeCurrency(selectedChain);
417
+ }
418
+ else if (isAvax(selectedChain)) {
419
+ nativeCurrency = new AvaxNativeCurrency(selectedChain);
420
+ }
421
+ else if (isFantom(selectedChain)) {
422
+ nativeCurrency = new FantomNativeCurrency(selectedChain);
423
+ }
424
+ else if (isCronos(selectedChain)) {
425
+ nativeCurrency = new CronosNativeCurrency(selectedChain);
426
+ }
427
+ else if (isGnosis(selectedChain)) {
428
+ nativeCurrency = new GnosisNativeCurrency(selectedChain);
429
+ }
430
+ else if (isINJ_EVM_TESTNET(selectedChain)) {
431
+ nativeCurrency = new INJ_EVM_TESTNET_NativeCurrency(selectedChain);
432
+ }
433
+ else if (isINEVM(selectedChain)) {
434
+ nativeCurrency = new INEVM_NativeCurrency(selectedChain);
435
+ }
436
+ else if (isSepolia(selectedChain)) {
437
+ nativeCurrency = new Sepolia_NativeCurrency(selectedChain);
438
+ }
439
+ else if (isLinea(selectedChain)) {
440
+ nativeCurrency = new LineaNativeCurrency(selectedChain);
441
+ }
442
+ else if (isIota(selectedChain)) {
443
+ nativeCurrency = new IotaNativeCurrency(selectedChain);
444
+ }
445
+ else if (isBase(selectedChain)) {
446
+ nativeCurrency = new BaseNativeCurrency(selectedChain);
447
+ }
448
+ else {
449
+ nativeCurrency = ExtendedEther.onChain(selectedChain);
450
+ }
451
+ return (cachedNativeCurrency[selectedChain] = nativeCurrency);
452
+ }
@@ -0,0 +1,7 @@
1
+ import { SupportedChainId } from '@ape.swap/sdk-core';
2
+ export declare const getMetamaskLinks: (chainId: SupportedChainId) => "https://docs.bnbchain.org/docs/wallet/metamask/" | "https://wiki.polygon.technology/docs/tools/wallets/metamask/config-polygon-on-metamask/" | "https://metamask.io/faqs/" | "https://decentralizedcreator.com/add-telos-evm-network-to-metamask/" | "https://academy.binance.com/en/articles/how-to-add-arbitrum-to-metamask";
3
+ export declare const ROUTE_NAMES: Record<string, string>;
4
+ export declare const FARMS: Record<string, string>;
5
+ export declare const apebond = "https://docs.ape.bond/apebond/";
6
+ export declare const APEBOND_DOC_LINKS: Record<string, string>;
7
+ export declare const HELP_LINK: string;
@@ -0,0 +1,80 @@
1
+ import { SupportedChainId } from '@ape.swap/sdk-core';
2
+ export var getMetamaskLinks = function (chainId) {
3
+ switch (chainId) {
4
+ case SupportedChainId.BSC:
5
+ return 'https://docs.bnbchain.org/docs/wallet/metamask/';
6
+ case SupportedChainId.POLYGON:
7
+ return 'https://wiki.polygon.technology/docs/tools/wallets/metamask/config-polygon-on-metamask/';
8
+ case SupportedChainId.MAINNET:
9
+ return 'https://metamask.io/faqs/';
10
+ case SupportedChainId.TLOS:
11
+ return 'https://decentralizedcreator.com/add-telos-evm-network-to-metamask/';
12
+ case SupportedChainId.ARBITRUM_ONE:
13
+ return 'https://academy.binance.com/en/articles/how-to-add-arbitrum-to-metamask';
14
+ default:
15
+ return 'https://docs.bnbchain.org/docs/wallet/metamask/';
16
+ }
17
+ };
18
+ export var ROUTE_NAMES = {
19
+ '/': 'HOME',
20
+ '/jungle-farms': 'JUNGLE_FARMS',
21
+ '/farms': 'FARMS',
22
+ '/swap': 'SWAP',
23
+ '/pools': 'POOLS',
24
+ '/maximizers': 'MAXIMIZERS_VAULTS',
25
+ '/add': 'ADD_LIQUIDITY',
26
+ //'/v3-add-liquidity': 'ADD_LIQUIDITY',
27
+ '/add-liquidity': 'ADD_LIQUIDITY_V2',
28
+ '/liquidity': 'ADD_LIQUIDITY_V2',
29
+ '/zap': 'ADD_LIQUIDITY_V2',
30
+ '/migrate': 'ADD_LIQUIDITY_V2',
31
+ '/find': 'ADD_LIQUIDITY_V2',
32
+ '/remove': 'ADD_LIQUIDITY_V2',
33
+ '/limit-orders': 'ORDERS',
34
+ '/iao': 'IAO',
35
+ '/gnana': 'GNANA',
36
+ '/bonds': 'TREASURY_BILL',
37
+ '/nft': 'NFT',
38
+ '/auction': 'AUCTION',
39
+ '/staking': 'STAKING',
40
+ '/apestats': 'APESTATS',
41
+ '/protocol-dashboard': 'PROTOCOL_DASHBOARD',
42
+ '/the-migration': 'THE_MIGRATION',
43
+ '/liquidity-health': 'LIQUIDITY_HEALTH',
44
+ '/migration': 'MIGRATION',
45
+ '/earn': 'EARN',
46
+ '/launchpad': 'LAUNCHPAD',
47
+ };
48
+ export var FARMS = {
49
+ BNB: 'bnb-chain-farms',
50
+ Polygon: 'polygon-farms',
51
+ Ethereum: '',
52
+ Telos: 'telos-farms',
53
+ };
54
+ export var apebond = 'https://docs.ape.bond/apebond/';
55
+ export var APEBOND_DOC_LINKS = {
56
+ HOME: "welcome/master",
57
+ JUNGLE_FARMS: 'products-and-features/stake/farms',
58
+ FARMS: "products-and-features/stake/farms",
59
+ SWAP: 'products-and-features/swap',
60
+ POOLS: 'products-and-features/stake/pools',
61
+ MAXIMIZERS_VAULTS: 'products-and-features/stake/vaults',
62
+ ADD_LIQUIDITY: 'products-and-features/exchange/liquidity/how-to-add-liquidity-v3',
63
+ ADD_LIQUIDITY_V2: 'products-and-features/exchange/liquidity/how-to-add-liquidity-v2',
64
+ LIQUIDITY: 'products-and-features/exchange/liquidity/how-to-add-liquidity-v3',
65
+ ORDERS: 'products-and-features/exchange/limit-orders',
66
+ IAO: 'products-and-features/raise/initial-ape-offerings-iaos',
67
+ GNANA: 'welcome/apeswap-tokens/gnana',
68
+ TREASURY_BILL: 'products-and-features/bonds',
69
+ NFT: 'products-and-features/collect/non-fungible-apes-nfas',
70
+ AUCTION: 'products-and-features/collect/non-fungible-apes-nfas/nfa-auction-house',
71
+ STAKING: 'products-and-features/stake',
72
+ APESTATS: 'products-and-features/apestats',
73
+ PROTOCOL_DASHBOARD: 'products-and-features/protocol-dashboard',
74
+ THE_MIGRATION: 'products-and-features/stake/hard-cap-migration-masterapev2',
75
+ LIQUIDITY_HEALTH: 'products-and-features/liquidity-health',
76
+ MIGRATION: 'products-and-features/abond-migration',
77
+ EARN: 'products-and-features/stake',
78
+ LAUNCHPAD: 'products-and-features/launchpad',
79
+ };
80
+ export var HELP_LINK = 'https://discord.com/channels/821817977917538375/1110438345701593088';
@@ -13,8 +13,8 @@
13
13
  display: flex;
14
14
  justify-content: space-around;
15
15
  padding-top: 5px;
16
- padding-left: 20px;
17
- padding-right: 20px;
16
+ padding-left: 15px;
17
+ padding-right: 15px;
18
18
  padding-bottom: 5px;
19
19
  font-size: 12px;
20
20
  color: #78787D;
@@ -27,7 +27,7 @@
27
27
  justify-content: space-around;
28
28
  background-color: var(--theme-ui-colors-white2);
29
29
  margin-bottom: 10px;
30
- padding: 20px;
30
+ padding: 15px;
31
31
  border-radius: 10px;
32
32
  border: 1px solid #4B4B53;
33
33
  cursor: pointer;
@@ -47,7 +47,7 @@
47
47
  }
48
48
 
49
49
  .column.column-token {
50
- min-width: 300px;
50
+ min-width: 400px;
51
51
  flex-direction: column;
52
52
  justify-content: center;
53
53
  align-items: start;
package/package.json CHANGED
@@ -3,7 +3,7 @@
3
3
  "description": "Ape Bond SDK",
4
4
  "author": "Ape Bond",
5
5
  "license": "MIT",
6
- "version": "1.0.164",
6
+ "version": "1.0.166",
7
7
  "main": "dist/index.js",
8
8
  "module": "dist/index.es.js",
9
9
  "types": "dist/index.d.ts",
@@ -52,6 +52,7 @@
52
52
  "@ape.swap/sdk-core": "^1.0.2",
53
53
  "@emotion/react": "^11.11.4",
54
54
  "@emotion/styled": "^11.11.5",
55
+ "@reduxjs/toolkit": "^2.2.6",
55
56
  "@tanstack/react-query": "^5.51.5",
56
57
  "@types/node": "^20.14.10",
57
58
  "bignumber.js": "^9.1.2",