@ape.swap/bonds-sdk 5.1.5-test.0 → 5.1.5

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 (2) hide show
  1. package/README.md +24 -1
  2. package/package.json +1 -1
package/README.md CHANGED
@@ -119,7 +119,30 @@ The core of the SDK lies in its config object params, passed as a prop to its co
119
119
  | `useHotBonds` | `boolean` | Whether to show the "hot bonds" component. |
120
120
  | `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. |
121
121
  | `hotBondsChains` | `number[]` | Determines the position of the hotbonds section. The component will be placed bellow the indicated chains. |
122
- | `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. |
122
+ | `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. |
123
+ | `customRPCS` | `Partial<Record<ChainId, string[]>>` (optional) | Override the default public RPC URLs for any supported chain. Useful when you have a private or dedicated RPC endpoint. **Required for Solana** — no public RPC is available. See [Custom RPCs](#custom-rpcs) for usage. |
124
+
125
+ ### Custom RPCs
126
+
127
+ By default the SDK uses a set of public RPC endpoints for each supported chain. If you have a private or dedicated RPC (e.g. from Alchemy, Infura, Helius, QuickNode, etc.) you can override them per-chain via the `customRPCS` prop. The custom URL takes priority; any chain not listed falls back to the SDK default.
128
+
129
+ > ⚠️ **Solana requires a custom RPC.** Unlike EVM chains, Solana does not provide a reliable public RPC endpoint. If your `chains` config includes Solana, you **must** supply a custom RPC for `ChainId.SOL` (e.g. from [Helius](https://helius.dev/) or [QuickNode](https://www.quicknode.com/)), otherwise Solana-related functionality will not work.
130
+
131
+ ```tsx
132
+ import { ChainId } from '@ape.swap/apeswap-lists'
133
+
134
+ <FullBondsView
135
+ referenceId="yourProjectId"
136
+ chains={[ChainId.BSC, ChainId.MAINNET]}
137
+ customRPCS={{
138
+ [ChainId.BSC]: ['https://bsc-mainnet.g.alchemy.com/v2/YOUR_KEY'],
139
+ [ChainId.MAINNET]: ['https://eth-mainnet.g.alchemy.com/v2/YOUR_KEY'],
140
+ [ChainId.SOL]: ['https://mainnet.helius-rpc.com/?api-key=YOUR_KEY'], // required for Solana
141
+ }}
142
+ />
143
+ ```
144
+
145
+ > **Note:** The `customRPCS` prop accepts an array of URLs per chain to allow future fallback support. Currently, only the first URL in each array is used.
123
146
 
124
147
  ### Chain Support
125
148
 
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": "5.1.5-test.0",
6
+ "version": "5.1.5",
7
7
  "module": "dist/main.js",
8
8
  "type": "module",
9
9
  "types": "dist/main.d.ts",