@signalapp/libsignal-client 0.18.1 → 0.19.3
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/Native.d.ts +2 -1
- package/dist/index.d.ts +2 -1
- package/dist/index.js +7 -3
- package/package.json +1 -1
- package/prebuilds/darwin-arm64/node.napi.node +0 -0
- package/prebuilds/darwin-x64/node.napi.node +0 -0
- package/prebuilds/linux-arm64/node.napi.node +0 -0
- package/prebuilds/linux-x64/node.napi.node +0 -0
- package/prebuilds/win32-arm64/node.napi.node +0 -0
- package/prebuilds/win32-x64/node.napi.node +0 -0
package/Native.d.ts
CHANGED
|
@@ -65,7 +65,7 @@ export function Cds2ClientState_CompleteHandshake(cli: Wrapper<Cds2ClientState>,
|
|
|
65
65
|
export function Cds2ClientState_EstablishedRecv(cli: Wrapper<Cds2ClientState>, receivedCiphertext: Buffer): Buffer;
|
|
66
66
|
export function Cds2ClientState_EstablishedSend(cli: Wrapper<Cds2ClientState>, plaintextToSend: Buffer): Buffer;
|
|
67
67
|
export function Cds2ClientState_InitialRequest(obj: Wrapper<Cds2ClientState>): Buffer;
|
|
68
|
-
export function Cds2ClientState_New(mrenclave: Buffer,
|
|
68
|
+
export function Cds2ClientState_New(mrenclave: Buffer, attestationMsg: Buffer, currentTimestamp: Timestamp): Cds2ClientState;
|
|
69
69
|
export function CiphertextMessage_FromPlaintextContent(m: Wrapper<PlaintextContent>): CiphertextMessage;
|
|
70
70
|
export function CiphertextMessage_Serialize(obj: Wrapper<CiphertextMessage>): Buffer;
|
|
71
71
|
export function CiphertextMessage_Type(msg: Wrapper<CiphertextMessage>): number;
|
|
@@ -104,6 +104,7 @@ export function HsmEnclaveClient_EstablishedRecv(cli: Wrapper<HsmEnclaveClient>,
|
|
|
104
104
|
export function HsmEnclaveClient_EstablishedSend(cli: Wrapper<HsmEnclaveClient>, plaintextToSend: Buffer): Buffer;
|
|
105
105
|
export function HsmEnclaveClient_InitialRequest(obj: Wrapper<HsmEnclaveClient>): Buffer;
|
|
106
106
|
export function HsmEnclaveClient_New(trustedPublicKey: Buffer, trustedCodeHashes: Buffer): HsmEnclaveClient;
|
|
107
|
+
export function IdentityKeyPair_Deserialize(buffer: Buffer): {publicKey:PublicKey,privateKey:PrivateKey};
|
|
107
108
|
export function IdentityKeyPair_Serialize(publicKey: Wrapper<PublicKey>, privateKey: Wrapper<PrivateKey>): Buffer;
|
|
108
109
|
export function IdentityKeyPair_SignAlternateIdentity(publicKey: Wrapper<PublicKey>, privateKey: Wrapper<PrivateKey>, otherIdentity: Wrapper<PublicKey>): Buffer;
|
|
109
110
|
export function IdentityKey_VerifyAlternateIdentity(publicKey: Wrapper<PublicKey>, otherIdentity: Wrapper<PublicKey>, signature: Buffer): boolean;
|
package/dist/index.d.ts
CHANGED
|
@@ -81,6 +81,7 @@ export declare class IdentityKeyPair {
|
|
|
81
81
|
readonly privateKey: PrivateKey;
|
|
82
82
|
constructor(publicKey: PublicKey, privateKey: PrivateKey);
|
|
83
83
|
static generate(): IdentityKeyPair;
|
|
84
|
+
static deserialize(buffer: Buffer): IdentityKeyPair;
|
|
84
85
|
serialize(): Buffer;
|
|
85
86
|
signAlternateIdentity(other: PublicKey): Buffer;
|
|
86
87
|
}
|
|
@@ -324,7 +325,7 @@ export declare function sealedSenderDecryptToUsmc(message: Buffer, identityStore
|
|
|
324
325
|
export declare class Cds2Client {
|
|
325
326
|
readonly _nativeHandle: Native.Cds2ClientState;
|
|
326
327
|
private constructor();
|
|
327
|
-
static
|
|
328
|
+
static new(mrenclave: Buffer, attestationMsg: Buffer, currentTimestamp: Date): Cds2Client;
|
|
328
329
|
initialRequest(): Buffer;
|
|
329
330
|
completeHandshake(buffer: Buffer): void;
|
|
330
331
|
establishedSend(buffer: Buffer): Buffer;
|
package/dist/index.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
//
|
|
3
|
-
// Copyright 2020-
|
|
3
|
+
// Copyright 2020-2022 Signal Messenger, LLC.
|
|
4
4
|
// SPDX-License-Identifier: AGPL-3.0-only
|
|
5
5
|
//
|
|
6
6
|
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
@@ -195,6 +195,10 @@ class IdentityKeyPair {
|
|
|
195
195
|
const privateKey = PrivateKey.generate();
|
|
196
196
|
return new IdentityKeyPair(privateKey.getPublicKey(), privateKey);
|
|
197
197
|
}
|
|
198
|
+
static deserialize(buffer) {
|
|
199
|
+
const { privateKey, publicKey } = Native.IdentityKeyPair_Deserialize(buffer);
|
|
200
|
+
return new IdentityKeyPair(PublicKey._fromNativeHandle(publicKey), PrivateKey._fromNativeHandle(privateKey));
|
|
201
|
+
}
|
|
198
202
|
serialize() {
|
|
199
203
|
return Native.IdentityKeyPair_Serialize(this.publicKey, this.privateKey);
|
|
200
204
|
}
|
|
@@ -855,8 +859,8 @@ class Cds2Client {
|
|
|
855
859
|
constructor(nativeHandle) {
|
|
856
860
|
this._nativeHandle = nativeHandle;
|
|
857
861
|
}
|
|
858
|
-
static
|
|
859
|
-
return new Cds2Client(Native.Cds2ClientState_New(mrenclave,
|
|
862
|
+
static new(mrenclave, attestationMsg, currentTimestamp) {
|
|
863
|
+
return new Cds2Client(Native.Cds2ClientState_New(mrenclave, attestationMsg, currentTimestamp.getTime()));
|
|
860
864
|
}
|
|
861
865
|
initialRequest() {
|
|
862
866
|
return Native.Cds2ClientState_InitialRequest(this);
|
package/package.json
CHANGED
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|