@signalapp/libsignal-client 0.88.3 → 0.89.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/dist/AccountKeys.d.ts +8 -8
- package/dist/AccountKeys.js +4 -2
- package/dist/Address.d.ts +8 -8
- package/dist/Address.js +7 -2
- package/dist/EcKeys.d.ts +14 -14
- package/dist/EcKeys.js +4 -0
- package/dist/Errors.d.ts +7 -3
- package/dist/Errors.js +8 -0
- package/dist/MessageBackup.d.ts +8 -8
- package/dist/MessageBackup.js +13 -0
- package/dist/Minidump.d.ts +1 -1
- package/dist/Mp4Sanitizer.d.ts +1 -1
- package/dist/Mp4Sanitizer.js +1 -0
- package/dist/Native.d.ts +23 -18
- package/dist/Native.js +2 -2
- package/dist/ProtocolTypes.d.ts +45 -0
- package/dist/ProtocolTypes.js +106 -0
- package/dist/SealedSenderMultiRecipientMessage.d.ts +3 -3
- package/dist/SealedSenderMultiRecipientMessage.js +4 -0
- package/dist/WebpSanitizer.d.ts +1 -1
- package/dist/incremental_mac.d.ts +5 -7
- package/dist/incremental_mac.js +7 -5
- package/dist/index.d.ts +85 -129
- package/dist/index.js +66 -128
- package/dist/internal.js +1 -0
- package/dist/io.d.ts +2 -2
- package/dist/net/Chat.d.ts +3 -3
- package/dist/net/Chat.js +14 -0
- package/dist/net/FakeChat.d.ts +4 -4
- package/dist/net/FakeChat.js +4 -0
- package/dist/net/KeyTransparency.d.ts +7 -7
- package/dist/net/KeyTransparency.js +3 -0
- package/dist/net/Registration.d.ts +4 -4
- package/dist/net/Registration.js +5 -0
- package/dist/net/SvrB.d.ts +6 -6
- package/dist/net/SvrB.js +6 -0
- package/dist/net/chat/UnauthKeysService.d.ts +30 -0
- package/dist/net/chat/UnauthKeysService.js +20 -0
- package/dist/net/chat/UnauthMessagesService.d.ts +1 -1
- package/dist/net/chat/UnauthMessagesService.js +1 -0
- package/dist/net/chat/UnauthUsernamesService.d.ts +3 -3
- package/dist/net/chat/UnauthUsernamesService.js +2 -2
- package/dist/net.d.ts +3 -2
- package/dist/net.js +7 -1
- package/dist/usernames.d.ts +8 -8
- package/dist/uuid.d.ts +1 -0
- package/dist/uuid.js +5 -1
- package/dist/zkgroup/GenericServerPublicParams.d.ts +1 -1
- package/dist/zkgroup/GenericServerPublicParams.js +1 -0
- package/dist/zkgroup/GenericServerSecretParams.d.ts +2 -2
- package/dist/zkgroup/GenericServerSecretParams.js +1 -0
- package/dist/zkgroup/NotarySignature.d.ts +1 -1
- package/dist/zkgroup/NotarySignature.js +3 -3
- package/dist/zkgroup/ServerPublicParams.d.ts +4 -4
- package/dist/zkgroup/ServerPublicParams.js +1 -0
- package/dist/zkgroup/ServerSecretParams.d.ts +5 -5
- package/dist/zkgroup/ServerSecretParams.js +1 -0
- package/dist/zkgroup/auth/AuthCredentialPresentation.d.ts +1 -1
- package/dist/zkgroup/auth/AuthCredentialPresentation.js +1 -0
- package/dist/zkgroup/auth/AuthCredentialWithPni.d.ts +1 -1
- package/dist/zkgroup/auth/AuthCredentialWithPni.js +1 -0
- package/dist/zkgroup/auth/AuthCredentialWithPniResponse.d.ts +1 -1
- package/dist/zkgroup/auth/AuthCredentialWithPniResponse.js +1 -0
- package/dist/zkgroup/auth/ClientZkAuthOperations.d.ts +1 -1
- package/dist/zkgroup/auth/ClientZkAuthOperations.js +1 -0
- package/dist/zkgroup/auth/ServerZkAuthOperations.d.ts +1 -1
- package/dist/zkgroup/auth/ServerZkAuthOperations.js +1 -0
- package/dist/zkgroup/backups/BackupAuthCredential.d.ts +3 -3
- package/dist/zkgroup/backups/BackupAuthCredential.js +1 -0
- package/dist/zkgroup/backups/BackupAuthCredentialPresentation.d.ts +2 -2
- package/dist/zkgroup/backups/BackupAuthCredentialPresentation.js +1 -0
- package/dist/zkgroup/backups/BackupAuthCredentialRequest.d.ts +2 -2
- package/dist/zkgroup/backups/BackupAuthCredentialRequest.js +1 -0
- package/dist/zkgroup/backups/BackupAuthCredentialRequestContext.d.ts +3 -3
- package/dist/zkgroup/backups/BackupAuthCredentialRequestContext.js +3 -2
- package/dist/zkgroup/backups/BackupAuthCredentialResponse.d.ts +1 -1
- package/dist/zkgroup/backups/BackupAuthCredentialResponse.js +1 -0
- package/dist/zkgroup/calllinks/CallLinkAuthCredential.d.ts +2 -2
- package/dist/zkgroup/calllinks/CallLinkAuthCredential.js +1 -0
- package/dist/zkgroup/calllinks/CallLinkAuthCredentialPresentation.d.ts +1 -1
- package/dist/zkgroup/calllinks/CallLinkAuthCredentialPresentation.js +1 -0
- package/dist/zkgroup/calllinks/CallLinkAuthCredentialResponse.d.ts +2 -2
- package/dist/zkgroup/calllinks/CallLinkAuthCredentialResponse.js +1 -0
- package/dist/zkgroup/calllinks/CallLinkPublicParams.d.ts +1 -1
- package/dist/zkgroup/calllinks/CallLinkPublicParams.js +1 -0
- package/dist/zkgroup/calllinks/CallLinkSecretParams.d.ts +2 -2
- package/dist/zkgroup/calllinks/CallLinkSecretParams.js +1 -0
- package/dist/zkgroup/calllinks/CreateCallLinkCredential.d.ts +3 -3
- package/dist/zkgroup/calllinks/CreateCallLinkCredential.js +1 -0
- package/dist/zkgroup/calllinks/CreateCallLinkCredentialPresentation.d.ts +2 -2
- package/dist/zkgroup/calllinks/CreateCallLinkCredentialPresentation.js +1 -0
- package/dist/zkgroup/calllinks/CreateCallLinkCredentialRequest.d.ts +2 -2
- package/dist/zkgroup/calllinks/CreateCallLinkCredentialRequest.js +1 -0
- package/dist/zkgroup/calllinks/CreateCallLinkCredentialRequestContext.d.ts +3 -3
- package/dist/zkgroup/calllinks/CreateCallLinkCredentialRequestContext.js +1 -0
- package/dist/zkgroup/calllinks/CreateCallLinkCredentialResponse.d.ts +1 -1
- package/dist/zkgroup/calllinks/CreateCallLinkCredentialResponse.js +1 -0
- package/dist/zkgroup/groups/ClientZkGroupCipher.d.ts +3 -3
- package/dist/zkgroup/groups/ClientZkGroupCipher.js +1 -0
- package/dist/zkgroup/groups/GroupIdentifier.d.ts +1 -1
- package/dist/zkgroup/groups/GroupIdentifier.js +3 -3
- package/dist/zkgroup/groups/GroupMasterKey.d.ts +1 -1
- package/dist/zkgroup/groups/GroupMasterKey.js +3 -3
- package/dist/zkgroup/groups/GroupPublicParams.d.ts +1 -1
- package/dist/zkgroup/groups/GroupPublicParams.js +1 -0
- package/dist/zkgroup/groups/GroupSecretParams.d.ts +2 -2
- package/dist/zkgroup/groups/GroupSecretParams.js +1 -0
- package/dist/zkgroup/groups/ProfileKeyCiphertext.d.ts +1 -1
- package/dist/zkgroup/groups/ProfileKeyCiphertext.js +1 -0
- package/dist/zkgroup/groups/UuidCiphertext.d.ts +2 -2
- package/dist/zkgroup/groups/UuidCiphertext.js +1 -0
- package/dist/zkgroup/groupsend/GroupSendDerivedKeyPair.d.ts +1 -1
- package/dist/zkgroup/groupsend/GroupSendEndorsement.d.ts +1 -1
- package/dist/zkgroup/groupsend/GroupSendEndorsementsResponse.d.ts +2 -2
- package/dist/zkgroup/groupsend/GroupSendFullToken.d.ts +1 -1
- package/dist/zkgroup/groupsend/GroupSendToken.d.ts +1 -1
- package/dist/zkgroup/internal/ByteArray.d.ts +5 -5
- package/dist/zkgroup/internal/ByteArray.js +1 -0
- package/dist/zkgroup/profiles/ClientZkProfileOperations.d.ts +2 -2
- package/dist/zkgroup/profiles/ClientZkProfileOperations.js +1 -0
- package/dist/zkgroup/profiles/ExpiringProfileKeyCredential.d.ts +1 -1
- package/dist/zkgroup/profiles/ExpiringProfileKeyCredential.js +1 -0
- package/dist/zkgroup/profiles/ExpiringProfileKeyCredentialResponse.d.ts +1 -1
- package/dist/zkgroup/profiles/ExpiringProfileKeyCredentialResponse.js +1 -0
- package/dist/zkgroup/profiles/ProfileKey.d.ts +2 -2
- package/dist/zkgroup/profiles/ProfileKey.js +3 -3
- package/dist/zkgroup/profiles/ProfileKeyCommitment.d.ts +1 -1
- package/dist/zkgroup/profiles/ProfileKeyCommitment.js +1 -0
- package/dist/zkgroup/profiles/ProfileKeyCredentialPresentation.d.ts +1 -1
- package/dist/zkgroup/profiles/ProfileKeyCredentialPresentation.js +1 -0
- package/dist/zkgroup/profiles/ProfileKeyCredentialRequest.d.ts +1 -1
- package/dist/zkgroup/profiles/ProfileKeyCredentialRequest.js +1 -0
- package/dist/zkgroup/profiles/ProfileKeyCredentialRequestContext.d.ts +1 -1
- package/dist/zkgroup/profiles/ProfileKeyCredentialRequestContext.js +1 -0
- package/dist/zkgroup/profiles/ProfileKeyVersion.d.ts +1 -1
- package/dist/zkgroup/profiles/ProfileKeyVersion.js +3 -3
- package/dist/zkgroup/profiles/ServerZkProfileOperations.d.ts +1 -1
- package/dist/zkgroup/profiles/ServerZkProfileOperations.js +1 -0
- package/dist/zkgroup/receipts/ClientZkReceiptOperations.d.ts +2 -2
- package/dist/zkgroup/receipts/ClientZkReceiptOperations.js +1 -0
- package/dist/zkgroup/receipts/ReceiptCredential.d.ts +1 -1
- package/dist/zkgroup/receipts/ReceiptCredential.js +1 -0
- package/dist/zkgroup/receipts/ReceiptCredentialPresentation.d.ts +1 -1
- package/dist/zkgroup/receipts/ReceiptCredentialPresentation.js +3 -3
- package/dist/zkgroup/receipts/ReceiptCredentialRequest.d.ts +1 -1
- package/dist/zkgroup/receipts/ReceiptCredentialRequest.js +1 -0
- package/dist/zkgroup/receipts/ReceiptCredentialRequestContext.d.ts +1 -1
- package/dist/zkgroup/receipts/ReceiptCredentialRequestContext.js +3 -3
- package/dist/zkgroup/receipts/ReceiptCredentialResponse.d.ts +1 -1
- package/dist/zkgroup/receipts/ReceiptCredentialResponse.js +1 -0
- package/dist/zkgroup/receipts/ReceiptSerial.d.ts +1 -1
- package/dist/zkgroup/receipts/ReceiptSerial.js +3 -3
- package/dist/zkgroup/receipts/ServerZkReceiptOperations.d.ts +1 -1
- package/dist/zkgroup/receipts/ServerZkReceiptOperations.js +1 -0
- package/package.json +3 -3
- 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
|
@@ -2,17 +2,18 @@
|
|
|
2
2
|
// Copyright 2023 Signal Messenger, LLC.
|
|
3
3
|
// SPDX-License-Identifier: AGPL-3.0-only
|
|
4
4
|
//
|
|
5
|
-
import * as uuid from 'uuid';
|
|
6
5
|
import ByteArray from '../internal/ByteArray.js';
|
|
7
6
|
import * as Native from '../../Native.js';
|
|
8
7
|
import BackupAuthCredentialRequest from './BackupAuthCredentialRequest.js';
|
|
9
8
|
import BackupAuthCredential from './BackupAuthCredential.js';
|
|
9
|
+
import { parseUuid } from '../../index.js';
|
|
10
10
|
export default class BackupAuthCredentialRequestContext extends ByteArray {
|
|
11
|
+
__type;
|
|
11
12
|
constructor(contents) {
|
|
12
13
|
super(contents, Native.BackupAuthCredentialRequestContext_CheckValidContents);
|
|
13
14
|
}
|
|
14
15
|
static create(backupKey, aci) {
|
|
15
|
-
return new BackupAuthCredentialRequestContext(Native.BackupAuthCredentialRequestContext_New(backupKey,
|
|
16
|
+
return new BackupAuthCredentialRequestContext(Native.BackupAuthCredentialRequestContext_New(backupKey, parseUuid(aci)));
|
|
16
17
|
}
|
|
17
18
|
getRequest() {
|
|
18
19
|
return new BackupAuthCredentialRequest(Native.BackupAuthCredentialRequestContext_GetRequest(this.contents));
|
|
@@ -5,6 +5,7 @@
|
|
|
5
5
|
import ByteArray from '../internal/ByteArray.js';
|
|
6
6
|
import * as Native from '../../Native.js';
|
|
7
7
|
export default class BackupAuthCredentialResponse extends ByteArray {
|
|
8
|
+
__type;
|
|
8
9
|
constructor(contents) {
|
|
9
10
|
super(contents, Native.BackupAuthCredentialResponse_CheckValidContents);
|
|
10
11
|
}
|
|
@@ -5,7 +5,7 @@ import GenericServerPublicParams from '../GenericServerPublicParams.js';
|
|
|
5
5
|
import { Aci } from '../../Address.js';
|
|
6
6
|
export default class CallLinkAuthCredential extends ByteArray {
|
|
7
7
|
private readonly __type?;
|
|
8
|
-
constructor(contents: Uint8Array);
|
|
8
|
+
constructor(contents: Uint8Array<ArrayBuffer>);
|
|
9
9
|
present(userId: Aci, redemptionTime: number, serverParams: GenericServerPublicParams, callLinkParams: CallLinkSecretParams): CallLinkAuthCredentialPresentation;
|
|
10
|
-
presentWithRandom(userId: Aci, redemptionTime: number, serverParams: GenericServerPublicParams, callLinkParams: CallLinkSecretParams, random: Uint8Array): CallLinkAuthCredentialPresentation;
|
|
10
|
+
presentWithRandom(userId: Aci, redemptionTime: number, serverParams: GenericServerPublicParams, callLinkParams: CallLinkSecretParams, random: Uint8Array<ArrayBuffer>): CallLinkAuthCredentialPresentation;
|
|
11
11
|
}
|
|
@@ -8,6 +8,7 @@ import { RANDOM_LENGTH } from '../internal/Constants.js';
|
|
|
8
8
|
import * as Native from '../../Native.js';
|
|
9
9
|
import CallLinkAuthCredentialPresentation from './CallLinkAuthCredentialPresentation.js';
|
|
10
10
|
export default class CallLinkAuthCredential extends ByteArray {
|
|
11
|
+
__type;
|
|
11
12
|
constructor(contents) {
|
|
12
13
|
super(contents, Native.CallLinkAuthCredential_CheckValidContents);
|
|
13
14
|
}
|
|
@@ -4,7 +4,7 @@ import GenericServerSecretParams from '../GenericServerSecretParams.js';
|
|
|
4
4
|
import UuidCiphertext from '../groups/UuidCiphertext.js';
|
|
5
5
|
export default class CallLinkAuthCredentialPresentation extends ByteArray {
|
|
6
6
|
private readonly __type?;
|
|
7
|
-
constructor(contents: Uint8Array);
|
|
7
|
+
constructor(contents: Uint8Array<ArrayBuffer>);
|
|
8
8
|
verify(serverParams: GenericServerSecretParams, callLinkParams: CallLinkPublicParams, now?: Date): void;
|
|
9
9
|
getUserId(): UuidCiphertext;
|
|
10
10
|
}
|
|
@@ -6,6 +6,7 @@ import ByteArray from '../internal/ByteArray.js';
|
|
|
6
6
|
import * as Native from '../../Native.js';
|
|
7
7
|
import UuidCiphertext from '../groups/UuidCiphertext.js';
|
|
8
8
|
export default class CallLinkAuthCredentialPresentation extends ByteArray {
|
|
9
|
+
__type;
|
|
9
10
|
constructor(contents) {
|
|
10
11
|
super(contents, Native.CallLinkAuthCredentialPresentation_CheckValidContents);
|
|
11
12
|
}
|
|
@@ -5,8 +5,8 @@ import CallLinkAuthCredential from './CallLinkAuthCredential.js';
|
|
|
5
5
|
import { Aci } from '../../Address.js';
|
|
6
6
|
export default class CallLinkAuthCredentialResponse extends ByteArray {
|
|
7
7
|
private readonly __type?;
|
|
8
|
-
constructor(contents: Uint8Array);
|
|
8
|
+
constructor(contents: Uint8Array<ArrayBuffer>);
|
|
9
9
|
static issueCredential(userId: Aci, redemptionTime: number, params: GenericServerSecretParams): CallLinkAuthCredentialResponse;
|
|
10
|
-
static issueCredentialWithRandom(userId: Aci, redemptionTime: number, params: GenericServerSecretParams, random: Uint8Array): CallLinkAuthCredentialResponse;
|
|
10
|
+
static issueCredentialWithRandom(userId: Aci, redemptionTime: number, params: GenericServerSecretParams, random: Uint8Array<ArrayBuffer>): CallLinkAuthCredentialResponse;
|
|
11
11
|
receive(userId: Aci, redemptionTime: number, params: GenericServerPublicParams): CallLinkAuthCredential;
|
|
12
12
|
}
|
|
@@ -8,6 +8,7 @@ import * as Native from '../../Native.js';
|
|
|
8
8
|
import { RANDOM_LENGTH } from '../internal/Constants.js';
|
|
9
9
|
import CallLinkAuthCredential from './CallLinkAuthCredential.js';
|
|
10
10
|
export default class CallLinkAuthCredentialResponse extends ByteArray {
|
|
11
|
+
__type;
|
|
11
12
|
constructor(contents) {
|
|
12
13
|
super(contents, Native.CallLinkAuthCredentialResponse_CheckValidContents);
|
|
13
14
|
}
|
|
@@ -5,6 +5,7 @@
|
|
|
5
5
|
import ByteArray from '../internal/ByteArray.js';
|
|
6
6
|
import * as Native from '../../Native.js';
|
|
7
7
|
export default class CallLinkPublicParams extends ByteArray {
|
|
8
|
+
__type;
|
|
8
9
|
constructor(contents) {
|
|
9
10
|
super(contents, Native.CallLinkPublicParams_CheckValidContents);
|
|
10
11
|
}
|
|
@@ -4,8 +4,8 @@ import UuidCiphertext from '../groups/UuidCiphertext.js';
|
|
|
4
4
|
import { Aci } from '../../Address.js';
|
|
5
5
|
export default class CallLinkSecretParams extends ByteArray {
|
|
6
6
|
private readonly __type?;
|
|
7
|
-
static deriveFromRootKey(callLinkRootKey: Uint8Array): CallLinkSecretParams;
|
|
8
|
-
constructor(contents: Uint8Array);
|
|
7
|
+
static deriveFromRootKey(callLinkRootKey: Uint8Array<ArrayBuffer>): CallLinkSecretParams;
|
|
8
|
+
constructor(contents: Uint8Array<ArrayBuffer>);
|
|
9
9
|
getPublicParams(): CallLinkPublicParams;
|
|
10
10
|
decryptUserId(userId: UuidCiphertext): Aci;
|
|
11
11
|
encryptUserId(userId: Aci): UuidCiphertext;
|
|
@@ -8,6 +8,7 @@ import CallLinkPublicParams from './CallLinkPublicParams.js';
|
|
|
8
8
|
import UuidCiphertext from '../groups/UuidCiphertext.js';
|
|
9
9
|
import { Aci } from '../../Address.js';
|
|
10
10
|
export default class CallLinkSecretParams extends ByteArray {
|
|
11
|
+
__type;
|
|
11
12
|
static deriveFromRootKey(callLinkRootKey) {
|
|
12
13
|
return new CallLinkSecretParams(Native.CallLinkSecretParams_DeriveFromRootKey(callLinkRootKey));
|
|
13
14
|
}
|
|
@@ -5,7 +5,7 @@ import GenericServerPublicParams from '../GenericServerPublicParams.js';
|
|
|
5
5
|
import { Aci } from '../../Address.js';
|
|
6
6
|
export default class CreateCallLinkCredential extends ByteArray {
|
|
7
7
|
private readonly __type?;
|
|
8
|
-
constructor(contents: Uint8Array);
|
|
9
|
-
present(roomId: Uint8Array
|
|
10
|
-
presentWithRandom(roomId: Uint8Array
|
|
8
|
+
constructor(contents: Uint8Array<ArrayBuffer>);
|
|
9
|
+
present(roomId: Uint8Array<ArrayBuffer>, userId: Aci, serverParams: GenericServerPublicParams, callLinkParams: CallLinkSecretParams): CreateCallLinkCredentialPresentation;
|
|
10
|
+
presentWithRandom(roomId: Uint8Array<ArrayBuffer>, userId: Aci, serverParams: GenericServerPublicParams, callLinkParams: CallLinkSecretParams, random: Uint8Array<ArrayBuffer>): CreateCallLinkCredentialPresentation;
|
|
11
11
|
}
|
|
@@ -8,6 +8,7 @@ import { RANDOM_LENGTH } from '../internal/Constants.js';
|
|
|
8
8
|
import * as Native from '../../Native.js';
|
|
9
9
|
import CreateCallLinkCredentialPresentation from './CreateCallLinkCredentialPresentation.js';
|
|
10
10
|
export default class CreateCallLinkCredential extends ByteArray {
|
|
11
|
+
__type;
|
|
11
12
|
constructor(contents) {
|
|
12
13
|
super(contents, Native.CreateCallLinkCredential_CheckValidContents);
|
|
13
14
|
}
|
|
@@ -3,6 +3,6 @@ import CallLinkPublicParams from './CallLinkPublicParams.js';
|
|
|
3
3
|
import GenericServerSecretParams from '../GenericServerSecretParams.js';
|
|
4
4
|
export default class CreateCallLinkCredentialPresentation extends ByteArray {
|
|
5
5
|
private readonly __type?;
|
|
6
|
-
constructor(contents: Uint8Array);
|
|
7
|
-
verify(roomId: Uint8Array
|
|
6
|
+
constructor(contents: Uint8Array<ArrayBuffer>);
|
|
7
|
+
verify(roomId: Uint8Array<ArrayBuffer>, serverParams: GenericServerSecretParams, callLinkParams: CallLinkPublicParams, now?: Date): void;
|
|
8
8
|
}
|
|
@@ -5,6 +5,7 @@
|
|
|
5
5
|
import ByteArray from '../internal/ByteArray.js';
|
|
6
6
|
import * as Native from '../../Native.js';
|
|
7
7
|
export default class CreateCallLinkCredentialPresentation extends ByteArray {
|
|
8
|
+
__type;
|
|
8
9
|
constructor(contents) {
|
|
9
10
|
super(contents, Native.CreateCallLinkCredentialPresentation_CheckValidContents);
|
|
10
11
|
}
|
|
@@ -4,7 +4,7 @@ import GenericServerSecretParams from '../GenericServerSecretParams.js';
|
|
|
4
4
|
import { Aci } from '../../Address.js';
|
|
5
5
|
export default class CreateCallLinkCredentialRequest extends ByteArray {
|
|
6
6
|
private readonly __type?;
|
|
7
|
-
constructor(contents: Uint8Array);
|
|
7
|
+
constructor(contents: Uint8Array<ArrayBuffer>);
|
|
8
8
|
issueCredential(userId: Aci, timestamp: number, params: GenericServerSecretParams): CreateCallLinkCredentialResponse;
|
|
9
|
-
issueCredentialWithRandom(userId: Aci, timestamp: number, params: GenericServerSecretParams, random: Uint8Array): CreateCallLinkCredentialResponse;
|
|
9
|
+
issueCredentialWithRandom(userId: Aci, timestamp: number, params: GenericServerSecretParams, random: Uint8Array<ArrayBuffer>): CreateCallLinkCredentialResponse;
|
|
10
10
|
}
|
|
@@ -8,6 +8,7 @@ import { RANDOM_LENGTH } from '../internal/Constants.js';
|
|
|
8
8
|
import * as Native from '../../Native.js';
|
|
9
9
|
import CreateCallLinkCredentialResponse from './CreateCallLinkCredentialResponse.js';
|
|
10
10
|
export default class CreateCallLinkCredentialRequest extends ByteArray {
|
|
11
|
+
__type;
|
|
11
12
|
constructor(contents) {
|
|
12
13
|
super(contents, Native.CreateCallLinkCredentialRequest_CheckValidContents);
|
|
13
14
|
}
|
|
@@ -6,9 +6,9 @@ import GenericServerPublicParams from '../GenericServerPublicParams.js';
|
|
|
6
6
|
import { Aci } from '../../Address.js';
|
|
7
7
|
export default class CreateCallLinkCredentialRequestContext extends ByteArray {
|
|
8
8
|
private readonly __type?;
|
|
9
|
-
constructor(contents: Uint8Array);
|
|
10
|
-
static forRoomId(roomId: Uint8Array): CreateCallLinkCredentialRequestContext;
|
|
11
|
-
static forRoomIdWithRandom(roomId: Uint8Array
|
|
9
|
+
constructor(contents: Uint8Array<ArrayBuffer>);
|
|
10
|
+
static forRoomId(roomId: Uint8Array<ArrayBuffer>): CreateCallLinkCredentialRequestContext;
|
|
11
|
+
static forRoomIdWithRandom(roomId: Uint8Array<ArrayBuffer>, random: Uint8Array<ArrayBuffer>): CreateCallLinkCredentialRequestContext;
|
|
12
12
|
getRequest(): CreateCallLinkCredentialRequest;
|
|
13
13
|
receive(response: CreateCallLinkCredentialResponse, userId: Aci, params: GenericServerPublicParams): CreateCallLinkCredential;
|
|
14
14
|
}
|
|
@@ -9,6 +9,7 @@ import * as Native from '../../Native.js';
|
|
|
9
9
|
import CreateCallLinkCredentialRequest from './CreateCallLinkCredentialRequest.js';
|
|
10
10
|
import CreateCallLinkCredential from './CreateCallLinkCredential.js';
|
|
11
11
|
export default class CreateCallLinkCredentialRequestContext extends ByteArray {
|
|
12
|
+
__type;
|
|
12
13
|
constructor(contents) {
|
|
13
14
|
super(contents, Native.CreateCallLinkCredentialRequestContext_CheckValidContents);
|
|
14
15
|
}
|
|
@@ -5,6 +5,7 @@
|
|
|
5
5
|
import ByteArray from '../internal/ByteArray.js';
|
|
6
6
|
import * as Native from '../../Native.js';
|
|
7
7
|
export default class CreateCallLinkCredentialResponse extends ByteArray {
|
|
8
|
+
__type;
|
|
8
9
|
constructor(contents) {
|
|
9
10
|
super(contents, Native.CreateCallLinkCredentialResponse_CheckValidContents);
|
|
10
11
|
}
|
|
@@ -10,7 +10,7 @@ export default class ClientZkGroupCipher {
|
|
|
10
10
|
decryptServiceId(ciphertext: UuidCiphertext): ServiceId;
|
|
11
11
|
encryptProfileKey(profileKey: ProfileKey, userId: Aci): ProfileKeyCiphertext;
|
|
12
12
|
decryptProfileKey(profileKeyCiphertext: ProfileKeyCiphertext, userId: Aci): ProfileKey;
|
|
13
|
-
encryptBlob(plaintext: Uint8Array): Uint8Array
|
|
14
|
-
encryptBlobWithRandom(random: Uint8Array
|
|
15
|
-
decryptBlob(blobCiphertext: Uint8Array): Uint8Array
|
|
13
|
+
encryptBlob(plaintext: Uint8Array<ArrayBuffer>): Uint8Array<ArrayBuffer>;
|
|
14
|
+
encryptBlobWithRandom(random: Uint8Array<ArrayBuffer>, plaintext: Uint8Array<ArrayBuffer>): Uint8Array<ArrayBuffer>;
|
|
15
|
+
decryptBlob(blobCiphertext: Uint8Array<ArrayBuffer>): Uint8Array<ArrayBuffer>;
|
|
16
16
|
}
|
|
@@ -10,6 +10,7 @@ import ProfileKeyCiphertext from './ProfileKeyCiphertext.js';
|
|
|
10
10
|
import ProfileKey from '../profiles/ProfileKey.js';
|
|
11
11
|
import { ServiceId } from '../../Address.js';
|
|
12
12
|
export default class ClientZkGroupCipher {
|
|
13
|
+
groupSecretParams;
|
|
13
14
|
constructor(groupSecretParams) {
|
|
14
15
|
this.groupSecretParams = groupSecretParams;
|
|
15
16
|
}
|
|
@@ -2,7 +2,7 @@ import ByteArray from '../internal/ByteArray.js';
|
|
|
2
2
|
export default class GroupIdentifier extends ByteArray {
|
|
3
3
|
private readonly __type?;
|
|
4
4
|
static SIZE: number;
|
|
5
|
-
constructor(contents: Uint8Array);
|
|
5
|
+
constructor(contents: Uint8Array<ArrayBuffer>);
|
|
6
6
|
/** Returns the group ID as a base64 string (with padding). */
|
|
7
7
|
toString(): string;
|
|
8
8
|
}
|
|
@@ -4,7 +4,9 @@
|
|
|
4
4
|
//
|
|
5
5
|
import ByteArray from '../internal/ByteArray.js';
|
|
6
6
|
import { Buffer } from 'node:buffer';
|
|
7
|
-
class GroupIdentifier extends ByteArray {
|
|
7
|
+
export default class GroupIdentifier extends ByteArray {
|
|
8
|
+
__type;
|
|
9
|
+
static SIZE = 32;
|
|
8
10
|
constructor(contents) {
|
|
9
11
|
super(contents, GroupIdentifier.checkLength(GroupIdentifier.SIZE));
|
|
10
12
|
}
|
|
@@ -13,6 +15,4 @@ class GroupIdentifier extends ByteArray {
|
|
|
13
15
|
return Buffer.from(this.contents).toString('base64');
|
|
14
16
|
}
|
|
15
17
|
}
|
|
16
|
-
GroupIdentifier.SIZE = 32;
|
|
17
|
-
export default GroupIdentifier;
|
|
18
18
|
//# sourceMappingURL=GroupIdentifier.js.map
|
|
@@ -3,11 +3,11 @@
|
|
|
3
3
|
// SPDX-License-Identifier: AGPL-3.0-only
|
|
4
4
|
//
|
|
5
5
|
import ByteArray from '../internal/ByteArray.js';
|
|
6
|
-
class GroupMasterKey extends ByteArray {
|
|
6
|
+
export default class GroupMasterKey extends ByteArray {
|
|
7
|
+
__type;
|
|
8
|
+
static SIZE = 32;
|
|
7
9
|
constructor(contents) {
|
|
8
10
|
super(contents, GroupMasterKey.checkLength(GroupMasterKey.SIZE));
|
|
9
11
|
}
|
|
10
12
|
}
|
|
11
|
-
GroupMasterKey.SIZE = 32;
|
|
12
|
-
export default GroupMasterKey;
|
|
13
13
|
//# sourceMappingURL=GroupMasterKey.js.map
|
|
@@ -2,6 +2,6 @@ import ByteArray from '../internal/ByteArray.js';
|
|
|
2
2
|
import GroupIdentifier from './GroupIdentifier.js';
|
|
3
3
|
export default class GroupPublicParams extends ByteArray {
|
|
4
4
|
private readonly __type?;
|
|
5
|
-
constructor(contents: Uint8Array);
|
|
5
|
+
constructor(contents: Uint8Array<ArrayBuffer>);
|
|
6
6
|
getGroupIdentifier(): GroupIdentifier;
|
|
7
7
|
}
|
|
@@ -6,6 +6,7 @@ import ByteArray from '../internal/ByteArray.js';
|
|
|
6
6
|
import * as Native from '../../Native.js';
|
|
7
7
|
import GroupIdentifier from './GroupIdentifier.js';
|
|
8
8
|
export default class GroupPublicParams extends ByteArray {
|
|
9
|
+
__type;
|
|
9
10
|
constructor(contents) {
|
|
10
11
|
super(contents, Native.GroupPublicParams_CheckValidContents);
|
|
11
12
|
}
|
|
@@ -4,9 +4,9 @@ import GroupPublicParams from './GroupPublicParams.js';
|
|
|
4
4
|
export default class GroupSecretParams extends ByteArray {
|
|
5
5
|
private readonly __type?;
|
|
6
6
|
static generate(): GroupSecretParams;
|
|
7
|
-
static generateWithRandom(random: Uint8Array): GroupSecretParams;
|
|
7
|
+
static generateWithRandom(random: Uint8Array<ArrayBuffer>): GroupSecretParams;
|
|
8
8
|
static deriveFromMasterKey(groupMasterKey: GroupMasterKey): GroupSecretParams;
|
|
9
|
-
constructor(contents: Uint8Array);
|
|
9
|
+
constructor(contents: Uint8Array<ArrayBuffer>);
|
|
10
10
|
getMasterKey(): GroupMasterKey;
|
|
11
11
|
getPublicParams(): GroupPublicParams;
|
|
12
12
|
}
|
|
@@ -9,6 +9,7 @@ import { RANDOM_LENGTH } from '../internal/Constants.js';
|
|
|
9
9
|
import GroupMasterKey from './GroupMasterKey.js';
|
|
10
10
|
import GroupPublicParams from './GroupPublicParams.js';
|
|
11
11
|
export default class GroupSecretParams extends ByteArray {
|
|
12
|
+
__type;
|
|
12
13
|
static generate() {
|
|
13
14
|
const random = randomBytes(RANDOM_LENGTH);
|
|
14
15
|
return GroupSecretParams.generateWithRandom(random);
|
|
@@ -5,6 +5,7 @@
|
|
|
5
5
|
import ByteArray from '../internal/ByteArray.js';
|
|
6
6
|
import * as Native from '../../Native.js';
|
|
7
7
|
export default class ProfileKeyCiphertext extends ByteArray {
|
|
8
|
+
__type;
|
|
8
9
|
constructor(contents) {
|
|
9
10
|
super(contents, Native.ProfileKeyCiphertext_CheckValidContents);
|
|
10
11
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import ByteArray from '../internal/ByteArray.js';
|
|
2
2
|
export default class UuidCiphertext extends ByteArray {
|
|
3
3
|
private readonly __type?;
|
|
4
|
-
constructor(contents: Uint8Array);
|
|
5
|
-
static serializeAndConcatenate(ciphertexts: UuidCiphertext[]): Uint8Array
|
|
4
|
+
constructor(contents: Uint8Array<ArrayBuffer>);
|
|
5
|
+
static serializeAndConcatenate(ciphertexts: UuidCiphertext[]): Uint8Array<ArrayBuffer>;
|
|
6
6
|
}
|
|
@@ -12,7 +12,7 @@ import ServerSecretParams from '../ServerSecretParams.js';
|
|
|
12
12
|
* @see {@link GroupSendFullToken#verify}
|
|
13
13
|
*/
|
|
14
14
|
export default class GroupSendDerivedKeyPair extends ByteArray {
|
|
15
|
-
constructor(contents: Uint8Array);
|
|
15
|
+
constructor(contents: Uint8Array<ArrayBuffer>);
|
|
16
16
|
/**
|
|
17
17
|
* Derives a new key for group send endorsements that expire at `expiration`.
|
|
18
18
|
*
|
|
@@ -31,7 +31,7 @@ import CallLinkSecretParams from '../calllinks/CallLinkSecretParams.js';
|
|
|
31
31
|
* it's still cheaper than a usual zkgroup presentation.)
|
|
32
32
|
*/
|
|
33
33
|
export default class GroupSendEndorsement extends ByteArray {
|
|
34
|
-
constructor(contents: Uint8Array
|
|
34
|
+
constructor(contents: Uint8Array<ArrayBuffer>, marker?: typeof UNCHECKED_AND_UNCLONED);
|
|
35
35
|
/**
|
|
36
36
|
* Combines several endorsements into one.
|
|
37
37
|
*
|
|
@@ -25,7 +25,7 @@ export type ReceivedEndorsements = {
|
|
|
25
25
|
* perspective.
|
|
26
26
|
*/
|
|
27
27
|
export default class GroupSendEndorsementsResponse extends ByteArray {
|
|
28
|
-
constructor(contents: Uint8Array);
|
|
28
|
+
constructor(contents: Uint8Array<ArrayBuffer>);
|
|
29
29
|
/**
|
|
30
30
|
* Issues a new set of endorsements for `groupMembers`.
|
|
31
31
|
*
|
|
@@ -40,7 +40,7 @@ export default class GroupSendEndorsementsResponse extends ByteArray {
|
|
|
40
40
|
*
|
|
41
41
|
* @see {@link GroupSendEndorsementsResponse#issue}
|
|
42
42
|
*/
|
|
43
|
-
static issueWithRandom(groupMembers: UuidCiphertext[], keyPair: GroupSendDerivedKeyPair, random: Uint8Array): GroupSendEndorsementsResponse;
|
|
43
|
+
static issueWithRandom(groupMembers: UuidCiphertext[], keyPair: GroupSendDerivedKeyPair, random: Uint8Array<ArrayBuffer>): GroupSendEndorsementsResponse;
|
|
44
44
|
/** Returns the expiration for the contained endorsements. */
|
|
45
45
|
getExpiration(): Date;
|
|
46
46
|
/**
|
|
@@ -8,7 +8,7 @@ import GroupSendDerivedKeyPair from './GroupSendDerivedKeyPair.js';
|
|
|
8
8
|
* Generated by {@link GroupSendToken#toFullToken}, and verified by the chat server.
|
|
9
9
|
*/
|
|
10
10
|
export default class GroupSendFullToken extends ByteArray {
|
|
11
|
-
constructor(contents: Uint8Array);
|
|
11
|
+
constructor(contents: Uint8Array<ArrayBuffer>);
|
|
12
12
|
/** Gets the expiration embedded in the token. */
|
|
13
13
|
getExpiration(): Date;
|
|
14
14
|
/**
|
|
@@ -10,7 +10,7 @@ import GroupSendFullToken from './GroupSendFullToken.js';
|
|
|
10
10
|
* Generated by {@link GroupSendEndorsement#toToken}.
|
|
11
11
|
*/
|
|
12
12
|
export default class GroupSendToken extends ByteArray {
|
|
13
|
-
constructor(contents: Uint8Array);
|
|
13
|
+
constructor(contents: Uint8Array<ArrayBuffer>);
|
|
14
14
|
/**
|
|
15
15
|
* Converts this token to a "full token", which can be sent to the chat server as authentication.
|
|
16
16
|
*
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
export declare const UNCHECKED_AND_UNCLONED: unique symbol;
|
|
2
2
|
export default class ByteArray {
|
|
3
|
-
contents: Uint8Array
|
|
4
|
-
protected constructor(contents: Uint8Array
|
|
5
|
-
protected static checkLength(expectedLength: number): (contents: Uint8Array) => void;
|
|
6
|
-
getContents(): Uint8Array
|
|
7
|
-
serialize(): Uint8Array
|
|
3
|
+
contents: Uint8Array<ArrayBuffer>;
|
|
4
|
+
protected constructor(contents: Uint8Array<ArrayBuffer>, checkValid: ((contents: Uint8Array<ArrayBuffer>) => void) | typeof UNCHECKED_AND_UNCLONED);
|
|
5
|
+
protected static checkLength(expectedLength: number): (contents: Uint8Array<ArrayBuffer>) => void;
|
|
6
|
+
getContents(): Uint8Array<ArrayBuffer>;
|
|
7
|
+
serialize(): Uint8Array<ArrayBuffer>;
|
|
8
8
|
}
|
|
@@ -6,6 +6,7 @@ import { LibSignalErrorBase } from '../../Errors.js';
|
|
|
6
6
|
import * as Native from '../../Native.js';
|
|
7
7
|
export const UNCHECKED_AND_UNCLONED = Symbol();
|
|
8
8
|
export default class ByteArray {
|
|
9
|
+
contents;
|
|
9
10
|
constructor(contents, checkValid) {
|
|
10
11
|
if (checkValid === UNCHECKED_AND_UNCLONED) {
|
|
11
12
|
this.contents = contents;
|
|
@@ -10,8 +10,8 @@ export default class ClientZkProfileOperations {
|
|
|
10
10
|
serverPublicParams: ServerPublicParams;
|
|
11
11
|
constructor(serverPublicParams: ServerPublicParams);
|
|
12
12
|
createProfileKeyCredentialRequestContext(userId: Aci, profileKey: ProfileKey): ProfileKeyCredentialRequestContext;
|
|
13
|
-
createProfileKeyCredentialRequestContextWithRandom(random: Uint8Array
|
|
13
|
+
createProfileKeyCredentialRequestContextWithRandom(random: Uint8Array<ArrayBuffer>, userId: Aci, profileKey: ProfileKey): ProfileKeyCredentialRequestContext;
|
|
14
14
|
receiveExpiringProfileKeyCredential(profileKeyCredentialRequestContext: ProfileKeyCredentialRequestContext, profileKeyCredentialResponse: ExpiringProfileKeyCredentialResponse, now?: Date): ExpiringProfileKeyCredential;
|
|
15
15
|
createExpiringProfileKeyCredentialPresentation(groupSecretParams: GroupSecretParams, profileKeyCredential: ExpiringProfileKeyCredential): ProfileKeyCredentialPresentation;
|
|
16
|
-
createExpiringProfileKeyCredentialPresentationWithRandom(random: Uint8Array
|
|
16
|
+
createExpiringProfileKeyCredentialPresentationWithRandom(random: Uint8Array<ArrayBuffer>, groupSecretParams: GroupSecretParams, profileKeyCredential: ExpiringProfileKeyCredential): ProfileKeyCredentialPresentation;
|
|
17
17
|
}
|
|
@@ -9,6 +9,7 @@ import ExpiringProfileKeyCredential from './ExpiringProfileKeyCredential.js';
|
|
|
9
9
|
import ProfileKeyCredentialPresentation from './ProfileKeyCredentialPresentation.js';
|
|
10
10
|
import ProfileKeyCredentialRequestContext from './ProfileKeyCredentialRequestContext.js';
|
|
11
11
|
export default class ClientZkProfileOperations {
|
|
12
|
+
serverPublicParams;
|
|
12
13
|
constructor(serverPublicParams) {
|
|
13
14
|
this.serverPublicParams = serverPublicParams;
|
|
14
15
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import ByteArray from '../internal/ByteArray.js';
|
|
2
2
|
export default class ExpiringProfileKeyCredential extends ByteArray {
|
|
3
3
|
private readonly __type?;
|
|
4
|
-
constructor(contents: Uint8Array);
|
|
4
|
+
constructor(contents: Uint8Array<ArrayBuffer>);
|
|
5
5
|
getExpirationTime(): Date;
|
|
6
6
|
}
|
|
@@ -5,6 +5,7 @@
|
|
|
5
5
|
import ByteArray from '../internal/ByteArray.js';
|
|
6
6
|
import * as Native from '../../Native.js';
|
|
7
7
|
export default class ExpiringProfileKeyCredential extends ByteArray {
|
|
8
|
+
__type;
|
|
8
9
|
constructor(contents) {
|
|
9
10
|
super(contents, Native.ExpiringProfileKeyCredential_CheckValidContents);
|
|
10
11
|
}
|
|
@@ -5,6 +5,7 @@
|
|
|
5
5
|
import ByteArray from '../internal/ByteArray.js';
|
|
6
6
|
import * as Native from '../../Native.js';
|
|
7
7
|
export default class ExpiringProfileKeyCredentialResponse extends ByteArray {
|
|
8
|
+
__type;
|
|
8
9
|
constructor(contents) {
|
|
9
10
|
super(contents, Native.ExpiringProfileKeyCredentialResponse_CheckValidContents);
|
|
10
11
|
}
|
|
@@ -5,8 +5,8 @@ import { Aci } from '../../Address.js';
|
|
|
5
5
|
export default class ProfileKey extends ByteArray {
|
|
6
6
|
private readonly __type?;
|
|
7
7
|
static SIZE: number;
|
|
8
|
-
constructor(contents: Uint8Array);
|
|
8
|
+
constructor(contents: Uint8Array<ArrayBuffer>);
|
|
9
9
|
getCommitment(userId: Aci): ProfileKeyCommitment;
|
|
10
10
|
getProfileKeyVersion(userId: Aci): ProfileKeyVersion;
|
|
11
|
-
deriveAccessKey(): Uint8Array
|
|
11
|
+
deriveAccessKey(): Uint8Array<ArrayBuffer>;
|
|
12
12
|
}
|
|
@@ -6,7 +6,9 @@ import ByteArray from '../internal/ByteArray.js';
|
|
|
6
6
|
import * as Native from '../../Native.js';
|
|
7
7
|
import ProfileKeyCommitment from './ProfileKeyCommitment.js';
|
|
8
8
|
import ProfileKeyVersion from './ProfileKeyVersion.js';
|
|
9
|
-
class ProfileKey extends ByteArray {
|
|
9
|
+
export default class ProfileKey extends ByteArray {
|
|
10
|
+
__type;
|
|
11
|
+
static SIZE = 32;
|
|
10
12
|
constructor(contents) {
|
|
11
13
|
super(contents, ProfileKey.checkLength(ProfileKey.SIZE));
|
|
12
14
|
}
|
|
@@ -20,6 +22,4 @@ class ProfileKey extends ByteArray {
|
|
|
20
22
|
return Native.ProfileKey_DeriveAccessKey(this.contents);
|
|
21
23
|
}
|
|
22
24
|
}
|
|
23
|
-
ProfileKey.SIZE = 32;
|
|
24
|
-
export default ProfileKey;
|
|
25
25
|
//# sourceMappingURL=ProfileKey.js.map
|
|
@@ -5,6 +5,7 @@
|
|
|
5
5
|
import ByteArray from '../internal/ByteArray.js';
|
|
6
6
|
import * as Native from '../../Native.js';
|
|
7
7
|
export default class ProfileKeyCommitment extends ByteArray {
|
|
8
|
+
__type;
|
|
8
9
|
constructor(contents) {
|
|
9
10
|
super(contents, Native.ProfileKeyCommitment_CheckValidContents);
|
|
10
11
|
}
|
|
@@ -3,7 +3,7 @@ import UuidCiphertext from '../groups/UuidCiphertext.js';
|
|
|
3
3
|
import ProfileKeyCiphertext from '../groups/ProfileKeyCiphertext.js';
|
|
4
4
|
export default class ProfileKeyCredentialPresentation extends ByteArray {
|
|
5
5
|
private readonly __type?;
|
|
6
|
-
constructor(contents: Uint8Array);
|
|
6
|
+
constructor(contents: Uint8Array<ArrayBuffer>);
|
|
7
7
|
getUuidCiphertext(): UuidCiphertext;
|
|
8
8
|
getProfileKeyCiphertext(): ProfileKeyCiphertext;
|
|
9
9
|
}
|
|
@@ -7,6 +7,7 @@ import * as Native from '../../Native.js';
|
|
|
7
7
|
import UuidCiphertext from '../groups/UuidCiphertext.js';
|
|
8
8
|
import ProfileKeyCiphertext from '../groups/ProfileKeyCiphertext.js';
|
|
9
9
|
export default class ProfileKeyCredentialPresentation extends ByteArray {
|
|
10
|
+
__type;
|
|
10
11
|
constructor(contents) {
|
|
11
12
|
super(contents, Native.ProfileKeyCredentialPresentation_CheckValidContents);
|
|
12
13
|
}
|