@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.
package/VERSION CHANGED
@@ -1 +1 @@
1
- d5c0dc57218b5217750af646a12f65b32f753e82
1
+ 7a1ae938da45060ffbb11179622fa5b26d29b5ff
@@ -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();
@@ -753,7 +753,7 @@ function __wbg_adapter_56(arg0, arg1, arg2) {
753
753
  );
754
754
  }
755
755
 
756
- function __wbg_adapter_276(arg0, arg1, arg2, arg3) {
756
+ function __wbg_adapter_277(arg0, arg1, arg2, arg3) {
757
757
  wasm.wasm_bindgen__convert__closures__invoke2_mut__h8776500d04a3e634(
758
758
  arg0,
759
759
  arg1,
@@ -1396,6 +1396,28 @@ export class CryptoClient {
1396
1396
  wasm.__wbindgen_add_to_stack_pointer(16);
1397
1397
  }
1398
1398
  }
1399
+ /**
1400
+ * Creates a rotated set of account keys for the current state
1401
+ * @param {string} user_key
1402
+ * @returns {RotateUserKeysResponse}
1403
+ */
1404
+ get_v2_rotated_account_keys(user_key) {
1405
+ try {
1406
+ const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
1407
+ const ptr0 = passStringToWasm0(user_key, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
1408
+ const len0 = WASM_VECTOR_LEN;
1409
+ wasm.cryptoclient_get_v2_rotated_account_keys(retptr, this.__wbg_ptr, ptr0, len0);
1410
+ var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
1411
+ var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
1412
+ var r2 = getDataViewMemory0().getInt32(retptr + 4 * 2, true);
1413
+ if (r2) {
1414
+ throw takeObject(r1);
1415
+ }
1416
+ return takeObject(r0);
1417
+ } finally {
1418
+ wasm.__wbindgen_add_to_stack_pointer(16);
1419
+ }
1420
+ }
1399
1421
  }
1400
1422
 
1401
1423
  const ExporterClientFinalization =
@@ -3320,7 +3342,12 @@ export function __wbg_get_67b2ba62fc30de12() {
3320
3342
  }, arguments);
3321
3343
  }
3322
3344
 
3323
- export function __wbg_get_a3863a1264cebac2() {
3345
+ export function __wbg_get_b9b93047fe3cf45b(arg0, arg1) {
3346
+ const ret = getObject(arg0)[arg1 >>> 0];
3347
+ return addHeapObject(ret);
3348
+ }
3349
+
3350
+ export function __wbg_get_d74b07b1ba78be21() {
3324
3351
  return handleError(function (arg0, arg1, arg2) {
3325
3352
  let deferred0_0;
3326
3353
  let deferred0_1;
@@ -3335,12 +3362,7 @@ export function __wbg_get_a3863a1264cebac2() {
3335
3362
  }, arguments);
3336
3363
  }
3337
3364
 
3338
- export function __wbg_get_b9b93047fe3cf45b(arg0, arg1) {
3339
- const ret = getObject(arg0)[arg1 >>> 0];
3340
- return addHeapObject(ret);
3341
- }
3342
-
3343
- export function __wbg_getaccesstoken_136d18c86407dc71(arg0) {
3365
+ export function __wbg_getaccesstoken_cd88c09c15f625e0(arg0) {
3344
3366
  const ret = getObject(arg0).get_access_token();
3345
3367
  return addHeapObject(ret);
3346
3368
  }
@@ -3445,7 +3467,7 @@ export function __wbg_length_e2d2a49132c1b256(arg0) {
3445
3467
  return ret;
3446
3468
  }
3447
3469
 
3448
- export function __wbg_list_3165ae7a631e4388() {
3470
+ export function __wbg_list_d70422907576c249() {
3449
3471
  return handleError(function (arg0) {
3450
3472
  const ret = getObject(arg0).list();
3451
3473
  return addHeapObject(ret);
@@ -3480,7 +3502,7 @@ export function __wbg_new_23a2665fac83c611(arg0, arg1) {
3480
3502
  const a = state0.a;
3481
3503
  state0.a = 0;
3482
3504
  try {
3483
- return __wbg_adapter_276(a, state0.b, arg0, arg1);
3505
+ return __wbg_adapter_277(a, state0.b, arg0, arg1);
3484
3506
  } finally {
3485
3507
  state0.a = a;
3486
3508
  }
@@ -3622,7 +3644,7 @@ export function __wbg_randomFillSync_ac0988aba3254290() {
3622
3644
  }, arguments);
3623
3645
  }
3624
3646
 
3625
- export function __wbg_remove_fd0081a475f8a37b() {
3647
+ export function __wbg_remove_6e647c9863046e4c() {
3626
3648
  return handleError(function (arg0, arg1, arg2) {
3627
3649
  let deferred0_0;
3628
3650
  let deferred0_1;
@@ -3669,11 +3691,7 @@ export function __wbg_set_3f1d0b984ed272ed(arg0, arg1, arg2) {
3669
3691
  getObject(arg0)[takeObject(arg1)] = takeObject(arg2);
3670
3692
  }
3671
3693
 
3672
- export function __wbg_set_65595bdd868b3009(arg0, arg1, arg2) {
3673
- getObject(arg0).set(getObject(arg1), arg2 >>> 0);
3674
- }
3675
-
3676
- export function __wbg_set_8d6472bae5625430() {
3694
+ export function __wbg_set_616a519deee0d894() {
3677
3695
  return handleError(function (arg0, arg1, arg2, arg3) {
3678
3696
  let deferred0_0;
3679
3697
  let deferred0_1;
@@ -3688,6 +3706,10 @@ export function __wbg_set_8d6472bae5625430() {
3688
3706
  }, arguments);
3689
3707
  }
3690
3708
 
3709
+ export function __wbg_set_65595bdd868b3009(arg0, arg1, arg2) {
3710
+ getObject(arg0).set(getObject(arg1), arg2 >>> 0);
3711
+ }
3712
+
3691
3713
  export function __wbg_setbody_5923b78a95eedf29(arg0, arg1) {
3692
3714
  getObject(arg0).body = getObject(arg1);
3693
3715
  }
@@ -3867,17 +3889,17 @@ export function __wbindgen_cb_drop(arg0) {
3867
3889
  return ret;
3868
3890
  }
3869
3891
 
3870
- export function __wbindgen_closure_wrapper2853(arg0, arg1, arg2) {
3892
+ export function __wbindgen_closure_wrapper2862(arg0, arg1, arg2) {
3871
3893
  const ret = makeMutClosure(arg0, arg1, 913, __wbg_adapter_50);
3872
3894
  return addHeapObject(ret);
3873
3895
  }
3874
3896
 
3875
- export function __wbindgen_closure_wrapper3693(arg0, arg1, arg2) {
3897
+ export function __wbindgen_closure_wrapper3702(arg0, arg1, arg2) {
3876
3898
  const ret = makeMutClosure(arg0, arg1, 997, __wbg_adapter_53);
3877
3899
  return addHeapObject(ret);
3878
3900
  }
3879
3901
 
3880
- export function __wbindgen_closure_wrapper4111(arg0, arg1, arg2) {
3902
+ export function __wbindgen_closure_wrapper4120(arg0, arg1, arg2) {
3881
3903
  const ret = makeMutClosure(arg0, arg1, 1120, __wbg_adapter_56);
3882
3904
  return addHeapObject(ret);
3883
3905
  }
Binary file
@@ -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;