@pancakeswap/token-lists 0.0.14 → 0.0.16

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/dist/react.mjs CHANGED
@@ -1,8 +1,7 @@
1
- import { getVersionUpgrade } from './chunk-COROHIJN.mjs';
2
- import { __spreadProps, __spreadValues, __async } from './chunk-2L3ZO4UM.mjs';
3
- import { createAction, createReducer, nanoid } from '@reduxjs/toolkit';
1
+ import { __async, __spreadProps, __spreadValues, getVersionUpgrade } from './chunk-DC45HQOL.mjs';
2
+ import { createAction, nanoid, createReducer } from '@reduxjs/toolkit';
4
3
  import { atom, useAtom, useAtomValue } from 'jotai';
5
- import { atomWithStorage, loadable } from 'jotai/utils';
4
+ import { atomWithStorage, loadable, atomFamily } from 'jotai/utils';
6
5
  import localForage from 'localforage';
7
6
  import { useCallback } from 'react';
8
7
 
@@ -19,7 +18,560 @@ var acceptListUpdate = createAction("lists/acceptListUpdate");
19
18
  var rejectVersionUpdate = createAction("lists/rejectVersionUpdate");
20
19
  var updateListVersion = createAction("lists/updateListVersion");
21
20
 
22
- // react/reducer.ts
21
+ // ../utils/uriToHttp.ts
22
+ function uriToHttp(uri) {
23
+ var _a, _b;
24
+ const protocol = uri.split(":")[0].toLowerCase();
25
+ switch (protocol) {
26
+ case "https":
27
+ return [uri];
28
+ case "http":
29
+ return [`https${uri.substring(4)}`, uri];
30
+ case "ipfs":
31
+ const hash = (_a = uri.match(/^ipfs:(\/\/)?(.*)$/i)) == null ? void 0 : _a[2];
32
+ return [`https://cloudflare-ipfs.com/ipfs/${hash}/`, `https://ipfs.io/ipfs/${hash}/`];
33
+ case "ipns":
34
+ const name = (_b = uri.match(/^ipns:(\/\/)?(.*)$/i)) == null ? void 0 : _b[2];
35
+ return [`https://cloudflare-ipfs.com/ipns/${name}/`, `https://ipfs.io/ipns/${name}/`];
36
+ default:
37
+ return [];
38
+ }
39
+ }
40
+
41
+ // schema/pancakeswap.json
42
+ var pancakeswap_default = {
43
+ $schema: "http://json-schema.org/draft-07/schema#",
44
+ $id: "pancakeswap",
45
+ title: "PancakeSwap Token List",
46
+ description: "Schema for lists of tokens compatible with the PancakeSwap Interface, including Uniswap standard and PancakeSwap Aptos",
47
+ definitions: {
48
+ Version: {
49
+ type: "object",
50
+ description: "The version of the list, used in change detection",
51
+ examples: [
52
+ {
53
+ major: 1,
54
+ minor: 0,
55
+ patch: 0
56
+ }
57
+ ],
58
+ additionalProperties: false,
59
+ properties: {
60
+ major: {
61
+ type: "integer",
62
+ description: "The major version of the list. Must be incremented when tokens are removed from the list or token addresses are changed.",
63
+ minimum: 0,
64
+ examples: [1, 2]
65
+ },
66
+ minor: {
67
+ type: "integer",
68
+ description: "The minor version of the list. Must be incremented when tokens are added to the list.",
69
+ minimum: 0,
70
+ examples: [0, 1]
71
+ },
72
+ patch: {
73
+ type: "integer",
74
+ description: "The patch version of the list. Must be incremented for any changes to the list.",
75
+ minimum: 0,
76
+ examples: [0, 1]
77
+ }
78
+ },
79
+ required: ["major", "minor", "patch"]
80
+ },
81
+ TagIdentifier: {
82
+ type: "string",
83
+ description: "The unique identifier of a tag",
84
+ minLength: 1,
85
+ maxLength: 10,
86
+ pattern: "^[\\w]+$",
87
+ examples: ["compound", "stablecoin"]
88
+ },
89
+ ExtensionIdentifier: {
90
+ type: "string",
91
+ description: "The name of a token extension property",
92
+ minLength: 1,
93
+ maxLength: 40,
94
+ pattern: "^[\\w]+$",
95
+ examples: ["color", "is_fee_on_transfer", "aliases"]
96
+ },
97
+ ExtensionMap: {
98
+ type: "object",
99
+ description: "An object containing any arbitrary or vendor-specific token metadata",
100
+ maxProperties: 10,
101
+ propertyNames: {
102
+ $ref: "#/definitions/ExtensionIdentifier"
103
+ },
104
+ additionalProperties: {
105
+ $ref: "#/definitions/ExtensionValue"
106
+ },
107
+ examples: [
108
+ {
109
+ color: "#000000",
110
+ is_verified_by_me: true
111
+ },
112
+ {
113
+ "x-bridged-addresses-by-chain": {
114
+ "1": {
115
+ bridgeAddress: "0x4200000000000000000000000000000000000010",
116
+ tokenAddress: "0x4200000000000000000000000000000000000010"
117
+ }
118
+ }
119
+ }
120
+ ]
121
+ },
122
+ ExtensionPrimitiveValue: {
123
+ anyOf: [
124
+ {
125
+ type: "string",
126
+ minLength: 1,
127
+ maxLength: 42,
128
+ examples: ["#00000"]
129
+ },
130
+ {
131
+ type: "boolean",
132
+ examples: [true]
133
+ },
134
+ {
135
+ type: "number",
136
+ examples: [15]
137
+ },
138
+ {
139
+ type: "null"
140
+ }
141
+ ]
142
+ },
143
+ ExtensionValue: {
144
+ anyOf: [
145
+ {
146
+ $ref: "#/definitions/ExtensionPrimitiveValue"
147
+ },
148
+ {
149
+ type: "object",
150
+ maxProperties: 10,
151
+ propertyNames: {
152
+ $ref: "#/definitions/ExtensionIdentifier"
153
+ },
154
+ additionalProperties: {
155
+ $ref: "#/definitions/ExtensionValueInner0"
156
+ }
157
+ }
158
+ ]
159
+ },
160
+ ExtensionValueInner0: {
161
+ anyOf: [
162
+ {
163
+ $ref: "#/definitions/ExtensionPrimitiveValue"
164
+ },
165
+ {
166
+ type: "object",
167
+ maxProperties: 10,
168
+ propertyNames: {
169
+ $ref: "#/definitions/ExtensionIdentifier"
170
+ },
171
+ additionalProperties: {
172
+ $ref: "#/definitions/ExtensionValueInner1"
173
+ }
174
+ }
175
+ ]
176
+ },
177
+ ExtensionValueInner1: {
178
+ anyOf: [
179
+ {
180
+ $ref: "#/definitions/ExtensionPrimitiveValue"
181
+ }
182
+ ]
183
+ },
184
+ TagDefinition: {
185
+ type: "object",
186
+ description: "Definition of a tag that can be associated with a token via its identifier",
187
+ additionalProperties: false,
188
+ properties: {
189
+ name: {
190
+ type: "string",
191
+ description: "The name of the tag",
192
+ pattern: "^[ \\w]+$",
193
+ minLength: 1,
194
+ maxLength: 20
195
+ },
196
+ description: {
197
+ type: "string",
198
+ description: "A user-friendly description of the tag",
199
+ pattern: "^[ \\w\\.,:]+$",
200
+ minLength: 1,
201
+ maxLength: 200
202
+ }
203
+ },
204
+ required: ["name", "description"],
205
+ examples: [
206
+ {
207
+ name: "Stablecoin",
208
+ description: "A token with value pegged to another asset"
209
+ }
210
+ ]
211
+ },
212
+ TokenInfo: {
213
+ type: "object",
214
+ description: "Metadata for a single token in a token list",
215
+ additionalProperties: false,
216
+ properties: {
217
+ chainId: {
218
+ type: "integer",
219
+ description: "The chain ID of the Ethereum network where this token is deployed",
220
+ minimum: 1,
221
+ examples: [1, 42]
222
+ },
223
+ address: {
224
+ type: "string",
225
+ description: "The checksummed address of the token on the specified chain ID",
226
+ pattern: "^0x[a-fA-F0-9]{40}$",
227
+ examples: ["0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48"]
228
+ },
229
+ decimals: {
230
+ type: "integer",
231
+ description: "The number of decimals for the token balance",
232
+ minimum: 0,
233
+ maximum: 255,
234
+ examples: [18]
235
+ },
236
+ name: {
237
+ type: "string",
238
+ description: "The name of the token",
239
+ minLength: 1,
240
+ maxLength: 40,
241
+ pattern: "^[ \\w.'+\\-%/\xC0-\xD6\xD8-\xF6\xF8-\xFF:&\\[\\]\\(\\)]+$",
242
+ examples: ["USD Coin"]
243
+ },
244
+ symbol: {
245
+ type: "string",
246
+ description: "The symbol for the token; must be alphanumeric",
247
+ pattern: "^[a-zA-Z0-9+\\-%/$.\\s]+$",
248
+ minLength: 1,
249
+ maxLength: 20,
250
+ examples: ["USDC"]
251
+ },
252
+ logoURI: {
253
+ type: "string",
254
+ description: "A URI to the token logo asset; if not set, interface will attempt to find a logo based on the token address; suggest SVG or PNG of size 64x64",
255
+ format: "uri",
256
+ examples: ["ipfs://QmXfzKRvjZz3u5JRgC4v5mGVbm9ahrUiB4DgzHBsnWbTMM"]
257
+ },
258
+ tags: {
259
+ type: "array",
260
+ description: "An array of tag identifiers associated with the token; tags are defined at the list level",
261
+ items: {
262
+ $ref: "#/definitions/TagIdentifier"
263
+ },
264
+ maxItems: 10,
265
+ examples: ["stablecoin", "compound"]
266
+ },
267
+ extensions: {
268
+ $ref: "#/definitions/ExtensionMap"
269
+ }
270
+ },
271
+ required: ["chainId", "address", "decimals", "name", "symbol"]
272
+ },
273
+ AptosTokenInfo: {
274
+ type: "object",
275
+ description: "Metadata for a single token in a token list",
276
+ additionalProperties: false,
277
+ properties: {
278
+ chainId: {
279
+ type: "integer",
280
+ description: "The chain ID of the Aptos network where this token is deployed, 0 is devent",
281
+ minimum: 0,
282
+ examples: [1, 42]
283
+ },
284
+ address: {
285
+ type: "string",
286
+ description: "The address of the coin on the specified chain ID",
287
+ examples: ["0x1::aptos_coin::AptosCoin"]
288
+ },
289
+ decimals: {
290
+ type: "integer",
291
+ description: "The number of decimals for the token balance",
292
+ minimum: 0,
293
+ maximum: 255,
294
+ examples: [18]
295
+ },
296
+ name: {
297
+ type: "string",
298
+ description: "The name of the token",
299
+ minLength: 1,
300
+ maxLength: 40,
301
+ pattern: "^[ \\w.'+\\-%/\xC0-\xD6\xD8-\xF6\xF8-\xFF:&\\[\\]\\(\\)]+$",
302
+ examples: ["USD Coin"]
303
+ },
304
+ symbol: {
305
+ type: "string",
306
+ description: "The symbol for the token; must be alphanumeric",
307
+ pattern: "^[a-zA-Z0-9+\\-%/$.]+$",
308
+ minLength: 1,
309
+ maxLength: 20,
310
+ examples: ["USDC"]
311
+ },
312
+ logoURI: {
313
+ type: "string",
314
+ description: "A URI to the token logo asset; if not set, interface will attempt to find a logo based on the token address; suggest SVG or PNG of size 64x64",
315
+ format: "uri",
316
+ examples: ["ipfs://QmXfzKRvjZz3u5JRgC4v5mGVbm9ahrUiB4DgzHBsnWbTMM"]
317
+ },
318
+ tags: {
319
+ type: "array",
320
+ description: "An array of tag identifiers associated with the token; tags are defined at the list level",
321
+ items: {
322
+ $ref: "#/definitions/TagIdentifier"
323
+ },
324
+ maxItems: 10,
325
+ examples: ["stablecoin", "compound"]
326
+ },
327
+ extensions: {
328
+ $ref: "#/definitions/ExtensionMap"
329
+ }
330
+ },
331
+ required: ["chainId", "address", "decimals", "name", "symbol"]
332
+ }
333
+ },
334
+ type: "object",
335
+ additionalProperties: false,
336
+ properties: {
337
+ name: {
338
+ type: "string",
339
+ description: "The name of the token list",
340
+ minLength: 1,
341
+ maxLength: 30,
342
+ pattern: "^[\\w ]+$",
343
+ examples: ["My Token List"]
344
+ },
345
+ timestamp: {
346
+ type: "string",
347
+ format: "date-time",
348
+ description: "The timestamp of this list version; i.e. when this immutable version of the list was created"
349
+ },
350
+ schema: {
351
+ type: "string"
352
+ },
353
+ version: {
354
+ $ref: "#/definitions/Version"
355
+ },
356
+ tokens: {
357
+ type: "array",
358
+ description: "The list of tokens included in the list",
359
+ minItems: 1,
360
+ maxItems: 1e4
361
+ },
362
+ keywords: {
363
+ type: "array",
364
+ description: "Keywords associated with the contents of the list; may be used in list discoverability",
365
+ items: {
366
+ type: "string",
367
+ description: "A keyword to describe the contents of the list",
368
+ minLength: 1,
369
+ maxLength: 20,
370
+ pattern: "^[\\w ]+$",
371
+ examples: ["compound", "lending", "personal tokens"]
372
+ },
373
+ maxItems: 20,
374
+ uniqueItems: true
375
+ },
376
+ tags: {
377
+ type: "object",
378
+ description: "A mapping of tag identifiers to their name and description",
379
+ propertyNames: {
380
+ $ref: "#/definitions/TagIdentifier"
381
+ },
382
+ additionalProperties: {
383
+ $ref: "#/definitions/TagDefinition"
384
+ },
385
+ maxProperties: 20,
386
+ examples: [
387
+ {
388
+ stablecoin: {
389
+ name: "Stablecoin",
390
+ description: "A token with value pegged to another asset"
391
+ }
392
+ }
393
+ ]
394
+ },
395
+ logoURI: {
396
+ type: "string",
397
+ description: "A URI for the logo of the token list; prefer SVG or PNG of size 256x256",
398
+ format: "uri",
399
+ examples: ["ipfs://QmXfzKRvjZz3u5JRgC4v5mGVbm9ahrUiB4DgzHBsnWbTMM"]
400
+ }
401
+ },
402
+ if: {
403
+ properties: { schema: { const: "aptos" } },
404
+ required: ["name", "timestamp", "version", "tokens", "schema"]
405
+ },
406
+ then: {
407
+ properties: {
408
+ tokens: {
409
+ items: {
410
+ $ref: "#/definitions/AptosTokenInfo"
411
+ },
412
+ type: "array",
413
+ description: "The list of tokens included in the list",
414
+ minItems: 1,
415
+ maxItems: 1e4
416
+ }
417
+ }
418
+ },
419
+ else: {
420
+ properties: {
421
+ tokens: {
422
+ items: {
423
+ $ref: "#/definitions/TokenInfo"
424
+ },
425
+ type: "array",
426
+ description: "The list of tokens included in the list",
427
+ minItems: 1,
428
+ maxItems: 1e4
429
+ }
430
+ }
431
+ },
432
+ required: ["name", "timestamp", "version", "tokens"]
433
+ };
434
+
435
+ // react/getTokenList.ts
436
+ function getTokenList(listUrl) {
437
+ return __async(this, null, function* () {
438
+ const urls = uriToHttp(listUrl);
439
+ const { default: Ajv } = yield import('ajv');
440
+ const validator = new Ajv({ allErrors: true }).compile(pancakeswap_default);
441
+ for (const [i, url] of urls.entries()) {
442
+ try {
443
+ const json = yield fetchJson(url);
444
+ if (!validator(json)) {
445
+ const preFilterErrors = validator.errors;
446
+ json.tokens = json.tokens.filter((token) => validator(__spreadProps(__spreadValues({}, json), { tokens: [token] })));
447
+ if (!validator(json)) {
448
+ const errors = validator.errors;
449
+ throw new Error(`Validation failed after filtering: ${JSON.stringify(errors)}`);
450
+ }
451
+ console.warn(`Pre-filter validation errors: ${JSON.stringify(preFilterErrors)}`);
452
+ }
453
+ return json;
454
+ } catch (error) {
455
+ return void 0;
456
+ }
457
+ }
458
+ throw new Error("Unrecognized list URL protocol.");
459
+ });
460
+ }
461
+ function fetchJson(url) {
462
+ return __async(this, null, function* () {
463
+ const res = yield fetch(url);
464
+ if (!res.ok)
465
+ throw new Error(`Failed to fetch: ${url}`);
466
+ return res.json();
467
+ });
468
+ }
469
+ function noop() {
470
+ }
471
+ var noopStorage = {
472
+ getItem: () => Promise.resolve(noop()),
473
+ setItem: () => Promise.resolve(noop()),
474
+ removeItem: () => Promise.resolve(noop())
475
+ };
476
+ var EMPTY = Symbol();
477
+ function findTokenByAddress(state, chainId, address) {
478
+ var _a, _b;
479
+ const urls = (_a = state.activeListUrls) != null ? _a : Object.keys(state.byUrl);
480
+ for (const url of urls) {
481
+ const list = (_b = state.byUrl[url]) == null ? void 0 : _b.current;
482
+ const token = list == null ? void 0 : list.tokens.find((t) => t.chainId === chainId && t.address.toLowerCase() === address.toLowerCase());
483
+ if (token)
484
+ return token;
485
+ }
486
+ return void 0;
487
+ }
488
+ function findTokenBySymbol(state, chainId, symbol) {
489
+ var _a, _b;
490
+ const urls = (_a = state.activeListUrls) != null ? _a : Object.keys(state.byUrl);
491
+ for (const url of urls) {
492
+ const list = (_b = state.byUrl[url]) == null ? void 0 : _b.current;
493
+ const token = list == null ? void 0 : list.tokens.find((t) => t.chainId === chainId && t.symbol.toLowerCase() === symbol.toLowerCase());
494
+ if (token)
495
+ return token;
496
+ }
497
+ return void 0;
498
+ }
499
+ var createListsAtom = (storeName, reducer, initialState) => {
500
+ function IndexedDBStorage(dbName) {
501
+ if (typeof window !== "undefined") {
502
+ const db = localForage.createInstance({
503
+ name: dbName,
504
+ storeName
505
+ });
506
+ return {
507
+ getItem: (key) => __async(this, null, function* () {
508
+ const value = yield db.getItem(key);
509
+ if (value) {
510
+ return value;
511
+ }
512
+ return initialState;
513
+ }),
514
+ setItem: (k, v) => __async(this, null, function* () {
515
+ if (v === EMPTY)
516
+ return;
517
+ yield db.setItem(k, v);
518
+ }),
519
+ removeItem: db.removeItem
520
+ };
521
+ }
522
+ return noopStorage;
523
+ }
524
+ const listsStorageAtom = atomWithStorage("lists", EMPTY, IndexedDBStorage("lists"));
525
+ const defaultStateAtom = atom(
526
+ (get) => {
527
+ const value = get(loadable(listsStorageAtom));
528
+ if (value.state === "hasData" && value.data !== EMPTY) {
529
+ return value.data;
530
+ }
531
+ return initialState;
532
+ },
533
+ (get, set, action) => __async(void 0, null, function* () {
534
+ set(listsStorageAtom, reducer(yield get(defaultStateAtom), action));
535
+ })
536
+ );
537
+ const isReadyAtom = loadable(listsStorageAtom);
538
+ const tokenAtom = atomFamily(
539
+ (key) => atom((get) => findTokenByAddress(get(defaultStateAtom), key.chainId, key.address))
540
+ );
541
+ const tokenBySymbolAtom = atomFamily(
542
+ (key) => atom((get) => findTokenBySymbol(get(defaultStateAtom), key.chainId, key.symbol))
543
+ );
544
+ const fetchListAtom = atom(null, (get, set, url) => __async(void 0, null, function* () {
545
+ const state = get(defaultStateAtom);
546
+ const listState = state.byUrl[url];
547
+ if ((listState == null ? void 0 : listState.current) || (listState == null ? void 0 : listState.loadingRequestId)) {
548
+ return;
549
+ }
550
+ const requestId = nanoid();
551
+ set(defaultStateAtom, fetchTokenList.pending({ url, requestId }));
552
+ try {
553
+ const tokenList = yield getTokenList(url);
554
+ set(defaultStateAtom, fetchTokenList.fulfilled({ url, tokenList, requestId }));
555
+ } catch (error) {
556
+ set(defaultStateAtom, fetchTokenList.rejected({ url, requestId, errorMessage: error.message }));
557
+ }
558
+ }));
559
+ function useListState() {
560
+ return useAtom(defaultStateAtom);
561
+ }
562
+ function useListStateReady() {
563
+ const value = useAtomValue(isReadyAtom);
564
+ return value.state === "hasData" && value.data !== EMPTY;
565
+ }
566
+ return {
567
+ listsAtom: defaultStateAtom,
568
+ tokenAtom,
569
+ tokenBySymbolAtom,
570
+ fetchListAtom,
571
+ useListStateReady,
572
+ useListState
573
+ };
574
+ };
23
575
  var NEW_LIST_STATE = {
24
576
  error: null,
25
577
  current: null,
@@ -143,66 +695,6 @@ var createTokenListReducer = (initialState, DEFAULT_LIST_OF_LISTS, DEFAULT_ACTIV
143
695
  }
144
696
  })
145
697
  );
146
- function noop() {
147
- }
148
- var noopStorage = {
149
- getItem: () => Promise.resolve(noop()),
150
- setItem: () => Promise.resolve(noop()),
151
- removeItem: () => Promise.resolve(noop())
152
- };
153
- var EMPTY = Symbol();
154
- var createListsAtom = (storeName, reducer, initialState) => {
155
- function IndexedDBStorage(dbName) {
156
- if (typeof window !== "undefined") {
157
- const db = localForage.createInstance({
158
- name: dbName,
159
- storeName
160
- });
161
- return {
162
- getItem: (key) => __async(this, null, function* () {
163
- const value = yield db.getItem(key);
164
- if (value) {
165
- return value;
166
- }
167
- return initialState;
168
- }),
169
- setItem: (k, v) => __async(this, null, function* () {
170
- if (v === EMPTY)
171
- return;
172
- yield db.setItem(k, v);
173
- }),
174
- removeItem: db.removeItem
175
- };
176
- }
177
- return noopStorage;
178
- }
179
- const listsStorageAtom = atomWithStorage("lists", EMPTY, IndexedDBStorage("lists"));
180
- const defaultStateAtom = atom(
181
- (get) => {
182
- const value = get(loadable(listsStorageAtom));
183
- if (value.state === "hasData" && value.data !== EMPTY) {
184
- return value.data;
185
- }
186
- return initialState;
187
- },
188
- (get, set, action) => __async(void 0, null, function* () {
189
- set(listsStorageAtom, reducer(yield get(defaultStateAtom), action));
190
- })
191
- );
192
- const isReadyAtom = loadable(listsStorageAtom);
193
- function useListState() {
194
- return useAtom(defaultStateAtom);
195
- }
196
- function useListStateReady() {
197
- const value = useAtomValue(isReadyAtom);
198
- return value.state === "hasData" && value.data !== EMPTY;
199
- }
200
- return {
201
- listsAtom: defaultStateAtom,
202
- useListStateReady,
203
- useListState
204
- };
205
- };
206
698
  function useFetchListCallback(dispatch) {
207
699
  return useCallback(
208
700
  (listUrl, sendDispatch = true) => __async(this, null, function* () {
@@ -210,8 +702,10 @@ function useFetchListCallback(dispatch) {
210
702
  if (sendDispatch) {
211
703
  dispatch(fetchTokenList.pending({ requestId, url: listUrl }));
212
704
  }
213
- const getTokenList = (yield import('./getTokenList-PEH2JP67.mjs')).default;
214
705
  return getTokenList(listUrl).then((tokenList) => {
706
+ if (!tokenList) {
707
+ throw new Error("Token list not found");
708
+ }
215
709
  if (sendDispatch) {
216
710
  dispatch(fetchTokenList.fulfilled({ url: listUrl, tokenList, requestId }));
217
711
  }
@@ -229,4 +723,4 @@ function useFetchListCallback(dispatch) {
229
723
  }
230
724
  var useFetchListCallback_default = useFetchListCallback;
231
725
 
232
- export { NEW_LIST_STATE, acceptListUpdate, addList, createListsAtom, createTokenListReducer, disableList, enableList, fetchTokenList, rejectVersionUpdate, removeList, updateListVersion, useFetchListCallback_default as useFetchListCallback };
726
+ export { NEW_LIST_STATE, acceptListUpdate, addList, createListsAtom, createTokenListReducer, disableList, enableList, fetchTokenList, findTokenByAddress, findTokenBySymbol, getTokenList, rejectVersionUpdate, removeList, updateListVersion, useFetchListCallback_default as useFetchListCallback };
package/package.json CHANGED
@@ -1,28 +1,28 @@
1
1
  {
2
2
  "name": "@pancakeswap/token-lists",
3
- "version": "0.0.14",
3
+ "version": "0.0.16",
4
4
  "main": "./dist/index.js",
5
5
  "module": "./dist/index.mjs",
6
6
  "types": "./dist/index.d.ts",
7
7
  "dependencies": {
8
8
  "ajv": "^6.12.3",
9
9
  "lodash": "^4.17.21",
10
- "@pancakeswap/swap-sdk-core": "1.3.0"
10
+ "@pancakeswap/swap-sdk-core": "1.5.0"
11
11
  },
12
12
  "peerDependencies": {
13
13
  "@reduxjs/toolkit": "^1.9.1",
14
- "jotai": "^2.4.3",
14
+ "jotai": "2.12.5",
15
15
  "localforage": "^1.10.0",
16
16
  "react": "^18.2.0"
17
17
  },
18
18
  "devDependencies": {
19
19
  "@reduxjs/toolkit": "^1.9.1",
20
20
  "@types/react": "^18.2.21",
21
- "jotai": "^2.4.3",
21
+ "jotai": "2.12.5",
22
22
  "localforage": "^1.10.0",
23
23
  "react": "^18.2.0",
24
24
  "tsup": "^6.7.0",
25
- "@pancakeswap/utils": "6.0.9"
25
+ "@pancakeswap/utils": "8.0.0"
26
26
  },
27
27
  "exports": {
28
28
  ".": {