@signalapp/libsignal-client 0.81.0 → 0.82.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 +34 -31
- package/Native.js +4 -1
- package/dist/AccountKeys.d.ts +3 -3
- package/dist/AccountKeys.js +8 -14
- package/dist/Address.d.ts +1 -1
- package/dist/Address.js +8 -15
- package/dist/EcKeys.d.ts +1 -1
- package/dist/EcKeys.js +4 -10
- package/dist/Errors.d.ts +2 -2
- package/dist/Errors.js +5 -9
- package/dist/MessageBackup.d.ts +4 -4
- package/dist/MessageBackup.js +10 -18
- package/dist/Minidump.js +2 -6
- package/dist/Mp4Sanitizer.d.ts +2 -2
- package/dist/Mp4Sanitizer.js +3 -8
- package/dist/SealedSenderMultiRecipientMessage.d.ts +1 -1
- package/dist/SealedSenderMultiRecipientMessage.js +2 -5
- package/dist/WebpSanitizer.js +2 -6
- package/dist/acknowledgments.md +254 -89
- package/dist/incremental_mac.d.ts +1 -1
- package/dist/incremental_mac.js +11 -19
- package/dist/index.d.ts +18 -18
- package/dist/index.js +93 -158
- package/dist/internal.d.ts +2 -2
- package/dist/internal.js +3 -8
- package/dist/io.d.ts +1 -1
- package/dist/io.js +1 -5
- package/dist/net/CDSI.d.ts +2 -2
- package/dist/net/CDSI.js +8 -12
- package/dist/net/Chat.d.ts +11 -12
- package/dist/net/Chat.js +15 -22
- package/dist/net/KeyTransparency.d.ts +10 -10
- package/dist/net/KeyTransparency.js +4 -8
- package/dist/net/Registration.d.ts +5 -5
- package/dist/net/Registration.js +16 -22
- package/dist/net/SvrB.d.ts +3 -3
- package/dist/net/SvrB.js +5 -9
- package/dist/net/chat/UnauthUsernamesService.d.ts +4 -4
- package/dist/net/chat/UnauthUsernamesService.js +5 -7
- package/dist/net.d.ts +11 -11
- package/dist/net.js +27 -46
- package/dist/usernames.js +12 -23
- package/dist/zkgroup/GenericServerPublicParams.d.ts +1 -1
- package/dist/zkgroup/GenericServerPublicParams.js +3 -6
- package/dist/zkgroup/GenericServerSecretParams.d.ts +2 -2
- package/dist/zkgroup/GenericServerSecretParams.js +8 -11
- package/dist/zkgroup/NotarySignature.d.ts +1 -1
- package/dist/zkgroup/NotarySignature.js +3 -5
- package/dist/zkgroup/ServerPublicParams.d.ts +2 -2
- package/dist/zkgroup/ServerPublicParams.js +2 -5
- package/dist/zkgroup/ServerSecretParams.d.ts +3 -3
- package/dist/zkgroup/ServerSecretParams.js +10 -13
- package/dist/zkgroup/auth/AuthCredentialPresentation.d.ts +2 -2
- package/dist/zkgroup/auth/AuthCredentialPresentation.js +6 -9
- package/dist/zkgroup/auth/AuthCredentialWithPni.d.ts +1 -1
- package/dist/zkgroup/auth/AuthCredentialWithPni.js +3 -6
- package/dist/zkgroup/auth/AuthCredentialWithPniResponse.d.ts +1 -1
- package/dist/zkgroup/auth/AuthCredentialWithPniResponse.js +3 -6
- package/dist/zkgroup/auth/ClientZkAuthOperations.d.ts +6 -6
- package/dist/zkgroup/auth/ClientZkAuthOperations.js +9 -12
- package/dist/zkgroup/auth/ServerZkAuthOperations.d.ts +5 -5
- package/dist/zkgroup/auth/ServerZkAuthOperations.js +7 -10
- package/dist/zkgroup/backups/BackupAuthCredential.d.ts +5 -5
- package/dist/zkgroup/backups/BackupAuthCredential.js +12 -15
- package/dist/zkgroup/backups/BackupAuthCredentialPresentation.d.ts +4 -4
- package/dist/zkgroup/backups/BackupAuthCredentialPresentation.js +7 -10
- package/dist/zkgroup/backups/BackupAuthCredentialRequest.d.ts +5 -5
- package/dist/zkgroup/backups/BackupAuthCredentialRequest.js +8 -11
- package/dist/zkgroup/backups/BackupAuthCredentialRequestContext.d.ts +6 -6
- package/dist/zkgroup/backups/BackupAuthCredentialRequestContext.js +8 -11
- package/dist/zkgroup/backups/BackupAuthCredentialResponse.d.ts +1 -1
- package/dist/zkgroup/backups/BackupAuthCredentialResponse.js +3 -6
- package/dist/zkgroup/backups/BackupCredentialType.js +1 -3
- package/dist/zkgroup/backups/BackupLevel.js +1 -3
- package/dist/zkgroup/calllinks/CallLinkAuthCredential.d.ts +5 -5
- package/dist/zkgroup/calllinks/CallLinkAuthCredential.js +8 -11
- package/dist/zkgroup/calllinks/CallLinkAuthCredentialPresentation.d.ts +4 -4
- package/dist/zkgroup/calllinks/CallLinkAuthCredentialPresentation.js +5 -8
- package/dist/zkgroup/calllinks/CallLinkAuthCredentialResponse.d.ts +5 -5
- package/dist/zkgroup/calllinks/CallLinkAuthCredentialResponse.js +8 -11
- package/dist/zkgroup/calllinks/CallLinkPublicParams.d.ts +1 -1
- package/dist/zkgroup/calllinks/CallLinkPublicParams.js +3 -6
- package/dist/zkgroup/calllinks/CallLinkSecretParams.d.ts +4 -4
- package/dist/zkgroup/calllinks/CallLinkSecretParams.js +9 -12
- package/dist/zkgroup/calllinks/CreateCallLinkCredential.d.ts +5 -5
- package/dist/zkgroup/calllinks/CreateCallLinkCredential.js +8 -11
- package/dist/zkgroup/calllinks/CreateCallLinkCredentialPresentation.d.ts +3 -3
- package/dist/zkgroup/calllinks/CreateCallLinkCredentialPresentation.js +3 -6
- package/dist/zkgroup/calllinks/CreateCallLinkCredentialRequest.d.ts +4 -4
- package/dist/zkgroup/calllinks/CreateCallLinkCredentialRequest.js +8 -11
- package/dist/zkgroup/calllinks/CreateCallLinkCredentialRequestContext.d.ts +6 -6
- package/dist/zkgroup/calllinks/CreateCallLinkCredentialRequestContext.js +10 -13
- package/dist/zkgroup/calllinks/CreateCallLinkCredentialResponse.d.ts +1 -1
- package/dist/zkgroup/calllinks/CreateCallLinkCredentialResponse.js +3 -6
- package/dist/zkgroup/groups/ClientZkGroupCipher.d.ts +5 -5
- package/dist/zkgroup/groups/ClientZkGroupCipher.js +13 -16
- package/dist/zkgroup/groups/GroupIdentifier.d.ts +1 -1
- package/dist/zkgroup/groups/GroupIdentifier.js +3 -5
- package/dist/zkgroup/groups/GroupMasterKey.d.ts +1 -1
- package/dist/zkgroup/groups/GroupMasterKey.js +3 -5
- package/dist/zkgroup/groups/GroupPublicParams.d.ts +2 -2
- package/dist/zkgroup/groups/GroupPublicParams.js +5 -8
- package/dist/zkgroup/groups/GroupSecretParams.d.ts +3 -3
- package/dist/zkgroup/groups/GroupSecretParams.js +10 -13
- package/dist/zkgroup/groups/ProfileKeyCiphertext.d.ts +1 -1
- package/dist/zkgroup/groups/ProfileKeyCiphertext.js +3 -6
- package/dist/zkgroup/groups/UuidCiphertext.d.ts +1 -1
- package/dist/zkgroup/groups/UuidCiphertext.js +3 -6
- package/dist/zkgroup/groupsend/GroupSendDerivedKeyPair.d.ts +2 -2
- package/dist/zkgroup/groupsend/GroupSendDerivedKeyPair.js +3 -6
- package/dist/zkgroup/groupsend/GroupSendEndorsement.d.ts +5 -5
- package/dist/zkgroup/groupsend/GroupSendEndorsement.js +10 -13
- package/dist/zkgroup/groupsend/GroupSendEndorsementsResponse.d.ts +7 -7
- package/dist/zkgroup/groupsend/GroupSendEndorsementsResponse.js +14 -17
- package/dist/zkgroup/groupsend/GroupSendFullToken.d.ts +3 -3
- package/dist/zkgroup/groupsend/GroupSendFullToken.js +5 -8
- package/dist/zkgroup/groupsend/GroupSendToken.d.ts +2 -2
- package/dist/zkgroup/groupsend/GroupSendToken.js +5 -8
- package/dist/zkgroup/index.d.ts +57 -57
- package/dist/zkgroup/index.js +57 -118
- package/dist/zkgroup/internal/ByteArray.js +6 -10
- package/dist/zkgroup/internal/Constants.js +4 -7
- package/dist/zkgroup/profiles/ClientZkProfileOperations.d.ts +8 -8
- package/dist/zkgroup/profiles/ClientZkProfileOperations.js +12 -15
- package/dist/zkgroup/profiles/ExpiringProfileKeyCredential.d.ts +1 -1
- package/dist/zkgroup/profiles/ExpiringProfileKeyCredential.js +3 -6
- package/dist/zkgroup/profiles/ExpiringProfileKeyCredentialResponse.d.ts +1 -1
- package/dist/zkgroup/profiles/ExpiringProfileKeyCredentialResponse.js +3 -6
- package/dist/zkgroup/profiles/ProfileKey.d.ts +4 -4
- package/dist/zkgroup/profiles/ProfileKey.js +8 -10
- package/dist/zkgroup/profiles/ProfileKeyCommitment.d.ts +1 -1
- package/dist/zkgroup/profiles/ProfileKeyCommitment.js +3 -6
- package/dist/zkgroup/profiles/ProfileKeyCredentialPresentation.d.ts +3 -3
- package/dist/zkgroup/profiles/ProfileKeyCredentialPresentation.js +7 -10
- package/dist/zkgroup/profiles/ProfileKeyCredentialRequest.d.ts +1 -1
- package/dist/zkgroup/profiles/ProfileKeyCredentialRequest.js +3 -6
- package/dist/zkgroup/profiles/ProfileKeyCredentialRequestContext.d.ts +2 -2
- package/dist/zkgroup/profiles/ProfileKeyCredentialRequestContext.js +5 -8
- package/dist/zkgroup/profiles/ProfileKeyVersion.d.ts +1 -1
- package/dist/zkgroup/profiles/ProfileKeyVersion.js +3 -5
- package/dist/zkgroup/profiles/ServerZkProfileOperations.d.ts +7 -7
- package/dist/zkgroup/profiles/ServerZkProfileOperations.js +7 -10
- package/dist/zkgroup/receipts/ClientZkReceiptOperations.d.ts +6 -6
- package/dist/zkgroup/receipts/ClientZkReceiptOperations.js +12 -15
- package/dist/zkgroup/receipts/ReceiptCredential.d.ts +1 -1
- package/dist/zkgroup/receipts/ReceiptCredential.js +3 -6
- package/dist/zkgroup/receipts/ReceiptCredentialPresentation.d.ts +2 -2
- package/dist/zkgroup/receipts/ReceiptCredentialPresentation.js +6 -8
- package/dist/zkgroup/receipts/ReceiptCredentialRequest.d.ts +1 -1
- package/dist/zkgroup/receipts/ReceiptCredentialRequest.js +3 -6
- package/dist/zkgroup/receipts/ReceiptCredentialRequestContext.d.ts +2 -2
- package/dist/zkgroup/receipts/ReceiptCredentialRequestContext.js +6 -8
- package/dist/zkgroup/receipts/ReceiptCredentialResponse.d.ts +1 -1
- package/dist/zkgroup/receipts/ReceiptCredentialResponse.js +3 -6
- package/dist/zkgroup/receipts/ReceiptSerial.d.ts +1 -1
- package/dist/zkgroup/receipts/ReceiptSerial.js +3 -5
- package/dist/zkgroup/receipts/ServerZkReceiptOperations.d.ts +4 -4
- package/dist/zkgroup/receipts/ServerZkReceiptOperations.js +7 -10
- package/package.json +24 -20
- 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/zkgroup.js +1 -1
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import ByteArray from '../internal/ByteArray';
|
|
2
|
-
import { ServiceId } from '../../Address';
|
|
3
|
-
import GroupSendDerivedKeyPair from './GroupSendDerivedKeyPair';
|
|
1
|
+
import ByteArray from '../internal/ByteArray.js';
|
|
2
|
+
import { ServiceId } from '../../Address.js';
|
|
3
|
+
import GroupSendDerivedKeyPair from './GroupSendDerivedKeyPair.js';
|
|
4
4
|
/**
|
|
5
5
|
* A token representing a particular {@link GroupSendEndorsement}, along with the endorsement's
|
|
6
6
|
* expiration.
|
|
@@ -1,19 +1,17 @@
|
|
|
1
|
-
"use strict";
|
|
2
1
|
//
|
|
3
2
|
// Copyright 2024 Signal Messenger, LLC.
|
|
4
3
|
// SPDX-License-Identifier: AGPL-3.0-only
|
|
5
4
|
//
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
const Address_1 = require("../../Address");
|
|
5
|
+
import ByteArray from '../internal/ByteArray.js';
|
|
6
|
+
import Native from '../../../Native.js';
|
|
7
|
+
import { ServiceId } from '../../Address.js';
|
|
10
8
|
/**
|
|
11
9
|
* A token representing a particular {@link GroupSendEndorsement}, along with the endorsement's
|
|
12
10
|
* expiration.
|
|
13
11
|
*
|
|
14
12
|
* Generated by {@link GroupSendToken#toFullToken}, and verified by the chat server.
|
|
15
13
|
*/
|
|
16
|
-
class GroupSendFullToken extends
|
|
14
|
+
export default class GroupSendFullToken extends ByteArray {
|
|
17
15
|
constructor(contents) {
|
|
18
16
|
super(contents, Native.GroupSendFullToken_CheckValidContents);
|
|
19
17
|
}
|
|
@@ -29,8 +27,7 @@ class GroupSendFullToken extends ByteArray_1.default {
|
|
|
29
27
|
* @throws {VerificationFailedError} if the token is invalid.
|
|
30
28
|
*/
|
|
31
29
|
verify(userIds, keyPair, now = new Date()) {
|
|
32
|
-
Native.GroupSendFullToken_Verify(this.contents,
|
|
30
|
+
Native.GroupSendFullToken_Verify(this.contents, ServiceId.toConcatenatedFixedWidthBinary(userIds), Math.floor(now.getTime() / 1000), keyPair.contents);
|
|
33
31
|
}
|
|
34
32
|
}
|
|
35
|
-
exports.default = GroupSendFullToken;
|
|
36
33
|
//# sourceMappingURL=GroupSendFullToken.js.map
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import ByteArray from '../internal/ByteArray';
|
|
2
|
-
import GroupSendFullToken from './GroupSendFullToken';
|
|
1
|
+
import ByteArray from '../internal/ByteArray.js';
|
|
2
|
+
import GroupSendFullToken from './GroupSendFullToken.js';
|
|
3
3
|
/**
|
|
4
4
|
* A minimal cacheable representation of an endorsement.
|
|
5
5
|
*
|
|
@@ -1,12 +1,10 @@
|
|
|
1
|
-
"use strict";
|
|
2
1
|
//
|
|
3
2
|
// Copyright 2024 Signal Messenger, LLC.
|
|
4
3
|
// SPDX-License-Identifier: AGPL-3.0-only
|
|
5
4
|
//
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
const GroupSendFullToken_1 = require("./GroupSendFullToken");
|
|
5
|
+
import ByteArray from '../internal/ByteArray.js';
|
|
6
|
+
import Native from '../../../Native.js';
|
|
7
|
+
import GroupSendFullToken from './GroupSendFullToken.js';
|
|
10
8
|
/**
|
|
11
9
|
* A minimal cacheable representation of an endorsement.
|
|
12
10
|
*
|
|
@@ -16,7 +14,7 @@ const GroupSendFullToken_1 = require("./GroupSendFullToken");
|
|
|
16
14
|
*
|
|
17
15
|
* Generated by {@link GroupSendEndorsement#toToken}.
|
|
18
16
|
*/
|
|
19
|
-
class GroupSendToken extends
|
|
17
|
+
export default class GroupSendToken extends ByteArray {
|
|
20
18
|
constructor(contents) {
|
|
21
19
|
super(contents, Native.GroupSendToken_CheckValidContents);
|
|
22
20
|
}
|
|
@@ -27,8 +25,7 @@ class GroupSendToken extends ByteArray_1.default {
|
|
|
27
25
|
* {@link GroupSendEndorsementsResponse}, or the resulting token will fail to verify.
|
|
28
26
|
*/
|
|
29
27
|
toFullToken(expiration) {
|
|
30
|
-
return new
|
|
28
|
+
return new GroupSendFullToken(Native.GroupSendToken_ToFullToken(this.contents, Math.floor(expiration.getTime() / 1000)));
|
|
31
29
|
}
|
|
32
30
|
}
|
|
33
|
-
exports.default = GroupSendToken;
|
|
34
31
|
//# sourceMappingURL=GroupSendToken.js.map
|
package/dist/zkgroup/index.d.ts
CHANGED
|
@@ -1,57 +1,57 @@
|
|
|
1
|
-
export { default as ServerPublicParams } from './ServerPublicParams';
|
|
2
|
-
export { default as ServerSecretParams } from './ServerSecretParams';
|
|
3
|
-
export { default as GenericServerPublicParams } from './GenericServerPublicParams';
|
|
4
|
-
export { default as GenericServerSecretParams } from './GenericServerSecretParams';
|
|
5
|
-
export { default as NotarySignature } from './NotarySignature';
|
|
6
|
-
export { default as ClientZkAuthOperations } from './auth/ClientZkAuthOperations';
|
|
7
|
-
export { default as ServerZkAuthOperations } from './auth/ServerZkAuthOperations';
|
|
8
|
-
export { default as AuthCredentialPresentation } from './auth/AuthCredentialPresentation';
|
|
9
|
-
export { default as AuthCredentialWithPni } from './auth/AuthCredentialWithPni';
|
|
10
|
-
export { default as AuthCredentialWithPniResponse } from './auth/AuthCredentialWithPniResponse';
|
|
11
|
-
export { default as ClientZkGroupCipher } from './groups/ClientZkGroupCipher';
|
|
12
|
-
export { default as GroupIdentifier } from './groups/GroupIdentifier';
|
|
13
|
-
export { default as GroupMasterKey } from './groups/GroupMasterKey';
|
|
14
|
-
export { default as GroupPublicParams } from './groups/GroupPublicParams';
|
|
15
|
-
export { default as GroupSecretParams } from './groups/GroupSecretParams';
|
|
16
|
-
export { default as ProfileKeyCiphertext } from './groups/ProfileKeyCiphertext';
|
|
17
|
-
export { default as UuidCiphertext } from './groups/UuidCiphertext';
|
|
18
|
-
export { default as ClientZkProfileOperations } from './profiles/ClientZkProfileOperations';
|
|
19
|
-
export { default as ServerZkProfileOperations } from './profiles/ServerZkProfileOperations';
|
|
20
|
-
export { default as ProfileKey } from './profiles/ProfileKey';
|
|
21
|
-
export { default as ProfileKeyCommitment } from './profiles/ProfileKeyCommitment';
|
|
22
|
-
export { default as ProfileKeyCredentialPresentation } from './profiles/ProfileKeyCredentialPresentation';
|
|
23
|
-
export { default as ProfileKeyCredentialRequest } from './profiles/ProfileKeyCredentialRequest';
|
|
24
|
-
export { default as ProfileKeyCredentialRequestContext } from './profiles/ProfileKeyCredentialRequestContext';
|
|
25
|
-
export { default as ProfileKeyVersion } from './profiles/ProfileKeyVersion';
|
|
26
|
-
export { default as ExpiringProfileKeyCredential } from './profiles/ExpiringProfileKeyCredential';
|
|
27
|
-
export { default as ExpiringProfileKeyCredentialResponse } from './profiles/ExpiringProfileKeyCredentialResponse';
|
|
28
|
-
export { default as ClientZkReceiptOperations } from './receipts/ClientZkReceiptOperations';
|
|
29
|
-
export { default as ServerZkReceiptOperations } from './receipts/ServerZkReceiptOperations';
|
|
30
|
-
export { default as ReceiptCredential } from './receipts/ReceiptCredential';
|
|
31
|
-
export { default as ReceiptCredentialPresentation } from './receipts/ReceiptCredentialPresentation';
|
|
32
|
-
export { default as ReceiptCredentialRequest } from './receipts/ReceiptCredentialRequest';
|
|
33
|
-
export { default as ReceiptCredentialRequestContext } from './receipts/ReceiptCredentialRequestContext';
|
|
34
|
-
export { default as ReceiptCredentialResponse } from './receipts/ReceiptCredentialResponse';
|
|
35
|
-
export { default as ReceiptSerial } from './receipts/ReceiptSerial';
|
|
36
|
-
export { default as CallLinkPublicParams } from './calllinks/CallLinkPublicParams';
|
|
37
|
-
export { default as CallLinkSecretParams } from './calllinks/CallLinkSecretParams';
|
|
38
|
-
export { default as CallLinkAuthCredential } from './calllinks/CallLinkAuthCredential';
|
|
39
|
-
export { default as CallLinkAuthCredentialPresentation } from './calllinks/CallLinkAuthCredentialPresentation';
|
|
40
|
-
export { default as CallLinkAuthCredentialResponse } from './calllinks/CallLinkAuthCredentialResponse';
|
|
41
|
-
export { default as CreateCallLinkCredential } from './calllinks/CreateCallLinkCredential';
|
|
42
|
-
export { default as CreateCallLinkCredentialPresentation } from './calllinks/CreateCallLinkCredentialPresentation';
|
|
43
|
-
export { default as CreateCallLinkCredentialRequest } from './calllinks/CreateCallLinkCredentialRequest';
|
|
44
|
-
export { default as CreateCallLinkCredentialRequestContext } from './calllinks/CreateCallLinkCredentialRequestContext';
|
|
45
|
-
export { default as CreateCallLinkCredentialResponse } from './calllinks/CreateCallLinkCredentialResponse';
|
|
46
|
-
export { default as BackupAuthCredential } from './backups/BackupAuthCredential';
|
|
47
|
-
export { default as BackupAuthCredentialPresentation } from './backups/BackupAuthCredentialPresentation';
|
|
48
|
-
export { default as BackupAuthCredentialRequest } from './backups/BackupAuthCredentialRequest';
|
|
49
|
-
export { default as BackupAuthCredentialRequestContext } from './backups/BackupAuthCredentialRequestContext';
|
|
50
|
-
export { default as BackupAuthCredentialResponse } from './backups/BackupAuthCredentialResponse';
|
|
51
|
-
export { default as BackupCredentialType } from './backups/BackupCredentialType';
|
|
52
|
-
export { default as BackupLevel } from './backups/BackupLevel';
|
|
53
|
-
export { default as GroupSendDerivedKeyPair } from './groupsend/GroupSendDerivedKeyPair';
|
|
54
|
-
export { default as GroupSendEndorsement } from './groupsend/GroupSendEndorsement';
|
|
55
|
-
export { default as GroupSendEndorsementsResponse } from './groupsend/GroupSendEndorsementsResponse';
|
|
56
|
-
export { default as GroupSendFullToken } from './groupsend/GroupSendFullToken';
|
|
57
|
-
export { default as GroupSendToken } from './groupsend/GroupSendToken';
|
|
1
|
+
export { default as ServerPublicParams } from './ServerPublicParams.js';
|
|
2
|
+
export { default as ServerSecretParams } from './ServerSecretParams.js';
|
|
3
|
+
export { default as GenericServerPublicParams } from './GenericServerPublicParams.js';
|
|
4
|
+
export { default as GenericServerSecretParams } from './GenericServerSecretParams.js';
|
|
5
|
+
export { default as NotarySignature } from './NotarySignature.js';
|
|
6
|
+
export { default as ClientZkAuthOperations } from './auth/ClientZkAuthOperations.js';
|
|
7
|
+
export { default as ServerZkAuthOperations } from './auth/ServerZkAuthOperations.js';
|
|
8
|
+
export { default as AuthCredentialPresentation } from './auth/AuthCredentialPresentation.js';
|
|
9
|
+
export { default as AuthCredentialWithPni } from './auth/AuthCredentialWithPni.js';
|
|
10
|
+
export { default as AuthCredentialWithPniResponse } from './auth/AuthCredentialWithPniResponse.js';
|
|
11
|
+
export { default as ClientZkGroupCipher } from './groups/ClientZkGroupCipher.js';
|
|
12
|
+
export { default as GroupIdentifier } from './groups/GroupIdentifier.js';
|
|
13
|
+
export { default as GroupMasterKey } from './groups/GroupMasterKey.js';
|
|
14
|
+
export { default as GroupPublicParams } from './groups/GroupPublicParams.js';
|
|
15
|
+
export { default as GroupSecretParams } from './groups/GroupSecretParams.js';
|
|
16
|
+
export { default as ProfileKeyCiphertext } from './groups/ProfileKeyCiphertext.js';
|
|
17
|
+
export { default as UuidCiphertext } from './groups/UuidCiphertext.js';
|
|
18
|
+
export { default as ClientZkProfileOperations } from './profiles/ClientZkProfileOperations.js';
|
|
19
|
+
export { default as ServerZkProfileOperations } from './profiles/ServerZkProfileOperations.js';
|
|
20
|
+
export { default as ProfileKey } from './profiles/ProfileKey.js';
|
|
21
|
+
export { default as ProfileKeyCommitment } from './profiles/ProfileKeyCommitment.js';
|
|
22
|
+
export { default as ProfileKeyCredentialPresentation } from './profiles/ProfileKeyCredentialPresentation.js';
|
|
23
|
+
export { default as ProfileKeyCredentialRequest } from './profiles/ProfileKeyCredentialRequest.js';
|
|
24
|
+
export { default as ProfileKeyCredentialRequestContext } from './profiles/ProfileKeyCredentialRequestContext.js';
|
|
25
|
+
export { default as ProfileKeyVersion } from './profiles/ProfileKeyVersion.js';
|
|
26
|
+
export { default as ExpiringProfileKeyCredential } from './profiles/ExpiringProfileKeyCredential.js';
|
|
27
|
+
export { default as ExpiringProfileKeyCredentialResponse } from './profiles/ExpiringProfileKeyCredentialResponse.js';
|
|
28
|
+
export { default as ClientZkReceiptOperations } from './receipts/ClientZkReceiptOperations.js';
|
|
29
|
+
export { default as ServerZkReceiptOperations } from './receipts/ServerZkReceiptOperations.js';
|
|
30
|
+
export { default as ReceiptCredential } from './receipts/ReceiptCredential.js';
|
|
31
|
+
export { default as ReceiptCredentialPresentation } from './receipts/ReceiptCredentialPresentation.js';
|
|
32
|
+
export { default as ReceiptCredentialRequest } from './receipts/ReceiptCredentialRequest.js';
|
|
33
|
+
export { default as ReceiptCredentialRequestContext } from './receipts/ReceiptCredentialRequestContext.js';
|
|
34
|
+
export { default as ReceiptCredentialResponse } from './receipts/ReceiptCredentialResponse.js';
|
|
35
|
+
export { default as ReceiptSerial } from './receipts/ReceiptSerial.js';
|
|
36
|
+
export { default as CallLinkPublicParams } from './calllinks/CallLinkPublicParams.js';
|
|
37
|
+
export { default as CallLinkSecretParams } from './calllinks/CallLinkSecretParams.js';
|
|
38
|
+
export { default as CallLinkAuthCredential } from './calllinks/CallLinkAuthCredential.js';
|
|
39
|
+
export { default as CallLinkAuthCredentialPresentation } from './calllinks/CallLinkAuthCredentialPresentation.js';
|
|
40
|
+
export { default as CallLinkAuthCredentialResponse } from './calllinks/CallLinkAuthCredentialResponse.js';
|
|
41
|
+
export { default as CreateCallLinkCredential } from './calllinks/CreateCallLinkCredential.js';
|
|
42
|
+
export { default as CreateCallLinkCredentialPresentation } from './calllinks/CreateCallLinkCredentialPresentation.js';
|
|
43
|
+
export { default as CreateCallLinkCredentialRequest } from './calllinks/CreateCallLinkCredentialRequest.js';
|
|
44
|
+
export { default as CreateCallLinkCredentialRequestContext } from './calllinks/CreateCallLinkCredentialRequestContext.js';
|
|
45
|
+
export { default as CreateCallLinkCredentialResponse } from './calllinks/CreateCallLinkCredentialResponse.js';
|
|
46
|
+
export { default as BackupAuthCredential } from './backups/BackupAuthCredential.js';
|
|
47
|
+
export { default as BackupAuthCredentialPresentation } from './backups/BackupAuthCredentialPresentation.js';
|
|
48
|
+
export { default as BackupAuthCredentialRequest } from './backups/BackupAuthCredentialRequest.js';
|
|
49
|
+
export { default as BackupAuthCredentialRequestContext } from './backups/BackupAuthCredentialRequestContext.js';
|
|
50
|
+
export { default as BackupAuthCredentialResponse } from './backups/BackupAuthCredentialResponse.js';
|
|
51
|
+
export { default as BackupCredentialType } from './backups/BackupCredentialType.js';
|
|
52
|
+
export { default as BackupLevel } from './backups/BackupLevel.js';
|
|
53
|
+
export { default as GroupSendDerivedKeyPair } from './groupsend/GroupSendDerivedKeyPair.js';
|
|
54
|
+
export { default as GroupSendEndorsement } from './groupsend/GroupSendEndorsement.js';
|
|
55
|
+
export { default as GroupSendEndorsementsResponse } from './groupsend/GroupSendEndorsementsResponse.js';
|
|
56
|
+
export { default as GroupSendFullToken } from './groupsend/GroupSendFullToken.js';
|
|
57
|
+
export { default as GroupSendToken } from './groupsend/GroupSendToken.js';
|
package/dist/zkgroup/index.js
CHANGED
|
@@ -1,131 +1,70 @@
|
|
|
1
|
-
"use strict";
|
|
2
1
|
//
|
|
3
2
|
// Copyright 2020-2021 Signal Messenger, LLC.
|
|
4
3
|
// SPDX-License-Identifier: AGPL-3.0-only
|
|
5
4
|
//
|
|
6
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
7
|
-
exports.BackupAuthCredentialResponse = exports.BackupAuthCredentialRequestContext = exports.BackupAuthCredentialRequest = exports.BackupAuthCredentialPresentation = exports.BackupAuthCredential = exports.CreateCallLinkCredentialResponse = exports.CreateCallLinkCredentialRequestContext = exports.CreateCallLinkCredentialRequest = exports.CreateCallLinkCredentialPresentation = exports.CreateCallLinkCredential = exports.CallLinkAuthCredentialResponse = exports.CallLinkAuthCredentialPresentation = exports.CallLinkAuthCredential = exports.CallLinkSecretParams = exports.CallLinkPublicParams = exports.ReceiptSerial = exports.ReceiptCredentialResponse = exports.ReceiptCredentialRequestContext = exports.ReceiptCredentialRequest = exports.ReceiptCredentialPresentation = exports.ReceiptCredential = exports.ServerZkReceiptOperations = exports.ClientZkReceiptOperations = exports.ExpiringProfileKeyCredentialResponse = exports.ExpiringProfileKeyCredential = exports.ProfileKeyVersion = exports.ProfileKeyCredentialRequestContext = exports.ProfileKeyCredentialRequest = exports.ProfileKeyCredentialPresentation = exports.ProfileKeyCommitment = exports.ProfileKey = exports.ServerZkProfileOperations = exports.ClientZkProfileOperations = exports.UuidCiphertext = exports.ProfileKeyCiphertext = exports.GroupSecretParams = exports.GroupPublicParams = exports.GroupMasterKey = exports.GroupIdentifier = exports.ClientZkGroupCipher = exports.AuthCredentialWithPniResponse = exports.AuthCredentialWithPni = exports.AuthCredentialPresentation = exports.ServerZkAuthOperations = exports.ClientZkAuthOperations = exports.NotarySignature = exports.GenericServerSecretParams = exports.GenericServerPublicParams = exports.ServerSecretParams = exports.ServerPublicParams = void 0;
|
|
8
|
-
exports.GroupSendToken = exports.GroupSendFullToken = exports.GroupSendEndorsementsResponse = exports.GroupSendEndorsement = exports.GroupSendDerivedKeyPair = exports.BackupLevel = exports.BackupCredentialType = void 0;
|
|
9
5
|
// Root
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
Object.defineProperty(exports, "GenericServerPublicParams", { enumerable: true, get: function () { return GenericServerPublicParams_1.default; } });
|
|
16
|
-
var GenericServerSecretParams_1 = require("./GenericServerSecretParams");
|
|
17
|
-
Object.defineProperty(exports, "GenericServerSecretParams", { enumerable: true, get: function () { return GenericServerSecretParams_1.default; } });
|
|
18
|
-
var NotarySignature_1 = require("./NotarySignature");
|
|
19
|
-
Object.defineProperty(exports, "NotarySignature", { enumerable: true, get: function () { return NotarySignature_1.default; } });
|
|
6
|
+
export { default as ServerPublicParams } from './ServerPublicParams.js';
|
|
7
|
+
export { default as ServerSecretParams } from './ServerSecretParams.js';
|
|
8
|
+
export { default as GenericServerPublicParams } from './GenericServerPublicParams.js';
|
|
9
|
+
export { default as GenericServerSecretParams } from './GenericServerSecretParams.js';
|
|
10
|
+
export { default as NotarySignature } from './NotarySignature.js';
|
|
20
11
|
// Auth
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
Object.defineProperty(exports, "AuthCredentialPresentation", { enumerable: true, get: function () { return AuthCredentialPresentation_1.default; } });
|
|
27
|
-
var AuthCredentialWithPni_1 = require("./auth/AuthCredentialWithPni");
|
|
28
|
-
Object.defineProperty(exports, "AuthCredentialWithPni", { enumerable: true, get: function () { return AuthCredentialWithPni_1.default; } });
|
|
29
|
-
var AuthCredentialWithPniResponse_1 = require("./auth/AuthCredentialWithPniResponse");
|
|
30
|
-
Object.defineProperty(exports, "AuthCredentialWithPniResponse", { enumerable: true, get: function () { return AuthCredentialWithPniResponse_1.default; } });
|
|
12
|
+
export { default as ClientZkAuthOperations } from './auth/ClientZkAuthOperations.js';
|
|
13
|
+
export { default as ServerZkAuthOperations } from './auth/ServerZkAuthOperations.js';
|
|
14
|
+
export { default as AuthCredentialPresentation } from './auth/AuthCredentialPresentation.js';
|
|
15
|
+
export { default as AuthCredentialWithPni } from './auth/AuthCredentialWithPni.js';
|
|
16
|
+
export { default as AuthCredentialWithPniResponse } from './auth/AuthCredentialWithPniResponse.js';
|
|
31
17
|
// Groups
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
Object.defineProperty(exports, "GroupPublicParams", { enumerable: true, get: function () { return GroupPublicParams_1.default; } });
|
|
40
|
-
var GroupSecretParams_1 = require("./groups/GroupSecretParams");
|
|
41
|
-
Object.defineProperty(exports, "GroupSecretParams", { enumerable: true, get: function () { return GroupSecretParams_1.default; } });
|
|
42
|
-
var ProfileKeyCiphertext_1 = require("./groups/ProfileKeyCiphertext");
|
|
43
|
-
Object.defineProperty(exports, "ProfileKeyCiphertext", { enumerable: true, get: function () { return ProfileKeyCiphertext_1.default; } });
|
|
44
|
-
var UuidCiphertext_1 = require("./groups/UuidCiphertext");
|
|
45
|
-
Object.defineProperty(exports, "UuidCiphertext", { enumerable: true, get: function () { return UuidCiphertext_1.default; } });
|
|
18
|
+
export { default as ClientZkGroupCipher } from './groups/ClientZkGroupCipher.js';
|
|
19
|
+
export { default as GroupIdentifier } from './groups/GroupIdentifier.js';
|
|
20
|
+
export { default as GroupMasterKey } from './groups/GroupMasterKey.js';
|
|
21
|
+
export { default as GroupPublicParams } from './groups/GroupPublicParams.js';
|
|
22
|
+
export { default as GroupSecretParams } from './groups/GroupSecretParams.js';
|
|
23
|
+
export { default as ProfileKeyCiphertext } from './groups/ProfileKeyCiphertext.js';
|
|
24
|
+
export { default as UuidCiphertext } from './groups/UuidCiphertext.js';
|
|
46
25
|
// Profiles
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
var ProfileKeyCredentialRequest_1 = require("./profiles/ProfileKeyCredentialRequest");
|
|
58
|
-
Object.defineProperty(exports, "ProfileKeyCredentialRequest", { enumerable: true, get: function () { return ProfileKeyCredentialRequest_1.default; } });
|
|
59
|
-
var ProfileKeyCredentialRequestContext_1 = require("./profiles/ProfileKeyCredentialRequestContext");
|
|
60
|
-
Object.defineProperty(exports, "ProfileKeyCredentialRequestContext", { enumerable: true, get: function () { return ProfileKeyCredentialRequestContext_1.default; } });
|
|
61
|
-
var ProfileKeyVersion_1 = require("./profiles/ProfileKeyVersion");
|
|
62
|
-
Object.defineProperty(exports, "ProfileKeyVersion", { enumerable: true, get: function () { return ProfileKeyVersion_1.default; } });
|
|
63
|
-
var ExpiringProfileKeyCredential_1 = require("./profiles/ExpiringProfileKeyCredential");
|
|
64
|
-
Object.defineProperty(exports, "ExpiringProfileKeyCredential", { enumerable: true, get: function () { return ExpiringProfileKeyCredential_1.default; } });
|
|
65
|
-
var ExpiringProfileKeyCredentialResponse_1 = require("./profiles/ExpiringProfileKeyCredentialResponse");
|
|
66
|
-
Object.defineProperty(exports, "ExpiringProfileKeyCredentialResponse", { enumerable: true, get: function () { return ExpiringProfileKeyCredentialResponse_1.default; } });
|
|
26
|
+
export { default as ClientZkProfileOperations } from './profiles/ClientZkProfileOperations.js';
|
|
27
|
+
export { default as ServerZkProfileOperations } from './profiles/ServerZkProfileOperations.js';
|
|
28
|
+
export { default as ProfileKey } from './profiles/ProfileKey.js';
|
|
29
|
+
export { default as ProfileKeyCommitment } from './profiles/ProfileKeyCommitment.js';
|
|
30
|
+
export { default as ProfileKeyCredentialPresentation } from './profiles/ProfileKeyCredentialPresentation.js';
|
|
31
|
+
export { default as ProfileKeyCredentialRequest } from './profiles/ProfileKeyCredentialRequest.js';
|
|
32
|
+
export { default as ProfileKeyCredentialRequestContext } from './profiles/ProfileKeyCredentialRequestContext.js';
|
|
33
|
+
export { default as ProfileKeyVersion } from './profiles/ProfileKeyVersion.js';
|
|
34
|
+
export { default as ExpiringProfileKeyCredential } from './profiles/ExpiringProfileKeyCredential.js';
|
|
35
|
+
export { default as ExpiringProfileKeyCredentialResponse } from './profiles/ExpiringProfileKeyCredentialResponse.js';
|
|
67
36
|
// Receipts
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
var ReceiptCredentialRequest_1 = require("./receipts/ReceiptCredentialRequest");
|
|
77
|
-
Object.defineProperty(exports, "ReceiptCredentialRequest", { enumerable: true, get: function () { return ReceiptCredentialRequest_1.default; } });
|
|
78
|
-
var ReceiptCredentialRequestContext_1 = require("./receipts/ReceiptCredentialRequestContext");
|
|
79
|
-
Object.defineProperty(exports, "ReceiptCredentialRequestContext", { enumerable: true, get: function () { return ReceiptCredentialRequestContext_1.default; } });
|
|
80
|
-
var ReceiptCredentialResponse_1 = require("./receipts/ReceiptCredentialResponse");
|
|
81
|
-
Object.defineProperty(exports, "ReceiptCredentialResponse", { enumerable: true, get: function () { return ReceiptCredentialResponse_1.default; } });
|
|
82
|
-
var ReceiptSerial_1 = require("./receipts/ReceiptSerial");
|
|
83
|
-
Object.defineProperty(exports, "ReceiptSerial", { enumerable: true, get: function () { return ReceiptSerial_1.default; } });
|
|
37
|
+
export { default as ClientZkReceiptOperations } from './receipts/ClientZkReceiptOperations.js';
|
|
38
|
+
export { default as ServerZkReceiptOperations } from './receipts/ServerZkReceiptOperations.js';
|
|
39
|
+
export { default as ReceiptCredential } from './receipts/ReceiptCredential.js';
|
|
40
|
+
export { default as ReceiptCredentialPresentation } from './receipts/ReceiptCredentialPresentation.js';
|
|
41
|
+
export { default as ReceiptCredentialRequest } from './receipts/ReceiptCredentialRequest.js';
|
|
42
|
+
export { default as ReceiptCredentialRequestContext } from './receipts/ReceiptCredentialRequestContext.js';
|
|
43
|
+
export { default as ReceiptCredentialResponse } from './receipts/ReceiptCredentialResponse.js';
|
|
44
|
+
export { default as ReceiptSerial } from './receipts/ReceiptSerial.js';
|
|
84
45
|
// Call Links
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
var CreateCallLinkCredential_1 = require("./calllinks/CreateCallLinkCredential");
|
|
96
|
-
Object.defineProperty(exports, "CreateCallLinkCredential", { enumerable: true, get: function () { return CreateCallLinkCredential_1.default; } });
|
|
97
|
-
var CreateCallLinkCredentialPresentation_1 = require("./calllinks/CreateCallLinkCredentialPresentation");
|
|
98
|
-
Object.defineProperty(exports, "CreateCallLinkCredentialPresentation", { enumerable: true, get: function () { return CreateCallLinkCredentialPresentation_1.default; } });
|
|
99
|
-
var CreateCallLinkCredentialRequest_1 = require("./calllinks/CreateCallLinkCredentialRequest");
|
|
100
|
-
Object.defineProperty(exports, "CreateCallLinkCredentialRequest", { enumerable: true, get: function () { return CreateCallLinkCredentialRequest_1.default; } });
|
|
101
|
-
var CreateCallLinkCredentialRequestContext_1 = require("./calllinks/CreateCallLinkCredentialRequestContext");
|
|
102
|
-
Object.defineProperty(exports, "CreateCallLinkCredentialRequestContext", { enumerable: true, get: function () { return CreateCallLinkCredentialRequestContext_1.default; } });
|
|
103
|
-
var CreateCallLinkCredentialResponse_1 = require("./calllinks/CreateCallLinkCredentialResponse");
|
|
104
|
-
Object.defineProperty(exports, "CreateCallLinkCredentialResponse", { enumerable: true, get: function () { return CreateCallLinkCredentialResponse_1.default; } });
|
|
46
|
+
export { default as CallLinkPublicParams } from './calllinks/CallLinkPublicParams.js';
|
|
47
|
+
export { default as CallLinkSecretParams } from './calllinks/CallLinkSecretParams.js';
|
|
48
|
+
export { default as CallLinkAuthCredential } from './calllinks/CallLinkAuthCredential.js';
|
|
49
|
+
export { default as CallLinkAuthCredentialPresentation } from './calllinks/CallLinkAuthCredentialPresentation.js';
|
|
50
|
+
export { default as CallLinkAuthCredentialResponse } from './calllinks/CallLinkAuthCredentialResponse.js';
|
|
51
|
+
export { default as CreateCallLinkCredential } from './calllinks/CreateCallLinkCredential.js';
|
|
52
|
+
export { default as CreateCallLinkCredentialPresentation } from './calllinks/CreateCallLinkCredentialPresentation.js';
|
|
53
|
+
export { default as CreateCallLinkCredentialRequest } from './calllinks/CreateCallLinkCredentialRequest.js';
|
|
54
|
+
export { default as CreateCallLinkCredentialRequestContext } from './calllinks/CreateCallLinkCredentialRequestContext.js';
|
|
55
|
+
export { default as CreateCallLinkCredentialResponse } from './calllinks/CreateCallLinkCredentialResponse.js';
|
|
105
56
|
// Backup Auth
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
Object.defineProperty(exports, "BackupAuthCredentialRequestContext", { enumerable: true, get: function () { return BackupAuthCredentialRequestContext_1.default; } });
|
|
114
|
-
var BackupAuthCredentialResponse_1 = require("./backups/BackupAuthCredentialResponse");
|
|
115
|
-
Object.defineProperty(exports, "BackupAuthCredentialResponse", { enumerable: true, get: function () { return BackupAuthCredentialResponse_1.default; } });
|
|
116
|
-
var BackupCredentialType_1 = require("./backups/BackupCredentialType");
|
|
117
|
-
Object.defineProperty(exports, "BackupCredentialType", { enumerable: true, get: function () { return BackupCredentialType_1.default; } });
|
|
118
|
-
var BackupLevel_1 = require("./backups/BackupLevel");
|
|
119
|
-
Object.defineProperty(exports, "BackupLevel", { enumerable: true, get: function () { return BackupLevel_1.default; } });
|
|
57
|
+
export { default as BackupAuthCredential } from './backups/BackupAuthCredential.js';
|
|
58
|
+
export { default as BackupAuthCredentialPresentation } from './backups/BackupAuthCredentialPresentation.js';
|
|
59
|
+
export { default as BackupAuthCredentialRequest } from './backups/BackupAuthCredentialRequest.js';
|
|
60
|
+
export { default as BackupAuthCredentialRequestContext } from './backups/BackupAuthCredentialRequestContext.js';
|
|
61
|
+
export { default as BackupAuthCredentialResponse } from './backups/BackupAuthCredentialResponse.js';
|
|
62
|
+
export { default as BackupCredentialType } from './backups/BackupCredentialType.js';
|
|
63
|
+
export { default as BackupLevel } from './backups/BackupLevel.js';
|
|
120
64
|
// Group Send
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
Object.defineProperty(exports, "GroupSendEndorsementsResponse", { enumerable: true, get: function () { return GroupSendEndorsementsResponse_1.default; } });
|
|
127
|
-
var GroupSendFullToken_1 = require("./groupsend/GroupSendFullToken");
|
|
128
|
-
Object.defineProperty(exports, "GroupSendFullToken", { enumerable: true, get: function () { return GroupSendFullToken_1.default; } });
|
|
129
|
-
var GroupSendToken_1 = require("./groupsend/GroupSendToken");
|
|
130
|
-
Object.defineProperty(exports, "GroupSendToken", { enumerable: true, get: function () { return GroupSendToken_1.default; } });
|
|
65
|
+
export { default as GroupSendDerivedKeyPair } from './groupsend/GroupSendDerivedKeyPair.js';
|
|
66
|
+
export { default as GroupSendEndorsement } from './groupsend/GroupSendEndorsement.js';
|
|
67
|
+
export { default as GroupSendEndorsementsResponse } from './groupsend/GroupSendEndorsementsResponse.js';
|
|
68
|
+
export { default as GroupSendFullToken } from './groupsend/GroupSendFullToken.js';
|
|
69
|
+
export { default as GroupSendToken } from './groupsend/GroupSendToken.js';
|
|
131
70
|
//# sourceMappingURL=index.js.map
|
|
@@ -1,16 +1,13 @@
|
|
|
1
|
-
"use strict";
|
|
2
1
|
//
|
|
3
2
|
// Copyright 2020-2021 Signal Messenger, LLC.
|
|
4
3
|
// SPDX-License-Identifier: AGPL-3.0-only
|
|
5
4
|
//
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
const
|
|
9
|
-
|
|
10
|
-
exports.UNCHECKED_AND_UNCLONED = Symbol();
|
|
11
|
-
class ByteArray {
|
|
5
|
+
import { LibSignalErrorBase } from '../../Errors.js';
|
|
6
|
+
import Native from '../../../Native.js';
|
|
7
|
+
export const UNCHECKED_AND_UNCLONED = Symbol();
|
|
8
|
+
export default class ByteArray {
|
|
12
9
|
constructor(contents, checkValid) {
|
|
13
|
-
if (checkValid ===
|
|
10
|
+
if (checkValid === UNCHECKED_AND_UNCLONED) {
|
|
14
11
|
this.contents = contents;
|
|
15
12
|
}
|
|
16
13
|
else {
|
|
@@ -21,7 +18,7 @@ class ByteArray {
|
|
|
21
18
|
static checkLength(expectedLength) {
|
|
22
19
|
return (contents) => {
|
|
23
20
|
if (contents.length !== expectedLength) {
|
|
24
|
-
throw new
|
|
21
|
+
throw new LibSignalErrorBase(`Length of array supplied was ${contents.length} expected ${expectedLength}`, undefined, this.name);
|
|
25
22
|
}
|
|
26
23
|
};
|
|
27
24
|
}
|
|
@@ -32,5 +29,4 @@ class ByteArray {
|
|
|
32
29
|
return Uint8Array.from(this.contents);
|
|
33
30
|
}
|
|
34
31
|
}
|
|
35
|
-
exports.default = ByteArray;
|
|
36
32
|
//# sourceMappingURL=ByteArray.js.map
|
|
@@ -1,12 +1,9 @@
|
|
|
1
|
-
"use strict";
|
|
2
1
|
//
|
|
3
2
|
// Copyright 2020-2021 Signal Messenger, LLC.
|
|
4
3
|
// SPDX-License-Identifier: AGPL-3.0-only
|
|
5
4
|
//
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
exports.FFI_RETURN_INTERNAL_ERROR = 1;
|
|
11
|
-
exports.FFI_RETURN_INPUT_ERROR = 2;
|
|
5
|
+
export const RANDOM_LENGTH = 32;
|
|
6
|
+
export const FFI_RETURN_OK = 0;
|
|
7
|
+
export const FFI_RETURN_INTERNAL_ERROR = 1;
|
|
8
|
+
export const FFI_RETURN_INPUT_ERROR = 2;
|
|
12
9
|
//# sourceMappingURL=Constants.js.map
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import ServerPublicParams from '../ServerPublicParams';
|
|
2
|
-
import GroupSecretParams from '../groups/GroupSecretParams';
|
|
3
|
-
import ExpiringProfileKeyCredential from './ExpiringProfileKeyCredential';
|
|
4
|
-
import ExpiringProfileKeyCredentialResponse from './ExpiringProfileKeyCredentialResponse';
|
|
5
|
-
import ProfileKey from './ProfileKey';
|
|
6
|
-
import ProfileKeyCredentialPresentation from './ProfileKeyCredentialPresentation';
|
|
7
|
-
import ProfileKeyCredentialRequestContext from './ProfileKeyCredentialRequestContext';
|
|
8
|
-
import { Aci } from '../../Address';
|
|
1
|
+
import ServerPublicParams from '../ServerPublicParams.js';
|
|
2
|
+
import GroupSecretParams from '../groups/GroupSecretParams.js';
|
|
3
|
+
import ExpiringProfileKeyCredential from './ExpiringProfileKeyCredential.js';
|
|
4
|
+
import ExpiringProfileKeyCredentialResponse from './ExpiringProfileKeyCredentialResponse.js';
|
|
5
|
+
import ProfileKey from './ProfileKey.js';
|
|
6
|
+
import ProfileKeyCredentialPresentation from './ProfileKeyCredentialPresentation.js';
|
|
7
|
+
import ProfileKeyCredentialRequestContext from './ProfileKeyCredentialRequestContext.js';
|
|
8
|
+
import { Aci } from '../../Address.js';
|
|
9
9
|
export default class ClientZkProfileOperations {
|
|
10
10
|
serverPublicParams: ServerPublicParams;
|
|
11
11
|
constructor(serverPublicParams: ServerPublicParams);
|
|
@@ -1,36 +1,33 @@
|
|
|
1
|
-
"use strict";
|
|
2
1
|
//
|
|
3
2
|
// Copyright 2020-2022 Signal Messenger, LLC.
|
|
4
3
|
// SPDX-License-Identifier: AGPL-3.0-only
|
|
5
4
|
//
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
class ClientZkProfileOperations {
|
|
5
|
+
import { randomBytes } from 'node:crypto';
|
|
6
|
+
import { RANDOM_LENGTH } from '../internal/Constants.js';
|
|
7
|
+
import Native from '../../../Native.js';
|
|
8
|
+
import ExpiringProfileKeyCredential from './ExpiringProfileKeyCredential.js';
|
|
9
|
+
import ProfileKeyCredentialPresentation from './ProfileKeyCredentialPresentation.js';
|
|
10
|
+
import ProfileKeyCredentialRequestContext from './ProfileKeyCredentialRequestContext.js';
|
|
11
|
+
export default class ClientZkProfileOperations {
|
|
14
12
|
constructor(serverPublicParams) {
|
|
15
13
|
this.serverPublicParams = serverPublicParams;
|
|
16
14
|
}
|
|
17
15
|
createProfileKeyCredentialRequestContext(userId, profileKey) {
|
|
18
|
-
const random =
|
|
16
|
+
const random = randomBytes(RANDOM_LENGTH);
|
|
19
17
|
return this.createProfileKeyCredentialRequestContextWithRandom(random, userId, profileKey);
|
|
20
18
|
}
|
|
21
19
|
createProfileKeyCredentialRequestContextWithRandom(random, userId, profileKey) {
|
|
22
|
-
return new
|
|
20
|
+
return new ProfileKeyCredentialRequestContext(Native.ServerPublicParams_CreateProfileKeyCredentialRequestContextDeterministic(this.serverPublicParams, random, userId.getServiceIdFixedWidthBinary(), profileKey.getContents()));
|
|
23
21
|
}
|
|
24
22
|
receiveExpiringProfileKeyCredential(profileKeyCredentialRequestContext, profileKeyCredentialResponse, now = new Date()) {
|
|
25
|
-
return new
|
|
23
|
+
return new ExpiringProfileKeyCredential(Native.ServerPublicParams_ReceiveExpiringProfileKeyCredential(this.serverPublicParams, profileKeyCredentialRequestContext.getContents(), profileKeyCredentialResponse.getContents(), Math.floor(now.getTime() / 1000)));
|
|
26
24
|
}
|
|
27
25
|
createExpiringProfileKeyCredentialPresentation(groupSecretParams, profileKeyCredential) {
|
|
28
|
-
const random =
|
|
26
|
+
const random = randomBytes(RANDOM_LENGTH);
|
|
29
27
|
return this.createExpiringProfileKeyCredentialPresentationWithRandom(random, groupSecretParams, profileKeyCredential);
|
|
30
28
|
}
|
|
31
29
|
createExpiringProfileKeyCredentialPresentationWithRandom(random, groupSecretParams, profileKeyCredential) {
|
|
32
|
-
return new
|
|
30
|
+
return new ProfileKeyCredentialPresentation(Native.ServerPublicParams_CreateExpiringProfileKeyCredentialPresentationDeterministic(this.serverPublicParams, random, groupSecretParams.getContents(), profileKeyCredential.getContents()));
|
|
33
31
|
}
|
|
34
32
|
}
|
|
35
|
-
exports.default = ClientZkProfileOperations;
|
|
36
33
|
//# sourceMappingURL=ClientZkProfileOperations.js.map
|
|
@@ -1,12 +1,10 @@
|
|
|
1
|
-
"use strict";
|
|
2
1
|
//
|
|
3
2
|
// Copyright 2022 Signal Messenger, LLC.
|
|
4
3
|
// SPDX-License-Identifier: AGPL-3.0-only
|
|
5
4
|
//
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
class ExpiringProfileKeyCredential extends ByteArray_1.default {
|
|
5
|
+
import ByteArray from '../internal/ByteArray.js';
|
|
6
|
+
import Native from '../../../Native.js';
|
|
7
|
+
export default class ExpiringProfileKeyCredential extends ByteArray {
|
|
10
8
|
constructor(contents) {
|
|
11
9
|
super(contents, Native.ExpiringProfileKeyCredential_CheckValidContents);
|
|
12
10
|
}
|
|
@@ -15,5 +13,4 @@ class ExpiringProfileKeyCredential extends ByteArray_1.default {
|
|
|
15
13
|
Native.ExpiringProfileKeyCredential_GetExpirationTime(this.contents));
|
|
16
14
|
}
|
|
17
15
|
}
|
|
18
|
-
exports.default = ExpiringProfileKeyCredential;
|
|
19
16
|
//# sourceMappingURL=ExpiringProfileKeyCredential.js.map
|