@compass-labs/widgets 0.1.13 → 0.1.15
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 +24 -8
- package/dist/index.d.ts +24 -8
- package/dist/index.js +1377 -446
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +1378 -447
- package/dist/index.mjs.map +1 -1
- package/dist/server/index.js +109 -2
- package/dist/server/index.js.map +1 -1
- package/dist/server/index.mjs +109 -2
- package/dist/server/index.mjs.map +1 -1
- package/dist/styles.css +5 -0
- package/package.json +4 -4
package/dist/index.d.mts
CHANGED
|
@@ -565,6 +565,20 @@ 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
|
+
/** The native token of this market (e.g. 'USDC', 'WETH'). Drives swap logic. */
|
|
576
|
+
underlyingToken: string;
|
|
577
|
+
expiry?: string;
|
|
578
|
+
marketAddress?: string;
|
|
579
|
+
curator?: string;
|
|
580
|
+
vaultAddress?: string;
|
|
581
|
+
}
|
|
568
582
|
/**
|
|
569
583
|
* Props for EarnAccount - A banking-style USDC savings account widget.
|
|
570
584
|
*
|
|
@@ -579,26 +593,28 @@ interface EarnAccountProps {
|
|
|
579
593
|
showHeader?: boolean;
|
|
580
594
|
/** Show the interest rate badge @default true */
|
|
581
595
|
showInterestRate?: boolean;
|
|
582
|
-
/** Show
|
|
583
|
-
|
|
584
|
-
/** Show the "Transfer from Wallet" button @default true */
|
|
585
|
-
showFundButton?: boolean;
|
|
596
|
+
/** Show the "Top Up" button to transfer from wallet @default true */
|
|
597
|
+
showTopUpButton?: boolean;
|
|
586
598
|
/** Show the trust badge ("Secured & Insured") @default true */
|
|
587
599
|
showTrustBadge?: boolean;
|
|
588
600
|
/** Compact layout with reduced spacing @default false */
|
|
589
601
|
compact?: boolean;
|
|
590
602
|
/** Custom title for the header @default "Savings Account" */
|
|
591
603
|
title?: string;
|
|
592
|
-
/** Callback after successful
|
|
593
|
-
|
|
604
|
+
/** Callback after successful deposit */
|
|
605
|
+
onDeposit?: (market: MarketOption, amount: number, txHash: string) => void;
|
|
594
606
|
/** Callback after successful withdraw */
|
|
595
|
-
onWithdraw?: (market:
|
|
607
|
+
onWithdraw?: (market: MarketOption, amount: number, txHash: string) => void;
|
|
608
|
+
/** Default market type to show @default 'aave' */
|
|
609
|
+
defaultMarketType?: MarketType;
|
|
610
|
+
/** Default minimum TVL filter @default 0 */
|
|
611
|
+
defaultMinTvl?: number;
|
|
596
612
|
}
|
|
597
613
|
|
|
598
614
|
/**
|
|
599
615
|
* EarnAccount widget - A beautiful banking-style USDC savings account.
|
|
600
616
|
*/
|
|
601
|
-
declare function EarnAccount({ showHeader, showInterestRate,
|
|
617
|
+
declare function EarnAccount({ showHeader, showInterestRate, showTopUpButton, showTrustBadge, compact, title, onDeposit, onWithdraw, defaultMarketType, defaultMinTvl, }: EarnAccountProps): react_jsx_runtime.JSX.Element;
|
|
602
618
|
|
|
603
619
|
type SortOption = 'fixed_apy' | 'tvl' | 'expiry';
|
|
604
620
|
interface PendleMarketData {
|
package/dist/index.d.ts
CHANGED
|
@@ -565,6 +565,20 @@ 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
|
+
/** The native token of this market (e.g. 'USDC', 'WETH'). Drives swap logic. */
|
|
576
|
+
underlyingToken: string;
|
|
577
|
+
expiry?: string;
|
|
578
|
+
marketAddress?: string;
|
|
579
|
+
curator?: string;
|
|
580
|
+
vaultAddress?: string;
|
|
581
|
+
}
|
|
568
582
|
/**
|
|
569
583
|
* Props for EarnAccount - A banking-style USDC savings account widget.
|
|
570
584
|
*
|
|
@@ -579,26 +593,28 @@ interface EarnAccountProps {
|
|
|
579
593
|
showHeader?: boolean;
|
|
580
594
|
/** Show the interest rate badge @default true */
|
|
581
595
|
showInterestRate?: boolean;
|
|
582
|
-
/** Show
|
|
583
|
-
|
|
584
|
-
/** Show the "Transfer from Wallet" button @default true */
|
|
585
|
-
showFundButton?: boolean;
|
|
596
|
+
/** Show the "Top Up" button to transfer from wallet @default true */
|
|
597
|
+
showTopUpButton?: boolean;
|
|
586
598
|
/** Show the trust badge ("Secured & Insured") @default true */
|
|
587
599
|
showTrustBadge?: boolean;
|
|
588
600
|
/** Compact layout with reduced spacing @default false */
|
|
589
601
|
compact?: boolean;
|
|
590
602
|
/** Custom title for the header @default "Savings Account" */
|
|
591
603
|
title?: string;
|
|
592
|
-
/** Callback after successful
|
|
593
|
-
|
|
604
|
+
/** Callback after successful deposit */
|
|
605
|
+
onDeposit?: (market: MarketOption, amount: number, txHash: string) => void;
|
|
594
606
|
/** Callback after successful withdraw */
|
|
595
|
-
onWithdraw?: (market:
|
|
607
|
+
onWithdraw?: (market: MarketOption, amount: number, txHash: string) => void;
|
|
608
|
+
/** Default market type to show @default 'aave' */
|
|
609
|
+
defaultMarketType?: MarketType;
|
|
610
|
+
/** Default minimum TVL filter @default 0 */
|
|
611
|
+
defaultMinTvl?: number;
|
|
596
612
|
}
|
|
597
613
|
|
|
598
614
|
/**
|
|
599
615
|
* EarnAccount widget - A beautiful banking-style USDC savings account.
|
|
600
616
|
*/
|
|
601
|
-
declare function EarnAccount({ showHeader, showInterestRate,
|
|
617
|
+
declare function EarnAccount({ showHeader, showInterestRate, showTopUpButton, showTrustBadge, compact, title, onDeposit, onWithdraw, defaultMarketType, defaultMinTvl, }: EarnAccountProps): react_jsx_runtime.JSX.Element;
|
|
602
618
|
|
|
603
619
|
type SortOption = 'fixed_apy' | 'tvl' | 'expiry';
|
|
604
620
|
interface PendleMarketData {
|