@drift-labs/sdk 2.110.0-beta.16 → 2.110.0-beta.17
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/VERSION
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
2.110.0-beta.
|
|
1
|
+
2.110.0-beta.17
|
|
@@ -2,4 +2,4 @@
|
|
|
2
2
|
/// <reference types="node" />
|
|
3
3
|
export declare function digest(data: Buffer): Buffer;
|
|
4
4
|
export declare function digestSignature(signature: Uint8Array): string;
|
|
5
|
-
export declare function
|
|
5
|
+
export declare function generateSignedMsgUuid(): Uint8Array;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.
|
|
3
|
+
exports.generateSignedMsgUuid = exports.digestSignature = exports.digest = void 0;
|
|
4
4
|
const crypto_1 = require("crypto");
|
|
5
5
|
const nanoid_1 = require("nanoid");
|
|
6
6
|
function digest(data) {
|
|
@@ -13,7 +13,7 @@ function digestSignature(signature) {
|
|
|
13
13
|
return (0, crypto_1.createHash)('sha256').update(signature).digest('base64');
|
|
14
14
|
}
|
|
15
15
|
exports.digestSignature = digestSignature;
|
|
16
|
-
function
|
|
16
|
+
function generateSignedMsgUuid() {
|
|
17
17
|
return Uint8Array.from(Buffer.from((0, nanoid_1.nanoid)(8)));
|
|
18
18
|
}
|
|
19
|
-
exports.
|
|
19
|
+
exports.generateSignedMsgUuid = generateSignedMsgUuid;
|
|
@@ -2,4 +2,4 @@
|
|
|
2
2
|
/// <reference types="node" />
|
|
3
3
|
export declare function digest(data: Buffer): Buffer;
|
|
4
4
|
export declare function digestSignature(signature: Uint8Array): string;
|
|
5
|
-
export declare function
|
|
5
|
+
export declare function generateSignedMsgUuid(): Uint8Array;
|
package/lib/node/util/digest.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.
|
|
3
|
+
exports.generateSignedMsgUuid = exports.digestSignature = exports.digest = void 0;
|
|
4
4
|
const crypto_1 = require("crypto");
|
|
5
5
|
const nanoid_1 = require("nanoid");
|
|
6
6
|
function digest(data) {
|
|
@@ -13,7 +13,7 @@ function digestSignature(signature) {
|
|
|
13
13
|
return (0, crypto_1.createHash)('sha256').update(signature).digest('base64');
|
|
14
14
|
}
|
|
15
15
|
exports.digestSignature = digestSignature;
|
|
16
|
-
function
|
|
16
|
+
function generateSignedMsgUuid() {
|
|
17
17
|
return Uint8Array.from(Buffer.from((0, nanoid_1.nanoid)(8)));
|
|
18
18
|
}
|
|
19
|
-
exports.
|
|
19
|
+
exports.generateSignedMsgUuid = generateSignedMsgUuid;
|
package/package.json
CHANGED
package/src/util/digest.ts
CHANGED
|
@@ -11,6 +11,6 @@ export function digestSignature(signature: Uint8Array): string {
|
|
|
11
11
|
return createHash('sha256').update(signature).digest('base64');
|
|
12
12
|
}
|
|
13
13
|
|
|
14
|
-
export function
|
|
14
|
+
export function generateSignedMsgUuid(): Uint8Array {
|
|
15
15
|
return Uint8Array.from(Buffer.from(nanoid(8)));
|
|
16
16
|
}
|