Documentation Index
Fetch the complete documentation index at: https://docs.li.fi/llms.txt
Use this file to discover all available pages before exploring further.
要开始使用,请安装最新版本的 LI.FI 组件。
yarn add @lifi/widget wagmi @bigmi/react @solana/wallet-adapter-react @mysten/dapp-kit @tanstack/react-query
Wagmi 是一个类型安全、可扩展且模块化的库,用于构建以太坊应用程序。
Bigmi 是一个模块化的 TypeScript 库,为构建比特币应用程序提供响应式原语。
@solana/wallet-adapter-react 是用于 Solana 应用程序的模块化 TypeScript 钱包适配器和组件。
@mysten/dapp-kit 为 Sui 区块链 dApp 中的钱包集成和数据访问提供 React 工具。
TanStack Query 是一个异步状态管理器,处理请求、缓存等功能。
兼容性
我们迄今为止测试过的环境、库和框架列表:
有关更多信息,请查看兼容性页面。
查看我们在 组件仓库 中的完整示例,如有任何不兼容问题,请提交问题。
基本示例
这是一个使用 LI.FI 组件进行容器自定义的基本示例。
import { LiFiWidget, WidgetConfig } from '@lifi/widget';
const widgetConfig: WidgetConfig = {
theme: {
container: {
border: '1px solid rgb(234, 234, 234)',
borderRadius: '16px',
},
},
};
export const WidgetPage = () => {
return (
<LiFiWidget integrator="Your dApp/company name" config={widgetConfig} />
);
};