@wireapp/core-crypto 10.2.0 → 10.3.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.
@@ -2682,32 +2682,32 @@ function ubrn_uniffi_core_crypto_ffi_fn_constructor_deviceid_new(id, f_status_)
2682
2682
  const ret = wasm.ubrn_uniffi_core_crypto_ffi_fn_constructor_deviceid_new(id, f_status_.__wbg_ptr);
2683
2683
  return BigInt.asUintN(64, ret);
2684
2684
  }
2685
- function _RINvNvNtNtCs1v8yTr2kYOM_12wasm_bindgen7convert8closuress2_1__6invokeNtNtNtCsj0N8EzF6AVm_7web_sys8features9gen_Event5EventuECs23g10cbCpHB_3idb(arg0, arg1, arg2) {
2686
- wasm._RINvNvNtNtCs1v8yTr2kYOM_12wasm_bindgen7convert8closuress2_1__6invokeNtNtNtCsj0N8EzF6AVm_7web_sys8features9gen_Event5EventuECs23g10cbCpHB_3idb(arg0, arg1, arg2);
2685
+ function _RINvNvNtNtCs1v8yTr2kYOM_12wasm_bindgen7convert8closuress2_1__6invokeNtNtNtCsj0N8EzF6AVm_7web_sys8features9gen_Event5EventuECsckjKPEl01w1_18indexed_db_futures(arg0, arg1, arg2) {
2686
+ wasm._RINvNvNtNtCs1v8yTr2kYOM_12wasm_bindgen7convert8closuress2_1__6invokeNtNtNtCsj0N8EzF6AVm_7web_sys8features9gen_Event5EventuECsckjKPEl01w1_18indexed_db_futures(arg0, arg1, arg2);
2687
2687
  }
2688
2688
  function _RINvNvNtNtCs1v8yTr2kYOM_12wasm_bindgen7convert8closuress2_1__6invokeNtB8_7JsValueuECs1CdnCKNhB1d_20wasm_bindgen_futures(arg0, arg1, arg2) {
2689
2689
  wasm._RINvNvNtNtCs1v8yTr2kYOM_12wasm_bindgen7convert8closuress2_1__6invokeNtB8_7JsValueuECs1CdnCKNhB1d_20wasm_bindgen_futures(arg0, arg1, arg2);
2690
2690
  }
2691
+ function _RINvNvNtNtCs1v8yTr2kYOM_12wasm_bindgen7convert8closuress2_1__6invokeNtNtNtCsj0N8EzF6AVm_7web_sys8features25gen_IdbVersionChangeEvent21IdbVersionChangeEventuECsfqA46X3blwG_20core_crypto_keystore(arg0, arg1, arg2) {
2692
+ wasm._RINvNvNtNtCs1v8yTr2kYOM_12wasm_bindgen7convert8closuress2_1__6invokeNtNtNtCsj0N8EzF6AVm_7web_sys8features25gen_IdbVersionChangeEvent21IdbVersionChangeEventuECsfqA46X3blwG_20core_crypto_keystore(arg0, arg1, arg2);
2693
+ }
2694
+ function _RINvNvNtNtCs1v8yTr2kYOM_12wasm_bindgen7convert8closuress2_1__6invokeNtNtNtCsj0N8EzF6AVm_7web_sys8features9gen_Event5EventuECsk4VgpxaNMXX_3idb(arg0, arg1, arg2) {
2695
+ wasm._RINvNvNtNtCs1v8yTr2kYOM_12wasm_bindgen7convert8closuress2_1__6invokeNtNtNtCsj0N8EzF6AVm_7web_sys8features9gen_Event5EventuECsk4VgpxaNMXX_3idb(arg0, arg1, arg2);
2696
+ }
2697
+ function _RINvNvNtNtCs1v8yTr2kYOM_12wasm_bindgen7convert8closuress0_1__6invokeuECsckjKPEl01w1_18indexed_db_futures(arg0, arg1) {
2698
+ wasm._RINvNvNtNtCs1v8yTr2kYOM_12wasm_bindgen7convert8closuress0_1__6invokeuECsckjKPEl01w1_18indexed_db_futures(arg0, arg1);
2699
+ }
2691
2700
  function takeFromExternrefTable0(idx) {
2692
2701
  const value = wasm.__wbindgen_externrefs.get(idx);
2693
2702
  wasm.__externref_table_dealloc(idx);
2694
2703
  return value;
2695
2704
  }
2696
- function _RINvNvNtNtCs1v8yTr2kYOM_12wasm_bindgen7convert8closuress2_1__6invokeNtNtNtCsj0N8EzF6AVm_7web_sys8features25gen_IdbVersionChangeEvent21IdbVersionChangeEventINtNtCsdkdt1aaAg1T_4core6result6ResultuNtB8_7JsValueEECs8XZ7I9GocMb_15core_crypto_ffi(arg0, arg1, arg2) {
2697
- const ret = wasm._RINvNvNtNtCs1v8yTr2kYOM_12wasm_bindgen7convert8closuress2_1__6invokeNtNtNtCsj0N8EzF6AVm_7web_sys8features25gen_IdbVersionChangeEvent21IdbVersionChangeEventINtNtCsdkdt1aaAg1T_4core6result6ResultuNtB8_7JsValueEECs8XZ7I9GocMb_15core_crypto_ffi(arg0, arg1, arg2);
2705
+ function _RINvNvNtNtCs1v8yTr2kYOM_12wasm_bindgen7convert8closuress2_1__6invokeNtNtNtCsj0N8EzF6AVm_7web_sys8features25gen_IdbVersionChangeEvent21IdbVersionChangeEventINtNtCsdkdt1aaAg1T_4core6result6ResultuNtB8_7JsValueEECs54oSMbL8ZPA_15core_crypto_ffi(arg0, arg1, arg2) {
2706
+ const ret = wasm._RINvNvNtNtCs1v8yTr2kYOM_12wasm_bindgen7convert8closuress2_1__6invokeNtNtNtCsj0N8EzF6AVm_7web_sys8features25gen_IdbVersionChangeEvent21IdbVersionChangeEventINtNtCsdkdt1aaAg1T_4core6result6ResultuNtB8_7JsValueEECs54oSMbL8ZPA_15core_crypto_ffi(arg0, arg1, arg2);
2698
2707
  if (ret[1]) {
2699
2708
  throw takeFromExternrefTable0(ret[0]);
2700
2709
  }
2701
2710
  }
2702
- function _RINvNvNtNtCs1v8yTr2kYOM_12wasm_bindgen7convert8closuress0_1__6invokeuECsckjKPEl01w1_18indexed_db_futures(arg0, arg1) {
2703
- wasm._RINvNvNtNtCs1v8yTr2kYOM_12wasm_bindgen7convert8closuress0_1__6invokeuECsckjKPEl01w1_18indexed_db_futures(arg0, arg1);
2704
- }
2705
- function _RINvNvNtNtCs1v8yTr2kYOM_12wasm_bindgen7convert8closuress2_1__6invokeNtNtNtCsj0N8EzF6AVm_7web_sys8features25gen_IdbVersionChangeEvent21IdbVersionChangeEventuECs9dh8yPvxFbN_20core_crypto_keystore(arg0, arg1, arg2) {
2706
- wasm._RINvNvNtNtCs1v8yTr2kYOM_12wasm_bindgen7convert8closuress2_1__6invokeNtNtNtCsj0N8EzF6AVm_7web_sys8features25gen_IdbVersionChangeEvent21IdbVersionChangeEventuECs9dh8yPvxFbN_20core_crypto_keystore(arg0, arg1, arg2);
2707
- }
2708
- function _RINvNvNtNtCs1v8yTr2kYOM_12wasm_bindgen7convert8closuress2_1__6invokeNtNtNtCsj0N8EzF6AVm_7web_sys8features9gen_Event5EventuECsckjKPEl01w1_18indexed_db_futures(arg0, arg1, arg2) {
2709
- wasm._RINvNvNtNtCs1v8yTr2kYOM_12wasm_bindgen7convert8closuress2_1__6invokeNtNtNtCsj0N8EzF6AVm_7web_sys8features9gen_Event5EventuECsckjKPEl01w1_18indexed_db_futures(arg0, arg1, arg2);
2710
- }
2711
2711
  var __wbindgen_enum_IdbRequestReadyState = ["pending", "done"];
2712
2712
  var __wbindgen_enum_IdbTransactionMode = ["readonly", "readwrite", "versionchange", "readwriteflush", "cleanup"];
2713
2713
  var ForeignFutureCompleteF32Finalization = typeof FinalizationRegistry === "undefined" ? { register: () => {}, unregister: () => {} } : new FinalizationRegistry((ptr) => wasm.__wbg_foreignfuturecompletef32_free(ptr >>> 0, 1));
@@ -4080,28 +4080,20 @@ function __wbg_get_imports() {
4080
4080
  const ret = arg0.versions;
4081
4081
  return ret;
4082
4082
  };
4083
- imports.wbg.__wbindgen_cast_13362a32bfbf4437 = function(arg0, arg1) {
4084
- const ret = makeMutClosure(arg0, arg1, wasm._RINvNtCs1v8yTr2kYOM_12wasm_bindgen7closure7destroyDINtNtNtCsdkdt1aaAg1T_4core3ops8function5FnMutTNtNtNtCsj0N8EzF6AVm_7web_sys8features9gen_Event5EventEEp6OutputuEL_ECsckjKPEl01w1_18indexed_db_futures, _RINvNvNtNtCs1v8yTr2kYOM_12wasm_bindgen7convert8closuress2_1__6invokeNtNtNtCsj0N8EzF6AVm_7web_sys8features9gen_Event5EventuECsckjKPEl01w1_18indexed_db_futures);
4083
+ imports.wbg.__wbindgen_cast_1796d338f06ac5ed = function(arg0, arg1) {
4084
+ const ret = makeMutClosure(arg0, arg1, wasm._RINvNtCs1v8yTr2kYOM_12wasm_bindgen7closure7destroyDINtNtNtCsdkdt1aaAg1T_4core3ops8function5FnMutTNtNtNtCsj0N8EzF6AVm_7web_sys8features25gen_IdbVersionChangeEvent21IdbVersionChangeEventEEp6OutputINtNtBU_6result6ResultuNtB4_7JsValueEEL_ECs54oSMbL8ZPA_15core_crypto_ffi, _RINvNvNtNtCs1v8yTr2kYOM_12wasm_bindgen7convert8closuress2_1__6invokeNtNtNtCsj0N8EzF6AVm_7web_sys8features25gen_IdbVersionChangeEvent21IdbVersionChangeEventINtNtCsdkdt1aaAg1T_4core6result6ResultuNtB8_7JsValueEECs54oSMbL8ZPA_15core_crypto_ffi);
4085
4085
  return ret;
4086
4086
  };
4087
4087
  imports.wbg.__wbindgen_cast_2241b6af4c4b2941 = function(arg0, arg1) {
4088
4088
  const ret = getStringFromWasm0(arg0, arg1);
4089
4089
  return ret;
4090
4090
  };
4091
- imports.wbg.__wbindgen_cast_4625c577ab2ec9ee = function(arg0) {
4092
- const ret = BigInt.asUintN(64, arg0);
4093
- return ret;
4094
- };
4095
- imports.wbg.__wbindgen_cast_4bd566ee8bca33f5 = function(arg0, arg1) {
4096
- const ret = makeMutClosure(arg0, arg1, wasm._RINvNtCs1v8yTr2kYOM_12wasm_bindgen7closure7destroyDINtNtNtCsdkdt1aaAg1T_4core3ops8function5FnMutTNtNtNtCsj0N8EzF6AVm_7web_sys8features9gen_Event5EventEEp6OutputuEL_ECsckjKPEl01w1_18indexed_db_futures, _RINvNvNtNtCs1v8yTr2kYOM_12wasm_bindgen7convert8closuress0_1__6invokeuECsckjKPEl01w1_18indexed_db_futures);
4097
- return ret;
4098
- };
4099
- imports.wbg.__wbindgen_cast_55e0497722645319 = function(arg0, arg1) {
4100
- const ret = makeMutClosure(arg0, arg1, wasm._RINvNtCs1v8yTr2kYOM_12wasm_bindgen7closure7destroyDINtNtNtCsdkdt1aaAg1T_4core3ops8function5FnMutTNtB4_7JsValueEEp6OutputuEL_ECs1CdnCKNhB1d_20wasm_bindgen_futures, _RINvNvNtNtCs1v8yTr2kYOM_12wasm_bindgen7convert8closuress2_1__6invokeNtB8_7JsValueuECs1CdnCKNhB1d_20wasm_bindgen_futures);
4091
+ imports.wbg.__wbindgen_cast_36ffd2c6ee0e55e3 = function(arg0, arg1) {
4092
+ const ret = makeMutClosure(arg0, arg1, wasm._RINvNtCs1v8yTr2kYOM_12wasm_bindgen7closure7destroyDINtNtNtCsdkdt1aaAg1T_4core3ops8function5FnMutTNtNtNtCsj0N8EzF6AVm_7web_sys8features25gen_IdbVersionChangeEvent21IdbVersionChangeEventEEp6OutputuEL_ECsfqA46X3blwG_20core_crypto_keystore, _RINvNvNtNtCs1v8yTr2kYOM_12wasm_bindgen7convert8closuress2_1__6invokeNtNtNtCsj0N8EzF6AVm_7web_sys8features25gen_IdbVersionChangeEvent21IdbVersionChangeEventuECsfqA46X3blwG_20core_crypto_keystore);
4101
4093
  return ret;
4102
4094
  };
4103
- imports.wbg.__wbindgen_cast_6839ba539615cc3f = function(arg0, arg1) {
4104
- const ret = makeMutClosure(arg0, arg1, wasm._RINvNtCs1v8yTr2kYOM_12wasm_bindgen7closure7destroyDINtNtNtCsdkdt1aaAg1T_4core3ops8function5FnMutTNtNtNtCsj0N8EzF6AVm_7web_sys8features25gen_IdbVersionChangeEvent21IdbVersionChangeEventEEp6OutputuEL_ECs9dh8yPvxFbN_20core_crypto_keystore, _RINvNvNtNtCs1v8yTr2kYOM_12wasm_bindgen7convert8closuress2_1__6invokeNtNtNtCsj0N8EzF6AVm_7web_sys8features25gen_IdbVersionChangeEvent21IdbVersionChangeEventuECs9dh8yPvxFbN_20core_crypto_keystore);
4095
+ imports.wbg.__wbindgen_cast_4625c577ab2ec9ee = function(arg0) {
4096
+ const ret = BigInt.asUintN(64, arg0);
4105
4097
  return ret;
4106
4098
  };
4107
4099
  imports.wbg.__wbindgen_cast_77bc3e92745e9a35 = function(arg0, arg1) {
@@ -4110,12 +4102,20 @@ function __wbg_get_imports() {
4110
4102
  const ret = v0;
4111
4103
  return ret;
4112
4104
  };
4113
- imports.wbg.__wbindgen_cast_aaa470e682f93910 = function(arg0, arg1) {
4114
- const ret = makeMutClosure(arg0, arg1, wasm._RINvNtCs1v8yTr2kYOM_12wasm_bindgen7closure7destroyDINtNtNtCsdkdt1aaAg1T_4core3ops8function5FnMutTNtNtNtCsj0N8EzF6AVm_7web_sys8features9gen_Event5EventEEp6OutputuEL_ECs23g10cbCpHB_3idb, _RINvNvNtNtCs1v8yTr2kYOM_12wasm_bindgen7convert8closuress2_1__6invokeNtNtNtCsj0N8EzF6AVm_7web_sys8features9gen_Event5EventuECs23g10cbCpHB_3idb);
4105
+ imports.wbg.__wbindgen_cast_878857b9307e94d7 = function(arg0, arg1) {
4106
+ const ret = makeMutClosure(arg0, arg1, wasm._RINvNtCs1v8yTr2kYOM_12wasm_bindgen7closure7destroyDINtNtNtCsdkdt1aaAg1T_4core3ops8function5FnMutTNtNtNtCsj0N8EzF6AVm_7web_sys8features9gen_Event5EventEEp6OutputuEL_ECsk4VgpxaNMXX_3idb, _RINvNvNtNtCs1v8yTr2kYOM_12wasm_bindgen7convert8closuress2_1__6invokeNtNtNtCsj0N8EzF6AVm_7web_sys8features9gen_Event5EventuECsk4VgpxaNMXX_3idb);
4107
+ return ret;
4108
+ };
4109
+ imports.wbg.__wbindgen_cast_8ab00396d91dd2da = function(arg0, arg1) {
4110
+ const ret = makeMutClosure(arg0, arg1, wasm._RINvNtCs1v8yTr2kYOM_12wasm_bindgen7closure7destroyDINtNtNtCsdkdt1aaAg1T_4core3ops8function5FnMutTNtB4_7JsValueEEp6OutputuEL_ECs1CdnCKNhB1d_20wasm_bindgen_futures, _RINvNvNtNtCs1v8yTr2kYOM_12wasm_bindgen7convert8closuress2_1__6invokeNtB8_7JsValueuECs1CdnCKNhB1d_20wasm_bindgen_futures);
4111
+ return ret;
4112
+ };
4113
+ imports.wbg.__wbindgen_cast_aa1336661b979b7a = function(arg0, arg1) {
4114
+ const ret = makeMutClosure(arg0, arg1, wasm._RINvNtCs1v8yTr2kYOM_12wasm_bindgen7closure7destroyDINtNtNtCsdkdt1aaAg1T_4core3ops8function5FnMutTNtNtNtCsj0N8EzF6AVm_7web_sys8features9gen_Event5EventEEp6OutputuEL_ECsckjKPEl01w1_18indexed_db_futures, _RINvNvNtNtCs1v8yTr2kYOM_12wasm_bindgen7convert8closuress0_1__6invokeuECsckjKPEl01w1_18indexed_db_futures);
4115
4115
  return ret;
4116
4116
  };
4117
- imports.wbg.__wbindgen_cast_c750ad92937d61ae = function(arg0, arg1) {
4118
- const ret = makeMutClosure(arg0, arg1, wasm._RINvNtCs1v8yTr2kYOM_12wasm_bindgen7closure7destroyDINtNtNtCsdkdt1aaAg1T_4core3ops8function5FnMutTNtNtNtCsj0N8EzF6AVm_7web_sys8features25gen_IdbVersionChangeEvent21IdbVersionChangeEventEEp6OutputINtNtBU_6result6ResultuNtB4_7JsValueEEL_ECs8XZ7I9GocMb_15core_crypto_ffi, _RINvNvNtNtCs1v8yTr2kYOM_12wasm_bindgen7convert8closuress2_1__6invokeNtNtNtCsj0N8EzF6AVm_7web_sys8features25gen_IdbVersionChangeEvent21IdbVersionChangeEventINtNtCsdkdt1aaAg1T_4core6result6ResultuNtB8_7JsValueEECs8XZ7I9GocMb_15core_crypto_ffi);
4117
+ imports.wbg.__wbindgen_cast_b5741fc4d2a52b2b = function(arg0, arg1) {
4118
+ const ret = makeMutClosure(arg0, arg1, wasm._RINvNtCs1v8yTr2kYOM_12wasm_bindgen7closure7destroyDINtNtNtCsdkdt1aaAg1T_4core3ops8function5FnMutTNtNtNtCsj0N8EzF6AVm_7web_sys8features9gen_Event5EventEEp6OutputuEL_ECsckjKPEl01w1_18indexed_db_futures, _RINvNvNtNtCs1v8yTr2kYOM_12wasm_bindgen7convert8closuress2_1__6invokeNtNtNtCsj0N8EzF6AVm_7web_sys8features9gen_Event5EventuECsckjKPEl01w1_18indexed_db_futures);
4119
4119
  return ret;
4120
4120
  };
4121
4121
  imports.wbg.__wbindgen_cast_cb9088102bce6b30 = function(arg0, arg1) {
@@ -4941,6 +4941,10 @@ function uniffiTraitInterfaceCallWithError(makeCall, handleSuccess, handleError2
4941
4941
  }
4942
4942
  }
4943
4943
  }
4944
+ // node_modules/@ubjs/core/dist/esm/enums.js
4945
+ class UniffiEnum {
4946
+ constructor(...args) {}
4947
+ }
4944
4948
  // node_modules/@ubjs/core/dist/esm/objects.js
4945
4949
  class UniffiAbstractObject {
4946
4950
  uniffiUse(block) {
@@ -5113,101 +5117,6 @@ function version() {
5113
5117
  return nativeModule().ubrn_uniffi_core_crypto_ffi_fn_func_version(callStatus);
5114
5118
  }, FfiConverterString.lift.bind(FfiConverterString)));
5115
5119
  }
5116
-
5117
- class Uuid extends UniffiAbstractObject {
5118
- [uniffiTypeNameSymbol] = "Uuid";
5119
- [destructorGuardSymbol];
5120
- [pointerLiteralSymbol];
5121
- constructor(uuid) {
5122
- super();
5123
- const pointer = uniffiCaller.rustCallWithError(FfiConverterTypeCoreCryptoError.lift.bind(FfiConverterTypeCoreCryptoError), (callStatus) => {
5124
- return nativeModule().ubrn_uniffi_core_crypto_ffi_fn_constructor_uuid_new(FfiConverterString.lower(uuid, nativeModule().rustbuffer_alloc), callStatus);
5125
- }, FfiConverterString.lift.bind(FfiConverterString));
5126
- this[pointerLiteralSymbol] = pointer;
5127
- this[destructorGuardSymbol] = uniffiTypeUuidObjectFactory.bless(pointer);
5128
- }
5129
- toString() {
5130
- return ((__rb) => {
5131
- try {
5132
- return FfiConverterString.lift(__rb);
5133
- } finally {
5134
- nativeModule().rustbuffer_free(__rb);
5135
- }
5136
- })(uniffiCaller.rustCall((callStatus) => {
5137
- return nativeModule().ubrn_uniffi_core_crypto_ffi_fn_method_uuid_uniffi_trait_display(uniffiTypeUuidObjectFactory.clonePointer(this), callStatus);
5138
- }, FfiConverterString.lift.bind(FfiConverterString)));
5139
- }
5140
- equals(other) {
5141
- return FfiConverterBool.lift(uniffiCaller.rustCall((callStatus) => {
5142
- return nativeModule().ubrn_uniffi_core_crypto_ffi_fn_method_uuid_uniffi_trait_eq_eq(uniffiTypeUuidObjectFactory.clonePointer(this), FfiConverterTypeUuid.lower(other, nativeModule().rustbuffer_alloc), callStatus);
5143
- }, FfiConverterString.lift.bind(FfiConverterString)));
5144
- }
5145
- hashCode() {
5146
- return FfiConverterUInt64.lift(uniffiCaller.rustCall((callStatus) => {
5147
- return nativeModule().ubrn_uniffi_core_crypto_ffi_fn_method_uuid_uniffi_trait_hash(uniffiTypeUuidObjectFactory.clonePointer(this), callStatus);
5148
- }, FfiConverterString.lift.bind(FfiConverterString)));
5149
- }
5150
- uniffiDestroy() {
5151
- const ptr = this[destructorGuardSymbol];
5152
- if (ptr !== undefined) {
5153
- const pointer = uniffiTypeUuidObjectFactory.pointer(this);
5154
- uniffiTypeUuidObjectFactory.freePointer(pointer);
5155
- uniffiTypeUuidObjectFactory.unbless(ptr);
5156
- delete this[destructorGuardSymbol];
5157
- }
5158
- }
5159
- static instanceOf(obj_) {
5160
- return uniffiTypeUuidObjectFactory.isConcreteType(obj_);
5161
- }
5162
- }
5163
- var uniffiTypeUuidObjectFactory = (() => {
5164
- const registry = typeof FinalizationRegistry !== "undefined" ? new FinalizationRegistry((heldValue) => {
5165
- uniffiTypeUuidObjectFactory.freePointer(heldValue);
5166
- }) : null;
5167
- return {
5168
- create(pointer) {
5169
- const instance = Object.create(Uuid.prototype);
5170
- instance[pointerLiteralSymbol] = pointer;
5171
- instance[destructorGuardSymbol] = this.bless(pointer);
5172
- instance[uniffiTypeNameSymbol] = "Uuid";
5173
- return instance;
5174
- },
5175
- bless(p) {
5176
- const ptr = {
5177
- p,
5178
- markDestroyed: () => {
5179
- return;
5180
- }
5181
- };
5182
- if (registry) {
5183
- registry.register(ptr, p, ptr);
5184
- }
5185
- return ptr;
5186
- },
5187
- unbless(ptr_) {
5188
- if (registry) {
5189
- registry.unregister(ptr_);
5190
- }
5191
- },
5192
- pointer(obj_) {
5193
- if (obj_[destructorGuardSymbol] === undefined) {
5194
- throw new UniffiInternalError.UnexpectedNullPointer;
5195
- }
5196
- return obj_[pointerLiteralSymbol];
5197
- },
5198
- clonePointer(obj_) {
5199
- const pointer = this.pointer(obj_);
5200
- return uniffiCaller.rustCall((callStatus) => nativeModule().ubrn_uniffi_core_crypto_ffi_fn_clone_uuid(pointer, callStatus), FfiConverterString.lift);
5201
- },
5202
- freePointer(pointer) {
5203
- uniffiCaller.rustCall((callStatus) => nativeModule().ubrn_uniffi_core_crypto_ffi_fn_free_uuid(pointer, callStatus), FfiConverterString.lift);
5204
- },
5205
- isConcreteType(obj_) {
5206
- return obj_[destructorGuardSymbol] && obj_[uniffiTypeNameSymbol] === "Uuid";
5207
- }
5208
- };
5209
- })();
5210
- var FfiConverterTypeUuid = new FfiConverterObject(uniffiTypeUuidObjectFactory);
5211
5120
  var stringConverter = (() => {
5212
5121
  const encoder = new TextEncoder;
5213
5122
  const decoder = new TextDecoder;
@@ -5223,112 +5132,7 @@ var stringConverter = (() => {
5223
5132
  };
5224
5133
  })();
5225
5134
  var FfiConverterString = uniffiCreateFfiConverterString(stringConverter);
5226
-
5227
- class DeviceId extends UniffiAbstractObject {
5228
- [uniffiTypeNameSymbol] = "DeviceId";
5229
- [destructorGuardSymbol];
5230
- [pointerLiteralSymbol];
5231
- constructor(id) {
5232
- super();
5233
- const pointer = uniffiCaller.rustCall((callStatus) => {
5234
- return nativeModule().ubrn_uniffi_core_crypto_ffi_fn_constructor_deviceid_new(FfiConverterUInt64.lower(id, nativeModule().rustbuffer_alloc), callStatus);
5235
- }, FfiConverterString.lift.bind(FfiConverterString));
5236
- this[pointerLiteralSymbol] = pointer;
5237
- this[destructorGuardSymbol] = uniffiTypeDeviceIdObjectFactory.bless(pointer);
5238
- }
5239
- static fromHexString(hexString) {
5240
- return FfiConverterTypeDeviceId.lift(uniffiCaller.rustCallWithError(FfiConverterTypeCoreCryptoError.lift.bind(FfiConverterTypeCoreCryptoError), (callStatus) => {
5241
- return nativeModule().ubrn_uniffi_core_crypto_ffi_fn_constructor_deviceid_from_hex_string(FfiConverterString.lower(hexString, nativeModule().rustbuffer_alloc), callStatus);
5242
- }, FfiConverterString.lift.bind(FfiConverterString)));
5243
- }
5244
- toHexString() {
5245
- return ((__rb) => {
5246
- try {
5247
- return FfiConverterString.lift(__rb);
5248
- } finally {
5249
- nativeModule().rustbuffer_free(__rb);
5250
- }
5251
- })(uniffiCaller.rustCall((callStatus) => {
5252
- return nativeModule().ubrn_uniffi_core_crypto_ffi_fn_method_deviceid_to_hex_string(uniffiTypeDeviceIdObjectFactory.clonePointer(this), callStatus);
5253
- }, FfiConverterString.lift.bind(FfiConverterString)));
5254
- }
5255
- toU64() {
5256
- return FfiConverterUInt64.lift(uniffiCaller.rustCall((callStatus) => {
5257
- return nativeModule().ubrn_uniffi_core_crypto_ffi_fn_method_deviceid_to_u64(uniffiTypeDeviceIdObjectFactory.clonePointer(this), callStatus);
5258
- }, FfiConverterString.lift.bind(FfiConverterString)));
5259
- }
5260
- equals(other) {
5261
- return FfiConverterBool.lift(uniffiCaller.rustCall((callStatus) => {
5262
- return nativeModule().ubrn_uniffi_core_crypto_ffi_fn_method_deviceid_uniffi_trait_eq_eq(uniffiTypeDeviceIdObjectFactory.clonePointer(this), FfiConverterTypeDeviceId.lower(other, nativeModule().rustbuffer_alloc), callStatus);
5263
- }, FfiConverterString.lift.bind(FfiConverterString)));
5264
- }
5265
- hashCode() {
5266
- return FfiConverterUInt64.lift(uniffiCaller.rustCall((callStatus) => {
5267
- return nativeModule().ubrn_uniffi_core_crypto_ffi_fn_method_deviceid_uniffi_trait_hash(uniffiTypeDeviceIdObjectFactory.clonePointer(this), callStatus);
5268
- }, FfiConverterString.lift.bind(FfiConverterString)));
5269
- }
5270
- uniffiDestroy() {
5271
- const ptr = this[destructorGuardSymbol];
5272
- if (ptr !== undefined) {
5273
- const pointer = uniffiTypeDeviceIdObjectFactory.pointer(this);
5274
- uniffiTypeDeviceIdObjectFactory.freePointer(pointer);
5275
- uniffiTypeDeviceIdObjectFactory.unbless(ptr);
5276
- delete this[destructorGuardSymbol];
5277
- }
5278
- }
5279
- static instanceOf(obj_) {
5280
- return uniffiTypeDeviceIdObjectFactory.isConcreteType(obj_);
5281
- }
5282
- }
5283
- var uniffiTypeDeviceIdObjectFactory = (() => {
5284
- const registry = typeof FinalizationRegistry !== "undefined" ? new FinalizationRegistry((heldValue) => {
5285
- uniffiTypeDeviceIdObjectFactory.freePointer(heldValue);
5286
- }) : null;
5287
- return {
5288
- create(pointer) {
5289
- const instance = Object.create(DeviceId.prototype);
5290
- instance[pointerLiteralSymbol] = pointer;
5291
- instance[destructorGuardSymbol] = this.bless(pointer);
5292
- instance[uniffiTypeNameSymbol] = "DeviceId";
5293
- return instance;
5294
- },
5295
- bless(p) {
5296
- const ptr = {
5297
- p,
5298
- markDestroyed: () => {
5299
- return;
5300
- }
5301
- };
5302
- if (registry) {
5303
- registry.register(ptr, p, ptr);
5304
- }
5305
- return ptr;
5306
- },
5307
- unbless(ptr_) {
5308
- if (registry) {
5309
- registry.unregister(ptr_);
5310
- }
5311
- },
5312
- pointer(obj_) {
5313
- if (obj_[destructorGuardSymbol] === undefined) {
5314
- throw new UniffiInternalError.UnexpectedNullPointer;
5315
- }
5316
- return obj_[pointerLiteralSymbol];
5317
- },
5318
- clonePointer(obj_) {
5319
- const pointer = this.pointer(obj_);
5320
- return uniffiCaller.rustCall((callStatus) => nativeModule().ubrn_uniffi_core_crypto_ffi_fn_clone_deviceid(pointer, callStatus), FfiConverterString.lift);
5321
- },
5322
- freePointer(pointer) {
5323
- uniffiCaller.rustCall((callStatus) => nativeModule().ubrn_uniffi_core_crypto_ffi_fn_free_deviceid(pointer, callStatus), FfiConverterString.lift);
5324
- },
5325
- isConcreteType(obj_) {
5326
- return obj_[destructorGuardSymbol] && obj_[uniffiTypeNameSymbol] === "DeviceId";
5327
- }
5328
- };
5329
- })();
5330
- var FfiConverterTypeDeviceId = new FfiConverterObject(uniffiTypeDeviceIdObjectFactory);
5331
- var DeserializedClientId = (() => {
5135
+ var BuildMetadata = (() => {
5332
5136
  const defaults = () => ({});
5333
5137
  const create = (() => {
5334
5138
  return uniffiCreateRecord(defaults);
@@ -5336,431 +5140,96 @@ var DeserializedClientId = (() => {
5336
5140
  return Object.freeze({
5337
5141
  create,
5338
5142
  new: create,
5339
- defaults: () => Object.freeze(defaults()),
5340
- toString(self_) {
5341
- return ((__rb) => {
5342
- try {
5343
- return FfiConverterString.lift(__rb);
5344
- } finally {
5345
- nativeModule().rustbuffer_free(__rb);
5346
- }
5347
- })(uniffiCaller.rustCall((callStatus) => {
5348
- return nativeModule().ubrn_uniffi_core_crypto_ffi_fn_method_deserializedclientid_uniffi_trait_display(FfiConverterTypeDeserializedClientId.lower(self_, nativeModule().rustbuffer_alloc), callStatus);
5349
- }, FfiConverterString.lift.bind(FfiConverterString)));
5350
- }
5143
+ defaults: () => Object.freeze(defaults())
5351
5144
  });
5352
5145
  })();
5353
- var FfiConverterTypeDeserializedClientId = (() => {
5146
+ var FfiConverterTypeBuildMetadata = (() => {
5354
5147
 
5355
5148
  class FFIConverter extends AbstractFfiConverterByteArray {
5356
5149
  read(from) {
5357
5150
  return {
5358
- clientId: FfiConverterTypeClientId.read(from),
5359
- userId: FfiConverterTypeUuid.read(from),
5360
- deviceId: FfiConverterTypeDeviceId.read(from),
5361
- domain: FfiConverterString.read(from)
5362
- };
5363
- }
5151
+ timestamp: FfiConverterString.read(from),
5152
+ cargoDebug: FfiConverterString.read(from),
5153
+ cargoFeatures: FfiConverterString.read(from),
5154
+ optLevel: FfiConverterString.read(from),
5155
+ targetTriple: FfiConverterString.read(from),
5156
+ gitBranch: FfiConverterString.read(from),
5157
+ gitDescribe: FfiConverterString.read(from),
5158
+ gitSha: FfiConverterString.read(from),
5159
+ gitDirty: FfiConverterString.read(from)
5160
+ };
5161
+ }
5364
5162
  write(value, into) {
5365
- FfiConverterTypeClientId.write(value.clientId, into);
5366
- FfiConverterTypeUuid.write(value.userId, into);
5367
- FfiConverterTypeDeviceId.write(value.deviceId, into);
5368
- FfiConverterString.write(value.domain, into);
5163
+ FfiConverterString.write(value.timestamp, into);
5164
+ FfiConverterString.write(value.cargoDebug, into);
5165
+ FfiConverterString.write(value.cargoFeatures, into);
5166
+ FfiConverterString.write(value.optLevel, into);
5167
+ FfiConverterString.write(value.targetTriple, into);
5168
+ FfiConverterString.write(value.gitBranch, into);
5169
+ FfiConverterString.write(value.gitDescribe, into);
5170
+ FfiConverterString.write(value.gitSha, into);
5171
+ FfiConverterString.write(value.gitDirty, into);
5369
5172
  }
5370
5173
  allocationSize(value) {
5371
- return FfiConverterTypeClientId.allocationSize(value.clientId) + FfiConverterTypeUuid.allocationSize(value.userId) + FfiConverterTypeDeviceId.allocationSize(value.deviceId) + FfiConverterString.allocationSize(value.domain);
5174
+ return FfiConverterString.allocationSize(value.timestamp) + FfiConverterString.allocationSize(value.cargoDebug) + FfiConverterString.allocationSize(value.cargoFeatures) + FfiConverterString.allocationSize(value.optLevel) + FfiConverterString.allocationSize(value.targetTriple) + FfiConverterString.allocationSize(value.gitBranch) + FfiConverterString.allocationSize(value.gitDescribe) + FfiConverterString.allocationSize(value.gitSha) + FfiConverterString.allocationSize(value.gitDirty);
5372
5175
  }
5373
5176
  }
5374
5177
  return new FFIConverter;
5375
5178
  })();
5179
+ var MlsError_Tags;
5180
+ ((MlsError_Tags2) => {
5181
+ MlsError_Tags2["ConversationAlreadyExists"] = "ConversationAlreadyExists";
5182
+ MlsError_Tags2["DuplicateMessage"] = "DuplicateMessage";
5183
+ MlsError_Tags2["BufferedFutureMessage"] = "BufferedFutureMessage";
5184
+ MlsError_Tags2["WrongEpoch"] = "WrongEpoch";
5185
+ MlsError_Tags2["BufferedCommit"] = "BufferedCommit";
5186
+ MlsError_Tags2["MessageEpochTooOld"] = "MessageEpochTooOld";
5187
+ MlsError_Tags2["SelfCommitIgnored"] = "SelfCommitIgnored";
5188
+ MlsError_Tags2["UnmergedPendingGroup"] = "UnmergedPendingGroup";
5189
+ MlsError_Tags2["StaleProposal"] = "StaleProposal";
5190
+ MlsError_Tags2["StaleCommit"] = "StaleCommit";
5191
+ MlsError_Tags2["OrphanWelcome"] = "OrphanWelcome";
5192
+ MlsError_Tags2["MessageRejected"] = "MessageRejected";
5193
+ MlsError_Tags2["Other"] = "Other";
5194
+ })(MlsError_Tags ||= {});
5195
+ var MlsError = (() => {
5376
5196
 
5377
- class ClientId extends UniffiAbstractObject {
5378
- [uniffiTypeNameSymbol] = "ClientId";
5379
- [destructorGuardSymbol];
5380
- [pointerLiteralSymbol];
5381
- constructor(userId, deviceId, domain) {
5382
- super();
5383
- const pointer = uniffiCaller.rustCall((callStatus) => {
5384
- return nativeModule().ubrn_uniffi_core_crypto_ffi_fn_constructor_clientid_new(FfiConverterTypeUuid.lower(userId, nativeModule().rustbuffer_alloc), FfiConverterTypeDeviceId.lower(deviceId, nativeModule().rustbuffer_alloc), FfiConverterString.lower(domain, nativeModule().rustbuffer_alloc), callStatus);
5385
- }, FfiConverterString.lift.bind(FfiConverterString));
5386
- this[pointerLiteralSymbol] = pointer;
5387
- this[destructorGuardSymbol] = uniffiTypeClientIdObjectFactory.bless(pointer);
5388
- }
5389
- copyBytes() {
5390
- return ((__rb) => {
5391
- try {
5392
- return FfiConverterUint8Array.lift(__rb);
5393
- } finally {
5394
- nativeModule().rustbuffer_free(__rb);
5395
- }
5396
- })(uniffiCaller.rustCall((callStatus) => {
5397
- return nativeModule().ubrn_uniffi_core_crypto_ffi_fn_method_clientid_copy_bytes(uniffiTypeClientIdObjectFactory.clonePointer(this), callStatus);
5398
- }, FfiConverterString.lift.bind(FfiConverterString)));
5399
- }
5400
- deserialize() {
5401
- return ((__rb) => {
5402
- try {
5403
- return FfiConverterTypeDeserializedClientId.lift(__rb);
5404
- } finally {
5405
- nativeModule().rustbuffer_free(__rb);
5406
- }
5407
- })(uniffiCaller.rustCall((callStatus) => {
5408
- return nativeModule().ubrn_uniffi_core_crypto_ffi_fn_method_clientid_deserialize(uniffiTypeClientIdObjectFactory.clonePointer(this), callStatus);
5409
- }, FfiConverterString.lift.bind(FfiConverterString)));
5410
- }
5411
- equals(other) {
5412
- return FfiConverterBool.lift(uniffiCaller.rustCall((callStatus) => {
5413
- return nativeModule().ubrn_uniffi_core_crypto_ffi_fn_method_clientid_uniffi_trait_eq_eq(uniffiTypeClientIdObjectFactory.clonePointer(this), FfiConverterTypeClientId.lower(other, nativeModule().rustbuffer_alloc), callStatus);
5414
- }, FfiConverterString.lift.bind(FfiConverterString)));
5415
- }
5416
- hashCode() {
5417
- return FfiConverterUInt64.lift(uniffiCaller.rustCall((callStatus) => {
5418
- return nativeModule().ubrn_uniffi_core_crypto_ffi_fn_method_clientid_uniffi_trait_hash(uniffiTypeClientIdObjectFactory.clonePointer(this), callStatus);
5419
- }, FfiConverterString.lift.bind(FfiConverterString)));
5420
- }
5421
- uniffiDestroy() {
5422
- const ptr = this[destructorGuardSymbol];
5423
- if (ptr !== undefined) {
5424
- const pointer = uniffiTypeClientIdObjectFactory.pointer(this);
5425
- uniffiTypeClientIdObjectFactory.freePointer(pointer);
5426
- uniffiTypeClientIdObjectFactory.unbless(ptr);
5427
- delete this[destructorGuardSymbol];
5197
+ class ConversationAlreadyExists_ extends UniffiError {
5198
+ [uniffiTypeNameSymbol] = "MlsError";
5199
+ tag = "ConversationAlreadyExists" /* ConversationAlreadyExists */;
5200
+ inner;
5201
+ constructor(inner) {
5202
+ super("MlsError", "ConversationAlreadyExists");
5203
+ this.inner = Object.freeze(inner);
5428
5204
  }
5429
- }
5430
- static instanceOf(obj_) {
5431
- return uniffiTypeClientIdObjectFactory.isConcreteType(obj_);
5432
- }
5433
- }
5434
- var uniffiTypeClientIdObjectFactory = (() => {
5435
- const registry = typeof FinalizationRegistry !== "undefined" ? new FinalizationRegistry((heldValue) => {
5436
- uniffiTypeClientIdObjectFactory.freePointer(heldValue);
5437
- }) : null;
5438
- return {
5439
- create(pointer) {
5440
- const instance = Object.create(ClientId.prototype);
5441
- instance[pointerLiteralSymbol] = pointer;
5442
- instance[destructorGuardSymbol] = this.bless(pointer);
5443
- instance[uniffiTypeNameSymbol] = "ClientId";
5444
- return instance;
5445
- },
5446
- bless(p) {
5447
- const ptr = {
5448
- p,
5449
- markDestroyed: () => {
5450
- return;
5451
- }
5452
- };
5453
- if (registry) {
5454
- registry.register(ptr, p, ptr);
5455
- }
5456
- return ptr;
5457
- },
5458
- unbless(ptr_) {
5459
- if (registry) {
5460
- registry.unregister(ptr_);
5461
- }
5462
- },
5463
- pointer(obj_) {
5464
- if (obj_[destructorGuardSymbol] === undefined) {
5465
- throw new UniffiInternalError.UnexpectedNullPointer;
5466
- }
5467
- return obj_[pointerLiteralSymbol];
5468
- },
5469
- clonePointer(obj_) {
5470
- const pointer = this.pointer(obj_);
5471
- return uniffiCaller.rustCall((callStatus) => nativeModule().ubrn_uniffi_core_crypto_ffi_fn_clone_clientid(pointer, callStatus), FfiConverterString.lift);
5472
- },
5473
- freePointer(pointer) {
5474
- uniffiCaller.rustCall((callStatus) => nativeModule().ubrn_uniffi_core_crypto_ffi_fn_free_clientid(pointer, callStatus), FfiConverterString.lift);
5475
- },
5476
- isConcreteType(obj_) {
5477
- return obj_[destructorGuardSymbol] && obj_[uniffiTypeNameSymbol] === "ClientId";
5205
+ static new(inner) {
5206
+ return new ConversationAlreadyExists_(inner);
5478
5207
  }
5479
- };
5480
- })();
5481
- var FfiConverterTypeClientId = new FfiConverterObject(uniffiTypeClientIdObjectFactory);
5482
- var DeviceStatus;
5483
- ((DeviceStatus2) => {
5484
- DeviceStatus2[DeviceStatus2["Valid"] = 1] = "Valid";
5485
- DeviceStatus2[DeviceStatus2["Expired"] = 2] = "Expired";
5486
- DeviceStatus2[DeviceStatus2["Revoked"] = 3] = "Revoked";
5487
- })(DeviceStatus ||= {});
5488
- var FfiConverterTypeDeviceStatus = (() => {
5489
- const ordinalConverter = FfiConverterInt32;
5490
-
5491
- class FFIConverter extends AbstractFfiConverterByteArray {
5492
- read(from) {
5493
- switch (ordinalConverter.read(from)) {
5494
- case 1:
5495
- return 1 /* Valid */;
5496
- case 2:
5497
- return 2 /* Expired */;
5498
- case 3:
5499
- return 3 /* Revoked */;
5500
- default:
5501
- throw new UniffiInternalError.UnexpectedEnumCase;
5502
- }
5208
+ static instanceOf(obj) {
5209
+ return obj.tag === "ConversationAlreadyExists" /* ConversationAlreadyExists */;
5503
5210
  }
5504
- write(value, into) {
5505
- switch (value) {
5506
- case 1 /* Valid */:
5507
- return ordinalConverter.write(1, into);
5508
- case 2 /* Expired */:
5509
- return ordinalConverter.write(2, into);
5510
- case 3 /* Revoked */:
5511
- return ordinalConverter.write(3, into);
5512
- }
5211
+ static hasInner(obj) {
5212
+ return ConversationAlreadyExists_.instanceOf(obj);
5513
5213
  }
5514
- allocationSize(value) {
5515
- return ordinalConverter.allocationSize(0);
5214
+ static getInner(obj) {
5215
+ return obj.inner;
5516
5216
  }
5517
5217
  }
5518
- return new FFIConverter;
5519
- })();
5520
- var CredentialType;
5521
- ((CredentialType2) => {
5522
- CredentialType2[CredentialType2["Basic"] = 1] = "Basic";
5523
- CredentialType2[CredentialType2["X509"] = 2] = "X509";
5524
- })(CredentialType ||= {});
5525
- var FfiConverterTypeCredentialType = (() => {
5526
- const ordinalConverter = FfiConverterInt32;
5527
5218
 
5528
- class FFIConverter extends AbstractFfiConverterByteArray {
5529
- read(from) {
5530
- switch (ordinalConverter.read(from)) {
5531
- case 1:
5532
- return 1 /* Basic */;
5533
- case 2:
5534
- return 2 /* X509 */;
5535
- default:
5536
- throw new UniffiInternalError.UnexpectedEnumCase;
5537
- }
5219
+ class DuplicateMessage_ extends UniffiError {
5220
+ [uniffiTypeNameSymbol] = "MlsError";
5221
+ tag = "DuplicateMessage" /* DuplicateMessage */;
5222
+ constructor() {
5223
+ super("MlsError", "DuplicateMessage");
5538
5224
  }
5539
- write(value, into) {
5540
- switch (value) {
5541
- case 1 /* Basic */:
5542
- return ordinalConverter.write(1, into);
5543
- case 2 /* X509 */:
5544
- return ordinalConverter.write(2, into);
5545
- }
5225
+ static new() {
5226
+ return new DuplicateMessage_;
5546
5227
  }
5547
- allocationSize(value) {
5548
- return ordinalConverter.allocationSize(0);
5549
- }
5550
- }
5551
- return new FFIConverter;
5552
- })();
5553
- var FfiConverterTypeTimestamp = FfiConverterTimestamp;
5554
- var X509Identity = (() => {
5555
- const defaults = () => ({});
5556
- const create = (() => {
5557
- return uniffiCreateRecord(defaults);
5558
- })();
5559
- return Object.freeze({
5560
- create,
5561
- new: create,
5562
- defaults: () => Object.freeze(defaults())
5563
- });
5564
- })();
5565
- var FfiConverterTypeX509Identity = (() => {
5566
-
5567
- class FFIConverter extends AbstractFfiConverterByteArray {
5568
- read(from) {
5569
- return {
5570
- handle: FfiConverterString.read(from),
5571
- displayName: FfiConverterString.read(from),
5572
- domain: FfiConverterString.read(from),
5573
- certificate: FfiConverterString.read(from),
5574
- serialNumber: FfiConverterString.read(from),
5575
- notBefore: FfiConverterTypeTimestamp.read(from),
5576
- notAfter: FfiConverterTypeTimestamp.read(from)
5577
- };
5578
- }
5579
- write(value, into) {
5580
- FfiConverterString.write(value.handle, into);
5581
- FfiConverterString.write(value.displayName, into);
5582
- FfiConverterString.write(value.domain, into);
5583
- FfiConverterString.write(value.certificate, into);
5584
- FfiConverterString.write(value.serialNumber, into);
5585
- FfiConverterTypeTimestamp.write(value.notBefore, into);
5586
- FfiConverterTypeTimestamp.write(value.notAfter, into);
5587
- }
5588
- allocationSize(value) {
5589
- return FfiConverterString.allocationSize(value.handle) + FfiConverterString.allocationSize(value.displayName) + FfiConverterString.allocationSize(value.domain) + FfiConverterString.allocationSize(value.certificate) + FfiConverterString.allocationSize(value.serialNumber) + FfiConverterTypeTimestamp.allocationSize(value.notBefore) + FfiConverterTypeTimestamp.allocationSize(value.notAfter);
5590
- }
5591
- }
5592
- return new FFIConverter;
5593
- })();
5594
- var WireIdentity = (() => {
5595
- const defaults = () => ({});
5596
- const create = (() => {
5597
- return uniffiCreateRecord(defaults);
5598
- })();
5599
- return Object.freeze({
5600
- create,
5601
- new: create,
5602
- defaults: () => Object.freeze(defaults())
5603
- });
5604
- })();
5605
- var FfiConverterTypeWireIdentity = (() => {
5606
-
5607
- class FFIConverter extends AbstractFfiConverterByteArray {
5608
- read(from) {
5609
- return {
5610
- clientId: FfiConverterOptionalTypeClientId.read(from),
5611
- status: FfiConverterTypeDeviceStatus.read(from),
5612
- thumbprint: FfiConverterString.read(from),
5613
- credentialType: FfiConverterTypeCredentialType.read(from),
5614
- x509Identity: FfiConverterOptionalTypeX509Identity.read(from)
5615
- };
5616
- }
5617
- write(value, into) {
5618
- FfiConverterOptionalTypeClientId.write(value.clientId, into);
5619
- FfiConverterTypeDeviceStatus.write(value.status, into);
5620
- FfiConverterString.write(value.thumbprint, into);
5621
- FfiConverterTypeCredentialType.write(value.credentialType, into);
5622
- FfiConverterOptionalTypeX509Identity.write(value.x509Identity, into);
5623
- }
5624
- allocationSize(value) {
5625
- return FfiConverterOptionalTypeClientId.allocationSize(value.clientId) + FfiConverterTypeDeviceStatus.allocationSize(value.status) + FfiConverterString.allocationSize(value.thumbprint) + FfiConverterTypeCredentialType.allocationSize(value.credentialType) + FfiConverterOptionalTypeX509Identity.allocationSize(value.x509Identity);
5626
- }
5627
- }
5628
- return new FFIConverter;
5629
- })();
5630
- var BufferedDecryptedMessage = (() => {
5631
- const defaults = () => ({});
5632
- const create = (() => {
5633
- return uniffiCreateRecord(defaults);
5634
- })();
5635
- return Object.freeze({
5636
- create,
5637
- new: create,
5638
- defaults: () => Object.freeze(defaults())
5639
- });
5640
- })();
5641
- var FfiConverterTypeBufferedDecryptedMessage = (() => {
5642
-
5643
- class FFIConverter extends AbstractFfiConverterByteArray {
5644
- read(from) {
5645
- return {
5646
- message: FfiConverterOptionalBytes.read(from),
5647
- isActive: FfiConverterBool.read(from),
5648
- commitDelay: FfiConverterOptionalUInt64.read(from),
5649
- senderClientId: FfiConverterOptionalTypeClientId.read(from),
5650
- identity: FfiConverterTypeWireIdentity.read(from)
5651
- };
5652
- }
5653
- write(value, into) {
5654
- FfiConverterOptionalBytes.write(value.message, into);
5655
- FfiConverterBool.write(value.isActive, into);
5656
- FfiConverterOptionalUInt64.write(value.commitDelay, into);
5657
- FfiConverterOptionalTypeClientId.write(value.senderClientId, into);
5658
- FfiConverterTypeWireIdentity.write(value.identity, into);
5659
- }
5660
- allocationSize(value) {
5661
- return FfiConverterOptionalBytes.allocationSize(value.message) + FfiConverterBool.allocationSize(value.isActive) + FfiConverterOptionalUInt64.allocationSize(value.commitDelay) + FfiConverterOptionalTypeClientId.allocationSize(value.senderClientId) + FfiConverterTypeWireIdentity.allocationSize(value.identity);
5662
- }
5663
- }
5664
- return new FFIConverter;
5665
- })();
5666
- var BuildMetadata = (() => {
5667
- const defaults = () => ({});
5668
- const create = (() => {
5669
- return uniffiCreateRecord(defaults);
5670
- })();
5671
- return Object.freeze({
5672
- create,
5673
- new: create,
5674
- defaults: () => Object.freeze(defaults())
5675
- });
5676
- })();
5677
- var FfiConverterTypeBuildMetadata = (() => {
5678
-
5679
- class FFIConverter extends AbstractFfiConverterByteArray {
5680
- read(from) {
5681
- return {
5682
- timestamp: FfiConverterString.read(from),
5683
- cargoDebug: FfiConverterString.read(from),
5684
- cargoFeatures: FfiConverterString.read(from),
5685
- optLevel: FfiConverterString.read(from),
5686
- targetTriple: FfiConverterString.read(from),
5687
- gitBranch: FfiConverterString.read(from),
5688
- gitDescribe: FfiConverterString.read(from),
5689
- gitSha: FfiConverterString.read(from),
5690
- gitDirty: FfiConverterString.read(from)
5691
- };
5692
- }
5693
- write(value, into) {
5694
- FfiConverterString.write(value.timestamp, into);
5695
- FfiConverterString.write(value.cargoDebug, into);
5696
- FfiConverterString.write(value.cargoFeatures, into);
5697
- FfiConverterString.write(value.optLevel, into);
5698
- FfiConverterString.write(value.targetTriple, into);
5699
- FfiConverterString.write(value.gitBranch, into);
5700
- FfiConverterString.write(value.gitDescribe, into);
5701
- FfiConverterString.write(value.gitSha, into);
5702
- FfiConverterString.write(value.gitDirty, into);
5703
- }
5704
- allocationSize(value) {
5705
- return FfiConverterString.allocationSize(value.timestamp) + FfiConverterString.allocationSize(value.cargoDebug) + FfiConverterString.allocationSize(value.cargoFeatures) + FfiConverterString.allocationSize(value.optLevel) + FfiConverterString.allocationSize(value.targetTriple) + FfiConverterString.allocationSize(value.gitBranch) + FfiConverterString.allocationSize(value.gitDescribe) + FfiConverterString.allocationSize(value.gitSha) + FfiConverterString.allocationSize(value.gitDirty);
5706
- }
5707
- }
5708
- return new FFIConverter;
5709
- })();
5710
- var MlsError_Tags;
5711
- ((MlsError_Tags2) => {
5712
- MlsError_Tags2["ConversationAlreadyExists"] = "ConversationAlreadyExists";
5713
- MlsError_Tags2["DuplicateMessage"] = "DuplicateMessage";
5714
- MlsError_Tags2["BufferedFutureMessage"] = "BufferedFutureMessage";
5715
- MlsError_Tags2["WrongEpoch"] = "WrongEpoch";
5716
- MlsError_Tags2["BufferedCommit"] = "BufferedCommit";
5717
- MlsError_Tags2["MessageEpochTooOld"] = "MessageEpochTooOld";
5718
- MlsError_Tags2["SelfCommitIgnored"] = "SelfCommitIgnored";
5719
- MlsError_Tags2["UnmergedPendingGroup"] = "UnmergedPendingGroup";
5720
- MlsError_Tags2["StaleProposal"] = "StaleProposal";
5721
- MlsError_Tags2["StaleCommit"] = "StaleCommit";
5722
- MlsError_Tags2["OrphanWelcome"] = "OrphanWelcome";
5723
- MlsError_Tags2["MessageRejected"] = "MessageRejected";
5724
- MlsError_Tags2["Other"] = "Other";
5725
- })(MlsError_Tags ||= {});
5726
- var MlsError = (() => {
5727
-
5728
- class ConversationAlreadyExists_ extends UniffiError {
5729
- [uniffiTypeNameSymbol] = "MlsError";
5730
- tag = "ConversationAlreadyExists" /* ConversationAlreadyExists */;
5731
- inner;
5732
- constructor(inner) {
5733
- super("MlsError", "ConversationAlreadyExists");
5734
- this.inner = Object.freeze(inner);
5735
- }
5736
- static new(inner) {
5737
- return new ConversationAlreadyExists_(inner);
5738
- }
5739
- static instanceOf(obj) {
5740
- return obj.tag === "ConversationAlreadyExists" /* ConversationAlreadyExists */;
5741
- }
5742
- static hasInner(obj) {
5743
- return ConversationAlreadyExists_.instanceOf(obj);
5744
- }
5745
- static getInner(obj) {
5746
- return obj.inner;
5747
- }
5748
- }
5749
-
5750
- class DuplicateMessage_ extends UniffiError {
5751
- [uniffiTypeNameSymbol] = "MlsError";
5752
- tag = "DuplicateMessage" /* DuplicateMessage */;
5753
- constructor() {
5754
- super("MlsError", "DuplicateMessage");
5755
- }
5756
- static new() {
5757
- return new DuplicateMessage_;
5758
- }
5759
- static instanceOf(obj) {
5760
- return obj.tag === "DuplicateMessage" /* DuplicateMessage */;
5761
- }
5762
- static hasInner(obj) {
5763
- return false;
5228
+ static instanceOf(obj) {
5229
+ return obj.tag === "DuplicateMessage" /* DuplicateMessage */;
5230
+ }
5231
+ static hasInner(obj) {
5232
+ return false;
5764
5233
  }
5765
5234
  }
5766
5235
 
@@ -5987,9 +5456,7 @@ var FfiConverterTypeMlsError = (() => {
5987
5456
  read(from) {
5988
5457
  switch (ordinalConverter.read(from)) {
5989
5458
  case 1:
5990
- return new MlsError.ConversationAlreadyExists({
5991
- conversationId: FfiConverterUint8Array.read(from)
5992
- });
5459
+ return new MlsError.ConversationAlreadyExists({ conversationId: FfiConverterUint8Array.read(from) });
5993
5460
  case 2:
5994
5461
  return new MlsError.DuplicateMessage;
5995
5462
  case 3:
@@ -6011,13 +5478,9 @@ var FfiConverterTypeMlsError = (() => {
6011
5478
  case 11:
6012
5479
  return new MlsError.OrphanWelcome;
6013
5480
  case 12:
6014
- return new MlsError.MessageRejected({
6015
- reason: FfiConverterString.read(from)
6016
- });
5481
+ return new MlsError.MessageRejected({ reason: FfiConverterString.read(from) });
6017
5482
  case 13:
6018
- return new MlsError.Other({
6019
- msg: FfiConverterString.read(from)
6020
- });
5483
+ return new MlsError.Other({ msg: FfiConverterString.read(from) });
6021
5484
  default:
6022
5485
  throw new UniffiInternalError.UnexpectedEnumCase;
6023
5486
  }
@@ -6248,9 +5711,7 @@ var FfiConverterTypeProteusError = (() => {
6248
5711
  case 3:
6249
5712
  return new ProteusError.RemoteIdentityChanged;
6250
5713
  case 4:
6251
- return new ProteusError.Other({
6252
- errorCode: FfiConverterUInt16.read(from)
6253
- });
5714
+ return new ProteusError.Other({ errorCode: FfiConverterUInt16.read(from) });
6254
5715
  default:
6255
5716
  throw new UniffiInternalError.UnexpectedEnumCase;
6256
5717
  }
@@ -6441,25 +5902,15 @@ var FfiConverterTypeCoreCryptoError = (() => {
6441
5902
  read(from) {
6442
5903
  switch (ordinalConverter.read(from)) {
6443
5904
  case 1:
6444
- return new CoreCryptoError.Mls({
6445
- mlsError: FfiConverterTypeMlsError.read(from)
6446
- });
5905
+ return new CoreCryptoError.Mls({ mlsError: FfiConverterTypeMlsError.read(from) });
6447
5906
  case 2:
6448
- return new CoreCryptoError.Proteus({
6449
- exception: FfiConverterTypeProteusError.read(from)
6450
- });
5907
+ return new CoreCryptoError.Proteus({ exception: FfiConverterTypeProteusError.read(from) });
6451
5908
  case 3:
6452
- return new CoreCryptoError.E2ei({
6453
- e2eiError: FfiConverterString.read(from)
6454
- });
5909
+ return new CoreCryptoError.E2ei({ e2eiError: FfiConverterString.read(from) });
6455
5910
  case 4:
6456
- return new CoreCryptoError.TransactionFailed({
6457
- error: FfiConverterString.read(from)
6458
- });
5911
+ return new CoreCryptoError.TransactionFailed({ error: FfiConverterString.read(from) });
6459
5912
  case 5:
6460
- return new CoreCryptoError.Other({
6461
- msg: FfiConverterString.read(from)
6462
- });
5913
+ return new CoreCryptoError.Other({ msg: FfiConverterString.read(from) });
6463
5914
  default:
6464
5915
  throw new UniffiInternalError.UnexpectedEnumCase;
6465
5916
  }
@@ -6550,42 +6001,485 @@ class Welcome extends UniffiAbstractObject {
6550
6001
  return nativeModule().ubrn_uniffi_core_crypto_ffi_fn_constructor_welcome_new(FfiConverterUint8Array.lower(bytes, nativeModule().rustbuffer_alloc), callStatus);
6551
6002
  }, FfiConverterString.lift.bind(FfiConverterString));
6552
6003
  this[pointerLiteralSymbol] = pointer;
6553
- this[destructorGuardSymbol] = uniffiTypeWelcomeObjectFactory.bless(pointer);
6004
+ this[destructorGuardSymbol] = uniffiTypeWelcomeObjectFactory.bless(pointer);
6005
+ }
6006
+ serialize() {
6007
+ return ((__rb) => {
6008
+ try {
6009
+ return FfiConverterUint8Array.lift(__rb);
6010
+ } finally {
6011
+ nativeModule().rustbuffer_free(__rb);
6012
+ }
6013
+ })(uniffiCaller.rustCallWithError(FfiConverterTypeCoreCryptoError.lift.bind(FfiConverterTypeCoreCryptoError), (callStatus) => {
6014
+ return nativeModule().ubrn_uniffi_core_crypto_ffi_fn_method_welcome_serialize(uniffiTypeWelcomeObjectFactory.clonePointer(this), callStatus);
6015
+ }, FfiConverterString.lift.bind(FfiConverterString)));
6016
+ }
6017
+ uniffiDestroy() {
6018
+ const ptr = this[destructorGuardSymbol];
6019
+ if (ptr !== undefined) {
6020
+ const pointer = uniffiTypeWelcomeObjectFactory.pointer(this);
6021
+ uniffiTypeWelcomeObjectFactory.freePointer(pointer);
6022
+ uniffiTypeWelcomeObjectFactory.unbless(ptr);
6023
+ delete this[destructorGuardSymbol];
6024
+ }
6025
+ }
6026
+ static instanceOf(obj_) {
6027
+ return uniffiTypeWelcomeObjectFactory.isConcreteType(obj_);
6028
+ }
6029
+ }
6030
+ var uniffiTypeWelcomeObjectFactory = (() => {
6031
+ const registry = typeof FinalizationRegistry !== "undefined" ? new FinalizationRegistry((heldValue) => {
6032
+ uniffiTypeWelcomeObjectFactory.freePointer(heldValue);
6033
+ }) : null;
6034
+ return {
6035
+ create(pointer) {
6036
+ const instance = Object.create(Welcome.prototype);
6037
+ instance[pointerLiteralSymbol] = pointer;
6038
+ instance[destructorGuardSymbol] = this.bless(pointer);
6039
+ instance[uniffiTypeNameSymbol] = "Welcome";
6040
+ return instance;
6041
+ },
6042
+ bless(p) {
6043
+ const ptr = {
6044
+ p,
6045
+ markDestroyed: () => {
6046
+ return;
6047
+ }
6048
+ };
6049
+ if (registry) {
6050
+ registry.register(ptr, p, ptr);
6051
+ }
6052
+ return ptr;
6053
+ },
6054
+ unbless(ptr_) {
6055
+ if (registry) {
6056
+ registry.unregister(ptr_);
6057
+ }
6058
+ },
6059
+ pointer(obj_) {
6060
+ if (obj_[destructorGuardSymbol] === undefined) {
6061
+ throw new UniffiInternalError.UnexpectedNullPointer;
6062
+ }
6063
+ return obj_[pointerLiteralSymbol];
6064
+ },
6065
+ clonePointer(obj_) {
6066
+ const pointer = this.pointer(obj_);
6067
+ return uniffiCaller.rustCall((callStatus) => nativeModule().ubrn_uniffi_core_crypto_ffi_fn_clone_welcome(pointer, callStatus), FfiConverterString.lift);
6068
+ },
6069
+ freePointer(pointer) {
6070
+ uniffiCaller.rustCall((callStatus) => nativeModule().ubrn_uniffi_core_crypto_ffi_fn_free_welcome(pointer, callStatus), FfiConverterString.lift);
6071
+ },
6072
+ isConcreteType(obj_) {
6073
+ return obj_[destructorGuardSymbol] && obj_[uniffiTypeNameSymbol] === "Welcome";
6074
+ }
6075
+ };
6076
+ })();
6077
+ var FfiConverterTypeWelcome = new FfiConverterObject(uniffiTypeWelcomeObjectFactory);
6078
+ var MlsGroupInfoEncryptionType;
6079
+ ((MlsGroupInfoEncryptionType2) => {
6080
+ MlsGroupInfoEncryptionType2[MlsGroupInfoEncryptionType2["Plaintext"] = 1] = "Plaintext";
6081
+ MlsGroupInfoEncryptionType2[MlsGroupInfoEncryptionType2["JweEncrypted"] = 2] = "JweEncrypted";
6082
+ })(MlsGroupInfoEncryptionType ||= {});
6083
+ var FfiConverterTypeMlsGroupInfoEncryptionType = (() => {
6084
+ const ordinalConverter = FfiConverterInt32;
6085
+
6086
+ class FFIConverter extends AbstractFfiConverterByteArray {
6087
+ read(from) {
6088
+ switch (ordinalConverter.read(from)) {
6089
+ case 1:
6090
+ return 1 /* Plaintext */;
6091
+ case 2:
6092
+ return 2 /* JweEncrypted */;
6093
+ default:
6094
+ throw new UniffiInternalError.UnexpectedEnumCase;
6095
+ }
6096
+ }
6097
+ write(value, into) {
6098
+ switch (value) {
6099
+ case 1 /* Plaintext */:
6100
+ return ordinalConverter.write(1, into);
6101
+ case 2 /* JweEncrypted */:
6102
+ return ordinalConverter.write(2, into);
6103
+ }
6104
+ }
6105
+ allocationSize(value) {
6106
+ return ordinalConverter.allocationSize(0);
6107
+ }
6108
+ }
6109
+ return new FFIConverter;
6110
+ })();
6111
+ var MlsRatchetTreeType;
6112
+ ((MlsRatchetTreeType2) => {
6113
+ MlsRatchetTreeType2[MlsRatchetTreeType2["Full"] = 1] = "Full";
6114
+ MlsRatchetTreeType2[MlsRatchetTreeType2["Delta"] = 2] = "Delta";
6115
+ MlsRatchetTreeType2[MlsRatchetTreeType2["ByRef"] = 3] = "ByRef";
6116
+ })(MlsRatchetTreeType ||= {});
6117
+ var FfiConverterTypeMlsRatchetTreeType = (() => {
6118
+ const ordinalConverter = FfiConverterInt32;
6119
+
6120
+ class FFIConverter extends AbstractFfiConverterByteArray {
6121
+ read(from) {
6122
+ switch (ordinalConverter.read(from)) {
6123
+ case 1:
6124
+ return 1 /* Full */;
6125
+ case 2:
6126
+ return 2 /* Delta */;
6127
+ case 3:
6128
+ return 3 /* ByRef */;
6129
+ default:
6130
+ throw new UniffiInternalError.UnexpectedEnumCase;
6131
+ }
6132
+ }
6133
+ write(value, into) {
6134
+ switch (value) {
6135
+ case 1 /* Full */:
6136
+ return ordinalConverter.write(1, into);
6137
+ case 2 /* Delta */:
6138
+ return ordinalConverter.write(2, into);
6139
+ case 3 /* ByRef */:
6140
+ return ordinalConverter.write(3, into);
6141
+ }
6142
+ }
6143
+ allocationSize(value) {
6144
+ return ordinalConverter.allocationSize(0);
6145
+ }
6146
+ }
6147
+ return new FFIConverter;
6148
+ })();
6149
+ var GroupInfoBundle = (() => {
6150
+ const defaults = () => ({});
6151
+ const create = (() => {
6152
+ return uniffiCreateRecord(defaults);
6153
+ })();
6154
+ return Object.freeze({
6155
+ create,
6156
+ new: create,
6157
+ defaults: () => Object.freeze(defaults())
6158
+ });
6159
+ })();
6160
+ var FfiConverterTypeGroupInfoBundle = (() => {
6161
+
6162
+ class FFIConverter extends AbstractFfiConverterByteArray {
6163
+ read(from) {
6164
+ return {
6165
+ encryptionType: FfiConverterTypeMlsGroupInfoEncryptionType.read(from),
6166
+ ratchetTreeType: FfiConverterTypeMlsRatchetTreeType.read(from),
6167
+ payload: FfiConverterUint8Array.read(from)
6168
+ };
6169
+ }
6170
+ write(value, into) {
6171
+ FfiConverterTypeMlsGroupInfoEncryptionType.write(value.encryptionType, into);
6172
+ FfiConverterTypeMlsRatchetTreeType.write(value.ratchetTreeType, into);
6173
+ FfiConverterUint8Array.write(value.payload, into);
6174
+ }
6175
+ allocationSize(value) {
6176
+ return FfiConverterTypeMlsGroupInfoEncryptionType.allocationSize(value.encryptionType) + FfiConverterTypeMlsRatchetTreeType.allocationSize(value.ratchetTreeType) + FfiConverterUint8Array.allocationSize(value.payload);
6177
+ }
6178
+ }
6179
+ return new FFIConverter;
6180
+ })();
6181
+ var CommitBundle = (() => {
6182
+ const defaults = () => ({});
6183
+ const create = (() => {
6184
+ return uniffiCreateRecord(defaults);
6185
+ })();
6186
+ return Object.freeze({
6187
+ create,
6188
+ new: create,
6189
+ defaults: () => Object.freeze(defaults())
6190
+ });
6191
+ })();
6192
+ var FfiConverterTypeCommitBundle = (() => {
6193
+
6194
+ class FFIConverter extends AbstractFfiConverterByteArray {
6195
+ read(from) {
6196
+ return {
6197
+ welcome: FfiConverterOptionalTypeWelcome.read(from),
6198
+ commit: FfiConverterUint8Array.read(from),
6199
+ groupInfo: FfiConverterTypeGroupInfoBundle.read(from),
6200
+ encryptedMessage: FfiConverterOptionalBytes.read(from)
6201
+ };
6202
+ }
6203
+ write(value, into) {
6204
+ FfiConverterOptionalTypeWelcome.write(value.welcome, into);
6205
+ FfiConverterUint8Array.write(value.commit, into);
6206
+ FfiConverterTypeGroupInfoBundle.write(value.groupInfo, into);
6207
+ FfiConverterOptionalBytes.write(value.encryptedMessage, into);
6208
+ }
6209
+ allocationSize(value) {
6210
+ return FfiConverterOptionalTypeWelcome.allocationSize(value.welcome) + FfiConverterUint8Array.allocationSize(value.commit) + FfiConverterTypeGroupInfoBundle.allocationSize(value.groupInfo) + FfiConverterOptionalBytes.allocationSize(value.encryptedMessage);
6211
+ }
6212
+ }
6213
+ return new FFIConverter;
6214
+ })();
6215
+
6216
+ class ClientId extends UniffiAbstractObject {
6217
+ [uniffiTypeNameSymbol] = "ClientId";
6218
+ [destructorGuardSymbol];
6219
+ [pointerLiteralSymbol];
6220
+ constructor(userId, deviceId, domain) {
6221
+ super();
6222
+ const pointer = uniffiCaller.rustCall((callStatus) => {
6223
+ return nativeModule().ubrn_uniffi_core_crypto_ffi_fn_constructor_clientid_new(FfiConverterTypeUuid.lower(userId, nativeModule().rustbuffer_alloc), FfiConverterTypeDeviceId.lower(deviceId, nativeModule().rustbuffer_alloc), FfiConverterString.lower(domain, nativeModule().rustbuffer_alloc), callStatus);
6224
+ }, FfiConverterString.lift.bind(FfiConverterString));
6225
+ this[pointerLiteralSymbol] = pointer;
6226
+ this[destructorGuardSymbol] = uniffiTypeClientIdObjectFactory.bless(pointer);
6227
+ }
6228
+ copyBytes() {
6229
+ return ((__rb) => {
6230
+ try {
6231
+ return FfiConverterUint8Array.lift(__rb);
6232
+ } finally {
6233
+ nativeModule().rustbuffer_free(__rb);
6234
+ }
6235
+ })(uniffiCaller.rustCall((callStatus) => {
6236
+ return nativeModule().ubrn_uniffi_core_crypto_ffi_fn_method_clientid_copy_bytes(uniffiTypeClientIdObjectFactory.clonePointer(this), callStatus);
6237
+ }, FfiConverterString.lift.bind(FfiConverterString)));
6238
+ }
6239
+ deserialize() {
6240
+ return ((__rb) => {
6241
+ try {
6242
+ return FfiConverterTypeDeserializedClientId.lift(__rb);
6243
+ } finally {
6244
+ nativeModule().rustbuffer_free(__rb);
6245
+ }
6246
+ })(uniffiCaller.rustCall((callStatus) => {
6247
+ return nativeModule().ubrn_uniffi_core_crypto_ffi_fn_method_clientid_deserialize(uniffiTypeClientIdObjectFactory.clonePointer(this), callStatus);
6248
+ }, FfiConverterString.lift.bind(FfiConverterString)));
6249
+ }
6250
+ equals(other) {
6251
+ return FfiConverterBool.lift(uniffiCaller.rustCall((callStatus) => {
6252
+ return nativeModule().ubrn_uniffi_core_crypto_ffi_fn_method_clientid_uniffi_trait_eq_eq(uniffiTypeClientIdObjectFactory.clonePointer(this), FfiConverterTypeClientId.lower(other, nativeModule().rustbuffer_alloc), callStatus);
6253
+ }, FfiConverterString.lift.bind(FfiConverterString)));
6254
+ }
6255
+ hashCode() {
6256
+ return FfiConverterUInt64.lift(uniffiCaller.rustCall((callStatus) => {
6257
+ return nativeModule().ubrn_uniffi_core_crypto_ffi_fn_method_clientid_uniffi_trait_hash(uniffiTypeClientIdObjectFactory.clonePointer(this), callStatus);
6258
+ }, FfiConverterString.lift.bind(FfiConverterString)));
6259
+ }
6260
+ uniffiDestroy() {
6261
+ const ptr = this[destructorGuardSymbol];
6262
+ if (ptr !== undefined) {
6263
+ const pointer = uniffiTypeClientIdObjectFactory.pointer(this);
6264
+ uniffiTypeClientIdObjectFactory.freePointer(pointer);
6265
+ uniffiTypeClientIdObjectFactory.unbless(ptr);
6266
+ delete this[destructorGuardSymbol];
6267
+ }
6268
+ }
6269
+ static instanceOf(obj_) {
6270
+ return uniffiTypeClientIdObjectFactory.isConcreteType(obj_);
6271
+ }
6272
+ }
6273
+ var uniffiTypeClientIdObjectFactory = (() => {
6274
+ const registry = typeof FinalizationRegistry !== "undefined" ? new FinalizationRegistry((heldValue) => {
6275
+ uniffiTypeClientIdObjectFactory.freePointer(heldValue);
6276
+ }) : null;
6277
+ return {
6278
+ create(pointer) {
6279
+ const instance = Object.create(ClientId.prototype);
6280
+ instance[pointerLiteralSymbol] = pointer;
6281
+ instance[destructorGuardSymbol] = this.bless(pointer);
6282
+ instance[uniffiTypeNameSymbol] = "ClientId";
6283
+ return instance;
6284
+ },
6285
+ bless(p) {
6286
+ const ptr = {
6287
+ p,
6288
+ markDestroyed: () => {
6289
+ return;
6290
+ }
6291
+ };
6292
+ if (registry) {
6293
+ registry.register(ptr, p, ptr);
6294
+ }
6295
+ return ptr;
6296
+ },
6297
+ unbless(ptr_) {
6298
+ if (registry) {
6299
+ registry.unregister(ptr_);
6300
+ }
6301
+ },
6302
+ pointer(obj_) {
6303
+ if (obj_[destructorGuardSymbol] === undefined) {
6304
+ throw new UniffiInternalError.UnexpectedNullPointer;
6305
+ }
6306
+ return obj_[pointerLiteralSymbol];
6307
+ },
6308
+ clonePointer(obj_) {
6309
+ const pointer = this.pointer(obj_);
6310
+ return uniffiCaller.rustCall((callStatus) => nativeModule().ubrn_uniffi_core_crypto_ffi_fn_clone_clientid(pointer, callStatus), FfiConverterString.lift);
6311
+ },
6312
+ freePointer(pointer) {
6313
+ uniffiCaller.rustCall((callStatus) => nativeModule().ubrn_uniffi_core_crypto_ffi_fn_free_clientid(pointer, callStatus), FfiConverterString.lift);
6314
+ },
6315
+ isConcreteType(obj_) {
6316
+ return obj_[destructorGuardSymbol] && obj_[uniffiTypeNameSymbol] === "ClientId";
6317
+ }
6318
+ };
6319
+ })();
6320
+ var FfiConverterTypeClientId = new FfiConverterObject(uniffiTypeClientIdObjectFactory);
6321
+
6322
+ class Uuid extends UniffiAbstractObject {
6323
+ [uniffiTypeNameSymbol] = "Uuid";
6324
+ [destructorGuardSymbol];
6325
+ [pointerLiteralSymbol];
6326
+ constructor(uuid) {
6327
+ super();
6328
+ const pointer = uniffiCaller.rustCallWithError(FfiConverterTypeCoreCryptoError.lift.bind(FfiConverterTypeCoreCryptoError), (callStatus) => {
6329
+ return nativeModule().ubrn_uniffi_core_crypto_ffi_fn_constructor_uuid_new(FfiConverterString.lower(uuid, nativeModule().rustbuffer_alloc), callStatus);
6330
+ }, FfiConverterString.lift.bind(FfiConverterString));
6331
+ this[pointerLiteralSymbol] = pointer;
6332
+ this[destructorGuardSymbol] = uniffiTypeUuidObjectFactory.bless(pointer);
6333
+ }
6334
+ toString() {
6335
+ return ((__rb) => {
6336
+ try {
6337
+ return FfiConverterString.lift(__rb);
6338
+ } finally {
6339
+ nativeModule().rustbuffer_free(__rb);
6340
+ }
6341
+ })(uniffiCaller.rustCall((callStatus) => {
6342
+ return nativeModule().ubrn_uniffi_core_crypto_ffi_fn_method_uuid_uniffi_trait_display(uniffiTypeUuidObjectFactory.clonePointer(this), callStatus);
6343
+ }, FfiConverterString.lift.bind(FfiConverterString)));
6344
+ }
6345
+ equals(other) {
6346
+ return FfiConverterBool.lift(uniffiCaller.rustCall((callStatus) => {
6347
+ return nativeModule().ubrn_uniffi_core_crypto_ffi_fn_method_uuid_uniffi_trait_eq_eq(uniffiTypeUuidObjectFactory.clonePointer(this), FfiConverterTypeUuid.lower(other, nativeModule().rustbuffer_alloc), callStatus);
6348
+ }, FfiConverterString.lift.bind(FfiConverterString)));
6349
+ }
6350
+ hashCode() {
6351
+ return FfiConverterUInt64.lift(uniffiCaller.rustCall((callStatus) => {
6352
+ return nativeModule().ubrn_uniffi_core_crypto_ffi_fn_method_uuid_uniffi_trait_hash(uniffiTypeUuidObjectFactory.clonePointer(this), callStatus);
6353
+ }, FfiConverterString.lift.bind(FfiConverterString)));
6354
+ }
6355
+ uniffiDestroy() {
6356
+ const ptr = this[destructorGuardSymbol];
6357
+ if (ptr !== undefined) {
6358
+ const pointer = uniffiTypeUuidObjectFactory.pointer(this);
6359
+ uniffiTypeUuidObjectFactory.freePointer(pointer);
6360
+ uniffiTypeUuidObjectFactory.unbless(ptr);
6361
+ delete this[destructorGuardSymbol];
6362
+ }
6363
+ }
6364
+ static instanceOf(obj_) {
6365
+ return uniffiTypeUuidObjectFactory.isConcreteType(obj_);
6366
+ }
6367
+ }
6368
+ var uniffiTypeUuidObjectFactory = (() => {
6369
+ const registry = typeof FinalizationRegistry !== "undefined" ? new FinalizationRegistry((heldValue) => {
6370
+ uniffiTypeUuidObjectFactory.freePointer(heldValue);
6371
+ }) : null;
6372
+ return {
6373
+ create(pointer) {
6374
+ const instance = Object.create(Uuid.prototype);
6375
+ instance[pointerLiteralSymbol] = pointer;
6376
+ instance[destructorGuardSymbol] = this.bless(pointer);
6377
+ instance[uniffiTypeNameSymbol] = "Uuid";
6378
+ return instance;
6379
+ },
6380
+ bless(p) {
6381
+ const ptr = {
6382
+ p,
6383
+ markDestroyed: () => {
6384
+ return;
6385
+ }
6386
+ };
6387
+ if (registry) {
6388
+ registry.register(ptr, p, ptr);
6389
+ }
6390
+ return ptr;
6391
+ },
6392
+ unbless(ptr_) {
6393
+ if (registry) {
6394
+ registry.unregister(ptr_);
6395
+ }
6396
+ },
6397
+ pointer(obj_) {
6398
+ if (obj_[destructorGuardSymbol] === undefined) {
6399
+ throw new UniffiInternalError.UnexpectedNullPointer;
6400
+ }
6401
+ return obj_[pointerLiteralSymbol];
6402
+ },
6403
+ clonePointer(obj_) {
6404
+ const pointer = this.pointer(obj_);
6405
+ return uniffiCaller.rustCall((callStatus) => nativeModule().ubrn_uniffi_core_crypto_ffi_fn_clone_uuid(pointer, callStatus), FfiConverterString.lift);
6406
+ },
6407
+ freePointer(pointer) {
6408
+ uniffiCaller.rustCall((callStatus) => nativeModule().ubrn_uniffi_core_crypto_ffi_fn_free_uuid(pointer, callStatus), FfiConverterString.lift);
6409
+ },
6410
+ isConcreteType(obj_) {
6411
+ return obj_[destructorGuardSymbol] && obj_[uniffiTypeNameSymbol] === "Uuid";
6412
+ }
6413
+ };
6414
+ })();
6415
+ var FfiConverterTypeUuid = new FfiConverterObject(uniffiTypeUuidObjectFactory);
6416
+
6417
+ class DeviceId extends UniffiAbstractObject {
6418
+ [uniffiTypeNameSymbol] = "DeviceId";
6419
+ [destructorGuardSymbol];
6420
+ [pointerLiteralSymbol];
6421
+ constructor(id) {
6422
+ super();
6423
+ const pointer = uniffiCaller.rustCall((callStatus) => {
6424
+ return nativeModule().ubrn_uniffi_core_crypto_ffi_fn_constructor_deviceid_new(FfiConverterUInt64.lower(id, nativeModule().rustbuffer_alloc), callStatus);
6425
+ }, FfiConverterString.lift.bind(FfiConverterString));
6426
+ this[pointerLiteralSymbol] = pointer;
6427
+ this[destructorGuardSymbol] = uniffiTypeDeviceIdObjectFactory.bless(pointer);
6554
6428
  }
6555
- serialize() {
6429
+ static fromHexString(hexString) {
6430
+ return FfiConverterTypeDeviceId.lift(uniffiCaller.rustCallWithError(FfiConverterTypeCoreCryptoError.lift.bind(FfiConverterTypeCoreCryptoError), (callStatus) => {
6431
+ return nativeModule().ubrn_uniffi_core_crypto_ffi_fn_constructor_deviceid_from_hex_string(FfiConverterString.lower(hexString, nativeModule().rustbuffer_alloc), callStatus);
6432
+ }, FfiConverterString.lift.bind(FfiConverterString)));
6433
+ }
6434
+ toHexString() {
6556
6435
  return ((__rb) => {
6557
6436
  try {
6558
- return FfiConverterUint8Array.lift(__rb);
6437
+ return FfiConverterString.lift(__rb);
6559
6438
  } finally {
6560
6439
  nativeModule().rustbuffer_free(__rb);
6561
6440
  }
6562
- })(uniffiCaller.rustCallWithError(FfiConverterTypeCoreCryptoError.lift.bind(FfiConverterTypeCoreCryptoError), (callStatus) => {
6563
- return nativeModule().ubrn_uniffi_core_crypto_ffi_fn_method_welcome_serialize(uniffiTypeWelcomeObjectFactory.clonePointer(this), callStatus);
6441
+ })(uniffiCaller.rustCall((callStatus) => {
6442
+ return nativeModule().ubrn_uniffi_core_crypto_ffi_fn_method_deviceid_to_hex_string(uniffiTypeDeviceIdObjectFactory.clonePointer(this), callStatus);
6443
+ }, FfiConverterString.lift.bind(FfiConverterString)));
6444
+ }
6445
+ toU64() {
6446
+ return FfiConverterUInt64.lift(uniffiCaller.rustCall((callStatus) => {
6447
+ return nativeModule().ubrn_uniffi_core_crypto_ffi_fn_method_deviceid_to_u64(uniffiTypeDeviceIdObjectFactory.clonePointer(this), callStatus);
6448
+ }, FfiConverterString.lift.bind(FfiConverterString)));
6449
+ }
6450
+ equals(other) {
6451
+ return FfiConverterBool.lift(uniffiCaller.rustCall((callStatus) => {
6452
+ return nativeModule().ubrn_uniffi_core_crypto_ffi_fn_method_deviceid_uniffi_trait_eq_eq(uniffiTypeDeviceIdObjectFactory.clonePointer(this), FfiConverterTypeDeviceId.lower(other, nativeModule().rustbuffer_alloc), callStatus);
6453
+ }, FfiConverterString.lift.bind(FfiConverterString)));
6454
+ }
6455
+ hashCode() {
6456
+ return FfiConverterUInt64.lift(uniffiCaller.rustCall((callStatus) => {
6457
+ return nativeModule().ubrn_uniffi_core_crypto_ffi_fn_method_deviceid_uniffi_trait_hash(uniffiTypeDeviceIdObjectFactory.clonePointer(this), callStatus);
6564
6458
  }, FfiConverterString.lift.bind(FfiConverterString)));
6565
6459
  }
6566
6460
  uniffiDestroy() {
6567
6461
  const ptr = this[destructorGuardSymbol];
6568
6462
  if (ptr !== undefined) {
6569
- const pointer = uniffiTypeWelcomeObjectFactory.pointer(this);
6570
- uniffiTypeWelcomeObjectFactory.freePointer(pointer);
6571
- uniffiTypeWelcomeObjectFactory.unbless(ptr);
6463
+ const pointer = uniffiTypeDeviceIdObjectFactory.pointer(this);
6464
+ uniffiTypeDeviceIdObjectFactory.freePointer(pointer);
6465
+ uniffiTypeDeviceIdObjectFactory.unbless(ptr);
6572
6466
  delete this[destructorGuardSymbol];
6573
6467
  }
6574
6468
  }
6575
6469
  static instanceOf(obj_) {
6576
- return uniffiTypeWelcomeObjectFactory.isConcreteType(obj_);
6470
+ return uniffiTypeDeviceIdObjectFactory.isConcreteType(obj_);
6577
6471
  }
6578
6472
  }
6579
- var uniffiTypeWelcomeObjectFactory = (() => {
6473
+ var uniffiTypeDeviceIdObjectFactory = (() => {
6580
6474
  const registry = typeof FinalizationRegistry !== "undefined" ? new FinalizationRegistry((heldValue) => {
6581
- uniffiTypeWelcomeObjectFactory.freePointer(heldValue);
6475
+ uniffiTypeDeviceIdObjectFactory.freePointer(heldValue);
6582
6476
  }) : null;
6583
6477
  return {
6584
6478
  create(pointer) {
6585
- const instance = Object.create(Welcome.prototype);
6479
+ const instance = Object.create(DeviceId.prototype);
6586
6480
  instance[pointerLiteralSymbol] = pointer;
6587
6481
  instance[destructorGuardSymbol] = this.bless(pointer);
6588
- instance[uniffiTypeNameSymbol] = "Welcome";
6482
+ instance[uniffiTypeNameSymbol] = "DeviceId";
6589
6483
  return instance;
6590
6484
  },
6591
6485
  bless(p) {
@@ -6613,89 +6507,63 @@ var uniffiTypeWelcomeObjectFactory = (() => {
6613
6507
  },
6614
6508
  clonePointer(obj_) {
6615
6509
  const pointer = this.pointer(obj_);
6616
- return uniffiCaller.rustCall((callStatus) => nativeModule().ubrn_uniffi_core_crypto_ffi_fn_clone_welcome(pointer, callStatus), FfiConverterString.lift);
6510
+ return uniffiCaller.rustCall((callStatus) => nativeModule().ubrn_uniffi_core_crypto_ffi_fn_clone_deviceid(pointer, callStatus), FfiConverterString.lift);
6617
6511
  },
6618
6512
  freePointer(pointer) {
6619
- uniffiCaller.rustCall((callStatus) => nativeModule().ubrn_uniffi_core_crypto_ffi_fn_free_welcome(pointer, callStatus), FfiConverterString.lift);
6513
+ uniffiCaller.rustCall((callStatus) => nativeModule().ubrn_uniffi_core_crypto_ffi_fn_free_deviceid(pointer, callStatus), FfiConverterString.lift);
6620
6514
  },
6621
6515
  isConcreteType(obj_) {
6622
- return obj_[destructorGuardSymbol] && obj_[uniffiTypeNameSymbol] === "Welcome";
6516
+ return obj_[destructorGuardSymbol] && obj_[uniffiTypeNameSymbol] === "DeviceId";
6623
6517
  }
6624
6518
  };
6625
6519
  })();
6626
- var FfiConverterTypeWelcome = new FfiConverterObject(uniffiTypeWelcomeObjectFactory);
6627
- var MlsGroupInfoEncryptionType;
6628
- ((MlsGroupInfoEncryptionType2) => {
6629
- MlsGroupInfoEncryptionType2[MlsGroupInfoEncryptionType2["Plaintext"] = 1] = "Plaintext";
6630
- MlsGroupInfoEncryptionType2[MlsGroupInfoEncryptionType2["JweEncrypted"] = 2] = "JweEncrypted";
6631
- })(MlsGroupInfoEncryptionType ||= {});
6632
- var FfiConverterTypeMlsGroupInfoEncryptionType = (() => {
6633
- const ordinalConverter = FfiConverterInt32;
6634
-
6635
- class FFIConverter extends AbstractFfiConverterByteArray {
6636
- read(from) {
6637
- switch (ordinalConverter.read(from)) {
6638
- case 1:
6639
- return 1 /* Plaintext */;
6640
- case 2:
6641
- return 2 /* JweEncrypted */;
6642
- default:
6643
- throw new UniffiInternalError.UnexpectedEnumCase;
6644
- }
6645
- }
6646
- write(value, into) {
6647
- switch (value) {
6648
- case 1 /* Plaintext */:
6649
- return ordinalConverter.write(1, into);
6650
- case 2 /* JweEncrypted */:
6651
- return ordinalConverter.write(2, into);
6652
- }
6653
- }
6654
- allocationSize(value) {
6655
- return ordinalConverter.allocationSize(0);
6520
+ var FfiConverterTypeDeviceId = new FfiConverterObject(uniffiTypeDeviceIdObjectFactory);
6521
+ var DeserializedClientId = (() => {
6522
+ const defaults = () => ({});
6523
+ const create = (() => {
6524
+ return uniffiCreateRecord(defaults);
6525
+ })();
6526
+ return Object.freeze({
6527
+ create,
6528
+ new: create,
6529
+ defaults: () => Object.freeze(defaults()),
6530
+ toString(self_) {
6531
+ return ((__rb) => {
6532
+ try {
6533
+ return FfiConverterString.lift(__rb);
6534
+ } finally {
6535
+ nativeModule().rustbuffer_free(__rb);
6536
+ }
6537
+ })(uniffiCaller.rustCall((callStatus) => {
6538
+ return nativeModule().ubrn_uniffi_core_crypto_ffi_fn_method_deserializedclientid_uniffi_trait_display(FfiConverterTypeDeserializedClientId.lower(self_, nativeModule().rustbuffer_alloc), callStatus);
6539
+ }, FfiConverterString.lift.bind(FfiConverterString)));
6656
6540
  }
6657
- }
6658
- return new FFIConverter;
6541
+ });
6659
6542
  })();
6660
- var MlsRatchetTreeType;
6661
- ((MlsRatchetTreeType2) => {
6662
- MlsRatchetTreeType2[MlsRatchetTreeType2["Full"] = 1] = "Full";
6663
- MlsRatchetTreeType2[MlsRatchetTreeType2["Delta"] = 2] = "Delta";
6664
- MlsRatchetTreeType2[MlsRatchetTreeType2["ByRef"] = 3] = "ByRef";
6665
- })(MlsRatchetTreeType ||= {});
6666
- var FfiConverterTypeMlsRatchetTreeType = (() => {
6667
- const ordinalConverter = FfiConverterInt32;
6543
+ var FfiConverterTypeDeserializedClientId = (() => {
6668
6544
 
6669
6545
  class FFIConverter extends AbstractFfiConverterByteArray {
6670
6546
  read(from) {
6671
- switch (ordinalConverter.read(from)) {
6672
- case 1:
6673
- return 1 /* Full */;
6674
- case 2:
6675
- return 2 /* Delta */;
6676
- case 3:
6677
- return 3 /* ByRef */;
6678
- default:
6679
- throw new UniffiInternalError.UnexpectedEnumCase;
6680
- }
6547
+ return {
6548
+ clientId: FfiConverterTypeClientId.read(from),
6549
+ userId: FfiConverterTypeUuid.read(from),
6550
+ deviceId: FfiConverterTypeDeviceId.read(from),
6551
+ domain: FfiConverterString.read(from)
6552
+ };
6681
6553
  }
6682
6554
  write(value, into) {
6683
- switch (value) {
6684
- case 1 /* Full */:
6685
- return ordinalConverter.write(1, into);
6686
- case 2 /* Delta */:
6687
- return ordinalConverter.write(2, into);
6688
- case 3 /* ByRef */:
6689
- return ordinalConverter.write(3, into);
6690
- }
6555
+ FfiConverterTypeClientId.write(value.clientId, into);
6556
+ FfiConverterTypeUuid.write(value.userId, into);
6557
+ FfiConverterTypeDeviceId.write(value.deviceId, into);
6558
+ FfiConverterString.write(value.domain, into);
6691
6559
  }
6692
6560
  allocationSize(value) {
6693
- return ordinalConverter.allocationSize(0);
6561
+ return FfiConverterTypeClientId.allocationSize(value.clientId) + FfiConverterTypeUuid.allocationSize(value.userId) + FfiConverterTypeDeviceId.allocationSize(value.deviceId) + FfiConverterString.allocationSize(value.domain);
6694
6562
  }
6695
6563
  }
6696
6564
  return new FFIConverter;
6697
6565
  })();
6698
- var GroupInfoBundle = (() => {
6566
+ var HistorySecret = (() => {
6699
6567
  const defaults = () => ({});
6700
6568
  const create = (() => {
6701
6569
  return uniffiCreateRecord(defaults);
@@ -6706,28 +6574,26 @@ var GroupInfoBundle = (() => {
6706
6574
  defaults: () => Object.freeze(defaults())
6707
6575
  });
6708
6576
  })();
6709
- var FfiConverterTypeGroupInfoBundle = (() => {
6577
+ var FfiConverterTypeHistorySecret = (() => {
6710
6578
 
6711
6579
  class FFIConverter extends AbstractFfiConverterByteArray {
6712
6580
  read(from) {
6713
6581
  return {
6714
- encryptionType: FfiConverterTypeMlsGroupInfoEncryptionType.read(from),
6715
- ratchetTreeType: FfiConverterTypeMlsRatchetTreeType.read(from),
6716
- payload: FfiConverterUint8Array.read(from)
6582
+ clientId: FfiConverterTypeClientId.read(from),
6583
+ data: FfiConverterUint8Array.read(from)
6717
6584
  };
6718
6585
  }
6719
6586
  write(value, into) {
6720
- FfiConverterTypeMlsGroupInfoEncryptionType.write(value.encryptionType, into);
6721
- FfiConverterTypeMlsRatchetTreeType.write(value.ratchetTreeType, into);
6722
- FfiConverterUint8Array.write(value.payload, into);
6587
+ FfiConverterTypeClientId.write(value.clientId, into);
6588
+ FfiConverterUint8Array.write(value.data, into);
6723
6589
  }
6724
6590
  allocationSize(value) {
6725
- return FfiConverterTypeMlsGroupInfoEncryptionType.allocationSize(value.encryptionType) + FfiConverterTypeMlsRatchetTreeType.allocationSize(value.ratchetTreeType) + FfiConverterUint8Array.allocationSize(value.payload);
6591
+ return FfiConverterTypeClientId.allocationSize(value.clientId) + FfiConverterUint8Array.allocationSize(value.data);
6726
6592
  }
6727
6593
  }
6728
6594
  return new FFIConverter;
6729
6595
  })();
6730
- var CommitBundle = (() => {
6596
+ var HttpHeader = (() => {
6731
6597
  const defaults = () => ({});
6732
6598
  const create = (() => {
6733
6599
  return uniffiCreateRecord(defaults);
@@ -6738,30 +6604,26 @@ var CommitBundle = (() => {
6738
6604
  defaults: () => Object.freeze(defaults())
6739
6605
  });
6740
6606
  })();
6741
- var FfiConverterTypeCommitBundle = (() => {
6607
+ var FfiConverterTypeHttpHeader = (() => {
6742
6608
 
6743
6609
  class FFIConverter extends AbstractFfiConverterByteArray {
6744
6610
  read(from) {
6745
6611
  return {
6746
- welcome: FfiConverterOptionalTypeWelcome.read(from),
6747
- commit: FfiConverterUint8Array.read(from),
6748
- groupInfo: FfiConverterTypeGroupInfoBundle.read(from),
6749
- encryptedMessage: FfiConverterOptionalBytes.read(from)
6612
+ name: FfiConverterString.read(from),
6613
+ value: FfiConverterString.read(from)
6750
6614
  };
6751
6615
  }
6752
6616
  write(value, into) {
6753
- FfiConverterOptionalTypeWelcome.write(value.welcome, into);
6754
- FfiConverterUint8Array.write(value.commit, into);
6755
- FfiConverterTypeGroupInfoBundle.write(value.groupInfo, into);
6756
- FfiConverterOptionalBytes.write(value.encryptedMessage, into);
6617
+ FfiConverterString.write(value.name, into);
6618
+ FfiConverterString.write(value.value, into);
6757
6619
  }
6758
6620
  allocationSize(value) {
6759
- return FfiConverterOptionalTypeWelcome.allocationSize(value.welcome) + FfiConverterUint8Array.allocationSize(value.commit) + FfiConverterTypeGroupInfoBundle.allocationSize(value.groupInfo) + FfiConverterOptionalBytes.allocationSize(value.encryptedMessage);
6621
+ return FfiConverterString.allocationSize(value.name) + FfiConverterString.allocationSize(value.value);
6760
6622
  }
6761
6623
  }
6762
6624
  return new FFIConverter;
6763
6625
  })();
6764
- var DecryptedMessage = (() => {
6626
+ var HttpResponse = (() => {
6765
6627
  const defaults = () => ({});
6766
6628
  const create = (() => {
6767
6629
  return uniffiCreateRecord(defaults);
@@ -6772,34 +6634,28 @@ var DecryptedMessage = (() => {
6772
6634
  defaults: () => Object.freeze(defaults())
6773
6635
  });
6774
6636
  })();
6775
- var FfiConverterTypeDecryptedMessage = (() => {
6637
+ var FfiConverterTypeHttpResponse = (() => {
6776
6638
 
6777
6639
  class FFIConverter extends AbstractFfiConverterByteArray {
6778
6640
  read(from) {
6779
6641
  return {
6780
- message: FfiConverterOptionalBytes.read(from),
6781
- isActive: FfiConverterBool.read(from),
6782
- commitDelay: FfiConverterOptionalUInt64.read(from),
6783
- senderClientId: FfiConverterOptionalTypeClientId.read(from),
6784
- identity: FfiConverterTypeWireIdentity.read(from),
6785
- bufferedMessages: FfiConverterOptionalSequenceTypeBufferedDecryptedMessage.read(from)
6642
+ status: FfiConverterUInt16.read(from),
6643
+ headers: FfiConverterSequenceTypeHttpHeader.read(from),
6644
+ body: FfiConverterUint8Array.read(from)
6786
6645
  };
6787
6646
  }
6788
6647
  write(value, into) {
6789
- FfiConverterOptionalBytes.write(value.message, into);
6790
- FfiConverterBool.write(value.isActive, into);
6791
- FfiConverterOptionalUInt64.write(value.commitDelay, into);
6792
- FfiConverterOptionalTypeClientId.write(value.senderClientId, into);
6793
- FfiConverterTypeWireIdentity.write(value.identity, into);
6794
- FfiConverterOptionalSequenceTypeBufferedDecryptedMessage.write(value.bufferedMessages, into);
6648
+ FfiConverterUInt16.write(value.status, into);
6649
+ FfiConverterSequenceTypeHttpHeader.write(value.headers, into);
6650
+ FfiConverterUint8Array.write(value.body, into);
6795
6651
  }
6796
6652
  allocationSize(value) {
6797
- return FfiConverterOptionalBytes.allocationSize(value.message) + FfiConverterBool.allocationSize(value.isActive) + FfiConverterOptionalUInt64.allocationSize(value.commitDelay) + FfiConverterOptionalTypeClientId.allocationSize(value.senderClientId) + FfiConverterTypeWireIdentity.allocationSize(value.identity) + FfiConverterOptionalSequenceTypeBufferedDecryptedMessage.allocationSize(value.bufferedMessages);
6653
+ return FfiConverterUInt16.allocationSize(value.status) + FfiConverterSequenceTypeHttpHeader.allocationSize(value.headers) + FfiConverterUint8Array.allocationSize(value.body);
6798
6654
  }
6799
6655
  }
6800
6656
  return new FFIConverter;
6801
6657
  })();
6802
- var HistorySecret = (() => {
6658
+ var ProteusAutoPrekeyBundle = (() => {
6803
6659
  const defaults = () => ({});
6804
6660
  const create = (() => {
6805
6661
  return uniffiCreateRecord(defaults);
@@ -6810,56 +6666,98 @@ var HistorySecret = (() => {
6810
6666
  defaults: () => Object.freeze(defaults())
6811
6667
  });
6812
6668
  })();
6813
- var FfiConverterTypeHistorySecret = (() => {
6669
+ var FfiConverterTypeProteusAutoPrekeyBundle = (() => {
6814
6670
 
6815
6671
  class FFIConverter extends AbstractFfiConverterByteArray {
6816
6672
  read(from) {
6817
6673
  return {
6818
- clientId: FfiConverterTypeClientId.read(from),
6819
- data: FfiConverterUint8Array.read(from)
6674
+ id: FfiConverterUInt16.read(from),
6675
+ pkb: FfiConverterUint8Array.read(from)
6820
6676
  };
6821
6677
  }
6822
6678
  write(value, into) {
6823
- FfiConverterTypeClientId.write(value.clientId, into);
6824
- FfiConverterUint8Array.write(value.data, into);
6679
+ FfiConverterUInt16.write(value.id, into);
6680
+ FfiConverterUint8Array.write(value.pkb, into);
6825
6681
  }
6826
6682
  allocationSize(value) {
6827
- return FfiConverterTypeClientId.allocationSize(value.clientId) + FfiConverterUint8Array.allocationSize(value.data);
6683
+ return FfiConverterUInt16.allocationSize(value.id) + FfiConverterUint8Array.allocationSize(value.pkb);
6828
6684
  }
6829
6685
  }
6830
6686
  return new FFIConverter;
6831
6687
  })();
6832
- var HttpHeader = (() => {
6833
- const defaults = () => ({});
6834
- const create = (() => {
6835
- return uniffiCreateRecord(defaults);
6836
- })();
6837
- return Object.freeze({
6838
- create,
6839
- new: create,
6840
- defaults: () => Object.freeze(defaults())
6841
- });
6688
+ var DeviceStatus;
6689
+ ((DeviceStatus2) => {
6690
+ DeviceStatus2[DeviceStatus2["Valid"] = 1] = "Valid";
6691
+ DeviceStatus2[DeviceStatus2["Expired"] = 2] = "Expired";
6692
+ DeviceStatus2[DeviceStatus2["Revoked"] = 3] = "Revoked";
6693
+ })(DeviceStatus ||= {});
6694
+ var FfiConverterTypeDeviceStatus = (() => {
6695
+ const ordinalConverter = FfiConverterInt32;
6696
+
6697
+ class FFIConverter extends AbstractFfiConverterByteArray {
6698
+ read(from) {
6699
+ switch (ordinalConverter.read(from)) {
6700
+ case 1:
6701
+ return 1 /* Valid */;
6702
+ case 2:
6703
+ return 2 /* Expired */;
6704
+ case 3:
6705
+ return 3 /* Revoked */;
6706
+ default:
6707
+ throw new UniffiInternalError.UnexpectedEnumCase;
6708
+ }
6709
+ }
6710
+ write(value, into) {
6711
+ switch (value) {
6712
+ case 1 /* Valid */:
6713
+ return ordinalConverter.write(1, into);
6714
+ case 2 /* Expired */:
6715
+ return ordinalConverter.write(2, into);
6716
+ case 3 /* Revoked */:
6717
+ return ordinalConverter.write(3, into);
6718
+ }
6719
+ }
6720
+ allocationSize(value) {
6721
+ return ordinalConverter.allocationSize(0);
6722
+ }
6723
+ }
6724
+ return new FFIConverter;
6842
6725
  })();
6843
- var FfiConverterTypeHttpHeader = (() => {
6726
+ var CredentialType;
6727
+ ((CredentialType2) => {
6728
+ CredentialType2[CredentialType2["Basic"] = 1] = "Basic";
6729
+ CredentialType2[CredentialType2["X509"] = 2] = "X509";
6730
+ })(CredentialType ||= {});
6731
+ var FfiConverterTypeCredentialType = (() => {
6732
+ const ordinalConverter = FfiConverterInt32;
6844
6733
 
6845
6734
  class FFIConverter extends AbstractFfiConverterByteArray {
6846
6735
  read(from) {
6847
- return {
6848
- name: FfiConverterString.read(from),
6849
- value: FfiConverterString.read(from)
6850
- };
6736
+ switch (ordinalConverter.read(from)) {
6737
+ case 1:
6738
+ return 1 /* Basic */;
6739
+ case 2:
6740
+ return 2 /* X509 */;
6741
+ default:
6742
+ throw new UniffiInternalError.UnexpectedEnumCase;
6743
+ }
6851
6744
  }
6852
6745
  write(value, into) {
6853
- FfiConverterString.write(value.name, into);
6854
- FfiConverterString.write(value.value, into);
6746
+ switch (value) {
6747
+ case 1 /* Basic */:
6748
+ return ordinalConverter.write(1, into);
6749
+ case 2 /* X509 */:
6750
+ return ordinalConverter.write(2, into);
6751
+ }
6855
6752
  }
6856
6753
  allocationSize(value) {
6857
- return FfiConverterString.allocationSize(value.name) + FfiConverterString.allocationSize(value.value);
6754
+ return ordinalConverter.allocationSize(0);
6858
6755
  }
6859
6756
  }
6860
6757
  return new FFIConverter;
6861
6758
  })();
6862
- var HttpResponse = (() => {
6759
+ var FfiConverterTypeTimestamp = FfiConverterTimestamp;
6760
+ var X509Identity = (() => {
6863
6761
  const defaults = () => ({});
6864
6762
  const create = (() => {
6865
6763
  return uniffiCreateRecord(defaults);
@@ -6870,28 +6768,36 @@ var HttpResponse = (() => {
6870
6768
  defaults: () => Object.freeze(defaults())
6871
6769
  });
6872
6770
  })();
6873
- var FfiConverterTypeHttpResponse = (() => {
6771
+ var FfiConverterTypeX509Identity = (() => {
6874
6772
 
6875
6773
  class FFIConverter extends AbstractFfiConverterByteArray {
6876
6774
  read(from) {
6877
6775
  return {
6878
- status: FfiConverterUInt16.read(from),
6879
- headers: FfiConverterSequenceTypeHttpHeader.read(from),
6880
- body: FfiConverterUint8Array.read(from)
6776
+ handle: FfiConverterString.read(from),
6777
+ displayName: FfiConverterString.read(from),
6778
+ domain: FfiConverterString.read(from),
6779
+ certificate: FfiConverterString.read(from),
6780
+ serialNumber: FfiConverterString.read(from),
6781
+ notBefore: FfiConverterTypeTimestamp.read(from),
6782
+ notAfter: FfiConverterTypeTimestamp.read(from)
6881
6783
  };
6882
6784
  }
6883
6785
  write(value, into) {
6884
- FfiConverterUInt16.write(value.status, into);
6885
- FfiConverterSequenceTypeHttpHeader.write(value.headers, into);
6886
- FfiConverterUint8Array.write(value.body, into);
6786
+ FfiConverterString.write(value.handle, into);
6787
+ FfiConverterString.write(value.displayName, into);
6788
+ FfiConverterString.write(value.domain, into);
6789
+ FfiConverterString.write(value.certificate, into);
6790
+ FfiConverterString.write(value.serialNumber, into);
6791
+ FfiConverterTypeTimestamp.write(value.notBefore, into);
6792
+ FfiConverterTypeTimestamp.write(value.notAfter, into);
6887
6793
  }
6888
6794
  allocationSize(value) {
6889
- return FfiConverterUInt16.allocationSize(value.status) + FfiConverterSequenceTypeHttpHeader.allocationSize(value.headers) + FfiConverterUint8Array.allocationSize(value.body);
6795
+ return FfiConverterString.allocationSize(value.handle) + FfiConverterString.allocationSize(value.displayName) + FfiConverterString.allocationSize(value.domain) + FfiConverterString.allocationSize(value.certificate) + FfiConverterString.allocationSize(value.serialNumber) + FfiConverterTypeTimestamp.allocationSize(value.notBefore) + FfiConverterTypeTimestamp.allocationSize(value.notAfter);
6890
6796
  }
6891
6797
  }
6892
6798
  return new FFIConverter;
6893
6799
  })();
6894
- var ProteusAutoPrekeyBundle = (() => {
6800
+ var WireIdentity = (() => {
6895
6801
  const defaults = () => ({});
6896
6802
  const create = (() => {
6897
6803
  return uniffiCreateRecord(defaults);
@@ -6902,21 +6808,27 @@ var ProteusAutoPrekeyBundle = (() => {
6902
6808
  defaults: () => Object.freeze(defaults())
6903
6809
  });
6904
6810
  })();
6905
- var FfiConverterTypeProteusAutoPrekeyBundle = (() => {
6811
+ var FfiConverterTypeWireIdentity = (() => {
6906
6812
 
6907
6813
  class FFIConverter extends AbstractFfiConverterByteArray {
6908
6814
  read(from) {
6909
6815
  return {
6910
- id: FfiConverterUInt16.read(from),
6911
- pkb: FfiConverterUint8Array.read(from)
6816
+ clientId: FfiConverterOptionalTypeClientId.read(from),
6817
+ status: FfiConverterTypeDeviceStatus.read(from),
6818
+ thumbprint: FfiConverterString.read(from),
6819
+ credentialType: FfiConverterTypeCredentialType.read(from),
6820
+ x509Identity: FfiConverterOptionalTypeX509Identity.read(from)
6912
6821
  };
6913
6822
  }
6914
6823
  write(value, into) {
6915
- FfiConverterUInt16.write(value.id, into);
6916
- FfiConverterUint8Array.write(value.pkb, into);
6824
+ FfiConverterOptionalTypeClientId.write(value.clientId, into);
6825
+ FfiConverterTypeDeviceStatus.write(value.status, into);
6826
+ FfiConverterString.write(value.thumbprint, into);
6827
+ FfiConverterTypeCredentialType.write(value.credentialType, into);
6828
+ FfiConverterOptionalTypeX509Identity.write(value.x509Identity, into);
6917
6829
  }
6918
6830
  allocationSize(value) {
6919
- return FfiConverterUInt16.allocationSize(value.id) + FfiConverterUint8Array.allocationSize(value.pkb);
6831
+ return FfiConverterOptionalTypeClientId.allocationSize(value.clientId) + FfiConverterTypeDeviceStatus.allocationSize(value.status) + FfiConverterString.allocationSize(value.thumbprint) + FfiConverterTypeCredentialType.allocationSize(value.credentialType) + FfiConverterOptionalTypeX509Identity.allocationSize(value.x509Identity);
6920
6832
  }
6921
6833
  }
6922
6834
  return new FFIConverter;
@@ -7021,6 +6933,139 @@ var FfiConverterTypeX509CredentialAcquisitionConfiguration = (() => {
7021
6933
  }
7022
6934
  return new FFIConverter;
7023
6935
  })();
6936
+ var BufferedDecryptedMessage = (() => {
6937
+ class Text_ extends UniffiEnum {
6938
+ [uniffiTypeNameSymbol] = "BufferedDecryptedMessage";
6939
+ tag = "Text" /* Text */;
6940
+ inner;
6941
+ constructor(inner) {
6942
+ super("BufferedDecryptedMessage", "Text");
6943
+ this.inner = Object.freeze(inner);
6944
+ }
6945
+ static new(inner) {
6946
+ return new Text_(inner);
6947
+ }
6948
+ static instanceOf(obj) {
6949
+ return obj.tag === "Text" /* Text */;
6950
+ }
6951
+ }
6952
+
6953
+ class Commit_ extends UniffiEnum {
6954
+ [uniffiTypeNameSymbol] = "BufferedDecryptedMessage";
6955
+ tag = "Commit" /* Commit */;
6956
+ inner;
6957
+ constructor(inner) {
6958
+ super("BufferedDecryptedMessage", "Commit");
6959
+ this.inner = Object.freeze(inner);
6960
+ }
6961
+ static new(inner) {
6962
+ return new Commit_(inner);
6963
+ }
6964
+ static instanceOf(obj) {
6965
+ return obj.tag === "Commit" /* Commit */;
6966
+ }
6967
+ }
6968
+
6969
+ class Proposal_ extends UniffiEnum {
6970
+ [uniffiTypeNameSymbol] = "BufferedDecryptedMessage";
6971
+ tag = "Proposal" /* Proposal */;
6972
+ inner;
6973
+ constructor(inner) {
6974
+ super("BufferedDecryptedMessage", "Proposal");
6975
+ this.inner = Object.freeze(inner);
6976
+ }
6977
+ static new(inner) {
6978
+ return new Proposal_(inner);
6979
+ }
6980
+ static instanceOf(obj) {
6981
+ return obj.tag === "Proposal" /* Proposal */;
6982
+ }
6983
+ }
6984
+ function instanceOf(obj) {
6985
+ return obj[uniffiTypeNameSymbol] === "BufferedDecryptedMessage";
6986
+ }
6987
+ return Object.freeze({
6988
+ instanceOf,
6989
+ Text: Text_,
6990
+ Commit: Commit_,
6991
+ Proposal: Proposal_
6992
+ });
6993
+ })();
6994
+ var FfiConverterTypeBufferedDecryptedMessage = (() => {
6995
+ const ordinalConverter = FfiConverterInt32;
6996
+
6997
+ class FFIConverter extends AbstractFfiConverterByteArray {
6998
+ read(from) {
6999
+ switch (ordinalConverter.read(from)) {
7000
+ case 1:
7001
+ return new BufferedDecryptedMessage.Text({ plaintext: FfiConverterUint8Array.read(from), senderClientId: FfiConverterTypeClientId.read(from), identity: FfiConverterTypeWireIdentity.read(from) });
7002
+ case 2:
7003
+ return new BufferedDecryptedMessage.Commit({ isActive: FfiConverterBool.read(from), identity: FfiConverterTypeWireIdentity.read(from) });
7004
+ case 3:
7005
+ return new BufferedDecryptedMessage.Proposal({ delay: FfiConverterOptionalUInt64.read(from), identity: FfiConverterTypeWireIdentity.read(from) });
7006
+ default:
7007
+ throw new UniffiInternalError.UnexpectedEnumCase;
7008
+ }
7009
+ }
7010
+ write(value, into) {
7011
+ switch (value.tag) {
7012
+ case "Text" /* Text */: {
7013
+ ordinalConverter.write(1, into);
7014
+ const inner = value.inner;
7015
+ FfiConverterUint8Array.write(inner.plaintext, into);
7016
+ FfiConverterTypeClientId.write(inner.senderClientId, into);
7017
+ FfiConverterTypeWireIdentity.write(inner.identity, into);
7018
+ return;
7019
+ }
7020
+ case "Commit" /* Commit */: {
7021
+ ordinalConverter.write(2, into);
7022
+ const inner = value.inner;
7023
+ FfiConverterBool.write(inner.isActive, into);
7024
+ FfiConverterTypeWireIdentity.write(inner.identity, into);
7025
+ return;
7026
+ }
7027
+ case "Proposal" /* Proposal */: {
7028
+ ordinalConverter.write(3, into);
7029
+ const inner = value.inner;
7030
+ FfiConverterOptionalUInt64.write(inner.delay, into);
7031
+ FfiConverterTypeWireIdentity.write(inner.identity, into);
7032
+ return;
7033
+ }
7034
+ default:
7035
+ throw new UniffiInternalError.UnexpectedEnumCase;
7036
+ }
7037
+ }
7038
+ allocationSize(value) {
7039
+ switch (value.tag) {
7040
+ case "Text" /* Text */: {
7041
+ const inner = value.inner;
7042
+ let size = ordinalConverter.allocationSize(1);
7043
+ size += FfiConverterUint8Array.allocationSize(inner.plaintext);
7044
+ size += FfiConverterTypeClientId.allocationSize(inner.senderClientId);
7045
+ size += FfiConverterTypeWireIdentity.allocationSize(inner.identity);
7046
+ return size;
7047
+ }
7048
+ case "Commit" /* Commit */: {
7049
+ const inner = value.inner;
7050
+ let size = ordinalConverter.allocationSize(2);
7051
+ size += FfiConverterBool.allocationSize(inner.isActive);
7052
+ size += FfiConverterTypeWireIdentity.allocationSize(inner.identity);
7053
+ return size;
7054
+ }
7055
+ case "Proposal" /* Proposal */: {
7056
+ const inner = value.inner;
7057
+ let size = ordinalConverter.allocationSize(3);
7058
+ size += FfiConverterOptionalUInt64.allocationSize(inner.delay);
7059
+ size += FfiConverterTypeWireIdentity.allocationSize(inner.identity);
7060
+ return size;
7061
+ }
7062
+ default:
7063
+ throw new UniffiInternalError.UnexpectedEnumCase;
7064
+ }
7065
+ }
7066
+ }
7067
+ return new FFIConverter;
7068
+ })();
7024
7069
  var CoreCryptoLogLevel;
7025
7070
  ((CoreCryptoLogLevel2) => {
7026
7071
  CoreCryptoLogLevel2[CoreCryptoLogLevel2["Off"] = 1] = "Off";
@@ -7074,6 +7119,141 @@ var FfiConverterTypeCoreCryptoLogLevel = (() => {
7074
7119
  }
7075
7120
  return new FFIConverter;
7076
7121
  })();
7122
+ var DecryptedMessage = (() => {
7123
+ class Text_ extends UniffiEnum {
7124
+ [uniffiTypeNameSymbol] = "DecryptedMessage";
7125
+ tag = "Text" /* Text */;
7126
+ inner;
7127
+ constructor(inner) {
7128
+ super("DecryptedMessage", "Text");
7129
+ this.inner = Object.freeze(inner);
7130
+ }
7131
+ static new(inner) {
7132
+ return new Text_(inner);
7133
+ }
7134
+ static instanceOf(obj) {
7135
+ return obj.tag === "Text" /* Text */;
7136
+ }
7137
+ }
7138
+
7139
+ class Commit_ extends UniffiEnum {
7140
+ [uniffiTypeNameSymbol] = "DecryptedMessage";
7141
+ tag = "Commit" /* Commit */;
7142
+ inner;
7143
+ constructor(inner) {
7144
+ super("DecryptedMessage", "Commit");
7145
+ this.inner = Object.freeze(inner);
7146
+ }
7147
+ static new(inner) {
7148
+ return new Commit_(inner);
7149
+ }
7150
+ static instanceOf(obj) {
7151
+ return obj.tag === "Commit" /* Commit */;
7152
+ }
7153
+ }
7154
+
7155
+ class Proposal_ extends UniffiEnum {
7156
+ [uniffiTypeNameSymbol] = "DecryptedMessage";
7157
+ tag = "Proposal" /* Proposal */;
7158
+ inner;
7159
+ constructor(inner) {
7160
+ super("DecryptedMessage", "Proposal");
7161
+ this.inner = Object.freeze(inner);
7162
+ }
7163
+ static new(inner) {
7164
+ return new Proposal_(inner);
7165
+ }
7166
+ static instanceOf(obj) {
7167
+ return obj.tag === "Proposal" /* Proposal */;
7168
+ }
7169
+ }
7170
+ function instanceOf(obj) {
7171
+ return obj[uniffiTypeNameSymbol] === "DecryptedMessage";
7172
+ }
7173
+ return Object.freeze({
7174
+ instanceOf,
7175
+ Text: Text_,
7176
+ Commit: Commit_,
7177
+ Proposal: Proposal_
7178
+ });
7179
+ })();
7180
+ var FfiConverterTypeDecryptedMessage = (() => {
7181
+ const ordinalConverter = FfiConverterInt32;
7182
+
7183
+ class FFIConverter extends AbstractFfiConverterByteArray {
7184
+ read(from) {
7185
+ switch (ordinalConverter.read(from)) {
7186
+ case 1:
7187
+ return new DecryptedMessage.Text({ plaintext: FfiConverterUint8Array.read(from), senderClientId: FfiConverterTypeClientId.read(from), identity: FfiConverterTypeWireIdentity.read(from) });
7188
+ case 2:
7189
+ return new DecryptedMessage.Commit({ isActive: FfiConverterBool.read(from), bufferedMessages: FfiConverterOptionalSequenceTypeBufferedDecryptedMessage.read(from), identity: FfiConverterTypeWireIdentity.read(from) });
7190
+ case 3:
7191
+ return new DecryptedMessage.Proposal({ delay: FfiConverterOptionalUInt64.read(from), identity: FfiConverterTypeWireIdentity.read(from) });
7192
+ default:
7193
+ throw new UniffiInternalError.UnexpectedEnumCase;
7194
+ }
7195
+ }
7196
+ write(value, into) {
7197
+ switch (value.tag) {
7198
+ case "Text" /* Text */: {
7199
+ ordinalConverter.write(1, into);
7200
+ const inner = value.inner;
7201
+ FfiConverterUint8Array.write(inner.plaintext, into);
7202
+ FfiConverterTypeClientId.write(inner.senderClientId, into);
7203
+ FfiConverterTypeWireIdentity.write(inner.identity, into);
7204
+ return;
7205
+ }
7206
+ case "Commit" /* Commit */: {
7207
+ ordinalConverter.write(2, into);
7208
+ const inner = value.inner;
7209
+ FfiConverterBool.write(inner.isActive, into);
7210
+ FfiConverterOptionalSequenceTypeBufferedDecryptedMessage.write(inner.bufferedMessages, into);
7211
+ FfiConverterTypeWireIdentity.write(inner.identity, into);
7212
+ return;
7213
+ }
7214
+ case "Proposal" /* Proposal */: {
7215
+ ordinalConverter.write(3, into);
7216
+ const inner = value.inner;
7217
+ FfiConverterOptionalUInt64.write(inner.delay, into);
7218
+ FfiConverterTypeWireIdentity.write(inner.identity, into);
7219
+ return;
7220
+ }
7221
+ default:
7222
+ throw new UniffiInternalError.UnexpectedEnumCase;
7223
+ }
7224
+ }
7225
+ allocationSize(value) {
7226
+ switch (value.tag) {
7227
+ case "Text" /* Text */: {
7228
+ const inner = value.inner;
7229
+ let size = ordinalConverter.allocationSize(1);
7230
+ size += FfiConverterUint8Array.allocationSize(inner.plaintext);
7231
+ size += FfiConverterTypeClientId.allocationSize(inner.senderClientId);
7232
+ size += FfiConverterTypeWireIdentity.allocationSize(inner.identity);
7233
+ return size;
7234
+ }
7235
+ case "Commit" /* Commit */: {
7236
+ const inner = value.inner;
7237
+ let size = ordinalConverter.allocationSize(2);
7238
+ size += FfiConverterBool.allocationSize(inner.isActive);
7239
+ size += FfiConverterOptionalSequenceTypeBufferedDecryptedMessage.allocationSize(inner.bufferedMessages);
7240
+ size += FfiConverterTypeWireIdentity.allocationSize(inner.identity);
7241
+ return size;
7242
+ }
7243
+ case "Proposal" /* Proposal */: {
7244
+ const inner = value.inner;
7245
+ let size = ordinalConverter.allocationSize(3);
7246
+ size += FfiConverterOptionalUInt64.allocationSize(inner.delay);
7247
+ size += FfiConverterTypeWireIdentity.allocationSize(inner.identity);
7248
+ return size;
7249
+ }
7250
+ default:
7251
+ throw new UniffiInternalError.UnexpectedEnumCase;
7252
+ }
7253
+ }
7254
+ }
7255
+ return new FFIConverter;
7256
+ })();
7077
7257
  var E2eiConversationState;
7078
7258
  ((E2eiConversationState2) => {
7079
7259
  E2eiConversationState2[E2eiConversationState2["Verified"] = 1] = "Verified";
@@ -7298,9 +7478,7 @@ var FfiConverterTypeMlsTransportError = (() => {
7298
7478
  read(from) {
7299
7479
  switch (ordinalConverter.read(from)) {
7300
7480
  case 1:
7301
- return new MlsTransportError.MessageRejected({
7302
- reason: FfiConverterString.read(from)
7303
- });
7481
+ return new MlsTransportError.MessageRejected({ reason: FfiConverterString.read(from) });
7304
7482
  default:
7305
7483
  throw new UniffiInternalError.UnexpectedEnumCase;
7306
7484
  }
@@ -7412,9 +7590,7 @@ var FfiConverterTypePkiEnvironmentHooksError = (() => {
7412
7590
  read(from) {
7413
7591
  switch (ordinalConverter.read(from)) {
7414
7592
  case 1:
7415
- return new PkiEnvironmentHooksError.Error({
7416
- reason: FfiConverterString.read(from)
7417
- });
7593
+ return new PkiEnvironmentHooksError.Error({ reason: FfiConverterString.read(from) });
7418
7594
  default:
7419
7595
  throw new UniffiInternalError.UnexpectedEnumCase;
7420
7596
  }
@@ -9998,15 +10174,15 @@ var uniffiTypeX509CredentialAcquisitionObjectFactory = (() => {
9998
10174
  };
9999
10175
  })();
10000
10176
  var FfiConverterTypeX509CredentialAcquisition = new FfiConverterObject(uniffiTypeX509CredentialAcquisitionObjectFactory);
10177
+ var FfiConverterOptionalTypeWelcome = new FfiConverterOptional(FfiConverterTypeWelcome);
10001
10178
  var FfiConverterOptionalBytes = new FfiConverterOptional(FfiConverterUint8Array);
10002
- var FfiConverterOptionalUInt64 = new FfiConverterOptional(FfiConverterUInt64);
10179
+ var FfiConverterSequenceTypeHttpHeader = new FfiConverterArray(FfiConverterTypeHttpHeader);
10003
10180
  var FfiConverterOptionalTypeClientId = new FfiConverterOptional(FfiConverterTypeClientId);
10004
10181
  var FfiConverterOptionalTypeX509Identity = new FfiConverterOptional(FfiConverterTypeX509Identity);
10005
- var FfiConverterOptionalTypeWelcome = new FfiConverterOptional(FfiConverterTypeWelcome);
10182
+ var FfiConverterOptionalString = new FfiConverterOptional(FfiConverterString);
10183
+ var FfiConverterOptionalUInt64 = new FfiConverterOptional(FfiConverterUInt64);
10006
10184
  var FfiConverterSequenceTypeBufferedDecryptedMessage = new FfiConverterArray(FfiConverterTypeBufferedDecryptedMessage);
10007
10185
  var FfiConverterOptionalSequenceTypeBufferedDecryptedMessage = new FfiConverterOptional(FfiConverterSequenceTypeBufferedDecryptedMessage);
10008
- var FfiConverterSequenceTypeHttpHeader = new FfiConverterArray(FfiConverterTypeHttpHeader);
10009
- var FfiConverterOptionalString = new FfiConverterOptional(FfiConverterString);
10010
10186
  var FfiConverterSequenceTypeKeyPackage = new FfiConverterArray(FfiConverterTypeKeyPackage);
10011
10187
  var FfiConverterOptionalTypeExternalSender = new FfiConverterOptional(FfiConverterTypeExternalSender);
10012
10188
  var FfiConverterOptionalDuration = new FfiConverterOptional(FfiConverterDuration);
@@ -10109,7 +10285,7 @@ function uniffiEnsureInitialized() {
10109
10285
  if (nativeModule().ubrn_uniffi_core_crypto_ffi_checksum_method_corecryptocontext_create_conversation() !== 63673) {
10110
10286
  throw new UniffiInternalError.ApiChecksumMismatch("uniffi_core_crypto_ffi_checksum_method_corecryptocontext_create_conversation");
10111
10287
  }
10112
- if (nativeModule().ubrn_uniffi_core_crypto_ffi_checksum_method_corecryptocontext_decrypt_message() !== 47475) {
10288
+ if (nativeModule().ubrn_uniffi_core_crypto_ffi_checksum_method_corecryptocontext_decrypt_message() !== 8493) {
10113
10289
  throw new UniffiInternalError.ApiChecksumMismatch("uniffi_core_crypto_ffi_checksum_method_corecryptocontext_decrypt_message");
10114
10290
  }
10115
10291
  if (nativeModule().ubrn_uniffi_core_crypto_ffi_checksum_method_corecryptocontext_disable_history_sharing() !== 27456) {
@@ -10682,6 +10858,7 @@ export {
10682
10858
  DeviceStatus,
10683
10859
  DeviceId,
10684
10860
  DeserializedClientId,
10861
+ DecryptedMessage,
10685
10862
  DatabaseKey,
10686
10863
  Database,
10687
10864
  CredentialType,