@signalapp/libsignal-client 0.73.2 → 0.73.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/Native.d.ts CHANGED
@@ -609,6 +609,7 @@ export function TESTING_ChatResponseConvert(bodyPresent: boolean): ChatResponse;
609
609
  export function TESTING_ChatSendErrorConvert(errorDescription: string): void;
610
610
  export function TESTING_ConnectionManager_isUsingProxy(manager: Wrapper<ConnectionManager>): number;
611
611
  export function TESTING_ConnectionManager_newLocalOverride(userAgent: string, chatPort: number, cdsiPort: number, svr2Port: number, rootCertificateDer: Buffer): ConnectionManager;
612
+ export function TESTING_ConvertOptionalUuid(present: boolean): Uuid | null;
612
613
  export function TESTING_ErrorOnBorrowAsync(_input: null): Promise<void>;
613
614
  export function TESTING_ErrorOnBorrowIo(asyncRuntime: Wrapper<NonSuspendingBackgroundThreadRuntime>, _input: null): CancellablePromise<void>;
614
615
  export function TESTING_ErrorOnBorrowSync(_input: null): void;
@@ -639,6 +640,9 @@ export function TESTING_FutureProducesPointerType(asyncRuntime: Wrapper<NonSuspe
639
640
  export function TESTING_FutureSuccess(asyncRuntime: Wrapper<NonSuspendingBackgroundThreadRuntime>, input: number): CancellablePromise<number>;
640
641
  export function TESTING_InputStreamReadIntoZeroLengthSlice(capsAlphabetInput: InputStream): Promise<Buffer>;
641
642
  export function TESTING_JoinStringArray(array: string[], joinWith: string): string;
643
+ export function TESTING_KeyTransChatSendError(): void;
644
+ export function TESTING_KeyTransFatalVerificationFailure(): void;
645
+ export function TESTING_KeyTransNonFatalVerificationFailure(): void;
642
646
  export function TESTING_NonSuspendingBackgroundThreadRuntime_New(): NonSuspendingBackgroundThreadRuntime;
643
647
  export function TESTING_OtherTestingHandleType_getValue(handle: Wrapper<OtherTestingHandleType>): string;
644
648
  export function TESTING_PanicInBodyAsync(_input: null): Promise<void>;
package/dist/Errors.d.ts CHANGED
@@ -39,7 +39,9 @@ export declare enum ErrorCode {
39
39
  ConnectionInvalidated = 35,
40
40
  ConnectedElsewhere = 36,
41
41
  BackupValidation = 37,
42
- Cancelled = 38
42
+ Cancelled = 38,
43
+ KeyTransparencyError = 39,
44
+ KeyTransparencyVerificationFailed = 40
43
45
  }
44
46
  export declare class LibSignalErrorBase extends Error {
45
47
  readonly code: ErrorCode;
@@ -179,4 +181,10 @@ export type BackupValidationError = LibSignalErrorCommon & {
179
181
  export type CancellationError = LibSignalErrorCommon & {
180
182
  code: ErrorCode.Cancelled;
181
183
  };
182
- export type LibSignalError = GenericError | DuplicatedMessageError | SealedSenderSelfSendError | UntrustedIdentityError | InvalidRegistrationIdError | 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 | UnsupportedMediaInputError | ChatServiceInactive | AppExpiredError | DeviceDelinkedError | ConnectionInvalidatedError | ConnectedElsewhereError | RateLimitedError | BackupValidationError | CancellationError;
184
+ export type KeyTransparencyError = LibSignalErrorCommon & {
185
+ code: ErrorCode.KeyTransparencyError;
186
+ };
187
+ export type KeyTransparencyVerificationFailed = LibSignalErrorCommon & {
188
+ code: ErrorCode.KeyTransparencyVerificationFailed;
189
+ };
190
+ export type LibSignalError = GenericError | DuplicatedMessageError | SealedSenderSelfSendError | UntrustedIdentityError | InvalidRegistrationIdError | 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 | UnsupportedMediaInputError | ChatServiceInactive | AppExpiredError | DeviceDelinkedError | ConnectionInvalidatedError | ConnectedElsewhereError | RateLimitedError | BackupValidationError | CancellationError | KeyTransparencyError | KeyTransparencyVerificationFailed;
package/dist/Errors.js CHANGED
@@ -47,6 +47,8 @@ var ErrorCode;
47
47
  ErrorCode[ErrorCode["ConnectedElsewhere"] = 36] = "ConnectedElsewhere";
48
48
  ErrorCode[ErrorCode["BackupValidation"] = 37] = "BackupValidation";
49
49
  ErrorCode[ErrorCode["Cancelled"] = 38] = "Cancelled";
50
+ ErrorCode[ErrorCode["KeyTransparencyError"] = 39] = "KeyTransparencyError";
51
+ ErrorCode[ErrorCode["KeyTransparencyVerificationFailed"] = 40] = "KeyTransparencyVerificationFailed";
50
52
  })(ErrorCode || (exports.ErrorCode = ErrorCode = {}));
51
53
  class LibSignalErrorBase extends Error {
52
54
  constructor(message, name, operation, extraProps) {
@@ -96,7 +96,18 @@ export interface Client {
96
96
  * @returns A promise that resolves if the search succeeds and the local state has been updated
97
97
  * to reflect the latest changes. If the promise is rejected, the UI should be updated to notify
98
98
  * the user of the failure.
99
- */
99
+ *
100
+ * @throws {KeyTransparencyError} for errors related to key transparency logic, which
101
+ * includes missing required fields in the serialized data. Retrying the search without
102
+ * changing any of the arguments (including the state of the store) is unlikely to yield a
103
+ * different result.
104
+ * @throws {KeyTransparencyVerificationFailed} when it fails to
105
+ * verify the data in key transparency server response, such as an incorrect proof or a
106
+ * wrong signature.
107
+ * @throws {ChatServiceInactive} if the chat connection has been closed.
108
+ * @throws {IoError} if an error occurred while commuicating with the
109
+ * server.
110
+ * */
100
111
  search(request: Request, store: Store, options?: Readonly<Options>): Promise<void>;
101
112
  /**
102
113
  * Perform a monitor operation for an account previously searched for.
@@ -114,6 +125,17 @@ export interface Client {
114
125
  * @returns A promise that resolves if the monitor succeeds and the local state has been updated
115
126
  * to reflect the latest changes. If the promise is rejected, the UI should be updated to notify
116
127
  * the user of the failure.
128
+ *
129
+ * @throws {KeyTransparencyError} for errors related to key transparency logic, which
130
+ * includes missing required fields in the serialized data. Retrying the search without
131
+ * changing any of the arguments (including the state of the store) is unlikely to yield a
132
+ * different result.
133
+ * @throws {KeyTransparencyVerificationFailed} when it fails to
134
+ * verify the data in key transparency server response, such as an incorrect proof or a
135
+ * wrong signature.
136
+ * @throws {ChatServiceInactive} if the chat connection has been closed.
137
+ * @throws {IoError} if an error occurred while commuicating with the
138
+ * server.
117
139
  */
118
140
  monitor(request: Request, store: Store, options?: Readonly<Options>): Promise<void>;
119
141
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@signalapp/libsignal-client",
3
- "version": "0.73.2",
3
+ "version": "0.73.3",
4
4
  "license": "AGPL-3.0-only",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",