Migrate from 2.x to 3.x
Breaking changes
Removed methods:
- sdk.vault.getScorePercentiles
- sdk.osToken.getAvgRewardsPerSecond
- sdk.vault.getSnapshots ( Use getVaultStats instead )
- sdk.osToken.getConfig ( Use getVault instead to get the result in osTokenConfigfield )
getHarvestParams
New output format:
type Output = {
  canHarvest: boolean
  params: {
    reward: string
    proof: Array<string>
    rewardsRoot: string
    unlockedMevReward: string
  }
}
| Name | Description | 
|---|---|
| canHarvest | Defines whether the vault can harvest new rewards | 
| reward | The vault reward used to submit state update proof | 
| proof | The vault rewards root proof used to submit state update proof | 
| rewardsRoot | The vault rewards root | 
| unlockedMevReward | The vault unlocked MEV reward used to submit state update proof | 
getPosition
Removed minted fee field
type RemovedOutput = {
  minted: {
    fee: 'bigint'
  }
}
getStakeBalance
Removed output field
type RemovedOutput = {
  shares: 'bigint'
}
getUserRewards
Update output format:
type Output = Array<{
  date: number
  dailyRewards: number
  dailyRewardsEur: number
  dailyRewardsGbp: number
  dailyRewardsUsd: number
}>
New arguments:
| Name | Type | Type | Description | 
|---|---|---|---|
| dateFrom | number | Yes | Time to start in milliseconds | 
| dateTo | number | Yes | Time to end in milliseconds | 
| userAddress | string | Yes | The user address | 
| vaultAddress | string | Yes | The address of the vault | 
getExitQueuePositions
Changed output field
// Output changed type from bigint to string
`positions[number]['exitQueueIndex']`
operate
Removed input fields:
- depositDataRoot (Use setDepositDataRoot instead)
- depositDataManager (Use setDepositDataManager instead)
type RemovedInput = {
  depositDataManager: string
  depositDataRoot: string
}
Updates
getVault
New output field:
type AddedOutput = {
  osTokenConfig: {
    ltvPercent: string
    liqThresholdPercent: string
  }
  queuedShares: string
  allocatorMaxBoostApy: number
  isGenesis: boolean
}
| Name | Description | 
|---|---|
| osTokenConfig | contains the ltvPercent, which is the percentage used to calculate how much a user can mint in OsToken shares, andliqThresholdPercent, which is the liquidation threshold percentage used to calculate the health factor for the OsToken position | 
| isGenesis | This vault is owned by stakewise | 
| allocatorMaxBoostApy | The average max boost APY earned in this vault by the allocator | 
| queuedShares | The total number of queued shares | 
getExitQueuePositions
Added optional input field:
| Name | Type | Required | 
|---|---|---|
| isClaimed | boolean | No | 
New methods