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

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;
@@ -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_b09d3032d5d7f759 = 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_d4ae4d5ab92ab416 = 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_6432ae0367848e1d = function () {
4777
4772
  return handleError(function (arg0, arg1, arg2) {
4778
4773
  let deferred0_0;
4779
4774
  let deferred0_1;
@@ -4788,19 +4783,17 @@ 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();
4786
+ exports.__wbg_get_7bed016f185add81 = function (arg0, arg1) {
4787
+ const ret = getObject(arg0)[arg1 >>> 0];
4793
4788
  return addHeapObject(ret);
4794
4789
  };
4795
4790
 
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);
4791
+ exports.__wbg_get_access_token_e189464f249968d8 = function (arg0) {
4792
+ const ret = getObject(arg0).get_access_token();
4793
+ return addHeapObject(ret);
4801
4794
  };
4802
4795
 
4803
- exports.__wbg_get_f2b4178b803b7230 = function () {
4796
+ exports.__wbg_get_bb738be5940cc255 = function () {
4804
4797
  return handleError(function (arg0, arg1, arg2) {
4805
4798
  let deferred0_0;
4806
4799
  let deferred0_1;
@@ -4815,6 +4808,13 @@ exports.__wbg_get_f2b4178b803b7230 = function () {
4815
4808
  }, arguments);
4816
4809
  };
4817
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_86e77d87e879842c = 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_9f71b39770106e99 = 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_4a78a55023f6d60d = 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_dd9c6cc46b495e5a = function () {
5269
5269
  return handleError(function (arg0, arg1, arg2) {
5270
5270
  let deferred0_0;
5271
5271
  let deferred0_1;
@@ -5311,7 +5311,11 @@ 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_3f1d0b984ed272ed = function (arg0, arg1, arg2) {
5315
+ getObject(arg0)[takeObject(arg1)] = takeObject(arg2);
5316
+ };
5317
+
5318
+ exports.__wbg_set_4524c602a04b7d94 = function () {
5315
5319
  return handleError(function (arg0, arg1, arg2, arg3) {
5316
5320
  let deferred0_0;
5317
5321
  let deferred0_1;
@@ -5326,16 +5330,7 @@ exports.__wbg_set_11a079cace77951c = function () {
5326
5330
  }, arguments);
5327
5331
  };
5328
5332
 
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 () {
5333
+ exports.__wbg_set_82157cc232dc223e = function () {
5339
5334
  return handleError(function (arg0, arg1, arg2, arg3) {
5340
5335
  let deferred0_0;
5341
5336
  let deferred0_1;
@@ -5350,6 +5345,11 @@ exports.__wbg_set_95709825d99cadb3 = function () {
5350
5345
  }, arguments);
5351
5346
  };
5352
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
458
  export const wasm_bindgen__convert__closures_____invoke__h5dc58f913e716aff: (
460
459
  a: number,
461
460
  b: number,
462
461
  c: number,
463
462
  ) => void;
464
- export const wasm_bindgen__closure__destroy__h26a46d7b4587c5e7: (a: number, b: number) => void;
463
+ export const wasm_bindgen__closure__destroy__h591e0f2efd143068: (a: number, b: number) => void;
465
464
  export const wasm_bindgen__convert__closures_____invoke__h280b016db3e219a2: (
466
465
  a: number,
467
466
  b: number,
468
467
  c: number,
469
468
  d: number,
470
469
  ) => void;
470
+ export const wasm_bindgen__closure__destroy__h26a46d7b4587c5e7: (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.423",
4
4
  "license": "GPL-3.0",
5
5
  "repository": {
6
6
  "type": "git",