@signalapp/libsignal-client 0.54.1 → 0.55.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 +2 -2
- package/dist/acknowledgments.md +7 -7
- package/dist/incremental_mac.d.ts +2 -2
- package/dist/incremental_mac.js +4 -4
- package/dist/net.d.ts +12 -13
- package/dist/net.js +16 -4
- package/package.json +1 -1
- 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
CHANGED
|
@@ -29,7 +29,6 @@ interface ChatResponse {
|
|
|
29
29
|
}
|
|
30
30
|
|
|
31
31
|
interface ChatServiceDebugInfo {
|
|
32
|
-
reconnectCount: number;
|
|
33
32
|
ipType: number;
|
|
34
33
|
durationMillis: number;
|
|
35
34
|
connectionInfo: string;
|
|
@@ -180,7 +179,8 @@ export function Cds2ClientState_New(mrenclave: Buffer, attestationMsg: Buffer, c
|
|
|
180
179
|
export function CdsiLookup_complete(asyncRuntime: Wrapper<TokioAsyncContext>, lookup: Wrapper<CdsiLookup>): Promise<LookupResponse>;
|
|
181
180
|
export function CdsiLookup_new(asyncRuntime: Wrapper<TokioAsyncContext>, connectionManager: Wrapper<ConnectionManager>, username: string, password: string, request: Wrapper<LookupRequest>): Promise<CdsiLookup>;
|
|
182
181
|
export function CdsiLookup_token(lookup: Wrapper<CdsiLookup>): Buffer;
|
|
183
|
-
export function
|
|
182
|
+
export function ChatService_SetListenerAuth(runtime: Wrapper<TokioAsyncContext>, chat: Wrapper<Chat>, makeListener: MakeChatListener | null): void;
|
|
183
|
+
export function ChatService_SetListenerUnauth(runtime: Wrapper<TokioAsyncContext>, chat: Wrapper<Chat>, makeListener: MakeChatListener | null): void;
|
|
184
184
|
export function ChatService_auth_send(asyncRuntime: Wrapper<TokioAsyncContext>, chat: Wrapper<Chat>, httpRequest: Wrapper<HttpRequest>, timeoutMillis: number): Promise<ChatResponse>;
|
|
185
185
|
export function ChatService_auth_send_and_debug(asyncRuntime: Wrapper<TokioAsyncContext>, chat: Wrapper<Chat>, httpRequest: Wrapper<HttpRequest>, timeoutMillis: number): Promise<ResponseAndDebugInfo>;
|
|
186
186
|
export function ChatService_connect_auth(asyncRuntime: Wrapper<TokioAsyncContext>, chat: Wrapper<Chat>): Promise<ChatServiceDebugInfo>;
|
package/dist/acknowledgments.md
CHANGED
|
@@ -669,7 +669,7 @@ For more information on this, and how to apply and follow the GNU AGPL, see
|
|
|
669
669
|
|
|
670
670
|
```
|
|
671
671
|
|
|
672
|
-
## attest 0.1.0, libsignal-ffi 0.
|
|
672
|
+
## attest 0.1.0, libsignal-ffi 0.55.0, libsignal-jni 0.55.0, libsignal-jni-testing 0.55.0, libsignal-node 0.55.0, signal-neon-futures 0.1.0, signal-neon-futures-tests 0.1.0, libsignal-bridge 0.1.0, libsignal-bridge-macros 0.1.0, libsignal-bridge-testing 0.1.0, libsignal-bridge-types 0.1.0, libsignal-core 0.1.0, signal-crypto 0.1.0, device-transfer 0.1.0, signal-media 0.1.0, libsignal-message-backup 0.1.0, libsignal-message-backup-macros 0.1.0, libsignal-net 0.1.0, signal-pin 0.1.0, poksho 0.7.0, libsignal-protocol 0.1.0, libsignal-svr3 0.1.0, usernames 0.1.0, zkcredential 0.1.0, zkgroup 0.9.0
|
|
673
673
|
|
|
674
674
|
```
|
|
675
675
|
GNU AFFERO GENERAL PUBLIC LICENSE
|
|
@@ -1922,7 +1922,7 @@ limitations under the License.
|
|
|
1922
1922
|
|
|
1923
1923
|
```
|
|
1924
1924
|
|
|
1925
|
-
## boring 4.
|
|
1925
|
+
## boring 4.9.0
|
|
1926
1926
|
|
|
1927
1927
|
```
|
|
1928
1928
|
Copyright 2011-2017 Google Inc.
|
|
@@ -2357,7 +2357,7 @@ express Statement of Purpose.
|
|
|
2357
2357
|
CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
|
2358
2358
|
```
|
|
2359
2359
|
|
|
2360
|
-
## boring-sys 4.
|
|
2360
|
+
## boring-sys 4.9.0
|
|
2361
2361
|
|
|
2362
2362
|
```
|
|
2363
2363
|
/* Copyright (c) 2015, Google Inc.
|
|
@@ -2728,7 +2728,7 @@ DEALINGS IN THE SOFTWARE.
|
|
|
2728
2728
|
|
|
2729
2729
|
```
|
|
2730
2730
|
|
|
2731
|
-
## boring-sys 4.
|
|
2731
|
+
## boring-sys 4.9.0
|
|
2732
2732
|
|
|
2733
2733
|
```
|
|
2734
2734
|
Copyright (c) 2014 Alex Crichton
|
|
@@ -3287,7 +3287,7 @@ DEALINGS IN THE SOFTWARE.
|
|
|
3287
3287
|
|
|
3288
3288
|
```
|
|
3289
3289
|
|
|
3290
|
-
## boring-sys 4.
|
|
3290
|
+
## boring-sys 4.9.0
|
|
3291
3291
|
|
|
3292
3292
|
```
|
|
3293
3293
|
Copyright (c) 2015-2016 the fiat-crypto authors (see
|
|
@@ -3758,7 +3758,7 @@ SOFTWARE.
|
|
|
3758
3758
|
|
|
3759
3759
|
```
|
|
3760
3760
|
|
|
3761
|
-
## tokio-boring 4.
|
|
3761
|
+
## tokio-boring 4.9.0
|
|
3762
3762
|
|
|
3763
3763
|
```
|
|
3764
3764
|
Copyright (c) 2016 Tokio contributors
|
|
@@ -7031,7 +7031,7 @@ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
|
7031
7031
|
SOFTWARE.
|
|
7032
7032
|
```
|
|
7033
7033
|
|
|
7034
|
-
## boring-sys 4.
|
|
7034
|
+
## boring-sys 4.9.0, ring 0.17.8
|
|
7035
7035
|
|
|
7036
7036
|
```
|
|
7037
7037
|
/* ====================================================================
|
|
@@ -16,7 +16,7 @@ export declare class DigestingWritable extends stream.Writable {
|
|
|
16
16
|
_digests: Buffer[];
|
|
17
17
|
constructor(key: Buffer, sizeChoice: ChunkSizeChoice);
|
|
18
18
|
getFinalDigest(): Buffer;
|
|
19
|
-
_write(chunk: any,
|
|
19
|
+
_write(chunk: any, encoding: BufferEncoding, callback: (error?: Error | null) => void): void;
|
|
20
20
|
_final(callback: (error?: Error | null) => void): void;
|
|
21
21
|
}
|
|
22
22
|
export declare class ValidatingWritable extends stream.Writable {
|
|
@@ -24,7 +24,7 @@ export declare class ValidatingWritable extends stream.Writable {
|
|
|
24
24
|
_validatedBytes: number;
|
|
25
25
|
constructor(key: Buffer, sizeChoice: ChunkSizeChoice, digest: Buffer);
|
|
26
26
|
validatedSize(): number;
|
|
27
|
-
_write(chunk: any,
|
|
27
|
+
_write(chunk: any, encoding: BufferEncoding, callback: (error?: Error | null) => void): void;
|
|
28
28
|
_final(callback: (error?: Error | null) => void): void;
|
|
29
29
|
}
|
|
30
30
|
export declare function chunkSizeInBytes(sizeChoice: ChunkSizeChoice): number;
|
package/dist/incremental_mac.js
CHANGED
|
@@ -27,9 +27,9 @@ class DigestingWritable extends stream.Writable {
|
|
|
27
27
|
}
|
|
28
28
|
_write(
|
|
29
29
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any, @typescript-eslint/explicit-module-boundary-types
|
|
30
|
-
chunk,
|
|
30
|
+
chunk, encoding, callback) {
|
|
31
31
|
// eslint-disable-next-line @typescript-eslint/no-unsafe-argument
|
|
32
|
-
const buffer = Buffer.from(chunk,
|
|
32
|
+
const buffer = Buffer.from(chunk, encoding);
|
|
33
33
|
const next_digest = Native.IncrementalMac_Update(this, buffer, 0, buffer.length);
|
|
34
34
|
if (next_digest.length != 0) {
|
|
35
35
|
this._digests.push(next_digest);
|
|
@@ -53,9 +53,9 @@ class ValidatingWritable extends stream.Writable {
|
|
|
53
53
|
}
|
|
54
54
|
_write(
|
|
55
55
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any, @typescript-eslint/explicit-module-boundary-types
|
|
56
|
-
chunk,
|
|
56
|
+
chunk, encoding, callback) {
|
|
57
57
|
// eslint-disable-next-line @typescript-eslint/no-unsafe-argument
|
|
58
|
-
const buffer = Buffer.from(chunk,
|
|
58
|
+
const buffer = Buffer.from(chunk, encoding);
|
|
59
59
|
const validBytes = Native.ValidatingMac_Update(this, buffer, 0, buffer.length);
|
|
60
60
|
if (validBytes >= 0) {
|
|
61
61
|
this._validatedBytes += validBytes;
|
package/dist/net.d.ts
CHANGED
|
@@ -51,7 +51,16 @@ export declare class ChatServerMessageAck {
|
|
|
51
51
|
constructor(asyncContext: TokioAsyncContext, _nativeHandle: Native.ServerMessageAck);
|
|
52
52
|
send(statusCode: number): Promise<void>;
|
|
53
53
|
}
|
|
54
|
-
export interface
|
|
54
|
+
export interface ConnectionEventsListener {
|
|
55
|
+
/**
|
|
56
|
+
* Called when the client gets disconnected from the server.
|
|
57
|
+
*
|
|
58
|
+
* This includes both deliberate disconnects as well as unexpected socket closures that will be
|
|
59
|
+
* automatically retried.
|
|
60
|
+
*/
|
|
61
|
+
onConnectionInterrupted(): void;
|
|
62
|
+
}
|
|
63
|
+
export interface ChatServiceListener extends ConnectionEventsListener {
|
|
55
64
|
/**
|
|
56
65
|
* Called when the server delivers an incoming message to the client.
|
|
57
66
|
*
|
|
@@ -68,16 +77,6 @@ export interface ChatServiceListener {
|
|
|
68
77
|
* were in the queue *when the connection was established* have been delivered.
|
|
69
78
|
*/
|
|
70
79
|
onQueueEmpty(): void;
|
|
71
|
-
/**
|
|
72
|
-
* Called when the client gets disconnected from the server.
|
|
73
|
-
*
|
|
74
|
-
* This includes both deliberate disconnects as well as unexpected socket closures that will be
|
|
75
|
-
* automatically retried.
|
|
76
|
-
*
|
|
77
|
-
* Will not be called if no other requests have been invoked for this connection attempt. That is,
|
|
78
|
-
* you should never see this as the first callback, nor two of these callbacks in a row.
|
|
79
|
-
*/
|
|
80
|
-
onConnectionInterrupted(): void;
|
|
81
80
|
}
|
|
82
81
|
/**
|
|
83
82
|
* Provides API methods to connect and communicate with the Chat Service.
|
|
@@ -155,7 +154,7 @@ export declare class AuthenticatedChatService implements ChatService {
|
|
|
155
154
|
export declare class UnauthenticatedChatService implements ChatService {
|
|
156
155
|
private readonly asyncContext;
|
|
157
156
|
readonly chatService: Wrapper<Native.Chat>;
|
|
158
|
-
constructor(asyncContext: TokioAsyncContext, connectionManager: ConnectionManager);
|
|
157
|
+
constructor(asyncContext: TokioAsyncContext, connectionManager: ConnectionManager, listener: ConnectionEventsListener);
|
|
159
158
|
disconnect(): Promise<void>;
|
|
160
159
|
connect(options?: {
|
|
161
160
|
abortSignal?: AbortSignal;
|
|
@@ -188,7 +187,7 @@ export declare class Net {
|
|
|
188
187
|
/**
|
|
189
188
|
* Creates a new instance of {@link UnauthenticatedChatService}.
|
|
190
189
|
*/
|
|
191
|
-
newUnauthenticatedChatService(): UnauthenticatedChatService;
|
|
190
|
+
newUnauthenticatedChatService(listener: ConnectionEventsListener): UnauthenticatedChatService;
|
|
192
191
|
/**
|
|
193
192
|
* Enables/disables IPv6 for all new connections (until changed).
|
|
194
193
|
*
|
package/dist/net.js
CHANGED
|
@@ -77,7 +77,7 @@ class AuthenticatedChatService {
|
|
|
77
77
|
listener.onConnectionInterrupted();
|
|
78
78
|
},
|
|
79
79
|
};
|
|
80
|
-
Native.
|
|
80
|
+
Native.ChatService_SetListenerAuth(asyncContext, this.chatService, nativeChatListener);
|
|
81
81
|
}
|
|
82
82
|
disconnect() {
|
|
83
83
|
return Native.ChatService_disconnect(this.asyncContext, this.chatService);
|
|
@@ -97,9 +97,21 @@ exports.AuthenticatedChatService = AuthenticatedChatService;
|
|
|
97
97
|
* Provides API methods to connect and communicate with the Chat Service over an unauthenticated channel.
|
|
98
98
|
*/
|
|
99
99
|
class UnauthenticatedChatService {
|
|
100
|
-
constructor(asyncContext, connectionManager) {
|
|
100
|
+
constructor(asyncContext, connectionManager, listener) {
|
|
101
101
|
this.asyncContext = asyncContext;
|
|
102
102
|
this.chatService = newNativeHandle(Native.ChatService_new(connectionManager, '', '', false));
|
|
103
|
+
const nativeChatListener = {
|
|
104
|
+
_incoming_message(_envelope, _timestamp, _ack) {
|
|
105
|
+
throw new Error('Event not supported on unauthenticated connection');
|
|
106
|
+
},
|
|
107
|
+
_queue_empty() {
|
|
108
|
+
throw new Error('Event not supported on unauthenticated connection');
|
|
109
|
+
},
|
|
110
|
+
_connection_interrupted() {
|
|
111
|
+
listener.onConnectionInterrupted();
|
|
112
|
+
},
|
|
113
|
+
};
|
|
114
|
+
Native.ChatService_SetListenerUnauth(asyncContext, this.chatService, nativeChatListener);
|
|
103
115
|
}
|
|
104
116
|
disconnect() {
|
|
105
117
|
return Native.ChatService_disconnect(this.asyncContext, this.chatService);
|
|
@@ -148,8 +160,8 @@ class Net {
|
|
|
148
160
|
/**
|
|
149
161
|
* Creates a new instance of {@link UnauthenticatedChatService}.
|
|
150
162
|
*/
|
|
151
|
-
newUnauthenticatedChatService() {
|
|
152
|
-
return new UnauthenticatedChatService(this.asyncContext, this.connectionManager);
|
|
163
|
+
newUnauthenticatedChatService(listener) {
|
|
164
|
+
return new UnauthenticatedChatService(this.asyncContext, this.connectionManager, listener);
|
|
153
165
|
}
|
|
154
166
|
/**
|
|
155
167
|
* Enables/disables IPv6 for all new connections (until changed).
|
package/package.json
CHANGED
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|