@ape.swap/bonds-sdk 3.0.85 → 3.0.87
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/config/constants/queryKeys.d.ts +0 -1
- package/dist/main.js +610 -573
- package/dist/state/bonds/useBondsData.d.ts +2 -2
- package/dist/state/bonds/utils.d.ts +4 -0
- package/dist/state/preTGEBonds/usePreTGEList.d.ts +3 -3
- package/dist/state/preTGEBonds/usePreTGEUserBonds.d.ts +9 -21
- package/dist/state/useSDKConfig.d.ts +1 -2
- package/dist/types/bonds.d.ts +14 -31
- package/dist/views/Bonds/components/BondRows/BondRow.d.ts +2 -1
- package/dist/views/Bonds/components/BondRows/BondRowsByChain.d.ts +2 -2
- package/dist/views/Bonds/components/BondRows/BondRowsWithTitle.d.ts +2 -2
- package/dist/views/Bonds/components/BondRows/ModalHandler.d.ts +2 -2
- package/dist/views/Bonds/components/BonusComponents/PreTGEBonusTable.d.ts +6 -0
- package/dist/views/PreTGEBonds/components/BuyComponent/BondCards.d.ts +2 -2
- package/dist/views/PreTGEBonds/components/BuyComponent/ParticipationSuccessful.d.ts +3 -3
- package/dist/views/PreTGEBonds/components/BuyComponent/PreTGEBuyComponent.d.ts +8 -0
- package/dist/views/ProjectView/components/BondLeaderboard/components/SalesTable.d.ts +1 -1
- package/dist/views/ProjectView/components/BondLeaderboard/components/TopSaleCard.d.ts +1 -1
- package/dist/views/ProjectView/components/BondLeaderboard/components/TopThreeSalesCards.d.ts +1 -1
- package/package.json +3 -3
- package/dist/state/preTGEBonds/usePreTGEBondsData.d.ts +0 -24
- package/dist/views/PreTGEBonds/components/BuyComponent/BuyAction.d.ts +0 -10
- package/dist/views/PreTGEBonds/components/BuyComponent/BuyComponent.d.ts +0 -7
- package/dist/views/PreTGEBonds/components/PreTGERows/BonusTable.d.ts +0 -6
- package/dist/views/PreTGEBonds/components/PreTGERows/PreTGERows.d.ts +0 -5
- /package/dist/state/{bonds → balance}/useUserTokensBalance.d.ts +0 -0
- /package/dist/state/{bonds → bondApiStats}/useUserApiStats.d.ts +0 -0
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { UseQueryResult } from '@tanstack/react-query';
|
|
2
2
|
import { BondsData } from '../../types/bonds';
|
|
3
3
|
import { TokenPrices } from '../tokenPrices/useTokenPrices';
|
|
4
|
-
import { BillsConfig } from '@ape.swap/apeswap-lists';
|
|
4
|
+
import { BillsConfig, PreTGEConfig } from '@ape.swap/apeswap-lists';
|
|
5
5
|
import BigNumber from 'bignumber.js';
|
|
6
6
|
export default function useBondsData(): UseQueryResult<BondsData[]>;
|
|
7
|
-
export declare const getBondsData: (chains: number[],
|
|
7
|
+
export declare const getBondsData: (chains: number[], tokenPrices?: TokenPrices[], bondList?: BillsConfig[], preTGEList?: PreTGEConfig[], realTimeApiURL?: string, apiUrl?: string) => Promise<BondsData[]>;
|
|
8
8
|
export declare const getBonusWithFee: (feeInPayout: number, trueBillPrice: BigNumber, lpPrice: number, earnTokenPrice: number) => number;
|
|
9
9
|
export declare const getRawBonus: (trueBillPrice: any, lpPrice: number, earnTokenPrice: number) => number;
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import { BondsData } from '../../types/bonds';
|
|
2
|
+
import { PreTGEConfig } from '@ape.swap/apeswap-lists';
|
|
3
|
+
import { TokenPrices } from '../tokenPrices/useTokenPrices';
|
|
4
|
+
export declare const getPreTGEBondsData: (chain: number, tokenPrices: TokenPrices[], preTGEBonds: PreTGEConfig[], apiUrl?: string) => Promise<BondsData[]>;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import { UseQueryResult } from '@tanstack/react-query';
|
|
2
|
-
import {
|
|
3
|
-
export default function usePreTGEList(): UseQueryResult<
|
|
4
|
-
export declare const getPreTGEList: (apiRealTimeURL: string, apiUrl: string) => Promise<
|
|
2
|
+
import { PreTGEConfig } from '@ape.swap/apeswap-lists';
|
|
3
|
+
export default function usePreTGEList(): UseQueryResult<PreTGEConfig[]>;
|
|
4
|
+
export declare const getPreTGEList: (apiRealTimeURL: string, apiUrl: string) => Promise<PreTGEConfig[]>;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { UseQueryResult } from '@tanstack/react-query';
|
|
2
|
-
import {
|
|
3
|
-
import { UserBill
|
|
4
|
-
import {
|
|
2
|
+
import { PreTGEConfig } from '@ape.swap/apeswap-lists';
|
|
3
|
+
import { UserBill } from '../../types/yourbonds';
|
|
4
|
+
import { TokenPrices } from '../tokenPrices/useTokenPrices';
|
|
5
5
|
export interface AccountInfo {
|
|
6
6
|
hasRedeemed: boolean;
|
|
7
7
|
hasRefunded?: boolean;
|
|
@@ -14,25 +14,13 @@ export interface AccountInfo {
|
|
|
14
14
|
lastClaimTimestamp: string;
|
|
15
15
|
truePricePaid: string;
|
|
16
16
|
}
|
|
17
|
-
export interface PreTGEUserBonds extends
|
|
18
|
-
trueBillPrice?: string;
|
|
19
|
-
principalTokenPrice?: number;
|
|
20
|
-
earnTokenPrice?: number;
|
|
21
|
-
finalized?: boolean;
|
|
17
|
+
export interface PreTGEUserBonds extends PreTGEConfig {
|
|
22
18
|
accountInfo?: AccountInfo;
|
|
23
19
|
userOwnedBillsData?: UserBill;
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
minPoints?: string;
|
|
29
|
-
maxPoints?: string;
|
|
30
|
-
vestingTerm: string;
|
|
31
|
-
initTime: number;
|
|
32
|
-
finishTime: number;
|
|
33
|
-
startVestingTimestamp: number;
|
|
34
|
-
initPrice: number;
|
|
35
|
-
initialRelease: number;
|
|
20
|
+
finalized?: boolean;
|
|
21
|
+
initPrice?: number;
|
|
22
|
+
initialRelease?: number;
|
|
23
|
+
earnTokenPrice?: number;
|
|
36
24
|
}
|
|
37
25
|
export default function usePreTGEUserBonds(): UseQueryResult<PreTGEUserBonds[]>;
|
|
38
|
-
export declare const fetchPreTGEUserBonds: (
|
|
26
|
+
export declare const fetchPreTGEUserBonds: (chains: number[], tokenPrices: TokenPrices[], preTGEList: PreTGEConfig[], account: string, apiUrl: string) => Promise<PreTGEUserBonds[]>;
|
|
@@ -13,7 +13,6 @@ export declare const useSDKConfig: (config?: SDKProps) => {
|
|
|
13
13
|
urls: {
|
|
14
14
|
apiV2: string;
|
|
15
15
|
realTimeApi: string;
|
|
16
|
-
apeswapLists: string;
|
|
17
16
|
mainUrl: string;
|
|
18
17
|
};
|
|
19
18
|
highestCompatibleVersion: string;
|
|
@@ -26,5 +25,5 @@ export declare const useSDKConfig: (config?: SDKProps) => {
|
|
|
26
25
|
showLowValueBonds: boolean;
|
|
27
26
|
theme?: any;
|
|
28
27
|
};
|
|
29
|
-
export type URLKeys = 'apiV2' | 'realTimeApi' | '
|
|
28
|
+
export type URLKeys = 'apiV2' | 'realTimeApi' | 'mainUrl';
|
|
30
29
|
export declare const useURLByEnvironment: (key: URLKeys) => string;
|
package/dist/types/bonds.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { BillsConfig, PreTGEConfig } from '@ape.swap/apeswap-lists';
|
|
2
2
|
export interface TrueBondPrices {
|
|
3
3
|
points: string;
|
|
4
4
|
trueBondPrice: string;
|
|
@@ -6,40 +6,23 @@ export interface TrueBondPrices {
|
|
|
6
6
|
bonusWithFee: number;
|
|
7
7
|
boost?: number;
|
|
8
8
|
}
|
|
9
|
-
export interface BondsData {
|
|
10
|
-
index?: number;
|
|
11
|
-
cmcId?: number;
|
|
12
|
-
chainId: ChainId;
|
|
13
|
-
type?: string;
|
|
14
|
-
trueBondPrices?: TrueBondPrices[];
|
|
15
|
-
version: string;
|
|
16
|
-
feeInPayout?: number;
|
|
17
|
-
billAddress?: string;
|
|
18
|
-
billType: string;
|
|
19
|
-
billNftAddress?: string;
|
|
20
|
-
soldOut?: boolean;
|
|
21
|
-
inactive?: boolean;
|
|
9
|
+
export interface BondsData extends PreTGEConfig, BillsConfig {
|
|
22
10
|
maxTotalPayout?: string;
|
|
23
11
|
totalPayoutGiven?: string;
|
|
24
12
|
maxPayout?: string;
|
|
25
13
|
tokensRemaining?: string;
|
|
26
14
|
showcaseTokenName?: string;
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
principalTokenPrice?: string;
|
|
15
|
+
feeInPayout?: number;
|
|
16
|
+
trueBondPrices?: TrueBondPrices[];
|
|
30
17
|
payoutTokenPrice?: string;
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
billArt?: {
|
|
42
|
-
collection: string;
|
|
43
|
-
};
|
|
44
|
-
warningCard?: string;
|
|
18
|
+
principalTokenPrice?: string;
|
|
19
|
+
initialRelease?: number;
|
|
20
|
+
totalPrincipalBilled?: string;
|
|
21
|
+
totalRaise?: string;
|
|
22
|
+
finalized?: boolean;
|
|
23
|
+
minPoints?: string;
|
|
24
|
+
maxPoints?: string;
|
|
25
|
+
startVestingTimestamp?: string;
|
|
26
|
+
finishTime?: number;
|
|
27
|
+
initPrice?: number;
|
|
45
28
|
}
|
|
@@ -5,8 +5,9 @@ interface BondRowProps {
|
|
|
5
5
|
bondAddress: string;
|
|
6
6
|
bondChain: ChainId;
|
|
7
7
|
payoutToken: Token;
|
|
8
|
+
billType: string;
|
|
8
9
|
tag?: string;
|
|
9
|
-
bondSoldOut
|
|
10
|
+
bondSoldOut?: boolean;
|
|
10
11
|
trueBondPrices?: TrueBondPrices[];
|
|
11
12
|
minTier?: LaunchBondTiers;
|
|
12
13
|
bonus?: string;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { BondsData } from '../../../../types/bonds';
|
|
3
|
-
import {
|
|
3
|
+
import { BaseBondConfig } from '@ape.swap/apeswap-lists';
|
|
4
4
|
export interface BondRowsByChainProps {
|
|
5
|
-
bonds: (BondsData |
|
|
5
|
+
bonds: (BondsData | BaseBondConfig)[];
|
|
6
6
|
hideTitles: boolean;
|
|
7
7
|
}
|
|
8
8
|
declare const BondRowsByChain: React.FC<BondRowsByChainProps>;
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { BondsData } from '../../../../types/bonds';
|
|
3
|
-
import {
|
|
3
|
+
import { BaseBondConfig } from '@ape.swap/apeswap-lists';
|
|
4
4
|
export interface BondRowsWithTitleProps {
|
|
5
5
|
chain: number;
|
|
6
|
-
bonds: (BondsData |
|
|
6
|
+
bonds: (BondsData | BaseBondConfig)[];
|
|
7
7
|
showHotBonds: boolean;
|
|
8
8
|
}
|
|
9
9
|
declare const BondRowsWithTitle: React.FC<BondRowsWithTitleProps>;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
declare const ModalHandler: ({ onDismiss, bondAddress, bondChain, }: {
|
|
3
3
|
onDismiss?: () => void;
|
|
4
|
-
bondAddress
|
|
5
|
-
bondChain
|
|
4
|
+
bondAddress: string;
|
|
5
|
+
bondChain: number;
|
|
6
6
|
}) => React.JSX.Element;
|
|
7
7
|
export default ModalHandler;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import {
|
|
2
|
+
import { BondsData } from '../../../../types/bonds';
|
|
3
3
|
declare const BondCards: ({ bond }: {
|
|
4
|
-
bond:
|
|
4
|
+
bond: BondsData;
|
|
5
5
|
}) => React.JSX.Element;
|
|
6
6
|
export default BondCards;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import {
|
|
3
|
-
declare const ParticipationSuccessful: ({ onDismiss,
|
|
2
|
+
import { BondsData } from '../../../../types/bonds';
|
|
3
|
+
declare const ParticipationSuccessful: ({ onDismiss, bond, inputAmount, }: {
|
|
4
4
|
onDismiss?: () => void;
|
|
5
|
-
|
|
5
|
+
bond: BondsData;
|
|
6
6
|
inputAmount?: string;
|
|
7
7
|
}) => React.JSX.Element;
|
|
8
8
|
export default ParticipationSuccessful;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
declare const PreTGEBuyComponent: ({ bondAddress, bondChain, onDismiss, handlePurchasedBond, }: {
|
|
3
|
+
bondAddress: string;
|
|
4
|
+
bondChain: number;
|
|
5
|
+
onDismiss?: () => void;
|
|
6
|
+
handlePurchasedBond: (hash: string, inputAmount: string) => void;
|
|
7
|
+
}) => React.JSX.Element;
|
|
8
|
+
export default PreTGEBuyComponent;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import { Sales } from '../../../../../state/
|
|
2
|
+
import { Sales } from '../../../../../state/bondApiStats/useUserApiStats';
|
|
3
3
|
declare const SalesTable: ({ allSales }: {
|
|
4
4
|
allSales: Sales[] | undefined;
|
|
5
5
|
}) => React.JSX.Element;
|
package/dist/views/ProjectView/components/BondLeaderboard/components/TopThreeSalesCards.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import { Sales } from '../../../../../state/
|
|
2
|
+
import { Sales } from '../../../../../state/bondApiStats/useUserApiStats';
|
|
3
3
|
declare const TopThreeSalesCards: ({ topThreeSales }: {
|
|
4
4
|
topThreeSales?: Sales[];
|
|
5
5
|
}) => React.JSX.Element;
|
package/package.json
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
"description": "Ape Bond SDK",
|
|
4
4
|
"author": "Ape Bond",
|
|
5
5
|
"license": "MIT",
|
|
6
|
-
"version": "3.0.
|
|
6
|
+
"version": "3.0.87",
|
|
7
7
|
"module": "dist/main.js",
|
|
8
8
|
"type": "module",
|
|
9
9
|
"types": "dist/main.d.ts",
|
|
@@ -18,7 +18,7 @@
|
|
|
18
18
|
"compile-scss": "sass src/scss/index.scss dist/styles.css --no-source-map",
|
|
19
19
|
"format:write": "prettier --write \"**/*.{js,jsx,ts,tsx,json}\" --config .prettierrc",
|
|
20
20
|
"format:check": "prettier --check \"**/*.{js,jsx,ts,tsx,json}\" --config .prettierrc",
|
|
21
|
-
"lint": "tsc --noEmit --skipLibCheck",
|
|
21
|
+
"lint": "eslint && tsc --noEmit --skipLibCheck",
|
|
22
22
|
"prepare": "husky"
|
|
23
23
|
},
|
|
24
24
|
"lint-staged": {
|
|
@@ -68,7 +68,7 @@
|
|
|
68
68
|
"yalc": "^1.0.0-pre.53"
|
|
69
69
|
},
|
|
70
70
|
"dependencies": {
|
|
71
|
-
"@ape.swap/apeswap-lists": "4.3.
|
|
71
|
+
"@ape.swap/apeswap-lists": "4.3.25",
|
|
72
72
|
"@emotion/react": "11.11.4",
|
|
73
73
|
"bignumber.js": "^9.1.2",
|
|
74
74
|
"chart.js": "4.2.0",
|
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
import { UseQueryResult } from '@tanstack/react-query';
|
|
2
|
-
import { PreTGEBond } from '@ape.swap/apeswap-lists';
|
|
3
|
-
import { UserBill, UserBillNftData } from '../../types/yourbonds';
|
|
4
|
-
export interface PreTGEBondData extends PreTGEBond {
|
|
5
|
-
trueBillPrice?: string;
|
|
6
|
-
principalTokenPrice?: number;
|
|
7
|
-
earnTokenPrice?: number;
|
|
8
|
-
finalized?: boolean;
|
|
9
|
-
userOwnedBillsData?: UserBill;
|
|
10
|
-
userOwnedBillsNftData?: UserBillNftData;
|
|
11
|
-
totalRaise?: string;
|
|
12
|
-
totalPrincipalBilled?: string;
|
|
13
|
-
maxTotalPayout?: string;
|
|
14
|
-
minPoints?: string;
|
|
15
|
-
maxPoints?: string;
|
|
16
|
-
vestingTerm: string;
|
|
17
|
-
initTime: number;
|
|
18
|
-
finishTime: number;
|
|
19
|
-
startVestingTimestamp: number;
|
|
20
|
-
initPrice: number;
|
|
21
|
-
initialRelease: number;
|
|
22
|
-
}
|
|
23
|
-
export default function usePreTGEBondsData(): UseQueryResult<PreTGEBondData[]>;
|
|
24
|
-
export declare const getLaunchBondsPublicData: (preTGEBonds: PreTGEBond[], chains: number[], apiUrl?: string) => Promise<PreTGEBondData[]>;
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import { Token } from '@ape.swap/apeswap-lists';
|
|
3
|
-
import { PreTGEBondData } from '../../../../state/preTGEBonds/usePreTGEBondsData';
|
|
4
|
-
declare const BuyAction: ({ launchBond, inputValue, selectedCurrency, soldout, }: {
|
|
5
|
-
selectedCurrency: Token;
|
|
6
|
-
inputValue: string;
|
|
7
|
-
launchBond: PreTGEBondData;
|
|
8
|
-
soldout: boolean;
|
|
9
|
-
}) => React.JSX.Element;
|
|
10
|
-
export default BuyAction;
|
|
File without changes
|
|
File without changes
|