Socket
Socket
Sign inDemoInstall

@signalapp/libsignal-client

Package Overview
Dependencies
3
Maintainers
6
Versions
58
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 0.44.0 to 0.45.0

dist/zkgroup/backups/BackupLevel.d.ts

6

dist/net.d.ts

@@ -106,2 +106,8 @@ /// <reference types="node" />

/**
* Enables/disables IPv6 for all new connections (until changed).
*
* The flag is `true` by default.
*/
setIpv6Enabled(ipv6Enabled: boolean): void;
/**
* Sets the proxy host to be used for all new connections (until overridden).

@@ -108,0 +114,0 @@ *

@@ -110,2 +110,10 @@ "use strict";

/**
* Enables/disables IPv6 for all new connections (until changed).
*
* The flag is `true` by default.
*/
setIpv6Enabled(ipv6Enabled) {
Native.ConnectionManager_set_ipv6_enabled(this.connectionManager, ipv6Enabled);
}
/**
* Sets the proxy host to be used for all new connections (until overridden).

@@ -112,0 +120,0 @@ *

9

dist/zkgroup/auth/ClientZkAuthOperations.d.ts

@@ -17,13 +17,4 @@ /// <reference types="node" />

receiveAuthCredentialWithPniAsServiceId(aci: Aci, pni: Pni, redemptionTime: number, authCredentialResponse: AuthCredentialWithPniResponse): AuthCredentialWithPni;
/**
* Produces the AuthCredentialWithPni from a server-generated AuthCredentialWithPniResponse.
*
* This older style of AuthCredentialWithPni will not actually have a usable PNI field,
* but can still be used for authenticating with an ACI.
*
* @param redemptionTime - This is provided by the server as an integer, and should be passed through directly.
*/
receiveAuthCredentialWithPniAsAci(aci: Aci, pni: Pni, redemptionTime: number, authCredentialResponse: AuthCredentialWithPniResponse): AuthCredentialWithPni;
createAuthCredentialWithPniPresentation(groupSecretParams: GroupSecretParams, authCredential: AuthCredentialWithPni): AuthCredentialPresentation;
createAuthCredentialWithPniPresentationWithRandom(random: Buffer, groupSecretParams: GroupSecretParams, authCredential: AuthCredentialWithPni): AuthCredentialPresentation;
}

15

dist/zkgroup/auth/ClientZkAuthOperations.js

@@ -22,15 +22,4 @@ "use strict";

receiveAuthCredentialWithPniAsServiceId(aci, pni, redemptionTime, authCredentialResponse) {
return new AuthCredentialWithPni_1.default(Native.ServerPublicParams_ReceiveAuthCredentialWithPniAsServiceId(this.serverPublicParams.getContents(), aci.getServiceIdFixedWidthBinary(), pni.getServiceIdFixedWidthBinary(), redemptionTime, authCredentialResponse.getContents()));
return new AuthCredentialWithPni_1.default(Native.ServerPublicParams_ReceiveAuthCredentialWithPniAsServiceId(this.serverPublicParams, aci.getServiceIdFixedWidthBinary(), pni.getServiceIdFixedWidthBinary(), redemptionTime, authCredentialResponse.getContents()));
}
/**
* Produces the AuthCredentialWithPni from a server-generated AuthCredentialWithPniResponse.
*
* This older style of AuthCredentialWithPni will not actually have a usable PNI field,
* but can still be used for authenticating with an ACI.
*
* @param redemptionTime - This is provided by the server as an integer, and should be passed through directly.
*/
receiveAuthCredentialWithPniAsAci(aci, pni, redemptionTime, authCredentialResponse) {
return new AuthCredentialWithPni_1.default(Native.ServerPublicParams_ReceiveAuthCredentialWithPniAsAci(this.serverPublicParams.getContents(), aci.getServiceIdFixedWidthBinary(), pni.getServiceIdFixedWidthBinary(), redemptionTime, authCredentialResponse.getContents()));
}
createAuthCredentialWithPniPresentation(groupSecretParams, authCredential) {

@@ -41,3 +30,3 @@ const random = (0, crypto_1.randomBytes)(Constants_1.RANDOM_LENGTH);

createAuthCredentialWithPniPresentationWithRandom(random, groupSecretParams, authCredential) {
return new AuthCredentialPresentation_1.default(Native.ServerPublicParams_CreateAuthCredentialWithPniPresentationDeterministic(this.serverPublicParams.getContents(), random, groupSecretParams.getContents(), authCredential.getContents()));
return new AuthCredentialPresentation_1.default(Native.ServerPublicParams_CreateAuthCredentialWithPniPresentationDeterministic(this.serverPublicParams, random, groupSecretParams.getContents(), authCredential.getContents()));
}

@@ -44,0 +33,0 @@ }

@@ -12,4 +12,2 @@ /// <reference types="node" />

issueAuthCredentialWithPniAsServiceIdWithRandom(random: Buffer, aci: Aci, pni: Pni, redemptionTime: number): AuthCredentialWithPniResponse;
issueAuthCredentialWithPniAsAci(aci: Aci, pni: Pni, redemptionTime: number): AuthCredentialWithPniResponse;
issueAuthCredentialWithPniAsAciWithRandom(random: Buffer, aci: Aci, pni: Pni, redemptionTime: number): AuthCredentialWithPniResponse;
issueAuthCredentialWithPniZkc(aci: Aci, pni: Pni, redemptionTime: number): AuthCredentialWithPniResponse;

@@ -16,0 +14,0 @@ issueAuthCredentialWithPniZkcWithRandom(random: Buffer, aci: Aci, pni: Pni, redemptionTime: number): AuthCredentialWithPniResponse;

@@ -20,11 +20,4 @@ "use strict";

issueAuthCredentialWithPniAsServiceIdWithRandom(random, aci, pni, redemptionTime) {
return new AuthCredentialWithPniResponse_1.default(Native.ServerSecretParams_IssueAuthCredentialWithPniAsServiceIdDeterministic(this.serverSecretParams.getContents(), random, aci.getServiceIdFixedWidthBinary(), pni.getServiceIdFixedWidthBinary(), redemptionTime));
return new AuthCredentialWithPniResponse_1.default(Native.ServerSecretParams_IssueAuthCredentialWithPniAsServiceIdDeterministic(this.serverSecretParams, random, aci.getServiceIdFixedWidthBinary(), pni.getServiceIdFixedWidthBinary(), redemptionTime));
}
issueAuthCredentialWithPniAsAci(aci, pni, redemptionTime) {
const random = (0, crypto_1.randomBytes)(Constants_1.RANDOM_LENGTH);
return this.issueAuthCredentialWithPniAsAciWithRandom(random, aci, pni, redemptionTime);
}
issueAuthCredentialWithPniAsAciWithRandom(random, aci, pni, redemptionTime) {
return new AuthCredentialWithPniResponse_1.default(Native.ServerSecretParams_IssueAuthCredentialWithPniAsAciDeterministic(this.serverSecretParams.getContents(), random, aci.getServiceIdFixedWidthBinary(), pni.getServiceIdFixedWidthBinary(), redemptionTime));
}
issueAuthCredentialWithPniZkc(aci, pni, redemptionTime) {

@@ -35,6 +28,6 @@ const random = (0, crypto_1.randomBytes)(Constants_1.RANDOM_LENGTH);

issueAuthCredentialWithPniZkcWithRandom(random, aci, pni, redemptionTime) {
return new AuthCredentialWithPniResponse_1.default(Native.ServerSecretParams_IssueAuthCredentialWithPniZkcDeterministic(this.serverSecretParams.getContents(), random, aci.getServiceIdFixedWidthBinary(), pni.getServiceIdFixedWidthBinary(), redemptionTime));
return new AuthCredentialWithPniResponse_1.default(Native.ServerSecretParams_IssueAuthCredentialWithPniZkcDeterministic(this.serverSecretParams, random, aci.getServiceIdFixedWidthBinary(), pni.getServiceIdFixedWidthBinary(), redemptionTime));
}
verifyAuthCredentialPresentation(groupPublicParams, authCredentialPresentation, now = new Date()) {
Native.ServerSecretParams_VerifyAuthCredentialPresentation(this.serverSecretParams.getContents(), groupPublicParams.getContents(), authCredentialPresentation.getContents(), Math.floor(now.getTime() / 1000));
Native.ServerSecretParams_VerifyAuthCredentialPresentation(this.serverSecretParams, groupPublicParams.getContents(), authCredentialPresentation.getContents(), Math.floor(now.getTime() / 1000));
}

@@ -41,0 +34,0 @@ }

@@ -5,2 +5,3 @@ /// <reference types="node" />

import BackupAuthCredentialPresentation from './BackupAuthCredentialPresentation';
import BackupLevel from './BackupLevel';
export default class BackupAuthCredential extends ByteArray {

@@ -12,2 +13,3 @@ private readonly __type?;

getBackupId(): Buffer;
getBackupLevel(): BackupLevel;
}

@@ -12,2 +12,3 @@ "use strict";

const BackupAuthCredentialPresentation_1 = require("./BackupAuthCredentialPresentation");
const BackupLevel_1 = require("./BackupLevel");
class BackupAuthCredential extends ByteArray_1.default {

@@ -27,4 +28,11 @@ constructor(contents) {

}
getBackupLevel() {
const n = Native.BackupAuthCredential_GetBackupLevel(this.contents);
if (!(n in BackupLevel_1.default)) {
throw new TypeError(`Invalid BackupLevel ${n}`);
}
return n;
}
}
exports.default = BackupAuthCredential;
//# sourceMappingURL=BackupAuthCredential.js.map

@@ -5,7 +5,8 @@ /// <reference types="node" />

import BackupAuthCredentialResponse from './BackupAuthCredentialResponse';
import BackupLevel from './BackupLevel';
export default class BackupAuthCredentialRequest extends ByteArray {
private readonly __type?;
constructor(contents: Buffer);
issueCredential(timestamp: number, receiptLevel: bigint, params: GenericServerSecretParams): BackupAuthCredentialResponse;
issueCredentialWithRandom(timestamp: number, receiptLevel: bigint, params: GenericServerSecretParams, random: Buffer): BackupAuthCredentialResponse;
issueCredential(timestamp: number, backupLevel: BackupLevel, params: GenericServerSecretParams): BackupAuthCredentialResponse;
issueCredentialWithRandom(timestamp: number, backupLevel: BackupLevel, params: GenericServerSecretParams, random: Buffer): BackupAuthCredentialResponse;
}

@@ -16,8 +16,8 @@ "use strict";

}
issueCredential(timestamp, receiptLevel, params) {
issueCredential(timestamp, backupLevel, params) {
const random = (0, crypto_1.randomBytes)(Constants_1.RANDOM_LENGTH);
return this.issueCredentialWithRandom(timestamp, receiptLevel, params, random);
return this.issueCredentialWithRandom(timestamp, backupLevel, params, random);
}
issueCredentialWithRandom(timestamp, receiptLevel, params, random) {
return new BackupAuthCredentialResponse_1.default(Native.BackupAuthCredentialRequest_IssueDeterministic(this.contents, timestamp, receiptLevel, params.contents, random));
issueCredentialWithRandom(timestamp, backupLevel, params, random) {
return new BackupAuthCredentialResponse_1.default(Native.BackupAuthCredentialRequest_IssueDeterministic(this.contents, timestamp, backupLevel, params.contents, random));
}

@@ -24,0 +24,0 @@ }

@@ -13,3 +13,3 @@ /// <reference types="node" />

getRequest(): BackupAuthCredentialRequest;
receive(response: BackupAuthCredentialResponse, params: GenericServerPublicParams, expectedReceiptLevel: bigint): BackupAuthCredential;
receive(response: BackupAuthCredentialResponse, redemptionTime: number, params: GenericServerPublicParams): BackupAuthCredential;
}

@@ -22,4 +22,4 @@ "use strict";

}
receive(response, params, expectedReceiptLevel) {
return new BackupAuthCredential_1.default(Native.BackupAuthCredentialRequestContext_ReceiveResponse(this.contents, response.contents, params.contents, expectedReceiptLevel));
receive(response, redemptionTime, params) {
return new BackupAuthCredential_1.default(Native.BackupAuthCredentialRequestContext_ReceiveResponse(this.contents, response.contents, redemptionTime, params.contents));
}

@@ -26,0 +26,0 @@ }

@@ -30,3 +30,3 @@ "use strict";

static forExpiration(expiration, params) {
return new GroupSendDerivedKeyPair(Native.GroupSendDerivedKeyPair_ForExpiration(Math.floor(expiration.getTime() / 1000), params.contents));
return new GroupSendDerivedKeyPair(Native.GroupSendDerivedKeyPair_ForExpiration(Math.floor(expiration.getTime() / 1000), params));
}

@@ -33,0 +33,0 @@ }

@@ -63,3 +63,3 @@ "use strict";

receiveWithServiceIds(groupMembers, localUser, groupParams, serverParams, now = new Date()) {
const endorsementContents = Native.GroupSendEndorsementsResponse_ReceiveAndCombineWithServiceIds(this.contents, Address_1.ServiceId.toConcatenatedFixedWidthBinary(groupMembers), localUser.getServiceIdFixedWidthBinary(), Math.floor(now.getTime() / 1000), groupParams.contents, serverParams.contents);
const endorsementContents = Native.GroupSendEndorsementsResponse_ReceiveAndCombineWithServiceIds(this.contents, Address_1.ServiceId.toConcatenatedFixedWidthBinary(groupMembers), localUser.getServiceIdFixedWidthBinary(), Math.floor(now.getTime() / 1000), groupParams.contents, serverParams);
const endorsements = endorsementContents.map((next) => {

@@ -89,3 +89,3 @@ // Normally we don't notice the cost of validating just-created zkgroup objects,

receiveWithCiphertexts(groupMembers, localUser, serverParams, now = new Date()) {
const endorsementContents = Native.GroupSendEndorsementsResponse_ReceiveAndCombineWithCiphertexts(this.contents, UuidCiphertext_1.default.serializeAndConcatenate(groupMembers), localUser.contents, Math.floor(now.getTime() / 1000), serverParams.contents);
const endorsementContents = Native.GroupSendEndorsementsResponse_ReceiveAndCombineWithCiphertexts(this.contents, UuidCiphertext_1.default.serializeAndConcatenate(groupMembers), localUser.contents, Math.floor(now.getTime() / 1000), serverParams);
const endorsements = endorsementContents.map((next) => {

@@ -92,0 +92,0 @@ // Normally we don't notice the cost of validating just-created zkgroup objects,

@@ -51,2 +51,3 @@ export { default as ServerPublicParams } from './ServerPublicParams';

export { default as BackupAuthCredentialResponse } from './backups/BackupAuthCredentialResponse';
export { default as BackupLevel } from './backups/BackupLevel';
export { default as GroupSendDerivedKeyPair } from './groupsend/GroupSendDerivedKeyPair';

@@ -53,0 +54,0 @@ export { default as GroupSendEndorsement } from './groupsend/GroupSendEndorsement';

@@ -8,3 +8,3 @@ "use strict";

exports.BackupAuthCredentialResponse = exports.BackupAuthCredentialRequestContext = exports.BackupAuthCredentialRequest = exports.BackupAuthCredentialPresentation = exports.BackupAuthCredential = exports.CreateCallLinkCredentialResponse = exports.CreateCallLinkCredentialRequestContext = exports.CreateCallLinkCredentialRequest = exports.CreateCallLinkCredentialPresentation = exports.CreateCallLinkCredential = exports.CallLinkAuthCredentialResponse = exports.CallLinkAuthCredentialPresentation = exports.CallLinkAuthCredential = exports.CallLinkSecretParams = exports.CallLinkPublicParams = exports.ReceiptSerial = exports.ReceiptCredentialResponse = exports.ReceiptCredentialRequestContext = exports.ReceiptCredentialRequest = exports.ReceiptCredentialPresentation = exports.ReceiptCredential = exports.ServerZkReceiptOperations = exports.ClientZkReceiptOperations = exports.ExpiringProfileKeyCredentialResponse = exports.ExpiringProfileKeyCredential = exports.ProfileKeyVersion = exports.ProfileKeyCredentialRequestContext = exports.ProfileKeyCredentialRequest = exports.ProfileKeyCredentialPresentation = exports.ProfileKeyCommitment = exports.ProfileKey = exports.ServerZkProfileOperations = exports.ClientZkProfileOperations = exports.UuidCiphertext = exports.ProfileKeyCiphertext = exports.GroupSecretParams = exports.GroupPublicParams = exports.GroupMasterKey = exports.GroupIdentifier = exports.ClientZkGroupCipher = exports.AuthCredentialWithPniResponse = exports.AuthCredentialWithPni = exports.AuthCredentialPresentation = exports.ServerZkAuthOperations = exports.ClientZkAuthOperations = exports.NotarySignature = exports.GenericServerSecretParams = exports.GenericServerPublicParams = exports.ServerSecretParams = exports.ServerPublicParams = void 0;
exports.GroupSendToken = exports.GroupSendFullToken = exports.GroupSendEndorsementsResponse = exports.GroupSendEndorsement = exports.GroupSendDerivedKeyPair = void 0;
exports.GroupSendToken = exports.GroupSendFullToken = exports.GroupSendEndorsementsResponse = exports.GroupSendEndorsement = exports.GroupSendDerivedKeyPair = exports.BackupLevel = void 0;
// Root

@@ -117,2 +117,4 @@ var ServerPublicParams_1 = require("./ServerPublicParams");

Object.defineProperty(exports, "BackupAuthCredentialResponse", { enumerable: true, get: function () { return BackupAuthCredentialResponse_1.default; } });
var BackupLevel_1 = require("./backups/BackupLevel");
Object.defineProperty(exports, "BackupLevel", { enumerable: true, get: function () { return BackupLevel_1.default; } });
// Group Send

@@ -119,0 +121,0 @@ var GroupSendDerivedKeyPair_1 = require("./groupsend/GroupSendDerivedKeyPair");

@@ -22,6 +22,6 @@ "use strict";

createProfileKeyCredentialRequestContextWithRandom(random, userId, profileKey) {
return new ProfileKeyCredentialRequestContext_1.default(Native.ServerPublicParams_CreateProfileKeyCredentialRequestContextDeterministic(this.serverPublicParams.getContents(), random, userId.getServiceIdFixedWidthBinary(), profileKey.getContents()));
return new ProfileKeyCredentialRequestContext_1.default(Native.ServerPublicParams_CreateProfileKeyCredentialRequestContextDeterministic(this.serverPublicParams, random, userId.getServiceIdFixedWidthBinary(), profileKey.getContents()));
}
receiveExpiringProfileKeyCredential(profileKeyCredentialRequestContext, profileKeyCredentialResponse, now = new Date()) {
return new ExpiringProfileKeyCredential_1.default(Native.ServerPublicParams_ReceiveExpiringProfileKeyCredential(this.serverPublicParams.getContents(), profileKeyCredentialRequestContext.getContents(), profileKeyCredentialResponse.getContents(), Math.floor(now.getTime() / 1000)));
return new ExpiringProfileKeyCredential_1.default(Native.ServerPublicParams_ReceiveExpiringProfileKeyCredential(this.serverPublicParams, profileKeyCredentialRequestContext.getContents(), profileKeyCredentialResponse.getContents(), Math.floor(now.getTime() / 1000)));
}

@@ -33,3 +33,3 @@ createExpiringProfileKeyCredentialPresentation(groupSecretParams, profileKeyCredential) {

createExpiringProfileKeyCredentialPresentationWithRandom(random, groupSecretParams, profileKeyCredential) {
return new ProfileKeyCredentialPresentation_1.default(Native.ServerPublicParams_CreateExpiringProfileKeyCredentialPresentationDeterministic(this.serverPublicParams.getContents(), random, groupSecretParams.getContents(), profileKeyCredential.getContents()));
return new ProfileKeyCredentialPresentation_1.default(Native.ServerPublicParams_CreateExpiringProfileKeyCredentialPresentationDeterministic(this.serverPublicParams, random, groupSecretParams.getContents(), profileKeyCredential.getContents()));
}

@@ -36,0 +36,0 @@ }

@@ -20,6 +20,6 @@ "use strict";

issueExpiringProfileKeyCredentialWithRandom(random, profileKeyCredentialRequest, userId, profileKeyCommitment, expirationInSeconds) {
return new ExpiringProfileKeyCredentialResponse_1.default(Native.ServerSecretParams_IssueExpiringProfileKeyCredentialDeterministic(this.serverSecretParams.getContents(), random, profileKeyCredentialRequest.getContents(), userId.getServiceIdFixedWidthBinary(), profileKeyCommitment.getContents(), expirationInSeconds));
return new ExpiringProfileKeyCredentialResponse_1.default(Native.ServerSecretParams_IssueExpiringProfileKeyCredentialDeterministic(this.serverSecretParams, random, profileKeyCredentialRequest.getContents(), userId.getServiceIdFixedWidthBinary(), profileKeyCommitment.getContents(), expirationInSeconds));
}
verifyProfileKeyCredentialPresentation(groupPublicParams, profileKeyCredentialPresentation, now = new Date()) {
Native.ServerSecretParams_VerifyProfileKeyCredentialPresentation(this.serverSecretParams.getContents(), groupPublicParams.getContents(), profileKeyCredentialPresentation.getContents(), Math.floor(now.getTime() / 1000));
Native.ServerSecretParams_VerifyProfileKeyCredentialPresentation(this.serverSecretParams, groupPublicParams.getContents(), profileKeyCredentialPresentation.getContents(), Math.floor(now.getTime() / 1000));
}

@@ -26,0 +26,0 @@ }

@@ -22,6 +22,6 @@ "use strict";

createReceiptCredentialRequestContextWithRandom(random, receiptSerial) {
return new ReceiptCredentialRequestContext_1.default(Native.ServerPublicParams_CreateReceiptCredentialRequestContextDeterministic(this.serverPublicParams.getContents(), random, receiptSerial.getContents()));
return new ReceiptCredentialRequestContext_1.default(Native.ServerPublicParams_CreateReceiptCredentialRequestContextDeterministic(this.serverPublicParams, random, receiptSerial.getContents()));
}
receiveReceiptCredential(receiptCredentialRequestContext, receiptCredentialResponse) {
return new ReceiptCredential_1.default(Native.ServerPublicParams_ReceiveReceiptCredential(this.serverPublicParams.getContents(), receiptCredentialRequestContext.getContents(), receiptCredentialResponse.getContents()));
return new ReceiptCredential_1.default(Native.ServerPublicParams_ReceiveReceiptCredential(this.serverPublicParams, receiptCredentialRequestContext.getContents(), receiptCredentialResponse.getContents()));
}

@@ -33,3 +33,3 @@ createReceiptCredentialPresentation(receiptCredential) {

createReceiptCredentialPresentationWithRandom(random, receiptCredential) {
return new ReceiptCredentialPresentation_1.default(Native.ServerPublicParams_CreateReceiptCredentialPresentationDeterministic(this.serverPublicParams.getContents(), random, receiptCredential.getContents()));
return new ReceiptCredentialPresentation_1.default(Native.ServerPublicParams_CreateReceiptCredentialPresentationDeterministic(this.serverPublicParams, random, receiptCredential.getContents()));
}

@@ -36,0 +36,0 @@ }

@@ -20,6 +20,6 @@ "use strict";

issueReceiptCredentialWithRandom(random, receiptCredentialRequest, receiptExpirationTime, receiptLevel) {
return new ReceiptCredentialResponse_1.default(Native.ServerSecretParams_IssueReceiptCredentialDeterministic(this.serverSecretParams.getContents(), random, receiptCredentialRequest.getContents(), receiptExpirationTime, receiptLevel));
return new ReceiptCredentialResponse_1.default(Native.ServerSecretParams_IssueReceiptCredentialDeterministic(this.serverSecretParams, random, receiptCredentialRequest.getContents(), receiptExpirationTime, receiptLevel));
}
verifyReceiptCredentialPresentation(receiptCredentialPresentation) {
Native.ServerSecretParams_VerifyReceiptCredentialPresentation(this.serverSecretParams.getContents(), receiptCredentialPresentation.getContents());
Native.ServerSecretParams_VerifyReceiptCredentialPresentation(this.serverSecretParams, receiptCredentialPresentation.getContents());
}

@@ -26,0 +26,0 @@ }

/// <reference types="node" />
import ByteArray from './internal/ByteArray';
import * as Native from '../../Native';
import NotarySignature from './NotarySignature';
export default class ServerPublicParams extends ByteArray {
private readonly __type?;
constructor(contents: Buffer);
export default class ServerPublicParams {
readonly _nativeHandle: Native.ServerPublicParams;
constructor(contents: Buffer | Native.ServerPublicParams);
verifySignature(message: Buffer, notarySignature: NotarySignature): void;
serialize(): Buffer;
}

@@ -7,13 +7,20 @@ "use strict";

Object.defineProperty(exports, "__esModule", { value: true });
const ByteArray_1 = require("./internal/ByteArray");
const Native = require("../../Native");
class ServerPublicParams extends ByteArray_1.default {
class ServerPublicParams {
constructor(contents) {
super(contents, Native.ServerPublicParams_CheckValidContents);
if (contents instanceof Buffer) {
this._nativeHandle = Native.ServerPublicParams_Deserialize(contents);
}
else {
this._nativeHandle = contents;
}
}
verifySignature(message, notarySignature) {
Native.ServerPublicParams_VerifySignature(this.contents, message, notarySignature.getContents());
Native.ServerPublicParams_VerifySignature(this, message, notarySignature.getContents());
}
serialize() {
return Native.ServerPublicParams_Serialize(this);
}
}
exports.default = ServerPublicParams;
//# sourceMappingURL=ServerPublicParams.js.map
/// <reference types="node" />
import ByteArray from './internal/ByteArray';
import * as Native from '../../Native';
import ServerPublicParams from './ServerPublicParams';
import NotarySignature from './NotarySignature';
export default class ServerSecretParams extends ByteArray {
private readonly __type?;
export default class ServerSecretParams {
static generate(): ServerSecretParams;
static generateWithRandom(random: Buffer): ServerSecretParams;
constructor(contents: Buffer);
readonly _nativeHandle: Native.ServerSecretParams;
constructor(contents: Buffer | Native.ServerSecretParams);
getPublicParams(): ServerPublicParams;
sign(message: Buffer): NotarySignature;
signWithRandom(random: Buffer, message: Buffer): NotarySignature;
serialize(): Buffer;
}

@@ -9,7 +9,6 @@ "use strict";

const Native = require("../../Native");
const ByteArray_1 = require("./internal/ByteArray");
const Constants_1 = require("./internal/Constants");
const ServerPublicParams_1 = require("./ServerPublicParams");
const NotarySignature_1 = require("./NotarySignature");
class ServerSecretParams extends ByteArray_1.default {
class ServerSecretParams {
static generate() {

@@ -23,6 +22,11 @@ const random = (0, crypto_1.randomBytes)(Constants_1.RANDOM_LENGTH);

constructor(contents) {
super(contents, Native.ServerSecretParams_CheckValidContents);
if (contents instanceof Buffer) {
this._nativeHandle = Native.ServerSecretParams_Deserialize(contents);
}
else {
this._nativeHandle = contents;
}
}
getPublicParams() {
return new ServerPublicParams_1.default(Native.ServerSecretParams_GetPublicParams(this.contents));
return new ServerPublicParams_1.default(Native.ServerSecretParams_GetPublicParams(this));
}

@@ -34,6 +38,9 @@ sign(message) {

signWithRandom(random, message) {
return new NotarySignature_1.default(Native.ServerSecretParams_SignDeterministic(this.contents, random, message));
return new NotarySignature_1.default(Native.ServerSecretParams_SignDeterministic(this, random, message));
}
serialize() {
return Native.ServerSecretParams_Serialize(this);
}
}
exports.default = ServerSecretParams;
//# sourceMappingURL=ServerSecretParams.js.map

@@ -32,3 +32,2 @@ //

interface ChatServiceDebugInfo {
connectionReused: boolean;
reconnectCount: number;

@@ -148,8 +147,9 @@ ipType: number;

export function BackupAuthCredentialRequestContext_New(backupKey: Buffer, uuid: Uuid): Buffer;
export function BackupAuthCredentialRequestContext_ReceiveResponse(contextBytes: Buffer, responseBytes: Buffer, paramsBytes: Buffer, expectedReceiptLevel: bigint): Buffer;
export function BackupAuthCredentialRequestContext_ReceiveResponse(contextBytes: Buffer, responseBytes: Buffer, expectedRedemptionTime: Timestamp, paramsBytes: Buffer): Buffer;
export function BackupAuthCredentialRequest_CheckValidContents(requestBytes: Buffer): void;
export function BackupAuthCredentialRequest_IssueDeterministic(requestBytes: Buffer, redemptionTime: Timestamp, receiptLevel: bigint, paramsBytes: Buffer, randomness: Buffer): Buffer;
export function BackupAuthCredentialRequest_IssueDeterministic(requestBytes: Buffer, redemptionTime: Timestamp, backupLevel: number, paramsBytes: Buffer, randomness: Buffer): Buffer;
export function BackupAuthCredentialResponse_CheckValidContents(responseBytes: Buffer): void;
export function BackupAuthCredential_CheckValidContents(paramsBytes: Buffer): void;
export function BackupAuthCredential_GetBackupId(credentialBytes: Buffer): Buffer;
export function BackupAuthCredential_GetBackupLevel(credentialBytes: Buffer): number;
export function BackupAuthCredential_PresentDeterministic(credentialBytes: Buffer, serverParamsBytes: Buffer, randomness: Buffer): Buffer;

@@ -184,2 +184,3 @@ export function CallLinkAuthCredentialPresentation_CheckValidContents(presentationBytes: Buffer): void;

export function ConnectionManager_new(environment: number): ConnectionManager;
export function ConnectionManager_set_ipv6_enabled(connectionManager: Wrapper<ConnectionManager>, ipv6Enabled: boolean): void;
export function ConnectionManager_set_proxy(connectionManager: Wrapper<ConnectionManager>, host: string, port: number): void;

@@ -233,3 +234,3 @@ export function CreateCallLinkCredentialPresentation_CheckValidContents(presentationBytes: Buffer): void;

export function GroupSendDerivedKeyPair_CheckValidContents(bytes: Buffer): void;
export function GroupSendDerivedKeyPair_ForExpiration(expiration: Timestamp, serverParams: Serialized<ServerSecretParams>): Buffer;
export function GroupSendDerivedKeyPair_ForExpiration(expiration: Timestamp, serverParams: Wrapper<ServerSecretParams>): Buffer;
export function GroupSendEndorsement_CheckValidContents(bytes: Buffer): void;

@@ -242,4 +243,4 @@ export function GroupSendEndorsement_Combine(endorsements: Buffer[]): Buffer;

export function GroupSendEndorsementsResponse_IssueDeterministic(concatenatedGroupMemberCiphertexts: Buffer, keyPair: Buffer, randomness: Buffer): Buffer;
export function GroupSendEndorsementsResponse_ReceiveAndCombineWithCiphertexts(responseBytes: Buffer, concatenatedGroupMemberCiphertexts: Buffer, localUserCiphertext: Buffer, now: Timestamp, serverParams: Serialized<ServerPublicParams>): Buffer[];
export function GroupSendEndorsementsResponse_ReceiveAndCombineWithServiceIds(responseBytes: Buffer, groupMembers: Buffer, localUser: Buffer, now: Timestamp, groupParams: Serialized<GroupSecretParams>, serverParams: Serialized<ServerPublicParams>): Buffer[];
export function GroupSendEndorsementsResponse_ReceiveAndCombineWithCiphertexts(responseBytes: Buffer, concatenatedGroupMemberCiphertexts: Buffer, localUserCiphertext: Buffer, now: Timestamp, serverParams: Wrapper<ServerPublicParams>): Buffer[];
export function GroupSendEndorsementsResponse_ReceiveAndCombineWithServiceIds(responseBytes: Buffer, groupMembers: Buffer, localUser: Buffer, now: Timestamp, groupParams: Serialized<GroupSecretParams>, serverParams: Wrapper<ServerPublicParams>): Buffer[];
export function GroupSendFullToken_CheckValidContents(bytes: Buffer): void;

@@ -412,25 +413,25 @@ export function GroupSendFullToken_GetExpiration(token: Buffer): Timestamp;

export function ServerCertificate_New(keyId: number, serverKey: Wrapper<PublicKey>, trustRoot: Wrapper<PrivateKey>): ServerCertificate;
export function ServerPublicParams_CheckValidContents(buffer: Buffer): void;
export function ServerPublicParams_CreateAuthCredentialWithPniPresentationDeterministic(serverPublicParams: Serialized<ServerPublicParams>, randomness: Buffer, groupSecretParams: Serialized<GroupSecretParams>, authCredentialWithPniBytes: Buffer): Buffer;
export function ServerPublicParams_CreateExpiringProfileKeyCredentialPresentationDeterministic(serverPublicParams: Serialized<ServerPublicParams>, randomness: Buffer, groupSecretParams: Serialized<GroupSecretParams>, profileKeyCredential: Serialized<ExpiringProfileKeyCredential>): Buffer;
export function ServerPublicParams_CreateProfileKeyCredentialRequestContextDeterministic(serverPublicParams: Serialized<ServerPublicParams>, randomness: Buffer, userId: Buffer, profileKey: Serialized<ProfileKey>): Serialized<ProfileKeyCredentialRequestContext>;
export function ServerPublicParams_CreateReceiptCredentialPresentationDeterministic(serverPublicParams: Serialized<ServerPublicParams>, randomness: Buffer, receiptCredential: Serialized<ReceiptCredential>): Serialized<ReceiptCredentialPresentation>;
export function ServerPublicParams_CreateReceiptCredentialRequestContextDeterministic(serverPublicParams: Serialized<ServerPublicParams>, randomness: Buffer, receiptSerial: Buffer): Serialized<ReceiptCredentialRequestContext>;
export function ServerPublicParams_ReceiveAuthCredentialWithPniAsAci(params: Serialized<ServerPublicParams>, aci: Buffer, pni: Buffer, redemptionTime: Timestamp, authCredentialWithPniResponseBytes: Buffer): Buffer;
export function ServerPublicParams_ReceiveAuthCredentialWithPniAsServiceId(params: Serialized<ServerPublicParams>, aci: Buffer, pni: Buffer, redemptionTime: Timestamp, authCredentialWithPniResponseBytes: Buffer): Buffer;
export function ServerPublicParams_ReceiveExpiringProfileKeyCredential(serverPublicParams: Serialized<ServerPublicParams>, requestContext: Serialized<ProfileKeyCredentialRequestContext>, response: Serialized<ExpiringProfileKeyCredentialResponse>, currentTimeInSeconds: Timestamp): Serialized<ExpiringProfileKeyCredential>;
export function ServerPublicParams_ReceiveReceiptCredential(serverPublicParams: Serialized<ServerPublicParams>, requestContext: Serialized<ReceiptCredentialRequestContext>, response: Serialized<ReceiptCredentialResponse>): Serialized<ReceiptCredential>;
export function ServerPublicParams_VerifySignature(serverPublicParams: Serialized<ServerPublicParams>, message: Buffer, notarySignature: Buffer): void;
export function ServerSecretParams_CheckValidContents(buffer: Buffer): void;
export function ServerSecretParams_GenerateDeterministic(randomness: Buffer): Serialized<ServerSecretParams>;
export function ServerSecretParams_GetPublicParams(params: Serialized<ServerSecretParams>): Serialized<ServerPublicParams>;
export function ServerSecretParams_IssueAuthCredentialWithPniAsAciDeterministic(serverSecretParams: Serialized<ServerSecretParams>, randomness: Buffer, aci: Buffer, pni: Buffer, redemptionTime: Timestamp): Buffer;
export function ServerSecretParams_IssueAuthCredentialWithPniAsServiceIdDeterministic(serverSecretParams: Serialized<ServerSecretParams>, randomness: Buffer, aci: Buffer, pni: Buffer, redemptionTime: Timestamp): Buffer;
export function ServerSecretParams_IssueAuthCredentialWithPniZkcDeterministic(serverSecretParams: Serialized<ServerSecretParams>, randomness: Buffer, aci: Buffer, pni: Buffer, redemptionTime: Timestamp): Buffer;
export function ServerSecretParams_IssueExpiringProfileKeyCredentialDeterministic(serverSecretParams: Serialized<ServerSecretParams>, randomness: Buffer, request: Serialized<ProfileKeyCredentialRequest>, userId: Buffer, commitment: Serialized<ProfileKeyCommitment>, expirationInSeconds: Timestamp): Serialized<ExpiringProfileKeyCredentialResponse>;
export function ServerSecretParams_IssueReceiptCredentialDeterministic(serverSecretParams: Serialized<ServerSecretParams>, randomness: Buffer, request: Serialized<ReceiptCredentialRequest>, receiptExpirationTime: Timestamp, receiptLevel: bigint): Serialized<ReceiptCredentialResponse>;
export function ServerSecretParams_SignDeterministic(params: Serialized<ServerSecretParams>, randomness: Buffer, message: Buffer): Buffer;
export function ServerSecretParams_VerifyAuthCredentialPresentation(serverSecretParams: Serialized<ServerSecretParams>, groupPublicParams: Serialized<GroupPublicParams>, presentationBytes: Buffer, currentTimeInSeconds: Timestamp): void;
export function ServerSecretParams_VerifyProfileKeyCredentialPresentation(serverSecretParams: Serialized<ServerSecretParams>, groupPublicParams: Serialized<GroupPublicParams>, presentationBytes: Buffer, currentTimeInSeconds: Timestamp): void;
export function ServerSecretParams_VerifyReceiptCredentialPresentation(serverSecretParams: Serialized<ServerSecretParams>, presentation: Serialized<ReceiptCredentialPresentation>): void;
export function ServerPublicParams_CreateAuthCredentialWithPniPresentationDeterministic(serverPublicParams: Wrapper<ServerPublicParams>, randomness: Buffer, groupSecretParams: Serialized<GroupSecretParams>, authCredentialWithPniBytes: Buffer): Buffer;
export function ServerPublicParams_CreateExpiringProfileKeyCredentialPresentationDeterministic(serverPublicParams: Wrapper<ServerPublicParams>, randomness: Buffer, groupSecretParams: Serialized<GroupSecretParams>, profileKeyCredential: Serialized<ExpiringProfileKeyCredential>): Buffer;
export function ServerPublicParams_CreateProfileKeyCredentialRequestContextDeterministic(serverPublicParams: Wrapper<ServerPublicParams>, randomness: Buffer, userId: Buffer, profileKey: Serialized<ProfileKey>): Serialized<ProfileKeyCredentialRequestContext>;
export function ServerPublicParams_CreateReceiptCredentialPresentationDeterministic(serverPublicParams: Wrapper<ServerPublicParams>, randomness: Buffer, receiptCredential: Serialized<ReceiptCredential>): Serialized<ReceiptCredentialPresentation>;
export function ServerPublicParams_CreateReceiptCredentialRequestContextDeterministic(serverPublicParams: Wrapper<ServerPublicParams>, randomness: Buffer, receiptSerial: Buffer): Serialized<ReceiptCredentialRequestContext>;
export function ServerPublicParams_Deserialize(buffer: Buffer): ServerPublicParams;
export function ServerPublicParams_ReceiveAuthCredentialWithPniAsServiceId(params: Wrapper<ServerPublicParams>, aci: Buffer, pni: Buffer, redemptionTime: Timestamp, authCredentialWithPniResponseBytes: Buffer): Buffer;
export function ServerPublicParams_ReceiveExpiringProfileKeyCredential(serverPublicParams: Wrapper<ServerPublicParams>, requestContext: Serialized<ProfileKeyCredentialRequestContext>, response: Serialized<ExpiringProfileKeyCredentialResponse>, currentTimeInSeconds: Timestamp): Serialized<ExpiringProfileKeyCredential>;
export function ServerPublicParams_ReceiveReceiptCredential(serverPublicParams: Wrapper<ServerPublicParams>, requestContext: Serialized<ReceiptCredentialRequestContext>, response: Serialized<ReceiptCredentialResponse>): Serialized<ReceiptCredential>;
export function ServerPublicParams_Serialize(handle: Wrapper<ServerPublicParams>): Buffer;
export function ServerPublicParams_VerifySignature(serverPublicParams: Wrapper<ServerPublicParams>, message: Buffer, notarySignature: Buffer): void;
export function ServerSecretParams_Deserialize(buffer: Buffer): ServerSecretParams;
export function ServerSecretParams_GenerateDeterministic(randomness: Buffer): ServerSecretParams;
export function ServerSecretParams_GetPublicParams(params: Wrapper<ServerSecretParams>): ServerPublicParams;
export function ServerSecretParams_IssueAuthCredentialWithPniAsServiceIdDeterministic(serverSecretParams: Wrapper<ServerSecretParams>, randomness: Buffer, aci: Buffer, pni: Buffer, redemptionTime: Timestamp): Buffer;
export function ServerSecretParams_IssueAuthCredentialWithPniZkcDeterministic(serverSecretParams: Wrapper<ServerSecretParams>, randomness: Buffer, aci: Buffer, pni: Buffer, redemptionTime: Timestamp): Buffer;
export function ServerSecretParams_IssueExpiringProfileKeyCredentialDeterministic(serverSecretParams: Wrapper<ServerSecretParams>, randomness: Buffer, request: Serialized<ProfileKeyCredentialRequest>, userId: Buffer, commitment: Serialized<ProfileKeyCommitment>, expirationInSeconds: Timestamp): Serialized<ExpiringProfileKeyCredentialResponse>;
export function ServerSecretParams_IssueReceiptCredentialDeterministic(serverSecretParams: Wrapper<ServerSecretParams>, randomness: Buffer, request: Serialized<ReceiptCredentialRequest>, receiptExpirationTime: Timestamp, receiptLevel: bigint): Serialized<ReceiptCredentialResponse>;
export function ServerSecretParams_Serialize(handle: Wrapper<ServerSecretParams>): Buffer;
export function ServerSecretParams_SignDeterministic(params: Wrapper<ServerSecretParams>, randomness: Buffer, message: Buffer): Buffer;
export function ServerSecretParams_VerifyAuthCredentialPresentation(serverSecretParams: Wrapper<ServerSecretParams>, groupPublicParams: Serialized<GroupPublicParams>, presentationBytes: Buffer, currentTimeInSeconds: Timestamp): void;
export function ServerSecretParams_VerifyProfileKeyCredentialPresentation(serverSecretParams: Wrapper<ServerSecretParams>, groupPublicParams: Serialized<GroupPublicParams>, presentationBytes: Buffer, currentTimeInSeconds: Timestamp): void;
export function ServerSecretParams_VerifyReceiptCredentialPresentation(serverSecretParams: Wrapper<ServerSecretParams>, presentation: Serialized<ReceiptCredentialPresentation>): void;
export function ServiceId_ParseFromServiceIdBinary(input: Buffer): Buffer;

@@ -437,0 +438,0 @@ export function ServiceId_ParseFromServiceIdString(input: string): Buffer;

{
"name": "@signalapp/libsignal-client",
"version": "0.44.0",
"version": "0.45.0",
"license": "AGPL-3.0-only",

@@ -5,0 +5,0 @@ "main": "dist/index.js",

Sorry, the diff of this file is too big to display

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

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc