-
Notifications
You must be signed in to change notification settings - Fork 5
/
Copy pathindex.ts
155 lines (152 loc) · 6.04 KB
/
index.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
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
// Requests
import getVault from './requests/getVault'
import getUserApy from './requests/getUserApy'
import getWhitelist from './requests/getWhitelist'
import getBlocklist from './requests/getBlocklist'
import getUserStats from './requests/getUserStats'
import getVaultStats from './requests/getVaultStats'
import getValidators from './requests/getValidators'
import getUserRewards from './requests/getUserRewards'
import getMaxWithdraw from './requests/getMaxWithdraw'
import getStakeBalance from './requests/getStakeBalance'
import getHarvestParams from './requests/getHarvestParams'
import getStakerActions from './requests/getStakerActions'
import getRewardSplitters from './requests/getRewardSplitters'
import getExitQueuePositions from './requests/getExitQueuePositions'
import getPeriodicDistributions from './requests/getPeriodicDistributions'
// Transactions
import { default as create } from './transactions/create'
import { default as deposit } from './transactions/deposit'
import { default as operate } from './transactions/operate'
import { default as withdraw } from './transactions/withdraw'
import { default as claimExitQueue } from './transactions/claimExitQueue'
import { default as setDepositDataRoot } from './transactions/setDepositDataRoot'
import { default as setDepositDataManager } from './transactions/setDepositDataManager'
export default {
requests: {
/**
* @description Getting user's exit queue positions.
* @see https://sdk.stakewise.io/vault/requests/getexitqueuepositions
*/
getExitQueuePositions,
/**
* @description Fetch the list of created reward splitters. A reward splitter is a contract
* designed to distribute vault rewards among multiple fee recipients in predefined proportions.
* To use a reward splitter, its address should be added to the vault as a fee recipient.
* @see https://sdk.stakewise.io/vault/requests/getrewardsplitters
*/
getRewardSplitters,
/**
* @description Necessary to update the vault state.
* @see https://sdk.stakewise.io/vault/requests/getharvestparams
*/
getHarvestParams,
/**
* @description Get a list of interactions with the vault.
* @see https://sdk.stakewise.io/vault/requests/getstakeractions
*/
getStakerActions,
/**
* @description Getting user's balance in the vault.
* @see https://sdk.stakewise.io/vault/requests/getstakebalance
*/
getStakeBalance,
/**
* @description Daily rewards for the user who has made a deposit in the vault.
* @see https://sdk.stakewise.io/vault/requests/getuserrewards
*/
getUserRewards,
/**
* @description How much a user can withdraw. Use this method if the user has mintedAssets,
* if minted balance is null then maxWithdraw will be equal to stakedAssests.
* @see https://sdk.stakewise.io/vault/requests/getmaxwithdraw
*/
getMaxWithdraw,
/**
* @description Returns the running vault validators.
* @see https://sdk.stakewise.io/vault/requests/getvalidators
*/
getValidators,
/**
* @description Fetch the whitelist for private vaults. Only addresses included in
* this list are eligible to stake in the private vault. The number of addresses in
* this list is indicated by the vault whitelistCount field.
* @see https://sdk.stakewise.io/vault/requests/getwhitelist
*/
getWhitelist,
/**
* @description Fetch the blocklist for blocklisted vaults. Addresses included in
* this list are not eligible to stake in the blocklisted vault. The number of addresses
* in this list is indicated by the vault blocklistCount field.
* @see https://sdk.stakewise.io/vault/requests/getblocklist
*/
getBlocklist,
/**
* @description Returns the master data of the vault.
* @see https://sdk.stakewise.io/vault/requests/getvault
*/
getVault,
/**
* @description Returns the vault stats collection. With the help of this data it is possible to build a chart.
* @see https://sdk.stakewise.io/vault/requests/getvaultstats
*/
getVaultStats,
/**
* @description Returns the user stats collection for current vault.
* With the help of this data it is possible to build a chart.
* @see https://sdk.stakewise.io/vault/requests/getuserstats
*/
getUserStats,
/**
* @description Get the current APY of the user taking into account minting and boost.
* @see https://sdk.stakewise.io/vault/requests/getuserapy
*/
getUserApy,
/**
* @description Getting the periodic distribution of additional incentives.
* @see https://sdk.stakewise.io/vault/requests/getperiodicdistributions
*/
getPeriodicDistributions,
},
transactions: {
/**
* @description Deposit (stake) in a vault.
* @see https://sdk.stakewise.io/vault/transactions/deposit
*/
deposit,
/**
* @description Withdrawal of funds from a vault.
* @see https://sdk.stakewise.io/vault/transactions/withdraw
*/
withdraw,
/**
* @description Take the freed tokens from the queue.
* @see https://sdk.stakewise.io/vault/transactions/claimexitqueue
*/
claimExitQueue,
/**
* @description Updates the vault by authorized personnel such as the vault admin, whitelist manager,
* blocklist manager, validators manager, or deposit-data manager.
* @throws Fields depositDataRoot and depositDataManager supported only first version of vaults
* @see https://sdk.stakewise.io/vault/transactions/operate
*/
operate,
/**
* @description Create vault
* @see https://sdk.stakewise.io/vault/transactions/create
*/
create,
/**
* @description Adding root validators to vault
* @throws Supports only the second version of vault
* @see https://sdk.stakewise.io/vault/transactions/setdepositdataroot
*/
setDepositDataRoot,
/**
* @description Adding deposit data manager
* @throws Supports only the second version of vault
* @see https://sdk.stakewise.io/vault/transactions/setdepositdatamanager
*/
setDepositDataManager,
},
} as const