0.1.39 • Published 8 months ago

kyberswap-pancake-liquidity-widgets v0.1.39

Weekly downloads
-
License
MIT
Repository
-
Last release
8 months ago

Kyber Liquidity Widgets

The @kyberswap/pancake-liquidity-widgets package is an npm package of React components used to provide subsets of the Zap Protocol functionality in a small and configurable user interface element. Demo: https://pancake-liq-widget-demo.vercel.app/

Installation

Install the widgets library via npm or yarn.

yarn add @kyberswap/pancake-liquidity-widgets
npm i --save @kyberswap/pancake-liquidity-widgets

Usage

Example usage: https://github.com/KyberNetwork/kyberswap-widgets/blob/main/examples/pancake-demo/src/App.tsx#L116-L137

Params

PropertyDescriptionTypeDefault Value
sourceTo identify the dapp that integrating with liquidity widgetstring
accountCurrent connected walletstring""
networkChainIdCurrent network chainIdnumberRequired
chainIdnetwork of selected poolnumberRequired
poolAddressaddress of pool to zapstringRequired
positionIdOptional, in case “Increasing Liquidity into an existing position”, pass the position id. The position should belong to the poolAddress. Otherwise, it considers as “Adding Liquidity into a new position”numberundefined
initTickLowerinit tick lower in case add liquidity into a new positionnumberundefined
initTickUpperinit tick upper in case add liquidity into a new positionnumberundefined
initDepositTokeninit deposit token in. Use 0xEeeeeEeeeEeEeeEeEeEeeEEEeeeeEeeeeeeeEEeE in case it's native tokenstringundefined
initAmountinit amount innumberundefined
themematching with pancake theme. accept 'dark' or 'light'stringdark
feeAddressWallet Address if you want to charge zap feestringundefined
feePcmfee percentage in per cent mille (0.001% or 1 in 100,000). Ignored if feeAddress is empty. From 0 to 100,000 inclusively. Example: 1 for 0.001%.numberundefined
includedSourcesList of liquidty sources you want to include from your zap, separate by commaKyberSwap Aggregator Dex Ids
excludedSourcesList of liquidty sources you want to exclude from your zap, separate by commaKyberSwap Aggregator Dex Ids
onDismissCallback function when click cancel or close widget() => void
onTxSubmitCallback function when tx was submited(txHash: string) => void
onConnectWalletfunction when user click connect wallet() => void
0.1.39

8 months ago

0.1.38

8 months ago

0.1.37

8 months ago

0.1.36

8 months ago

0.1.35

8 months ago

0.1.34

8 months ago

0.1.33

8 months ago

0.1.32

8 months ago

0.1.31

8 months ago

0.1.30

8 months ago

0.1.29

8 months ago

0.1.28

8 months ago

0.1.27

8 months ago

0.1.26

8 months ago

0.1.25

8 months ago

0.1.24

8 months ago

0.1.23

8 months ago

0.1.22

8 months ago

0.1.21

8 months ago

0.1.20

8 months ago

0.1.19

8 months ago

0.1.18

8 months ago

0.1.17

8 months ago

0.1.16

8 months ago

0.1.15

8 months ago

0.1.14

8 months ago

0.1.13

8 months ago

0.1.12

8 months ago

0.1.11

8 months ago

0.1.10

8 months ago

0.1.9

8 months ago

0.1.8

8 months ago

0.1.7

8 months ago

0.1.6

8 months ago

0.1.5

8 months ago

0.1.4

8 months ago

0.1.3

8 months ago

0.1.2

8 months ago

0.1.1

8 months ago