binance 2.15.14 → 3.0.0-beta.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/README.md +5 -2
- package/lib/coinm-client.js.map +1 -1
- package/lib/index.d.ts +10 -4
- package/lib/index.js +10 -4
- package/lib/index.js.map +1 -1
- package/lib/main-client.d.ts +13 -2
- package/lib/main-client.js +15 -1
- package/lib/main-client.js.map +1 -1
- package/lib/portfolio-client.js.map +1 -1
- package/lib/types/futures.d.ts +1 -0
- package/lib/types/futures.js +3 -3
- package/lib/types/futures.js.map +1 -1
- package/lib/types/spot.js +4 -4
- package/lib/types/spot.js.map +1 -1
- package/lib/types/websockets/ws-api-requests.d.ts +7 -0
- package/lib/types/websockets/ws-api-requests.js +3 -0
- package/lib/types/websockets/ws-api-requests.js.map +1 -0
- package/lib/types/websockets/ws-api-responses.d.ts +8 -0
- package/lib/types/websockets/ws-api-responses.js +3 -0
- package/lib/types/websockets/ws-api-responses.js.map +1 -0
- package/lib/types/websockets/ws-api.d.ts +201 -0
- package/lib/types/websockets/ws-api.js +29 -0
- package/lib/types/websockets/ws-api.js.map +1 -0
- package/lib/types/{websockets.d.ts → websockets/ws-events-formatted.d.ts} +4 -410
- package/lib/types/websockets/ws-events-formatted.js +3 -0
- package/lib/types/websockets/ws-events-formatted.js.map +1 -0
- package/lib/types/websockets/ws-events-raw.d.ts +401 -0
- package/lib/types/{websockets.js → websockets/ws-events-raw.js} +1 -1
- package/lib/types/websockets/ws-events-raw.js.map +1 -0
- package/lib/types/websockets/ws-general.d.ts +98 -0
- package/lib/types/websockets/ws-general.js +11 -0
- package/lib/types/websockets/ws-general.js.map +1 -0
- package/lib/usdm-client.js.map +1 -1
- package/lib/util/BaseRestClient.d.ts +1 -1
- package/lib/util/BaseRestClient.js +1 -1
- package/lib/util/BaseRestClient.js.map +1 -1
- package/lib/util/BaseWSClient.d.ts +225 -0
- package/lib/util/BaseWSClient.js +729 -0
- package/lib/util/BaseWSClient.js.map +1 -0
- package/lib/util/beautifier-maps.d.ts +151 -0
- package/lib/util/beautifier-maps.js +198 -37
- package/lib/util/beautifier-maps.js.map +1 -1
- package/lib/util/beautifier.d.ts +7 -3
- package/lib/util/beautifier.js +40 -11
- package/lib/util/beautifier.js.map +1 -1
- package/lib/util/browser-support.d.ts +2 -1
- package/lib/util/browser-support.js +46 -28
- package/lib/util/browser-support.js.map +1 -1
- package/lib/util/logger.d.ts +8 -0
- package/lib/util/logger.js +17 -0
- package/lib/util/logger.js.map +1 -0
- package/lib/util/node-support.d.ts +2 -1
- package/lib/util/node-support.js +35 -15
- package/lib/util/node-support.js.map +1 -1
- package/lib/util/requestUtils.d.ts +19 -19
- package/lib/util/requestUtils.js +119 -38
- package/lib/util/requestUtils.js.map +1 -1
- package/lib/util/typeGuards.d.ts +9 -1
- package/lib/util/typeGuards.js +59 -34
- package/lib/util/typeGuards.js.map +1 -1
- package/lib/util/usdm/exchangeInfo.js +2 -3
- package/lib/util/usdm/exchangeInfo.js.map +1 -1
- package/lib/util/webCryptoAPI.d.ts +14 -0
- package/lib/util/webCryptoAPI.js +120 -0
- package/lib/util/webCryptoAPI.js.map +1 -0
- package/lib/util/websockets/WsStore.d.ts +74 -0
- package/lib/util/websockets/WsStore.js +279 -0
- package/lib/util/websockets/WsStore.js.map +1 -0
- package/lib/util/websockets/WsStore.types.d.ts +53 -0
- package/lib/util/websockets/WsStore.types.js +14 -0
- package/lib/util/websockets/WsStore.types.js.map +1 -0
- package/lib/util/websockets/listen-key-state-cache.d.ts +21 -0
- package/lib/util/websockets/listen-key-state-cache.js +80 -0
- package/lib/util/websockets/listen-key-state-cache.js.map +1 -0
- package/lib/util/websockets/rest-client-cache.d.ts +13 -0
- package/lib/util/websockets/rest-client-cache.js +56 -0
- package/lib/util/websockets/rest-client-cache.js.map +1 -0
- package/lib/util/websockets/user-data-stream-manager.d.ts +54 -0
- package/lib/util/websockets/user-data-stream-manager.js +256 -0
- package/lib/util/websockets/user-data-stream-manager.js.map +1 -0
- package/lib/util/websockets/websocket-util.d.ts +124 -0
- package/lib/util/websockets/websocket-util.js +481 -0
- package/lib/util/websockets/websocket-util.js.map +1 -0
- package/lib/websocket-client-legacy.d.ts +288 -0
- package/lib/websocket-client-legacy.js +1113 -0
- package/lib/websocket-client-legacy.js.map +1 -0
- package/lib/websocket-client.d.ts +228 -168
- package/lib/websocket-client.js +927 -834
- package/lib/websocket-client.js.map +1 -1
- package/package.json +5 -5
- package/lib/logger.d.ts +0 -9
- package/lib/logger.js +0 -23
- package/lib/logger.js.map +0 -1
- package/lib/types/websockets.js.map +0 -1
- package/lib/util/WsStore.d.ts +0 -57
- package/lib/util/WsStore.js +0 -101
- package/lib/util/WsStore.js.map +0 -1
- package/lib/util/ws-utils.d.ts +0 -7
- package/lib/util/ws-utils.js +0 -16
- package/lib/util/ws-utils.js.map +0 -1
package/lib/util/beautifier.js
CHANGED
|
@@ -2,7 +2,8 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
const beautifier_maps_1 = require("./beautifier-maps");
|
|
4
4
|
class Beautifier {
|
|
5
|
-
constructor() {
|
|
5
|
+
constructor(config) {
|
|
6
|
+
this.config = config;
|
|
6
7
|
this.floatKeys = [
|
|
7
8
|
'accumulatedQuantity',
|
|
8
9
|
'accumulatedRealisedPreFee',
|
|
@@ -28,8 +29,15 @@ class Beautifier {
|
|
|
28
29
|
'close',
|
|
29
30
|
'closeQuantity',
|
|
30
31
|
'closeTime',
|
|
32
|
+
'cmUnrealizedPNL',
|
|
33
|
+
'cmWalletBalance',
|
|
31
34
|
'commission',
|
|
32
35
|
'commissionAmount',
|
|
36
|
+
'crossMarginAsset',
|
|
37
|
+
'crossMarginBorrowed',
|
|
38
|
+
'crossMarginFree',
|
|
39
|
+
'crossMarginInterest',
|
|
40
|
+
'crossMarginLocked',
|
|
33
41
|
'crossWalletBalance',
|
|
34
42
|
'currentClose',
|
|
35
43
|
'cummulativeQuoteAssetTransactedQty',
|
|
@@ -73,6 +81,7 @@ class Beautifier {
|
|
|
73
81
|
'multiplierDown',
|
|
74
82
|
'multiplierUp',
|
|
75
83
|
'multiplierDecimal',
|
|
84
|
+
'negativeBalance',
|
|
76
85
|
'newTraderRebateCommission',
|
|
77
86
|
'notional',
|
|
78
87
|
'oldTraderRebateCommission',
|
|
@@ -113,8 +122,11 @@ class Beautifier {
|
|
|
113
122
|
'totalTradeVol',
|
|
114
123
|
'totalTradedBaseAssetVolume',
|
|
115
124
|
'totalTradedQuoteAssetVolume',
|
|
125
|
+
'totalWalletBalance',
|
|
116
126
|
'trailingStopActivationPrice',
|
|
117
127
|
'trailingStopCallbackRate',
|
|
128
|
+
'umUnrealizedPNL',
|
|
129
|
+
'umWalletBalance',
|
|
118
130
|
'unrealisedPnl',
|
|
119
131
|
'unRealizedProfit',
|
|
120
132
|
'volume',
|
|
@@ -188,13 +200,26 @@ class Beautifier {
|
|
|
188
200
|
return beautifedArray;
|
|
189
201
|
}
|
|
190
202
|
beautify(data, key) {
|
|
203
|
+
var _a;
|
|
204
|
+
// console.log('beautify()', { key });
|
|
191
205
|
if (typeof key !== 'string' && typeof key !== 'number') {
|
|
192
206
|
console.warn(`beautify(object, ${key}) is not valid key - beautification failed `, data, key);
|
|
193
207
|
return data;
|
|
194
208
|
}
|
|
195
209
|
const knownBeautification = this.beautificationMap[key];
|
|
196
210
|
if (!knownBeautification) {
|
|
197
|
-
|
|
211
|
+
const valueType = typeof data;
|
|
212
|
+
const isPrimitive = valueType === 'string' ||
|
|
213
|
+
valueType === 'number' ||
|
|
214
|
+
valueType === 'boolean';
|
|
215
|
+
// Nothing to warn for primitives
|
|
216
|
+
if (((_a = this.config) === null || _a === void 0 ? void 0 : _a.warnKeyMissingInMap) && !isPrimitive) {
|
|
217
|
+
console.log(`Beautifier(): event not found in map: key(..., "${key}")`, {
|
|
218
|
+
valueType,
|
|
219
|
+
data,
|
|
220
|
+
});
|
|
221
|
+
process.exit(-1);
|
|
222
|
+
}
|
|
198
223
|
if (Array.isArray(data)) {
|
|
199
224
|
return this.beautifyArrayValues(data);
|
|
200
225
|
}
|
|
@@ -244,22 +269,26 @@ class Beautifier {
|
|
|
244
269
|
/**
|
|
245
270
|
* Entry point to beautify WS message. EventType is determined automatically unless this is a combined stream event.
|
|
246
271
|
*/
|
|
247
|
-
beautifyWsMessage(
|
|
248
|
-
|
|
249
|
-
|
|
272
|
+
beautifyWsMessage(event, eventType, isCombined, eventMapSuffix) {
|
|
273
|
+
const eventMapSuffixResolved = eventMapSuffix || '';
|
|
274
|
+
if (event.data) {
|
|
275
|
+
return this.beautifyWsMessage(event.data, eventType, isCombined, eventMapSuffixResolved);
|
|
276
|
+
}
|
|
277
|
+
if (Array.isArray(event)) {
|
|
278
|
+
return event.map((event) => {
|
|
250
279
|
if (event.e) {
|
|
251
|
-
return this.beautify(event, event.e + 'Event');
|
|
280
|
+
return this.beautify(event, event.e + eventMapSuffixResolved + 'Event');
|
|
252
281
|
}
|
|
253
282
|
return event;
|
|
254
283
|
});
|
|
255
284
|
}
|
|
256
|
-
|
|
257
|
-
return this.beautify(
|
|
285
|
+
if (event.e) {
|
|
286
|
+
return this.beautify(event, event.e + eventMapSuffixResolved + 'Event');
|
|
258
287
|
}
|
|
259
|
-
|
|
260
|
-
return this.beautify(
|
|
288
|
+
if (isCombined && typeof event === 'object' && event !== null) {
|
|
289
|
+
return this.beautify(event, eventType + eventMapSuffixResolved);
|
|
261
290
|
}
|
|
262
|
-
return
|
|
291
|
+
return event;
|
|
263
292
|
}
|
|
264
293
|
}
|
|
265
294
|
exports.default = Beautifier;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"beautifier.js","sourceRoot":"","sources":["../../src/util/beautifier.ts"],"names":[],"mappings":";;AACA,uDAAyD;
|
|
1
|
+
{"version":3,"file":"beautifier.js","sourceRoot":"","sources":["../../src/util/beautifier.ts"],"names":[],"mappings":";;AACA,uDAAyD;AAMzD,MAAqB,UAAU;IAS7B,Y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CAAC,KAAK,CAAC,EAAE,CAAC;YACzB,OAAO,KAAK,CAAC,GAAG,CAAC,CAAC,KAAK,EAAE,EAAE;gBACzB,IAAI,KAAK,CAAC,CAAC,EAAE,CAAC;oBACZ,OAAO,IAAI,CAAC,QAAQ,CAClB,KAAK,EACL,KAAK,CAAC,CAAC,GAAG,sBAAsB,GAAG,OAAO,CAC3C,CAAC;gBACJ,CAAC;gBACD,OAAO,KAAK,CAAC;YACf,CAAC,CAAC,CAAC;QACL,CAAC;QAED,IAAI,KAAK,CAAC,CAAC,EAAE,CAAC;YACZ,OAAO,IAAI,CAAC,QAAQ,CAClB,KAAK,EACL,KAAK,CAAC,CAAC,GAAG,sBAAsB,GAAG,OAAO,CACrB,CAAC;QAC1B,CAAC;QAED,IAAI,UAAU,IAAI,OAAO,KAAK,KAAK,QAAQ,IAAI,KAAK,KAAK,IAAI,EAAE,CAAC;YAC9D,OAAO,IAAI,CAAC,QAAQ,CAClB,KAAK,EACL,SAAS,GAAG,sBAAsB,CACb,CAAC;QAC1B,CAAC;QAED,OAAO,KAAK,CAAC;IACf,CAAC;CACF;AApVD,6BAoVC"}
|
|
@@ -1 +1,2 @@
|
|
|
1
|
-
|
|
1
|
+
import { SignEncodeMethod, SignAlgorithm } from './webCryptoAPI';
|
|
2
|
+
export declare function signMessage(message: string, secret: string, method: SignEncodeMethod, algorithm: SignAlgorithm, pemEncodeMethod?: SignEncodeMethod): Promise<string>;
|
|
@@ -9,34 +9,52 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
|
9
9
|
});
|
|
10
10
|
};
|
|
11
11
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
-
exports.signMessage =
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
const
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
12
|
+
exports.signMessage = signMessage;
|
|
13
|
+
const webCryptoAPI_1 = require("./webCryptoAPI");
|
|
14
|
+
function signMessage(message_1, secret_1, method_1, algorithm_1) {
|
|
15
|
+
return __awaiter(this, arguments, void 0, function* (message, secret, method, algorithm, pemEncodeMethod = method) {
|
|
16
|
+
return (0, webCryptoAPI_1.signMessage)(message, secret, method, algorithm);
|
|
17
|
+
// const encoder = new TextEncoder();
|
|
18
|
+
// if (secret.includes('PRIVATE KEY')) {
|
|
19
|
+
// const pemHeader = '-----BEGIN PRIVATE KEY-----';
|
|
20
|
+
// const pemFooter = '-----END PRIVATE KEY-----';
|
|
21
|
+
// const pemContents = secret.substring(
|
|
22
|
+
// pemHeader.length,
|
|
23
|
+
// secret.length - pemFooter.length,
|
|
24
|
+
// );
|
|
25
|
+
// const binaryDerString = globalThis.atob(pemContents);
|
|
26
|
+
// const binaryDer = str2ab(binaryDerString);
|
|
27
|
+
// const key = await globalThis.crypto.subtle.importKey(
|
|
28
|
+
// 'pkcs8',
|
|
29
|
+
// binaryDer,
|
|
30
|
+
// { name: 'RSASSA-PKCS1-v1_5', hash: { name: 'SHA-256' } },
|
|
31
|
+
// false,
|
|
32
|
+
// ['sign'],
|
|
33
|
+
// );
|
|
34
|
+
// const signature = await globalThis.crypto.subtle.sign(
|
|
35
|
+
// 'RSASSA-PKCS1-v1_5',
|
|
36
|
+
// key,
|
|
37
|
+
// encoder.encode(message),
|
|
38
|
+
// );
|
|
39
|
+
// return btoa(String.fromCharCode(...new Uint8Array(signature)));
|
|
40
|
+
// }
|
|
41
|
+
// const key = await globalThis.crypto.subtle.importKey(
|
|
42
|
+
// 'raw',
|
|
43
|
+
// encoder.encode(secret),
|
|
44
|
+
// { name: 'HMAC', hash: { name: 'SHA-256' } },
|
|
45
|
+
// false,
|
|
46
|
+
// ['sign'],
|
|
47
|
+
// );
|
|
48
|
+
// const signature = await globalThis.crypto.subtle.sign(
|
|
49
|
+
// 'HMAC',
|
|
50
|
+
// key,
|
|
51
|
+
// encoder.encode(message),
|
|
52
|
+
// );
|
|
53
|
+
// return Array.prototype.map
|
|
54
|
+
// .call(new Uint8Array(signature), (x: any) =>
|
|
55
|
+
// ('00' + x.toString(16)).slice(-2),
|
|
56
|
+
// )
|
|
57
|
+
// .join('');
|
|
39
58
|
});
|
|
40
59
|
}
|
|
41
|
-
exports.signMessage = signMessage;
|
|
42
60
|
//# sourceMappingURL=browser-support.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"browser-support.js","sourceRoot":"","sources":["../../src/util/browser-support.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"browser-support.js","sourceRoot":"","sources":["../../src/util/browser-support.ts"],"names":[],"mappings":";;;;;;;;;;;AAMA,kCAyDC;AA/DD,iDAIwB;AAExB,SAAsB,WAAW;yDAC/B,OAAe,EACf,MAAc,EACd,MAAwB,EACxB,SAAwB,EACxB,kBAAoC,MAAM;QAE1C,OAAO,IAAA,0BAAuB,EAAC,OAAO,EAAE,MAAM,EAAE,MAAM,EAAE,SAAS,CAAC,CAAC;QAEnE,qCAAqC;QAErC,wCAAwC;QACxC,qDAAqD;QACrD,mDAAmD;QACnD,0CAA0C;QAC1C,wBAAwB;QACxB,wCAAwC;QACxC,OAAO;QACP,0DAA0D;QAC1D,+CAA+C;QAE/C,0DAA0D;QAC1D,eAAe;QACf,iBAAiB;QACjB,gEAAgE;QAChE,aAAa;QACb,gBAAgB;QAChB,OAAO;QAEP,2DAA2D;QAC3D,2BAA2B;QAC3B,WAAW;QACX,+BAA+B;QAC/B,OAAO;QAEP,oEAAoE;QACpE,IAAI;QAEJ,wDAAwD;QACxD,WAAW;QACX,4BAA4B;QAC5B,iDAAiD;QACjD,WAAW;QACX,cAAc;QACd,KAAK;QAEL,yDAAyD;QACzD,YAAY;QACZ,SAAS;QACT,6BAA6B;QAC7B,KAAK;QAEL,6BAA6B;QAC7B,iDAAiD;QACjD,yCAAyC;QACzC,MAAM;QACN,eAAe;IACjB,CAAC;CAAA"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
export type LogParams = null | any;
|
|
2
|
+
export type DefaultLogger = typeof DefaultLogger;
|
|
3
|
+
export declare const DefaultLogger: {
|
|
4
|
+
/** Ping/pong events and other raw messages that might be noisy. Enable this while troubleshooting. */
|
|
5
|
+
trace: (..._params: LogParams) => void;
|
|
6
|
+
info: (...params: LogParams) => void;
|
|
7
|
+
error: (...params: LogParams) => void;
|
|
8
|
+
};
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/* eslint-disable @typescript-eslint/no-unused-vars */
|
|
3
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
|
+
exports.DefaultLogger = void 0;
|
|
5
|
+
exports.DefaultLogger = {
|
|
6
|
+
/** Ping/pong events and other raw messages that might be noisy. Enable this while troubleshooting. */
|
|
7
|
+
trace: (..._params) => {
|
|
8
|
+
// console.log(_params);
|
|
9
|
+
},
|
|
10
|
+
info: (...params) => {
|
|
11
|
+
console.info(params);
|
|
12
|
+
},
|
|
13
|
+
error: (...params) => {
|
|
14
|
+
console.error(params);
|
|
15
|
+
},
|
|
16
|
+
};
|
|
17
|
+
//# sourceMappingURL=logger.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"logger.js","sourceRoot":"","sources":["../../src/util/logger.ts"],"names":[],"mappings":";AAAA,sDAAsD;;;AAMzC,QAAA,aAAa,GAAG;IAC3B,sGAAsG;IACtG,KAAK,EAAE,CAAC,GAAG,OAAkB,EAAQ,EAAE;QACrC,wBAAwB;IAC1B,CAAC;IACD,IAAI,EAAE,CAAC,GAAG,MAAiB,EAAQ,EAAE;QACnC,OAAO,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC;IACvB,CAAC;IACD,KAAK,EAAE,CAAC,GAAG,MAAiB,EAAQ,EAAE;QACpC,OAAO,CAAC,KAAK,CAAC,MAAM,CAAC,CAAC;IACxB,CAAC;CACF,CAAC"}
|
|
@@ -1 +1,2 @@
|
|
|
1
|
-
|
|
1
|
+
import { SignAlgorithm, SignEncodeMethod } from './webCryptoAPI';
|
|
2
|
+
export declare function signMessage(message: string, secret: string, method: SignEncodeMethod, algorithm: SignAlgorithm, pemEncodeMethod?: SignEncodeMethod): Promise<string>;
|
package/lib/util/node-support.js
CHANGED
|
@@ -15,13 +15,23 @@ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (
|
|
|
15
15
|
}) : function(o, v) {
|
|
16
16
|
o["default"] = v;
|
|
17
17
|
});
|
|
18
|
-
var __importStar = (this && this.__importStar) || function (
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
};
|
|
18
|
+
var __importStar = (this && this.__importStar) || (function () {
|
|
19
|
+
var ownKeys = function(o) {
|
|
20
|
+
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
21
|
+
var ar = [];
|
|
22
|
+
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
23
|
+
return ar;
|
|
24
|
+
};
|
|
25
|
+
return ownKeys(o);
|
|
26
|
+
};
|
|
27
|
+
return function (mod) {
|
|
28
|
+
if (mod && mod.__esModule) return mod;
|
|
29
|
+
var result = {};
|
|
30
|
+
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
31
|
+
__setModuleDefault(result, mod);
|
|
32
|
+
return result;
|
|
33
|
+
};
|
|
34
|
+
})();
|
|
25
35
|
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
26
36
|
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
27
37
|
return new (P || (P = Promise))(function (resolve, reject) {
|
|
@@ -32,19 +42,29 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
|
32
42
|
});
|
|
33
43
|
};
|
|
34
44
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
35
|
-
exports.signMessage =
|
|
45
|
+
exports.signMessage = signMessage;
|
|
36
46
|
const crypto_1 = require("crypto");
|
|
37
|
-
const browserMethods = __importStar(require("./
|
|
38
|
-
function signMessage(
|
|
39
|
-
return __awaiter(this,
|
|
47
|
+
const browserMethods = __importStar(require("./webCryptoAPI"));
|
|
48
|
+
function signMessage(message_1, secret_1, method_1, algorithm_1) {
|
|
49
|
+
return __awaiter(this, arguments, void 0, function* (message, secret, method, algorithm, pemEncodeMethod = method) {
|
|
40
50
|
if (secret.includes('PRIVATE KEY') && typeof crypto_1.createSign === 'function') {
|
|
41
|
-
|
|
51
|
+
if (secret.includes('RSA PRIVATE KEY')) {
|
|
52
|
+
// TODO: test me
|
|
53
|
+
return (0, crypto_1.createSign)('RSA-SHA256')
|
|
54
|
+
.update(message)
|
|
55
|
+
.sign(secret, pemEncodeMethod);
|
|
56
|
+
}
|
|
57
|
+
// fallback to ed25519, if a private key is provided but missing "RSA"
|
|
58
|
+
return (0, crypto_1.sign)(null, Buffer.from(message), {
|
|
59
|
+
key: secret,
|
|
60
|
+
padding: crypto_1.constants.RSA_PKCS1_PSS_PADDING,
|
|
61
|
+
saltLength: crypto_1.constants.RSA_PSS_SALTLEN_DIGEST,
|
|
62
|
+
}).toString(pemEncodeMethod);
|
|
42
63
|
}
|
|
43
64
|
if (typeof crypto_1.createHmac === 'function') {
|
|
44
|
-
return (0, crypto_1.createHmac)('sha256', secret).update(message).digest(
|
|
65
|
+
return (0, crypto_1.createHmac)('sha256', secret).update(message).digest(method);
|
|
45
66
|
}
|
|
46
|
-
return browserMethods.signMessage(message, secret);
|
|
67
|
+
return browserMethods.signMessage(message, secret, method, algorithm);
|
|
47
68
|
});
|
|
48
69
|
}
|
|
49
|
-
exports.signMessage = signMessage;
|
|
50
70
|
//# sourceMappingURL=node-support.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"node-support.js","sourceRoot":"","sources":["../../src/util/node-support.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"node-support.js","sourceRoot":"","sources":["../../src/util/node-support.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAKA,kCA4BC;AAjCD,mCAAiE;AAEjE,+DAAiD;AAGjD,SAAsB,WAAW;yDAC/B,OAAe,EACf,MAAc,EACd,MAAwB,EACxB,SAAwB,EACxB,kBAAoC,MAAM;QAE1C,IAAI,MAAM,CAAC,QAAQ,CAAC,aAAa,CAAC,IAAI,OAAO,mBAAU,KAAK,UAAU,EAAE,CAAC;YACvE,IAAI,MAAM,CAAC,QAAQ,CAAC,iBAAiB,CAAC,EAAE,CAAC;gBACvC,gBAAgB;gBAChB,OAAO,IAAA,mBAAU,EAAC,YAAY,CAAC;qBAC5B,MAAM,CAAC,OAAO,CAAC;qBACf,IAAI,CAAC,MAAM,EAAE,eAAe,CAAC,CAAC;YACnC,CAAC;YAED,sEAAsE;YACtE,OAAO,IAAA,aAAI,EAAC,IAAI,EAAE,MAAM,CAAC,IAAI,CAAC,OAAO,CAAC,EAAE;gBACtC,GAAG,EAAE,MAAM;gBACX,OAAO,EAAE,kBAAS,CAAC,qBAAqB;gBACxC,UAAU,EAAE,kBAAS,CAAC,sBAAsB;aAC7C,CAAC,CAAC,QAAQ,CAAC,eAAe,CAAC,CAAC;QAC/B,CAAC;QAED,IAAI,OAAO,mBAAU,KAAK,UAAU,EAAE,CAAC;YACrC,OAAO,IAAA,mBAAU,EAAC,QAAQ,EAAE,MAAM,CAAC,CAAC,MAAM,CAAC,OAAO,CAAC,CAAC,MAAM,CAAC,MAAM,CAAC,CAAC;QACrE,CAAC;QAED,OAAO,cAAc,CAAC,WAAW,CAAC,OAAO,EAAE,MAAM,EAAE,MAAM,EAAE,SAAS,CAAC,CAAC;IACxE,CAAC;CAAA"}
|
|
@@ -1,9 +1,8 @@
|
|
|
1
1
|
import { MainClient } from '../main-client';
|
|
2
|
-
import {
|
|
3
|
-
import { BinanceBaseUrlKey, CancelOCOParams, CancelOrderParams, NewOCOParams, OrderIdProperty } from '../types/shared';
|
|
4
|
-
import { WsMarket } from '../types/websockets';
|
|
2
|
+
import { BinanceBaseUrlKey, OrderIdProperty } from '../types/shared';
|
|
5
3
|
import { USDMClient } from '../usdm-client';
|
|
6
|
-
import { WsKey } from '
|
|
4
|
+
import { WsKey } from './websockets/websocket-util';
|
|
5
|
+
import { WsRequestOperationBinance } from '../types/websockets/ws-api';
|
|
7
6
|
export type RestClient = MainClient | USDMClient;
|
|
8
7
|
export interface RestClientOptions {
|
|
9
8
|
api_key?: string;
|
|
@@ -25,6 +24,9 @@ export interface RestClientOptions {
|
|
|
25
24
|
export type GenericAPIResponse<T = any> = Promise<T>;
|
|
26
25
|
export declare function getOrderIdPrefix(network: BinanceBaseUrlKey): string;
|
|
27
26
|
export declare function generateNewOrderId(network: BinanceBaseUrlKey): string;
|
|
27
|
+
export declare function requiresWSAPINewClientOID(request: WsRequestOperationBinance<string>, wsKey: WsKey): boolean;
|
|
28
|
+
export declare function getBaseURLKeyForWsKey(wsKey: WsKey): BinanceBaseUrlKey;
|
|
29
|
+
export declare function validateWSAPINewClientOID(request: WsRequestOperationBinance<string>, wsKey: WsKey): void;
|
|
28
30
|
export declare function serialiseParams(params?: object, strict_validation?: boolean, encodeValues?: boolean, filterUndefinedParams?: boolean): string;
|
|
29
31
|
export interface SignedRequestState {
|
|
30
32
|
requestBody: any;
|
|
@@ -33,24 +35,22 @@ export interface SignedRequestState {
|
|
|
33
35
|
signature?: string;
|
|
34
36
|
recvWindow?: number;
|
|
35
37
|
}
|
|
36
|
-
export declare function getRequestSignature(data:
|
|
38
|
+
export declare function getRequestSignature(data: object & {
|
|
39
|
+
recvWindow?: number;
|
|
40
|
+
signature?: string;
|
|
41
|
+
}, key?: string, secret?: string, recvWindow?: number, timestamp?: number, strictParamValidation?: boolean, filterUndefinedParams?: boolean): Promise<SignedRequestState>;
|
|
37
42
|
export declare function getServerTimeEndpoint(urlKey: BinanceBaseUrlKey): string;
|
|
38
43
|
export declare function getRestBaseUrl(clientType: BinanceBaseUrlKey, restClientOptions: RestClientOptions): string;
|
|
39
44
|
export declare function isPublicEndpoint(endpoint: string): boolean;
|
|
40
45
|
export declare function isWsPong(response: any): any;
|
|
41
|
-
export declare function logInvalidOrderId(orderIdProperty: OrderIdProperty, expectedOrderIdPrefix: string, params:
|
|
46
|
+
export declare function logInvalidOrderId(orderIdProperty: OrderIdProperty, expectedOrderIdPrefix: string, params: object): void;
|
|
47
|
+
/**
|
|
48
|
+
* For some topics, the received event does not include any information on the topic the event is for (e.g. book tickers).
|
|
49
|
+
*
|
|
50
|
+
* This method extracts this using available context, to add an "eventType" property if missing.
|
|
51
|
+
*
|
|
52
|
+
* - For the old WebsocketClient, this is extracted using the WsKey.
|
|
53
|
+
* - For the new multiplex Websocketclient, this is extracted using the "stream" parameter.
|
|
54
|
+
*/
|
|
42
55
|
export declare function appendEventIfMissing(wsMsg: any, wsKey: WsKey): void;
|
|
43
|
-
interface WsContext {
|
|
44
|
-
symbol: string | undefined;
|
|
45
|
-
market: WsMarket;
|
|
46
|
-
isTestnet: boolean | undefined;
|
|
47
|
-
isUserData: boolean;
|
|
48
|
-
streamName: string;
|
|
49
|
-
listenKey: string | undefined;
|
|
50
|
-
otherParams: undefined | string[];
|
|
51
|
-
}
|
|
52
|
-
export declare function getContextFromWsKey(wsKey: WsKey): WsContext;
|
|
53
|
-
export declare function getWsKeyWithContext(market: WsMarket, streamName: string, symbol?: string | undefined, listenKey?: string | undefined, ...otherParams: (string | boolean)[]): WsKey;
|
|
54
|
-
export declare function appendEventMarket(wsMsg: any, wsKey: WsKey): void;
|
|
55
56
|
export declare function asArray<T>(el: T[] | T): T[];
|
|
56
|
-
export {};
|