@compass-labs/widgets 0.1.13 → 0.1.14

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.d.mts CHANGED
@@ -565,6 +565,16 @@ declare function useAaveData(options?: UseAaveDataOptions): {
565
565
  refetch: () => void;
566
566
  };
567
567
 
568
+ type MarketType = 'aave' | 'pendle' | 'vaults';
569
+ interface MarketOption {
570
+ id: string;
571
+ name: string;
572
+ apy: number;
573
+ tvl: number;
574
+ type: MarketType;
575
+ expiry?: string;
576
+ curator?: string;
577
+ }
568
578
  /**
569
579
  * Props for EarnAccount - A banking-style USDC savings account widget.
570
580
  *
@@ -579,26 +589,28 @@ interface EarnAccountProps {
579
589
  showHeader?: boolean;
580
590
  /** Show the interest rate badge @default true */
581
591
  showInterestRate?: boolean;
582
- /** Show earnings/PnL display when available @default true */
583
- showPnL?: boolean;
584
- /** Show the "Transfer from Wallet" button @default true */
585
- showFundButton?: boolean;
592
+ /** Show the "Top Up" button to transfer from wallet @default true */
593
+ showTopUpButton?: boolean;
586
594
  /** Show the trust badge ("Secured & Insured") @default true */
587
595
  showTrustBadge?: boolean;
588
596
  /** Compact layout with reduced spacing @default false */
589
597
  compact?: boolean;
590
598
  /** Custom title for the header @default "Savings Account" */
591
599
  title?: string;
592
- /** Callback after successful supply */
593
- onSupply?: (market: AaveMarketData, amount: string, txHash: string) => void;
600
+ /** Callback after successful deposit */
601
+ onDeposit?: (market: MarketOption, amount: number, txHash: string) => void;
594
602
  /** Callback after successful withdraw */
595
- onWithdraw?: (market: AaveMarketData, amount: string, txHash: string) => void;
603
+ onWithdraw?: (market: MarketOption, amount: number, txHash: string) => void;
604
+ /** Default market type to show @default 'aave' */
605
+ defaultMarketType?: MarketType;
606
+ /** Default minimum TVL filter @default 0 */
607
+ defaultMinTvl?: number;
596
608
  }
597
609
 
598
610
  /**
599
611
  * EarnAccount widget - A beautiful banking-style USDC savings account.
600
612
  */
601
- declare function EarnAccount({ showHeader, showInterestRate, showPnL, showFundButton, showTrustBadge, compact, title, onSupply, onWithdraw, }: EarnAccountProps): react_jsx_runtime.JSX.Element;
613
+ declare function EarnAccount({ showHeader, showInterestRate, showTopUpButton, showTrustBadge, compact, title, onDeposit, onWithdraw, defaultMarketType, defaultMinTvl, }: EarnAccountProps): react_jsx_runtime.JSX.Element;
602
614
 
603
615
  type SortOption = 'fixed_apy' | 'tvl' | 'expiry';
604
616
  interface PendleMarketData {
package/dist/index.d.ts CHANGED
@@ -565,6 +565,16 @@ declare function useAaveData(options?: UseAaveDataOptions): {
565
565
  refetch: () => void;
566
566
  };
567
567
 
568
+ type MarketType = 'aave' | 'pendle' | 'vaults';
569
+ interface MarketOption {
570
+ id: string;
571
+ name: string;
572
+ apy: number;
573
+ tvl: number;
574
+ type: MarketType;
575
+ expiry?: string;
576
+ curator?: string;
577
+ }
568
578
  /**
569
579
  * Props for EarnAccount - A banking-style USDC savings account widget.
570
580
  *
@@ -579,26 +589,28 @@ interface EarnAccountProps {
579
589
  showHeader?: boolean;
580
590
  /** Show the interest rate badge @default true */
581
591
  showInterestRate?: boolean;
582
- /** Show earnings/PnL display when available @default true */
583
- showPnL?: boolean;
584
- /** Show the "Transfer from Wallet" button @default true */
585
- showFundButton?: boolean;
592
+ /** Show the "Top Up" button to transfer from wallet @default true */
593
+ showTopUpButton?: boolean;
586
594
  /** Show the trust badge ("Secured & Insured") @default true */
587
595
  showTrustBadge?: boolean;
588
596
  /** Compact layout with reduced spacing @default false */
589
597
  compact?: boolean;
590
598
  /** Custom title for the header @default "Savings Account" */
591
599
  title?: string;
592
- /** Callback after successful supply */
593
- onSupply?: (market: AaveMarketData, amount: string, txHash: string) => void;
600
+ /** Callback after successful deposit */
601
+ onDeposit?: (market: MarketOption, amount: number, txHash: string) => void;
594
602
  /** Callback after successful withdraw */
595
- onWithdraw?: (market: AaveMarketData, amount: string, txHash: string) => void;
603
+ onWithdraw?: (market: MarketOption, amount: number, txHash: string) => void;
604
+ /** Default market type to show @default 'aave' */
605
+ defaultMarketType?: MarketType;
606
+ /** Default minimum TVL filter @default 0 */
607
+ defaultMinTvl?: number;
596
608
  }
597
609
 
598
610
  /**
599
611
  * EarnAccount widget - A beautiful banking-style USDC savings account.
600
612
  */
601
- declare function EarnAccount({ showHeader, showInterestRate, showPnL, showFundButton, showTrustBadge, compact, title, onSupply, onWithdraw, }: EarnAccountProps): react_jsx_runtime.JSX.Element;
613
+ declare function EarnAccount({ showHeader, showInterestRate, showTopUpButton, showTrustBadge, compact, title, onDeposit, onWithdraw, defaultMarketType, defaultMinTvl, }: EarnAccountProps): react_jsx_runtime.JSX.Element;
602
614
 
603
615
  type SortOption = 'fixed_apy' | 'tvl' | 'expiry';
604
616
  interface PendleMarketData {