@signalapp/libsignal-client 0.58.3 → 0.59.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 CHANGED
@@ -508,6 +508,7 @@ export function TESTING_ChatServiceResponseConvert(bodyPresent: boolean): ChatRe
508
508
  export function TESTING_ChatService_InjectConnectionInterrupted(chat: Wrapper<AuthChat>): void;
509
509
  export function TESTING_ChatService_InjectIntentionalDisconnect(chat: Wrapper<AuthChat>): void;
510
510
  export function TESTING_ChatService_InjectRawServerRequest(chat: Wrapper<AuthChat>, bytes: Buffer): void;
511
+ export function TESTING_ConnectionManager_newLocalOverride(userAgent: string, chatPort: number, cdsiPort: number, svr2Port: number, svr3SgxPort: number, svr3NitroPort: number, svr3Tpm2SnpPort: number, rootCertificateDer: Buffer): ConnectionManager;
511
512
  export function TESTING_ErrorOnBorrowAsync(_input: null): Promise<void>;
512
513
  export function TESTING_ErrorOnBorrowIo(asyncRuntime: Wrapper<NonSuspendingBackgroundThreadRuntime>, _input: null): Promise<void>;
513
514
  export function TESTING_ErrorOnBorrowSync(_input: null): void;
@@ -0,0 +1,15 @@
1
+ /**
2
+ * The randomly-generated user-memorized entropy used to derive the backup key,
3
+ * with other possible future uses.
4
+ *
5
+ * Contains log_2(36^64) = ~330 bits of entropy.
6
+ */
7
+ export declare class AccountEntropyPool {
8
+ /**
9
+ * Randomly generates an Account Entropy Pool and returns the cannonical string
10
+ * representation of that pool.
11
+ *
12
+ * @returns cryptographically random 64 character string of characters a-z, 0-9
13
+ */
14
+ static generate(): string;
15
+ }
@@ -0,0 +1,34 @@
1
+ "use strict";
2
+ //
3
+ // Copyright 2024 Signal Messenger, LLC.
4
+ // SPDX-License-Identifier: AGPL-3.0-only
5
+ //
6
+ Object.defineProperty(exports, "__esModule", { value: true });
7
+ exports.AccountEntropyPool = void 0;
8
+ /**
9
+ * Cryptographic hashing, randomness generation, etc. related to SVR/Backup Keys.
10
+ *
11
+ * Currently only the Account Entropy Pool is exposed, because no other functionality is used on Desktop.
12
+ *
13
+ * @module AccountKeys
14
+ */
15
+ const Native = require("../Native");
16
+ /**
17
+ * The randomly-generated user-memorized entropy used to derive the backup key,
18
+ * with other possible future uses.
19
+ *
20
+ * Contains log_2(36^64) = ~330 bits of entropy.
21
+ */
22
+ class AccountEntropyPool {
23
+ /**
24
+ * Randomly generates an Account Entropy Pool and returns the cannonical string
25
+ * representation of that pool.
26
+ *
27
+ * @returns cryptographically random 64 character string of characters a-z, 0-9
28
+ */
29
+ static generate() {
30
+ return Native.AccountEntropyPool_Generate();
31
+ }
32
+ }
33
+ exports.AccountEntropyPool = AccountEntropyPool;
34
+ //# sourceMappingURL=AccountKeys.js.map
@@ -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.58.3, libsignal-jni 0.58.3, libsignal-jni-testing 0.58.3, libsignal-node 0.58.3, 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, libsignal-keytrans 0.0.1, signal-media 0.1.0, libsignal-message-backup 0.1.0, libsignal-message-backup-macros 0.1.0, libsignal-net 0.1.0, libsignal-net-infra 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
672
+ ## libsignal-account-keys 0.1.0, attest 0.1.0, libsignal-ffi 0.59.0, libsignal-jni 0.59.0, libsignal-jni-testing 0.59.0, libsignal-node 0.59.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, libsignal-keytrans 0.0.1, signal-media 0.1.0, libsignal-message-backup 0.1.0, libsignal-message-backup-macros 0.1.0, libsignal-net 0.1.0, libsignal-net-infra 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
package/dist/net.d.ts CHANGED
@@ -169,6 +169,21 @@ export declare class UnauthenticatedChatService implements ChatService {
169
169
  }): Promise<Native.ChatResponse>;
170
170
  }
171
171
  export declare function buildHttpRequest(chatRequest: ChatRequest): Wrapper<Native.HttpRequest>;
172
+ export type NetConstructorOptions = Readonly<{
173
+ localTestServer?: false;
174
+ env: Environment;
175
+ userAgent: string;
176
+ } | {
177
+ localTestServer: true;
178
+ userAgent: string;
179
+ TESTING_localServer_chatPort: number;
180
+ TESTING_localServer_cdsiPort: number;
181
+ TESTING_localServer_svr2Port: number;
182
+ TESTING_localServer_svr3SgxPort: number;
183
+ TESTING_localServer_svr3NitroPort: number;
184
+ TESTING_localServer_svr3Tpm2SnpPort: number;
185
+ TESTING_localServer_rootCertificateDer: Buffer;
186
+ }>;
172
187
  export declare class Net {
173
188
  private readonly asyncContext;
174
189
  private readonly connectionManager;
@@ -176,7 +191,7 @@ export declare class Net {
176
191
  * Instance of the {@link Svr3Client} to access SVR3.
177
192
  */
178
193
  svr3: Svr3Client;
179
- constructor(env: Environment, userAgent: string);
194
+ constructor(options: NetConstructorOptions);
180
195
  /**
181
196
  * Creates a new instance of {@link AuthenticatedChatService}.
182
197
  *
package/dist/net.js CHANGED
@@ -141,9 +141,14 @@ function buildHttpRequest(chatRequest) {
141
141
  }
142
142
  exports.buildHttpRequest = buildHttpRequest;
143
143
  class Net {
144
- constructor(env, userAgent) {
144
+ constructor(options) {
145
145
  this.asyncContext = new TokioAsyncContext(Native.TokioAsyncContext_new());
146
- this.connectionManager = newNativeHandle(Native.ConnectionManager_new(env, userAgent));
146
+ if (options.localTestServer) {
147
+ this.connectionManager = newNativeHandle(Native.TESTING_ConnectionManager_newLocalOverride(options.userAgent, options.TESTING_localServer_chatPort, options.TESTING_localServer_cdsiPort, options.TESTING_localServer_svr2Port, options.TESTING_localServer_svr3SgxPort, options.TESTING_localServer_svr3NitroPort, options.TESTING_localServer_svr3Tpm2SnpPort, options.TESTING_localServer_rootCertificateDer));
148
+ }
149
+ else {
150
+ this.connectionManager = newNativeHandle(Native.ConnectionManager_new(options.env, options.userAgent));
151
+ }
147
152
  this.svr3 = new Svr3ClientImpl(this.asyncContext, this.connectionManager);
148
153
  }
149
154
  /**
package/dist/pin.d.ts CHANGED
@@ -1,15 +1,3 @@
1
- /**
2
- * The randomly-generated user-memorized entropy used to derive the backup key,
3
- * with other possible future uses.
4
- *
5
- * Contains log_2(36^64) = ~330 bits of entropy.
6
- */
7
- export declare class AccountEntropyPool {
8
- /**
9
- * Randomly generates an Account Entropy Pool and returns the cannonical string
10
- * representation of that pool.
11
- *
12
- * @returns cryptographically random 64 character string of characters a-z, 0-9
13
- */
14
- static generate(): string;
15
- }
1
+ export {
2
+ /** @deprecated AccountEntropyPool was moved to 'AccountKeys' */
3
+ AccountEntropyPool, } from './AccountKeys';
package/dist/pin.js CHANGED
@@ -5,30 +5,7 @@
5
5
  //
6
6
  Object.defineProperty(exports, "__esModule", { value: true });
7
7
  exports.AccountEntropyPool = void 0;
8
- /**
9
- * Cryptographic hashing, randomness generation, etc. related to SVR/Backup Keys.
10
- *
11
- * Currently only the Account Entropy Pool is exposed, because no other functionality is used on Desktop.
12
- *
13
- * @module Pin
14
- */
15
- const Native = require("../Native");
16
- /**
17
- * The randomly-generated user-memorized entropy used to derive the backup key,
18
- * with other possible future uses.
19
- *
20
- * Contains log_2(36^64) = ~330 bits of entropy.
21
- */
22
- class AccountEntropyPool {
23
- /**
24
- * Randomly generates an Account Entropy Pool and returns the cannonical string
25
- * representation of that pool.
26
- *
27
- * @returns cryptographically random 64 character string of characters a-z, 0-9
28
- */
29
- static generate() {
30
- return Native.AccountEntropyPool_Generate();
31
- }
32
- }
33
- exports.AccountEntropyPool = AccountEntropyPool;
8
+ var AccountKeys_1 = require("./AccountKeys");
9
+ /** @deprecated AccountEntropyPool was moved to 'AccountKeys' */
10
+ Object.defineProperty(exports, "AccountEntropyPool", { enumerable: true, get: function () { return AccountKeys_1.AccountEntropyPool; } });
34
11
  //# sourceMappingURL=pin.js.map
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@signalapp/libsignal-client",
3
- "version": "0.58.3",
3
+ "version": "0.59.0",
4
4
  "license": "AGPL-3.0-only",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",