@algofi/lend
Version:
The official JavaScript SDK for the Algofi Lending Protocol
81 lines (50 loc) • 2.57 kB
Markdown
Official Javscript SDK for the Algofi Lending Protocol
https://algofiorg.github.io/algofi-lend-js-sdk/
This SDK is useful for developers who want to programatically interact with the Algofi lending protocol.
This SDK is currently under active early development and should not be considered stable.
```
git clone git@github.com:Algofiorg/algofi-lend-js-sdk.git && cd algofi-lend-js-sdk
npm install
cd test && npm install && cd ..
```
To generate docs, cd into the root folder and run
```
npx typedoc algofi/index.ts
```
[](https://github.com/Algofiorg/algofi-lend-js-sdk/blob/master/algofi/examples/mint.ts)
This example shows how to add liquidity to the platform
[](https://github.com/Algofiorg/algofi-lend-js-sdk/blob/master/algofi/examples/burn.ts)
This example shows how to burn bank assets to redeem for underlying liquidity
[](https://github.com/Algofiorg/algofi-lend-js-sdk/blob/master/algofi/examples/addCollateral.ts)
This example shows how to add minted bank assets to collateral
[](https://github.com/Algofiorg/algofi-lend-js-sdk/blob/master/algofi/examples/mintToCollateral.ts)
This example shows how to add liquidity to the platform collateral
[](https://github.com/Algofiorg/algofi-lend-js-sdk/blob/master/algofi/examples/removeCollateral.ts)
This example shows how to remove bank asset collateral from platform
Example coming!
This example shows how to remove bank asset collateral from platform to underlying asset
[](https://github.com/Algofiorg/algofi-lend-js-sdk/blob/master/algofi/examples/borrow.ts)
This example shows how to borrow an underlying asset against provided collateral
[](https://github.com/Algofiorg/algofi-lend-js-sdk/blob/master/algofi/examples/repayBorrow.ts)
This example shows how to repay borrowed assets
Example coming!
This example shows how to stake and unstake in a staking contract
algofi-lend-js-sdk is licensed under a MIT license except for the exceptions listed below. See the LICENSE file for details.