@binance/pay 5.1.12 → 6.0.1

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
@@ -5,7 +5,7 @@
5
5
  [![npm version](https://badge.fury.io/js/@binance%2Fpay.svg)](https://badge.fury.io/js/@binance%2Fpay)
6
6
  [![npm Downloads](https://img.shields.io/npm/dm/@binance/pay.svg)](https://www.npmjs.com/package/@binance/pay)
7
7
  ![Node.js Version](https://img.shields.io/badge/Node.js-%3E=22.12.0-brightgreen)
8
- [![Known Vulnerabilities](https://snyk.io/test/github/binance/binance-connector-js/badge.svg)](https://snyk.io/test/github/binance/binance-connector-js)
8
+ [![Socket Badge](https://socket.dev/api/badge/npm/package/@binance/pay)](https://socket.dev/npm/package/@binance/pay)
9
9
  [![Docs](https://img.shields.io/badge/docs-online-blue?style=flat-square)](https://binance.github.io/binance-connector-js/modules/_binance_pay.html)
10
10
  [![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)
11
11
 
package/dist/index.d.mts CHANGED
@@ -1,6 +1,6 @@
1
1
  import { BadRequestError, ConfigurationRestAPI, ConnectorClientError, ForbiddenError, NetworkError, NotFoundError, PAY_REST_API_PROD_URL, RateLimitBanError, RequiredError, RestApiResponse, ServerError, TooManyRequestsError, UnauthorizedError } from "@binance/common";
2
2
 
3
- //#region src/rest-api/types/get-pay-trade-history-response-data-inner-funds-detail-inner-wallet-asset-cost-inner.d.ts
3
+ //#region src/rest-api/types/get-pay-trade-history-response-data-inner-funds-detail-inner-wallet-asset-cost.d.ts
4
4
 
5
5
  /**
6
6
  * Binance Pay REST API
@@ -17,19 +17,19 @@ import { BadRequestError, ConfigurationRestAPI, ConnectorClientError, ForbiddenE
17
17
  /**
18
18
  *
19
19
  * @export
20
- * @interface GetPayTradeHistoryResponseDataInnerFundsDetailInnerWalletAssetCostInner
20
+ * @interface GetPayTradeHistoryResponseDataInnerFundsDetailInnerWalletAssetCost
21
21
  */
22
- interface GetPayTradeHistoryResponseDataInnerFundsDetailInnerWalletAssetCostInner {
22
+ interface GetPayTradeHistoryResponseDataInnerFundsDetailInnerWalletAssetCost {
23
23
  /**
24
24
  *
25
25
  * @type {string}
26
- * @memberof GetPayTradeHistoryResponseDataInnerFundsDetailInnerWalletAssetCostInner
26
+ * @memberof GetPayTradeHistoryResponseDataInnerFundsDetailInnerWalletAssetCost
27
27
  */
28
28
  '1'?: string;
29
29
  /**
30
30
  *
31
31
  * @type {string}
32
- * @memberof GetPayTradeHistoryResponseDataInnerFundsDetailInnerWalletAssetCostInner
32
+ * @memberof GetPayTradeHistoryResponseDataInnerFundsDetailInnerWalletAssetCost
33
33
  */
34
34
  '2'?: string;
35
35
  }
@@ -56,10 +56,10 @@ interface GetPayTradeHistoryResponseDataInnerFundsDetailInner {
56
56
  amount?: string;
57
57
  /**
58
58
  *
59
- * @type {Array<GetPayTradeHistoryResponseDataInnerFundsDetailInnerWalletAssetCostInner>}
59
+ * @type {GetPayTradeHistoryResponseDataInnerFundsDetailInnerWalletAssetCost}
60
60
  * @memberof GetPayTradeHistoryResponseDataInnerFundsDetailInner
61
61
  */
62
- walletAssetCost?: Array<GetPayTradeHistoryResponseDataInnerFundsDetailInnerWalletAssetCostInner>;
62
+ walletAssetCost?: GetPayTradeHistoryResponseDataInnerFundsDetailInnerWalletAssetCost;
63
63
  }
64
64
  //#endregion
65
65
  //#region src/rest-api/types/get-pay-trade-history-response-data-inner-payer-info.d.ts
@@ -540,7 +540,7 @@ declare class RestAPI {
540
540
  getPayTradeHistory(requestParameters?: GetPayTradeHistoryRequest): Promise<RestApiResponse<GetPayTradeHistoryResponse>>;
541
541
  }
542
542
  declare namespace index_d_exports {
543
- export { GetPayTradeHistoryRequest, GetPayTradeHistoryResponse, GetPayTradeHistoryResponseDataInner, GetPayTradeHistoryResponseDataInnerFundsDetailInner, GetPayTradeHistoryResponseDataInnerFundsDetailInnerWalletAssetCostInner, GetPayTradeHistoryResponseDataInnerPayerInfo, GetPayTradeHistoryResponseDataInnerReceiverInfo, GetPayTradeHistoryResponseDataInnerReceiverInfoExtend, PayApi, PayApiInterface, RestAPI };
543
+ export { GetPayTradeHistoryRequest, GetPayTradeHistoryResponse, GetPayTradeHistoryResponseDataInner, GetPayTradeHistoryResponseDataInnerFundsDetailInner, GetPayTradeHistoryResponseDataInnerFundsDetailInnerWalletAssetCost, GetPayTradeHistoryResponseDataInnerPayerInfo, GetPayTradeHistoryResponseDataInnerReceiverInfo, GetPayTradeHistoryResponseDataInnerReceiverInfoExtend, PayApi, PayApiInterface, RestAPI };
544
544
  }
545
545
  //#endregion
546
546
  //#region src/pay.d.ts
package/dist/index.d.ts CHANGED
@@ -3,7 +3,7 @@ import { BadRequestError, ConfigurationRestAPI, ConnectorClientError, ForbiddenE
3
3
  //#region rolldown:runtime
4
4
 
5
5
  //#endregion
6
- //#region src/rest-api/types/get-pay-trade-history-response-data-inner-funds-detail-inner-wallet-asset-cost-inner.d.ts
6
+ //#region src/rest-api/types/get-pay-trade-history-response-data-inner-funds-detail-inner-wallet-asset-cost.d.ts
7
7
  /**
8
8
  * Binance Pay REST API
9
9
  *
@@ -19,19 +19,19 @@ import { BadRequestError, ConfigurationRestAPI, ConnectorClientError, ForbiddenE
19
19
  /**
20
20
  *
21
21
  * @export
22
- * @interface GetPayTradeHistoryResponseDataInnerFundsDetailInnerWalletAssetCostInner
22
+ * @interface GetPayTradeHistoryResponseDataInnerFundsDetailInnerWalletAssetCost
23
23
  */
24
- interface GetPayTradeHistoryResponseDataInnerFundsDetailInnerWalletAssetCostInner {
24
+ interface GetPayTradeHistoryResponseDataInnerFundsDetailInnerWalletAssetCost {
25
25
  /**
26
26
  *
27
27
  * @type {string}
28
- * @memberof GetPayTradeHistoryResponseDataInnerFundsDetailInnerWalletAssetCostInner
28
+ * @memberof GetPayTradeHistoryResponseDataInnerFundsDetailInnerWalletAssetCost
29
29
  */
30
30
  '1'?: string;
31
31
  /**
32
32
  *
33
33
  * @type {string}
34
- * @memberof GetPayTradeHistoryResponseDataInnerFundsDetailInnerWalletAssetCostInner
34
+ * @memberof GetPayTradeHistoryResponseDataInnerFundsDetailInnerWalletAssetCost
35
35
  */
36
36
  '2'?: string;
37
37
  }
@@ -57,10 +57,10 @@ interface GetPayTradeHistoryResponseDataInnerFundsDetailInner {
57
57
  amount?: string;
58
58
  /**
59
59
  *
60
- * @type {Array<GetPayTradeHistoryResponseDataInnerFundsDetailInnerWalletAssetCostInner>}
60
+ * @type {GetPayTradeHistoryResponseDataInnerFundsDetailInnerWalletAssetCost}
61
61
  * @memberof GetPayTradeHistoryResponseDataInnerFundsDetailInner
62
62
  */
63
- walletAssetCost?: Array<GetPayTradeHistoryResponseDataInnerFundsDetailInnerWalletAssetCostInner>;
63
+ walletAssetCost?: GetPayTradeHistoryResponseDataInnerFundsDetailInnerWalletAssetCost;
64
64
  }
65
65
  //#endregion
66
66
  //#region src/rest-api/types/get-pay-trade-history-response-data-inner-payer-info.d.ts
@@ -541,7 +541,7 @@ declare class RestAPI {
541
541
  getPayTradeHistory(requestParameters?: GetPayTradeHistoryRequest): Promise<RestApiResponse<GetPayTradeHistoryResponse>>;
542
542
  }
543
543
  declare namespace index_d_exports {
544
- export { GetPayTradeHistoryRequest, GetPayTradeHistoryResponse, GetPayTradeHistoryResponseDataInner, GetPayTradeHistoryResponseDataInnerFundsDetailInner, GetPayTradeHistoryResponseDataInnerFundsDetailInnerWalletAssetCostInner, GetPayTradeHistoryResponseDataInnerPayerInfo, GetPayTradeHistoryResponseDataInnerReceiverInfo, GetPayTradeHistoryResponseDataInnerReceiverInfoExtend, PayApi, PayApiInterface, RestAPI };
544
+ export { GetPayTradeHistoryRequest, GetPayTradeHistoryResponse, GetPayTradeHistoryResponseDataInner, GetPayTradeHistoryResponseDataInnerFundsDetailInner, GetPayTradeHistoryResponseDataInnerFundsDetailInnerWalletAssetCost, GetPayTradeHistoryResponseDataInnerPayerInfo, GetPayTradeHistoryResponseDataInnerReceiverInfo, GetPayTradeHistoryResponseDataInnerReceiverInfoExtend, PayApi, PayApiInterface, RestAPI };
545
545
  }
546
546
  //#endregion
547
547
  //#region src/pay.d.ts
package/dist/index.js CHANGED
@@ -14,7 +14,7 @@ let __binance_common = require("@binance/common");
14
14
 
15
15
  //#region package.json
16
16
  var name = "@binance/pay";
17
- var version = "5.1.12";
17
+ var version = "6.0.1";
18
18
 
19
19
  //#endregion
20
20
  //#region src/rest-api/modules/pay-api.ts
package/dist/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","names":["localVarQueryParameter: Record<string, unknown>","localVarBodyParameter: Record<string, unknown>","_timeUnit: TimeUnit | undefined","ConfigurationRestAPI","PAY_REST_API_PROD_URL"],"sources":["../package.json","../src/rest-api/modules/pay-api.ts","../src/rest-api/rest-api.ts","../src/rest-api/index.ts","../src/pay.ts"],"sourcesContent":["{\n \"name\": \"@binance/pay\",\n \"description\": \"Official Binance Pay Connector - A lightweight library that provides a convenient interface to Binance's Pay REST API.\",\n \"version\": \"5.1.12\",\n \"main\": \"./dist/index.js\",\n \"module\": \"./dist/index.mjs\",\n \"types\": \"./dist/index.d.ts\",\n \"exports\": {\n \".\": {\n \"require\": \"./dist/index.js\",\n \"import\": \"./dist/index.mjs\"\n }\n },\n \"scripts\": {\n \"prepublishOnly\": \"npm run build\",\n \"build\": \"npm run clean && tsdown\",\n \"typecheck\": \"tsc --noEmit\",\n \"clean\": \"rm -rf dist\",\n \"test\": \"npx jest --maxWorkers=4 --bail\",\n \"test:watch\": \"npx jest --watch\",\n \"format\": \"npx prettier --ignore-path .prettierignore --write .\",\n \"lint\": \"npx eslint '**/*.ts' --fix\"\n },\n \"keywords\": [\n \"Binance\",\n \"API\",\n \"Simple Earn\",\n \"Connector\",\n \"REST\",\n \"Trading\"\n ],\n \"author\": \"Binance\",\n \"license\": \"MIT\",\n \"repository\": {\n \"type\": \"git\",\n \"url\": \"https://github.com/binance/binance-connector-js.git\"\n },\n \"bugs\": {\n \"url\": \"https://github.com/binance/binance-connector-js/issues\"\n },\n \"homepage\": \"https://github.com/binance/binance-connector-js#readme\",\n \"files\": [\n \"dist\"\n ],\n \"devDependencies\": {\n \"@types/jest\": \"^29.5.4\",\n \"@types/node\": \"^20.17.24\",\n \"eslint\": \"8.57.0\",\n \"jest\": \"^29.6.4\",\n \"json-with-bigint\": \"^3.4.4\",\n \"prettier\": \"^3.3.3\",\n \"ts-jest\": \"^29.1.1\",\n \"ts-node\": \"^10.9.1\",\n \"tsdown\": \"^0.16.5\",\n \"typescript\": \"^5.7.2\",\n \"typescript-eslint\": \"^8.24.0\"\n },\n \"dependencies\": {\n \"@binance/common\": \"2.3.11\",\n \"axios\": \"^1.7.4\"\n }\n}\n","/**\n * Binance Pay REST API\n *\n * OpenAPI Specification for the Binance Pay REST API\n *\n * The version of the OpenAPI document: 1.0.0\n *\n *\n * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).\n * https://openapi-generator.tech\n * Do not edit the class manually.\n */\n\nimport {\n ConfigurationRestAPI,\n TimeUnit,\n RestApiResponse,\n sendRequest,\n type RequestArgs,\n} from '@binance/common';\nimport type { GetPayTradeHistoryResponse } from '../types';\n\n/**\n * PayApi - axios parameter creator\n */\nconst PayApiAxiosParamCreator = function (configuration: ConfigurationRestAPI) {\n return {\n /**\n * Get Pay Trade History\n *\n * If startTime and endTime are not sent, the recent 90 days' data will be returned.\n * The max interval between startTime and endTime is 90 days.\n * Support for querying orders within the last 18 months.\n * For payerInfo and receiverInfo,there are different return values in different orderTypes.\n * Sender's perspective when orderType is C2C\n * payerInfo : binanceId\n * receiverInfo : name, binanceId/accountId/email/countryCode/phoneNumber/mobileCode (based on user input)\n * Receiver's perspective when orderType is C2C\n * payerInfo : name\n * receiverInfo : binanceId\n * Sender's perspective when orderType is CRYPTO_BOX\n * payerInfo : binanceId\n * receiverInfo : name(the value is always \"Crypto Box\")\n * Receiver's perspective when orderType is CRYPTO_BOX\n * payerInfo : name\n * receiverInfo : binanceId\n * Sender's perspective when orderType is PAY\n * payerInfo : binanceId\n * receiverInfo : name\n * Receiver's perspective when orderType is PAY\n * payerInfo : name\n * receiverInfo : binanceId, name\n * Sender's perspective when orderType is PAY_REFUND\n * payerInfo : binanceId, name\n * receiverInfo : name, accountId\n * Receiver's perspective when orderType is PAY_REFUND\n * payerInfo : name\n * receiverInfo : binanceId\n * Sender's perspective when orderType is PAYOUT\n * payerInfo : binanceId, name\n * receiverInfo : name, accountId\n * Receiver's perspective when orderType is PAYOUT\n * payerInfo : name\n * receiverInfo : binanceId\n * Receiver's perspective when orderType is CRYPTO_BOX_RF\n * payerInfo : name(the value is always \"Crypto Box\")\n * receiverInfo : binanceId\n * Sender's perspective when orderType is REMITTANCE\n * payerInfo : binanceId\n * receiverInfo : name, institutionName, cardNumber, digitalWalletId\n *\n * Weight: 3000\n *\n * @summary Get Pay Trade History\n * @param {number | bigint} [startTime]\n * @param {number | bigint} [endTime]\n * @param {number | bigint} [limit] default 100, max 100\n * @param {number | bigint} [recvWindow]\n *\n * @throws {RequiredError}\n */\n getPayTradeHistory: async (\n startTime?: number | bigint,\n endTime?: number | bigint,\n limit?: number | bigint,\n recvWindow?: number | bigint\n ): Promise<RequestArgs> => {\n const localVarQueryParameter: Record<string, unknown> = {};\n const localVarBodyParameter: Record<string, unknown> = {};\n\n if (startTime !== undefined && startTime !== null) {\n localVarQueryParameter['startTime'] = startTime;\n }\n if (endTime !== undefined && endTime !== null) {\n localVarQueryParameter['endTime'] = endTime;\n }\n if (limit !== undefined && limit !== null) {\n localVarQueryParameter['limit'] = limit;\n }\n if (recvWindow !== undefined && recvWindow !== null) {\n localVarQueryParameter['recvWindow'] = recvWindow;\n }\n\n let _timeUnit: TimeUnit | undefined;\n if ('timeUnit' in configuration) _timeUnit = configuration.timeUnit as TimeUnit;\n\n return {\n endpoint: '/sapi/v1/pay/transactions',\n method: 'GET',\n queryParams: localVarQueryParameter,\n bodyParams: localVarBodyParameter,\n timeUnit: _timeUnit,\n };\n },\n };\n};\n\n/**\n * PayApi - interface\n * @interface PayApi\n */\nexport interface PayApiInterface {\n /**\n * Get Pay Trade History\n *\n * If startTime and endTime are not sent, the recent 90 days' data will be returned.\n * The max interval between startTime and endTime is 90 days.\n * Support for querying orders within the last 18 months.\n * For payerInfo and receiverInfo,there are different return values in different orderTypes.\n * Sender's perspective when orderType is C2C\n * payerInfo : binanceId\n * receiverInfo : name, binanceId/accountId/email/countryCode/phoneNumber/mobileCode (based on user input)\n * Receiver's perspective when orderType is C2C\n * payerInfo : name\n * receiverInfo : binanceId\n * Sender's perspective when orderType is CRYPTO_BOX\n * payerInfo : binanceId\n * receiverInfo : name(the value is always \"Crypto Box\")\n * Receiver's perspective when orderType is CRYPTO_BOX\n * payerInfo : name\n * receiverInfo : binanceId\n * Sender's perspective when orderType is PAY\n * payerInfo : binanceId\n * receiverInfo : name\n * Receiver's perspective when orderType is PAY\n * payerInfo : name\n * receiverInfo : binanceId, name\n * Sender's perspective when orderType is PAY_REFUND\n * payerInfo : binanceId, name\n * receiverInfo : name, accountId\n * Receiver's perspective when orderType is PAY_REFUND\n * payerInfo : name\n * receiverInfo : binanceId\n * Sender's perspective when orderType is PAYOUT\n * payerInfo : binanceId, name\n * receiverInfo : name, accountId\n * Receiver's perspective when orderType is PAYOUT\n * payerInfo : name\n * receiverInfo : binanceId\n * Receiver's perspective when orderType is CRYPTO_BOX_RF\n * payerInfo : name(the value is always \"Crypto Box\")\n * receiverInfo : binanceId\n * Sender's perspective when orderType is REMITTANCE\n * payerInfo : binanceId\n * receiverInfo : name, institutionName, cardNumber, digitalWalletId\n *\n * Weight: 3000\n *\n * @summary Get Pay Trade History\n * @param {GetPayTradeHistoryRequest} requestParameters Request parameters.\n *\n * @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}\n * @memberof PayApiInterface\n */\n getPayTradeHistory(\n requestParameters?: GetPayTradeHistoryRequest\n ): Promise<RestApiResponse<GetPayTradeHistoryResponse>>;\n}\n\n/**\n * Request parameters for getPayTradeHistory operation in PayApi.\n * @interface GetPayTradeHistoryRequest\n */\nexport interface GetPayTradeHistoryRequest {\n /**\n *\n * @type {number | bigint}\n * @memberof PayApiGetPayTradeHistory\n */\n readonly startTime?: number | bigint;\n\n /**\n *\n * @type {number | bigint}\n * @memberof PayApiGetPayTradeHistory\n */\n readonly endTime?: number | bigint;\n\n /**\n * default 100, max 100\n * @type {number | bigint}\n * @memberof PayApiGetPayTradeHistory\n */\n readonly limit?: number | bigint;\n\n /**\n *\n * @type {number | bigint}\n * @memberof PayApiGetPayTradeHistory\n */\n readonly recvWindow?: number | bigint;\n}\n\n/**\n * PayApi - object-oriented interface\n * @class PayApi\n */\nexport class PayApi implements PayApiInterface {\n private readonly configuration: ConfigurationRestAPI;\n private localVarAxiosParamCreator;\n\n constructor(configuration: ConfigurationRestAPI) {\n this.configuration = configuration;\n this.localVarAxiosParamCreator = PayApiAxiosParamCreator(configuration);\n }\n\n /**\n * Get Pay Trade History\n *\n * If startTime and endTime are not sent, the recent 90 days' data will be returned.\n * The max interval between startTime and endTime is 90 days.\n * Support for querying orders within the last 18 months.\n * For payerInfo and receiverInfo,there are different return values in different orderTypes.\n * Sender's perspective when orderType is C2C\n * payerInfo : binanceId\n * receiverInfo : name, binanceId/accountId/email/countryCode/phoneNumber/mobileCode (based on user input)\n * Receiver's perspective when orderType is C2C\n * payerInfo : name\n * receiverInfo : binanceId\n * Sender's perspective when orderType is CRYPTO_BOX\n * payerInfo : binanceId\n * receiverInfo : name(the value is always \"Crypto Box\")\n * Receiver's perspective when orderType is CRYPTO_BOX\n * payerInfo : name\n * receiverInfo : binanceId\n * Sender's perspective when orderType is PAY\n * payerInfo : binanceId\n * receiverInfo : name\n * Receiver's perspective when orderType is PAY\n * payerInfo : name\n * receiverInfo : binanceId, name\n * Sender's perspective when orderType is PAY_REFUND\n * payerInfo : binanceId, name\n * receiverInfo : name, accountId\n * Receiver's perspective when orderType is PAY_REFUND\n * payerInfo : name\n * receiverInfo : binanceId\n * Sender's perspective when orderType is PAYOUT\n * payerInfo : binanceId, name\n * receiverInfo : name, accountId\n * Receiver's perspective when orderType is PAYOUT\n * payerInfo : name\n * receiverInfo : binanceId\n * Receiver's perspective when orderType is CRYPTO_BOX_RF\n * payerInfo : name(the value is always \"Crypto Box\")\n * receiverInfo : binanceId\n * Sender's perspective when orderType is REMITTANCE\n * payerInfo : binanceId\n * receiverInfo : name, institutionName, cardNumber, digitalWalletId\n *\n * Weight: 3000\n *\n * @summary Get Pay Trade History\n * @param {GetPayTradeHistoryRequest} requestParameters Request parameters.\n * @returns {Promise<RestApiResponse<GetPayTradeHistoryResponse>>}\n * @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}\n * @memberof PayApi\n * @see {@link https://developers.binance.com/docs/pay/rest-api/Get-Pay-Trade-History Binance API Documentation}\n */\n public async getPayTradeHistory(\n requestParameters: GetPayTradeHistoryRequest = {}\n ): Promise<RestApiResponse<GetPayTradeHistoryResponse>> {\n const localVarAxiosArgs = await this.localVarAxiosParamCreator.getPayTradeHistory(\n requestParameters?.startTime,\n requestParameters?.endTime,\n requestParameters?.limit,\n requestParameters?.recvWindow\n );\n return sendRequest<GetPayTradeHistoryResponse>(\n this.configuration,\n localVarAxiosArgs.endpoint,\n localVarAxiosArgs.method,\n localVarAxiosArgs.queryParams,\n localVarAxiosArgs.bodyParams,\n localVarAxiosArgs?.timeUnit,\n { isSigned: true }\n );\n }\n}\n","/**\n * Binance Pay REST API\n *\n * OpenAPI Specification for the Binance Pay REST API\n *\n * The version of the OpenAPI document: 1.0.0\n *\n *\n * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).\n * https://openapi-generator.tech\n * Do not edit the class manually.\n */\n\nimport { ConfigurationRestAPI, RestApiResponse, sendRequest } from '@binance/common';\nimport { PayApi } from './modules/pay-api';\n\nimport type { GetPayTradeHistoryRequest } from './modules/pay-api';\n\nimport type { GetPayTradeHistoryResponse } from './types';\n\nexport class RestAPI {\n private configuration: ConfigurationRestAPI;\n private payApi: PayApi;\n\n constructor(configuration: ConfigurationRestAPI) {\n this.configuration = configuration;\n this.payApi = new PayApi(configuration);\n }\n\n /**\n * Generic function to send a request.\n * @param endpoint - The API endpoint to call.\n * @param method - HTTP method to use (GET, POST, DELETE, etc.).\n * @param queryParams - Query parameters for the request.\n * @param bodyParams - Body parameters for the request.\n *\n * @returns A promise resolving to the response data object.\n */\n sendRequest<T>(\n endpoint: string,\n method: 'GET' | 'POST' | 'DELETE' | 'PUT' | 'PATCH',\n queryParams: Record<string, unknown> = {},\n bodyParams: Record<string, unknown> = {}\n ): Promise<RestApiResponse<T>> {\n return sendRequest<T>(\n this.configuration,\n endpoint,\n method,\n queryParams,\n bodyParams,\n undefined\n );\n }\n\n /**\n * Generic function to send a signed request.\n * @param endpoint - The API endpoint to call.\n * @param method - HTTP method to use (GET, POST, DELETE, etc.).\n * @param queryParams - Query parameters for the request.\n * @param bodyParams - Body parameters for the request.\n *\n * @returns A promise resolving to the response data object.\n */\n sendSignedRequest<T>(\n endpoint: string,\n method: 'GET' | 'POST' | 'DELETE' | 'PUT' | 'PATCH',\n queryParams: Record<string, unknown> = {},\n bodyParams: Record<string, unknown> = {}\n ): Promise<RestApiResponse<T>> {\n return sendRequest<T>(\n this.configuration,\n endpoint,\n method,\n queryParams,\n bodyParams,\n undefined,\n { isSigned: true }\n );\n }\n\n /**\n * Get Pay Trade History\n *\n * If startTime and endTime are not sent, the recent 90 days' data will be returned.\n * The max interval between startTime and endTime is 90 days.\n * Support for querying orders within the last 18 months.\n * For payerInfo and receiverInfo,there are different return values in different orderTypes.\n * Sender's perspective when orderType is C2C\n * payerInfo : binanceId\n * receiverInfo : name, binanceId/accountId/email/countryCode/phoneNumber/mobileCode (based on user input)\n * Receiver's perspective when orderType is C2C\n * payerInfo : name\n * receiverInfo : binanceId\n * Sender's perspective when orderType is CRYPTO_BOX\n * payerInfo : binanceId\n * receiverInfo : name(the value is always \"Crypto Box\")\n * Receiver's perspective when orderType is CRYPTO_BOX\n * payerInfo : name\n * receiverInfo : binanceId\n * Sender's perspective when orderType is PAY\n * payerInfo : binanceId\n * receiverInfo : name\n * Receiver's perspective when orderType is PAY\n * payerInfo : name\n * receiverInfo : binanceId, name\n * Sender's perspective when orderType is PAY_REFUND\n * payerInfo : binanceId, name\n * receiverInfo : name, accountId\n * Receiver's perspective when orderType is PAY_REFUND\n * payerInfo : name\n * receiverInfo : binanceId\n * Sender's perspective when orderType is PAYOUT\n * payerInfo : binanceId, name\n * receiverInfo : name, accountId\n * Receiver's perspective when orderType is PAYOUT\n * payerInfo : name\n * receiverInfo : binanceId\n * Receiver's perspective when orderType is CRYPTO_BOX_RF\n * payerInfo : name(the value is always \"Crypto Box\")\n * receiverInfo : binanceId\n * Sender's perspective when orderType is REMITTANCE\n * payerInfo : binanceId\n * receiverInfo : name, institutionName, cardNumber, digitalWalletId\n *\n * Weight: 3000\n *\n * @summary Get Pay Trade History\n * @param {GetPayTradeHistoryRequest} requestParameters Request parameters.\n *\n * @returns {Promise<RestApiResponse<GetPayTradeHistoryResponse>>}\n * @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}\n * @see {@link https://developers.binance.com/docs/pay/rest-api/Get-Pay-Trade-History Binance API Documentation}\n */\n getPayTradeHistory(\n requestParameters: GetPayTradeHistoryRequest = {}\n ): Promise<RestApiResponse<GetPayTradeHistoryResponse>> {\n return this.payApi.getPayTradeHistory(requestParameters);\n }\n}\n","/**\n * Binance Pay REST API\n *\n * OpenAPI Specification for the Binance Pay REST API\n *\n * The version of the OpenAPI document: 1.0.0\n *\n *\n * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).\n * https://openapi-generator.tech\n * Do not edit the class manually.\n */\n\nexport * from './types';\nexport * from './modules';\nexport * from './rest-api';\n","import { buildUserAgent, ConfigurationRestAPI, PAY_REST_API_PROD_URL } from '@binance/common';\nimport { name, version } from '../package.json';\nimport { RestAPI } from './rest-api';\n\nexport interface ConfigurationPay {\n configurationRestAPI?: ConfigurationRestAPI;\n}\n\nexport class Pay {\n public restAPI!: RestAPI;\n\n constructor(config: ConfigurationPay) {\n const userAgent = buildUserAgent(name, version);\n\n if (config?.configurationRestAPI) {\n const configRestAPI = new ConfigurationRestAPI(\n config.configurationRestAPI\n ) as ConfigurationRestAPI & {\n baseOptions: Record<string, unknown>;\n };\n configRestAPI.basePath = configRestAPI.basePath || PAY_REST_API_PROD_URL;\n configRestAPI.baseOptions = configRestAPI.baseOptions || {};\n configRestAPI.baseOptions.headers = {\n ...(configRestAPI.baseOptions.headers || {}),\n 'User-Agent': userAgent,\n };\n this.restAPI = new RestAPI(configRestAPI);\n }\n }\n}\n"],"mappings":";;;;;;;;;;;;;;;WACY;cAEG;;;;;;;;;;;;;;;;;;;ACsBf,MAAM,0BAA0B,SAAU,eAAqC;AAC3E,QAAO,EAuDH,oBAAoB,OAChB,WACA,SACA,OACA,eACuB;EACvB,MAAMA,yBAAkD,EAAE;EAC1D,MAAMC,wBAAiD,EAAE;AAEzD,MAAI,cAAc,UAAa,cAAc,KACzC,wBAAuB,eAAe;AAE1C,MAAI,YAAY,UAAa,YAAY,KACrC,wBAAuB,aAAa;AAExC,MAAI,UAAU,UAAa,UAAU,KACjC,wBAAuB,WAAW;AAEtC,MAAI,eAAe,UAAa,eAAe,KAC3C,wBAAuB,gBAAgB;EAG3C,IAAIC;AACJ,MAAI,cAAc,cAAe,aAAY,cAAc;AAE3D,SAAO;GACH,UAAU;GACV,QAAQ;GACR,aAAa;GACb,YAAY;GACZ,UAAU;GACb;IAER;;;;;;AAuGL,IAAa,SAAb,MAA+C;CAI3C,YAAY,eAAqC;AAC7C,OAAK,gBAAgB;AACrB,OAAK,4BAA4B,wBAAwB,cAAc;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAwD3E,MAAa,mBACT,oBAA+C,EAAE,EACG;EACpD,MAAM,oBAAoB,MAAM,KAAK,0BAA0B,mBAC3D,mBAAmB,WACnB,mBAAmB,SACnB,mBAAmB,OACnB,mBAAmB,WACtB;AACD,2CACI,KAAK,eACL,kBAAkB,UAClB,kBAAkB,QAClB,kBAAkB,aAClB,kBAAkB,YAClB,mBAAmB,UACnB,EAAE,UAAU,MAAM,CACrB;;;;;;;;;;;;;;;;;;ACpRT,IAAa,UAAb,MAAqB;CAIjB,YAAY,eAAqC;AAC7C,OAAK,gBAAgB;AACrB,OAAK,SAAS,IAAI,OAAO,cAAc;;;;;;;;;;;CAY3C,YACI,UACA,QACA,cAAuC,EAAE,EACzC,aAAsC,EAAE,EACb;AAC3B,2CACI,KAAK,eACL,UACA,QACA,aACA,YACA,OACH;;;;;;;;;;;CAYL,kBACI,UACA,QACA,cAAuC,EAAE,EACzC,aAAsC,EAAE,EACb;AAC3B,2CACI,KAAK,eACL,UACA,QACA,aACA,YACA,QACA,EAAE,UAAU,MAAM,CACrB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAwDL,mBACI,oBAA+C,EAAE,EACG;AACpD,SAAO,KAAK,OAAO,mBAAmB,kBAAkB;;;;;;;;;;;;;AEhIhE,IAAa,MAAb,MAAiB;CAGb,YAAY,QAA0B;EAClC,MAAM,iDAA2B,MAAM,QAAQ;AAE/C,MAAI,QAAQ,sBAAsB;GAC9B,MAAM,gBAAgB,IAAIC,sCACtB,OAAO,qBACV;AAGD,iBAAc,WAAW,cAAc,YAAYC;AACnD,iBAAc,cAAc,cAAc,eAAe,EAAE;AAC3D,iBAAc,YAAY,UAAU;IAChC,GAAI,cAAc,YAAY,WAAW,EAAE;IAC3C,cAAc;IACjB;AACD,QAAK,UAAU,IAAI,QAAQ,cAAc"}
1
+ {"version":3,"file":"index.js","names":["localVarQueryParameter: Record<string, unknown>","localVarBodyParameter: Record<string, unknown>","_timeUnit: TimeUnit | undefined","ConfigurationRestAPI","PAY_REST_API_PROD_URL"],"sources":["../package.json","../src/rest-api/modules/pay-api.ts","../src/rest-api/rest-api.ts","../src/rest-api/index.ts","../src/pay.ts"],"sourcesContent":["{\n \"name\": \"@binance/pay\",\n \"description\": \"Official Binance Pay Connector - A lightweight library that provides a convenient interface to Binance's Pay REST API.\",\n \"version\": \"6.0.1\",\n \"main\": \"./dist/index.js\",\n \"module\": \"./dist/index.mjs\",\n \"types\": \"./dist/index.d.ts\",\n \"exports\": {\n \".\": {\n \"require\": \"./dist/index.js\",\n \"import\": \"./dist/index.mjs\"\n }\n },\n \"scripts\": {\n \"prepublishOnly\": \"npm run build\",\n \"build\": \"npm run clean && tsdown\",\n \"typecheck\": \"tsc --noEmit\",\n \"clean\": \"rm -rf dist\",\n \"test\": \"npx jest --maxWorkers=4 --bail\",\n \"test:watch\": \"npx jest --watch\",\n \"format\": \"npx prettier --ignore-path .prettierignore --write .\",\n \"lint\": \"npx eslint '**/*.ts' --fix\"\n },\n \"keywords\": [\n \"Binance\",\n \"API\",\n \"Simple Earn\",\n \"Connector\",\n \"REST\",\n \"Trading\"\n ],\n \"author\": \"Binance\",\n \"license\": \"MIT\",\n \"repository\": {\n \"type\": \"git\",\n \"url\": \"https://github.com/binance/binance-connector-js.git\"\n },\n \"bugs\": {\n \"url\": \"https://github.com/binance/binance-connector-js/issues\"\n },\n \"homepage\": \"https://github.com/binance/binance-connector-js#readme\",\n \"files\": [\n \"dist\"\n ],\n \"devDependencies\": {\n \"@types/jest\": \"^29.5.4\",\n \"@types/node\": \"^20.17.24\",\n \"eslint\": \"8.57.0\",\n \"jest\": \"^29.6.4\",\n \"json-with-bigint\": \"^3.4.4\",\n \"prettier\": \"^3.3.3\",\n \"ts-jest\": \"^29.1.1\",\n \"ts-node\": \"^10.9.1\",\n \"tsdown\": \"^0.16.5\",\n \"typescript\": \"^5.7.2\",\n \"typescript-eslint\": \"^8.24.0\"\n },\n \"dependencies\": {\n \"@binance/common\": \"2.3.13\",\n \"axios\": \"^1.7.4\"\n }\n}\n","/**\n * Binance Pay REST API\n *\n * OpenAPI Specification for the Binance Pay REST API\n *\n * The version of the OpenAPI document: 1.0.0\n *\n *\n * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).\n * https://openapi-generator.tech\n * Do not edit the class manually.\n */\n\nimport {\n ConfigurationRestAPI,\n TimeUnit,\n RestApiResponse,\n sendRequest,\n type RequestArgs,\n} from '@binance/common';\nimport type { GetPayTradeHistoryResponse } from '../types';\n\n/**\n * PayApi - axios parameter creator\n */\nconst PayApiAxiosParamCreator = function (configuration: ConfigurationRestAPI) {\n return {\n /**\n * Get Pay Trade History\n *\n * If startTime and endTime are not sent, the recent 90 days' data will be returned.\n * The max interval between startTime and endTime is 90 days.\n * Support for querying orders within the last 18 months.\n * For payerInfo and receiverInfo,there are different return values in different orderTypes.\n * Sender's perspective when orderType is C2C\n * payerInfo : binanceId\n * receiverInfo : name, binanceId/accountId/email/countryCode/phoneNumber/mobileCode (based on user input)\n * Receiver's perspective when orderType is C2C\n * payerInfo : name\n * receiverInfo : binanceId\n * Sender's perspective when orderType is CRYPTO_BOX\n * payerInfo : binanceId\n * receiverInfo : name(the value is always \"Crypto Box\")\n * Receiver's perspective when orderType is CRYPTO_BOX\n * payerInfo : name\n * receiverInfo : binanceId\n * Sender's perspective when orderType is PAY\n * payerInfo : binanceId\n * receiverInfo : name\n * Receiver's perspective when orderType is PAY\n * payerInfo : name\n * receiverInfo : binanceId, name\n * Sender's perspective when orderType is PAY_REFUND\n * payerInfo : binanceId, name\n * receiverInfo : name, accountId\n * Receiver's perspective when orderType is PAY_REFUND\n * payerInfo : name\n * receiverInfo : binanceId\n * Sender's perspective when orderType is PAYOUT\n * payerInfo : binanceId, name\n * receiverInfo : name, accountId\n * Receiver's perspective when orderType is PAYOUT\n * payerInfo : name\n * receiverInfo : binanceId\n * Receiver's perspective when orderType is CRYPTO_BOX_RF\n * payerInfo : name(the value is always \"Crypto Box\")\n * receiverInfo : binanceId\n * Sender's perspective when orderType is REMITTANCE\n * payerInfo : binanceId\n * receiverInfo : name, institutionName, cardNumber, digitalWalletId\n *\n * Weight: 3000\n *\n * @summary Get Pay Trade History\n * @param {number | bigint} [startTime]\n * @param {number | bigint} [endTime]\n * @param {number | bigint} [limit] default 100, max 100\n * @param {number | bigint} [recvWindow]\n *\n * @throws {RequiredError}\n */\n getPayTradeHistory: async (\n startTime?: number | bigint,\n endTime?: number | bigint,\n limit?: number | bigint,\n recvWindow?: number | bigint\n ): Promise<RequestArgs> => {\n const localVarQueryParameter: Record<string, unknown> = {};\n const localVarBodyParameter: Record<string, unknown> = {};\n\n if (startTime !== undefined && startTime !== null) {\n localVarQueryParameter['startTime'] = startTime;\n }\n if (endTime !== undefined && endTime !== null) {\n localVarQueryParameter['endTime'] = endTime;\n }\n if (limit !== undefined && limit !== null) {\n localVarQueryParameter['limit'] = limit;\n }\n if (recvWindow !== undefined && recvWindow !== null) {\n localVarQueryParameter['recvWindow'] = recvWindow;\n }\n\n let _timeUnit: TimeUnit | undefined;\n if ('timeUnit' in configuration) _timeUnit = configuration.timeUnit as TimeUnit;\n\n return {\n endpoint: '/sapi/v1/pay/transactions',\n method: 'GET',\n queryParams: localVarQueryParameter,\n bodyParams: localVarBodyParameter,\n timeUnit: _timeUnit,\n };\n },\n };\n};\n\n/**\n * PayApi - interface\n * @interface PayApi\n */\nexport interface PayApiInterface {\n /**\n * Get Pay Trade History\n *\n * If startTime and endTime are not sent, the recent 90 days' data will be returned.\n * The max interval between startTime and endTime is 90 days.\n * Support for querying orders within the last 18 months.\n * For payerInfo and receiverInfo,there are different return values in different orderTypes.\n * Sender's perspective when orderType is C2C\n * payerInfo : binanceId\n * receiverInfo : name, binanceId/accountId/email/countryCode/phoneNumber/mobileCode (based on user input)\n * Receiver's perspective when orderType is C2C\n * payerInfo : name\n * receiverInfo : binanceId\n * Sender's perspective when orderType is CRYPTO_BOX\n * payerInfo : binanceId\n * receiverInfo : name(the value is always \"Crypto Box\")\n * Receiver's perspective when orderType is CRYPTO_BOX\n * payerInfo : name\n * receiverInfo : binanceId\n * Sender's perspective when orderType is PAY\n * payerInfo : binanceId\n * receiverInfo : name\n * Receiver's perspective when orderType is PAY\n * payerInfo : name\n * receiverInfo : binanceId, name\n * Sender's perspective when orderType is PAY_REFUND\n * payerInfo : binanceId, name\n * receiverInfo : name, accountId\n * Receiver's perspective when orderType is PAY_REFUND\n * payerInfo : name\n * receiverInfo : binanceId\n * Sender's perspective when orderType is PAYOUT\n * payerInfo : binanceId, name\n * receiverInfo : name, accountId\n * Receiver's perspective when orderType is PAYOUT\n * payerInfo : name\n * receiverInfo : binanceId\n * Receiver's perspective when orderType is CRYPTO_BOX_RF\n * payerInfo : name(the value is always \"Crypto Box\")\n * receiverInfo : binanceId\n * Sender's perspective when orderType is REMITTANCE\n * payerInfo : binanceId\n * receiverInfo : name, institutionName, cardNumber, digitalWalletId\n *\n * Weight: 3000\n *\n * @summary Get Pay Trade History\n * @param {GetPayTradeHistoryRequest} requestParameters Request parameters.\n *\n * @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}\n * @memberof PayApiInterface\n */\n getPayTradeHistory(\n requestParameters?: GetPayTradeHistoryRequest\n ): Promise<RestApiResponse<GetPayTradeHistoryResponse>>;\n}\n\n/**\n * Request parameters for getPayTradeHistory operation in PayApi.\n * @interface GetPayTradeHistoryRequest\n */\nexport interface GetPayTradeHistoryRequest {\n /**\n *\n * @type {number | bigint}\n * @memberof PayApiGetPayTradeHistory\n */\n readonly startTime?: number | bigint;\n\n /**\n *\n * @type {number | bigint}\n * @memberof PayApiGetPayTradeHistory\n */\n readonly endTime?: number | bigint;\n\n /**\n * default 100, max 100\n * @type {number | bigint}\n * @memberof PayApiGetPayTradeHistory\n */\n readonly limit?: number | bigint;\n\n /**\n *\n * @type {number | bigint}\n * @memberof PayApiGetPayTradeHistory\n */\n readonly recvWindow?: number | bigint;\n}\n\n/**\n * PayApi - object-oriented interface\n * @class PayApi\n */\nexport class PayApi implements PayApiInterface {\n private readonly configuration: ConfigurationRestAPI;\n private localVarAxiosParamCreator;\n\n constructor(configuration: ConfigurationRestAPI) {\n this.configuration = configuration;\n this.localVarAxiosParamCreator = PayApiAxiosParamCreator(configuration);\n }\n\n /**\n * Get Pay Trade History\n *\n * If startTime and endTime are not sent, the recent 90 days' data will be returned.\n * The max interval between startTime and endTime is 90 days.\n * Support for querying orders within the last 18 months.\n * For payerInfo and receiverInfo,there are different return values in different orderTypes.\n * Sender's perspective when orderType is C2C\n * payerInfo : binanceId\n * receiverInfo : name, binanceId/accountId/email/countryCode/phoneNumber/mobileCode (based on user input)\n * Receiver's perspective when orderType is C2C\n * payerInfo : name\n * receiverInfo : binanceId\n * Sender's perspective when orderType is CRYPTO_BOX\n * payerInfo : binanceId\n * receiverInfo : name(the value is always \"Crypto Box\")\n * Receiver's perspective when orderType is CRYPTO_BOX\n * payerInfo : name\n * receiverInfo : binanceId\n * Sender's perspective when orderType is PAY\n * payerInfo : binanceId\n * receiverInfo : name\n * Receiver's perspective when orderType is PAY\n * payerInfo : name\n * receiverInfo : binanceId, name\n * Sender's perspective when orderType is PAY_REFUND\n * payerInfo : binanceId, name\n * receiverInfo : name, accountId\n * Receiver's perspective when orderType is PAY_REFUND\n * payerInfo : name\n * receiverInfo : binanceId\n * Sender's perspective when orderType is PAYOUT\n * payerInfo : binanceId, name\n * receiverInfo : name, accountId\n * Receiver's perspective when orderType is PAYOUT\n * payerInfo : name\n * receiverInfo : binanceId\n * Receiver's perspective when orderType is CRYPTO_BOX_RF\n * payerInfo : name(the value is always \"Crypto Box\")\n * receiverInfo : binanceId\n * Sender's perspective when orderType is REMITTANCE\n * payerInfo : binanceId\n * receiverInfo : name, institutionName, cardNumber, digitalWalletId\n *\n * Weight: 3000\n *\n * @summary Get Pay Trade History\n * @param {GetPayTradeHistoryRequest} requestParameters Request parameters.\n * @returns {Promise<RestApiResponse<GetPayTradeHistoryResponse>>}\n * @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}\n * @memberof PayApi\n * @see {@link https://developers.binance.com/docs/pay/rest-api/Get-Pay-Trade-History Binance API Documentation}\n */\n public async getPayTradeHistory(\n requestParameters: GetPayTradeHistoryRequest = {}\n ): Promise<RestApiResponse<GetPayTradeHistoryResponse>> {\n const localVarAxiosArgs = await this.localVarAxiosParamCreator.getPayTradeHistory(\n requestParameters?.startTime,\n requestParameters?.endTime,\n requestParameters?.limit,\n requestParameters?.recvWindow\n );\n return sendRequest<GetPayTradeHistoryResponse>(\n this.configuration,\n localVarAxiosArgs.endpoint,\n localVarAxiosArgs.method,\n localVarAxiosArgs.queryParams,\n localVarAxiosArgs.bodyParams,\n localVarAxiosArgs?.timeUnit,\n { isSigned: true }\n );\n }\n}\n","/**\n * Binance Pay REST API\n *\n * OpenAPI Specification for the Binance Pay REST API\n *\n * The version of the OpenAPI document: 1.0.0\n *\n *\n * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).\n * https://openapi-generator.tech\n * Do not edit the class manually.\n */\n\nimport { ConfigurationRestAPI, RestApiResponse, sendRequest } from '@binance/common';\nimport { PayApi } from './modules/pay-api';\n\nimport type { GetPayTradeHistoryRequest } from './modules/pay-api';\n\nimport type { GetPayTradeHistoryResponse } from './types';\n\nexport class RestAPI {\n private configuration: ConfigurationRestAPI;\n private payApi: PayApi;\n\n constructor(configuration: ConfigurationRestAPI) {\n this.configuration = configuration;\n this.payApi = new PayApi(configuration);\n }\n\n /**\n * Generic function to send a request.\n * @param endpoint - The API endpoint to call.\n * @param method - HTTP method to use (GET, POST, DELETE, etc.).\n * @param queryParams - Query parameters for the request.\n * @param bodyParams - Body parameters for the request.\n *\n * @returns A promise resolving to the response data object.\n */\n sendRequest<T>(\n endpoint: string,\n method: 'GET' | 'POST' | 'DELETE' | 'PUT' | 'PATCH',\n queryParams: Record<string, unknown> = {},\n bodyParams: Record<string, unknown> = {}\n ): Promise<RestApiResponse<T>> {\n return sendRequest<T>(\n this.configuration,\n endpoint,\n method,\n queryParams,\n bodyParams,\n undefined\n );\n }\n\n /**\n * Generic function to send a signed request.\n * @param endpoint - The API endpoint to call.\n * @param method - HTTP method to use (GET, POST, DELETE, etc.).\n * @param queryParams - Query parameters for the request.\n * @param bodyParams - Body parameters for the request.\n *\n * @returns A promise resolving to the response data object.\n */\n sendSignedRequest<T>(\n endpoint: string,\n method: 'GET' | 'POST' | 'DELETE' | 'PUT' | 'PATCH',\n queryParams: Record<string, unknown> = {},\n bodyParams: Record<string, unknown> = {}\n ): Promise<RestApiResponse<T>> {\n return sendRequest<T>(\n this.configuration,\n endpoint,\n method,\n queryParams,\n bodyParams,\n undefined,\n { isSigned: true }\n );\n }\n\n /**\n * Get Pay Trade History\n *\n * If startTime and endTime are not sent, the recent 90 days' data will be returned.\n * The max interval between startTime and endTime is 90 days.\n * Support for querying orders within the last 18 months.\n * For payerInfo and receiverInfo,there are different return values in different orderTypes.\n * Sender's perspective when orderType is C2C\n * payerInfo : binanceId\n * receiverInfo : name, binanceId/accountId/email/countryCode/phoneNumber/mobileCode (based on user input)\n * Receiver's perspective when orderType is C2C\n * payerInfo : name\n * receiverInfo : binanceId\n * Sender's perspective when orderType is CRYPTO_BOX\n * payerInfo : binanceId\n * receiverInfo : name(the value is always \"Crypto Box\")\n * Receiver's perspective when orderType is CRYPTO_BOX\n * payerInfo : name\n * receiverInfo : binanceId\n * Sender's perspective when orderType is PAY\n * payerInfo : binanceId\n * receiverInfo : name\n * Receiver's perspective when orderType is PAY\n * payerInfo : name\n * receiverInfo : binanceId, name\n * Sender's perspective when orderType is PAY_REFUND\n * payerInfo : binanceId, name\n * receiverInfo : name, accountId\n * Receiver's perspective when orderType is PAY_REFUND\n * payerInfo : name\n * receiverInfo : binanceId\n * Sender's perspective when orderType is PAYOUT\n * payerInfo : binanceId, name\n * receiverInfo : name, accountId\n * Receiver's perspective when orderType is PAYOUT\n * payerInfo : name\n * receiverInfo : binanceId\n * Receiver's perspective when orderType is CRYPTO_BOX_RF\n * payerInfo : name(the value is always \"Crypto Box\")\n * receiverInfo : binanceId\n * Sender's perspective when orderType is REMITTANCE\n * payerInfo : binanceId\n * receiverInfo : name, institutionName, cardNumber, digitalWalletId\n *\n * Weight: 3000\n *\n * @summary Get Pay Trade History\n * @param {GetPayTradeHistoryRequest} requestParameters Request parameters.\n *\n * @returns {Promise<RestApiResponse<GetPayTradeHistoryResponse>>}\n * @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}\n * @see {@link https://developers.binance.com/docs/pay/rest-api/Get-Pay-Trade-History Binance API Documentation}\n */\n getPayTradeHistory(\n requestParameters: GetPayTradeHistoryRequest = {}\n ): Promise<RestApiResponse<GetPayTradeHistoryResponse>> {\n return this.payApi.getPayTradeHistory(requestParameters);\n }\n}\n","/**\n * Binance Pay REST API\n *\n * OpenAPI Specification for the Binance Pay REST API\n *\n * The version of the OpenAPI document: 1.0.0\n *\n *\n * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).\n * https://openapi-generator.tech\n * Do not edit the class manually.\n */\n\nexport * from './types';\nexport * from './modules';\nexport * from './rest-api';\n","import { buildUserAgent, ConfigurationRestAPI, PAY_REST_API_PROD_URL } from '@binance/common';\nimport { name, version } from '../package.json';\nimport { RestAPI } from './rest-api';\n\nexport interface ConfigurationPay {\n configurationRestAPI?: ConfigurationRestAPI;\n}\n\nexport class Pay {\n public restAPI!: RestAPI;\n\n constructor(config: ConfigurationPay) {\n const userAgent = buildUserAgent(name, version);\n\n if (config?.configurationRestAPI) {\n const configRestAPI = new ConfigurationRestAPI(\n config.configurationRestAPI\n ) as ConfigurationRestAPI & {\n baseOptions: Record<string, unknown>;\n };\n configRestAPI.basePath = configRestAPI.basePath || PAY_REST_API_PROD_URL;\n configRestAPI.baseOptions = configRestAPI.baseOptions || {};\n configRestAPI.baseOptions.headers = {\n ...(configRestAPI.baseOptions.headers || {}),\n 'User-Agent': userAgent,\n };\n this.restAPI = new RestAPI(configRestAPI);\n }\n }\n}\n"],"mappings":";;;;;;;;;;;;;;;WACY;cAEG;;;;;;;;;;;;;;;;;;;ACsBf,MAAM,0BAA0B,SAAU,eAAqC;AAC3E,QAAO,EAuDH,oBAAoB,OAChB,WACA,SACA,OACA,eACuB;EACvB,MAAMA,yBAAkD,EAAE;EAC1D,MAAMC,wBAAiD,EAAE;AAEzD,MAAI,cAAc,UAAa,cAAc,KACzC,wBAAuB,eAAe;AAE1C,MAAI,YAAY,UAAa,YAAY,KACrC,wBAAuB,aAAa;AAExC,MAAI,UAAU,UAAa,UAAU,KACjC,wBAAuB,WAAW;AAEtC,MAAI,eAAe,UAAa,eAAe,KAC3C,wBAAuB,gBAAgB;EAG3C,IAAIC;AACJ,MAAI,cAAc,cAAe,aAAY,cAAc;AAE3D,SAAO;GACH,UAAU;GACV,QAAQ;GACR,aAAa;GACb,YAAY;GACZ,UAAU;GACb;IAER;;;;;;AAuGL,IAAa,SAAb,MAA+C;CAI3C,YAAY,eAAqC;AAC7C,OAAK,gBAAgB;AACrB,OAAK,4BAA4B,wBAAwB,cAAc;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAwD3E,MAAa,mBACT,oBAA+C,EAAE,EACG;EACpD,MAAM,oBAAoB,MAAM,KAAK,0BAA0B,mBAC3D,mBAAmB,WACnB,mBAAmB,SACnB,mBAAmB,OACnB,mBAAmB,WACtB;AACD,2CACI,KAAK,eACL,kBAAkB,UAClB,kBAAkB,QAClB,kBAAkB,aAClB,kBAAkB,YAClB,mBAAmB,UACnB,EAAE,UAAU,MAAM,CACrB;;;;;;;;;;;;;;;;;;ACpRT,IAAa,UAAb,MAAqB;CAIjB,YAAY,eAAqC;AAC7C,OAAK,gBAAgB;AACrB,OAAK,SAAS,IAAI,OAAO,cAAc;;;;;;;;;;;CAY3C,YACI,UACA,QACA,cAAuC,EAAE,EACzC,aAAsC,EAAE,EACb;AAC3B,2CACI,KAAK,eACL,UACA,QACA,aACA,YACA,OACH;;;;;;;;;;;CAYL,kBACI,UACA,QACA,cAAuC,EAAE,EACzC,aAAsC,EAAE,EACb;AAC3B,2CACI,KAAK,eACL,UACA,QACA,aACA,YACA,QACA,EAAE,UAAU,MAAM,CACrB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAwDL,mBACI,oBAA+C,EAAE,EACG;AACpD,SAAO,KAAK,OAAO,mBAAmB,kBAAkB;;;;;;;;;;;;;AEhIhE,IAAa,MAAb,MAAiB;CAGb,YAAY,QAA0B;EAClC,MAAM,iDAA2B,MAAM,QAAQ;AAE/C,MAAI,QAAQ,sBAAsB;GAC9B,MAAM,gBAAgB,IAAIC,sCACtB,OAAO,qBACV;AAGD,iBAAc,WAAW,cAAc,YAAYC;AACnD,iBAAc,cAAc,cAAc,eAAe,EAAE;AAC3D,iBAAc,YAAY,UAAU;IAChC,GAAI,cAAc,YAAY,WAAW,EAAE;IAC3C,cAAc;IACjB;AACD,QAAK,UAAU,IAAI,QAAQ,cAAc"}
package/dist/index.mjs CHANGED
@@ -3,7 +3,7 @@ import { BadRequestError, ConfigurationRestAPI, ConnectorClientError, ForbiddenE
3
3
 
4
4
  //#region package.json
5
5
  var name = "@binance/pay";
6
- var version = "5.1.12";
6
+ var version = "6.0.1";
7
7
 
8
8
  //#endregion
9
9
  //#region src/rest-api/modules/pay-api.ts
@@ -1 +1 @@
1
- {"version":3,"file":"index.mjs","names":["localVarQueryParameter: Record<string, unknown>","localVarBodyParameter: Record<string, unknown>","_timeUnit: TimeUnit | undefined","PAY_REST_API_PROD_URL"],"sources":["../package.json","../src/rest-api/modules/pay-api.ts","../src/rest-api/rest-api.ts","../src/rest-api/index.ts","../src/pay.ts"],"sourcesContent":["{\n \"name\": \"@binance/pay\",\n \"description\": \"Official Binance Pay Connector - A lightweight library that provides a convenient interface to Binance's Pay REST API.\",\n \"version\": \"5.1.12\",\n \"main\": \"./dist/index.js\",\n \"module\": \"./dist/index.mjs\",\n \"types\": \"./dist/index.d.ts\",\n \"exports\": {\n \".\": {\n \"require\": \"./dist/index.js\",\n \"import\": \"./dist/index.mjs\"\n }\n },\n \"scripts\": {\n \"prepublishOnly\": \"npm run build\",\n \"build\": \"npm run clean && tsdown\",\n \"typecheck\": \"tsc --noEmit\",\n \"clean\": \"rm -rf dist\",\n \"test\": \"npx jest --maxWorkers=4 --bail\",\n \"test:watch\": \"npx jest --watch\",\n \"format\": \"npx prettier --ignore-path .prettierignore --write .\",\n \"lint\": \"npx eslint '**/*.ts' --fix\"\n },\n \"keywords\": [\n \"Binance\",\n \"API\",\n \"Simple Earn\",\n \"Connector\",\n \"REST\",\n \"Trading\"\n ],\n \"author\": \"Binance\",\n \"license\": \"MIT\",\n \"repository\": {\n \"type\": \"git\",\n \"url\": \"https://github.com/binance/binance-connector-js.git\"\n },\n \"bugs\": {\n \"url\": \"https://github.com/binance/binance-connector-js/issues\"\n },\n \"homepage\": \"https://github.com/binance/binance-connector-js#readme\",\n \"files\": [\n \"dist\"\n ],\n \"devDependencies\": {\n \"@types/jest\": \"^29.5.4\",\n \"@types/node\": \"^20.17.24\",\n \"eslint\": \"8.57.0\",\n \"jest\": \"^29.6.4\",\n \"json-with-bigint\": \"^3.4.4\",\n \"prettier\": \"^3.3.3\",\n \"ts-jest\": \"^29.1.1\",\n \"ts-node\": \"^10.9.1\",\n \"tsdown\": \"^0.16.5\",\n \"typescript\": \"^5.7.2\",\n \"typescript-eslint\": \"^8.24.0\"\n },\n \"dependencies\": {\n \"@binance/common\": \"2.3.11\",\n \"axios\": \"^1.7.4\"\n }\n}\n","/**\n * Binance Pay REST API\n *\n * OpenAPI Specification for the Binance Pay REST API\n *\n * The version of the OpenAPI document: 1.0.0\n *\n *\n * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).\n * https://openapi-generator.tech\n * Do not edit the class manually.\n */\n\nimport {\n ConfigurationRestAPI,\n TimeUnit,\n RestApiResponse,\n sendRequest,\n type RequestArgs,\n} from '@binance/common';\nimport type { GetPayTradeHistoryResponse } from '../types';\n\n/**\n * PayApi - axios parameter creator\n */\nconst PayApiAxiosParamCreator = function (configuration: ConfigurationRestAPI) {\n return {\n /**\n * Get Pay Trade History\n *\n * If startTime and endTime are not sent, the recent 90 days' data will be returned.\n * The max interval between startTime and endTime is 90 days.\n * Support for querying orders within the last 18 months.\n * For payerInfo and receiverInfo,there are different return values in different orderTypes.\n * Sender's perspective when orderType is C2C\n * payerInfo : binanceId\n * receiverInfo : name, binanceId/accountId/email/countryCode/phoneNumber/mobileCode (based on user input)\n * Receiver's perspective when orderType is C2C\n * payerInfo : name\n * receiverInfo : binanceId\n * Sender's perspective when orderType is CRYPTO_BOX\n * payerInfo : binanceId\n * receiverInfo : name(the value is always \"Crypto Box\")\n * Receiver's perspective when orderType is CRYPTO_BOX\n * payerInfo : name\n * receiverInfo : binanceId\n * Sender's perspective when orderType is PAY\n * payerInfo : binanceId\n * receiverInfo : name\n * Receiver's perspective when orderType is PAY\n * payerInfo : name\n * receiverInfo : binanceId, name\n * Sender's perspective when orderType is PAY_REFUND\n * payerInfo : binanceId, name\n * receiverInfo : name, accountId\n * Receiver's perspective when orderType is PAY_REFUND\n * payerInfo : name\n * receiverInfo : binanceId\n * Sender's perspective when orderType is PAYOUT\n * payerInfo : binanceId, name\n * receiverInfo : name, accountId\n * Receiver's perspective when orderType is PAYOUT\n * payerInfo : name\n * receiverInfo : binanceId\n * Receiver's perspective when orderType is CRYPTO_BOX_RF\n * payerInfo : name(the value is always \"Crypto Box\")\n * receiverInfo : binanceId\n * Sender's perspective when orderType is REMITTANCE\n * payerInfo : binanceId\n * receiverInfo : name, institutionName, cardNumber, digitalWalletId\n *\n * Weight: 3000\n *\n * @summary Get Pay Trade History\n * @param {number | bigint} [startTime]\n * @param {number | bigint} [endTime]\n * @param {number | bigint} [limit] default 100, max 100\n * @param {number | bigint} [recvWindow]\n *\n * @throws {RequiredError}\n */\n getPayTradeHistory: async (\n startTime?: number | bigint,\n endTime?: number | bigint,\n limit?: number | bigint,\n recvWindow?: number | bigint\n ): Promise<RequestArgs> => {\n const localVarQueryParameter: Record<string, unknown> = {};\n const localVarBodyParameter: Record<string, unknown> = {};\n\n if (startTime !== undefined && startTime !== null) {\n localVarQueryParameter['startTime'] = startTime;\n }\n if (endTime !== undefined && endTime !== null) {\n localVarQueryParameter['endTime'] = endTime;\n }\n if (limit !== undefined && limit !== null) {\n localVarQueryParameter['limit'] = limit;\n }\n if (recvWindow !== undefined && recvWindow !== null) {\n localVarQueryParameter['recvWindow'] = recvWindow;\n }\n\n let _timeUnit: TimeUnit | undefined;\n if ('timeUnit' in configuration) _timeUnit = configuration.timeUnit as TimeUnit;\n\n return {\n endpoint: '/sapi/v1/pay/transactions',\n method: 'GET',\n queryParams: localVarQueryParameter,\n bodyParams: localVarBodyParameter,\n timeUnit: _timeUnit,\n };\n },\n };\n};\n\n/**\n * PayApi - interface\n * @interface PayApi\n */\nexport interface PayApiInterface {\n /**\n * Get Pay Trade History\n *\n * If startTime and endTime are not sent, the recent 90 days' data will be returned.\n * The max interval between startTime and endTime is 90 days.\n * Support for querying orders within the last 18 months.\n * For payerInfo and receiverInfo,there are different return values in different orderTypes.\n * Sender's perspective when orderType is C2C\n * payerInfo : binanceId\n * receiverInfo : name, binanceId/accountId/email/countryCode/phoneNumber/mobileCode (based on user input)\n * Receiver's perspective when orderType is C2C\n * payerInfo : name\n * receiverInfo : binanceId\n * Sender's perspective when orderType is CRYPTO_BOX\n * payerInfo : binanceId\n * receiverInfo : name(the value is always \"Crypto Box\")\n * Receiver's perspective when orderType is CRYPTO_BOX\n * payerInfo : name\n * receiverInfo : binanceId\n * Sender's perspective when orderType is PAY\n * payerInfo : binanceId\n * receiverInfo : name\n * Receiver's perspective when orderType is PAY\n * payerInfo : name\n * receiverInfo : binanceId, name\n * Sender's perspective when orderType is PAY_REFUND\n * payerInfo : binanceId, name\n * receiverInfo : name, accountId\n * Receiver's perspective when orderType is PAY_REFUND\n * payerInfo : name\n * receiverInfo : binanceId\n * Sender's perspective when orderType is PAYOUT\n * payerInfo : binanceId, name\n * receiverInfo : name, accountId\n * Receiver's perspective when orderType is PAYOUT\n * payerInfo : name\n * receiverInfo : binanceId\n * Receiver's perspective when orderType is CRYPTO_BOX_RF\n * payerInfo : name(the value is always \"Crypto Box\")\n * receiverInfo : binanceId\n * Sender's perspective when orderType is REMITTANCE\n * payerInfo : binanceId\n * receiverInfo : name, institutionName, cardNumber, digitalWalletId\n *\n * Weight: 3000\n *\n * @summary Get Pay Trade History\n * @param {GetPayTradeHistoryRequest} requestParameters Request parameters.\n *\n * @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}\n * @memberof PayApiInterface\n */\n getPayTradeHistory(\n requestParameters?: GetPayTradeHistoryRequest\n ): Promise<RestApiResponse<GetPayTradeHistoryResponse>>;\n}\n\n/**\n * Request parameters for getPayTradeHistory operation in PayApi.\n * @interface GetPayTradeHistoryRequest\n */\nexport interface GetPayTradeHistoryRequest {\n /**\n *\n * @type {number | bigint}\n * @memberof PayApiGetPayTradeHistory\n */\n readonly startTime?: number | bigint;\n\n /**\n *\n * @type {number | bigint}\n * @memberof PayApiGetPayTradeHistory\n */\n readonly endTime?: number | bigint;\n\n /**\n * default 100, max 100\n * @type {number | bigint}\n * @memberof PayApiGetPayTradeHistory\n */\n readonly limit?: number | bigint;\n\n /**\n *\n * @type {number | bigint}\n * @memberof PayApiGetPayTradeHistory\n */\n readonly recvWindow?: number | bigint;\n}\n\n/**\n * PayApi - object-oriented interface\n * @class PayApi\n */\nexport class PayApi implements PayApiInterface {\n private readonly configuration: ConfigurationRestAPI;\n private localVarAxiosParamCreator;\n\n constructor(configuration: ConfigurationRestAPI) {\n this.configuration = configuration;\n this.localVarAxiosParamCreator = PayApiAxiosParamCreator(configuration);\n }\n\n /**\n * Get Pay Trade History\n *\n * If startTime and endTime are not sent, the recent 90 days' data will be returned.\n * The max interval between startTime and endTime is 90 days.\n * Support for querying orders within the last 18 months.\n * For payerInfo and receiverInfo,there are different return values in different orderTypes.\n * Sender's perspective when orderType is C2C\n * payerInfo : binanceId\n * receiverInfo : name, binanceId/accountId/email/countryCode/phoneNumber/mobileCode (based on user input)\n * Receiver's perspective when orderType is C2C\n * payerInfo : name\n * receiverInfo : binanceId\n * Sender's perspective when orderType is CRYPTO_BOX\n * payerInfo : binanceId\n * receiverInfo : name(the value is always \"Crypto Box\")\n * Receiver's perspective when orderType is CRYPTO_BOX\n * payerInfo : name\n * receiverInfo : binanceId\n * Sender's perspective when orderType is PAY\n * payerInfo : binanceId\n * receiverInfo : name\n * Receiver's perspective when orderType is PAY\n * payerInfo : name\n * receiverInfo : binanceId, name\n * Sender's perspective when orderType is PAY_REFUND\n * payerInfo : binanceId, name\n * receiverInfo : name, accountId\n * Receiver's perspective when orderType is PAY_REFUND\n * payerInfo : name\n * receiverInfo : binanceId\n * Sender's perspective when orderType is PAYOUT\n * payerInfo : binanceId, name\n * receiverInfo : name, accountId\n * Receiver's perspective when orderType is PAYOUT\n * payerInfo : name\n * receiverInfo : binanceId\n * Receiver's perspective when orderType is CRYPTO_BOX_RF\n * payerInfo : name(the value is always \"Crypto Box\")\n * receiverInfo : binanceId\n * Sender's perspective when orderType is REMITTANCE\n * payerInfo : binanceId\n * receiverInfo : name, institutionName, cardNumber, digitalWalletId\n *\n * Weight: 3000\n *\n * @summary Get Pay Trade History\n * @param {GetPayTradeHistoryRequest} requestParameters Request parameters.\n * @returns {Promise<RestApiResponse<GetPayTradeHistoryResponse>>}\n * @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}\n * @memberof PayApi\n * @see {@link https://developers.binance.com/docs/pay/rest-api/Get-Pay-Trade-History Binance API Documentation}\n */\n public async getPayTradeHistory(\n requestParameters: GetPayTradeHistoryRequest = {}\n ): Promise<RestApiResponse<GetPayTradeHistoryResponse>> {\n const localVarAxiosArgs = await this.localVarAxiosParamCreator.getPayTradeHistory(\n requestParameters?.startTime,\n requestParameters?.endTime,\n requestParameters?.limit,\n requestParameters?.recvWindow\n );\n return sendRequest<GetPayTradeHistoryResponse>(\n this.configuration,\n localVarAxiosArgs.endpoint,\n localVarAxiosArgs.method,\n localVarAxiosArgs.queryParams,\n localVarAxiosArgs.bodyParams,\n localVarAxiosArgs?.timeUnit,\n { isSigned: true }\n );\n }\n}\n","/**\n * Binance Pay REST API\n *\n * OpenAPI Specification for the Binance Pay REST API\n *\n * The version of the OpenAPI document: 1.0.0\n *\n *\n * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).\n * https://openapi-generator.tech\n * Do not edit the class manually.\n */\n\nimport { ConfigurationRestAPI, RestApiResponse, sendRequest } from '@binance/common';\nimport { PayApi } from './modules/pay-api';\n\nimport type { GetPayTradeHistoryRequest } from './modules/pay-api';\n\nimport type { GetPayTradeHistoryResponse } from './types';\n\nexport class RestAPI {\n private configuration: ConfigurationRestAPI;\n private payApi: PayApi;\n\n constructor(configuration: ConfigurationRestAPI) {\n this.configuration = configuration;\n this.payApi = new PayApi(configuration);\n }\n\n /**\n * Generic function to send a request.\n * @param endpoint - The API endpoint to call.\n * @param method - HTTP method to use (GET, POST, DELETE, etc.).\n * @param queryParams - Query parameters for the request.\n * @param bodyParams - Body parameters for the request.\n *\n * @returns A promise resolving to the response data object.\n */\n sendRequest<T>(\n endpoint: string,\n method: 'GET' | 'POST' | 'DELETE' | 'PUT' | 'PATCH',\n queryParams: Record<string, unknown> = {},\n bodyParams: Record<string, unknown> = {}\n ): Promise<RestApiResponse<T>> {\n return sendRequest<T>(\n this.configuration,\n endpoint,\n method,\n queryParams,\n bodyParams,\n undefined\n );\n }\n\n /**\n * Generic function to send a signed request.\n * @param endpoint - The API endpoint to call.\n * @param method - HTTP method to use (GET, POST, DELETE, etc.).\n * @param queryParams - Query parameters for the request.\n * @param bodyParams - Body parameters for the request.\n *\n * @returns A promise resolving to the response data object.\n */\n sendSignedRequest<T>(\n endpoint: string,\n method: 'GET' | 'POST' | 'DELETE' | 'PUT' | 'PATCH',\n queryParams: Record<string, unknown> = {},\n bodyParams: Record<string, unknown> = {}\n ): Promise<RestApiResponse<T>> {\n return sendRequest<T>(\n this.configuration,\n endpoint,\n method,\n queryParams,\n bodyParams,\n undefined,\n { isSigned: true }\n );\n }\n\n /**\n * Get Pay Trade History\n *\n * If startTime and endTime are not sent, the recent 90 days' data will be returned.\n * The max interval between startTime and endTime is 90 days.\n * Support for querying orders within the last 18 months.\n * For payerInfo and receiverInfo,there are different return values in different orderTypes.\n * Sender's perspective when orderType is C2C\n * payerInfo : binanceId\n * receiverInfo : name, binanceId/accountId/email/countryCode/phoneNumber/mobileCode (based on user input)\n * Receiver's perspective when orderType is C2C\n * payerInfo : name\n * receiverInfo : binanceId\n * Sender's perspective when orderType is CRYPTO_BOX\n * payerInfo : binanceId\n * receiverInfo : name(the value is always \"Crypto Box\")\n * Receiver's perspective when orderType is CRYPTO_BOX\n * payerInfo : name\n * receiverInfo : binanceId\n * Sender's perspective when orderType is PAY\n * payerInfo : binanceId\n * receiverInfo : name\n * Receiver's perspective when orderType is PAY\n * payerInfo : name\n * receiverInfo : binanceId, name\n * Sender's perspective when orderType is PAY_REFUND\n * payerInfo : binanceId, name\n * receiverInfo : name, accountId\n * Receiver's perspective when orderType is PAY_REFUND\n * payerInfo : name\n * receiverInfo : binanceId\n * Sender's perspective when orderType is PAYOUT\n * payerInfo : binanceId, name\n * receiverInfo : name, accountId\n * Receiver's perspective when orderType is PAYOUT\n * payerInfo : name\n * receiverInfo : binanceId\n * Receiver's perspective when orderType is CRYPTO_BOX_RF\n * payerInfo : name(the value is always \"Crypto Box\")\n * receiverInfo : binanceId\n * Sender's perspective when orderType is REMITTANCE\n * payerInfo : binanceId\n * receiverInfo : name, institutionName, cardNumber, digitalWalletId\n *\n * Weight: 3000\n *\n * @summary Get Pay Trade History\n * @param {GetPayTradeHistoryRequest} requestParameters Request parameters.\n *\n * @returns {Promise<RestApiResponse<GetPayTradeHistoryResponse>>}\n * @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}\n * @see {@link https://developers.binance.com/docs/pay/rest-api/Get-Pay-Trade-History Binance API Documentation}\n */\n getPayTradeHistory(\n requestParameters: GetPayTradeHistoryRequest = {}\n ): Promise<RestApiResponse<GetPayTradeHistoryResponse>> {\n return this.payApi.getPayTradeHistory(requestParameters);\n }\n}\n","/**\n * Binance Pay REST API\n *\n * OpenAPI Specification for the Binance Pay REST API\n *\n * The version of the OpenAPI document: 1.0.0\n *\n *\n * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).\n * https://openapi-generator.tech\n * Do not edit the class manually.\n */\n\nexport * from './types';\nexport * from './modules';\nexport * from './rest-api';\n","import { buildUserAgent, ConfigurationRestAPI, PAY_REST_API_PROD_URL } from '@binance/common';\nimport { name, version } from '../package.json';\nimport { RestAPI } from './rest-api';\n\nexport interface ConfigurationPay {\n configurationRestAPI?: ConfigurationRestAPI;\n}\n\nexport class Pay {\n public restAPI!: RestAPI;\n\n constructor(config: ConfigurationPay) {\n const userAgent = buildUserAgent(name, version);\n\n if (config?.configurationRestAPI) {\n const configRestAPI = new ConfigurationRestAPI(\n config.configurationRestAPI\n ) as ConfigurationRestAPI & {\n baseOptions: Record<string, unknown>;\n };\n configRestAPI.basePath = configRestAPI.basePath || PAY_REST_API_PROD_URL;\n configRestAPI.baseOptions = configRestAPI.baseOptions || {};\n configRestAPI.baseOptions.headers = {\n ...(configRestAPI.baseOptions.headers || {}),\n 'User-Agent': userAgent,\n };\n this.restAPI = new RestAPI(configRestAPI);\n }\n }\n}\n"],"mappings":";;;;WACY;cAEG;;;;;;;;;;;;;;;;;;;ACsBf,MAAM,0BAA0B,SAAU,eAAqC;AAC3E,QAAO,EAuDH,oBAAoB,OAChB,WACA,SACA,OACA,eACuB;EACvB,MAAMA,yBAAkD,EAAE;EAC1D,MAAMC,wBAAiD,EAAE;AAEzD,MAAI,cAAc,UAAa,cAAc,KACzC,wBAAuB,eAAe;AAE1C,MAAI,YAAY,UAAa,YAAY,KACrC,wBAAuB,aAAa;AAExC,MAAI,UAAU,UAAa,UAAU,KACjC,wBAAuB,WAAW;AAEtC,MAAI,eAAe,UAAa,eAAe,KAC3C,wBAAuB,gBAAgB;EAG3C,IAAIC;AACJ,MAAI,cAAc,cAAe,aAAY,cAAc;AAE3D,SAAO;GACH,UAAU;GACV,QAAQ;GACR,aAAa;GACb,YAAY;GACZ,UAAU;GACb;IAER;;;;;;AAuGL,IAAa,SAAb,MAA+C;CAI3C,YAAY,eAAqC;AAC7C,OAAK,gBAAgB;AACrB,OAAK,4BAA4B,wBAAwB,cAAc;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAwD3E,MAAa,mBACT,oBAA+C,EAAE,EACG;EACpD,MAAM,oBAAoB,MAAM,KAAK,0BAA0B,mBAC3D,mBAAmB,WACnB,mBAAmB,SACnB,mBAAmB,OACnB,mBAAmB,WACtB;AACD,SAAO,YACH,KAAK,eACL,kBAAkB,UAClB,kBAAkB,QAClB,kBAAkB,aAClB,kBAAkB,YAClB,mBAAmB,UACnB,EAAE,UAAU,MAAM,CACrB;;;;;;;;;;;;;;;;;;ACpRT,IAAa,UAAb,MAAqB;CAIjB,YAAY,eAAqC;AAC7C,OAAK,gBAAgB;AACrB,OAAK,SAAS,IAAI,OAAO,cAAc;;;;;;;;;;;CAY3C,YACI,UACA,QACA,cAAuC,EAAE,EACzC,aAAsC,EAAE,EACb;AAC3B,SAAO,YACH,KAAK,eACL,UACA,QACA,aACA,YACA,OACH;;;;;;;;;;;CAYL,kBACI,UACA,QACA,cAAuC,EAAE,EACzC,aAAsC,EAAE,EACb;AAC3B,SAAO,YACH,KAAK,eACL,UACA,QACA,aACA,YACA,QACA,EAAE,UAAU,MAAM,CACrB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAwDL,mBACI,oBAA+C,EAAE,EACG;AACpD,SAAO,KAAK,OAAO,mBAAmB,kBAAkB;;;;;;;;;;;;;AEhIhE,IAAa,MAAb,MAAiB;CAGb,YAAY,QAA0B;EAClC,MAAM,YAAY,eAAe,MAAM,QAAQ;AAE/C,MAAI,QAAQ,sBAAsB;GAC9B,MAAM,gBAAgB,IAAI,qBACtB,OAAO,qBACV;AAGD,iBAAc,WAAW,cAAc,YAAYC;AACnD,iBAAc,cAAc,cAAc,eAAe,EAAE;AAC3D,iBAAc,YAAY,UAAU;IAChC,GAAI,cAAc,YAAY,WAAW,EAAE;IAC3C,cAAc;IACjB;AACD,QAAK,UAAU,IAAI,QAAQ,cAAc"}
1
+ {"version":3,"file":"index.mjs","names":["localVarQueryParameter: Record<string, unknown>","localVarBodyParameter: Record<string, unknown>","_timeUnit: TimeUnit | undefined","PAY_REST_API_PROD_URL"],"sources":["../package.json","../src/rest-api/modules/pay-api.ts","../src/rest-api/rest-api.ts","../src/rest-api/index.ts","../src/pay.ts"],"sourcesContent":["{\n \"name\": \"@binance/pay\",\n \"description\": \"Official Binance Pay Connector - A lightweight library that provides a convenient interface to Binance's Pay REST API.\",\n \"version\": \"6.0.1\",\n \"main\": \"./dist/index.js\",\n \"module\": \"./dist/index.mjs\",\n \"types\": \"./dist/index.d.ts\",\n \"exports\": {\n \".\": {\n \"require\": \"./dist/index.js\",\n \"import\": \"./dist/index.mjs\"\n }\n },\n \"scripts\": {\n \"prepublishOnly\": \"npm run build\",\n \"build\": \"npm run clean && tsdown\",\n \"typecheck\": \"tsc --noEmit\",\n \"clean\": \"rm -rf dist\",\n \"test\": \"npx jest --maxWorkers=4 --bail\",\n \"test:watch\": \"npx jest --watch\",\n \"format\": \"npx prettier --ignore-path .prettierignore --write .\",\n \"lint\": \"npx eslint '**/*.ts' --fix\"\n },\n \"keywords\": [\n \"Binance\",\n \"API\",\n \"Simple Earn\",\n \"Connector\",\n \"REST\",\n \"Trading\"\n ],\n \"author\": \"Binance\",\n \"license\": \"MIT\",\n \"repository\": {\n \"type\": \"git\",\n \"url\": \"https://github.com/binance/binance-connector-js.git\"\n },\n \"bugs\": {\n \"url\": \"https://github.com/binance/binance-connector-js/issues\"\n },\n \"homepage\": \"https://github.com/binance/binance-connector-js#readme\",\n \"files\": [\n \"dist\"\n ],\n \"devDependencies\": {\n \"@types/jest\": \"^29.5.4\",\n \"@types/node\": \"^20.17.24\",\n \"eslint\": \"8.57.0\",\n \"jest\": \"^29.6.4\",\n \"json-with-bigint\": \"^3.4.4\",\n \"prettier\": \"^3.3.3\",\n \"ts-jest\": \"^29.1.1\",\n \"ts-node\": \"^10.9.1\",\n \"tsdown\": \"^0.16.5\",\n \"typescript\": \"^5.7.2\",\n \"typescript-eslint\": \"^8.24.0\"\n },\n \"dependencies\": {\n \"@binance/common\": \"2.3.13\",\n \"axios\": \"^1.7.4\"\n }\n}\n","/**\n * Binance Pay REST API\n *\n * OpenAPI Specification for the Binance Pay REST API\n *\n * The version of the OpenAPI document: 1.0.0\n *\n *\n * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).\n * https://openapi-generator.tech\n * Do not edit the class manually.\n */\n\nimport {\n ConfigurationRestAPI,\n TimeUnit,\n RestApiResponse,\n sendRequest,\n type RequestArgs,\n} from '@binance/common';\nimport type { GetPayTradeHistoryResponse } from '../types';\n\n/**\n * PayApi - axios parameter creator\n */\nconst PayApiAxiosParamCreator = function (configuration: ConfigurationRestAPI) {\n return {\n /**\n * Get Pay Trade History\n *\n * If startTime and endTime are not sent, the recent 90 days' data will be returned.\n * The max interval between startTime and endTime is 90 days.\n * Support for querying orders within the last 18 months.\n * For payerInfo and receiverInfo,there are different return values in different orderTypes.\n * Sender's perspective when orderType is C2C\n * payerInfo : binanceId\n * receiverInfo : name, binanceId/accountId/email/countryCode/phoneNumber/mobileCode (based on user input)\n * Receiver's perspective when orderType is C2C\n * payerInfo : name\n * receiverInfo : binanceId\n * Sender's perspective when orderType is CRYPTO_BOX\n * payerInfo : binanceId\n * receiverInfo : name(the value is always \"Crypto Box\")\n * Receiver's perspective when orderType is CRYPTO_BOX\n * payerInfo : name\n * receiverInfo : binanceId\n * Sender's perspective when orderType is PAY\n * payerInfo : binanceId\n * receiverInfo : name\n * Receiver's perspective when orderType is PAY\n * payerInfo : name\n * receiverInfo : binanceId, name\n * Sender's perspective when orderType is PAY_REFUND\n * payerInfo : binanceId, name\n * receiverInfo : name, accountId\n * Receiver's perspective when orderType is PAY_REFUND\n * payerInfo : name\n * receiverInfo : binanceId\n * Sender's perspective when orderType is PAYOUT\n * payerInfo : binanceId, name\n * receiverInfo : name, accountId\n * Receiver's perspective when orderType is PAYOUT\n * payerInfo : name\n * receiverInfo : binanceId\n * Receiver's perspective when orderType is CRYPTO_BOX_RF\n * payerInfo : name(the value is always \"Crypto Box\")\n * receiverInfo : binanceId\n * Sender's perspective when orderType is REMITTANCE\n * payerInfo : binanceId\n * receiverInfo : name, institutionName, cardNumber, digitalWalletId\n *\n * Weight: 3000\n *\n * @summary Get Pay Trade History\n * @param {number | bigint} [startTime]\n * @param {number | bigint} [endTime]\n * @param {number | bigint} [limit] default 100, max 100\n * @param {number | bigint} [recvWindow]\n *\n * @throws {RequiredError}\n */\n getPayTradeHistory: async (\n startTime?: number | bigint,\n endTime?: number | bigint,\n limit?: number | bigint,\n recvWindow?: number | bigint\n ): Promise<RequestArgs> => {\n const localVarQueryParameter: Record<string, unknown> = {};\n const localVarBodyParameter: Record<string, unknown> = {};\n\n if (startTime !== undefined && startTime !== null) {\n localVarQueryParameter['startTime'] = startTime;\n }\n if (endTime !== undefined && endTime !== null) {\n localVarQueryParameter['endTime'] = endTime;\n }\n if (limit !== undefined && limit !== null) {\n localVarQueryParameter['limit'] = limit;\n }\n if (recvWindow !== undefined && recvWindow !== null) {\n localVarQueryParameter['recvWindow'] = recvWindow;\n }\n\n let _timeUnit: TimeUnit | undefined;\n if ('timeUnit' in configuration) _timeUnit = configuration.timeUnit as TimeUnit;\n\n return {\n endpoint: '/sapi/v1/pay/transactions',\n method: 'GET',\n queryParams: localVarQueryParameter,\n bodyParams: localVarBodyParameter,\n timeUnit: _timeUnit,\n };\n },\n };\n};\n\n/**\n * PayApi - interface\n * @interface PayApi\n */\nexport interface PayApiInterface {\n /**\n * Get Pay Trade History\n *\n * If startTime and endTime are not sent, the recent 90 days' data will be returned.\n * The max interval between startTime and endTime is 90 days.\n * Support for querying orders within the last 18 months.\n * For payerInfo and receiverInfo,there are different return values in different orderTypes.\n * Sender's perspective when orderType is C2C\n * payerInfo : binanceId\n * receiverInfo : name, binanceId/accountId/email/countryCode/phoneNumber/mobileCode (based on user input)\n * Receiver's perspective when orderType is C2C\n * payerInfo : name\n * receiverInfo : binanceId\n * Sender's perspective when orderType is CRYPTO_BOX\n * payerInfo : binanceId\n * receiverInfo : name(the value is always \"Crypto Box\")\n * Receiver's perspective when orderType is CRYPTO_BOX\n * payerInfo : name\n * receiverInfo : binanceId\n * Sender's perspective when orderType is PAY\n * payerInfo : binanceId\n * receiverInfo : name\n * Receiver's perspective when orderType is PAY\n * payerInfo : name\n * receiverInfo : binanceId, name\n * Sender's perspective when orderType is PAY_REFUND\n * payerInfo : binanceId, name\n * receiverInfo : name, accountId\n * Receiver's perspective when orderType is PAY_REFUND\n * payerInfo : name\n * receiverInfo : binanceId\n * Sender's perspective when orderType is PAYOUT\n * payerInfo : binanceId, name\n * receiverInfo : name, accountId\n * Receiver's perspective when orderType is PAYOUT\n * payerInfo : name\n * receiverInfo : binanceId\n * Receiver's perspective when orderType is CRYPTO_BOX_RF\n * payerInfo : name(the value is always \"Crypto Box\")\n * receiverInfo : binanceId\n * Sender's perspective when orderType is REMITTANCE\n * payerInfo : binanceId\n * receiverInfo : name, institutionName, cardNumber, digitalWalletId\n *\n * Weight: 3000\n *\n * @summary Get Pay Trade History\n * @param {GetPayTradeHistoryRequest} requestParameters Request parameters.\n *\n * @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}\n * @memberof PayApiInterface\n */\n getPayTradeHistory(\n requestParameters?: GetPayTradeHistoryRequest\n ): Promise<RestApiResponse<GetPayTradeHistoryResponse>>;\n}\n\n/**\n * Request parameters for getPayTradeHistory operation in PayApi.\n * @interface GetPayTradeHistoryRequest\n */\nexport interface GetPayTradeHistoryRequest {\n /**\n *\n * @type {number | bigint}\n * @memberof PayApiGetPayTradeHistory\n */\n readonly startTime?: number | bigint;\n\n /**\n *\n * @type {number | bigint}\n * @memberof PayApiGetPayTradeHistory\n */\n readonly endTime?: number | bigint;\n\n /**\n * default 100, max 100\n * @type {number | bigint}\n * @memberof PayApiGetPayTradeHistory\n */\n readonly limit?: number | bigint;\n\n /**\n *\n * @type {number | bigint}\n * @memberof PayApiGetPayTradeHistory\n */\n readonly recvWindow?: number | bigint;\n}\n\n/**\n * PayApi - object-oriented interface\n * @class PayApi\n */\nexport class PayApi implements PayApiInterface {\n private readonly configuration: ConfigurationRestAPI;\n private localVarAxiosParamCreator;\n\n constructor(configuration: ConfigurationRestAPI) {\n this.configuration = configuration;\n this.localVarAxiosParamCreator = PayApiAxiosParamCreator(configuration);\n }\n\n /**\n * Get Pay Trade History\n *\n * If startTime and endTime are not sent, the recent 90 days' data will be returned.\n * The max interval between startTime and endTime is 90 days.\n * Support for querying orders within the last 18 months.\n * For payerInfo and receiverInfo,there are different return values in different orderTypes.\n * Sender's perspective when orderType is C2C\n * payerInfo : binanceId\n * receiverInfo : name, binanceId/accountId/email/countryCode/phoneNumber/mobileCode (based on user input)\n * Receiver's perspective when orderType is C2C\n * payerInfo : name\n * receiverInfo : binanceId\n * Sender's perspective when orderType is CRYPTO_BOX\n * payerInfo : binanceId\n * receiverInfo : name(the value is always \"Crypto Box\")\n * Receiver's perspective when orderType is CRYPTO_BOX\n * payerInfo : name\n * receiverInfo : binanceId\n * Sender's perspective when orderType is PAY\n * payerInfo : binanceId\n * receiverInfo : name\n * Receiver's perspective when orderType is PAY\n * payerInfo : name\n * receiverInfo : binanceId, name\n * Sender's perspective when orderType is PAY_REFUND\n * payerInfo : binanceId, name\n * receiverInfo : name, accountId\n * Receiver's perspective when orderType is PAY_REFUND\n * payerInfo : name\n * receiverInfo : binanceId\n * Sender's perspective when orderType is PAYOUT\n * payerInfo : binanceId, name\n * receiverInfo : name, accountId\n * Receiver's perspective when orderType is PAYOUT\n * payerInfo : name\n * receiverInfo : binanceId\n * Receiver's perspective when orderType is CRYPTO_BOX_RF\n * payerInfo : name(the value is always \"Crypto Box\")\n * receiverInfo : binanceId\n * Sender's perspective when orderType is REMITTANCE\n * payerInfo : binanceId\n * receiverInfo : name, institutionName, cardNumber, digitalWalletId\n *\n * Weight: 3000\n *\n * @summary Get Pay Trade History\n * @param {GetPayTradeHistoryRequest} requestParameters Request parameters.\n * @returns {Promise<RestApiResponse<GetPayTradeHistoryResponse>>}\n * @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}\n * @memberof PayApi\n * @see {@link https://developers.binance.com/docs/pay/rest-api/Get-Pay-Trade-History Binance API Documentation}\n */\n public async getPayTradeHistory(\n requestParameters: GetPayTradeHistoryRequest = {}\n ): Promise<RestApiResponse<GetPayTradeHistoryResponse>> {\n const localVarAxiosArgs = await this.localVarAxiosParamCreator.getPayTradeHistory(\n requestParameters?.startTime,\n requestParameters?.endTime,\n requestParameters?.limit,\n requestParameters?.recvWindow\n );\n return sendRequest<GetPayTradeHistoryResponse>(\n this.configuration,\n localVarAxiosArgs.endpoint,\n localVarAxiosArgs.method,\n localVarAxiosArgs.queryParams,\n localVarAxiosArgs.bodyParams,\n localVarAxiosArgs?.timeUnit,\n { isSigned: true }\n );\n }\n}\n","/**\n * Binance Pay REST API\n *\n * OpenAPI Specification for the Binance Pay REST API\n *\n * The version of the OpenAPI document: 1.0.0\n *\n *\n * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).\n * https://openapi-generator.tech\n * Do not edit the class manually.\n */\n\nimport { ConfigurationRestAPI, RestApiResponse, sendRequest } from '@binance/common';\nimport { PayApi } from './modules/pay-api';\n\nimport type { GetPayTradeHistoryRequest } from './modules/pay-api';\n\nimport type { GetPayTradeHistoryResponse } from './types';\n\nexport class RestAPI {\n private configuration: ConfigurationRestAPI;\n private payApi: PayApi;\n\n constructor(configuration: ConfigurationRestAPI) {\n this.configuration = configuration;\n this.payApi = new PayApi(configuration);\n }\n\n /**\n * Generic function to send a request.\n * @param endpoint - The API endpoint to call.\n * @param method - HTTP method to use (GET, POST, DELETE, etc.).\n * @param queryParams - Query parameters for the request.\n * @param bodyParams - Body parameters for the request.\n *\n * @returns A promise resolving to the response data object.\n */\n sendRequest<T>(\n endpoint: string,\n method: 'GET' | 'POST' | 'DELETE' | 'PUT' | 'PATCH',\n queryParams: Record<string, unknown> = {},\n bodyParams: Record<string, unknown> = {}\n ): Promise<RestApiResponse<T>> {\n return sendRequest<T>(\n this.configuration,\n endpoint,\n method,\n queryParams,\n bodyParams,\n undefined\n );\n }\n\n /**\n * Generic function to send a signed request.\n * @param endpoint - The API endpoint to call.\n * @param method - HTTP method to use (GET, POST, DELETE, etc.).\n * @param queryParams - Query parameters for the request.\n * @param bodyParams - Body parameters for the request.\n *\n * @returns A promise resolving to the response data object.\n */\n sendSignedRequest<T>(\n endpoint: string,\n method: 'GET' | 'POST' | 'DELETE' | 'PUT' | 'PATCH',\n queryParams: Record<string, unknown> = {},\n bodyParams: Record<string, unknown> = {}\n ): Promise<RestApiResponse<T>> {\n return sendRequest<T>(\n this.configuration,\n endpoint,\n method,\n queryParams,\n bodyParams,\n undefined,\n { isSigned: true }\n );\n }\n\n /**\n * Get Pay Trade History\n *\n * If startTime and endTime are not sent, the recent 90 days' data will be returned.\n * The max interval between startTime and endTime is 90 days.\n * Support for querying orders within the last 18 months.\n * For payerInfo and receiverInfo,there are different return values in different orderTypes.\n * Sender's perspective when orderType is C2C\n * payerInfo : binanceId\n * receiverInfo : name, binanceId/accountId/email/countryCode/phoneNumber/mobileCode (based on user input)\n * Receiver's perspective when orderType is C2C\n * payerInfo : name\n * receiverInfo : binanceId\n * Sender's perspective when orderType is CRYPTO_BOX\n * payerInfo : binanceId\n * receiverInfo : name(the value is always \"Crypto Box\")\n * Receiver's perspective when orderType is CRYPTO_BOX\n * payerInfo : name\n * receiverInfo : binanceId\n * Sender's perspective when orderType is PAY\n * payerInfo : binanceId\n * receiverInfo : name\n * Receiver's perspective when orderType is PAY\n * payerInfo : name\n * receiverInfo : binanceId, name\n * Sender's perspective when orderType is PAY_REFUND\n * payerInfo : binanceId, name\n * receiverInfo : name, accountId\n * Receiver's perspective when orderType is PAY_REFUND\n * payerInfo : name\n * receiverInfo : binanceId\n * Sender's perspective when orderType is PAYOUT\n * payerInfo : binanceId, name\n * receiverInfo : name, accountId\n * Receiver's perspective when orderType is PAYOUT\n * payerInfo : name\n * receiverInfo : binanceId\n * Receiver's perspective when orderType is CRYPTO_BOX_RF\n * payerInfo : name(the value is always \"Crypto Box\")\n * receiverInfo : binanceId\n * Sender's perspective when orderType is REMITTANCE\n * payerInfo : binanceId\n * receiverInfo : name, institutionName, cardNumber, digitalWalletId\n *\n * Weight: 3000\n *\n * @summary Get Pay Trade History\n * @param {GetPayTradeHistoryRequest} requestParameters Request parameters.\n *\n * @returns {Promise<RestApiResponse<GetPayTradeHistoryResponse>>}\n * @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}\n * @see {@link https://developers.binance.com/docs/pay/rest-api/Get-Pay-Trade-History Binance API Documentation}\n */\n getPayTradeHistory(\n requestParameters: GetPayTradeHistoryRequest = {}\n ): Promise<RestApiResponse<GetPayTradeHistoryResponse>> {\n return this.payApi.getPayTradeHistory(requestParameters);\n }\n}\n","/**\n * Binance Pay REST API\n *\n * OpenAPI Specification for the Binance Pay REST API\n *\n * The version of the OpenAPI document: 1.0.0\n *\n *\n * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).\n * https://openapi-generator.tech\n * Do not edit the class manually.\n */\n\nexport * from './types';\nexport * from './modules';\nexport * from './rest-api';\n","import { buildUserAgent, ConfigurationRestAPI, PAY_REST_API_PROD_URL } from '@binance/common';\nimport { name, version } from '../package.json';\nimport { RestAPI } from './rest-api';\n\nexport interface ConfigurationPay {\n configurationRestAPI?: ConfigurationRestAPI;\n}\n\nexport class Pay {\n public restAPI!: RestAPI;\n\n constructor(config: ConfigurationPay) {\n const userAgent = buildUserAgent(name, version);\n\n if (config?.configurationRestAPI) {\n const configRestAPI = new ConfigurationRestAPI(\n config.configurationRestAPI\n ) as ConfigurationRestAPI & {\n baseOptions: Record<string, unknown>;\n };\n configRestAPI.basePath = configRestAPI.basePath || PAY_REST_API_PROD_URL;\n configRestAPI.baseOptions = configRestAPI.baseOptions || {};\n configRestAPI.baseOptions.headers = {\n ...(configRestAPI.baseOptions.headers || {}),\n 'User-Agent': userAgent,\n };\n this.restAPI = new RestAPI(configRestAPI);\n }\n }\n}\n"],"mappings":";;;;WACY;cAEG;;;;;;;;;;;;;;;;;;;ACsBf,MAAM,0BAA0B,SAAU,eAAqC;AAC3E,QAAO,EAuDH,oBAAoB,OAChB,WACA,SACA,OACA,eACuB;EACvB,MAAMA,yBAAkD,EAAE;EAC1D,MAAMC,wBAAiD,EAAE;AAEzD,MAAI,cAAc,UAAa,cAAc,KACzC,wBAAuB,eAAe;AAE1C,MAAI,YAAY,UAAa,YAAY,KACrC,wBAAuB,aAAa;AAExC,MAAI,UAAU,UAAa,UAAU,KACjC,wBAAuB,WAAW;AAEtC,MAAI,eAAe,UAAa,eAAe,KAC3C,wBAAuB,gBAAgB;EAG3C,IAAIC;AACJ,MAAI,cAAc,cAAe,aAAY,cAAc;AAE3D,SAAO;GACH,UAAU;GACV,QAAQ;GACR,aAAa;GACb,YAAY;GACZ,UAAU;GACb;IAER;;;;;;AAuGL,IAAa,SAAb,MAA+C;CAI3C,YAAY,eAAqC;AAC7C,OAAK,gBAAgB;AACrB,OAAK,4BAA4B,wBAAwB,cAAc;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAwD3E,MAAa,mBACT,oBAA+C,EAAE,EACG;EACpD,MAAM,oBAAoB,MAAM,KAAK,0BAA0B,mBAC3D,mBAAmB,WACnB,mBAAmB,SACnB,mBAAmB,OACnB,mBAAmB,WACtB;AACD,SAAO,YACH,KAAK,eACL,kBAAkB,UAClB,kBAAkB,QAClB,kBAAkB,aAClB,kBAAkB,YAClB,mBAAmB,UACnB,EAAE,UAAU,MAAM,CACrB;;;;;;;;;;;;;;;;;;ACpRT,IAAa,UAAb,MAAqB;CAIjB,YAAY,eAAqC;AAC7C,OAAK,gBAAgB;AACrB,OAAK,SAAS,IAAI,OAAO,cAAc;;;;;;;;;;;CAY3C,YACI,UACA,QACA,cAAuC,EAAE,EACzC,aAAsC,EAAE,EACb;AAC3B,SAAO,YACH,KAAK,eACL,UACA,QACA,aACA,YACA,OACH;;;;;;;;;;;CAYL,kBACI,UACA,QACA,cAAuC,EAAE,EACzC,aAAsC,EAAE,EACb;AAC3B,SAAO,YACH,KAAK,eACL,UACA,QACA,aACA,YACA,QACA,EAAE,UAAU,MAAM,CACrB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAwDL,mBACI,oBAA+C,EAAE,EACG;AACpD,SAAO,KAAK,OAAO,mBAAmB,kBAAkB;;;;;;;;;;;;;AEhIhE,IAAa,MAAb,MAAiB;CAGb,YAAY,QAA0B;EAClC,MAAM,YAAY,eAAe,MAAM,QAAQ;AAE/C,MAAI,QAAQ,sBAAsB;GAC9B,MAAM,gBAAgB,IAAI,qBACtB,OAAO,qBACV;AAGD,iBAAc,WAAW,cAAc,YAAYC;AACnD,iBAAc,cAAc,cAAc,eAAe,EAAE;AAC3D,iBAAc,YAAY,UAAU;IAChC,GAAI,cAAc,YAAY,WAAW,EAAE;IAC3C,cAAc;IACjB;AACD,QAAK,UAAU,IAAI,QAAQ,cAAc"}
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@binance/pay",
3
3
  "description": "Official Binance Pay Connector - A lightweight library that provides a convenient interface to Binance's Pay REST API.",
4
- "version": "5.1.12",
4
+ "version": "6.0.1",
5
5
  "main": "./dist/index.js",
6
6
  "module": "./dist/index.mjs",
7
7
  "types": "./dist/index.d.ts",
@@ -56,7 +56,7 @@
56
56
  "typescript-eslint": "^8.24.0"
57
57
  },
58
58
  "dependencies": {
59
- "@binance/common": "2.3.11",
59
+ "@binance/common": "2.3.13",
60
60
  "axios": "^1.7.4"
61
61
  }
62
62
  }