@signalapp/signal-client
Advanced tools
Comparing version 0.11.1 to 0.12.0
@@ -67,2 +67,3 @@ /// <reference types="node" /> | ||
verify(msg: Buffer, sig: Buffer): boolean; | ||
verifyAlternateIdentity(other: PublicKey, signature: Buffer): boolean; | ||
} | ||
@@ -81,7 +82,8 @@ export declare class PrivateKey { | ||
export declare class IdentityKeyPair { | ||
private readonly publicKey; | ||
private readonly privateKey; | ||
readonly publicKey: PublicKey; | ||
readonly privateKey: PrivateKey; | ||
constructor(publicKey: PublicKey, privateKey: PrivateKey); | ||
static new(publicKey: PublicKey, privateKey: PrivateKey): IdentityKeyPair; | ||
static generate(): IdentityKeyPair; | ||
serialize(): Buffer; | ||
signAlternateIdentity(other: PublicKey): Buffer; | ||
} | ||
@@ -157,2 +159,15 @@ export declare class PreKeyBundle { | ||
hasCurrentState(): boolean; | ||
/** | ||
* Returns true if this session was marked as needing a PNI signature and has not received a | ||
* reply. | ||
* | ||
* Precondition: `this.hasCurrentState()` | ||
*/ | ||
needsPniSignature(): boolean; | ||
/** | ||
* Marks whether this session needs a PNI signature included in outgoing messages. | ||
* | ||
* Precondition: `this.hasCurrentState()` | ||
*/ | ||
setNeedsPniSignature(needsPniSignature: boolean): void; | ||
currentRatchetKeyMatches(key: PublicKey): boolean; | ||
@@ -159,0 +174,0 @@ } |
@@ -134,2 +134,5 @@ "use strict"; | ||
} | ||
verifyAlternateIdentity(other, signature) { | ||
return Native.IdentityKey_VerifyAlternateIdentity(this, other, signature); | ||
} | ||
} | ||
@@ -169,4 +172,5 @@ exports.PublicKey = PublicKey; | ||
} | ||
static new(publicKey, privateKey) { | ||
return new IdentityKeyPair(publicKey, privateKey); | ||
static generate() { | ||
const privateKey = PrivateKey.generate(); | ||
return new IdentityKeyPair(privateKey.getPublicKey(), privateKey); | ||
} | ||
@@ -176,2 +180,5 @@ serialize() { | ||
} | ||
signAlternateIdentity(other) { | ||
return Native.IdentityKeyPair_SignAlternateIdentity(this.publicKey, this.privateKey, other); | ||
} | ||
} | ||
@@ -359,2 +366,19 @@ exports.IdentityKeyPair = IdentityKeyPair; | ||
} | ||
/** | ||
* Returns true if this session was marked as needing a PNI signature and has not received a | ||
* reply. | ||
* | ||
* Precondition: `this.hasCurrentState()` | ||
*/ | ||
needsPniSignature() { | ||
return Native.SessionRecord_NeedsPniSignature(this); | ||
} | ||
/** | ||
* Marks whether this session needs a PNI signature included in outgoing messages. | ||
* | ||
* Precondition: `this.hasCurrentState()` | ||
*/ | ||
setNeedsPniSignature(needsPniSignature) { | ||
Native.SessionRecord_SetNeedsPniSignature(this, needsPniSignature); | ||
} | ||
currentRatchetKeyMatches(key) { | ||
@@ -361,0 +385,0 @@ return Native.SessionRecord_CurrentRatchetKeyMatches(this, key); |
@@ -94,2 +94,4 @@ // | ||
export function IdentityKeyPair_Serialize(publicKey: Wrapper<PublicKey>, privateKey: Wrapper<PrivateKey>): Buffer; | ||
export function IdentityKeyPair_SignAlternateIdentity(publicKey: Wrapper<PublicKey>, privateKey: Wrapper<PrivateKey>, otherIdentity: Wrapper<PublicKey>): Buffer; | ||
export function IdentityKey_VerifyAlternateIdentity(publicKey: Wrapper<PublicKey>, otherIdentity: Wrapper<PublicKey>, signature: Buffer): boolean; | ||
export function PlaintextContent_Deserialize(data: Buffer): PlaintextContent; | ||
@@ -251,3 +253,5 @@ export function PlaintextContent_FromDecryptionErrorMessage(m: Wrapper<DecryptionErrorMessage>): PlaintextContent; | ||
export function SessionRecord_HasCurrentState(obj: Wrapper<SessionRecord>): boolean; | ||
export function SessionRecord_NeedsPniSignature(obj: Wrapper<SessionRecord>): boolean; | ||
export function SessionRecord_Serialize(obj: Wrapper<SessionRecord>): Buffer; | ||
export function SessionRecord_SetNeedsPniSignature(s: Wrapper<SessionRecord>, needsPniSignature: boolean): void; | ||
export function SignalMessage_Deserialize(data: Buffer): SignalMessage; | ||
@@ -254,0 +258,0 @@ export function SignalMessage_GetBody(obj: Wrapper<SignalMessage>): Buffer; |
{ | ||
"name": "@signalapp/signal-client", | ||
"version": "0.11.1", | ||
"version": "0.12.0", | ||
"license": "AGPL-3.0-only", | ||
@@ -5,0 +5,0 @@ "main": "dist/index.js", |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
3035
13453730