@bitwarden/sdk-internal 0.2.0-main.221 → 0.2.0-main.223
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 +27 -0
- package/bitwarden_wasm_internal_bg.js +58 -17
- package/bitwarden_wasm_internal_bg.wasm +0 -0
- package/bitwarden_wasm_internal_bg.wasm.d.ts +9 -0
- package/bitwarden_wasm_internal_bg.wasm.js +1 -1
- package/node/bitwarden_wasm_internal.d.ts +27 -0
- package/node/bitwarden_wasm_internal.js +58 -17
- package/node/bitwarden_wasm_internal_bg.wasm +0 -0
- package/node/bitwarden_wasm_internal_bg.wasm.d.ts +9 -0
- package/package.json +1 -1
package/VERSION
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
4b80d303835334c2d153bc45a9d74935b34233c3
|
|
@@ -835,6 +835,24 @@ export interface CipherListView {
|
|
|
835
835
|
localData: LocalDataView | undefined;
|
|
836
836
|
}
|
|
837
837
|
|
|
838
|
+
/**
|
|
839
|
+
* Represents the result of decrypting a list of ciphers.
|
|
840
|
+
*
|
|
841
|
+
* This struct contains two vectors: `successes` and `failures`.
|
|
842
|
+
* `successes` contains the decrypted `CipherListView` objects,
|
|
843
|
+
* while `failures` contains the original `Cipher` objects that failed to decrypt.
|
|
844
|
+
*/
|
|
845
|
+
export interface DecryptCipherListResult {
|
|
846
|
+
/**
|
|
847
|
+
* The decrypted `CipherListView` objects.
|
|
848
|
+
*/
|
|
849
|
+
successes: CipherListView[];
|
|
850
|
+
/**
|
|
851
|
+
* The original `Cipher` objects that failed to decrypt.
|
|
852
|
+
*/
|
|
853
|
+
failures: Cipher[];
|
|
854
|
+
}
|
|
855
|
+
|
|
838
856
|
export interface Field {
|
|
839
857
|
name: EncString | undefined;
|
|
840
858
|
value: EncString | undefined;
|
|
@@ -1262,6 +1280,11 @@ export class CiphersClient {
|
|
|
1262
1280
|
encrypt(cipher_view: CipherView): EncryptionContext;
|
|
1263
1281
|
decrypt(cipher: Cipher): CipherView;
|
|
1264
1282
|
decrypt_list(ciphers: Cipher[]): CipherListView[];
|
|
1283
|
+
/**
|
|
1284
|
+
* Decrypt cipher list with failures
|
|
1285
|
+
* Returns both successfully decrypted ciphers and any that failed to decrypt
|
|
1286
|
+
*/
|
|
1287
|
+
decrypt_list_with_failures(ciphers: Cipher[]): DecryptCipherListResult;
|
|
1265
1288
|
decrypt_fido2_credentials(cipher_view: CipherView): Fido2CredentialView[];
|
|
1266
1289
|
move_to_organization(cipher_view: CipherView, organization_id: OrganizationId): CipherView;
|
|
1267
1290
|
decrypt_fido2_private_key(cipher_view: CipherView): string;
|
|
@@ -1572,6 +1595,10 @@ export class PureCrypto {
|
|
|
1572
1595
|
signed_public_key: Uint8Array,
|
|
1573
1596
|
verifying_key: Uint8Array,
|
|
1574
1597
|
): Uint8Array;
|
|
1598
|
+
/**
|
|
1599
|
+
* Derive output of the KDF for a [bitwarden_crypto::Kdf] configuration.
|
|
1600
|
+
*/
|
|
1601
|
+
static derive_kdf_material(password: Uint8Array, salt: Uint8Array, kdf: Kdf): Uint8Array;
|
|
1575
1602
|
}
|
|
1576
1603
|
export class StateClient {
|
|
1577
1604
|
private constructor();
|
|
@@ -753,7 +753,7 @@ function __wbg_adapter_56(arg0, arg1, arg2) {
|
|
|
753
753
|
);
|
|
754
754
|
}
|
|
755
755
|
|
|
756
|
-
function
|
|
756
|
+
function __wbg_adapter_279(arg0, arg1, arg2, arg3) {
|
|
757
757
|
wasm.wasm_bindgen__convert__closures__invoke2_mut__h8776500d04a3e634(
|
|
758
758
|
arg0,
|
|
759
759
|
arg1,
|
|
@@ -1199,6 +1199,18 @@ export class CiphersClient {
|
|
|
1199
1199
|
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
1200
1200
|
}
|
|
1201
1201
|
}
|
|
1202
|
+
/**
|
|
1203
|
+
* Decrypt cipher list with failures
|
|
1204
|
+
* Returns both successfully decrypted ciphers and any that failed to decrypt
|
|
1205
|
+
* @param {Cipher[]} ciphers
|
|
1206
|
+
* @returns {DecryptCipherListResult}
|
|
1207
|
+
*/
|
|
1208
|
+
decrypt_list_with_failures(ciphers) {
|
|
1209
|
+
const ptr0 = passArrayJsValueToWasm0(ciphers, wasm.__wbindgen_malloc);
|
|
1210
|
+
const len0 = WASM_VECTOR_LEN;
|
|
1211
|
+
const ret = wasm.ciphersclient_decrypt_list_with_failures(this.__wbg_ptr, ptr0, len0);
|
|
1212
|
+
return takeObject(ret);
|
|
1213
|
+
}
|
|
1202
1214
|
/**
|
|
1203
1215
|
* @param {CipherView} cipher_view
|
|
1204
1216
|
* @returns {Fido2CredentialView[]}
|
|
@@ -3043,6 +3055,35 @@ export class PureCrypto {
|
|
|
3043
3055
|
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
3044
3056
|
}
|
|
3045
3057
|
}
|
|
3058
|
+
/**
|
|
3059
|
+
* Derive output of the KDF for a [bitwarden_crypto::Kdf] configuration.
|
|
3060
|
+
* @param {Uint8Array} password
|
|
3061
|
+
* @param {Uint8Array} salt
|
|
3062
|
+
* @param {Kdf} kdf
|
|
3063
|
+
* @returns {Uint8Array}
|
|
3064
|
+
*/
|
|
3065
|
+
static derive_kdf_material(password, salt, kdf) {
|
|
3066
|
+
try {
|
|
3067
|
+
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
3068
|
+
const ptr0 = passArray8ToWasm0(password, wasm.__wbindgen_malloc);
|
|
3069
|
+
const len0 = WASM_VECTOR_LEN;
|
|
3070
|
+
const ptr1 = passArray8ToWasm0(salt, wasm.__wbindgen_malloc);
|
|
3071
|
+
const len1 = WASM_VECTOR_LEN;
|
|
3072
|
+
wasm.purecrypto_derive_kdf_material(retptr, ptr0, len0, ptr1, len1, addHeapObject(kdf));
|
|
3073
|
+
var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
|
|
3074
|
+
var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
|
|
3075
|
+
var r2 = getDataViewMemory0().getInt32(retptr + 4 * 2, true);
|
|
3076
|
+
var r3 = getDataViewMemory0().getInt32(retptr + 4 * 3, true);
|
|
3077
|
+
if (r3) {
|
|
3078
|
+
throw takeObject(r2);
|
|
3079
|
+
}
|
|
3080
|
+
var v3 = getArrayU8FromWasm0(r0, r1).slice();
|
|
3081
|
+
wasm.__wbindgen_free(r0, r1 * 1, 1);
|
|
3082
|
+
return v3;
|
|
3083
|
+
} finally {
|
|
3084
|
+
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
3085
|
+
}
|
|
3086
|
+
}
|
|
3046
3087
|
}
|
|
3047
3088
|
|
|
3048
3089
|
const StateClientFinalization =
|
|
@@ -3347,7 +3388,7 @@ export function __wbg_get_b9b93047fe3cf45b(arg0, arg1) {
|
|
|
3347
3388
|
return addHeapObject(ret);
|
|
3348
3389
|
}
|
|
3349
3390
|
|
|
3350
|
-
export function
|
|
3391
|
+
export function __wbg_get_d7e08493e14d3073() {
|
|
3351
3392
|
return handleError(function (arg0, arg1, arg2) {
|
|
3352
3393
|
let deferred0_0;
|
|
3353
3394
|
let deferred0_1;
|
|
@@ -3362,7 +3403,7 @@ export function __wbg_get_d74b07b1ba78be21() {
|
|
|
3362
3403
|
}, arguments);
|
|
3363
3404
|
}
|
|
3364
3405
|
|
|
3365
|
-
export function
|
|
3406
|
+
export function __wbg_getaccesstoken_a6776220c768495c(arg0) {
|
|
3366
3407
|
const ret = getObject(arg0).get_access_token();
|
|
3367
3408
|
return addHeapObject(ret);
|
|
3368
3409
|
}
|
|
@@ -3467,7 +3508,7 @@ export function __wbg_length_e2d2a49132c1b256(arg0) {
|
|
|
3467
3508
|
return ret;
|
|
3468
3509
|
}
|
|
3469
3510
|
|
|
3470
|
-
export function
|
|
3511
|
+
export function __wbg_list_296175588665e03b() {
|
|
3471
3512
|
return handleError(function (arg0) {
|
|
3472
3513
|
const ret = getObject(arg0).list();
|
|
3473
3514
|
return addHeapObject(ret);
|
|
@@ -3502,7 +3543,7 @@ export function __wbg_new_23a2665fac83c611(arg0, arg1) {
|
|
|
3502
3543
|
const a = state0.a;
|
|
3503
3544
|
state0.a = 0;
|
|
3504
3545
|
try {
|
|
3505
|
-
return
|
|
3546
|
+
return __wbg_adapter_279(a, state0.b, arg0, arg1);
|
|
3506
3547
|
} finally {
|
|
3507
3548
|
state0.a = a;
|
|
3508
3549
|
}
|
|
@@ -3644,7 +3685,7 @@ export function __wbg_randomFillSync_ac0988aba3254290() {
|
|
|
3644
3685
|
}, arguments);
|
|
3645
3686
|
}
|
|
3646
3687
|
|
|
3647
|
-
export function
|
|
3688
|
+
export function __wbg_remove_91062ef36398ce81() {
|
|
3648
3689
|
return handleError(function (arg0, arg1, arg2) {
|
|
3649
3690
|
let deferred0_0;
|
|
3650
3691
|
let deferred0_1;
|
|
@@ -3691,7 +3732,11 @@ export function __wbg_set_3f1d0b984ed272ed(arg0, arg1, arg2) {
|
|
|
3691
3732
|
getObject(arg0)[takeObject(arg1)] = takeObject(arg2);
|
|
3692
3733
|
}
|
|
3693
3734
|
|
|
3694
|
-
export function
|
|
3735
|
+
export function __wbg_set_65595bdd868b3009(arg0, arg1, arg2) {
|
|
3736
|
+
getObject(arg0).set(getObject(arg1), arg2 >>> 0);
|
|
3737
|
+
}
|
|
3738
|
+
|
|
3739
|
+
export function __wbg_set_e1312fa33b0e0bba() {
|
|
3695
3740
|
return handleError(function (arg0, arg1, arg2, arg3) {
|
|
3696
3741
|
let deferred0_0;
|
|
3697
3742
|
let deferred0_1;
|
|
@@ -3706,10 +3751,6 @@ export function __wbg_set_616a519deee0d894() {
|
|
|
3706
3751
|
}, arguments);
|
|
3707
3752
|
}
|
|
3708
3753
|
|
|
3709
|
-
export function __wbg_set_65595bdd868b3009(arg0, arg1, arg2) {
|
|
3710
|
-
getObject(arg0).set(getObject(arg1), arg2 >>> 0);
|
|
3711
|
-
}
|
|
3712
|
-
|
|
3713
3754
|
export function __wbg_setbody_5923b78a95eedf29(arg0, arg1) {
|
|
3714
3755
|
getObject(arg0).body = getObject(arg1);
|
|
3715
3756
|
}
|
|
@@ -3889,18 +3930,18 @@ export function __wbindgen_cb_drop(arg0) {
|
|
|
3889
3930
|
return ret;
|
|
3890
3931
|
}
|
|
3891
3932
|
|
|
3892
|
-
export function
|
|
3893
|
-
const ret = makeMutClosure(arg0, arg1,
|
|
3933
|
+
export function __wbindgen_closure_wrapper2908(arg0, arg1, arg2) {
|
|
3934
|
+
const ret = makeMutClosure(arg0, arg1, 919, __wbg_adapter_50);
|
|
3894
3935
|
return addHeapObject(ret);
|
|
3895
3936
|
}
|
|
3896
3937
|
|
|
3897
|
-
export function
|
|
3898
|
-
const ret = makeMutClosure(arg0, arg1,
|
|
3938
|
+
export function __wbindgen_closure_wrapper3748(arg0, arg1, arg2) {
|
|
3939
|
+
const ret = makeMutClosure(arg0, arg1, 1003, __wbg_adapter_53);
|
|
3899
3940
|
return addHeapObject(ret);
|
|
3900
3941
|
}
|
|
3901
3942
|
|
|
3902
|
-
export function
|
|
3903
|
-
const ret = makeMutClosure(arg0, arg1,
|
|
3943
|
+
export function __wbindgen_closure_wrapper4166(arg0, arg1, arg2) {
|
|
3944
|
+
const ret = makeMutClosure(arg0, arg1, 1126, __wbg_adapter_56);
|
|
3904
3945
|
return addHeapObject(ret);
|
|
3905
3946
|
}
|
|
3906
3947
|
|
|
Binary file
|
|
@@ -120,6 +120,7 @@ export const attachmentsclient_decrypt_buffer: (
|
|
|
120
120
|
export const ciphersclient_encrypt: (a: number, b: number, c: number) => void;
|
|
121
121
|
export const ciphersclient_decrypt: (a: number, b: number, c: number) => void;
|
|
122
122
|
export const ciphersclient_decrypt_list: (a: number, b: number, c: number, d: number) => void;
|
|
123
|
+
export const ciphersclient_decrypt_list_with_failures: (a: number, b: number, c: number) => number;
|
|
123
124
|
export const ciphersclient_decrypt_fido2_credentials: (a: number, b: number, c: number) => void;
|
|
124
125
|
export const ciphersclient_move_to_organization: (
|
|
125
126
|
a: number,
|
|
@@ -307,6 +308,14 @@ export const purecrypto_verify_and_unwrap_signed_public_key: (
|
|
|
307
308
|
d: number,
|
|
308
309
|
e: number,
|
|
309
310
|
) => void;
|
|
311
|
+
export const purecrypto_derive_kdf_material: (
|
|
312
|
+
a: number,
|
|
313
|
+
b: number,
|
|
314
|
+
c: number,
|
|
315
|
+
d: number,
|
|
316
|
+
e: number,
|
|
317
|
+
f: number,
|
|
318
|
+
) => void;
|
|
310
319
|
export const generate_ssh_key: (a: number, b: number) => void;
|
|
311
320
|
export const import_ssh_key: (a: number, b: number, c: number, d: number, e: number) => void;
|
|
312
321
|
export const isTestError: (a: number) => number;
|