@compass-labs/widgets 0.1.19 → 0.1.21
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 +23 -5
- package/dist/index.d.ts +23 -5
- package/dist/index.js +259 -281
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +260 -282
- package/dist/index.mjs.map +1 -1
- package/dist/server/index.js +6 -4
- package/dist/server/index.js.map +1 -1
- package/dist/server/index.mjs +6 -4
- package/dist/server/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.d.mts
CHANGED
|
@@ -566,6 +566,8 @@ declare function useAaveData(options?: UseAaveDataOptions): {
|
|
|
566
566
|
};
|
|
567
567
|
|
|
568
568
|
type MarketType = 'aave' | 'pendle' | 'vaults';
|
|
569
|
+
/** UI tab type for the market selector */
|
|
570
|
+
type UIMarketTab = 'variable' | 'fixed';
|
|
569
571
|
interface MarketOption {
|
|
570
572
|
id: string;
|
|
571
573
|
name: string;
|
|
@@ -605,16 +607,32 @@ interface EarnAccountProps {
|
|
|
605
607
|
onDeposit?: (market: MarketOption, amount: number, txHash: string) => void;
|
|
606
608
|
/** Callback after successful withdraw */
|
|
607
609
|
onWithdraw?: (market: MarketOption, amount: number, txHash: string) => void;
|
|
608
|
-
/** Default market
|
|
609
|
-
|
|
610
|
-
/**
|
|
611
|
-
|
|
610
|
+
/** Default market tab to show @default 'variable' */
|
|
611
|
+
defaultMarketTab?: UIMarketTab;
|
|
612
|
+
/**
|
|
613
|
+
* List of market IDs to show in Variable tab.
|
|
614
|
+
* If undefined, all variable markets are shown.
|
|
615
|
+
* Pass an empty array to hide all variable markets.
|
|
616
|
+
*/
|
|
617
|
+
allowedVariableMarkets?: string[];
|
|
618
|
+
/**
|
|
619
|
+
* List of market IDs to show in Fixed tab.
|
|
620
|
+
* If undefined, all fixed markets are shown.
|
|
621
|
+
* Pass an empty array to hide all fixed markets.
|
|
622
|
+
*/
|
|
623
|
+
allowedFixedMarkets?: string[];
|
|
624
|
+
/**
|
|
625
|
+
* Lock the widget to a specific chain.
|
|
626
|
+
* When provided, the chain selector is hidden and the widget uses this chain.
|
|
627
|
+
* Valid values: 'ethereum', 'base', 'arbitrum'
|
|
628
|
+
*/
|
|
629
|
+
chain?: string;
|
|
612
630
|
}
|
|
613
631
|
|
|
614
632
|
/**
|
|
615
633
|
* EarnAccount widget - A beautiful banking-style USDC savings account.
|
|
616
634
|
*/
|
|
617
|
-
declare function EarnAccount({ showHeader, showInterestRate, showTopUpButton, showTrustBadge, compact, title, onDeposit, onWithdraw,
|
|
635
|
+
declare function EarnAccount({ showHeader, showInterestRate, showTopUpButton, showTrustBadge, compact, title, onDeposit, onWithdraw, defaultMarketTab, allowedVariableMarkets, allowedFixedMarkets, chain: chainProp, }: EarnAccountProps): react_jsx_runtime.JSX.Element;
|
|
618
636
|
|
|
619
637
|
type SortOption = 'fixed_apy' | 'tvl' | 'expiry';
|
|
620
638
|
interface PendleMarketData {
|
package/dist/index.d.ts
CHANGED
|
@@ -566,6 +566,8 @@ declare function useAaveData(options?: UseAaveDataOptions): {
|
|
|
566
566
|
};
|
|
567
567
|
|
|
568
568
|
type MarketType = 'aave' | 'pendle' | 'vaults';
|
|
569
|
+
/** UI tab type for the market selector */
|
|
570
|
+
type UIMarketTab = 'variable' | 'fixed';
|
|
569
571
|
interface MarketOption {
|
|
570
572
|
id: string;
|
|
571
573
|
name: string;
|
|
@@ -605,16 +607,32 @@ interface EarnAccountProps {
|
|
|
605
607
|
onDeposit?: (market: MarketOption, amount: number, txHash: string) => void;
|
|
606
608
|
/** Callback after successful withdraw */
|
|
607
609
|
onWithdraw?: (market: MarketOption, amount: number, txHash: string) => void;
|
|
608
|
-
/** Default market
|
|
609
|
-
|
|
610
|
-
/**
|
|
611
|
-
|
|
610
|
+
/** Default market tab to show @default 'variable' */
|
|
611
|
+
defaultMarketTab?: UIMarketTab;
|
|
612
|
+
/**
|
|
613
|
+
* List of market IDs to show in Variable tab.
|
|
614
|
+
* If undefined, all variable markets are shown.
|
|
615
|
+
* Pass an empty array to hide all variable markets.
|
|
616
|
+
*/
|
|
617
|
+
allowedVariableMarkets?: string[];
|
|
618
|
+
/**
|
|
619
|
+
* List of market IDs to show in Fixed tab.
|
|
620
|
+
* If undefined, all fixed markets are shown.
|
|
621
|
+
* Pass an empty array to hide all fixed markets.
|
|
622
|
+
*/
|
|
623
|
+
allowedFixedMarkets?: string[];
|
|
624
|
+
/**
|
|
625
|
+
* Lock the widget to a specific chain.
|
|
626
|
+
* When provided, the chain selector is hidden and the widget uses this chain.
|
|
627
|
+
* Valid values: 'ethereum', 'base', 'arbitrum'
|
|
628
|
+
*/
|
|
629
|
+
chain?: string;
|
|
612
630
|
}
|
|
613
631
|
|
|
614
632
|
/**
|
|
615
633
|
* EarnAccount widget - A beautiful banking-style USDC savings account.
|
|
616
634
|
*/
|
|
617
|
-
declare function EarnAccount({ showHeader, showInterestRate, showTopUpButton, showTrustBadge, compact, title, onDeposit, onWithdraw,
|
|
635
|
+
declare function EarnAccount({ showHeader, showInterestRate, showTopUpButton, showTrustBadge, compact, title, onDeposit, onWithdraw, defaultMarketTab, allowedVariableMarkets, allowedFixedMarkets, chain: chainProp, }: EarnAccountProps): react_jsx_runtime.JSX.Element;
|
|
618
636
|
|
|
619
637
|
type SortOption = 'fixed_apy' | 'tvl' | 'expiry';
|
|
620
638
|
interface PendleMarketData {
|