@signalapp/libsignal-client 0.84.0 → 0.85.1
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/dist/AccountKeys.js +1 -1
- package/dist/Address.d.ts +1 -1
- package/dist/Address.js +1 -1
- package/dist/EcKeys.d.ts +1 -1
- package/dist/EcKeys.js +1 -1
- package/dist/Errors.d.ts +38 -4
- package/dist/Errors.js +24 -1
- package/dist/MessageBackup.d.ts +1 -1
- package/dist/MessageBackup.js +1 -1
- package/dist/Minidump.js +1 -1
- package/dist/Mp4Sanitizer.d.ts +1 -1
- package/dist/Mp4Sanitizer.js +1 -1
- package/dist/Native.d.ts +365 -0
- package/dist/Native.js +14 -0
- package/dist/SealedSenderMultiRecipientMessage.d.ts +1 -1
- package/dist/SealedSenderMultiRecipientMessage.js +1 -1
- package/dist/WebpSanitizer.js +1 -1
- package/dist/acknowledgments.md +1 -1
- package/dist/incremental_mac.js +9 -2
- package/dist/index.d.ts +3 -2
- package/dist/index.js +2 -1
- package/dist/internal.d.ts +1 -1
- package/dist/internal.js +1 -1
- package/dist/io.d.ts +1 -1
- package/dist/net/CDSI.d.ts +1 -1
- package/dist/net/CDSI.js +1 -1
- package/dist/net/Chat.d.ts +7 -6
- package/dist/net/Chat.js +4 -3
- package/dist/net/FakeChat.d.ts +31 -0
- package/dist/net/FakeChat.js +67 -0
- package/dist/net/KeyTransparency.d.ts +1 -1
- package/dist/net/KeyTransparency.js +1 -1
- package/dist/net/Registration.d.ts +5 -4
- package/dist/net/Registration.js +8 -4
- package/dist/net/SvrB.d.ts +1 -1
- package/dist/net/SvrB.js +1 -1
- package/dist/net/chat/UnauthMessagesService.d.ts +48 -0
- package/dist/net/chat/UnauthMessagesService.js +24 -0
- package/dist/net/chat/UnauthUsernamesService.d.ts +19 -0
- package/dist/net/chat/UnauthUsernamesService.js +6 -1
- package/dist/net.d.ts +2 -1
- package/dist/net.js +2 -1
- package/dist/usernames.js +1 -1
- package/dist/uuid.d.ts +1 -0
- package/dist/uuid.js +6 -0
- package/dist/zkgroup/GenericServerPublicParams.js +1 -1
- package/dist/zkgroup/GenericServerSecretParams.js +1 -1
- package/dist/zkgroup/ServerPublicParams.d.ts +1 -1
- package/dist/zkgroup/ServerPublicParams.js +1 -1
- package/dist/zkgroup/ServerSecretParams.d.ts +1 -1
- package/dist/zkgroup/ServerSecretParams.js +1 -1
- package/dist/zkgroup/auth/AuthCredentialPresentation.js +1 -1
- package/dist/zkgroup/auth/AuthCredentialWithPni.js +1 -1
- package/dist/zkgroup/auth/AuthCredentialWithPniResponse.js +1 -1
- package/dist/zkgroup/auth/ClientZkAuthOperations.js +1 -1
- package/dist/zkgroup/auth/ServerZkAuthOperations.js +1 -1
- package/dist/zkgroup/backups/BackupAuthCredential.js +1 -1
- package/dist/zkgroup/backups/BackupAuthCredentialPresentation.js +1 -1
- package/dist/zkgroup/backups/BackupAuthCredentialRequest.js +1 -1
- package/dist/zkgroup/backups/BackupAuthCredentialRequestContext.js +1 -1
- package/dist/zkgroup/backups/BackupAuthCredentialResponse.js +1 -1
- package/dist/zkgroup/calllinks/CallLinkAuthCredential.js +1 -1
- package/dist/zkgroup/calllinks/CallLinkAuthCredentialPresentation.js +1 -1
- package/dist/zkgroup/calllinks/CallLinkAuthCredentialResponse.js +1 -1
- package/dist/zkgroup/calllinks/CallLinkPublicParams.js +1 -1
- package/dist/zkgroup/calllinks/CallLinkSecretParams.js +1 -1
- package/dist/zkgroup/calllinks/CreateCallLinkCredential.js +1 -1
- package/dist/zkgroup/calllinks/CreateCallLinkCredentialPresentation.js +1 -1
- package/dist/zkgroup/calllinks/CreateCallLinkCredentialRequest.js +1 -1
- package/dist/zkgroup/calllinks/CreateCallLinkCredentialRequestContext.js +1 -1
- package/dist/zkgroup/calllinks/CreateCallLinkCredentialResponse.js +1 -1
- package/dist/zkgroup/groups/ClientZkGroupCipher.js +1 -1
- package/dist/zkgroup/groups/GroupPublicParams.js +1 -1
- package/dist/zkgroup/groups/GroupSecretParams.js +1 -1
- package/dist/zkgroup/groups/ProfileKeyCiphertext.js +1 -1
- package/dist/zkgroup/groups/UuidCiphertext.js +1 -1
- package/dist/zkgroup/groupsend/GroupSendDerivedKeyPair.js +1 -1
- package/dist/zkgroup/groupsend/GroupSendEndorsement.js +1 -1
- package/dist/zkgroup/groupsend/GroupSendEndorsementsResponse.js +1 -1
- package/dist/zkgroup/groupsend/GroupSendFullToken.js +1 -1
- package/dist/zkgroup/groupsend/GroupSendToken.js +1 -1
- package/dist/zkgroup/internal/ByteArray.js +1 -1
- package/dist/zkgroup/profiles/ClientZkProfileOperations.js +1 -1
- package/dist/zkgroup/profiles/ExpiringProfileKeyCredential.js +1 -1
- package/dist/zkgroup/profiles/ExpiringProfileKeyCredentialResponse.js +1 -1
- package/dist/zkgroup/profiles/ProfileKey.js +1 -1
- package/dist/zkgroup/profiles/ProfileKeyCommitment.js +1 -1
- package/dist/zkgroup/profiles/ProfileKeyCredentialPresentation.js +1 -1
- package/dist/zkgroup/profiles/ProfileKeyCredentialRequest.js +1 -1
- package/dist/zkgroup/profiles/ProfileKeyCredentialRequestContext.js +1 -1
- package/dist/zkgroup/profiles/ServerZkProfileOperations.js +1 -1
- package/dist/zkgroup/receipts/ClientZkReceiptOperations.js +1 -1
- package/dist/zkgroup/receipts/ReceiptCredential.js +1 -1
- package/dist/zkgroup/receipts/ReceiptCredentialPresentation.js +1 -1
- package/dist/zkgroup/receipts/ReceiptCredentialRequest.js +1 -1
- package/dist/zkgroup/receipts/ReceiptCredentialRequestContext.js +1 -1
- package/dist/zkgroup/receipts/ReceiptCredentialResponse.js +1 -1
- package/dist/zkgroup/receipts/ServerZkReceiptOperations.js +1 -1
- package/package.json +4 -3
- package/prebuilds/darwin-arm64/@signalapp+libsignal-client.node +0 -0
- package/prebuilds/darwin-x64/@signalapp+libsignal-client.node +0 -0
- package/prebuilds/linux-arm64/@signalapp+libsignal-client.node +0 -0
- package/prebuilds/linux-x64/@signalapp+libsignal-client.node +0 -0
- package/prebuilds/win32-arm64/@signalapp+libsignal-client.node +0 -0
- package/prebuilds/win32-x64/@signalapp+libsignal-client.node +0 -0
- package/Native.d.ts +0 -819
- package/Native.js +0 -9
package/dist/AccountKeys.js
CHANGED
|
@@ -10,7 +10,7 @@
|
|
|
10
10
|
* @module AccountKeys
|
|
11
11
|
*/
|
|
12
12
|
import * as crypto from 'node:crypto';
|
|
13
|
-
import Native from '
|
|
13
|
+
import * as Native from './Native.js';
|
|
14
14
|
import ByteArray from './zkgroup/internal/ByteArray.js';
|
|
15
15
|
import { PrivateKey } from './EcKeys.js';
|
|
16
16
|
/**
|
package/dist/Address.d.ts
CHANGED
package/dist/Address.js
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
// Copyright 2021 Signal Messenger, LLC.
|
|
3
3
|
// SPDX-License-Identifier: AGPL-3.0-only
|
|
4
4
|
//
|
|
5
|
-
import Native from '
|
|
5
|
+
import * as Native from './Native.js';
|
|
6
6
|
import * as uuid from 'uuid';
|
|
7
7
|
import { Buffer } from 'node:buffer';
|
|
8
8
|
export var ServiceIdKind;
|
package/dist/EcKeys.d.ts
CHANGED
package/dist/EcKeys.js
CHANGED
package/dist/Errors.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { ProtocolAddress } from './Address.js';
|
|
2
|
-
import Native from '
|
|
1
|
+
import { ProtocolAddress, ServiceId } from './Address.js';
|
|
2
|
+
import * as Native from './Native.js';
|
|
3
3
|
export declare enum ErrorCode {
|
|
4
4
|
Generic = 0,
|
|
5
5
|
DuplicatedMessage = 1,
|
|
@@ -46,7 +46,33 @@ export declare enum ErrorCode {
|
|
|
46
46
|
Cancelled = 42,
|
|
47
47
|
KeyTransparencyError = 43,
|
|
48
48
|
KeyTransparencyVerificationFailed = 44,
|
|
49
|
-
IncrementalMacVerificationFailed = 45
|
|
49
|
+
IncrementalMacVerificationFailed = 45,
|
|
50
|
+
RequestUnauthorized = 46,
|
|
51
|
+
MismatchedDevices = 47
|
|
52
|
+
}
|
|
53
|
+
/** Called out as a separate type so it's not confused with a normal ServiceIdBinary. */
|
|
54
|
+
type ServiceIdFixedWidthBinary = Uint8Array;
|
|
55
|
+
/**
|
|
56
|
+
* A failure sending to a recipient on account of not being up to date on their devices.
|
|
57
|
+
*
|
|
58
|
+
* An entry in {@link MismatchedDevicesError}. Each entry represents a recipient that has either
|
|
59
|
+
* added, removed, or relinked some devices in their account (potentially including their primary
|
|
60
|
+
* device), as represented by the {@link MismatchedDevicesEntry#missingDevices},
|
|
61
|
+
* {@link MismatchedDevicesEntry#extraDevices}, and {@link MismatchedDevicesEntry#staleDevices}
|
|
62
|
+
* arrays, respectively. Handling the exception involves removing the "extra" devices and
|
|
63
|
+
* establishing new sessions for the "missing" and "stale" devices.
|
|
64
|
+
*/
|
|
65
|
+
export declare class MismatchedDevicesEntry {
|
|
66
|
+
account: ServiceId;
|
|
67
|
+
missingDevices: number[];
|
|
68
|
+
extraDevices: number[];
|
|
69
|
+
staleDevices: number[];
|
|
70
|
+
constructor({ account, missingDevices, extraDevices, staleDevices, }: {
|
|
71
|
+
account: ServiceId | ServiceIdFixedWidthBinary;
|
|
72
|
+
missingDevices?: number[];
|
|
73
|
+
extraDevices?: number[];
|
|
74
|
+
staleDevices?: number[];
|
|
75
|
+
});
|
|
50
76
|
}
|
|
51
77
|
export declare class LibSignalErrorBase extends Error {
|
|
52
78
|
readonly code: ErrorCode;
|
|
@@ -211,4 +237,12 @@ export type KeyTransparencyVerificationFailed = LibSignalErrorCommon & {
|
|
|
211
237
|
export type IncrementalMacVerificationFailed = LibSignalErrorCommon & {
|
|
212
238
|
code: ErrorCode.IncrementalMacVerificationFailed;
|
|
213
239
|
};
|
|
214
|
-
export type
|
|
240
|
+
export type RequestUnauthorizedError = LibSignalErrorCommon & {
|
|
241
|
+
code: ErrorCode.RequestUnauthorized;
|
|
242
|
+
};
|
|
243
|
+
export type MismatchedDevicesError = LibSignalErrorCommon & {
|
|
244
|
+
code: ErrorCode.MismatchedDevices;
|
|
245
|
+
readonly entries: MismatchedDevicesEntry[];
|
|
246
|
+
};
|
|
247
|
+
export type LibSignalError = GenericError | DuplicatedMessageError | SealedSenderSelfSendError | UntrustedIdentityError | InvalidRegistrationIdError | InvalidProtocolAddress | VerificationFailedError | InvalidSessionError | InvalidSenderKeySessionError | NicknameCannotBeEmptyError | CannotStartWithDigitError | MissingSeparatorError | BadNicknameCharacterError | NicknameTooShortError | NicknameTooLongError | DiscriminatorCannotBeEmptyError | DiscriminatorCannotBeZeroError | DiscriminatorCannotBeSingleDigitError | DiscriminatorCannotHaveLeadingZerosError | BadDiscriminatorCharacterError | DiscriminatorTooLargeError | InputDataTooLong | InvalidEntropyDataLength | InvalidUsernameLinkEncryptedData | IoError | CdsiInvalidTokenError | InvalidUriError | InvalidMediaInputError | SvrDataMissingError | SvrRestoreFailedError | SvrRequestFailedError | SvrAttestationError | SvrInvalidDataError | UnsupportedMediaInputError | ChatServiceInactive | AppExpiredError | DeviceDelinkedError | ConnectionInvalidatedError | ConnectedElsewhereError | RateLimitedError | RateLimitChallengeError | BackupValidationError | CancellationError | KeyTransparencyError | KeyTransparencyVerificationFailed | IncrementalMacVerificationFailed | RequestUnauthorizedError | MismatchedDevicesError;
|
|
248
|
+
export {};
|
package/dist/Errors.js
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
// Copyright 2021 Signal Messenger, LLC.
|
|
3
3
|
// SPDX-License-Identifier: AGPL-3.0-only
|
|
4
4
|
//
|
|
5
|
-
import { ProtocolAddress } from './Address.js';
|
|
5
|
+
import { ProtocolAddress, ServiceId } from './Address.js';
|
|
6
6
|
export var ErrorCode;
|
|
7
7
|
(function (ErrorCode) {
|
|
8
8
|
ErrorCode[ErrorCode["Generic"] = 0] = "Generic";
|
|
@@ -51,7 +51,30 @@ export var ErrorCode;
|
|
|
51
51
|
ErrorCode[ErrorCode["KeyTransparencyError"] = 43] = "KeyTransparencyError";
|
|
52
52
|
ErrorCode[ErrorCode["KeyTransparencyVerificationFailed"] = 44] = "KeyTransparencyVerificationFailed";
|
|
53
53
|
ErrorCode[ErrorCode["IncrementalMacVerificationFailed"] = 45] = "IncrementalMacVerificationFailed";
|
|
54
|
+
ErrorCode[ErrorCode["RequestUnauthorized"] = 46] = "RequestUnauthorized";
|
|
55
|
+
ErrorCode[ErrorCode["MismatchedDevices"] = 47] = "MismatchedDevices";
|
|
54
56
|
})(ErrorCode || (ErrorCode = {}));
|
|
57
|
+
/**
|
|
58
|
+
* A failure sending to a recipient on account of not being up to date on their devices.
|
|
59
|
+
*
|
|
60
|
+
* An entry in {@link MismatchedDevicesError}. Each entry represents a recipient that has either
|
|
61
|
+
* added, removed, or relinked some devices in their account (potentially including their primary
|
|
62
|
+
* device), as represented by the {@link MismatchedDevicesEntry#missingDevices},
|
|
63
|
+
* {@link MismatchedDevicesEntry#extraDevices}, and {@link MismatchedDevicesEntry#staleDevices}
|
|
64
|
+
* arrays, respectively. Handling the exception involves removing the "extra" devices and
|
|
65
|
+
* establishing new sessions for the "missing" and "stale" devices.
|
|
66
|
+
*/
|
|
67
|
+
export class MismatchedDevicesEntry {
|
|
68
|
+
constructor({ account, missingDevices, extraDevices, staleDevices, }) {
|
|
69
|
+
this.account =
|
|
70
|
+
account instanceof ServiceId
|
|
71
|
+
? account
|
|
72
|
+
: ServiceId.parseFromServiceIdFixedWidthBinary(account);
|
|
73
|
+
this.missingDevices = missingDevices ?? [];
|
|
74
|
+
this.extraDevices = extraDevices ?? [];
|
|
75
|
+
this.staleDevices = staleDevices ?? [];
|
|
76
|
+
}
|
|
77
|
+
}
|
|
55
78
|
export class LibSignalErrorBase extends Error {
|
|
56
79
|
constructor(message, name, operation, extraProps) {
|
|
57
80
|
super(message);
|
package/dist/MessageBackup.d.ts
CHANGED
package/dist/MessageBackup.js
CHANGED
package/dist/Minidump.js
CHANGED
package/dist/Mp4Sanitizer.d.ts
CHANGED