@coin-voyage/shared 2.3.1 → 2.3.2

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.
@@ -1,5 +1,5 @@
1
1
  import { type PayOrder, PayOrderMode } from "../types";
2
- import type { ClaimFeesRequest, ClaimFeesResponse, CreateWebhookRequest, GetFeeBalancesResponse, OrderStatusSocket, PaymentDetails, PaymentDetailsParams, PayOrderParams, PayOrderQuoteParams, QuoteWithBalance, RouteQuote, SwapDataRequest, SwapDataResponse, SwapQuoteRequest, UpdateWebhookRequest, WebhookResponse } from "../types/api";
2
+ import type { ClaimFeesRequest, ClaimFeesResponse, CreateWebhookRequest, GetFeeBalancesResponse, OrderStatusSocket, PaymentDetails, PaymentDetailsParams, PayOrderParams, PayOrderQuoteParams, RouteQuote, SwapDataRequest, SwapDataResponse, SwapQuoteRequest, SwapQuoteResponse, UpdateWebhookRequest, WebhookResponse } from "../types/api";
3
3
  import { type APIEnvironment } from "./config";
4
4
  import { type APIResponse } from "./fetcher";
5
5
  export declare class ApiClient {
@@ -262,9 +262,9 @@ export declare class ApiClient {
262
262
  * Gets a quote for swapping between two currencies.
263
263
  *
264
264
  * @param {SwapQuoteRequest} params - Parameters for the swap quote.
265
- * @returns {Promise<APIResponse<QuoteWithBalance>>} - Swap quote wrapped in an API response.
265
+ * @returns {Promise<APIResponse<SwapQuoteResponse>>} - Swap quote wrapped in an API response.
266
266
  */
267
- swapQuote(params: SwapQuoteRequest): Promise<APIResponse<QuoteWithBalance>>;
267
+ swapQuote(params: SwapQuoteRequest): Promise<APIResponse<SwapQuoteResponse>>;
268
268
  /**
269
269
  * Gets transaction data for executing a swap.
270
270
  *
@@ -430,7 +430,7 @@ export class ApiClient {
430
430
  * Gets a quote for swapping between two currencies.
431
431
  *
432
432
  * @param {SwapQuoteRequest} params - Parameters for the swap quote.
433
- * @returns {Promise<APIResponse<QuoteWithBalance>>} - Swap quote wrapped in an API response.
433
+ * @returns {Promise<APIResponse<SwapQuoteResponse>>} - Swap quote wrapped in an API response.
434
434
  */
435
435
  async swapQuote(params) {
436
436
  return this.request({
@@ -99,6 +99,13 @@ export type SwapIntent = {
99
99
  export type SwapQuoteRequest = {
100
100
  intent: SwapIntent;
101
101
  };
102
+ export type SwapQuoteResponse = {
103
+ input: QuoteWithBalance;
104
+ output: CurrencyWithAmount;
105
+ price_impact: number;
106
+ slippage_bps?: number;
107
+ swap_mode: SwapMode;
108
+ };
102
109
  export type RouteQuote = QuoteWithBalance & {
103
110
  qoute_id: string;
104
111
  output: CurrencyWithAmount;
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@coin-voyage/shared",
3
3
  "description": "Shared utilities for Coin Voyage",
4
- "version": "2.3.1",
4
+ "version": "2.3.2",
5
5
  "private": false,
6
6
  "sideEffects": false,
7
7
  "exports": {