@signalapp/libsignal-client 0.76.3 → 0.76.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/Native.d.ts CHANGED
@@ -416,6 +416,7 @@ export function PrivateKey_Agree(privateKey: Wrapper<PrivateKey>, publicKey: Wra
416
416
  export function PrivateKey_Deserialize(data: Uint8Array): PrivateKey;
417
417
  export function PrivateKey_Generate(): PrivateKey;
418
418
  export function PrivateKey_GetPublicKey(k: Wrapper<PrivateKey>): PublicKey;
419
+ export function PrivateKey_HpkeOpen(sk: Wrapper<PrivateKey>, ciphertext: Uint8Array, info: Uint8Array, associatedData: Uint8Array): Uint8Array;
419
420
  export function PrivateKey_Serialize(obj: Wrapper<PrivateKey>): Uint8Array;
420
421
  export function PrivateKey_Sign(key: Wrapper<PrivateKey>, message: Uint8Array): Uint8Array;
421
422
  export function ProfileKeyCiphertext_CheckValidContents(buffer: Uint8Array): void;
@@ -437,6 +438,7 @@ export function PublicKey_Compare(key1: Wrapper<PublicKey>, key2: Wrapper<Public
437
438
  export function PublicKey_Deserialize(data: Uint8Array): PublicKey;
438
439
  export function PublicKey_Equals(lhs: Wrapper<PublicKey>, rhs: Wrapper<PublicKey>): boolean;
439
440
  export function PublicKey_GetPublicKeyBytes(obj: Wrapper<PublicKey>): Uint8Array;
441
+ export function PublicKey_HpkeSeal(pk: Wrapper<PublicKey>, plaintext: Uint8Array, info: Uint8Array, associatedData: Uint8Array): Uint8Array;
440
442
  export function PublicKey_Serialize(obj: Wrapper<PublicKey>): Uint8Array;
441
443
  export function PublicKey_Verify(key: Wrapper<PublicKey>, message: Uint8Array, signature: Uint8Array): boolean;
442
444
  export function ReceiptCredentialPresentation_CheckValidContents(buffer: Uint8Array): void;
package/dist/EcKeys.d.ts CHANGED
@@ -9,6 +9,19 @@ export declare class PublicKey {
9
9
  getPublicKeyBytes(): Uint8Array;
10
10
  verify(msg: Uint8Array, sig: Uint8Array): boolean;
11
11
  verifyAlternateIdentity(other: PublicKey, signature: Uint8Array): boolean;
12
+ /**
13
+ * Seals a message so only the holder of the private key can decrypt it.
14
+ *
15
+ * Uses HPKE ({@link https://www.rfc-editor.org/rfc/rfc9180.html|RFC 9180}). The output will
16
+ * include a type byte indicating the chosen algorithms and ciphertext layout. The `info`
17
+ * parameter should typically be a static value describing the purpose of the message, while
18
+ * `associatedData` can be used to restrict successful decryption beyond holding the private key.
19
+ *
20
+ * A string `info` will be encoded as UTF-8.
21
+ *
22
+ * @see PrivateKey#open
23
+ */
24
+ seal(msg: Uint8Array, info: string | Uint8Array, associatedData?: Uint8Array): Uint8Array;
12
25
  }
13
26
  export declare class PrivateKey {
14
27
  readonly _nativeHandle: Native.PrivateKey;
@@ -20,6 +33,14 @@ export declare class PrivateKey {
20
33
  sign(msg: Uint8Array): Uint8Array;
21
34
  agree(other_key: PublicKey): Uint8Array;
22
35
  getPublicKey(): PublicKey;
36
+ /**
37
+ * Opens a ciphertext sealed with {@link PublicKey#seal}.
38
+ *
39
+ * Uses HPKE ({@link https://www.rfc-editor.org/rfc/rfc9180.html|RFC 9180}). The input should
40
+ * include its original type byte indicating the chosen algorithms and ciphertext layout. The
41
+ * `info` and `associatedData` must match those used during sealing.
42
+ */
43
+ open(ciphertext: Uint8Array, info: string | Uint8Array, associatedData?: Uint8Array): Uint8Array;
23
44
  }
24
45
  export declare class IdentityKeyPair {
25
46
  readonly publicKey: PublicKey;
package/dist/EcKeys.js CHANGED
@@ -32,6 +32,22 @@ class PublicKey {
32
32
  verifyAlternateIdentity(other, signature) {
33
33
  return Native.IdentityKey_VerifyAlternateIdentity(this, other, signature);
34
34
  }
35
+ /**
36
+ * Seals a message so only the holder of the private key can decrypt it.
37
+ *
38
+ * Uses HPKE ({@link https://www.rfc-editor.org/rfc/rfc9180.html|RFC 9180}). The output will
39
+ * include a type byte indicating the chosen algorithms and ciphertext layout. The `info`
40
+ * parameter should typically be a static value describing the purpose of the message, while
41
+ * `associatedData` can be used to restrict successful decryption beyond holding the private key.
42
+ *
43
+ * A string `info` will be encoded as UTF-8.
44
+ *
45
+ * @see PrivateKey#open
46
+ */
47
+ seal(msg, info, associatedData) {
48
+ const infoBuffer = typeof info === 'string' ? new TextEncoder().encode(info) : info;
49
+ return Native.PublicKey_HpkeSeal(this, msg, infoBuffer, associatedData ?? new Uint8Array());
50
+ }
35
51
  }
36
52
  exports.PublicKey = PublicKey;
37
53
  class PrivateKey {
@@ -59,6 +75,17 @@ class PrivateKey {
59
75
  getPublicKey() {
60
76
  return PublicKey._fromNativeHandle(Native.PrivateKey_GetPublicKey(this));
61
77
  }
78
+ /**
79
+ * Opens a ciphertext sealed with {@link PublicKey#seal}.
80
+ *
81
+ * Uses HPKE ({@link https://www.rfc-editor.org/rfc/rfc9180.html|RFC 9180}). The input should
82
+ * include its original type byte indicating the chosen algorithms and ciphertext layout. The
83
+ * `info` and `associatedData` must match those used during sealing.
84
+ */
85
+ open(ciphertext, info, associatedData) {
86
+ const infoBuffer = typeof info === 'string' ? new TextEncoder().encode(info) : info;
87
+ return Native.PrivateKey_HpkeOpen(this, ciphertext, infoBuffer, associatedData ?? new Uint8Array());
88
+ }
62
89
  }
63
90
  exports.PrivateKey = PrivateKey;
64
91
  class IdentityKeyPair {
@@ -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
- ## libsignal-account-keys, attest, libsignal-node, signal-neon-futures, libsignal-bridge, libsignal-bridge-macros, libsignal-bridge-testing, libsignal-bridge-types, libsignal-core, signal-crypto, device-transfer, libsignal-keytrans, signal-media, libsignal-message-backup, libsignal-message-backup-macros, libsignal-net, libsignal-net-chat, libsignal-net-infra, poksho, libsignal-protocol, usernames, zkcredential, zkgroup
672
+ ## libsignal-account-keys, attest, libsignal-node, signal-neon-futures, libsignal-bridge, libsignal-bridge-macros, libsignal-bridge-testing, libsignal-bridge-types, libsignal-core, signal-crypto, device-transfer, libsignal-keytrans, signal-media, libsignal-message-backup, libsignal-message-backup-macros, libsignal-net, libsignal-net-chat, libsignal-net-infra, poksho, libsignal-protocol, libsignal-svrb, usernames, zkcredential, zkgroup
673
673
 
674
674
  ```
675
675
  GNU AFFERO GENERAL PUBLIC LICENSE
@@ -2007,7 +2007,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
2007
2007
 
2008
2008
  ```
2009
2009
 
2010
- ## libcrux-intrinsics 0.0.2, libcrux-ml-kem 0.0.2, libcrux-platform 0.0.2, libcrux-sha3 0.0.2
2010
+ ## libcrux-intrinsics 0.0.2, libcrux-intrinsics 0.0.3, libcrux-ml-kem 0.0.2, libcrux-platform 0.0.2, libcrux-sha3 0.0.2, libcrux-sha3 0.0.3
2011
2011
 
2012
2012
  ```
2013
2013
  Apache License
@@ -2692,38 +2692,6 @@ limitations under the License.
2692
2692
 
2693
2693
  ```
2694
2694
 
2695
- ## arrayref 0.3.9
2696
-
2697
- ```
2698
- Copyright (c) 2015 David Roundy <roundyd@physics.oregonstate.edu>
2699
- All rights reserved.
2700
-
2701
- Redistribution and use in source and binary forms, with or without
2702
- modification, are permitted provided that the following conditions are
2703
- met:
2704
-
2705
- 1. Redistributions of source code must retain the above copyright
2706
- notice, this list of conditions and the following disclaimer.
2707
-
2708
- 2. Redistributions in binary form must reproduce the above copyright
2709
- notice, this list of conditions and the following disclaimer in the
2710
- documentation and/or other materials provided with the
2711
- distribution.
2712
-
2713
- THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
2714
- "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
2715
- LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
2716
- A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
2717
- HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
2718
- SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
2719
- LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
2720
- DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
2721
- THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
2722
- (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
2723
- OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
2724
-
2725
- ```
2726
-
2727
2695
  ## bindgen 0.70.1
2728
2696
 
2729
2697
  ```
@@ -3272,68 +3240,6 @@ SOFTWARE.
3272
3240
 
3273
3241
  ```
3274
3242
 
3275
- ## form_urlencoded 1.2.1
3276
-
3277
- ```
3278
- Copyright (c) 2013-2016 The rust-url developers
3279
-
3280
- Permission is hereby granted, free of charge, to any
3281
- person obtaining a copy of this software and associated
3282
- documentation files (the "Software"), to deal in the
3283
- Software without restriction, including without
3284
- limitation the rights to use, copy, modify, merge,
3285
- publish, distribute, sublicense, and/or sell copies of
3286
- the Software, and to permit persons to whom the Software
3287
- is furnished to do so, subject to the following
3288
- conditions:
3289
-
3290
- The above copyright notice and this permission notice
3291
- shall be included in all copies or substantial portions
3292
- of the Software.
3293
-
3294
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF
3295
- ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED
3296
- TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A
3297
- PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT
3298
- SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
3299
- CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
3300
- OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR
3301
- IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
3302
- DEALINGS IN THE SOFTWARE.
3303
-
3304
- ```
3305
-
3306
- ## idna 1.0.3, percent-encoding 2.3.1, url 2.5.4
3307
-
3308
- ```
3309
- Copyright (c) 2013-2022 The rust-url developers
3310
-
3311
- Permission is hereby granted, free of charge, to any
3312
- person obtaining a copy of this software and associated
3313
- documentation files (the "Software"), to deal in the
3314
- Software without restriction, including without
3315
- limitation the rights to use, copy, modify, merge,
3316
- publish, distribute, sublicense, and/or sell copies of
3317
- the Software, and to permit persons to whom the Software
3318
- is furnished to do so, subject to the following
3319
- conditions:
3320
-
3321
- The above copyright notice and this permission notice
3322
- shall be included in all copies or substantial portions
3323
- of the Software.
3324
-
3325
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF
3326
- ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED
3327
- TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A
3328
- PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT
3329
- SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
3330
- CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
3331
- OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR
3332
- IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
3333
- DEALINGS IN THE SOFTWARE.
3334
-
3335
- ```
3336
-
3337
3243
  ## backtrace 0.3.74, cc 1.2.18, cfg-if 1.0.0, cmake 0.1.48, openssl-probe 0.1.6, rustc-demangle 0.1.24, socket2 0.5.9
3338
3244
 
3339
3245
  ```
@@ -4744,36 +4650,6 @@ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
4744
4650
 
4745
4651
  ```
4746
4652
 
4747
- ## stable_deref_trait 1.2.0
4748
-
4749
- ```
4750
- Copyright (c) 2017 Robert Grosse
4751
-
4752
- Permission is hereby granted, free of charge, to any
4753
- person obtaining a copy of this software and associated
4754
- documentation files (the "Software"), to deal in the
4755
- Software without restriction, including without
4756
- limitation the rights to use, copy, modify, merge,
4757
- publish, distribute, sublicense, and/or sell copies of
4758
- the Software, and to permit persons to whom the Software
4759
- is furnished to do so, subject to the following
4760
- conditions:
4761
-
4762
- The above copyright notice and this permission notice
4763
- shall be included in all copies or substantial portions
4764
- of the Software.
4765
-
4766
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF
4767
- ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED
4768
- TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A
4769
- PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT
4770
- SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
4771
- CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
4772
- OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR
4773
- IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
4774
- DEALINGS IN THE SOFTWARE.
4775
- ```
4776
-
4777
4653
  ## foreign-types-macros 0.2.3, foreign-types-shared 0.3.1, foreign-types 0.5.0
4778
4654
 
4779
4655
  ```
@@ -6175,7 +6051,7 @@ SOFTWARE.
6175
6051
 
6176
6052
  ```
6177
6053
 
6178
- ## anstream 0.6.18, anstyle-query 1.1.2, clap 4.5.35, colorchoice 1.0.3, env_filter 0.1.3, env_logger 0.11.8, is_terminal_polyfill 1.70.1, toml_datetime 0.6.8, toml_edit 0.22.24
6054
+ ## anstream 0.6.18, anstyle-query 1.1.2, clap 4.5.35, colorchoice 1.0.3, is_terminal_polyfill 1.70.1, toml_datetime 0.6.8, toml_edit 0.22.24
6179
6055
 
6180
6056
  ```
6181
6057
  Copyright (c) Individual contributors
@@ -6237,37 +6113,6 @@ The above copyright notice and this permission notice shall be included in all c
6237
6113
  THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
6238
6114
  ```
6239
6115
 
6240
- ## idna_adapter 1.2.0
6241
-
6242
- ```
6243
- Copyright (c) The rust-url developers
6244
-
6245
- Permission is hereby granted, free of charge, to any
6246
- person obtaining a copy of this software and associated
6247
- documentation files (the "Software"), to deal in the
6248
- Software without restriction, including without
6249
- limitation the rights to use, copy, modify, merge,
6250
- publish, distribute, sublicense, and/or sell copies of
6251
- the Software, and to permit persons to whom the Software
6252
- is furnished to do so, subject to the following
6253
- conditions:
6254
-
6255
- The above copyright notice and this permission notice
6256
- shall be included in all copies or substantial portions
6257
- of the Software.
6258
-
6259
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF
6260
- ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED
6261
- TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A
6262
- PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT
6263
- SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
6264
- CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
6265
- OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR
6266
- IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
6267
- DEALINGS IN THE SOFTWARE.
6268
-
6269
- ```
6270
-
6271
6116
  ## arrayvec 0.7.6
6272
6117
 
6273
6118
  ```
@@ -6299,19 +6144,6 @@ DEALINGS IN THE SOFTWARE.
6299
6144
 
6300
6145
  ```
6301
6146
 
6302
- ## synstructure 0.13.1
6303
-
6304
- ```
6305
- Copyright 2016 Nika Layzell
6306
-
6307
- Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
6308
-
6309
- The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
6310
-
6311
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
6312
-
6313
- ```
6314
-
6315
6147
  ## rand 0.9.0, rand_chacha 0.9.0, rand_core 0.6.4, rand_core 0.9.3
6316
6148
 
6317
6149
  ```
@@ -6389,7 +6221,7 @@ DEALINGS IN THE SOFTWARE.
6389
6221
 
6390
6222
  ```
6391
6223
 
6392
- ## encoding_rs 0.8.35, utf16_iter 1.0.5, utf8_iter 1.0.4, write16 1.0.0
6224
+ ## encoding_rs 0.8.35
6393
6225
 
6394
6226
  ```
6395
6227
  Copyright Mozilla Foundation
@@ -7203,7 +7035,7 @@ THE SOFTWARE.
7203
7035
 
7204
7036
  ```
7205
7037
 
7206
- ## aho-corasick 1.1.3, jiff 0.2.5, memchr 2.7.4
7038
+ ## aho-corasick 1.1.3, memchr 2.7.4
7207
7039
 
7208
7040
  ```
7209
7041
  The MIT License (MIT)
@@ -7647,6 +7479,385 @@ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
7647
7479
  SOFTWARE.
7648
7480
  ```
7649
7481
 
7482
+ ## hpke-rs-crypto 0.3.0, hpke-rs 0.3.0
7483
+
7484
+ ```
7485
+ Mozilla Public License Version 2.0
7486
+ ==================================
7487
+
7488
+ 1. Definitions
7489
+ --------------
7490
+
7491
+ 1.1. "Contributor"
7492
+ means each individual or legal entity that creates, contributes to
7493
+ the creation of, or owns Covered Software.
7494
+
7495
+ 1.2. "Contributor Version"
7496
+ means the combination of the Contributions of others (if any) used
7497
+ by a Contributor and that particular Contributor's Contribution.
7498
+
7499
+ 1.3. "Contribution"
7500
+ means Covered Software of a particular Contributor.
7501
+
7502
+ 1.4. "Covered Software"
7503
+ means Source Code Form to which the initial Contributor has attached
7504
+ the notice in Exhibit A, the Executable Form of such Source Code
7505
+ Form, and Modifications of such Source Code Form, in each case
7506
+ including portions thereof.
7507
+
7508
+ 1.5. "Incompatible With Secondary Licenses"
7509
+ means
7510
+
7511
+ (a) that the initial Contributor has attached the notice described
7512
+ in Exhibit B to the Covered Software; or
7513
+
7514
+ (b) that the Covered Software was made available under the terms of
7515
+ version 1.1 or earlier of the License, but not also under the
7516
+ terms of a Secondary License.
7517
+
7518
+ 1.6. "Executable Form"
7519
+ means any form of the work other than Source Code Form.
7520
+
7521
+ 1.7. "Larger Work"
7522
+ means a work that combines Covered Software with other material, in
7523
+ a separate file or files, that is not Covered Software.
7524
+
7525
+ 1.8. "License"
7526
+ means this document.
7527
+
7528
+ 1.9. "Licensable"
7529
+ means having the right to grant, to the maximum extent possible,
7530
+ whether at the time of the initial grant or subsequently, any and
7531
+ all of the rights conveyed by this License.
7532
+
7533
+ 1.10. "Modifications"
7534
+ means any of the following:
7535
+
7536
+ (a) any file in Source Code Form that results from an addition to,
7537
+ deletion from, or modification of the contents of Covered
7538
+ Software; or
7539
+
7540
+ (b) any new file in Source Code Form that contains any Covered
7541
+ Software.
7542
+
7543
+ 1.11. "Patent Claims" of a Contributor
7544
+ means any patent claim(s), including without limitation, method,
7545
+ process, and apparatus claims, in any patent Licensable by such
7546
+ Contributor that would be infringed, but for the grant of the
7547
+ License, by the making, using, selling, offering for sale, having
7548
+ made, import, or transfer of either its Contributions or its
7549
+ Contributor Version.
7550
+
7551
+ 1.12. "Secondary License"
7552
+ means either the GNU General Public License, Version 2.0, the GNU
7553
+ Lesser General Public License, Version 2.1, the GNU Affero General
7554
+ Public License, Version 3.0, or any later versions of those
7555
+ licenses.
7556
+
7557
+ 1.13. "Source Code Form"
7558
+ means the form of the work preferred for making modifications.
7559
+
7560
+ 1.14. "You" (or "Your")
7561
+ means an individual or a legal entity exercising rights under this
7562
+ License. For legal entities, "You" includes any entity that
7563
+ controls, is controlled by, or is under common control with You. For
7564
+ purposes of this definition, "control" means (a) the power, direct
7565
+ or indirect, to cause the direction or management of such entity,
7566
+ whether by contract or otherwise, or (b) ownership of more than
7567
+ fifty percent (50%) of the outstanding shares or beneficial
7568
+ ownership of such entity.
7569
+
7570
+ 2. License Grants and Conditions
7571
+ --------------------------------
7572
+
7573
+ 2.1. Grants
7574
+
7575
+ Each Contributor hereby grants You a world-wide, royalty-free,
7576
+ non-exclusive license:
7577
+
7578
+ (a) under intellectual property rights (other than patent or trademark)
7579
+ Licensable by such Contributor to use, reproduce, make available,
7580
+ modify, display, perform, distribute, and otherwise exploit its
7581
+ Contributions, either on an unmodified basis, with Modifications, or
7582
+ as part of a Larger Work; and
7583
+
7584
+ (b) under Patent Claims of such Contributor to make, use, sell, offer
7585
+ for sale, have made, import, and otherwise transfer either its
7586
+ Contributions or its Contributor Version.
7587
+
7588
+ 2.2. Effective Date
7589
+
7590
+ The licenses granted in Section 2.1 with respect to any Contribution
7591
+ become effective for each Contribution on the date the Contributor first
7592
+ distributes such Contribution.
7593
+
7594
+ 2.3. Limitations on Grant Scope
7595
+
7596
+ The licenses granted in this Section 2 are the only rights granted under
7597
+ this License. No additional rights or licenses will be implied from the
7598
+ distribution or licensing of Covered Software under this License.
7599
+ Notwithstanding Section 2.1(b) above, no patent license is granted by a
7600
+ Contributor:
7601
+
7602
+ (a) for any code that a Contributor has removed from Covered Software;
7603
+ or
7604
+
7605
+ (b) for infringements caused by: (i) Your and any other third party's
7606
+ modifications of Covered Software, or (ii) the combination of its
7607
+ Contributions with other software (except as part of its Contributor
7608
+ Version); or
7609
+
7610
+ (c) under Patent Claims infringed by Covered Software in the absence of
7611
+ its Contributions.
7612
+
7613
+ This License does not grant any rights in the trademarks, service marks,
7614
+ or logos of any Contributor (except as may be necessary to comply with
7615
+ the notice requirements in Section 3.4).
7616
+
7617
+ 2.4. Subsequent Licenses
7618
+
7619
+ No Contributor makes additional grants as a result of Your choice to
7620
+ distribute the Covered Software under a subsequent version of this
7621
+ License (see Section 10.2) or under the terms of a Secondary License (if
7622
+ permitted under the terms of Section 3.3).
7623
+
7624
+ 2.5. Representation
7625
+
7626
+ Each Contributor represents that the Contributor believes its
7627
+ Contributions are its original creation(s) or it has sufficient rights
7628
+ to grant the rights to its Contributions conveyed by this License.
7629
+
7630
+ 2.6. Fair Use
7631
+
7632
+ This License is not intended to limit any rights You have under
7633
+ applicable copyright doctrines of fair use, fair dealing, or other
7634
+ equivalents.
7635
+
7636
+ 2.7. Conditions
7637
+
7638
+ Sections 3.1, 3.2, 3.3, and 3.4 are conditions of the licenses granted
7639
+ in Section 2.1.
7640
+
7641
+ 3. Responsibilities
7642
+ -------------------
7643
+
7644
+ 3.1. Distribution of Source Form
7645
+
7646
+ All distribution of Covered Software in Source Code Form, including any
7647
+ Modifications that You create or to which You contribute, must be under
7648
+ the terms of this License. You must inform recipients that the Source
7649
+ Code Form of the Covered Software is governed by the terms of this
7650
+ License, and how they can obtain a copy of this License. You may not
7651
+ attempt to alter or restrict the recipients' rights in the Source Code
7652
+ Form.
7653
+
7654
+ 3.2. Distribution of Executable Form
7655
+
7656
+ If You distribute Covered Software in Executable Form then:
7657
+
7658
+ (a) such Covered Software must also be made available in Source Code
7659
+ Form, as described in Section 3.1, and You must inform recipients of
7660
+ the Executable Form how they can obtain a copy of such Source Code
7661
+ Form by reasonable means in a timely manner, at a charge no more
7662
+ than the cost of distribution to the recipient; and
7663
+
7664
+ (b) You may distribute such Executable Form under the terms of this
7665
+ License, or sublicense it under different terms, provided that the
7666
+ license for the Executable Form does not attempt to limit or alter
7667
+ the recipients' rights in the Source Code Form under this License.
7668
+
7669
+ 3.3. Distribution of a Larger Work
7670
+
7671
+ You may create and distribute a Larger Work under terms of Your choice,
7672
+ provided that You also comply with the requirements of this License for
7673
+ the Covered Software. If the Larger Work is a combination of Covered
7674
+ Software with a work governed by one or more Secondary Licenses, and the
7675
+ Covered Software is not Incompatible With Secondary Licenses, this
7676
+ License permits You to additionally distribute such Covered Software
7677
+ under the terms of such Secondary License(s), so that the recipient of
7678
+ the Larger Work may, at their option, further distribute the Covered
7679
+ Software under the terms of either this License or such Secondary
7680
+ License(s).
7681
+
7682
+ 3.4. Notices
7683
+
7684
+ You may not remove or alter the substance of any license notices
7685
+ (including copyright notices, patent notices, disclaimers of warranty,
7686
+ or limitations of liability) contained within the Source Code Form of
7687
+ the Covered Software, except that You may alter any license notices to
7688
+ the extent required to remedy known factual inaccuracies.
7689
+
7690
+ 3.5. Application of Additional Terms
7691
+
7692
+ You may choose to offer, and to charge a fee for, warranty, support,
7693
+ indemnity or liability obligations to one or more recipients of Covered
7694
+ Software. However, You may do so only on Your own behalf, and not on
7695
+ behalf of any Contributor. You must make it absolutely clear that any
7696
+ such warranty, support, indemnity, or liability obligation is offered by
7697
+ You alone, and You hereby agree to indemnify every Contributor for any
7698
+ liability incurred by such Contributor as a result of warranty, support,
7699
+ indemnity or liability terms You offer. You may include additional
7700
+ disclaimers of warranty and limitations of liability specific to any
7701
+ jurisdiction.
7702
+
7703
+ 4. Inability to Comply Due to Statute or Regulation
7704
+ ---------------------------------------------------
7705
+
7706
+ If it is impossible for You to comply with any of the terms of this
7707
+ License with respect to some or all of the Covered Software due to
7708
+ statute, judicial order, or regulation then You must: (a) comply with
7709
+ the terms of this License to the maximum extent possible; and (b)
7710
+ describe the limitations and the code they affect. Such description must
7711
+ be placed in a text file included with all distributions of the Covered
7712
+ Software under this License. Except to the extent prohibited by statute
7713
+ or regulation, such description must be sufficiently detailed for a
7714
+ recipient of ordinary skill to be able to understand it.
7715
+
7716
+ 5. Termination
7717
+ --------------
7718
+
7719
+ 5.1. The rights granted under this License will terminate automatically
7720
+ if You fail to comply with any of its terms. However, if You become
7721
+ compliant, then the rights granted under this License from a particular
7722
+ Contributor are reinstated (a) provisionally, unless and until such
7723
+ Contributor explicitly and finally terminates Your grants, and (b) on an
7724
+ ongoing basis, if such Contributor fails to notify You of the
7725
+ non-compliance by some reasonable means prior to 60 days after You have
7726
+ come back into compliance. Moreover, Your grants from a particular
7727
+ Contributor are reinstated on an ongoing basis if such Contributor
7728
+ notifies You of the non-compliance by some reasonable means, this is the
7729
+ first time You have received notice of non-compliance with this License
7730
+ from such Contributor, and You become compliant prior to 30 days after
7731
+ Your receipt of the notice.
7732
+
7733
+ 5.2. If You initiate litigation against any entity by asserting a patent
7734
+ infringement claim (excluding declaratory judgment actions,
7735
+ counter-claims, and cross-claims) alleging that a Contributor Version
7736
+ directly or indirectly infringes any patent, then the rights granted to
7737
+ You by any and all Contributors for the Covered Software under Section
7738
+ 2.1 of this License shall terminate.
7739
+
7740
+ 5.3. In the event of termination under Sections 5.1 or 5.2 above, all
7741
+ end user license agreements (excluding distributors and resellers) which
7742
+ have been validly granted by You or Your distributors under this License
7743
+ prior to termination shall survive termination.
7744
+
7745
+ ************************************************************************
7746
+ * *
7747
+ * 6. Disclaimer of Warranty *
7748
+ * ------------------------- *
7749
+ * *
7750
+ * Covered Software is provided under this License on an "as is" *
7751
+ * basis, without warranty of any kind, either expressed, implied, or *
7752
+ * statutory, including, without limitation, warranties that the *
7753
+ * Covered Software is free of defects, merchantable, fit for a *
7754
+ * particular purpose or non-infringing. The entire risk as to the *
7755
+ * quality and performance of the Covered Software is with You. *
7756
+ * Should any Covered Software prove defective in any respect, You *
7757
+ * (not any Contributor) assume the cost of any necessary servicing, *
7758
+ * repair, or correction. This disclaimer of warranty constitutes an *
7759
+ * essential part of this License. No use of any Covered Software is *
7760
+ * authorized under this License except under this disclaimer. *
7761
+ * *
7762
+ ************************************************************************
7763
+
7764
+ ************************************************************************
7765
+ * *
7766
+ * 7. Limitation of Liability *
7767
+ * -------------------------- *
7768
+ * *
7769
+ * Under no circumstances and under no legal theory, whether tort *
7770
+ * (including negligence), contract, or otherwise, shall any *
7771
+ * Contributor, or anyone who distributes Covered Software as *
7772
+ * permitted above, be liable to You for any direct, indirect, *
7773
+ * special, incidental, or consequential damages of any character *
7774
+ * including, without limitation, damages for lost profits, loss of *
7775
+ * goodwill, work stoppage, computer failure or malfunction, or any *
7776
+ * and all other commercial damages or losses, even if such party *
7777
+ * shall have been informed of the possibility of such damages. This *
7778
+ * limitation of liability shall not apply to liability for death or *
7779
+ * personal injury resulting from such party's negligence to the *
7780
+ * extent applicable law prohibits such limitation. Some *
7781
+ * jurisdictions do not allow the exclusion or limitation of *
7782
+ * incidental or consequential damages, so this exclusion and *
7783
+ * limitation may not apply to You. *
7784
+ * *
7785
+ ************************************************************************
7786
+
7787
+ 8. Litigation
7788
+ -------------
7789
+
7790
+ Any litigation relating to this License may be brought only in the
7791
+ courts of a jurisdiction where the defendant maintains its principal
7792
+ place of business and such litigation shall be governed by laws of that
7793
+ jurisdiction, without reference to its conflict-of-law provisions.
7794
+ Nothing in this Section shall prevent a party's ability to bring
7795
+ cross-claims or counter-claims.
7796
+
7797
+ 9. Miscellaneous
7798
+ ----------------
7799
+
7800
+ This License represents the complete agreement concerning the subject
7801
+ matter hereof. If any provision of this License is held to be
7802
+ unenforceable, such provision shall be reformed only to the extent
7803
+ necessary to make it enforceable. Any law or regulation which provides
7804
+ that the language of a contract shall be construed against the drafter
7805
+ shall not be used to construe this License against a Contributor.
7806
+
7807
+ 10. Versions of the License
7808
+ ---------------------------
7809
+
7810
+ 10.1. New Versions
7811
+
7812
+ Mozilla Foundation is the license steward. Except as provided in Section
7813
+ 10.3, no one other than the license steward has the right to modify or
7814
+ publish new versions of this License. Each version will be given a
7815
+ distinguishing version number.
7816
+
7817
+ 10.2. Effect of New Versions
7818
+
7819
+ You may distribute the Covered Software under the terms of the version
7820
+ of the License under which You originally received the Covered Software,
7821
+ or under the terms of any subsequent version published by the license
7822
+ steward.
7823
+
7824
+ 10.3. Modified Versions
7825
+
7826
+ If you create software not governed by this License, and you want to
7827
+ create a new license for such software, you may create and use a
7828
+ modified version of this License if you rename the license and remove
7829
+ any references to the name of the license steward (except to note that
7830
+ such modified license differs from this License).
7831
+
7832
+ 10.4. Distributing Source Code Form that is Incompatible With Secondary
7833
+ Licenses
7834
+
7835
+ If You choose to distribute Source Code Form that is Incompatible With
7836
+ Secondary Licenses under the terms of this version of the License, the
7837
+ notice described in Exhibit B of this License must be attached.
7838
+
7839
+ Exhibit A - Source Code Form License Notice
7840
+ -------------------------------------------
7841
+
7842
+ This Source Code Form is subject to the terms of the Mozilla Public
7843
+ License, v. 2.0. If a copy of the MPL was not distributed with this
7844
+ file, You can obtain one at https://mozilla.org/MPL/2.0/.
7845
+
7846
+ If it is not possible or desirable to put the notice in a particular
7847
+ file, then You may include the notice in a location (such as a LICENSE
7848
+ file in a relevant directory) where a recipient would be likely to look
7849
+ for such a notice.
7850
+
7851
+ You may add additional accurate notices of copyright ownership.
7852
+
7853
+ Exhibit B - "Incompatible With Secondary Licenses" Notice
7854
+ ---------------------------------------------------------
7855
+
7856
+ This Source Code Form is "Incompatible With Secondary Licenses", as
7857
+ defined by the Mozilla Public License, v. 2.0.
7858
+
7859
+ ```
7860
+
7650
7861
  ## boring-sys 4.15.0
7651
7862
 
7652
7863
  ```
@@ -7750,58 +7961,6 @@ authorization of the copyright holder.
7750
7961
 
7751
7962
  ```
7752
7963
 
7753
- ## icu_collections 1.5.0, icu_locid 1.5.0, icu_locid_transform 1.5.0, icu_locid_transform_data 1.5.1, icu_normalizer 1.5.0, icu_normalizer_data 1.5.1, icu_properties 1.5.1, icu_properties_data 1.5.1, icu_provider 1.5.0, icu_provider_macros 1.5.0, litemap 0.7.4, tinystr 0.7.6, writeable 0.5.5, yoke-derive 0.7.5, yoke 0.7.5, zerofrom-derive 0.1.5, zerofrom 0.1.5, zerovec-derive 0.10.3, zerovec 0.10.4
7754
-
7755
- ```
7756
- UNICODE LICENSE V3
7757
-
7758
- COPYRIGHT AND PERMISSION NOTICE
7759
-
7760
- Copyright © 2020-2024 Unicode, Inc.
7761
-
7762
- NOTICE TO USER: Carefully read the following legal agreement. BY
7763
- DOWNLOADING, INSTALLING, COPYING OR OTHERWISE USING DATA FILES, AND/OR
7764
- SOFTWARE, YOU UNEQUIVOCALLY ACCEPT, AND AGREE TO BE BOUND BY, ALL OF THE
7765
- TERMS AND CONDITIONS OF THIS AGREEMENT. IF YOU DO NOT AGREE, DO NOT
7766
- DOWNLOAD, INSTALL, COPY, DISTRIBUTE OR USE THE DATA FILES OR SOFTWARE.
7767
-
7768
- Permission is hereby granted, free of charge, to any person obtaining a
7769
- copy of data files and any associated documentation (the "Data Files") or
7770
- software and any associated documentation (the "Software") to deal in the
7771
- Data Files or Software without restriction, including without limitation
7772
- the rights to use, copy, modify, merge, publish, distribute, and/or sell
7773
- copies of the Data Files or Software, and to permit persons to whom the
7774
- Data Files or Software are furnished to do so, provided that either (a)
7775
- this copyright and permission notice appear with all copies of the Data
7776
- Files or Software, or (b) this copyright and permission notice appear in
7777
- associated Documentation.
7778
-
7779
- THE DATA FILES AND SOFTWARE ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY
7780
- KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
7781
- MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT OF
7782
- THIRD PARTY RIGHTS.
7783
-
7784
- IN NO EVENT SHALL THE COPYRIGHT HOLDER OR HOLDERS INCLUDED IN THIS NOTICE
7785
- BE LIABLE FOR ANY CLAIM, OR ANY SPECIAL INDIRECT OR CONSEQUENTIAL DAMAGES,
7786
- OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
7787
- WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,
7788
- ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THE DATA
7789
- FILES OR SOFTWARE.
7790
-
7791
- Except as contained in this notice, the name of a copyright holder shall
7792
- not be used in advertising or otherwise to promote the sale, use or other
7793
- dealings in these Data Files or Software without prior written
7794
- authorization of the copyright holder.
7795
-
7796
- SPDX-License-Identifier: Unicode-3.0
7797
-
7798
-
7799
-
7800
- Portions of ICU4X may have been adapted from ICU4C and/or ICU4J.
7801
- ICU 1.8.1 to ICU 57.1 © 1995-2016 International Business Machines Corporation and others.
7802
-
7803
- ```
7804
-
7805
7964
 
7806
7965
  ## Kyber Patent License
7807
7966
 
@@ -81,6 +81,16 @@ export declare class RegistrationService {
81
81
  submitCaptcha(captcha: string): Promise<{
82
82
  allowedToRequestCode: boolean;
83
83
  }>;
84
+ /**
85
+ * Request that a verification code be sent via the given transport method.
86
+ *
87
+ * With the websocket transport, this makes a POST request to
88
+ * `/v1/verification/session/{sessionId}/code`.
89
+ *
90
+ * The `languages` parameter should be a list of languages in Accept-Language syntax. Note that
91
+ * "quality weighting" can be left out; the Signal server will always consider the list to be in
92
+ * priority order.
93
+ */
84
94
  requestVerification({ transport, client, languages, }: {
85
95
  transport: 'sms' | 'voice';
86
96
  client: string;
@@ -76,6 +76,16 @@ class RegistrationService {
76
76
  await Native.RegistrationService_SubmitCaptcha(this.tokioAsyncContext, this, captcha);
77
77
  return this.sessionState;
78
78
  }
79
+ /**
80
+ * Request that a verification code be sent via the given transport method.
81
+ *
82
+ * With the websocket transport, this makes a POST request to
83
+ * `/v1/verification/session/{sessionId}/code`.
84
+ *
85
+ * The `languages` parameter should be a list of languages in Accept-Language syntax. Note that
86
+ * "quality weighting" can be left out; the Signal server will always consider the list to be in
87
+ * priority order.
88
+ */
79
89
  async requestVerification({ transport, client, languages = [], }) {
80
90
  await Native.RegistrationService_RequestVerificationCode(this.tokioAsyncContext, this, transport, client, languages);
81
91
  }
package/dist/net.d.ts CHANGED
@@ -77,9 +77,9 @@ export declare class Net {
77
77
  * @param listener the listener for incoming events.
78
78
  * @param options additional options to pass through.
79
79
  * @param options.languages If provided, a list of languages in Accept-Language syntax to apply
80
- * to all requests made on this connection.
80
+ * to all requests made on this connection. Note that "quality weighting" can be left out; the
81
+ * Signal server will always consider the list to be in priority order.
81
82
  * @param options.abortSignal an {@link AbortSignal} that will cancel the connection attempt.
82
- * @returns the connected listener, if the connection succeeds.
83
83
  */
84
84
  connectUnauthenticatedChat(listener: ConnectionEventsListener, options?: {
85
85
  languages?: string[];
@@ -87,6 +87,17 @@ export declare class Net {
87
87
  }): Promise<UnauthenticatedChatConnection>;
88
88
  /**
89
89
  * Creates a new instance of {@link AuthenticatedChatConnection}.
90
+ *
91
+ * @param username the identifier for the local device
92
+ * @param password the password for the local device
93
+ * @param receiveStories whether or not the local user has Stories enabled, so the server can
94
+ * filter them out ahead of time
95
+ * @param listener the listener for incoming events.
96
+ * @param options additional options to pass through.
97
+ * @param options.languages If provided, a list of languages in Accept-Language syntax to apply
98
+ * to all requests made on this connection. Note that "quality weighting" can be left out; the
99
+ * Signal server will always consider the list to be in priority order.
100
+ * @param options.abortSignal an {@link AbortSignal} that will cancel the connection attempt.
90
101
  */
91
102
  connectAuthenticatedChat(username: string, password: string, receiveStories: boolean, listener: ChatServiceListener, options?: {
92
103
  languages?: string[];
package/dist/net.js CHANGED
@@ -88,9 +88,9 @@ class Net {
88
88
  * @param listener the listener for incoming events.
89
89
  * @param options additional options to pass through.
90
90
  * @param options.languages If provided, a list of languages in Accept-Language syntax to apply
91
- * to all requests made on this connection.
91
+ * to all requests made on this connection. Note that "quality weighting" can be left out; the
92
+ * Signal server will always consider the list to be in priority order.
92
93
  * @param options.abortSignal an {@link AbortSignal} that will cancel the connection attempt.
93
- * @returns the connected listener, if the connection succeeds.
94
94
  */
95
95
  async connectUnauthenticatedChat(listener, options) {
96
96
  const env = this.options.localTestServer ? undefined : this.options.env;
@@ -98,6 +98,17 @@ class Net {
98
98
  }
99
99
  /**
100
100
  * Creates a new instance of {@link AuthenticatedChatConnection}.
101
+ *
102
+ * @param username the identifier for the local device
103
+ * @param password the password for the local device
104
+ * @param receiveStories whether or not the local user has Stories enabled, so the server can
105
+ * filter them out ahead of time
106
+ * @param listener the listener for incoming events.
107
+ * @param options additional options to pass through.
108
+ * @param options.languages If provided, a list of languages in Accept-Language syntax to apply
109
+ * to all requests made on this connection. Note that "quality weighting" can be left out; the
110
+ * Signal server will always consider the list to be in priority order.
111
+ * @param options.abortSignal an {@link AbortSignal} that will cancel the connection attempt.
101
112
  */
102
113
  connectAuthenticatedChat(username, password, receiveStories, listener, options) {
103
114
  return Chat_1.AuthenticatedChatConnection.connect(this.asyncContext, this._connectionManager, username, password, receiveStories, listener, options);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@signalapp/libsignal-client",
3
- "version": "0.76.3",
3
+ "version": "0.76.5",
4
4
  "license": "AGPL-3.0-only",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",