@signalapp/libsignal-client 0.44.0 → 0.45.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.
Files changed (35) hide show
  1. package/Native.d.ts +30 -29
  2. package/dist/acknowledgments.md +45 -153
  3. package/dist/net.d.ts +6 -0
  4. package/dist/net.js +8 -0
  5. package/dist/zkgroup/ServerPublicParams.d.ts +5 -4
  6. package/dist/zkgroup/ServerPublicParams.js +11 -4
  7. package/dist/zkgroup/ServerSecretParams.d.ts +5 -4
  8. package/dist/zkgroup/ServerSecretParams.js +12 -5
  9. package/dist/zkgroup/auth/ClientZkAuthOperations.d.ts +0 -9
  10. package/dist/zkgroup/auth/ClientZkAuthOperations.js +2 -13
  11. package/dist/zkgroup/auth/ServerZkAuthOperations.d.ts +0 -2
  12. package/dist/zkgroup/auth/ServerZkAuthOperations.js +3 -10
  13. package/dist/zkgroup/backups/BackupAuthCredential.d.ts +2 -0
  14. package/dist/zkgroup/backups/BackupAuthCredential.js +8 -0
  15. package/dist/zkgroup/backups/BackupAuthCredentialRequest.d.ts +3 -2
  16. package/dist/zkgroup/backups/BackupAuthCredentialRequest.js +4 -4
  17. package/dist/zkgroup/backups/BackupAuthCredentialRequestContext.d.ts +1 -1
  18. package/dist/zkgroup/backups/BackupAuthCredentialRequestContext.js +2 -2
  19. package/dist/zkgroup/backups/BackupLevel.d.ts +5 -0
  20. package/dist/zkgroup/backups/BackupLevel.js +14 -0
  21. package/dist/zkgroup/groupsend/GroupSendDerivedKeyPair.js +1 -1
  22. package/dist/zkgroup/groupsend/GroupSendEndorsementsResponse.js +2 -2
  23. package/dist/zkgroup/index.d.ts +1 -0
  24. package/dist/zkgroup/index.js +3 -1
  25. package/dist/zkgroup/profiles/ClientZkProfileOperations.js +3 -3
  26. package/dist/zkgroup/profiles/ServerZkProfileOperations.js +2 -2
  27. package/dist/zkgroup/receipts/ClientZkReceiptOperations.js +3 -3
  28. package/dist/zkgroup/receipts/ServerZkReceiptOperations.js +2 -2
  29. package/package.json +1 -1
  30. package/prebuilds/darwin-arm64/node.napi.node +0 -0
  31. package/prebuilds/darwin-x64/node.napi.node +0 -0
  32. package/prebuilds/linux-arm64/node.napi.node +0 -0
  33. package/prebuilds/linux-x64/node.napi.node +0 -0
  34. package/prebuilds/win32-arm64/node.napi.node +0 -0
  35. package/prebuilds/win32-x64/node.napi.node +0 -0
package/Native.d.ts CHANGED
@@ -29,7 +29,6 @@ interface ChatResponse {
29
29
  }
30
30
 
31
31
  interface ChatServiceDebugInfo {
32
- connectionReused: boolean;
33
32
  reconnectCount: number;
34
33
  ipType: number;
35
34
  durationMillis: number;
@@ -144,12 +143,13 @@ export function BackupAuthCredentialPresentation_Verify(presentationBytes: Buffe
144
143
  export function BackupAuthCredentialRequestContext_CheckValidContents(contextBytes: Buffer): void;
145
144
  export function BackupAuthCredentialRequestContext_GetRequest(contextBytes: Buffer): Buffer;
146
145
  export function BackupAuthCredentialRequestContext_New(backupKey: Buffer, uuid: Uuid): Buffer;
147
- export function BackupAuthCredentialRequestContext_ReceiveResponse(contextBytes: Buffer, responseBytes: Buffer, paramsBytes: Buffer, expectedReceiptLevel: bigint): Buffer;
146
+ export function BackupAuthCredentialRequestContext_ReceiveResponse(contextBytes: Buffer, responseBytes: Buffer, expectedRedemptionTime: Timestamp, paramsBytes: Buffer): Buffer;
148
147
  export function BackupAuthCredentialRequest_CheckValidContents(requestBytes: Buffer): void;
149
- export function BackupAuthCredentialRequest_IssueDeterministic(requestBytes: Buffer, redemptionTime: Timestamp, receiptLevel: bigint, paramsBytes: Buffer, randomness: Buffer): Buffer;
148
+ export function BackupAuthCredentialRequest_IssueDeterministic(requestBytes: Buffer, redemptionTime: Timestamp, backupLevel: number, paramsBytes: Buffer, randomness: Buffer): Buffer;
150
149
  export function BackupAuthCredentialResponse_CheckValidContents(responseBytes: Buffer): void;
151
150
  export function BackupAuthCredential_CheckValidContents(paramsBytes: Buffer): void;
152
151
  export function BackupAuthCredential_GetBackupId(credentialBytes: Buffer): Buffer;
152
+ export function BackupAuthCredential_GetBackupLevel(credentialBytes: Buffer): number;
153
153
  export function BackupAuthCredential_PresentDeterministic(credentialBytes: Buffer, serverParamsBytes: Buffer, randomness: Buffer): Buffer;
154
154
  export function CallLinkAuthCredentialPresentation_CheckValidContents(presentationBytes: Buffer): void;
155
155
  export function CallLinkAuthCredentialPresentation_GetUserId(presentationBytes: Buffer): Serialized<UuidCiphertext>;
@@ -179,6 +179,7 @@ export function CiphertextMessage_Serialize(obj: Wrapper<CiphertextMessage>): Bu
179
179
  export function CiphertextMessage_Type(msg: Wrapper<CiphertextMessage>): number;
180
180
  export function ConnectionManager_clear_proxy(connectionManager: Wrapper<ConnectionManager>): void;
181
181
  export function ConnectionManager_new(environment: number): ConnectionManager;
182
+ export function ConnectionManager_set_ipv6_enabled(connectionManager: Wrapper<ConnectionManager>, ipv6Enabled: boolean): void;
182
183
  export function ConnectionManager_set_proxy(connectionManager: Wrapper<ConnectionManager>, host: string, port: number): void;
183
184
  export function CreateCallLinkCredentialPresentation_CheckValidContents(presentationBytes: Buffer): void;
184
185
  export function CreateCallLinkCredentialPresentation_Verify(presentationBytes: Buffer, roomId: Buffer, now: Timestamp, serverParamsBytes: Buffer, callLinkParamsBytes: Buffer): void;
@@ -227,7 +228,7 @@ export function GroupSecretParams_GenerateDeterministic(randomness: Buffer): Ser
227
228
  export function GroupSecretParams_GetMasterKey(params: Serialized<GroupSecretParams>): Serialized<GroupMasterKey>;
228
229
  export function GroupSecretParams_GetPublicParams(params: Serialized<GroupSecretParams>): Serialized<GroupPublicParams>;
229
230
  export function GroupSendDerivedKeyPair_CheckValidContents(bytes: Buffer): void;
230
- export function GroupSendDerivedKeyPair_ForExpiration(expiration: Timestamp, serverParams: Serialized<ServerSecretParams>): Buffer;
231
+ export function GroupSendDerivedKeyPair_ForExpiration(expiration: Timestamp, serverParams: Wrapper<ServerSecretParams>): Buffer;
231
232
  export function GroupSendEndorsement_CheckValidContents(bytes: Buffer): void;
232
233
  export function GroupSendEndorsement_Combine(endorsements: Buffer[]): Buffer;
233
234
  export function GroupSendEndorsement_Remove(endorsement: Buffer, toRemove: Buffer): Buffer;
@@ -235,8 +236,8 @@ export function GroupSendEndorsement_ToToken(endorsement: Buffer, groupParams: S
235
236
  export function GroupSendEndorsementsResponse_CheckValidContents(bytes: Buffer): void;
236
237
  export function GroupSendEndorsementsResponse_GetExpiration(responseBytes: Buffer): Timestamp;
237
238
  export function GroupSendEndorsementsResponse_IssueDeterministic(concatenatedGroupMemberCiphertexts: Buffer, keyPair: Buffer, randomness: Buffer): Buffer;
238
- export function GroupSendEndorsementsResponse_ReceiveAndCombineWithCiphertexts(responseBytes: Buffer, concatenatedGroupMemberCiphertexts: Buffer, localUserCiphertext: Buffer, now: Timestamp, serverParams: Serialized<ServerPublicParams>): Buffer[];
239
- export function GroupSendEndorsementsResponse_ReceiveAndCombineWithServiceIds(responseBytes: Buffer, groupMembers: Buffer, localUser: Buffer, now: Timestamp, groupParams: Serialized<GroupSecretParams>, serverParams: Serialized<ServerPublicParams>): Buffer[];
239
+ export function GroupSendEndorsementsResponse_ReceiveAndCombineWithCiphertexts(responseBytes: Buffer, concatenatedGroupMemberCiphertexts: Buffer, localUserCiphertext: Buffer, now: Timestamp, serverParams: Wrapper<ServerPublicParams>): Buffer[];
240
+ export function GroupSendEndorsementsResponse_ReceiveAndCombineWithServiceIds(responseBytes: Buffer, groupMembers: Buffer, localUser: Buffer, now: Timestamp, groupParams: Serialized<GroupSecretParams>, serverParams: Wrapper<ServerPublicParams>): Buffer[];
240
241
  export function GroupSendFullToken_CheckValidContents(bytes: Buffer): void;
241
242
  export function GroupSendFullToken_GetExpiration(token: Buffer): Timestamp;
242
243
  export function GroupSendFullToken_Verify(token: Buffer, userIds: Buffer, now: Timestamp, keyPair: Buffer): void;
@@ -404,29 +405,29 @@ export function ServerCertificate_GetKeyId(obj: Wrapper<ServerCertificate>): num
404
405
  export function ServerCertificate_GetSerialized(obj: Wrapper<ServerCertificate>): Buffer;
405
406
  export function ServerCertificate_GetSignature(obj: Wrapper<ServerCertificate>): Buffer;
406
407
  export function ServerCertificate_New(keyId: number, serverKey: Wrapper<PublicKey>, trustRoot: Wrapper<PrivateKey>): ServerCertificate;
407
- export function ServerPublicParams_CheckValidContents(buffer: Buffer): void;
408
- export function ServerPublicParams_CreateAuthCredentialWithPniPresentationDeterministic(serverPublicParams: Serialized<ServerPublicParams>, randomness: Buffer, groupSecretParams: Serialized<GroupSecretParams>, authCredentialWithPniBytes: Buffer): Buffer;
409
- export function ServerPublicParams_CreateExpiringProfileKeyCredentialPresentationDeterministic(serverPublicParams: Serialized<ServerPublicParams>, randomness: Buffer, groupSecretParams: Serialized<GroupSecretParams>, profileKeyCredential: Serialized<ExpiringProfileKeyCredential>): Buffer;
410
- export function ServerPublicParams_CreateProfileKeyCredentialRequestContextDeterministic(serverPublicParams: Serialized<ServerPublicParams>, randomness: Buffer, userId: Buffer, profileKey: Serialized<ProfileKey>): Serialized<ProfileKeyCredentialRequestContext>;
411
- export function ServerPublicParams_CreateReceiptCredentialPresentationDeterministic(serverPublicParams: Serialized<ServerPublicParams>, randomness: Buffer, receiptCredential: Serialized<ReceiptCredential>): Serialized<ReceiptCredentialPresentation>;
412
- export function ServerPublicParams_CreateReceiptCredentialRequestContextDeterministic(serverPublicParams: Serialized<ServerPublicParams>, randomness: Buffer, receiptSerial: Buffer): Serialized<ReceiptCredentialRequestContext>;
413
- export function ServerPublicParams_ReceiveAuthCredentialWithPniAsAci(params: Serialized<ServerPublicParams>, aci: Buffer, pni: Buffer, redemptionTime: Timestamp, authCredentialWithPniResponseBytes: Buffer): Buffer;
414
- export function ServerPublicParams_ReceiveAuthCredentialWithPniAsServiceId(params: Serialized<ServerPublicParams>, aci: Buffer, pni: Buffer, redemptionTime: Timestamp, authCredentialWithPniResponseBytes: Buffer): Buffer;
415
- export function ServerPublicParams_ReceiveExpiringProfileKeyCredential(serverPublicParams: Serialized<ServerPublicParams>, requestContext: Serialized<ProfileKeyCredentialRequestContext>, response: Serialized<ExpiringProfileKeyCredentialResponse>, currentTimeInSeconds: Timestamp): Serialized<ExpiringProfileKeyCredential>;
416
- export function ServerPublicParams_ReceiveReceiptCredential(serverPublicParams: Serialized<ServerPublicParams>, requestContext: Serialized<ReceiptCredentialRequestContext>, response: Serialized<ReceiptCredentialResponse>): Serialized<ReceiptCredential>;
417
- export function ServerPublicParams_VerifySignature(serverPublicParams: Serialized<ServerPublicParams>, message: Buffer, notarySignature: Buffer): void;
418
- export function ServerSecretParams_CheckValidContents(buffer: Buffer): void;
419
- export function ServerSecretParams_GenerateDeterministic(randomness: Buffer): Serialized<ServerSecretParams>;
420
- export function ServerSecretParams_GetPublicParams(params: Serialized<ServerSecretParams>): Serialized<ServerPublicParams>;
421
- export function ServerSecretParams_IssueAuthCredentialWithPniAsAciDeterministic(serverSecretParams: Serialized<ServerSecretParams>, randomness: Buffer, aci: Buffer, pni: Buffer, redemptionTime: Timestamp): Buffer;
422
- export function ServerSecretParams_IssueAuthCredentialWithPniAsServiceIdDeterministic(serverSecretParams: Serialized<ServerSecretParams>, randomness: Buffer, aci: Buffer, pni: Buffer, redemptionTime: Timestamp): Buffer;
423
- export function ServerSecretParams_IssueAuthCredentialWithPniZkcDeterministic(serverSecretParams: Serialized<ServerSecretParams>, randomness: Buffer, aci: Buffer, pni: Buffer, redemptionTime: Timestamp): Buffer;
424
- export function ServerSecretParams_IssueExpiringProfileKeyCredentialDeterministic(serverSecretParams: Serialized<ServerSecretParams>, randomness: Buffer, request: Serialized<ProfileKeyCredentialRequest>, userId: Buffer, commitment: Serialized<ProfileKeyCommitment>, expirationInSeconds: Timestamp): Serialized<ExpiringProfileKeyCredentialResponse>;
425
- export function ServerSecretParams_IssueReceiptCredentialDeterministic(serverSecretParams: Serialized<ServerSecretParams>, randomness: Buffer, request: Serialized<ReceiptCredentialRequest>, receiptExpirationTime: Timestamp, receiptLevel: bigint): Serialized<ReceiptCredentialResponse>;
426
- export function ServerSecretParams_SignDeterministic(params: Serialized<ServerSecretParams>, randomness: Buffer, message: Buffer): Buffer;
427
- export function ServerSecretParams_VerifyAuthCredentialPresentation(serverSecretParams: Serialized<ServerSecretParams>, groupPublicParams: Serialized<GroupPublicParams>, presentationBytes: Buffer, currentTimeInSeconds: Timestamp): void;
428
- export function ServerSecretParams_VerifyProfileKeyCredentialPresentation(serverSecretParams: Serialized<ServerSecretParams>, groupPublicParams: Serialized<GroupPublicParams>, presentationBytes: Buffer, currentTimeInSeconds: Timestamp): void;
429
- export function ServerSecretParams_VerifyReceiptCredentialPresentation(serverSecretParams: Serialized<ServerSecretParams>, presentation: Serialized<ReceiptCredentialPresentation>): void;
408
+ export function ServerPublicParams_CreateAuthCredentialWithPniPresentationDeterministic(serverPublicParams: Wrapper<ServerPublicParams>, randomness: Buffer, groupSecretParams: Serialized<GroupSecretParams>, authCredentialWithPniBytes: Buffer): Buffer;
409
+ export function ServerPublicParams_CreateExpiringProfileKeyCredentialPresentationDeterministic(serverPublicParams: Wrapper<ServerPublicParams>, randomness: Buffer, groupSecretParams: Serialized<GroupSecretParams>, profileKeyCredential: Serialized<ExpiringProfileKeyCredential>): Buffer;
410
+ export function ServerPublicParams_CreateProfileKeyCredentialRequestContextDeterministic(serverPublicParams: Wrapper<ServerPublicParams>, randomness: Buffer, userId: Buffer, profileKey: Serialized<ProfileKey>): Serialized<ProfileKeyCredentialRequestContext>;
411
+ export function ServerPublicParams_CreateReceiptCredentialPresentationDeterministic(serverPublicParams: Wrapper<ServerPublicParams>, randomness: Buffer, receiptCredential: Serialized<ReceiptCredential>): Serialized<ReceiptCredentialPresentation>;
412
+ export function ServerPublicParams_CreateReceiptCredentialRequestContextDeterministic(serverPublicParams: Wrapper<ServerPublicParams>, randomness: Buffer, receiptSerial: Buffer): Serialized<ReceiptCredentialRequestContext>;
413
+ export function ServerPublicParams_Deserialize(buffer: Buffer): ServerPublicParams;
414
+ export function ServerPublicParams_ReceiveAuthCredentialWithPniAsServiceId(params: Wrapper<ServerPublicParams>, aci: Buffer, pni: Buffer, redemptionTime: Timestamp, authCredentialWithPniResponseBytes: Buffer): Buffer;
415
+ export function ServerPublicParams_ReceiveExpiringProfileKeyCredential(serverPublicParams: Wrapper<ServerPublicParams>, requestContext: Serialized<ProfileKeyCredentialRequestContext>, response: Serialized<ExpiringProfileKeyCredentialResponse>, currentTimeInSeconds: Timestamp): Serialized<ExpiringProfileKeyCredential>;
416
+ export function ServerPublicParams_ReceiveReceiptCredential(serverPublicParams: Wrapper<ServerPublicParams>, requestContext: Serialized<ReceiptCredentialRequestContext>, response: Serialized<ReceiptCredentialResponse>): Serialized<ReceiptCredential>;
417
+ export function ServerPublicParams_Serialize(handle: Wrapper<ServerPublicParams>): Buffer;
418
+ export function ServerPublicParams_VerifySignature(serverPublicParams: Wrapper<ServerPublicParams>, message: Buffer, notarySignature: Buffer): void;
419
+ export function ServerSecretParams_Deserialize(buffer: Buffer): ServerSecretParams;
420
+ export function ServerSecretParams_GenerateDeterministic(randomness: Buffer): ServerSecretParams;
421
+ export function ServerSecretParams_GetPublicParams(params: Wrapper<ServerSecretParams>): ServerPublicParams;
422
+ export function ServerSecretParams_IssueAuthCredentialWithPniAsServiceIdDeterministic(serverSecretParams: Wrapper<ServerSecretParams>, randomness: Buffer, aci: Buffer, pni: Buffer, redemptionTime: Timestamp): Buffer;
423
+ export function ServerSecretParams_IssueAuthCredentialWithPniZkcDeterministic(serverSecretParams: Wrapper<ServerSecretParams>, randomness: Buffer, aci: Buffer, pni: Buffer, redemptionTime: Timestamp): Buffer;
424
+ export function ServerSecretParams_IssueExpiringProfileKeyCredentialDeterministic(serverSecretParams: Wrapper<ServerSecretParams>, randomness: Buffer, request: Serialized<ProfileKeyCredentialRequest>, userId: Buffer, commitment: Serialized<ProfileKeyCommitment>, expirationInSeconds: Timestamp): Serialized<ExpiringProfileKeyCredentialResponse>;
425
+ export function ServerSecretParams_IssueReceiptCredentialDeterministic(serverSecretParams: Wrapper<ServerSecretParams>, randomness: Buffer, request: Serialized<ReceiptCredentialRequest>, receiptExpirationTime: Timestamp, receiptLevel: bigint): Serialized<ReceiptCredentialResponse>;
426
+ export function ServerSecretParams_Serialize(handle: Wrapper<ServerSecretParams>): Buffer;
427
+ export function ServerSecretParams_SignDeterministic(params: Wrapper<ServerSecretParams>, randomness: Buffer, message: Buffer): Buffer;
428
+ export function ServerSecretParams_VerifyAuthCredentialPresentation(serverSecretParams: Wrapper<ServerSecretParams>, groupPublicParams: Serialized<GroupPublicParams>, presentationBytes: Buffer, currentTimeInSeconds: Timestamp): void;
429
+ export function ServerSecretParams_VerifyProfileKeyCredentialPresentation(serverSecretParams: Wrapper<ServerSecretParams>, groupPublicParams: Serialized<GroupPublicParams>, presentationBytes: Buffer, currentTimeInSeconds: Timestamp): void;
430
+ export function ServerSecretParams_VerifyReceiptCredentialPresentation(serverSecretParams: Wrapper<ServerSecretParams>, presentation: Serialized<ReceiptCredentialPresentation>): void;
430
431
  export function ServiceId_ParseFromServiceIdBinary(input: Buffer): Buffer;
431
432
  export function ServiceId_ParseFromServiceIdString(input: string): Buffer;
432
433
  export function ServiceId_ServiceIdBinary(value: Buffer): Buffer;
@@ -669,7 +669,7 @@ For more information on this, and how to apply and follow the GNU AGPL, see
669
669
 
670
670
  ```
671
671
 
672
- ## attest 0.1.0, device-transfer 0.1.0, libsignal-bridge 0.1.0, libsignal-bridge-macros 0.1.0, libsignal-core 0.1.0, libsignal-ffi 0.44.0, libsignal-jni 0.44.0, libsignal-message-backup 0.1.0, libsignal-message-backup-macros 0.1.0, libsignal-net 0.1.0, libsignal-node 0.44.0, libsignal-protocol 0.1.0, libsignal-svr3 0.1.0, poksho 0.7.0, signal-crypto 0.1.0, signal-media 0.1.0, signal-neon-futures 0.1.0, signal-neon-futures-tests 0.1.0, signal-pin 0.1.0, usernames 0.1.0, zkcredential 0.1.0, zkgroup 0.9.0
672
+ ## attest 0.1.0, device-transfer 0.1.0, libsignal-bridge 0.1.0, libsignal-bridge-macros 0.1.0, libsignal-core 0.1.0, libsignal-ffi 0.45.0, libsignal-jni 0.45.0, libsignal-message-backup 0.1.0, libsignal-message-backup-macros 0.1.0, libsignal-net 0.1.0, libsignal-node 0.45.0, libsignal-protocol 0.1.0, libsignal-svr3 0.1.0, poksho 0.7.0, signal-crypto 0.1.0, signal-media 0.1.0, signal-neon-futures 0.1.0, signal-neon-futures-tests 0.1.0, signal-pin 0.1.0, usernames 0.1.0, zkcredential 0.1.0, zkgroup 0.9.0
673
673
 
674
674
  ```
675
675
  GNU AFFERO GENERAL PUBLIC LICENSE
@@ -1922,7 +1922,7 @@ limitations under the License.
1922
1922
 
1923
1923
  ```
1924
1924
 
1925
- ## boring 3.1.0
1925
+ ## boring 4.6.0
1926
1926
 
1927
1927
  ```
1928
1928
  Copyright 2011-2017 Google Inc.
@@ -1976,7 +1976,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
1976
1976
 
1977
1977
  ```
1978
1978
 
1979
- ## bindgen 0.66.1
1979
+ ## bindgen 0.68.1
1980
1980
 
1981
1981
  ```
1982
1982
  BSD 3-Clause License
@@ -2377,7 +2377,7 @@ express Statement of Purpose.
2377
2377
 
2378
2378
  ```
2379
2379
 
2380
- ## boring-sys 3.1.0
2380
+ ## boring-sys 4.6.0
2381
2381
 
2382
2382
  ```
2383
2383
  /* Copyright (c) 2015, Google Inc.
@@ -2685,7 +2685,7 @@ DEALINGS IN THE SOFTWARE.
2685
2685
 
2686
2686
  ```
2687
2687
 
2688
- ## boring-sys 3.1.0
2688
+ ## boring-sys 4.6.0
2689
2689
 
2690
2690
  ```
2691
2691
  Copyright (c) 2014 Alex Crichton
@@ -2925,31 +2925,6 @@ DEALINGS IN THE SOFTWARE.
2925
2925
 
2926
2926
  ```
2927
2927
 
2928
- ## hyper 1.2.0
2929
-
2930
- ```
2931
- Copyright (c) 2014-2021 Sean McArthur
2932
-
2933
- Permission is hereby granted, free of charge, to any person obtaining a copy
2934
- of this software and associated documentation files (the "Software"), to deal
2935
- in the Software without restriction, including without limitation the rights
2936
- to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
2937
- copies of the Software, and to permit persons to whom the Software is
2938
- furnished to do so, subject to the following conditions:
2939
-
2940
- The above copyright notice and this permission notice shall be included in
2941
- all copies or substantial portions of the Software.
2942
-
2943
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
2944
- IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
2945
- FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
2946
- AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
2947
- LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
2948
- OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
2949
- THE SOFTWARE.
2950
-
2951
- ```
2952
-
2953
2928
  ## either 1.10.0, itertools 0.11.0, itertools 0.12.1, petgraph 0.6.4
2954
2929
 
2955
2930
  ```
@@ -3270,7 +3245,7 @@ DEALINGS IN THE SOFTWARE.
3270
3245
 
3271
3246
  ```
3272
3247
 
3273
- ## boring-sys 3.1.0
3248
+ ## boring-sys 4.6.0
3274
3249
 
3275
3250
  ```
3276
3251
  Copyright (c) 2015-2016 the fiat-crypto authors (see
@@ -3627,7 +3602,7 @@ DEALINGS IN THE SOFTWARE.
3627
3602
 
3628
3603
  ```
3629
3604
 
3630
- ## lock_api 0.4.11, parking_lot 0.12.1, parking_lot_core 0.9.9, rustc_version 0.4.0
3605
+ ## rustc_version 0.4.0
3631
3606
 
3632
3607
  ```
3633
3608
  Copyright (c) 2016 The Rust Project Developers
@@ -3658,6 +3633,38 @@ DEALINGS IN THE SOFTWARE.
3658
3633
 
3659
3634
  ```
3660
3635
 
3636
+ ## humantime 2.1.0
3637
+
3638
+ ```
3639
+ Copyright (c) 2016 The humantime Developers
3640
+
3641
+ Includes parts of http date with the following copyright:
3642
+ Copyright (c) 2016 Pyfisch
3643
+
3644
+ Includes portions of musl libc with the following copyright:
3645
+ Copyright © 2005-2013 Rich Felker
3646
+
3647
+
3648
+ Permission is hereby granted, free of charge, to any person obtaining a copy
3649
+ of this software and associated documentation files (the "Software"), to deal
3650
+ in the Software without restriction, including without limitation the rights
3651
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
3652
+ copies of the Software, and to permit persons to whom the Software is
3653
+ furnished to do so, subject to the following conditions:
3654
+
3655
+ The above copyright notice and this permission notice shall be included in all
3656
+ copies or substantial portions of the Software.
3657
+
3658
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
3659
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
3660
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
3661
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
3662
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
3663
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
3664
+ SOFTWARE.
3665
+
3666
+ ```
3667
+
3661
3668
  ## log-panics 2.1.0
3662
3669
 
3663
3670
  ```
@@ -3683,7 +3690,7 @@ SOFTWARE.
3683
3690
 
3684
3691
  ```
3685
3692
 
3686
- ## tokio-boring 3.1.0
3693
+ ## tokio-boring 4.6.0
3687
3694
 
3688
3695
  ```
3689
3696
  Copyright (c) 2016 Tokio contributors
@@ -4097,37 +4104,6 @@ SOFTWARE.
4097
4104
 
4098
4105
  ```
4099
4106
 
4100
- ## h2 0.4.2
4101
-
4102
- ```
4103
- Copyright (c) 2017 h2 authors
4104
-
4105
- Permission is hereby granted, free of charge, to any
4106
- person obtaining a copy of this software and associated
4107
- documentation files (the "Software"), to deal in the
4108
- Software without restriction, including without
4109
- limitation the rights to use, copy, modify, merge,
4110
- publish, distribute, sublicense, and/or sell copies of
4111
- the Software, and to permit persons to whom the Software
4112
- is furnished to do so, subject to the following
4113
- conditions:
4114
-
4115
- The above copyright notice and this permission notice
4116
- shall be included in all copies or substantial portions
4117
- of the Software.
4118
-
4119
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF
4120
- ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED
4121
- TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A
4122
- PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT
4123
- SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
4124
- CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
4125
- OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR
4126
- IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
4127
- DEALINGS IN THE SOFTWARE.
4128
-
4129
- ```
4130
-
4131
4107
  ## http 1.1.0
4132
4108
 
4133
4109
  ```
@@ -4159,37 +4135,6 @@ DEALINGS IN THE SOFTWARE.
4159
4135
 
4160
4136
  ```
4161
4137
 
4162
- ## signal-hook-registry 1.4.1
4163
-
4164
- ```
4165
- Copyright (c) 2017 tokio-jsonrpc developers
4166
-
4167
- Permission is hereby granted, free of charge, to any
4168
- person obtaining a copy of this software and associated
4169
- documentation files (the "Software"), to deal in the
4170
- Software without restriction, including without
4171
- limitation the rights to use, copy, modify, merge,
4172
- publish, distribute, sublicense, and/or sell copies of
4173
- the Software, and to permit persons to whom the Software
4174
- is furnished to do so, subject to the following
4175
- conditions:
4176
-
4177
- The above copyright notice and this permission notice
4178
- shall be included in all copies or substantial portions
4179
- of the Software.
4180
-
4181
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF
4182
- ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED
4183
- TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A
4184
- PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT
4185
- SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
4186
- CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
4187
- OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR
4188
- IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
4189
- DEALINGS IN THE SOFTWARE.
4190
-
4191
- ```
4192
-
4193
4138
  ## aes 0.8.4
4194
4139
 
4195
4140
  ```
@@ -4406,32 +4351,6 @@ OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR
4406
4351
  IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
4407
4352
  DEALINGS IN THE SOFTWARE.
4408
4353
 
4409
- ```
4410
-
4411
- ## want 0.3.1
4412
-
4413
- ```
4414
- Copyright (c) 2018-2019 Sean McArthur
4415
-
4416
- Permission is hereby granted, free of charge, to any person obtaining a copy
4417
- of this software and associated documentation files (the "Software"), to deal
4418
- in the Software without restriction, including without limitation the rights
4419
- to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
4420
- copies of the Software, and to permit persons to whom the Software is
4421
- furnished to do so, subject to the following conditions:
4422
-
4423
- The above copyright notice and this permission notice shall be included in
4424
- all copies or substantial portions of the Software.
4425
-
4426
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
4427
- IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
4428
- FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
4429
- AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
4430
- LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
4431
- OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
4432
- THE SOFTWARE.
4433
-
4434
-
4435
4354
  ```
4436
4355
 
4437
4356
  ## block-buffer 0.10.4, block-padding 0.3.3
@@ -4526,33 +4445,6 @@ OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR
4526
4445
  IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
4527
4446
  DEALINGS IN THE SOFTWARE.
4528
4447
 
4529
- ```
4530
-
4531
- ## try-lock 0.2.5
4532
-
4533
- ```
4534
- Copyright (c) 2018-2023 Sean McArthur
4535
- Copyright (c) 2016 Alex Crichton
4536
-
4537
- Permission is hereby granted, free of charge, to any person obtaining a copy
4538
- of this software and associated documentation files (the "Software"), to deal
4539
- in the Software without restriction, including without limitation the rights
4540
- to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
4541
- copies of the Software, and to permit persons to whom the Software is
4542
- furnished to do so, subject to the following conditions:
4543
-
4544
- The above copyright notice and this permission notice shall be included in
4545
- all copies or substantial portions of the Software.
4546
-
4547
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
4548
- IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
4549
- FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
4550
- AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
4551
- LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
4552
- OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
4553
- THE SOFTWARE.
4554
-
4555
-
4556
4448
  ```
4557
4449
 
4558
4450
  ## opaque-debug 0.3.1
@@ -5384,7 +5276,7 @@ SOFTWARE.
5384
5276
 
5385
5277
  ```
5386
5278
 
5387
- ## anstream 0.6.13, anstyle-query 1.0.2, clap 4.4.18, colorchoice 1.0.0, toml_datetime 0.6.5, toml_edit 0.19.15
5279
+ ## anstream 0.6.13, anstyle-query 1.0.2, clap 4.4.18, colorchoice 1.0.0, env_logger 0.10.2, toml_datetime 0.6.5, toml_edit 0.19.15
5388
5280
 
5389
5281
  ```
5390
5282
  Copyright (c) Individual contributors
@@ -6114,7 +6006,7 @@ DEALINGS IN THE SOFTWARE.
6114
6006
 
6115
6007
  ```
6116
6008
 
6117
- ## adler 1.0.2, anyhow 1.0.80, async-trait 0.1.77, dyn-clone 1.0.17, fastrand 2.0.1, home 0.5.9, itoa 1.0.10, linkme 0.3.25, linkme-impl 0.3.25, linux-raw-sys 0.4.13, minimal-lexical 0.2.1, num_enum 0.6.1, num_enum_derive 0.6.1, once_cell 1.19.0, paste 1.0.14, pin-project-lite 0.2.13, prettyplease 0.2.16, proc-macro-crate 1.3.1, proc-macro2 1.0.78, quote 1.0.35, rustc-hash 1.1.0, rustix 0.38.31, rustversion 1.0.14, semver 1.0.22, send_wrapper 0.6.0, serde 1.0.197, serde_derive 1.0.197, serde_json 1.0.114, syn 1.0.109, syn 2.0.52, syn-mid 0.6.0, thiserror 1.0.57, thiserror-impl 1.0.57, unicode-ident 1.0.12, utf-8 0.7.6
6009
+ ## adler 1.0.2, anyhow 1.0.80, async-trait 0.1.77, dyn-clone 1.0.17, fastrand 2.0.1, home 0.5.9, is-terminal 0.4.12, itoa 1.0.10, linkme 0.3.25, linkme-impl 0.3.25, linux-raw-sys 0.4.13, minimal-lexical 0.2.1, num_enum 0.6.1, num_enum_derive 0.6.1, once_cell 1.19.0, paste 1.0.14, pin-project-lite 0.2.13, prettyplease 0.2.16, proc-macro-crate 1.3.1, proc-macro2 1.0.78, quote 1.0.35, rustc-hash 1.1.0, rustix 0.38.31, rustversion 1.0.14, semver 1.0.22, send_wrapper 0.6.0, serde 1.0.197, serde_derive 1.0.197, serde_json 1.0.114, syn 1.0.109, syn 2.0.52, syn-mid 0.6.0, thiserror 1.0.57, thiserror-impl 1.0.57, unicode-ident 1.0.12, utf-8 0.7.6
6118
6010
 
6119
6011
  ```
6120
6012
  Permission is hereby granted, free of charge, to any
@@ -6313,7 +6205,7 @@ THE SOFTWARE.
6313
6205
 
6314
6206
  ```
6315
6207
 
6316
- ## aho-corasick 1.1.2, byteorder 1.5.0, memchr 2.7.1, walkdir 2.5.0
6208
+ ## aho-corasick 1.1.2, byteorder 1.5.0, memchr 2.7.1, termcolor 1.4.1, walkdir 2.5.0
6317
6209
 
6318
6210
  ```
6319
6211
  The MIT License (MIT)
@@ -6424,7 +6316,7 @@ THE SOFTWARE.
6424
6316
 
6425
6317
  ```
6426
6318
 
6427
- ## security-framework 2.9.2, security-framework-sys 2.9.1
6319
+ ## security-framework 2.10.0, security-framework-sys 2.10.0
6428
6320
 
6429
6321
  ```
6430
6322
  The MIT License (MIT)
@@ -6806,7 +6698,7 @@ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
6806
6698
  SOFTWARE.
6807
6699
  ```
6808
6700
 
6809
- ## boring-sys 3.1.0
6701
+ ## boring-sys 4.6.0
6810
6702
 
6811
6703
  ```
6812
6704
  /* ====================================================================
package/dist/net.d.ts CHANGED
@@ -102,6 +102,12 @@ export declare class Net {
102
102
  * Creates a new instance of {@link ChatService}.
103
103
  */
104
104
  newChatService(): ChatService;
105
+ /**
106
+ * Enables/disables IPv6 for all new connections (until changed).
107
+ *
108
+ * The flag is `true` by default.
109
+ */
110
+ setIpv6Enabled(ipv6Enabled: boolean): void;
105
111
  /**
106
112
  * Sets the proxy host to be used for all new connections (until overridden).
107
113
  *
package/dist/net.js CHANGED
@@ -106,6 +106,14 @@ class Net {
106
106
  newChatService() {
107
107
  return new ChatService(this.asyncContext, this.connectionManager);
108
108
  }
109
+ /**
110
+ * Enables/disables IPv6 for all new connections (until changed).
111
+ *
112
+ * The flag is `true` by default.
113
+ */
114
+ setIpv6Enabled(ipv6Enabled) {
115
+ Native.ConnectionManager_set_ipv6_enabled(this.connectionManager, ipv6Enabled);
116
+ }
109
117
  /**
110
118
  * Sets the proxy host to be used for all new connections (until overridden).
111
119
  *
@@ -1,8 +1,9 @@
1
1
  /// <reference types="node" />
2
- import ByteArray from './internal/ByteArray';
2
+ import * as Native from '../../Native';
3
3
  import NotarySignature from './NotarySignature';
4
- export default class ServerPublicParams extends ByteArray {
5
- private readonly __type?;
6
- constructor(contents: Buffer);
4
+ export default class ServerPublicParams {
5
+ readonly _nativeHandle: Native.ServerPublicParams;
6
+ constructor(contents: Buffer | Native.ServerPublicParams);
7
7
  verifySignature(message: Buffer, notarySignature: NotarySignature): void;
8
+ serialize(): Buffer;
8
9
  }
@@ -4,14 +4,21 @@
4
4
  // SPDX-License-Identifier: AGPL-3.0-only
5
5
  //
6
6
  Object.defineProperty(exports, "__esModule", { value: true });
7
- const ByteArray_1 = require("./internal/ByteArray");
8
7
  const Native = require("../../Native");
9
- class ServerPublicParams extends ByteArray_1.default {
8
+ class ServerPublicParams {
10
9
  constructor(contents) {
11
- super(contents, Native.ServerPublicParams_CheckValidContents);
10
+ if (contents instanceof Buffer) {
11
+ this._nativeHandle = Native.ServerPublicParams_Deserialize(contents);
12
+ }
13
+ else {
14
+ this._nativeHandle = contents;
15
+ }
12
16
  }
13
17
  verifySignature(message, notarySignature) {
14
- Native.ServerPublicParams_VerifySignature(this.contents, message, notarySignature.getContents());
18
+ Native.ServerPublicParams_VerifySignature(this, message, notarySignature.getContents());
19
+ }
20
+ serialize() {
21
+ return Native.ServerPublicParams_Serialize(this);
15
22
  }
16
23
  }
17
24
  exports.default = ServerPublicParams;
@@ -1,13 +1,14 @@
1
1
  /// <reference types="node" />
2
- import ByteArray from './internal/ByteArray';
2
+ import * as Native from '../../Native';
3
3
  import ServerPublicParams from './ServerPublicParams';
4
4
  import NotarySignature from './NotarySignature';
5
- export default class ServerSecretParams extends ByteArray {
6
- private readonly __type?;
5
+ export default class ServerSecretParams {
7
6
  static generate(): ServerSecretParams;
8
7
  static generateWithRandom(random: Buffer): ServerSecretParams;
9
- constructor(contents: Buffer);
8
+ readonly _nativeHandle: Native.ServerSecretParams;
9
+ constructor(contents: Buffer | Native.ServerSecretParams);
10
10
  getPublicParams(): ServerPublicParams;
11
11
  sign(message: Buffer): NotarySignature;
12
12
  signWithRandom(random: Buffer, message: Buffer): NotarySignature;
13
+ serialize(): Buffer;
13
14
  }
@@ -6,11 +6,10 @@
6
6
  Object.defineProperty(exports, "__esModule", { value: true });
7
7
  const crypto_1 = require("crypto");
8
8
  const Native = require("../../Native");
9
- const ByteArray_1 = require("./internal/ByteArray");
10
9
  const Constants_1 = require("./internal/Constants");
11
10
  const ServerPublicParams_1 = require("./ServerPublicParams");
12
11
  const NotarySignature_1 = require("./NotarySignature");
13
- class ServerSecretParams extends ByteArray_1.default {
12
+ class ServerSecretParams {
14
13
  static generate() {
15
14
  const random = (0, crypto_1.randomBytes)(Constants_1.RANDOM_LENGTH);
16
15
  return ServerSecretParams.generateWithRandom(random);
@@ -19,17 +18,25 @@ class ServerSecretParams extends ByteArray_1.default {
19
18
  return new ServerSecretParams(Native.ServerSecretParams_GenerateDeterministic(random));
20
19
  }
21
20
  constructor(contents) {
22
- super(contents, Native.ServerSecretParams_CheckValidContents);
21
+ if (contents instanceof Buffer) {
22
+ this._nativeHandle = Native.ServerSecretParams_Deserialize(contents);
23
+ }
24
+ else {
25
+ this._nativeHandle = contents;
26
+ }
23
27
  }
24
28
  getPublicParams() {
25
- return new ServerPublicParams_1.default(Native.ServerSecretParams_GetPublicParams(this.contents));
29
+ return new ServerPublicParams_1.default(Native.ServerSecretParams_GetPublicParams(this));
26
30
  }
27
31
  sign(message) {
28
32
  const random = (0, crypto_1.randomBytes)(Constants_1.RANDOM_LENGTH);
29
33
  return this.signWithRandom(random, message);
30
34
  }
31
35
  signWithRandom(random, message) {
32
- return new NotarySignature_1.default(Native.ServerSecretParams_SignDeterministic(this.contents, random, message));
36
+ return new NotarySignature_1.default(Native.ServerSecretParams_SignDeterministic(this, random, message));
37
+ }
38
+ serialize() {
39
+ return Native.ServerSecretParams_Serialize(this);
33
40
  }
34
41
  }
35
42
  exports.default = ServerSecretParams;
@@ -14,15 +14,6 @@ export default class ClientZkAuthOperations {
14
14
  * @param redemptionTime - This is provided by the server as an integer, and should be passed through directly.
15
15
  */
16
16
  receiveAuthCredentialWithPniAsServiceId(aci: Aci, pni: Pni, redemptionTime: number, authCredentialResponse: AuthCredentialWithPniResponse): AuthCredentialWithPni;
17
- /**
18
- * Produces the AuthCredentialWithPni from a server-generated AuthCredentialWithPniResponse.
19
- *
20
- * This older style of AuthCredentialWithPni will not actually have a usable PNI field,
21
- * but can still be used for authenticating with an ACI.
22
- *
23
- * @param redemptionTime - This is provided by the server as an integer, and should be passed through directly.
24
- */
25
- receiveAuthCredentialWithPniAsAci(aci: Aci, pni: Pni, redemptionTime: number, authCredentialResponse: AuthCredentialWithPniResponse): AuthCredentialWithPni;
26
17
  createAuthCredentialWithPniPresentation(groupSecretParams: GroupSecretParams, authCredential: AuthCredentialWithPni): AuthCredentialPresentation;
27
18
  createAuthCredentialWithPniPresentationWithRandom(random: Buffer, groupSecretParams: GroupSecretParams, authCredential: AuthCredentialWithPni): AuthCredentialPresentation;
28
19
  }
@@ -19,25 +19,14 @@ class ClientZkAuthOperations {
19
19
  * @param redemptionTime - This is provided by the server as an integer, and should be passed through directly.
20
20
  */
21
21
  receiveAuthCredentialWithPniAsServiceId(aci, pni, redemptionTime, authCredentialResponse) {
22
- return new AuthCredentialWithPni_1.default(Native.ServerPublicParams_ReceiveAuthCredentialWithPniAsServiceId(this.serverPublicParams.getContents(), aci.getServiceIdFixedWidthBinary(), pni.getServiceIdFixedWidthBinary(), redemptionTime, authCredentialResponse.getContents()));
23
- }
24
- /**
25
- * Produces the AuthCredentialWithPni from a server-generated AuthCredentialWithPniResponse.
26
- *
27
- * This older style of AuthCredentialWithPni will not actually have a usable PNI field,
28
- * but can still be used for authenticating with an ACI.
29
- *
30
- * @param redemptionTime - This is provided by the server as an integer, and should be passed through directly.
31
- */
32
- receiveAuthCredentialWithPniAsAci(aci, pni, redemptionTime, authCredentialResponse) {
33
- return new AuthCredentialWithPni_1.default(Native.ServerPublicParams_ReceiveAuthCredentialWithPniAsAci(this.serverPublicParams.getContents(), aci.getServiceIdFixedWidthBinary(), pni.getServiceIdFixedWidthBinary(), redemptionTime, authCredentialResponse.getContents()));
22
+ return new AuthCredentialWithPni_1.default(Native.ServerPublicParams_ReceiveAuthCredentialWithPniAsServiceId(this.serverPublicParams, aci.getServiceIdFixedWidthBinary(), pni.getServiceIdFixedWidthBinary(), redemptionTime, authCredentialResponse.getContents()));
34
23
  }
35
24
  createAuthCredentialWithPniPresentation(groupSecretParams, authCredential) {
36
25
  const random = (0, crypto_1.randomBytes)(Constants_1.RANDOM_LENGTH);
37
26
  return this.createAuthCredentialWithPniPresentationWithRandom(random, groupSecretParams, authCredential);
38
27
  }
39
28
  createAuthCredentialWithPniPresentationWithRandom(random, groupSecretParams, authCredential) {
40
- return new AuthCredentialPresentation_1.default(Native.ServerPublicParams_CreateAuthCredentialWithPniPresentationDeterministic(this.serverPublicParams.getContents(), random, groupSecretParams.getContents(), authCredential.getContents()));
29
+ return new AuthCredentialPresentation_1.default(Native.ServerPublicParams_CreateAuthCredentialWithPniPresentationDeterministic(this.serverPublicParams, random, groupSecretParams.getContents(), authCredential.getContents()));
41
30
  }
42
31
  }
43
32
  exports.default = ClientZkAuthOperations;
@@ -9,8 +9,6 @@ export default class ServerZkAuthOperations {
9
9
  constructor(serverSecretParams: ServerSecretParams);
10
10
  issueAuthCredentialWithPniAsServiceId(aci: Aci, pni: Pni, redemptionTime: number): AuthCredentialWithPniResponse;
11
11
  issueAuthCredentialWithPniAsServiceIdWithRandom(random: Buffer, aci: Aci, pni: Pni, redemptionTime: number): AuthCredentialWithPniResponse;
12
- issueAuthCredentialWithPniAsAci(aci: Aci, pni: Pni, redemptionTime: number): AuthCredentialWithPniResponse;
13
- issueAuthCredentialWithPniAsAciWithRandom(random: Buffer, aci: Aci, pni: Pni, redemptionTime: number): AuthCredentialWithPniResponse;
14
12
  issueAuthCredentialWithPniZkc(aci: Aci, pni: Pni, redemptionTime: number): AuthCredentialWithPniResponse;
15
13
  issueAuthCredentialWithPniZkcWithRandom(random: Buffer, aci: Aci, pni: Pni, redemptionTime: number): AuthCredentialWithPniResponse;
16
14
  verifyAuthCredentialPresentation(groupPublicParams: GroupPublicParams, authCredentialPresentation: AuthCredentialPresentation, now?: Date): void;
@@ -17,24 +17,17 @@ class ServerZkAuthOperations {
17
17
  return this.issueAuthCredentialWithPniAsServiceIdWithRandom(random, aci, pni, redemptionTime);
18
18
  }
19
19
  issueAuthCredentialWithPniAsServiceIdWithRandom(random, aci, pni, redemptionTime) {
20
- return new AuthCredentialWithPniResponse_1.default(Native.ServerSecretParams_IssueAuthCredentialWithPniAsServiceIdDeterministic(this.serverSecretParams.getContents(), random, aci.getServiceIdFixedWidthBinary(), pni.getServiceIdFixedWidthBinary(), redemptionTime));
21
- }
22
- issueAuthCredentialWithPniAsAci(aci, pni, redemptionTime) {
23
- const random = (0, crypto_1.randomBytes)(Constants_1.RANDOM_LENGTH);
24
- return this.issueAuthCredentialWithPniAsAciWithRandom(random, aci, pni, redemptionTime);
25
- }
26
- issueAuthCredentialWithPniAsAciWithRandom(random, aci, pni, redemptionTime) {
27
- return new AuthCredentialWithPniResponse_1.default(Native.ServerSecretParams_IssueAuthCredentialWithPniAsAciDeterministic(this.serverSecretParams.getContents(), random, aci.getServiceIdFixedWidthBinary(), pni.getServiceIdFixedWidthBinary(), redemptionTime));
20
+ return new AuthCredentialWithPniResponse_1.default(Native.ServerSecretParams_IssueAuthCredentialWithPniAsServiceIdDeterministic(this.serverSecretParams, random, aci.getServiceIdFixedWidthBinary(), pni.getServiceIdFixedWidthBinary(), redemptionTime));
28
21
  }
29
22
  issueAuthCredentialWithPniZkc(aci, pni, redemptionTime) {
30
23
  const random = (0, crypto_1.randomBytes)(Constants_1.RANDOM_LENGTH);
31
24
  return this.issueAuthCredentialWithPniZkcWithRandom(random, aci, pni, redemptionTime);
32
25
  }
33
26
  issueAuthCredentialWithPniZkcWithRandom(random, aci, pni, redemptionTime) {
34
- return new AuthCredentialWithPniResponse_1.default(Native.ServerSecretParams_IssueAuthCredentialWithPniZkcDeterministic(this.serverSecretParams.getContents(), random, aci.getServiceIdFixedWidthBinary(), pni.getServiceIdFixedWidthBinary(), redemptionTime));
27
+ return new AuthCredentialWithPniResponse_1.default(Native.ServerSecretParams_IssueAuthCredentialWithPniZkcDeterministic(this.serverSecretParams, random, aci.getServiceIdFixedWidthBinary(), pni.getServiceIdFixedWidthBinary(), redemptionTime));
35
28
  }
36
29
  verifyAuthCredentialPresentation(groupPublicParams, authCredentialPresentation, now = new Date()) {
37
- Native.ServerSecretParams_VerifyAuthCredentialPresentation(this.serverSecretParams.getContents(), groupPublicParams.getContents(), authCredentialPresentation.getContents(), Math.floor(now.getTime() / 1000));
30
+ Native.ServerSecretParams_VerifyAuthCredentialPresentation(this.serverSecretParams, groupPublicParams.getContents(), authCredentialPresentation.getContents(), Math.floor(now.getTime() / 1000));
38
31
  }
39
32
  }
40
33
  exports.default = ServerZkAuthOperations;
@@ -2,10 +2,12 @@
2
2
  import ByteArray from '../internal/ByteArray';
3
3
  import GenericServerPublicParams from '../GenericServerPublicParams';
4
4
  import BackupAuthCredentialPresentation from './BackupAuthCredentialPresentation';
5
+ import BackupLevel from './BackupLevel';
5
6
  export default class BackupAuthCredential extends ByteArray {
6
7
  private readonly __type?;
7
8
  constructor(contents: Buffer);
8
9
  present(serverParams: GenericServerPublicParams): BackupAuthCredentialPresentation;
9
10
  presentWithRandom(serverParams: GenericServerPublicParams, random: Buffer): BackupAuthCredentialPresentation;
10
11
  getBackupId(): Buffer;
12
+ getBackupLevel(): BackupLevel;
11
13
  }
@@ -9,6 +9,7 @@ const Native = require("../../../Native");
9
9
  const ByteArray_1 = require("../internal/ByteArray");
10
10
  const Constants_1 = require("../internal/Constants");
11
11
  const BackupAuthCredentialPresentation_1 = require("./BackupAuthCredentialPresentation");
12
+ const BackupLevel_1 = require("./BackupLevel");
12
13
  class BackupAuthCredential extends ByteArray_1.default {
13
14
  constructor(contents) {
14
15
  super(contents, Native.BackupAuthCredential_CheckValidContents);
@@ -23,6 +24,13 @@ class BackupAuthCredential extends ByteArray_1.default {
23
24
  getBackupId() {
24
25
  return Native.BackupAuthCredential_GetBackupId(this.contents);
25
26
  }
27
+ getBackupLevel() {
28
+ const n = Native.BackupAuthCredential_GetBackupLevel(this.contents);
29
+ if (!(n in BackupLevel_1.default)) {
30
+ throw new TypeError(`Invalid BackupLevel ${n}`);
31
+ }
32
+ return n;
33
+ }
26
34
  }
27
35
  exports.default = BackupAuthCredential;
28
36
  //# sourceMappingURL=BackupAuthCredential.js.map
@@ -2,9 +2,10 @@
2
2
  import ByteArray from '../internal/ByteArray';
3
3
  import GenericServerSecretParams from '../GenericServerSecretParams';
4
4
  import BackupAuthCredentialResponse from './BackupAuthCredentialResponse';
5
+ import BackupLevel from './BackupLevel';
5
6
  export default class BackupAuthCredentialRequest extends ByteArray {
6
7
  private readonly __type?;
7
8
  constructor(contents: Buffer);
8
- issueCredential(timestamp: number, receiptLevel: bigint, params: GenericServerSecretParams): BackupAuthCredentialResponse;
9
- issueCredentialWithRandom(timestamp: number, receiptLevel: bigint, params: GenericServerSecretParams, random: Buffer): BackupAuthCredentialResponse;
9
+ issueCredential(timestamp: number, backupLevel: BackupLevel, params: GenericServerSecretParams): BackupAuthCredentialResponse;
10
+ issueCredentialWithRandom(timestamp: number, backupLevel: BackupLevel, params: GenericServerSecretParams, random: Buffer): BackupAuthCredentialResponse;
10
11
  }
@@ -13,12 +13,12 @@ class BackupAuthCredentialRequest extends ByteArray_1.default {
13
13
  constructor(contents) {
14
14
  super(contents, Native.BackupAuthCredentialRequest_CheckValidContents);
15
15
  }
16
- issueCredential(timestamp, receiptLevel, params) {
16
+ issueCredential(timestamp, backupLevel, params) {
17
17
  const random = (0, crypto_1.randomBytes)(Constants_1.RANDOM_LENGTH);
18
- return this.issueCredentialWithRandom(timestamp, receiptLevel, params, random);
18
+ return this.issueCredentialWithRandom(timestamp, backupLevel, params, random);
19
19
  }
20
- issueCredentialWithRandom(timestamp, receiptLevel, params, random) {
21
- return new BackupAuthCredentialResponse_1.default(Native.BackupAuthCredentialRequest_IssueDeterministic(this.contents, timestamp, receiptLevel, params.contents, random));
20
+ issueCredentialWithRandom(timestamp, backupLevel, params, random) {
21
+ return new BackupAuthCredentialResponse_1.default(Native.BackupAuthCredentialRequest_IssueDeterministic(this.contents, timestamp, backupLevel, params.contents, random));
22
22
  }
23
23
  }
24
24
  exports.default = BackupAuthCredentialRequest;
@@ -10,5 +10,5 @@ export default class BackupAuthCredentialRequestContext extends ByteArray {
10
10
  constructor(contents: Buffer);
11
11
  static create(backupKey: Buffer, aci: Uuid): BackupAuthCredentialRequestContext;
12
12
  getRequest(): BackupAuthCredentialRequest;
13
- receive(response: BackupAuthCredentialResponse, params: GenericServerPublicParams, expectedReceiptLevel: bigint): BackupAuthCredential;
13
+ receive(response: BackupAuthCredentialResponse, redemptionTime: number, params: GenericServerPublicParams): BackupAuthCredential;
14
14
  }
@@ -19,8 +19,8 @@ class BackupAuthCredentialRequestContext extends ByteArray_1.default {
19
19
  getRequest() {
20
20
  return new BackupAuthCredentialRequest_1.default(Native.BackupAuthCredentialRequestContext_GetRequest(this.contents));
21
21
  }
22
- receive(response, params, expectedReceiptLevel) {
23
- return new BackupAuthCredential_1.default(Native.BackupAuthCredentialRequestContext_ReceiveResponse(this.contents, response.contents, params.contents, expectedReceiptLevel));
22
+ receive(response, redemptionTime, params) {
23
+ return new BackupAuthCredential_1.default(Native.BackupAuthCredentialRequestContext_ReceiveResponse(this.contents, response.contents, redemptionTime, params.contents));
24
24
  }
25
25
  }
26
26
  exports.default = BackupAuthCredentialRequestContext;
@@ -0,0 +1,5 @@
1
+ declare enum BackupLevel {
2
+ Messages = 200,
3
+ Media = 201
4
+ }
5
+ export default BackupLevel;
@@ -0,0 +1,14 @@
1
+ "use strict";
2
+ //
3
+ // Copyright 2024 Signal Messenger, LLC.
4
+ // SPDX-License-Identifier: AGPL-3.0-only
5
+ //
6
+ Object.defineProperty(exports, "__esModule", { value: true });
7
+ // This must match the Rust version of the enum.
8
+ var BackupLevel;
9
+ (function (BackupLevel) {
10
+ BackupLevel[BackupLevel["Messages"] = 200] = "Messages";
11
+ BackupLevel[BackupLevel["Media"] = 201] = "Media";
12
+ })(BackupLevel || (BackupLevel = {}));
13
+ exports.default = BackupLevel;
14
+ //# sourceMappingURL=BackupLevel.js.map
@@ -27,7 +27,7 @@ class GroupSendDerivedKeyPair extends ByteArray_1.default {
27
27
  * `expiration` must be day-aligned as a protection against fingerprinting by the issuing server.
28
28
  */
29
29
  static forExpiration(expiration, params) {
30
- return new GroupSendDerivedKeyPair(Native.GroupSendDerivedKeyPair_ForExpiration(Math.floor(expiration.getTime() / 1000), params.contents));
30
+ return new GroupSendDerivedKeyPair(Native.GroupSendDerivedKeyPair_ForExpiration(Math.floor(expiration.getTime() / 1000), params));
31
31
  }
32
32
  }
33
33
  exports.default = GroupSendDerivedKeyPair;
@@ -60,7 +60,7 @@ class GroupSendEndorsementsResponse extends ByteArray_1.default {
60
60
  * @throws {VerificationFailedError} if the endorsements are not valid for any reason
61
61
  */
62
62
  receiveWithServiceIds(groupMembers, localUser, groupParams, serverParams, now = new Date()) {
63
- const endorsementContents = Native.GroupSendEndorsementsResponse_ReceiveAndCombineWithServiceIds(this.contents, Address_1.ServiceId.toConcatenatedFixedWidthBinary(groupMembers), localUser.getServiceIdFixedWidthBinary(), Math.floor(now.getTime() / 1000), groupParams.contents, serverParams.contents);
63
+ const endorsementContents = Native.GroupSendEndorsementsResponse_ReceiveAndCombineWithServiceIds(this.contents, Address_1.ServiceId.toConcatenatedFixedWidthBinary(groupMembers), localUser.getServiceIdFixedWidthBinary(), Math.floor(now.getTime() / 1000), groupParams.contents, serverParams);
64
64
  const endorsements = endorsementContents.map((next) => {
65
65
  // Normally we don't notice the cost of validating just-created zkgroup objects,
66
66
  // but in this case we may have up to 1000 of these. Let's assume they're created correctly.
@@ -85,7 +85,7 @@ class GroupSendEndorsementsResponse extends ByteArray_1.default {
85
85
  * @throws {VerificationFailedError} if the endorsements are not valid for any reason
86
86
  */
87
87
  receiveWithCiphertexts(groupMembers, localUser, serverParams, now = new Date()) {
88
- const endorsementContents = Native.GroupSendEndorsementsResponse_ReceiveAndCombineWithCiphertexts(this.contents, UuidCiphertext_1.default.serializeAndConcatenate(groupMembers), localUser.contents, Math.floor(now.getTime() / 1000), serverParams.contents);
88
+ const endorsementContents = Native.GroupSendEndorsementsResponse_ReceiveAndCombineWithCiphertexts(this.contents, UuidCiphertext_1.default.serializeAndConcatenate(groupMembers), localUser.contents, Math.floor(now.getTime() / 1000), serverParams);
89
89
  const endorsements = endorsementContents.map((next) => {
90
90
  // Normally we don't notice the cost of validating just-created zkgroup objects,
91
91
  // but in this case we may have up to 1000 of these. Let's assume they're created correctly.
@@ -48,6 +48,7 @@ export { default as BackupAuthCredentialPresentation } from './backups/BackupAut
48
48
  export { default as BackupAuthCredentialRequest } from './backups/BackupAuthCredentialRequest';
49
49
  export { default as BackupAuthCredentialRequestContext } from './backups/BackupAuthCredentialRequestContext';
50
50
  export { default as BackupAuthCredentialResponse } from './backups/BackupAuthCredentialResponse';
51
+ export { default as BackupLevel } from './backups/BackupLevel';
51
52
  export { default as GroupSendDerivedKeyPair } from './groupsend/GroupSendDerivedKeyPair';
52
53
  export { default as GroupSendEndorsement } from './groupsend/GroupSendEndorsement';
53
54
  export { default as GroupSendEndorsementsResponse } from './groupsend/GroupSendEndorsementsResponse';
@@ -5,7 +5,7 @@
5
5
  //
6
6
  Object.defineProperty(exports, "__esModule", { value: true });
7
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 = void 0;
8
+ exports.GroupSendToken = exports.GroupSendFullToken = exports.GroupSendEndorsementsResponse = exports.GroupSendEndorsement = exports.GroupSendDerivedKeyPair = exports.BackupLevel = void 0;
9
9
  // Root
10
10
  var ServerPublicParams_1 = require("./ServerPublicParams");
11
11
  Object.defineProperty(exports, "ServerPublicParams", { enumerable: true, get: function () { return ServerPublicParams_1.default; } });
@@ -113,6 +113,8 @@ var BackupAuthCredentialRequestContext_1 = require("./backups/BackupAuthCredenti
113
113
  Object.defineProperty(exports, "BackupAuthCredentialRequestContext", { enumerable: true, get: function () { return BackupAuthCredentialRequestContext_1.default; } });
114
114
  var BackupAuthCredentialResponse_1 = require("./backups/BackupAuthCredentialResponse");
115
115
  Object.defineProperty(exports, "BackupAuthCredentialResponse", { enumerable: true, get: function () { return BackupAuthCredentialResponse_1.default; } });
116
+ var BackupLevel_1 = require("./backups/BackupLevel");
117
+ Object.defineProperty(exports, "BackupLevel", { enumerable: true, get: function () { return BackupLevel_1.default; } });
116
118
  // Group Send
117
119
  var GroupSendDerivedKeyPair_1 = require("./groupsend/GroupSendDerivedKeyPair");
118
120
  Object.defineProperty(exports, "GroupSendDerivedKeyPair", { enumerable: true, get: function () { return GroupSendDerivedKeyPair_1.default; } });
@@ -19,17 +19,17 @@ class ClientZkProfileOperations {
19
19
  return this.createProfileKeyCredentialRequestContextWithRandom(random, userId, profileKey);
20
20
  }
21
21
  createProfileKeyCredentialRequestContextWithRandom(random, userId, profileKey) {
22
- return new ProfileKeyCredentialRequestContext_1.default(Native.ServerPublicParams_CreateProfileKeyCredentialRequestContextDeterministic(this.serverPublicParams.getContents(), random, userId.getServiceIdFixedWidthBinary(), profileKey.getContents()));
22
+ return new ProfileKeyCredentialRequestContext_1.default(Native.ServerPublicParams_CreateProfileKeyCredentialRequestContextDeterministic(this.serverPublicParams, random, userId.getServiceIdFixedWidthBinary(), profileKey.getContents()));
23
23
  }
24
24
  receiveExpiringProfileKeyCredential(profileKeyCredentialRequestContext, profileKeyCredentialResponse, now = new Date()) {
25
- return new ExpiringProfileKeyCredential_1.default(Native.ServerPublicParams_ReceiveExpiringProfileKeyCredential(this.serverPublicParams.getContents(), profileKeyCredentialRequestContext.getContents(), profileKeyCredentialResponse.getContents(), Math.floor(now.getTime() / 1000)));
25
+ return new ExpiringProfileKeyCredential_1.default(Native.ServerPublicParams_ReceiveExpiringProfileKeyCredential(this.serverPublicParams, profileKeyCredentialRequestContext.getContents(), profileKeyCredentialResponse.getContents(), Math.floor(now.getTime() / 1000)));
26
26
  }
27
27
  createExpiringProfileKeyCredentialPresentation(groupSecretParams, profileKeyCredential) {
28
28
  const random = (0, crypto_1.randomBytes)(Constants_1.RANDOM_LENGTH);
29
29
  return this.createExpiringProfileKeyCredentialPresentationWithRandom(random, groupSecretParams, profileKeyCredential);
30
30
  }
31
31
  createExpiringProfileKeyCredentialPresentationWithRandom(random, groupSecretParams, profileKeyCredential) {
32
- return new ProfileKeyCredentialPresentation_1.default(Native.ServerPublicParams_CreateExpiringProfileKeyCredentialPresentationDeterministic(this.serverPublicParams.getContents(), random, groupSecretParams.getContents(), profileKeyCredential.getContents()));
32
+ return new ProfileKeyCredentialPresentation_1.default(Native.ServerPublicParams_CreateExpiringProfileKeyCredentialPresentationDeterministic(this.serverPublicParams, random, groupSecretParams.getContents(), profileKeyCredential.getContents()));
33
33
  }
34
34
  }
35
35
  exports.default = ClientZkProfileOperations;
@@ -17,10 +17,10 @@ class ServerZkProfileOperations {
17
17
  return this.issueExpiringProfileKeyCredentialWithRandom(random, profileKeyCredentialRequest, userId, profileKeyCommitment, expirationInSeconds);
18
18
  }
19
19
  issueExpiringProfileKeyCredentialWithRandom(random, profileKeyCredentialRequest, userId, profileKeyCommitment, expirationInSeconds) {
20
- return new ExpiringProfileKeyCredentialResponse_1.default(Native.ServerSecretParams_IssueExpiringProfileKeyCredentialDeterministic(this.serverSecretParams.getContents(), random, profileKeyCredentialRequest.getContents(), userId.getServiceIdFixedWidthBinary(), profileKeyCommitment.getContents(), expirationInSeconds));
20
+ return new ExpiringProfileKeyCredentialResponse_1.default(Native.ServerSecretParams_IssueExpiringProfileKeyCredentialDeterministic(this.serverSecretParams, random, profileKeyCredentialRequest.getContents(), userId.getServiceIdFixedWidthBinary(), profileKeyCommitment.getContents(), expirationInSeconds));
21
21
  }
22
22
  verifyProfileKeyCredentialPresentation(groupPublicParams, profileKeyCredentialPresentation, now = new Date()) {
23
- Native.ServerSecretParams_VerifyProfileKeyCredentialPresentation(this.serverSecretParams.getContents(), groupPublicParams.getContents(), profileKeyCredentialPresentation.getContents(), Math.floor(now.getTime() / 1000));
23
+ Native.ServerSecretParams_VerifyProfileKeyCredentialPresentation(this.serverSecretParams, groupPublicParams.getContents(), profileKeyCredentialPresentation.getContents(), Math.floor(now.getTime() / 1000));
24
24
  }
25
25
  }
26
26
  exports.default = ServerZkProfileOperations;
@@ -19,17 +19,17 @@ class ClientZkReceiptOperations {
19
19
  return this.createReceiptCredentialRequestContextWithRandom(random, receiptSerial);
20
20
  }
21
21
  createReceiptCredentialRequestContextWithRandom(random, receiptSerial) {
22
- return new ReceiptCredentialRequestContext_1.default(Native.ServerPublicParams_CreateReceiptCredentialRequestContextDeterministic(this.serverPublicParams.getContents(), random, receiptSerial.getContents()));
22
+ return new ReceiptCredentialRequestContext_1.default(Native.ServerPublicParams_CreateReceiptCredentialRequestContextDeterministic(this.serverPublicParams, random, receiptSerial.getContents()));
23
23
  }
24
24
  receiveReceiptCredential(receiptCredentialRequestContext, receiptCredentialResponse) {
25
- return new ReceiptCredential_1.default(Native.ServerPublicParams_ReceiveReceiptCredential(this.serverPublicParams.getContents(), receiptCredentialRequestContext.getContents(), receiptCredentialResponse.getContents()));
25
+ return new ReceiptCredential_1.default(Native.ServerPublicParams_ReceiveReceiptCredential(this.serverPublicParams, receiptCredentialRequestContext.getContents(), receiptCredentialResponse.getContents()));
26
26
  }
27
27
  createReceiptCredentialPresentation(receiptCredential) {
28
28
  const random = (0, crypto_1.randomBytes)(Constants_1.RANDOM_LENGTH);
29
29
  return this.createReceiptCredentialPresentationWithRandom(random, receiptCredential);
30
30
  }
31
31
  createReceiptCredentialPresentationWithRandom(random, receiptCredential) {
32
- return new ReceiptCredentialPresentation_1.default(Native.ServerPublicParams_CreateReceiptCredentialPresentationDeterministic(this.serverPublicParams.getContents(), random, receiptCredential.getContents()));
32
+ return new ReceiptCredentialPresentation_1.default(Native.ServerPublicParams_CreateReceiptCredentialPresentationDeterministic(this.serverPublicParams, random, receiptCredential.getContents()));
33
33
  }
34
34
  }
35
35
  exports.default = ClientZkReceiptOperations;
@@ -17,10 +17,10 @@ class ServerZkReceiptOperations {
17
17
  return this.issueReceiptCredentialWithRandom(random, receiptCredentialRequest, receiptExpirationTime, receiptLevel);
18
18
  }
19
19
  issueReceiptCredentialWithRandom(random, receiptCredentialRequest, receiptExpirationTime, receiptLevel) {
20
- return new ReceiptCredentialResponse_1.default(Native.ServerSecretParams_IssueReceiptCredentialDeterministic(this.serverSecretParams.getContents(), random, receiptCredentialRequest.getContents(), receiptExpirationTime, receiptLevel));
20
+ return new ReceiptCredentialResponse_1.default(Native.ServerSecretParams_IssueReceiptCredentialDeterministic(this.serverSecretParams, random, receiptCredentialRequest.getContents(), receiptExpirationTime, receiptLevel));
21
21
  }
22
22
  verifyReceiptCredentialPresentation(receiptCredentialPresentation) {
23
- Native.ServerSecretParams_VerifyReceiptCredentialPresentation(this.serverSecretParams.getContents(), receiptCredentialPresentation.getContents());
23
+ Native.ServerSecretParams_VerifyReceiptCredentialPresentation(this.serverSecretParams, receiptCredentialPresentation.getContents());
24
24
  }
25
25
  }
26
26
  exports.default = ServerZkReceiptOperations;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@signalapp/libsignal-client",
3
- "version": "0.44.0",
3
+ "version": "0.45.0",
4
4
  "license": "AGPL-3.0-only",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
Binary file
Binary file
Binary file