@bitwarden/commercial-sdk-internal 0.2.0-main.404 → 0.2.0-main.406
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/bitwarden_wasm_internal.d.ts +16 -0
- package/bitwarden_wasm_internal_bg.js +93 -50
- package/bitwarden_wasm_internal_bg.wasm +0 -0
- package/bitwarden_wasm_internal_bg.wasm.d.ts +9 -7
- package/bitwarden_wasm_internal_bg.wasm.js +1 -1
- package/node/bitwarden_wasm_internal.d.ts +16 -0
- package/node/bitwarden_wasm_internal.js +91 -46
- package/node/bitwarden_wasm_internal_bg.wasm +0 -0
- package/node/bitwarden_wasm_internal_bg.wasm.d.ts +7 -5
- package/package.json +1 -1
|
@@ -1836,6 +1836,10 @@ export class AuthClient {
|
|
|
1836
1836
|
* Client for send access functionality
|
|
1837
1837
|
*/
|
|
1838
1838
|
send_access(): SendAccessClient;
|
|
1839
|
+
/**
|
|
1840
|
+
* Client for initializing user account cryptography and unlock methods after JIT provisioning
|
|
1841
|
+
*/
|
|
1842
|
+
registration(): RegistrationClient;
|
|
1839
1843
|
}
|
|
1840
1844
|
/**
|
|
1841
1845
|
* Client for evaluating credential risk for login ciphers.
|
|
@@ -2453,21 +2457,33 @@ export class PureCrypto {
|
|
|
2453
2457
|
/**
|
|
2454
2458
|
* Given a decrypted private RSA key PKCS8 DER this
|
|
2455
2459
|
* returns the corresponding public RSA key in DER format.
|
|
2460
|
+
* HAZMAT WARNING: Do not use outside of implementing cryptofunctionservice
|
|
2456
2461
|
*/
|
|
2457
2462
|
static rsa_extract_public_key(private_key: Uint8Array): Uint8Array;
|
|
2458
2463
|
/**
|
|
2459
2464
|
* Generates a new RSA key pair and returns the private key
|
|
2465
|
+
* HAZMAT WARNING: Do not use outside of implementing cryptofunctionservice
|
|
2460
2466
|
*/
|
|
2461
2467
|
static rsa_generate_keypair(): Uint8Array;
|
|
2462
2468
|
/**
|
|
2463
2469
|
* Decrypts data using RSAES-OAEP with SHA-1
|
|
2470
|
+
* HAZMAT WARNING: Do not use outside of implementing cryptofunctionservice
|
|
2464
2471
|
*/
|
|
2465
2472
|
static rsa_decrypt_data(encrypted_data: Uint8Array, private_key: Uint8Array): Uint8Array;
|
|
2466
2473
|
/**
|
|
2467
2474
|
* Encrypts data using RSAES-OAEP with SHA-1
|
|
2475
|
+
* HAZMAT WARNING: Do not use outside of implementing cryptofunctionservice
|
|
2468
2476
|
*/
|
|
2469
2477
|
static rsa_encrypt_data(plain_data: Uint8Array, public_key: Uint8Array): Uint8Array;
|
|
2470
2478
|
}
|
|
2479
|
+
/**
|
|
2480
|
+
* Client for initializing a user account.
|
|
2481
|
+
*/
|
|
2482
|
+
export class RegistrationClient {
|
|
2483
|
+
private constructor();
|
|
2484
|
+
free(): void;
|
|
2485
|
+
[Symbol.dispose](): void;
|
|
2486
|
+
}
|
|
2471
2487
|
/**
|
|
2472
2488
|
* The `SendAccessClient` is used to interact with the Bitwarden API to get send access tokens.
|
|
2473
2489
|
*/
|
|
@@ -862,14 +862,6 @@ function wasm_bindgen__convert__closures_____invoke__h092300064b8afb1e(arg0, arg
|
|
|
862
862
|
wasm.wasm_bindgen__convert__closures_____invoke__h092300064b8afb1e(arg0, arg1);
|
|
863
863
|
}
|
|
864
864
|
|
|
865
|
-
function wasm_bindgen__convert__closures_____invoke__h3f3903322ff045ff(arg0, arg1, arg2) {
|
|
866
|
-
wasm.wasm_bindgen__convert__closures_____invoke__h3f3903322ff045ff(
|
|
867
|
-
arg0,
|
|
868
|
-
arg1,
|
|
869
|
-
addHeapObject(arg2),
|
|
870
|
-
);
|
|
871
|
-
}
|
|
872
|
-
|
|
873
865
|
function wasm_bindgen__convert__closures_____invoke__h35a8188fc7e541fe(arg0, arg1, arg2) {
|
|
874
866
|
try {
|
|
875
867
|
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
@@ -889,6 +881,14 @@ function wasm_bindgen__convert__closures_____invoke__h35a8188fc7e541fe(arg0, arg
|
|
|
889
881
|
}
|
|
890
882
|
}
|
|
891
883
|
|
|
884
|
+
function wasm_bindgen__convert__closures_____invoke__h3f3903322ff045ff(arg0, arg1, arg2) {
|
|
885
|
+
wasm.wasm_bindgen__convert__closures_____invoke__h3f3903322ff045ff(
|
|
886
|
+
arg0,
|
|
887
|
+
arg1,
|
|
888
|
+
addHeapObject(arg2),
|
|
889
|
+
);
|
|
890
|
+
}
|
|
891
|
+
|
|
892
892
|
function wasm_bindgen__convert__closures_____invoke__h43dfd80678632d6f(arg0, arg1, arg2, arg3) {
|
|
893
893
|
wasm.wasm_bindgen__convert__closures_____invoke__h43dfd80678632d6f(
|
|
894
894
|
arg0,
|
|
@@ -1180,6 +1180,14 @@ class AuthClient {
|
|
|
1180
1180
|
const ret = wasm.authclient_identity(this.__wbg_ptr);
|
|
1181
1181
|
return SendAccessClient.__wrap(ret);
|
|
1182
1182
|
}
|
|
1183
|
+
/**
|
|
1184
|
+
* Client for initializing user account cryptography and unlock methods after JIT provisioning
|
|
1185
|
+
* @returns {RegistrationClient}
|
|
1186
|
+
*/
|
|
1187
|
+
registration() {
|
|
1188
|
+
const ret = wasm.authclient_identity(this.__wbg_ptr);
|
|
1189
|
+
return RegistrationClient.__wrap(ret);
|
|
1190
|
+
}
|
|
1183
1191
|
}
|
|
1184
1192
|
if (Symbol.dispose) AuthClient.prototype[Symbol.dispose] = AuthClient.prototype.free;
|
|
1185
1193
|
|
|
@@ -4138,6 +4146,7 @@ class PureCrypto {
|
|
|
4138
4146
|
/**
|
|
4139
4147
|
* Given a decrypted private RSA key PKCS8 DER this
|
|
4140
4148
|
* returns the corresponding public RSA key in DER format.
|
|
4149
|
+
* HAZMAT WARNING: Do not use outside of implementing cryptofunctionservice
|
|
4141
4150
|
* @param {Uint8Array} private_key
|
|
4142
4151
|
* @returns {Uint8Array}
|
|
4143
4152
|
*/
|
|
@@ -4163,6 +4172,7 @@ class PureCrypto {
|
|
|
4163
4172
|
}
|
|
4164
4173
|
/**
|
|
4165
4174
|
* Generates a new RSA key pair and returns the private key
|
|
4175
|
+
* HAZMAT WARNING: Do not use outside of implementing cryptofunctionservice
|
|
4166
4176
|
* @returns {Uint8Array}
|
|
4167
4177
|
*/
|
|
4168
4178
|
static rsa_generate_keypair() {
|
|
@@ -4185,6 +4195,7 @@ class PureCrypto {
|
|
|
4185
4195
|
}
|
|
4186
4196
|
/**
|
|
4187
4197
|
* Decrypts data using RSAES-OAEP with SHA-1
|
|
4198
|
+
* HAZMAT WARNING: Do not use outside of implementing cryptofunctionservice
|
|
4188
4199
|
* @param {Uint8Array} encrypted_data
|
|
4189
4200
|
* @param {Uint8Array} private_key
|
|
4190
4201
|
* @returns {Uint8Array}
|
|
@@ -4213,6 +4224,7 @@ class PureCrypto {
|
|
|
4213
4224
|
}
|
|
4214
4225
|
/**
|
|
4215
4226
|
* Encrypts data using RSAES-OAEP with SHA-1
|
|
4227
|
+
* HAZMAT WARNING: Do not use outside of implementing cryptofunctionservice
|
|
4216
4228
|
* @param {Uint8Array} plain_data
|
|
4217
4229
|
* @param {Uint8Array} public_key
|
|
4218
4230
|
* @returns {Uint8Array}
|
|
@@ -4244,6 +4256,39 @@ if (Symbol.dispose) PureCrypto.prototype[Symbol.dispose] = PureCrypto.prototype.
|
|
|
4244
4256
|
|
|
4245
4257
|
exports.PureCrypto = PureCrypto;
|
|
4246
4258
|
|
|
4259
|
+
const RegistrationClientFinalization =
|
|
4260
|
+
typeof FinalizationRegistry === "undefined"
|
|
4261
|
+
? { register: () => {}, unregister: () => {} }
|
|
4262
|
+
: new FinalizationRegistry((ptr) => wasm.__wbg_registrationclient_free(ptr >>> 0, 1));
|
|
4263
|
+
/**
|
|
4264
|
+
* Client for initializing a user account.
|
|
4265
|
+
*/
|
|
4266
|
+
class RegistrationClient {
|
|
4267
|
+
static __wrap(ptr) {
|
|
4268
|
+
ptr = ptr >>> 0;
|
|
4269
|
+
const obj = Object.create(RegistrationClient.prototype);
|
|
4270
|
+
obj.__wbg_ptr = ptr;
|
|
4271
|
+
RegistrationClientFinalization.register(obj, obj.__wbg_ptr, obj);
|
|
4272
|
+
return obj;
|
|
4273
|
+
}
|
|
4274
|
+
|
|
4275
|
+
__destroy_into_raw() {
|
|
4276
|
+
const ptr = this.__wbg_ptr;
|
|
4277
|
+
this.__wbg_ptr = 0;
|
|
4278
|
+
RegistrationClientFinalization.unregister(this);
|
|
4279
|
+
return ptr;
|
|
4280
|
+
}
|
|
4281
|
+
|
|
4282
|
+
free() {
|
|
4283
|
+
const ptr = this.__destroy_into_raw();
|
|
4284
|
+
wasm.__wbg_registrationclient_free(ptr, 0);
|
|
4285
|
+
}
|
|
4286
|
+
}
|
|
4287
|
+
if (Symbol.dispose)
|
|
4288
|
+
RegistrationClient.prototype[Symbol.dispose] = RegistrationClient.prototype.free;
|
|
4289
|
+
|
|
4290
|
+
exports.RegistrationClient = RegistrationClient;
|
|
4291
|
+
|
|
4247
4292
|
const SendAccessClientFinalization =
|
|
4248
4293
|
typeof FinalizationRegistry === "undefined"
|
|
4249
4294
|
? { register: () => {}, unregister: () => {} }
|
|
@@ -4666,7 +4711,7 @@ exports.__wbg_call_e762c39fa8ea36bf = function () {
|
|
|
4666
4711
|
}, arguments);
|
|
4667
4712
|
};
|
|
4668
4713
|
|
|
4669
|
-
exports.
|
|
4714
|
+
exports.__wbg_cipher_118c2d2f844c92dc = function (arg0) {
|
|
4670
4715
|
const ret = getObject(arg0).cipher;
|
|
4671
4716
|
return isLikeNone(ret) ? 0 : addHeapObject(ret);
|
|
4672
4717
|
};
|
|
@@ -4759,7 +4804,7 @@ exports.__wbg_fetch_f8ba0e29a9d6de0d = function (arg0, arg1) {
|
|
|
4759
4804
|
return addHeapObject(ret);
|
|
4760
4805
|
};
|
|
4761
4806
|
|
|
4762
|
-
exports.
|
|
4807
|
+
exports.__wbg_folder_e24dd7de865631e7 = function (arg0) {
|
|
4763
4808
|
const ret = getObject(arg0).folder;
|
|
4764
4809
|
return isLikeNone(ret) ? 0 : addHeapObject(ret);
|
|
4765
4810
|
};
|
|
@@ -4792,7 +4837,12 @@ exports.__wbg_getTime_14776bfb48a1bff9 = function (arg0) {
|
|
|
4792
4837
|
return ret;
|
|
4793
4838
|
};
|
|
4794
4839
|
|
|
4795
|
-
exports.
|
|
4840
|
+
exports.__wbg_get_7bed016f185add81 = function (arg0, arg1) {
|
|
4841
|
+
const ret = getObject(arg0)[arg1 >>> 0];
|
|
4842
|
+
return addHeapObject(ret);
|
|
4843
|
+
};
|
|
4844
|
+
|
|
4845
|
+
exports.__wbg_get_7d311caa64abba59 = function () {
|
|
4796
4846
|
return handleError(function (arg0, arg1, arg2) {
|
|
4797
4847
|
let deferred0_0;
|
|
4798
4848
|
let deferred0_1;
|
|
@@ -4807,12 +4857,19 @@ exports.__wbg_get_63fc1a87cfa05664 = function () {
|
|
|
4807
4857
|
}, arguments);
|
|
4808
4858
|
};
|
|
4809
4859
|
|
|
4810
|
-
exports.
|
|
4811
|
-
const ret = getObject(arg0)
|
|
4860
|
+
exports.__wbg_get_access_token_f894d2b087e7d4fe = function (arg0) {
|
|
4861
|
+
const ret = getObject(arg0).get_access_token();
|
|
4812
4862
|
return addHeapObject(ret);
|
|
4813
4863
|
};
|
|
4814
4864
|
|
|
4815
|
-
exports.
|
|
4865
|
+
exports.__wbg_get_efcb449f58ec27c2 = function () {
|
|
4866
|
+
return handleError(function (arg0, arg1) {
|
|
4867
|
+
const ret = Reflect.get(getObject(arg0), getObject(arg1));
|
|
4868
|
+
return addHeapObject(ret);
|
|
4869
|
+
}, arguments);
|
|
4870
|
+
};
|
|
4871
|
+
|
|
4872
|
+
exports.__wbg_get_f8b3055a92ab3a2e = function () {
|
|
4816
4873
|
return handleError(function (arg0, arg1, arg2) {
|
|
4817
4874
|
let deferred0_0;
|
|
4818
4875
|
let deferred0_1;
|
|
@@ -4827,18 +4884,6 @@ exports.__wbg_get_7f59e4189b579885 = function () {
|
|
|
4827
4884
|
}, arguments);
|
|
4828
4885
|
};
|
|
4829
4886
|
|
|
4830
|
-
exports.__wbg_get_access_token_5d1676f62fd8cd77 = function (arg0) {
|
|
4831
|
-
const ret = getObject(arg0).get_access_token();
|
|
4832
|
-
return addHeapObject(ret);
|
|
4833
|
-
};
|
|
4834
|
-
|
|
4835
|
-
exports.__wbg_get_efcb449f58ec27c2 = function () {
|
|
4836
|
-
return handleError(function (arg0, arg1) {
|
|
4837
|
-
const ret = Reflect.get(getObject(arg0), getObject(arg1));
|
|
4838
|
-
return addHeapObject(ret);
|
|
4839
|
-
}, arguments);
|
|
4840
|
-
};
|
|
4841
|
-
|
|
4842
4887
|
exports.__wbg_get_with_ref_key_1dc361bd10053bfe = function (arg0, arg1) {
|
|
4843
4888
|
const ret = getObject(arg0)[getObject(arg1)];
|
|
4844
4889
|
return addHeapObject(ret);
|
|
@@ -5023,14 +5068,14 @@ exports.__wbg_length_cdd215e10d9dd507 = function (arg0) {
|
|
|
5023
5068
|
return ret;
|
|
5024
5069
|
};
|
|
5025
5070
|
|
|
5026
|
-
exports.
|
|
5071
|
+
exports.__wbg_list_87b5111301522ea8 = function () {
|
|
5027
5072
|
return handleError(function (arg0) {
|
|
5028
5073
|
const ret = getObject(arg0).list();
|
|
5029
5074
|
return addHeapObject(ret);
|
|
5030
5075
|
}, arguments);
|
|
5031
5076
|
};
|
|
5032
5077
|
|
|
5033
|
-
exports.
|
|
5078
|
+
exports.__wbg_list_905aead152fccf12 = function () {
|
|
5034
5079
|
return handleError(function (arg0) {
|
|
5035
5080
|
const ret = getObject(arg0).list();
|
|
5036
5081
|
return addHeapObject(ret);
|
|
@@ -5274,7 +5319,7 @@ exports.__wbg_randomFillSync_ac0988aba3254290 = function () {
|
|
|
5274
5319
|
}, arguments);
|
|
5275
5320
|
};
|
|
5276
5321
|
|
|
5277
|
-
exports.
|
|
5322
|
+
exports.__wbg_remove_da5583193dd2745c = function () {
|
|
5278
5323
|
return handleError(function (arg0, arg1, arg2) {
|
|
5279
5324
|
let deferred0_0;
|
|
5280
5325
|
let deferred0_1;
|
|
@@ -5289,7 +5334,7 @@ exports.__wbg_remove_47756c4838416808 = function () {
|
|
|
5289
5334
|
}, arguments);
|
|
5290
5335
|
};
|
|
5291
5336
|
|
|
5292
|
-
exports.
|
|
5337
|
+
exports.__wbg_remove_f40ebda9d037255c = function () {
|
|
5293
5338
|
return handleError(function (arg0, arg1, arg2) {
|
|
5294
5339
|
let deferred0_0;
|
|
5295
5340
|
let deferred0_1;
|
|
@@ -5335,26 +5380,11 @@ exports.__wbg_setTimeout_ca12ead8b48245e2 = function (arg0, arg1) {
|
|
|
5335
5380
|
return addHeapObject(ret);
|
|
5336
5381
|
};
|
|
5337
5382
|
|
|
5338
|
-
exports.__wbg_set_268d54f279c675e3 = function () {
|
|
5339
|
-
return handleError(function (arg0, arg1, arg2, arg3) {
|
|
5340
|
-
let deferred0_0;
|
|
5341
|
-
let deferred0_1;
|
|
5342
|
-
try {
|
|
5343
|
-
deferred0_0 = arg1;
|
|
5344
|
-
deferred0_1 = arg2;
|
|
5345
|
-
const ret = getObject(arg0).set(getStringFromWasm0(arg1, arg2), takeObject(arg3));
|
|
5346
|
-
return addHeapObject(ret);
|
|
5347
|
-
} finally {
|
|
5348
|
-
wasm.__wbindgen_free(deferred0_0, deferred0_1, 1);
|
|
5349
|
-
}
|
|
5350
|
-
}, arguments);
|
|
5351
|
-
};
|
|
5352
|
-
|
|
5353
5383
|
exports.__wbg_set_3f1d0b984ed272ed = function (arg0, arg1, arg2) {
|
|
5354
5384
|
getObject(arg0)[takeObject(arg1)] = takeObject(arg2);
|
|
5355
5385
|
};
|
|
5356
5386
|
|
|
5357
|
-
exports.
|
|
5387
|
+
exports.__wbg_set_7d3480ee15dd45c8 = function () {
|
|
5358
5388
|
return handleError(function (arg0, arg1, arg2, arg3) {
|
|
5359
5389
|
let deferred0_0;
|
|
5360
5390
|
let deferred0_1;
|
|
@@ -5393,6 +5423,21 @@ exports.__wbg_set_credentials_f621cd2d85c0c228 = function (arg0, arg1) {
|
|
|
5393
5423
|
getObject(arg0).credentials = __wbindgen_enum_RequestCredentials[arg1];
|
|
5394
5424
|
};
|
|
5395
5425
|
|
|
5426
|
+
exports.__wbg_set_f4c903235623f568 = function () {
|
|
5427
|
+
return handleError(function (arg0, arg1, arg2, arg3) {
|
|
5428
|
+
let deferred0_0;
|
|
5429
|
+
let deferred0_1;
|
|
5430
|
+
try {
|
|
5431
|
+
deferred0_0 = arg1;
|
|
5432
|
+
deferred0_1 = arg2;
|
|
5433
|
+
const ret = getObject(arg0).set(getStringFromWasm0(arg1, arg2), takeObject(arg3));
|
|
5434
|
+
return addHeapObject(ret);
|
|
5435
|
+
} finally {
|
|
5436
|
+
wasm.__wbindgen_free(deferred0_0, deferred0_1, 1);
|
|
5437
|
+
}
|
|
5438
|
+
}, arguments);
|
|
5439
|
+
};
|
|
5440
|
+
|
|
5396
5441
|
exports.__wbg_set_headers_6926da238cd32ee4 = function (arg0, arg1) {
|
|
5397
5442
|
getObject(arg0).headers = getObject(arg1);
|
|
5398
5443
|
};
|
|
Binary file
|
|
@@ -436,11 +436,13 @@ export const __wbg_stateclient_free: (a: number, b: number) => void;
|
|
|
436
436
|
export const __wbg_platformclient_free: (a: number, b: number) => void;
|
|
437
437
|
export const platformclient_state: (a: number) => number;
|
|
438
438
|
export const authclient_send_access: (a: number) => number;
|
|
439
|
+
export const authclient_registration: (a: number) => number;
|
|
439
440
|
export const vaultclient_ciphers: (a: number) => number;
|
|
440
441
|
export const vaultclient_folders: (a: number) => number;
|
|
441
442
|
export const vaultclient_totp: (a: number) => number;
|
|
442
443
|
export const vaultclient_collections: (a: number) => number;
|
|
443
444
|
export const vaultclient_cipher_risk: (a: number) => number;
|
|
445
|
+
export const __wbg_registrationclient_free: (a: number, b: number) => void;
|
|
444
446
|
export const __wbg_foldersclient_free: (a: number, b: number) => void;
|
|
445
447
|
export const __wbg_cipherriskclient_free: (a: number, b: number) => void;
|
|
446
448
|
export const __wbg_ciphersclient_free: (a: number, b: number) => void;
|
|
@@ -455,20 +457,20 @@ export const wasm_bindgen__convert__closures_____invoke__h092300064b8afb1e: (
|
|
|
455
457
|
a: number,
|
|
456
458
|
b: number,
|
|
457
459
|
) => void;
|
|
458
|
-
export const
|
|
459
|
-
export const
|
|
460
|
+
export const wasm_bindgen__closure__destroy__hfcb631b72e5e985c: (a: number, b: number) => void;
|
|
461
|
+
export const wasm_bindgen__convert__closures_____invoke__h35a8188fc7e541fe: (
|
|
460
462
|
a: number,
|
|
461
463
|
b: number,
|
|
462
464
|
c: number,
|
|
465
|
+
d: number,
|
|
463
466
|
) => void;
|
|
464
467
|
export const wasm_bindgen__closure__destroy__hba496874d56e8206: (a: number, b: number) => void;
|
|
465
|
-
export const
|
|
466
|
-
export const wasm_bindgen__convert__closures_____invoke__h35a8188fc7e541fe: (
|
|
468
|
+
export const wasm_bindgen__convert__closures_____invoke__h3f3903322ff045ff: (
|
|
467
469
|
a: number,
|
|
468
470
|
b: number,
|
|
469
471
|
c: number,
|
|
470
|
-
d: number,
|
|
471
472
|
) => void;
|
|
473
|
+
export const wasm_bindgen__closure__destroy__h5bf455f3385c4f71: (a: number, b: number) => void;
|
|
472
474
|
export const wasm_bindgen__convert__closures_____invoke__h43dfd80678632d6f: (
|
|
473
475
|
a: number,
|
|
474
476
|
b: number,
|