@signalapp/libsignal-client 0.32.1 → 0.34.0
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 +57 -1
- package/dist/Errors.d.ts +6 -1
- package/dist/Errors.js +1 -0
- package/dist/WebpSanitizer.d.ts +11 -0
- package/dist/WebpSanitizer.js +31 -0
- package/dist/index.d.ts +2 -0
- package/dist/index.js +4 -2
- package/dist/net.d.ts +29 -0
- package/dist/net.js +45 -0
- package/dist/usernames.d.ts +1 -1
- package/dist/usernames.js +2 -2
- package/dist/zkgroup/backups/BackupAuthCredential.d.ts +11 -0
- package/dist/zkgroup/backups/BackupAuthCredential.js +28 -0
- package/dist/zkgroup/backups/BackupAuthCredentialPresentation.d.ts +8 -0
- package/dist/zkgroup/backups/BackupAuthCredentialPresentation.js +18 -0
- package/dist/zkgroup/backups/BackupAuthCredentialRequest.d.ts +10 -0
- package/dist/zkgroup/backups/BackupAuthCredentialRequest.js +26 -0
- package/dist/zkgroup/backups/BackupAuthCredentialRequestContext.d.ts +14 -0
- package/dist/zkgroup/backups/BackupAuthCredentialRequestContext.js +28 -0
- package/dist/zkgroup/backups/BackupAuthCredentialResponse.d.ts +6 -0
- package/dist/zkgroup/backups/BackupAuthCredentialResponse.js +15 -0
- package/dist/zkgroup/index.d.ts +5 -0
- package/dist/zkgroup/index.js +13 -1
- package/package.json +4 -3
- 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
|
@@ -11,6 +11,13 @@ type Uuid = Buffer;
|
|
|
11
11
|
/// what's important is that it's an integer less than Number.MAX_SAFE_INTEGER.
|
|
12
12
|
type Timestamp = number;
|
|
13
13
|
|
|
14
|
+
type LookupResponse = Map<string, LookupResponseEntry>;
|
|
15
|
+
|
|
16
|
+
interface LookupResponseEntry {
|
|
17
|
+
readonly aci: string | undefined;
|
|
18
|
+
readonly pni: string | undefined;
|
|
19
|
+
}
|
|
20
|
+
|
|
14
21
|
export abstract class IdentityKeyStore {
|
|
15
22
|
_getIdentityKey(): Promise<PrivateKey>;
|
|
16
23
|
_getLocalRegistrationId(): Promise<number>;
|
|
@@ -51,6 +58,9 @@ export abstract class InputStream {
|
|
|
51
58
|
_skip(amount: number): Promise<void>;
|
|
52
59
|
}
|
|
53
60
|
|
|
61
|
+
export abstract class SyncInputStream extends Buffer {
|
|
62
|
+
}
|
|
63
|
+
|
|
54
64
|
interface Wrapper<T> {
|
|
55
65
|
readonly _nativeHandle: T
|
|
56
66
|
}
|
|
@@ -72,6 +82,18 @@ export function AuthCredentialResponse_CheckValidContents(buffer: Buffer): void;
|
|
|
72
82
|
export function AuthCredentialWithPniResponse_CheckValidContents(buffer: Buffer): void;
|
|
73
83
|
export function AuthCredentialWithPni_CheckValidContents(buffer: Buffer): void;
|
|
74
84
|
export function AuthCredential_CheckValidContents(buffer: Buffer): void;
|
|
85
|
+
export function BackupAuthCredentialPresentation_CheckValidContents(presentationBytes: Buffer): void;
|
|
86
|
+
export function BackupAuthCredentialPresentation_Verify(presentationBytes: Buffer, now: Timestamp, serverParamsBytes: Buffer): void;
|
|
87
|
+
export function BackupAuthCredentialRequestContext_CheckValidContents(contextBytes: Buffer): void;
|
|
88
|
+
export function BackupAuthCredentialRequestContext_GetRequest(contextBytes: Buffer): Buffer;
|
|
89
|
+
export function BackupAuthCredentialRequestContext_New(backupKey: Buffer, uuid: Uuid): Buffer;
|
|
90
|
+
export function BackupAuthCredentialRequestContext_ReceiveResponse(contextBytes: Buffer, responseBytes: Buffer, paramsBytes: Buffer, expectedReceiptLevel: Buffer): Buffer;
|
|
91
|
+
export function BackupAuthCredentialRequest_CheckValidContents(requestBytes: Buffer): void;
|
|
92
|
+
export function BackupAuthCredentialRequest_IssueDeterministic(requestBytes: Buffer, redemptionTime: Timestamp, receiptLevel: Buffer, paramsBytes: Buffer, randomness: Buffer): Buffer;
|
|
93
|
+
export function BackupAuthCredentialResponse_CheckValidContents(responseBytes: Buffer): void;
|
|
94
|
+
export function BackupAuthCredential_CheckValidContents(paramsBytes: Buffer): void;
|
|
95
|
+
export function BackupAuthCredential_GetBackupId(credentialBytes: Buffer): Buffer;
|
|
96
|
+
export function BackupAuthCredential_PresentDeterministic(credentialBytes: Buffer, serverParamsBytes: Buffer, randomness: Buffer): Buffer;
|
|
75
97
|
export function CallLinkAuthCredentialPresentation_CheckValidContents(presentationBytes: Buffer): void;
|
|
76
98
|
export function CallLinkAuthCredentialPresentation_GetUserId(presentationBytes: Buffer): Serialized<UuidCiphertext>;
|
|
77
99
|
export function CallLinkAuthCredentialPresentation_Verify(presentationBytes: Buffer, now: Timestamp, serverParamsBytes: Buffer, callLinkParamsBytes: Buffer): void;
|
|
@@ -86,9 +108,11 @@ export function CallLinkSecretParams_DecryptUserId(paramsBytes: Buffer, userId:
|
|
|
86
108
|
export function CallLinkSecretParams_DeriveFromRootKey(rootKey: Buffer): Buffer;
|
|
87
109
|
export function CallLinkSecretParams_GetPublicParams(paramsBytes: Buffer): Buffer;
|
|
88
110
|
export function Cds2ClientState_New(mrenclave: Buffer, attestationMsg: Buffer, currentTimestamp: Timestamp): SgxClientState;
|
|
111
|
+
export function CdsiLookup(asyncRuntime: Wrapper<TokioAsyncContext>, connectionManager: Wrapper<ConnectionManager>, username: string, password: string, request: Wrapper<LookupRequest>, timeoutMillis: number): Promise<LookupResponse>;
|
|
89
112
|
export function CiphertextMessage_FromPlaintextContent(m: Wrapper<PlaintextContent>): CiphertextMessage;
|
|
90
113
|
export function CiphertextMessage_Serialize(obj: Wrapper<CiphertextMessage>): Buffer;
|
|
91
114
|
export function CiphertextMessage_Type(msg: Wrapper<CiphertextMessage>): number;
|
|
115
|
+
export function ConnectionManager_new(environment: number): ConnectionManager;
|
|
92
116
|
export function CreateCallLinkCredentialPresentation_CheckValidContents(presentationBytes: Buffer): void;
|
|
93
117
|
export function CreateCallLinkCredentialPresentation_Verify(presentationBytes: Buffer, roomId: Buffer, now: Timestamp, serverParamsBytes: Buffer, callLinkParamsBytes: Buffer): void;
|
|
94
118
|
export function CreateCallLinkCredentialRequestContext_CheckValidContents(contextBytes: Buffer): void;
|
|
@@ -164,6 +188,10 @@ export function KyberPublicKey_Equals(lhs: Wrapper<KyberPublicKey>, rhs: Wrapper
|
|
|
164
188
|
export function KyberPublicKey_Serialize(obj: Wrapper<KyberPublicKey>): Buffer;
|
|
165
189
|
export function KyberSecretKey_Deserialize(data: Buffer): KyberSecretKey;
|
|
166
190
|
export function KyberSecretKey_Serialize(obj: Wrapper<KyberSecretKey>): Buffer;
|
|
191
|
+
export function LookupRequest_addAciAndAccessKey(request: Wrapper<LookupRequest>, aci: Buffer, accessKey: Buffer): void;
|
|
192
|
+
export function LookupRequest_addE164(request: Wrapper<LookupRequest>, e164: string): void;
|
|
193
|
+
export function LookupRequest_new(): LookupRequest;
|
|
194
|
+
export function LookupRequest_setReturnAcisWithoutUaks(request: Wrapper<LookupRequest>, returnAcisWithoutUaks: boolean): void;
|
|
167
195
|
export function Mp4Sanitizer_Sanitize(input: InputStream, len: Buffer): Promise<SanitizedMetadata>;
|
|
168
196
|
export function PlaintextContent_Deserialize(data: Buffer): PlaintextContent;
|
|
169
197
|
export function PlaintextContent_FromDecryptionErrorMessage(m: Wrapper<DecryptionErrorMessage>): PlaintextContent;
|
|
@@ -344,6 +372,29 @@ export function SignedPreKeyRecord_GetSignature(obj: Wrapper<SignedPreKeyRecord>
|
|
|
344
372
|
export function SignedPreKeyRecord_GetTimestamp(obj: Wrapper<SignedPreKeyRecord>): Timestamp;
|
|
345
373
|
export function SignedPreKeyRecord_New(id: number, timestamp: Timestamp, pubKey: Wrapper<PublicKey>, privKey: Wrapper<PrivateKey>, signature: Buffer): SignedPreKeyRecord;
|
|
346
374
|
export function SignedPreKeyRecord_Serialize(obj: Wrapper<SignedPreKeyRecord>): Buffer;
|
|
375
|
+
export function TESTING_CdsiLookupResponseConvert(): LookupResponse;
|
|
376
|
+
export function TESTING_ErrorOnBorrowAsync(_input: null): Promise<void>;
|
|
377
|
+
export function TESTING_ErrorOnBorrowIo(asyncRuntime: Wrapper<NonSuspendingBackgroundThreadRuntime>, _input: null): Promise<void>;
|
|
378
|
+
export function TESTING_ErrorOnBorrowSync(_input: null): void;
|
|
379
|
+
export function TESTING_ErrorOnReturnAsync(_needsCleanup: null): Promise<null>;
|
|
380
|
+
export function TESTING_ErrorOnReturnIo(asyncRuntime: Wrapper<NonSuspendingBackgroundThreadRuntime>, _needsCleanup: null): Promise<null>;
|
|
381
|
+
export function TESTING_ErrorOnReturnSync(_needsCleanup: null): null;
|
|
382
|
+
export function TESTING_FutureFailure(asyncRuntime: Wrapper<NonSuspendingBackgroundThreadRuntime>, _input: number): Promise<number>;
|
|
383
|
+
export function TESTING_FutureSuccess(asyncRuntime: Wrapper<NonSuspendingBackgroundThreadRuntime>, input: number): Promise<number>;
|
|
384
|
+
export function TESTING_NonSuspendingBackgroundThreadRuntime_New(): NonSuspendingBackgroundThreadRuntime;
|
|
385
|
+
export function TESTING_PanicInBodyAsync(_input: null): Promise<void>;
|
|
386
|
+
export function TESTING_PanicInBodyIo(asyncRuntime: Wrapper<NonSuspendingBackgroundThreadRuntime>, _input: null): Promise<void>;
|
|
387
|
+
export function TESTING_PanicInBodySync(_input: null): void;
|
|
388
|
+
export function TESTING_PanicOnBorrowAsync(_input: null): Promise<void>;
|
|
389
|
+
export function TESTING_PanicOnBorrowIo(asyncRuntime: Wrapper<NonSuspendingBackgroundThreadRuntime>, _input: null): Promise<void>;
|
|
390
|
+
export function TESTING_PanicOnBorrowSync(_input: null): void;
|
|
391
|
+
export function TESTING_PanicOnLoadAsync(_needsCleanup: null, _input: null): Promise<void>;
|
|
392
|
+
export function TESTING_PanicOnLoadIo(asyncRuntime: Wrapper<NonSuspendingBackgroundThreadRuntime>, _needsCleanup: null, _input: null): Promise<void>;
|
|
393
|
+
export function TESTING_PanicOnLoadSync(_needsCleanup: null, _input: null): void;
|
|
394
|
+
export function TESTING_PanicOnReturnAsync(_needsCleanup: null): Promise<null>;
|
|
395
|
+
export function TESTING_PanicOnReturnIo(asyncRuntime: Wrapper<NonSuspendingBackgroundThreadRuntime>, _needsCleanup: null): Promise<null>;
|
|
396
|
+
export function TESTING_PanicOnReturnSync(_needsCleanup: null): null;
|
|
397
|
+
export function TokioAsyncContext_new(): TokioAsyncContext;
|
|
347
398
|
export function UnidentifiedSenderMessageContent_Deserialize(data: Buffer): UnidentifiedSenderMessageContent;
|
|
348
399
|
export function UnidentifiedSenderMessageContent_GetContentHint(m: Wrapper<UnidentifiedSenderMessageContent>): number;
|
|
349
400
|
export function UnidentifiedSenderMessageContent_GetContents(obj: Wrapper<UnidentifiedSenderMessageContent>): Buffer;
|
|
@@ -352,7 +403,7 @@ export function UnidentifiedSenderMessageContent_GetMsgType(m: Wrapper<Unidentif
|
|
|
352
403
|
export function UnidentifiedSenderMessageContent_GetSenderCert(m: Wrapper<UnidentifiedSenderMessageContent>): SenderCertificate;
|
|
353
404
|
export function UnidentifiedSenderMessageContent_New(message: Wrapper<CiphertextMessage>, sender: Wrapper<SenderCertificate>, contentHint: number, groupId: Buffer | null): UnidentifiedSenderMessageContent;
|
|
354
405
|
export function UnidentifiedSenderMessageContent_Serialize(obj: Wrapper<UnidentifiedSenderMessageContent>): Buffer;
|
|
355
|
-
export function UsernameLink_Create(username: string): Buffer;
|
|
406
|
+
export function UsernameLink_Create(username: string, entropy: Buffer | null): Buffer;
|
|
356
407
|
export function UsernameLink_DecryptUsername(entropy: Buffer, encryptedUsername: Buffer): string;
|
|
357
408
|
export function Username_CandidatesFrom(nickname: string, minLen: number, maxLen: number): string;
|
|
358
409
|
export function Username_Hash(username: string): Buffer;
|
|
@@ -362,6 +413,7 @@ export function UuidCiphertext_CheckValidContents(buffer: Buffer): void;
|
|
|
362
413
|
export function ValidatingMac_Finalize(mac: Wrapper<ValidatingMac>): number;
|
|
363
414
|
export function ValidatingMac_Initialize(key: Buffer, chunkSize: number, digests: Buffer): ValidatingMac;
|
|
364
415
|
export function ValidatingMac_Update(mac: Wrapper<ValidatingMac>, bytes: Buffer, offset: number, length: number): number;
|
|
416
|
+
export function WebpSanitizer_Sanitize(input: SyncInputStream, len: Buffer): void;
|
|
365
417
|
export function initLogger(maxLevel: LogLevel, callback: (level: LogLevel, target: string, file: string | null, line: number | null, message: string) => void): void
|
|
366
418
|
interface Aes256GcmSiv { readonly __type: unique symbol; }
|
|
367
419
|
interface AuthCredential { readonly __type: unique symbol; }
|
|
@@ -369,6 +421,7 @@ interface AuthCredentialResponse { readonly __type: unique symbol; }
|
|
|
369
421
|
interface AuthCredentialWithPni { readonly __type: unique symbol; }
|
|
370
422
|
interface AuthCredentialWithPniResponse { readonly __type: unique symbol; }
|
|
371
423
|
interface CiphertextMessage { readonly __type: unique symbol; }
|
|
424
|
+
interface ConnectionManager { readonly __type: unique symbol; }
|
|
372
425
|
interface DecryptionErrorMessage { readonly __type: unique symbol; }
|
|
373
426
|
interface ExpiringProfileKeyCredential { readonly __type: unique symbol; }
|
|
374
427
|
interface ExpiringProfileKeyCredentialResponse { readonly __type: unique symbol; }
|
|
@@ -382,6 +435,8 @@ interface KyberKeyPair { readonly __type: unique symbol; }
|
|
|
382
435
|
interface KyberPreKeyRecord { readonly __type: unique symbol; }
|
|
383
436
|
interface KyberPublicKey { readonly __type: unique symbol; }
|
|
384
437
|
interface KyberSecretKey { readonly __type: unique symbol; }
|
|
438
|
+
interface LookupRequest { readonly __type: unique symbol; }
|
|
439
|
+
interface NonSuspendingBackgroundThreadRuntime { readonly __type: unique symbol; }
|
|
385
440
|
interface PlaintextContent { readonly __type: unique symbol; }
|
|
386
441
|
interface PreKeyBundle { readonly __type: unique symbol; }
|
|
387
442
|
interface PreKeyRecord { readonly __type: unique symbol; }
|
|
@@ -412,6 +467,7 @@ interface SessionRecord { readonly __type: unique symbol; }
|
|
|
412
467
|
interface SgxClientState { readonly __type: unique symbol; }
|
|
413
468
|
interface SignalMessage { readonly __type: unique symbol; }
|
|
414
469
|
interface SignedPreKeyRecord { readonly __type: unique symbol; }
|
|
470
|
+
interface TokioAsyncContext { readonly __type: unique symbol; }
|
|
415
471
|
interface UnidentifiedSenderMessageContent { readonly __type: unique symbol; }
|
|
416
472
|
interface UuidCiphertext { readonly __type: unique symbol; }
|
|
417
473
|
interface ValidatingMac { readonly __type: unique symbol; }
|
package/dist/Errors.d.ts
CHANGED
|
@@ -20,7 +20,8 @@ export declare enum ErrorCode {
|
|
|
20
20
|
UnsupportedMediaInput = 16,
|
|
21
21
|
InputDataTooLong = 17,
|
|
22
22
|
InvalidEntropyDataLength = 18,
|
|
23
|
-
InvalidUsernameLinkEncryptedData = 19
|
|
23
|
+
InvalidUsernameLinkEncryptedData = 19,
|
|
24
|
+
RateLimitedError = 20
|
|
24
25
|
}
|
|
25
26
|
export declare class LibSignalErrorBase extends Error {
|
|
26
27
|
readonly code: ErrorCode;
|
|
@@ -93,4 +94,8 @@ export type InvalidMediaInputError = LibSignalErrorCommon & {
|
|
|
93
94
|
export type UnsupportedMediaInputError = LibSignalErrorCommon & {
|
|
94
95
|
code: ErrorCode.UnsupportedMediaInput;
|
|
95
96
|
};
|
|
97
|
+
export type RateLimitedError = LibSignalErrorBase & {
|
|
98
|
+
code: ErrorCode.RateLimitedError;
|
|
99
|
+
readonly retryAfterSecs: number;
|
|
100
|
+
};
|
|
96
101
|
export type LibSignalError = GenericError | DuplicatedMessageError | SealedSenderSelfSendError | UntrustedIdentityError | InvalidRegistrationIdError | VerificationFailedError | InvalidSessionError | InvalidSenderKeySessionError | CannotBeEmptyError | CannotStartWithDigitError | MissingSeparatorError | BadNicknameCharacterError | NicknameTooShortError | NicknameTooLongError | InputDataTooLong | InvalidEntropyDataLength | InvalidUsernameLinkEncryptedData | IoError | InvalidMediaInputError | UnsupportedMediaInputError;
|
package/dist/Errors.js
CHANGED
|
@@ -28,6 +28,7 @@ var ErrorCode;
|
|
|
28
28
|
ErrorCode[ErrorCode["InputDataTooLong"] = 17] = "InputDataTooLong";
|
|
29
29
|
ErrorCode[ErrorCode["InvalidEntropyDataLength"] = 18] = "InvalidEntropyDataLength";
|
|
30
30
|
ErrorCode[ErrorCode["InvalidUsernameLinkEncryptedData"] = 19] = "InvalidUsernameLinkEncryptedData";
|
|
31
|
+
ErrorCode[ErrorCode["RateLimitedError"] = 20] = "RateLimitedError";
|
|
31
32
|
})(ErrorCode = exports.ErrorCode || (exports.ErrorCode = {}));
|
|
32
33
|
class LibSignalErrorBase extends Error {
|
|
33
34
|
constructor(message, name, operation, extraProps) {
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
/// <reference types="node" />
|
|
2
|
+
/**
|
|
3
|
+
* Sanitize a WebP input.
|
|
4
|
+
*
|
|
5
|
+
* @param input A WebP format input stream.
|
|
6
|
+
* @param length The exact length of the input stream.
|
|
7
|
+
* @throws IoError If an IO error on the input occurs.
|
|
8
|
+
* @throws InvalidMediaInputError If the input could not be parsed because it was invalid.
|
|
9
|
+
* @throws UnsupportedMediaInputError If the input could not be parsed because it's unsupported in some way.
|
|
10
|
+
*/
|
|
11
|
+
export declare function sanitize(input: Buffer): void;
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
//
|
|
3
|
+
// Copyright 2023 Signal Messenger, LLC.
|
|
4
|
+
// SPDX-License-Identifier: AGPL-3.0-only
|
|
5
|
+
//
|
|
6
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
7
|
+
exports.sanitize = void 0;
|
|
8
|
+
/**
|
|
9
|
+
* A WebP format “sanitizer”.
|
|
10
|
+
*
|
|
11
|
+
* The sanitizer currently simply checks the validity of a WebP file input, so that passing a malformed file to an
|
|
12
|
+
* unsafe parser can be avoided.
|
|
13
|
+
*
|
|
14
|
+
* @module WebpSanitizer
|
|
15
|
+
*/
|
|
16
|
+
const Native = require("../Native");
|
|
17
|
+
const BigIntUtil_1 = require("./zkgroup/internal/BigIntUtil");
|
|
18
|
+
/**
|
|
19
|
+
* Sanitize a WebP input.
|
|
20
|
+
*
|
|
21
|
+
* @param input A WebP format input stream.
|
|
22
|
+
* @param length The exact length of the input stream.
|
|
23
|
+
* @throws IoError If an IO error on the input occurs.
|
|
24
|
+
* @throws InvalidMediaInputError If the input could not be parsed because it was invalid.
|
|
25
|
+
* @throws UnsupportedMediaInputError If the input could not be parsed because it's unsupported in some way.
|
|
26
|
+
*/
|
|
27
|
+
function sanitize(input) {
|
|
28
|
+
Native.WebpSanitizer_Sanitize(input, (0, BigIntUtil_1.bufferFromBigUInt64BE)(BigInt(input.length)));
|
|
29
|
+
}
|
|
30
|
+
exports.sanitize = sanitize;
|
|
31
|
+
//# sourceMappingURL=WebpSanitizer.js.map
|
package/dist/index.d.ts
CHANGED
|
@@ -4,7 +4,9 @@ import { Aci, ProtocolAddress } from './Address';
|
|
|
4
4
|
export * from './Address';
|
|
5
5
|
export * as usernames from './usernames';
|
|
6
6
|
export * as io from './io';
|
|
7
|
+
export * as Net from './net';
|
|
7
8
|
export * as Mp4Sanitizer from './Mp4Sanitizer';
|
|
9
|
+
export * as WebpSanitizer from './WebpSanitizer';
|
|
8
10
|
import * as Native from '../Native';
|
|
9
11
|
export declare enum CiphertextMessageType {
|
|
10
12
|
Whisper = 2,
|
package/dist/index.js
CHANGED
|
@@ -27,8 +27,8 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
|
27
27
|
});
|
|
28
28
|
};
|
|
29
29
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
30
|
-
exports.
|
|
31
|
-
exports.initLogger = exports.LogLevel = exports.HsmEnclaveClient = exports.Cds2Client = exports.sealedSenderDecryptToUsmc = exports.sealedSenderDecryptMessage = exports.sealedSenderMultiRecipientMessageForSingleRecipient = exports.sealedSenderMultiRecipientEncrypt = void 0;
|
|
30
|
+
exports.signalDecryptPreKey = exports.signalDecrypt = exports.signalEncrypt = exports.processPreKeyBundle = exports.DecryptionErrorMessage = exports.PlaintextContent = exports.CiphertextMessage = exports.SealedSenderDecryptionResult = exports.groupDecrypt = exports.groupEncrypt = exports.SenderKeyStore = exports.KyberPreKeyStore = exports.SignedPreKeyStore = exports.PreKeyStore = exports.IdentityKeyStore = exports.SessionStore = exports.UnidentifiedSenderMessageContent = exports.SenderKeyMessage = exports.processSenderKeyDistributionMessage = exports.SenderKeyDistributionMessage = exports.SenderCertificate = exports.SenderKeyRecord = exports.ServerCertificate = exports.SessionRecord = exports.PreKeySignalMessage = exports.SignalMessage = exports.KyberPreKeyRecord = exports.SignedPreKeyRecord = exports.PreKeyRecord = exports.PreKeyBundle = exports.IdentityKeyPair = exports.KEMKeyPair = exports.KEMSecretKey = exports.KEMPublicKey = exports.PrivateKey = exports.PublicKey = exports.Aes256GcmSiv = exports.Fingerprint = exports.DisplayableFingerprint = exports.ScannableFingerprint = exports.hkdf = exports.HKDF = exports.ContentHint = exports.Direction = exports.CiphertextMessageType = exports.WebpSanitizer = exports.Mp4Sanitizer = exports.Net = exports.io = exports.usernames = void 0;
|
|
31
|
+
exports.initLogger = exports.LogLevel = exports.HsmEnclaveClient = exports.Cds2Client = exports.sealedSenderDecryptToUsmc = exports.sealedSenderDecryptMessage = exports.sealedSenderMultiRecipientMessageForSingleRecipient = exports.sealedSenderMultiRecipientEncrypt = exports.sealedSenderEncrypt = exports.sealedSenderEncryptMessage = void 0;
|
|
32
32
|
const uuid = require("uuid");
|
|
33
33
|
const Errors = require("./Errors");
|
|
34
34
|
__exportStar(require("./Errors"), exports);
|
|
@@ -36,7 +36,9 @@ const Address_1 = require("./Address");
|
|
|
36
36
|
__exportStar(require("./Address"), exports);
|
|
37
37
|
exports.usernames = require("./usernames");
|
|
38
38
|
exports.io = require("./io");
|
|
39
|
+
exports.Net = require("./net");
|
|
39
40
|
exports.Mp4Sanitizer = require("./Mp4Sanitizer");
|
|
41
|
+
exports.WebpSanitizer = require("./WebpSanitizer");
|
|
40
42
|
const Native = require("../Native");
|
|
41
43
|
Native.registerErrors(Errors);
|
|
42
44
|
// These enums must be kept in sync with their Rust counterparts.
|
package/dist/net.d.ts
ADDED
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import type { ReadonlyDeep } from 'type-fest';
|
|
2
|
+
export declare enum Environment {
|
|
3
|
+
Staging = 0,
|
|
4
|
+
Production = 1
|
|
5
|
+
}
|
|
6
|
+
export type CDSAuthType = {
|
|
7
|
+
username: string;
|
|
8
|
+
password: string;
|
|
9
|
+
};
|
|
10
|
+
export type CDSRequestOptionsType = {
|
|
11
|
+
e164s: Array<string>;
|
|
12
|
+
acisAndAccessKeys: Array<{
|
|
13
|
+
aci: string;
|
|
14
|
+
accessKey: string;
|
|
15
|
+
}>;
|
|
16
|
+
timeout: number;
|
|
17
|
+
returnAcisWithoutUaks: boolean;
|
|
18
|
+
};
|
|
19
|
+
export type CDSResponseEntryType<Aci, Pni> = {
|
|
20
|
+
aci: Aci | undefined;
|
|
21
|
+
pni: Pni | undefined;
|
|
22
|
+
};
|
|
23
|
+
export type CDSResponseType<Aci, Pni> = Map<string, CDSResponseEntryType<Aci, Pni>>;
|
|
24
|
+
export declare class Net {
|
|
25
|
+
private readonly _asyncContext;
|
|
26
|
+
private readonly _connectionManager;
|
|
27
|
+
constructor(env: Environment);
|
|
28
|
+
cdsiLookup({ username, password }: Readonly<CDSAuthType>, { e164s, acisAndAccessKeys, timeout, returnAcisWithoutUaks, }: ReadonlyDeep<CDSRequestOptionsType>): Promise<CDSResponseType<string, string>>;
|
|
29
|
+
}
|
package/dist/net.js
ADDED
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
//
|
|
3
|
+
// Copyright 2023 Signal Messenger, LLC.
|
|
4
|
+
// SPDX-License-Identifier: AGPL-3.0-only
|
|
5
|
+
//
|
|
6
|
+
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
7
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
8
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
9
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
10
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
11
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
12
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
13
|
+
});
|
|
14
|
+
};
|
|
15
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
16
|
+
exports.Net = exports.Environment = void 0;
|
|
17
|
+
const Native = require("../Native");
|
|
18
|
+
const Address_1 = require("./Address");
|
|
19
|
+
// This must match the libsignal-bridge Rust enum of the same name.
|
|
20
|
+
var Environment;
|
|
21
|
+
(function (Environment) {
|
|
22
|
+
Environment[Environment["Staging"] = 0] = "Staging";
|
|
23
|
+
Environment[Environment["Production"] = 1] = "Production";
|
|
24
|
+
})(Environment = exports.Environment || (exports.Environment = {}));
|
|
25
|
+
class Net {
|
|
26
|
+
constructor(env) {
|
|
27
|
+
this._asyncContext = Native.TokioAsyncContext_new();
|
|
28
|
+
this._connectionManager = Native.ConnectionManager_new(env);
|
|
29
|
+
}
|
|
30
|
+
cdsiLookup({ username, password }, { e164s, acisAndAccessKeys, timeout, returnAcisWithoutUaks, }) {
|
|
31
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
32
|
+
const request = { _nativeHandle: Native.LookupRequest_new() };
|
|
33
|
+
e164s.forEach((e164) => {
|
|
34
|
+
Native.LookupRequest_addE164(request, e164);
|
|
35
|
+
});
|
|
36
|
+
acisAndAccessKeys.forEach(({ aci: aciStr, accessKey: accessKeyStr }) => {
|
|
37
|
+
Native.LookupRequest_addAciAndAccessKey(request, Address_1.Aci.parseFromServiceIdString(aciStr).getServiceIdFixedWidthBinary(), Buffer.from(accessKeyStr, 'base64'));
|
|
38
|
+
});
|
|
39
|
+
Native.LookupRequest_setReturnAcisWithoutUaks(request, returnAcisWithoutUaks);
|
|
40
|
+
return yield Native.CdsiLookup({ _nativeHandle: this._asyncContext }, { _nativeHandle: this._connectionManager }, username, password, request, timeout);
|
|
41
|
+
});
|
|
42
|
+
}
|
|
43
|
+
}
|
|
44
|
+
exports.Net = Net;
|
|
45
|
+
//# sourceMappingURL=net.js.map
|
package/dist/usernames.d.ts
CHANGED
|
@@ -8,5 +8,5 @@ export declare function hash(username: string): Buffer;
|
|
|
8
8
|
export declare function generateProof(username: string): Buffer;
|
|
9
9
|
export declare function generateProofWithRandom(username: string, random: Buffer): Buffer;
|
|
10
10
|
export declare function decryptUsernameLink(usernameLink: UsernameLink): string;
|
|
11
|
-
export declare function createUsernameLink(username: string): UsernameLink;
|
|
11
|
+
export declare function createUsernameLink(username: string, previousEntropy?: Buffer): UsernameLink;
|
|
12
12
|
export declare function verifyProof(proof: Buffer, hash: Buffer): void;
|
package/dist/usernames.js
CHANGED
|
@@ -30,8 +30,8 @@ function decryptUsernameLink(usernameLink) {
|
|
|
30
30
|
return Native.UsernameLink_DecryptUsername(usernameLink.entropy, usernameLink.encryptedUsername);
|
|
31
31
|
}
|
|
32
32
|
exports.decryptUsernameLink = decryptUsernameLink;
|
|
33
|
-
function createUsernameLink(username) {
|
|
34
|
-
const usernameLinkData = Native.UsernameLink_Create(username);
|
|
33
|
+
function createUsernameLink(username, previousEntropy) {
|
|
34
|
+
const usernameLinkData = Native.UsernameLink_Create(username, previousEntropy !== null && previousEntropy !== void 0 ? previousEntropy : null);
|
|
35
35
|
const entropy = usernameLinkData.slice(0, 32);
|
|
36
36
|
const encryptedUsername = usernameLinkData.slice(32);
|
|
37
37
|
return { entropy, encryptedUsername };
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
/// <reference types="node" />
|
|
2
|
+
import ByteArray from '../internal/ByteArray';
|
|
3
|
+
import GenericServerPublicParams from '../GenericServerPublicParams';
|
|
4
|
+
import BackupAuthCredentialPresentation from './BackupAuthCredentialPresentation';
|
|
5
|
+
export default class BackupAuthCredential extends ByteArray {
|
|
6
|
+
private readonly __type?;
|
|
7
|
+
constructor(contents: Buffer);
|
|
8
|
+
present(serverParams: GenericServerPublicParams): BackupAuthCredentialPresentation;
|
|
9
|
+
presentWithRandom(serverParams: GenericServerPublicParams, random: Buffer): BackupAuthCredentialPresentation;
|
|
10
|
+
getBackupId(): Buffer;
|
|
11
|
+
}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
//
|
|
3
|
+
// Copyright 2023 Signal Messenger, LLC.
|
|
4
|
+
// SPDX-License-Identifier: AGPL-3.0-only
|
|
5
|
+
//
|
|
6
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
7
|
+
const crypto_1 = require("crypto");
|
|
8
|
+
const Native = require("../../../Native");
|
|
9
|
+
const ByteArray_1 = require("../internal/ByteArray");
|
|
10
|
+
const Constants_1 = require("../internal/Constants");
|
|
11
|
+
const BackupAuthCredentialPresentation_1 = require("./BackupAuthCredentialPresentation");
|
|
12
|
+
class BackupAuthCredential extends ByteArray_1.default {
|
|
13
|
+
constructor(contents) {
|
|
14
|
+
super(contents, Native.BackupAuthCredential_CheckValidContents);
|
|
15
|
+
}
|
|
16
|
+
present(serverParams) {
|
|
17
|
+
const random = (0, crypto_1.randomBytes)(Constants_1.RANDOM_LENGTH);
|
|
18
|
+
return this.presentWithRandom(serverParams, random);
|
|
19
|
+
}
|
|
20
|
+
presentWithRandom(serverParams, random) {
|
|
21
|
+
return new BackupAuthCredentialPresentation_1.default(Native.BackupAuthCredential_PresentDeterministic(this.contents, serverParams.contents, random));
|
|
22
|
+
}
|
|
23
|
+
getBackupId() {
|
|
24
|
+
return Native.BackupAuthCredential_GetBackupId(this.contents);
|
|
25
|
+
}
|
|
26
|
+
}
|
|
27
|
+
exports.default = BackupAuthCredential;
|
|
28
|
+
//# sourceMappingURL=BackupAuthCredential.js.map
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
/// <reference types="node" />
|
|
2
|
+
import ByteArray from '../internal/ByteArray';
|
|
3
|
+
import GenericServerSecretParams from '../GenericServerSecretParams';
|
|
4
|
+
export default class BackupAuthCredentialPresentation extends ByteArray {
|
|
5
|
+
private readonly __type?;
|
|
6
|
+
constructor(contents: Buffer);
|
|
7
|
+
verify(serverParams: GenericServerSecretParams, now?: Date): void;
|
|
8
|
+
}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
//
|
|
3
|
+
// Copyright 2023 Signal Messenger, LLC.
|
|
4
|
+
// SPDX-License-Identifier: AGPL-3.0-only
|
|
5
|
+
//
|
|
6
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
7
|
+
const ByteArray_1 = require("../internal/ByteArray");
|
|
8
|
+
const Native = require("../../../Native");
|
|
9
|
+
class BackupAuthCredentialPresentation extends ByteArray_1.default {
|
|
10
|
+
constructor(contents) {
|
|
11
|
+
super(contents, Native.BackupAuthCredentialPresentation_CheckValidContents);
|
|
12
|
+
}
|
|
13
|
+
verify(serverParams, now = new Date()) {
|
|
14
|
+
Native.BackupAuthCredentialPresentation_Verify(this.contents, Math.floor(now.getTime() / 1000), serverParams.contents);
|
|
15
|
+
}
|
|
16
|
+
}
|
|
17
|
+
exports.default = BackupAuthCredentialPresentation;
|
|
18
|
+
//# sourceMappingURL=BackupAuthCredentialPresentation.js.map
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
/// <reference types="node" />
|
|
2
|
+
import ByteArray from '../internal/ByteArray';
|
|
3
|
+
import GenericServerSecretParams from '../GenericServerSecretParams';
|
|
4
|
+
import BackupAuthCredentialResponse from './BackupAuthCredentialResponse';
|
|
5
|
+
export default class BackupAuthCredentialRequest extends ByteArray {
|
|
6
|
+
private readonly __type?;
|
|
7
|
+
constructor(contents: Buffer);
|
|
8
|
+
issueCredential(timestamp: number, receiptLevel: bigint, params: GenericServerSecretParams): BackupAuthCredentialResponse;
|
|
9
|
+
issueCredentialWithRandom(timestamp: number, receiptLevel: bigint, params: GenericServerSecretParams, random: Buffer): BackupAuthCredentialResponse;
|
|
10
|
+
}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
//
|
|
3
|
+
// Copyright 2023 Signal Messenger, LLC.
|
|
4
|
+
// SPDX-License-Identifier: AGPL-3.0-only
|
|
5
|
+
//
|
|
6
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
7
|
+
const crypto_1 = require("crypto");
|
|
8
|
+
const Native = require("../../../Native");
|
|
9
|
+
const ByteArray_1 = require("../internal/ByteArray");
|
|
10
|
+
const Constants_1 = require("../internal/Constants");
|
|
11
|
+
const BackupAuthCredentialResponse_1 = require("./BackupAuthCredentialResponse");
|
|
12
|
+
const BigIntUtil_1 = require("../internal/BigIntUtil");
|
|
13
|
+
class BackupAuthCredentialRequest extends ByteArray_1.default {
|
|
14
|
+
constructor(contents) {
|
|
15
|
+
super(contents, Native.BackupAuthCredentialRequest_CheckValidContents);
|
|
16
|
+
}
|
|
17
|
+
issueCredential(timestamp, receiptLevel, params) {
|
|
18
|
+
const random = (0, crypto_1.randomBytes)(Constants_1.RANDOM_LENGTH);
|
|
19
|
+
return this.issueCredentialWithRandom(timestamp, receiptLevel, params, random);
|
|
20
|
+
}
|
|
21
|
+
issueCredentialWithRandom(timestamp, receiptLevel, params, random) {
|
|
22
|
+
return new BackupAuthCredentialResponse_1.default(Native.BackupAuthCredentialRequest_IssueDeterministic(this.contents, timestamp, (0, BigIntUtil_1.bufferFromBigUInt64BE)(receiptLevel), params.contents, random));
|
|
23
|
+
}
|
|
24
|
+
}
|
|
25
|
+
exports.default = BackupAuthCredentialRequest;
|
|
26
|
+
//# sourceMappingURL=BackupAuthCredentialRequest.js.map
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
/// <reference types="node" />
|
|
2
|
+
import ByteArray from '../internal/ByteArray';
|
|
3
|
+
import BackupAuthCredentialRequest from './BackupAuthCredentialRequest';
|
|
4
|
+
import BackupAuthCredentialResponse from './BackupAuthCredentialResponse';
|
|
5
|
+
import BackupAuthCredential from './BackupAuthCredential';
|
|
6
|
+
import GenericServerPublicParams from '../GenericServerPublicParams';
|
|
7
|
+
import { Uuid } from '../..';
|
|
8
|
+
export default class BackupAuthCredentialRequestContext extends ByteArray {
|
|
9
|
+
private readonly __type?;
|
|
10
|
+
constructor(contents: Buffer);
|
|
11
|
+
static create(backupKey: Buffer, aci: Uuid): BackupAuthCredentialRequestContext;
|
|
12
|
+
getRequest(): BackupAuthCredentialRequest;
|
|
13
|
+
receive(response: BackupAuthCredentialResponse, params: GenericServerPublicParams, expectedReceiptLevel: bigint): BackupAuthCredential;
|
|
14
|
+
}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
//
|
|
3
|
+
// Copyright 2023 Signal Messenger, LLC.
|
|
4
|
+
// SPDX-License-Identifier: AGPL-3.0-only
|
|
5
|
+
//
|
|
6
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
7
|
+
const uuid = require("uuid");
|
|
8
|
+
const ByteArray_1 = require("../internal/ByteArray");
|
|
9
|
+
const Native = require("../../../Native");
|
|
10
|
+
const BackupAuthCredentialRequest_1 = require("./BackupAuthCredentialRequest");
|
|
11
|
+
const BackupAuthCredential_1 = require("./BackupAuthCredential");
|
|
12
|
+
const BigIntUtil_1 = require("../internal/BigIntUtil");
|
|
13
|
+
class BackupAuthCredentialRequestContext extends ByteArray_1.default {
|
|
14
|
+
constructor(contents) {
|
|
15
|
+
super(contents, Native.BackupAuthCredentialRequestContext_CheckValidContents);
|
|
16
|
+
}
|
|
17
|
+
static create(backupKey, aci) {
|
|
18
|
+
return new BackupAuthCredentialRequestContext(Native.BackupAuthCredentialRequestContext_New(backupKey, Buffer.from(uuid.parse(aci))));
|
|
19
|
+
}
|
|
20
|
+
getRequest() {
|
|
21
|
+
return new BackupAuthCredentialRequest_1.default(Native.BackupAuthCredentialRequestContext_GetRequest(this.contents));
|
|
22
|
+
}
|
|
23
|
+
receive(response, params, expectedReceiptLevel) {
|
|
24
|
+
return new BackupAuthCredential_1.default(Native.BackupAuthCredentialRequestContext_ReceiveResponse(this.contents, response.contents, params.contents, (0, BigIntUtil_1.bufferFromBigUInt64BE)(expectedReceiptLevel)));
|
|
25
|
+
}
|
|
26
|
+
}
|
|
27
|
+
exports.default = BackupAuthCredentialRequestContext;
|
|
28
|
+
//# sourceMappingURL=BackupAuthCredentialRequestContext.js.map
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
//
|
|
3
|
+
// Copyright 2023 Signal Messenger, LLC.
|
|
4
|
+
// SPDX-License-Identifier: AGPL-3.0-only
|
|
5
|
+
//
|
|
6
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
7
|
+
const ByteArray_1 = require("../internal/ByteArray");
|
|
8
|
+
const Native = require("../../../Native");
|
|
9
|
+
class BackupAuthCredentialResponse extends ByteArray_1.default {
|
|
10
|
+
constructor(contents) {
|
|
11
|
+
super(contents, Native.BackupAuthCredentialResponse_CheckValidContents);
|
|
12
|
+
}
|
|
13
|
+
}
|
|
14
|
+
exports.default = BackupAuthCredentialResponse;
|
|
15
|
+
//# sourceMappingURL=BackupAuthCredentialResponse.js.map
|
package/dist/zkgroup/index.d.ts
CHANGED
|
@@ -45,3 +45,8 @@ export { default as CreateCallLinkCredentialPresentation } from './calllinks/Cre
|
|
|
45
45
|
export { default as CreateCallLinkCredentialRequest } from './calllinks/CreateCallLinkCredentialRequest';
|
|
46
46
|
export { default as CreateCallLinkCredentialRequestContext } from './calllinks/CreateCallLinkCredentialRequestContext';
|
|
47
47
|
export { default as CreateCallLinkCredentialResponse } from './calllinks/CreateCallLinkCredentialResponse';
|
|
48
|
+
export { default as BackupAuthCredential } from './backups/BackupAuthCredential';
|
|
49
|
+
export { default as BackupAuthCredentialPresentation } from './backups/BackupAuthCredentialPresentation';
|
|
50
|
+
export { default as BackupAuthCredentialRequest } from './backups/BackupAuthCredentialRequest';
|
|
51
|
+
export { default as BackupAuthCredentialRequestContext } from './backups/BackupAuthCredentialRequestContext';
|
|
52
|
+
export { default as BackupAuthCredentialResponse } from './backups/BackupAuthCredentialResponse';
|
package/dist/zkgroup/index.js
CHANGED
|
@@ -4,7 +4,8 @@
|
|
|
4
4
|
// SPDX-License-Identifier: AGPL-3.0-only
|
|
5
5
|
//
|
|
6
6
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
7
|
-
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.AuthCredentialResponse = exports.AuthCredential = exports.ServerZkAuthOperations = exports.ClientZkAuthOperations = exports.NotarySignature = exports.GenericServerSecretParams = exports.GenericServerPublicParams = exports.ServerSecretParams = exports.ServerPublicParams = void 0;
|
|
7
|
+
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.AuthCredentialResponse = exports.AuthCredential = exports.ServerZkAuthOperations = exports.ClientZkAuthOperations = exports.NotarySignature = exports.GenericServerSecretParams = exports.GenericServerPublicParams = exports.ServerSecretParams = exports.ServerPublicParams = void 0;
|
|
8
|
+
exports.BackupAuthCredentialResponse = exports.BackupAuthCredentialRequestContext = void 0;
|
|
8
9
|
// Root
|
|
9
10
|
var ServerPublicParams_1 = require("./ServerPublicParams");
|
|
10
11
|
Object.defineProperty(exports, "ServerPublicParams", { enumerable: true, get: function () { return ServerPublicParams_1.default; } });
|
|
@@ -105,4 +106,15 @@ var CreateCallLinkCredentialRequestContext_1 = require("./calllinks/CreateCallLi
|
|
|
105
106
|
Object.defineProperty(exports, "CreateCallLinkCredentialRequestContext", { enumerable: true, get: function () { return CreateCallLinkCredentialRequestContext_1.default; } });
|
|
106
107
|
var CreateCallLinkCredentialResponse_1 = require("./calllinks/CreateCallLinkCredentialResponse");
|
|
107
108
|
Object.defineProperty(exports, "CreateCallLinkCredentialResponse", { enumerable: true, get: function () { return CreateCallLinkCredentialResponse_1.default; } });
|
|
109
|
+
// Backup Auth
|
|
110
|
+
var BackupAuthCredential_1 = require("./backups/BackupAuthCredential");
|
|
111
|
+
Object.defineProperty(exports, "BackupAuthCredential", { enumerable: true, get: function () { return BackupAuthCredential_1.default; } });
|
|
112
|
+
var BackupAuthCredentialPresentation_1 = require("./backups/BackupAuthCredentialPresentation");
|
|
113
|
+
Object.defineProperty(exports, "BackupAuthCredentialPresentation", { enumerable: true, get: function () { return BackupAuthCredentialPresentation_1.default; } });
|
|
114
|
+
var BackupAuthCredentialRequest_1 = require("./backups/BackupAuthCredentialRequest");
|
|
115
|
+
Object.defineProperty(exports, "BackupAuthCredentialRequest", { enumerable: true, get: function () { return BackupAuthCredentialRequest_1.default; } });
|
|
116
|
+
var BackupAuthCredentialRequestContext_1 = require("./backups/BackupAuthCredentialRequestContext");
|
|
117
|
+
Object.defineProperty(exports, "BackupAuthCredentialRequestContext", { enumerable: true, get: function () { return BackupAuthCredentialRequestContext_1.default; } });
|
|
118
|
+
var BackupAuthCredentialResponse_1 = require("./backups/BackupAuthCredentialResponse");
|
|
119
|
+
Object.defineProperty(exports, "BackupAuthCredentialResponse", { enumerable: true, get: function () { return BackupAuthCredentialResponse_1.default; } });
|
|
108
120
|
//# sourceMappingURL=index.js.map
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@signalapp/libsignal-client",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.34.0",
|
|
4
4
|
"license": "AGPL-3.0-only",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"types": "dist/index.d.ts",
|
|
@@ -26,6 +26,7 @@
|
|
|
26
26
|
},
|
|
27
27
|
"dependencies": {
|
|
28
28
|
"node-gyp-build": "^4.2.3",
|
|
29
|
+
"type-fest": "^3.5.0",
|
|
29
30
|
"uuid": "^8.3.0"
|
|
30
31
|
},
|
|
31
32
|
"devDependencies": {
|
|
@@ -34,7 +35,7 @@
|
|
|
34
35
|
"@types/chai-as-promised": "^7.1.3",
|
|
35
36
|
"@types/chance": "^1.1.3",
|
|
36
37
|
"@types/mocha": "^5.2.7",
|
|
37
|
-
"@types/node": "
|
|
38
|
+
"@types/node": "~18.15.0",
|
|
38
39
|
"@types/uuid": "^8.3.0",
|
|
39
40
|
"@typescript-eslint/eslint-plugin": "^5.47.0",
|
|
40
41
|
"@typescript-eslint/parser": "^5.47.0",
|
|
@@ -48,7 +49,7 @@
|
|
|
48
49
|
"eslint-plugin-mocha": "^10.1.0",
|
|
49
50
|
"eslint-plugin-more": "^1.0.0",
|
|
50
51
|
"mocha": "^9",
|
|
51
|
-
"node-gyp": "^
|
|
52
|
+
"node-gyp": "^10.0.0",
|
|
52
53
|
"prettier": "^2.7.1",
|
|
53
54
|
"rimraf": "^3.0.1",
|
|
54
55
|
"source-map-support": "^0.5.19",
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|