React component library for integrating KyberSwap Zap Protocol liquidity operations into dApps. Current stable version: 1.0.8. Provides pre-built UI for adding/increasing liquidity in PancakeSwap-style AMM pools with KyberSwap's aggregation and routing. Key differentiators: handles zap (single-token to LP), supports both new positions and existing position increase, configurable fee collection, and theming (dark/light). Requires React 16.8+ and web3 wallet connection. Ships TypeScript definitions.
npm install kyberswap-zap-migration-widgetsNo compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
Renders a liquidity widget for adding liquidity to a PancakeSwap pool on BSC (chainId 56), handling zap and position management.
Always provide a connected wallet address or use the `onConnectWallet` callback to prompt connection.
Omit `positionId` for new positions; include it only when increasing liquidity in an existing position.
Always provide a numeric `chainId` matching the network of the pool.
Omit them unless you have a specific use case for custom ticks.
Provide both `feeAddress` and `feePcm` if you intend to collect fees.
Import the CSS file in your application entry point.
Use the raw tx hash to track the transaction via your own provider.
Provide a valid Ethereum address for the `account` prop.
Use a valid chainId (e.g., 56 for BSC mainnet).
Use correct import path: `import '@kyberswap/pancake-liquidity-widgets/dist/index.css';`
Ensure a web3 provider (e.g., MetaMask) is available and connected before rendering the widget.