@wireapp/core-crypto 10.1.1 → 10.2.0

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.
@@ -3162,6 +3162,9 @@ declare class CoreCryptoContext extends UniffiAbstractObject {
3162
3162
  }): Promise<void>;
3163
3163
  /**
3164
3164
  * Joins a conversation by processing an MLS Welcome message, returning the new conversation's ID.
3165
+ *
3166
+ * NOTE: Will retain the referenced key package in case of an error only if it was created in an earlier
3167
+ * transaction.
3165
3168
  */
3166
3169
  processWelcomeMessage(welcomeMessage: WelcomeLike, asyncOpts_?: {
3167
3170
  signal: AbortSignal;
@@ -3655,8 +3658,9 @@ export declare class Database extends UniffiAbstractObject {
3655
3658
  private constructor();
3656
3659
  /**
3657
3660
  * Create an in-memory database whose data will be lost when the instance is dropped.
3661
+ * In-memory databases are never encrypted.
3658
3662
  */
3659
- static inMemory(key: DatabaseKeyLike, asyncOpts_?: {
3663
+ static inMemory(asyncOpts_?: {
3660
3664
  signal: AbortSignal;
3661
3665
  }): Promise<DatabaseLike>;
3662
3666
  /**
@@ -1181,7 +1181,7 @@ var DEFINITIONS = {
1181
1181
  hasRustCallStatus: true
1182
1182
  },
1183
1183
  uniffi_core_crypto_ffi_fn_constructor_database_in_memory: {
1184
- args: [FfiType.Handle],
1184
+ args: [],
1185
1185
  ret: FfiType.Handle,
1186
1186
  hasRustCallStatus: false
1187
1187
  },
@@ -7883,11 +7883,11 @@ class Database extends UniffiAbstractObject {
7883
7883
  this[pointerLiteralSymbol] = pointer;
7884
7884
  this[destructorGuardSymbol] = uniffiTypeDatabaseObjectFactory.bless(pointer);
7885
7885
  }
7886
- static async inMemory(key, asyncOpts_) {
7886
+ static async inMemory(asyncOpts_) {
7887
7887
  const __stack = uniffiIsDebug ? new Error().stack : undefined;
7888
7888
  try {
7889
7889
  return await uniffiRustCallAsync(uniffiCaller, () => {
7890
- return core_crypto_ffi_ffi_default().uniffi_core_crypto_ffi_fn_constructor_database_in_memory(FfiConverterTypeDatabaseKey.lower(key, core_crypto_ffi_ffi_default().rustbuffer_alloc));
7890
+ return core_crypto_ffi_ffi_default().uniffi_core_crypto_ffi_fn_constructor_database_in_memory();
7891
7891
  }, core_crypto_ffi_ffi_default().ffi_core_crypto_ffi_rust_future_poll_u64, core_crypto_ffi_ffi_default().ffi_core_crypto_ffi_rust_future_cancel_u64, core_crypto_ffi_ffi_default().ffi_core_crypto_ffi_rust_future_complete_u64, core_crypto_ffi_ffi_default().ffi_core_crypto_ffi_rust_future_free_u64, FfiConverterTypeDatabase.lift.bind(FfiConverterTypeDatabase), FfiConverterString.lift.bind(FfiConverterString), asyncOpts_, FfiConverterTypeCoreCryptoError.lift.bind(FfiConverterTypeCoreCryptoError));
7892
7892
  } catch (__error) {
7893
7893
  if (uniffiIsDebug && __error instanceof Error) {
@@ -7914,7 +7914,7 @@ class Database extends UniffiAbstractObject {
7914
7914
  try {
7915
7915
  return await uniffiRustCallAsync(uniffiCaller, () => {
7916
7916
  return core_crypto_ffi_ffi_default().uniffi_core_crypto_ffi_fn_method_database_get_location(uniffiTypeDatabaseObjectFactory.clonePointer(this));
7917
- }, core_crypto_ffi_ffi_default().ffi_core_crypto_ffi_rust_future_poll_rust_buffer, core_crypto_ffi_ffi_default().ffi_core_crypto_ffi_rust_future_cancel_rust_buffer, core_crypto_ffi_ffi_default().ffi_core_crypto_ffi_rust_future_complete_rust_buffer, core_crypto_ffi_ffi_default().ffi_core_crypto_ffi_rust_future_free_rust_buffer, FfiConverterOptionalString.lift.bind(FfiConverterOptionalString), FfiConverterString.lift.bind(FfiConverterString), asyncOpts_, FfiConverterTypeCoreCryptoError.lift.bind(FfiConverterTypeCoreCryptoError));
7917
+ }, core_crypto_ffi_ffi_default().ffi_core_crypto_ffi_rust_future_poll_rust_buffer, core_crypto_ffi_ffi_default().ffi_core_crypto_ffi_rust_future_cancel_rust_buffer, core_crypto_ffi_ffi_default().ffi_core_crypto_ffi_rust_future_complete_rust_buffer, core_crypto_ffi_ffi_default().ffi_core_crypto_ffi_rust_future_free_rust_buffer, FfiConverterOptionalString.lift.bind(FfiConverterOptionalString), FfiConverterString.lift.bind(FfiConverterString), asyncOpts_);
7918
7918
  } catch (__error) {
7919
7919
  if (uniffiIsDebug && __error instanceof Error) {
7920
7920
  __error.stack = __stack;
@@ -8476,7 +8476,7 @@ function uniffiEnsureInitialized() {
8476
8476
  if (core_crypto_ffi_ffi_default().uniffi_core_crypto_ffi_checksum_method_corecryptocontext_mls_init() !== 29576) {
8477
8477
  throw new UniffiInternalError.ApiChecksumMismatch("uniffi_core_crypto_ffi_checksum_method_corecryptocontext_mls_init");
8478
8478
  }
8479
- if (core_crypto_ffi_ffi_default().uniffi_core_crypto_ffi_checksum_method_corecryptocontext_process_welcome_message() !== 14529) {
8479
+ if (core_crypto_ffi_ffi_default().uniffi_core_crypto_ffi_checksum_method_corecryptocontext_process_welcome_message() !== 57182) {
8480
8480
  throw new UniffiInternalError.ApiChecksumMismatch("uniffi_core_crypto_ffi_checksum_method_corecryptocontext_process_welcome_message");
8481
8481
  }
8482
8482
  if (core_crypto_ffi_ffi_default().uniffi_core_crypto_ffi_checksum_method_corecryptocontext_proteus_decrypt() !== 33569) {
@@ -8668,13 +8668,13 @@ function uniffiEnsureInitialized() {
8668
8668
  if (core_crypto_ffi_ffi_default().uniffi_core_crypto_ffi_checksum_method_credentialref_type() !== 37445) {
8669
8669
  throw new UniffiInternalError.ApiChecksumMismatch("uniffi_core_crypto_ffi_checksum_method_credentialref_type");
8670
8670
  }
8671
- if (core_crypto_ffi_ffi_default().uniffi_core_crypto_ffi_checksum_constructor_database_in_memory() !== 34759) {
8671
+ if (core_crypto_ffi_ffi_default().uniffi_core_crypto_ffi_checksum_constructor_database_in_memory() !== 46380) {
8672
8672
  throw new UniffiInternalError.ApiChecksumMismatch("uniffi_core_crypto_ffi_checksum_constructor_database_in_memory");
8673
8673
  }
8674
8674
  if (core_crypto_ffi_ffi_default().uniffi_core_crypto_ffi_checksum_constructor_database_open() !== 13723) {
8675
8675
  throw new UniffiInternalError.ApiChecksumMismatch("uniffi_core_crypto_ffi_checksum_constructor_database_open");
8676
8676
  }
8677
- if (core_crypto_ffi_ffi_default().uniffi_core_crypto_ffi_checksum_method_database_get_location() !== 14309) {
8677
+ if (core_crypto_ffi_ffi_default().uniffi_core_crypto_ffi_checksum_method_database_get_location() !== 23786) {
8678
8678
  throw new UniffiInternalError.ApiChecksumMismatch("uniffi_core_crypto_ffi_checksum_method_database_get_location");
8679
8679
  }
8680
8680
  if (core_crypto_ffi_ffi_default().uniffi_core_crypto_ffi_checksum_method_database_update_key() !== 45220) {
Binary file
package/package.json CHANGED
@@ -1,22 +1,34 @@
1
1
  {
2
2
  "name": "@wireapp/core-crypto",
3
- "version": "10.1.1",
3
+ "version": "10.2.0",
4
+ "description": "CoreCrypto bindings for browser and native JavaScript runtimes",
5
+ "keywords": [
6
+ "corecrypto",
7
+ "e2ee",
8
+ "mls",
9
+ "proteus",
10
+ "wire"
11
+ ],
12
+ "homepage": "https://github.com/wireapp/core-crypto",
13
+ "bugs": {
14
+ "url": "https://github.com/wireapp/core-crypto/issues"
15
+ },
16
+ "license": "GPL-3.0",
4
17
  "author": "Wire CoreCrypto team <team.corecrypto@wire.com>",
5
18
  "repository": {
6
19
  "type": "git",
7
20
  "url": "git@github.com:wireapp/core-crypto.git"
8
21
  },
22
+ "files": [
23
+ "dist/browser/corecrypto.js",
24
+ "dist/browser/corecrypto.d.ts",
25
+ "dist/browser/autogenerated/wasm-bindgen/index_bg.wasm",
26
+ "dist/browser/autogenerated/wasm-bindgen/index_bg.wasm.d.ts",
27
+ "dist/native/corecrypto.js",
28
+ "dist/native/corecrypto.d.ts",
29
+ "dist/native/libcore_crypto_ffi.*"
30
+ ],
9
31
  "type": "module",
10
- "exports": {
11
- "./browser": {
12
- "types": "./dist/browser/corecrypto.d.ts",
13
- "import": "./dist/browser/corecrypto.js"
14
- },
15
- "./native": {
16
- "types": "./dist/native/corecrypto.d.ts",
17
- "import": "./dist/native/corecrypto.js"
18
- }
19
- },
20
32
  "typesVersions": {
21
33
  "*": {
22
34
  "browser": [
@@ -27,28 +39,16 @@
27
39
  ]
28
40
  }
29
41
  },
30
- "files": [
31
- "dist/browser/corecrypto.js",
32
- "dist/browser/corecrypto.d.ts",
33
- "dist/browser/autogenerated/wasm-bindgen/index_bg.wasm",
34
- "dist/browser/autogenerated/wasm-bindgen/index_bg.wasm.d.ts",
35
- "dist/native/corecrypto.js",
36
- "dist/native/corecrypto.d.ts",
37
- "dist/native/libcore_crypto_ffi.*"
38
- ],
39
- "bugs": {
40
- "url": "https://github.com/wireapp/core-crypto/issues"
42
+ "exports": {
43
+ "./browser": {
44
+ "types": "./dist/browser/corecrypto.d.ts",
45
+ "import": "./dist/browser/corecrypto.js"
46
+ },
47
+ "./native": {
48
+ "types": "./dist/native/corecrypto.d.ts",
49
+ "import": "./dist/native/corecrypto.js"
50
+ }
41
51
  },
42
- "description": "CoreCrypto bindings for browser and native JavaScript runtimes",
43
- "homepage": "https://github.com/wireapp/core-crypto",
44
- "keywords": [
45
- "wire",
46
- "e2ee",
47
- "corecrypto",
48
- "mls",
49
- "proteus"
50
- ],
51
- "license": "GPL-3.0",
52
52
  "publishConfig": {
53
53
  "access": "public"
54
54
  }