@binance/wallet 8.0.0 → 9.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
@@ -41,7 +41,7 @@ var import_common7 = require("@binance/common");
41
41
 
42
42
  // package.json
43
43
  var name = "@binance/wallet";
44
- var version = "8.0.0";
44
+ var version = "9.0.0";
45
45
 
46
46
  // src/rest-api/index.ts
47
47
  var rest_api_exports = {};
@@ -1786,6 +1786,7 @@ var CapitalApiAxiosParamCreator = function(configuration) {
1786
1786
  *
1787
1787
  * If `network` not send, return with default network of the coin.
1788
1788
  * You can get `network` and `isDefault` in `networkList` of a coin in the response of `Get /sapi/v1/capital/config/getall (HMAC SHA256)`.
1789
+ * To check if travel rule is required, by using `GET /sapi/v1/localentity/questionnaire-requirements` and if it returns anything other than `NIL` you will need update SAPI to `POST /sapi/v1/localentity/withdraw/apply` else you can continue `POST /sapi/v1/capital/withdraw/apply`. Please note that if you are required to comply to travel rule please refer to the Travel Rule SAPI.
1789
1790
  *
1790
1791
  * Weight: 900
1791
1792
  *
@@ -2122,6 +2123,7 @@ var CapitalApi = class {
2122
2123
  *
2123
2124
  * If `network` not send, return with default network of the coin.
2124
2125
  * You can get `network` and `isDefault` in `networkList` of a coin in the response of `Get /sapi/v1/capital/config/getall (HMAC SHA256)`.
2126
+ * To check if travel rule is required, by using `GET /sapi/v1/localentity/questionnaire-requirements` and if it returns anything other than `NIL` you will need update SAPI to `POST /sapi/v1/localentity/withdraw/apply` else you can continue `POST /sapi/v1/capital/withdraw/apply`. Please note that if you are required to comply to travel rule please refer to the Travel Rule SAPI.
2125
2127
  *
2126
2128
  * Weight: 900
2127
2129
  *
@@ -2388,13 +2390,7 @@ var TravelRuleApiAxiosParamCreator = function(configuration) {
2388
2390
  /**
2389
2391
  * This API will return user-specific Travel Rule questionnaire requirement information in reference to the current API key.
2390
2392
  *
2391
- * This endpoint specifically uses per second IP rate limit, user's total second level IP rate
2392
- *
2393
- * Weight: 18000
2394
- * Request limit: 10 requests per second
2395
- * > * This endpoint specifically uses per second IP rate limit, user's total second level IP rate
2396
- * limit is 180000/second. Response from the endpoint contains header
2397
- * key X-SAPI-USED-IP-WEIGHT-1S, which defines weight used by the current IP.
2393
+ * Weight: 1
2398
2394
  *
2399
2395
  * @summary Check Questionnaire Requirements (for local entities that require travel rule) (supporting network) (USER_DATA)
2400
2396
  * @param {number} [recvWindow]
@@ -2483,9 +2479,68 @@ var TravelRuleApiAxiosParamCreator = function(configuration) {
2483
2479
  };
2484
2480
  },
2485
2481
  /**
2486
- * Fetch address verification list
2482
+ * Fetch deposit history for local entities that with required travel rule information.
2487
2483
  *
2488
- * Weight: 10
2484
+ * Please notice the default `startTime` and `endTime` to make sure that time interval is within
2485
+ * If both ``startTime`` and ``endTime`` are sent, time between ``startTime`` and ``endTime`` must
2486
+ *
2487
+ * Weight: 1
2488
+ *
2489
+ * @summary Deposit History V2 (for local entities that required travel rule) (supporting network) (USER_DATA)
2490
+ * @param {string} [depositId] Comma(,) separated list of wallet tran Ids.
2491
+ * @param {string} [txId]
2492
+ * @param {string} [network]
2493
+ * @param {string} [coin]
2494
+ * @param {boolean} [retrieveQuestionnaire] true: return `questionnaire` within response.
2495
+ * @param {number} [startTime]
2496
+ * @param {number} [endTime]
2497
+ * @param {number} [offset] Default: 0
2498
+ * @param {number} [limit] min 7, max 30, default 7
2499
+ *
2500
+ * @throws {RequiredError}
2501
+ */
2502
+ depositHistoryV2: async (depositId, txId, network, coin, retrieveQuestionnaire, startTime, endTime, offset, limit) => {
2503
+ const localVarQueryParameter = {};
2504
+ if (depositId !== void 0 && depositId !== null) {
2505
+ localVarQueryParameter["depositId"] = depositId;
2506
+ }
2507
+ if (txId !== void 0 && txId !== null) {
2508
+ localVarQueryParameter["txId"] = txId;
2509
+ }
2510
+ if (network !== void 0 && network !== null) {
2511
+ localVarQueryParameter["network"] = network;
2512
+ }
2513
+ if (coin !== void 0 && coin !== null) {
2514
+ localVarQueryParameter["coin"] = coin;
2515
+ }
2516
+ if (retrieveQuestionnaire !== void 0 && retrieveQuestionnaire !== null) {
2517
+ localVarQueryParameter["retrieveQuestionnaire"] = retrieveQuestionnaire;
2518
+ }
2519
+ if (startTime !== void 0 && startTime !== null) {
2520
+ localVarQueryParameter["startTime"] = startTime;
2521
+ }
2522
+ if (endTime !== void 0 && endTime !== null) {
2523
+ localVarQueryParameter["endTime"] = endTime;
2524
+ }
2525
+ if (offset !== void 0 && offset !== null) {
2526
+ localVarQueryParameter["offset"] = offset;
2527
+ }
2528
+ if (limit !== void 0 && limit !== null) {
2529
+ localVarQueryParameter["limit"] = limit;
2530
+ }
2531
+ let _timeUnit;
2532
+ if ("timeUnit" in configuration) _timeUnit = configuration.timeUnit;
2533
+ return {
2534
+ endpoint: "/sapi/v2/localentity/deposit/history",
2535
+ method: "GET",
2536
+ params: localVarQueryParameter,
2537
+ timeUnit: _timeUnit
2538
+ };
2539
+ },
2540
+ /**
2541
+ * Fetch address verification list for user to check on status and other details for the addresses stored in Address Book.
2542
+ *
2543
+ * Weight: 1
2489
2544
  *
2490
2545
  * @summary Fetch address verification list (USER_DATA)
2491
2546
  * @param {number} [recvWindow]
@@ -2618,13 +2673,7 @@ var TravelRuleApiAxiosParamCreator = function(configuration) {
2618
2673
  /**
2619
2674
  * Fetch the VASP list for local entities.
2620
2675
  *
2621
- * This endpoint specifically uses per second IP rate limit, user's total second level IP rate
2622
- *
2623
- * Weight: 18000
2624
- * Request limit: 10 requests per second
2625
- * > * This endpoint specifically uses per second IP rate limit, user's total second level IP rate
2626
- * limit is 180000/second. Response from the endpoint contains header
2627
- * key X-SAPI-USED-IP-WEIGHT-1S, which defines weight used by the current IP.
2676
+ * Weight: 1
2628
2677
  *
2629
2678
  * @summary VASP list (for local entities that require travel rule) (supporting network) (USER_DATA)
2630
2679
  * @param {number} [recvWindow]
@@ -2648,16 +2697,11 @@ var TravelRuleApiAxiosParamCreator = function(configuration) {
2648
2697
  /**
2649
2698
  * Fetch withdraw history for local entities that required travel rule.
2650
2699
  *
2651
- * This endpoint specifically uses per second IP rate limit, user's total second level IP rate
2652
2700
  * `network` may not be in the response for old withdraw.
2653
2701
  * Please notice the default `startTime` and `endTime` to make sure that time interval is within
2654
2702
  * If both `startTime` and `endTime`are sent, time between `startTime`and `endTime`must be less
2655
2703
  *
2656
- * Weight: 18000
2657
- * Request limit: 10 requests per second
2658
- * > * This endpoint specifically uses per second IP rate limit, user's total second level IP rate
2659
- * limit is 180000/second. Response from the endpoint contains header
2660
- * key X-SAPI-USED-IP-WEIGHT-1S, which defines weight used by the current IP.
2704
+ * Weight: 1
2661
2705
  *
2662
2706
  * @summary Withdraw History (for local entities that require travel rule) (supporting network) (USER_DATA)
2663
2707
  * @param {string} [trId] Comma(,) separated list of travel rule record Ids.
@@ -2721,7 +2765,6 @@ var TravelRuleApiAxiosParamCreator = function(configuration) {
2721
2765
  /**
2722
2766
  * Fetch withdraw history for local entities that required travel rule.
2723
2767
  *
2724
- * This endpoint specifically uses per second IP rate limit, user's total second level IP rate
2725
2768
  * `network` may not be in the response for old withdraw.
2726
2769
  * Withdrawal made through /sapi/v1/capital/withdraw/apply may not be in the response.
2727
2770
  * Please notice the default `startTime` and `endTime` to make sure that time interval is within
@@ -2732,11 +2775,7 @@ var TravelRuleApiAxiosParamCreator = function(configuration) {
2732
2775
  * WithdrawOrderId only support 1.
2733
2776
  * If responsible does not include withdrawalStatus, please input trId or txId retrieve the data.
2734
2777
  *
2735
- * Weight: 18000
2736
- * Request limit: 10 requests per second
2737
- * > * This endpoint specifically uses per second IP rate limit, user's total second level IP rate
2738
- * limit is 180000/second. Response from the endpoint contains header
2739
- * key X-SAPI-USED-IP-WEIGHT-1S, which defines weight used by the current IP.
2778
+ * Weight: 1
2740
2779
  *
2741
2780
  * @summary Withdraw History V2 (for local entities that require travel rule) (supporting network) (USER_DATA)
2742
2781
  * @param {string} [trId] Comma(,) separated list of travel rule record Ids.
@@ -2921,13 +2960,7 @@ var TravelRuleApi = class {
2921
2960
  /**
2922
2961
  * This API will return user-specific Travel Rule questionnaire requirement information in reference to the current API key.
2923
2962
  *
2924
- * This endpoint specifically uses per second IP rate limit, user's total second level IP rate
2925
- *
2926
- * Weight: 18000
2927
- * Request limit: 10 requests per second
2928
- * > * This endpoint specifically uses per second IP rate limit, user's total second level IP rate
2929
- * limit is 180000/second. Response from the endpoint contains header
2930
- * key X-SAPI-USED-IP-WEIGHT-1S, which defines weight used by the current IP.
2963
+ * Weight: 1
2931
2964
  *
2932
2965
  * @summary Check Questionnaire Requirements (for local entities that require travel rule) (supporting network) (USER_DATA)
2933
2966
  * @param {CheckQuestionnaireRequirementsRequest} requestParameters Request parameters.
@@ -2988,9 +3021,45 @@ var TravelRuleApi = class {
2988
3021
  );
2989
3022
  }
2990
3023
  /**
2991
- * Fetch address verification list
3024
+ * Fetch deposit history for local entities that with required travel rule information.
2992
3025
  *
2993
- * Weight: 10
3026
+ * Please notice the default `startTime` and `endTime` to make sure that time interval is within
3027
+ * If both ``startTime`` and ``endTime`` are sent, time between ``startTime`` and ``endTime`` must
3028
+ *
3029
+ * Weight: 1
3030
+ *
3031
+ * @summary Deposit History V2 (for local entities that required travel rule) (supporting network) (USER_DATA)
3032
+ * @param {DepositHistoryV2Request} requestParameters Request parameters.
3033
+ * @returns {Promise<RestApiResponse<DepositHistoryV2Response>>}
3034
+ * @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}
3035
+ * @memberof TravelRuleApi
3036
+ * @see {@link https://developers.binance.com/docs/wallet/travel-rule/Deposit-History-V2 Binance API Documentation}
3037
+ */
3038
+ async depositHistoryV2(requestParameters = {}) {
3039
+ const localVarAxiosArgs = await this.localVarAxiosParamCreator.depositHistoryV2(
3040
+ requestParameters?.depositId,
3041
+ requestParameters?.txId,
3042
+ requestParameters?.network,
3043
+ requestParameters?.coin,
3044
+ requestParameters?.retrieveQuestionnaire,
3045
+ requestParameters?.startTime,
3046
+ requestParameters?.endTime,
3047
+ requestParameters?.offset,
3048
+ requestParameters?.limit
3049
+ );
3050
+ return (0, import_common5.sendRequest)(
3051
+ this.configuration,
3052
+ localVarAxiosArgs.endpoint,
3053
+ localVarAxiosArgs.method,
3054
+ localVarAxiosArgs.params,
3055
+ localVarAxiosArgs?.timeUnit,
3056
+ { isSigned: true }
3057
+ );
3058
+ }
3059
+ /**
3060
+ * Fetch address verification list for user to check on status and other details for the addresses stored in Address Book.
3061
+ *
3062
+ * Weight: 1
2994
3063
  *
2995
3064
  * @summary Fetch address verification list (USER_DATA)
2996
3065
  * @param {FetchAddressVerificationListRequest} requestParameters Request parameters.
@@ -3085,13 +3154,7 @@ var TravelRuleApi = class {
3085
3154
  /**
3086
3155
  * Fetch the VASP list for local entities.
3087
3156
  *
3088
- * This endpoint specifically uses per second IP rate limit, user's total second level IP rate
3089
- *
3090
- * Weight: 18000
3091
- * Request limit: 10 requests per second
3092
- * > * This endpoint specifically uses per second IP rate limit, user's total second level IP rate
3093
- * limit is 180000/second. Response from the endpoint contains header
3094
- * key X-SAPI-USED-IP-WEIGHT-1S, which defines weight used by the current IP.
3157
+ * Weight: 1
3095
3158
  *
3096
3159
  * @summary VASP list (for local entities that require travel rule) (supporting network) (USER_DATA)
3097
3160
  * @param {VaspListRequest} requestParameters Request parameters.
@@ -3116,16 +3179,11 @@ var TravelRuleApi = class {
3116
3179
  /**
3117
3180
  * Fetch withdraw history for local entities that required travel rule.
3118
3181
  *
3119
- * This endpoint specifically uses per second IP rate limit, user's total second level IP rate
3120
3182
  * `network` may not be in the response for old withdraw.
3121
3183
  * Please notice the default `startTime` and `endTime` to make sure that time interval is within
3122
3184
  * If both `startTime` and `endTime`are sent, time between `startTime`and `endTime`must be less
3123
3185
  *
3124
- * Weight: 18000
3125
- * Request limit: 10 requests per second
3126
- * > * This endpoint specifically uses per second IP rate limit, user's total second level IP rate
3127
- * limit is 180000/second. Response from the endpoint contains header
3128
- * key X-SAPI-USED-IP-WEIGHT-1S, which defines weight used by the current IP.
3186
+ * Weight: 1
3129
3187
  *
3130
3188
  * @summary Withdraw History (for local entities that require travel rule) (supporting network) (USER_DATA)
3131
3189
  * @param {WithdrawHistoryV1Request} requestParameters Request parameters.
@@ -3160,7 +3218,6 @@ var TravelRuleApi = class {
3160
3218
  /**
3161
3219
  * Fetch withdraw history for local entities that required travel rule.
3162
3220
  *
3163
- * This endpoint specifically uses per second IP rate limit, user's total second level IP rate
3164
3221
  * `network` may not be in the response for old withdraw.
3165
3222
  * Withdrawal made through /sapi/v1/capital/withdraw/apply may not be in the response.
3166
3223
  * Please notice the default `startTime` and `endTime` to make sure that time interval is within
@@ -3171,11 +3228,7 @@ var TravelRuleApi = class {
3171
3228
  * WithdrawOrderId only support 1.
3172
3229
  * If responsible does not include withdrawalStatus, please input trId or txId retrieve the data.
3173
3230
  *
3174
- * Weight: 18000
3175
- * Request limit: 10 requests per second
3176
- * > * This endpoint specifically uses per second IP rate limit, user's total second level IP rate
3177
- * limit is 180000/second. Response from the endpoint contains header
3178
- * key X-SAPI-USED-IP-WEIGHT-1S, which defines weight used by the current IP.
3231
+ * Weight: 1
3179
3232
  *
3180
3233
  * @summary Withdraw History V2 (for local entities that require travel rule) (supporting network) (USER_DATA)
3181
3234
  * @param {WithdrawHistoryV2Request} requestParameters Request parameters.
@@ -3781,6 +3834,7 @@ var RestAPI = class {
3781
3834
  *
3782
3835
  * If `network` not send, return with default network of the coin.
3783
3836
  * You can get `network` and `isDefault` in `networkList` of a coin in the response of `Get /sapi/v1/capital/config/getall (HMAC SHA256)`.
3837
+ * To check if travel rule is required, by using `GET /sapi/v1/localentity/questionnaire-requirements` and if it returns anything other than `NIL` you will need update SAPI to `POST /sapi/v1/localentity/withdraw/apply` else you can continue `POST /sapi/v1/capital/withdraw/apply`. Please note that if you are required to comply to travel rule please refer to the Travel Rule SAPI.
3784
3838
  *
3785
3839
  * Weight: 900
3786
3840
  *
@@ -3864,13 +3918,7 @@ var RestAPI = class {
3864
3918
  /**
3865
3919
  * This API will return user-specific Travel Rule questionnaire requirement information in reference to the current API key.
3866
3920
  *
3867
- * This endpoint specifically uses per second IP rate limit, user's total second level IP rate
3868
- *
3869
- * Weight: 18000
3870
- * Request limit: 10 requests per second
3871
- * > * This endpoint specifically uses per second IP rate limit, user's total second level IP rate
3872
- * limit is 180000/second. Response from the endpoint contains header
3873
- * key X-SAPI-USED-IP-WEIGHT-1S, which defines weight used by the current IP.
3921
+ * Weight: 1
3874
3922
  *
3875
3923
  * @summary Check Questionnaire Requirements (for local entities that require travel rule) (supporting network) (USER_DATA)
3876
3924
  * @param {CheckQuestionnaireRequirementsRequest} requestParameters Request parameters.
@@ -3899,9 +3947,26 @@ var RestAPI = class {
3899
3947
  return this.travelRuleApi.depositHistoryTravelRule(requestParameters);
3900
3948
  }
3901
3949
  /**
3902
- * Fetch address verification list
3950
+ * Fetch deposit history for local entities that with required travel rule information.
3903
3951
  *
3904
- * Weight: 10
3952
+ * Please notice the default `startTime` and `endTime` to make sure that time interval is within
3953
+ * If both ``startTime`` and ``endTime`` are sent, time between ``startTime`` and ``endTime`` must
3954
+ *
3955
+ * Weight: 1
3956
+ *
3957
+ * @summary Deposit History V2 (for local entities that required travel rule) (supporting network) (USER_DATA)
3958
+ * @param {DepositHistoryV2Request} requestParameters Request parameters.
3959
+ * @returns {Promise<RestApiResponse<DepositHistoryV2Response>>}
3960
+ * @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}
3961
+ * @see {@link https://developers.binance.com/docs/wallet/travel-rule/Deposit-History-V2 Binance API Documentation}
3962
+ */
3963
+ depositHistoryV2(requestParameters = {}) {
3964
+ return this.travelRuleApi.depositHistoryV2(requestParameters);
3965
+ }
3966
+ /**
3967
+ * Fetch address verification list for user to check on status and other details for the addresses stored in Address Book.
3968
+ *
3969
+ * Weight: 1
3905
3970
  *
3906
3971
  * @summary Fetch address verification list (USER_DATA)
3907
3972
  * @param {FetchAddressVerificationListRequest} requestParameters Request parameters.
@@ -3953,13 +4018,7 @@ var RestAPI = class {
3953
4018
  /**
3954
4019
  * Fetch the VASP list for local entities.
3955
4020
  *
3956
- * This endpoint specifically uses per second IP rate limit, user's total second level IP rate
3957
- *
3958
- * Weight: 18000
3959
- * Request limit: 10 requests per second
3960
- * > * This endpoint specifically uses per second IP rate limit, user's total second level IP rate
3961
- * limit is 180000/second. Response from the endpoint contains header
3962
- * key X-SAPI-USED-IP-WEIGHT-1S, which defines weight used by the current IP.
4021
+ * Weight: 1
3963
4022
  *
3964
4023
  * @summary VASP list (for local entities that require travel rule) (supporting network) (USER_DATA)
3965
4024
  * @param {VaspListRequest} requestParameters Request parameters.
@@ -3973,16 +4032,11 @@ var RestAPI = class {
3973
4032
  /**
3974
4033
  * Fetch withdraw history for local entities that required travel rule.
3975
4034
  *
3976
- * This endpoint specifically uses per second IP rate limit, user's total second level IP rate
3977
4035
  * `network` may not be in the response for old withdraw.
3978
4036
  * Please notice the default `startTime` and `endTime` to make sure that time interval is within
3979
4037
  * If both `startTime` and `endTime`are sent, time between `startTime`and `endTime`must be less
3980
4038
  *
3981
- * Weight: 18000
3982
- * Request limit: 10 requests per second
3983
- * > * This endpoint specifically uses per second IP rate limit, user's total second level IP rate
3984
- * limit is 180000/second. Response from the endpoint contains header
3985
- * key X-SAPI-USED-IP-WEIGHT-1S, which defines weight used by the current IP.
4039
+ * Weight: 1
3986
4040
  *
3987
4041
  * @summary Withdraw History (for local entities that require travel rule) (supporting network) (USER_DATA)
3988
4042
  * @param {WithdrawHistoryV1Request} requestParameters Request parameters.
@@ -3996,7 +4050,6 @@ var RestAPI = class {
3996
4050
  /**
3997
4051
  * Fetch withdraw history for local entities that required travel rule.
3998
4052
  *
3999
- * This endpoint specifically uses per second IP rate limit, user's total second level IP rate
4000
4053
  * `network` may not be in the response for old withdraw.
4001
4054
  * Withdrawal made through /sapi/v1/capital/withdraw/apply may not be in the response.
4002
4055
  * Please notice the default `startTime` and `endTime` to make sure that time interval is within
@@ -4007,11 +4060,7 @@ var RestAPI = class {
4007
4060
  * WithdrawOrderId only support 1.
4008
4061
  * If responsible does not include withdrawalStatus, please input trId or txId retrieve the data.
4009
4062
  *
4010
- * Weight: 18000
4011
- * Request limit: 10 requests per second
4012
- * > * This endpoint specifically uses per second IP rate limit, user's total second level IP rate
4013
- * limit is 180000/second. Response from the endpoint contains header
4014
- * key X-SAPI-USED-IP-WEIGHT-1S, which defines weight used by the current IP.
4063
+ * Weight: 1
4015
4064
  *
4016
4065
  * @summary Withdraw History V2 (for local entities that require travel rule) (supporting network) (USER_DATA)
4017
4066
  * @param {WithdrawHistoryV2Request} requestParameters Request parameters.