fanbase-pure-erc20-swap-widget
v1.0.12
Published
Fanbase.io Swap Interface
Readme
fanbase-pure-erc20-swap-widget
React widget for ERC20 token swaps with wallet connection, quote fetching, and swap execution.
Installation
npm install fanbase-pure-erc20-swap-widgetQuick Start
import CryptoExchangeWidget from "fanbase-pure-erc20-swap-widget";
export default function App() {
return <CryptoExchangeWidget />;
}Styles are bundled and loaded by the package entry.
Props
appId?: stringOptional public app identifier used for backend access verification.chainId?: numberOptional target EVM chain ID. If omitted, widget uses connected wallet chain.buyToken?: stringOptional fixed output token address. When set, output token selection is limited.
Notes
- If
appIdis provided and valid, role-based UI restrictions are applied. - If
appIdis missing, widget can still render with default access behavior. - In production, your domain should be allowed for your integration keys/providers.
Peer Dependencies
react^18.2.0react-dom^18.2.0
