@uniswap/token-list-bridge-utils 1.3.3 → 2.1.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/chainId.d.ts +3 -1
- package/dist/constants/tokens.d.ts +4 -0
- package/dist/constants/types.d.ts +3 -3
- package/dist/fixtures/index.d.ts +40 -0
- package/dist/providers/AvalancheMappingProvider.d.ts +5 -0
- package/dist/providers/BaseGoerliMappingProvider.d.ts +9 -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 +706 -12
- 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 +706 -12
- package/dist/token-list-bridge-utils.esm.js.map +1 -1
- package/package.json +3 -3
- package/src/constants/chainId.ts +4 -0
- package/src/constants/tokens.ts +32 -0
- package/src/constants/types.ts +2 -2
- package/src/fixtures/index.ts +82 -0
- package/src/index.test.ts +189 -0
- package/src/index.ts +11 -1
- package/src/local_mappings/avax.json +574 -0
- package/src/providers/AvalancheMappingProvider.ts +11 -0
- package/src/providers/BaseGoerliMappingProvider.ts +43 -0
- package/src/providers/BnbMappingProvider.ts +4 -4
- package/src/providers/MappingProvider.ts +2 -2
- package/src/providers/index.ts +21 -10
- package/src/utils.ts +4 -0
- package/src/.DS_Store +0 -0
- package/src/.env +0 -0
|
@@ -1,8 +1,12 @@
|
|
|
1
1
|
import { Token } from '@uniswap/sdk-core';
|
|
2
|
+
export declare const COINBASE_WRAPPED_STAKED_ETH: Token;
|
|
3
|
+
export declare const COINBASE_WRAPPED_STAKED_ETH_BASE_GOERLI: Token;
|
|
4
|
+
export declare const COINBASE_WRAPPED_STAKED_ETH_ARBITRUM_ONE: Token;
|
|
2
5
|
export declare const DAI: Token;
|
|
3
6
|
export declare const DAI_ARBITRUM_ONE: Token;
|
|
4
7
|
export declare const DAI_OPTIMISM: Token;
|
|
5
8
|
export declare const DAI_POLYGON: Token;
|
|
6
9
|
export declare const DAI_BNB: Token;
|
|
10
|
+
export declare const DAI_AVALANCHE: Token;
|
|
7
11
|
export declare const USDT: Token;
|
|
8
12
|
export declare const USDT_BNB: Token;
|
|
@@ -3,7 +3,7 @@ export interface PolygonMappedToken {
|
|
|
3
3
|
childToken: string;
|
|
4
4
|
isPos?: boolean;
|
|
5
5
|
}
|
|
6
|
-
export interface
|
|
6
|
+
export interface MappedToken {
|
|
7
7
|
childToken: string;
|
|
8
8
|
decimals: number;
|
|
9
9
|
}
|
|
@@ -13,6 +13,6 @@ export declare type GenericMappedTokenData = {
|
|
|
13
13
|
export declare type PolygonMappedTokenData = {
|
|
14
14
|
[key: string]: PolygonMappedToken;
|
|
15
15
|
};
|
|
16
|
-
export declare type
|
|
17
|
-
[key: string]:
|
|
16
|
+
export declare type MappedTokenData = {
|
|
17
|
+
[key: string]: MappedToken;
|
|
18
18
|
};
|
package/dist/fixtures/index.d.ts
CHANGED
|
@@ -3,6 +3,7 @@ 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
5
|
export declare const sampleL1TokenList_2: TokenList;
|
|
6
|
+
export declare const sampleL1TokenList_3: TokenList;
|
|
6
7
|
export declare const arbBridgeL2Address = "0x467194771dae2967aef3ecbedd3bf9a310c76c65";
|
|
7
8
|
export declare const arbBridgeL1Address = "0xd3b5b60020504bc3489d6949d545893982ba3011";
|
|
8
9
|
export declare const arbedSampleTokenList: {
|
|
@@ -10,6 +11,9 @@ export declare const arbedSampleTokenList: {
|
|
|
10
11
|
tokens: TokenInfo[];
|
|
11
12
|
timestamp: string;
|
|
12
13
|
version: import("@uniswap/token-lists").Version;
|
|
14
|
+
tokenMap?: {
|
|
15
|
+
readonly [key: string]: TokenInfo;
|
|
16
|
+
} | undefined;
|
|
13
17
|
keywords?: string[] | undefined;
|
|
14
18
|
tags?: import("@uniswap/token-lists").Tags | undefined;
|
|
15
19
|
logoURI?: string | undefined;
|
|
@@ -19,6 +23,21 @@ export declare const polygonedSampleTokenList: {
|
|
|
19
23
|
tokens: TokenInfo[];
|
|
20
24
|
timestamp: string;
|
|
21
25
|
version: import("@uniswap/token-lists").Version;
|
|
26
|
+
tokenMap?: {
|
|
27
|
+
readonly [key: string]: TokenInfo;
|
|
28
|
+
} | undefined;
|
|
29
|
+
keywords?: string[] | undefined;
|
|
30
|
+
tags?: import("@uniswap/token-lists").Tags | undefined;
|
|
31
|
+
logoURI?: string | undefined;
|
|
32
|
+
};
|
|
33
|
+
export declare const avalanchedSampleTokenList: {
|
|
34
|
+
name: string;
|
|
35
|
+
tokens: TokenInfo[];
|
|
36
|
+
timestamp: string;
|
|
37
|
+
version: import("@uniswap/token-lists").Version;
|
|
38
|
+
tokenMap?: {
|
|
39
|
+
readonly [key: string]: TokenInfo;
|
|
40
|
+
} | undefined;
|
|
22
41
|
keywords?: string[] | undefined;
|
|
23
42
|
tags?: import("@uniswap/token-lists").Tags | undefined;
|
|
24
43
|
logoURI?: string | undefined;
|
|
@@ -28,6 +47,9 @@ export declare const bnbedSampleTokenList: {
|
|
|
28
47
|
tokens: TokenInfo[];
|
|
29
48
|
timestamp: string;
|
|
30
49
|
version: import("@uniswap/token-lists").Version;
|
|
50
|
+
tokenMap?: {
|
|
51
|
+
readonly [key: string]: TokenInfo;
|
|
52
|
+
} | undefined;
|
|
31
53
|
keywords?: string[] | undefined;
|
|
32
54
|
tags?: import("@uniswap/token-lists").Tags | undefined;
|
|
33
55
|
logoURI?: string | undefined;
|
|
@@ -37,6 +59,21 @@ export declare const bnbedSampleTokenList_2: {
|
|
|
37
59
|
tokens: TokenInfo[];
|
|
38
60
|
timestamp: string;
|
|
39
61
|
version: import("@uniswap/token-lists").Version;
|
|
62
|
+
tokenMap?: {
|
|
63
|
+
readonly [key: string]: TokenInfo;
|
|
64
|
+
} | undefined;
|
|
65
|
+
keywords?: string[] | undefined;
|
|
66
|
+
tags?: import("@uniswap/token-lists").Tags | undefined;
|
|
67
|
+
logoURI?: string | undefined;
|
|
68
|
+
};
|
|
69
|
+
export declare const baseGoerliSampleTokenList_3: {
|
|
70
|
+
name: string;
|
|
71
|
+
tokens: TokenInfo[];
|
|
72
|
+
timestamp: string;
|
|
73
|
+
version: import("@uniswap/token-lists").Version;
|
|
74
|
+
tokenMap?: {
|
|
75
|
+
readonly [key: string]: TokenInfo;
|
|
76
|
+
} | undefined;
|
|
40
77
|
keywords?: string[] | undefined;
|
|
41
78
|
tags?: import("@uniswap/token-lists").Tags | undefined;
|
|
42
79
|
logoURI?: string | undefined;
|
|
@@ -46,6 +83,9 @@ export declare const optimizedSampleTokenList: {
|
|
|
46
83
|
tokens: TokenInfo[];
|
|
47
84
|
timestamp: string;
|
|
48
85
|
version: import("@uniswap/token-lists").Version;
|
|
86
|
+
tokenMap?: {
|
|
87
|
+
readonly [key: string]: TokenInfo;
|
|
88
|
+
} | undefined;
|
|
49
89
|
keywords?: string[] | undefined;
|
|
50
90
|
tags?: import("@uniswap/token-lists").Tags | undefined;
|
|
51
91
|
logoURI?: string | undefined;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { MappingProvider } from './MappingProvider';
|
|
2
|
+
import { GenericMappedTokenData } from '../constants/types';
|
|
3
|
+
/**
|
|
4
|
+
* The Base Goerli mapping (linked above) is manually maintained by the Coinbase team
|
|
5
|
+
* in this repository: https://github.com/ethereum-optimism/ethereum-optimism.github.io.
|
|
6
|
+
*/
|
|
7
|
+
export declare class BaseGoerliMappingProvider implements MappingProvider {
|
|
8
|
+
provide(): Promise<GenericMappedTokenData>;
|
|
9
|
+
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { MappingProvider } from './MappingProvider';
|
|
2
|
-
import {
|
|
2
|
+
import { MappedTokenData } from '../constants/types';
|
|
3
3
|
export declare class BnbMappingProvider implements MappingProvider {
|
|
4
|
-
provide(): Promise<
|
|
4
|
+
provide(): Promise<MappedTokenData>;
|
|
5
5
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { MappedTokenData, GenericMappedTokenData, PolygonMappedTokenData } from '../constants/types';
|
|
2
2
|
export interface MappingProvider {
|
|
3
|
-
provide(): Promise<PolygonMappedTokenData | GenericMappedTokenData |
|
|
3
|
+
provide(): Promise<PolygonMappedTokenData | GenericMappedTokenData | MappedTokenData>;
|
|
4
4
|
}
|