@metamask-institutional/defi-adapters / adapter
- GetPositionsInput
- GetPricePerShareInput
- GetTotalValueLockedInput
- TokenBalance
- Underlying
- ProtocolPosition
- UnderlyingTokenRate
- ProtocolTokenUnderlyingRate
- MovementsByBlock
- ProtocolTokenApy
- ProtocolTokenApr
- UnderlyingTokenTvl
- ProtocolTokenTvl
- ProfitsWithRange
- UnderlyingProfitValues
- PositionProfits
- CalculationData
- ProtocolAdapterParams
- TokenType
- PositionType
- GetBalancesInput
- GetConversionRateInput
- GetApyInput
- GetAprInput
- GetEventsInput
- ProtocolDetails
Ƭ TokenType: typeof TokenType
[keyof typeof TokenType
]
Ƭ PositionType: typeof PositionType
[keyof typeof PositionType
]
Ƭ GetBalancesInput: GetPositionsInput
& { provider
: CustomJsonRpcProvider
; chainId
: Chain
; tokens
: Erc20Metadata
[] }
Ƭ GetConversionRateInput: Object
Name | Type | Description |
---|---|---|
blockNumber? |
number |
Optional override param |
protocolTokenAddress |
string |
Protocol token address (LP token address). |
Ƭ GetApyInput: Object
Name | Type | Description |
---|---|---|
blockNumber? |
number |
Optional override param |
protocolTokenAddress |
string |
Protocol token address (LP token address). |
Ƭ GetAprInput: Object
Name | Type | Description |
---|---|---|
blockNumber? |
number |
Optional override param |
protocolTokenAddress |
string |
Protocol token address (LP token address). |
Ƭ GetEventsInput: Object
Name | Type | Description |
---|---|---|
userAddress |
string |
User address we want to get events for |
protocolTokenAddress |
string |
Protocol token we want to check related events for |
fromBlock |
number |
Starting blocknumber to check from |
toBlock |
number |
End blocknumber we want to check to e.g. current blocknumber |
tokenId? |
string |
Used by NFT Defi Positions, e.g. uniswapV3 |
Ƭ ProtocolDetails: Object
Name | Type | Description |
---|---|---|
protocolId |
Protocol |
Unique protocol id |
chainId |
Chain |
Chain this adapter is for |
name |
string |
Name of protocol |
description |
string |
Description of protocol |
iconUrl |
string |
Protocol icon |
siteUrl |
string |
Protocol website |
positionType |
PositionType |
Type of position One adapter per type |
productId |
string |
Unique protocol-product name |
• Const
TokenType: Object
Name | Type |
---|---|
Protocol |
"protocol" |
Reward |
"claimable" |
Underlying |
"underlying" |
UnderlyingClaimable |
"underlying-claimable" |
Fiat |
"fiat" |
• Const
PositionType: Object
Name | Type | Description |
---|---|---|
Supply |
"supply" |
Liquidity position e.g. a dex pool |
Lend |
"lend" |
Providing liquidity to a lending and borrow protocol |
Borrow |
"borrow" |
Getting a loan from a lending and borrow protocol |
Staked |
"stake" |
Staking a token e.g. staking eth or staking an lp token |
Reward |
"reward" |
Claimable rewards, these type of positions will be merged with the equivalent lp position |
FiatPrices |
"fiat-prices" |
- |