@binance/simple-earn 1.0.0 → 2.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/README.md +0 -19
- package/dist/index.d.mts +93 -199
- package/dist/index.d.ts +93 -199
- package/dist/index.js +28 -54
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +25 -51
- package/dist/index.mjs.map +1 -1
- package/package.json +9 -3
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
|
|
22
|
-
__export(
|
|
21
|
+
var index_exports = {};
|
|
22
|
+
__export(index_exports, {
|
|
23
23
|
BadRequestError: () => import_common6.BadRequestError,
|
|
24
24
|
ConnectorClientError: () => import_common6.ConnectorClientError,
|
|
25
25
|
ForbiddenError: () => import_common6.ForbiddenError,
|
|
@@ -28,14 +28,13 @@ __export(src_exports, {
|
|
|
28
28
|
RateLimitBanError: () => import_common6.RateLimitBanError,
|
|
29
29
|
RequiredError: () => import_common6.RequiredError,
|
|
30
30
|
SIMPLE_EARN_REST_API_PROD_URL: () => import_common6.SIMPLE_EARN_REST_API_PROD_URL,
|
|
31
|
-
SIMPLE_EARN_REST_API_TESTNET_URL: () => import_common6.SIMPLE_EARN_REST_API_TESTNET_URL,
|
|
32
31
|
ServerError: () => import_common6.ServerError,
|
|
33
32
|
SimpleEarn: () => SimpleEarn,
|
|
34
33
|
SimpleEarnRestAPI: () => rest_api_exports,
|
|
35
34
|
TooManyRequestsError: () => import_common6.TooManyRequestsError,
|
|
36
35
|
UnauthorizedError: () => import_common6.UnauthorizedError
|
|
37
36
|
});
|
|
38
|
-
module.exports = __toCommonJS(
|
|
37
|
+
module.exports = __toCommonJS(index_exports);
|
|
39
38
|
|
|
40
39
|
// src/simple-earn.ts
|
|
41
40
|
var import_os = require("os");
|
|
@@ -43,7 +42,7 @@ var import_common5 = require("@binance/common");
|
|
|
43
42
|
|
|
44
43
|
// package.json
|
|
45
44
|
var name = "@binance/simple-earn";
|
|
46
|
-
var version = "
|
|
45
|
+
var version = "2.0.0";
|
|
47
46
|
|
|
48
47
|
// src/rest-api/index.ts
|
|
49
48
|
var rest_api_exports = {};
|
|
@@ -79,8 +78,7 @@ var AccountApiAxiosParamCreator = function(configuration) {
|
|
|
79
78
|
localVarQueryParameter["recvWindow"] = recvWindow;
|
|
80
79
|
}
|
|
81
80
|
let _timeUnit;
|
|
82
|
-
if ("timeUnit" in configuration)
|
|
83
|
-
_timeUnit = configuration.timeUnit;
|
|
81
|
+
if ("timeUnit" in configuration) _timeUnit = configuration.timeUnit;
|
|
84
82
|
return {
|
|
85
83
|
endpoint: "/sapi/v1/simple-earn/flexible/personalLeftQuota",
|
|
86
84
|
method: "GET",
|
|
@@ -120,8 +118,7 @@ var AccountApiAxiosParamCreator = function(configuration) {
|
|
|
120
118
|
localVarQueryParameter["recvWindow"] = recvWindow;
|
|
121
119
|
}
|
|
122
120
|
let _timeUnit;
|
|
123
|
-
if ("timeUnit" in configuration)
|
|
124
|
-
_timeUnit = configuration.timeUnit;
|
|
121
|
+
if ("timeUnit" in configuration) _timeUnit = configuration.timeUnit;
|
|
125
122
|
return {
|
|
126
123
|
endpoint: "/sapi/v1/simple-earn/flexible/position",
|
|
127
124
|
method: "GET",
|
|
@@ -150,8 +147,7 @@ var AccountApiAxiosParamCreator = function(configuration) {
|
|
|
150
147
|
localVarQueryParameter["recvWindow"] = recvWindow;
|
|
151
148
|
}
|
|
152
149
|
let _timeUnit;
|
|
153
|
-
if ("timeUnit" in configuration)
|
|
154
|
-
_timeUnit = configuration.timeUnit;
|
|
150
|
+
if ("timeUnit" in configuration) _timeUnit = configuration.timeUnit;
|
|
155
151
|
return {
|
|
156
152
|
endpoint: "/sapi/v1/simple-earn/locked/personalLeftQuota",
|
|
157
153
|
method: "GET",
|
|
@@ -195,8 +191,7 @@ var AccountApiAxiosParamCreator = function(configuration) {
|
|
|
195
191
|
localVarQueryParameter["recvWindow"] = recvWindow;
|
|
196
192
|
}
|
|
197
193
|
let _timeUnit;
|
|
198
|
-
if ("timeUnit" in configuration)
|
|
199
|
-
_timeUnit = configuration.timeUnit;
|
|
194
|
+
if ("timeUnit" in configuration) _timeUnit = configuration.timeUnit;
|
|
200
195
|
return {
|
|
201
196
|
endpoint: "/sapi/v1/simple-earn/locked/position",
|
|
202
197
|
method: "GET",
|
|
@@ -232,8 +227,7 @@ var AccountApiAxiosParamCreator = function(configuration) {
|
|
|
232
227
|
localVarQueryParameter["recvWindow"] = recvWindow;
|
|
233
228
|
}
|
|
234
229
|
let _timeUnit;
|
|
235
|
-
if ("timeUnit" in configuration)
|
|
236
|
-
_timeUnit = configuration.timeUnit;
|
|
230
|
+
if ("timeUnit" in configuration) _timeUnit = configuration.timeUnit;
|
|
237
231
|
return {
|
|
238
232
|
endpoint: "/sapi/v1/simple-earn/flexible/list",
|
|
239
233
|
method: "GET",
|
|
@@ -271,8 +265,7 @@ var AccountApiAxiosParamCreator = function(configuration) {
|
|
|
271
265
|
localVarQueryParameter["recvWindow"] = recvWindow;
|
|
272
266
|
}
|
|
273
267
|
let _timeUnit;
|
|
274
|
-
if ("timeUnit" in configuration)
|
|
275
|
-
_timeUnit = configuration.timeUnit;
|
|
268
|
+
if ("timeUnit" in configuration) _timeUnit = configuration.timeUnit;
|
|
276
269
|
return {
|
|
277
270
|
endpoint: "/sapi/v1/simple-earn/locked/list",
|
|
278
271
|
method: "GET",
|
|
@@ -296,8 +289,7 @@ var AccountApiAxiosParamCreator = function(configuration) {
|
|
|
296
289
|
localVarQueryParameter["recvWindow"] = recvWindow;
|
|
297
290
|
}
|
|
298
291
|
let _timeUnit;
|
|
299
|
-
if ("timeUnit" in configuration)
|
|
300
|
-
_timeUnit = configuration.timeUnit;
|
|
292
|
+
if ("timeUnit" in configuration) _timeUnit = configuration.timeUnit;
|
|
301
293
|
return {
|
|
302
294
|
endpoint: "/sapi/v1/simple-earn/account",
|
|
303
295
|
method: "GET",
|
|
@@ -538,8 +530,7 @@ var EarnApiAxiosParamCreator = function(configuration) {
|
|
|
538
530
|
localVarQueryParameter["recvWindow"] = recvWindow;
|
|
539
531
|
}
|
|
540
532
|
let _timeUnit;
|
|
541
|
-
if ("timeUnit" in configuration)
|
|
542
|
-
_timeUnit = configuration.timeUnit;
|
|
533
|
+
if ("timeUnit" in configuration) _timeUnit = configuration.timeUnit;
|
|
543
534
|
return {
|
|
544
535
|
endpoint: "/sapi/v1/simple-earn/flexible/subscriptionPreview",
|
|
545
536
|
method: "GET",
|
|
@@ -577,8 +568,7 @@ var EarnApiAxiosParamCreator = function(configuration) {
|
|
|
577
568
|
localVarQueryParameter["recvWindow"] = recvWindow;
|
|
578
569
|
}
|
|
579
570
|
let _timeUnit;
|
|
580
|
-
if ("timeUnit" in configuration)
|
|
581
|
-
_timeUnit = configuration.timeUnit;
|
|
571
|
+
if ("timeUnit" in configuration) _timeUnit = configuration.timeUnit;
|
|
582
572
|
return {
|
|
583
573
|
endpoint: "/sapi/v1/simple-earn/locked/subscriptionPreview",
|
|
584
574
|
method: "GET",
|
|
@@ -621,8 +611,7 @@ var EarnApiAxiosParamCreator = function(configuration) {
|
|
|
621
611
|
localVarQueryParameter["recvWindow"] = recvWindow;
|
|
622
612
|
}
|
|
623
613
|
let _timeUnit;
|
|
624
|
-
if ("timeUnit" in configuration)
|
|
625
|
-
_timeUnit = configuration.timeUnit;
|
|
614
|
+
if ("timeUnit" in configuration) _timeUnit = configuration.timeUnit;
|
|
626
615
|
return {
|
|
627
616
|
endpoint: "/sapi/v1/simple-earn/flexible/redeem",
|
|
628
617
|
method: "POST",
|
|
@@ -653,8 +642,7 @@ var EarnApiAxiosParamCreator = function(configuration) {
|
|
|
653
642
|
localVarQueryParameter["recvWindow"] = recvWindow;
|
|
654
643
|
}
|
|
655
644
|
let _timeUnit;
|
|
656
|
-
if ("timeUnit" in configuration)
|
|
657
|
-
_timeUnit = configuration.timeUnit;
|
|
645
|
+
if ("timeUnit" in configuration) _timeUnit = configuration.timeUnit;
|
|
658
646
|
return {
|
|
659
647
|
endpoint: "/sapi/v1/simple-earn/locked/redeem",
|
|
660
648
|
method: "POST",
|
|
@@ -688,8 +676,7 @@ var EarnApiAxiosParamCreator = function(configuration) {
|
|
|
688
676
|
localVarQueryParameter["recvWindow"] = recvWindow;
|
|
689
677
|
}
|
|
690
678
|
let _timeUnit;
|
|
691
|
-
if ("timeUnit" in configuration)
|
|
692
|
-
_timeUnit = configuration.timeUnit;
|
|
679
|
+
if ("timeUnit" in configuration) _timeUnit = configuration.timeUnit;
|
|
693
680
|
return {
|
|
694
681
|
endpoint: "/sapi/v1/simple-earn/flexible/setAutoSubscribe",
|
|
695
682
|
method: "POST",
|
|
@@ -723,8 +710,7 @@ var EarnApiAxiosParamCreator = function(configuration) {
|
|
|
723
710
|
localVarQueryParameter["recvWindow"] = recvWindow;
|
|
724
711
|
}
|
|
725
712
|
let _timeUnit;
|
|
726
|
-
if ("timeUnit" in configuration)
|
|
727
|
-
_timeUnit = configuration.timeUnit;
|
|
713
|
+
if ("timeUnit" in configuration) _timeUnit = configuration.timeUnit;
|
|
728
714
|
return {
|
|
729
715
|
endpoint: "/sapi/v1/simple-earn/locked/setAutoSubscribe",
|
|
730
716
|
method: "POST",
|
|
@@ -758,8 +744,7 @@ var EarnApiAxiosParamCreator = function(configuration) {
|
|
|
758
744
|
localVarQueryParameter["recvWindow"] = recvWindow;
|
|
759
745
|
}
|
|
760
746
|
let _timeUnit;
|
|
761
|
-
if ("timeUnit" in configuration)
|
|
762
|
-
_timeUnit = configuration.timeUnit;
|
|
747
|
+
if ("timeUnit" in configuration) _timeUnit = configuration.timeUnit;
|
|
763
748
|
return {
|
|
764
749
|
endpoint: "/sapi/v1/simple-earn/locked/setRedeemOption",
|
|
765
750
|
method: "POST",
|
|
@@ -803,8 +788,7 @@ var EarnApiAxiosParamCreator = function(configuration) {
|
|
|
803
788
|
localVarQueryParameter["recvWindow"] = recvWindow;
|
|
804
789
|
}
|
|
805
790
|
let _timeUnit;
|
|
806
|
-
if ("timeUnit" in configuration)
|
|
807
|
-
_timeUnit = configuration.timeUnit;
|
|
791
|
+
if ("timeUnit" in configuration) _timeUnit = configuration.timeUnit;
|
|
808
792
|
return {
|
|
809
793
|
endpoint: "/sapi/v1/simple-earn/flexible/subscribe",
|
|
810
794
|
method: "POST",
|
|
@@ -852,8 +836,7 @@ var EarnApiAxiosParamCreator = function(configuration) {
|
|
|
852
836
|
localVarQueryParameter["recvWindow"] = recvWindow;
|
|
853
837
|
}
|
|
854
838
|
let _timeUnit;
|
|
855
|
-
if ("timeUnit" in configuration)
|
|
856
|
-
_timeUnit = configuration.timeUnit;
|
|
839
|
+
if ("timeUnit" in configuration) _timeUnit = configuration.timeUnit;
|
|
857
840
|
return {
|
|
858
841
|
endpoint: "/sapi/v1/simple-earn/locked/subscribe",
|
|
859
842
|
method: "POST",
|
|
@@ -1173,8 +1156,7 @@ var HistoryApiAxiosParamCreator = function(configuration) {
|
|
|
1173
1156
|
localVarQueryParameter["recvWindow"] = recvWindow;
|
|
1174
1157
|
}
|
|
1175
1158
|
let _timeUnit;
|
|
1176
|
-
if ("timeUnit" in configuration)
|
|
1177
|
-
_timeUnit = configuration.timeUnit;
|
|
1159
|
+
if ("timeUnit" in configuration) _timeUnit = configuration.timeUnit;
|
|
1178
1160
|
return {
|
|
1179
1161
|
endpoint: "/sapi/v1/simple-earn/flexible/history/collateralRecord",
|
|
1180
1162
|
method: "GET",
|
|
@@ -1227,8 +1209,7 @@ var HistoryApiAxiosParamCreator = function(configuration) {
|
|
|
1227
1209
|
localVarQueryParameter["size"] = size;
|
|
1228
1210
|
}
|
|
1229
1211
|
let _timeUnit;
|
|
1230
|
-
if ("timeUnit" in configuration)
|
|
1231
|
-
_timeUnit = configuration.timeUnit;
|
|
1212
|
+
if ("timeUnit" in configuration) _timeUnit = configuration.timeUnit;
|
|
1232
1213
|
return {
|
|
1233
1214
|
endpoint: "/sapi/v1/simple-earn/flexible/history/redemptionRecord",
|
|
1234
1215
|
method: "GET",
|
|
@@ -1274,8 +1255,7 @@ var HistoryApiAxiosParamCreator = function(configuration) {
|
|
|
1274
1255
|
localVarQueryParameter["type"] = type;
|
|
1275
1256
|
}
|
|
1276
1257
|
let _timeUnit;
|
|
1277
|
-
if ("timeUnit" in configuration)
|
|
1278
|
-
_timeUnit = configuration.timeUnit;
|
|
1258
|
+
if ("timeUnit" in configuration) _timeUnit = configuration.timeUnit;
|
|
1279
1259
|
return {
|
|
1280
1260
|
endpoint: "/sapi/v1/simple-earn/flexible/history/rewardsRecord",
|
|
1281
1261
|
method: "GET",
|
|
@@ -1332,8 +1312,7 @@ var HistoryApiAxiosParamCreator = function(configuration) {
|
|
|
1332
1312
|
localVarQueryParameter["recvWindow"] = recvWindow;
|
|
1333
1313
|
}
|
|
1334
1314
|
let _timeUnit;
|
|
1335
|
-
if ("timeUnit" in configuration)
|
|
1336
|
-
_timeUnit = configuration.timeUnit;
|
|
1315
|
+
if ("timeUnit" in configuration) _timeUnit = configuration.timeUnit;
|
|
1337
1316
|
return {
|
|
1338
1317
|
endpoint: "/sapi/v1/simple-earn/flexible/history/subscriptionRecord",
|
|
1339
1318
|
method: "GET",
|
|
@@ -1390,8 +1369,7 @@ var HistoryApiAxiosParamCreator = function(configuration) {
|
|
|
1390
1369
|
localVarQueryParameter["recvWindow"] = recvWindow;
|
|
1391
1370
|
}
|
|
1392
1371
|
let _timeUnit;
|
|
1393
|
-
if ("timeUnit" in configuration)
|
|
1394
|
-
_timeUnit = configuration.timeUnit;
|
|
1372
|
+
if ("timeUnit" in configuration) _timeUnit = configuration.timeUnit;
|
|
1395
1373
|
return {
|
|
1396
1374
|
endpoint: "/sapi/v1/simple-earn/locked/history/redemptionRecord",
|
|
1397
1375
|
method: "GET",
|
|
@@ -1444,8 +1422,7 @@ var HistoryApiAxiosParamCreator = function(configuration) {
|
|
|
1444
1422
|
localVarQueryParameter["recvWindow"] = recvWindow;
|
|
1445
1423
|
}
|
|
1446
1424
|
let _timeUnit;
|
|
1447
|
-
if ("timeUnit" in configuration)
|
|
1448
|
-
_timeUnit = configuration.timeUnit;
|
|
1425
|
+
if ("timeUnit" in configuration) _timeUnit = configuration.timeUnit;
|
|
1449
1426
|
return {
|
|
1450
1427
|
endpoint: "/sapi/v1/simple-earn/locked/history/rewardsRecord",
|
|
1451
1428
|
method: "GET",
|
|
@@ -1498,8 +1475,7 @@ var HistoryApiAxiosParamCreator = function(configuration) {
|
|
|
1498
1475
|
localVarQueryParameter["recvWindow"] = recvWindow;
|
|
1499
1476
|
}
|
|
1500
1477
|
let _timeUnit;
|
|
1501
|
-
if ("timeUnit" in configuration)
|
|
1502
|
-
_timeUnit = configuration.timeUnit;
|
|
1478
|
+
if ("timeUnit" in configuration) _timeUnit = configuration.timeUnit;
|
|
1503
1479
|
return {
|
|
1504
1480
|
endpoint: "/sapi/v1/simple-earn/locked/history/subscriptionRecord",
|
|
1505
1481
|
method: "GET",
|
|
@@ -1553,8 +1529,7 @@ var HistoryApiAxiosParamCreator = function(configuration) {
|
|
|
1553
1529
|
localVarQueryParameter["recvWindow"] = recvWindow;
|
|
1554
1530
|
}
|
|
1555
1531
|
let _timeUnit;
|
|
1556
|
-
if ("timeUnit" in configuration)
|
|
1557
|
-
_timeUnit = configuration.timeUnit;
|
|
1532
|
+
if ("timeUnit" in configuration) _timeUnit = configuration.timeUnit;
|
|
1558
1533
|
return {
|
|
1559
1534
|
endpoint: "/sapi/v1/simple-earn/flexible/history/rateHistory",
|
|
1560
1535
|
method: "GET",
|
|
@@ -2307,7 +2282,6 @@ var import_common6 = require("@binance/common");
|
|
|
2307
2282
|
RateLimitBanError,
|
|
2308
2283
|
RequiredError,
|
|
2309
2284
|
SIMPLE_EARN_REST_API_PROD_URL,
|
|
2310
|
-
SIMPLE_EARN_REST_API_TESTNET_URL,
|
|
2311
2285
|
ServerError,
|
|
2312
2286
|
SimpleEarn,
|
|
2313
2287
|
SimpleEarnRestAPI,
|