@bitwarden/sdk-internal 0.2.0-main.543 → 0.2.0-main.544

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.
@@ -2955,6 +2955,11 @@ export class PureCrypto {
2955
2955
  private constructor();
2956
2956
  free(): void;
2957
2957
  [Symbol.dispose](): void;
2958
+ /**
2959
+ * Generates a cryptographically secure random number between the given min and max
2960
+ * (inclusive).
2961
+ */
2962
+ static random_number(min: number, max: number): number;
2958
2963
  /**
2959
2964
  * Decrypts data using RSAES-OAEP with SHA-1
2960
2965
  * HAZMAT WARNING: Do not use outside of implementing cryptofunctionservice
@@ -1041,6 +1041,10 @@ exports.isGetFolderError = function(error) {
1041
1041
  }
1042
1042
  };
1043
1043
 
1044
+ function wasm_bindgen__convert__closures_____invoke__h7c6e0808d83e1743(arg0, arg1) {
1045
+ wasm.wasm_bindgen__convert__closures_____invoke__h7c6e0808d83e1743(arg0, arg1);
1046
+ }
1047
+
1044
1048
  function wasm_bindgen__convert__closures_____invoke__hf245910ad5d68b6c(arg0, arg1, arg2) {
1045
1049
  try {
1046
1050
  const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
@@ -1059,10 +1063,6 @@ function wasm_bindgen__convert__closures_____invoke__h05f50e601cb9cbc9(arg0, arg
1059
1063
  wasm.wasm_bindgen__convert__closures_____invoke__h05f50e601cb9cbc9(arg0, arg1, addHeapObject(arg2));
1060
1064
  }
1061
1065
 
1062
- function wasm_bindgen__convert__closures_____invoke__h7c6e0808d83e1743(arg0, arg1) {
1063
- wasm.wasm_bindgen__convert__closures_____invoke__h7c6e0808d83e1743(arg0, arg1);
1064
- }
1065
-
1066
1066
  function wasm_bindgen__convert__closures_____invoke__hc4d57ad329cc6f58(arg0, arg1, arg2, arg3) {
1067
1067
  wasm.wasm_bindgen__convert__closures_____invoke__hc4d57ad329cc6f58(arg0, arg1, addHeapObject(arg2), addHeapObject(arg3));
1068
1068
  }
@@ -3555,6 +3555,17 @@ class PureCrypto {
3555
3555
  const ptr = this.__destroy_into_raw();
3556
3556
  wasm.__wbg_purecrypto_free(ptr, 0);
3557
3557
  }
3558
+ /**
3559
+ * Generates a cryptographically secure random number between the given min and max
3560
+ * (inclusive).
3561
+ * @param {number} min
3562
+ * @param {number} max
3563
+ * @returns {number}
3564
+ */
3565
+ static random_number(min, max) {
3566
+ const ret = wasm.purecrypto_random_number(min, max);
3567
+ return ret >>> 0;
3568
+ }
3558
3569
  /**
3559
3570
  * Decrypts data using RSAES-OAEP with SHA-1
3560
3571
  * HAZMAT WARNING: Do not use outside of implementing cryptofunctionservice
@@ -5066,7 +5077,7 @@ exports.__wbg_call_e762c39fa8ea36bf = function() { return handleError(function (
5066
5077
  return addHeapObject(ret);
5067
5078
  }, arguments) };
5068
5079
 
5069
- exports.__wbg_cipher_bd12833081059094 = function(arg0) {
5080
+ exports.__wbg_cipher_45784aa3fd1e0894 = function(arg0) {
5070
5081
  const ret = getObject(arg0).cipher;
5071
5082
  return isLikeNone(ret) ? 0 : addHeapObject(ret);
5072
5083
  };
@@ -5153,7 +5164,7 @@ exports.__wbg_fetch_f8ba0e29a9d6de0d = function(arg0, arg1) {
5153
5164
  return addHeapObject(ret);
5154
5165
  };
5155
5166
 
5156
- exports.__wbg_folder_9b5607918316d40c = function(arg0) {
5167
+ exports.__wbg_folder_e962b09dda2c5a7e = function(arg0) {
5157
5168
  const ret = getObject(arg0).folder;
5158
5169
  return isLikeNone(ret) ? 0 : addHeapObject(ret);
5159
5170
  };
@@ -5185,7 +5196,17 @@ exports.__wbg_getTime_14776bfb48a1bff9 = function(arg0) {
5185
5196
  return ret;
5186
5197
  };
5187
5198
 
5188
- exports.__wbg_get_3051588231186fa1 = function() { return handleError(function (arg0, arg1, arg2) {
5199
+ exports.__wbg_get_7bed016f185add81 = function(arg0, arg1) {
5200
+ const ret = getObject(arg0)[arg1 >>> 0];
5201
+ return addHeapObject(ret);
5202
+ };
5203
+
5204
+ exports.__wbg_get_access_token_c99c8e679891fd36 = function(arg0) {
5205
+ const ret = getObject(arg0).get_access_token();
5206
+ return addHeapObject(ret);
5207
+ };
5208
+
5209
+ exports.__wbg_get_c03a59ff46a549dd = function() { return handleError(function (arg0, arg1, arg2) {
5189
5210
  let deferred0_0;
5190
5211
  let deferred0_1;
5191
5212
  try {
@@ -5198,7 +5219,7 @@ exports.__wbg_get_3051588231186fa1 = function() { return handleError(function (a
5198
5219
  }
5199
5220
  }, arguments) };
5200
5221
 
5201
- exports.__wbg_get_7422bbeb4651208e = function() { return handleError(function (arg0, arg1, arg2) {
5222
+ exports.__wbg_get_cb2b978f8f284157 = function() { return handleError(function (arg0, arg1, arg2) {
5202
5223
  let deferred0_0;
5203
5224
  let deferred0_1;
5204
5225
  try {
@@ -5211,17 +5232,7 @@ exports.__wbg_get_7422bbeb4651208e = function() { return handleError(function (a
5211
5232
  }
5212
5233
  }, arguments) };
5213
5234
 
5214
- exports.__wbg_get_7bed016f185add81 = function(arg0, arg1) {
5215
- const ret = getObject(arg0)[arg1 >>> 0];
5216
- return addHeapObject(ret);
5217
- };
5218
-
5219
- exports.__wbg_get_access_token_fc23a484b51c92ed = function(arg0) {
5220
- const ret = getObject(arg0).get_access_token();
5221
- return addHeapObject(ret);
5222
- };
5223
-
5224
- exports.__wbg_get_c03a59ff46a549dd = function() { return handleError(function (arg0, arg1, arg2) {
5235
+ exports.__wbg_get_e5e40408d89fe74c = function() { return handleError(function (arg0, arg1, arg2) {
5225
5236
  let deferred0_0;
5226
5237
  let deferred0_1;
5227
5238
  try {
@@ -5422,12 +5433,12 @@ exports.__wbg_length_cdd215e10d9dd507 = function(arg0) {
5422
5433
  return ret;
5423
5434
  };
5424
5435
 
5425
- exports.__wbg_list_78bb83ef4d47ea84 = function() { return handleError(function (arg0) {
5436
+ exports.__wbg_list_f9931b026dd3b32c = function() { return handleError(function (arg0) {
5426
5437
  const ret = getObject(arg0).list();
5427
5438
  return addHeapObject(ret);
5428
5439
  }, arguments) };
5429
5440
 
5430
- exports.__wbg_list_7cfe37c82a894078 = function() { return handleError(function (arg0) {
5441
+ exports.__wbg_list_fb91ff3fffa60028 = function() { return handleError(function (arg0) {
5431
5442
  const ret = getObject(arg0).list();
5432
5443
  return addHeapObject(ret);
5433
5444
  }, arguments) };
@@ -5628,7 +5639,7 @@ exports.__wbg_randomFillSync_f8c153b79f285817 = function() { return handleError(
5628
5639
  getObject(arg0).randomFillSync(takeObject(arg1));
5629
5640
  }, arguments) };
5630
5641
 
5631
- exports.__wbg_remove_3470222e909cc255 = function() { return handleError(function (arg0, arg1, arg2) {
5642
+ exports.__wbg_remove_632104ab2021517c = function() { return handleError(function (arg0, arg1, arg2) {
5632
5643
  let deferred0_0;
5633
5644
  let deferred0_1;
5634
5645
  try {
@@ -5641,7 +5652,7 @@ exports.__wbg_remove_3470222e909cc255 = function() { return handleError(function
5641
5652
  }
5642
5653
  }, arguments) };
5643
5654
 
5644
- exports.__wbg_remove_a3392d5724e98d40 = function() { return handleError(function (arg0, arg1, arg2) {
5655
+ exports.__wbg_remove_ab13780244ef2a22 = function() { return handleError(function (arg0, arg1, arg2) {
5645
5656
  let deferred0_0;
5646
5657
  let deferred0_1;
5647
5658
  try {
@@ -5692,7 +5703,11 @@ exports.__wbg_setTimeout_4ec014681668a581 = function(arg0, arg1) {
5692
5703
  return addHeapObject(ret);
5693
5704
  };
5694
5705
 
5695
- exports.__wbg_set_2698d186b5f13338 = function() { return handleError(function (arg0, arg1, arg2, arg3) {
5706
+ exports.__wbg_set_3f1d0b984ed272ed = function(arg0, arg1, arg2) {
5707
+ getObject(arg0)[takeObject(arg1)] = takeObject(arg2);
5708
+ };
5709
+
5710
+ exports.__wbg_set_4d678a91b1a1a026 = function() { return handleError(function (arg0, arg1, arg2, arg3) {
5696
5711
  let deferred0_0;
5697
5712
  let deferred0_1;
5698
5713
  try {
@@ -5705,28 +5720,11 @@ exports.__wbg_set_2698d186b5f13338 = function() { return handleError(function (a
5705
5720
  }
5706
5721
  }, arguments) };
5707
5722
 
5708
- exports.__wbg_set_3f1d0b984ed272ed = function(arg0, arg1, arg2) {
5709
- getObject(arg0)[takeObject(arg1)] = takeObject(arg2);
5710
- };
5711
-
5712
5723
  exports.__wbg_set_907fb406c34a251d = function(arg0, arg1, arg2) {
5713
5724
  const ret = getObject(arg0).set(getObject(arg1), getObject(arg2));
5714
5725
  return addHeapObject(ret);
5715
5726
  };
5716
5727
 
5717
- exports.__wbg_set_a3eb54c3873d7e5b = function() { return handleError(function (arg0, arg1, arg2, arg3) {
5718
- let deferred0_0;
5719
- let deferred0_1;
5720
- try {
5721
- deferred0_0 = arg1;
5722
- deferred0_1 = arg2;
5723
- const ret = getObject(arg0).set(getStringFromWasm0(arg1, arg2), takeObject(arg3));
5724
- return addHeapObject(ret);
5725
- } finally {
5726
- wasm.__wbindgen_free(deferred0_0, deferred0_1, 1);
5727
- }
5728
- }, arguments) };
5729
-
5730
5728
  exports.__wbg_set_body_3c365989753d61f4 = function(arg0, arg1) {
5731
5729
  getObject(arg0).body = getObject(arg1);
5732
5730
  };
@@ -5743,6 +5741,19 @@ exports.__wbg_set_credentials_f621cd2d85c0c228 = function(arg0, arg1) {
5743
5741
  getObject(arg0).credentials = __wbindgen_enum_RequestCredentials[arg1];
5744
5742
  };
5745
5743
 
5744
+ exports.__wbg_set_fa1b43b5269fa461 = function() { return handleError(function (arg0, arg1, arg2, arg3) {
5745
+ let deferred0_0;
5746
+ let deferred0_1;
5747
+ try {
5748
+ deferred0_0 = arg1;
5749
+ deferred0_1 = arg2;
5750
+ const ret = getObject(arg0).set(getStringFromWasm0(arg1, arg2), takeObject(arg3));
5751
+ return addHeapObject(ret);
5752
+ } finally {
5753
+ wasm.__wbindgen_free(deferred0_0, deferred0_1, 1);
5754
+ }
5755
+ }, arguments) };
5756
+
5746
5757
  exports.__wbg_set_headers_6926da238cd32ee4 = function(arg0, arg1) {
5747
5758
  getObject(arg0).headers = getObject(arg1);
5748
5759
  };
@@ -71,6 +71,7 @@ export const purecrypto_encrypt_user_key_with_master_password: (
71
71
  export const purecrypto_key_algorithm_for_verifying_key: (a: number, b: number, c: number) => void;
72
72
  export const purecrypto_make_user_key_aes256_cbc_hmac: (a: number) => void;
73
73
  export const purecrypto_make_user_key_xchacha20_poly1305: (a: number) => void;
74
+ export const purecrypto_random_number: (a: number, b: number) => number;
74
75
  export const purecrypto_rsa_decrypt_data: (
75
76
  a: number,
76
77
  b: number,
@@ -542,6 +543,11 @@ export const __wbg_get_outgoingmessage_destination: (a: number) => number;
542
543
  export const vaultclient_attachments: (a: number) => number;
543
544
  export const __wbg_set_outgoingmessage_destination: (a: number, b: number) => void;
544
545
  export const __wbg_cryptoclient_free: (a: number, b: number) => void;
546
+ export const wasm_bindgen__convert__closures_____invoke__h7c6e0808d83e1743: (
547
+ a: number,
548
+ b: number,
549
+ ) => void;
550
+ export const wasm_bindgen__closure__destroy__h14b8abadf056d28e: (a: number, b: number) => void;
545
551
  export const wasm_bindgen__convert__closures_____invoke__hf245910ad5d68b6c: (
546
552
  a: number,
547
553
  b: number,
@@ -549,18 +555,13 @@ export const wasm_bindgen__convert__closures_____invoke__hf245910ad5d68b6c: (
549
555
  d: number,
550
556
  ) => void;
551
557
  export const wasm_bindgen__closure__destroy__h0d309ba826c21d2e: (a: number, b: number) => void;
558
+ export const wasm_bindgen__closure__destroy__h2b9785764fab287c: (a: number, b: number) => void;
552
559
  export const wasm_bindgen__convert__closures_____invoke__h05f50e601cb9cbc9: (
553
560
  a: number,
554
561
  b: number,
555
562
  c: number,
556
563
  ) => void;
557
564
  export const wasm_bindgen__closure__destroy__ha6acfc0fc44e75c9: (a: number, b: number) => void;
558
- export const wasm_bindgen__convert__closures_____invoke__h7c6e0808d83e1743: (
559
- a: number,
560
- b: number,
561
- ) => void;
562
- export const wasm_bindgen__closure__destroy__h2b9785764fab287c: (a: number, b: number) => void;
563
- export const wasm_bindgen__closure__destroy__h14b8abadf056d28e: (a: number, b: number) => void;
564
565
  export const wasm_bindgen__convert__closures_____invoke__hc4d57ad329cc6f58: (
565
566
  a: number,
566
567
  b: number,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@bitwarden/sdk-internal",
3
- "version": "0.2.0-main.543",
3
+ "version": "0.2.0-main.544",
4
4
  "license": "GPL-3.0",
5
5
  "repository": {
6
6
  "type": "git",