@bitwarden/sdk-internal 0.2.0-main.515 → 0.2.0-main.516
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 +561 -561
- package/bitwarden_wasm_internal_bg.js +73 -73
- package/bitwarden_wasm_internal_bg.wasm +0 -0
- package/bitwarden_wasm_internal_bg.wasm.d.ts +4 -4
- package/bitwarden_wasm_internal_bg.wasm.js +1 -1
- package/node/bitwarden_wasm_internal.d.ts +561 -561
- package/node/bitwarden_wasm_internal.js +77 -77
- package/node/bitwarden_wasm_internal_bg.wasm +0 -0
- package/node/bitwarden_wasm_internal_bg.wasm.d.ts +7 -7
- package/package.json +1 -1
|
@@ -257,21 +257,31 @@ function passArray8ToWasm0(arg, malloc) {
|
|
|
257
257
|
return ptr;
|
|
258
258
|
}
|
|
259
259
|
/**
|
|
260
|
-
*
|
|
260
|
+
* Convert a PCKS8 or OpenSSH encrypted or unencrypted private key
|
|
261
|
+
* to an OpenSSH private key with public key and fingerprint
|
|
261
262
|
*
|
|
262
263
|
* # Arguments
|
|
263
|
-
* - `
|
|
264
|
+
* - `imported_key` - The private key to convert
|
|
265
|
+
* - `password` - The password to use for decrypting the key
|
|
264
266
|
*
|
|
265
267
|
* # Returns
|
|
266
|
-
* - `Ok(SshKey)` if the key was successfully
|
|
267
|
-
* - `Err(
|
|
268
|
-
*
|
|
268
|
+
* - `Ok(SshKey)` if the key was successfully coneverted
|
|
269
|
+
* - `Err(PasswordRequired)` if the key is encrypted and no password was provided
|
|
270
|
+
* - `Err(WrongPassword)` if the password provided is incorrect
|
|
271
|
+
* - `Err(ParsingError)` if the key could not be parsed
|
|
272
|
+
* - `Err(UnsupportedKeyType)` if the key type is not supported
|
|
273
|
+
* @param {string} imported_key
|
|
274
|
+
* @param {string | null} [password]
|
|
269
275
|
* @returns {SshKeyView}
|
|
270
276
|
*/
|
|
271
|
-
export function
|
|
277
|
+
export function import_ssh_key(imported_key, password) {
|
|
272
278
|
try {
|
|
273
279
|
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
274
|
-
wasm.
|
|
280
|
+
const ptr0 = passStringToWasm0(imported_key, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
281
|
+
const len0 = WASM_VECTOR_LEN;
|
|
282
|
+
var ptr1 = isLikeNone(password) ? 0 : passStringToWasm0(password, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
283
|
+
var len1 = WASM_VECTOR_LEN;
|
|
284
|
+
wasm.import_ssh_key(retptr, ptr0, len0, ptr1, len1);
|
|
275
285
|
var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
|
|
276
286
|
var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
|
|
277
287
|
var r2 = getDataViewMemory0().getInt32(retptr + 4 * 2, true);
|
|
@@ -285,31 +295,21 @@ export function generate_ssh_key(key_algorithm) {
|
|
|
285
295
|
}
|
|
286
296
|
|
|
287
297
|
/**
|
|
288
|
-
*
|
|
289
|
-
* to an OpenSSH private key with public key and fingerprint
|
|
298
|
+
* Generate a new SSH key pair
|
|
290
299
|
*
|
|
291
300
|
* # Arguments
|
|
292
|
-
* - `
|
|
293
|
-
* - `password` - The password to use for decrypting the key
|
|
301
|
+
* - `key_algorithm` - The algorithm to use for the key pair
|
|
294
302
|
*
|
|
295
303
|
* # Returns
|
|
296
|
-
* - `Ok(SshKey)` if the key was successfully
|
|
297
|
-
* - `Err(
|
|
298
|
-
*
|
|
299
|
-
* - `Err(ParsingError)` if the key could not be parsed
|
|
300
|
-
* - `Err(UnsupportedKeyType)` if the key type is not supported
|
|
301
|
-
* @param {string} imported_key
|
|
302
|
-
* @param {string | null} [password]
|
|
304
|
+
* - `Ok(SshKey)` if the key was successfully generated
|
|
305
|
+
* - `Err(KeyGenerationError)` if the key could not be generated
|
|
306
|
+
* @param {KeyAlgorithm} key_algorithm
|
|
303
307
|
* @returns {SshKeyView}
|
|
304
308
|
*/
|
|
305
|
-
export function
|
|
309
|
+
export function generate_ssh_key(key_algorithm) {
|
|
306
310
|
try {
|
|
307
311
|
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
308
|
-
|
|
309
|
-
const len0 = WASM_VECTOR_LEN;
|
|
310
|
-
var ptr1 = isLikeNone(password) ? 0 : passStringToWasm0(password, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
311
|
-
var len1 = WASM_VECTOR_LEN;
|
|
312
|
-
wasm.import_ssh_key(retptr, ptr0, len0, ptr1, len1);
|
|
312
|
+
wasm.generate_ssh_key(retptr, addHeapObject(key_algorithm));
|
|
313
313
|
var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
|
|
314
314
|
var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
|
|
315
315
|
var r2 = getDataViewMemory0().getInt32(retptr + 4 * 2, true);
|
|
@@ -418,9 +418,9 @@ export function isAccountCryptographyInitializationError(error) {
|
|
|
418
418
|
* @param {any} error
|
|
419
419
|
* @returns {boolean}
|
|
420
420
|
*/
|
|
421
|
-
export function
|
|
421
|
+
export function isEnrollAdminPasswordResetError(error) {
|
|
422
422
|
try {
|
|
423
|
-
const ret = wasm.
|
|
423
|
+
const ret = wasm.isEnrollAdminPasswordResetError(addBorrowedObject(error));
|
|
424
424
|
return ret !== 0;
|
|
425
425
|
} finally {
|
|
426
426
|
heap[stack_pointer++] = undefined;
|
|
@@ -444,9 +444,9 @@ export function isCryptoClientError(error) {
|
|
|
444
444
|
* @param {any} error
|
|
445
445
|
* @returns {boolean}
|
|
446
446
|
*/
|
|
447
|
-
export function
|
|
447
|
+
export function isMakeKeysError(error) {
|
|
448
448
|
try {
|
|
449
|
-
const ret = wasm.
|
|
449
|
+
const ret = wasm.isMakeKeysError(addBorrowedObject(error));
|
|
450
450
|
return ret !== 0;
|
|
451
451
|
} finally {
|
|
452
452
|
heap[stack_pointer++] = undefined;
|
|
@@ -678,9 +678,9 @@ export function isServerCommunicationConfigRepositoryError(error) {
|
|
|
678
678
|
* @param {any} error
|
|
679
679
|
* @returns {boolean}
|
|
680
680
|
*/
|
|
681
|
-
export function
|
|
681
|
+
export function isSshKeyExportError(error) {
|
|
682
682
|
try {
|
|
683
|
-
const ret = wasm.
|
|
683
|
+
const ret = wasm.isSshKeyExportError(addBorrowedObject(error));
|
|
684
684
|
return ret !== 0;
|
|
685
685
|
} finally {
|
|
686
686
|
heap[stack_pointer++] = undefined;
|
|
@@ -691,9 +691,9 @@ export function isSshKeyImportError(error) {
|
|
|
691
691
|
* @param {any} error
|
|
692
692
|
* @returns {boolean}
|
|
693
693
|
*/
|
|
694
|
-
export function
|
|
694
|
+
export function isSshKeyImportError(error) {
|
|
695
695
|
try {
|
|
696
|
-
const ret = wasm.
|
|
696
|
+
const ret = wasm.isSshKeyImportError(addBorrowedObject(error));
|
|
697
697
|
return ret !== 0;
|
|
698
698
|
} finally {
|
|
699
699
|
heap[stack_pointer++] = undefined;
|
|
@@ -782,9 +782,9 @@ export function isTotpError(error) {
|
|
|
782
782
|
* @param {any} error
|
|
783
783
|
* @returns {boolean}
|
|
784
784
|
*/
|
|
785
|
-
export function
|
|
785
|
+
export function isEncryptError(error) {
|
|
786
786
|
try {
|
|
787
|
-
const ret = wasm.
|
|
787
|
+
const ret = wasm.isEncryptError(addBorrowedObject(error));
|
|
788
788
|
return ret !== 0;
|
|
789
789
|
} finally {
|
|
790
790
|
heap[stack_pointer++] = undefined;
|
|
@@ -795,9 +795,9 @@ export function isDecryptError(error) {
|
|
|
795
795
|
* @param {any} error
|
|
796
796
|
* @returns {boolean}
|
|
797
797
|
*/
|
|
798
|
-
export function
|
|
798
|
+
export function isDecryptError(error) {
|
|
799
799
|
try {
|
|
800
|
-
const ret = wasm.
|
|
800
|
+
const ret = wasm.isDecryptError(addBorrowedObject(error));
|
|
801
801
|
return ret !== 0;
|
|
802
802
|
} finally {
|
|
803
803
|
heap[stack_pointer++] = undefined;
|
|
@@ -938,9 +938,9 @@ export function isRestoreCipherError(error) {
|
|
|
938
938
|
* @param {any} error
|
|
939
939
|
* @returns {boolean}
|
|
940
940
|
*/
|
|
941
|
-
export function
|
|
941
|
+
export function isDecryptFileError(error) {
|
|
942
942
|
try {
|
|
943
|
-
const ret = wasm.
|
|
943
|
+
const ret = wasm.isDecryptFileError(addBorrowedObject(error));
|
|
944
944
|
return ret !== 0;
|
|
945
945
|
} finally {
|
|
946
946
|
heap[stack_pointer++] = undefined;
|
|
@@ -951,9 +951,9 @@ export function isEncryptFileError(error) {
|
|
|
951
951
|
* @param {any} error
|
|
952
952
|
* @returns {boolean}
|
|
953
953
|
*/
|
|
954
|
-
export function
|
|
954
|
+
export function isEncryptFileError(error) {
|
|
955
955
|
try {
|
|
956
|
-
const ret = wasm.
|
|
956
|
+
const ret = wasm.isEncryptFileError(addBorrowedObject(error));
|
|
957
957
|
return ret !== 0;
|
|
958
958
|
} finally {
|
|
959
959
|
heap[stack_pointer++] = undefined;
|
|
@@ -1020,10 +1020,10 @@ function wasm_bindgen__convert__closures_____invoke__h7e690d71e18a977f(arg0, arg
|
|
|
1020
1020
|
wasm.wasm_bindgen__convert__closures_____invoke__h7e690d71e18a977f(arg0, arg1, addHeapObject(arg2));
|
|
1021
1021
|
}
|
|
1022
1022
|
|
|
1023
|
-
function
|
|
1023
|
+
function wasm_bindgen__convert__closures_____invoke__h7cff7b1aea3a3d32(arg0, arg1, arg2) {
|
|
1024
1024
|
try {
|
|
1025
1025
|
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
1026
|
-
wasm.
|
|
1026
|
+
wasm.wasm_bindgen__convert__closures_____invoke__h7cff7b1aea3a3d32(retptr, arg0, arg1, addHeapObject(arg2));
|
|
1027
1027
|
var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
|
|
1028
1028
|
var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
|
|
1029
1029
|
if (r1) {
|
|
@@ -4874,7 +4874,7 @@ export function __wbg_call_e762c39fa8ea36bf() { return handleError(function (arg
|
|
|
4874
4874
|
return addHeapObject(ret);
|
|
4875
4875
|
}, arguments) };
|
|
4876
4876
|
|
|
4877
|
-
export function
|
|
4877
|
+
export function __wbg_cipher_b060c518cfd6941f(arg0) {
|
|
4878
4878
|
const ret = getObject(arg0).cipher;
|
|
4879
4879
|
return isLikeNone(ret) ? 0 : addHeapObject(ret);
|
|
4880
4880
|
};
|
|
@@ -4966,7 +4966,7 @@ export function __wbg_fetch_f8ba0e29a9d6de0d(arg0, arg1) {
|
|
|
4966
4966
|
return addHeapObject(ret);
|
|
4967
4967
|
};
|
|
4968
4968
|
|
|
4969
|
-
export function
|
|
4969
|
+
export function __wbg_folder_648732d89f553367(arg0) {
|
|
4970
4970
|
const ret = getObject(arg0).folder;
|
|
4971
4971
|
return isLikeNone(ret) ? 0 : addHeapObject(ret);
|
|
4972
4972
|
};
|
|
@@ -4998,12 +4998,7 @@ export function __wbg_getTime_14776bfb48a1bff9(arg0) {
|
|
|
4998
4998
|
return ret;
|
|
4999
4999
|
};
|
|
5000
5000
|
|
|
5001
|
-
export function
|
|
5002
|
-
const ret = getObject(arg0)[arg1 >>> 0];
|
|
5003
|
-
return addHeapObject(ret);
|
|
5004
|
-
};
|
|
5005
|
-
|
|
5006
|
-
export function __wbg_get_9117d735c52b9982() { return handleError(function (arg0, arg1, arg2) {
|
|
5001
|
+
export function __wbg_get_41936b73441d6c1c() { return handleError(function (arg0, arg1, arg2) {
|
|
5007
5002
|
let deferred0_0;
|
|
5008
5003
|
let deferred0_1;
|
|
5009
5004
|
try {
|
|
@@ -5016,12 +5011,17 @@ export function __wbg_get_9117d735c52b9982() { return handleError(function (arg0
|
|
|
5016
5011
|
}
|
|
5017
5012
|
}, arguments) };
|
|
5018
5013
|
|
|
5019
|
-
export function
|
|
5014
|
+
export function __wbg_get_7bed016f185add81(arg0, arg1) {
|
|
5015
|
+
const ret = getObject(arg0)[arg1 >>> 0];
|
|
5016
|
+
return addHeapObject(ret);
|
|
5017
|
+
};
|
|
5018
|
+
|
|
5019
|
+
export function __wbg_get_access_token_03c295c2dec7ab15(arg0) {
|
|
5020
5020
|
const ret = getObject(arg0).get_access_token();
|
|
5021
5021
|
return addHeapObject(ret);
|
|
5022
5022
|
};
|
|
5023
5023
|
|
|
5024
|
-
export function
|
|
5024
|
+
export function __wbg_get_af9d4d1ba44b4371() { return handleError(function (arg0, arg1, arg2) {
|
|
5025
5025
|
let deferred0_0;
|
|
5026
5026
|
let deferred0_1;
|
|
5027
5027
|
try {
|
|
@@ -5034,7 +5034,7 @@ export function __wbg_get_c03a59ff46a549dd() { return handleError(function (arg0
|
|
|
5034
5034
|
}
|
|
5035
5035
|
}, arguments) };
|
|
5036
5036
|
|
|
5037
|
-
export function
|
|
5037
|
+
export function __wbg_get_c03a59ff46a549dd() { return handleError(function (arg0, arg1, arg2) {
|
|
5038
5038
|
let deferred0_0;
|
|
5039
5039
|
let deferred0_1;
|
|
5040
5040
|
try {
|
|
@@ -5235,12 +5235,12 @@ export function __wbg_length_cdd215e10d9dd507(arg0) {
|
|
|
5235
5235
|
return ret;
|
|
5236
5236
|
};
|
|
5237
5237
|
|
|
5238
|
-
export function
|
|
5238
|
+
export function __wbg_list_01a7134772856677() { return handleError(function (arg0) {
|
|
5239
5239
|
const ret = getObject(arg0).list();
|
|
5240
5240
|
return addHeapObject(ret);
|
|
5241
5241
|
}, arguments) };
|
|
5242
5242
|
|
|
5243
|
-
export function
|
|
5243
|
+
export function __wbg_list_e498dbee8e0f8dbe() { return handleError(function (arg0) {
|
|
5244
5244
|
const ret = getObject(arg0).list();
|
|
5245
5245
|
return addHeapObject(ret);
|
|
5246
5246
|
}, arguments) };
|
|
@@ -5462,7 +5462,7 @@ export function __wbg_randomFillSync_ac0988aba3254290() { return handleError(fun
|
|
|
5462
5462
|
getObject(arg0).randomFillSync(takeObject(arg1));
|
|
5463
5463
|
}, arguments) };
|
|
5464
5464
|
|
|
5465
|
-
export function
|
|
5465
|
+
export function __wbg_remove_e30059d65cdf10bc() { return handleError(function (arg0, arg1, arg2) {
|
|
5466
5466
|
let deferred0_0;
|
|
5467
5467
|
let deferred0_1;
|
|
5468
5468
|
try {
|
|
@@ -5475,7 +5475,7 @@ export function __wbg_remove_072ab94eb38202a3() { return handleError(function (a
|
|
|
5475
5475
|
}
|
|
5476
5476
|
}, arguments) };
|
|
5477
5477
|
|
|
5478
|
-
export function
|
|
5478
|
+
export function __wbg_remove_feae4cdac56c54a3() { return handleError(function (arg0, arg1, arg2) {
|
|
5479
5479
|
let deferred0_0;
|
|
5480
5480
|
let deferred0_1;
|
|
5481
5481
|
try {
|
|
@@ -5517,7 +5517,7 @@ export function __wbg_set_3f1d0b984ed272ed(arg0, arg1, arg2) {
|
|
|
5517
5517
|
getObject(arg0)[takeObject(arg1)] = takeObject(arg2);
|
|
5518
5518
|
};
|
|
5519
5519
|
|
|
5520
|
-
export function
|
|
5520
|
+
export function __wbg_set_496160e645ad2880() { return handleError(function (arg0, arg1, arg2, arg3) {
|
|
5521
5521
|
let deferred0_0;
|
|
5522
5522
|
let deferred0_1;
|
|
5523
5523
|
try {
|
|
@@ -5535,6 +5535,19 @@ export function __wbg_set_907fb406c34a251d(arg0, arg1, arg2) {
|
|
|
5535
5535
|
return addHeapObject(ret);
|
|
5536
5536
|
};
|
|
5537
5537
|
|
|
5538
|
+
export function __wbg_set_ad376fca1dc2d534() { return handleError(function (arg0, arg1, arg2, arg3) {
|
|
5539
|
+
let deferred0_0;
|
|
5540
|
+
let deferred0_1;
|
|
5541
|
+
try {
|
|
5542
|
+
deferred0_0 = arg1;
|
|
5543
|
+
deferred0_1 = arg2;
|
|
5544
|
+
const ret = getObject(arg0).set(getStringFromWasm0(arg1, arg2), takeObject(arg3));
|
|
5545
|
+
return addHeapObject(ret);
|
|
5546
|
+
} finally {
|
|
5547
|
+
wasm.__wbindgen_free(deferred0_0, deferred0_1, 1);
|
|
5548
|
+
}
|
|
5549
|
+
}, arguments) };
|
|
5550
|
+
|
|
5538
5551
|
export function __wbg_set_body_3c365989753d61f4(arg0, arg1) {
|
|
5539
5552
|
getObject(arg0).body = getObject(arg1);
|
|
5540
5553
|
};
|
|
@@ -5552,19 +5565,6 @@ export function __wbg_set_credentials_f621cd2d85c0c228(arg0, arg1) {
|
|
|
5552
5565
|
getObject(arg0).credentials = __wbindgen_enum_RequestCredentials[arg1];
|
|
5553
5566
|
};
|
|
5554
5567
|
|
|
5555
|
-
export function __wbg_set_ed4dd75533a4c5ed() { return handleError(function (arg0, arg1, arg2, arg3) {
|
|
5556
|
-
let deferred0_0;
|
|
5557
|
-
let deferred0_1;
|
|
5558
|
-
try {
|
|
5559
|
-
deferred0_0 = arg1;
|
|
5560
|
-
deferred0_1 = arg2;
|
|
5561
|
-
const ret = getObject(arg0).set(getStringFromWasm0(arg1, arg2), takeObject(arg3));
|
|
5562
|
-
return addHeapObject(ret);
|
|
5563
|
-
} finally {
|
|
5564
|
-
wasm.__wbindgen_free(deferred0_0, deferred0_1, 1);
|
|
5565
|
-
}
|
|
5566
|
-
}, arguments) };
|
|
5567
|
-
|
|
5568
5568
|
export function __wbg_set_headers_6926da238cd32ee4(arg0, arg1) {
|
|
5569
5569
|
getObject(arg0).headers = getObject(arg1);
|
|
5570
5570
|
};
|
|
@@ -5738,7 +5738,7 @@ export function __wbindgen_cast_2241b6af4c4b2941(arg0, arg1) {
|
|
|
5738
5738
|
|
|
5739
5739
|
export function __wbindgen_cast_4042b341512ce63a(arg0, arg1) {
|
|
5740
5740
|
// Cast intrinsic for `Closure(Closure { dtor_idx: 41, function: Function { arguments: [NamedExternref("IDBVersionChangeEvent")], shim_idx: 44, ret: Unit, inner_ret: Some(Unit) }, mutable: true }) -> Externref`.
|
|
5741
|
-
const ret = makeMutClosure(arg0, arg1, wasm.
|
|
5741
|
+
const ret = makeMutClosure(arg0, arg1, wasm.wasm_bindgen__closure__destroy__h04502fa063387efa, wasm_bindgen__convert__closures_____invoke__h7e690d71e18a977f);
|
|
5742
5742
|
return addHeapObject(ret);
|
|
5743
5743
|
};
|
|
5744
5744
|
|
|
@@ -5796,7 +5796,7 @@ export function __wbindgen_cast_cb9088102bce6b30(arg0, arg1) {
|
|
|
5796
5796
|
|
|
5797
5797
|
export function __wbindgen_cast_d49c305f67640cb1(arg0, arg1) {
|
|
5798
5798
|
// Cast intrinsic for `Closure(Closure { dtor_idx: 41, function: Function { arguments: [NamedExternref("Event")], shim_idx: 42, ret: Result(Unit), inner_ret: Some(Result(Unit)) }, mutable: true }) -> Externref`.
|
|
5799
|
-
const ret = makeMutClosure(arg0, arg1, wasm.
|
|
5799
|
+
const ret = makeMutClosure(arg0, arg1, wasm.wasm_bindgen__closure__destroy__h04502fa063387efa, wasm_bindgen__convert__closures_____invoke__h7cff7b1aea3a3d32);
|
|
5800
5800
|
return addHeapObject(ret);
|
|
5801
5801
|
};
|
|
5802
5802
|
|
|
Binary file
|
|
@@ -532,15 +532,15 @@ export const wasm_bindgen__convert__closures_____invoke__h7e690d71e18a977f: (
|
|
|
532
532
|
b: number,
|
|
533
533
|
c: number,
|
|
534
534
|
) => void;
|
|
535
|
-
export const
|
|
536
|
-
export const
|
|
535
|
+
export const wasm_bindgen__closure__destroy__hc71695a401114797: (a: number, b: number) => void;
|
|
536
|
+
export const wasm_bindgen__convert__closures_____invoke__h7cff7b1aea3a3d32: (
|
|
537
537
|
a: number,
|
|
538
538
|
b: number,
|
|
539
539
|
c: number,
|
|
540
540
|
d: number,
|
|
541
541
|
) => void;
|
|
542
|
-
export const
|
|
543
|
-
export const
|
|
542
|
+
export const wasm_bindgen__closure__destroy__h04502fa063387efa: (a: number, b: number) => void;
|
|
543
|
+
export const wasm_bindgen__closure__destroy__hd9661b26d463effa: (a: number, b: number) => void;
|
|
544
544
|
export const wasm_bindgen__convert__closures_____invoke__h0c62e4f019080f6a: (
|
|
545
545
|
a: number,
|
|
546
546
|
b: number,
|