@bitwarden/sdk-internal 0.2.0-main.235 → 0.2.0-main.237
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 +19 -1
- package/bitwarden_wasm_internal_bg.js +67 -29
- package/bitwarden_wasm_internal_bg.wasm +0 -0
- package/bitwarden_wasm_internal_bg.wasm.d.ts +8 -1
- package/bitwarden_wasm_internal_bg.wasm.js +1 -1
- package/node/bitwarden_wasm_internal.d.ts +19 -1
- package/node/bitwarden_wasm_internal.js +67 -29
- package/node/bitwarden_wasm_internal_bg.wasm +0 -0
- package/node/bitwarden_wasm_internal_bg.wasm.d.ts +8 -1
- package/package.json +1 -1
package/VERSION
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
a3eb9182f12040c1e5be96ef268fde07160f1fe0
|
|
@@ -1250,7 +1250,12 @@ export interface CipherPermissions {
|
|
|
1250
1250
|
|
|
1251
1251
|
export interface CipherError extends Error {
|
|
1252
1252
|
name: "CipherError";
|
|
1253
|
-
variant:
|
|
1253
|
+
variant:
|
|
1254
|
+
| "MissingFieldError"
|
|
1255
|
+
| "VaultLocked"
|
|
1256
|
+
| "CryptoError"
|
|
1257
|
+
| "EncryptError"
|
|
1258
|
+
| "AttachmentsWithoutKeys";
|
|
1254
1259
|
}
|
|
1255
1260
|
|
|
1256
1261
|
export function isCipherError(error: any): error is CipherError;
|
|
@@ -1384,6 +1389,19 @@ export class CiphersClient {
|
|
|
1384
1389
|
private constructor();
|
|
1385
1390
|
free(): void;
|
|
1386
1391
|
encrypt(cipher_view: CipherView): EncryptionContext;
|
|
1392
|
+
/**
|
|
1393
|
+
* Encrypt a cipher with the provided key. This should only be used when rotating encryption
|
|
1394
|
+
* keys in the Web client.
|
|
1395
|
+
*
|
|
1396
|
+
* Until key rotation is fully implemented in the SDK, this method must be provided the new
|
|
1397
|
+
* symmetric key in base64 format. See PM-23084
|
|
1398
|
+
*
|
|
1399
|
+
* If the cipher has a CipherKey, it will be re-encrypted with the new key.
|
|
1400
|
+
* If the cipher does not have a CipherKey and CipherKeyEncryption is enabled, one will be
|
|
1401
|
+
* generated using the new key. Otherwise, the cipher's data will be encrypted with the new
|
|
1402
|
+
* key directly.
|
|
1403
|
+
*/
|
|
1404
|
+
encrypt_cipher_for_rotation(cipher_view: CipherView, new_key_b64: string): EncryptionContext;
|
|
1387
1405
|
decrypt(cipher: Cipher): CipherView;
|
|
1388
1406
|
decrypt_list(ciphers: Cipher[]): CipherListView[];
|
|
1389
1407
|
/**
|
|
@@ -796,7 +796,7 @@ function __wbg_adapter_59(arg0, arg1, arg2) {
|
|
|
796
796
|
);
|
|
797
797
|
}
|
|
798
798
|
|
|
799
|
-
function
|
|
799
|
+
function __wbg_adapter_304(arg0, arg1, arg2, arg3) {
|
|
800
800
|
wasm.wasm_bindgen__convert__closures__invoke2_mut__h54a8613170fef18e(
|
|
801
801
|
arg0,
|
|
802
802
|
arg1,
|
|
@@ -1257,6 +1257,44 @@ export class CiphersClient {
|
|
|
1257
1257
|
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
1258
1258
|
}
|
|
1259
1259
|
}
|
|
1260
|
+
/**
|
|
1261
|
+
* Encrypt a cipher with the provided key. This should only be used when rotating encryption
|
|
1262
|
+
* keys in the Web client.
|
|
1263
|
+
*
|
|
1264
|
+
* Until key rotation is fully implemented in the SDK, this method must be provided the new
|
|
1265
|
+
* symmetric key in base64 format. See PM-23084
|
|
1266
|
+
*
|
|
1267
|
+
* If the cipher has a CipherKey, it will be re-encrypted with the new key.
|
|
1268
|
+
* If the cipher does not have a CipherKey and CipherKeyEncryption is enabled, one will be
|
|
1269
|
+
* generated using the new key. Otherwise, the cipher's data will be encrypted with the new
|
|
1270
|
+
* key directly.
|
|
1271
|
+
* @param {CipherView} cipher_view
|
|
1272
|
+
* @param {string} new_key_b64
|
|
1273
|
+
* @returns {EncryptionContext}
|
|
1274
|
+
*/
|
|
1275
|
+
encrypt_cipher_for_rotation(cipher_view, new_key_b64) {
|
|
1276
|
+
try {
|
|
1277
|
+
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
1278
|
+
const ptr0 = passStringToWasm0(new_key_b64, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
1279
|
+
const len0 = WASM_VECTOR_LEN;
|
|
1280
|
+
wasm.ciphersclient_encrypt_cipher_for_rotation(
|
|
1281
|
+
retptr,
|
|
1282
|
+
this.__wbg_ptr,
|
|
1283
|
+
addHeapObject(cipher_view),
|
|
1284
|
+
ptr0,
|
|
1285
|
+
len0,
|
|
1286
|
+
);
|
|
1287
|
+
var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
|
|
1288
|
+
var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
|
|
1289
|
+
var r2 = getDataViewMemory0().getInt32(retptr + 4 * 2, true);
|
|
1290
|
+
if (r2) {
|
|
1291
|
+
throw takeObject(r1);
|
|
1292
|
+
}
|
|
1293
|
+
return takeObject(r0);
|
|
1294
|
+
} finally {
|
|
1295
|
+
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
1296
|
+
}
|
|
1297
|
+
}
|
|
1260
1298
|
/**
|
|
1261
1299
|
* @param {Cipher} cipher
|
|
1262
1300
|
* @returns {CipherView}
|
|
@@ -3596,7 +3634,7 @@ export function __wbg_getTime_46267b1c24877e30(arg0) {
|
|
|
3596
3634
|
return ret;
|
|
3597
3635
|
}
|
|
3598
3636
|
|
|
3599
|
-
export function
|
|
3637
|
+
export function __wbg_get_029dab190d7deb0d() {
|
|
3600
3638
|
return handleError(function (arg0, arg1, arg2) {
|
|
3601
3639
|
let deferred0_0;
|
|
3602
3640
|
let deferred0_1;
|
|
@@ -3611,7 +3649,7 @@ export function __wbg_get_0cadee1906808c79() {
|
|
|
3611
3649
|
}, arguments);
|
|
3612
3650
|
}
|
|
3613
3651
|
|
|
3614
|
-
export function
|
|
3652
|
+
export function __wbg_get_2447b2577c5f416b() {
|
|
3615
3653
|
return handleError(function (arg0, arg1, arg2) {
|
|
3616
3654
|
let deferred0_0;
|
|
3617
3655
|
let deferred0_1;
|
|
@@ -3638,7 +3676,7 @@ export function __wbg_get_b9b93047fe3cf45b(arg0, arg1) {
|
|
|
3638
3676
|
return addHeapObject(ret);
|
|
3639
3677
|
}
|
|
3640
3678
|
|
|
3641
|
-
export function
|
|
3679
|
+
export function __wbg_getaccesstoken_097bb4787976f5a6(arg0) {
|
|
3642
3680
|
const ret = getObject(arg0).get_access_token();
|
|
3643
3681
|
return addHeapObject(ret);
|
|
3644
3682
|
}
|
|
@@ -3743,14 +3781,14 @@ export function __wbg_length_e2d2a49132c1b256(arg0) {
|
|
|
3743
3781
|
return ret;
|
|
3744
3782
|
}
|
|
3745
3783
|
|
|
3746
|
-
export function
|
|
3784
|
+
export function __wbg_list_917a775e2518366c() {
|
|
3747
3785
|
return handleError(function (arg0) {
|
|
3748
3786
|
const ret = getObject(arg0).list();
|
|
3749
3787
|
return addHeapObject(ret);
|
|
3750
3788
|
}, arguments);
|
|
3751
3789
|
}
|
|
3752
3790
|
|
|
3753
|
-
export function
|
|
3791
|
+
export function __wbg_list_96ec1370e888b757() {
|
|
3754
3792
|
return handleError(function (arg0) {
|
|
3755
3793
|
const ret = getObject(arg0).list();
|
|
3756
3794
|
return addHeapObject(ret);
|
|
@@ -3785,7 +3823,7 @@ export function __wbg_new_23a2665fac83c611(arg0, arg1) {
|
|
|
3785
3823
|
const a = state0.a;
|
|
3786
3824
|
state0.a = 0;
|
|
3787
3825
|
try {
|
|
3788
|
-
return
|
|
3826
|
+
return __wbg_adapter_304(a, state0.b, arg0, arg1);
|
|
3789
3827
|
} finally {
|
|
3790
3828
|
state0.a = a;
|
|
3791
3829
|
}
|
|
@@ -3927,7 +3965,7 @@ export function __wbg_randomFillSync_ac0988aba3254290() {
|
|
|
3927
3965
|
}, arguments);
|
|
3928
3966
|
}
|
|
3929
3967
|
|
|
3930
|
-
export function
|
|
3968
|
+
export function __wbg_remove_6711a278a02081d9() {
|
|
3931
3969
|
return handleError(function (arg0, arg1, arg2) {
|
|
3932
3970
|
let deferred0_0;
|
|
3933
3971
|
let deferred0_1;
|
|
@@ -3942,7 +3980,7 @@ export function __wbg_remove_91cfed2de422d072() {
|
|
|
3942
3980
|
}, arguments);
|
|
3943
3981
|
}
|
|
3944
3982
|
|
|
3945
|
-
export function
|
|
3983
|
+
export function __wbg_remove_a10f49430b91c346() {
|
|
3946
3984
|
return handleError(function (arg0, arg1, arg2) {
|
|
3947
3985
|
let deferred0_0;
|
|
3948
3986
|
let deferred0_1;
|
|
@@ -3981,7 +4019,7 @@ export function __wbg_setTimeout_ca12ead8b48245e2(arg0, arg1) {
|
|
|
3981
4019
|
return addHeapObject(ret);
|
|
3982
4020
|
}
|
|
3983
4021
|
|
|
3984
|
-
export function
|
|
4022
|
+
export function __wbg_set_28f266b0ff844628() {
|
|
3985
4023
|
return handleError(function (arg0, arg1, arg2, arg3) {
|
|
3986
4024
|
let deferred0_0;
|
|
3987
4025
|
let deferred0_1;
|
|
@@ -3996,7 +4034,19 @@ export function __wbg_set_240df6b209d9fff7() {
|
|
|
3996
4034
|
}, arguments);
|
|
3997
4035
|
}
|
|
3998
4036
|
|
|
3999
|
-
export function
|
|
4037
|
+
export function __wbg_set_37837023f3d740e8(arg0, arg1, arg2) {
|
|
4038
|
+
getObject(arg0)[arg1 >>> 0] = takeObject(arg2);
|
|
4039
|
+
}
|
|
4040
|
+
|
|
4041
|
+
export function __wbg_set_3f1d0b984ed272ed(arg0, arg1, arg2) {
|
|
4042
|
+
getObject(arg0)[takeObject(arg1)] = takeObject(arg2);
|
|
4043
|
+
}
|
|
4044
|
+
|
|
4045
|
+
export function __wbg_set_65595bdd868b3009(arg0, arg1, arg2) {
|
|
4046
|
+
getObject(arg0).set(getObject(arg1), arg2 >>> 0);
|
|
4047
|
+
}
|
|
4048
|
+
|
|
4049
|
+
export function __wbg_set_9e865f13e7194ab8() {
|
|
4000
4050
|
return handleError(function (arg0, arg1, arg2, arg3) {
|
|
4001
4051
|
let deferred0_0;
|
|
4002
4052
|
let deferred0_1;
|
|
@@ -4011,18 +4061,6 @@ export function __wbg_set_371c14d6e3b20a42() {
|
|
|
4011
4061
|
}, arguments);
|
|
4012
4062
|
}
|
|
4013
4063
|
|
|
4014
|
-
export function __wbg_set_37837023f3d740e8(arg0, arg1, arg2) {
|
|
4015
|
-
getObject(arg0)[arg1 >>> 0] = takeObject(arg2);
|
|
4016
|
-
}
|
|
4017
|
-
|
|
4018
|
-
export function __wbg_set_3f1d0b984ed272ed(arg0, arg1, arg2) {
|
|
4019
|
-
getObject(arg0)[takeObject(arg1)] = takeObject(arg2);
|
|
4020
|
-
}
|
|
4021
|
-
|
|
4022
|
-
export function __wbg_set_65595bdd868b3009(arg0, arg1, arg2) {
|
|
4023
|
-
getObject(arg0).set(getObject(arg1), arg2 >>> 0);
|
|
4024
|
-
}
|
|
4025
|
-
|
|
4026
4064
|
export function __wbg_setbody_5923b78a95eedf29(arg0, arg1) {
|
|
4027
4065
|
getObject(arg0).body = getObject(arg1);
|
|
4028
4066
|
}
|
|
@@ -4211,18 +4249,18 @@ export function __wbindgen_cb_drop(arg0) {
|
|
|
4211
4249
|
return ret;
|
|
4212
4250
|
}
|
|
4213
4251
|
|
|
4214
|
-
export function
|
|
4215
|
-
const ret = makeMutClosure(arg0, arg1,
|
|
4252
|
+
export function __wbindgen_closure_wrapper3189(arg0, arg1, arg2) {
|
|
4253
|
+
const ret = makeMutClosure(arg0, arg1, 254, __wbg_adapter_54);
|
|
4216
4254
|
return addHeapObject(ret);
|
|
4217
4255
|
}
|
|
4218
4256
|
|
|
4219
|
-
export function
|
|
4220
|
-
const ret = makeMutClosure(arg0, arg1,
|
|
4257
|
+
export function __wbindgen_closure_wrapper5440(arg0, arg1, arg2) {
|
|
4258
|
+
const ret = makeMutClosure(arg0, arg1, 279, __wbg_adapter_54);
|
|
4221
4259
|
return addHeapObject(ret);
|
|
4222
4260
|
}
|
|
4223
4261
|
|
|
4224
|
-
export function
|
|
4225
|
-
const ret = makeMutClosure(arg0, arg1,
|
|
4262
|
+
export function __wbindgen_closure_wrapper5799(arg0, arg1, arg2) {
|
|
4263
|
+
const ret = makeMutClosure(arg0, arg1, 304, __wbg_adapter_59);
|
|
4226
4264
|
return addHeapObject(ret);
|
|
4227
4265
|
}
|
|
4228
4266
|
|
|
Binary file
|
|
@@ -219,6 +219,7 @@ export const exporterclient_export_cxf: (
|
|
|
219
219
|
) => void;
|
|
220
220
|
export const exporterclient_import_cxf: (a: number, b: number, c: number, d: number) => void;
|
|
221
221
|
export const isExportError: (a: number) => number;
|
|
222
|
+
export const __wbg_generatorclient_free: (a: number, b: number) => void;
|
|
222
223
|
export const generatorclient_password: (a: number, b: number, c: number) => void;
|
|
223
224
|
export const generatorclient_passphrase: (a: number, b: number, c: number) => void;
|
|
224
225
|
export const isUsernameError: (a: number) => number;
|
|
@@ -288,6 +289,13 @@ export const attachmentsclient_decrypt_buffer: (
|
|
|
288
289
|
f: number,
|
|
289
290
|
) => void;
|
|
290
291
|
export const ciphersclient_encrypt: (a: number, b: number, c: number) => void;
|
|
292
|
+
export const ciphersclient_encrypt_cipher_for_rotation: (
|
|
293
|
+
a: number,
|
|
294
|
+
b: number,
|
|
295
|
+
c: number,
|
|
296
|
+
d: number,
|
|
297
|
+
e: number,
|
|
298
|
+
) => void;
|
|
291
299
|
export const ciphersclient_decrypt: (a: number, b: number, c: number) => void;
|
|
292
300
|
export const ciphersclient_decrypt_list: (a: number, b: number, c: number, d: number) => void;
|
|
293
301
|
export const ciphersclient_decrypt_list_with_failures: (a: number, b: number, c: number) => number;
|
|
@@ -351,7 +359,6 @@ export const __wbg_totpclient_free: (a: number, b: number) => void;
|
|
|
351
359
|
export const __wbg_get_outgoingmessage_destination: (a: number) => number;
|
|
352
360
|
export const __wbg_set_outgoingmessage_destination: (a: number, b: number) => void;
|
|
353
361
|
export const __wbg_cryptoclient_free: (a: number, b: number) => void;
|
|
354
|
-
export const __wbg_generatorclient_free: (a: number, b: number) => void;
|
|
355
362
|
export const __wbindgen_malloc: (a: number, b: number) => number;
|
|
356
363
|
export const __wbindgen_realloc: (a: number, b: number, c: number, d: number) => number;
|
|
357
364
|
export const __wbindgen_exn_store: (a: number) => void;
|