@zkp2p/pay-shared 3.0.0 → 3.1.0

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/README.md CHANGED
@@ -9,7 +9,7 @@ Shared TypeScript types, enums, and chain utilities used by ZKP2P Pay API, SDK,
9
9
  ## Install
10
10
 
11
11
  ```bash
12
- npm install @zkp2p/pay-shared@3.0.0
12
+ npm install @zkp2p/pay-shared@3.1.0
13
13
  ```
14
14
 
15
15
  ## Published artifacts
package/dist/types.d.ts CHANGED
@@ -229,6 +229,35 @@ export type CheckoutNearbySuggestions = {
229
229
  below: CheckoutNearbySuggestion[];
230
230
  above: CheckoutNearbySuggestion[];
231
231
  };
232
+ export type QuoteAvailabilityRequest = {
233
+ amount: string;
234
+ quoteMode: CheckoutModeType;
235
+ fiatCurrency?: string;
236
+ destinationChainId: string | number;
237
+ destinationToken: string;
238
+ destinationAddress: string;
239
+ /** Max suggestions PER DIRECTION (1-10, API default 3). A response can carry up to 2x this. */
240
+ nearbyQuotesCount?: number;
241
+ };
242
+ export type QuoteAvailabilitySuggestion = {
243
+ suggestedAmount: string;
244
+ percentDifference: string;
245
+ rail: string;
246
+ paymentAmount: string;
247
+ paymentCurrency: string;
248
+ tokenAmount: string;
249
+ conversionRate: string;
250
+ };
251
+ export type QuoteAvailabilitySuggestions = {
252
+ below: QuoteAvailabilitySuggestion[];
253
+ above: QuoteAvailabilitySuggestion[];
254
+ };
255
+ /** `nearbySuggestions` is always null when `available` is true. */
256
+ export type QuoteAvailability = {
257
+ available: boolean;
258
+ quoteCount: number;
259
+ nearbySuggestions: QuoteAvailabilitySuggestions | null;
260
+ };
232
261
  export type CheckoutQuotes = {
233
262
  orderId: string;
234
263
  fiatCurrency: string;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@zkp2p/pay-shared",
3
- "version": "3.0.0",
3
+ "version": "3.1.0",
4
4
  "description": "Shared TypeScript types, enums, and chain utilities used by ZKP2P Pay API, SDK, and frontend apps.",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",