-
Notifications
You must be signed in to change notification settings - Fork 188
/
mito.ts
90 lines (78 loc) · 2.02 KB
/
mito.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
86
87
88
89
90
import { MitoApi } from '@injectivelabs/mito-proto-ts'
export interface MitoHolders {
holderAddress: string
vaultAddress: string
amount: string
updatedAt: string
lpAmountPercentage: number
redemptionLockTime: string
}
export interface MitoPriceSnapshot {
price: number
updatedAt: string
}
export interface MitoProfits {
allTimeChange: number
threeMonthsChange?: number
oneMonthChange?: number
oneDayChange?: number
oneWeekChange?: number
oneYearChange?: number
threeYearsChange?: number
sixMonthsChange?: number
}
export interface MitoDenomBalance {
denom: string
totalBalance: string
}
export interface MitoSubaccountBalance {
subaccountId: string
balancesList: MitoDenomBalance[]
}
export interface MitoVault {
contractAddress: string
codeId: string
vaultName: string
marketId: string
currentTvl: number
profits?: MitoProfits
updatedAt: string
vaultType: string
lpTokenPrice: number
subaccountInfo?: MitoSubaccountBalance
masterContractAddress: string
totalLpAmount: string
}
export interface MitoSubscription {
vaultInfo?: MitoVault
lpAmount: string
holderAddress: string
lpAmountPercentage: number
}
export interface MitoPagination {
total: Number
}
export interface MitoPortfolio {
totalValue: number
pnl: number
totalValueChartList: MitoPriceSnapshot[]
pnlChartList: MitoPriceSnapshot[]
}
export interface MitoLeaderboardEntry {
address: string
pnl: number
}
export interface MitoLeaderboard {
entriesList: MitoLeaderboardEntry[]
snapshotBlock: string
updatedAt: string
}
export type GrpcMitoVault = MitoApi.Vault
export type GrpcMitoProfits = MitoApi.Profits
export type GrpcMitoSubaccountBalance = MitoApi.SubaccountBalance
export type GrpcMitoDenomBalance = MitoApi.DenomBalance
export type GrpcMitoPagination = MitoApi.Pagination
export type GrpcMitoPriceSnapshot = MitoApi.PriceSnapshot
export type GrpcMitoSubscription = MitoApi.Subscription
export type GrpcMitoHolders = MitoApi.Holders
export type GrpcMitoLeaderboardEntry = MitoApi.LeaderboardEntry