@bitwarden/sdk-internal 0.2.0-main.360 → 0.2.0-main.362
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 +1 -1
- package/bitwarden_wasm_internal.d.ts +6 -9
- package/bitwarden_wasm_internal_bg.js +36 -33
- package/bitwarden_wasm_internal_bg.wasm +0 -0
- package/bitwarden_wasm_internal_bg.wasm.d.ts +1 -0
- package/bitwarden_wasm_internal_bg.wasm.js +1 -1
- package/node/bitwarden_wasm_internal.d.ts +6 -9
- package/node/bitwarden_wasm_internal.js +36 -33
- package/node/bitwarden_wasm_internal_bg.wasm +0 -0
- package/node/bitwarden_wasm_internal_bg.wasm.d.ts +1 -0
- package/package.json +1 -1
|
@@ -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,10 @@ 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
|
+
|
|
766
|
+
export type DataEnvelope = Tagged<string, "DataEnvelope">;
|
|
767
|
+
|
|
769
768
|
/**
|
|
770
769
|
* The type of key / signature scheme used for signing and verifying.
|
|
771
770
|
*/
|
|
@@ -793,6 +792,7 @@ export interface CryptoError extends Error {
|
|
|
793
792
|
| "MissingKey"
|
|
794
793
|
| "MissingField"
|
|
795
794
|
| "MissingKeyId"
|
|
795
|
+
| "KeyOperationNotSupported"
|
|
796
796
|
| "ReadOnlyKeyStore"
|
|
797
797
|
| "InsufficientKdfParameters"
|
|
798
798
|
| "EncString"
|
|
@@ -1898,10 +1898,7 @@ export class CryptoClient {
|
|
|
1898
1898
|
* Decrypts a `PasswordProtectedKeyEnvelope`, returning the user key, if successful.
|
|
1899
1899
|
* This is a stop-gap solution, until initialization of the SDK is used.
|
|
1900
1900
|
*/
|
|
1901
|
-
unseal_password_protected_key_envelope(
|
|
1902
|
-
pin: string,
|
|
1903
|
-
envelope: PasswordProtectedKeyEnvelope,
|
|
1904
|
-
): Uint8Array;
|
|
1901
|
+
unseal_password_protected_key_envelope(pin: string, envelope: string): Uint8Array;
|
|
1905
1902
|
}
|
|
1906
1903
|
export class ExporterClient {
|
|
1907
1904
|
private constructor();
|
|
@@ -2016,7 +2016,7 @@ class CryptoClient {
|
|
|
2016
2016
|
* Decrypts a `PasswordProtectedKeyEnvelope`, returning the user key, if successful.
|
|
2017
2017
|
* This is a stop-gap solution, until initialization of the SDK is used.
|
|
2018
2018
|
* @param {string} pin
|
|
2019
|
-
* @param {
|
|
2019
|
+
* @param {string} envelope
|
|
2020
2020
|
* @returns {Uint8Array}
|
|
2021
2021
|
*/
|
|
2022
2022
|
unseal_password_protected_key_envelope(pin, envelope) {
|
|
@@ -2024,12 +2024,15 @@ class CryptoClient {
|
|
|
2024
2024
|
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
2025
2025
|
const ptr0 = passStringToWasm0(pin, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
2026
2026
|
const len0 = WASM_VECTOR_LEN;
|
|
2027
|
+
const ptr1 = passStringToWasm0(envelope, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
2028
|
+
const len1 = WASM_VECTOR_LEN;
|
|
2027
2029
|
wasm.cryptoclient_unseal_password_protected_key_envelope(
|
|
2028
2030
|
retptr,
|
|
2029
2031
|
this.__wbg_ptr,
|
|
2030
2032
|
ptr0,
|
|
2031
2033
|
len0,
|
|
2032
|
-
|
|
2034
|
+
ptr1,
|
|
2035
|
+
len1,
|
|
2033
2036
|
);
|
|
2034
2037
|
var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
|
|
2035
2038
|
var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
|
|
@@ -2038,9 +2041,9 @@ class CryptoClient {
|
|
|
2038
2041
|
if (r3) {
|
|
2039
2042
|
throw takeObject(r2);
|
|
2040
2043
|
}
|
|
2041
|
-
var
|
|
2044
|
+
var v3 = getArrayU8FromWasm0(r0, r1).slice();
|
|
2042
2045
|
wasm.__wbindgen_free(r0, r1 * 1, 1);
|
|
2043
|
-
return
|
|
2046
|
+
return v3;
|
|
2044
2047
|
} finally {
|
|
2045
2048
|
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
2046
2049
|
}
|
|
@@ -4118,7 +4121,7 @@ module.exports.__wbg_call_7cccdd69e0791ae2 = function () {
|
|
|
4118
4121
|
}, arguments);
|
|
4119
4122
|
};
|
|
4120
4123
|
|
|
4121
|
-
module.exports.
|
|
4124
|
+
module.exports.__wbg_cipher_7efc0c02e4cb8f94 = function (arg0) {
|
|
4122
4125
|
const ret = getObject(arg0).cipher;
|
|
4123
4126
|
return isLikeNone(ret) ? 0 : addHeapObject(ret);
|
|
4124
4127
|
};
|
|
@@ -4198,7 +4201,7 @@ module.exports.__wbg_fetch_509096533071c657 = function (arg0, arg1) {
|
|
|
4198
4201
|
return addHeapObject(ret);
|
|
4199
4202
|
};
|
|
4200
4203
|
|
|
4201
|
-
module.exports.
|
|
4204
|
+
module.exports.__wbg_folder_975aa53ef392add1 = function (arg0) {
|
|
4202
4205
|
const ret = getObject(arg0).folder;
|
|
4203
4206
|
return isLikeNone(ret) ? 0 : addHeapObject(ret);
|
|
4204
4207
|
};
|
|
@@ -4220,7 +4223,7 @@ module.exports.__wbg_getTime_46267b1c24877e30 = function (arg0) {
|
|
|
4220
4223
|
return ret;
|
|
4221
4224
|
};
|
|
4222
4225
|
|
|
4223
|
-
module.exports.
|
|
4226
|
+
module.exports.__wbg_get_36c752bd8ed2d344 = function () {
|
|
4224
4227
|
return handleError(function (arg0, arg1, arg2) {
|
|
4225
4228
|
let deferred0_0;
|
|
4226
4229
|
let deferred0_1;
|
|
@@ -4235,19 +4238,7 @@ module.exports.__wbg_get_2dd153cbc4e923c1 = function () {
|
|
|
4235
4238
|
}, arguments);
|
|
4236
4239
|
};
|
|
4237
4240
|
|
|
4238
|
-
module.exports.
|
|
4239
|
-
return handleError(function (arg0, arg1) {
|
|
4240
|
-
const ret = Reflect.get(getObject(arg0), getObject(arg1));
|
|
4241
|
-
return addHeapObject(ret);
|
|
4242
|
-
}, arguments);
|
|
4243
|
-
};
|
|
4244
|
-
|
|
4245
|
-
module.exports.__wbg_get_b9b93047fe3cf45b = function (arg0, arg1) {
|
|
4246
|
-
const ret = getObject(arg0)[arg1 >>> 0];
|
|
4247
|
-
return addHeapObject(ret);
|
|
4248
|
-
};
|
|
4249
|
-
|
|
4250
|
-
module.exports.__wbg_get_f25f7cf564b18916 = function () {
|
|
4241
|
+
module.exports.__wbg_get_47e036b69fc7c20b = function () {
|
|
4251
4242
|
return handleError(function (arg0, arg1, arg2) {
|
|
4252
4243
|
let deferred0_0;
|
|
4253
4244
|
let deferred0_1;
|
|
@@ -4262,7 +4253,19 @@ module.exports.__wbg_get_f25f7cf564b18916 = function () {
|
|
|
4262
4253
|
}, arguments);
|
|
4263
4254
|
};
|
|
4264
4255
|
|
|
4265
|
-
module.exports.
|
|
4256
|
+
module.exports.__wbg_get_67b2ba62fc30de12 = function () {
|
|
4257
|
+
return handleError(function (arg0, arg1) {
|
|
4258
|
+
const ret = Reflect.get(getObject(arg0), getObject(arg1));
|
|
4259
|
+
return addHeapObject(ret);
|
|
4260
|
+
}, arguments);
|
|
4261
|
+
};
|
|
4262
|
+
|
|
4263
|
+
module.exports.__wbg_get_b9b93047fe3cf45b = function (arg0, arg1) {
|
|
4264
|
+
const ret = getObject(arg0)[arg1 >>> 0];
|
|
4265
|
+
return addHeapObject(ret);
|
|
4266
|
+
};
|
|
4267
|
+
|
|
4268
|
+
module.exports.__wbg_getaccesstoken_8a7c8bc785845d64 = function (arg0) {
|
|
4266
4269
|
const ret = getObject(arg0).get_access_token();
|
|
4267
4270
|
return addHeapObject(ret);
|
|
4268
4271
|
};
|
|
@@ -4447,14 +4450,14 @@ module.exports.__wbg_length_e2d2a49132c1b256 = function (arg0) {
|
|
|
4447
4450
|
return ret;
|
|
4448
4451
|
};
|
|
4449
4452
|
|
|
4450
|
-
module.exports.
|
|
4453
|
+
module.exports.__wbg_list_129b1a2b0f3527a9 = function () {
|
|
4451
4454
|
return handleError(function (arg0) {
|
|
4452
4455
|
const ret = getObject(arg0).list();
|
|
4453
4456
|
return addHeapObject(ret);
|
|
4454
4457
|
}, arguments);
|
|
4455
4458
|
};
|
|
4456
4459
|
|
|
4457
|
-
module.exports.
|
|
4460
|
+
module.exports.__wbg_list_92d3e92c1beb0ada = function () {
|
|
4458
4461
|
return handleError(function (arg0) {
|
|
4459
4462
|
const ret = getObject(arg0).list();
|
|
4460
4463
|
return addHeapObject(ret);
|
|
@@ -4655,7 +4658,7 @@ module.exports.__wbg_randomFillSync_ac0988aba3254290 = function () {
|
|
|
4655
4658
|
}, arguments);
|
|
4656
4659
|
};
|
|
4657
4660
|
|
|
4658
|
-
module.exports.
|
|
4661
|
+
module.exports.__wbg_remove_dec4917c5ded06e6 = function () {
|
|
4659
4662
|
return handleError(function (arg0, arg1, arg2) {
|
|
4660
4663
|
let deferred0_0;
|
|
4661
4664
|
let deferred0_1;
|
|
@@ -4670,7 +4673,7 @@ module.exports.__wbg_remove_128adba3facf371f = function () {
|
|
|
4670
4673
|
}, arguments);
|
|
4671
4674
|
};
|
|
4672
4675
|
|
|
4673
|
-
module.exports.
|
|
4676
|
+
module.exports.__wbg_remove_e9a80a96ae97842b = function () {
|
|
4674
4677
|
return handleError(function (arg0, arg1, arg2) {
|
|
4675
4678
|
let deferred0_0;
|
|
4676
4679
|
let deferred0_1;
|
|
@@ -4724,7 +4727,7 @@ module.exports.__wbg_set_3f1d0b984ed272ed = function (arg0, arg1, arg2) {
|
|
|
4724
4727
|
getObject(arg0)[takeObject(arg1)] = takeObject(arg2);
|
|
4725
4728
|
};
|
|
4726
4729
|
|
|
4727
|
-
module.exports.
|
|
4730
|
+
module.exports.__wbg_set_48c1246240530f3b = function () {
|
|
4728
4731
|
return handleError(function (arg0, arg1, arg2, arg3) {
|
|
4729
4732
|
let deferred0_0;
|
|
4730
4733
|
let deferred0_1;
|
|
@@ -4748,7 +4751,7 @@ module.exports.__wbg_set_8fc6bf8a5b1071d1 = function (arg0, arg1, arg2) {
|
|
|
4748
4751
|
return addHeapObject(ret);
|
|
4749
4752
|
};
|
|
4750
4753
|
|
|
4751
|
-
module.exports.
|
|
4754
|
+
module.exports.__wbg_set_d2ea454a9e10218d = function () {
|
|
4752
4755
|
return handleError(function (arg0, arg1, arg2, arg3) {
|
|
4753
4756
|
let deferred0_0;
|
|
4754
4757
|
let deferred0_1;
|
|
@@ -4983,18 +4986,18 @@ module.exports.__wbindgen_closure_wrapper195 = function (arg0, arg1, arg2) {
|
|
|
4983
4986
|
return addHeapObject(ret);
|
|
4984
4987
|
};
|
|
4985
4988
|
|
|
4986
|
-
module.exports.
|
|
4987
|
-
const ret = makeMutClosure(arg0, arg1,
|
|
4989
|
+
module.exports.__wbindgen_closure_wrapper3923 = function (arg0, arg1, arg2) {
|
|
4990
|
+
const ret = makeMutClosure(arg0, arg1, 301, __wbg_adapter_60);
|
|
4988
4991
|
return addHeapObject(ret);
|
|
4989
4992
|
};
|
|
4990
4993
|
|
|
4991
|
-
module.exports.
|
|
4992
|
-
const ret = makeMutClosure(arg0, arg1,
|
|
4994
|
+
module.exports.__wbindgen_closure_wrapper6407 = function (arg0, arg1, arg2) {
|
|
4995
|
+
const ret = makeMutClosure(arg0, arg1, 327, __wbg_adapter_60);
|
|
4993
4996
|
return addHeapObject(ret);
|
|
4994
4997
|
};
|
|
4995
4998
|
|
|
4996
|
-
module.exports.
|
|
4997
|
-
const ret = makeMutClosure(arg0, arg1,
|
|
4999
|
+
module.exports.__wbindgen_closure_wrapper6787 = function (arg0, arg1, arg2) {
|
|
5000
|
+
const ret = makeMutClosure(arg0, arg1, 350, __wbg_adapter_54);
|
|
4998
5001
|
return addHeapObject(ret);
|
|
4999
5002
|
};
|
|
5000
5003
|
|
|
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;
|