Integration
Widget and API
Widget SDK Integration
Installation
npm install @ditto-network/sdk lucide-react
Basic Usage
import { DittoWidget, VaultCard, PositionCard, HistoryCard } from '@ditto-network/sdk';
export default function YieldDashboard() {
return (
<div className="flex flex-col gap-4 max-w-md mx-auto">
{/* 1. Core Interaction */}
<VaultCard
vaultAddress="0x8a...9f2"
theme="dark"
/>
{/* 2. User Stats & Graph */}
<PositionCard theme="dark" />
{/* 3. Analytics */}
<HistoricChart
period="30d"
benchmark="market"
theme="dark"
/>
{/* 4. Activity */}
<HistoryCard limit={5} theme="dark" />
</div>
);
}
Configuration Props
Prop
Type
Default
Description
REST API Reference
1 Get Vault Details
2 Get Historical APY Series
3 Get Global Transactions
Usage Examples
Last updated

