@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
package/VERSION
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
07e1998edaeea5514029cfdd38cd2028d3072a97
|
|
@@ -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();
|
|
@@ -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 {
|
|
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
|
-
|
|
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
|
|
2043
|
+
var v3 = getArrayU8FromWasm0(r0, r1).slice();
|
|
2041
2044
|
wasm.__wbindgen_free(r0, r1 * 1, 1);
|
|
2042
|
-
return
|
|
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
|
|
4108
|
+
export function __wbg_cipher_7efc0c02e4cb8f94(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
|
|
4188
|
+
export function __wbg_folder_975aa53ef392add1(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
|
|
4210
|
+
export function __wbg_get_36c752bd8ed2d344() {
|
|
4208
4211
|
return handleError(function (arg0, arg1, arg2) {
|
|
4209
4212
|
let deferred0_0;
|
|
4210
4213
|
let deferred0_1;
|
|
@@ -4219,19 +4222,7 @@ export function __wbg_get_2dd153cbc4e923c1() {
|
|
|
4219
4222
|
}, arguments);
|
|
4220
4223
|
}
|
|
4221
4224
|
|
|
4222
|
-
export function
|
|
4223
|
-
return handleError(function (arg0, arg1) {
|
|
4224
|
-
const ret = Reflect.get(getObject(arg0), getObject(arg1));
|
|
4225
|
-
return addHeapObject(ret);
|
|
4226
|
-
}, arguments);
|
|
4227
|
-
}
|
|
4228
|
-
|
|
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() {
|
|
4225
|
+
export function __wbg_get_47e036b69fc7c20b() {
|
|
4235
4226
|
return handleError(function (arg0, arg1, arg2) {
|
|
4236
4227
|
let deferred0_0;
|
|
4237
4228
|
let deferred0_1;
|
|
@@ -4246,7 +4237,19 @@ export function __wbg_get_f25f7cf564b18916() {
|
|
|
4246
4237
|
}, arguments);
|
|
4247
4238
|
}
|
|
4248
4239
|
|
|
4249
|
-
export function
|
|
4240
|
+
export function __wbg_get_67b2ba62fc30de12() {
|
|
4241
|
+
return handleError(function (arg0, arg1) {
|
|
4242
|
+
const ret = Reflect.get(getObject(arg0), getObject(arg1));
|
|
4243
|
+
return addHeapObject(ret);
|
|
4244
|
+
}, arguments);
|
|
4245
|
+
}
|
|
4246
|
+
|
|
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_8a7c8bc785845d64(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
|
|
4437
|
+
export function __wbg_list_129b1a2b0f3527a9() {
|
|
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
|
|
4444
|
+
export function __wbg_list_92d3e92c1beb0ada() {
|
|
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
|
|
4645
|
+
export function __wbg_remove_dec4917c5ded06e6() {
|
|
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
|
|
4660
|
+
export function __wbg_remove_e9a80a96ae97842b() {
|
|
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
|
|
4714
|
+
export function __wbg_set_48c1246240530f3b() {
|
|
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
|
|
4738
|
+
export function __wbg_set_d2ea454a9e10218d() {
|
|
4736
4739
|
return handleError(function (arg0, arg1, arg2, arg3) {
|
|
4737
4740
|
let deferred0_0;
|
|
4738
4741
|
let deferred0_1;
|
|
@@ -4967,18 +4970,18 @@ export function __wbindgen_closure_wrapper195(arg0, arg1, arg2) {
|
|
|
4967
4970
|
return addHeapObject(ret);
|
|
4968
4971
|
}
|
|
4969
4972
|
|
|
4970
|
-
export function
|
|
4971
|
-
const ret = makeMutClosure(arg0, arg1,
|
|
4973
|
+
export function __wbindgen_closure_wrapper3923(arg0, arg1, arg2) {
|
|
4974
|
+
const ret = makeMutClosure(arg0, arg1, 301, __wbg_adapter_60);
|
|
4972
4975
|
return addHeapObject(ret);
|
|
4973
4976
|
}
|
|
4974
4977
|
|
|
4975
|
-
export function
|
|
4976
|
-
const ret = makeMutClosure(arg0, arg1,
|
|
4978
|
+
export function __wbindgen_closure_wrapper6407(arg0, arg1, arg2) {
|
|
4979
|
+
const ret = makeMutClosure(arg0, arg1, 327, __wbg_adapter_60);
|
|
4977
4980
|
return addHeapObject(ret);
|
|
4978
4981
|
}
|
|
4979
4982
|
|
|
4980
|
-
export function
|
|
4981
|
-
const ret = makeMutClosure(arg0, arg1,
|
|
4983
|
+
export function __wbindgen_closure_wrapper6787(arg0, arg1, arg2) {
|
|
4984
|
+
const ret = makeMutClosure(arg0, arg1, 350, __wbg_adapter_54);
|
|
4982
4985
|
return addHeapObject(ret);
|
|
4983
4986
|
}
|
|
4984
4987
|
|
|
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;
|