@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.js CHANGED
@@ -14,7 +14,7 @@ let __binance_common = require("@binance/common");
14
14
 
15
15
  //#region package.json
16
16
  var name = "@binance/wallet";
17
- var version = "12.1.0";
17
+ var version = "14.0.0";
18
18
 
19
19
  //#endregion
20
20
  //#region src/rest-api/modules/account-api.ts
@@ -320,6 +320,41 @@ const AssetApiAxiosParamCreator = function(configuration) {
320
320
  timeUnit: _timeUnit
321
321
  };
322
322
  },
323
+ dustConvert: async (asset, clientId, targetAsset, thirdPartyClientId, dustQuotaAssetToTargetAssetPrice) => {
324
+ (0, __binance_common.assertParamExists)("dustConvert", "asset", asset);
325
+ const localVarQueryParameter = {};
326
+ const localVarBodyParameter = {};
327
+ if (asset !== void 0 && asset !== null) localVarQueryParameter["asset"] = asset;
328
+ if (clientId !== void 0 && clientId !== null) localVarQueryParameter["clientId"] = clientId;
329
+ if (targetAsset !== void 0 && targetAsset !== null) localVarQueryParameter["targetAsset"] = targetAsset;
330
+ if (thirdPartyClientId !== void 0 && thirdPartyClientId !== null) localVarQueryParameter["thirdPartyClientId"] = thirdPartyClientId;
331
+ if (dustQuotaAssetToTargetAssetPrice !== void 0 && dustQuotaAssetToTargetAssetPrice !== null) localVarQueryParameter["dustQuotaAssetToTargetAssetPrice"] = dustQuotaAssetToTargetAssetPrice;
332
+ let _timeUnit;
333
+ if ("timeUnit" in configuration) _timeUnit = configuration.timeUnit;
334
+ return {
335
+ endpoint: "/sapi/v1/asset/dust-convert/convert",
336
+ method: "POST",
337
+ queryParams: localVarQueryParameter,
338
+ bodyParams: localVarBodyParameter,
339
+ timeUnit: _timeUnit
340
+ };
341
+ },
342
+ dustConvertibleAssets: async (targetAsset, dustQuotaAssetToTargetAssetPrice) => {
343
+ (0, __binance_common.assertParamExists)("dustConvertibleAssets", "targetAsset", targetAsset);
344
+ const localVarQueryParameter = {};
345
+ const localVarBodyParameter = {};
346
+ if (targetAsset !== void 0 && targetAsset !== null) localVarQueryParameter["targetAsset"] = targetAsset;
347
+ if (dustQuotaAssetToTargetAssetPrice !== void 0 && dustQuotaAssetToTargetAssetPrice !== null) localVarQueryParameter["dustQuotaAssetToTargetAssetPrice"] = dustQuotaAssetToTargetAssetPrice;
348
+ let _timeUnit;
349
+ if ("timeUnit" in configuration) _timeUnit = configuration.timeUnit;
350
+ return {
351
+ endpoint: "/sapi/v1/asset/dust-convert/query-convertible-assets",
352
+ method: "POST",
353
+ queryParams: localVarQueryParameter,
354
+ bodyParams: localVarBodyParameter,
355
+ timeUnit: _timeUnit
356
+ };
357
+ },
323
358
  dustTransfer: async (asset, accountType, recvWindow) => {
324
359
  (0, __binance_common.assertParamExists)("dustTransfer", "asset", asset);
325
360
  const localVarQueryParameter = {};
@@ -599,6 +634,38 @@ var AssetApi = class {
599
634
  return (0, __binance_common.sendRequest)(this.configuration, localVarAxiosArgs.endpoint, localVarAxiosArgs.method, localVarAxiosArgs.queryParams, localVarAxiosArgs.bodyParams, localVarAxiosArgs?.timeUnit, { isSigned: true });
600
635
  }
601
636
  /**
637
+ * Convert dust assets
638
+ *
639
+ * Weight: 10
640
+ *
641
+ * @summary Dust Convert (USER_DATA)
642
+ * @param {DustConvertRequest} requestParameters Request parameters.
643
+ * @returns {Promise<RestApiResponse<DustConvertResponse>>}
644
+ * @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}
645
+ * @memberof AssetApi
646
+ * @see {@link https://developers.binance.com/docs/wallet/asset/Dust-Convert Binance API Documentation}
647
+ */
648
+ async dustConvert(requestParameters) {
649
+ const localVarAxiosArgs = await this.localVarAxiosParamCreator.dustConvert(requestParameters?.asset, requestParameters?.clientId, requestParameters?.targetAsset, requestParameters?.thirdPartyClientId, requestParameters?.dustQuotaAssetToTargetAssetPrice);
650
+ return (0, __binance_common.sendRequest)(this.configuration, localVarAxiosArgs.endpoint, localVarAxiosArgs.method, localVarAxiosArgs.queryParams, localVarAxiosArgs.bodyParams, localVarAxiosArgs?.timeUnit, { isSigned: true });
651
+ }
652
+ /**
653
+ * Query dust convertible assets
654
+ *
655
+ * Weight: 1
656
+ *
657
+ * @summary Dust Convertible Assets (USER_DATA)
658
+ * @param {DustConvertibleAssetsRequest} requestParameters Request parameters.
659
+ * @returns {Promise<RestApiResponse<DustConvertibleAssetsResponse>>}
660
+ * @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}
661
+ * @memberof AssetApi
662
+ * @see {@link https://developers.binance.com/docs/wallet/asset/Dust-Convertible-Assets Binance API Documentation}
663
+ */
664
+ async dustConvertibleAssets(requestParameters) {
665
+ const localVarAxiosArgs = await this.localVarAxiosParamCreator.dustConvertibleAssets(requestParameters?.targetAsset, requestParameters?.dustQuotaAssetToTargetAssetPrice);
666
+ return (0, __binance_common.sendRequest)(this.configuration, localVarAxiosArgs.endpoint, localVarAxiosArgs.method, localVarAxiosArgs.queryParams, localVarAxiosArgs.bodyParams, localVarAxiosArgs?.timeUnit, { isSigned: true });
667
+ }
668
+ /**
602
669
  * Convert dust assets to BNB.
603
670
  *
604
671
  * You need to open`Enable Spot & Margin Trading` permission for the API Key which requests this endpoint.
@@ -707,8 +774,6 @@ var AssetApi = class {
707
774
  /**
708
775
  * Query User Delegation History
709
776
  *
710
- * You need to open Enable Spot & Margin Trading permission for the API Key which requests this endpoint
711
- *
712
777
  * Weight: 60
713
778
  *
714
779
  * @summary Query User Delegation History(For Master Account)(USER_DATA)
@@ -1488,6 +1553,23 @@ const TravelRuleApiAxiosParamCreator = function(configuration) {
1488
1553
  timeUnit: _timeUnit
1489
1554
  };
1490
1555
  },
1556
+ submitDepositQuestionnaireV2: async (depositId, questionnaire) => {
1557
+ (0, __binance_common.assertParamExists)("submitDepositQuestionnaireV2", "depositId", depositId);
1558
+ (0, __binance_common.assertParamExists)("submitDepositQuestionnaireV2", "questionnaire", questionnaire);
1559
+ const localVarQueryParameter = {};
1560
+ const localVarBodyParameter = {};
1561
+ if (depositId !== void 0 && depositId !== null) localVarQueryParameter["depositId"] = depositId;
1562
+ if (questionnaire !== void 0 && questionnaire !== null) localVarQueryParameter["questionnaire"] = questionnaire;
1563
+ let _timeUnit;
1564
+ if ("timeUnit" in configuration) _timeUnit = configuration.timeUnit;
1565
+ return {
1566
+ endpoint: "/sapi/v2/localentity/deposit/provide-info",
1567
+ method: "PUT",
1568
+ queryParams: localVarQueryParameter,
1569
+ bodyParams: localVarBodyParameter,
1570
+ timeUnit: _timeUnit
1571
+ };
1572
+ },
1491
1573
  vaspList: async (recvWindow) => {
1492
1574
  const localVarQueryParameter = {};
1493
1575
  const localVarBodyParameter = {};
@@ -1723,6 +1805,27 @@ var TravelRuleApi = class {
1723
1805
  return (0, __binance_common.sendRequest)(this.configuration, localVarAxiosArgs.endpoint, localVarAxiosArgs.method, localVarAxiosArgs.queryParams, localVarAxiosArgs.bodyParams, localVarAxiosArgs?.timeUnit, { isSigned: true });
1724
1806
  }
1725
1807
  /**
1808
+ * Submit questionnaire for local entities that require travel rule.
1809
+ * The questionnaire is only applies to transactions from unhosted wallets or VASPs that are not
1810
+ * yet onboarded with GTR.
1811
+ *
1812
+ * Questionnaire is different for each local entity, please refer
1813
+ * If getting error like `Questionnaire format not valid.` or `Questionnaire must not be blank`,
1814
+ *
1815
+ * Weight: 600
1816
+ *
1817
+ * @summary Submit Deposit Questionnaire V2 (For local entities that require travel rule) (supporting network) (USER_DATA)
1818
+ * @param {SubmitDepositQuestionnaireV2Request} requestParameters Request parameters.
1819
+ * @returns {Promise<RestApiResponse<SubmitDepositQuestionnaireV2Response>>}
1820
+ * @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}
1821
+ * @memberof TravelRuleApi
1822
+ * @see {@link https://developers.binance.com/docs/wallet/travel-rule/deposit-provide-info-v2 Binance API Documentation}
1823
+ */
1824
+ async submitDepositQuestionnaireV2(requestParameters) {
1825
+ const localVarAxiosArgs = await this.localVarAxiosParamCreator.submitDepositQuestionnaireV2(requestParameters?.depositId, requestParameters?.questionnaire);
1826
+ return (0, __binance_common.sendRequest)(this.configuration, localVarAxiosArgs.endpoint, localVarAxiosArgs.method, localVarAxiosArgs.queryParams, localVarAxiosArgs.bodyParams, localVarAxiosArgs?.timeUnit, { isSigned: true });
1827
+ }
1828
+ /**
1726
1829
  * Fetch the VASP list for local entities.
1727
1830
  *
1728
1831
  * Weight: 1
@@ -2002,6 +2105,36 @@ var RestAPI = class {
2002
2105
  return this.assetApi.assetDividendRecord(requestParameters);
2003
2106
  }
2004
2107
  /**
2108
+ * Convert dust assets
2109
+ *
2110
+ * Weight: 10
2111
+ *
2112
+ * @summary Dust Convert (USER_DATA)
2113
+ * @param {DustConvertRequest} requestParameters Request parameters.
2114
+ *
2115
+ * @returns {Promise<RestApiResponse<DustConvertResponse>>}
2116
+ * @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}
2117
+ * @see {@link https://developers.binance.com/docs/wallet/asset/Dust-Convert Binance API Documentation}
2118
+ */
2119
+ dustConvert(requestParameters) {
2120
+ return this.assetApi.dustConvert(requestParameters);
2121
+ }
2122
+ /**
2123
+ * Query dust convertible assets
2124
+ *
2125
+ * Weight: 1
2126
+ *
2127
+ * @summary Dust Convertible Assets (USER_DATA)
2128
+ * @param {DustConvertibleAssetsRequest} requestParameters Request parameters.
2129
+ *
2130
+ * @returns {Promise<RestApiResponse<DustConvertibleAssetsResponse>>}
2131
+ * @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}
2132
+ * @see {@link https://developers.binance.com/docs/wallet/asset/Dust-Convertible-Assets Binance API Documentation}
2133
+ */
2134
+ dustConvertibleAssets(requestParameters) {
2135
+ return this.assetApi.dustConvertibleAssets(requestParameters);
2136
+ }
2137
+ /**
2005
2138
  * Convert dust assets to BNB.
2006
2139
  *
2007
2140
  * You need to open`Enable Spot & Margin Trading` permission for the API Key which requests this endpoint.
@@ -2104,8 +2237,6 @@ var RestAPI = class {
2104
2237
  /**
2105
2238
  * Query User Delegation History
2106
2239
  *
2107
- * You need to open Enable Spot & Margin Trading permission for the API Key which requests this endpoint
2108
- *
2109
2240
  * Weight: 60
2110
2241
  *
2111
2242
  * @summary Query User Delegation History(For Master Account)(USER_DATA)
@@ -2570,6 +2701,26 @@ var RestAPI = class {
2570
2701
  return this.travelRuleApi.submitDepositQuestionnaireTravelRule(requestParameters);
2571
2702
  }
2572
2703
  /**
2704
+ * Submit questionnaire for local entities that require travel rule.
2705
+ * The questionnaire is only applies to transactions from unhosted wallets or VASPs that are not
2706
+ * yet onboarded with GTR.
2707
+ *
2708
+ * Questionnaire is different for each local entity, please refer
2709
+ * If getting error like `Questionnaire format not valid.` or `Questionnaire must not be blank`,
2710
+ *
2711
+ * Weight: 600
2712
+ *
2713
+ * @summary Submit Deposit Questionnaire V2 (For local entities that require travel rule) (supporting network) (USER_DATA)
2714
+ * @param {SubmitDepositQuestionnaireV2Request} requestParameters Request parameters.
2715
+ *
2716
+ * @returns {Promise<RestApiResponse<SubmitDepositQuestionnaireV2Response>>}
2717
+ * @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}
2718
+ * @see {@link https://developers.binance.com/docs/wallet/travel-rule/deposit-provide-info-v2 Binance API Documentation}
2719
+ */
2720
+ submitDepositQuestionnaireV2(requestParameters) {
2721
+ return this.travelRuleApi.submitDepositQuestionnaireV2(requestParameters);
2722
+ }
2723
+ /**
2573
2724
  * Fetch the VASP list for local entities.
2574
2725
  *
2575
2726
  * Weight: 1