@binance/wallet 1.0.0 → 2.0.1

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
@@ -18,8 +18,8 @@ var __copyProps = (to, from, except, desc) => {
18
18
  var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
19
19
 
20
20
  // src/index.ts
21
- var src_exports = {};
22
- __export(src_exports, {
21
+ var index_exports = {};
22
+ __export(index_exports, {
23
23
  BadRequestError: () => import_common8.BadRequestError,
24
24
  ConnectorClientError: () => import_common8.ConnectorClientError,
25
25
  ForbiddenError: () => import_common8.ForbiddenError,
@@ -31,11 +31,10 @@ __export(src_exports, {
31
31
  TooManyRequestsError: () => import_common8.TooManyRequestsError,
32
32
  UnauthorizedError: () => import_common8.UnauthorizedError,
33
33
  WALLET_REST_API_PROD_URL: () => import_common8.WALLET_REST_API_PROD_URL,
34
- WALLET_REST_API_TESTNET_URL: () => import_common8.WALLET_REST_API_TESTNET_URL,
35
34
  Wallet: () => Wallet,
36
35
  WalletRestAPI: () => rest_api_exports
37
36
  });
38
- module.exports = __toCommonJS(src_exports);
37
+ module.exports = __toCommonJS(index_exports);
39
38
 
40
39
  // src/wallet.ts
41
40
  var import_os = require("os");
@@ -43,7 +42,7 @@ var import_common7 = require("@binance/common");
43
42
 
44
43
  // package.json
45
44
  var name = "@binance/wallet";
46
- var version = "1.0.0";
45
+ var version = "2.0.1";
47
46
 
48
47
  // src/rest-api/index.ts
49
48
  var rest_api_exports = {};
@@ -76,8 +75,7 @@ var AccountApiAxiosParamCreator = function(configuration) {
76
75
  localVarQueryParameter["recvWindow"] = recvWindow;
77
76
  }
78
77
  let _timeUnit;
79
- if ("timeUnit" in configuration)
80
- _timeUnit = configuration.timeUnit;
78
+ if ("timeUnit" in configuration) _timeUnit = configuration.timeUnit;
81
79
  return {
82
80
  endpoint: "/sapi/v1/account/apiTradingStatus",
83
81
  method: "GET",
@@ -101,8 +99,7 @@ var AccountApiAxiosParamCreator = function(configuration) {
101
99
  localVarQueryParameter["recvWindow"] = recvWindow;
102
100
  }
103
101
  let _timeUnit;
104
- if ("timeUnit" in configuration)
105
- _timeUnit = configuration.timeUnit;
102
+ if ("timeUnit" in configuration) _timeUnit = configuration.timeUnit;
106
103
  return {
107
104
  endpoint: "/sapi/v1/account/info",
108
105
  method: "GET",
@@ -126,8 +123,7 @@ var AccountApiAxiosParamCreator = function(configuration) {
126
123
  localVarQueryParameter["recvWindow"] = recvWindow;
127
124
  }
128
125
  let _timeUnit;
129
- if ("timeUnit" in configuration)
130
- _timeUnit = configuration.timeUnit;
126
+ if ("timeUnit" in configuration) _timeUnit = configuration.timeUnit;
131
127
  return {
132
128
  endpoint: "/sapi/v1/account/status",
133
129
  method: "GET",
@@ -172,8 +168,7 @@ var AccountApiAxiosParamCreator = function(configuration) {
172
168
  localVarQueryParameter["recvWindow"] = recvWindow;
173
169
  }
174
170
  let _timeUnit;
175
- if ("timeUnit" in configuration)
176
- _timeUnit = configuration.timeUnit;
171
+ if ("timeUnit" in configuration) _timeUnit = configuration.timeUnit;
177
172
  return {
178
173
  endpoint: "/sapi/v1/accountSnapshot",
179
174
  method: "GET",
@@ -196,8 +191,7 @@ var AccountApiAxiosParamCreator = function(configuration) {
196
191
  localVarQueryParameter["recvWindow"] = recvWindow;
197
192
  }
198
193
  let _timeUnit;
199
- if ("timeUnit" in configuration)
200
- _timeUnit = configuration.timeUnit;
194
+ if ("timeUnit" in configuration) _timeUnit = configuration.timeUnit;
201
195
  return {
202
196
  endpoint: "/sapi/v1/account/disableFastWithdrawSwitch",
203
197
  method: "POST",
@@ -224,8 +218,7 @@ var AccountApiAxiosParamCreator = function(configuration) {
224
218
  localVarQueryParameter["recvWindow"] = recvWindow;
225
219
  }
226
220
  let _timeUnit;
227
- if ("timeUnit" in configuration)
228
- _timeUnit = configuration.timeUnit;
221
+ if ("timeUnit" in configuration) _timeUnit = configuration.timeUnit;
229
222
  return {
230
223
  endpoint: "/sapi/v1/account/enableFastWithdrawSwitch",
231
224
  method: "POST",
@@ -249,8 +242,7 @@ var AccountApiAxiosParamCreator = function(configuration) {
249
242
  localVarQueryParameter["recvWindow"] = recvWindow;
250
243
  }
251
244
  let _timeUnit;
252
- if ("timeUnit" in configuration)
253
- _timeUnit = configuration.timeUnit;
245
+ if ("timeUnit" in configuration) _timeUnit = configuration.timeUnit;
254
246
  return {
255
247
  endpoint: "/sapi/v1/account/apiRestrictions",
256
248
  method: "GET",
@@ -475,8 +467,7 @@ var AssetApiAxiosParamCreator = function(configuration) {
475
467
  localVarQueryParameter["recvWindow"] = recvWindow;
476
468
  }
477
469
  let _timeUnit;
478
- if ("timeUnit" in configuration)
479
- _timeUnit = configuration.timeUnit;
470
+ if ("timeUnit" in configuration) _timeUnit = configuration.timeUnit;
480
471
  return {
481
472
  endpoint: "/sapi/v1/asset/assetDetail",
482
473
  method: "GET",
@@ -519,8 +510,7 @@ var AssetApiAxiosParamCreator = function(configuration) {
519
510
  localVarQueryParameter["recvWindow"] = recvWindow;
520
511
  }
521
512
  let _timeUnit;
522
- if ("timeUnit" in configuration)
523
- _timeUnit = configuration.timeUnit;
513
+ if ("timeUnit" in configuration) _timeUnit = configuration.timeUnit;
524
514
  return {
525
515
  endpoint: "/sapi/v1/asset/assetDividend",
526
516
  method: "GET",
@@ -555,8 +545,7 @@ var AssetApiAxiosParamCreator = function(configuration) {
555
545
  localVarQueryParameter["recvWindow"] = recvWindow;
556
546
  }
557
547
  let _timeUnit;
558
- if ("timeUnit" in configuration)
559
- _timeUnit = configuration.timeUnit;
548
+ if ("timeUnit" in configuration) _timeUnit = configuration.timeUnit;
560
549
  return {
561
550
  endpoint: "/sapi/v1/asset/dust",
562
551
  method: "POST",
@@ -591,8 +580,7 @@ var AssetApiAxiosParamCreator = function(configuration) {
591
580
  localVarQueryParameter["recvWindow"] = recvWindow;
592
581
  }
593
582
  let _timeUnit;
594
- if ("timeUnit" in configuration)
595
- _timeUnit = configuration.timeUnit;
583
+ if ("timeUnit" in configuration) _timeUnit = configuration.timeUnit;
596
584
  return {
597
585
  endpoint: "/sapi/v1/asset/dribblet",
598
586
  method: "GET",
@@ -627,8 +615,7 @@ var AssetApiAxiosParamCreator = function(configuration) {
627
615
  localVarQueryParameter["recvWindow"] = recvWindow;
628
616
  }
629
617
  let _timeUnit;
630
- if ("timeUnit" in configuration)
631
- _timeUnit = configuration.timeUnit;
618
+ if ("timeUnit" in configuration) _timeUnit = configuration.timeUnit;
632
619
  return {
633
620
  endpoint: "/sapi/v1/asset/get-funding-asset",
634
621
  method: "POST",
@@ -656,8 +643,7 @@ var AssetApiAxiosParamCreator = function(configuration) {
656
643
  localVarQueryParameter["recvWindow"] = recvWindow;
657
644
  }
658
645
  let _timeUnit;
659
- if ("timeUnit" in configuration)
660
- _timeUnit = configuration.timeUnit;
646
+ if ("timeUnit" in configuration) _timeUnit = configuration.timeUnit;
661
647
  return {
662
648
  endpoint: "/sapi/v1/asset/dust-btc",
663
649
  method: "POST",
@@ -710,8 +696,7 @@ var AssetApiAxiosParamCreator = function(configuration) {
710
696
  localVarQueryParameter["size"] = size;
711
697
  }
712
698
  let _timeUnit;
713
- if ("timeUnit" in configuration)
714
- _timeUnit = configuration.timeUnit;
699
+ if ("timeUnit" in configuration) _timeUnit = configuration.timeUnit;
715
700
  return {
716
701
  endpoint: "/sapi/v1/asset/ledger-transfer/cloud-mining/queryByPage",
717
702
  method: "GET",
@@ -731,8 +716,7 @@ var AssetApiAxiosParamCreator = function(configuration) {
731
716
  getOpenSymbolList: async () => {
732
717
  const localVarQueryParameter = {};
733
718
  let _timeUnit;
734
- if ("timeUnit" in configuration)
735
- _timeUnit = configuration.timeUnit;
719
+ if ("timeUnit" in configuration) _timeUnit = configuration.timeUnit;
736
720
  return {
737
721
  endpoint: "/sapi/v1/spot/open-symbol-list",
738
722
  method: "GET",
@@ -789,8 +773,7 @@ var AssetApiAxiosParamCreator = function(configuration) {
789
773
  localVarQueryParameter["recvWindow"] = recvWindow;
790
774
  }
791
775
  let _timeUnit;
792
- if ("timeUnit" in configuration)
793
- _timeUnit = configuration.timeUnit;
776
+ if ("timeUnit" in configuration) _timeUnit = configuration.timeUnit;
794
777
  return {
795
778
  endpoint: "/sapi/v1/asset/custody/transfer-history",
796
779
  method: "GET",
@@ -849,8 +832,7 @@ var AssetApiAxiosParamCreator = function(configuration) {
849
832
  localVarQueryParameter["recvWindow"] = recvWindow;
850
833
  }
851
834
  let _timeUnit;
852
- if ("timeUnit" in configuration)
853
- _timeUnit = configuration.timeUnit;
835
+ if ("timeUnit" in configuration) _timeUnit = configuration.timeUnit;
854
836
  return {
855
837
  endpoint: "/sapi/v1/asset/transfer",
856
838
  method: "GET",
@@ -881,8 +863,7 @@ var AssetApiAxiosParamCreator = function(configuration) {
881
863
  localVarQueryParameter["recvWindow"] = recvWindow;
882
864
  }
883
865
  let _timeUnit;
884
- if ("timeUnit" in configuration)
885
- _timeUnit = configuration.timeUnit;
866
+ if ("timeUnit" in configuration) _timeUnit = configuration.timeUnit;
886
867
  return {
887
868
  endpoint: "/sapi/v1/asset/wallet/balance",
888
869
  method: "GET",
@@ -916,8 +897,7 @@ var AssetApiAxiosParamCreator = function(configuration) {
916
897
  localVarQueryParameter["recvWindow"] = recvWindow;
917
898
  }
918
899
  let _timeUnit;
919
- if ("timeUnit" in configuration)
920
- _timeUnit = configuration.timeUnit;
900
+ if ("timeUnit" in configuration) _timeUnit = configuration.timeUnit;
921
901
  return {
922
902
  endpoint: "/sapi/v1/bnbBurn",
923
903
  method: "POST",
@@ -945,8 +925,7 @@ var AssetApiAxiosParamCreator = function(configuration) {
945
925
  localVarQueryParameter["recvWindow"] = recvWindow;
946
926
  }
947
927
  let _timeUnit;
948
- if ("timeUnit" in configuration)
949
- _timeUnit = configuration.timeUnit;
928
+ if ("timeUnit" in configuration) _timeUnit = configuration.timeUnit;
950
929
  return {
951
930
  endpoint: "/sapi/v1/asset/tradeFee",
952
931
  method: "GET",
@@ -981,8 +960,7 @@ var AssetApiAxiosParamCreator = function(configuration) {
981
960
  localVarQueryParameter["recvWindow"] = recvWindow;
982
961
  }
983
962
  let _timeUnit;
984
- if ("timeUnit" in configuration)
985
- _timeUnit = configuration.timeUnit;
963
+ if ("timeUnit" in configuration) _timeUnit = configuration.timeUnit;
986
964
  return {
987
965
  endpoint: "/sapi/v3/asset/getUserAsset",
988
966
  method: "POST",
@@ -1064,8 +1042,7 @@ var AssetApiAxiosParamCreator = function(configuration) {
1064
1042
  localVarQueryParameter["recvWindow"] = recvWindow;
1065
1043
  }
1066
1044
  let _timeUnit;
1067
- if ("timeUnit" in configuration)
1068
- _timeUnit = configuration.timeUnit;
1045
+ if ("timeUnit" in configuration) _timeUnit = configuration.timeUnit;
1069
1046
  return {
1070
1047
  endpoint: "/sapi/v1/asset/transfer",
1071
1048
  method: "POST",
@@ -1584,8 +1561,7 @@ var CapitalApiAxiosParamCreator = function(configuration) {
1584
1561
  localVarQueryParameter["recvWindow"] = recvWindow;
1585
1562
  }
1586
1563
  let _timeUnit;
1587
- if ("timeUnit" in configuration)
1588
- _timeUnit = configuration.timeUnit;
1564
+ if ("timeUnit" in configuration) _timeUnit = configuration.timeUnit;
1589
1565
  return {
1590
1566
  endpoint: "/sapi/v1/capital/config/getall",
1591
1567
  method: "GET",
@@ -1626,8 +1602,7 @@ var CapitalApiAxiosParamCreator = function(configuration) {
1626
1602
  localVarQueryParameter["recvWindow"] = recvWindow;
1627
1603
  }
1628
1604
  let _timeUnit;
1629
- if ("timeUnit" in configuration)
1630
- _timeUnit = configuration.timeUnit;
1605
+ if ("timeUnit" in configuration) _timeUnit = configuration.timeUnit;
1631
1606
  return {
1632
1607
  endpoint: "/sapi/v1/capital/deposit/address",
1633
1608
  method: "GET",
@@ -1687,8 +1662,7 @@ var CapitalApiAxiosParamCreator = function(configuration) {
1687
1662
  localVarQueryParameter["txId"] = txId;
1688
1663
  }
1689
1664
  let _timeUnit;
1690
- if ("timeUnit" in configuration)
1691
- _timeUnit = configuration.timeUnit;
1665
+ if ("timeUnit" in configuration) _timeUnit = configuration.timeUnit;
1692
1666
  return {
1693
1667
  endpoint: "/sapi/v1/capital/deposit/hisrec",
1694
1668
  method: "GET",
@@ -1721,8 +1695,7 @@ var CapitalApiAxiosParamCreator = function(configuration) {
1721
1695
  localVarQueryParameter["network"] = network;
1722
1696
  }
1723
1697
  let _timeUnit;
1724
- if ("timeUnit" in configuration)
1725
- _timeUnit = configuration.timeUnit;
1698
+ if ("timeUnit" in configuration) _timeUnit = configuration.timeUnit;
1726
1699
  return {
1727
1700
  endpoint: "/sapi/v1/capital/deposit/address/list",
1728
1701
  method: "GET",
@@ -1742,8 +1715,7 @@ var CapitalApiAxiosParamCreator = function(configuration) {
1742
1715
  fetchWithdrawAddressList: async () => {
1743
1716
  const localVarQueryParameter = {};
1744
1717
  let _timeUnit;
1745
- if ("timeUnit" in configuration)
1746
- _timeUnit = configuration.timeUnit;
1718
+ if ("timeUnit" in configuration) _timeUnit = configuration.timeUnit;
1747
1719
  return {
1748
1720
  endpoint: "/sapi/v1/capital/withdraw/address/list",
1749
1721
  method: "GET",
@@ -1781,8 +1753,7 @@ var CapitalApiAxiosParamCreator = function(configuration) {
1781
1753
  localVarQueryParameter["subUserId"] = subUserId;
1782
1754
  }
1783
1755
  let _timeUnit;
1784
- if ("timeUnit" in configuration)
1785
- _timeUnit = configuration.timeUnit;
1756
+ if ("timeUnit" in configuration) _timeUnit = configuration.timeUnit;
1786
1757
  return {
1787
1758
  endpoint: "/sapi/v1/capital/deposit/credit-apply",
1788
1759
  method: "POST",
@@ -1849,8 +1820,7 @@ var CapitalApiAxiosParamCreator = function(configuration) {
1849
1820
  localVarQueryParameter["recvWindow"] = recvWindow;
1850
1821
  }
1851
1822
  let _timeUnit;
1852
- if ("timeUnit" in configuration)
1853
- _timeUnit = configuration.timeUnit;
1823
+ if ("timeUnit" in configuration) _timeUnit = configuration.timeUnit;
1854
1824
  return {
1855
1825
  endpoint: "/sapi/v1/capital/withdraw/apply",
1856
1826
  method: "POST",
@@ -1914,8 +1884,7 @@ var CapitalApiAxiosParamCreator = function(configuration) {
1914
1884
  localVarQueryParameter["recvWindow"] = recvWindow;
1915
1885
  }
1916
1886
  let _timeUnit;
1917
- if ("timeUnit" in configuration)
1918
- _timeUnit = configuration.timeUnit;
1887
+ if ("timeUnit" in configuration) _timeUnit = configuration.timeUnit;
1919
1888
  return {
1920
1889
  endpoint: "/sapi/v1/capital/withdraw/history",
1921
1890
  method: "GET",
@@ -2207,8 +2176,7 @@ var OthersApiAxiosParamCreator = function(configuration) {
2207
2176
  localVarQueryParameter["recvWindow"] = recvWindow;
2208
2177
  }
2209
2178
  let _timeUnit;
2210
- if ("timeUnit" in configuration)
2211
- _timeUnit = configuration.timeUnit;
2179
+ if ("timeUnit" in configuration) _timeUnit = configuration.timeUnit;
2212
2180
  return {
2213
2181
  endpoint: "/sapi/v1/spot/delist-schedule",
2214
2182
  method: "GET",
@@ -2228,8 +2196,7 @@ var OthersApiAxiosParamCreator = function(configuration) {
2228
2196
  systemStatus: async () => {
2229
2197
  const localVarQueryParameter = {};
2230
2198
  let _timeUnit;
2231
- if ("timeUnit" in configuration)
2232
- _timeUnit = configuration.timeUnit;
2199
+ if ("timeUnit" in configuration) _timeUnit = configuration.timeUnit;
2233
2200
  return {
2234
2201
  endpoint: "/sapi/v1/system/status",
2235
2202
  method: "GET",
@@ -2297,6 +2264,91 @@ var OthersApi = class {
2297
2264
  var import_common5 = require("@binance/common");
2298
2265
  var TravelRuleApiAxiosParamCreator = function(configuration) {
2299
2266
  return {
2267
+ /**
2268
+ * Submit a withdrawal request for brokers of local entities that required travel rule.
2269
+ *
2270
+ * If `network` not send, return with default network of the coin, but if the address could not match default network, the withdraw will be rejected.
2271
+ * You can get `network` in `networkList` of a coin in the response
2272
+ * Questionnaire is different for each local entity, please refer to
2273
+ * If getting error like `Questionnaire format not valid.` or `Questionnaire must not be blank`,
2274
+ *
2275
+ * Weight: 600
2276
+ *
2277
+ * @summary Broker Withdraw (for brokers of local entities that require travel rule) (USER_DATA)
2278
+ * @param {string} subAccountId External user ID.
2279
+ * @param {string} address
2280
+ * @param {string} coin
2281
+ * @param {number} amount
2282
+ * @param {string} withdrawOrderId withdrawID defined by the client (i.e. client's internal withdrawID)
2283
+ * @param {string} questionnaire JSON format questionnaire answers.
2284
+ * @param {string} originatorPii JSON format originator Pii, see StandardPii section below
2285
+ * @param {string} signature Must be the last parameter.
2286
+ * @param {string} [addressTag] Secondary address identifier for coins like XRP,XMR etc.
2287
+ * @param {string} [network]
2288
+ * @param {string} [addressName] Description of the address. Address book cap is 200, space in name should be encoded into `%20`
2289
+ * @param {boolean} [transactionFeeFlag] When making internal transfer, `true` for returning the fee to the destination account; `false` for returning the fee back to the departure account. Default `false`.
2290
+ * @param {number} [walletType] The wallet type for withdraw,0-spot wallet ,1-funding wallet. Default walletType is the current "selected wallet" under wallet->Fiat and Spot/Funding->Deposit
2291
+ *
2292
+ * @throws {RequiredError}
2293
+ */
2294
+ brokerWithdraw: async (subAccountId, address, coin, amount, withdrawOrderId, questionnaire, originatorPii, signature, addressTag, network, addressName, transactionFeeFlag, walletType) => {
2295
+ (0, import_common5.assertParamExists)("brokerWithdraw", "subAccountId", subAccountId);
2296
+ (0, import_common5.assertParamExists)("brokerWithdraw", "address", address);
2297
+ (0, import_common5.assertParamExists)("brokerWithdraw", "coin", coin);
2298
+ (0, import_common5.assertParamExists)("brokerWithdraw", "amount", amount);
2299
+ (0, import_common5.assertParamExists)("brokerWithdraw", "withdrawOrderId", withdrawOrderId);
2300
+ (0, import_common5.assertParamExists)("brokerWithdraw", "questionnaire", questionnaire);
2301
+ (0, import_common5.assertParamExists)("brokerWithdraw", "originatorPii", originatorPii);
2302
+ (0, import_common5.assertParamExists)("brokerWithdraw", "signature", signature);
2303
+ const localVarQueryParameter = {};
2304
+ if (subAccountId !== void 0 && subAccountId !== null) {
2305
+ localVarQueryParameter["subAccountId"] = subAccountId;
2306
+ }
2307
+ if (address !== void 0 && address !== null) {
2308
+ localVarQueryParameter["address"] = address;
2309
+ }
2310
+ if (addressTag !== void 0 && addressTag !== null) {
2311
+ localVarQueryParameter["addressTag"] = addressTag;
2312
+ }
2313
+ if (network !== void 0 && network !== null) {
2314
+ localVarQueryParameter["network"] = network;
2315
+ }
2316
+ if (coin !== void 0 && coin !== null) {
2317
+ localVarQueryParameter["coin"] = coin;
2318
+ }
2319
+ if (addressName !== void 0 && addressName !== null) {
2320
+ localVarQueryParameter["addressName"] = addressName;
2321
+ }
2322
+ if (amount !== void 0 && amount !== null) {
2323
+ localVarQueryParameter["amount"] = amount;
2324
+ }
2325
+ if (withdrawOrderId !== void 0 && withdrawOrderId !== null) {
2326
+ localVarQueryParameter["withdrawOrderId"] = withdrawOrderId;
2327
+ }
2328
+ if (transactionFeeFlag !== void 0 && transactionFeeFlag !== null) {
2329
+ localVarQueryParameter["transactionFeeFlag"] = transactionFeeFlag;
2330
+ }
2331
+ if (walletType !== void 0 && walletType !== null) {
2332
+ localVarQueryParameter["walletType"] = walletType;
2333
+ }
2334
+ if (questionnaire !== void 0 && questionnaire !== null) {
2335
+ localVarQueryParameter["questionnaire"] = questionnaire;
2336
+ }
2337
+ if (originatorPii !== void 0 && originatorPii !== null) {
2338
+ localVarQueryParameter["originatorPii"] = originatorPii;
2339
+ }
2340
+ if (signature !== void 0 && signature !== null) {
2341
+ localVarQueryParameter["signature"] = signature;
2342
+ }
2343
+ let _timeUnit;
2344
+ if ("timeUnit" in configuration) _timeUnit = configuration.timeUnit;
2345
+ return {
2346
+ endpoint: "/sapi/v1/localentity/broker/withdraw/apply",
2347
+ method: "POST",
2348
+ params: localVarQueryParameter,
2349
+ timeUnit: _timeUnit
2350
+ };
2351
+ },
2300
2352
  /**
2301
2353
  * Fetch deposit history for local entities that required travel rule.
2302
2354
  *
@@ -2356,8 +2408,7 @@ var TravelRuleApiAxiosParamCreator = function(configuration) {
2356
2408
  localVarQueryParameter["limit"] = limit;
2357
2409
  }
2358
2410
  let _timeUnit;
2359
- if ("timeUnit" in configuration)
2360
- _timeUnit = configuration.timeUnit;
2411
+ if ("timeUnit" in configuration) _timeUnit = configuration.timeUnit;
2361
2412
  return {
2362
2413
  endpoint: "/sapi/v1/localentity/deposit/history",
2363
2414
  method: "GET",
@@ -2383,8 +2434,7 @@ var TravelRuleApiAxiosParamCreator = function(configuration) {
2383
2434
  onboardedVaspList: async () => {
2384
2435
  const localVarQueryParameter = {};
2385
2436
  let _timeUnit;
2386
- if ("timeUnit" in configuration)
2387
- _timeUnit = configuration.timeUnit;
2437
+ if ("timeUnit" in configuration) _timeUnit = configuration.timeUnit;
2388
2438
  return {
2389
2439
  endpoint: "/sapi/v1/localentity/vasp",
2390
2440
  method: "GET",
@@ -2392,6 +2442,76 @@ var TravelRuleApiAxiosParamCreator = function(configuration) {
2392
2442
  timeUnit: _timeUnit
2393
2443
  };
2394
2444
  },
2445
+ /**
2446
+ * Submit questionnaire for brokers of local entities that require travel rule.
2447
+ * The questionnaire is only applies to transactions from un-hosted wallets or VASPs that are not
2448
+ * yet onboarded with GTR.
2449
+ *
2450
+ * Questionnaire is different for each local entity, please refer
2451
+ * If getting error like `Questionnaire format not valid.` or `Questionnaire must not be blank`,
2452
+ *
2453
+ * Weight: 600
2454
+ *
2455
+ * @summary Submit Deposit Questionnaire (For local entities that require travel rule) (supporting network) (USER_DATA)
2456
+ * @param {string} subAccountId External user ID.
2457
+ * @param {string} depositId Wallet deposit ID.
2458
+ * @param {string} questionnaire JSON format questionnaire answers.
2459
+ * @param {string} beneficiaryPii JSON format beneficiary Pii.
2460
+ * @param {string} signature Must be the last parameter.
2461
+ * @param {string} [network]
2462
+ * @param {string} [coin]
2463
+ * @param {number} [amount]
2464
+ * @param {string} [address]
2465
+ * @param {string} [addressTag] Secondary address identifier for coins like XRP,XMR etc.
2466
+ *
2467
+ * @throws {RequiredError}
2468
+ */
2469
+ submitDepositQuestionnaire: async (subAccountId, depositId, questionnaire, beneficiaryPii, signature, network, coin, amount, address, addressTag) => {
2470
+ (0, import_common5.assertParamExists)("submitDepositQuestionnaire", "subAccountId", subAccountId);
2471
+ (0, import_common5.assertParamExists)("submitDepositQuestionnaire", "depositId", depositId);
2472
+ (0, import_common5.assertParamExists)("submitDepositQuestionnaire", "questionnaire", questionnaire);
2473
+ (0, import_common5.assertParamExists)("submitDepositQuestionnaire", "beneficiaryPii", beneficiaryPii);
2474
+ (0, import_common5.assertParamExists)("submitDepositQuestionnaire", "signature", signature);
2475
+ const localVarQueryParameter = {};
2476
+ if (subAccountId !== void 0 && subAccountId !== null) {
2477
+ localVarQueryParameter["subAccountId"] = subAccountId;
2478
+ }
2479
+ if (depositId !== void 0 && depositId !== null) {
2480
+ localVarQueryParameter["depositId"] = depositId;
2481
+ }
2482
+ if (questionnaire !== void 0 && questionnaire !== null) {
2483
+ localVarQueryParameter["questionnaire"] = questionnaire;
2484
+ }
2485
+ if (beneficiaryPii !== void 0 && beneficiaryPii !== null) {
2486
+ localVarQueryParameter["beneficiaryPii"] = beneficiaryPii;
2487
+ }
2488
+ if (network !== void 0 && network !== null) {
2489
+ localVarQueryParameter["network"] = network;
2490
+ }
2491
+ if (coin !== void 0 && coin !== null) {
2492
+ localVarQueryParameter["coin"] = coin;
2493
+ }
2494
+ if (amount !== void 0 && amount !== null) {
2495
+ localVarQueryParameter["amount"] = amount;
2496
+ }
2497
+ if (address !== void 0 && address !== null) {
2498
+ localVarQueryParameter["address"] = address;
2499
+ }
2500
+ if (addressTag !== void 0 && addressTag !== null) {
2501
+ localVarQueryParameter["addressTag"] = addressTag;
2502
+ }
2503
+ if (signature !== void 0 && signature !== null) {
2504
+ localVarQueryParameter["signature"] = signature;
2505
+ }
2506
+ let _timeUnit;
2507
+ if ("timeUnit" in configuration) _timeUnit = configuration.timeUnit;
2508
+ return {
2509
+ endpoint: "/sapi/v1/localentity/broker/deposit/provide-info",
2510
+ method: "PUT",
2511
+ params: localVarQueryParameter,
2512
+ timeUnit: _timeUnit
2513
+ };
2514
+ },
2395
2515
  /**
2396
2516
  * Submit questionnaire for local entities that require travel rule.
2397
2517
  * The questionnaire is only applies to transactions from unhosted wallets or VASPs that are not
@@ -2403,14 +2523,18 @@ var TravelRuleApiAxiosParamCreator = function(configuration) {
2403
2523
  * Weight: 600
2404
2524
  *
2405
2525
  * @summary Submit Deposit Questionnaire (For local entities that require travel rule) (supporting network) (USER_DATA)
2406
- * @param {number} tranId Wallet tran Id
2526
+ * @param {number} tranId Wallet tran ID
2407
2527
  * @param {string} questionnaire JSON format questionnaire answers.
2408
2528
  *
2409
2529
  * @throws {RequiredError}
2410
2530
  */
2411
- submitDepositQuestionnaire: async (tranId, questionnaire) => {
2412
- (0, import_common5.assertParamExists)("submitDepositQuestionnaire", "tranId", tranId);
2413
- (0, import_common5.assertParamExists)("submitDepositQuestionnaire", "questionnaire", questionnaire);
2531
+ submitDepositQuestionnaireTravelRule: async (tranId, questionnaire) => {
2532
+ (0, import_common5.assertParamExists)("submitDepositQuestionnaireTravelRule", "tranId", tranId);
2533
+ (0, import_common5.assertParamExists)(
2534
+ "submitDepositQuestionnaireTravelRule",
2535
+ "questionnaire",
2536
+ questionnaire
2537
+ );
2414
2538
  const localVarQueryParameter = {};
2415
2539
  if (tranId !== void 0 && tranId !== null) {
2416
2540
  localVarQueryParameter["tranId"] = tranId;
@@ -2419,8 +2543,7 @@ var TravelRuleApiAxiosParamCreator = function(configuration) {
2419
2543
  localVarQueryParameter["questionnaire"] = questionnaire;
2420
2544
  }
2421
2545
  let _timeUnit;
2422
- if ("timeUnit" in configuration)
2423
- _timeUnit = configuration.timeUnit;
2546
+ if ("timeUnit" in configuration) _timeUnit = configuration.timeUnit;
2424
2547
  return {
2425
2548
  endpoint: "/sapi/v1/localentity/deposit/provide-info",
2426
2549
  method: "PUT",
@@ -2493,8 +2616,7 @@ var TravelRuleApiAxiosParamCreator = function(configuration) {
2493
2616
  localVarQueryParameter["recvWindow"] = recvWindow;
2494
2617
  }
2495
2618
  let _timeUnit;
2496
- if ("timeUnit" in configuration)
2497
- _timeUnit = configuration.timeUnit;
2619
+ if ("timeUnit" in configuration) _timeUnit = configuration.timeUnit;
2498
2620
  return {
2499
2621
  endpoint: "/sapi/v1/localentity/withdraw/history",
2500
2622
  method: "GET",
@@ -2522,7 +2644,7 @@ var TravelRuleApiAxiosParamCreator = function(configuration) {
2522
2644
  * limit is 180000/second. Response from the endpoint contains header
2523
2645
  * key X-SAPI-USED-IP-WEIGHT-1S, which defines weight used by the current IP.
2524
2646
  *
2525
- * @summary Withdraw History (for local entities that require travel rule) (supporting network) (USER_DATA)
2647
+ * @summary Withdraw History V2 (for local entities that require travel rule) (supporting network) (USER_DATA)
2526
2648
  * @param {string} [trId] Comma(,) separated list of travel rule record Ids.
2527
2649
  * @param {string} [txId]
2528
2650
  * @param {string} [withdrawOrderId]
@@ -2573,8 +2695,7 @@ var TravelRuleApiAxiosParamCreator = function(configuration) {
2573
2695
  localVarQueryParameter["recvWindow"] = recvWindow;
2574
2696
  }
2575
2697
  let _timeUnit;
2576
- if ("timeUnit" in configuration)
2577
- _timeUnit = configuration.timeUnit;
2698
+ if ("timeUnit" in configuration) _timeUnit = configuration.timeUnit;
2578
2699
  return {
2579
2700
  endpoint: "/sapi/v2/localentity/withdraw/history",
2580
2701
  method: "GET",
@@ -2647,8 +2768,7 @@ var TravelRuleApiAxiosParamCreator = function(configuration) {
2647
2768
  localVarQueryParameter["questionnaire"] = questionnaire;
2648
2769
  }
2649
2770
  let _timeUnit;
2650
- if ("timeUnit" in configuration)
2651
- _timeUnit = configuration.timeUnit;
2771
+ if ("timeUnit" in configuration) _timeUnit = configuration.timeUnit;
2652
2772
  return {
2653
2773
  endpoint: "/sapi/v1/localentity/withdraw/apply",
2654
2774
  method: "POST",
@@ -2663,6 +2783,48 @@ var TravelRuleApi = class {
2663
2783
  this.configuration = configuration;
2664
2784
  this.localVarAxiosParamCreator = TravelRuleApiAxiosParamCreator(configuration);
2665
2785
  }
2786
+ /**
2787
+ * Submit a withdrawal request for brokers of local entities that required travel rule.
2788
+ *
2789
+ * If `network` not send, return with default network of the coin, but if the address could not match default network, the withdraw will be rejected.
2790
+ * You can get `network` in `networkList` of a coin in the response
2791
+ * Questionnaire is different for each local entity, please refer to
2792
+ * If getting error like `Questionnaire format not valid.` or `Questionnaire must not be blank`,
2793
+ *
2794
+ * Weight: 600
2795
+ *
2796
+ * @summary Broker Withdraw (for brokers of local entities that require travel rule) (USER_DATA)
2797
+ * @param {BrokerWithdrawRequest} requestParameters Request parameters.
2798
+ * @returns {Promise<RestApiResponse<BrokerWithdrawResponse>>}
2799
+ * @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}
2800
+ * @memberof TravelRuleApi
2801
+ * @see {@link https://developers.binance.com/docs/wallet/travel-rule/Broker-Withdraw Binance API Documentation}
2802
+ */
2803
+ async brokerWithdraw(requestParameters) {
2804
+ const localVarAxiosArgs = await this.localVarAxiosParamCreator.brokerWithdraw(
2805
+ requestParameters?.subAccountId,
2806
+ requestParameters?.address,
2807
+ requestParameters?.coin,
2808
+ requestParameters?.amount,
2809
+ requestParameters?.withdrawOrderId,
2810
+ requestParameters?.questionnaire,
2811
+ requestParameters?.originatorPii,
2812
+ requestParameters?.signature,
2813
+ requestParameters?.addressTag,
2814
+ requestParameters?.network,
2815
+ requestParameters?.addressName,
2816
+ requestParameters?.transactionFeeFlag,
2817
+ requestParameters?.walletType
2818
+ );
2819
+ return (0, import_common5.sendRequest)(
2820
+ this.configuration,
2821
+ localVarAxiosArgs.endpoint,
2822
+ localVarAxiosArgs.method,
2823
+ localVarAxiosArgs.params,
2824
+ localVarAxiosArgs?.timeUnit,
2825
+ { isSigned: true }
2826
+ );
2827
+ }
2666
2828
  /**
2667
2829
  * Fetch deposit history for local entities that required travel rule.
2668
2830
  *
@@ -2730,8 +2892,8 @@ var TravelRuleApi = class {
2730
2892
  );
2731
2893
  }
2732
2894
  /**
2733
- * Submit questionnaire for local entities that require travel rule.
2734
- * The questionnaire is only applies to transactions from unhosted wallets or VASPs that are not
2895
+ * Submit questionnaire for brokers of local entities that require travel rule.
2896
+ * The questionnaire is only applies to transactions from un-hosted wallets or VASPs that are not
2735
2897
  * yet onboarded with GTR.
2736
2898
  *
2737
2899
  * Questionnaire is different for each local entity, please refer
@@ -2748,6 +2910,45 @@ var TravelRuleApi = class {
2748
2910
  */
2749
2911
  async submitDepositQuestionnaire(requestParameters) {
2750
2912
  const localVarAxiosArgs = await this.localVarAxiosParamCreator.submitDepositQuestionnaire(
2913
+ requestParameters?.subAccountId,
2914
+ requestParameters?.depositId,
2915
+ requestParameters?.questionnaire,
2916
+ requestParameters?.beneficiaryPii,
2917
+ requestParameters?.signature,
2918
+ requestParameters?.network,
2919
+ requestParameters?.coin,
2920
+ requestParameters?.amount,
2921
+ requestParameters?.address,
2922
+ requestParameters?.addressTag
2923
+ );
2924
+ return (0, import_common5.sendRequest)(
2925
+ this.configuration,
2926
+ localVarAxiosArgs.endpoint,
2927
+ localVarAxiosArgs.method,
2928
+ localVarAxiosArgs.params,
2929
+ localVarAxiosArgs?.timeUnit,
2930
+ { isSigned: true }
2931
+ );
2932
+ }
2933
+ /**
2934
+ * Submit questionnaire for local entities that require travel rule.
2935
+ * The questionnaire is only applies to transactions from unhosted wallets or VASPs that are not
2936
+ * yet onboarded with GTR.
2937
+ *
2938
+ * Questionnaire is different for each local entity, please refer
2939
+ * If getting error like `Questionnaire format not valid.` or `Questionnaire must not be blank`,
2940
+ *
2941
+ * Weight: 600
2942
+ *
2943
+ * @summary Submit Deposit Questionnaire (For local entities that require travel rule) (supporting network) (USER_DATA)
2944
+ * @param {SubmitDepositQuestionnaireTravelRuleRequest} requestParameters Request parameters.
2945
+ * @returns {Promise<RestApiResponse<SubmitDepositQuestionnaireTravelRuleResponse>>}
2946
+ * @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}
2947
+ * @memberof TravelRuleApi
2948
+ * @see {@link https://developers.binance.com/docs/wallet/travel-rule/deposit-provide-info Binance API Documentation}
2949
+ */
2950
+ async submitDepositQuestionnaireTravelRule(requestParameters) {
2951
+ const localVarAxiosArgs = await this.localVarAxiosParamCreator.submitDepositQuestionnaireTravelRule(
2751
2952
  requestParameters?.tranId,
2752
2953
  requestParameters?.questionnaire
2753
2954
  );
@@ -2824,12 +3025,12 @@ var TravelRuleApi = class {
2824
3025
  * limit is 180000/second. Response from the endpoint contains header
2825
3026
  * key X-SAPI-USED-IP-WEIGHT-1S, which defines weight used by the current IP.
2826
3027
  *
2827
- * @summary Withdraw History (for local entities that require travel rule) (supporting network) (USER_DATA)
3028
+ * @summary Withdraw History V2 (for local entities that require travel rule) (supporting network) (USER_DATA)
2828
3029
  * @param {WithdrawHistoryV2Request} requestParameters Request parameters.
2829
3030
  * @returns {Promise<RestApiResponse<WithdrawHistoryV2Response>>}
2830
3031
  * @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}
2831
3032
  * @memberof TravelRuleApi
2832
- * @see {@link https://developers.binance.com/docs/wallet/travel-rule/Withdraw-History Binance API Documentation}
3033
+ * @see {@link https://developers.binance.com/docs/wallet/travel-rule/Withdraw-History-V2 Binance API Documentation}
2833
3034
  */
2834
3035
  async withdrawHistoryV2(requestParameters = {}) {
2835
3036
  const localVarAxiosArgs = await this.localVarAxiosParamCreator.withdrawHistoryV2(
@@ -3476,6 +3677,25 @@ var RestAPI = class {
3476
3677
  systemStatus() {
3477
3678
  return this.othersApi.systemStatus();
3478
3679
  }
3680
+ /**
3681
+ * Submit a withdrawal request for brokers of local entities that required travel rule.
3682
+ *
3683
+ * If `network` not send, return with default network of the coin, but if the address could not match default network, the withdraw will be rejected.
3684
+ * You can get `network` in `networkList` of a coin in the response
3685
+ * Questionnaire is different for each local entity, please refer to
3686
+ * If getting error like `Questionnaire format not valid.` or `Questionnaire must not be blank`,
3687
+ *
3688
+ * Weight: 600
3689
+ *
3690
+ * @summary Broker Withdraw (for brokers of local entities that require travel rule) (USER_DATA)
3691
+ * @param {BrokerWithdrawRequest} requestParameters Request parameters.
3692
+ * @returns {Promise<RestApiResponse<BrokerWithdrawResponse>>}
3693
+ * @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}
3694
+ * @see {@link https://developers.binance.com/docs/wallet/travel-rule/Broker-Withdraw Binance API Documentation}
3695
+ */
3696
+ brokerWithdraw(requestParameters) {
3697
+ return this.travelRuleApi.brokerWithdraw(requestParameters);
3698
+ }
3479
3699
  /**
3480
3700
  * Fetch deposit history for local entities that required travel rule.
3481
3701
  *
@@ -3513,8 +3733,8 @@ var RestAPI = class {
3513
3733
  return this.travelRuleApi.onboardedVaspList();
3514
3734
  }
3515
3735
  /**
3516
- * Submit questionnaire for local entities that require travel rule.
3517
- * The questionnaire is only applies to transactions from unhosted wallets or VASPs that are not
3736
+ * Submit questionnaire for brokers of local entities that require travel rule.
3737
+ * The questionnaire is only applies to transactions from un-hosted wallets or VASPs that are not
3518
3738
  * yet onboarded with GTR.
3519
3739
  *
3520
3740
  * Questionnaire is different for each local entity, please refer
@@ -3531,6 +3751,25 @@ var RestAPI = class {
3531
3751
  submitDepositQuestionnaire(requestParameters) {
3532
3752
  return this.travelRuleApi.submitDepositQuestionnaire(requestParameters);
3533
3753
  }
3754
+ /**
3755
+ * Submit questionnaire for local entities that require travel rule.
3756
+ * The questionnaire is only applies to transactions from unhosted wallets or VASPs that are not
3757
+ * yet onboarded with GTR.
3758
+ *
3759
+ * Questionnaire is different for each local entity, please refer
3760
+ * If getting error like `Questionnaire format not valid.` or `Questionnaire must not be blank`,
3761
+ *
3762
+ * Weight: 600
3763
+ *
3764
+ * @summary Submit Deposit Questionnaire (For local entities that require travel rule) (supporting network) (USER_DATA)
3765
+ * @param {SubmitDepositQuestionnaireTravelRuleRequest} requestParameters Request parameters.
3766
+ * @returns {Promise<RestApiResponse<SubmitDepositQuestionnaireTravelRuleResponse>>}
3767
+ * @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}
3768
+ * @see {@link https://developers.binance.com/docs/wallet/travel-rule/deposit-provide-info Binance API Documentation}
3769
+ */
3770
+ submitDepositQuestionnaireTravelRule(requestParameters) {
3771
+ return this.travelRuleApi.submitDepositQuestionnaireTravelRule(requestParameters);
3772
+ }
3534
3773
  /**
3535
3774
  * Fetch withdraw history for local entities that required travel rule.
3536
3775
  *
@@ -3574,11 +3813,11 @@ var RestAPI = class {
3574
3813
  * limit is 180000/second. Response from the endpoint contains header
3575
3814
  * key X-SAPI-USED-IP-WEIGHT-1S, which defines weight used by the current IP.
3576
3815
  *
3577
- * @summary Withdraw History (for local entities that require travel rule) (supporting network) (USER_DATA)
3816
+ * @summary Withdraw History V2 (for local entities that require travel rule) (supporting network) (USER_DATA)
3578
3817
  * @param {WithdrawHistoryV2Request} requestParameters Request parameters.
3579
3818
  * @returns {Promise<RestApiResponse<WithdrawHistoryV2Response>>}
3580
3819
  * @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}
3581
- * @see {@link https://developers.binance.com/docs/wallet/travel-rule/Withdraw-History Binance API Documentation}
3820
+ * @see {@link https://developers.binance.com/docs/wallet/travel-rule/Withdraw-History-V2 Binance API Documentation}
3582
3821
  */
3583
3822
  withdrawHistoryV2(requestParameters = {}) {
3584
3823
  return this.travelRuleApi.withdrawHistoryV2(requestParameters);
@@ -3635,7 +3874,6 @@ var import_common8 = require("@binance/common");
3635
3874
  TooManyRequestsError,
3636
3875
  UnauthorizedError,
3637
3876
  WALLET_REST_API_PROD_URL,
3638
- WALLET_REST_API_TESTNET_URL,
3639
3877
  Wallet,
3640
3878
  WalletRestAPI
3641
3879
  });