@binance/giftcard 5.0.1 → 5.0.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
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 = "5.0.1";
17
+ var version = "5.0.2";
18
18
 
19
19
  //#endregion
20
20
  //#region src/rest-api/modules/market-data-api.ts
package/dist/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","names":["localVarQueryParameter: Record<string, unknown>","localVarBodyParameter: Record<string, unknown>","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\": \"5.0.1\",\n \"main\": \"./dist/index.js\",\n \"module\": \"./dist/index.mjs\",\n \"types\": \"./dist/index.d.ts\",\n \"exports\": {\n \".\": {\n \"require\": \"./dist/index.js\",\n \"import\": \"./dist/index.mjs\"\n }\n },\n \"scripts\": {\n \"prepublishOnly\": \"npm run build\",\n \"build\": \"npm run clean && tsdown\",\n \"typecheck\": \"tsc --noEmit\",\n \"clean\": \"rm -rf dist\",\n \"test\": \"npx jest --maxWorkers=4 --bail\",\n \"test:watch\": \"npx jest --watch\",\n \"format\": \"npx prettier --ignore-path .prettierignore --write .\",\n \"lint\": \"npx eslint '**/*.ts' --fix\"\n },\n \"keywords\": [\n \"Binance\",\n \"API\",\n \"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.5.8\",\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.5\",\n \"axios\": \"^1.7.4\"\n }\n}\n","/**\n * Gift Card REST API\n *\n * Create, redeem, and check the value of Binance crypto gift cards.\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 */\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\n * using USDT as baseToken, that is redeemable to another designated token (faceToken). For example, you can create\n * a fixed-value BTC gift card and pay with 100 USDT plus minting fee. This gift card can keep the value fixed at\n * 100 USDT before redemption, and will be redeemable to BTC equivalent to 100 USDT upon redemption.\n *\n * Once successfully created, the amount of baseToken (e.g. USDT) in the fixed-value gift card along with the fee\n * would be deducted from your funding wallet.\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(IP): 1\n *\n * Security Type: TRADE\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\n * 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 * 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(IP): 1\n *\n * Security Type: USER_DATA\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(IP): 1\n *\n * Security Type: USER_DATA\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\n * mentioned in section 2 and its’ limitation.\n *\n * Weight(IP): 1\n *\n * Security Type: USER_DATA\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. Once redeemed, the coins will be deposited in your funding wallet.\n *\n * Weight(IP): 1\n *\n * Security Type: USER_DATA\n *\n * Notes:\n * - Parameter `code` can be sent in two formats: `Plaintext` and `Encrypted`.\n * - Sending `code` in encrypted format is more secure than plaintext.\n * - To send encrypted `code`:\n * - Fetch RSA public key from `GET /sapi/v1/giftcard/cryptography/rsa-public-key`.\n * - Encrypt card code using `RSA/ECB/OAEPWithSHA-256AndMGF1Padding`.\n * - If you enter the wrong redemption code 5 times within 24 hours, you will no longer be able to redeem any Binance Gift Cards that day.\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\n * identify the redemption behavior of different users, such as redemption frequency and amount. It\n * also helps risk and limit control of a single account, such as daily limit on redemption volume,\n * frequency, and incorrect number of entries. This will also prevent a single user account reach the\n * partner's daily redemption limits. We strongly recommend you to use this feature and transfer us the\n * User ID of your users if you have different users redeeming Binance Gift Cards on your platform. To\n * protect user data privacy, you may choose to transfer the user id in any desired format (max. 400\n * 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\n * verify any Gift Card Number for that hour.**\n *\n * Weight(IP): 1\n *\n * Security Type: USER_DATA\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\n * using USDT as baseToken, that is redeemable to another designated token (faceToken). For example, you can create\n * a fixed-value BTC gift card and pay with 100 USDT plus minting fee. This gift card can keep the value fixed at\n * 100 USDT before redemption, and will be redeemable to BTC equivalent to 100 USDT upon redemption.\n *\n * Once successfully created, the amount of baseToken (e.g. USDT) in the fixed-value gift card along with the fee\n * would be deducted from your funding wallet.\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(IP): 1\n *\n * Security Type: TRADE\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 * 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(IP): 1\n *\n * Security Type: USER_DATA\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(IP): 1\n *\n * Security Type: USER_DATA\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\n * mentioned in section 2 and its’ limitation.\n *\n * Weight(IP): 1\n *\n * Security Type: USER_DATA\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. Once redeemed, the coins will be deposited in your funding wallet.\n *\n * Weight(IP): 1\n *\n * Security Type: USER_DATA\n *\n * Notes:\n * - Parameter `code` can be sent in two formats: `Plaintext` and `Encrypted`.\n * - Sending `code` in encrypted format is more secure than plaintext.\n * - To send encrypted `code`:\n * - Fetch RSA public key from `GET /sapi/v1/giftcard/cryptography/rsa-public-key`.\n * - Encrypt card code using `RSA/ECB/OAEPWithSHA-256AndMGF1Padding`.\n * - If you enter the wrong redemption code 5 times within 24 hours, you will no longer be able to redeem any Binance Gift Cards that day.\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\n * verify any Gift Card Number for that hour.**\n *\n * Weight(IP): 1\n *\n * Security Type: USER_DATA\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\n * 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\n * identify the redemption behavior of different users, such as redemption frequency and amount. It\n * also helps risk and limit control of a single account, such as daily limit on redemption volume,\n * frequency, and incorrect number of entries. This will also prevent a single user account reach the\n * partner's daily redemption limits. We strongly recommend you to use this feature and transfer us the\n * User ID of your users if you have different users redeeming Binance Gift Cards on your platform. To\n * protect user data privacy, you may choose to transfer the user id in any desired format (max. 400\n * 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\n * using USDT as baseToken, that is redeemable to another designated token (faceToken). For example, you can create\n * a fixed-value BTC gift card and pay with 100 USDT plus minting fee. This gift card can keep the value fixed at\n * 100 USDT before redemption, and will be redeemable to BTC equivalent to 100 USDT upon redemption.\n *\n * Once successfully created, the amount of baseToken (e.g. USDT) in the fixed-value gift card along with the fee\n * would be deducted from your funding wallet.\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(IP): 1\n *\n * Security Type: TRADE\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/en/docs/catalog/investment-and-services-gift-card/api/rest-api/market-data#create-adual-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 * 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(IP): 1\n *\n * Security Type: USER_DATA\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/en/docs/catalog/investment-and-services-gift-card/api/rest-api/market-data#create-asingle-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(IP): 1\n *\n * Security Type: USER_DATA\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/en/docs/catalog/investment-and-services-gift-card/api/rest-api/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\n * mentioned in section 2 and its’ limitation.\n *\n * Weight(IP): 1\n *\n * Security Type: USER_DATA\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/en/docs/catalog/investment-and-services-gift-card/api/rest-api/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. Once redeemed, the coins will be deposited in your funding wallet.\n *\n * Weight(IP): 1\n *\n * Security Type: USER_DATA\n *\n * Notes:\n * - Parameter `code` can be sent in two formats: `Plaintext` and `Encrypted`.\n * - Sending `code` in encrypted format is more secure than plaintext.\n * - To send encrypted `code`:\n * - Fetch RSA public key from `GET /sapi/v1/giftcard/cryptography/rsa-public-key`.\n * - Encrypt card code using `RSA/ECB/OAEPWithSHA-256AndMGF1Padding`.\n * - If you enter the wrong redemption code 5 times within 24 hours, you will no longer be able to redeem any Binance Gift Cards that day.\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/en/docs/catalog/investment-and-services-gift-card/api/rest-api/market-data#redeem-abinance-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\n * verify any Gift Card Number for that hour.**\n *\n * Weight(IP): 1\n *\n * Security Type: USER_DATA\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/en/docs/catalog/investment-and-services-gift-card/api/rest-api/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 * Gift Card REST API\n *\n * Create, redeem, and check the value of Binance crypto gift cards.\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\n * using USDT as baseToken, that is redeemable to another designated token (faceToken). For example, you can create\n * a fixed-value BTC gift card and pay with 100 USDT plus minting fee. This gift card can keep the value fixed at\n * 100 USDT before redemption, and will be redeemable to BTC equivalent to 100 USDT upon redemption.\n *\n * Once successfully created, the amount of baseToken (e.g. USDT) in the fixed-value gift card along with the fee\n * would be deducted from your funding wallet.\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(IP): 1\n *\n * Security Type: TRADE\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/en/docs/catalog/investment-and-services-gift-card/api/rest-api/market-data#create-adual-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 * 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(IP): 1\n *\n * Security Type: USER_DATA\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/en/docs/catalog/investment-and-services-gift-card/api/rest-api/market-data#create-asingle-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(IP): 1\n *\n * Security Type: USER_DATA\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/en/docs/catalog/investment-and-services-gift-card/api/rest-api/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\n * mentioned in section 2 and its’ limitation.\n *\n * Weight(IP): 1\n *\n * Security Type: USER_DATA\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/en/docs/catalog/investment-and-services-gift-card/api/rest-api/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. Once redeemed, the coins will be deposited in your funding wallet.\n *\n * Weight(IP): 1\n *\n * Security Type: USER_DATA\n *\n * Notes:\n * - Parameter `code` can be sent in two formats: `Plaintext` and `Encrypted`.\n * - Sending `code` in encrypted format is more secure than plaintext.\n * - To send encrypted `code`:\n * - Fetch RSA public key from `GET /sapi/v1/giftcard/cryptography/rsa-public-key`.\n * - Encrypt card code using `RSA/ECB/OAEPWithSHA-256AndMGF1Padding`.\n * - If you enter the wrong redemption code 5 times within 24 hours, you will no longer be able to redeem any Binance Gift Cards that day.\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/en/docs/catalog/investment-and-services-gift-card/api/rest-api/market-data#redeem-abinance-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\n * verify any Gift Card Number for that hour.**\n *\n * Weight(IP): 1\n *\n * Security Type: USER_DATA\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/en/docs/catalog/investment-and-services-gift-card/api/rest-api/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 * Gift Card REST API\n *\n * Create, redeem, and check the value of Binance crypto gift cards.\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;;;;;;;;;;;;;;;;;;;AC6Bf,MAAM,iCAAiC,SAAU,eAAqC;AAClF,QAAO;EA4BH,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;AACJ,OAAI,cAAc,cAAe,aAAY,cAAc;AAE3D,UAAO;IACH,UAAU;IACV,QAAQ;IACR,aAAa;IACb,YAAY;IACZ,cAAc;IACd,UAAU;IACb;;EAsBL,4BAA4B,OACxB,OACA,QACA,eACuB;AAEvB,2CAAkB,8BAA8B,SAAS,MAAM;AAE/D,2CAAkB,8BAA8B,UAAU,OAAO;GAEjE,MAAMH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;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\": \"5.0.2\",\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.5.8\",\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.6\",\n \"axios\": \"^1.7.4\"\n }\n}\n","/**\n * Gift Card REST API\n *\n * Create, redeem, and check the value of Binance crypto gift cards.\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 */\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\n * using USDT as baseToken, that is redeemable to another designated token (faceToken). For example, you can create\n * a fixed-value BTC gift card and pay with 100 USDT plus minting fee. This gift card can keep the value fixed at\n * 100 USDT before redemption, and will be redeemable to BTC equivalent to 100 USDT upon redemption.\n *\n * Once successfully created, the amount of baseToken (e.g. USDT) in the fixed-value gift card along with the fee\n * would be deducted from your funding wallet.\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(IP): 1\n *\n * Security Type: TRADE\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\n * 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 * 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(IP): 1\n *\n * Security Type: USER_DATA\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(IP): 1\n *\n * Security Type: USER_DATA\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\n * mentioned in section 2 and its’ limitation.\n *\n * Weight(IP): 1\n *\n * Security Type: USER_DATA\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. Once redeemed, the coins will be deposited in your funding wallet.\n *\n * Weight(IP): 1\n *\n * Security Type: USER_DATA\n *\n * Notes:\n * - Parameter `code` can be sent in two formats: `Plaintext` and `Encrypted`.\n * - Sending `code` in encrypted format is more secure than plaintext.\n * - To send encrypted `code`:\n * - Fetch RSA public key from `GET /sapi/v1/giftcard/cryptography/rsa-public-key`.\n * - Encrypt card code using `RSA/ECB/OAEPWithSHA-256AndMGF1Padding`.\n * - If you enter the wrong redemption code 5 times within 24 hours, you will no longer be able to redeem any Binance Gift Cards that day.\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\n * identify the redemption behavior of different users, such as redemption frequency and amount. It\n * also helps risk and limit control of a single account, such as daily limit on redemption volume,\n * frequency, and incorrect number of entries. This will also prevent a single user account reach the\n * partner's daily redemption limits. We strongly recommend you to use this feature and transfer us the\n * User ID of your users if you have different users redeeming Binance Gift Cards on your platform. To\n * protect user data privacy, you may choose to transfer the user id in any desired format (max. 400\n * 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\n * verify any Gift Card Number for that hour.**\n *\n * Weight(IP): 1\n *\n * Security Type: USER_DATA\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\n * using USDT as baseToken, that is redeemable to another designated token (faceToken). For example, you can create\n * a fixed-value BTC gift card and pay with 100 USDT plus minting fee. This gift card can keep the value fixed at\n * 100 USDT before redemption, and will be redeemable to BTC equivalent to 100 USDT upon redemption.\n *\n * Once successfully created, the amount of baseToken (e.g. USDT) in the fixed-value gift card along with the fee\n * would be deducted from your funding wallet.\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(IP): 1\n *\n * Security Type: TRADE\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 * 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(IP): 1\n *\n * Security Type: USER_DATA\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(IP): 1\n *\n * Security Type: USER_DATA\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\n * mentioned in section 2 and its’ limitation.\n *\n * Weight(IP): 1\n *\n * Security Type: USER_DATA\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. Once redeemed, the coins will be deposited in your funding wallet.\n *\n * Weight(IP): 1\n *\n * Security Type: USER_DATA\n *\n * Notes:\n * - Parameter `code` can be sent in two formats: `Plaintext` and `Encrypted`.\n * - Sending `code` in encrypted format is more secure than plaintext.\n * - To send encrypted `code`:\n * - Fetch RSA public key from `GET /sapi/v1/giftcard/cryptography/rsa-public-key`.\n * - Encrypt card code using `RSA/ECB/OAEPWithSHA-256AndMGF1Padding`.\n * - If you enter the wrong redemption code 5 times within 24 hours, you will no longer be able to redeem any Binance Gift Cards that day.\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\n * verify any Gift Card Number for that hour.**\n *\n * Weight(IP): 1\n *\n * Security Type: USER_DATA\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\n * 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\n * identify the redemption behavior of different users, such as redemption frequency and amount. It\n * also helps risk and limit control of a single account, such as daily limit on redemption volume,\n * frequency, and incorrect number of entries. This will also prevent a single user account reach the\n * partner's daily redemption limits. We strongly recommend you to use this feature and transfer us the\n * User ID of your users if you have different users redeeming Binance Gift Cards on your platform. To\n * protect user data privacy, you may choose to transfer the user id in any desired format (max. 400\n * 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\n * using USDT as baseToken, that is redeemable to another designated token (faceToken). For example, you can create\n * a fixed-value BTC gift card and pay with 100 USDT plus minting fee. This gift card can keep the value fixed at\n * 100 USDT before redemption, and will be redeemable to BTC equivalent to 100 USDT upon redemption.\n *\n * Once successfully created, the amount of baseToken (e.g. USDT) in the fixed-value gift card along with the fee\n * would be deducted from your funding wallet.\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(IP): 1\n *\n * Security Type: TRADE\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/en/docs/catalog/investment-and-services-gift-card/api/rest-api/market-data#create-adual-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 * 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(IP): 1\n *\n * Security Type: USER_DATA\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/en/docs/catalog/investment-and-services-gift-card/api/rest-api/market-data#create-asingle-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(IP): 1\n *\n * Security Type: USER_DATA\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/en/docs/catalog/investment-and-services-gift-card/api/rest-api/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\n * mentioned in section 2 and its’ limitation.\n *\n * Weight(IP): 1\n *\n * Security Type: USER_DATA\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/en/docs/catalog/investment-and-services-gift-card/api/rest-api/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. Once redeemed, the coins will be deposited in your funding wallet.\n *\n * Weight(IP): 1\n *\n * Security Type: USER_DATA\n *\n * Notes:\n * - Parameter `code` can be sent in two formats: `Plaintext` and `Encrypted`.\n * - Sending `code` in encrypted format is more secure than plaintext.\n * - To send encrypted `code`:\n * - Fetch RSA public key from `GET /sapi/v1/giftcard/cryptography/rsa-public-key`.\n * - Encrypt card code using `RSA/ECB/OAEPWithSHA-256AndMGF1Padding`.\n * - If you enter the wrong redemption code 5 times within 24 hours, you will no longer be able to redeem any Binance Gift Cards that day.\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/en/docs/catalog/investment-and-services-gift-card/api/rest-api/market-data#redeem-abinance-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\n * verify any Gift Card Number for that hour.**\n *\n * Weight(IP): 1\n *\n * Security Type: USER_DATA\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/en/docs/catalog/investment-and-services-gift-card/api/rest-api/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 * Gift Card REST API\n *\n * Create, redeem, and check the value of Binance crypto gift cards.\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\n * using USDT as baseToken, that is redeemable to another designated token (faceToken). For example, you can create\n * a fixed-value BTC gift card and pay with 100 USDT plus minting fee. This gift card can keep the value fixed at\n * 100 USDT before redemption, and will be redeemable to BTC equivalent to 100 USDT upon redemption.\n *\n * Once successfully created, the amount of baseToken (e.g. USDT) in the fixed-value gift card along with the fee\n * would be deducted from your funding wallet.\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(IP): 1\n *\n * Security Type: TRADE\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/en/docs/catalog/investment-and-services-gift-card/api/rest-api/market-data#create-adual-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 * 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(IP): 1\n *\n * Security Type: USER_DATA\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/en/docs/catalog/investment-and-services-gift-card/api/rest-api/market-data#create-asingle-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(IP): 1\n *\n * Security Type: USER_DATA\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/en/docs/catalog/investment-and-services-gift-card/api/rest-api/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\n * mentioned in section 2 and its’ limitation.\n *\n * Weight(IP): 1\n *\n * Security Type: USER_DATA\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/en/docs/catalog/investment-and-services-gift-card/api/rest-api/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. Once redeemed, the coins will be deposited in your funding wallet.\n *\n * Weight(IP): 1\n *\n * Security Type: USER_DATA\n *\n * Notes:\n * - Parameter `code` can be sent in two formats: `Plaintext` and `Encrypted`.\n * - Sending `code` in encrypted format is more secure than plaintext.\n * - To send encrypted `code`:\n * - Fetch RSA public key from `GET /sapi/v1/giftcard/cryptography/rsa-public-key`.\n * - Encrypt card code using `RSA/ECB/OAEPWithSHA-256AndMGF1Padding`.\n * - If you enter the wrong redemption code 5 times within 24 hours, you will no longer be able to redeem any Binance Gift Cards that day.\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/en/docs/catalog/investment-and-services-gift-card/api/rest-api/market-data#redeem-abinance-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\n * verify any Gift Card Number for that hour.**\n *\n * Weight(IP): 1\n *\n * Security Type: USER_DATA\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/en/docs/catalog/investment-and-services-gift-card/api/rest-api/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 * Gift Card REST API\n *\n * Create, redeem, and check the value of Binance crypto gift cards.\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;;;;;;;;;;;;;;;;;;;AC6Bf,MAAM,iCAAiC,SAAU,eAAqC;AAClF,QAAO;EA4BH,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;AACJ,OAAI,cAAc,cAAe,aAAY,cAAc;AAE3D,UAAO;IACH,UAAU;IACV,QAAQ;IACR,aAAa;IACb,YAAY;IACZ,cAAc;IACd,UAAU;IACb;;EAsBL,4BAA4B,OACxB,OACA,QACA,eACuB;AAEvB,2CAAkB,8BAA8B,SAAS,MAAM;AAE/D,2CAAkB,8BAA8B,UAAU,OAAO;GAEjE,MAAMH,yBAAkD,EAAE;GAC1D,MAAMC,wBAAiD,EAAE;GACzD,MAAMC,0BAAmD,EAAE;AAE3D,OAAI,UAAU,UAAa,UAAU,KACjC,wBAAuB,WAAW;AAEtC,OAAI,WAAW,UAAa,WAAW,KACnC,wBAAuB,YAAY;AAEvC,OAAI,eAAe,UAAa,eAAe,KAC3C,wBAAuB,gBAAgB;GAG3C,IAAIC;AACJ,OAAI,cAAc,cAAe,aA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ACA,cAAuC,EAAE,EACzC,aAAsC,EAAE,EACb;AAC3B,2CACI,KAAK,eACL,UACA,QACA,aACA,YACA,QACA,QACA,EAAE,UAAU,MAAM,CACrB;;;;;;;;;;;;;;;;;;;;;;;;;;;CA4BL,yBACI,mBAC0D;AAC1D,SAAO,KAAK,cAAc,yBAAyB,kBAAkB;;;;;;;;;;;;;;;;;;;;;;CAuBzE,2BACI,mBAC4D;AAC5D,SAAO,KAAK,cAAc,2BAA2B,kBAAkB;;;;;;;;;;;;;;;;;;;CAoB3E,kBACI,oBAA8C,EAAE,EACG;AACnD,SAAO,KAAK,cAAc,kBAAkB,kBAAkB;;;;;;;;;;;;;;;;;CAkBlE,gBACI,mBACiD;AACjD,SAAO,KAAK,cAAc,gBAAgB,kBAAkB;;;;;;;;;;;;;;;;;;;;;;;;CAyBhE,uBACI,mBACwD;AACxD,SAAO,KAAK,cAAc,uBAAuB,kBAAkB;;;;;;;;;;;;;;;;;;;CAoBvE,sCACI,mBACuE;AACvE,SAAO,KAAK,cAAc,sCAAsC,kBAAkB;;;;;;;;;;;;;AE7O1F,IAAa,WAAb,MAAsB;CAGlB,YAAY,QAA+B;EACvC,MAAM,iDAA2B,MAAM,QAAQ;AAE/C,MAAI,QAAQ,sBAAsB;GAC9B,MAAM,gBAAgB,IAAIC,sCACtB,OAAO,qBACV;AAGD,iBAAc,WAAW,cAAc,YAAYC;AACnD,iBAAc,cAAc,cAAc,eAAe,EAAE;AAC3D,iBAAc,YAAY,UAAU;IAChC,GAAI,cAAc,YAAY,WAAW,EAAE;IAC3C,cAAc;IACjB;AACD,QAAK,UAAU,IAAI,QAAQ,cAAc"}
package/dist/index.mjs CHANGED
@@ -3,7 +3,7 @@ import { BadRequestError, ConfigurationRestAPI, ConnectorClientError, ForbiddenE
3
3
 
4
4
  //#region package.json
5
5
  var name = "@binance/giftcard";
6
- var version = "5.0.1";
6
+ var version = "5.0.2";
7
7
 
8
8
  //#endregion
9
9
  //#region src/rest-api/modules/market-data-api.ts
@@ -1 +1 @@
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\": \"5.0.1\",\n \"main\": \"./dist/index.js\",\n \"module\": \"./dist/index.mjs\",\n \"types\": \"./dist/index.d.ts\",\n \"exports\": {\n \".\": {\n \"require\": \"./dist/index.js\",\n \"import\": \"./dist/index.mjs\"\n }\n },\n \"scripts\": {\n \"prepublishOnly\": \"npm run build\",\n \"build\": \"npm run clean && tsdown\",\n \"typecheck\": \"tsc --noEmit\",\n \"clean\": \"rm -rf dist\",\n \"test\": \"npx jest --maxWorkers=4 --bail\",\n \"test:watch\": \"npx jest --watch\",\n \"format\": \"npx prettier --ignore-path .prettierignore --write .\",\n \"lint\": \"npx eslint '**/*.ts' --fix\"\n },\n \"keywords\": [\n \"Binance\",\n \"API\",\n \"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.5.8\",\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.5\",\n \"axios\": \"^1.7.4\"\n }\n}\n","/**\n * Gift Card REST API\n *\n * Create, redeem, and check the value of Binance crypto gift cards.\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 */\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\n * using USDT as baseToken, that is redeemable to another designated token (faceToken). For example, you can create\n * a fixed-value BTC gift card and pay with 100 USDT plus minting fee. This gift card can keep the value fixed at\n * 100 USDT before redemption, and will be redeemable to BTC equivalent to 100 USDT upon redemption.\n *\n * Once successfully created, the amount of baseToken (e.g. USDT) in the fixed-value gift card along with the fee\n * would be deducted from your funding wallet.\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(IP): 1\n *\n * Security Type: TRADE\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\n * 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 * 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(IP): 1\n *\n * Security Type: USER_DATA\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(IP): 1\n *\n * Security Type: USER_DATA\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\n * mentioned in section 2 and its’ limitation.\n *\n * Weight(IP): 1\n *\n * Security Type: USER_DATA\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. Once redeemed, the coins will be deposited in your funding wallet.\n *\n * Weight(IP): 1\n *\n * Security Type: USER_DATA\n *\n * Notes:\n * - Parameter `code` can be sent in two formats: `Plaintext` and `Encrypted`.\n * - Sending `code` in encrypted format is more secure than plaintext.\n * - To send encrypted `code`:\n * - Fetch RSA public key from `GET /sapi/v1/giftcard/cryptography/rsa-public-key`.\n * - Encrypt card code using `RSA/ECB/OAEPWithSHA-256AndMGF1Padding`.\n * - If you enter the wrong redemption code 5 times within 24 hours, you will no longer be able to redeem any Binance Gift Cards that day.\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\n * identify the redemption behavior of different users, such as redemption frequency and amount. It\n * also helps risk and limit control of a single account, such as daily limit on redemption volume,\n * frequency, and incorrect number of entries. This will also prevent a single user account reach the\n * partner's daily redemption limits. We strongly recommend you to use this feature and transfer us the\n * User ID of your users if you have different users redeeming Binance Gift Cards on your platform. To\n * protect user data privacy, you may choose to transfer the user id in any desired format (max. 400\n * 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\n * verify any Gift Card Number for that hour.**\n *\n * Weight(IP): 1\n *\n * Security Type: USER_DATA\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\n * using USDT as baseToken, that is redeemable to another designated token (faceToken). For example, you can create\n * a fixed-value BTC gift card and pay with 100 USDT plus minting fee. This gift card can keep the value fixed at\n * 100 USDT before redemption, and will be redeemable to BTC equivalent to 100 USDT upon redemption.\n *\n * Once successfully created, the amount of baseToken (e.g. USDT) in the fixed-value gift card along with the fee\n * would be deducted from your funding wallet.\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(IP): 1\n *\n * Security Type: TRADE\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 * 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(IP): 1\n *\n * Security Type: USER_DATA\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(IP): 1\n *\n * Security Type: USER_DATA\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\n * mentioned in section 2 and its’ limitation.\n *\n * Weight(IP): 1\n *\n * Security Type: USER_DATA\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. Once redeemed, the coins will be deposited in your funding wallet.\n *\n * Weight(IP): 1\n *\n * Security Type: USER_DATA\n *\n * Notes:\n * - Parameter `code` can be sent in two formats: `Plaintext` and `Encrypted`.\n * - Sending `code` in encrypted format is more secure than plaintext.\n * - To send encrypted `code`:\n * - Fetch RSA public key from `GET /sapi/v1/giftcard/cryptography/rsa-public-key`.\n * - Encrypt card code using `RSA/ECB/OAEPWithSHA-256AndMGF1Padding`.\n * - If you enter the wrong redemption code 5 times within 24 hours, you will no longer be able to redeem any Binance Gift Cards that day.\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\n * verify any Gift Card Number for that hour.**\n *\n * Weight(IP): 1\n *\n * Security Type: USER_DATA\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\n * 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\n * identify the redemption behavior of different users, such as redemption frequency and amount. It\n * also helps risk and limit control of a single account, such as daily limit on redemption volume,\n * frequency, and incorrect number of entries. This will also prevent a single user account reach the\n * partner's daily redemption limits. We strongly recommend you to use this feature and transfer us the\n * User ID of your users if you have different users redeeming Binance Gift Cards on your platform. To\n * protect user data privacy, you may choose to transfer the user id in any desired format (max. 400\n * 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\n * using USDT as baseToken, that is redeemable to another designated token (faceToken). For example, you can create\n * a fixed-value BTC gift card and pay with 100 USDT plus minting fee. This gift card can keep the value fixed at\n * 100 USDT before redemption, and will be redeemable to BTC equivalent to 100 USDT upon redemption.\n *\n * Once successfully created, the amount of baseToken (e.g. USDT) in the fixed-value gift card along with the fee\n * would be deducted from your funding wallet.\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(IP): 1\n *\n * Security Type: TRADE\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/en/docs/catalog/investment-and-services-gift-card/api/rest-api/market-data#create-adual-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 * 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(IP): 1\n *\n * Security Type: USER_DATA\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/en/docs/catalog/investment-and-services-gift-card/api/rest-api/market-data#create-asingle-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(IP): 1\n *\n * Security Type: USER_DATA\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/en/docs/catalog/investment-and-services-gift-card/api/rest-api/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\n * mentioned in section 2 and its’ limitation.\n *\n * Weight(IP): 1\n *\n * Security Type: USER_DATA\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/en/docs/catalog/investment-and-services-gift-card/api/rest-api/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. Once redeemed, the coins will be deposited in your funding wallet.\n *\n * Weight(IP): 1\n *\n * Security Type: USER_DATA\n *\n * Notes:\n * - Parameter `code` can be sent in two formats: `Plaintext` and `Encrypted`.\n * - Sending `code` in encrypted format is more secure than plaintext.\n * - To send encrypted `code`:\n * - Fetch RSA public key from `GET /sapi/v1/giftcard/cryptography/rsa-public-key`.\n * - Encrypt card code using `RSA/ECB/OAEPWithSHA-256AndMGF1Padding`.\n * - If you enter the wrong redemption code 5 times within 24 hours, you will no longer be able to redeem any Binance Gift Cards that day.\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/en/docs/catalog/investment-and-services-gift-card/api/rest-api/market-data#redeem-abinance-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\n * verify any Gift Card Number for that hour.**\n *\n * Weight(IP): 1\n *\n * Security Type: USER_DATA\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/en/docs/catalog/investment-and-services-gift-card/api/rest-api/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 * Gift Card REST API\n *\n * Create, redeem, and check the value of Binance crypto gift cards.\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\n * using USDT as baseToken, that is redeemable to another designated token (faceToken). For example, you can create\n * a fixed-value BTC gift card and pay with 100 USDT plus minting fee. This gift card can keep the value fixed at\n * 100 USDT before redemption, and will be redeemable to BTC equivalent to 100 USDT upon redemption.\n *\n * Once successfully created, the amount of baseToken (e.g. USDT) in the fixed-value gift card along with the fee\n * would be deducted from your funding wallet.\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(IP): 1\n *\n * Security Type: TRADE\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/en/docs/catalog/investment-and-services-gift-card/api/rest-api/market-data#create-adual-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 * 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(IP): 1\n *\n * Security Type: USER_DATA\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/en/docs/catalog/investment-and-services-gift-card/api/rest-api/market-data#create-asingle-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(IP): 1\n *\n * Security Type: USER_DATA\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/en/docs/catalog/investment-and-services-gift-card/api/rest-api/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\n * mentioned in section 2 and its’ limitation.\n *\n * Weight(IP): 1\n *\n * Security Type: USER_DATA\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/en/docs/catalog/investment-and-services-gift-card/api/rest-api/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. Once redeemed, the coins will be deposited in your funding wallet.\n *\n * Weight(IP): 1\n *\n * Security Type: USER_DATA\n *\n * Notes:\n * - Parameter `code` can be sent in two formats: `Plaintext` and `Encrypted`.\n * - Sending `code` in encrypted format is more secure than plaintext.\n * - To send encrypted `code`:\n * - Fetch RSA public key from `GET /sapi/v1/giftcard/cryptography/rsa-public-key`.\n * - Encrypt card code using `RSA/ECB/OAEPWithSHA-256AndMGF1Padding`.\n * - If you enter the wrong redemption code 5 times within 24 hours, you will no longer be able to redeem any Binance Gift Cards that day.\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/en/docs/catalog/investment-and-services-gift-card/api/rest-api/market-data#redeem-abinance-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\n * verify any Gift Card Number for that hour.**\n *\n * Weight(IP): 1\n *\n * Security Type: USER_DATA\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/en/docs/catalog/investment-and-services-gift-card/api/rest-api/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 * Gift Card REST API\n *\n * Create, redeem, and check the value of Binance crypto gift cards.\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 ...(configRest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E,EACb;AAC3B,SAAO,YACH,KAAK,eACL,UACA,QACA,aACA,YACA,QACA,QACA,EAAE,UAAU,MAAM,CACrB;;;;;;;;;;;;;;;;;;;;;;;;;;;CA4BL,yBACI,mBAC0D;AAC1D,SAAO,KAAK,cAAc,yBAAyB,kBAAkB;;;;;;;;;;;;;;;;;;;;;;CAuBzE,2BACI,mBAC4D;AAC5D,SAAO,KAAK,cAAc,2BAA2B,kBAAkB;;;;;;;;;;;;;;;;;;;CAoB3E,kBACI,oBAA8C,EAAE,EACG;AACnD,SAAO,KAAK,cAAc,kBAAkB,kBAAkB;;;;;;;;;;;;;;;;;CAkBlE,gBACI,mBACiD;AACjD,SAAO,KAAK,cAAc,gBAAgB,kBAAkB;;;;;;;;;;;;;;;;;;;;;;;;CAyBhE,uBACI,mBACwD;AACxD,SAAO,KAAK,cAAc,uBAAuB,kBAAkB;;;;;;;;;;;;;;;;;;;CAoBvE,sCACI,mBACuE;AACvE,SAAO,KAAK,cAAc,sCAAsC,kBAAkB;;;;;;;;;;;;;AE7O1F,IAAa,WAAb,MAAsB;CAGlB,YAAY,QAA+B;EACvC,MAAM,YAAY,eAAe,MAAM,QAAQ;AAE/C,MAAI,QAAQ,sBAAsB;GAC9B,MAAM,gBAAgB,IAAI,qBACtB,OAAO,qBACV;AAGD,iBAAc,WAAW,cAAc,YAAYC;AACnD,iBAAc,cAAc,cAAc,eAAe,EAAE;AAC3D,iBAAc,YAAY,UAAU;IAChC,GAAI,cAAc,YAAY,WAAW,EAAE;IAC3C,cAAc;IACjB;AACD,QAAK,UAAU,IAAI,QAAQ,cAAc"}
1
+ {"version":3,"file":"index.mjs","names":["localVarQueryParameter: Record<string, unknown>","localVarBodyParameter: Record<string, unknown>","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\": \"5.0.2\",\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.5.8\",\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.6\",\n \"axios\": \"^1.7.4\"\n }\n}\n","/**\n * Gift Card REST API\n *\n * Create, redeem, and check the value of Binance crypto gift cards.\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 */\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\n * using USDT as baseToken, that is redeemable to another designated token (faceToken). For example, you can create\n * a fixed-value BTC gift card and pay with 100 USDT plus minting fee. This gift card can keep the value fixed at\n * 100 USDT before redemption, and will be redeemable to BTC equivalent to 100 USDT upon redemption.\n *\n * Once successfully created, the amount of baseToken (e.g. USDT) in the fixed-value gift card along with the fee\n * would be deducted from your funding wallet.\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(IP): 1\n *\n * Security Type: TRADE\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\n * 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 * 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(IP): 1\n *\n * Security Type: USER_DATA\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(IP): 1\n *\n * Security Type: USER_DATA\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\n * mentioned in section 2 and its’ limitation.\n *\n * Weight(IP): 1\n *\n * Security Type: USER_DATA\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. Once redeemed, the coins will be deposited in your funding wallet.\n *\n * Weight(IP): 1\n *\n * Security Type: USER_DATA\n *\n * Notes:\n * - Parameter `code` can be sent in two formats: `Plaintext` and `Encrypted`.\n * - Sending `code` in encrypted format is more secure than plaintext.\n * - To send encrypted `code`:\n * - Fetch RSA public key from `GET /sapi/v1/giftcard/cryptography/rsa-public-key`.\n * - Encrypt card code using `RSA/ECB/OAEPWithSHA-256AndMGF1Padding`.\n * - If you enter the wrong redemption code 5 times within 24 hours, you will no longer be able to redeem any Binance Gift Cards that day.\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\n * identify the redemption behavior of different users, such as redemption frequency and amount. It\n * also helps risk and limit control of a single account, such as daily limit on redemption volume,\n * frequency, and incorrect number of entries. This will also prevent a single user account reach the\n * partner's daily redemption limits. We strongly recommend you to use this feature and transfer us the\n * User ID of your users if you have different users redeeming Binance Gift Cards on your platform. To\n * protect user data privacy, you may choose to transfer the user id in any desired format (max. 400\n * 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\n * verify any Gift Card Number for that hour.**\n *\n * Weight(IP): 1\n *\n * Security Type: USER_DATA\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\n * using USDT as baseToken, that is redeemable to another designated token (faceToken). For example, you can create\n * a fixed-value BTC gift card and pay with 100 USDT plus minting fee. This gift card can keep the value fixed at\n * 100 USDT before redemption, and will be redeemable to BTC equivalent to 100 USDT upon redemption.\n *\n * Once successfully created, the amount of baseToken (e.g. USDT) in the fixed-value gift card along with the fee\n * would be deducted from your funding wallet.\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(IP): 1\n *\n * Security Type: TRADE\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 * 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(IP): 1\n *\n * Security Type: USER_DATA\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(IP): 1\n *\n * Security Type: USER_DATA\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\n * mentioned in section 2 and its’ limitation.\n *\n * Weight(IP): 1\n *\n * Security Type: USER_DATA\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. Once redeemed, the coins will be deposited in your funding wallet.\n *\n * Weight(IP): 1\n *\n * Security Type: USER_DATA\n *\n * Notes:\n * - Parameter `code` can be sent in two formats: `Plaintext` and `Encrypted`.\n * - Sending `code` in encrypted format is more secure than plaintext.\n * - To send encrypted `code`:\n * - Fetch RSA public key from `GET /sapi/v1/giftcard/cryptography/rsa-public-key`.\n * - Encrypt card code using `RSA/ECB/OAEPWithSHA-256AndMGF1Padding`.\n * - If you enter the wrong redemption code 5 times within 24 hours, you will no longer be able to redeem any Binance Gift Cards that day.\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\n * verify any Gift Card Number for that hour.**\n *\n * Weight(IP): 1\n *\n * Security Type: USER_DATA\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\n * 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\n * identify the redemption behavior of different users, such as redemption frequency and amount. It\n * also helps risk and limit control of a single account, such as daily limit on redemption volume,\n * frequency, and incorrect number of entries. This will also prevent a single user account reach the\n * partner's daily redemption limits. We strongly recommend you to use this feature and transfer us the\n * User ID of your users if you have different users redeeming Binance Gift Cards on your platform. To\n * protect user data privacy, you may choose to transfer the user id in any desired format (max. 400\n * 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\n * using USDT as baseToken, that is redeemable to another designated token (faceToken). For example, you can create\n * a fixed-value BTC gift card and pay with 100 USDT plus minting fee. This gift card can keep the value fixed at\n * 100 USDT before redemption, and will be redeemable to BTC equivalent to 100 USDT upon redemption.\n *\n * Once successfully created, the amount of baseToken (e.g. USDT) in the fixed-value gift card along with the fee\n * would be deducted from your funding wallet.\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(IP): 1\n *\n * Security Type: TRADE\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/en/docs/catalog/investment-and-services-gift-card/api/rest-api/market-data#create-adual-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 * 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(IP): 1\n *\n * Security Type: USER_DATA\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/en/docs/catalog/investment-and-services-gift-card/api/rest-api/market-data#create-asingle-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(IP): 1\n *\n * Security Type: USER_DATA\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/en/docs/catalog/investment-and-services-gift-card/api/rest-api/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\n * mentioned in section 2 and its’ limitation.\n *\n * Weight(IP): 1\n *\n * Security Type: USER_DATA\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/en/docs/catalog/investment-and-services-gift-card/api/rest-api/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. Once redeemed, the coins will be deposited in your funding wallet.\n *\n * Weight(IP): 1\n *\n * Security Type: USER_DATA\n *\n * Notes:\n * - Parameter `code` can be sent in two formats: `Plaintext` and `Encrypted`.\n * - Sending `code` in encrypted format is more secure than plaintext.\n * - To send encrypted `code`:\n * - Fetch RSA public key from `GET /sapi/v1/giftcard/cryptography/rsa-public-key`.\n * - Encrypt card code using `RSA/ECB/OAEPWithSHA-256AndMGF1Padding`.\n * - If you enter the wrong redemption code 5 times within 24 hours, you will no longer be able to redeem any Binance Gift Cards that day.\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/en/docs/catalog/investment-and-services-gift-card/api/rest-api/market-data#redeem-abinance-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\n * verify any Gift Card Number for that hour.**\n *\n * Weight(IP): 1\n *\n * Security Type: USER_DATA\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/en/docs/catalog/investment-and-services-gift-card/api/rest-api/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 * Gift Card REST API\n *\n * Create, redeem, and check the value of Binance crypto gift cards.\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\n * using USDT as baseToken, that is redeemable to another designated token (faceToken). For example, you can create\n * a fixed-value BTC gift card and pay with 100 USDT plus minting fee. This gift card can keep the value fixed at\n * 100 USDT before redemption, and will be redeemable to BTC equivalent to 100 USDT upon redemption.\n *\n * Once successfully created, the amount of baseToken (e.g. USDT) in the fixed-value gift card along with the fee\n * would be deducted from your funding wallet.\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(IP): 1\n *\n * Security Type: TRADE\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/en/docs/catalog/investment-and-services-gift-card/api/rest-api/market-data#create-adual-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 * 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(IP): 1\n *\n * Security Type: USER_DATA\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/en/docs/catalog/investment-and-services-gift-card/api/rest-api/market-data#create-asingle-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(IP): 1\n *\n * Security Type: USER_DATA\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/en/docs/catalog/investment-and-services-gift-card/api/rest-api/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\n * mentioned in section 2 and its’ limitation.\n *\n * Weight(IP): 1\n *\n * Security Type: USER_DATA\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/en/docs/catalog/investment-and-services-gift-card/api/rest-api/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. Once redeemed, the coins will be deposited in your funding wallet.\n *\n * Weight(IP): 1\n *\n * Security Type: USER_DATA\n *\n * Notes:\n * - Parameter `code` can be sent in two formats: `Plaintext` and `Encrypted`.\n * - Sending `code` in encrypted format is more secure than plaintext.\n * - To send encrypted `code`:\n * - Fetch RSA public key from `GET /sapi/v1/giftcard/cryptography/rsa-public-key`.\n * - Encrypt card code using `RSA/ECB/OAEPWithSHA-256AndMGF1Padding`.\n * - If you enter the wrong redemption code 5 times within 24 hours, you will no longer be able to redeem any Binance Gift Cards that day.\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/en/docs/catalog/investment-and-services-gift-card/api/rest-api/market-data#redeem-abinance-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\n * verify any Gift Card Number for that hour.**\n *\n * Weight(IP): 1\n *\n * Security Type: USER_DATA\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/en/docs/catalog/investment-and-services-gift-card/api/rest-api/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 * Gift Card REST API\n *\n * Create, redeem, and check the value of Binance crypto gift cards.\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;;;;;;;;;;;;;;;;;;;AC6Bf,MAAM,iCAAiC,SAAU,eAAqC;AAClF,QAAO;EA4BH,0BAA0B,OACtB,WACA,WACA,iBACA,eACuB;AAEvB,qBAAkB,4BAA4B,aAAa,UAAU;A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,2BAA2B,kBAAkB;;;;;;;;;;;;;;;;;;;CAoB3E,kBACI,oBAA8C,EAAE,EACG;AACnD,SAAO,KAAK,cAAc,kBAAkB,kBAAkB;;;;;;;;;;;;;;;;;CAkBlE,gBACI,mBACiD;AACjD,SAAO,KAAK,cAAc,gBAAgB,kBAAkB;;;;;;;;;;;;;;;;;;;;;;;;CAyBhE,uBACI,mBACwD;AACxD,SAAO,KAAK,cAAc,uBAAuB,kBAAkB;;;;;;;;;;;;;;;;;;;CAoBvE,sCACI,mBACuE;AACvE,SAAO,KAAK,cAAc,sCAAsC,kBAAkB;;;;;;;;;;;;;AE7O1F,IAAa,WAAb,MAAsB;CAGlB,YAAY,QAA+B;EACvC,MAAM,YAAY,eAAe,MAAM,QAAQ;AAE/C,MAAI,QAAQ,sBAAsB;GAC9B,MAAM,gBAAgB,IAAI,qBACtB,OAAO,qBACV;AAGD,iBAAc,WAAW,cAAc,YAAYC;AACnD,iBAAc,cAAc,cAAc,eAAe,EAAE;AAC3D,iBAAc,YAAY,UAAU;IAChC,GAAI,cAAc,YAAY,WAAW,EAAE;IAC3C,cAAc;IACjB;AACD,QAAK,UAAU,IAAI,QAAQ,cAAc"}
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@binance/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": "5.0.1",
4
+ "version": "5.0.2",
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.4.5",
59
+ "@binance/common": "2.4.6",
60
60
  "axios": "^1.7.4"
61
61
  }
62
62
  }