@zkp2p/sdk 0.5.6 → 0.5.7

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/index.d.mts CHANGED
@@ -217,7 +217,7 @@ declare function apiCreateSellerCredentialBundle(payload: SellerCredentialUpload
217
217
  declare function apiUploadSellerCredentialBundle(params: UploadSellerCredentialBundleParams, baseApiUrl?: string | null, timeoutMs?: number): Promise<CuratorSellerCredentialUploadResponse>;
218
218
 
219
219
  declare function apiPostDepositDetails(req: PostDepositDetailsRequest, baseApiUrl: string, timeoutMs?: number): Promise<PostDepositDetailsResponse>;
220
- declare function apiGetQuotesBestByPlatform(req: QuotesBestByPlatformRequest, baseApiUrl: string, timeoutMs?: number): Promise<BestByPlatformResponse>;
220
+ declare function apiGetQuotesBestByPlatform(req: QuotesBestByPlatformRequest, baseApiUrl: string, timeoutMs?: number, apiKey?: string): Promise<BestByPlatformResponse>;
221
221
  declare function apiGetPayeeDetails(req: GetPayeeDetailsRequest, baseApiUrl: string, timeoutMs?: number): Promise<GetPayeeDetailsResponse>;
222
222
  declare function apiValidatePayeeDetails(req: ValidatePayeeDetailsRequest, baseApiUrl: string, timeoutMs?: number): Promise<ValidatePayeeDetailsResponse>;
223
223
  declare function apiGetOwnerDeposits(req: GetOwnerDepositsRequest, apiKey: string | undefined, baseApiUrl: string, authToken?: string, timeoutMs?: number): Promise<GetOwnerDepositsResponse>;
package/dist/index.d.ts CHANGED
@@ -217,7 +217,7 @@ declare function apiCreateSellerCredentialBundle(payload: SellerCredentialUpload
217
217
  declare function apiUploadSellerCredentialBundle(params: UploadSellerCredentialBundleParams, baseApiUrl?: string | null, timeoutMs?: number): Promise<CuratorSellerCredentialUploadResponse>;
218
218
 
219
219
  declare function apiPostDepositDetails(req: PostDepositDetailsRequest, baseApiUrl: string, timeoutMs?: number): Promise<PostDepositDetailsResponse>;
220
- declare function apiGetQuotesBestByPlatform(req: QuotesBestByPlatformRequest, baseApiUrl: string, timeoutMs?: number): Promise<BestByPlatformResponse>;
220
+ declare function apiGetQuotesBestByPlatform(req: QuotesBestByPlatformRequest, baseApiUrl: string, timeoutMs?: number, apiKey?: string): Promise<BestByPlatformResponse>;
221
221
  declare function apiGetPayeeDetails(req: GetPayeeDetailsRequest, baseApiUrl: string, timeoutMs?: number): Promise<GetPayeeDetailsResponse>;
222
222
  declare function apiValidatePayeeDetails(req: ValidatePayeeDetailsRequest, baseApiUrl: string, timeoutMs?: number): Promise<ValidatePayeeDetailsResponse>;
223
223
  declare function apiGetOwnerDeposits(req: GetOwnerDepositsRequest, apiKey: string | undefined, baseApiUrl: string, authToken?: string, timeoutMs?: number): Promise<GetOwnerDepositsResponse>;
package/dist/index.mjs CHANGED
@@ -5254,7 +5254,7 @@ async function apiPostDepositDetails(req, baseApiUrl, timeoutMs) {
5254
5254
  timeoutMs
5255
5255
  });
5256
5256
  }
5257
- async function apiGetQuote(req, baseApiUrl, timeoutMs) {
5257
+ async function apiGetQuote(req, baseApiUrl, timeoutMs, apiKey) {
5258
5258
  if (req.quotesToReturn !== void 0) {
5259
5259
  if (!Number.isInteger(req.quotesToReturn) || req.quotesToReturn < 1) {
5260
5260
  throw new ValidationError("quotesToReturn must be a positive integer", "quotesToReturn");
@@ -5289,10 +5289,11 @@ async function apiGetQuote(req, baseApiUrl, timeoutMs) {
5289
5289
  url,
5290
5290
  method: "POST",
5291
5291
  body: requestBody,
5292
+ apiKey,
5292
5293
  timeoutMs
5293
5294
  });
5294
5295
  }
5295
- async function apiGetQuotesBestByPlatform(req, baseApiUrl, timeoutMs) {
5296
+ async function apiGetQuotesBestByPlatform(req, baseApiUrl, timeoutMs, apiKey) {
5296
5297
  const isExactFiat = req.isExactFiat !== false;
5297
5298
  const endpoint = isExactFiat ? "best-by-platform" : "best-by-platform-exact-token";
5298
5299
  const url = `${withApiBase(baseApiUrl)}/v2/quote/${endpoint}`;
@@ -5310,6 +5311,7 @@ async function apiGetQuotesBestByPlatform(req, baseApiUrl, timeoutMs) {
5310
5311
  url,
5311
5312
  method: "POST",
5312
5313
  body: requestBody,
5314
+ apiKey,
5313
5315
  timeoutMs
5314
5316
  });
5315
5317
  }
@@ -7982,7 +7984,7 @@ var Zkp2pClient = class {
7982
7984
  reqWithEscrow.escrowAddresses = configuredEscrows;
7983
7985
  }
7984
7986
  }
7985
- const quote = await apiGetQuote(reqWithEscrow, baseApiUrl, timeoutMs);
7987
+ const quote = await apiGetQuote(reqWithEscrow, baseApiUrl, timeoutMs, this.apiKey);
7986
7988
  const quotes = quote?.responseObject?.quotes ?? [];
7987
7989
  for (const q of quotes) {
7988
7990
  const maker = q?.maker;
@@ -8020,7 +8022,12 @@ var Zkp2pClient = class {
8020
8022
  reqWithEscrow.escrowAddresses = configuredEscrows;
8021
8023
  }
8022
8024
  }
8023
- const quote = await apiGetQuotesBestByPlatform(reqWithEscrow, baseApiUrl, timeoutMs);
8025
+ const quote = await apiGetQuotesBestByPlatform(
8026
+ reqWithEscrow,
8027
+ baseApiUrl,
8028
+ timeoutMs,
8029
+ this.apiKey
8030
+ );
8024
8031
  const enrichedQuote = quote ? {
8025
8032
  ...quote,
8026
8033
  responseObject: {