@ape.swap/bonds-sdk 4.1.0-test.1 → 4.1.0-test.11
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/hooks/{useMonitorTxHash.d.ts → useMonitorTx.d.ts} +1 -1
- package/dist/main.d.ts +2 -1
- package/dist/main.js +489 -474
- package/dist/state/bonds/useBondNFTData.d.ts +3 -0
- package/dist/state/bonds/useUserBonds.d.ts +1 -1
- package/dist/state/tokenPrices/useTokenPrices.d.ts +1 -1
- package/dist/styles.css +4 -4
- package/dist/types/yourbonds.d.ts +2 -0
- package/dist/utils/displayHelpers.d.ts +2 -0
- package/dist/utils/getBalanceNumber.d.ts +1 -1
- package/dist/views/BuyBond/BuyComponentSolana.d.ts +3 -3
- package/dist/views/YourBonds/components/ProfitCard/ProfitCard.d.ts +6 -0
- package/dist/views/YourBonds/components/UserBondRow/UserBondRowSolana.d.ts +2 -1
- package/dist/views/YourBondsModal/YourBondsModal.d.ts +2 -3
- package/dist/views/YourBondsModal/YourBondsModalSolana.d.ts +4 -4
- package/package.json +5 -5
|
@@ -1,5 +1,8 @@
|
|
|
1
1
|
import { UseQueryResult } from '@tanstack/react-query';
|
|
2
2
|
import { ChainId } from '@ape.swap/apeswap-lists';
|
|
3
3
|
import { UserBillNftData } from '../../types/yourbonds';
|
|
4
|
+
/**
|
|
5
|
+
* @deprecated This hook is deprecated and will be removed in future releases. Do NOT use.
|
|
6
|
+
*/
|
|
4
7
|
export default function useBondNFTData(id?: string, billNftAddress?: string, chainId?: ChainId): UseQueryResult<UserBillNftData | null>;
|
|
5
8
|
export declare const getBondNFTData: (apiV2URL: string, id: string, billNftAddress: string, chainId: ChainId) => Promise<UserBillNftData | null>;
|
|
@@ -2,5 +2,5 @@ import { UseQueryResult } from '@tanstack/react-query';
|
|
|
2
2
|
import { BillsConfig, ChainId } from '@ape.swap/apeswap-lists';
|
|
3
3
|
import { UserBill } from '../../types/yourbonds';
|
|
4
4
|
import { TokenPrices } from '../tokenPrices/useTokenPrices';
|
|
5
|
-
export default function useUserBonds(): UseQueryResult<UserBill[]>;
|
|
5
|
+
export default function useUserBonds(dontFetch?: boolean): UseQueryResult<UserBill[]>;
|
|
6
6
|
export declare const getUserBonds: (account: string, solanaAccount: string, bondList: BillsConfig[], chains: number[], tokenPrices: Partial<Record<ChainId, TokenPrices[]>>, apiUrl?: string) => Promise<UserBill[]>;
|
|
@@ -12,4 +12,4 @@ export interface TokenPrices {
|
|
|
12
12
|
secondsAgoUpdated: number;
|
|
13
13
|
}
|
|
14
14
|
export default function useTokenPrices(): UseQueryResult<Partial<Record<ChainId, TokenPrices[]>>>;
|
|
15
|
-
export declare const getTokenPrices: (priceApi: string) => Promise<Partial<Record<ChainId, TokenPrices[]>>>;
|
|
15
|
+
export declare const getTokenPrices: (priceApi: string, apiv2: string) => Promise<Partial<Record<ChainId, TokenPrices[]>>>;
|
package/dist/styles.css
CHANGED
|
@@ -784,7 +784,7 @@ span.flex-inline {
|
|
|
784
784
|
}
|
|
785
785
|
@media screen and (min-width: 1000px) {
|
|
786
786
|
.bonds-menu .search-container {
|
|
787
|
-
width:
|
|
787
|
+
width: 30%;
|
|
788
788
|
}
|
|
789
789
|
}
|
|
790
790
|
.bonds-menu .headers-container {
|
|
@@ -795,7 +795,7 @@ span.flex-inline {
|
|
|
795
795
|
@media screen and (min-width: 1000px) {
|
|
796
796
|
.bonds-menu .headers-container {
|
|
797
797
|
justify-content: space-between;
|
|
798
|
-
width:
|
|
798
|
+
width: 70%;
|
|
799
799
|
}
|
|
800
800
|
}
|
|
801
801
|
.bonds-menu .discount-header {
|
|
@@ -983,7 +983,7 @@ html {
|
|
|
983
983
|
}
|
|
984
984
|
@media screen and (min-width: 1000px) {
|
|
985
985
|
.your-bonds .token-info-container {
|
|
986
|
-
width:
|
|
986
|
+
width: 30%;
|
|
987
987
|
}
|
|
988
988
|
}
|
|
989
989
|
.your-bonds .token-info-container .tooltip-column {
|
|
@@ -1006,7 +1006,7 @@ html {
|
|
|
1006
1006
|
}
|
|
1007
1007
|
@media screen and (min-width: 1000px) {
|
|
1008
1008
|
.your-bonds .your-bonds-columns-container {
|
|
1009
|
-
width:
|
|
1009
|
+
width: 70%;
|
|
1010
1010
|
justify-content: space-between;
|
|
1011
1011
|
flex-direction: row;
|
|
1012
1012
|
padding-right: 20px;
|
|
@@ -7,6 +7,7 @@ export interface UserOwnedBillsData {
|
|
|
7
7
|
export interface UserBill {
|
|
8
8
|
address: string;
|
|
9
9
|
id: string;
|
|
10
|
+
asset?: string;
|
|
10
11
|
vesting: string;
|
|
11
12
|
payout: string;
|
|
12
13
|
totalPayout?: string;
|
|
@@ -16,6 +17,7 @@ export interface UserBill {
|
|
|
16
17
|
billNftAddress: string;
|
|
17
18
|
payoutClaimed: string;
|
|
18
19
|
bond?: BondsData;
|
|
20
|
+
nftData?: UserBillNftData;
|
|
19
21
|
}
|
|
20
22
|
export interface UserBillNftData {
|
|
21
23
|
tokenId: number;
|
|
@@ -10,6 +10,8 @@ export declare const claimed: (userBill?: UserBill) => number;
|
|
|
10
10
|
export declare const claimedUSD: (userBill?: UserBill) => number;
|
|
11
11
|
export declare const vestingTimeRemaining: (userBill: UserBill) => import("./getTimePeriods").TimeLeft;
|
|
12
12
|
export declare const vestingTimeRemainingString: (userBill?: UserBill) => string;
|
|
13
|
+
export declare const getPercentageVested: (bond?: UserBill) => number;
|
|
14
|
+
export declare const getTimeLeftForFullyVested: (bond?: UserBill) => number;
|
|
13
15
|
export declare const getPendingVestingString: (bond?: UserBill) => string;
|
|
14
16
|
export declare const getVestingTermsString: (bond?: BondsData | BillsConfig) => string;
|
|
15
17
|
export declare const getVestingTermsTooltipString: (bond?: BondsData | BillsConfig) => string | undefined;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import BigNumber from 'bignumber.js';
|
|
2
|
-
export declare const getBalanceNumber: (balance: BigNumber, decimals?: number) => number;
|
|
2
|
+
export declare const getBalanceNumber: (balance: BigNumber | string | number, decimals?: number) => number;
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
export interface
|
|
2
|
+
export interface BuyComponentSolanaProps {
|
|
3
3
|
onDismiss?: () => void;
|
|
4
4
|
bondAddress?: string;
|
|
5
5
|
bondChain?: number;
|
|
6
6
|
setBillId?: (id: string) => void;
|
|
7
7
|
isProjectView?: boolean;
|
|
8
8
|
}
|
|
9
|
-
declare const
|
|
10
|
-
export default
|
|
9
|
+
declare const BuyComponentSolana: React.FC<BuyComponentSolanaProps>;
|
|
10
|
+
export default BuyComponentSolana;
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
|
|
3
|
-
|
|
2
|
+
declare const YourBondsModal: ({ billId, onDismiss }: {
|
|
3
|
+
billId: string;
|
|
4
4
|
onDismiss?: () => void;
|
|
5
|
-
bill?: UserBill;
|
|
6
5
|
}) => React.JSX.Element;
|
|
7
6
|
export default YourBondsModal;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import
|
|
2
|
-
declare const YourBondsModalSolana: ({
|
|
1
|
+
import React from 'react';
|
|
2
|
+
declare const YourBondsModalSolana: ({ billId, onDismiss }: {
|
|
3
|
+
billId: string;
|
|
3
4
|
onDismiss?: () => void;
|
|
4
|
-
|
|
5
|
-
}) => import("react").JSX.Element;
|
|
5
|
+
}) => React.JSX.Element;
|
|
6
6
|
export default YourBondsModalSolana;
|
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": "4.1.0-test.
|
|
6
|
+
"version": "4.1.0-test.11",
|
|
7
7
|
"module": "dist/main.js",
|
|
8
8
|
"type": "module",
|
|
9
9
|
"types": "dist/main.d.ts",
|
|
@@ -35,11 +35,11 @@
|
|
|
35
35
|
"@solana/kit": "2.1.1",
|
|
36
36
|
"@solana/spl-token": "^0.4.13",
|
|
37
37
|
"@solana/wallet-adapter-react": "^0.15.39",
|
|
38
|
-
"@solana/wallet-adapter-react-ui": "^0.9.
|
|
38
|
+
"@solana/wallet-adapter-react-ui": "^0.9.39",
|
|
39
39
|
"@solana/web3.js": "^1.98.4",
|
|
40
|
-
"axios": "1.8.2",
|
|
41
|
-
"react": "
|
|
42
|
-
"react-dom": "
|
|
40
|
+
"axios": "^1.8.2",
|
|
41
|
+
"react": ">=17 <19",
|
|
42
|
+
"react-dom": ">=17 <19",
|
|
43
43
|
"wagmi": "^2.14.16"
|
|
44
44
|
},
|
|
45
45
|
"devDependencies": {
|