@ape.swap/bonds-sdk 1.1.0-seedify → 1.1.0-test.108
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/assets/output-2LTDuc8n.css +174 -0
- package/dist/components/AccordionText/index.d.ts +0 -1
- package/dist/components/{BondMenu/BondMenu.d.ts → BondFilters/BondFilters.d.ts} +2 -3
- package/dist/components/ConnectButton/RainbowKitButton.d.ts +3 -0
- package/dist/components/ConnectButton/index.d.ts +3 -0
- package/dist/components/FavIcons/AddFavToken.d.ts +6 -0
- package/dist/components/FavIcons/FavFilter.d.ts +6 -0
- package/dist/components/PlaceholderMonkey/index.d.ts +5 -0
- package/dist/components/ProgressBar/ProgressBar.d.ts +0 -1
- package/dist/components/SafeHTMLComponent/index.d.ts +5 -0
- package/dist/components/Toast/index.d.ts +7 -0
- package/dist/components/Toast/styles.d.ts +3 -0
- package/dist/components/TokenInfoAndName/index.d.ts +4 -3
- package/dist/components/TokenSelectorModal/index.d.ts +1 -0
- package/dist/components/TokenSelectorPanel/index.d.ts +4 -3
- package/dist/components/Tooltip/ButtonsRow.d.ts +2 -2
- package/dist/components/Tooltip/Tooltip.d.ts +3 -10
- package/dist/components/uikit-sdk/Input/index.d.ts +0 -1
- package/dist/components/uikit-sdk/LoadingDots/index.d.ts +2 -0
- package/dist/components/uikit-sdk/Svg/Icons/FirePink.d.ts +4 -0
- package/dist/components/uikit-sdk/Svg/Icons/Star.d.ts +4 -0
- package/dist/components/uikit-sdk/Svg/Icons/StarFilled.d.ts +4 -0
- package/dist/components/uikit-sdk/Svg/Icons/index.d.ts +3 -0
- package/dist/components/uikit-sdk/Svg/types.d.ts +4 -1
- package/dist/components/uikit-sdk/SwiperDots/index.d.ts +6 -0
- package/dist/components/uikit-sdk/Tag/index.d.ts +0 -2
- package/dist/components/uikit-sdk/Tag/types.d.ts +1 -46
- package/dist/components/uikit-sdk/index.d.ts +3 -1
- package/dist/config/constants/addresses.d.ts +1 -3
- package/dist/config/constants/chains.d.ts +2 -30
- package/dist/config/constants/networks.d.ts +2 -2
- package/dist/config/constants/queryKeys.d.ts +8 -4
- package/dist/config/constants/variables.d.ts +5 -0
- package/dist/contexts/Popups.d.ts +5 -0
- package/dist/contexts/SwiperProvider.d.ts +12 -0
- package/dist/hooks/useDebounce.d.ts +1 -0
- package/dist/hooks/useMonitorTxHash.d.ts +25 -0
- package/dist/hooks/useSendReferenceId.d.ts +2 -0
- package/dist/hooks/useSwiper.d.ts +2 -0
- package/dist/main.d.ts +2 -3
- package/dist/main.js +67184 -50466
- package/dist/state/bondApiStats/useGetBondApiStats.d.ts +25 -0
- package/dist/state/bonds/useBondNFTData.d.ts +1 -1
- package/dist/state/bonds/useBondsData.d.ts +1 -1
- package/dist/state/bonds/useBondsList.d.ts +1 -1
- package/dist/state/bonds/useGetBondRecommendations.d.ts +27 -0
- package/dist/state/bonds/useHotBonds.d.ts +5 -2
- package/dist/state/bonds/useUserApiStats.d.ts +22 -0
- package/dist/state/favoriteTokens/useFavoriteTokens.d.ts +4 -0
- package/dist/state/popups/usePopups.d.ts +14 -0
- package/dist/state/tokenPrices/useTokenPrices.d.ts +2 -1
- package/dist/state/useSDKConfig.d.ts +16 -0
- package/dist/state/zap/getChainParam.d.ts +1 -1
- package/dist/state/zap/useSoulZapBondQuote.d.ts +1 -1
- package/dist/state/zap/useSoulZapTokenQuote.d.ts +1 -1
- package/dist/styles.css +1660 -0
- package/dist/types/bonds.d.ts +1 -2
- package/dist/utils/dates/formatDate.d.ts +1 -0
- package/dist/utils/displayHelpers.d.ts +11 -0
- package/dist/utils/formatNumbers.d.ts +0 -3
- package/dist/utils/getDotPos.d.ts +1 -0
- package/dist/utils/getNativeTicker.d.ts +1 -2
- package/dist/utils/index.d.ts +0 -15
- package/dist/views/BondModal/BondModal.d.ts +1 -3
- package/dist/views/BondModal/components/BondCards.d.ts +6 -0
- package/dist/views/BondModal/components/BondModalHeader.d.ts +8 -0
- package/dist/views/BondModal/components/Estimations.d.ts +14 -0
- package/dist/views/BondModal/components/ExpandedViewButton.d.ts +6 -0
- package/dist/views/BondModal/components/ProjectDescription.d.ts +5 -0
- package/dist/views/BondModal/index.d.ts +4 -1
- package/dist/views/Bonds/Bonds.d.ts +0 -2
- package/dist/views/Bonds/components/BondRows/BondRow.d.ts +9 -0
- package/dist/views/Bonds/components/BondRows/BondRowsByChain.d.ts +10 -0
- package/dist/views/Bonds/components/BondRows/BondRowsWithTitle.d.ts +11 -0
- package/dist/views/Bonds/components/BondRows/ModalHandler.d.ts +7 -0
- package/dist/{components/BondRows/BondRowHeader.d.ts → views/Bonds/components/BondsMenu/BondsMenu.d.ts} +2 -4
- package/dist/views/Bonds/components/BuyAgainRow/index.d.ts +3 -0
- package/dist/views/Bonds/components/HotBondCards/HotBondCard.d.ts +6 -0
- package/dist/views/Bonds/components/HotBondCards/index.d.ts +4 -0
- package/dist/views/Bonds/components/HotBondCards/styles.d.ts +2 -0
- package/dist/views/Bonds/components/RecommendationCards/SmallRecommendationCard.d.ts +13 -0
- package/dist/views/Bonds/components/RecommendationCards/index.d.ts +11 -0
- package/dist/views/Bonds/components/RecommendationCards/styles.d.ts +2 -0
- package/dist/views/Bonds/index.d.ts +4 -1
- package/dist/views/Bonds/utils.d.ts +5 -2
- package/dist/views/FullBondsView/index.d.ts +2 -1
- package/dist/views/ProjectView/ProjectView.d.ts +14 -0
- package/dist/views/ProjectView/components/BondLeaderboard/components/SalesTable.d.ts +6 -0
- package/dist/views/ProjectView/components/BondLeaderboard/components/TopSaleCard.d.ts +7 -0
- package/dist/views/ProjectView/components/BondLeaderboard/components/TopThreeSalesCards.d.ts +6 -0
- package/dist/views/ProjectView/components/BondLeaderboard/components/styles.d.ts +2 -0
- package/dist/views/ProjectView/components/BondLeaderboard/index.d.ts +6 -0
- package/dist/views/ProjectView/components/BondStats/index.d.ts +6 -0
- package/dist/views/ProjectView/components/BondStats/styles.d.ts +2 -0
- package/dist/views/ProjectView/components/BondStats/types.d.ts +43 -0
- package/dist/views/ProjectView/components/BondStats/utils.d.ts +1 -0
- package/dist/views/ProjectView/components/NavPanel/index.d.ts +5 -0
- package/dist/views/ProjectView/components/PriceChart/components/CandleStickChart.d.ts +9 -0
- package/dist/views/ProjectView/components/PriceChart/components/LineChart.d.ts +9 -0
- package/dist/views/ProjectView/components/PriceChart/components/utils.d.ts +1 -0
- package/dist/views/ProjectView/components/PriceChart/index.d.ts +8 -0
- package/dist/views/ProjectView/components/PriceChart/styles.d.ts +2 -0
- package/dist/views/ProjectView/components/ProjectInfo/index.d.ts +6 -0
- package/dist/views/ProjectView/components/ProjectInfo/styles.d.ts +2 -0
- package/dist/views/ProjectView/components/RecommendationCards/index.d.ts +3 -0
- package/dist/views/ProjectView/index.d.ts +7 -0
- package/dist/views/ProjectView/styles.d.ts +2 -0
- package/dist/views/YourBonds/YourBonds.d.ts +1 -2
- package/dist/views/YourBonds/components/YourBondsMenu/YourBondsMenu.d.ts +13 -0
- package/dist/views/YourBonds/fetchBillsUser.d.ts +0 -12
- package/dist/views/YourBonds/getBillNftData.d.ts +2 -2
- package/dist/views/YourBonds/index.d.ts +2 -1
- package/dist/views/YourBondsModal/YourBondsModal.d.ts +0 -2
- package/dist/views/YourBondsModal/components/Recommendations/CardRecommendation.d.ts +7 -0
- package/dist/views/YourBondsModal/components/Recommendations/CardRecommendationsMobile.d.ts +6 -0
- package/dist/views/YourBondsModal/components/Recommendations/Recommendations.d.ts +6 -0
- package/dist/views/YourBondsModal/components/TransferBondModal/TransferAction.d.ts +8 -0
- package/dist/views/YourBondsModal/components/TransferBondModal/index.d.ts +8 -0
- package/dist/views/ZapModal/index.d.ts +0 -1
- package/package.json +22 -35
- package/dist/components/BondRows/BondRow.d.ts +0 -10
- package/dist/components/BondRows/BondRowsByChain.d.ts +0 -9
- package/dist/components/BondRows/BondRowsWithTitle.d.ts +0 -9
- package/dist/components/DisconnectedPlaceholder/index.d.ts +0 -3
- package/dist/components/uikit-sdk/Input/StyledInput.d.ts +0 -11
- package/dist/components/uikit-sdk/Tag/Tag.d.ts +0 -4
- package/dist/components/uikit-sdk/Tag/styles.d.ts +0 -8
- package/dist/config/constants/api.d.ts +0 -6
- package/dist/config/constants/lifiRouting.d.ts +0 -2
- package/dist/config/constants/lists.d.ts +0 -10
- package/dist/config/constants/meta.d.ts +0 -11
- package/dist/config/constants/misc.d.ts +0 -3
- package/dist/config/constants/products.d.ts +0 -21
- package/dist/config/constants/tutorials.d.ts +0 -7
- package/dist/config/localization/languages.d.ts +0 -11
- package/dist/contexts/Localization/Provider.d.ts +0 -7
- package/dist/contexts/Localization/helpers.d.ts +0 -3
- package/dist/contexts/Localization/index.d.ts +0 -3
- package/dist/contexts/Localization/types.d.ts +0 -21
- package/dist/contexts/Localization/useTranslation.d.ts +0 -2
- package/dist/scss/AccordionText.scss +0 -11
- package/dist/scss/BondMenu.scss +0 -29
- package/dist/scss/BondModal.scss +0 -480
- package/dist/scss/BondRow.scss +0 -98
- package/dist/scss/BondRowHeader.scss +0 -124
- package/dist/scss/BondRowsByChain.scss +0 -5
- package/dist/scss/BondRowsWithTitle.scss +0 -4
- package/dist/scss/Bonds.scss +0 -18
- package/dist/scss/ProgressBar.scss +0 -13
- package/dist/scss/TokenInfoName.scss +0 -60
- package/dist/scss/YourBonds.scss +0 -203
- package/dist/scss/YourBondsModal.scss +0 -314
- package/dist/scss/index.scss +0 -12
- package/dist/views/BondModal/helper.d.ts +0 -10
- package/dist/views/YourBondsModal/styles.d.ts +0 -2
- /package/dist/hooks/{useTopThreeTags.d.ts → useTopTags.d.ts} +0 -0
- /package/dist/{components/BondMenu → state/chainFilterOption}/useChainFilterOption.d.ts +0 -0
- /package/dist/{components → views/Bonds/components}/BondRows/ChainTitle.d.ts +0 -0
package/dist/types/bonds.d.ts
CHANGED
|
@@ -5,7 +5,7 @@ export interface BondsData {
|
|
|
5
5
|
chainId: ChainId;
|
|
6
6
|
type: string;
|
|
7
7
|
discount: number;
|
|
8
|
-
billAddress
|
|
8
|
+
billAddress?: string;
|
|
9
9
|
billNftAddress: string;
|
|
10
10
|
soldOut: boolean;
|
|
11
11
|
inactive: boolean;
|
|
@@ -24,7 +24,6 @@ export interface BondsData {
|
|
|
24
24
|
twitter?: string;
|
|
25
25
|
projectLink?: string;
|
|
26
26
|
audit?: string;
|
|
27
|
-
billVersion?: string;
|
|
28
27
|
earnToken: Token;
|
|
29
28
|
lpToken: Token;
|
|
30
29
|
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function formatUTCDate(date: Date, short?: boolean): string;
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { BigNumber } from 'bignumber.js';
|
|
1
2
|
import { UserBill } from '../types/yourbonds';
|
|
2
3
|
import { BondsData } from '../types/bonds';
|
|
3
4
|
export declare const claimable: (userBill: UserBill) => number;
|
|
@@ -11,3 +12,13 @@ export declare const vestingTimeRemaining: (userBill: UserBill) => {
|
|
|
11
12
|
minutes: number;
|
|
12
13
|
seconds: number;
|
|
13
14
|
};
|
|
15
|
+
export declare const discountEarnTokenPrice: (bond: BondsData) => string;
|
|
16
|
+
export declare const maxBuy: (bond: BondsData) => 0 | BigNumber;
|
|
17
|
+
export declare function formatNumber(input: string): string;
|
|
18
|
+
export declare function formatUSDNumber(input: string): string;
|
|
19
|
+
export declare const youSpend: (inputValue: string) => string;
|
|
20
|
+
export declare const youSpendUSD: (bond: BondsData, inputValue: string) => string;
|
|
21
|
+
export declare const youGet: (bond?: BondsData, inputValue?: string) => number;
|
|
22
|
+
export declare const youGetUSD: (bond: BondsData, inputValue: string) => string;
|
|
23
|
+
export declare const premium: (bond?: BondsData, inputValue?: string) => string;
|
|
24
|
+
export declare const getPremiumColor: (premiumString: string) => string;
|
|
@@ -1,6 +1,3 @@
|
|
|
1
|
-
import { Currency, CurrencyAmount, Price } from '@ape.swap/sdk-core';
|
|
2
|
-
export declare const currencyAmountToPreciseFloat: (currencyAmount: CurrencyAmount<Currency> | undefined) => number | undefined;
|
|
3
|
-
export declare const priceToPreciseFloat: (price: Price<Currency, Currency> | undefined) => number | undefined;
|
|
4
1
|
interface FormatDollarArgs {
|
|
5
2
|
num: number | undefined | null;
|
|
6
3
|
isPrice?: boolean;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const getDotPos: (index: number, carouselLength?: number) => number;
|
|
@@ -1,3 +1,2 @@
|
|
|
1
1
|
import { ChainId, Token } from '@ape.swap/apeswap-lists';
|
|
2
|
-
export declare const
|
|
3
|
-
export declare const getTokenSymbol: (token: Token) => string;
|
|
2
|
+
export declare const getSymbol: (token?: Token | "NATIVE", chainId?: ChainId) => string | undefined;
|
package/dist/utils/index.d.ts
CHANGED
|
@@ -1,16 +1 @@
|
|
|
1
|
-
import { Contract } from '@ethersproject/contracts';
|
|
2
|
-
import type { JsonRpcProvider } from '@ethersproject/providers';
|
|
3
|
-
import { ChainId } from '../config/constants/chains';
|
|
4
1
|
export declare function isAddress(value: any): string | false;
|
|
5
|
-
export declare function getContract(address: string, ABI: any, provider: JsonRpcProvider, account?: string): Contract;
|
|
6
|
-
export declare function isSupportedChain(chainId: number | null | undefined): chainId is ChainId;
|
|
7
|
-
export declare function getEtherscanLink(data: string | number, type: 'transaction' | 'token' | 'address' | 'block' | 'countdown', chainId: ChainId): string;
|
|
8
|
-
/**
|
|
9
|
-
* Prompt the user to add a custom token to metamask
|
|
10
|
-
* @param tokenAddress
|
|
11
|
-
* @param tokenSymbol
|
|
12
|
-
* @param tokenDecimals
|
|
13
|
-
* @param tokenImage
|
|
14
|
-
* @returns {boolean} true if the token has been added, false otherwise
|
|
15
|
-
*/
|
|
16
|
-
export declare const registerToken: (tokenAddress: string, tokenSymbol: string | undefined, tokenDecimals: number, tokenImage: string | undefined) => Promise<void | null>;
|
|
@@ -1,11 +1,9 @@
|
|
|
1
|
-
/** @jsxImportSource theme-ui */
|
|
2
1
|
import React from 'react';
|
|
3
|
-
import '../../scss/BondModal.scss';
|
|
4
2
|
export interface BondModalProps {
|
|
5
3
|
onDismiss?: () => void;
|
|
6
4
|
bondAddress?: string;
|
|
7
5
|
bondChain?: number;
|
|
8
|
-
|
|
6
|
+
handlePurchasedBond?: (hash: string) => void;
|
|
9
7
|
accordionTitle?: string;
|
|
10
8
|
accordionBody?: string;
|
|
11
9
|
accordionVisible?: boolean;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { BondsData } from '../../../types/bonds';
|
|
3
|
+
declare const BondModalHeader: ({ bondData, onDismiss, showProjectInfoButton, }: {
|
|
4
|
+
bondData: BondsData;
|
|
5
|
+
onDismiss?: () => void;
|
|
6
|
+
showProjectInfoButton?: boolean;
|
|
7
|
+
}) => React.JSX.Element;
|
|
8
|
+
export default BondModalHeader;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { Token } from '@ape.swap/apeswap-lists';
|
|
3
|
+
import { BondsData } from '../../../types/bonds';
|
|
4
|
+
declare const Estimations: ({ bondData, inputValue, inputToken, estimatedOutput, inputTokenPrice, isZap, fetchingZapQuote, zapError, }: {
|
|
5
|
+
bondData: BondsData;
|
|
6
|
+
inputValue: string;
|
|
7
|
+
inputToken: Token | "NATIVE" | undefined;
|
|
8
|
+
estimatedOutput: number;
|
|
9
|
+
inputTokenPrice?: number;
|
|
10
|
+
isZap?: boolean;
|
|
11
|
+
fetchingZapQuote?: boolean;
|
|
12
|
+
zapError?: boolean;
|
|
13
|
+
}) => React.JSX.Element;
|
|
14
|
+
export default Estimations;
|
|
@@ -1,4 +1,7 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { BondModalProps } from './BondModal';
|
|
3
|
-
|
|
3
|
+
import { SDKProps } from '../../state/useSDKConfig';
|
|
4
|
+
interface Props extends SDKProps, BondModalProps {
|
|
5
|
+
}
|
|
6
|
+
declare const BondModalWithProviders: React.FC<Props>;
|
|
4
7
|
export default BondModalWithProviders;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { BondsData } from '../../../../types/bonds';
|
|
3
|
+
import { BillsConfig } from '@ape.swap/apeswap-lists';
|
|
4
|
+
interface BondRowProps {
|
|
5
|
+
key?: string;
|
|
6
|
+
bond: BondsData | BillsConfig;
|
|
7
|
+
}
|
|
8
|
+
declare const BondRow: React.FC<BondRowProps>;
|
|
9
|
+
export default BondRow;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { BondsData } from '../../../../types/bonds';
|
|
3
|
+
import { BillsConfig } from '@ape.swap/apeswap-lists';
|
|
4
|
+
export interface BondRowsByChainProps {
|
|
5
|
+
bonds: (BondsData | BillsConfig)[];
|
|
6
|
+
hideTitles: boolean;
|
|
7
|
+
chains?: number[];
|
|
8
|
+
}
|
|
9
|
+
declare const BondRowsByChain: React.FC<BondRowsByChainProps>;
|
|
10
|
+
export default BondRowsByChain;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { BondsData } from '../../../../types/bonds';
|
|
3
|
+
import { BillsConfig } from '@ape.swap/apeswap-lists';
|
|
4
|
+
export interface BondRowsWithTitleProps {
|
|
5
|
+
chain: number;
|
|
6
|
+
bonds: (BondsData | BillsConfig)[];
|
|
7
|
+
hideTitles: boolean;
|
|
8
|
+
showHotBonds: boolean;
|
|
9
|
+
}
|
|
10
|
+
declare const BondRowsWithTitle: React.FC<BondRowsWithTitleProps>;
|
|
11
|
+
export default BondRowsWithTitle;
|
|
@@ -1,6 +1,4 @@
|
|
|
1
|
-
/** @jsxImportSource theme-ui */
|
|
2
1
|
import React from 'react';
|
|
3
|
-
import '../../scss/BondRowHeader.scss';
|
|
4
2
|
interface BondRowHeaderProps {
|
|
5
3
|
searchQuery: string;
|
|
6
4
|
setSearchQuery: (value: string) => void;
|
|
@@ -11,5 +9,5 @@ interface BondRowHeaderProps {
|
|
|
11
9
|
setFilterOption: (newOption: string) => void;
|
|
12
10
|
onSort: (key: 'discount' | 'arr' | 'terms' | 'tokensRemaining') => void;
|
|
13
11
|
}
|
|
14
|
-
declare const
|
|
15
|
-
export default
|
|
12
|
+
declare const BondsMenu: React.FC<BondRowHeaderProps>;
|
|
13
|
+
export default BondsMenu;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { ChainId } from '@ape.swap/apeswap-lists';
|
|
3
|
+
export interface SmallCardBond {
|
|
4
|
+
vestingTerm: number;
|
|
5
|
+
payoutTokenName: string;
|
|
6
|
+
contractAddress: string;
|
|
7
|
+
discount: number;
|
|
8
|
+
chainId: ChainId;
|
|
9
|
+
}
|
|
10
|
+
declare const SmallRecommendationCard: ({ recommendation }: {
|
|
11
|
+
recommendation: SmallCardBond;
|
|
12
|
+
}) => React.JSX.Element;
|
|
13
|
+
export default SmallRecommendationCard;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { ChainId } from '@ape.swap/apeswap-lists';
|
|
3
|
+
export interface SmallCardBond {
|
|
4
|
+
vestingTerm: number;
|
|
5
|
+
payoutTokenName: string;
|
|
6
|
+
contractAddress: string;
|
|
7
|
+
discount: number;
|
|
8
|
+
chainId: ChainId;
|
|
9
|
+
}
|
|
10
|
+
declare const RecommendationCards: () => React.JSX.Element;
|
|
11
|
+
export default RecommendationCards;
|
|
@@ -1,4 +1,7 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { BondsProps } from './Bonds';
|
|
3
|
-
|
|
3
|
+
import { SDKProps } from '../../state/useSDKConfig';
|
|
4
|
+
interface Props extends SDKProps, BondsProps {
|
|
5
|
+
}
|
|
6
|
+
declare const BondsWithProviders: React.FC<Props>;
|
|
4
7
|
export default BondsWithProviders;
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { BondsData } from '../../types/bonds';
|
|
2
2
|
import { SortOptions } from './Bonds';
|
|
3
|
+
import { BillsConfig } from '@ape.swap/apeswap-lists';
|
|
3
4
|
export declare const isBondSoldOut: (bill: BondsData) => boolean;
|
|
4
5
|
export declare const sortBonds: (sortConfig?: SortOptions, bonds?: BondsData[]) => BondsData[];
|
|
5
|
-
export declare const
|
|
6
|
-
export declare const vestingTime: (vestingTerm: number) => {
|
|
6
|
+
export declare const vestingTime: (vestingTerm?: number) => {
|
|
7
7
|
years: number;
|
|
8
8
|
months: number;
|
|
9
9
|
days: number;
|
|
@@ -12,3 +12,6 @@ export declare const vestingTime: (vestingTerm: number) => {
|
|
|
12
12
|
seconds: number;
|
|
13
13
|
};
|
|
14
14
|
export declare const remainingPercentage: (bond: BondsData) => number;
|
|
15
|
+
export declare const getBillContractURL: (bond: BondsData | BillsConfig) => string;
|
|
16
|
+
export declare const getDiscountColor: (discount?: number) => string;
|
|
17
|
+
export declare const calculateARR: (bond: BondsData | BillsConfig) => string;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
export interface HistoricalPrices {
|
|
3
|
+
timestamp: string;
|
|
4
|
+
open: number;
|
|
5
|
+
close: number;
|
|
6
|
+
}
|
|
7
|
+
export interface ProjectViewProps {
|
|
8
|
+
chains?: number[];
|
|
9
|
+
bondAddress: string;
|
|
10
|
+
bondChain: string;
|
|
11
|
+
historicalPrices?: HistoricalPrices[] | null;
|
|
12
|
+
}
|
|
13
|
+
declare const ProjectView: React.FC<ProjectViewProps>;
|
|
14
|
+
export default ProjectView;
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
export declare const options: {
|
|
2
|
+
scales: {
|
|
3
|
+
y: {
|
|
4
|
+
grid: {
|
|
5
|
+
display: boolean;
|
|
6
|
+
color: string;
|
|
7
|
+
drawOnChartArea: boolean;
|
|
8
|
+
};
|
|
9
|
+
beginAtZero: boolean;
|
|
10
|
+
};
|
|
11
|
+
x: {
|
|
12
|
+
grid: {
|
|
13
|
+
display: boolean;
|
|
14
|
+
color: string;
|
|
15
|
+
drawOnChartArea: boolean;
|
|
16
|
+
};
|
|
17
|
+
};
|
|
18
|
+
};
|
|
19
|
+
plugins: {
|
|
20
|
+
legend: {
|
|
21
|
+
display: boolean;
|
|
22
|
+
};
|
|
23
|
+
};
|
|
24
|
+
pointRadius: number;
|
|
25
|
+
responsive: boolean;
|
|
26
|
+
maintainAspectRatio: boolean;
|
|
27
|
+
};
|
|
28
|
+
export interface ChartDataset {
|
|
29
|
+
label: string;
|
|
30
|
+
data: number[];
|
|
31
|
+
fill: boolean;
|
|
32
|
+
borderColor: string;
|
|
33
|
+
backgroundColor: string;
|
|
34
|
+
tension: number;
|
|
35
|
+
}
|
|
36
|
+
export interface ChartData {
|
|
37
|
+
labels: string[];
|
|
38
|
+
datasets: ChartDataset[];
|
|
39
|
+
}
|
|
40
|
+
export declare const chartOptions: {
|
|
41
|
+
label: string;
|
|
42
|
+
value: string;
|
|
43
|
+
}[];
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function stripDate(input: number): string;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { HistoricalPrices } from '../../../ProjectView';
|
|
3
|
+
declare const CandleStickChart: ({ historicalPrices, hasDiscount, bondPrice, tokenPrice, }: {
|
|
4
|
+
historicalPrices?: HistoricalPrices[] | null;
|
|
5
|
+
hasDiscount: boolean;
|
|
6
|
+
bondPrice: string;
|
|
7
|
+
tokenPrice: string;
|
|
8
|
+
}) => React.JSX.Element;
|
|
9
|
+
export default CandleStickChart;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { HistoricalPrices } from '../../../ProjectView';
|
|
3
|
+
declare const LineChart: ({ historicalPrices, hasDiscount, bondPrice, tokenPrice, }: {
|
|
4
|
+
historicalPrices?: HistoricalPrices[] | null;
|
|
5
|
+
hasDiscount: boolean;
|
|
6
|
+
bondPrice: string;
|
|
7
|
+
tokenPrice: string;
|
|
8
|
+
}) => React.JSX.Element;
|
|
9
|
+
export default LineChart;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const determineValues: (input: number) => [number, number];
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { BondsData } from '../../../../types/bonds';
|
|
3
|
+
import { HistoricalPrices } from '../../ProjectView';
|
|
4
|
+
declare const PriceChart: ({ selectedBond, historicalPrices, }: {
|
|
5
|
+
selectedBond: BondsData;
|
|
6
|
+
historicalPrices?: HistoricalPrices[] | null;
|
|
7
|
+
}) => React.JSX.Element;
|
|
8
|
+
export default PriceChart;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { SDKProps } from '../../state/useSDKConfig';
|
|
3
|
+
import { ProjectViewProps } from './ProjectView';
|
|
4
|
+
interface Props extends SDKProps, ProjectViewProps {
|
|
5
|
+
}
|
|
6
|
+
declare const ProjectViewWithProviders: React.FC<Props>;
|
|
7
|
+
export default ProjectViewWithProviders;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { SortableKeys } from '../../YourBonds';
|
|
3
|
+
declare const YourBondsMenu: ({ chainFilterOption, setChainFilterOption, filterOptions, filterOption, setFilterOption, setInputValue, inputValue, handleSort, }: {
|
|
4
|
+
chainFilterOption: string[];
|
|
5
|
+
setChainFilterOption: (newValue: string[]) => void;
|
|
6
|
+
filterOptions: string[];
|
|
7
|
+
filterOption: string;
|
|
8
|
+
setFilterOption: (newValue: string) => void;
|
|
9
|
+
setInputValue: (newValue: string) => void;
|
|
10
|
+
inputValue: string;
|
|
11
|
+
handleSort: (key: SortableKeys) => void;
|
|
12
|
+
}) => React.JSX.Element;
|
|
13
|
+
export default YourBondsMenu;
|
|
@@ -1,16 +1,4 @@
|
|
|
1
1
|
import { UserBill, UserOwnedBillsData } from '../../types/yourbonds';
|
|
2
2
|
import { BillsConfig, ChainId } from '@ape.swap/apeswap-lists';
|
|
3
|
-
/**
|
|
4
|
-
* Fetches user-owned bill NFT data for a given set of owned bills data, chain ID, and bills.
|
|
5
|
-
* @param ownedBillsData An array of objects containing the ID, bill NFT address, and contract address of the owned bills.
|
|
6
|
-
* @param chainId The ID of the blockchain network.
|
|
7
|
-
* @param bills An array of objects containing the contract address and user-owned bill NFT data.
|
|
8
|
-
* @returns An array of objects containing the ID and data of the user-owned bill NFTs.
|
|
9
|
-
*/
|
|
10
|
-
export declare const fetchUserOwnedBillNftData: (ownedBillsData: {
|
|
11
|
-
id: string;
|
|
12
|
-
billNftAddress: string;
|
|
13
|
-
contractAddress: string;
|
|
14
|
-
}[], chainId: ChainId, bills: BillsConfig[]) => Promise<any[]>;
|
|
15
3
|
export declare const fetchUserOwnedBillsDataAsync: (chainId: ChainId, account: string, bondData: BillsConfig[]) => Promise<UserOwnedBillsData[]>;
|
|
16
4
|
export declare const fetchUserOwnedBills: (chainId: ChainId, account: string, bonds: BillsConfig[]) => Promise<UserBill[]>;
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
export declare const getBillNftData: (billNftId: string, billNftAddress: string, chainId: number) => Promise<any>;
|
|
2
1
|
/**
|
|
3
2
|
* Retrieves batch data for a list of bill NFT IDs from the API.
|
|
3
|
+
* @param apiV2URL - prod or staging url to get NFT data from.
|
|
4
4
|
* @param billNftIds - An array of bill NFT IDs to retrieve data for.
|
|
5
5
|
* @param billNftAddress - The address of the bill NFT contract.
|
|
6
6
|
* @param chainId - The ID of the blockchain network to retrieve data from.
|
|
7
7
|
* @returns A Promise that resolves to the batch data for the specified bill NFT IDs, or null if an error occurs.
|
|
8
8
|
*/
|
|
9
|
-
export declare const getBillNftBatchData: (billNftIds: string[], billNftAddress: string, chainId: number) => Promise<any>;
|
|
9
|
+
export declare const getBillNftBatchData: (apiV2URL: string, billNftIds: string[], billNftAddress: string, chainId: number) => Promise<any>;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { BondRecommendation } from '../../../../state/bonds/useGetBondRecommendations';
|
|
2
|
+
declare const CardRecommendation: ({ cardIndex, bond, handleBuyBondClick, }: {
|
|
3
|
+
cardIndex: number;
|
|
4
|
+
bond: BondRecommendation;
|
|
5
|
+
handleBuyBondClick: (chain: number, bondAddress: string, cardIndex: number) => void;
|
|
6
|
+
}) => import("react").JSX.Element;
|
|
7
|
+
export default CardRecommendation;
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { BondRecommendation } from '../../../../state/bonds/useGetBondRecommendations';
|
|
3
|
+
declare const CardRecommendationsMobile: ({ recommendations }: {
|
|
4
|
+
recommendations: BondRecommendation[];
|
|
5
|
+
}) => React.JSX.Element;
|
|
6
|
+
export default CardRecommendationsMobile;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { UserBill } from '../../../../types/yourbonds';
|
|
3
|
+
declare const TransferAction: ({ userBill, toAddress, disabled, }: {
|
|
4
|
+
userBill?: UserBill;
|
|
5
|
+
toAddress?: string;
|
|
6
|
+
disabled?: boolean;
|
|
7
|
+
}) => React.JSX.Element;
|
|
8
|
+
export default TransferAction;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { UserBill } from '../../../../types/yourbonds';
|
|
3
|
+
interface TransferBillModalProps {
|
|
4
|
+
onDismiss?: () => void;
|
|
5
|
+
userBill?: UserBill;
|
|
6
|
+
}
|
|
7
|
+
declare const _default: React.NamedExoticComponent<TransferBillModalProps>;
|
|
8
|
+
export default _default;
|