-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathtypes.d.ts
59 lines (46 loc) · 1.19 KB
/
types.d.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
49
50
51
52
53
54
55
56
57
58
declare module '@types' {
export type DataState = {
data?: any[];
status: 'loading' | 'success' | 'error';
};
export type ContractCallReturn = {
status?: 'success' | 'failure';
error?: undefined | Error;
result?: undefined | ContractCallParameter | ContractCallResult;
};
export type ContractCallParameter = unknown | number | string | bigint | boolean;
export type ContractCallResult = unknown | Array<ContractCallParameter>;
export type NetworkId = '0x1' | '0xa' | '0x64' | '0x2105' | '0x76adf1' | '0xa4b1' | '0x89';
export type Network = {
id: NetworkId;
logo: string;
title: string;
};
export type Token = {
id: string;
title: string:
logo: string;
chainId: string;
};
export type TokenBalance = {
value: bigint;
symbol: string;
decimals: number;
formatted: string;
}
export type TokenPair = {
version: '2' | '3';
address: string;
inverted: boolean;
};
export type CurrencyMap = {
[key: string]: {
[key: string]: boolean;
}
}
export type TokenPairKey = {
[key: NetworkId]: TokenPair;
}
export type TokenPairMap = {
[key: string]?: TokenPair | TokenPairKey;
}