@signalapp/libsignal-client 0.57.1 → 0.58.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/Native.d.ts CHANGED
@@ -182,16 +182,18 @@ export function Cds2ClientState_New(mrenclave: Buffer, attestationMsg: Buffer, c
182
182
  export function CdsiLookup_complete(asyncRuntime: Wrapper<TokioAsyncContext>, lookup: Wrapper<CdsiLookup>): Promise<LookupResponse>;
183
183
  export function CdsiLookup_new(asyncRuntime: Wrapper<TokioAsyncContext>, connectionManager: Wrapper<ConnectionManager>, username: string, password: string, request: Wrapper<LookupRequest>): Promise<CdsiLookup>;
184
184
  export function CdsiLookup_token(lookup: Wrapper<CdsiLookup>): Buffer;
185
- export function ChatService_SetListenerAuth(runtime: Wrapper<TokioAsyncContext>, chat: Wrapper<Chat>, makeListener: MakeChatListener | null): void;
186
- export function ChatService_SetListenerUnauth(runtime: Wrapper<TokioAsyncContext>, chat: Wrapper<Chat>, makeListener: MakeChatListener | null): void;
187
- export function ChatService_auth_send(asyncRuntime: Wrapper<TokioAsyncContext>, chat: Wrapper<Chat>, httpRequest: Wrapper<HttpRequest>, timeoutMillis: number): Promise<ChatResponse>;
188
- export function ChatService_auth_send_and_debug(asyncRuntime: Wrapper<TokioAsyncContext>, chat: Wrapper<Chat>, httpRequest: Wrapper<HttpRequest>, timeoutMillis: number): Promise<ResponseAndDebugInfo>;
189
- export function ChatService_connect_auth(asyncRuntime: Wrapper<TokioAsyncContext>, chat: Wrapper<Chat>): Promise<ChatServiceDebugInfo>;
190
- export function ChatService_connect_unauth(asyncRuntime: Wrapper<TokioAsyncContext>, chat: Wrapper<Chat>): Promise<ChatServiceDebugInfo>;
191
- export function ChatService_disconnect(asyncRuntime: Wrapper<TokioAsyncContext>, chat: Wrapper<Chat>): Promise<void>;
192
- export function ChatService_new(connectionManager: Wrapper<ConnectionManager>, username: string, password: string, receiveStories: boolean): Chat;
193
- export function ChatService_unauth_send(asyncRuntime: Wrapper<TokioAsyncContext>, chat: Wrapper<Chat>, httpRequest: Wrapper<HttpRequest>, timeoutMillis: number): Promise<ChatResponse>;
194
- export function ChatService_unauth_send_and_debug(asyncRuntime: Wrapper<TokioAsyncContext>, chat: Wrapper<Chat>, httpRequest: Wrapper<HttpRequest>, timeoutMillis: number): Promise<ResponseAndDebugInfo>;
185
+ export function ChatService_SetListenerAuth(runtime: Wrapper<TokioAsyncContext>, chat: Wrapper<AuthChat>, makeListener: MakeChatListener | null): void;
186
+ export function ChatService_SetListenerUnauth(runtime: Wrapper<TokioAsyncContext>, chat: Wrapper<UnauthChat>, makeListener: MakeChatListener | null): void;
187
+ export function ChatService_auth_send(asyncRuntime: Wrapper<TokioAsyncContext>, chat: Wrapper<AuthChat>, httpRequest: Wrapper<HttpRequest>, timeoutMillis: number): Promise<ChatResponse>;
188
+ export function ChatService_auth_send_and_debug(asyncRuntime: Wrapper<TokioAsyncContext>, chat: Wrapper<AuthChat>, httpRequest: Wrapper<HttpRequest>, timeoutMillis: number): Promise<ResponseAndDebugInfo>;
189
+ export function ChatService_connect_auth(asyncRuntime: Wrapper<TokioAsyncContext>, chat: Wrapper<AuthChat>): Promise<ChatServiceDebugInfo>;
190
+ export function ChatService_connect_unauth(asyncRuntime: Wrapper<TokioAsyncContext>, chat: Wrapper<UnauthChat>): Promise<ChatServiceDebugInfo>;
191
+ export function ChatService_disconnect_auth(asyncRuntime: Wrapper<TokioAsyncContext>, chat: Wrapper<AuthChat>): Promise<void>;
192
+ export function ChatService_disconnect_unauth(asyncRuntime: Wrapper<TokioAsyncContext>, chat: Wrapper<UnauthChat>): Promise<void>;
193
+ export function ChatService_new_auth(connectionManager: Wrapper<ConnectionManager>, username: string, password: string, receiveStories: boolean): AuthChat;
194
+ export function ChatService_new_unauth(connectionManager: Wrapper<ConnectionManager>): UnauthChat;
195
+ export function ChatService_unauth_send(asyncRuntime: Wrapper<TokioAsyncContext>, chat: Wrapper<UnauthChat>, httpRequest: Wrapper<HttpRequest>, timeoutMillis: number): Promise<ChatResponse>;
196
+ export function ChatService_unauth_send_and_debug(asyncRuntime: Wrapper<TokioAsyncContext>, chat: Wrapper<UnauthChat>, httpRequest: Wrapper<HttpRequest>, timeoutMillis: number): Promise<ResponseAndDebugInfo>;
195
197
  export function CiphertextMessage_FromPlaintextContent(m: Wrapper<PlaintextContent>): CiphertextMessage;
196
198
  export function CiphertextMessage_Serialize(obj: Wrapper<CiphertextMessage>): Buffer;
197
199
  export function CiphertextMessage_Type(msg: Wrapper<CiphertextMessage>): number;
@@ -500,9 +502,9 @@ export function TESTING_ChatServiceDebugInfoConvert(): ChatServiceDebugInfo;
500
502
  export function TESTING_ChatServiceErrorConvert(errorDescription: string): void;
501
503
  export function TESTING_ChatServiceResponseAndDebugInfoConvert(): ResponseAndDebugInfo;
502
504
  export function TESTING_ChatServiceResponseConvert(bodyPresent: boolean): ChatResponse;
503
- export function TESTING_ChatService_InjectConnectionInterrupted(chat: Wrapper<Chat>): void;
504
- export function TESTING_ChatService_InjectIntentionalDisconnect(chat: Wrapper<Chat>): void;
505
- export function TESTING_ChatService_InjectRawServerRequest(chat: Wrapper<Chat>, bytes: Buffer): void;
505
+ export function TESTING_ChatService_InjectConnectionInterrupted(chat: Wrapper<AuthChat>): void;
506
+ export function TESTING_ChatService_InjectIntentionalDisconnect(chat: Wrapper<AuthChat>): void;
507
+ export function TESTING_ChatService_InjectRawServerRequest(chat: Wrapper<AuthChat>, bytes: Buffer): void;
506
508
  export function TESTING_ErrorOnBorrowAsync(_input: null): Promise<void>;
507
509
  export function TESTING_ErrorOnBorrowIo(asyncRuntime: Wrapper<NonSuspendingBackgroundThreadRuntime>, _input: null): Promise<void>;
508
510
  export function TESTING_ErrorOnBorrowSync(_input: null): void;
@@ -558,8 +560,8 @@ export function WebpSanitizer_Sanitize(input: SyncInputStream): void;
558
560
  export function initLogger(maxLevel: LogLevel, callback: (level: LogLevel, target: string, file: string | null, line: number | null, message: string) => void): void
559
561
  export function test_only_fn_returns_123(): number;
560
562
  interface Aes256GcmSiv { readonly __type: unique symbol; }
563
+ interface AuthChat { readonly __type: unique symbol; }
561
564
  interface CdsiLookup { readonly __type: unique symbol; }
562
- interface Chat { readonly __type: unique symbol; }
563
565
  interface CiphertextMessage { readonly __type: unique symbol; }
564
566
  interface ComparableBackup { readonly __type: unique symbol; }
565
567
  interface ComparableBackup { readonly __type: unique symbol; }
@@ -615,6 +617,7 @@ interface SignalMessage { readonly __type: unique symbol; }
615
617
  interface SignedPreKeyRecord { readonly __type: unique symbol; }
616
618
  interface TestingHandleType { readonly __type: unique symbol; }
617
619
  interface TokioAsyncContext { readonly __type: unique symbol; }
620
+ interface UnauthChat { readonly __type: unique symbol; }
618
621
  interface UnidentifiedSenderMessageContent { readonly __type: unique symbol; }
619
622
  interface UuidCiphertext { readonly __type: unique symbol; }
620
623
  interface ValidatingMac { readonly __type: unique symbol; }
package/dist/Errors.d.ts CHANGED
@@ -45,6 +45,7 @@ export declare class LibSignalErrorBase extends Error {
45
45
  readonly _addr?: string | Native.ProtocolAddress;
46
46
  constructor(message: string, name: keyof typeof ErrorCode | undefined, operation: string, extraProps?: Record<string, unknown>);
47
47
  get addr(): ProtocolAddress | string;
48
+ toString(): string;
48
49
  }
49
50
  export type LibSignalErrorCommon = Omit<LibSignalErrorBase, 'addr'>;
50
51
  export type GenericError = LibSignalErrorCommon & {
package/dist/Errors.js CHANGED
@@ -78,6 +78,9 @@ class LibSignalErrorBase extends Error {
78
78
  throw new TypeError(`cannot get address from this error (${this})`);
79
79
  }
80
80
  }
81
+ toString() {
82
+ return `${this.name} - ${this.operation}: ${this.message}`;
83
+ }
81
84
  }
82
85
  exports.LibSignalErrorBase = LibSignalErrorBase;
83
86
  //# sourceMappingURL=Errors.js.map