@bitwarden/sdk-internal 0.2.0-main.360 → 0.2.0-main.361

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
- ac7150235ee7f3e362419a9240ba233a2e45f53b
1
+ 03646591c366a5568b0f8062a0cb3b4745bcbd93
@@ -631,11 +631,6 @@ export type UserId = Tagged<Uuid, "UserId">;
631
631
  */
632
632
  export type OrganizationId = Tagged<Uuid, "OrganizationId">;
633
633
 
634
- /**
635
- * A non-generic wrapper around `bitwarden-crypto`\'s `PasswordProtectedKeyEnvelope`.
636
- */
637
- export type PasswordProtectedKeyEnvelope = Tagged<string, "PasswordProtectedKeyEnvelope">;
638
-
639
634
  export interface MasterPasswordError extends Error {
640
635
  name: "MasterPasswordError";
641
636
  variant:
@@ -766,6 +761,8 @@ export type EncString = Tagged<string, "EncString">;
766
761
 
767
762
  export type SignedPublicKey = Tagged<string, "SignedPublicKey">;
768
763
 
764
+ export type PasswordProtectedKeyEnvelope = Tagged<string, "PasswordProtectedKeyEnvelope">;
765
+
769
766
  /**
770
767
  * The type of key / signature scheme used for signing and verifying.
771
768
  */
@@ -1898,10 +1895,7 @@ export class CryptoClient {
1898
1895
  * Decrypts a `PasswordProtectedKeyEnvelope`, returning the user key, if successful.
1899
1896
  * This is a stop-gap solution, until initialization of the SDK is used.
1900
1897
  */
1901
- unseal_password_protected_key_envelope(
1902
- pin: string,
1903
- envelope: PasswordProtectedKeyEnvelope,
1904
- ): Uint8Array;
1898
+ unseal_password_protected_key_envelope(pin: string, envelope: string): Uint8Array;
1905
1899
  }
1906
1900
  export class ExporterClient {
1907
1901
  private constructor();
@@ -2015,7 +2015,7 @@ export class CryptoClient {
2015
2015
  * Decrypts a `PasswordProtectedKeyEnvelope`, returning the user key, if successful.
2016
2016
  * This is a stop-gap solution, until initialization of the SDK is used.
2017
2017
  * @param {string} pin
2018
- * @param {PasswordProtectedKeyEnvelope} envelope
2018
+ * @param {string} envelope
2019
2019
  * @returns {Uint8Array}
2020
2020
  */
2021
2021
  unseal_password_protected_key_envelope(pin, envelope) {
@@ -2023,12 +2023,15 @@ export class CryptoClient {
2023
2023
  const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
2024
2024
  const ptr0 = passStringToWasm0(pin, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
2025
2025
  const len0 = WASM_VECTOR_LEN;
2026
+ const ptr1 = passStringToWasm0(envelope, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
2027
+ const len1 = WASM_VECTOR_LEN;
2026
2028
  wasm.cryptoclient_unseal_password_protected_key_envelope(
2027
2029
  retptr,
2028
2030
  this.__wbg_ptr,
2029
2031
  ptr0,
2030
2032
  len0,
2031
- addHeapObject(envelope),
2033
+ ptr1,
2034
+ len1,
2032
2035
  );
2033
2036
  var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
2034
2037
  var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
@@ -2037,9 +2040,9 @@ export class CryptoClient {
2037
2040
  if (r3) {
2038
2041
  throw takeObject(r2);
2039
2042
  }
2040
- var v2 = getArrayU8FromWasm0(r0, r1).slice();
2043
+ var v3 = getArrayU8FromWasm0(r0, r1).slice();
2041
2044
  wasm.__wbindgen_free(r0, r1 * 1, 1);
2042
- return v2;
2045
+ return v3;
2043
2046
  } finally {
2044
2047
  wasm.__wbindgen_add_to_stack_pointer(16);
2045
2048
  }
@@ -4102,7 +4105,7 @@ export function __wbg_call_7cccdd69e0791ae2() {
4102
4105
  }, arguments);
4103
4106
  }
4104
4107
 
4105
- export function __wbg_cipher_6677232b251d927c(arg0) {
4108
+ export function __wbg_cipher_8d57d546ebd28feb(arg0) {
4106
4109
  const ret = getObject(arg0).cipher;
4107
4110
  return isLikeNone(ret) ? 0 : addHeapObject(ret);
4108
4111
  }
@@ -4182,7 +4185,7 @@ export function __wbg_fetch_509096533071c657(arg0, arg1) {
4182
4185
  return addHeapObject(ret);
4183
4186
  }
4184
4187
 
4185
- export function __wbg_folder_f2247810fcb27b63(arg0) {
4188
+ export function __wbg_folder_e7b703a9574b8633(arg0) {
4186
4189
  const ret = getObject(arg0).folder;
4187
4190
  return isLikeNone(ret) ? 0 : addHeapObject(ret);
4188
4191
  }
@@ -4204,7 +4207,7 @@ export function __wbg_getTime_46267b1c24877e30(arg0) {
4204
4207
  return ret;
4205
4208
  }
4206
4209
 
4207
- export function __wbg_get_2dd153cbc4e923c1() {
4210
+ export function __wbg_get_0fe8cec0c515874b() {
4208
4211
  return handleError(function (arg0, arg1, arg2) {
4209
4212
  let deferred0_0;
4210
4213
  let deferred0_1;
@@ -4226,12 +4229,7 @@ export function __wbg_get_67b2ba62fc30de12() {
4226
4229
  }, arguments);
4227
4230
  }
4228
4231
 
4229
- export function __wbg_get_b9b93047fe3cf45b(arg0, arg1) {
4230
- const ret = getObject(arg0)[arg1 >>> 0];
4231
- return addHeapObject(ret);
4232
- }
4233
-
4234
- export function __wbg_get_f25f7cf564b18916() {
4232
+ export function __wbg_get_68689cff5a27a4e3() {
4235
4233
  return handleError(function (arg0, arg1, arg2) {
4236
4234
  let deferred0_0;
4237
4235
  let deferred0_1;
@@ -4246,7 +4244,12 @@ export function __wbg_get_f25f7cf564b18916() {
4246
4244
  }, arguments);
4247
4245
  }
4248
4246
 
4249
- export function __wbg_getaccesstoken_3dd64fe006c52b5e(arg0) {
4247
+ export function __wbg_get_b9b93047fe3cf45b(arg0, arg1) {
4248
+ const ret = getObject(arg0)[arg1 >>> 0];
4249
+ return addHeapObject(ret);
4250
+ }
4251
+
4252
+ export function __wbg_getaccesstoken_e19adb10f028d797(arg0) {
4250
4253
  const ret = getObject(arg0).get_access_token();
4251
4254
  return addHeapObject(ret);
4252
4255
  }
@@ -4431,14 +4434,14 @@ export function __wbg_length_e2d2a49132c1b256(arg0) {
4431
4434
  return ret;
4432
4435
  }
4433
4436
 
4434
- export function __wbg_list_54fbb49308e0c5ea() {
4437
+ export function __wbg_list_4d7ad3b099048858() {
4435
4438
  return handleError(function (arg0) {
4436
4439
  const ret = getObject(arg0).list();
4437
4440
  return addHeapObject(ret);
4438
4441
  }, arguments);
4439
4442
  }
4440
4443
 
4441
- export function __wbg_list_ed5ce00c913de60a() {
4444
+ export function __wbg_list_58b48f9ba5ad52dc() {
4442
4445
  return handleError(function (arg0) {
4443
4446
  const ret = getObject(arg0).list();
4444
4447
  return addHeapObject(ret);
@@ -4639,7 +4642,7 @@ export function __wbg_randomFillSync_ac0988aba3254290() {
4639
4642
  }, arguments);
4640
4643
  }
4641
4644
 
4642
- export function __wbg_remove_128adba3facf371f() {
4645
+ export function __wbg_remove_3537743f8f56af1c() {
4643
4646
  return handleError(function (arg0, arg1, arg2) {
4644
4647
  let deferred0_0;
4645
4648
  let deferred0_1;
@@ -4654,7 +4657,7 @@ export function __wbg_remove_128adba3facf371f() {
4654
4657
  }, arguments);
4655
4658
  }
4656
4659
 
4657
- export function __wbg_remove_cf59e3a512377550() {
4660
+ export function __wbg_remove_588e522225864fee() {
4658
4661
  return handleError(function (arg0, arg1, arg2) {
4659
4662
  let deferred0_0;
4660
4663
  let deferred0_1;
@@ -4708,7 +4711,7 @@ export function __wbg_set_3f1d0b984ed272ed(arg0, arg1, arg2) {
4708
4711
  getObject(arg0)[takeObject(arg1)] = takeObject(arg2);
4709
4712
  }
4710
4713
 
4711
- export function __wbg_set_527001d3cec61b77() {
4714
+ export function __wbg_set_5d5d2f6723f9ec70() {
4712
4715
  return handleError(function (arg0, arg1, arg2, arg3) {
4713
4716
  let deferred0_0;
4714
4717
  let deferred0_1;
@@ -4732,7 +4735,7 @@ export function __wbg_set_8fc6bf8a5b1071d1(arg0, arg1, arg2) {
4732
4735
  return addHeapObject(ret);
4733
4736
  }
4734
4737
 
4735
- export function __wbg_set_badf4262aabc897d() {
4738
+ export function __wbg_set_d3e2a357bd7efe01() {
4736
4739
  return handleError(function (arg0, arg1, arg2, arg3) {
4737
4740
  let deferred0_0;
4738
4741
  let deferred0_1;
@@ -4967,17 +4970,17 @@ export function __wbindgen_closure_wrapper195(arg0, arg1, arg2) {
4967
4970
  return addHeapObject(ret);
4968
4971
  }
4969
4972
 
4970
- export function __wbindgen_closure_wrapper3934(arg0, arg1, arg2) {
4973
+ export function __wbindgen_closure_wrapper3915(arg0, arg1, arg2) {
4971
4974
  const ret = makeMutClosure(arg0, arg1, 299, __wbg_adapter_60);
4972
4975
  return addHeapObject(ret);
4973
4976
  }
4974
4977
 
4975
- export function __wbindgen_closure_wrapper6408(arg0, arg1, arg2) {
4978
+ export function __wbindgen_closure_wrapper6399(arg0, arg1, arg2) {
4976
4979
  const ret = makeMutClosure(arg0, arg1, 325, __wbg_adapter_60);
4977
4980
  return addHeapObject(ret);
4978
4981
  }
4979
4982
 
4980
- export function __wbindgen_closure_wrapper6788(arg0, arg1, arg2) {
4983
+ export function __wbindgen_closure_wrapper6779(arg0, arg1, arg2) {
4981
4984
  const ret = makeMutClosure(arg0, arg1, 348, __wbg_adapter_54);
4982
4985
  return addHeapObject(ret);
4983
4986
  }
Binary file
@@ -211,6 +211,7 @@ export const cryptoclient_unseal_password_protected_key_envelope: (
211
211
  c: number,
212
212
  d: number,
213
213
  e: number,
214
+ f: number,
214
215
  ) => void;
215
216
  export const isMasterPasswordError: (a: number) => number;
216
217
  export const isDeriveKeyConnectorError: (a: number) => number;