@bitwarden/sdk-internal 0.2.0-main.200 → 0.2.0-main.201
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 +74 -0
- package/bitwarden_wasm_internal_bg.js +50 -9
- package/bitwarden_wasm_internal_bg.wasm +0 -0
- package/bitwarden_wasm_internal_bg.wasm.d.ts +8 -5
- package/bitwarden_wasm_internal_bg.wasm.js +1 -1
- package/node/bitwarden_wasm_internal.d.ts +74 -0
- package/node/bitwarden_wasm_internal.js +50 -9
- package/node/bitwarden_wasm_internal_bg.wasm +0 -0
- package/node/bitwarden_wasm_internal_bg.wasm.d.ts +8 -5
- package/package.json +1 -1
package/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
|
1
|
+
0e948af85dd51dec72fad210a896b64fe4604a52
|
@@ -157,6 +157,56 @@ export interface InitOrgCryptoRequest {
|
|
157
157
|
organizationKeys: Map<Uuid, UnsignedSharedKey>;
|
158
158
|
}
|
159
159
|
|
160
|
+
/**
|
161
|
+
* Response from the `update_password` function
|
162
|
+
*/
|
163
|
+
export interface UpdatePasswordResponse {
|
164
|
+
/**
|
165
|
+
* Hash of the new password
|
166
|
+
*/
|
167
|
+
passwordHash: string;
|
168
|
+
/**
|
169
|
+
* User key, encrypted with the new password
|
170
|
+
*/
|
171
|
+
newKey: EncString;
|
172
|
+
}
|
173
|
+
|
174
|
+
/**
|
175
|
+
* Request for deriving a pin protected user key
|
176
|
+
*/
|
177
|
+
export interface DerivePinKeyResponse {
|
178
|
+
/**
|
179
|
+
* [UserKey] protected by PIN
|
180
|
+
*/
|
181
|
+
pinProtectedUserKey: EncString;
|
182
|
+
/**
|
183
|
+
* PIN protected by [UserKey]
|
184
|
+
*/
|
185
|
+
encryptedPin: EncString;
|
186
|
+
}
|
187
|
+
|
188
|
+
/**
|
189
|
+
* Request for migrating an account from password to key connector.
|
190
|
+
*/
|
191
|
+
export interface DeriveKeyConnectorRequest {
|
192
|
+
/**
|
193
|
+
* Encrypted user key, used to validate the master key
|
194
|
+
*/
|
195
|
+
userKeyEncrypted: EncString;
|
196
|
+
/**
|
197
|
+
* The user\'s master password
|
198
|
+
*/
|
199
|
+
password: string;
|
200
|
+
/**
|
201
|
+
* The KDF parameters used to derive the master key
|
202
|
+
*/
|
203
|
+
kdf: Kdf;
|
204
|
+
/**
|
205
|
+
* The user\'s email address
|
206
|
+
*/
|
207
|
+
email: string;
|
208
|
+
}
|
209
|
+
|
160
210
|
/**
|
161
211
|
* Response from the `make_key_pair` function
|
162
212
|
*/
|
@@ -208,6 +258,27 @@ export interface VerifyAsymmetricKeysResponse {
|
|
208
258
|
*/
|
209
259
|
export type OrganizationId = Tagged<Uuid, "OrganizationId">;
|
210
260
|
|
261
|
+
export interface DeriveKeyConnectorError extends Error {
|
262
|
+
name: "DeriveKeyConnectorError";
|
263
|
+
variant: "WrongPassword" | "Crypto";
|
264
|
+
}
|
265
|
+
|
266
|
+
export function isDeriveKeyConnectorError(error: any): error is DeriveKeyConnectorError;
|
267
|
+
|
268
|
+
export interface EnrollAdminPasswordResetError extends Error {
|
269
|
+
name: "EnrollAdminPasswordResetError";
|
270
|
+
variant: "VaultLocked" | "Crypto" | "InvalidBase64";
|
271
|
+
}
|
272
|
+
|
273
|
+
export function isEnrollAdminPasswordResetError(error: any): error is EnrollAdminPasswordResetError;
|
274
|
+
|
275
|
+
export interface CryptoClientError extends Error {
|
276
|
+
name: "CryptoClientError";
|
277
|
+
variant: "NotAuthenticated" | "VaultLocked" | "Crypto";
|
278
|
+
}
|
279
|
+
|
280
|
+
export function isCryptoClientError(error: any): error is CryptoClientError;
|
281
|
+
|
211
282
|
export interface EncryptionSettingsError extends Error {
|
212
283
|
name: "EncryptionSettingsError";
|
213
284
|
variant:
|
@@ -1069,6 +1140,9 @@ export class CiphersClient {
|
|
1069
1140
|
move_to_organization(cipher_view: CipherView, organization_id: OrganizationId): CipherView;
|
1070
1141
|
decrypt_fido2_private_key(cipher_view: CipherView): string;
|
1071
1142
|
}
|
1143
|
+
/**
|
1144
|
+
* A client for the crypto operations.
|
1145
|
+
*/
|
1072
1146
|
export class CryptoClient {
|
1073
1147
|
private constructor();
|
1074
1148
|
free(): void;
|
@@ -251,6 +251,45 @@ function addBorrowedObject(obj) {
|
|
251
251
|
heap[--stack_pointer] = obj;
|
252
252
|
return stack_pointer;
|
253
253
|
}
|
254
|
+
/**
|
255
|
+
* @param {any} error
|
256
|
+
* @returns {boolean}
|
257
|
+
*/
|
258
|
+
export function isDeriveKeyConnectorError(error) {
|
259
|
+
try {
|
260
|
+
const ret = wasm.isDeriveKeyConnectorError(addBorrowedObject(error));
|
261
|
+
return ret !== 0;
|
262
|
+
} finally {
|
263
|
+
heap[stack_pointer++] = undefined;
|
264
|
+
}
|
265
|
+
}
|
266
|
+
|
267
|
+
/**
|
268
|
+
* @param {any} error
|
269
|
+
* @returns {boolean}
|
270
|
+
*/
|
271
|
+
export function isEnrollAdminPasswordResetError(error) {
|
272
|
+
try {
|
273
|
+
const ret = wasm.isEnrollAdminPasswordResetError(addBorrowedObject(error));
|
274
|
+
return ret !== 0;
|
275
|
+
} finally {
|
276
|
+
heap[stack_pointer++] = undefined;
|
277
|
+
}
|
278
|
+
}
|
279
|
+
|
280
|
+
/**
|
281
|
+
* @param {any} error
|
282
|
+
* @returns {boolean}
|
283
|
+
*/
|
284
|
+
export function isCryptoClientError(error) {
|
285
|
+
try {
|
286
|
+
const ret = wasm.isCryptoClientError(addBorrowedObject(error));
|
287
|
+
return ret !== 0;
|
288
|
+
} finally {
|
289
|
+
heap[stack_pointer++] = undefined;
|
290
|
+
}
|
291
|
+
}
|
292
|
+
|
254
293
|
/**
|
255
294
|
* @param {any} error
|
256
295
|
* @returns {boolean}
|
@@ -672,7 +711,7 @@ function __wbg_adapter_56(arg0, arg1, arg2) {
|
|
672
711
|
);
|
673
712
|
}
|
674
713
|
|
675
|
-
function
|
714
|
+
function __wbg_adapter_256(arg0, arg1, arg2, arg3) {
|
676
715
|
wasm.wasm_bindgen__convert__closures__invoke2_mut__h334034c47a371f71(
|
677
716
|
arg0,
|
678
717
|
arg1,
|
@@ -1196,7 +1235,9 @@ const CryptoClientFinalization =
|
|
1196
1235
|
typeof FinalizationRegistry === "undefined"
|
1197
1236
|
? { register: () => {}, unregister: () => {} }
|
1198
1237
|
: new FinalizationRegistry((ptr) => wasm.__wbg_cryptoclient_free(ptr >>> 0, 1));
|
1199
|
-
|
1238
|
+
/**
|
1239
|
+
* A client for the crypto operations.
|
1240
|
+
*/
|
1200
1241
|
export class CryptoClient {
|
1201
1242
|
static __wrap(ptr) {
|
1202
1243
|
ptr = ptr >>> 0;
|
@@ -3189,7 +3230,7 @@ export function __wbg_new_23a2665fac83c611(arg0, arg1) {
|
|
3189
3230
|
const a = state0.a;
|
3190
3231
|
state0.a = 0;
|
3191
3232
|
try {
|
3192
|
-
return
|
3233
|
+
return __wbg_adapter_256(a, state0.b, arg0, arg1);
|
3193
3234
|
} finally {
|
3194
3235
|
state0.a = a;
|
3195
3236
|
}
|
@@ -3546,18 +3587,18 @@ export function __wbindgen_cb_drop(arg0) {
|
|
3546
3587
|
return ret;
|
3547
3588
|
}
|
3548
3589
|
|
3549
|
-
export function
|
3550
|
-
const ret = makeMutClosure(arg0, arg1,
|
3590
|
+
export function __wbindgen_closure_wrapper2339(arg0, arg1, arg2) {
|
3591
|
+
const ret = makeMutClosure(arg0, arg1, 669, __wbg_adapter_50);
|
3551
3592
|
return addHeapObject(ret);
|
3552
3593
|
}
|
3553
3594
|
|
3554
|
-
export function
|
3555
|
-
const ret = makeMutClosure(arg0, arg1,
|
3595
|
+
export function __wbindgen_closure_wrapper3178(arg0, arg1, arg2) {
|
3596
|
+
const ret = makeMutClosure(arg0, arg1, 753, __wbg_adapter_53);
|
3556
3597
|
return addHeapObject(ret);
|
3557
3598
|
}
|
3558
3599
|
|
3559
|
-
export function
|
3560
|
-
const ret = makeMutClosure(arg0, arg1,
|
3600
|
+
export function __wbindgen_closure_wrapper3588(arg0, arg1, arg2) {
|
3601
|
+
const ret = makeMutClosure(arg0, arg1, 875, __wbg_adapter_56);
|
3561
3602
|
return addHeapObject(ret);
|
3562
3603
|
}
|
3563
3604
|
|
Binary file
|
@@ -1,6 +1,14 @@
|
|
1
1
|
/* tslint:disable */
|
2
2
|
/* eslint-disable */
|
3
3
|
export const memory: WebAssembly.Memory;
|
4
|
+
export const __wbg_cryptoclient_free: (a: number, b: number) => void;
|
5
|
+
export const cryptoclient_initialize_user_crypto: (a: number, b: number) => number;
|
6
|
+
export const cryptoclient_initialize_org_crypto: (a: number, b: number) => number;
|
7
|
+
export const cryptoclient_make_key_pair: (a: number, b: number, c: number, d: number) => void;
|
8
|
+
export const cryptoclient_verify_asymmetric_keys: (a: number, b: number, c: number) => void;
|
9
|
+
export const isDeriveKeyConnectorError: (a: number) => number;
|
10
|
+
export const isEnrollAdminPasswordResetError: (a: number) => number;
|
11
|
+
export const isCryptoClientError: (a: number) => number;
|
4
12
|
export const isEncryptionSettingsError: (a: number) => number;
|
5
13
|
export const isCryptoError: (a: number) => number;
|
6
14
|
export const __wbg_exporterclient_free: (a: number, b: number) => void;
|
@@ -142,11 +150,6 @@ export const bitwardenclient_version: (a: number, b: number) => void;
|
|
142
150
|
export const bitwardenclient_throw: (a: number, b: number, c: number, d: number) => void;
|
143
151
|
export const bitwardenclient_http_get: (a: number, b: number, c: number) => number;
|
144
152
|
export const bitwardenclient_crypto: (a: number) => number;
|
145
|
-
export const __wbg_cryptoclient_free: (a: number, b: number) => void;
|
146
|
-
export const cryptoclient_initialize_user_crypto: (a: number, b: number) => number;
|
147
|
-
export const cryptoclient_initialize_org_crypto: (a: number, b: number) => number;
|
148
|
-
export const cryptoclient_make_key_pair: (a: number, b: number, c: number, d: number) => void;
|
149
|
-
export const cryptoclient_verify_asymmetric_keys: (a: number, b: number, c: number) => void;
|
150
153
|
export const set_log_level: (a: number) => void;
|
151
154
|
export const init_sdk: (a: number) => void;
|
152
155
|
export const __wbg_purecrypto_free: (a: number, b: number) => void;
|