@bitwarden/sdk-internal 0.2.0-main.421 → 0.2.0-main.422

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.
@@ -792,6 +792,33 @@ export type EncString = Tagged<string, "EncString">;
792
792
 
793
793
  export type SignedPublicKey = Tagged<string, "SignedPublicKey">;
794
794
 
795
+ /**
796
+ * A set of keys where a given `DownstreamKey` is protected by an encrypted public/private
797
+ * key-pair. The `DownstreamKey` is used to encrypt/decrypt data, while the public/private key-pair
798
+ * is used to rotate the `DownstreamKey`.
799
+ *
800
+ * The `PrivateKey` is protected by an `UpstreamKey`, such as a `DeviceKey`, or `PrfKey`,
801
+ * and the `PublicKey` is protected by the `DownstreamKey`. This setup allows:
802
+ *
803
+ * - Access to `DownstreamKey` by knowing the `UpstreamKey`
804
+ * - Rotation to a `NewDownstreamKey` by knowing the current `DownstreamKey`, without needing
805
+ * access to the `UpstreamKey`
806
+ */
807
+ export interface RotateableKeySet {
808
+ /**
809
+ * `DownstreamKey` protected by encapsulation key
810
+ */
811
+ encapsulatedDownstreamKey: UnsignedSharedKey;
812
+ /**
813
+ * Encapsulation key protected by `DownstreamKey`
814
+ */
815
+ encryptedEncapsulationKey: EncString;
816
+ /**
817
+ * Decapsulation key protected by `UpstreamKey`
818
+ */
819
+ encryptedDecapsulationKey: EncString;
820
+ }
821
+
795
822
  /**
796
823
  * Key Derivation Function for Bitwarden Account
797
824
  *
@@ -1281,7 +1308,7 @@ export interface SecureNoteView {
1281
1308
 
1282
1309
  export interface GetCipherError extends Error {
1283
1310
  name: "GetCipherError";
1284
- variant: "ItemNotFound" | "Crypto" | "RepositoryError";
1311
+ variant: "ItemNotFound" | "Crypto" | "Repository";
1285
1312
  }
1286
1313
 
1287
1314
  export function isGetCipherError(error: any): error is GetCipherError;
@@ -876,14 +876,6 @@ function wasm_bindgen__convert__closures_____invoke__h4eff94a44eff58c2(arg0, arg
876
876
  wasm.wasm_bindgen__convert__closures_____invoke__h4eff94a44eff58c2(arg0, arg1);
877
877
  }
878
878
 
879
- function wasm_bindgen__convert__closures_____invoke__h5dc58f913e716aff(arg0, arg1, arg2) {
880
- wasm.wasm_bindgen__convert__closures_____invoke__h5dc58f913e716aff(
881
- arg0,
882
- arg1,
883
- addHeapObject(arg2),
884
- );
885
- }
886
-
887
879
  function wasm_bindgen__convert__closures_____invoke__h280b016db3e219a2(arg0, arg1, arg2) {
888
880
  try {
889
881
  const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
@@ -903,6 +895,14 @@ function wasm_bindgen__convert__closures_____invoke__h280b016db3e219a2(arg0, arg
903
895
  }
904
896
  }
905
897
 
898
+ function wasm_bindgen__convert__closures_____invoke__h5dc58f913e716aff(arg0, arg1, arg2) {
899
+ wasm.wasm_bindgen__convert__closures_____invoke__h5dc58f913e716aff(
900
+ arg0,
901
+ arg1,
902
+ addHeapObject(arg2),
903
+ );
904
+ }
905
+
906
906
  function wasm_bindgen__convert__closures_____invoke__h0cb536241502fe83(arg0, arg1, arg2, arg3) {
907
907
  wasm.wasm_bindgen__convert__closures_____invoke__h0cb536241502fe83(
908
908
  arg0,
@@ -4642,7 +4642,7 @@ exports.__wbg_call_e762c39fa8ea36bf = function () {
4642
4642
  }, arguments);
4643
4643
  };
4644
4644
 
4645
- exports.__wbg_cipher_a8e5bca3fa535748 = function (arg0) {
4645
+ exports.__wbg_cipher_f2e574d68952d395 = function (arg0) {
4646
4646
  const ret = getObject(arg0).cipher;
4647
4647
  return isLikeNone(ret) ? 0 : addHeapObject(ret);
4648
4648
  };
@@ -4735,7 +4735,7 @@ exports.__wbg_fetch_f8ba0e29a9d6de0d = function (arg0, arg1) {
4735
4735
  return addHeapObject(ret);
4736
4736
  };
4737
4737
 
4738
- exports.__wbg_folder_0d17faa11eda84be = function (arg0) {
4738
+ exports.__wbg_folder_0d97489c28d80f2c = function (arg0) {
4739
4739
  const ret = getObject(arg0).folder;
4740
4740
  return isLikeNone(ret) ? 0 : addHeapObject(ret);
4741
4741
  };
@@ -4768,12 +4768,7 @@ exports.__wbg_getTime_14776bfb48a1bff9 = function (arg0) {
4768
4768
  return ret;
4769
4769
  };
4770
4770
 
4771
- exports.__wbg_get_7bed016f185add81 = function (arg0, arg1) {
4772
- const ret = getObject(arg0)[arg1 >>> 0];
4773
- return addHeapObject(ret);
4774
- };
4775
-
4776
- exports.__wbg_get_906612b83779a7a5 = function () {
4771
+ exports.__wbg_get_38a0d33f5d8fe3e6 = function () {
4777
4772
  return handleError(function (arg0, arg1, arg2) {
4778
4773
  let deferred0_0;
4779
4774
  let deferred0_1;
@@ -4788,19 +4783,7 @@ exports.__wbg_get_906612b83779a7a5 = function () {
4788
4783
  }, arguments);
4789
4784
  };
4790
4785
 
4791
- exports.__wbg_get_access_token_3d47691e30d95b50 = function (arg0) {
4792
- const ret = getObject(arg0).get_access_token();
4793
- return addHeapObject(ret);
4794
- };
4795
-
4796
- exports.__wbg_get_efcb449f58ec27c2 = function () {
4797
- return handleError(function (arg0, arg1) {
4798
- const ret = Reflect.get(getObject(arg0), getObject(arg1));
4799
- return addHeapObject(ret);
4800
- }, arguments);
4801
- };
4802
-
4803
- exports.__wbg_get_f2b4178b803b7230 = function () {
4786
+ exports.__wbg_get_63331cddb3c81318 = function () {
4804
4787
  return handleError(function (arg0, arg1, arg2) {
4805
4788
  let deferred0_0;
4806
4789
  let deferred0_1;
@@ -4815,6 +4798,23 @@ exports.__wbg_get_f2b4178b803b7230 = function () {
4815
4798
  }, arguments);
4816
4799
  };
4817
4800
 
4801
+ exports.__wbg_get_7bed016f185add81 = function (arg0, arg1) {
4802
+ const ret = getObject(arg0)[arg1 >>> 0];
4803
+ return addHeapObject(ret);
4804
+ };
4805
+
4806
+ exports.__wbg_get_access_token_ff492ff9ec7db859 = function (arg0) {
4807
+ const ret = getObject(arg0).get_access_token();
4808
+ return addHeapObject(ret);
4809
+ };
4810
+
4811
+ exports.__wbg_get_efcb449f58ec27c2 = function () {
4812
+ return handleError(function (arg0, arg1) {
4813
+ const ret = Reflect.get(getObject(arg0), getObject(arg1));
4814
+ return addHeapObject(ret);
4815
+ }, arguments);
4816
+ };
4817
+
4818
4818
  exports.__wbg_get_with_ref_key_1dc361bd10053bfe = function (arg0, arg1) {
4819
4819
  const ret = getObject(arg0)[getObject(arg1)];
4820
4820
  return addHeapObject(ret);
@@ -4999,14 +4999,14 @@ exports.__wbg_length_cdd215e10d9dd507 = function (arg0) {
4999
4999
  return ret;
5000
5000
  };
5001
5001
 
5002
- exports.__wbg_list_1032c4807ee9c2ce = function () {
5002
+ exports.__wbg_list_5785128899ac45b8 = function () {
5003
5003
  return handleError(function (arg0) {
5004
5004
  const ret = getObject(arg0).list();
5005
5005
  return addHeapObject(ret);
5006
5006
  }, arguments);
5007
5007
  };
5008
5008
 
5009
- exports.__wbg_list_a655c254b723e34b = function () {
5009
+ exports.__wbg_list_81ad0e6d7a86f793 = function () {
5010
5010
  return handleError(function (arg0) {
5011
5011
  const ret = getObject(arg0).list();
5012
5012
  return addHeapObject(ret);
@@ -5250,7 +5250,7 @@ exports.__wbg_randomFillSync_ac0988aba3254290 = function () {
5250
5250
  }, arguments);
5251
5251
  };
5252
5252
 
5253
- exports.__wbg_remove_4bd5c377165db91f = function () {
5253
+ exports.__wbg_remove_177b181db8985dde = function () {
5254
5254
  return handleError(function (arg0, arg1, arg2) {
5255
5255
  let deferred0_0;
5256
5256
  let deferred0_1;
@@ -5265,7 +5265,7 @@ exports.__wbg_remove_4bd5c377165db91f = function () {
5265
5265
  }, arguments);
5266
5266
  };
5267
5267
 
5268
- exports.__wbg_remove_70f6b26ca7135eb7 = function () {
5268
+ exports.__wbg_remove_1b0b59ed6aa183ee = function () {
5269
5269
  return handleError(function (arg0, arg1, arg2) {
5270
5270
  let deferred0_0;
5271
5271
  let deferred0_1;
@@ -5311,7 +5311,7 @@ exports.__wbg_setTimeout_ca12ead8b48245e2 = function (arg0, arg1) {
5311
5311
  return addHeapObject(ret);
5312
5312
  };
5313
5313
 
5314
- exports.__wbg_set_11a079cace77951c = function () {
5314
+ exports.__wbg_set_1e170041843aba75 = function () {
5315
5315
  return handleError(function (arg0, arg1, arg2, arg3) {
5316
5316
  let deferred0_0;
5317
5317
  let deferred0_1;
@@ -5326,16 +5326,7 @@ exports.__wbg_set_11a079cace77951c = function () {
5326
5326
  }, arguments);
5327
5327
  };
5328
5328
 
5329
- exports.__wbg_set_3f1d0b984ed272ed = function (arg0, arg1, arg2) {
5330
- getObject(arg0)[takeObject(arg1)] = takeObject(arg2);
5331
- };
5332
-
5333
- exports.__wbg_set_907fb406c34a251d = function (arg0, arg1, arg2) {
5334
- const ret = getObject(arg0).set(getObject(arg1), getObject(arg2));
5335
- return addHeapObject(ret);
5336
- };
5337
-
5338
- exports.__wbg_set_95709825d99cadb3 = function () {
5329
+ exports.__wbg_set_20c8942e7d6fc8d9 = function () {
5339
5330
  return handleError(function (arg0, arg1, arg2, arg3) {
5340
5331
  let deferred0_0;
5341
5332
  let deferred0_1;
@@ -5350,6 +5341,15 @@ exports.__wbg_set_95709825d99cadb3 = function () {
5350
5341
  }, arguments);
5351
5342
  };
5352
5343
 
5344
+ exports.__wbg_set_3f1d0b984ed272ed = function (arg0, arg1, arg2) {
5345
+ getObject(arg0)[takeObject(arg1)] = takeObject(arg2);
5346
+ };
5347
+
5348
+ exports.__wbg_set_907fb406c34a251d = function (arg0, arg1, arg2) {
5349
+ const ret = getObject(arg0).set(getObject(arg1), getObject(arg2));
5350
+ return addHeapObject(ret);
5351
+ };
5352
+
5353
5353
  exports.__wbg_set_body_3c365989753d61f4 = function (arg0, arg1) {
5354
5354
  getObject(arg0).body = getObject(arg1);
5355
5355
  };
@@ -455,19 +455,19 @@ export const wasm_bindgen__convert__closures_____invoke__h4eff94a44eff58c2: (
455
455
  b: number,
456
456
  ) => void;
457
457
  export const wasm_bindgen__closure__destroy__he41cbbdbe831f2ac: (a: number, b: number) => void;
458
- export const wasm_bindgen__closure__destroy__h591e0f2efd143068: (a: number, b: number) => void;
459
- export const wasm_bindgen__convert__closures_____invoke__h5dc58f913e716aff: (
458
+ export const wasm_bindgen__convert__closures_____invoke__h280b016db3e219a2: (
460
459
  a: number,
461
460
  b: number,
462
461
  c: number,
462
+ d: number,
463
463
  ) => void;
464
464
  export const wasm_bindgen__closure__destroy__h26a46d7b4587c5e7: (a: number, b: number) => void;
465
- export const wasm_bindgen__convert__closures_____invoke__h280b016db3e219a2: (
465
+ export const wasm_bindgen__convert__closures_____invoke__h5dc58f913e716aff: (
466
466
  a: number,
467
467
  b: number,
468
468
  c: number,
469
- d: number,
470
469
  ) => void;
470
+ export const wasm_bindgen__closure__destroy__h591e0f2efd143068: (a: number, b: number) => void;
471
471
  export const wasm_bindgen__convert__closures_____invoke__h0cb536241502fe83: (
472
472
  a: number,
473
473
  b: number,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@bitwarden/sdk-internal",
3
- "version": "0.2.0-main.421",
3
+ "version": "0.2.0-main.422",
4
4
  "license": "GPL-3.0",
5
5
  "repository": {
6
6
  "type": "git",