@uniswap/token-list-bridge-utils 1.2.0 → 1.3.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/dist/constants/tokens.d.ts +2 -0
- package/dist/constants/types.d.ts +7 -0
- package/dist/fixtures/index.d.ts +10 -0
- package/dist/providers/BnbMappingProvider.d.ts +2 -2
- package/dist/providers/MappingProvider.d.ts +2 -2
- package/dist/token-list-bridge-utils.cjs.development.js +3445 -863
- package/dist/token-list-bridge-utils.cjs.development.js.map +1 -1
- package/dist/token-list-bridge-utils.cjs.production.min.js +1 -1
- package/dist/token-list-bridge-utils.cjs.production.min.js.map +1 -1
- package/dist/token-list-bridge-utils.esm.js +3445 -863
- package/dist/token-list-bridge-utils.esm.js.map +1 -1
- package/package.json +1 -1
- package/src/constants/tokens.ts +16 -0
- package/src/constants/types.ts +7 -0
- package/src/fixtures/index.ts +42 -0
- package/src/index.test.ts +18 -1
- package/src/local_mappings/bnb.json +3436 -857
- package/src/providers/BnbMappingProvider.ts +3 -3
- package/src/providers/MappingProvider.ts +6 -2
- package/src/providers/index.ts +20 -2
|
@@ -3,9 +3,16 @@ export interface PolygonMappedToken {
|
|
|
3
3
|
childToken: string;
|
|
4
4
|
isPos?: boolean;
|
|
5
5
|
}
|
|
6
|
+
export interface BnbMappedToken {
|
|
7
|
+
childToken: string;
|
|
8
|
+
decimals: number;
|
|
9
|
+
}
|
|
6
10
|
export declare type GenericMappedTokenData = {
|
|
7
11
|
[key: string]: string | undefined;
|
|
8
12
|
};
|
|
9
13
|
export declare type PolygonMappedTokenData = {
|
|
10
14
|
[key: string]: PolygonMappedToken;
|
|
11
15
|
};
|
|
16
|
+
export declare type BnbMappedTokenData = {
|
|
17
|
+
[key: string]: BnbMappedToken;
|
|
18
|
+
};
|
package/dist/fixtures/index.d.ts
CHANGED
|
@@ -2,6 +2,7 @@ import { TokenInfo, TokenList } from '@uniswap/token-lists';
|
|
|
2
2
|
import { ChainId } from '../constants/chainId';
|
|
3
3
|
export declare const Tokens: Partial<Record<ChainId, Record<string, TokenInfo>>>;
|
|
4
4
|
export declare const sampleL1TokenList: TokenList;
|
|
5
|
+
export declare const sampleL1TokenList_2: TokenList;
|
|
5
6
|
export declare const arbBridgeL2Address = "0x467194771dae2967aef3ecbedd3bf9a310c76c65";
|
|
6
7
|
export declare const arbBridgeL1Address = "0xd3b5b60020504bc3489d6949d545893982ba3011";
|
|
7
8
|
export declare const arbedSampleTokenList: {
|
|
@@ -31,6 +32,15 @@ export declare const bnbedSampleTokenList: {
|
|
|
31
32
|
tags?: import("@uniswap/token-lists").Tags | undefined;
|
|
32
33
|
logoURI?: string | undefined;
|
|
33
34
|
};
|
|
35
|
+
export declare const bnbedSampleTokenList_2: {
|
|
36
|
+
name: string;
|
|
37
|
+
tokens: TokenInfo[];
|
|
38
|
+
timestamp: string;
|
|
39
|
+
version: import("@uniswap/token-lists").Version;
|
|
40
|
+
keywords?: string[] | undefined;
|
|
41
|
+
tags?: import("@uniswap/token-lists").Tags | undefined;
|
|
42
|
+
logoURI?: string | undefined;
|
|
43
|
+
};
|
|
34
44
|
export declare const optimizedSampleTokenList: {
|
|
35
45
|
name: string;
|
|
36
46
|
tokens: TokenInfo[];
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { MappingProvider } from './MappingProvider';
|
|
2
|
-
import {
|
|
2
|
+
import { BnbMappedTokenData } from '../constants/types';
|
|
3
3
|
export declare class BnbMappingProvider implements MappingProvider {
|
|
4
|
-
provide(): Promise<
|
|
4
|
+
provide(): Promise<BnbMappedTokenData>;
|
|
5
5
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { GenericMappedTokenData, PolygonMappedTokenData } from '../constants/types';
|
|
1
|
+
import { BnbMappedTokenData, GenericMappedTokenData, PolygonMappedTokenData } from '../constants/types';
|
|
2
2
|
export interface MappingProvider {
|
|
3
|
-
provide(): Promise<PolygonMappedTokenData | GenericMappedTokenData>;
|
|
3
|
+
provide(): Promise<PolygonMappedTokenData | GenericMappedTokenData | BnbMappedTokenData>;
|
|
4
4
|
}
|