@pancakeswap/token-lists 0.0.13 → 0.0.15

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.
@@ -1,5 +1,5 @@
1
1
 
2
- > @pancakeswap/token-lists@0.0.13 build /home/runner/work/pancake-frontend/pancake-frontend/packages/token-lists
2
+ > @pancakeswap/token-lists@0.0.15 build /home/runner/work/pancake-frontend/pancake-frontend/packages/token-lists
3
3
  > tsup
4
4
 
5
5
  CLI Building entry: {"index":"./src/index.ts","react":"./react/index.ts"}
@@ -9,21 +9,16 @@ CLI Using tsup config: /home/runner/work/pancake-frontend/pancake-frontend/packa
9
9
  CLI Target: es6
10
10
  ESM Build start
11
11
  CJS Build start
12
- Entry module "dist/getTokenList-A3DXVBCD.js" is using named and default exports together. Consumers of your bundle will have to use `chunk.default` to access the default export, which may not be what you want. Use `output.exports: "named"` to disable this warning.
13
- CJS dist/chunk-4TPCCB4K.js 1.49 KB
14
- CJS dist/index.js 815.00 B
15
- CJS dist/chunk-OGWZ2K32.js 2.83 KB
16
- CJS dist/getTokenList-A3DXVBCD.js 14.38 KB
17
- CJS dist/react.js 9.13 KB
18
- CJS ⚡️ Build success in 868ms
19
- ESM dist/chunk-2L3ZO4UM.mjs 1.42 KB
20
- ESM dist/index.mjs 160.00 B
21
- ESM dist/chunk-COROHIJN.mjs 2.67 KB
22
- ESM dist/getTokenList-PEH2JP67.mjs 14.03 KB
23
- ESM dist/react.mjs 8.43 KB
24
- ESM ⚡️ Build success in 872ms
12
+ CJS dist/index.js 783.00 B
13
+ CJS dist/chunk-YOAEDKQH.js 4.28 KB
14
+ CJS dist/react.js 22.13 KB
15
+ CJS ⚡️ Build success in 984ms
16
+ ESM dist/index.mjs 129.00 B
17
+ ESM dist/chunk-DC45HQOL.mjs 4.05 KB
18
+ ESM dist/react.mjs 21.36 KB
19
+ ESM ⚡️ Build success in 984ms
25
20
  DTS Build start
26
- DTS ⚡️ Build success in 9684ms
21
+ DTS ⚡️ Build success in 11130ms
27
22
  DTS dist/index.d.ts 1.68 KB
28
- DTS dist/react.d.ts 2.52 KB
23
+ DTS dist/react.d.ts 2.71 KB
29
24
  DTS dist/types-d6730d17.d.ts 1.03 KB
package/CHANGELOG.md CHANGED
@@ -1,5 +1,20 @@
1
1
  # @pancakeswap/token-lists
2
2
 
3
+ ## 0.0.15
4
+
5
+ ### Patch Changes
6
+
7
+ - Updated dependencies [cb44715]
8
+ - @pancakeswap/swap-sdk-core@1.4.0
9
+
10
+ ## 0.0.14
11
+
12
+ ### Patch Changes
13
+
14
+ - Updated dependencies [176eb10]
15
+ - Updated dependencies [176eb10]
16
+ - @pancakeswap/swap-sdk-core@1.3.0
17
+
3
18
  ## 0.0.13
4
19
 
5
20
  ### Patch Changes
@@ -1,6 +1,44 @@
1
1
  import { Token } from '@pancakeswap/swap-sdk-core';
2
2
 
3
- // src/wrappedTokenInfo.ts
3
+ var __defProp = Object.defineProperty;
4
+ var __defProps = Object.defineProperties;
5
+ var __getOwnPropDescs = Object.getOwnPropertyDescriptors;
6
+ var __getOwnPropSymbols = Object.getOwnPropertySymbols;
7
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
8
+ var __propIsEnum = Object.prototype.propertyIsEnumerable;
9
+ var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
10
+ var __spreadValues = (a, b) => {
11
+ for (var prop in b || (b = {}))
12
+ if (__hasOwnProp.call(b, prop))
13
+ __defNormalProp(a, prop, b[prop]);
14
+ if (__getOwnPropSymbols)
15
+ for (var prop of __getOwnPropSymbols(b)) {
16
+ if (__propIsEnum.call(b, prop))
17
+ __defNormalProp(a, prop, b[prop]);
18
+ }
19
+ return a;
20
+ };
21
+ var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
22
+ var __async = (__this, __arguments, generator) => {
23
+ return new Promise((resolve, reject) => {
24
+ var fulfilled = (value) => {
25
+ try {
26
+ step(generator.next(value));
27
+ } catch (e) {
28
+ reject(e);
29
+ }
30
+ };
31
+ var rejected = (value) => {
32
+ try {
33
+ step(generator.throw(value));
34
+ } catch (e) {
35
+ reject(e);
36
+ }
37
+ };
38
+ var step = (x) => x.done ? resolve(x.value) : Promise.resolve(x.value).then(fulfilled, rejected);
39
+ step((generator = generator.apply(__this, __arguments)).next());
40
+ });
41
+ };
4
42
  var WrappedTokenInfo = class extends Token {
5
43
  constructor(tokenInfo) {
6
44
  super(tokenInfo.chainId, tokenInfo.address, tokenInfo.decimals, tokenInfo.symbol, tokenInfo.name);
@@ -83,4 +121,4 @@ function createFilterToken(search, isAddress) {
83
121
  };
84
122
  }
85
123
 
86
- export { VersionUpgrade, WrappedTokenInfo, createFilterToken, deserializeToken, getVersionUpgrade };
124
+ export { VersionUpgrade, WrappedTokenInfo, __async, __spreadProps, __spreadValues, createFilterToken, deserializeToken, getVersionUpgrade };
@@ -2,7 +2,45 @@
2
2
 
3
3
  var swapSdkCore = require('@pancakeswap/swap-sdk-core');
4
4
 
5
- // src/wrappedTokenInfo.ts
5
+ var __defProp = Object.defineProperty;
6
+ var __defProps = Object.defineProperties;
7
+ var __getOwnPropDescs = Object.getOwnPropertyDescriptors;
8
+ var __getOwnPropSymbols = Object.getOwnPropertySymbols;
9
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
10
+ var __propIsEnum = Object.prototype.propertyIsEnumerable;
11
+ var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
12
+ var __spreadValues = (a, b) => {
13
+ for (var prop in b || (b = {}))
14
+ if (__hasOwnProp.call(b, prop))
15
+ __defNormalProp(a, prop, b[prop]);
16
+ if (__getOwnPropSymbols)
17
+ for (var prop of __getOwnPropSymbols(b)) {
18
+ if (__propIsEnum.call(b, prop))
19
+ __defNormalProp(a, prop, b[prop]);
20
+ }
21
+ return a;
22
+ };
23
+ var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
24
+ var __async = (__this, __arguments, generator) => {
25
+ return new Promise((resolve, reject) => {
26
+ var fulfilled = (value) => {
27
+ try {
28
+ step(generator.next(value));
29
+ } catch (e) {
30
+ reject(e);
31
+ }
32
+ };
33
+ var rejected = (value) => {
34
+ try {
35
+ step(generator.throw(value));
36
+ } catch (e) {
37
+ reject(e);
38
+ }
39
+ };
40
+ var step = (x) => x.done ? resolve(x.value) : Promise.resolve(x.value).then(fulfilled, rejected);
41
+ step((generator = generator.apply(__this, __arguments)).next());
42
+ });
43
+ };
6
44
  var WrappedTokenInfo = class extends swapSdkCore.Token {
7
45
  constructor(tokenInfo) {
8
46
  super(tokenInfo.chainId, tokenInfo.address, tokenInfo.decimals, tokenInfo.symbol, tokenInfo.name);
@@ -87,6 +125,9 @@ function createFilterToken(search, isAddress) {
87
125
 
88
126
  exports.VersionUpgrade = VersionUpgrade;
89
127
  exports.WrappedTokenInfo = WrappedTokenInfo;
128
+ exports.__async = __async;
129
+ exports.__spreadProps = __spreadProps;
130
+ exports.__spreadValues = __spreadValues;
90
131
  exports.createFilterToken = createFilterToken;
91
132
  exports.deserializeToken = deserializeToken;
92
133
  exports.getVersionUpgrade = getVersionUpgrade;
package/dist/index.js CHANGED
@@ -1,27 +1,26 @@
1
1
  'use strict';
2
2
 
3
- var chunkOGWZ2K32_js = require('./chunk-OGWZ2K32.js');
4
- require('./chunk-4TPCCB4K.js');
3
+ var chunkYOAEDKQH_js = require('./chunk-YOAEDKQH.js');
5
4
 
6
5
 
7
6
 
8
7
  Object.defineProperty(exports, 'VersionUpgrade', {
9
8
  enumerable: true,
10
- get: function () { return chunkOGWZ2K32_js.VersionUpgrade; }
9
+ get: function () { return chunkYOAEDKQH_js.VersionUpgrade; }
11
10
  });
12
11
  Object.defineProperty(exports, 'WrappedTokenInfo', {
13
12
  enumerable: true,
14
- get: function () { return chunkOGWZ2K32_js.WrappedTokenInfo; }
13
+ get: function () { return chunkYOAEDKQH_js.WrappedTokenInfo; }
15
14
  });
16
15
  Object.defineProperty(exports, 'createFilterToken', {
17
16
  enumerable: true,
18
- get: function () { return chunkOGWZ2K32_js.createFilterToken; }
17
+ get: function () { return chunkYOAEDKQH_js.createFilterToken; }
19
18
  });
20
19
  Object.defineProperty(exports, 'deserializeToken', {
21
20
  enumerable: true,
22
- get: function () { return chunkOGWZ2K32_js.deserializeToken; }
21
+ get: function () { return chunkYOAEDKQH_js.deserializeToken; }
23
22
  });
24
23
  Object.defineProperty(exports, 'getVersionUpgrade', {
25
24
  enumerable: true,
26
- get: function () { return chunkOGWZ2K32_js.getVersionUpgrade; }
25
+ get: function () { return chunkYOAEDKQH_js.getVersionUpgrade; }
27
26
  });
package/dist/index.mjs CHANGED
@@ -1,2 +1 @@
1
- export { VersionUpgrade, WrappedTokenInfo, createFilterToken, deserializeToken, getVersionUpgrade } from './chunk-COROHIJN.mjs';
2
- import './chunk-2L3ZO4UM.mjs';
1
+ export { VersionUpgrade, WrappedTokenInfo, createFilterToken, deserializeToken, getVersionUpgrade } from './chunk-DC45HQOL.mjs';
package/dist/react.d.ts CHANGED
@@ -1,24 +1,8 @@
1
- import * as _reduxjs_toolkit_dist_createReducer from '@reduxjs/toolkit/dist/createReducer';
2
- import { a as TokenList, V as Version } from './types-d6730d17.js';
3
1
  import * as _reduxjs_toolkit from '@reduxjs/toolkit';
4
2
  import { ActionCreatorWithPayload } from '@reduxjs/toolkit';
3
+ import { a as TokenList, V as Version } from './types-d6730d17.js';
5
4
  import * as jotai from 'jotai';
6
-
7
- interface ListsState {
8
- readonly byUrl: {
9
- readonly [url: string]: {
10
- readonly current: TokenList | null;
11
- readonly pendingUpdate: TokenList | null;
12
- readonly loadingRequestId: string | null;
13
- readonly error: string | null;
14
- };
15
- };
16
- readonly lastInitializedDefaultListOfLists?: string[];
17
- readonly activeListUrls: string[] | undefined;
18
- }
19
- type ListByUrlState = ListsState['byUrl'][string];
20
- declare const NEW_LIST_STATE: ListByUrlState;
21
- declare const createTokenListReducer: (initialState: ListsState, DEFAULT_LIST_OF_LISTS: string[], DEFAULT_ACTIVE_LIST_URLS: string[]) => _reduxjs_toolkit_dist_createReducer.ReducerWithInitialState<ListsState>;
5
+ import * as _reduxjs_toolkit_dist_createReducer from '@reduxjs/toolkit/dist/createReducer';
22
6
 
23
7
  declare const fetchTokenList: Readonly<{
24
8
  pending: ActionCreatorWithPayload<{
@@ -44,6 +28,28 @@ declare const acceptListUpdate: ActionCreatorWithPayload<string, string>;
44
28
  declare const rejectVersionUpdate: ActionCreatorWithPayload<Version, string>;
45
29
  declare const updateListVersion: _reduxjs_toolkit.ActionCreatorWithoutPayload<"lists/updateListVersion">;
46
30
 
31
+ /**
32
+ * Contains the logic for resolving a list URL to a validated token list
33
+ * @param listUrl list url
34
+ */
35
+ declare function getTokenList(listUrl: string): Promise<TokenList>;
36
+
37
+ interface ListsState {
38
+ readonly byUrl: {
39
+ readonly [url: string]: {
40
+ readonly current: TokenList | null;
41
+ readonly pendingUpdate: TokenList | null;
42
+ readonly loadingRequestId: string | null;
43
+ readonly error: string | null;
44
+ };
45
+ };
46
+ readonly lastInitializedDefaultListOfLists?: string[];
47
+ readonly activeListUrls: string[] | undefined;
48
+ }
49
+ type ListByUrlState = ListsState['byUrl'][string];
50
+ declare const NEW_LIST_STATE: ListByUrlState;
51
+ declare const createTokenListReducer: (initialState: ListsState, DEFAULT_LIST_OF_LISTS: string[], DEFAULT_ACTIVE_LIST_URLS: string[]) => _reduxjs_toolkit_dist_createReducer.ReducerWithInitialState<ListsState>;
52
+
47
53
  declare const createListsAtom: (storeName: string, reducer: any, initialState: any) => {
48
54
  listsAtom: jotai.WritableAtom<ListsState, any, void>;
49
55
  useListStateReady: () => boolean;
@@ -52,4 +58,4 @@ declare const createListsAtom: (storeName: string, reducer: any, initialState: a
52
58
 
53
59
  declare function useFetchListCallback(dispatch: (action?: unknown) => void): (listUrl: string, sendDispatch?: boolean) => Promise<TokenList>;
54
60
 
55
- export { ListByUrlState, ListsState, NEW_LIST_STATE, acceptListUpdate, addList, createListsAtom, createTokenListReducer, disableList, enableList, fetchTokenList, rejectVersionUpdate, removeList, updateListVersion, useFetchListCallback };
61
+ export { ListByUrlState, ListsState, NEW_LIST_STATE, acceptListUpdate, addList, createListsAtom, createTokenListReducer, disableList, enableList, fetchTokenList, getTokenList, rejectVersionUpdate, removeList, updateListVersion, useFetchListCallback };