Installation
To install Reflect Restaking SDK within your development environment, run the following command:Core
This SDK allows for permissionless restaking of assets in the RLP, a pool providing liquidity for Reflect Protocol’s risk management, rebalancing and internal swaps. The SDK exports one simple module calledRLP. This class exposes methods for restaking (and unstaking) assets from the RLP, as well as monitoring the pool’s health and managing individual positions.
Initialization
To initialize the Restaking SDK, simply use the constructor:initialize.ts
Monitoring
You can use various methods withget prefix to monitor the RLP state. To read the state of all lockups, use getLockups:
getLockups.ts
getLockupsByAsset to view all lockups, filtered by specific asset mint.
getLockupsByAsset.ts
getAssets allows you to fetch all assets whitelisted in the RLP and their stats.
getAssets.ts
getDeposits and getDepositsByUser allows you to fetch individual deposits, and filter them by specific user public key.
getDeposits.ts
getCooldowns, getCooldownsByDeposit, getCooldownsByUser to fetch them with specific filters.
getCooldowns.ts
PDAs
TheRestaking class exposes multiple methods starting with derive prefix, allowing to derive different PDAs used within Reflect restaking program.
derivePdas.ts
Restaking
The SDK exposes two methods for managing assets within the RLP - restake() and withdraw(). To use them, first initialize the RLP using the script above. Then, use the following snippet:
restake.ts
Start earning, claim appreciation with TypeScript
These features are not yet available until Reflect.Money is out of public-beta. Thank you for your patience. We will announce these features through X.com/ReflectMoney