@bitwarden/sdk-internal 0.2.0-main.220 → 0.2.0-main.222
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 +53 -0
- package/bitwarden_wasm_internal_bg.js +54 -20
- package/bitwarden_wasm_internal_bg.wasm +0 -0
- package/bitwarden_wasm_internal_bg.wasm.d.ts +7 -0
- package/bitwarden_wasm_internal_bg.wasm.js +1 -1
- package/node/bitwarden_wasm_internal.d.ts +53 -0
- package/node/bitwarden_wasm_internal.js +54 -20
- package/node/bitwarden_wasm_internal_bg.wasm +0 -0
- package/node/bitwarden_wasm_internal_bg.wasm.d.ts +7 -0
- package/package.json +1 -1
package/VERSION
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
8423a4c2715db0624cc6a6886046212d9cc73a9f
|
|
@@ -290,6 +290,32 @@ export interface MakeUserSigningKeysResponse {
|
|
|
290
290
|
signedPublicKey: SignedPublicKey;
|
|
291
291
|
}
|
|
292
292
|
|
|
293
|
+
/**
|
|
294
|
+
* A rotated set of account keys for a user
|
|
295
|
+
*/
|
|
296
|
+
export interface RotateUserKeysResponse {
|
|
297
|
+
/**
|
|
298
|
+
* The verifying key
|
|
299
|
+
*/
|
|
300
|
+
verifyingKey: string;
|
|
301
|
+
/**
|
|
302
|
+
* Signing key, encrypted with a symmetric key (user key, org key)
|
|
303
|
+
*/
|
|
304
|
+
signingKey: EncString;
|
|
305
|
+
/**
|
|
306
|
+
* The user\'s public key, signed by the signing key
|
|
307
|
+
*/
|
|
308
|
+
signedPublicKey: string;
|
|
309
|
+
/**
|
|
310
|
+
* The user\'s public key, without signature
|
|
311
|
+
*/
|
|
312
|
+
publicKey: string;
|
|
313
|
+
/**
|
|
314
|
+
* The user\'s private key, encrypted with the user key
|
|
315
|
+
*/
|
|
316
|
+
privateKey: EncString;
|
|
317
|
+
}
|
|
318
|
+
|
|
293
319
|
/**
|
|
294
320
|
* NewType wrapper for `OrganizationId`
|
|
295
321
|
*/
|
|
@@ -809,6 +835,24 @@ export interface CipherListView {
|
|
|
809
835
|
localData: LocalDataView | undefined;
|
|
810
836
|
}
|
|
811
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
|
+
|
|
812
856
|
export interface Field {
|
|
813
857
|
name: EncString | undefined;
|
|
814
858
|
value: EncString | undefined;
|
|
@@ -1236,6 +1280,11 @@ export class CiphersClient {
|
|
|
1236
1280
|
encrypt(cipher_view: CipherView): EncryptionContext;
|
|
1237
1281
|
decrypt(cipher: Cipher): CipherView;
|
|
1238
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;
|
|
1239
1288
|
decrypt_fido2_credentials(cipher_view: CipherView): Fido2CredentialView[];
|
|
1240
1289
|
move_to_organization(cipher_view: CipherView, organization_id: OrganizationId): CipherView;
|
|
1241
1290
|
decrypt_fido2_private_key(cipher_view: CipherView): string;
|
|
@@ -1271,6 +1320,10 @@ export class CryptoClient {
|
|
|
1271
1320
|
* Makes a new signing key pair and signs the public key for the user
|
|
1272
1321
|
*/
|
|
1273
1322
|
make_user_signing_keys_for_enrollment(): MakeUserSigningKeysResponse;
|
|
1323
|
+
/**
|
|
1324
|
+
* Creates a rotated set of account keys for the current state
|
|
1325
|
+
*/
|
|
1326
|
+
get_v2_rotated_account_keys(user_key: string): RotateUserKeysResponse;
|
|
1274
1327
|
}
|
|
1275
1328
|
export class ExporterClient {
|
|
1276
1329
|
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_278(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[]}
|
|
@@ -1396,6 +1408,28 @@ export class CryptoClient {
|
|
|
1396
1408
|
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
1397
1409
|
}
|
|
1398
1410
|
}
|
|
1411
|
+
/**
|
|
1412
|
+
* Creates a rotated set of account keys for the current state
|
|
1413
|
+
* @param {string} user_key
|
|
1414
|
+
* @returns {RotateUserKeysResponse}
|
|
1415
|
+
*/
|
|
1416
|
+
get_v2_rotated_account_keys(user_key) {
|
|
1417
|
+
try {
|
|
1418
|
+
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
1419
|
+
const ptr0 = passStringToWasm0(user_key, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
1420
|
+
const len0 = WASM_VECTOR_LEN;
|
|
1421
|
+
wasm.cryptoclient_get_v2_rotated_account_keys(retptr, this.__wbg_ptr, ptr0, len0);
|
|
1422
|
+
var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
|
|
1423
|
+
var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
|
|
1424
|
+
var r2 = getDataViewMemory0().getInt32(retptr + 4 * 2, true);
|
|
1425
|
+
if (r2) {
|
|
1426
|
+
throw takeObject(r1);
|
|
1427
|
+
}
|
|
1428
|
+
return takeObject(r0);
|
|
1429
|
+
} finally {
|
|
1430
|
+
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
1431
|
+
}
|
|
1432
|
+
}
|
|
1399
1433
|
}
|
|
1400
1434
|
|
|
1401
1435
|
const ExporterClientFinalization =
|
|
@@ -3313,14 +3347,7 @@ export function __wbg_getTime_46267b1c24877e30(arg0) {
|
|
|
3313
3347
|
return ret;
|
|
3314
3348
|
}
|
|
3315
3349
|
|
|
3316
|
-
export function
|
|
3317
|
-
return handleError(function (arg0, arg1) {
|
|
3318
|
-
const ret = Reflect.get(getObject(arg0), getObject(arg1));
|
|
3319
|
-
return addHeapObject(ret);
|
|
3320
|
-
}, arguments);
|
|
3321
|
-
}
|
|
3322
|
-
|
|
3323
|
-
export function __wbg_get_a3863a1264cebac2() {
|
|
3350
|
+
export function __wbg_get_19ade86a11be7465() {
|
|
3324
3351
|
return handleError(function (arg0, arg1, arg2) {
|
|
3325
3352
|
let deferred0_0;
|
|
3326
3353
|
let deferred0_1;
|
|
@@ -3335,12 +3362,19 @@ export function __wbg_get_a3863a1264cebac2() {
|
|
|
3335
3362
|
}, arguments);
|
|
3336
3363
|
}
|
|
3337
3364
|
|
|
3365
|
+
export function __wbg_get_67b2ba62fc30de12() {
|
|
3366
|
+
return handleError(function (arg0, arg1) {
|
|
3367
|
+
const ret = Reflect.get(getObject(arg0), getObject(arg1));
|
|
3368
|
+
return addHeapObject(ret);
|
|
3369
|
+
}, arguments);
|
|
3370
|
+
}
|
|
3371
|
+
|
|
3338
3372
|
export function __wbg_get_b9b93047fe3cf45b(arg0, arg1) {
|
|
3339
3373
|
const ret = getObject(arg0)[arg1 >>> 0];
|
|
3340
3374
|
return addHeapObject(ret);
|
|
3341
3375
|
}
|
|
3342
3376
|
|
|
3343
|
-
export function
|
|
3377
|
+
export function __wbg_getaccesstoken_6f28f7da38d99e02(arg0) {
|
|
3344
3378
|
const ret = getObject(arg0).get_access_token();
|
|
3345
3379
|
return addHeapObject(ret);
|
|
3346
3380
|
}
|
|
@@ -3445,7 +3479,7 @@ export function __wbg_length_e2d2a49132c1b256(arg0) {
|
|
|
3445
3479
|
return ret;
|
|
3446
3480
|
}
|
|
3447
3481
|
|
|
3448
|
-
export function
|
|
3482
|
+
export function __wbg_list_405a6847e8a91187() {
|
|
3449
3483
|
return handleError(function (arg0) {
|
|
3450
3484
|
const ret = getObject(arg0).list();
|
|
3451
3485
|
return addHeapObject(ret);
|
|
@@ -3480,7 +3514,7 @@ export function __wbg_new_23a2665fac83c611(arg0, arg1) {
|
|
|
3480
3514
|
const a = state0.a;
|
|
3481
3515
|
state0.a = 0;
|
|
3482
3516
|
try {
|
|
3483
|
-
return
|
|
3517
|
+
return __wbg_adapter_278(a, state0.b, arg0, arg1);
|
|
3484
3518
|
} finally {
|
|
3485
3519
|
state0.a = a;
|
|
3486
3520
|
}
|
|
@@ -3622,7 +3656,7 @@ export function __wbg_randomFillSync_ac0988aba3254290() {
|
|
|
3622
3656
|
}, arguments);
|
|
3623
3657
|
}
|
|
3624
3658
|
|
|
3625
|
-
export function
|
|
3659
|
+
export function __wbg_remove_bb17db1971104c99() {
|
|
3626
3660
|
return handleError(function (arg0, arg1, arg2) {
|
|
3627
3661
|
let deferred0_0;
|
|
3628
3662
|
let deferred0_1;
|
|
@@ -3673,7 +3707,7 @@ export function __wbg_set_65595bdd868b3009(arg0, arg1, arg2) {
|
|
|
3673
3707
|
getObject(arg0).set(getObject(arg1), arg2 >>> 0);
|
|
3674
3708
|
}
|
|
3675
3709
|
|
|
3676
|
-
export function
|
|
3710
|
+
export function __wbg_set_ff21587e2212f1ae() {
|
|
3677
3711
|
return handleError(function (arg0, arg1, arg2, arg3) {
|
|
3678
3712
|
let deferred0_0;
|
|
3679
3713
|
let deferred0_1;
|
|
@@ -3867,18 +3901,18 @@ export function __wbindgen_cb_drop(arg0) {
|
|
|
3867
3901
|
return ret;
|
|
3868
3902
|
}
|
|
3869
3903
|
|
|
3870
|
-
export function
|
|
3871
|
-
const ret = makeMutClosure(arg0, arg1,
|
|
3904
|
+
export function __wbindgen_closure_wrapper2905(arg0, arg1, arg2) {
|
|
3905
|
+
const ret = makeMutClosure(arg0, arg1, 919, __wbg_adapter_50);
|
|
3872
3906
|
return addHeapObject(ret);
|
|
3873
3907
|
}
|
|
3874
3908
|
|
|
3875
|
-
export function
|
|
3876
|
-
const ret = makeMutClosure(arg0, arg1,
|
|
3909
|
+
export function __wbindgen_closure_wrapper3745(arg0, arg1, arg2) {
|
|
3910
|
+
const ret = makeMutClosure(arg0, arg1, 1003, __wbg_adapter_53);
|
|
3877
3911
|
return addHeapObject(ret);
|
|
3878
3912
|
}
|
|
3879
3913
|
|
|
3880
|
-
export function
|
|
3881
|
-
const ret = makeMutClosure(arg0, arg1,
|
|
3914
|
+
export function __wbindgen_closure_wrapper4163(arg0, arg1, arg2) {
|
|
3915
|
+
const ret = makeMutClosure(arg0, arg1, 1126, __wbg_adapter_56);
|
|
3882
3916
|
return addHeapObject(ret);
|
|
3883
3917
|
}
|
|
3884
3918
|
|
|
Binary file
|
|
@@ -7,6 +7,12 @@ export const cryptoclient_initialize_org_crypto: (a: number, b: number) => numbe
|
|
|
7
7
|
export const cryptoclient_make_key_pair: (a: number, b: number, c: number, d: number) => void;
|
|
8
8
|
export const cryptoclient_verify_asymmetric_keys: (a: number, b: number, c: number) => void;
|
|
9
9
|
export const cryptoclient_make_user_signing_keys_for_enrollment: (a: number, b: number) => void;
|
|
10
|
+
export const cryptoclient_get_v2_rotated_account_keys: (
|
|
11
|
+
a: number,
|
|
12
|
+
b: number,
|
|
13
|
+
c: number,
|
|
14
|
+
d: number,
|
|
15
|
+
) => void;
|
|
10
16
|
export const isDeriveKeyConnectorError: (a: number) => number;
|
|
11
17
|
export const isEnrollAdminPasswordResetError: (a: number) => number;
|
|
12
18
|
export const isCryptoClientError: (a: number) => number;
|
|
@@ -114,6 +120,7 @@ export const attachmentsclient_decrypt_buffer: (
|
|
|
114
120
|
export const ciphersclient_encrypt: (a: number, b: number, c: number) => void;
|
|
115
121
|
export const ciphersclient_decrypt: (a: number, b: number, c: number) => void;
|
|
116
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;
|
|
117
124
|
export const ciphersclient_decrypt_fido2_credentials: (a: number, b: number, c: number) => void;
|
|
118
125
|
export const ciphersclient_move_to_organization: (
|
|
119
126
|
a: number,
|