0.0.24 • Published 11 months ago

pendle-folk-sdk v0.0.24

Weekly downloads
-
License
ISC
Repository
github
Last release
11 months ago

pendle-folk-sdk

Table of contents

Market

import { Market } from "pendle-folk-sdk"
const market = new Market(url, chainId);

Information about markets in a chain

get information of markets

const marketInfo = await market.getMarketInfo(marketConfigList)

Params: EthAddress list of market
Return informations about total of pt, sy, lp, expiration date, fixed yield of all markets

Router

import { Router } from "pendle-folk-sdk"
const router = new Router(url);

Preview trading results in a market

Preview adding liquidity

res = await routerClass.previewAddLiquidityDualSyPt(marketAddr, routerAddr, amount, amount);

Params:

  • marketAddr: EthAddress
  • routerAddr: EthAddress
  • amount: string | null (amount of sy and pt respectively) Return preview result before adding liquidity

Preview removing liquidity

res = await routerClass.previewRemoveLiquidityDualSyPt(marketAddr, routerAddr, amount);

Params:

  • marketAddr: EthAddress
  • routerAddr: EthAddress
  • amount: string (amount of lp to remove) Return preview result before removing liquidity

Preview minting

res = await routerClass.previewMintPyFromSy(ytAddr, amount);

Params:

  • ytAddr: EthAddress
  • amount: string (amount of sy used to mint) Return preview result before using sy to mint pt and yt

Preview redeeming

res = await routerClass.previewRedeemPyToSy(ytAddr, amount);

Params:

  • ytAddr: EthAddress
  • amount: string (amount of yt used to redeem) Return preview result before using yt and pt to redeem
0.0.24

11 months ago

0.0.23

11 months ago

0.0.22

11 months ago

0.0.21

11 months ago

0.0.20

11 months ago

0.0.19

11 months ago

0.0.18

11 months ago

0.0.17

11 months ago

0.0.16

12 months ago

0.0.15

12 months ago

0.0.14

12 months ago

0.0.13

12 months ago

0.0.12

12 months ago

0.0.11

12 months ago

0.0.10

12 months ago

0.0.9

12 months ago

0.0.8

12 months ago

0.0.7

12 months ago

0.0.6

12 months ago

0.0.5

12 months ago

0.0.4

12 months ago

0.0.3

12 months ago

0.0.2

12 months ago

0.0.1

12 months ago