@ape.swap/bonds-sdk 4.0.0-test.2 → 4.0.0-test.20

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.
Files changed (43) hide show
  1. package/README.md +30 -21
  2. package/dist/components/ConnectButton/AppKitButton.d.ts +3 -0
  3. package/dist/components/Tooltip/Tooltip.d.ts +1 -0
  4. package/dist/components/uikit-sdk/Svg/tokens/KATANA.d.ts +4 -0
  5. package/dist/components/uikit-sdk/Svg/tokens/UNICHAIN.d.ts +4 -0
  6. package/dist/components/uikit-sdk/Svg/tokens/index.d.ts +2 -0
  7. package/dist/components/uikit-sdk/Svg/types.d.ts +2 -0
  8. package/dist/config/constants/networks.d.ts +2 -0
  9. package/dist/config/constants/queryKeys.d.ts +1 -0
  10. package/dist/main.js +60189 -59852
  11. package/dist/state/allowance/useAllowance.d.ts +1 -1
  12. package/dist/state/balance/useCurrencyBalance.d.ts +1 -1
  13. package/dist/state/balance/useCurrencyBalanceSolana.d.ts +1 -1
  14. package/dist/state/bonds/useBondNFTData.d.ts +1 -1
  15. package/dist/state/bonds/useBondsData.d.ts +3 -4
  16. package/dist/state/bonds/useBondsList.d.ts +1 -1
  17. package/dist/state/bonds/useTierProofSignature.d.ts +1 -1
  18. package/dist/state/tokenList/useTokenList.d.ts +4 -2
  19. package/dist/state/tokenPrices/useSOLPrices.d.ts +3 -0
  20. package/dist/state/tokenPrices/useTokenPrices.d.ts +1 -1
  21. package/dist/state/useSDKConfig.d.ts +7 -3
  22. package/dist/styles.css +2 -1
  23. package/dist/types/bonds.d.ts +3 -1
  24. package/dist/types/yourbonds.d.ts +0 -1
  25. package/dist/utils/calculateSolanaTrueBillPrice.d.ts +5 -4
  26. package/dist/utils/displayHelpers.d.ts +2 -9
  27. package/dist/utils/formatNumber.d.ts +1 -1
  28. package/dist/utils/formatNumbers.d.ts +2 -1
  29. package/dist/utils/getSolanaAccount.d.ts +4 -4
  30. package/dist/utils/getTimePeriods.d.ts +11 -4
  31. package/dist/views/Bonds/components/BondRows/BondRowsWithTitle.d.ts +1 -0
  32. package/dist/views/Bonds/components/ChainBanner/ChainBanner.d.ts +6 -0
  33. package/dist/views/Bonds/utils.d.ts +1 -8
  34. package/dist/views/BuyBond/BuyBondModal.d.ts +8 -1
  35. package/dist/views/BuyBond/BuyBondSolana.d.ts +1 -0
  36. package/dist/views/YourBonds/components/UserBondRow/UserBondRow.d.ts +6 -0
  37. package/dist/views/{PreTGEBonds/components/PreTGEUserRows/PreTGEUserRow.d.ts → YourBonds/components/UserBondRow/UserBondRowPreTGE.d.ts} +2 -2
  38. package/dist/views/YourBonds/components/UserBondRow/index.d.ts +3 -6
  39. package/dist/views/YourBondsModal/YourSolanaBondsModal.d.ts +2 -2
  40. package/package.json +10 -8
  41. package/dist/views/Bonds/components/BannerTestnet/BannerTestnet.d.ts +0 -6
  42. /package/dist/views/{PreTGEBonds/components/PreTGEUserRows → YourBonds/components/UserBondRow}/PreTGEActions.d.ts +0 -0
  43. /package/dist/views/YourBonds/components/{UserBondRowSolana/index.d.ts → UserBondRow/UserBondRowSolana.d.ts} +0 -0
package/README.md CHANGED
@@ -6,8 +6,8 @@ The `@ape.swap/bonds-sdk` package provides an embeddable set of tools and UI com
6
6
 
7
7
  ## Key Features
8
8
 
9
- - Fully customizable bond views powered by the following components: `<FullBondsView />`, `<Bonds/>` & `<YourBonds />`.
10
- - Multi-chain support for a ever-growing array of Blockchains that currently include BNB Chain, Ethereum, Base, Polygon, Arbitrum, Lightlink, Linea, Graphlinq, IOTA and Crossfi.
9
+ - Fully customizable bond views powered by the following components: `<FullBondsView />`, `<Bonds/>`, `<YourBonds /> & <SingleBond />`.
10
+ - Multi-chain support for a ever-growing array of EVM and Non EVM Blockchains.
11
11
  - Prebuilt styles and layouts optimized for embedding.
12
12
  - Compatibility with the most popular web3 development library: Wagmi.
13
13
  - Plug-and-play configuration to fit various project requirements.
@@ -28,6 +28,15 @@ yarn add @ape.swap/bonds-sdk
28
28
 
29
29
  ---
30
30
 
31
+ ## Required Dependencies
32
+
33
+ The following are some key dependencies you must have for the SDK to work properly:
34
+
35
+ - **React**: Required to build the UI. Ensure your project uses React v18 or later.
36
+ - **Wagmi**: Used for handling wallet connections and blockchain interactions.
37
+
38
+ ---
39
+
31
40
  ## Basic Usage
32
41
 
33
42
  Here's an example of how to integrate the `@ape.swap/bonds-sdk` package into your project:
@@ -54,7 +63,7 @@ const MyBondsComponent = () => {
54
63
  ChainId.IOTA,
55
64
  ChainId.CROSSFI,
56
65
  ]}
57
- useRainbowKit={true}
66
+ connector={'rainbowkit'}
58
67
  useHotBonds={true}
59
68
  theme={{
60
69
  "radii": "10px",
@@ -83,19 +92,20 @@ export default MyBondsComponent
83
92
 
84
93
  The core of the SDK lies in its config object params, passed as a prop to its components. Below is a breakdown of key options:
85
94
 
86
- | Property | Type | Description |
87
- |-----------------|---------------------|----------------------------------------------------------------------------------------------------------------------------------------------------------------|
88
- | `referenceId` | `string` | A unique identifier for the bonds, shall be provided by ApeBond team. |
89
- | `chains` | `Array` | An array of supported chain IDs (e.g., `56`, `1`, `137`, etc). It also determines the order of the chains on the bond list. |
90
- | `useRainbowKit` | `boolean` | Whether to enable RainbowKit for wallet connections. Might be replaced for an enum in the near future. |
91
- | `useHotBonds` | `boolean` | Whether to show the "hot bonds" component. |
92
- | `theme` | `Object (optional)` | This is how you can customize the styles of the SDK. Override styles like colors, typography, and layout settings to match your project's branding. |
93
- | `tokenSymbol` | `string[]` | This parameter is specific to the `<SingleBond />` component. It defines the token(s) to display in the UI. Currently, only a single token (one element in the array) is supported.|
95
+ | Property | Type | Description |
96
+ |---------------|----------------------------|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
97
+ | `referenceId` | `string` | A unique identifier for the bonds, shall be provided by ApeBond team. |
98
+ | `chains` | `Array` | An array of supported chain IDs (e.g., `56`, `1`, `137`, etc). It also determines the order of the chains on the bond list. |
99
+ | `connector` | `'rainbowkit' or 'appkit'` | Determines your preferred wallet-connector. If your connector is not listed here get in contact with the dev team to request the integration. |
100
+ | `useHotBonds` | `boolean` | Whether to show the "hot bonds" component. |
101
+ | `theme` | `Object (optional)` | This is how you can customize the styles of the SDK. Override styles like colors, typography, and layout settings to match your project's branding. |
102
+ | `tokenSymbol` | `string[]` | This parameter is specific to the `<SingleBond />` component. It defines the token(s) to display in the UI. Currently, only a single token (one element in the array) is supported. |
94
103
 
95
104
  ### Chain Support
96
105
 
97
106
  The SDK currently supports the following chains:
98
107
 
108
+ EVM:
99
109
  - Binance Smart Chain (BSC)
100
110
  - Ethereum (MAINNET)
101
111
  - Polygon (MATIC)
@@ -106,6 +116,14 @@ The SDK currently supports the following chains:
106
116
  - Graphlinq
107
117
  - IOTA
108
118
  - CrossFi
119
+ - Unichain
120
+ - Berachain
121
+ - Sonic
122
+ - Katana
123
+ - Monad Testnet
124
+
125
+ Non-EVM:
126
+ - SOLANA
109
127
 
110
128
  The list get updated constantly, so make sure to use latest version of the SDK.
111
129
 
@@ -131,16 +149,7 @@ Once you are happy with the styles, make sure to copy the output styles object a
131
149
 
132
150
  To use a custom font in the theme, include the `customFont` property with the name of your desired font family. Please note that you will need to manually download the font and embed it in your project using a `<script>` or `<link>` tag in your HTML file.
133
151
 
134
- Bear in mind, that the components of the SDK will use the width and height provided by the parent component.
135
-
136
- ---
137
-
138
- ## Dependencies
139
-
140
- The following are some key dependencies you must have for the SDK to work properly:
141
-
142
- - **React**: Required to build the UI. Ensure your project uses React v18 or later.
143
- - **Wagmi**: Used for handling wallet connections and blockchain interactions.
152
+ Bear in mind, that the components of the SDK will use the width and height provided by the parent component, therefore, we recommend wrapping ApeBond SDK components with a div with the desired size.
144
153
 
145
154
  ---
146
155
 
@@ -0,0 +1,3 @@
1
+ import React from 'react';
2
+ declare const AppKitButton: () => React.JSX.Element;
3
+ export default AppKitButton;
@@ -8,6 +8,7 @@ export interface TooltipProps {
8
8
  audit?: string;
9
9
  chain: number;
10
10
  isSoldOut?: boolean;
11
+ billType?: string;
11
12
  }
12
13
  declare const BondInfoTooltip: React.FunctionComponent<TooltipProps>;
13
14
  export default BondInfoTooltip;
@@ -0,0 +1,4 @@
1
+ import React from 'react';
2
+ import { SvgProps } from '../types';
3
+ declare const KATANA: React.FC<SvgProps>;
4
+ export default KATANA;
@@ -0,0 +1,4 @@
1
+ import React from 'react';
2
+ import { SvgProps } from '../types';
3
+ declare const UNICHAIN: React.FC<SvgProps>;
4
+ export default UNICHAIN;
@@ -26,3 +26,5 @@ export { default as MONAD } from './MONAD';
26
26
  export { default as SONIC } from './SONIC';
27
27
  export { default as BERA } from './BERA';
28
28
  export { default as SOLANA } from './SOL';
29
+ export { default as KATANA } from './KATANA';
30
+ export { default as UNICHAIN } from './UNICHAIN';
@@ -57,6 +57,8 @@ export declare enum icons {
57
57
  SONIC = "sonic",
58
58
  BERA = "bera",
59
59
  SOL = "sol",
60
+ KATANA = "katana",
61
+ UNICHAIN = "unichain",
60
62
  DISCORD = "discord",
61
63
  REDDIT = "reddit",
62
64
  MEDIUM = "medium",
@@ -1,2 +1,4 @@
1
1
  import { ChainId } from '@ape.swap/apeswap-lists';
2
2
  export declare const PUBLIC_RPC_URLS: Partial<Record<ChainId, string[]>>;
3
+ export declare const HELIUS_SOL_RPC = "https://mainnet.helius-rpc.com/?api-key=d80b11e0-692f-4da0-91d6-830799c8c385";
4
+ export declare const getRPC: (chain: ChainId) => string;
@@ -23,6 +23,7 @@ export declare const QUERY_KEYS: {
23
23
  USER_BONDS: string;
24
24
  BOND_NFT_DATA: string;
25
25
  TOKEN_PRICES: string;
26
+ SOL_PRICES: string;
26
27
  HOT_BONDS: string;
27
28
  HOT_BONDS_CONTRACTS: string;
28
29
  CURRENCY_BALANCE: string;