0.0.39 • Published 9 months ago

pendle-fork-sdk v0.0.39

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

canalix-sdk

Table of contents

Market

import { Market } from "canalix-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 "canalix-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.38

9 months ago

0.0.39

9 months ago

0.0.35

1 year ago

0.0.36

11 months ago

0.0.37

11 months ago

0.0.34

1 year ago

0.0.33

1 year ago

0.0.32

1 year ago

0.0.31

1 year ago

0.0.30

1 year ago

0.0.29

1 year ago

0.0.28

1 year ago

0.0.27

1 year ago

0.0.26

1 year ago

0.0.25

1 year ago