@signalapp/libsignal-client 0.66.2 → 0.67.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 +2 -1
- package/dist/acknowledgments.md +1 -1
- package/dist/net.d.ts +4 -5
- package/dist/net.js +8 -10
- 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
|
@@ -207,6 +207,7 @@ export function CallLinkSecretParams_GetPublicParams(paramsBytes: Buffer): Buffe
|
|
|
207
207
|
export function Cds2ClientState_New(mrenclave: Buffer, attestationMsg: Buffer, currentTimestamp: Timestamp): SgxClientState;
|
|
208
208
|
export function CdsiLookup_complete(asyncRuntime: Wrapper<TokioAsyncContext>, lookup: Wrapper<CdsiLookup>): CancellablePromise<LookupResponse>;
|
|
209
209
|
export function CdsiLookup_new(asyncRuntime: Wrapper<TokioAsyncContext>, connectionManager: Wrapper<ConnectionManager>, username: string, password: string, request: Wrapper<LookupRequest>): CancellablePromise<CdsiLookup>;
|
|
210
|
+
export function CdsiLookup_new_routes(asyncRuntime: Wrapper<TokioAsyncContext>, connectionManager: Wrapper<ConnectionManager>, username: string, password: string, request: Wrapper<LookupRequest>): CancellablePromise<CdsiLookup>;
|
|
210
211
|
export function CdsiLookup_token(lookup: Wrapper<CdsiLookup>): Buffer;
|
|
211
212
|
export function ChatConnectionInfo_description(connectionInfo: Wrapper<ChatConnectionInfo>): string;
|
|
212
213
|
export function ChatConnectionInfo_ip_version(connectionInfo: Wrapper<ChatConnectionInfo>): number;
|
|
@@ -455,7 +456,7 @@ export function ServerCertificate_GetKeyId(obj: Wrapper<ServerCertificate>): num
|
|
|
455
456
|
export function ServerCertificate_GetSerialized(obj: Wrapper<ServerCertificate>): Buffer;
|
|
456
457
|
export function ServerCertificate_GetSignature(obj: Wrapper<ServerCertificate>): Buffer;
|
|
457
458
|
export function ServerCertificate_New(keyId: number, serverKey: Wrapper<PublicKey>, trustRoot: Wrapper<PrivateKey>): ServerCertificate;
|
|
458
|
-
export function ServerMessageAck_SendStatus(
|
|
459
|
+
export function ServerMessageAck_SendStatus(ack: Wrapper<ServerMessageAck>, status: number): void;
|
|
459
460
|
export function ServerPublicParams_CreateAuthCredentialWithPniPresentationDeterministic(serverPublicParams: Wrapper<ServerPublicParams>, randomness: Buffer, groupSecretParams: Serialized<GroupSecretParams>, authCredentialWithPniBytes: Buffer): Buffer;
|
|
460
461
|
export function ServerPublicParams_CreateExpiringProfileKeyCredentialPresentationDeterministic(serverPublicParams: Wrapper<ServerPublicParams>, randomness: Buffer, groupSecretParams: Serialized<GroupSecretParams>, profileKeyCredential: Serialized<ExpiringProfileKeyCredential>): Buffer;
|
|
461
462
|
export function ServerPublicParams_CreateProfileKeyCredentialRequestContextDeterministic(serverPublicParams: Wrapper<ServerPublicParams>, randomness: Buffer, userId: Buffer, profileKey: Serialized<ProfileKey>): Serialized<ProfileKeyCredentialRequestContext>;
|
package/dist/acknowledgments.md
CHANGED
|
@@ -7094,7 +7094,7 @@ SOFTWARE.
|
|
|
7094
7094
|
|
|
7095
7095
|
```
|
|
7096
7096
|
|
|
7097
|
-
## curve25519-dalek-derive 0.1.1, adler2 2.0.0, anyhow 1.0.95, async-trait 0.1.86, atomic-waker 1.1.2, displaydoc 0.2.5, dyn-clone 1.0.18, fastrand 2.3.0, home 0.5.9, itoa 1.0.14, linkme-impl 0.3.31, linkme 0.3.31, linux-raw-sys 0.4.15, minimal-lexical 0.2.1, num_enum 0.7.3, num_enum_derive 0.7.3, once_cell 1.20.3, paste 1.0.15, pin-project-internal 1.1.9, pin-project-lite 0.2.16, pin-project 1.1.9, prettyplease 0.2.29, proc-macro-crate 3.2.0, proc-macro2 1.0.93, quote 1.0.38, rustc-hash 1.1.0, rustix 0.38.44, rustversion 1.0.19, semver 1.0.25, send_wrapper 0.6.0, serde 1.0.217, serde_derive 1.0.217, serde_json 1.0.138, syn-mid 0.6.0, syn 2.0.98, thiserror-impl 1.0.69, thiserror-impl 2.0.11, thiserror 1.0.69, thiserror 2.0.11, unicode-ident 1.0.16, utf-8 0.7.6
|
|
7097
|
+
## curve25519-dalek-derive 0.1.1, adler2 2.0.0, anyhow 1.0.95, async-trait 0.1.86, atomic-waker 1.1.2, auto_enums 0.8.7, derive_utils 0.15.0, displaydoc 0.2.5, dyn-clone 1.0.18, fastrand 2.3.0, home 0.5.9, itoa 1.0.14, linkme-impl 0.3.31, linkme 0.3.31, linux-raw-sys 0.4.15, minimal-lexical 0.2.1, num_enum 0.7.3, num_enum_derive 0.7.3, once_cell 1.20.3, paste 1.0.15, pin-project-internal 1.1.9, pin-project-lite 0.2.16, pin-project 1.1.9, prettyplease 0.2.29, proc-macro-crate 3.2.0, proc-macro2 1.0.93, quote 1.0.38, rustc-hash 1.1.0, rustix 0.38.44, rustversion 1.0.19, semver 1.0.25, send_wrapper 0.6.0, serde 1.0.217, serde_derive 1.0.217, serde_json 1.0.138, syn-mid 0.6.0, syn 2.0.98, thiserror-impl 1.0.69, thiserror-impl 2.0.11, thiserror 1.0.69, thiserror 2.0.11, unicode-ident 1.0.16, utf-8 0.7.6
|
|
7098
7098
|
|
|
7099
7099
|
```
|
|
7100
7100
|
Permission is hereby granted, free of charge, to any
|
package/dist/net.d.ts
CHANGED
|
@@ -23,6 +23,7 @@ export type CDSRequestOptionsType = {
|
|
|
23
23
|
*/
|
|
24
24
|
returnAcisWithoutUaks: boolean;
|
|
25
25
|
abortSignal?: AbortSignal;
|
|
26
|
+
useNewConnectLogic?: boolean;
|
|
26
27
|
};
|
|
27
28
|
export type CDSResponseEntryType<Aci, Pni> = {
|
|
28
29
|
aci: Aci | undefined;
|
|
@@ -49,11 +50,9 @@ export declare class TokioAsyncContext {
|
|
|
49
50
|
makeCancellable<T>(abortSignal: AbortSignal | undefined, promise: Native.CancellablePromise<T>): Promise<T>;
|
|
50
51
|
}
|
|
51
52
|
export declare class ChatServerMessageAck {
|
|
52
|
-
private readonly asyncContext;
|
|
53
53
|
readonly _nativeHandle: Native.ServerMessageAck;
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
send(statusCode: number): Promise<void>;
|
|
54
|
+
constructor(_nativeHandle: Native.ServerMessageAck);
|
|
55
|
+
send(statusCode: number): void;
|
|
57
56
|
}
|
|
58
57
|
export interface ConnectionEventsListener {
|
|
59
58
|
/**
|
|
@@ -280,6 +279,6 @@ export declare class Net {
|
|
|
280
279
|
* This will lead to, e.g. caches being cleared and cooldowns being reset.
|
|
281
280
|
*/
|
|
282
281
|
onNetworkChange(): void;
|
|
283
|
-
cdsiLookup({ username, password }: Readonly<ServiceAuth>, { e164s, acisAndAccessKeys, abortSignal, }: ReadonlyDeep<CDSRequestOptionsType>): Promise<CDSResponseType<string, string>>;
|
|
282
|
+
cdsiLookup({ username, password }: Readonly<ServiceAuth>, { e164s, acisAndAccessKeys, abortSignal, useNewConnectLogic, }: ReadonlyDeep<CDSRequestOptionsType>): Promise<CDSResponseType<string, string>>;
|
|
284
283
|
}
|
|
285
284
|
export {};
|
package/dist/net.js
CHANGED
|
@@ -44,16 +44,11 @@ class TokioAsyncContext {
|
|
|
44
44
|
}
|
|
45
45
|
exports.TokioAsyncContext = TokioAsyncContext;
|
|
46
46
|
class ChatServerMessageAck {
|
|
47
|
-
constructor(
|
|
48
|
-
this.asyncContext = asyncContext;
|
|
47
|
+
constructor(_nativeHandle) {
|
|
49
48
|
this._nativeHandle = _nativeHandle;
|
|
50
|
-
this.promise = null;
|
|
51
49
|
}
|
|
52
50
|
send(statusCode) {
|
|
53
|
-
|
|
54
|
-
this.promise = Native.ServerMessageAck_SendStatus(this.asyncContext, this, statusCode);
|
|
55
|
-
}
|
|
56
|
-
return this.promise;
|
|
51
|
+
Native.ServerMessageAck_SendStatus(this, statusCode);
|
|
57
52
|
}
|
|
58
53
|
}
|
|
59
54
|
exports.ChatServerMessageAck = ChatServerMessageAck;
|
|
@@ -187,7 +182,7 @@ function makeNativeChatListener(asyncContext, listener) {
|
|
|
187
182
|
if ('onQueueEmpty' in listener) {
|
|
188
183
|
return {
|
|
189
184
|
_incoming_message(envelope, timestamp, ack) {
|
|
190
|
-
listener.onIncomingMessage(envelope, timestamp, new ChatServerMessageAck(
|
|
185
|
+
listener.onIncomingMessage(envelope, timestamp, new ChatServerMessageAck(ack));
|
|
191
186
|
},
|
|
192
187
|
_queue_empty() {
|
|
193
188
|
listener.onQueueEmpty();
|
|
@@ -381,7 +376,7 @@ class Net {
|
|
|
381
376
|
onNetworkChange() {
|
|
382
377
|
Native.ConnectionManager_on_network_change(this._connectionManager);
|
|
383
378
|
}
|
|
384
|
-
async cdsiLookup({ username, password }, { e164s, acisAndAccessKeys, abortSignal, }) {
|
|
379
|
+
async cdsiLookup({ username, password }, { e164s, acisAndAccessKeys, abortSignal, useNewConnectLogic, }) {
|
|
385
380
|
const request = newNativeHandle(Native.LookupRequest_new());
|
|
386
381
|
e164s.forEach((e164) => {
|
|
387
382
|
Native.LookupRequest_addE164(request, e164);
|
|
@@ -389,7 +384,10 @@ class Net {
|
|
|
389
384
|
acisAndAccessKeys.forEach(({ aci: aciStr, accessKey: accessKeyStr }) => {
|
|
390
385
|
Native.LookupRequest_addAciAndAccessKey(request, Address_1.Aci.parseFromServiceIdString(aciStr).getServiceIdFixedWidthBinary(), node_buffer_1.Buffer.from(accessKeyStr, 'base64'));
|
|
391
386
|
});
|
|
392
|
-
const
|
|
387
|
+
const startLookup = useNewConnectLogic
|
|
388
|
+
? Native.CdsiLookup_new_routes
|
|
389
|
+
: Native.CdsiLookup_new;
|
|
390
|
+
const lookup = await this.asyncContext.makeCancellable(abortSignal, startLookup(this.asyncContext, this._connectionManager, username, password, request));
|
|
393
391
|
return await this.asyncContext.makeCancellable(abortSignal, Native.CdsiLookup_complete(this.asyncContext, newNativeHandle(lookup)));
|
|
394
392
|
}
|
|
395
393
|
}
|
package/package.json
CHANGED
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|