-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathindex.d.ts
85 lines (74 loc) · 1.5 KB
/
index.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
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
declare module '*.png';
declare module '*.svg';
declare global {
interface Window {
ethereum: import('ethers').providers.ExternalProvider;
}
}
interface Window {
ethereum: any;
}
//tokenAcc is same as pubkey,
type NFT = {
id: string; //id will be name-tokenId
name: string;
symbol?: string;
image: string;
tokenId: string;
contractAddress: string;
};
type collateral = {
id: string; //id will be name-tokenId
name: string;
symbol?: string;
image: string; // we will use default image here
couponId: string;
tokenId: string;
ERC721ContractAddress: string;
ERC20ContractAddress: string;
HERC20ContractAddress: string;
loanAmount: number;
};
type coupon = {
NFTId: string;
borrowAmount: string;
active: boolean;
debtShares: string;
couponId: string;
};
type Unit = import('web3-utils').Unit;
type collection = {
name: string;
icon: string;
erc20Name: string;
erc20Icon: string;
unit: Unit;
ERC721ContractAddress: string;
ERC20ContractAddress: string;
HERC20ContractAddress: string;
formatDecimals: number;
};
type helperContract = {
htokenHelperContractAddress: string;
hivemindContractAddress: string;
oracleContractAddress: string;
marketContractAddress: string;
};
type asset = {
totalBorrow: string;
totalReserve: string;
totalDeposit: string;
numOfCoupons: number;
};
type loan = {
HERC20ContractAddress: string;
NFTId: string;
borrowAmount: string;
active: boolean;
couponId: string;
owner: string;
};
type nftPrice = {
HERC20ContractAddress: string;
price: number;
};