@bitwarden/sdk-internal 0.2.0-main.220 → 0.2.0-main.221

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.
@@ -290,6 +290,32 @@ export interface MakeUserSigningKeysResponse {
290
290
  signedPublicKey: SignedPublicKey;
291
291
  }
292
292
 
293
+ /**
294
+ * A rotated set of account keys for a user
295
+ */
296
+ export interface RotateUserKeysResponse {
297
+ /**
298
+ * The verifying key
299
+ */
300
+ verifyingKey: string;
301
+ /**
302
+ * Signing key, encrypted with a symmetric key (user key, org key)
303
+ */
304
+ signingKey: EncString;
305
+ /**
306
+ * The user\'s public key, signed by the signing key
307
+ */
308
+ signedPublicKey: string;
309
+ /**
310
+ * The user\'s public key, without signature
311
+ */
312
+ publicKey: string;
313
+ /**
314
+ * The user\'s private key, encrypted with the user key
315
+ */
316
+ privateKey: EncString;
317
+ }
318
+
293
319
  /**
294
320
  * NewType wrapper for `OrganizationId`
295
321
  */
@@ -1271,6 +1297,10 @@ export class CryptoClient {
1271
1297
  * Makes a new signing key pair and signs the public key for the user
1272
1298
  */
1273
1299
  make_user_signing_keys_for_enrollment(): MakeUserSigningKeysResponse;
1300
+ /**
1301
+ * Creates a rotated set of account keys for the current state
1302
+ */
1303
+ get_v2_rotated_account_keys(user_key: string): RotateUserKeysResponse;
1274
1304
  }
1275
1305
  export class ExporterClient {
1276
1306
  private constructor();
@@ -747,7 +747,7 @@ function __wbg_adapter_56(arg0, arg1, arg2) {
747
747
  );
748
748
  }
749
749
 
750
- function __wbg_adapter_276(arg0, arg1, arg2, arg3) {
750
+ function __wbg_adapter_277(arg0, arg1, arg2, arg3) {
751
751
  wasm.wasm_bindgen__convert__closures__invoke2_mut__h8776500d04a3e634(
752
752
  arg0,
753
753
  arg1,
@@ -1393,6 +1393,28 @@ class CryptoClient {
1393
1393
  wasm.__wbindgen_add_to_stack_pointer(16);
1394
1394
  }
1395
1395
  }
1396
+ /**
1397
+ * Creates a rotated set of account keys for the current state
1398
+ * @param {string} user_key
1399
+ * @returns {RotateUserKeysResponse}
1400
+ */
1401
+ get_v2_rotated_account_keys(user_key) {
1402
+ try {
1403
+ const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
1404
+ const ptr0 = passStringToWasm0(user_key, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
1405
+ const len0 = WASM_VECTOR_LEN;
1406
+ wasm.cryptoclient_get_v2_rotated_account_keys(retptr, this.__wbg_ptr, ptr0, len0);
1407
+ var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
1408
+ var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
1409
+ var r2 = getDataViewMemory0().getInt32(retptr + 4 * 2, true);
1410
+ if (r2) {
1411
+ throw takeObject(r1);
1412
+ }
1413
+ return takeObject(r0);
1414
+ } finally {
1415
+ wasm.__wbindgen_add_to_stack_pointer(16);
1416
+ }
1417
+ }
1396
1418
  }
1397
1419
  module.exports.CryptoClient = CryptoClient;
1398
1420
 
@@ -3331,7 +3353,12 @@ module.exports.__wbg_get_67b2ba62fc30de12 = function () {
3331
3353
  }, arguments);
3332
3354
  };
3333
3355
 
3334
- module.exports.__wbg_get_a3863a1264cebac2 = function () {
3356
+ module.exports.__wbg_get_b9b93047fe3cf45b = function (arg0, arg1) {
3357
+ const ret = getObject(arg0)[arg1 >>> 0];
3358
+ return addHeapObject(ret);
3359
+ };
3360
+
3361
+ module.exports.__wbg_get_d74b07b1ba78be21 = function () {
3335
3362
  return handleError(function (arg0, arg1, arg2) {
3336
3363
  let deferred0_0;
3337
3364
  let deferred0_1;
@@ -3346,12 +3373,7 @@ module.exports.__wbg_get_a3863a1264cebac2 = function () {
3346
3373
  }, arguments);
3347
3374
  };
3348
3375
 
3349
- module.exports.__wbg_get_b9b93047fe3cf45b = function (arg0, arg1) {
3350
- const ret = getObject(arg0)[arg1 >>> 0];
3351
- return addHeapObject(ret);
3352
- };
3353
-
3354
- module.exports.__wbg_getaccesstoken_136d18c86407dc71 = function (arg0) {
3376
+ module.exports.__wbg_getaccesstoken_cd88c09c15f625e0 = function (arg0) {
3355
3377
  const ret = getObject(arg0).get_access_token();
3356
3378
  return addHeapObject(ret);
3357
3379
  };
@@ -3456,7 +3478,7 @@ module.exports.__wbg_length_e2d2a49132c1b256 = function (arg0) {
3456
3478
  return ret;
3457
3479
  };
3458
3480
 
3459
- module.exports.__wbg_list_3165ae7a631e4388 = function () {
3481
+ module.exports.__wbg_list_d70422907576c249 = function () {
3460
3482
  return handleError(function (arg0) {
3461
3483
  const ret = getObject(arg0).list();
3462
3484
  return addHeapObject(ret);
@@ -3491,7 +3513,7 @@ module.exports.__wbg_new_23a2665fac83c611 = function (arg0, arg1) {
3491
3513
  const a = state0.a;
3492
3514
  state0.a = 0;
3493
3515
  try {
3494
- return __wbg_adapter_276(a, state0.b, arg0, arg1);
3516
+ return __wbg_adapter_277(a, state0.b, arg0, arg1);
3495
3517
  } finally {
3496
3518
  state0.a = a;
3497
3519
  }
@@ -3633,7 +3655,7 @@ module.exports.__wbg_randomFillSync_ac0988aba3254290 = function () {
3633
3655
  }, arguments);
3634
3656
  };
3635
3657
 
3636
- module.exports.__wbg_remove_fd0081a475f8a37b = function () {
3658
+ module.exports.__wbg_remove_6e647c9863046e4c = function () {
3637
3659
  return handleError(function (arg0, arg1, arg2) {
3638
3660
  let deferred0_0;
3639
3661
  let deferred0_1;
@@ -3680,11 +3702,7 @@ module.exports.__wbg_set_3f1d0b984ed272ed = function (arg0, arg1, arg2) {
3680
3702
  getObject(arg0)[takeObject(arg1)] = takeObject(arg2);
3681
3703
  };
3682
3704
 
3683
- module.exports.__wbg_set_65595bdd868b3009 = function (arg0, arg1, arg2) {
3684
- getObject(arg0).set(getObject(arg1), arg2 >>> 0);
3685
- };
3686
-
3687
- module.exports.__wbg_set_8d6472bae5625430 = function () {
3705
+ module.exports.__wbg_set_616a519deee0d894 = function () {
3688
3706
  return handleError(function (arg0, arg1, arg2, arg3) {
3689
3707
  let deferred0_0;
3690
3708
  let deferred0_1;
@@ -3699,6 +3717,10 @@ module.exports.__wbg_set_8d6472bae5625430 = function () {
3699
3717
  }, arguments);
3700
3718
  };
3701
3719
 
3720
+ module.exports.__wbg_set_65595bdd868b3009 = function (arg0, arg1, arg2) {
3721
+ getObject(arg0).set(getObject(arg1), arg2 >>> 0);
3722
+ };
3723
+
3702
3724
  module.exports.__wbg_setbody_5923b78a95eedf29 = function (arg0, arg1) {
3703
3725
  getObject(arg0).body = getObject(arg1);
3704
3726
  };
@@ -3878,17 +3900,17 @@ module.exports.__wbindgen_cb_drop = function (arg0) {
3878
3900
  return ret;
3879
3901
  };
3880
3902
 
3881
- module.exports.__wbindgen_closure_wrapper2853 = function (arg0, arg1, arg2) {
3903
+ module.exports.__wbindgen_closure_wrapper2862 = function (arg0, arg1, arg2) {
3882
3904
  const ret = makeMutClosure(arg0, arg1, 913, __wbg_adapter_50);
3883
3905
  return addHeapObject(ret);
3884
3906
  };
3885
3907
 
3886
- module.exports.__wbindgen_closure_wrapper3693 = function (arg0, arg1, arg2) {
3908
+ module.exports.__wbindgen_closure_wrapper3702 = function (arg0, arg1, arg2) {
3887
3909
  const ret = makeMutClosure(arg0, arg1, 997, __wbg_adapter_53);
3888
3910
  return addHeapObject(ret);
3889
3911
  };
3890
3912
 
3891
- module.exports.__wbindgen_closure_wrapper4111 = function (arg0, arg1, arg2) {
3913
+ module.exports.__wbindgen_closure_wrapper4120 = function (arg0, arg1, arg2) {
3892
3914
  const ret = makeMutClosure(arg0, arg1, 1120, __wbg_adapter_56);
3893
3915
  return addHeapObject(ret);
3894
3916
  };
@@ -7,6 +7,12 @@ export const cryptoclient_initialize_org_crypto: (a: number, b: number) => numbe
7
7
  export const cryptoclient_make_key_pair: (a: number, b: number, c: number, d: number) => void;
8
8
  export const cryptoclient_verify_asymmetric_keys: (a: number, b: number, c: number) => void;
9
9
  export const cryptoclient_make_user_signing_keys_for_enrollment: (a: number, b: number) => void;
10
+ export const cryptoclient_get_v2_rotated_account_keys: (
11
+ a: number,
12
+ b: number,
13
+ c: number,
14
+ d: number,
15
+ ) => void;
10
16
  export const isDeriveKeyConnectorError: (a: number) => number;
11
17
  export const isEnrollAdminPasswordResetError: (a: number) => number;
12
18
  export const isCryptoClientError: (a: number) => number;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@bitwarden/sdk-internal",
3
- "version": "0.2.0-main.220",
3
+ "version": "0.2.0-main.221",
4
4
  "license": "GPL-3.0",
5
5
  "files": [
6
6
  "bitwarden_wasm_internal_bg.js",