@binance/giftcard 4.1.14 → 4.1.16

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.js CHANGED
@@ -14,7 +14,7 @@ let __binance_common = require("@binance/common");
14
14
 
15
15
  //#region package.json
16
16
  var name = "@binance/giftcard";
17
- var version = "4.1.14";
17
+ var version = "4.1.16";
18
18
 
19
19
  //#endregion
20
20
  //#region src/rest-api/modules/market-data-api.ts
@@ -41,6 +41,7 @@ const MarketDataApiAxiosParamCreator = function(configuration) {
41
41
  (0, __binance_common.assertParamExists)("createADualTokenGiftCard", "baseTokenAmount", baseTokenAmount);
42
42
  const localVarQueryParameter = {};
43
43
  const localVarBodyParameter = {};
44
+ const localVarHeaderParameter = {};
44
45
  if (baseToken !== void 0 && baseToken !== null) localVarQueryParameter["baseToken"] = baseToken;
45
46
  if (faceToken !== void 0 && faceToken !== null) localVarQueryParameter["faceToken"] = faceToken;
46
47
  if (baseTokenAmount !== void 0 && baseTokenAmount !== null) localVarQueryParameter["baseTokenAmount"] = baseTokenAmount;
@@ -52,6 +53,7 @@ const MarketDataApiAxiosParamCreator = function(configuration) {
52
53
  method: "POST",
53
54
  queryParams: localVarQueryParameter,
54
55
  bodyParams: localVarBodyParameter,
56
+ headerParams: localVarHeaderParameter,
55
57
  timeUnit: _timeUnit
56
58
  };
57
59
  },
@@ -60,6 +62,7 @@ const MarketDataApiAxiosParamCreator = function(configuration) {
60
62
  (0, __binance_common.assertParamExists)("createASingleTokenGiftCard", "amount", amount);
61
63
  const localVarQueryParameter = {};
62
64
  const localVarBodyParameter = {};
65
+ const localVarHeaderParameter = {};
63
66
  if (token !== void 0 && token !== null) localVarQueryParameter["token"] = token;
64
67
  if (amount !== void 0 && amount !== null) localVarQueryParameter["amount"] = amount;
65
68
  if (recvWindow !== void 0 && recvWindow !== null) localVarQueryParameter["recvWindow"] = recvWindow;
@@ -70,12 +73,14 @@ const MarketDataApiAxiosParamCreator = function(configuration) {
70
73
  method: "POST",
71
74
  queryParams: localVarQueryParameter,
72
75
  bodyParams: localVarBodyParameter,
76
+ headerParams: localVarHeaderParameter,
73
77
  timeUnit: _timeUnit
74
78
  };
75
79
  },
76
80
  fetchRsaPublicKey: async (recvWindow) => {
77
81
  const localVarQueryParameter = {};
78
82
  const localVarBodyParameter = {};
83
+ const localVarHeaderParameter = {};
79
84
  if (recvWindow !== void 0 && recvWindow !== null) localVarQueryParameter["recvWindow"] = recvWindow;
80
85
  let _timeUnit;
81
86
  if ("timeUnit" in configuration) _timeUnit = configuration.timeUnit;
@@ -84,6 +89,7 @@ const MarketDataApiAxiosParamCreator = function(configuration) {
84
89
  method: "GET",
85
90
  queryParams: localVarQueryParameter,
86
91
  bodyParams: localVarBodyParameter,
92
+ headerParams: localVarHeaderParameter,
87
93
  timeUnit: _timeUnit
88
94
  };
89
95
  },
@@ -91,6 +97,7 @@ const MarketDataApiAxiosParamCreator = function(configuration) {
91
97
  (0, __binance_common.assertParamExists)("fetchTokenLimit", "baseToken", baseToken);
92
98
  const localVarQueryParameter = {};
93
99
  const localVarBodyParameter = {};
100
+ const localVarHeaderParameter = {};
94
101
  if (baseToken !== void 0 && baseToken !== null) localVarQueryParameter["baseToken"] = baseToken;
95
102
  if (recvWindow !== void 0 && recvWindow !== null) localVarQueryParameter["recvWindow"] = recvWindow;
96
103
  let _timeUnit;
@@ -100,6 +107,7 @@ const MarketDataApiAxiosParamCreator = function(configuration) {
100
107
  method: "GET",
101
108
  queryParams: localVarQueryParameter,
102
109
  bodyParams: localVarBodyParameter,
110
+ headerParams: localVarHeaderParameter,
103
111
  timeUnit: _timeUnit
104
112
  };
105
113
  },
@@ -107,6 +115,7 @@ const MarketDataApiAxiosParamCreator = function(configuration) {
107
115
  (0, __binance_common.assertParamExists)("redeemABinanceGiftCard", "code", code);
108
116
  const localVarQueryParameter = {};
109
117
  const localVarBodyParameter = {};
118
+ const localVarHeaderParameter = {};
110
119
  if (code !== void 0 && code !== null) localVarQueryParameter["code"] = code;
111
120
  if (externalUid !== void 0 && externalUid !== null) localVarQueryParameter["externalUid"] = externalUid;
112
121
  if (recvWindow !== void 0 && recvWindow !== null) localVarQueryParameter["recvWindow"] = recvWindow;
@@ -117,6 +126,7 @@ const MarketDataApiAxiosParamCreator = function(configuration) {
117
126
  method: "POST",
118
127
  queryParams: localVarQueryParameter,
119
128
  bodyParams: localVarBodyParameter,
129
+ headerParams: localVarHeaderParameter,
120
130
  timeUnit: _timeUnit
121
131
  };
122
132
  },
@@ -124,6 +134,7 @@ const MarketDataApiAxiosParamCreator = function(configuration) {
124
134
  (0, __binance_common.assertParamExists)("verifyBinanceGiftCardByGiftCardNumber", "referenceNo", referenceNo);
125
135
  const localVarQueryParameter = {};
126
136
  const localVarBodyParameter = {};
137
+ const localVarHeaderParameter = {};
127
138
  if (referenceNo !== void 0 && referenceNo !== null) localVarQueryParameter["referenceNo"] = referenceNo;
128
139
  if (recvWindow !== void 0 && recvWindow !== null) localVarQueryParameter["recvWindow"] = recvWindow;
129
140
  let _timeUnit;
@@ -133,6 +144,7 @@ const MarketDataApiAxiosParamCreator = function(configuration) {
133
144
  method: "GET",
134
145
  queryParams: localVarQueryParameter,
135
146
  bodyParams: localVarBodyParameter,
147
+ headerParams: localVarHeaderParameter,
136
148
  timeUnit: _timeUnit
137
149
  };
138
150
  }
@@ -169,7 +181,7 @@ var MarketDataApi = class {
169
181
  */
170
182
  async createADualTokenGiftCard(requestParameters) {
171
183
  const localVarAxiosArgs = await this.localVarAxiosParamCreator.createADualTokenGiftCard(requestParameters?.baseToken, requestParameters?.faceToken, requestParameters?.baseTokenAmount, requestParameters?.recvWindow);
172
- return (0, __binance_common.sendRequest)(this.configuration, localVarAxiosArgs.endpoint, localVarAxiosArgs.method, localVarAxiosArgs.queryParams, localVarAxiosArgs.bodyParams, localVarAxiosArgs?.timeUnit, { isSigned: true });
184
+ return (0, __binance_common.sendRequest)(this.configuration, localVarAxiosArgs.endpoint, localVarAxiosArgs.method, localVarAxiosArgs.queryParams, localVarAxiosArgs.bodyParams, localVarAxiosArgs.headerParams, localVarAxiosArgs?.timeUnit, { isSigned: true });
173
185
  }
174
186
  /**
175
187
  * This API is for creating a Binance Gift Card.
@@ -192,7 +204,7 @@ var MarketDataApi = class {
192
204
  */
193
205
  async createASingleTokenGiftCard(requestParameters) {
194
206
  const localVarAxiosArgs = await this.localVarAxiosParamCreator.createASingleTokenGiftCard(requestParameters?.token, requestParameters?.amount, requestParameters?.recvWindow);
195
- return (0, __binance_common.sendRequest)(this.configuration, localVarAxiosArgs.endpoint, localVarAxiosArgs.method, localVarAxiosArgs.queryParams, localVarAxiosArgs.bodyParams, localVarAxiosArgs?.timeUnit, { isSigned: true });
207
+ return (0, __binance_common.sendRequest)(this.configuration, localVarAxiosArgs.endpoint, localVarAxiosArgs.method, localVarAxiosArgs.queryParams, localVarAxiosArgs.bodyParams, localVarAxiosArgs.headerParams, localVarAxiosArgs?.timeUnit, { isSigned: true });
196
208
  }
197
209
  /**
198
210
  * This API is for fetching the RSA Public Key.
@@ -211,7 +223,7 @@ var MarketDataApi = class {
211
223
  */
212
224
  async fetchRsaPublicKey(requestParameters = {}) {
213
225
  const localVarAxiosArgs = await this.localVarAxiosParamCreator.fetchRsaPublicKey(requestParameters?.recvWindow);
214
- return (0, __binance_common.sendRequest)(this.configuration, localVarAxiosArgs.endpoint, localVarAxiosArgs.method, localVarAxiosArgs.queryParams, localVarAxiosArgs.bodyParams, localVarAxiosArgs?.timeUnit, { isSigned: true });
226
+ return (0, __binance_common.sendRequest)(this.configuration, localVarAxiosArgs.endpoint, localVarAxiosArgs.method, localVarAxiosArgs.queryParams, localVarAxiosArgs.bodyParams, localVarAxiosArgs.headerParams, localVarAxiosArgs?.timeUnit, { isSigned: true });
215
227
  }
216
228
  /**
217
229
  * This API is to help you verify which tokens are available for you to create Stablecoin-Denominated gift cards as mentioned in section 2 and its’ limitation.
@@ -227,7 +239,7 @@ var MarketDataApi = class {
227
239
  */
228
240
  async fetchTokenLimit(requestParameters) {
229
241
  const localVarAxiosArgs = await this.localVarAxiosParamCreator.fetchTokenLimit(requestParameters?.baseToken, requestParameters?.recvWindow);
230
- return (0, __binance_common.sendRequest)(this.configuration, localVarAxiosArgs.endpoint, localVarAxiosArgs.method, localVarAxiosArgs.queryParams, localVarAxiosArgs.bodyParams, localVarAxiosArgs?.timeUnit, { isSigned: true });
242
+ return (0, __binance_common.sendRequest)(this.configuration, localVarAxiosArgs.endpoint, localVarAxiosArgs.method, localVarAxiosArgs.queryParams, localVarAxiosArgs.bodyParams, localVarAxiosArgs.headerParams, localVarAxiosArgs?.timeUnit, { isSigned: true });
231
243
  }
232
244
  /**
233
245
  * This API is for redeeming a Binance Gift Card
@@ -253,7 +265,7 @@ var MarketDataApi = class {
253
265
  */
254
266
  async redeemABinanceGiftCard(requestParameters) {
255
267
  const localVarAxiosArgs = await this.localVarAxiosParamCreator.redeemABinanceGiftCard(requestParameters?.code, requestParameters?.externalUid, requestParameters?.recvWindow);
256
- return (0, __binance_common.sendRequest)(this.configuration, localVarAxiosArgs.endpoint, localVarAxiosArgs.method, localVarAxiosArgs.queryParams, localVarAxiosArgs.bodyParams, localVarAxiosArgs?.timeUnit, { isSigned: true });
268
+ return (0, __binance_common.sendRequest)(this.configuration, localVarAxiosArgs.endpoint, localVarAxiosArgs.method, localVarAxiosArgs.queryParams, localVarAxiosArgs.bodyParams, localVarAxiosArgs.headerParams, localVarAxiosArgs?.timeUnit, { isSigned: true });
257
269
  }
258
270
  /**
259
271
  * This API is for verifying whether the Binance Gift Card is valid or not by entering Gift Card Number.
@@ -271,7 +283,7 @@ var MarketDataApi = class {
271
283
  */
272
284
  async verifyBinanceGiftCardByGiftCardNumber(requestParameters) {
273
285
  const localVarAxiosArgs = await this.localVarAxiosParamCreator.verifyBinanceGiftCardByGiftCardNumber(requestParameters?.referenceNo, requestParameters?.recvWindow);
274
- return (0, __binance_common.sendRequest)(this.configuration, localVarAxiosArgs.endpoint, localVarAxiosArgs.method, localVarAxiosArgs.queryParams, localVarAxiosArgs.bodyParams, localVarAxiosArgs?.timeUnit, { isSigned: true });
286
+ return (0, __binance_common.sendRequest)(this.configuration, localVarAxiosArgs.endpoint, localVarAxiosArgs.method, localVarAxiosArgs.queryParams, localVarAxiosArgs.bodyParams, localVarAxiosArgs.headerParams, localVarAxiosArgs?.timeUnit, { isSigned: true });
275
287
  }
276
288
  };
277
289
 
@@ -304,7 +316,7 @@ var RestAPI = class {
304
316
  * @returns A promise resolving to the response data object.
305
317
  */
306
318
  sendRequest(endpoint, method, queryParams = {}, bodyParams = {}) {
307
- return (0, __binance_common.sendRequest)(this.configuration, endpoint, method, queryParams, bodyParams, void 0);
319
+ return (0, __binance_common.sendRequest)(this.configuration, endpoint, method, queryParams, bodyParams, void 0, void 0);
308
320
  }
309
321
  /**
310
322
  * Generic function to send a signed request.
@@ -316,7 +328,7 @@ var RestAPI = class {
316
328
  * @returns A promise resolving to the response data object.
317
329
  */
318
330
  sendSignedRequest(endpoint, method, queryParams = {}, bodyParams = {}) {
319
- return (0, __binance_common.sendRequest)(this.configuration, endpoint, method, queryParams, bodyParams, void 0, { isSigned: true });
331
+ return (0, __binance_common.sendRequest)(this.configuration, endpoint, method, queryParams, bodyParams, void 0, void 0, { isSigned: true });
320
332
  }
321
333
  /**
322
334
  * * This API is for creating a dual-token ( stablecoin-denominated) Binance Gift Card. You may create a gift card using USDT as baseToken, that is redeemable to another designated token (faceToken). For example, you can create a fixed-value BTC gift card and pay with 100 USDT plus minting fee. This gift card can keep the value fixed at 100 USDT before redemption, and will be redeemable to BTC equivalent to 100 USDT upon redemption.
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","GIFT_CARD_REST_API_PROD_URL"],"sources":["../package.json","../src/rest-api/modules/market-data-api.ts","../src/rest-api/rest-api.ts","../src/rest-api/index.ts","../src/gift-card.ts"],"sourcesContent":["{\n \"name\": \"@binance/giftcard\",\n \"description\": \"Official Binance Gift Card Connector - A lightweight library that provides a convenient interface to Binance's Gift Card REST API.\",\n \"version\": \"4.1.14\",\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 \"Gift Card\",\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 Gift Card REST API\n *\n * OpenAPI Specification for the Binance Gift Card 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 assertParamExists,\n sendRequest,\n type RequestArgs,\n} from '@binance/common';\nimport type {\n CreateADualTokenGiftCardResponse,\n CreateASingleTokenGiftCardResponse,\n FetchRsaPublicKeyResponse,\n FetchTokenLimitResponse,\n RedeemABinanceGiftCardResponse,\n VerifyBinanceGiftCardByGiftCardNumberResponse,\n} from '../types';\n\n/**\n * MarketDataApi - axios parameter creator\n */\nconst MarketDataApiAxiosParamCreator = function (configuration: ConfigurationRestAPI) {\n return {\n /**\n * * This API is for creating a dual-token ( stablecoin-denominated) Binance Gift Card. You may create a gift card using USDT as baseToken, that is redeemable to another designated token (faceToken). For example, you can create a fixed-value BTC gift card and pay with 100 USDT plus minting fee. This gift card can keep the value fixed at 100 USDT before redemption, and will be redeemable to BTC equivalent to 100 USDT upon redemption.\n * Once successfully created, the amount of baseToken (e.g. USDT) in the fixed-value gift card along with the fee would be deducted from your funding wallet.\n *\n *\n * To get started with, please make sure:\n * You have a Binance account\n * You have passed KYB\n * You have a sufficient balance(Gift Card amount and fee amount) in your Binance funding wallet\n * You need Enable Withdrawals for the API Key which requests this endpoint.\n *\n * Weight: 1\n *\n * @summary Create a dual-token gift card(fixed value, discount feature)(TRADE)\n * @param {string} baseToken The token you want to pay, example: BUSD\n * @param {string} faceToken The token you want to buy, example: BNB. If faceToken = baseToken, it's the same as createCode endpoint.\n * @param {number} baseTokenAmount The base token asset quantity, example : 1.002\n * @param {number | bigint} [recvWindow]\n *\n * @throws {RequiredError}\n */\n createADualTokenGiftCard: async (\n baseToken: string,\n faceToken: string,\n baseTokenAmount: number,\n recvWindow?: number | bigint\n ): Promise<RequestArgs> => {\n // verify required parameter 'baseToken' is not null or undefined\n assertParamExists('createADualTokenGiftCard', 'baseToken', baseToken);\n // verify required parameter 'faceToken' is not null or undefined\n assertParamExists('createADualTokenGiftCard', 'faceToken', faceToken);\n // verify required parameter 'baseTokenAmount' is not null or undefined\n assertParamExists('createADualTokenGiftCard', 'baseTokenAmount', baseTokenAmount);\n\n const localVarQueryParameter: Record<string, unknown> = {};\n const localVarBodyParameter: Record<string, unknown> = {};\n\n if (baseToken !== undefined && baseToken !== null) {\n localVarQueryParameter['baseToken'] = baseToken;\n }\n if (faceToken !== undefined && faceToken !== null) {\n localVarQueryParameter['faceToken'] = faceToken;\n }\n if (baseTokenAmount !== undefined && baseTokenAmount !== null) {\n localVarQueryParameter['baseTokenAmount'] = baseTokenAmount;\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/giftcard/buyCode',\n method: 'POST',\n queryParams: localVarQueryParameter,\n bodyParams: localVarBodyParameter,\n timeUnit: _timeUnit,\n };\n },\n /**\n * This API is for creating a Binance Gift Card.\n *\n * To get started with, please make sure:\n *\n * You have a Binance account\n * You have passed KYB\n * You have a sufficient balance(Gift Card amount and fee amount) in your Binance funding wallet\n * You need `Enable Withdrawals` for the API Key which requests this endpoint.\n *\n * Weight: 1\n *\n * @summary Create a single-token gift card (USER_DATA)\n * @param {string} token The token type contained in the Binance Gift Card\n * @param {number} amount The amount of the token contained in the Binance Gift Card\n * @param {number | bigint} [recvWindow]\n *\n * @throws {RequiredError}\n */\n createASingleTokenGiftCard: async (\n token: string,\n amount: number,\n recvWindow?: number | bigint\n ): Promise<RequestArgs> => {\n // verify required parameter 'token' is not null or undefined\n assertParamExists('createASingleTokenGiftCard', 'token', token);\n // verify required parameter 'amount' is not null or undefined\n assertParamExists('createASingleTokenGiftCard', 'amount', amount);\n\n const localVarQueryParameter: Record<string, unknown> = {};\n const localVarBodyParameter: Record<string, unknown> = {};\n\n if (token !== undefined && token !== null) {\n localVarQueryParameter['token'] = token;\n }\n if (amount !== undefined && amount !== null) {\n localVarQueryParameter['amount'] = amount;\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/giftcard/createCode',\n method: 'POST',\n queryParams: localVarQueryParameter,\n bodyParams: localVarBodyParameter,\n timeUnit: _timeUnit,\n };\n },\n /**\n * This API is for fetching the RSA Public Key.\n * This RSA Public key will be used to encrypt the card code.\n *\n **Please note that the RSA Public key fetched is valid only for the current day.**\n *\n * Weight: 1\n *\n * @summary Fetch RSA Public Key(USER_DATA)\n * @param {number | bigint} [recvWindow]\n *\n * @throws {RequiredError}\n */\n fetchRsaPublicKey: async (recvWindow?: number | bigint): Promise<RequestArgs> => {\n const localVarQueryParameter: Record<string, unknown> = {};\n const localVarBodyParameter: Record<string, unknown> = {};\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/giftcard/cryptography/rsa-public-key',\n method: 'GET',\n queryParams: localVarQueryParameter,\n bodyParams: localVarBodyParameter,\n timeUnit: _timeUnit,\n };\n },\n /**\n * This API is to help you verify which tokens are available for you to create Stablecoin-Denominated gift cards as mentioned in section 2 and its’ limitation.\n *\n * Weight: 1\n *\n * @summary Fetch Token Limit(USER_DATA)\n * @param {string} baseToken The token you want to pay, example: BUSD\n * @param {number | bigint} [recvWindow]\n *\n * @throws {RequiredError}\n */\n fetchTokenLimit: async (\n baseToken: string,\n recvWindow?: number | bigint\n ): Promise<RequestArgs> => {\n // verify required parameter 'baseToken' is not null or undefined\n assertParamExists('fetchTokenLimit', 'baseToken', baseToken);\n\n const localVarQueryParameter: Record<string, unknown> = {};\n const localVarBodyParameter: Record<string, unknown> = {};\n\n if (baseToken !== undefined && baseToken !== null) {\n localVarQueryParameter['baseToken'] = baseToken;\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/giftcard/buyCode/token-limit',\n method: 'GET',\n queryParams: localVarQueryParameter,\n bodyParams: localVarBodyParameter,\n timeUnit: _timeUnit,\n };\n },\n /**\n * This API is for redeeming a Binance Gift Card\n * Once redeemed, the coins will be deposited in your funding wallet.\n *\n * Parameter code can be sent in two formats:\n * Plaintext\n * Encrypted\n *\n * Sending code in Encrypted format provides more security than sending it as a plaintext. To send card code in encrypted format the following steps must be followed:\n * Fetch RSA public key from api stated below.\n * Use the below algorithm to encrypt the card code using the RSA public key fetched above: `RSA/ECB/OAEPWithSHA-256AndMGF1Padding`\n **A sample code snippet (JAVA) is stated below for reference, the same approach can be used for different languages like C#, PERL, PYTHON, SHELL etc.:**\n *\n * Weight: 1\n *\n * @summary Redeem a Binance Gift Card(USER_DATA)\n * @param {string} code Redemption code of Binance Gift Card to be redeemed, supports both Plaintext & Encrypted code.\n * @param {string} [externalUid] Each external unique ID represents a unique user on the partner platform. The function helps you to identify the redemption behavior of different users, such as redemption frequency and amount. It also helps risk and limit control of a single account, such as daily limit on redemption volume, frequency, and incorrect number of entries. This will also prevent a single user account reach the partner's daily redemption limits. We strongly recommend you to use this feature and transfer us the User ID of your users if you have different users redeeming Binance Gift Cards on your platform. To protect user data privacy, you may choose to transfer the user id in any desired format (max. 400 characters).\n * @param {number | bigint} [recvWindow]\n *\n * @throws {RequiredError}\n */\n redeemABinanceGiftCard: async (\n code: string,\n externalUid?: string,\n recvWindow?: number | bigint\n ): Promise<RequestArgs> => {\n // verify required parameter 'code' is not null or undefined\n assertParamExists('redeemABinanceGiftCard', 'code', code);\n\n const localVarQueryParameter: Record<string, unknown> = {};\n const localVarBodyParameter: Record<string, unknown> = {};\n\n if (code !== undefined && code !== null) {\n localVarQueryParameter['code'] = code;\n }\n if (externalUid !== undefined && externalUid !== null) {\n localVarQueryParameter['externalUid'] = externalUid;\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/giftcard/redeemCode',\n method: 'POST',\n queryParams: localVarQueryParameter,\n bodyParams: localVarBodyParameter,\n timeUnit: _timeUnit,\n };\n },\n /**\n * This API is for verifying whether the Binance Gift Card is valid or not by entering Gift Card Number.\n *\n **Please note that if you enter the wrong Gift Card Number 5 times within an hour, you will no longer be able to verify any Gift Card Number for that hour.**\n *\n * Weight: 1\n *\n * @summary Verify Binance Gift Card by Gift Card Number(USER_DATA)\n * @param {string} referenceNo Enter the Gift Card Number\n * @param {number | bigint} [recvWindow]\n *\n * @throws {RequiredError}\n */\n verifyBinanceGiftCardByGiftCardNumber: async (\n referenceNo: string,\n recvWindow?: number | bigint\n ): Promise<RequestArgs> => {\n // verify required parameter 'referenceNo' is not null or undefined\n assertParamExists('verifyBinanceGiftCardByGiftCardNumber', 'referenceNo', referenceNo);\n\n const localVarQueryParameter: Record<string, unknown> = {};\n const localVarBodyParameter: Record<string, unknown> = {};\n\n if (referenceNo !== undefined && referenceNo !== null) {\n localVarQueryParameter['referenceNo'] = referenceNo;\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/giftcard/verify',\n method: 'GET',\n queryParams: localVarQueryParameter,\n bodyParams: localVarBodyParameter,\n timeUnit: _timeUnit,\n };\n },\n };\n};\n\n/**\n * MarketDataApi - interface\n * @interface MarketDataApi\n */\nexport interface MarketDataApiInterface {\n /**\n * * This API is for creating a dual-token ( stablecoin-denominated) Binance Gift Card. You may create a gift card using USDT as baseToken, that is redeemable to another designated token (faceToken). For example, you can create a fixed-value BTC gift card and pay with 100 USDT plus minting fee. This gift card can keep the value fixed at 100 USDT before redemption, and will be redeemable to BTC equivalent to 100 USDT upon redemption.\n * Once successfully created, the amount of baseToken (e.g. USDT) in the fixed-value gift card along with the fee would be deducted from your funding wallet.\n *\n *\n * To get started with, please make sure:\n * You have a Binance account\n * You have passed KYB\n * You have a sufficient balance(Gift Card amount and fee amount) in your Binance funding wallet\n * You need Enable Withdrawals for the API Key which requests this endpoint.\n *\n * Weight: 1\n *\n * @summary Create a dual-token gift card(fixed value, discount feature)(TRADE)\n * @param {CreateADualTokenGiftCardRequest} requestParameters Request parameters.\n *\n * @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}\n * @memberof MarketDataApiInterface\n */\n createADualTokenGiftCard(\n requestParameters: CreateADualTokenGiftCardRequest\n ): Promise<RestApiResponse<CreateADualTokenGiftCardResponse>>;\n /**\n * This API is for creating a Binance Gift Card.\n *\n * To get started with, please make sure:\n *\n * You have a Binance account\n * You have passed KYB\n * You have a sufficient balance(Gift Card amount and fee amount) in your Binance funding wallet\n * You need `Enable Withdrawals` for the API Key which requests this endpoint.\n *\n * Weight: 1\n *\n * @summary Create a single-token gift card (USER_DATA)\n * @param {CreateASingleTokenGiftCardRequest} requestParameters Request parameters.\n *\n * @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}\n * @memberof MarketDataApiInterface\n */\n createASingleTokenGiftCard(\n requestParameters: CreateASingleTokenGiftCardRequest\n ): Promise<RestApiResponse<CreateASingleTokenGiftCardResponse>>;\n /**\n * This API is for fetching the RSA Public Key.\n * This RSA Public key will be used to encrypt the card code.\n *\n **Please note that the RSA Public key fetched is valid only for the current day.**\n *\n * Weight: 1\n *\n * @summary Fetch RSA Public Key(USER_DATA)\n * @param {FetchRsaPublicKeyRequest} requestParameters Request parameters.\n *\n * @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}\n * @memberof MarketDataApiInterface\n */\n fetchRsaPublicKey(\n requestParameters?: FetchRsaPublicKeyRequest\n ): Promise<RestApiResponse<FetchRsaPublicKeyResponse>>;\n /**\n * This API is to help you verify which tokens are available for you to create Stablecoin-Denominated gift cards as mentioned in section 2 and its’ limitation.\n *\n * Weight: 1\n *\n * @summary Fetch Token Limit(USER_DATA)\n * @param {FetchTokenLimitRequest} requestParameters Request parameters.\n *\n * @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}\n * @memberof MarketDataApiInterface\n */\n fetchTokenLimit(\n requestParameters: FetchTokenLimitRequest\n ): Promise<RestApiResponse<FetchTokenLimitResponse>>;\n /**\n * This API is for redeeming a Binance Gift Card\n * Once redeemed, the coins will be deposited in your funding wallet.\n *\n * Parameter code can be sent in two formats:\n * Plaintext\n * Encrypted\n *\n * Sending code in Encrypted format provides more security than sending it as a plaintext. To send card code in encrypted format the following steps must be followed:\n * Fetch RSA public key from api stated below.\n * Use the below algorithm to encrypt the card code using the RSA public key fetched above: `RSA/ECB/OAEPWithSHA-256AndMGF1Padding`\n **A sample code snippet (JAVA) is stated below for reference, the same approach can be used for different languages like C#, PERL, PYTHON, SHELL etc.:**\n *\n * Weight: 1\n *\n * @summary Redeem a Binance Gift Card(USER_DATA)\n * @param {RedeemABinanceGiftCardRequest} requestParameters Request parameters.\n *\n * @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}\n * @memberof MarketDataApiInterface\n */\n redeemABinanceGiftCard(\n requestParameters: RedeemABinanceGiftCardRequest\n ): Promise<RestApiResponse<RedeemABinanceGiftCardResponse>>;\n /**\n * This API is for verifying whether the Binance Gift Card is valid or not by entering Gift Card Number.\n *\n **Please note that if you enter the wrong Gift Card Number 5 times within an hour, you will no longer be able to verify any Gift Card Number for that hour.**\n *\n * Weight: 1\n *\n * @summary Verify Binance Gift Card by Gift Card Number(USER_DATA)\n * @param {VerifyBinanceGiftCardByGiftCardNumberRequest} requestParameters Request parameters.\n *\n * @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}\n * @memberof MarketDataApiInterface\n */\n verifyBinanceGiftCardByGiftCardNumber(\n requestParameters: VerifyBinanceGiftCardByGiftCardNumberRequest\n ): Promise<RestApiResponse<VerifyBinanceGiftCardByGiftCardNumberResponse>>;\n}\n\n/**\n * Request parameters for createADualTokenGiftCard operation in MarketDataApi.\n * @interface CreateADualTokenGiftCardRequest\n */\nexport interface CreateADualTokenGiftCardRequest {\n /**\n * The token you want to pay, example: BUSD\n * @type {string}\n * @memberof MarketDataApiCreateADualTokenGiftCard\n */\n readonly baseToken: string;\n\n /**\n * The token you want to buy, example: BNB. If faceToken = baseToken, it's the same as createCode endpoint.\n * @type {string}\n * @memberof MarketDataApiCreateADualTokenGiftCard\n */\n readonly faceToken: string;\n\n /**\n * The base token asset quantity, example : 1.002\n * @type {number}\n * @memberof MarketDataApiCreateADualTokenGiftCard\n */\n readonly baseTokenAmount: number;\n\n /**\n *\n * @type {number | bigint}\n * @memberof MarketDataApiCreateADualTokenGiftCard\n */\n readonly recvWindow?: number | bigint;\n}\n\n/**\n * Request parameters for createASingleTokenGiftCard operation in MarketDataApi.\n * @interface CreateASingleTokenGiftCardRequest\n */\nexport interface CreateASingleTokenGiftCardRequest {\n /**\n * The token type contained in the Binance Gift Card\n * @type {string}\n * @memberof MarketDataApiCreateASingleTokenGiftCard\n */\n readonly token: string;\n\n /**\n * The amount of the token contained in the Binance Gift Card\n * @type {number}\n * @memberof MarketDataApiCreateASingleTokenGiftCard\n */\n readonly amount: number;\n\n /**\n *\n * @type {number | bigint}\n * @memberof MarketDataApiCreateASingleTokenGiftCard\n */\n readonly recvWindow?: number | bigint;\n}\n\n/**\n * Request parameters for fetchRsaPublicKey operation in MarketDataApi.\n * @interface FetchRsaPublicKeyRequest\n */\nexport interface FetchRsaPublicKeyRequest {\n /**\n *\n * @type {number | bigint}\n * @memberof MarketDataApiFetchRsaPublicKey\n */\n readonly recvWindow?: number | bigint;\n}\n\n/**\n * Request parameters for fetchTokenLimit operation in MarketDataApi.\n * @interface FetchTokenLimitRequest\n */\nexport interface FetchTokenLimitRequest {\n /**\n * The token you want to pay, example: BUSD\n * @type {string}\n * @memberof MarketDataApiFetchTokenLimit\n */\n readonly baseToken: string;\n\n /**\n *\n * @type {number | bigint}\n * @memberof MarketDataApiFetchTokenLimit\n */\n readonly recvWindow?: number | bigint;\n}\n\n/**\n * Request parameters for redeemABinanceGiftCard operation in MarketDataApi.\n * @interface RedeemABinanceGiftCardRequest\n */\nexport interface RedeemABinanceGiftCardRequest {\n /**\n * Redemption code of Binance Gift Card to be redeemed, supports both Plaintext & Encrypted code.\n * @type {string}\n * @memberof MarketDataApiRedeemABinanceGiftCard\n */\n readonly code: string;\n\n /**\n * Each external unique ID represents a unique user on the partner platform. The function helps you to identify the redemption behavior of different users, such as redemption frequency and amount. It also helps risk and limit control of a single account, such as daily limit on redemption volume, frequency, and incorrect number of entries. This will also prevent a single user account reach the partner's daily redemption limits. We strongly recommend you to use this feature and transfer us the User ID of your users if you have different users redeeming Binance Gift Cards on your platform. To protect user data privacy, you may choose to transfer the user id in any desired format (max. 400 characters).\n * @type {string}\n * @memberof MarketDataApiRedeemABinanceGiftCard\n */\n readonly externalUid?: string;\n\n /**\n *\n * @type {number | bigint}\n * @memberof MarketDataApiRedeemABinanceGiftCard\n */\n readonly recvWindow?: number | bigint;\n}\n\n/**\n * Request parameters for verifyBinanceGiftCardByGiftCardNumber operation in MarketDataApi.\n * @interface VerifyBinanceGiftCardByGiftCardNumberRequest\n */\nexport interface VerifyBinanceGiftCardByGiftCardNumberRequest {\n /**\n * Enter the Gift Card Number\n * @type {string}\n * @memberof MarketDataApiVerifyBinanceGiftCardByGiftCardNumber\n */\n readonly referenceNo: string;\n\n /**\n *\n * @type {number | bigint}\n * @memberof MarketDataApiVerifyBinanceGiftCardByGiftCardNumber\n */\n readonly recvWindow?: number | bigint;\n}\n\n/**\n * MarketDataApi - object-oriented interface\n * @class MarketDataApi\n */\nexport class MarketDataApi implements MarketDataApiInterface {\n private readonly configuration: ConfigurationRestAPI;\n private localVarAxiosParamCreator;\n\n constructor(configuration: ConfigurationRestAPI) {\n this.configuration = configuration;\n this.localVarAxiosParamCreator = MarketDataApiAxiosParamCreator(configuration);\n }\n\n /**\n * * This API is for creating a dual-token ( stablecoin-denominated) Binance Gift Card. You may create a gift card using USDT as baseToken, that is redeemable to another designated token (faceToken). For example, you can create a fixed-value BTC gift card and pay with 100 USDT plus minting fee. This gift card can keep the value fixed at 100 USDT before redemption, and will be redeemable to BTC equivalent to 100 USDT upon redemption.\n * Once successfully created, the amount of baseToken (e.g. USDT) in the fixed-value gift card along with the fee would be deducted from your funding wallet.\n *\n *\n * To get started with, please make sure:\n * You have a Binance account\n * You have passed KYB\n * You have a sufficient balance(Gift Card amount and fee amount) in your Binance funding wallet\n * You need Enable Withdrawals for the API Key which requests this endpoint.\n *\n * Weight: 1\n *\n * @summary Create a dual-token gift card(fixed value, discount feature)(TRADE)\n * @param {CreateADualTokenGiftCardRequest} requestParameters Request parameters.\n * @returns {Promise<RestApiResponse<CreateADualTokenGiftCardResponse>>}\n * @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}\n * @memberof MarketDataApi\n * @see {@link https://developers.binance.com/docs/gift_card/market-data/Create-a-dual-token-gift-card Binance API Documentation}\n */\n public async createADualTokenGiftCard(\n requestParameters: CreateADualTokenGiftCardRequest\n ): Promise<RestApiResponse<CreateADualTokenGiftCardResponse>> {\n const localVarAxiosArgs = await this.localVarAxiosParamCreator.createADualTokenGiftCard(\n requestParameters?.baseToken,\n requestParameters?.faceToken,\n requestParameters?.baseTokenAmount,\n requestParameters?.recvWindow\n );\n return sendRequest<CreateADualTokenGiftCardResponse>(\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 * This API is for creating a Binance Gift Card.\n *\n * To get started with, please make sure:\n *\n * You have a Binance account\n * You have passed KYB\n * You have a sufficient balance(Gift Card amount and fee amount) in your Binance funding wallet\n * You need `Enable Withdrawals` for the API Key which requests this endpoint.\n *\n * Weight: 1\n *\n * @summary Create a single-token gift card (USER_DATA)\n * @param {CreateASingleTokenGiftCardRequest} requestParameters Request parameters.\n * @returns {Promise<RestApiResponse<CreateASingleTokenGiftCardResponse>>}\n * @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}\n * @memberof MarketDataApi\n * @see {@link https://developers.binance.com/docs/gift_card/market-data/Create-a-single-token-gift-card Binance API Documentation}\n */\n public async createASingleTokenGiftCard(\n requestParameters: CreateASingleTokenGiftCardRequest\n ): Promise<RestApiResponse<CreateASingleTokenGiftCardResponse>> {\n const localVarAxiosArgs = await this.localVarAxiosParamCreator.createASingleTokenGiftCard(\n requestParameters?.token,\n requestParameters?.amount,\n requestParameters?.recvWindow\n );\n return sendRequest<CreateASingleTokenGiftCardResponse>(\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 * This API is for fetching the RSA Public Key.\n * This RSA Public key will be used to encrypt the card code.\n *\n **Please note that the RSA Public key fetched is valid only for the current day.**\n *\n * Weight: 1\n *\n * @summary Fetch RSA Public Key(USER_DATA)\n * @param {FetchRsaPublicKeyRequest} requestParameters Request parameters.\n * @returns {Promise<RestApiResponse<FetchRsaPublicKeyResponse>>}\n * @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}\n * @memberof MarketDataApi\n * @see {@link https://developers.binance.com/docs/gift_card/market-data/Fetch-RSA-Public-Key Binance API Documentation}\n */\n public async fetchRsaPublicKey(\n requestParameters: FetchRsaPublicKeyRequest = {}\n ): Promise<RestApiResponse<FetchRsaPublicKeyResponse>> {\n const localVarAxiosArgs = await this.localVarAxiosParamCreator.fetchRsaPublicKey(\n requestParameters?.recvWindow\n );\n return sendRequest<FetchRsaPublicKeyResponse>(\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 * This API is to help you verify which tokens are available for you to create Stablecoin-Denominated gift cards as mentioned in section 2 and its’ limitation.\n *\n * Weight: 1\n *\n * @summary Fetch Token Limit(USER_DATA)\n * @param {FetchTokenLimitRequest} requestParameters Request parameters.\n * @returns {Promise<RestApiResponse<FetchTokenLimitResponse>>}\n * @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}\n * @memberof MarketDataApi\n * @see {@link https://developers.binance.com/docs/gift_card/market-data/Fetch-Token-Limit Binance API Documentation}\n */\n public async fetchTokenLimit(\n requestParameters: FetchTokenLimitRequest\n ): Promise<RestApiResponse<FetchTokenLimitResponse>> {\n const localVarAxiosArgs = await this.localVarAxiosParamCreator.fetchTokenLimit(\n requestParameters?.baseToken,\n requestParameters?.recvWindow\n );\n return sendRequest<FetchTokenLimitResponse>(\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 * This API is for redeeming a Binance Gift Card\n * Once redeemed, the coins will be deposited in your funding wallet.\n *\n * Parameter code can be sent in two formats:\n * Plaintext\n * Encrypted\n *\n * Sending code in Encrypted format provides more security than sending it as a plaintext. To send card code in encrypted format the following steps must be followed:\n * Fetch RSA public key from api stated below.\n * Use the below algorithm to encrypt the card code using the RSA public key fetched above: `RSA/ECB/OAEPWithSHA-256AndMGF1Padding`\n **A sample code snippet (JAVA) is stated below for reference, the same approach can be used for different languages like C#, PERL, PYTHON, SHELL etc.:**\n *\n * Weight: 1\n *\n * @summary Redeem a Binance Gift Card(USER_DATA)\n * @param {RedeemABinanceGiftCardRequest} requestParameters Request parameters.\n * @returns {Promise<RestApiResponse<RedeemABinanceGiftCardResponse>>}\n * @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}\n * @memberof MarketDataApi\n * @see {@link https://developers.binance.com/docs/gift_card/market-data/Redeem-a-Binance-Gift-Card Binance API Documentation}\n */\n public async redeemABinanceGiftCard(\n requestParameters: RedeemABinanceGiftCardRequest\n ): Promise<RestApiResponse<RedeemABinanceGiftCardResponse>> {\n const localVarAxiosArgs = await this.localVarAxiosParamCreator.redeemABinanceGiftCard(\n requestParameters?.code,\n requestParameters?.externalUid,\n requestParameters?.recvWindow\n );\n return sendRequest<RedeemABinanceGiftCardResponse>(\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 * This API is for verifying whether the Binance Gift Card is valid or not by entering Gift Card Number.\n *\n **Please note that if you enter the wrong Gift Card Number 5 times within an hour, you will no longer be able to verify any Gift Card Number for that hour.**\n *\n * Weight: 1\n *\n * @summary Verify Binance Gift Card by Gift Card Number(USER_DATA)\n * @param {VerifyBinanceGiftCardByGiftCardNumberRequest} requestParameters Request parameters.\n * @returns {Promise<RestApiResponse<VerifyBinanceGiftCardByGiftCardNumberResponse>>}\n * @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}\n * @memberof MarketDataApi\n * @see {@link https://developers.binance.com/docs/gift_card/market-data/Verify-Binance-Gift-Card-by-Gift-Card-Number Binance API Documentation}\n */\n public async verifyBinanceGiftCardByGiftCardNumber(\n requestParameters: VerifyBinanceGiftCardByGiftCardNumberRequest\n ): Promise<RestApiResponse<VerifyBinanceGiftCardByGiftCardNumberResponse>> {\n const localVarAxiosArgs =\n await this.localVarAxiosParamCreator.verifyBinanceGiftCardByGiftCardNumber(\n requestParameters?.referenceNo,\n requestParameters?.recvWindow\n );\n return sendRequest<VerifyBinanceGiftCardByGiftCardNumberResponse>(\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 Gift Card REST API\n *\n * OpenAPI Specification for the Binance Gift Card 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 { MarketDataApi } from './modules/market-data-api';\n\nimport type {\n CreateADualTokenGiftCardRequest,\n CreateASingleTokenGiftCardRequest,\n FetchRsaPublicKeyRequest,\n FetchTokenLimitRequest,\n RedeemABinanceGiftCardRequest,\n VerifyBinanceGiftCardByGiftCardNumberRequest,\n} from './modules/market-data-api';\n\nimport type {\n CreateADualTokenGiftCardResponse,\n CreateASingleTokenGiftCardResponse,\n FetchRsaPublicKeyResponse,\n FetchTokenLimitResponse,\n RedeemABinanceGiftCardResponse,\n VerifyBinanceGiftCardByGiftCardNumberResponse,\n} from './types';\n\nexport class RestAPI {\n private configuration: ConfigurationRestAPI;\n private marketDataApi: MarketDataApi;\n\n constructor(configuration: ConfigurationRestAPI) {\n this.configuration = configuration;\n this.marketDataApi = new MarketDataApi(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 * * This API is for creating a dual-token ( stablecoin-denominated) Binance Gift Card. You may create a gift card using USDT as baseToken, that is redeemable to another designated token (faceToken). For example, you can create a fixed-value BTC gift card and pay with 100 USDT plus minting fee. This gift card can keep the value fixed at 100 USDT before redemption, and will be redeemable to BTC equivalent to 100 USDT upon redemption.\n * Once successfully created, the amount of baseToken (e.g. USDT) in the fixed-value gift card along with the fee would be deducted from your funding wallet.\n *\n *\n * To get started with, please make sure:\n * You have a Binance account\n * You have passed KYB\n * You have a sufficient balance(Gift Card amount and fee amount) in your Binance funding wallet\n * You need Enable Withdrawals for the API Key which requests this endpoint.\n *\n * Weight: 1\n *\n * @summary Create a dual-token gift card(fixed value, discount feature)(TRADE)\n * @param {CreateADualTokenGiftCardRequest} requestParameters Request parameters.\n *\n * @returns {Promise<RestApiResponse<CreateADualTokenGiftCardResponse>>}\n * @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}\n * @see {@link https://developers.binance.com/docs/gift_card/market-data/Create-a-dual-token-gift-card Binance API Documentation}\n */\n createADualTokenGiftCard(\n requestParameters: CreateADualTokenGiftCardRequest\n ): Promise<RestApiResponse<CreateADualTokenGiftCardResponse>> {\n return this.marketDataApi.createADualTokenGiftCard(requestParameters);\n }\n\n /**\n * This API is for creating a Binance Gift Card.\n *\n * To get started with, please make sure:\n *\n * You have a Binance account\n * You have passed KYB\n * You have a sufficient balance(Gift Card amount and fee amount) in your Binance funding wallet\n * You need `Enable Withdrawals` for the API Key which requests this endpoint.\n *\n * Weight: 1\n *\n * @summary Create a single-token gift card (USER_DATA)\n * @param {CreateASingleTokenGiftCardRequest} requestParameters Request parameters.\n *\n * @returns {Promise<RestApiResponse<CreateASingleTokenGiftCardResponse>>}\n * @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}\n * @see {@link https://developers.binance.com/docs/gift_card/market-data/Create-a-single-token-gift-card Binance API Documentation}\n */\n createASingleTokenGiftCard(\n requestParameters: CreateASingleTokenGiftCardRequest\n ): Promise<RestApiResponse<CreateASingleTokenGiftCardResponse>> {\n return this.marketDataApi.createASingleTokenGiftCard(requestParameters);\n }\n\n /**\n * This API is for fetching the RSA Public Key.\n * This RSA Public key will be used to encrypt the card code.\n *\n **Please note that the RSA Public key fetched is valid only for the current day.**\n *\n * Weight: 1\n *\n * @summary Fetch RSA Public Key(USER_DATA)\n * @param {FetchRsaPublicKeyRequest} requestParameters Request parameters.\n *\n * @returns {Promise<RestApiResponse<FetchRsaPublicKeyResponse>>}\n * @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}\n * @see {@link https://developers.binance.com/docs/gift_card/market-data/Fetch-RSA-Public-Key Binance API Documentation}\n */\n fetchRsaPublicKey(\n requestParameters: FetchRsaPublicKeyRequest = {}\n ): Promise<RestApiResponse<FetchRsaPublicKeyResponse>> {\n return this.marketDataApi.fetchRsaPublicKey(requestParameters);\n }\n\n /**\n * This API is to help you verify which tokens are available for you to create Stablecoin-Denominated gift cards as mentioned in section 2 and its’ limitation.\n *\n * Weight: 1\n *\n * @summary Fetch Token Limit(USER_DATA)\n * @param {FetchTokenLimitRequest} requestParameters Request parameters.\n *\n * @returns {Promise<RestApiResponse<FetchTokenLimitResponse>>}\n * @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}\n * @see {@link https://developers.binance.com/docs/gift_card/market-data/Fetch-Token-Limit Binance API Documentation}\n */\n fetchTokenLimit(\n requestParameters: FetchTokenLimitRequest\n ): Promise<RestApiResponse<FetchTokenLimitResponse>> {\n return this.marketDataApi.fetchTokenLimit(requestParameters);\n }\n\n /**\n * This API is for redeeming a Binance Gift Card\n * Once redeemed, the coins will be deposited in your funding wallet.\n *\n * Parameter code can be sent in two formats:\n * Plaintext\n * Encrypted\n *\n * Sending code in Encrypted format provides more security than sending it as a plaintext. To send card code in encrypted format the following steps must be followed:\n * Fetch RSA public key from api stated below.\n * Use the below algorithm to encrypt the card code using the RSA public key fetched above: `RSA/ECB/OAEPWithSHA-256AndMGF1Padding`\n **A sample code snippet (JAVA) is stated below for reference, the same approach can be used for different languages like C#, PERL, PYTHON, SHELL etc.:**\n *\n * Weight: 1\n *\n * @summary Redeem a Binance Gift Card(USER_DATA)\n * @param {RedeemABinanceGiftCardRequest} requestParameters Request parameters.\n *\n * @returns {Promise<RestApiResponse<RedeemABinanceGiftCardResponse>>}\n * @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}\n * @see {@link https://developers.binance.com/docs/gift_card/market-data/Redeem-a-Binance-Gift-Card Binance API Documentation}\n */\n redeemABinanceGiftCard(\n requestParameters: RedeemABinanceGiftCardRequest\n ): Promise<RestApiResponse<RedeemABinanceGiftCardResponse>> {\n return this.marketDataApi.redeemABinanceGiftCard(requestParameters);\n }\n\n /**\n * This API is for verifying whether the Binance Gift Card is valid or not by entering Gift Card Number.\n *\n **Please note that if you enter the wrong Gift Card Number 5 times within an hour, you will no longer be able to verify any Gift Card Number for that hour.**\n *\n * Weight: 1\n *\n * @summary Verify Binance Gift Card by Gift Card Number(USER_DATA)\n * @param {VerifyBinanceGiftCardByGiftCardNumberRequest} requestParameters Request parameters.\n *\n * @returns {Promise<RestApiResponse<VerifyBinanceGiftCardByGiftCardNumberResponse>>}\n * @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}\n * @see {@link https://developers.binance.com/docs/gift_card/market-data/Verify-Binance-Gift-Card-by-Gift-Card-Number Binance API Documentation}\n */\n verifyBinanceGiftCardByGiftCardNumber(\n requestParameters: VerifyBinanceGiftCardByGiftCardNumberRequest\n ): Promise<RestApiResponse<VerifyBinanceGiftCardByGiftCardNumberResponse>> {\n return this.marketDataApi.verifyBinanceGiftCardByGiftCardNumber(requestParameters);\n }\n}\n","/**\n * Binance Gift Card REST API\n *\n * OpenAPI Specification for the Binance Gift Card 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, GIFT_CARD_REST_API_PROD_URL } from '@binance/common';\nimport { name, version } from '../package.json';\nimport { RestAPI } from './rest-api';\n\nexport interface ConfigurationGiftCard {\n configurationRestAPI?: ConfigurationRestAPI;\n}\n\nexport class GiftCard {\n public restAPI!: RestAPI;\n\n constructor(config: ConfigurationGiftCard) {\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 || GIFT_CARD_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;;;;;;;;;;;;;;;;;;;AC8Bf,MAAM,iCAAiC,SAAU,eAAqC;AAClF,QAAO;EAsBH,0BAA0B,OACtB,WACA,WACA,iBACA,eACuB;AAEvB,2CAAkB,4BAA4B,aAAa,UAAU;AAErE,2CAAkB,4BAA4B,aAAa,UAAU;AAErE,2CAAkB,4BAA4B,mBAAmB,gBAAgB;GAEjF,MAAM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sB;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>","localVarHeaderParameter: Record<string, unknown>","_timeUnit: TimeUnit | undefined","ConfigurationRestAPI","GIFT_CARD_REST_API_PROD_URL"],"sources":["../package.json","../src/rest-api/modules/market-data-api.ts","../src/rest-api/rest-api.ts","../src/rest-api/index.ts","../src/gift-card.ts"],"sourcesContent":["{\n \"name\": \"@binance/giftcard\",\n \"description\": \"Official Binance Gift Card Connector - A lightweight library that provides a convenient interface to Binance's Gift Card REST API.\",\n \"version\": \"4.1.16\",\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 \"Gift Card\",\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.4.0\",\n \"axios\": \"^1.7.4\"\n }\n}\n","/**\n * Binance Gift Card REST API\n *\n * OpenAPI Specification for the Binance Gift Card 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 assertParamExists,\n sendRequest,\n type RequestArgs,\n} from '@binance/common';\nimport type {\n CreateADualTokenGiftCardResponse,\n CreateASingleTokenGiftCardResponse,\n FetchRsaPublicKeyResponse,\n FetchTokenLimitResponse,\n RedeemABinanceGiftCardResponse,\n VerifyBinanceGiftCardByGiftCardNumberResponse,\n} from '../types';\n\n/**\n * MarketDataApi - axios parameter creator\n */\nconst MarketDataApiAxiosParamCreator = function (configuration: ConfigurationRestAPI) {\n return {\n /**\n * * This API is for creating a dual-token ( stablecoin-denominated) Binance Gift Card. You may create a gift card using USDT as baseToken, that is redeemable to another designated token (faceToken). For example, you can create a fixed-value BTC gift card and pay with 100 USDT plus minting fee. This gift card can keep the value fixed at 100 USDT before redemption, and will be redeemable to BTC equivalent to 100 USDT upon redemption.\n * Once successfully created, the amount of baseToken (e.g. USDT) in the fixed-value gift card along with the fee would be deducted from your funding wallet.\n *\n *\n * To get started with, please make sure:\n * You have a Binance account\n * You have passed KYB\n * You have a sufficient balance(Gift Card amount and fee amount) in your Binance funding wallet\n * You need Enable Withdrawals for the API Key which requests this endpoint.\n *\n * Weight: 1\n *\n * @summary Create a dual-token gift card(fixed value, discount feature)(TRADE)\n * @param {string} baseToken The token you want to pay, example: BUSD\n * @param {string} faceToken The token you want to buy, example: BNB. If faceToken = baseToken, it's the same as createCode endpoint.\n * @param {number} baseTokenAmount The base token asset quantity, example : 1.002\n * @param {number | bigint} [recvWindow]\n *\n * @throws {RequiredError}\n */\n createADualTokenGiftCard: async (\n baseToken: string,\n faceToken: string,\n baseTokenAmount: number,\n recvWindow?: number | bigint\n ): Promise<RequestArgs> => {\n // verify required parameter 'baseToken' is not null or undefined\n assertParamExists('createADualTokenGiftCard', 'baseToken', baseToken);\n // verify required parameter 'faceToken' is not null or undefined\n assertParamExists('createADualTokenGiftCard', 'faceToken', faceToken);\n // verify required parameter 'baseTokenAmount' is not null or undefined\n assertParamExists('createADualTokenGiftCard', 'baseTokenAmount', baseTokenAmount);\n\n const localVarQueryParameter: Record<string, unknown> = {};\n const localVarBodyParameter: Record<string, unknown> = {};\n const localVarHeaderParameter: Record<string, unknown> = {};\n\n if (baseToken !== undefined && baseToken !== null) {\n localVarQueryParameter['baseToken'] = baseToken;\n }\n if (faceToken !== undefined && faceToken !== null) {\n localVarQueryParameter['faceToken'] = faceToken;\n }\n if (baseTokenAmount !== undefined && baseTokenAmount !== null) {\n localVarQueryParameter['baseTokenAmount'] = baseTokenAmount;\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/giftcard/buyCode',\n method: 'POST',\n queryParams: localVarQueryParameter,\n bodyParams: localVarBodyParameter,\n headerParams: localVarHeaderParameter,\n timeUnit: _timeUnit,\n };\n },\n /**\n * This API is for creating a Binance Gift Card.\n *\n * To get started with, please make sure:\n *\n * You have a Binance account\n * You have passed KYB\n * You have a sufficient balance(Gift Card amount and fee amount) in your Binance funding wallet\n * You need `Enable Withdrawals` for the API Key which requests this endpoint.\n *\n * Weight: 1\n *\n * @summary Create a single-token gift card (USER_DATA)\n * @param {string} token The token type contained in the Binance Gift Card\n * @param {number} amount The amount of the token contained in the Binance Gift Card\n * @param {number | bigint} [recvWindow]\n *\n * @throws {RequiredError}\n */\n createASingleTokenGiftCard: async (\n token: string,\n amount: number,\n recvWindow?: number | bigint\n ): Promise<RequestArgs> => {\n // verify required parameter 'token' is not null or undefined\n assertParamExists('createASingleTokenGiftCard', 'token', token);\n // verify required parameter 'amount' is not null or undefined\n assertParamExists('createASingleTokenGiftCard', 'amount', amount);\n\n const localVarQueryParameter: Record<string, unknown> = {};\n const localVarBodyParameter: Record<string, unknown> = {};\n const localVarHeaderParameter: Record<string, unknown> = {};\n\n if (token !== undefined && token !== null) {\n localVarQueryParameter['token'] = token;\n }\n if (amount !== undefined && amount !== null) {\n localVarQueryParameter['amount'] = amount;\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/giftcard/createCode',\n method: 'POST',\n queryParams: localVarQueryParameter,\n bodyParams: localVarBodyParameter,\n headerParams: localVarHeaderParameter,\n timeUnit: _timeUnit,\n };\n },\n /**\n * This API is for fetching the RSA Public Key.\n * This RSA Public key will be used to encrypt the card code.\n *\n **Please note that the RSA Public key fetched is valid only for the current day.**\n *\n * Weight: 1\n *\n * @summary Fetch RSA Public Key(USER_DATA)\n * @param {number | bigint} [recvWindow]\n *\n * @throws {RequiredError}\n */\n fetchRsaPublicKey: async (recvWindow?: number | bigint): Promise<RequestArgs> => {\n const localVarQueryParameter: Record<string, unknown> = {};\n const localVarBodyParameter: Record<string, unknown> = {};\n const localVarHeaderParameter: Record<string, unknown> = {};\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/giftcard/cryptography/rsa-public-key',\n method: 'GET',\n queryParams: localVarQueryParameter,\n bodyParams: localVarBodyParameter,\n headerParams: localVarHeaderParameter,\n timeUnit: _timeUnit,\n };\n },\n /**\n * This API is to help you verify which tokens are available for you to create Stablecoin-Denominated gift cards as mentioned in section 2 and its’ limitation.\n *\n * Weight: 1\n *\n * @summary Fetch Token Limit(USER_DATA)\n * @param {string} baseToken The token you want to pay, example: BUSD\n * @param {number | bigint} [recvWindow]\n *\n * @throws {RequiredError}\n */\n fetchTokenLimit: async (\n baseToken: string,\n recvWindow?: number | bigint\n ): Promise<RequestArgs> => {\n // verify required parameter 'baseToken' is not null or undefined\n assertParamExists('fetchTokenLimit', 'baseToken', baseToken);\n\n const localVarQueryParameter: Record<string, unknown> = {};\n const localVarBodyParameter: Record<string, unknown> = {};\n const localVarHeaderParameter: Record<string, unknown> = {};\n\n if (baseToken !== undefined && baseToken !== null) {\n localVarQueryParameter['baseToken'] = baseToken;\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/giftcard/buyCode/token-limit',\n method: 'GET',\n queryParams: localVarQueryParameter,\n bodyParams: localVarBodyParameter,\n headerParams: localVarHeaderParameter,\n timeUnit: _timeUnit,\n };\n },\n /**\n * This API is for redeeming a Binance Gift Card\n * Once redeemed, the coins will be deposited in your funding wallet.\n *\n * Parameter code can be sent in two formats:\n * Plaintext\n * Encrypted\n *\n * Sending code in Encrypted format provides more security than sending it as a plaintext. To send card code in encrypted format the following steps must be followed:\n * Fetch RSA public key from api stated below.\n * Use the below algorithm to encrypt the card code using the RSA public key fetched above: `RSA/ECB/OAEPWithSHA-256AndMGF1Padding`\n **A sample code snippet (JAVA) is stated below for reference, the same approach can be used for different languages like C#, PERL, PYTHON, SHELL etc.:**\n *\n * Weight: 1\n *\n * @summary Redeem a Binance Gift Card(USER_DATA)\n * @param {string} code Redemption code of Binance Gift Card to be redeemed, supports both Plaintext & Encrypted code.\n * @param {string} [externalUid] Each external unique ID represents a unique user on the partner platform. The function helps you to identify the redemption behavior of different users, such as redemption frequency and amount. It also helps risk and limit control of a single account, such as daily limit on redemption volume, frequency, and incorrect number of entries. This will also prevent a single user account reach the partner's daily redemption limits. We strongly recommend you to use this feature and transfer us the User ID of your users if you have different users redeeming Binance Gift Cards on your platform. To protect user data privacy, you may choose to transfer the user id in any desired format (max. 400 characters).\n * @param {number | bigint} [recvWindow]\n *\n * @throws {RequiredError}\n */\n redeemABinanceGiftCard: async (\n code: string,\n externalUid?: string,\n recvWindow?: number | bigint\n ): Promise<RequestArgs> => {\n // verify required parameter 'code' is not null or undefined\n assertParamExists('redeemABinanceGiftCard', 'code', code);\n\n const localVarQueryParameter: Record<string, unknown> = {};\n const localVarBodyParameter: Record<string, unknown> = {};\n const localVarHeaderParameter: Record<string, unknown> = {};\n\n if (code !== undefined && code !== null) {\n localVarQueryParameter['code'] = code;\n }\n if (externalUid !== undefined && externalUid !== null) {\n localVarQueryParameter['externalUid'] = externalUid;\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/giftcard/redeemCode',\n method: 'POST',\n queryParams: localVarQueryParameter,\n bodyParams: localVarBodyParameter,\n headerParams: localVarHeaderParameter,\n timeUnit: _timeUnit,\n };\n },\n /**\n * This API is for verifying whether the Binance Gift Card is valid or not by entering Gift Card Number.\n *\n **Please note that if you enter the wrong Gift Card Number 5 times within an hour, you will no longer be able to verify any Gift Card Number for that hour.**\n *\n * Weight: 1\n *\n * @summary Verify Binance Gift Card by Gift Card Number(USER_DATA)\n * @param {string} referenceNo Enter the Gift Card Number\n * @param {number | bigint} [recvWindow]\n *\n * @throws {RequiredError}\n */\n verifyBinanceGiftCardByGiftCardNumber: async (\n referenceNo: string,\n recvWindow?: number | bigint\n ): Promise<RequestArgs> => {\n // verify required parameter 'referenceNo' is not null or undefined\n assertParamExists('verifyBinanceGiftCardByGiftCardNumber', 'referenceNo', referenceNo);\n\n const localVarQueryParameter: Record<string, unknown> = {};\n const localVarBodyParameter: Record<string, unknown> = {};\n const localVarHeaderParameter: Record<string, unknown> = {};\n\n if (referenceNo !== undefined && referenceNo !== null) {\n localVarQueryParameter['referenceNo'] = referenceNo;\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/giftcard/verify',\n method: 'GET',\n queryParams: localVarQueryParameter,\n bodyParams: localVarBodyParameter,\n headerParams: localVarHeaderParameter,\n timeUnit: _timeUnit,\n };\n },\n };\n};\n\n/**\n * MarketDataApi - interface\n * @interface MarketDataApi\n */\nexport interface MarketDataApiInterface {\n /**\n * * This API is for creating a dual-token ( stablecoin-denominated) Binance Gift Card. You may create a gift card using USDT as baseToken, that is redeemable to another designated token (faceToken). For example, you can create a fixed-value BTC gift card and pay with 100 USDT plus minting fee. This gift card can keep the value fixed at 100 USDT before redemption, and will be redeemable to BTC equivalent to 100 USDT upon redemption.\n * Once successfully created, the amount of baseToken (e.g. USDT) in the fixed-value gift card along with the fee would be deducted from your funding wallet.\n *\n *\n * To get started with, please make sure:\n * You have a Binance account\n * You have passed KYB\n * You have a sufficient balance(Gift Card amount and fee amount) in your Binance funding wallet\n * You need Enable Withdrawals for the API Key which requests this endpoint.\n *\n * Weight: 1\n *\n * @summary Create a dual-token gift card(fixed value, discount feature)(TRADE)\n * @param {CreateADualTokenGiftCardRequest} requestParameters Request parameters.\n *\n * @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}\n * @memberof MarketDataApiInterface\n */\n createADualTokenGiftCard(\n requestParameters: CreateADualTokenGiftCardRequest\n ): Promise<RestApiResponse<CreateADualTokenGiftCardResponse>>;\n /**\n * This API is for creating a Binance Gift Card.\n *\n * To get started with, please make sure:\n *\n * You have a Binance account\n * You have passed KYB\n * You have a sufficient balance(Gift Card amount and fee amount) in your Binance funding wallet\n * You need `Enable Withdrawals` for the API Key which requests this endpoint.\n *\n * Weight: 1\n *\n * @summary Create a single-token gift card (USER_DATA)\n * @param {CreateASingleTokenGiftCardRequest} requestParameters Request parameters.\n *\n * @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}\n * @memberof MarketDataApiInterface\n */\n createASingleTokenGiftCard(\n requestParameters: CreateASingleTokenGiftCardRequest\n ): Promise<RestApiResponse<CreateASingleTokenGiftCardResponse>>;\n /**\n * This API is for fetching the RSA Public Key.\n * This RSA Public key will be used to encrypt the card code.\n *\n **Please note that the RSA Public key fetched is valid only for the current day.**\n *\n * Weight: 1\n *\n * @summary Fetch RSA Public Key(USER_DATA)\n * @param {FetchRsaPublicKeyRequest} requestParameters Request parameters.\n *\n * @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}\n * @memberof MarketDataApiInterface\n */\n fetchRsaPublicKey(\n requestParameters?: FetchRsaPublicKeyRequest\n ): Promise<RestApiResponse<FetchRsaPublicKeyResponse>>;\n /**\n * This API is to help you verify which tokens are available for you to create Stablecoin-Denominated gift cards as mentioned in section 2 and its’ limitation.\n *\n * Weight: 1\n *\n * @summary Fetch Token Limit(USER_DATA)\n * @param {FetchTokenLimitRequest} requestParameters Request parameters.\n *\n * @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}\n * @memberof MarketDataApiInterface\n */\n fetchTokenLimit(\n requestParameters: FetchTokenLimitRequest\n ): Promise<RestApiResponse<FetchTokenLimitResponse>>;\n /**\n * This API is for redeeming a Binance Gift Card\n * Once redeemed, the coins will be deposited in your funding wallet.\n *\n * Parameter code can be sent in two formats:\n * Plaintext\n * Encrypted\n *\n * Sending code in Encrypted format provides more security than sending it as a plaintext. To send card code in encrypted format the following steps must be followed:\n * Fetch RSA public key from api stated below.\n * Use the below algorithm to encrypt the card code using the RSA public key fetched above: `RSA/ECB/OAEPWithSHA-256AndMGF1Padding`\n **A sample code snippet (JAVA) is stated below for reference, the same approach can be used for different languages like C#, PERL, PYTHON, SHELL etc.:**\n *\n * Weight: 1\n *\n * @summary Redeem a Binance Gift Card(USER_DATA)\n * @param {RedeemABinanceGiftCardRequest} requestParameters Request parameters.\n *\n * @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}\n * @memberof MarketDataApiInterface\n */\n redeemABinanceGiftCard(\n requestParameters: RedeemABinanceGiftCardRequest\n ): Promise<RestApiResponse<RedeemABinanceGiftCardResponse>>;\n /**\n * This API is for verifying whether the Binance Gift Card is valid or not by entering Gift Card Number.\n *\n **Please note that if you enter the wrong Gift Card Number 5 times within an hour, you will no longer be able to verify any Gift Card Number for that hour.**\n *\n * Weight: 1\n *\n * @summary Verify Binance Gift Card by Gift Card Number(USER_DATA)\n * @param {VerifyBinanceGiftCardByGiftCardNumberRequest} requestParameters Request parameters.\n *\n * @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}\n * @memberof MarketDataApiInterface\n */\n verifyBinanceGiftCardByGiftCardNumber(\n requestParameters: VerifyBinanceGiftCardByGiftCardNumberRequest\n ): Promise<RestApiResponse<VerifyBinanceGiftCardByGiftCardNumberResponse>>;\n}\n\n/**\n * Request parameters for createADualTokenGiftCard operation in MarketDataApi.\n * @interface CreateADualTokenGiftCardRequest\n */\nexport interface CreateADualTokenGiftCardRequest {\n /**\n * The token you want to pay, example: BUSD\n * @type {string}\n * @memberof MarketDataApiCreateADualTokenGiftCard\n */\n readonly baseToken: string;\n\n /**\n * The token you want to buy, example: BNB. If faceToken = baseToken, it's the same as createCode endpoint.\n * @type {string}\n * @memberof MarketDataApiCreateADualTokenGiftCard\n */\n readonly faceToken: string;\n\n /**\n * The base token asset quantity, example : 1.002\n * @type {number}\n * @memberof MarketDataApiCreateADualTokenGiftCard\n */\n readonly baseTokenAmount: number;\n\n /**\n *\n * @type {number | bigint}\n * @memberof MarketDataApiCreateADualTokenGiftCard\n */\n readonly recvWindow?: number | bigint;\n}\n\n/**\n * Request parameters for createASingleTokenGiftCard operation in MarketDataApi.\n * @interface CreateASingleTokenGiftCardRequest\n */\nexport interface CreateASingleTokenGiftCardRequest {\n /**\n * The token type contained in the Binance Gift Card\n * @type {string}\n * @memberof MarketDataApiCreateASingleTokenGiftCard\n */\n readonly token: string;\n\n /**\n * The amount of the token contained in the Binance Gift Card\n * @type {number}\n * @memberof MarketDataApiCreateASingleTokenGiftCard\n */\n readonly amount: number;\n\n /**\n *\n * @type {number | bigint}\n * @memberof MarketDataApiCreateASingleTokenGiftCard\n */\n readonly recvWindow?: number | bigint;\n}\n\n/**\n * Request parameters for fetchRsaPublicKey operation in MarketDataApi.\n * @interface FetchRsaPublicKeyRequest\n */\nexport interface FetchRsaPublicKeyRequest {\n /**\n *\n * @type {number | bigint}\n * @memberof MarketDataApiFetchRsaPublicKey\n */\n readonly recvWindow?: number | bigint;\n}\n\n/**\n * Request parameters for fetchTokenLimit operation in MarketDataApi.\n * @interface FetchTokenLimitRequest\n */\nexport interface FetchTokenLimitRequest {\n /**\n * The token you want to pay, example: BUSD\n * @type {string}\n * @memberof MarketDataApiFetchTokenLimit\n */\n readonly baseToken: string;\n\n /**\n *\n * @type {number | bigint}\n * @memberof MarketDataApiFetchTokenLimit\n */\n readonly recvWindow?: number | bigint;\n}\n\n/**\n * Request parameters for redeemABinanceGiftCard operation in MarketDataApi.\n * @interface RedeemABinanceGiftCardRequest\n */\nexport interface RedeemABinanceGiftCardRequest {\n /**\n * Redemption code of Binance Gift Card to be redeemed, supports both Plaintext & Encrypted code.\n * @type {string}\n * @memberof MarketDataApiRedeemABinanceGiftCard\n */\n readonly code: string;\n\n /**\n * Each external unique ID represents a unique user on the partner platform. The function helps you to identify the redemption behavior of different users, such as redemption frequency and amount. It also helps risk and limit control of a single account, such as daily limit on redemption volume, frequency, and incorrect number of entries. This will also prevent a single user account reach the partner's daily redemption limits. We strongly recommend you to use this feature and transfer us the User ID of your users if you have different users redeeming Binance Gift Cards on your platform. To protect user data privacy, you may choose to transfer the user id in any desired format (max. 400 characters).\n * @type {string}\n * @memberof MarketDataApiRedeemABinanceGiftCard\n */\n readonly externalUid?: string;\n\n /**\n *\n * @type {number | bigint}\n * @memberof MarketDataApiRedeemABinanceGiftCard\n */\n readonly recvWindow?: number | bigint;\n}\n\n/**\n * Request parameters for verifyBinanceGiftCardByGiftCardNumber operation in MarketDataApi.\n * @interface VerifyBinanceGiftCardByGiftCardNumberRequest\n */\nexport interface VerifyBinanceGiftCardByGiftCardNumberRequest {\n /**\n * Enter the Gift Card Number\n * @type {string}\n * @memberof MarketDataApiVerifyBinanceGiftCardByGiftCardNumber\n */\n readonly referenceNo: string;\n\n /**\n *\n * @type {number | bigint}\n * @memberof MarketDataApiVerifyBinanceGiftCardByGiftCardNumber\n */\n readonly recvWindow?: number | bigint;\n}\n\n/**\n * MarketDataApi - object-oriented interface\n * @class MarketDataApi\n */\nexport class MarketDataApi implements MarketDataApiInterface {\n private readonly configuration: ConfigurationRestAPI;\n private localVarAxiosParamCreator;\n\n constructor(configuration: ConfigurationRestAPI) {\n this.configuration = configuration;\n this.localVarAxiosParamCreator = MarketDataApiAxiosParamCreator(configuration);\n }\n\n /**\n * * This API is for creating a dual-token ( stablecoin-denominated) Binance Gift Card. You may create a gift card using USDT as baseToken, that is redeemable to another designated token (faceToken). For example, you can create a fixed-value BTC gift card and pay with 100 USDT plus minting fee. This gift card can keep the value fixed at 100 USDT before redemption, and will be redeemable to BTC equivalent to 100 USDT upon redemption.\n * Once successfully created, the amount of baseToken (e.g. USDT) in the fixed-value gift card along with the fee would be deducted from your funding wallet.\n *\n *\n * To get started with, please make sure:\n * You have a Binance account\n * You have passed KYB\n * You have a sufficient balance(Gift Card amount and fee amount) in your Binance funding wallet\n * You need Enable Withdrawals for the API Key which requests this endpoint.\n *\n * Weight: 1\n *\n * @summary Create a dual-token gift card(fixed value, discount feature)(TRADE)\n * @param {CreateADualTokenGiftCardRequest} requestParameters Request parameters.\n * @returns {Promise<RestApiResponse<CreateADualTokenGiftCardResponse>>}\n * @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}\n * @memberof MarketDataApi\n * @see {@link https://developers.binance.com/docs/gift_card/market-data/Create-a-dual-token-gift-card Binance API Documentation}\n */\n public async createADualTokenGiftCard(\n requestParameters: CreateADualTokenGiftCardRequest\n ): Promise<RestApiResponse<CreateADualTokenGiftCardResponse>> {\n const localVarAxiosArgs = await this.localVarAxiosParamCreator.createADualTokenGiftCard(\n requestParameters?.baseToken,\n requestParameters?.faceToken,\n requestParameters?.baseTokenAmount,\n requestParameters?.recvWindow\n );\n return sendRequest<CreateADualTokenGiftCardResponse>(\n this.configuration,\n localVarAxiosArgs.endpoint,\n localVarAxiosArgs.method,\n localVarAxiosArgs.queryParams,\n localVarAxiosArgs.bodyParams,\n localVarAxiosArgs.headerParams,\n localVarAxiosArgs?.timeUnit,\n { isSigned: true }\n );\n }\n\n /**\n * This API is for creating a Binance Gift Card.\n *\n * To get started with, please make sure:\n *\n * You have a Binance account\n * You have passed KYB\n * You have a sufficient balance(Gift Card amount and fee amount) in your Binance funding wallet\n * You need `Enable Withdrawals` for the API Key which requests this endpoint.\n *\n * Weight: 1\n *\n * @summary Create a single-token gift card (USER_DATA)\n * @param {CreateASingleTokenGiftCardRequest} requestParameters Request parameters.\n * @returns {Promise<RestApiResponse<CreateASingleTokenGiftCardResponse>>}\n * @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}\n * @memberof MarketDataApi\n * @see {@link https://developers.binance.com/docs/gift_card/market-data/Create-a-single-token-gift-card Binance API Documentation}\n */\n public async createASingleTokenGiftCard(\n requestParameters: CreateASingleTokenGiftCardRequest\n ): Promise<RestApiResponse<CreateASingleTokenGiftCardResponse>> {\n const localVarAxiosArgs = await this.localVarAxiosParamCreator.createASingleTokenGiftCard(\n requestParameters?.token,\n requestParameters?.amount,\n requestParameters?.recvWindow\n );\n return sendRequest<CreateASingleTokenGiftCardResponse>(\n this.configuration,\n localVarAxiosArgs.endpoint,\n localVarAxiosArgs.method,\n localVarAxiosArgs.queryParams,\n localVarAxiosArgs.bodyParams,\n localVarAxiosArgs.headerParams,\n localVarAxiosArgs?.timeUnit,\n { isSigned: true }\n );\n }\n\n /**\n * This API is for fetching the RSA Public Key.\n * This RSA Public key will be used to encrypt the card code.\n *\n **Please note that the RSA Public key fetched is valid only for the current day.**\n *\n * Weight: 1\n *\n * @summary Fetch RSA Public Key(USER_DATA)\n * @param {FetchRsaPublicKeyRequest} requestParameters Request parameters.\n * @returns {Promise<RestApiResponse<FetchRsaPublicKeyResponse>>}\n * @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}\n * @memberof MarketDataApi\n * @see {@link https://developers.binance.com/docs/gift_card/market-data/Fetch-RSA-Public-Key Binance API Documentation}\n */\n public async fetchRsaPublicKey(\n requestParameters: FetchRsaPublicKeyRequest = {}\n ): Promise<RestApiResponse<FetchRsaPublicKeyResponse>> {\n const localVarAxiosArgs = await this.localVarAxiosParamCreator.fetchRsaPublicKey(\n requestParameters?.recvWindow\n );\n return sendRequest<FetchRsaPublicKeyResponse>(\n this.configuration,\n localVarAxiosArgs.endpoint,\n localVarAxiosArgs.method,\n localVarAxiosArgs.queryParams,\n localVarAxiosArgs.bodyParams,\n localVarAxiosArgs.headerParams,\n localVarAxiosArgs?.timeUnit,\n { isSigned: true }\n );\n }\n\n /**\n * This API is to help you verify which tokens are available for you to create Stablecoin-Denominated gift cards as mentioned in section 2 and its’ limitation.\n *\n * Weight: 1\n *\n * @summary Fetch Token Limit(USER_DATA)\n * @param {FetchTokenLimitRequest} requestParameters Request parameters.\n * @returns {Promise<RestApiResponse<FetchTokenLimitResponse>>}\n * @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}\n * @memberof MarketDataApi\n * @see {@link https://developers.binance.com/docs/gift_card/market-data/Fetch-Token-Limit Binance API Documentation}\n */\n public async fetchTokenLimit(\n requestParameters: FetchTokenLimitRequest\n ): Promise<RestApiResponse<FetchTokenLimitResponse>> {\n const localVarAxiosArgs = await this.localVarAxiosParamCreator.fetchTokenLimit(\n requestParameters?.baseToken,\n requestParameters?.recvWindow\n );\n return sendRequest<FetchTokenLimitResponse>(\n this.configuration,\n localVarAxiosArgs.endpoint,\n localVarAxiosArgs.method,\n localVarAxiosArgs.queryParams,\n localVarAxiosArgs.bodyParams,\n localVarAxiosArgs.headerParams,\n localVarAxiosArgs?.timeUnit,\n { isSigned: true }\n );\n }\n\n /**\n * This API is for redeeming a Binance Gift Card\n * Once redeemed, the coins will be deposited in your funding wallet.\n *\n * Parameter code can be sent in two formats:\n * Plaintext\n * Encrypted\n *\n * Sending code in Encrypted format provides more security than sending it as a plaintext. To send card code in encrypted format the following steps must be followed:\n * Fetch RSA public key from api stated below.\n * Use the below algorithm to encrypt the card code using the RSA public key fetched above: `RSA/ECB/OAEPWithSHA-256AndMGF1Padding`\n **A sample code snippet (JAVA) is stated below for reference, the same approach can be used for different languages like C#, PERL, PYTHON, SHELL etc.:**\n *\n * Weight: 1\n *\n * @summary Redeem a Binance Gift Card(USER_DATA)\n * @param {RedeemABinanceGiftCardRequest} requestParameters Request parameters.\n * @returns {Promise<RestApiResponse<RedeemABinanceGiftCardResponse>>}\n * @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}\n * @memberof MarketDataApi\n * @see {@link https://developers.binance.com/docs/gift_card/market-data/Redeem-a-Binance-Gift-Card Binance API Documentation}\n */\n public async redeemABinanceGiftCard(\n requestParameters: RedeemABinanceGiftCardRequest\n ): Promise<RestApiResponse<RedeemABinanceGiftCardResponse>> {\n const localVarAxiosArgs = await this.localVarAxiosParamCreator.redeemABinanceGiftCard(\n requestParameters?.code,\n requestParameters?.externalUid,\n requestParameters?.recvWindow\n );\n return sendRequest<RedeemABinanceGiftCardResponse>(\n this.configuration,\n localVarAxiosArgs.endpoint,\n localVarAxiosArgs.method,\n localVarAxiosArgs.queryParams,\n localVarAxiosArgs.bodyParams,\n localVarAxiosArgs.headerParams,\n localVarAxiosArgs?.timeUnit,\n { isSigned: true }\n );\n }\n\n /**\n * This API is for verifying whether the Binance Gift Card is valid or not by entering Gift Card Number.\n *\n **Please note that if you enter the wrong Gift Card Number 5 times within an hour, you will no longer be able to verify any Gift Card Number for that hour.**\n *\n * Weight: 1\n *\n * @summary Verify Binance Gift Card by Gift Card Number(USER_DATA)\n * @param {VerifyBinanceGiftCardByGiftCardNumberRequest} requestParameters Request parameters.\n * @returns {Promise<RestApiResponse<VerifyBinanceGiftCardByGiftCardNumberResponse>>}\n * @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}\n * @memberof MarketDataApi\n * @see {@link https://developers.binance.com/docs/gift_card/market-data/Verify-Binance-Gift-Card-by-Gift-Card-Number Binance API Documentation}\n */\n public async verifyBinanceGiftCardByGiftCardNumber(\n requestParameters: VerifyBinanceGiftCardByGiftCardNumberRequest\n ): Promise<RestApiResponse<VerifyBinanceGiftCardByGiftCardNumberResponse>> {\n const localVarAxiosArgs =\n await this.localVarAxiosParamCreator.verifyBinanceGiftCardByGiftCardNumber(\n requestParameters?.referenceNo,\n requestParameters?.recvWindow\n );\n return sendRequest<VerifyBinanceGiftCardByGiftCardNumberResponse>(\n this.configuration,\n localVarAxiosArgs.endpoint,\n localVarAxiosArgs.method,\n localVarAxiosArgs.queryParams,\n localVarAxiosArgs.bodyParams,\n localVarAxiosArgs.headerParams,\n localVarAxiosArgs?.timeUnit,\n { isSigned: true }\n );\n }\n}\n","/**\n * Binance Gift Card REST API\n *\n * OpenAPI Specification for the Binance Gift Card 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 { MarketDataApi } from './modules/market-data-api';\n\nimport type {\n CreateADualTokenGiftCardRequest,\n CreateASingleTokenGiftCardRequest,\n FetchRsaPublicKeyRequest,\n FetchTokenLimitRequest,\n RedeemABinanceGiftCardRequest,\n VerifyBinanceGiftCardByGiftCardNumberRequest,\n} from './modules/market-data-api';\n\nimport type {\n CreateADualTokenGiftCardResponse,\n CreateASingleTokenGiftCardResponse,\n FetchRsaPublicKeyResponse,\n FetchTokenLimitResponse,\n RedeemABinanceGiftCardResponse,\n VerifyBinanceGiftCardByGiftCardNumberResponse,\n} from './types';\n\nexport class RestAPI {\n private configuration: ConfigurationRestAPI;\n private marketDataApi: MarketDataApi;\n\n constructor(configuration: ConfigurationRestAPI) {\n this.configuration = configuration;\n this.marketDataApi = new MarketDataApi(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 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 undefined,\n { isSigned: true }\n );\n }\n\n /**\n * * This API is for creating a dual-token ( stablecoin-denominated) Binance Gift Card. You may create a gift card using USDT as baseToken, that is redeemable to another designated token (faceToken). For example, you can create a fixed-value BTC gift card and pay with 100 USDT plus minting fee. This gift card can keep the value fixed at 100 USDT before redemption, and will be redeemable to BTC equivalent to 100 USDT upon redemption.\n * Once successfully created, the amount of baseToken (e.g. USDT) in the fixed-value gift card along with the fee would be deducted from your funding wallet.\n *\n *\n * To get started with, please make sure:\n * You have a Binance account\n * You have passed KYB\n * You have a sufficient balance(Gift Card amount and fee amount) in your Binance funding wallet\n * You need Enable Withdrawals for the API Key which requests this endpoint.\n *\n * Weight: 1\n *\n * @summary Create a dual-token gift card(fixed value, discount feature)(TRADE)\n * @param {CreateADualTokenGiftCardRequest} requestParameters Request parameters.\n *\n * @returns {Promise<RestApiResponse<CreateADualTokenGiftCardResponse>>}\n * @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}\n * @see {@link https://developers.binance.com/docs/gift_card/market-data/Create-a-dual-token-gift-card Binance API Documentation}\n */\n createADualTokenGiftCard(\n requestParameters: CreateADualTokenGiftCardRequest\n ): Promise<RestApiResponse<CreateADualTokenGiftCardResponse>> {\n return this.marketDataApi.createADualTokenGiftCard(requestParameters);\n }\n\n /**\n * This API is for creating a Binance Gift Card.\n *\n * To get started with, please make sure:\n *\n * You have a Binance account\n * You have passed KYB\n * You have a sufficient balance(Gift Card amount and fee amount) in your Binance funding wallet\n * You need `Enable Withdrawals` for the API Key which requests this endpoint.\n *\n * Weight: 1\n *\n * @summary Create a single-token gift card (USER_DATA)\n * @param {CreateASingleTokenGiftCardRequest} requestParameters Request parameters.\n *\n * @returns {Promise<RestApiResponse<CreateASingleTokenGiftCardResponse>>}\n * @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}\n * @see {@link https://developers.binance.com/docs/gift_card/market-data/Create-a-single-token-gift-card Binance API Documentation}\n */\n createASingleTokenGiftCard(\n requestParameters: CreateASingleTokenGiftCardRequest\n ): Promise<RestApiResponse<CreateASingleTokenGiftCardResponse>> {\n return this.marketDataApi.createASingleTokenGiftCard(requestParameters);\n }\n\n /**\n * This API is for fetching the RSA Public Key.\n * This RSA Public key will be used to encrypt the card code.\n *\n **Please note that the RSA Public key fetched is valid only for the current day.**\n *\n * Weight: 1\n *\n * @summary Fetch RSA Public Key(USER_DATA)\n * @param {FetchRsaPublicKeyRequest} requestParameters Request parameters.\n *\n * @returns {Promise<RestApiResponse<FetchRsaPublicKeyResponse>>}\n * @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}\n * @see {@link https://developers.binance.com/docs/gift_card/market-data/Fetch-RSA-Public-Key Binance API Documentation}\n */\n fetchRsaPublicKey(\n requestParameters: FetchRsaPublicKeyRequest = {}\n ): Promise<RestApiResponse<FetchRsaPublicKeyResponse>> {\n return this.marketDataApi.fetchRsaPublicKey(requestParameters);\n }\n\n /**\n * This API is to help you verify which tokens are available for you to create Stablecoin-Denominated gift cards as mentioned in section 2 and its’ limitation.\n *\n * Weight: 1\n *\n * @summary Fetch Token Limit(USER_DATA)\n * @param {FetchTokenLimitRequest} requestParameters Request parameters.\n *\n * @returns {Promise<RestApiResponse<FetchTokenLimitResponse>>}\n * @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}\n * @see {@link https://developers.binance.com/docs/gift_card/market-data/Fetch-Token-Limit Binance API Documentation}\n */\n fetchTokenLimit(\n requestParameters: FetchTokenLimitRequest\n ): Promise<RestApiResponse<FetchTokenLimitResponse>> {\n return this.marketDataApi.fetchTokenLimit(requestParameters);\n }\n\n /**\n * This API is for redeeming a Binance Gift Card\n * Once redeemed, the coins will be deposited in your funding wallet.\n *\n * Parameter code can be sent in two formats:\n * Plaintext\n * Encrypted\n *\n * Sending code in Encrypted format provides more security than sending it as a plaintext. To send card code in encrypted format the following steps must be followed:\n * Fetch RSA public key from api stated below.\n * Use the below algorithm to encrypt the card code using the RSA public key fetched above: `RSA/ECB/OAEPWithSHA-256AndMGF1Padding`\n **A sample code snippet (JAVA) is stated below for reference, the same approach can be used for different languages like C#, PERL, PYTHON, SHELL etc.:**\n *\n * Weight: 1\n *\n * @summary Redeem a Binance Gift Card(USER_DATA)\n * @param {RedeemABinanceGiftCardRequest} requestParameters Request parameters.\n *\n * @returns {Promise<RestApiResponse<RedeemABinanceGiftCardResponse>>}\n * @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}\n * @see {@link https://developers.binance.com/docs/gift_card/market-data/Redeem-a-Binance-Gift-Card Binance API Documentation}\n */\n redeemABinanceGiftCard(\n requestParameters: RedeemABinanceGiftCardRequest\n ): Promise<RestApiResponse<RedeemABinanceGiftCardResponse>> {\n return this.marketDataApi.redeemABinanceGiftCard(requestParameters);\n }\n\n /**\n * This API is for verifying whether the Binance Gift Card is valid or not by entering Gift Card Number.\n *\n **Please note that if you enter the wrong Gift Card Number 5 times within an hour, you will no longer be able to verify any Gift Card Number for that hour.**\n *\n * Weight: 1\n *\n * @summary Verify Binance Gift Card by Gift Card Number(USER_DATA)\n * @param {VerifyBinanceGiftCardByGiftCardNumberRequest} requestParameters Request parameters.\n *\n * @returns {Promise<RestApiResponse<VerifyBinanceGiftCardByGiftCardNumberResponse>>}\n * @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}\n * @see {@link https://developers.binance.com/docs/gift_card/market-data/Verify-Binance-Gift-Card-by-Gift-Card-Number Binance API Documentation}\n */\n verifyBinanceGiftCardByGiftCardNumber(\n requestParameters: VerifyBinanceGiftCardByGiftCardNumberRequest\n ): Promise<RestApiResponse<VerifyBinanceGiftCardByGiftCardNumberResponse>> {\n return this.marketDataApi.verifyBinanceGiftCardByGiftCardNumber(requestParameters);\n }\n}\n","/**\n * Binance Gift Card REST API\n *\n * OpenAPI Specification for the Binance Gift Card 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, GIFT_CARD_REST_API_PROD_URL } from '@binance/common';\nimport { name, version } from '../package.json';\nimport { RestAPI } from './rest-api';\n\nexport interface ConfigurationGiftCard {\n configurationRestAPI?: ConfigurationRestAPI;\n}\n\nexport class GiftCard {\n public restAPI!: RestAPI;\n\n constructor(config: ConfigurationGiftCard) {\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 || GIFT_CARD_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;;;;;;;;;;;;;;;;;;;AC8Bf,MAAM,iCAAiC,SAAU,eAAqC;AAClF,QAAO;EAsBH,0BAA0B,OACtB,WACA,WACA,iBACA,eACuB;AAEvB,2CAAkB,4BAA4B,aAAa,UAAU;AAErE,2CAAkB,4BAA4B,aAAa,UAAU;AAErE,2CAAkB,4BAA4B,mBAAmB,gBAAgB;GAEjF,MAAMA,yBAAkD,EAAE;GAC1D,MAAMC,wBAAiD,EAAE;GACzD,MAAMC,0BAAmD,EAAE;AAE3D,OAAI,cAAc,UAAa,cAAc,KACzC,wBAAuB,eAAe;AAE1C,OAAI,cAAc,UAAa,cAAc,KACzC,wBAAuB,eAAe;AAE1C,OAAI,oBAAoB,UAAa,oBAAoB,KACrD,wBAAuB,qBAAqB;AAEhD,OAAI,eAAe,UAAa,eAAe,KAC3C,wBAAuB,gBAAgB;GAG3C,IAAIC;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E/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/giftcard";
6
- var version = "4.1.14";
6
+ var version = "4.1.16";
7
7
 
8
8
  //#endregion
9
9
  //#region src/rest-api/modules/market-data-api.ts
@@ -30,6 +30,7 @@ const MarketDataApiAxiosParamCreator = function(configuration) {
30
30
  assertParamExists("createADualTokenGiftCard", "baseTokenAmount", baseTokenAmount);
31
31
  const localVarQueryParameter = {};
32
32
  const localVarBodyParameter = {};
33
+ const localVarHeaderParameter = {};
33
34
  if (baseToken !== void 0 && baseToken !== null) localVarQueryParameter["baseToken"] = baseToken;
34
35
  if (faceToken !== void 0 && faceToken !== null) localVarQueryParameter["faceToken"] = faceToken;
35
36
  if (baseTokenAmount !== void 0 && baseTokenAmount !== null) localVarQueryParameter["baseTokenAmount"] = baseTokenAmount;
@@ -41,6 +42,7 @@ const MarketDataApiAxiosParamCreator = function(configuration) {
41
42
  method: "POST",
42
43
  queryParams: localVarQueryParameter,
43
44
  bodyParams: localVarBodyParameter,
45
+ headerParams: localVarHeaderParameter,
44
46
  timeUnit: _timeUnit
45
47
  };
46
48
  },
@@ -49,6 +51,7 @@ const MarketDataApiAxiosParamCreator = function(configuration) {
49
51
  assertParamExists("createASingleTokenGiftCard", "amount", amount);
50
52
  const localVarQueryParameter = {};
51
53
  const localVarBodyParameter = {};
54
+ const localVarHeaderParameter = {};
52
55
  if (token !== void 0 && token !== null) localVarQueryParameter["token"] = token;
53
56
  if (amount !== void 0 && amount !== null) localVarQueryParameter["amount"] = amount;
54
57
  if (recvWindow !== void 0 && recvWindow !== null) localVarQueryParameter["recvWindow"] = recvWindow;
@@ -59,12 +62,14 @@ const MarketDataApiAxiosParamCreator = function(configuration) {
59
62
  method: "POST",
60
63
  queryParams: localVarQueryParameter,
61
64
  bodyParams: localVarBodyParameter,
65
+ headerParams: localVarHeaderParameter,
62
66
  timeUnit: _timeUnit
63
67
  };
64
68
  },
65
69
  fetchRsaPublicKey: async (recvWindow) => {
66
70
  const localVarQueryParameter = {};
67
71
  const localVarBodyParameter = {};
72
+ const localVarHeaderParameter = {};
68
73
  if (recvWindow !== void 0 && recvWindow !== null) localVarQueryParameter["recvWindow"] = recvWindow;
69
74
  let _timeUnit;
70
75
  if ("timeUnit" in configuration) _timeUnit = configuration.timeUnit;
@@ -73,6 +78,7 @@ const MarketDataApiAxiosParamCreator = function(configuration) {
73
78
  method: "GET",
74
79
  queryParams: localVarQueryParameter,
75
80
  bodyParams: localVarBodyParameter,
81
+ headerParams: localVarHeaderParameter,
76
82
  timeUnit: _timeUnit
77
83
  };
78
84
  },
@@ -80,6 +86,7 @@ const MarketDataApiAxiosParamCreator = function(configuration) {
80
86
  assertParamExists("fetchTokenLimit", "baseToken", baseToken);
81
87
  const localVarQueryParameter = {};
82
88
  const localVarBodyParameter = {};
89
+ const localVarHeaderParameter = {};
83
90
  if (baseToken !== void 0 && baseToken !== null) localVarQueryParameter["baseToken"] = baseToken;
84
91
  if (recvWindow !== void 0 && recvWindow !== null) localVarQueryParameter["recvWindow"] = recvWindow;
85
92
  let _timeUnit;
@@ -89,6 +96,7 @@ const MarketDataApiAxiosParamCreator = function(configuration) {
89
96
  method: "GET",
90
97
  queryParams: localVarQueryParameter,
91
98
  bodyParams: localVarBodyParameter,
99
+ headerParams: localVarHeaderParameter,
92
100
  timeUnit: _timeUnit
93
101
  };
94
102
  },
@@ -96,6 +104,7 @@ const MarketDataApiAxiosParamCreator = function(configuration) {
96
104
  assertParamExists("redeemABinanceGiftCard", "code", code);
97
105
  const localVarQueryParameter = {};
98
106
  const localVarBodyParameter = {};
107
+ const localVarHeaderParameter = {};
99
108
  if (code !== void 0 && code !== null) localVarQueryParameter["code"] = code;
100
109
  if (externalUid !== void 0 && externalUid !== null) localVarQueryParameter["externalUid"] = externalUid;
101
110
  if (recvWindow !== void 0 && recvWindow !== null) localVarQueryParameter["recvWindow"] = recvWindow;
@@ -106,6 +115,7 @@ const MarketDataApiAxiosParamCreator = function(configuration) {
106
115
  method: "POST",
107
116
  queryParams: localVarQueryParameter,
108
117
  bodyParams: localVarBodyParameter,
118
+ headerParams: localVarHeaderParameter,
109
119
  timeUnit: _timeUnit
110
120
  };
111
121
  },
@@ -113,6 +123,7 @@ const MarketDataApiAxiosParamCreator = function(configuration) {
113
123
  assertParamExists("verifyBinanceGiftCardByGiftCardNumber", "referenceNo", referenceNo);
114
124
  const localVarQueryParameter = {};
115
125
  const localVarBodyParameter = {};
126
+ const localVarHeaderParameter = {};
116
127
  if (referenceNo !== void 0 && referenceNo !== null) localVarQueryParameter["referenceNo"] = referenceNo;
117
128
  if (recvWindow !== void 0 && recvWindow !== null) localVarQueryParameter["recvWindow"] = recvWindow;
118
129
  let _timeUnit;
@@ -122,6 +133,7 @@ const MarketDataApiAxiosParamCreator = function(configuration) {
122
133
  method: "GET",
123
134
  queryParams: localVarQueryParameter,
124
135
  bodyParams: localVarBodyParameter,
136
+ headerParams: localVarHeaderParameter,
125
137
  timeUnit: _timeUnit
126
138
  };
127
139
  }
@@ -158,7 +170,7 @@ var MarketDataApi = class {
158
170
  */
159
171
  async createADualTokenGiftCard(requestParameters) {
160
172
  const localVarAxiosArgs = await this.localVarAxiosParamCreator.createADualTokenGiftCard(requestParameters?.baseToken, requestParameters?.faceToken, requestParameters?.baseTokenAmount, requestParameters?.recvWindow);
161
- return sendRequest(this.configuration, localVarAxiosArgs.endpoint, localVarAxiosArgs.method, localVarAxiosArgs.queryParams, localVarAxiosArgs.bodyParams, localVarAxiosArgs?.timeUnit, { isSigned: true });
173
+ return sendRequest(this.configuration, localVarAxiosArgs.endpoint, localVarAxiosArgs.method, localVarAxiosArgs.queryParams, localVarAxiosArgs.bodyParams, localVarAxiosArgs.headerParams, localVarAxiosArgs?.timeUnit, { isSigned: true });
162
174
  }
163
175
  /**
164
176
  * This API is for creating a Binance Gift Card.
@@ -181,7 +193,7 @@ var MarketDataApi = class {
181
193
  */
182
194
  async createASingleTokenGiftCard(requestParameters) {
183
195
  const localVarAxiosArgs = await this.localVarAxiosParamCreator.createASingleTokenGiftCard(requestParameters?.token, requestParameters?.amount, requestParameters?.recvWindow);
184
- return sendRequest(this.configuration, localVarAxiosArgs.endpoint, localVarAxiosArgs.method, localVarAxiosArgs.queryParams, localVarAxiosArgs.bodyParams, localVarAxiosArgs?.timeUnit, { isSigned: true });
196
+ return sendRequest(this.configuration, localVarAxiosArgs.endpoint, localVarAxiosArgs.method, localVarAxiosArgs.queryParams, localVarAxiosArgs.bodyParams, localVarAxiosArgs.headerParams, localVarAxiosArgs?.timeUnit, { isSigned: true });
185
197
  }
186
198
  /**
187
199
  * This API is for fetching the RSA Public Key.
@@ -200,7 +212,7 @@ var MarketDataApi = class {
200
212
  */
201
213
  async fetchRsaPublicKey(requestParameters = {}) {
202
214
  const localVarAxiosArgs = await this.localVarAxiosParamCreator.fetchRsaPublicKey(requestParameters?.recvWindow);
203
- return sendRequest(this.configuration, localVarAxiosArgs.endpoint, localVarAxiosArgs.method, localVarAxiosArgs.queryParams, localVarAxiosArgs.bodyParams, localVarAxiosArgs?.timeUnit, { isSigned: true });
215
+ return sendRequest(this.configuration, localVarAxiosArgs.endpoint, localVarAxiosArgs.method, localVarAxiosArgs.queryParams, localVarAxiosArgs.bodyParams, localVarAxiosArgs.headerParams, localVarAxiosArgs?.timeUnit, { isSigned: true });
204
216
  }
205
217
  /**
206
218
  * This API is to help you verify which tokens are available for you to create Stablecoin-Denominated gift cards as mentioned in section 2 and its’ limitation.
@@ -216,7 +228,7 @@ var MarketDataApi = class {
216
228
  */
217
229
  async fetchTokenLimit(requestParameters) {
218
230
  const localVarAxiosArgs = await this.localVarAxiosParamCreator.fetchTokenLimit(requestParameters?.baseToken, requestParameters?.recvWindow);
219
- return sendRequest(this.configuration, localVarAxiosArgs.endpoint, localVarAxiosArgs.method, localVarAxiosArgs.queryParams, localVarAxiosArgs.bodyParams, localVarAxiosArgs?.timeUnit, { isSigned: true });
231
+ return sendRequest(this.configuration, localVarAxiosArgs.endpoint, localVarAxiosArgs.method, localVarAxiosArgs.queryParams, localVarAxiosArgs.bodyParams, localVarAxiosArgs.headerParams, localVarAxiosArgs?.timeUnit, { isSigned: true });
220
232
  }
221
233
  /**
222
234
  * This API is for redeeming a Binance Gift Card
@@ -242,7 +254,7 @@ var MarketDataApi = class {
242
254
  */
243
255
  async redeemABinanceGiftCard(requestParameters) {
244
256
  const localVarAxiosArgs = await this.localVarAxiosParamCreator.redeemABinanceGiftCard(requestParameters?.code, requestParameters?.externalUid, requestParameters?.recvWindow);
245
- return sendRequest(this.configuration, localVarAxiosArgs.endpoint, localVarAxiosArgs.method, localVarAxiosArgs.queryParams, localVarAxiosArgs.bodyParams, localVarAxiosArgs?.timeUnit, { isSigned: true });
257
+ return sendRequest(this.configuration, localVarAxiosArgs.endpoint, localVarAxiosArgs.method, localVarAxiosArgs.queryParams, localVarAxiosArgs.bodyParams, localVarAxiosArgs.headerParams, localVarAxiosArgs?.timeUnit, { isSigned: true });
246
258
  }
247
259
  /**
248
260
  * This API is for verifying whether the Binance Gift Card is valid or not by entering Gift Card Number.
@@ -260,7 +272,7 @@ var MarketDataApi = class {
260
272
  */
261
273
  async verifyBinanceGiftCardByGiftCardNumber(requestParameters) {
262
274
  const localVarAxiosArgs = await this.localVarAxiosParamCreator.verifyBinanceGiftCardByGiftCardNumber(requestParameters?.referenceNo, requestParameters?.recvWindow);
263
- return sendRequest(this.configuration, localVarAxiosArgs.endpoint, localVarAxiosArgs.method, localVarAxiosArgs.queryParams, localVarAxiosArgs.bodyParams, localVarAxiosArgs?.timeUnit, { isSigned: true });
275
+ return sendRequest(this.configuration, localVarAxiosArgs.endpoint, localVarAxiosArgs.method, localVarAxiosArgs.queryParams, localVarAxiosArgs.bodyParams, localVarAxiosArgs.headerParams, localVarAxiosArgs?.timeUnit, { isSigned: true });
264
276
  }
265
277
  };
266
278
 
@@ -293,7 +305,7 @@ var RestAPI = class {
293
305
  * @returns A promise resolving to the response data object.
294
306
  */
295
307
  sendRequest(endpoint, method, queryParams = {}, bodyParams = {}) {
296
- return sendRequest(this.configuration, endpoint, method, queryParams, bodyParams, void 0);
308
+ return sendRequest(this.configuration, endpoint, method, queryParams, bodyParams, void 0, void 0);
297
309
  }
298
310
  /**
299
311
  * Generic function to send a signed request.
@@ -305,7 +317,7 @@ var RestAPI = class {
305
317
  * @returns A promise resolving to the response data object.
306
318
  */
307
319
  sendSignedRequest(endpoint, method, queryParams = {}, bodyParams = {}) {
308
- return sendRequest(this.configuration, endpoint, method, queryParams, bodyParams, void 0, { isSigned: true });
320
+ return sendRequest(this.configuration, endpoint, method, queryParams, bodyParams, void 0, void 0, { isSigned: true });
309
321
  }
310
322
  /**
311
323
  * * This API is for creating a dual-token ( stablecoin-denominated) Binance Gift Card. You may create a gift card using USDT as baseToken, that is redeemable to another designated token (faceToken). For example, you can create a fixed-value BTC gift card and pay with 100 USDT plus minting fee. This gift card can keep the value fixed at 100 USDT before redemption, and will be redeemable to BTC equivalent to 100 USDT upon redemption.
@@ -1 +1 @@
1
- {"version":3,"file":"index.mjs","names":["localVarQueryParameter: Record<string, unknown>","localVarBodyParameter: Record<string, unknown>","_timeUnit: TimeUnit | undefined","GIFT_CARD_REST_API_PROD_URL"],"sources":["../package.json","../src/rest-api/modules/market-data-api.ts","../src/rest-api/rest-api.ts","../src/rest-api/index.ts","../src/gift-card.ts"],"sourcesContent":["{\n \"name\": \"@binance/giftcard\",\n \"description\": \"Official Binance Gift Card Connector - A lightweight library that provides a convenient interface to Binance's Gift Card REST API.\",\n \"version\": \"4.1.14\",\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 \"Gift Card\",\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 Gift Card REST API\n *\n * OpenAPI Specification for the Binance Gift Card 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 assertParamExists,\n sendRequest,\n type RequestArgs,\n} from '@binance/common';\nimport type {\n CreateADualTokenGiftCardResponse,\n CreateASingleTokenGiftCardResponse,\n FetchRsaPublicKeyResponse,\n FetchTokenLimitResponse,\n RedeemABinanceGiftCardResponse,\n VerifyBinanceGiftCardByGiftCardNumberResponse,\n} from '../types';\n\n/**\n * MarketDataApi - axios parameter creator\n */\nconst MarketDataApiAxiosParamCreator = function (configuration: ConfigurationRestAPI) {\n return {\n /**\n * * This API is for creating a dual-token ( stablecoin-denominated) Binance Gift Card. You may create a gift card using USDT as baseToken, that is redeemable to another designated token (faceToken). For example, you can create a fixed-value BTC gift card and pay with 100 USDT plus minting fee. This gift card can keep the value fixed at 100 USDT before redemption, and will be redeemable to BTC equivalent to 100 USDT upon redemption.\n * Once successfully created, the amount of baseToken (e.g. USDT) in the fixed-value gift card along with the fee would be deducted from your funding wallet.\n *\n *\n * To get started with, please make sure:\n * You have a Binance account\n * You have passed KYB\n * You have a sufficient balance(Gift Card amount and fee amount) in your Binance funding wallet\n * You need Enable Withdrawals for the API Key which requests this endpoint.\n *\n * Weight: 1\n *\n * @summary Create a dual-token gift card(fixed value, discount feature)(TRADE)\n * @param {string} baseToken The token you want to pay, example: BUSD\n * @param {string} faceToken The token you want to buy, example: BNB. If faceToken = baseToken, it's the same as createCode endpoint.\n * @param {number} baseTokenAmount The base token asset quantity, example : 1.002\n * @param {number | bigint} [recvWindow]\n *\n * @throws {RequiredError}\n */\n createADualTokenGiftCard: async (\n baseToken: string,\n faceToken: string,\n baseTokenAmount: number,\n recvWindow?: number | bigint\n ): Promise<RequestArgs> => {\n // verify required parameter 'baseToken' is not null or undefined\n assertParamExists('createADualTokenGiftCard', 'baseToken', baseToken);\n // verify required parameter 'faceToken' is not null or undefined\n assertParamExists('createADualTokenGiftCard', 'faceToken', faceToken);\n // verify required parameter 'baseTokenAmount' is not null or undefined\n assertParamExists('createADualTokenGiftCard', 'baseTokenAmount', baseTokenAmount);\n\n const localVarQueryParameter: Record<string, unknown> = {};\n const localVarBodyParameter: Record<string, unknown> = {};\n\n if (baseToken !== undefined && baseToken !== null) {\n localVarQueryParameter['baseToken'] = baseToken;\n }\n if (faceToken !== undefined && faceToken !== null) {\n localVarQueryParameter['faceToken'] = faceToken;\n }\n if (baseTokenAmount !== undefined && baseTokenAmount !== null) {\n localVarQueryParameter['baseTokenAmount'] = baseTokenAmount;\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/giftcard/buyCode',\n method: 'POST',\n queryParams: localVarQueryParameter,\n bodyParams: localVarBodyParameter,\n timeUnit: _timeUnit,\n };\n },\n /**\n * This API is for creating a Binance Gift Card.\n *\n * To get started with, please make sure:\n *\n * You have a Binance account\n * You have passed KYB\n * You have a sufficient balance(Gift Card amount and fee amount) in your Binance funding wallet\n * You need `Enable Withdrawals` for the API Key which requests this endpoint.\n *\n * Weight: 1\n *\n * @summary Create a single-token gift card (USER_DATA)\n * @param {string} token The token type contained in the Binance Gift Card\n * @param {number} amount The amount of the token contained in the Binance Gift Card\n * @param {number | bigint} [recvWindow]\n *\n * @throws {RequiredError}\n */\n createASingleTokenGiftCard: async (\n token: string,\n amount: number,\n recvWindow?: number | bigint\n ): Promise<RequestArgs> => {\n // verify required parameter 'token' is not null or undefined\n assertParamExists('createASingleTokenGiftCard', 'token', token);\n // verify required parameter 'amount' is not null or undefined\n assertParamExists('createASingleTokenGiftCard', 'amount', amount);\n\n const localVarQueryParameter: Record<string, unknown> = {};\n const localVarBodyParameter: Record<string, unknown> = {};\n\n if (token !== undefined && token !== null) {\n localVarQueryParameter['token'] = token;\n }\n if (amount !== undefined && amount !== null) {\n localVarQueryParameter['amount'] = amount;\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/giftcard/createCode',\n method: 'POST',\n queryParams: localVarQueryParameter,\n bodyParams: localVarBodyParameter,\n timeUnit: _timeUnit,\n };\n },\n /**\n * This API is for fetching the RSA Public Key.\n * This RSA Public key will be used to encrypt the card code.\n *\n **Please note that the RSA Public key fetched is valid only for the current day.**\n *\n * Weight: 1\n *\n * @summary Fetch RSA Public Key(USER_DATA)\n * @param {number | bigint} [recvWindow]\n *\n * @throws {RequiredError}\n */\n fetchRsaPublicKey: async (recvWindow?: number | bigint): Promise<RequestArgs> => {\n const localVarQueryParameter: Record<string, unknown> = {};\n const localVarBodyParameter: Record<string, unknown> = {};\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/giftcard/cryptography/rsa-public-key',\n method: 'GET',\n queryParams: localVarQueryParameter,\n bodyParams: localVarBodyParameter,\n timeUnit: _timeUnit,\n };\n },\n /**\n * This API is to help you verify which tokens are available for you to create Stablecoin-Denominated gift cards as mentioned in section 2 and its’ limitation.\n *\n * Weight: 1\n *\n * @summary Fetch Token Limit(USER_DATA)\n * @param {string} baseToken The token you want to pay, example: BUSD\n * @param {number | bigint} [recvWindow]\n *\n * @throws {RequiredError}\n */\n fetchTokenLimit: async (\n baseToken: string,\n recvWindow?: number | bigint\n ): Promise<RequestArgs> => {\n // verify required parameter 'baseToken' is not null or undefined\n assertParamExists('fetchTokenLimit', 'baseToken', baseToken);\n\n const localVarQueryParameter: Record<string, unknown> = {};\n const localVarBodyParameter: Record<string, unknown> = {};\n\n if (baseToken !== undefined && baseToken !== null) {\n localVarQueryParameter['baseToken'] = baseToken;\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/giftcard/buyCode/token-limit',\n method: 'GET',\n queryParams: localVarQueryParameter,\n bodyParams: localVarBodyParameter,\n timeUnit: _timeUnit,\n };\n },\n /**\n * This API is for redeeming a Binance Gift Card\n * Once redeemed, the coins will be deposited in your funding wallet.\n *\n * Parameter code can be sent in two formats:\n * Plaintext\n * Encrypted\n *\n * Sending code in Encrypted format provides more security than sending it as a plaintext. To send card code in encrypted format the following steps must be followed:\n * Fetch RSA public key from api stated below.\n * Use the below algorithm to encrypt the card code using the RSA public key fetched above: `RSA/ECB/OAEPWithSHA-256AndMGF1Padding`\n **A sample code snippet (JAVA) is stated below for reference, the same approach can be used for different languages like C#, PERL, PYTHON, SHELL etc.:**\n *\n * Weight: 1\n *\n * @summary Redeem a Binance Gift Card(USER_DATA)\n * @param {string} code Redemption code of Binance Gift Card to be redeemed, supports both Plaintext & Encrypted code.\n * @param {string} [externalUid] Each external unique ID represents a unique user on the partner platform. The function helps you to identify the redemption behavior of different users, such as redemption frequency and amount. It also helps risk and limit control of a single account, such as daily limit on redemption volume, frequency, and incorrect number of entries. This will also prevent a single user account reach the partner's daily redemption limits. We strongly recommend you to use this feature and transfer us the User ID of your users if you have different users redeeming Binance Gift Cards on your platform. To protect user data privacy, you may choose to transfer the user id in any desired format (max. 400 characters).\n * @param {number | bigint} [recvWindow]\n *\n * @throws {RequiredError}\n */\n redeemABinanceGiftCard: async (\n code: string,\n externalUid?: string,\n recvWindow?: number | bigint\n ): Promise<RequestArgs> => {\n // verify required parameter 'code' is not null or undefined\n assertParamExists('redeemABinanceGiftCard', 'code', code);\n\n const localVarQueryParameter: Record<string, unknown> = {};\n const localVarBodyParameter: Record<string, unknown> = {};\n\n if (code !== undefined && code !== null) {\n localVarQueryParameter['code'] = code;\n }\n if (externalUid !== undefined && externalUid !== null) {\n localVarQueryParameter['externalUid'] = externalUid;\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/giftcard/redeemCode',\n method: 'POST',\n queryParams: localVarQueryParameter,\n bodyParams: localVarBodyParameter,\n timeUnit: _timeUnit,\n };\n },\n /**\n * This API is for verifying whether the Binance Gift Card is valid or not by entering Gift Card Number.\n *\n **Please note that if you enter the wrong Gift Card Number 5 times within an hour, you will no longer be able to verify any Gift Card Number for that hour.**\n *\n * Weight: 1\n *\n * @summary Verify Binance Gift Card by Gift Card Number(USER_DATA)\n * @param {string} referenceNo Enter the Gift Card Number\n * @param {number | bigint} [recvWindow]\n *\n * @throws {RequiredError}\n */\n verifyBinanceGiftCardByGiftCardNumber: async (\n referenceNo: string,\n recvWindow?: number | bigint\n ): Promise<RequestArgs> => {\n // verify required parameter 'referenceNo' is not null or undefined\n assertParamExists('verifyBinanceGiftCardByGiftCardNumber', 'referenceNo', referenceNo);\n\n const localVarQueryParameter: Record<string, unknown> = {};\n const localVarBodyParameter: Record<string, unknown> = {};\n\n if (referenceNo !== undefined && referenceNo !== null) {\n localVarQueryParameter['referenceNo'] = referenceNo;\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/giftcard/verify',\n method: 'GET',\n queryParams: localVarQueryParameter,\n bodyParams: localVarBodyParameter,\n timeUnit: _timeUnit,\n };\n },\n };\n};\n\n/**\n * MarketDataApi - interface\n * @interface MarketDataApi\n */\nexport interface MarketDataApiInterface {\n /**\n * * This API is for creating a dual-token ( stablecoin-denominated) Binance Gift Card. You may create a gift card using USDT as baseToken, that is redeemable to another designated token (faceToken). For example, you can create a fixed-value BTC gift card and pay with 100 USDT plus minting fee. This gift card can keep the value fixed at 100 USDT before redemption, and will be redeemable to BTC equivalent to 100 USDT upon redemption.\n * Once successfully created, the amount of baseToken (e.g. USDT) in the fixed-value gift card along with the fee would be deducted from your funding wallet.\n *\n *\n * To get started with, please make sure:\n * You have a Binance account\n * You have passed KYB\n * You have a sufficient balance(Gift Card amount and fee amount) in your Binance funding wallet\n * You need Enable Withdrawals for the API Key which requests this endpoint.\n *\n * Weight: 1\n *\n * @summary Create a dual-token gift card(fixed value, discount feature)(TRADE)\n * @param {CreateADualTokenGiftCardRequest} requestParameters Request parameters.\n *\n * @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}\n * @memberof MarketDataApiInterface\n */\n createADualTokenGiftCard(\n requestParameters: CreateADualTokenGiftCardRequest\n ): Promise<RestApiResponse<CreateADualTokenGiftCardResponse>>;\n /**\n * This API is for creating a Binance Gift Card.\n *\n * To get started with, please make sure:\n *\n * You have a Binance account\n * You have passed KYB\n * You have a sufficient balance(Gift Card amount and fee amount) in your Binance funding wallet\n * You need `Enable Withdrawals` for the API Key which requests this endpoint.\n *\n * Weight: 1\n *\n * @summary Create a single-token gift card (USER_DATA)\n * @param {CreateASingleTokenGiftCardRequest} requestParameters Request parameters.\n *\n * @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}\n * @memberof MarketDataApiInterface\n */\n createASingleTokenGiftCard(\n requestParameters: CreateASingleTokenGiftCardRequest\n ): Promise<RestApiResponse<CreateASingleTokenGiftCardResponse>>;\n /**\n * This API is for fetching the RSA Public Key.\n * This RSA Public key will be used to encrypt the card code.\n *\n **Please note that the RSA Public key fetched is valid only for the current day.**\n *\n * Weight: 1\n *\n * @summary Fetch RSA Public Key(USER_DATA)\n * @param {FetchRsaPublicKeyRequest} requestParameters Request parameters.\n *\n * @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}\n * @memberof MarketDataApiInterface\n */\n fetchRsaPublicKey(\n requestParameters?: FetchRsaPublicKeyRequest\n ): Promise<RestApiResponse<FetchRsaPublicKeyResponse>>;\n /**\n * This API is to help you verify which tokens are available for you to create Stablecoin-Denominated gift cards as mentioned in section 2 and its’ limitation.\n *\n * Weight: 1\n *\n * @summary Fetch Token Limit(USER_DATA)\n * @param {FetchTokenLimitRequest} requestParameters Request parameters.\n *\n * @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}\n * @memberof MarketDataApiInterface\n */\n fetchTokenLimit(\n requestParameters: FetchTokenLimitRequest\n ): Promise<RestApiResponse<FetchTokenLimitResponse>>;\n /**\n * This API is for redeeming a Binance Gift Card\n * Once redeemed, the coins will be deposited in your funding wallet.\n *\n * Parameter code can be sent in two formats:\n * Plaintext\n * Encrypted\n *\n * Sending code in Encrypted format provides more security than sending it as a plaintext. To send card code in encrypted format the following steps must be followed:\n * Fetch RSA public key from api stated below.\n * Use the below algorithm to encrypt the card code using the RSA public key fetched above: `RSA/ECB/OAEPWithSHA-256AndMGF1Padding`\n **A sample code snippet (JAVA) is stated below for reference, the same approach can be used for different languages like C#, PERL, PYTHON, SHELL etc.:**\n *\n * Weight: 1\n *\n * @summary Redeem a Binance Gift Card(USER_DATA)\n * @param {RedeemABinanceGiftCardRequest} requestParameters Request parameters.\n *\n * @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}\n * @memberof MarketDataApiInterface\n */\n redeemABinanceGiftCard(\n requestParameters: RedeemABinanceGiftCardRequest\n ): Promise<RestApiResponse<RedeemABinanceGiftCardResponse>>;\n /**\n * This API is for verifying whether the Binance Gift Card is valid or not by entering Gift Card Number.\n *\n **Please note that if you enter the wrong Gift Card Number 5 times within an hour, you will no longer be able to verify any Gift Card Number for that hour.**\n *\n * Weight: 1\n *\n * @summary Verify Binance Gift Card by Gift Card Number(USER_DATA)\n * @param {VerifyBinanceGiftCardByGiftCardNumberRequest} requestParameters Request parameters.\n *\n * @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}\n * @memberof MarketDataApiInterface\n */\n verifyBinanceGiftCardByGiftCardNumber(\n requestParameters: VerifyBinanceGiftCardByGiftCardNumberRequest\n ): Promise<RestApiResponse<VerifyBinanceGiftCardByGiftCardNumberResponse>>;\n}\n\n/**\n * Request parameters for createADualTokenGiftCard operation in MarketDataApi.\n * @interface CreateADualTokenGiftCardRequest\n */\nexport interface CreateADualTokenGiftCardRequest {\n /**\n * The token you want to pay, example: BUSD\n * @type {string}\n * @memberof MarketDataApiCreateADualTokenGiftCard\n */\n readonly baseToken: string;\n\n /**\n * The token you want to buy, example: BNB. If faceToken = baseToken, it's the same as createCode endpoint.\n * @type {string}\n * @memberof MarketDataApiCreateADualTokenGiftCard\n */\n readonly faceToken: string;\n\n /**\n * The base token asset quantity, example : 1.002\n * @type {number}\n * @memberof MarketDataApiCreateADualTokenGiftCard\n */\n readonly baseTokenAmount: number;\n\n /**\n *\n * @type {number | bigint}\n * @memberof MarketDataApiCreateADualTokenGiftCard\n */\n readonly recvWindow?: number | bigint;\n}\n\n/**\n * Request parameters for createASingleTokenGiftCard operation in MarketDataApi.\n * @interface CreateASingleTokenGiftCardRequest\n */\nexport interface CreateASingleTokenGiftCardRequest {\n /**\n * The token type contained in the Binance Gift Card\n * @type {string}\n * @memberof MarketDataApiCreateASingleTokenGiftCard\n */\n readonly token: string;\n\n /**\n * The amount of the token contained in the Binance Gift Card\n * @type {number}\n * @memberof MarketDataApiCreateASingleTokenGiftCard\n */\n readonly amount: number;\n\n /**\n *\n * @type {number | bigint}\n * @memberof MarketDataApiCreateASingleTokenGiftCard\n */\n readonly recvWindow?: number | bigint;\n}\n\n/**\n * Request parameters for fetchRsaPublicKey operation in MarketDataApi.\n * @interface FetchRsaPublicKeyRequest\n */\nexport interface FetchRsaPublicKeyRequest {\n /**\n *\n * @type {number | bigint}\n * @memberof MarketDataApiFetchRsaPublicKey\n */\n readonly recvWindow?: number | bigint;\n}\n\n/**\n * Request parameters for fetchTokenLimit operation in MarketDataApi.\n * @interface FetchTokenLimitRequest\n */\nexport interface FetchTokenLimitRequest {\n /**\n * The token you want to pay, example: BUSD\n * @type {string}\n * @memberof MarketDataApiFetchTokenLimit\n */\n readonly baseToken: string;\n\n /**\n *\n * @type {number | bigint}\n * @memberof MarketDataApiFetchTokenLimit\n */\n readonly recvWindow?: number | bigint;\n}\n\n/**\n * Request parameters for redeemABinanceGiftCard operation in MarketDataApi.\n * @interface RedeemABinanceGiftCardRequest\n */\nexport interface RedeemABinanceGiftCardRequest {\n /**\n * Redemption code of Binance Gift Card to be redeemed, supports both Plaintext & Encrypted code.\n * @type {string}\n * @memberof MarketDataApiRedeemABinanceGiftCard\n */\n readonly code: string;\n\n /**\n * Each external unique ID represents a unique user on the partner platform. The function helps you to identify the redemption behavior of different users, such as redemption frequency and amount. It also helps risk and limit control of a single account, such as daily limit on redemption volume, frequency, and incorrect number of entries. This will also prevent a single user account reach the partner's daily redemption limits. We strongly recommend you to use this feature and transfer us the User ID of your users if you have different users redeeming Binance Gift Cards on your platform. To protect user data privacy, you may choose to transfer the user id in any desired format (max. 400 characters).\n * @type {string}\n * @memberof MarketDataApiRedeemABinanceGiftCard\n */\n readonly externalUid?: string;\n\n /**\n *\n * @type {number | bigint}\n * @memberof MarketDataApiRedeemABinanceGiftCard\n */\n readonly recvWindow?: number | bigint;\n}\n\n/**\n * Request parameters for verifyBinanceGiftCardByGiftCardNumber operation in MarketDataApi.\n * @interface VerifyBinanceGiftCardByGiftCardNumberRequest\n */\nexport interface VerifyBinanceGiftCardByGiftCardNumberRequest {\n /**\n * Enter the Gift Card Number\n * @type {string}\n * @memberof MarketDataApiVerifyBinanceGiftCardByGiftCardNumber\n */\n readonly referenceNo: string;\n\n /**\n *\n * @type {number | bigint}\n * @memberof MarketDataApiVerifyBinanceGiftCardByGiftCardNumber\n */\n readonly recvWindow?: number | bigint;\n}\n\n/**\n * MarketDataApi - object-oriented interface\n * @class MarketDataApi\n */\nexport class MarketDataApi implements MarketDataApiInterface {\n private readonly configuration: ConfigurationRestAPI;\n private localVarAxiosParamCreator;\n\n constructor(configuration: ConfigurationRestAPI) {\n this.configuration = configuration;\n this.localVarAxiosParamCreator = MarketDataApiAxiosParamCreator(configuration);\n }\n\n /**\n * * This API is for creating a dual-token ( stablecoin-denominated) Binance Gift Card. You may create a gift card using USDT as baseToken, that is redeemable to another designated token (faceToken). For example, you can create a fixed-value BTC gift card and pay with 100 USDT plus minting fee. This gift card can keep the value fixed at 100 USDT before redemption, and will be redeemable to BTC equivalent to 100 USDT upon redemption.\n * Once successfully created, the amount of baseToken (e.g. USDT) in the fixed-value gift card along with the fee would be deducted from your funding wallet.\n *\n *\n * To get started with, please make sure:\n * You have a Binance account\n * You have passed KYB\n * You have a sufficient balance(Gift Card amount and fee amount) in your Binance funding wallet\n * You need Enable Withdrawals for the API Key which requests this endpoint.\n *\n * Weight: 1\n *\n * @summary Create a dual-token gift card(fixed value, discount feature)(TRADE)\n * @param {CreateADualTokenGiftCardRequest} requestParameters Request parameters.\n * @returns {Promise<RestApiResponse<CreateADualTokenGiftCardResponse>>}\n * @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}\n * @memberof MarketDataApi\n * @see {@link https://developers.binance.com/docs/gift_card/market-data/Create-a-dual-token-gift-card Binance API Documentation}\n */\n public async createADualTokenGiftCard(\n requestParameters: CreateADualTokenGiftCardRequest\n ): Promise<RestApiResponse<CreateADualTokenGiftCardResponse>> {\n const localVarAxiosArgs = await this.localVarAxiosParamCreator.createADualTokenGiftCard(\n requestParameters?.baseToken,\n requestParameters?.faceToken,\n requestParameters?.baseTokenAmount,\n requestParameters?.recvWindow\n );\n return sendRequest<CreateADualTokenGiftCardResponse>(\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 * This API is for creating a Binance Gift Card.\n *\n * To get started with, please make sure:\n *\n * You have a Binance account\n * You have passed KYB\n * You have a sufficient balance(Gift Card amount and fee amount) in your Binance funding wallet\n * You need `Enable Withdrawals` for the API Key which requests this endpoint.\n *\n * Weight: 1\n *\n * @summary Create a single-token gift card (USER_DATA)\n * @param {CreateASingleTokenGiftCardRequest} requestParameters Request parameters.\n * @returns {Promise<RestApiResponse<CreateASingleTokenGiftCardResponse>>}\n * @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}\n * @memberof MarketDataApi\n * @see {@link https://developers.binance.com/docs/gift_card/market-data/Create-a-single-token-gift-card Binance API Documentation}\n */\n public async createASingleTokenGiftCard(\n requestParameters: CreateASingleTokenGiftCardRequest\n ): Promise<RestApiResponse<CreateASingleTokenGiftCardResponse>> {\n const localVarAxiosArgs = await this.localVarAxiosParamCreator.createASingleTokenGiftCard(\n requestParameters?.token,\n requestParameters?.amount,\n requestParameters?.recvWindow\n );\n return sendRequest<CreateASingleTokenGiftCardResponse>(\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 * This API is for fetching the RSA Public Key.\n * This RSA Public key will be used to encrypt the card code.\n *\n **Please note that the RSA Public key fetched is valid only for the current day.**\n *\n * Weight: 1\n *\n * @summary Fetch RSA Public Key(USER_DATA)\n * @param {FetchRsaPublicKeyRequest} requestParameters Request parameters.\n * @returns {Promise<RestApiResponse<FetchRsaPublicKeyResponse>>}\n * @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}\n * @memberof MarketDataApi\n * @see {@link https://developers.binance.com/docs/gift_card/market-data/Fetch-RSA-Public-Key Binance API Documentation}\n */\n public async fetchRsaPublicKey(\n requestParameters: FetchRsaPublicKeyRequest = {}\n ): Promise<RestApiResponse<FetchRsaPublicKeyResponse>> {\n const localVarAxiosArgs = await this.localVarAxiosParamCreator.fetchRsaPublicKey(\n requestParameters?.recvWindow\n );\n return sendRequest<FetchRsaPublicKeyResponse>(\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 * This API is to help you verify which tokens are available for you to create Stablecoin-Denominated gift cards as mentioned in section 2 and its’ limitation.\n *\n * Weight: 1\n *\n * @summary Fetch Token Limit(USER_DATA)\n * @param {FetchTokenLimitRequest} requestParameters Request parameters.\n * @returns {Promise<RestApiResponse<FetchTokenLimitResponse>>}\n * @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}\n * @memberof MarketDataApi\n * @see {@link https://developers.binance.com/docs/gift_card/market-data/Fetch-Token-Limit Binance API Documentation}\n */\n public async fetchTokenLimit(\n requestParameters: FetchTokenLimitRequest\n ): Promise<RestApiResponse<FetchTokenLimitResponse>> {\n const localVarAxiosArgs = await this.localVarAxiosParamCreator.fetchTokenLimit(\n requestParameters?.baseToken,\n requestParameters?.recvWindow\n );\n return sendRequest<FetchTokenLimitResponse>(\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 * This API is for redeeming a Binance Gift Card\n * Once redeemed, the coins will be deposited in your funding wallet.\n *\n * Parameter code can be sent in two formats:\n * Plaintext\n * Encrypted\n *\n * Sending code in Encrypted format provides more security than sending it as a plaintext. To send card code in encrypted format the following steps must be followed:\n * Fetch RSA public key from api stated below.\n * Use the below algorithm to encrypt the card code using the RSA public key fetched above: `RSA/ECB/OAEPWithSHA-256AndMGF1Padding`\n **A sample code snippet (JAVA) is stated below for reference, the same approach can be used for different languages like C#, PERL, PYTHON, SHELL etc.:**\n *\n * Weight: 1\n *\n * @summary Redeem a Binance Gift Card(USER_DATA)\n * @param {RedeemABinanceGiftCardRequest} requestParameters Request parameters.\n * @returns {Promise<RestApiResponse<RedeemABinanceGiftCardResponse>>}\n * @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}\n * @memberof MarketDataApi\n * @see {@link https://developers.binance.com/docs/gift_card/market-data/Redeem-a-Binance-Gift-Card Binance API Documentation}\n */\n public async redeemABinanceGiftCard(\n requestParameters: RedeemABinanceGiftCardRequest\n ): Promise<RestApiResponse<RedeemABinanceGiftCardResponse>> {\n const localVarAxiosArgs = await this.localVarAxiosParamCreator.redeemABinanceGiftCard(\n requestParameters?.code,\n requestParameters?.externalUid,\n requestParameters?.recvWindow\n );\n return sendRequest<RedeemABinanceGiftCardResponse>(\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 * This API is for verifying whether the Binance Gift Card is valid or not by entering Gift Card Number.\n *\n **Please note that if you enter the wrong Gift Card Number 5 times within an hour, you will no longer be able to verify any Gift Card Number for that hour.**\n *\n * Weight: 1\n *\n * @summary Verify Binance Gift Card by Gift Card Number(USER_DATA)\n * @param {VerifyBinanceGiftCardByGiftCardNumberRequest} requestParameters Request parameters.\n * @returns {Promise<RestApiResponse<VerifyBinanceGiftCardByGiftCardNumberResponse>>}\n * @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}\n * @memberof MarketDataApi\n * @see {@link https://developers.binance.com/docs/gift_card/market-data/Verify-Binance-Gift-Card-by-Gift-Card-Number Binance API Documentation}\n */\n public async verifyBinanceGiftCardByGiftCardNumber(\n requestParameters: VerifyBinanceGiftCardByGiftCardNumberRequest\n ): Promise<RestApiResponse<VerifyBinanceGiftCardByGiftCardNumberResponse>> {\n const localVarAxiosArgs =\n await this.localVarAxiosParamCreator.verifyBinanceGiftCardByGiftCardNumber(\n requestParameters?.referenceNo,\n requestParameters?.recvWindow\n );\n return sendRequest<VerifyBinanceGiftCardByGiftCardNumberResponse>(\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 Gift Card REST API\n *\n * OpenAPI Specification for the Binance Gift Card 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 { MarketDataApi } from './modules/market-data-api';\n\nimport type {\n CreateADualTokenGiftCardRequest,\n CreateASingleTokenGiftCardRequest,\n FetchRsaPublicKeyRequest,\n FetchTokenLimitRequest,\n RedeemABinanceGiftCardRequest,\n VerifyBinanceGiftCardByGiftCardNumberRequest,\n} from './modules/market-data-api';\n\nimport type {\n CreateADualTokenGiftCardResponse,\n CreateASingleTokenGiftCardResponse,\n FetchRsaPublicKeyResponse,\n FetchTokenLimitResponse,\n RedeemABinanceGiftCardResponse,\n VerifyBinanceGiftCardByGiftCardNumberResponse,\n} from './types';\n\nexport class RestAPI {\n private configuration: ConfigurationRestAPI;\n private marketDataApi: MarketDataApi;\n\n constructor(configuration: ConfigurationRestAPI) {\n this.configuration = configuration;\n this.marketDataApi = new MarketDataApi(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 * * This API is for creating a dual-token ( stablecoin-denominated) Binance Gift Card. You may create a gift card using USDT as baseToken, that is redeemable to another designated token (faceToken). For example, you can create a fixed-value BTC gift card and pay with 100 USDT plus minting fee. This gift card can keep the value fixed at 100 USDT before redemption, and will be redeemable to BTC equivalent to 100 USDT upon redemption.\n * Once successfully created, the amount of baseToken (e.g. USDT) in the fixed-value gift card along with the fee would be deducted from your funding wallet.\n *\n *\n * To get started with, please make sure:\n * You have a Binance account\n * You have passed KYB\n * You have a sufficient balance(Gift Card amount and fee amount) in your Binance funding wallet\n * You need Enable Withdrawals for the API Key which requests this endpoint.\n *\n * Weight: 1\n *\n * @summary Create a dual-token gift card(fixed value, discount feature)(TRADE)\n * @param {CreateADualTokenGiftCardRequest} requestParameters Request parameters.\n *\n * @returns {Promise<RestApiResponse<CreateADualTokenGiftCardResponse>>}\n * @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}\n * @see {@link https://developers.binance.com/docs/gift_card/market-data/Create-a-dual-token-gift-card Binance API Documentation}\n */\n createADualTokenGiftCard(\n requestParameters: CreateADualTokenGiftCardRequest\n ): Promise<RestApiResponse<CreateADualTokenGiftCardResponse>> {\n return this.marketDataApi.createADualTokenGiftCard(requestParameters);\n }\n\n /**\n * This API is for creating a Binance Gift Card.\n *\n * To get started with, please make sure:\n *\n * You have a Binance account\n * You have passed KYB\n * You have a sufficient balance(Gift Card amount and fee amount) in your Binance funding wallet\n * You need `Enable Withdrawals` for the API Key which requests this endpoint.\n *\n * Weight: 1\n *\n * @summary Create a single-token gift card (USER_DATA)\n * @param {CreateASingleTokenGiftCardRequest} requestParameters Request parameters.\n *\n * @returns {Promise<RestApiResponse<CreateASingleTokenGiftCardResponse>>}\n * @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}\n * @see {@link https://developers.binance.com/docs/gift_card/market-data/Create-a-single-token-gift-card Binance API Documentation}\n */\n createASingleTokenGiftCard(\n requestParameters: CreateASingleTokenGiftCardRequest\n ): Promise<RestApiResponse<CreateASingleTokenGiftCardResponse>> {\n return this.marketDataApi.createASingleTokenGiftCard(requestParameters);\n }\n\n /**\n * This API is for fetching the RSA Public Key.\n * This RSA Public key will be used to encrypt the card code.\n *\n **Please note that the RSA Public key fetched is valid only for the current day.**\n *\n * Weight: 1\n *\n * @summary Fetch RSA Public Key(USER_DATA)\n * @param {FetchRsaPublicKeyRequest} requestParameters Request parameters.\n *\n * @returns {Promise<RestApiResponse<FetchRsaPublicKeyResponse>>}\n * @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}\n * @see {@link https://developers.binance.com/docs/gift_card/market-data/Fetch-RSA-Public-Key Binance API Documentation}\n */\n fetchRsaPublicKey(\n requestParameters: FetchRsaPublicKeyRequest = {}\n ): Promise<RestApiResponse<FetchRsaPublicKeyResponse>> {\n return this.marketDataApi.fetchRsaPublicKey(requestParameters);\n }\n\n /**\n * This API is to help you verify which tokens are available for you to create Stablecoin-Denominated gift cards as mentioned in section 2 and its’ limitation.\n *\n * Weight: 1\n *\n * @summary Fetch Token Limit(USER_DATA)\n * @param {FetchTokenLimitRequest} requestParameters Request parameters.\n *\n * @returns {Promise<RestApiResponse<FetchTokenLimitResponse>>}\n * @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}\n * @see {@link https://developers.binance.com/docs/gift_card/market-data/Fetch-Token-Limit Binance API Documentation}\n */\n fetchTokenLimit(\n requestParameters: FetchTokenLimitRequest\n ): Promise<RestApiResponse<FetchTokenLimitResponse>> {\n return this.marketDataApi.fetchTokenLimit(requestParameters);\n }\n\n /**\n * This API is for redeeming a Binance Gift Card\n * Once redeemed, the coins will be deposited in your funding wallet.\n *\n * Parameter code can be sent in two formats:\n * Plaintext\n * Encrypted\n *\n * Sending code in Encrypted format provides more security than sending it as a plaintext. To send card code in encrypted format the following steps must be followed:\n * Fetch RSA public key from api stated below.\n * Use the below algorithm to encrypt the card code using the RSA public key fetched above: `RSA/ECB/OAEPWithSHA-256AndMGF1Padding`\n **A sample code snippet (JAVA) is stated below for reference, the same approach can be used for different languages like C#, PERL, PYTHON, SHELL etc.:**\n *\n * Weight: 1\n *\n * @summary Redeem a Binance Gift Card(USER_DATA)\n * @param {RedeemABinanceGiftCardRequest} requestParameters Request parameters.\n *\n * @returns {Promise<RestApiResponse<RedeemABinanceGiftCardResponse>>}\n * @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}\n * @see {@link https://developers.binance.com/docs/gift_card/market-data/Redeem-a-Binance-Gift-Card Binance API Documentation}\n */\n redeemABinanceGiftCard(\n requestParameters: RedeemABinanceGiftCardRequest\n ): Promise<RestApiResponse<RedeemABinanceGiftCardResponse>> {\n return this.marketDataApi.redeemABinanceGiftCard(requestParameters);\n }\n\n /**\n * This API is for verifying whether the Binance Gift Card is valid or not by entering Gift Card Number.\n *\n **Please note that if you enter the wrong Gift Card Number 5 times within an hour, you will no longer be able to verify any Gift Card Number for that hour.**\n *\n * Weight: 1\n *\n * @summary Verify Binance Gift Card by Gift Card Number(USER_DATA)\n * @param {VerifyBinanceGiftCardByGiftCardNumberRequest} requestParameters Request parameters.\n *\n * @returns {Promise<RestApiResponse<VerifyBinanceGiftCardByGiftCardNumberResponse>>}\n * @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}\n * @see {@link https://developers.binance.com/docs/gift_card/market-data/Verify-Binance-Gift-Card-by-Gift-Card-Number Binance API Documentation}\n */\n verifyBinanceGiftCardByGiftCardNumber(\n requestParameters: VerifyBinanceGiftCardByGiftCardNumberRequest\n ): Promise<RestApiResponse<VerifyBinanceGiftCardByGiftCardNumberResponse>> {\n return this.marketDataApi.verifyBinanceGiftCardByGiftCardNumber(requestParameters);\n }\n}\n","/**\n * Binance Gift Card REST API\n *\n * OpenAPI Specification for the Binance Gift Card 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, GIFT_CARD_REST_API_PROD_URL } from '@binance/common';\nimport { name, version } from '../package.json';\nimport { RestAPI } from './rest-api';\n\nexport interface ConfigurationGiftCard {\n configurationRestAPI?: ConfigurationRestAPI;\n}\n\nexport class GiftCard {\n public restAPI!: RestAPI;\n\n constructor(config: ConfigurationGiftCard) {\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 || GIFT_CARD_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;;;;;;;;;;;;;;;;;;;AC8Bf,MAAM,iCAAiC,SAAU,eAAqC;AAClF,QAAO;EAsBH,0BAA0B,OACtB,WACA,WACA,iBACA,eACuB;AAEvB,qBAAkB,4BAA4B,aAAa,UAAU;AAErE,qBAAkB,4BAA4B,aAAa,UAAU;AAErE,qBAAkB,4BAA4B,mBAAmB,gBAAgB;GAEjF,MAAMA,yBAAkD,EAAE;GAC1D,MAAMC,wBAAiD,EAAE;AAEzD,OAAI,cAAc,UAAa,cAAc,KACzC,wBAAuB,eAAe;AAE1C,OAAI,cAA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Ac,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>","localVarHeaderParameter: Record<string, unknown>","_timeUnit: TimeUnit | undefined","GIFT_CARD_REST_API_PROD_URL"],"sources":["../package.json","../src/rest-api/modules/market-data-api.ts","../src/rest-api/rest-api.ts","../src/rest-api/index.ts","../src/gift-card.ts"],"sourcesContent":["{\n \"name\": \"@binance/giftcard\",\n \"description\": \"Official Binance Gift Card Connector - A lightweight library that provides a convenient interface to Binance's Gift Card REST API.\",\n \"version\": \"4.1.16\",\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 \"Gift Card\",\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.4.0\",\n \"axios\": \"^1.7.4\"\n }\n}\n","/**\n * Binance Gift Card REST API\n *\n * OpenAPI Specification for the Binance Gift Card 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 assertParamExists,\n sendRequest,\n type RequestArgs,\n} from '@binance/common';\nimport type {\n CreateADualTokenGiftCardResponse,\n CreateASingleTokenGiftCardResponse,\n FetchRsaPublicKeyResponse,\n FetchTokenLimitResponse,\n RedeemABinanceGiftCardResponse,\n VerifyBinanceGiftCardByGiftCardNumberResponse,\n} from '../types';\n\n/**\n * MarketDataApi - axios parameter creator\n */\nconst MarketDataApiAxiosParamCreator = function (configuration: ConfigurationRestAPI) {\n return {\n /**\n * * This API is for creating a dual-token ( stablecoin-denominated) Binance Gift Card. You may create a gift card using USDT as baseToken, that is redeemable to another designated token (faceToken). For example, you can create a fixed-value BTC gift card and pay with 100 USDT plus minting fee. This gift card can keep the value fixed at 100 USDT before redemption, and will be redeemable to BTC equivalent to 100 USDT upon redemption.\n * Once successfully created, the amount of baseToken (e.g. USDT) in the fixed-value gift card along with the fee would be deducted from your funding wallet.\n *\n *\n * To get started with, please make sure:\n * You have a Binance account\n * You have passed KYB\n * You have a sufficient balance(Gift Card amount and fee amount) in your Binance funding wallet\n * You need Enable Withdrawals for the API Key which requests this endpoint.\n *\n * Weight: 1\n *\n * @summary Create a dual-token gift card(fixed value, discount feature)(TRADE)\n * @param {string} baseToken The token you want to pay, example: BUSD\n * @param {string} faceToken The token you want to buy, example: BNB. If faceToken = baseToken, it's the same as createCode endpoint.\n * @param {number} baseTokenAmount The base token asset quantity, example : 1.002\n * @param {number | bigint} [recvWindow]\n *\n * @throws {RequiredError}\n */\n createADualTokenGiftCard: async (\n baseToken: string,\n faceToken: string,\n baseTokenAmount: number,\n recvWindow?: number | bigint\n ): Promise<RequestArgs> => {\n // verify required parameter 'baseToken' is not null or undefined\n assertParamExists('createADualTokenGiftCard', 'baseToken', baseToken);\n // verify required parameter 'faceToken' is not null or undefined\n assertParamExists('createADualTokenGiftCard', 'faceToken', faceToken);\n // verify required parameter 'baseTokenAmount' is not null or undefined\n assertParamExists('createADualTokenGiftCard', 'baseTokenAmount', baseTokenAmount);\n\n const localVarQueryParameter: Record<string, unknown> = {};\n const localVarBodyParameter: Record<string, unknown> = {};\n const localVarHeaderParameter: Record<string, unknown> = {};\n\n if (baseToken !== undefined && baseToken !== null) {\n localVarQueryParameter['baseToken'] = baseToken;\n }\n if (faceToken !== undefined && faceToken !== null) {\n localVarQueryParameter['faceToken'] = faceToken;\n }\n if (baseTokenAmount !== undefined && baseTokenAmount !== null) {\n localVarQueryParameter['baseTokenAmount'] = baseTokenAmount;\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/giftcard/buyCode',\n method: 'POST',\n queryParams: localVarQueryParameter,\n bodyParams: localVarBodyParameter,\n headerParams: localVarHeaderParameter,\n timeUnit: _timeUnit,\n };\n },\n /**\n * This API is for creating a Binance Gift Card.\n *\n * To get started with, please make sure:\n *\n * You have a Binance account\n * You have passed KYB\n * You have a sufficient balance(Gift Card amount and fee amount) in your Binance funding wallet\n * You need `Enable Withdrawals` for the API Key which requests this endpoint.\n *\n * Weight: 1\n *\n * @summary Create a single-token gift card (USER_DATA)\n * @param {string} token The token type contained in the Binance Gift Card\n * @param {number} amount The amount of the token contained in the Binance Gift Card\n * @param {number | bigint} [recvWindow]\n *\n * @throws {RequiredError}\n */\n createASingleTokenGiftCard: async (\n token: string,\n amount: number,\n recvWindow?: number | bigint\n ): Promise<RequestArgs> => {\n // verify required parameter 'token' is not null or undefined\n assertParamExists('createASingleTokenGiftCard', 'token', token);\n // verify required parameter 'amount' is not null or undefined\n assertParamExists('createASingleTokenGiftCard', 'amount', amount);\n\n const localVarQueryParameter: Record<string, unknown> = {};\n const localVarBodyParameter: Record<string, unknown> = {};\n const localVarHeaderParameter: Record<string, unknown> = {};\n\n if (token !== undefined && token !== null) {\n localVarQueryParameter['token'] = token;\n }\n if (amount !== undefined && amount !== null) {\n localVarQueryParameter['amount'] = amount;\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/giftcard/createCode',\n method: 'POST',\n queryParams: localVarQueryParameter,\n bodyParams: localVarBodyParameter,\n headerParams: localVarHeaderParameter,\n timeUnit: _timeUnit,\n };\n },\n /**\n * This API is for fetching the RSA Public Key.\n * This RSA Public key will be used to encrypt the card code.\n *\n **Please note that the RSA Public key fetched is valid only for the current day.**\n *\n * Weight: 1\n *\n * @summary Fetch RSA Public Key(USER_DATA)\n * @param {number | bigint} [recvWindow]\n *\n * @throws {RequiredError}\n */\n fetchRsaPublicKey: async (recvWindow?: number | bigint): Promise<RequestArgs> => {\n const localVarQueryParameter: Record<string, unknown> = {};\n const localVarBodyParameter: Record<string, unknown> = {};\n const localVarHeaderParameter: Record<string, unknown> = {};\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/giftcard/cryptography/rsa-public-key',\n method: 'GET',\n queryParams: localVarQueryParameter,\n bodyParams: localVarBodyParameter,\n headerParams: localVarHeaderParameter,\n timeUnit: _timeUnit,\n };\n },\n /**\n * This API is to help you verify which tokens are available for you to create Stablecoin-Denominated gift cards as mentioned in section 2 and its’ limitation.\n *\n * Weight: 1\n *\n * @summary Fetch Token Limit(USER_DATA)\n * @param {string} baseToken The token you want to pay, example: BUSD\n * @param {number | bigint} [recvWindow]\n *\n * @throws {RequiredError}\n */\n fetchTokenLimit: async (\n baseToken: string,\n recvWindow?: number | bigint\n ): Promise<RequestArgs> => {\n // verify required parameter 'baseToken' is not null or undefined\n assertParamExists('fetchTokenLimit', 'baseToken', baseToken);\n\n const localVarQueryParameter: Record<string, unknown> = {};\n const localVarBodyParameter: Record<string, unknown> = {};\n const localVarHeaderParameter: Record<string, unknown> = {};\n\n if (baseToken !== undefined && baseToken !== null) {\n localVarQueryParameter['baseToken'] = baseToken;\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/giftcard/buyCode/token-limit',\n method: 'GET',\n queryParams: localVarQueryParameter,\n bodyParams: localVarBodyParameter,\n headerParams: localVarHeaderParameter,\n timeUnit: _timeUnit,\n };\n },\n /**\n * This API is for redeeming a Binance Gift Card\n * Once redeemed, the coins will be deposited in your funding wallet.\n *\n * Parameter code can be sent in two formats:\n * Plaintext\n * Encrypted\n *\n * Sending code in Encrypted format provides more security than sending it as a plaintext. To send card code in encrypted format the following steps must be followed:\n * Fetch RSA public key from api stated below.\n * Use the below algorithm to encrypt the card code using the RSA public key fetched above: `RSA/ECB/OAEPWithSHA-256AndMGF1Padding`\n **A sample code snippet (JAVA) is stated below for reference, the same approach can be used for different languages like C#, PERL, PYTHON, SHELL etc.:**\n *\n * Weight: 1\n *\n * @summary Redeem a Binance Gift Card(USER_DATA)\n * @param {string} code Redemption code of Binance Gift Card to be redeemed, supports both Plaintext & Encrypted code.\n * @param {string} [externalUid] Each external unique ID represents a unique user on the partner platform. The function helps you to identify the redemption behavior of different users, such as redemption frequency and amount. It also helps risk and limit control of a single account, such as daily limit on redemption volume, frequency, and incorrect number of entries. This will also prevent a single user account reach the partner's daily redemption limits. We strongly recommend you to use this feature and transfer us the User ID of your users if you have different users redeeming Binance Gift Cards on your platform. To protect user data privacy, you may choose to transfer the user id in any desired format (max. 400 characters).\n * @param {number | bigint} [recvWindow]\n *\n * @throws {RequiredError}\n */\n redeemABinanceGiftCard: async (\n code: string,\n externalUid?: string,\n recvWindow?: number | bigint\n ): Promise<RequestArgs> => {\n // verify required parameter 'code' is not null or undefined\n assertParamExists('redeemABinanceGiftCard', 'code', code);\n\n const localVarQueryParameter: Record<string, unknown> = {};\n const localVarBodyParameter: Record<string, unknown> = {};\n const localVarHeaderParameter: Record<string, unknown> = {};\n\n if (code !== undefined && code !== null) {\n localVarQueryParameter['code'] = code;\n }\n if (externalUid !== undefined && externalUid !== null) {\n localVarQueryParameter['externalUid'] = externalUid;\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/giftcard/redeemCode',\n method: 'POST',\n queryParams: localVarQueryParameter,\n bodyParams: localVarBodyParameter,\n headerParams: localVarHeaderParameter,\n timeUnit: _timeUnit,\n };\n },\n /**\n * This API is for verifying whether the Binance Gift Card is valid or not by entering Gift Card Number.\n *\n **Please note that if you enter the wrong Gift Card Number 5 times within an hour, you will no longer be able to verify any Gift Card Number for that hour.**\n *\n * Weight: 1\n *\n * @summary Verify Binance Gift Card by Gift Card Number(USER_DATA)\n * @param {string} referenceNo Enter the Gift Card Number\n * @param {number | bigint} [recvWindow]\n *\n * @throws {RequiredError}\n */\n verifyBinanceGiftCardByGiftCardNumber: async (\n referenceNo: string,\n recvWindow?: number | bigint\n ): Promise<RequestArgs> => {\n // verify required parameter 'referenceNo' is not null or undefined\n assertParamExists('verifyBinanceGiftCardByGiftCardNumber', 'referenceNo', referenceNo);\n\n const localVarQueryParameter: Record<string, unknown> = {};\n const localVarBodyParameter: Record<string, unknown> = {};\n const localVarHeaderParameter: Record<string, unknown> = {};\n\n if (referenceNo !== undefined && referenceNo !== null) {\n localVarQueryParameter['referenceNo'] = referenceNo;\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/giftcard/verify',\n method: 'GET',\n queryParams: localVarQueryParameter,\n bodyParams: localVarBodyParameter,\n headerParams: localVarHeaderParameter,\n timeUnit: _timeUnit,\n };\n },\n };\n};\n\n/**\n * MarketDataApi - interface\n * @interface MarketDataApi\n */\nexport interface MarketDataApiInterface {\n /**\n * * This API is for creating a dual-token ( stablecoin-denominated) Binance Gift Card. You may create a gift card using USDT as baseToken, that is redeemable to another designated token (faceToken). For example, you can create a fixed-value BTC gift card and pay with 100 USDT plus minting fee. This gift card can keep the value fixed at 100 USDT before redemption, and will be redeemable to BTC equivalent to 100 USDT upon redemption.\n * Once successfully created, the amount of baseToken (e.g. USDT) in the fixed-value gift card along with the fee would be deducted from your funding wallet.\n *\n *\n * To get started with, please make sure:\n * You have a Binance account\n * You have passed KYB\n * You have a sufficient balance(Gift Card amount and fee amount) in your Binance funding wallet\n * You need Enable Withdrawals for the API Key which requests this endpoint.\n *\n * Weight: 1\n *\n * @summary Create a dual-token gift card(fixed value, discount feature)(TRADE)\n * @param {CreateADualTokenGiftCardRequest} requestParameters Request parameters.\n *\n * @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}\n * @memberof MarketDataApiInterface\n */\n createADualTokenGiftCard(\n requestParameters: CreateADualTokenGiftCardRequest\n ): Promise<RestApiResponse<CreateADualTokenGiftCardResponse>>;\n /**\n * This API is for creating a Binance Gift Card.\n *\n * To get started with, please make sure:\n *\n * You have a Binance account\n * You have passed KYB\n * You have a sufficient balance(Gift Card amount and fee amount) in your Binance funding wallet\n * You need `Enable Withdrawals` for the API Key which requests this endpoint.\n *\n * Weight: 1\n *\n * @summary Create a single-token gift card (USER_DATA)\n * @param {CreateASingleTokenGiftCardRequest} requestParameters Request parameters.\n *\n * @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}\n * @memberof MarketDataApiInterface\n */\n createASingleTokenGiftCard(\n requestParameters: CreateASingleTokenGiftCardRequest\n ): Promise<RestApiResponse<CreateASingleTokenGiftCardResponse>>;\n /**\n * This API is for fetching the RSA Public Key.\n * This RSA Public key will be used to encrypt the card code.\n *\n **Please note that the RSA Public key fetched is valid only for the current day.**\n *\n * Weight: 1\n *\n * @summary Fetch RSA Public Key(USER_DATA)\n * @param {FetchRsaPublicKeyRequest} requestParameters Request parameters.\n *\n * @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}\n * @memberof MarketDataApiInterface\n */\n fetchRsaPublicKey(\n requestParameters?: FetchRsaPublicKeyRequest\n ): Promise<RestApiResponse<FetchRsaPublicKeyResponse>>;\n /**\n * This API is to help you verify which tokens are available for you to create Stablecoin-Denominated gift cards as mentioned in section 2 and its’ limitation.\n *\n * Weight: 1\n *\n * @summary Fetch Token Limit(USER_DATA)\n * @param {FetchTokenLimitRequest} requestParameters Request parameters.\n *\n * @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}\n * @memberof MarketDataApiInterface\n */\n fetchTokenLimit(\n requestParameters: FetchTokenLimitRequest\n ): Promise<RestApiResponse<FetchTokenLimitResponse>>;\n /**\n * This API is for redeeming a Binance Gift Card\n * Once redeemed, the coins will be deposited in your funding wallet.\n *\n * Parameter code can be sent in two formats:\n * Plaintext\n * Encrypted\n *\n * Sending code in Encrypted format provides more security than sending it as a plaintext. To send card code in encrypted format the following steps must be followed:\n * Fetch RSA public key from api stated below.\n * Use the below algorithm to encrypt the card code using the RSA public key fetched above: `RSA/ECB/OAEPWithSHA-256AndMGF1Padding`\n **A sample code snippet (JAVA) is stated below for reference, the same approach can be used for different languages like C#, PERL, PYTHON, SHELL etc.:**\n *\n * Weight: 1\n *\n * @summary Redeem a Binance Gift Card(USER_DATA)\n * @param {RedeemABinanceGiftCardRequest} requestParameters Request parameters.\n *\n * @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}\n * @memberof MarketDataApiInterface\n */\n redeemABinanceGiftCard(\n requestParameters: RedeemABinanceGiftCardRequest\n ): Promise<RestApiResponse<RedeemABinanceGiftCardResponse>>;\n /**\n * This API is for verifying whether the Binance Gift Card is valid or not by entering Gift Card Number.\n *\n **Please note that if you enter the wrong Gift Card Number 5 times within an hour, you will no longer be able to verify any Gift Card Number for that hour.**\n *\n * Weight: 1\n *\n * @summary Verify Binance Gift Card by Gift Card Number(USER_DATA)\n * @param {VerifyBinanceGiftCardByGiftCardNumberRequest} requestParameters Request parameters.\n *\n * @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}\n * @memberof MarketDataApiInterface\n */\n verifyBinanceGiftCardByGiftCardNumber(\n requestParameters: VerifyBinanceGiftCardByGiftCardNumberRequest\n ): Promise<RestApiResponse<VerifyBinanceGiftCardByGiftCardNumberResponse>>;\n}\n\n/**\n * Request parameters for createADualTokenGiftCard operation in MarketDataApi.\n * @interface CreateADualTokenGiftCardRequest\n */\nexport interface CreateADualTokenGiftCardRequest {\n /**\n * The token you want to pay, example: BUSD\n * @type {string}\n * @memberof MarketDataApiCreateADualTokenGiftCard\n */\n readonly baseToken: string;\n\n /**\n * The token you want to buy, example: BNB. If faceToken = baseToken, it's the same as createCode endpoint.\n * @type {string}\n * @memberof MarketDataApiCreateADualTokenGiftCard\n */\n readonly faceToken: string;\n\n /**\n * The base token asset quantity, example : 1.002\n * @type {number}\n * @memberof MarketDataApiCreateADualTokenGiftCard\n */\n readonly baseTokenAmount: number;\n\n /**\n *\n * @type {number | bigint}\n * @memberof MarketDataApiCreateADualTokenGiftCard\n */\n readonly recvWindow?: number | bigint;\n}\n\n/**\n * Request parameters for createASingleTokenGiftCard operation in MarketDataApi.\n * @interface CreateASingleTokenGiftCardRequest\n */\nexport interface CreateASingleTokenGiftCardRequest {\n /**\n * The token type contained in the Binance Gift Card\n * @type {string}\n * @memberof MarketDataApiCreateASingleTokenGiftCard\n */\n readonly token: string;\n\n /**\n * The amount of the token contained in the Binance Gift Card\n * @type {number}\n * @memberof MarketDataApiCreateASingleTokenGiftCard\n */\n readonly amount: number;\n\n /**\n *\n * @type {number | bigint}\n * @memberof MarketDataApiCreateASingleTokenGiftCard\n */\n readonly recvWindow?: number | bigint;\n}\n\n/**\n * Request parameters for fetchRsaPublicKey operation in MarketDataApi.\n * @interface FetchRsaPublicKeyRequest\n */\nexport interface FetchRsaPublicKeyRequest {\n /**\n *\n * @type {number | bigint}\n * @memberof MarketDataApiFetchRsaPublicKey\n */\n readonly recvWindow?: number | bigint;\n}\n\n/**\n * Request parameters for fetchTokenLimit operation in MarketDataApi.\n * @interface FetchTokenLimitRequest\n */\nexport interface FetchTokenLimitRequest {\n /**\n * The token you want to pay, example: BUSD\n * @type {string}\n * @memberof MarketDataApiFetchTokenLimit\n */\n readonly baseToken: string;\n\n /**\n *\n * @type {number | bigint}\n * @memberof MarketDataApiFetchTokenLimit\n */\n readonly recvWindow?: number | bigint;\n}\n\n/**\n * Request parameters for redeemABinanceGiftCard operation in MarketDataApi.\n * @interface RedeemABinanceGiftCardRequest\n */\nexport interface RedeemABinanceGiftCardRequest {\n /**\n * Redemption code of Binance Gift Card to be redeemed, supports both Plaintext & Encrypted code.\n * @type {string}\n * @memberof MarketDataApiRedeemABinanceGiftCard\n */\n readonly code: string;\n\n /**\n * Each external unique ID represents a unique user on the partner platform. The function helps you to identify the redemption behavior of different users, such as redemption frequency and amount. It also helps risk and limit control of a single account, such as daily limit on redemption volume, frequency, and incorrect number of entries. This will also prevent a single user account reach the partner's daily redemption limits. We strongly recommend you to use this feature and transfer us the User ID of your users if you have different users redeeming Binance Gift Cards on your platform. To protect user data privacy, you may choose to transfer the user id in any desired format (max. 400 characters).\n * @type {string}\n * @memberof MarketDataApiRedeemABinanceGiftCard\n */\n readonly externalUid?: string;\n\n /**\n *\n * @type {number | bigint}\n * @memberof MarketDataApiRedeemABinanceGiftCard\n */\n readonly recvWindow?: number | bigint;\n}\n\n/**\n * Request parameters for verifyBinanceGiftCardByGiftCardNumber operation in MarketDataApi.\n * @interface VerifyBinanceGiftCardByGiftCardNumberRequest\n */\nexport interface VerifyBinanceGiftCardByGiftCardNumberRequest {\n /**\n * Enter the Gift Card Number\n * @type {string}\n * @memberof MarketDataApiVerifyBinanceGiftCardByGiftCardNumber\n */\n readonly referenceNo: string;\n\n /**\n *\n * @type {number | bigint}\n * @memberof MarketDataApiVerifyBinanceGiftCardByGiftCardNumber\n */\n readonly recvWindow?: number | bigint;\n}\n\n/**\n * MarketDataApi - object-oriented interface\n * @class MarketDataApi\n */\nexport class MarketDataApi implements MarketDataApiInterface {\n private readonly configuration: ConfigurationRestAPI;\n private localVarAxiosParamCreator;\n\n constructor(configuration: ConfigurationRestAPI) {\n this.configuration = configuration;\n this.localVarAxiosParamCreator = MarketDataApiAxiosParamCreator(configuration);\n }\n\n /**\n * * This API is for creating a dual-token ( stablecoin-denominated) Binance Gift Card. You may create a gift card using USDT as baseToken, that is redeemable to another designated token (faceToken). For example, you can create a fixed-value BTC gift card and pay with 100 USDT plus minting fee. This gift card can keep the value fixed at 100 USDT before redemption, and will be redeemable to BTC equivalent to 100 USDT upon redemption.\n * Once successfully created, the amount of baseToken (e.g. USDT) in the fixed-value gift card along with the fee would be deducted from your funding wallet.\n *\n *\n * To get started with, please make sure:\n * You have a Binance account\n * You have passed KYB\n * You have a sufficient balance(Gift Card amount and fee amount) in your Binance funding wallet\n * You need Enable Withdrawals for the API Key which requests this endpoint.\n *\n * Weight: 1\n *\n * @summary Create a dual-token gift card(fixed value, discount feature)(TRADE)\n * @param {CreateADualTokenGiftCardRequest} requestParameters Request parameters.\n * @returns {Promise<RestApiResponse<CreateADualTokenGiftCardResponse>>}\n * @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}\n * @memberof MarketDataApi\n * @see {@link https://developers.binance.com/docs/gift_card/market-data/Create-a-dual-token-gift-card Binance API Documentation}\n */\n public async createADualTokenGiftCard(\n requestParameters: CreateADualTokenGiftCardRequest\n ): Promise<RestApiResponse<CreateADualTokenGiftCardResponse>> {\n const localVarAxiosArgs = await this.localVarAxiosParamCreator.createADualTokenGiftCard(\n requestParameters?.baseToken,\n requestParameters?.faceToken,\n requestParameters?.baseTokenAmount,\n requestParameters?.recvWindow\n );\n return sendRequest<CreateADualTokenGiftCardResponse>(\n this.configuration,\n localVarAxiosArgs.endpoint,\n localVarAxiosArgs.method,\n localVarAxiosArgs.queryParams,\n localVarAxiosArgs.bodyParams,\n localVarAxiosArgs.headerParams,\n localVarAxiosArgs?.timeUnit,\n { isSigned: true }\n );\n }\n\n /**\n * This API is for creating a Binance Gift Card.\n *\n * To get started with, please make sure:\n *\n * You have a Binance account\n * You have passed KYB\n * You have a sufficient balance(Gift Card amount and fee amount) in your Binance funding wallet\n * You need `Enable Withdrawals` for the API Key which requests this endpoint.\n *\n * Weight: 1\n *\n * @summary Create a single-token gift card (USER_DATA)\n * @param {CreateASingleTokenGiftCardRequest} requestParameters Request parameters.\n * @returns {Promise<RestApiResponse<CreateASingleTokenGiftCardResponse>>}\n * @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}\n * @memberof MarketDataApi\n * @see {@link https://developers.binance.com/docs/gift_card/market-data/Create-a-single-token-gift-card Binance API Documentation}\n */\n public async createASingleTokenGiftCard(\n requestParameters: CreateASingleTokenGiftCardRequest\n ): Promise<RestApiResponse<CreateASingleTokenGiftCardResponse>> {\n const localVarAxiosArgs = await this.localVarAxiosParamCreator.createASingleTokenGiftCard(\n requestParameters?.token,\n requestParameters?.amount,\n requestParameters?.recvWindow\n );\n return sendRequest<CreateASingleTokenGiftCardResponse>(\n this.configuration,\n localVarAxiosArgs.endpoint,\n localVarAxiosArgs.method,\n localVarAxiosArgs.queryParams,\n localVarAxiosArgs.bodyParams,\n localVarAxiosArgs.headerParams,\n localVarAxiosArgs?.timeUnit,\n { isSigned: true }\n );\n }\n\n /**\n * This API is for fetching the RSA Public Key.\n * This RSA Public key will be used to encrypt the card code.\n *\n **Please note that the RSA Public key fetched is valid only for the current day.**\n *\n * Weight: 1\n *\n * @summary Fetch RSA Public Key(USER_DATA)\n * @param {FetchRsaPublicKeyRequest} requestParameters Request parameters.\n * @returns {Promise<RestApiResponse<FetchRsaPublicKeyResponse>>}\n * @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}\n * @memberof MarketDataApi\n * @see {@link https://developers.binance.com/docs/gift_card/market-data/Fetch-RSA-Public-Key Binance API Documentation}\n */\n public async fetchRsaPublicKey(\n requestParameters: FetchRsaPublicKeyRequest = {}\n ): Promise<RestApiResponse<FetchRsaPublicKeyResponse>> {\n const localVarAxiosArgs = await this.localVarAxiosParamCreator.fetchRsaPublicKey(\n requestParameters?.recvWindow\n );\n return sendRequest<FetchRsaPublicKeyResponse>(\n this.configuration,\n localVarAxiosArgs.endpoint,\n localVarAxiosArgs.method,\n localVarAxiosArgs.queryParams,\n localVarAxiosArgs.bodyParams,\n localVarAxiosArgs.headerParams,\n localVarAxiosArgs?.timeUnit,\n { isSigned: true }\n );\n }\n\n /**\n * This API is to help you verify which tokens are available for you to create Stablecoin-Denominated gift cards as mentioned in section 2 and its’ limitation.\n *\n * Weight: 1\n *\n * @summary Fetch Token Limit(USER_DATA)\n * @param {FetchTokenLimitRequest} requestParameters Request parameters.\n * @returns {Promise<RestApiResponse<FetchTokenLimitResponse>>}\n * @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}\n * @memberof MarketDataApi\n * @see {@link https://developers.binance.com/docs/gift_card/market-data/Fetch-Token-Limit Binance API Documentation}\n */\n public async fetchTokenLimit(\n requestParameters: FetchTokenLimitRequest\n ): Promise<RestApiResponse<FetchTokenLimitResponse>> {\n const localVarAxiosArgs = await this.localVarAxiosParamCreator.fetchTokenLimit(\n requestParameters?.baseToken,\n requestParameters?.recvWindow\n );\n return sendRequest<FetchTokenLimitResponse>(\n this.configuration,\n localVarAxiosArgs.endpoint,\n localVarAxiosArgs.method,\n localVarAxiosArgs.queryParams,\n localVarAxiosArgs.bodyParams,\n localVarAxiosArgs.headerParams,\n localVarAxiosArgs?.timeUnit,\n { isSigned: true }\n );\n }\n\n /**\n * This API is for redeeming a Binance Gift Card\n * Once redeemed, the coins will be deposited in your funding wallet.\n *\n * Parameter code can be sent in two formats:\n * Plaintext\n * Encrypted\n *\n * Sending code in Encrypted format provides more security than sending it as a plaintext. To send card code in encrypted format the following steps must be followed:\n * Fetch RSA public key from api stated below.\n * Use the below algorithm to encrypt the card code using the RSA public key fetched above: `RSA/ECB/OAEPWithSHA-256AndMGF1Padding`\n **A sample code snippet (JAVA) is stated below for reference, the same approach can be used for different languages like C#, PERL, PYTHON, SHELL etc.:**\n *\n * Weight: 1\n *\n * @summary Redeem a Binance Gift Card(USER_DATA)\n * @param {RedeemABinanceGiftCardRequest} requestParameters Request parameters.\n * @returns {Promise<RestApiResponse<RedeemABinanceGiftCardResponse>>}\n * @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}\n * @memberof MarketDataApi\n * @see {@link https://developers.binance.com/docs/gift_card/market-data/Redeem-a-Binance-Gift-Card Binance API Documentation}\n */\n public async redeemABinanceGiftCard(\n requestParameters: RedeemABinanceGiftCardRequest\n ): Promise<RestApiResponse<RedeemABinanceGiftCardResponse>> {\n const localVarAxiosArgs = await this.localVarAxiosParamCreator.redeemABinanceGiftCard(\n requestParameters?.code,\n requestParameters?.externalUid,\n requestParameters?.recvWindow\n );\n return sendRequest<RedeemABinanceGiftCardResponse>(\n this.configuration,\n localVarAxiosArgs.endpoint,\n localVarAxiosArgs.method,\n localVarAxiosArgs.queryParams,\n localVarAxiosArgs.bodyParams,\n localVarAxiosArgs.headerParams,\n localVarAxiosArgs?.timeUnit,\n { isSigned: true }\n );\n }\n\n /**\n * This API is for verifying whether the Binance Gift Card is valid or not by entering Gift Card Number.\n *\n **Please note that if you enter the wrong Gift Card Number 5 times within an hour, you will no longer be able to verify any Gift Card Number for that hour.**\n *\n * Weight: 1\n *\n * @summary Verify Binance Gift Card by Gift Card Number(USER_DATA)\n * @param {VerifyBinanceGiftCardByGiftCardNumberRequest} requestParameters Request parameters.\n * @returns {Promise<RestApiResponse<VerifyBinanceGiftCardByGiftCardNumberResponse>>}\n * @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}\n * @memberof MarketDataApi\n * @see {@link https://developers.binance.com/docs/gift_card/market-data/Verify-Binance-Gift-Card-by-Gift-Card-Number Binance API Documentation}\n */\n public async verifyBinanceGiftCardByGiftCardNumber(\n requestParameters: VerifyBinanceGiftCardByGiftCardNumberRequest\n ): Promise<RestApiResponse<VerifyBinanceGiftCardByGiftCardNumberResponse>> {\n const localVarAxiosArgs =\n await this.localVarAxiosParamCreator.verifyBinanceGiftCardByGiftCardNumber(\n requestParameters?.referenceNo,\n requestParameters?.recvWindow\n );\n return sendRequest<VerifyBinanceGiftCardByGiftCardNumberResponse>(\n this.configuration,\n localVarAxiosArgs.endpoint,\n localVarAxiosArgs.method,\n localVarAxiosArgs.queryParams,\n localVarAxiosArgs.bodyParams,\n localVarAxiosArgs.headerParams,\n localVarAxiosArgs?.timeUnit,\n { isSigned: true }\n );\n }\n}\n","/**\n * Binance Gift Card REST API\n *\n * OpenAPI Specification for the Binance Gift Card 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 { MarketDataApi } from './modules/market-data-api';\n\nimport type {\n CreateADualTokenGiftCardRequest,\n CreateASingleTokenGiftCardRequest,\n FetchRsaPublicKeyRequest,\n FetchTokenLimitRequest,\n RedeemABinanceGiftCardRequest,\n VerifyBinanceGiftCardByGiftCardNumberRequest,\n} from './modules/market-data-api';\n\nimport type {\n CreateADualTokenGiftCardResponse,\n CreateASingleTokenGiftCardResponse,\n FetchRsaPublicKeyResponse,\n FetchTokenLimitResponse,\n RedeemABinanceGiftCardResponse,\n VerifyBinanceGiftCardByGiftCardNumberResponse,\n} from './types';\n\nexport class RestAPI {\n private configuration: ConfigurationRestAPI;\n private marketDataApi: MarketDataApi;\n\n constructor(configuration: ConfigurationRestAPI) {\n this.configuration = configuration;\n this.marketDataApi = new MarketDataApi(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 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 undefined,\n { isSigned: true }\n );\n }\n\n /**\n * * This API is for creating a dual-token ( stablecoin-denominated) Binance Gift Card. You may create a gift card using USDT as baseToken, that is redeemable to another designated token (faceToken). For example, you can create a fixed-value BTC gift card and pay with 100 USDT plus minting fee. This gift card can keep the value fixed at 100 USDT before redemption, and will be redeemable to BTC equivalent to 100 USDT upon redemption.\n * Once successfully created, the amount of baseToken (e.g. USDT) in the fixed-value gift card along with the fee would be deducted from your funding wallet.\n *\n *\n * To get started with, please make sure:\n * You have a Binance account\n * You have passed KYB\n * You have a sufficient balance(Gift Card amount and fee amount) in your Binance funding wallet\n * You need Enable Withdrawals for the API Key which requests this endpoint.\n *\n * Weight: 1\n *\n * @summary Create a dual-token gift card(fixed value, discount feature)(TRADE)\n * @param {CreateADualTokenGiftCardRequest} requestParameters Request parameters.\n *\n * @returns {Promise<RestApiResponse<CreateADualTokenGiftCardResponse>>}\n * @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}\n * @see {@link https://developers.binance.com/docs/gift_card/market-data/Create-a-dual-token-gift-card Binance API Documentation}\n */\n createADualTokenGiftCard(\n requestParameters: CreateADualTokenGiftCardRequest\n ): Promise<RestApiResponse<CreateADualTokenGiftCardResponse>> {\n return this.marketDataApi.createADualTokenGiftCard(requestParameters);\n }\n\n /**\n * This API is for creating a Binance Gift Card.\n *\n * To get started with, please make sure:\n *\n * You have a Binance account\n * You have passed KYB\n * You have a sufficient balance(Gift Card amount and fee amount) in your Binance funding wallet\n * You need `Enable Withdrawals` for the API Key which requests this endpoint.\n *\n * Weight: 1\n *\n * @summary Create a single-token gift card (USER_DATA)\n * @param {CreateASingleTokenGiftCardRequest} requestParameters Request parameters.\n *\n * @returns {Promise<RestApiResponse<CreateASingleTokenGiftCardResponse>>}\n * @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}\n * @see {@link https://developers.binance.com/docs/gift_card/market-data/Create-a-single-token-gift-card Binance API Documentation}\n */\n createASingleTokenGiftCard(\n requestParameters: CreateASingleTokenGiftCardRequest\n ): Promise<RestApiResponse<CreateASingleTokenGiftCardResponse>> {\n return this.marketDataApi.createASingleTokenGiftCard(requestParameters);\n }\n\n /**\n * This API is for fetching the RSA Public Key.\n * This RSA Public key will be used to encrypt the card code.\n *\n **Please note that the RSA Public key fetched is valid only for the current day.**\n *\n * Weight: 1\n *\n * @summary Fetch RSA Public Key(USER_DATA)\n * @param {FetchRsaPublicKeyRequest} requestParameters Request parameters.\n *\n * @returns {Promise<RestApiResponse<FetchRsaPublicKeyResponse>>}\n * @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}\n * @see {@link https://developers.binance.com/docs/gift_card/market-data/Fetch-RSA-Public-Key Binance API Documentation}\n */\n fetchRsaPublicKey(\n requestParameters: FetchRsaPublicKeyRequest = {}\n ): Promise<RestApiResponse<FetchRsaPublicKeyResponse>> {\n return this.marketDataApi.fetchRsaPublicKey(requestParameters);\n }\n\n /**\n * This API is to help you verify which tokens are available for you to create Stablecoin-Denominated gift cards as mentioned in section 2 and its’ limitation.\n *\n * Weight: 1\n *\n * @summary Fetch Token Limit(USER_DATA)\n * @param {FetchTokenLimitRequest} requestParameters Request parameters.\n *\n * @returns {Promise<RestApiResponse<FetchTokenLimitResponse>>}\n * @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}\n * @see {@link https://developers.binance.com/docs/gift_card/market-data/Fetch-Token-Limit Binance API Documentation}\n */\n fetchTokenLimit(\n requestParameters: FetchTokenLimitRequest\n ): Promise<RestApiResponse<FetchTokenLimitResponse>> {\n return this.marketDataApi.fetchTokenLimit(requestParameters);\n }\n\n /**\n * This API is for redeeming a Binance Gift Card\n * Once redeemed, the coins will be deposited in your funding wallet.\n *\n * Parameter code can be sent in two formats:\n * Plaintext\n * Encrypted\n *\n * Sending code in Encrypted format provides more security than sending it as a plaintext. To send card code in encrypted format the following steps must be followed:\n * Fetch RSA public key from api stated below.\n * Use the below algorithm to encrypt the card code using the RSA public key fetched above: `RSA/ECB/OAEPWithSHA-256AndMGF1Padding`\n **A sample code snippet (JAVA) is stated below for reference, the same approach can be used for different languages like C#, PERL, PYTHON, SHELL etc.:**\n *\n * Weight: 1\n *\n * @summary Redeem a Binance Gift Card(USER_DATA)\n * @param {RedeemABinanceGiftCardRequest} requestParameters Request parameters.\n *\n * @returns {Promise<RestApiResponse<RedeemABinanceGiftCardResponse>>}\n * @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}\n * @see {@link https://developers.binance.com/docs/gift_card/market-data/Redeem-a-Binance-Gift-Card Binance API Documentation}\n */\n redeemABinanceGiftCard(\n requestParameters: RedeemABinanceGiftCardRequest\n ): Promise<RestApiResponse<RedeemABinanceGiftCardResponse>> {\n return this.marketDataApi.redeemABinanceGiftCard(requestParameters);\n }\n\n /**\n * This API is for verifying whether the Binance Gift Card is valid or not by entering Gift Card Number.\n *\n **Please note that if you enter the wrong Gift Card Number 5 times within an hour, you will no longer be able to verify any Gift Card Number for that hour.**\n *\n * Weight: 1\n *\n * @summary Verify Binance Gift Card by Gift Card Number(USER_DATA)\n * @param {VerifyBinanceGiftCardByGiftCardNumberRequest} requestParameters Request parameters.\n *\n * @returns {Promise<RestApiResponse<VerifyBinanceGiftCardByGiftCardNumberResponse>>}\n * @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}\n * @see {@link https://developers.binance.com/docs/gift_card/market-data/Verify-Binance-Gift-Card-by-Gift-Card-Number Binance API Documentation}\n */\n verifyBinanceGiftCardByGiftCardNumber(\n requestParameters: VerifyBinanceGiftCardByGiftCardNumberRequest\n ): Promise<RestApiResponse<VerifyBinanceGiftCardByGiftCardNumberResponse>> {\n return this.marketDataApi.verifyBinanceGiftCardByGiftCardNumber(requestParameters);\n }\n}\n","/**\n * Binance Gift Card REST API\n *\n * OpenAPI Specification for the Binance Gift Card 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, GIFT_CARD_REST_API_PROD_URL } from '@binance/common';\nimport { name, version } from '../package.json';\nimport { RestAPI } from './rest-api';\n\nexport interface ConfigurationGiftCard {\n configurationRestAPI?: ConfigurationRestAPI;\n}\n\nexport class GiftCard {\n public restAPI!: RestAPI;\n\n constructor(config: ConfigurationGiftCard) {\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 || GIFT_CARD_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;;;;;;;;;;;;;;;;;;;AC8Bf,MAAM,iCAAiC,SAAU,eAAqC;AAClF,QAAO;EAsBH,0BAA0B,OACtB,WACA,WACA,iBACA,eACuB;AAEvB,qBAAkB,4BAA4B,aAAa,UAAU;AAErE,qBAAkB,4BAA4B,aAAa,UAAU;AAErE,qBAAkB,4BAA4B,mBAAmB,gBAAgB;GAEjF,MAAMA,yBAAkD,EAAE;GAC1D,MAAMC,wBAAiD,EAAE;GACzD,MAAMC,0BAAmD,EAAE;AAE3D,OAAI,cAAc,UAAa,cAAc,KACzC,wBAAuB,eAAe;AAE1C,OAAI,cAAc,UAAa,cAAc,KACzC,wBAAuB,eAAe;AAE1C,OAAI,oBAAoB,UAAa,oBAAoB,KACrD,wBAAuB,qBAAqB;AAEhD,OAAI,eAAe,UAAa,eAAe,KAC3C,wBAAuB,gBAAgB;GAG3C,IAAIC;AACJ,OAAI,cAAc,cAAe,aAAY,cAAc;AAE3D,UAAO;IACH,UAAU;IACV,QAAQ;IACR,aAAa;IACb,YAAY;IACZ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ACtB,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/giftcard",
3
3
  "description": "Official Binance Gift Card Connector - A lightweight library that provides a convenient interface to Binance's Gift Card REST API.",
4
- "version": "4.1.14",
4
+ "version": "4.1.16",
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.13",
59
+ "@binance/common": "2.4.0",
60
60
  "axios": "^1.7.4"
61
61
  }
62
62
  }