@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.mjs CHANGED
@@ -9,7 +9,7 @@ import { buildUserAgent, ConfigurationRestAPI as ConfigurationRestAPI7, WALLET_R
9
9
 
10
10
  // package.json
11
11
  var name = "@binance/wallet";
12
- var version = "8.0.0";
12
+ var version = "9.0.0";
13
13
 
14
14
  // src/rest-api/index.ts
15
15
  var rest_api_exports = {};
@@ -1763,6 +1763,7 @@ var CapitalApiAxiosParamCreator = function(configuration) {
1763
1763
  *
1764
1764
  * If `network` not send, return with default network of the coin.
1765
1765
  * You can get `network` and `isDefault` in `networkList` of a coin in the response of `Get /sapi/v1/capital/config/getall (HMAC SHA256)`.
1766
+ * 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.
1766
1767
  *
1767
1768
  * Weight: 900
1768
1769
  *
@@ -2099,6 +2100,7 @@ var CapitalApi = class {
2099
2100
  *
2100
2101
  * If `network` not send, return with default network of the coin.
2101
2102
  * You can get `network` and `isDefault` in `networkList` of a coin in the response of `Get /sapi/v1/capital/config/getall (HMAC SHA256)`.
2103
+ * 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.
2102
2104
  *
2103
2105
  * Weight: 900
2104
2106
  *
@@ -2370,13 +2372,7 @@ var TravelRuleApiAxiosParamCreator = function(configuration) {
2370
2372
  /**
2371
2373
  * This API will return user-specific Travel Rule questionnaire requirement information in reference to the current API key.
2372
2374
  *
2373
- * This endpoint specifically uses per second IP rate limit, user's total second level IP rate
2374
- *
2375
- * Weight: 18000
2376
- * Request limit: 10 requests per second
2377
- * > * This endpoint specifically uses per second IP rate limit, user's total second level IP rate
2378
- * limit is 180000/second. Response from the endpoint contains header
2379
- * key X-SAPI-USED-IP-WEIGHT-1S, which defines weight used by the current IP.
2375
+ * Weight: 1
2380
2376
  *
2381
2377
  * @summary Check Questionnaire Requirements (for local entities that require travel rule) (supporting network) (USER_DATA)
2382
2378
  * @param {number} [recvWindow]
@@ -2465,9 +2461,68 @@ var TravelRuleApiAxiosParamCreator = function(configuration) {
2465
2461
  };
2466
2462
  },
2467
2463
  /**
2468
- * Fetch address verification list
2464
+ * Fetch deposit history for local entities that with required travel rule information.
2469
2465
  *
2470
- * Weight: 10
2466
+ * Please notice the default `startTime` and `endTime` to make sure that time interval is within
2467
+ * If both ``startTime`` and ``endTime`` are sent, time between ``startTime`` and ``endTime`` must
2468
+ *
2469
+ * Weight: 1
2470
+ *
2471
+ * @summary Deposit History V2 (for local entities that required travel rule) (supporting network) (USER_DATA)
2472
+ * @param {string} [depositId] Comma(,) separated list of wallet tran Ids.
2473
+ * @param {string} [txId]
2474
+ * @param {string} [network]
2475
+ * @param {string} [coin]
2476
+ * @param {boolean} [retrieveQuestionnaire] true: return `questionnaire` within response.
2477
+ * @param {number} [startTime]
2478
+ * @param {number} [endTime]
2479
+ * @param {number} [offset] Default: 0
2480
+ * @param {number} [limit] min 7, max 30, default 7
2481
+ *
2482
+ * @throws {RequiredError}
2483
+ */
2484
+ depositHistoryV2: async (depositId, txId, network, coin, retrieveQuestionnaire, startTime, endTime, offset, limit) => {
2485
+ const localVarQueryParameter = {};
2486
+ if (depositId !== void 0 && depositId !== null) {
2487
+ localVarQueryParameter["depositId"] = depositId;
2488
+ }
2489
+ if (txId !== void 0 && txId !== null) {
2490
+ localVarQueryParameter["txId"] = txId;
2491
+ }
2492
+ if (network !== void 0 && network !== null) {
2493
+ localVarQueryParameter["network"] = network;
2494
+ }
2495
+ if (coin !== void 0 && coin !== null) {
2496
+ localVarQueryParameter["coin"] = coin;
2497
+ }
2498
+ if (retrieveQuestionnaire !== void 0 && retrieveQuestionnaire !== null) {
2499
+ localVarQueryParameter["retrieveQuestionnaire"] = retrieveQuestionnaire;
2500
+ }
2501
+ if (startTime !== void 0 && startTime !== null) {
2502
+ localVarQueryParameter["startTime"] = startTime;
2503
+ }
2504
+ if (endTime !== void 0 && endTime !== null) {
2505
+ localVarQueryParameter["endTime"] = endTime;
2506
+ }
2507
+ if (offset !== void 0 && offset !== null) {
2508
+ localVarQueryParameter["offset"] = offset;
2509
+ }
2510
+ if (limit !== void 0 && limit !== null) {
2511
+ localVarQueryParameter["limit"] = limit;
2512
+ }
2513
+ let _timeUnit;
2514
+ if ("timeUnit" in configuration) _timeUnit = configuration.timeUnit;
2515
+ return {
2516
+ endpoint: "/sapi/v2/localentity/deposit/history",
2517
+ method: "GET",
2518
+ params: localVarQueryParameter,
2519
+ timeUnit: _timeUnit
2520
+ };
2521
+ },
2522
+ /**
2523
+ * Fetch address verification list for user to check on status and other details for the addresses stored in Address Book.
2524
+ *
2525
+ * Weight: 1
2471
2526
  *
2472
2527
  * @summary Fetch address verification list (USER_DATA)
2473
2528
  * @param {number} [recvWindow]
@@ -2600,13 +2655,7 @@ var TravelRuleApiAxiosParamCreator = function(configuration) {
2600
2655
  /**
2601
2656
  * Fetch the VASP list for local entities.
2602
2657
  *
2603
- * This endpoint specifically uses per second IP rate limit, user's total second level IP rate
2604
- *
2605
- * Weight: 18000
2606
- * Request limit: 10 requests per second
2607
- * > * This endpoint specifically uses per second IP rate limit, user's total second level IP rate
2608
- * limit is 180000/second. Response from the endpoint contains header
2609
- * key X-SAPI-USED-IP-WEIGHT-1S, which defines weight used by the current IP.
2658
+ * Weight: 1
2610
2659
  *
2611
2660
  * @summary VASP list (for local entities that require travel rule) (supporting network) (USER_DATA)
2612
2661
  * @param {number} [recvWindow]
@@ -2630,16 +2679,11 @@ var TravelRuleApiAxiosParamCreator = function(configuration) {
2630
2679
  /**
2631
2680
  * Fetch withdraw history for local entities that required travel rule.
2632
2681
  *
2633
- * This endpoint specifically uses per second IP rate limit, user's total second level IP rate
2634
2682
  * `network` may not be in the response for old withdraw.
2635
2683
  * Please notice the default `startTime` and `endTime` to make sure that time interval is within
2636
2684
  * If both `startTime` and `endTime`are sent, time between `startTime`and `endTime`must be less
2637
2685
  *
2638
- * Weight: 18000
2639
- * Request limit: 10 requests per second
2640
- * > * This endpoint specifically uses per second IP rate limit, user's total second level IP rate
2641
- * limit is 180000/second. Response from the endpoint contains header
2642
- * key X-SAPI-USED-IP-WEIGHT-1S, which defines weight used by the current IP.
2686
+ * Weight: 1
2643
2687
  *
2644
2688
  * @summary Withdraw History (for local entities that require travel rule) (supporting network) (USER_DATA)
2645
2689
  * @param {string} [trId] Comma(,) separated list of travel rule record Ids.
@@ -2703,7 +2747,6 @@ var TravelRuleApiAxiosParamCreator = function(configuration) {
2703
2747
  /**
2704
2748
  * Fetch withdraw history for local entities that required travel rule.
2705
2749
  *
2706
- * This endpoint specifically uses per second IP rate limit, user's total second level IP rate
2707
2750
  * `network` may not be in the response for old withdraw.
2708
2751
  * Withdrawal made through /sapi/v1/capital/withdraw/apply may not be in the response.
2709
2752
  * Please notice the default `startTime` and `endTime` to make sure that time interval is within
@@ -2714,11 +2757,7 @@ var TravelRuleApiAxiosParamCreator = function(configuration) {
2714
2757
  * WithdrawOrderId only support 1.
2715
2758
  * If responsible does not include withdrawalStatus, please input trId or txId retrieve the data.
2716
2759
  *
2717
- * Weight: 18000
2718
- * Request limit: 10 requests per second
2719
- * > * This endpoint specifically uses per second IP rate limit, user's total second level IP rate
2720
- * limit is 180000/second. Response from the endpoint contains header
2721
- * key X-SAPI-USED-IP-WEIGHT-1S, which defines weight used by the current IP.
2760
+ * Weight: 1
2722
2761
  *
2723
2762
  * @summary Withdraw History V2 (for local entities that require travel rule) (supporting network) (USER_DATA)
2724
2763
  * @param {string} [trId] Comma(,) separated list of travel rule record Ids.
@@ -2903,13 +2942,7 @@ var TravelRuleApi = class {
2903
2942
  /**
2904
2943
  * This API will return user-specific Travel Rule questionnaire requirement information in reference to the current API key.
2905
2944
  *
2906
- * This endpoint specifically uses per second IP rate limit, user's total second level IP rate
2907
- *
2908
- * Weight: 18000
2909
- * Request limit: 10 requests per second
2910
- * > * This endpoint specifically uses per second IP rate limit, user's total second level IP rate
2911
- * limit is 180000/second. Response from the endpoint contains header
2912
- * key X-SAPI-USED-IP-WEIGHT-1S, which defines weight used by the current IP.
2945
+ * Weight: 1
2913
2946
  *
2914
2947
  * @summary Check Questionnaire Requirements (for local entities that require travel rule) (supporting network) (USER_DATA)
2915
2948
  * @param {CheckQuestionnaireRequirementsRequest} requestParameters Request parameters.
@@ -2970,9 +3003,45 @@ var TravelRuleApi = class {
2970
3003
  );
2971
3004
  }
2972
3005
  /**
2973
- * Fetch address verification list
3006
+ * Fetch deposit history for local entities that with required travel rule information.
2974
3007
  *
2975
- * Weight: 10
3008
+ * Please notice the default `startTime` and `endTime` to make sure that time interval is within
3009
+ * If both ``startTime`` and ``endTime`` are sent, time between ``startTime`` and ``endTime`` must
3010
+ *
3011
+ * Weight: 1
3012
+ *
3013
+ * @summary Deposit History V2 (for local entities that required travel rule) (supporting network) (USER_DATA)
3014
+ * @param {DepositHistoryV2Request} requestParameters Request parameters.
3015
+ * @returns {Promise<RestApiResponse<DepositHistoryV2Response>>}
3016
+ * @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}
3017
+ * @memberof TravelRuleApi
3018
+ * @see {@link https://developers.binance.com/docs/wallet/travel-rule/Deposit-History-V2 Binance API Documentation}
3019
+ */
3020
+ async depositHistoryV2(requestParameters = {}) {
3021
+ const localVarAxiosArgs = await this.localVarAxiosParamCreator.depositHistoryV2(
3022
+ requestParameters?.depositId,
3023
+ requestParameters?.txId,
3024
+ requestParameters?.network,
3025
+ requestParameters?.coin,
3026
+ requestParameters?.retrieveQuestionnaire,
3027
+ requestParameters?.startTime,
3028
+ requestParameters?.endTime,
3029
+ requestParameters?.offset,
3030
+ requestParameters?.limit
3031
+ );
3032
+ return sendRequest5(
3033
+ this.configuration,
3034
+ localVarAxiosArgs.endpoint,
3035
+ localVarAxiosArgs.method,
3036
+ localVarAxiosArgs.params,
3037
+ localVarAxiosArgs?.timeUnit,
3038
+ { isSigned: true }
3039
+ );
3040
+ }
3041
+ /**
3042
+ * Fetch address verification list for user to check on status and other details for the addresses stored in Address Book.
3043
+ *
3044
+ * Weight: 1
2976
3045
  *
2977
3046
  * @summary Fetch address verification list (USER_DATA)
2978
3047
  * @param {FetchAddressVerificationListRequest} requestParameters Request parameters.
@@ -3067,13 +3136,7 @@ var TravelRuleApi = class {
3067
3136
  /**
3068
3137
  * Fetch the VASP list for local entities.
3069
3138
  *
3070
- * This endpoint specifically uses per second IP rate limit, user's total second level IP rate
3071
- *
3072
- * Weight: 18000
3073
- * Request limit: 10 requests per second
3074
- * > * This endpoint specifically uses per second IP rate limit, user's total second level IP rate
3075
- * limit is 180000/second. Response from the endpoint contains header
3076
- * key X-SAPI-USED-IP-WEIGHT-1S, which defines weight used by the current IP.
3139
+ * Weight: 1
3077
3140
  *
3078
3141
  * @summary VASP list (for local entities that require travel rule) (supporting network) (USER_DATA)
3079
3142
  * @param {VaspListRequest} requestParameters Request parameters.
@@ -3098,16 +3161,11 @@ var TravelRuleApi = class {
3098
3161
  /**
3099
3162
  * Fetch withdraw history for local entities that required travel rule.
3100
3163
  *
3101
- * This endpoint specifically uses per second IP rate limit, user's total second level IP rate
3102
3164
  * `network` may not be in the response for old withdraw.
3103
3165
  * Please notice the default `startTime` and `endTime` to make sure that time interval is within
3104
3166
  * If both `startTime` and `endTime`are sent, time between `startTime`and `endTime`must be less
3105
3167
  *
3106
- * Weight: 18000
3107
- * Request limit: 10 requests per second
3108
- * > * This endpoint specifically uses per second IP rate limit, user's total second level IP rate
3109
- * limit is 180000/second. Response from the endpoint contains header
3110
- * key X-SAPI-USED-IP-WEIGHT-1S, which defines weight used by the current IP.
3168
+ * Weight: 1
3111
3169
  *
3112
3170
  * @summary Withdraw History (for local entities that require travel rule) (supporting network) (USER_DATA)
3113
3171
  * @param {WithdrawHistoryV1Request} requestParameters Request parameters.
@@ -3142,7 +3200,6 @@ var TravelRuleApi = class {
3142
3200
  /**
3143
3201
  * Fetch withdraw history for local entities that required travel rule.
3144
3202
  *
3145
- * This endpoint specifically uses per second IP rate limit, user's total second level IP rate
3146
3203
  * `network` may not be in the response for old withdraw.
3147
3204
  * Withdrawal made through /sapi/v1/capital/withdraw/apply may not be in the response.
3148
3205
  * Please notice the default `startTime` and `endTime` to make sure that time interval is within
@@ -3153,11 +3210,7 @@ var TravelRuleApi = class {
3153
3210
  * WithdrawOrderId only support 1.
3154
3211
  * If responsible does not include withdrawalStatus, please input trId or txId retrieve the data.
3155
3212
  *
3156
- * Weight: 18000
3157
- * Request limit: 10 requests per second
3158
- * > * This endpoint specifically uses per second IP rate limit, user's total second level IP rate
3159
- * limit is 180000/second. Response from the endpoint contains header
3160
- * key X-SAPI-USED-IP-WEIGHT-1S, which defines weight used by the current IP.
3213
+ * Weight: 1
3161
3214
  *
3162
3215
  * @summary Withdraw History V2 (for local entities that require travel rule) (supporting network) (USER_DATA)
3163
3216
  * @param {WithdrawHistoryV2Request} requestParameters Request parameters.
@@ -3763,6 +3816,7 @@ var RestAPI = class {
3763
3816
  *
3764
3817
  * If `network` not send, return with default network of the coin.
3765
3818
  * You can get `network` and `isDefault` in `networkList` of a coin in the response of `Get /sapi/v1/capital/config/getall (HMAC SHA256)`.
3819
+ * 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.
3766
3820
  *
3767
3821
  * Weight: 900
3768
3822
  *
@@ -3846,13 +3900,7 @@ var RestAPI = class {
3846
3900
  /**
3847
3901
  * This API will return user-specific Travel Rule questionnaire requirement information in reference to the current API key.
3848
3902
  *
3849
- * This endpoint specifically uses per second IP rate limit, user's total second level IP rate
3850
- *
3851
- * Weight: 18000
3852
- * Request limit: 10 requests per second
3853
- * > * This endpoint specifically uses per second IP rate limit, user's total second level IP rate
3854
- * limit is 180000/second. Response from the endpoint contains header
3855
- * key X-SAPI-USED-IP-WEIGHT-1S, which defines weight used by the current IP.
3903
+ * Weight: 1
3856
3904
  *
3857
3905
  * @summary Check Questionnaire Requirements (for local entities that require travel rule) (supporting network) (USER_DATA)
3858
3906
  * @param {CheckQuestionnaireRequirementsRequest} requestParameters Request parameters.
@@ -3881,9 +3929,26 @@ var RestAPI = class {
3881
3929
  return this.travelRuleApi.depositHistoryTravelRule(requestParameters);
3882
3930
  }
3883
3931
  /**
3884
- * Fetch address verification list
3932
+ * Fetch deposit history for local entities that with required travel rule information.
3885
3933
  *
3886
- * Weight: 10
3934
+ * Please notice the default `startTime` and `endTime` to make sure that time interval is within
3935
+ * If both ``startTime`` and ``endTime`` are sent, time between ``startTime`` and ``endTime`` must
3936
+ *
3937
+ * Weight: 1
3938
+ *
3939
+ * @summary Deposit History V2 (for local entities that required travel rule) (supporting network) (USER_DATA)
3940
+ * @param {DepositHistoryV2Request} requestParameters Request parameters.
3941
+ * @returns {Promise<RestApiResponse<DepositHistoryV2Response>>}
3942
+ * @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}
3943
+ * @see {@link https://developers.binance.com/docs/wallet/travel-rule/Deposit-History-V2 Binance API Documentation}
3944
+ */
3945
+ depositHistoryV2(requestParameters = {}) {
3946
+ return this.travelRuleApi.depositHistoryV2(requestParameters);
3947
+ }
3948
+ /**
3949
+ * Fetch address verification list for user to check on status and other details for the addresses stored in Address Book.
3950
+ *
3951
+ * Weight: 1
3887
3952
  *
3888
3953
  * @summary Fetch address verification list (USER_DATA)
3889
3954
  * @param {FetchAddressVerificationListRequest} requestParameters Request parameters.
@@ -3935,13 +4000,7 @@ var RestAPI = class {
3935
4000
  /**
3936
4001
  * Fetch the VASP list for local entities.
3937
4002
  *
3938
- * This endpoint specifically uses per second IP rate limit, user's total second level IP rate
3939
- *
3940
- * Weight: 18000
3941
- * Request limit: 10 requests per second
3942
- * > * This endpoint specifically uses per second IP rate limit, user's total second level IP rate
3943
- * limit is 180000/second. Response from the endpoint contains header
3944
- * key X-SAPI-USED-IP-WEIGHT-1S, which defines weight used by the current IP.
4003
+ * Weight: 1
3945
4004
  *
3946
4005
  * @summary VASP list (for local entities that require travel rule) (supporting network) (USER_DATA)
3947
4006
  * @param {VaspListRequest} requestParameters Request parameters.
@@ -3955,16 +4014,11 @@ var RestAPI = class {
3955
4014
  /**
3956
4015
  * Fetch withdraw history for local entities that required travel rule.
3957
4016
  *
3958
- * This endpoint specifically uses per second IP rate limit, user's total second level IP rate
3959
4017
  * `network` may not be in the response for old withdraw.
3960
4018
  * Please notice the default `startTime` and `endTime` to make sure that time interval is within
3961
4019
  * If both `startTime` and `endTime`are sent, time between `startTime`and `endTime`must be less
3962
4020
  *
3963
- * Weight: 18000
3964
- * Request limit: 10 requests per second
3965
- * > * This endpoint specifically uses per second IP rate limit, user's total second level IP rate
3966
- * limit is 180000/second. Response from the endpoint contains header
3967
- * key X-SAPI-USED-IP-WEIGHT-1S, which defines weight used by the current IP.
4021
+ * Weight: 1
3968
4022
  *
3969
4023
  * @summary Withdraw History (for local entities that require travel rule) (supporting network) (USER_DATA)
3970
4024
  * @param {WithdrawHistoryV1Request} requestParameters Request parameters.
@@ -3978,7 +4032,6 @@ var RestAPI = class {
3978
4032
  /**
3979
4033
  * Fetch withdraw history for local entities that required travel rule.
3980
4034
  *
3981
- * This endpoint specifically uses per second IP rate limit, user's total second level IP rate
3982
4035
  * `network` may not be in the response for old withdraw.
3983
4036
  * Withdrawal made through /sapi/v1/capital/withdraw/apply may not be in the response.
3984
4037
  * Please notice the default `startTime` and `endTime` to make sure that time interval is within
@@ -3989,11 +4042,7 @@ var RestAPI = class {
3989
4042
  * WithdrawOrderId only support 1.
3990
4043
  * If responsible does not include withdrawalStatus, please input trId or txId retrieve the data.
3991
4044
  *
3992
- * Weight: 18000
3993
- * Request limit: 10 requests per second
3994
- * > * This endpoint specifically uses per second IP rate limit, user's total second level IP rate
3995
- * limit is 180000/second. Response from the endpoint contains header
3996
- * key X-SAPI-USED-IP-WEIGHT-1S, which defines weight used by the current IP.
4045
+ * Weight: 1
3997
4046
  *
3998
4047
  * @summary Withdraw History V2 (for local entities that require travel rule) (supporting network) (USER_DATA)
3999
4048
  * @param {WithdrawHistoryV2Request} requestParameters Request parameters.