-
Notifications
You must be signed in to change notification settings - Fork 1k
/
Copy pathtypes.ts
48 lines (44 loc) · 1.04 KB
/
types.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
type ExtensionValue = string | number | boolean | null | undefined;
export interface TokenInfo {
readonly chainId: number;
readonly address: string;
readonly name: string;
readonly decimals: number;
readonly symbol: string;
readonly logoURI?: string;
readonly tags?: string[];
readonly extensions?: {
readonly [key: string]:
| {
[key: string]:
| {
[key: string]: ExtensionValue;
}
| ExtensionValue;
}
| ExtensionValue;
};
}
export interface Version {
readonly major: number;
readonly minor: number;
readonly patch: number;
}
export interface Tags {
readonly [tagId: string]: {
readonly name: string;
readonly description: string;
};
}
export interface TokenList {
readonly name: string;
readonly timestamp: string;
readonly version: Version;
readonly tokens: TokenInfo[];
readonly tokenMap?: {
readonly [key: string]: TokenInfo;
};
readonly keywords?: string[];
readonly tags?: Tags;
readonly logoURI?: string;
}