valr-typescript-client 1.0.10 → 1.0.19
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/CHECKSUMS.txt +10 -10
- package/dist/index.d.mts +3 -1
- package/dist/index.d.ts +3 -1
- package/dist/index.js +9 -2
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +9 -2
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/CHECKSUMS.txt
CHANGED
|
@@ -1,17 +1,17 @@
|
|
|
1
1
|
# Package Checksums
|
|
2
2
|
|
|
3
|
-
Generated on: 2025-12-
|
|
4
|
-
Git commit:
|
|
5
|
-
Version: 1.0.
|
|
3
|
+
Generated on: 2025-12-31 11:27:01 UTC
|
|
4
|
+
Git commit: e3c78e48f16b4f6a98d011dca29d644202af2d37
|
|
5
|
+
Version: 1.0.19
|
|
6
6
|
|
|
7
7
|
## Distribution Files (SHA256)
|
|
8
8
|
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
9
|
+
17891d810cf172f044786288fef7df62f461581455871dac961fd65435b2d204 dist/index.mjs.map
|
|
10
|
+
3275588ac5ec719891a8c35c418d25db8492e953b364409b97fe079971c9e6c1 dist/index.mjs
|
|
11
|
+
7e8d73467b1c57397945238dfcf370e7d7f1bd271a13eb9dd14f3612a9cf629f dist/index.js
|
|
12
|
+
a8d906a68147898ac01151fa1e7fb030c37e46c1103555fae85a9efcb566ec9f dist/index.d.mts
|
|
13
|
+
a8d906a68147898ac01151fa1e7fb030c37e46c1103555fae85a9efcb566ec9f dist/index.d.ts
|
|
14
|
+
bca7d628fed0512fc2bfcaab410eb93ab4671eaace7ef8ae6a81b2f223aed926 dist/index.js.map
|
|
15
15
|
|
|
16
16
|
## Source Files (SHA256)
|
|
17
17
|
|
|
@@ -28,7 +28,6 @@ c10a93a7b2361bef6672805183ab08595fc948e3bf205d7ca8b5052620f3e226 dist/index.mjs
|
|
|
28
28
|
4202fe777fda3e43ff944971783116f17031d124395e4a44cb2bf2bec5ff246c src/types/bundles.ts
|
|
29
29
|
43ce3b42153a2e1a2d290ea893507c820e4461eb2162b1ccfa0d832118468618 src/api/margin.ts
|
|
30
30
|
4abf3aa146557f6f33f039a03a675cb6588da94f29e885ef97458cb698699425 src/types/common.ts
|
|
31
|
-
4b598e192fe1571f36138724f67d49f645d1b4c90cc527fe0e6901d5f950372c src/auth/RequestSigner.ts
|
|
32
31
|
5475e829a33f944dec5dd4079066aa621c76c7767ac56f172a322ce110d43f0b src/types/pay.ts
|
|
33
32
|
551aa287e635dad4d0209502a0410f09c169715a5bac95366a875038c3e50504 src/api/futures.ts
|
|
34
33
|
5572db3151cd4db275a7ac6e8a8859e3c9048e0bd873a113f445139c0db2017c src/api/bundles.ts
|
|
@@ -46,5 +45,6 @@ d8b3405cad342df23aeacaaacde277a4829028699a13bf0d129aea07beb23d68 src/api/tradin
|
|
|
46
45
|
ec209b0ff8de8e662c2ea701feccee22b53e6ed684affb3eacd39e68c3aa725a src/index.ts
|
|
47
46
|
f67a6c69ed003a1606221e792de802592aedb7164cafb7d7d2eab4fac105807a src/utils/constants.ts
|
|
48
47
|
f819d431730bb51a23d2cad32cc6eee83dc9d917e5cb9efd3201ffeb64d76ec5 src/client/AccountWebSocket.ts
|
|
48
|
+
fadae797586481848494b79e9924ecc1e6fabc19a154d822579ffa2065d395fd src/auth/RequestSigner.ts
|
|
49
49
|
fe3ced400781e287f691c1262b48ea5005d21b45f69172a8a03b470e14c63a6e src/client/TradeWebSocket.ts
|
|
50
50
|
fe8bec28add01e200bd95ad326a0511334671b3a82a3990d2ee521adca7a7a8e src/types/wallets.ts
|
package/dist/index.d.mts
CHANGED
|
@@ -3764,6 +3764,7 @@ interface SignRequestParams {
|
|
|
3764
3764
|
* Implements HMAC SHA512 signature generation as per VALR API specification
|
|
3765
3765
|
*/
|
|
3766
3766
|
declare class RequestSigner {
|
|
3767
|
+
static lastUsedTimeStamp: number;
|
|
3767
3768
|
/**
|
|
3768
3769
|
* Generate HMAC SHA512 signature for VALR API request
|
|
3769
3770
|
*
|
|
@@ -3786,8 +3787,9 @@ declare class RequestSigner {
|
|
|
3786
3787
|
static signRequest(params: SignRequestParams): string;
|
|
3787
3788
|
/**
|
|
3788
3789
|
* Get current timestamp in milliseconds
|
|
3790
|
+
* Guarantees unique timestamps by waiting for the next millisecond if necessary
|
|
3789
3791
|
*
|
|
3790
|
-
* @returns Unix timestamp in milliseconds
|
|
3792
|
+
* @returns Unix timestamp in milliseconds (guaranteed unique and monotonically increasing)
|
|
3791
3793
|
*/
|
|
3792
3794
|
static getTimestamp(): number;
|
|
3793
3795
|
/**
|
package/dist/index.d.ts
CHANGED
|
@@ -3764,6 +3764,7 @@ interface SignRequestParams {
|
|
|
3764
3764
|
* Implements HMAC SHA512 signature generation as per VALR API specification
|
|
3765
3765
|
*/
|
|
3766
3766
|
declare class RequestSigner {
|
|
3767
|
+
static lastUsedTimeStamp: number;
|
|
3767
3768
|
/**
|
|
3768
3769
|
* Generate HMAC SHA512 signature for VALR API request
|
|
3769
3770
|
*
|
|
@@ -3786,8 +3787,9 @@ declare class RequestSigner {
|
|
|
3786
3787
|
static signRequest(params: SignRequestParams): string;
|
|
3787
3788
|
/**
|
|
3788
3789
|
* Get current timestamp in milliseconds
|
|
3790
|
+
* Guarantees unique timestamps by waiting for the next millisecond if necessary
|
|
3789
3791
|
*
|
|
3790
|
-
* @returns Unix timestamp in milliseconds
|
|
3792
|
+
* @returns Unix timestamp in milliseconds (guaranteed unique and monotonically increasing)
|
|
3791
3793
|
*/
|
|
3792
3794
|
static getTimestamp(): number;
|
|
3793
3795
|
/**
|
package/dist/index.js
CHANGED
|
@@ -234,11 +234,17 @@ var RequestSigner = class {
|
|
|
234
234
|
}
|
|
235
235
|
/**
|
|
236
236
|
* Get current timestamp in milliseconds
|
|
237
|
+
* Guarantees unique timestamps by waiting for the next millisecond if necessary
|
|
237
238
|
*
|
|
238
|
-
* @returns Unix timestamp in milliseconds
|
|
239
|
+
* @returns Unix timestamp in milliseconds (guaranteed unique and monotonically increasing)
|
|
239
240
|
*/
|
|
240
241
|
static getTimestamp() {
|
|
241
|
-
|
|
242
|
+
let now = Date.now();
|
|
243
|
+
while (now <= this.lastUsedTimeStamp) {
|
|
244
|
+
now = Date.now();
|
|
245
|
+
}
|
|
246
|
+
this.lastUsedTimeStamp = now;
|
|
247
|
+
return now;
|
|
242
248
|
}
|
|
243
249
|
/**
|
|
244
250
|
* Validate API credentials
|
|
@@ -269,6 +275,7 @@ var RequestSigner = class {
|
|
|
269
275
|
}
|
|
270
276
|
}
|
|
271
277
|
};
|
|
278
|
+
RequestSigner.lastUsedTimeStamp = 0;
|
|
272
279
|
|
|
273
280
|
// src/api/public.ts
|
|
274
281
|
var PublicAPI = class {
|