@binance/wallet 12.1.0 → 14.0.0

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.mjs CHANGED
@@ -3,7 +3,7 @@ import { BadRequestError, ConfigurationRestAPI, ConnectorClientError, ForbiddenE
3
3
 
4
4
  //#region package.json
5
5
  var name = "@binance/wallet";
6
- var version = "12.1.0";
6
+ var version = "14.0.0";
7
7
 
8
8
  //#endregion
9
9
  //#region src/rest-api/modules/account-api.ts
@@ -309,6 +309,41 @@ const AssetApiAxiosParamCreator = function(configuration) {
309
309
  timeUnit: _timeUnit
310
310
  };
311
311
  },
312
+ dustConvert: async (asset, clientId, targetAsset, thirdPartyClientId, dustQuotaAssetToTargetAssetPrice) => {
313
+ assertParamExists("dustConvert", "asset", asset);
314
+ const localVarQueryParameter = {};
315
+ const localVarBodyParameter = {};
316
+ if (asset !== void 0 && asset !== null) localVarQueryParameter["asset"] = asset;
317
+ if (clientId !== void 0 && clientId !== null) localVarQueryParameter["clientId"] = clientId;
318
+ if (targetAsset !== void 0 && targetAsset !== null) localVarQueryParameter["targetAsset"] = targetAsset;
319
+ if (thirdPartyClientId !== void 0 && thirdPartyClientId !== null) localVarQueryParameter["thirdPartyClientId"] = thirdPartyClientId;
320
+ if (dustQuotaAssetToTargetAssetPrice !== void 0 && dustQuotaAssetToTargetAssetPrice !== null) localVarQueryParameter["dustQuotaAssetToTargetAssetPrice"] = dustQuotaAssetToTargetAssetPrice;
321
+ let _timeUnit;
322
+ if ("timeUnit" in configuration) _timeUnit = configuration.timeUnit;
323
+ return {
324
+ endpoint: "/sapi/v1/asset/dust-convert/convert",
325
+ method: "POST",
326
+ queryParams: localVarQueryParameter,
327
+ bodyParams: localVarBodyParameter,
328
+ timeUnit: _timeUnit
329
+ };
330
+ },
331
+ dustConvertibleAssets: async (targetAsset, dustQuotaAssetToTargetAssetPrice) => {
332
+ assertParamExists("dustConvertibleAssets", "targetAsset", targetAsset);
333
+ const localVarQueryParameter = {};
334
+ const localVarBodyParameter = {};
335
+ if (targetAsset !== void 0 && targetAsset !== null) localVarQueryParameter["targetAsset"] = targetAsset;
336
+ if (dustQuotaAssetToTargetAssetPrice !== void 0 && dustQuotaAssetToTargetAssetPrice !== null) localVarQueryParameter["dustQuotaAssetToTargetAssetPrice"] = dustQuotaAssetToTargetAssetPrice;
337
+ let _timeUnit;
338
+ if ("timeUnit" in configuration) _timeUnit = configuration.timeUnit;
339
+ return {
340
+ endpoint: "/sapi/v1/asset/dust-convert/query-convertible-assets",
341
+ method: "POST",
342
+ queryParams: localVarQueryParameter,
343
+ bodyParams: localVarBodyParameter,
344
+ timeUnit: _timeUnit
345
+ };
346
+ },
312
347
  dustTransfer: async (asset, accountType, recvWindow) => {
313
348
  assertParamExists("dustTransfer", "asset", asset);
314
349
  const localVarQueryParameter = {};
@@ -588,6 +623,38 @@ var AssetApi = class {
588
623
  return sendRequest(this.configuration, localVarAxiosArgs.endpoint, localVarAxiosArgs.method, localVarAxiosArgs.queryParams, localVarAxiosArgs.bodyParams, localVarAxiosArgs?.timeUnit, { isSigned: true });
589
624
  }
590
625
  /**
626
+ * Convert dust assets
627
+ *
628
+ * Weight: 10
629
+ *
630
+ * @summary Dust Convert (USER_DATA)
631
+ * @param {DustConvertRequest} requestParameters Request parameters.
632
+ * @returns {Promise<RestApiResponse<DustConvertResponse>>}
633
+ * @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}
634
+ * @memberof AssetApi
635
+ * @see {@link https://developers.binance.com/docs/wallet/asset/Dust-Convert Binance API Documentation}
636
+ */
637
+ async dustConvert(requestParameters) {
638
+ const localVarAxiosArgs = await this.localVarAxiosParamCreator.dustConvert(requestParameters?.asset, requestParameters?.clientId, requestParameters?.targetAsset, requestParameters?.thirdPartyClientId, requestParameters?.dustQuotaAssetToTargetAssetPrice);
639
+ return sendRequest(this.configuration, localVarAxiosArgs.endpoint, localVarAxiosArgs.method, localVarAxiosArgs.queryParams, localVarAxiosArgs.bodyParams, localVarAxiosArgs?.timeUnit, { isSigned: true });
640
+ }
641
+ /**
642
+ * Query dust convertible assets
643
+ *
644
+ * Weight: 1
645
+ *
646
+ * @summary Dust Convertible Assets (USER_DATA)
647
+ * @param {DustConvertibleAssetsRequest} requestParameters Request parameters.
648
+ * @returns {Promise<RestApiResponse<DustConvertibleAssetsResponse>>}
649
+ * @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}
650
+ * @memberof AssetApi
651
+ * @see {@link https://developers.binance.com/docs/wallet/asset/Dust-Convertible-Assets Binance API Documentation}
652
+ */
653
+ async dustConvertibleAssets(requestParameters) {
654
+ const localVarAxiosArgs = await this.localVarAxiosParamCreator.dustConvertibleAssets(requestParameters?.targetAsset, requestParameters?.dustQuotaAssetToTargetAssetPrice);
655
+ return sendRequest(this.configuration, localVarAxiosArgs.endpoint, localVarAxiosArgs.method, localVarAxiosArgs.queryParams, localVarAxiosArgs.bodyParams, localVarAxiosArgs?.timeUnit, { isSigned: true });
656
+ }
657
+ /**
591
658
  * Convert dust assets to BNB.
592
659
  *
593
660
  * You need to open`Enable Spot & Margin Trading` permission for the API Key which requests this endpoint.
@@ -696,8 +763,6 @@ var AssetApi = class {
696
763
  /**
697
764
  * Query User Delegation History
698
765
  *
699
- * You need to open Enable Spot & Margin Trading permission for the API Key which requests this endpoint
700
- *
701
766
  * Weight: 60
702
767
  *
703
768
  * @summary Query User Delegation History(For Master Account)(USER_DATA)
@@ -1477,6 +1542,23 @@ const TravelRuleApiAxiosParamCreator = function(configuration) {
1477
1542
  timeUnit: _timeUnit
1478
1543
  };
1479
1544
  },
1545
+ submitDepositQuestionnaireV2: async (depositId, questionnaire) => {
1546
+ assertParamExists("submitDepositQuestionnaireV2", "depositId", depositId);
1547
+ assertParamExists("submitDepositQuestionnaireV2", "questionnaire", questionnaire);
1548
+ const localVarQueryParameter = {};
1549
+ const localVarBodyParameter = {};
1550
+ if (depositId !== void 0 && depositId !== null) localVarQueryParameter["depositId"] = depositId;
1551
+ if (questionnaire !== void 0 && questionnaire !== null) localVarQueryParameter["questionnaire"] = questionnaire;
1552
+ let _timeUnit;
1553
+ if ("timeUnit" in configuration) _timeUnit = configuration.timeUnit;
1554
+ return {
1555
+ endpoint: "/sapi/v2/localentity/deposit/provide-info",
1556
+ method: "PUT",
1557
+ queryParams: localVarQueryParameter,
1558
+ bodyParams: localVarBodyParameter,
1559
+ timeUnit: _timeUnit
1560
+ };
1561
+ },
1480
1562
  vaspList: async (recvWindow) => {
1481
1563
  const localVarQueryParameter = {};
1482
1564
  const localVarBodyParameter = {};
@@ -1712,6 +1794,27 @@ var TravelRuleApi = class {
1712
1794
  return sendRequest(this.configuration, localVarAxiosArgs.endpoint, localVarAxiosArgs.method, localVarAxiosArgs.queryParams, localVarAxiosArgs.bodyParams, localVarAxiosArgs?.timeUnit, { isSigned: true });
1713
1795
  }
1714
1796
  /**
1797
+ * Submit questionnaire for local entities that require travel rule.
1798
+ * The questionnaire is only applies to transactions from unhosted wallets or VASPs that are not
1799
+ * yet onboarded with GTR.
1800
+ *
1801
+ * Questionnaire is different for each local entity, please refer
1802
+ * If getting error like `Questionnaire format not valid.` or `Questionnaire must not be blank`,
1803
+ *
1804
+ * Weight: 600
1805
+ *
1806
+ * @summary Submit Deposit Questionnaire V2 (For local entities that require travel rule) (supporting network) (USER_DATA)
1807
+ * @param {SubmitDepositQuestionnaireV2Request} requestParameters Request parameters.
1808
+ * @returns {Promise<RestApiResponse<SubmitDepositQuestionnaireV2Response>>}
1809
+ * @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}
1810
+ * @memberof TravelRuleApi
1811
+ * @see {@link https://developers.binance.com/docs/wallet/travel-rule/deposit-provide-info-v2 Binance API Documentation}
1812
+ */
1813
+ async submitDepositQuestionnaireV2(requestParameters) {
1814
+ const localVarAxiosArgs = await this.localVarAxiosParamCreator.submitDepositQuestionnaireV2(requestParameters?.depositId, requestParameters?.questionnaire);
1815
+ return sendRequest(this.configuration, localVarAxiosArgs.endpoint, localVarAxiosArgs.method, localVarAxiosArgs.queryParams, localVarAxiosArgs.bodyParams, localVarAxiosArgs?.timeUnit, { isSigned: true });
1816
+ }
1817
+ /**
1715
1818
  * Fetch the VASP list for local entities.
1716
1819
  *
1717
1820
  * Weight: 1
@@ -1991,6 +2094,36 @@ var RestAPI = class {
1991
2094
  return this.assetApi.assetDividendRecord(requestParameters);
1992
2095
  }
1993
2096
  /**
2097
+ * Convert dust assets
2098
+ *
2099
+ * Weight: 10
2100
+ *
2101
+ * @summary Dust Convert (USER_DATA)
2102
+ * @param {DustConvertRequest} requestParameters Request parameters.
2103
+ *
2104
+ * @returns {Promise<RestApiResponse<DustConvertResponse>>}
2105
+ * @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}
2106
+ * @see {@link https://developers.binance.com/docs/wallet/asset/Dust-Convert Binance API Documentation}
2107
+ */
2108
+ dustConvert(requestParameters) {
2109
+ return this.assetApi.dustConvert(requestParameters);
2110
+ }
2111
+ /**
2112
+ * Query dust convertible assets
2113
+ *
2114
+ * Weight: 1
2115
+ *
2116
+ * @summary Dust Convertible Assets (USER_DATA)
2117
+ * @param {DustConvertibleAssetsRequest} requestParameters Request parameters.
2118
+ *
2119
+ * @returns {Promise<RestApiResponse<DustConvertibleAssetsResponse>>}
2120
+ * @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}
2121
+ * @see {@link https://developers.binance.com/docs/wallet/asset/Dust-Convertible-Assets Binance API Documentation}
2122
+ */
2123
+ dustConvertibleAssets(requestParameters) {
2124
+ return this.assetApi.dustConvertibleAssets(requestParameters);
2125
+ }
2126
+ /**
1994
2127
  * Convert dust assets to BNB.
1995
2128
  *
1996
2129
  * You need to open`Enable Spot & Margin Trading` permission for the API Key which requests this endpoint.
@@ -2093,8 +2226,6 @@ var RestAPI = class {
2093
2226
  /**
2094
2227
  * Query User Delegation History
2095
2228
  *
2096
- * You need to open Enable Spot & Margin Trading permission for the API Key which requests this endpoint
2097
- *
2098
2229
  * Weight: 60
2099
2230
  *
2100
2231
  * @summary Query User Delegation History(For Master Account)(USER_DATA)
@@ -2559,6 +2690,26 @@ var RestAPI = class {
2559
2690
  return this.travelRuleApi.submitDepositQuestionnaireTravelRule(requestParameters);
2560
2691
  }
2561
2692
  /**
2693
+ * Submit questionnaire for local entities that require travel rule.
2694
+ * The questionnaire is only applies to transactions from unhosted wallets or VASPs that are not
2695
+ * yet onboarded with GTR.
2696
+ *
2697
+ * Questionnaire is different for each local entity, please refer
2698
+ * If getting error like `Questionnaire format not valid.` or `Questionnaire must not be blank`,
2699
+ *
2700
+ * Weight: 600
2701
+ *
2702
+ * @summary Submit Deposit Questionnaire V2 (For local entities that require travel rule) (supporting network) (USER_DATA)
2703
+ * @param {SubmitDepositQuestionnaireV2Request} requestParameters Request parameters.
2704
+ *
2705
+ * @returns {Promise<RestApiResponse<SubmitDepositQuestionnaireV2Response>>}
2706
+ * @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}
2707
+ * @see {@link https://developers.binance.com/docs/wallet/travel-rule/deposit-provide-info-v2 Binance API Documentation}
2708
+ */
2709
+ submitDepositQuestionnaireV2(requestParameters) {
2710
+ return this.travelRuleApi.submitDepositQuestionnaireV2(requestParameters);
2711
+ }
2712
+ /**
2562
2713
  * Fetch the VASP list for local entities.
2563
2714
  *
2564
2715
  * Weight: 1