diff --git a/library/src/androidTest/java/org/xmtp/android/library/GroupPermissionsTest.kt b/library/src/androidTest/java/org/xmtp/android/library/GroupPermissionsTest.kt index d0f2e9eb..c2dbd17d 100644 --- a/library/src/androidTest/java/org/xmtp/android/library/GroupPermissionsTest.kt +++ b/library/src/androidTest/java/org/xmtp/android/library/GroupPermissionsTest.kt @@ -434,6 +434,7 @@ class GroupPermissionsTest { updateGroupDescriptionPolicy = PermissionOption.Allow, updateGroupImagePolicy = PermissionOption.Admin, updateGroupPinnedFrameUrlPolicy = PermissionOption.Deny, + updateMessageExpirationPolicy = PermissionOption.Admin, ) val boGroup = runBlocking { boClient.conversations.newGroupCustomPermissions( @@ -468,6 +469,7 @@ class GroupPermissionsTest { updateGroupDescriptionPolicy = PermissionOption.Allow, updateGroupImagePolicy = PermissionOption.Admin, updateGroupPinnedFrameUrlPolicy = PermissionOption.Deny, + updateMessageExpirationPolicy = PermissionOption.Admin, ) assertThrows(GenericException.GroupMutablePermissions::class.java) { @@ -488,6 +490,7 @@ class GroupPermissionsTest { updateGroupDescriptionPolicy = PermissionOption.Allow, updateGroupImagePolicy = PermissionOption.Admin, updateGroupPinnedFrameUrlPolicy = PermissionOption.Deny, + updateMessageExpirationPolicy = PermissionOption.Allow, ) // Valid custom policy works as expected diff --git a/library/src/main/java/libxmtp-version.txt b/library/src/main/java/libxmtp-version.txt index 8458e4dc..8ce2be4e 100644 --- a/library/src/main/java/libxmtp-version.txt +++ b/library/src/main/java/libxmtp-version.txt @@ -1,3 +1,3 @@ -Version: ab9bb055 +Version: f04e0049 Branch: main -Date: 2025-01-07 00:08:33 +0000 +Date: 2025-01-14 23:09:48 +0000 diff --git a/library/src/main/java/org/xmtp/android/library/Conversations.kt b/library/src/main/java/org/xmtp/android/library/Conversations.kt index c3cade5f..7c2c11d0 100644 --- a/library/src/main/java/org/xmtp/android/library/Conversations.kt +++ b/library/src/main/java/org/xmtp/android/library/Conversations.kt @@ -54,6 +54,8 @@ data class Conversations( groupImageUrlSquare: String = "", groupDescription: String = "", groupPinnedFrameUrl: String = "", + messageExpirationFromMs: Long? = null, + messageExpirationMs: Long? = null, ): Group { return newGroupInternal( accountAddresses, @@ -62,7 +64,9 @@ data class Conversations( groupImageUrlSquare, groupDescription, groupPinnedFrameUrl, - null + null, + messageExpirationFromMs, + messageExpirationMs, ) } @@ -73,6 +77,8 @@ data class Conversations( groupImageUrlSquare: String = "", groupDescription: String = "", groupPinnedFrameUrl: String = "", + messageExpirationFromMs: Long? = null, + messageExpirationMs: Long? = null, ): Group { return newGroupInternal( accountAddresses, @@ -81,7 +87,9 @@ data class Conversations( groupImageUrlSquare, groupDescription, groupPinnedFrameUrl, - PermissionPolicySet.toFfiPermissionPolicySet(permissionPolicySet) + PermissionPolicySet.toFfiPermissionPolicySet(permissionPolicySet), + messageExpirationFromMs, + messageExpirationMs ) } @@ -93,6 +101,8 @@ data class Conversations( groupDescription: String, groupPinnedFrameUrl: String, permissionsPolicySet: FfiPermissionPolicySet?, + messageExpirationFromMs: Long?, + messageExpirationMs: Long?, ): Group { if (accountAddresses.size == 1 && accountAddresses.first().lowercase() == client.address.lowercase() @@ -115,7 +125,9 @@ data class Conversations( groupImageUrlSquare = groupImageUrlSquare, groupDescription = groupDescription, groupPinnedFrameUrl = groupPinnedFrameUrl, - customPermissionPolicySet = permissionsPolicySet + customPermissionPolicySet = permissionsPolicySet, + messageExpirationFromMs = messageExpirationFromMs, + messageExpirationMs = messageExpirationMs, ) ) return Group(client.inboxId, group) diff --git a/library/src/main/java/org/xmtp/android/library/libxmtp/PermissionPolicySet.kt b/library/src/main/java/org/xmtp/android/library/libxmtp/PermissionPolicySet.kt index fe04dde4..99886586 100644 --- a/library/src/main/java/org/xmtp/android/library/libxmtp/PermissionPolicySet.kt +++ b/library/src/main/java/org/xmtp/android/library/libxmtp/PermissionPolicySet.kt @@ -39,7 +39,7 @@ enum class GroupPermissionPreconfiguration { companion object { fun toFfiGroupPermissionOptions(option: GroupPermissionPreconfiguration): FfiGroupPermissionsOptions { return when (option) { - ALL_MEMBERS -> FfiGroupPermissionsOptions.ALL_MEMBERS + ALL_MEMBERS -> FfiGroupPermissionsOptions.DEFAULT ADMIN_ONLY -> FfiGroupPermissionsOptions.ADMIN_ONLY } } @@ -55,6 +55,7 @@ data class PermissionPolicySet( val updateGroupDescriptionPolicy: PermissionOption, val updateGroupImagePolicy: PermissionOption, val updateGroupPinnedFrameUrlPolicy: PermissionOption, + val updateMessageExpirationPolicy: PermissionOption, ) { companion object { fun toFfiPermissionPolicySet(permissionPolicySet: PermissionPolicySet): FfiPermissionPolicySet { @@ -66,7 +67,8 @@ data class PermissionPolicySet( updateGroupNamePolicy = PermissionOption.toFfiPermissionPolicy(permissionPolicySet.updateGroupNamePolicy), updateGroupDescriptionPolicy = PermissionOption.toFfiPermissionPolicy(permissionPolicySet.updateGroupDescriptionPolicy), updateGroupImageUrlSquarePolicy = PermissionOption.toFfiPermissionPolicy(permissionPolicySet.updateGroupImagePolicy), - updateGroupPinnedFrameUrlPolicy = PermissionOption.toFfiPermissionPolicy(permissionPolicySet.updateGroupPinnedFrameUrlPolicy) + updateGroupPinnedFrameUrlPolicy = PermissionOption.toFfiPermissionPolicy(permissionPolicySet.updateGroupPinnedFrameUrlPolicy), + updateMessageExpirationMsPolicy = PermissionOption.toFfiPermissionPolicy(permissionPolicySet.updateMessageExpirationPolicy), ) } @@ -80,6 +82,7 @@ data class PermissionPolicySet( updateGroupDescriptionPolicy = PermissionOption.fromFfiPermissionPolicy(ffiPermissionPolicySet.updateGroupDescriptionPolicy), updateGroupImagePolicy = PermissionOption.fromFfiPermissionPolicy(ffiPermissionPolicySet.updateGroupImageUrlSquarePolicy), updateGroupPinnedFrameUrlPolicy = PermissionOption.fromFfiPermissionPolicy(ffiPermissionPolicySet.updateGroupPinnedFrameUrlPolicy), + updateMessageExpirationPolicy = PermissionOption.fromFfiPermissionPolicy(ffiPermissionPolicySet.updateMessageExpirationMsPolicy) ) } } diff --git a/library/src/main/java/xmtpv3.kt b/library/src/main/java/xmtpv3.kt index 2afda572..49757c3e 100644 --- a/library/src/main/java/xmtpv3.kt +++ b/library/src/main/java/xmtpv3.kt @@ -50,17 +50,14 @@ import kotlinx.coroutines.suspendCancellableCoroutine open class RustBuffer : Structure() { // Note: `capacity` and `len` are actually `ULong` values, but JVM only supports signed values. // When dealing with these fields, make sure to call `toULong()`. - @JvmField - var capacity: Long = 0 - @JvmField - var len: Long = 0 - @JvmField - var data: Pointer? = null + @JvmField var capacity: Long = 0 + @JvmField var len: Long = 0 + @JvmField var data: Pointer? = null - class ByValue : RustBuffer(), Structure.ByValue - class ByReference : RustBuffer(), Structure.ByReference + class ByValue: RustBuffer(), Structure.ByValue + class ByReference: RustBuffer(), Structure.ByReference - internal fun setValue(other: RustBuffer) { + internal fun setValue(other: RustBuffer) { capacity = other.capacity len = other.len data = other.data @@ -71,9 +68,9 @@ open class RustBuffer : Structure() { // Note: need to convert the size to a `Long` value to make this work with JVM. UniffiLib.INSTANCE.ffi_xmtpv3_rustbuffer_alloc(size.toLong(), status) }.also { - if (it.data == null) { - throw RuntimeException("RustBuffer.alloc() returned null data pointer (size=${size})") - } + if(it.data == null) { + throw RuntimeException("RustBuffer.alloc() returned null data pointer (size=${size})") + } } internal fun create(capacity: ULong, len: ULong, data: Pointer?): RustBuffer.ByValue { @@ -138,14 +135,11 @@ class RustBufferByReference : ByReference(16) { @Structure.FieldOrder("len", "data") internal open class ForeignBytes : Structure() { - @JvmField - var len: Int = 0 - @JvmField - var data: Pointer? = null + @JvmField var len: Int = 0 + @JvmField var data: Pointer? = null class ByValue : ForeignBytes(), Structure.ByValue } - /** * The FfiConverter interface handles converter types to and from the FFI * @@ -205,11 +199,11 @@ public interface FfiConverter { fun liftFromRustBuffer(rbuf: RustBuffer.ByValue): KotlinType { val byteBuf = rbuf.asByteBuffer()!! try { - val item = read(byteBuf) - if (byteBuf.hasRemaining()) { - throw RuntimeException("junk remaining in buffer after lifting, something is very wrong!!") - } - return item + val item = read(byteBuf) + if (byteBuf.hasRemaining()) { + throw RuntimeException("junk remaining in buffer after lifting, something is very wrong!!") + } + return item } finally { RustBuffer.free(rbuf) } @@ -221,7 +215,7 @@ public interface FfiConverter { * * @suppress */ -public interface FfiConverterRustBuffer : FfiConverter { +public interface FfiConverterRustBuffer: FfiConverter { override fun lift(value: RustBuffer.ByValue) = liftFromRustBuffer(value) override fun lower(value: KotlinType) = lowerIntoRustBuffer(value) } @@ -234,12 +228,10 @@ internal const val UNIFFI_CALL_UNEXPECTED_ERROR = 2.toByte() @Structure.FieldOrder("code", "error_buf") internal open class UniffiRustCallStatus : Structure() { - @JvmField - var code: Byte = 0 - @JvmField - var error_buf: RustBuffer.ByValue = RustBuffer.ByValue() + @JvmField var code: Byte = 0 + @JvmField var error_buf: RustBuffer.ByValue = RustBuffer.ByValue() - class ByValue : UniffiRustCallStatus(), Structure.ByValue + class ByValue: UniffiRustCallStatus(), Structure.ByValue fun isSuccess(): Boolean { return code == UNIFFI_CALL_SUCCESS @@ -279,10 +271,7 @@ interface UniffiRustCallStatusErrorHandler { // synchronize itself // Call a rust function that returns a Result<>. Pass in the Error class companion that corresponds to the Err -private inline fun uniffiRustCallWithError( - errorHandler: UniffiRustCallStatusErrorHandler, - callback: (UniffiRustCallStatus) -> U, -): U { +private inline fun uniffiRustCallWithError(errorHandler: UniffiRustCallStatusErrorHandler, callback: (UniffiRustCallStatus) -> U): U { var status = UniffiRustCallStatus() val return_value = callback(status) uniffiCheckCallStatus(errorHandler, status) @@ -290,10 +279,7 @@ private inline fun uniffiRustCallWithError( } // Check UniffiRustCallStatus and throw an error if the call wasn't successful -private fun uniffiCheckCallStatus( - errorHandler: UniffiRustCallStatusErrorHandler, - status: UniffiRustCallStatus, -) { +private fun uniffiCheckCallStatus(errorHandler: UniffiRustCallStatusErrorHandler, status: UniffiRustCallStatus) { if (status.isSuccess()) { return } else if (status.isError()) { @@ -317,7 +303,7 @@ private fun uniffiCheckCallStatus( * * @suppress */ -object UniffiNullRustCallStatusErrorHandler : UniffiRustCallStatusErrorHandler { +object UniffiNullRustCallStatusErrorHandler: UniffiRustCallStatusErrorHandler { override fun lift(error_buf: RustBuffer.ByValue): InternalException { RustBuffer.free(error_buf) return InternalException("Unexpected CALL_ERROR") @@ -329,28 +315,28 @@ private inline fun uniffiRustCall(callback: (UniffiRustCallStatus) -> U): U return uniffiRustCallWithError(UniffiNullRustCallStatusErrorHandler, callback) } -internal inline fun uniffiTraitInterfaceCall( +internal inline fun uniffiTraitInterfaceCall( callStatus: UniffiRustCallStatus, makeCall: () -> T, writeReturn: (T) -> Unit, ) { try { writeReturn(makeCall()) - } catch (e: kotlin.Exception) { + } catch(e: kotlin.Exception) { callStatus.code = UNIFFI_CALL_UNEXPECTED_ERROR callStatus.error_buf = FfiConverterString.lower(e.toString()) } } -internal inline fun uniffiTraitInterfaceCallWithError( +internal inline fun uniffiTraitInterfaceCallWithError( callStatus: UniffiRustCallStatus, makeCall: () -> T, writeReturn: (T) -> Unit, - lowerError: (E) -> RustBuffer.ByValue, + lowerError: (E) -> RustBuffer.ByValue ) { try { writeReturn(makeCall()) - } catch (e: kotlin.Exception) { + } catch(e: kotlin.Exception) { if (e is E) { callStatus.code = UNIFFI_CALL_ERROR callStatus.error_buf = lowerError(e) @@ -360,11 +346,10 @@ internal inline fun uniffiTraitInterfaceCallWithError } } } - // Map handles to objects // // This is used pass an opaque 64-bit handle representing a foreign object to the Rust code. -internal class UniffiHandleMap { +internal class UniffiHandleMap { private val map = ConcurrentHashMap() private val counter = java.util.concurrent.atomic.AtomicLong(0) @@ -401,24 +386,21 @@ private fun findLibraryName(componentName: String): String { } private inline fun loadIndirect( - componentName: String, + componentName: String ): Lib { return Native.load(findLibraryName(componentName), Lib::class.java) } // Define FFI callback types internal interface UniffiRustFutureContinuationCallback : com.sun.jna.Callback { - fun callback(`data`: Long, `pollResult`: Byte) + fun callback(`data`: Long,`pollResult`: Byte,) } - internal interface UniffiForeignFutureFree : com.sun.jna.Callback { - fun callback(`handle`: Long) + fun callback(`handle`: Long,) } - internal interface UniffiCallbackInterfaceFree : com.sun.jna.Callback { - fun callback(`handle`: Long) + fun callback(`handle`: Long,) } - @Structure.FieldOrder("handle", "free") internal open class UniffiForeignFuture( @JvmField internal var `handle`: Long = 0.toLong(), @@ -427,15 +409,14 @@ internal open class UniffiForeignFuture( class UniffiByValue( `handle`: Long = 0.toLong(), `free`: UniffiForeignFutureFree? = null, - ) : UniffiForeignFuture(`handle`, `free`), Structure.ByValue + ): UniffiForeignFuture(`handle`,`free`,), Structure.ByValue - internal fun uniffiSetValue(other: UniffiForeignFuture) { + internal fun uniffiSetValue(other: UniffiForeignFuture) { `handle` = other.`handle` `free` = other.`free` } } - @Structure.FieldOrder("returnValue", "callStatus") internal open class UniffiForeignFutureStructU8( @JvmField internal var `returnValue`: Byte = 0.toByte(), @@ -444,19 +425,17 @@ internal open class UniffiForeignFutureStructU8( class UniffiByValue( `returnValue`: Byte = 0.toByte(), `callStatus`: UniffiRustCallStatus.ByValue = UniffiRustCallStatus.ByValue(), - ) : UniffiForeignFutureStructU8(`returnValue`, `callStatus`), Structure.ByValue + ): UniffiForeignFutureStructU8(`returnValue`,`callStatus`,), Structure.ByValue - internal fun uniffiSetValue(other: UniffiForeignFutureStructU8) { + internal fun uniffiSetValue(other: UniffiForeignFutureStructU8) { `returnValue` = other.`returnValue` `callStatus` = other.`callStatus` } } - internal interface UniffiForeignFutureCompleteU8 : com.sun.jna.Callback { - fun callback(`callbackData`: Long, `result`: UniffiForeignFutureStructU8.UniffiByValue) + fun callback(`callbackData`: Long,`result`: UniffiForeignFutureStructU8.UniffiByValue,) } - @Structure.FieldOrder("returnValue", "callStatus") internal open class UniffiForeignFutureStructI8( @JvmField internal var `returnValue`: Byte = 0.toByte(), @@ -465,19 +444,17 @@ internal open class UniffiForeignFutureStructI8( class UniffiByValue( `returnValue`: Byte = 0.toByte(), `callStatus`: UniffiRustCallStatus.ByValue = UniffiRustCallStatus.ByValue(), - ) : UniffiForeignFutureStructI8(`returnValue`, `callStatus`), Structure.ByValue + ): UniffiForeignFutureStructI8(`returnValue`,`callStatus`,), Structure.ByValue - internal fun uniffiSetValue(other: UniffiForeignFutureStructI8) { + internal fun uniffiSetValue(other: UniffiForeignFutureStructI8) { `returnValue` = other.`returnValue` `callStatus` = other.`callStatus` } } - internal interface UniffiForeignFutureCompleteI8 : com.sun.jna.Callback { - fun callback(`callbackData`: Long, `result`: UniffiForeignFutureStructI8.UniffiByValue) + fun callback(`callbackData`: Long,`result`: UniffiForeignFutureStructI8.UniffiByValue,) } - @Structure.FieldOrder("returnValue", "callStatus") internal open class UniffiForeignFutureStructU16( @JvmField internal var `returnValue`: Short = 0.toShort(), @@ -486,19 +463,17 @@ internal open class UniffiForeignFutureStructU16( class UniffiByValue( `returnValue`: Short = 0.toShort(), `callStatus`: UniffiRustCallStatus.ByValue = UniffiRustCallStatus.ByValue(), - ) : UniffiForeignFutureStructU16(`returnValue`, `callStatus`), Structure.ByValue + ): UniffiForeignFutureStructU16(`returnValue`,`callStatus`,), Structure.ByValue - internal fun uniffiSetValue(other: UniffiForeignFutureStructU16) { + internal fun uniffiSetValue(other: UniffiForeignFutureStructU16) { `returnValue` = other.`returnValue` `callStatus` = other.`callStatus` } } - internal interface UniffiForeignFutureCompleteU16 : com.sun.jna.Callback { - fun callback(`callbackData`: Long, `result`: UniffiForeignFutureStructU16.UniffiByValue) + fun callback(`callbackData`: Long,`result`: UniffiForeignFutureStructU16.UniffiByValue,) } - @Structure.FieldOrder("returnValue", "callStatus") internal open class UniffiForeignFutureStructI16( @JvmField internal var `returnValue`: Short = 0.toShort(), @@ -507,19 +482,17 @@ internal open class UniffiForeignFutureStructI16( class UniffiByValue( `returnValue`: Short = 0.toShort(), `callStatus`: UniffiRustCallStatus.ByValue = UniffiRustCallStatus.ByValue(), - ) : UniffiForeignFutureStructI16(`returnValue`, `callStatus`), Structure.ByValue + ): UniffiForeignFutureStructI16(`returnValue`,`callStatus`,), Structure.ByValue - internal fun uniffiSetValue(other: UniffiForeignFutureStructI16) { + internal fun uniffiSetValue(other: UniffiForeignFutureStructI16) { `returnValue` = other.`returnValue` `callStatus` = other.`callStatus` } } - internal interface UniffiForeignFutureCompleteI16 : com.sun.jna.Callback { - fun callback(`callbackData`: Long, `result`: UniffiForeignFutureStructI16.UniffiByValue) + fun callback(`callbackData`: Long,`result`: UniffiForeignFutureStructI16.UniffiByValue,) } - @Structure.FieldOrder("returnValue", "callStatus") internal open class UniffiForeignFutureStructU32( @JvmField internal var `returnValue`: Int = 0, @@ -528,19 +501,17 @@ internal open class UniffiForeignFutureStructU32( class UniffiByValue( `returnValue`: Int = 0, `callStatus`: UniffiRustCallStatus.ByValue = UniffiRustCallStatus.ByValue(), - ) : UniffiForeignFutureStructU32(`returnValue`, `callStatus`), Structure.ByValue + ): UniffiForeignFutureStructU32(`returnValue`,`callStatus`,), Structure.ByValue - internal fun uniffiSetValue(other: UniffiForeignFutureStructU32) { + internal fun uniffiSetValue(other: UniffiForeignFutureStructU32) { `returnValue` = other.`returnValue` `callStatus` = other.`callStatus` } } - internal interface UniffiForeignFutureCompleteU32 : com.sun.jna.Callback { - fun callback(`callbackData`: Long, `result`: UniffiForeignFutureStructU32.UniffiByValue) + fun callback(`callbackData`: Long,`result`: UniffiForeignFutureStructU32.UniffiByValue,) } - @Structure.FieldOrder("returnValue", "callStatus") internal open class UniffiForeignFutureStructI32( @JvmField internal var `returnValue`: Int = 0, @@ -549,19 +520,17 @@ internal open class UniffiForeignFutureStructI32( class UniffiByValue( `returnValue`: Int = 0, `callStatus`: UniffiRustCallStatus.ByValue = UniffiRustCallStatus.ByValue(), - ) : UniffiForeignFutureStructI32(`returnValue`, `callStatus`), Structure.ByValue + ): UniffiForeignFutureStructI32(`returnValue`,`callStatus`,), Structure.ByValue - internal fun uniffiSetValue(other: UniffiForeignFutureStructI32) { + internal fun uniffiSetValue(other: UniffiForeignFutureStructI32) { `returnValue` = other.`returnValue` `callStatus` = other.`callStatus` } } - internal interface UniffiForeignFutureCompleteI32 : com.sun.jna.Callback { - fun callback(`callbackData`: Long, `result`: UniffiForeignFutureStructI32.UniffiByValue) + fun callback(`callbackData`: Long,`result`: UniffiForeignFutureStructI32.UniffiByValue,) } - @Structure.FieldOrder("returnValue", "callStatus") internal open class UniffiForeignFutureStructU64( @JvmField internal var `returnValue`: Long = 0.toLong(), @@ -570,19 +539,17 @@ internal open class UniffiForeignFutureStructU64( class UniffiByValue( `returnValue`: Long = 0.toLong(), `callStatus`: UniffiRustCallStatus.ByValue = UniffiRustCallStatus.ByValue(), - ) : UniffiForeignFutureStructU64(`returnValue`, `callStatus`), Structure.ByValue + ): UniffiForeignFutureStructU64(`returnValue`,`callStatus`,), Structure.ByValue - internal fun uniffiSetValue(other: UniffiForeignFutureStructU64) { + internal fun uniffiSetValue(other: UniffiForeignFutureStructU64) { `returnValue` = other.`returnValue` `callStatus` = other.`callStatus` } } - internal interface UniffiForeignFutureCompleteU64 : com.sun.jna.Callback { - fun callback(`callbackData`: Long, `result`: UniffiForeignFutureStructU64.UniffiByValue) + fun callback(`callbackData`: Long,`result`: UniffiForeignFutureStructU64.UniffiByValue,) } - @Structure.FieldOrder("returnValue", "callStatus") internal open class UniffiForeignFutureStructI64( @JvmField internal var `returnValue`: Long = 0.toLong(), @@ -591,19 +558,17 @@ internal open class UniffiForeignFutureStructI64( class UniffiByValue( `returnValue`: Long = 0.toLong(), `callStatus`: UniffiRustCallStatus.ByValue = UniffiRustCallStatus.ByValue(), - ) : UniffiForeignFutureStructI64(`returnValue`, `callStatus`), Structure.ByValue + ): UniffiForeignFutureStructI64(`returnValue`,`callStatus`,), Structure.ByValue - internal fun uniffiSetValue(other: UniffiForeignFutureStructI64) { + internal fun uniffiSetValue(other: UniffiForeignFutureStructI64) { `returnValue` = other.`returnValue` `callStatus` = other.`callStatus` } } - internal interface UniffiForeignFutureCompleteI64 : com.sun.jna.Callback { - fun callback(`callbackData`: Long, `result`: UniffiForeignFutureStructI64.UniffiByValue) + fun callback(`callbackData`: Long,`result`: UniffiForeignFutureStructI64.UniffiByValue,) } - @Structure.FieldOrder("returnValue", "callStatus") internal open class UniffiForeignFutureStructF32( @JvmField internal var `returnValue`: Float = 0.0f, @@ -612,19 +577,17 @@ internal open class UniffiForeignFutureStructF32( class UniffiByValue( `returnValue`: Float = 0.0f, `callStatus`: UniffiRustCallStatus.ByValue = UniffiRustCallStatus.ByValue(), - ) : UniffiForeignFutureStructF32(`returnValue`, `callStatus`), Structure.ByValue + ): UniffiForeignFutureStructF32(`returnValue`,`callStatus`,), Structure.ByValue - internal fun uniffiSetValue(other: UniffiForeignFutureStructF32) { + internal fun uniffiSetValue(other: UniffiForeignFutureStructF32) { `returnValue` = other.`returnValue` `callStatus` = other.`callStatus` } } - internal interface UniffiForeignFutureCompleteF32 : com.sun.jna.Callback { - fun callback(`callbackData`: Long, `result`: UniffiForeignFutureStructF32.UniffiByValue) + fun callback(`callbackData`: Long,`result`: UniffiForeignFutureStructF32.UniffiByValue,) } - @Structure.FieldOrder("returnValue", "callStatus") internal open class UniffiForeignFutureStructF64( @JvmField internal var `returnValue`: Double = 0.0, @@ -633,19 +596,17 @@ internal open class UniffiForeignFutureStructF64( class UniffiByValue( `returnValue`: Double = 0.0, `callStatus`: UniffiRustCallStatus.ByValue = UniffiRustCallStatus.ByValue(), - ) : UniffiForeignFutureStructF64(`returnValue`, `callStatus`), Structure.ByValue + ): UniffiForeignFutureStructF64(`returnValue`,`callStatus`,), Structure.ByValue - internal fun uniffiSetValue(other: UniffiForeignFutureStructF64) { + internal fun uniffiSetValue(other: UniffiForeignFutureStructF64) { `returnValue` = other.`returnValue` `callStatus` = other.`callStatus` } } - internal interface UniffiForeignFutureCompleteF64 : com.sun.jna.Callback { - fun callback(`callbackData`: Long, `result`: UniffiForeignFutureStructF64.UniffiByValue) + fun callback(`callbackData`: Long,`result`: UniffiForeignFutureStructF64.UniffiByValue,) } - @Structure.FieldOrder("returnValue", "callStatus") internal open class UniffiForeignFutureStructPointer( @JvmField internal var `returnValue`: Pointer = Pointer.NULL, @@ -654,19 +615,17 @@ internal open class UniffiForeignFutureStructPointer( class UniffiByValue( `returnValue`: Pointer = Pointer.NULL, `callStatus`: UniffiRustCallStatus.ByValue = UniffiRustCallStatus.ByValue(), - ) : UniffiForeignFutureStructPointer(`returnValue`, `callStatus`), Structure.ByValue + ): UniffiForeignFutureStructPointer(`returnValue`,`callStatus`,), Structure.ByValue - internal fun uniffiSetValue(other: UniffiForeignFutureStructPointer) { + internal fun uniffiSetValue(other: UniffiForeignFutureStructPointer) { `returnValue` = other.`returnValue` `callStatus` = other.`callStatus` } } - internal interface UniffiForeignFutureCompletePointer : com.sun.jna.Callback { - fun callback(`callbackData`: Long, `result`: UniffiForeignFutureStructPointer.UniffiByValue) + fun callback(`callbackData`: Long,`result`: UniffiForeignFutureStructPointer.UniffiByValue,) } - @Structure.FieldOrder("returnValue", "callStatus") internal open class UniffiForeignFutureStructRustBuffer( @JvmField internal var `returnValue`: RustBuffer.ByValue = RustBuffer.ByValue(), @@ -675,147 +634,69 @@ internal open class UniffiForeignFutureStructRustBuffer( class UniffiByValue( `returnValue`: RustBuffer.ByValue = RustBuffer.ByValue(), `callStatus`: UniffiRustCallStatus.ByValue = UniffiRustCallStatus.ByValue(), - ) : UniffiForeignFutureStructRustBuffer(`returnValue`, `callStatus`), Structure.ByValue + ): UniffiForeignFutureStructRustBuffer(`returnValue`,`callStatus`,), Structure.ByValue - internal fun uniffiSetValue(other: UniffiForeignFutureStructRustBuffer) { + internal fun uniffiSetValue(other: UniffiForeignFutureStructRustBuffer) { `returnValue` = other.`returnValue` `callStatus` = other.`callStatus` } } - internal interface UniffiForeignFutureCompleteRustBuffer : com.sun.jna.Callback { - fun callback( - `callbackData`: Long, - `result`: UniffiForeignFutureStructRustBuffer.UniffiByValue, - ) + fun callback(`callbackData`: Long,`result`: UniffiForeignFutureStructRustBuffer.UniffiByValue,) } - @Structure.FieldOrder("callStatus") internal open class UniffiForeignFutureStructVoid( @JvmField internal var `callStatus`: UniffiRustCallStatus.ByValue = UniffiRustCallStatus.ByValue(), ) : Structure() { class UniffiByValue( `callStatus`: UniffiRustCallStatus.ByValue = UniffiRustCallStatus.ByValue(), - ) : UniffiForeignFutureStructVoid(`callStatus`), Structure.ByValue + ): UniffiForeignFutureStructVoid(`callStatus`,), Structure.ByValue - internal fun uniffiSetValue(other: UniffiForeignFutureStructVoid) { + internal fun uniffiSetValue(other: UniffiForeignFutureStructVoid) { `callStatus` = other.`callStatus` } } - internal interface UniffiForeignFutureCompleteVoid : com.sun.jna.Callback { - fun callback(`callbackData`: Long, `result`: UniffiForeignFutureStructVoid.UniffiByValue) + fun callback(`callbackData`: Long,`result`: UniffiForeignFutureStructVoid.UniffiByValue,) } - internal interface UniffiCallbackInterfaceFfiInboxOwnerMethod0 : com.sun.jna.Callback { - fun callback( - `uniffiHandle`: Long, - `uniffiOutReturn`: RustBuffer, - uniffiCallStatus: UniffiRustCallStatus, - ) + fun callback(`uniffiHandle`: Long,`uniffiOutReturn`: RustBuffer,uniffiCallStatus: UniffiRustCallStatus,) } - internal interface UniffiCallbackInterfaceFfiInboxOwnerMethod1 : com.sun.jna.Callback { - fun callback( - `uniffiHandle`: Long, - `text`: RustBuffer.ByValue, - `uniffiOutReturn`: RustBuffer, - uniffiCallStatus: UniffiRustCallStatus, - ) + fun callback(`uniffiHandle`: Long,`text`: RustBuffer.ByValue,`uniffiOutReturn`: RustBuffer,uniffiCallStatus: UniffiRustCallStatus,) } - internal interface UniffiCallbackInterfaceFfiConsentCallbackMethod0 : com.sun.jna.Callback { - fun callback( - `uniffiHandle`: Long, - `consent`: RustBuffer.ByValue, - `uniffiOutReturn`: Pointer, - uniffiCallStatus: UniffiRustCallStatus, - ) + fun callback(`uniffiHandle`: Long,`consent`: RustBuffer.ByValue,`uniffiOutReturn`: Pointer,uniffiCallStatus: UniffiRustCallStatus,) } - internal interface UniffiCallbackInterfaceFfiConsentCallbackMethod1 : com.sun.jna.Callback { - fun callback( - `uniffiHandle`: Long, - `error`: RustBuffer.ByValue, - `uniffiOutReturn`: Pointer, - uniffiCallStatus: UniffiRustCallStatus, - ) + fun callback(`uniffiHandle`: Long,`error`: RustBuffer.ByValue,`uniffiOutReturn`: Pointer,uniffiCallStatus: UniffiRustCallStatus,) } - internal interface UniffiCallbackInterfaceFfiConversationCallbackMethod0 : com.sun.jna.Callback { - fun callback( - `uniffiHandle`: Long, - `conversation`: Pointer, - `uniffiOutReturn`: Pointer, - uniffiCallStatus: UniffiRustCallStatus, - ) + fun callback(`uniffiHandle`: Long,`conversation`: Pointer,`uniffiOutReturn`: Pointer,uniffiCallStatus: UniffiRustCallStatus,) } - internal interface UniffiCallbackInterfaceFfiConversationCallbackMethod1 : com.sun.jna.Callback { - fun callback( - `uniffiHandle`: Long, - `error`: RustBuffer.ByValue, - `uniffiOutReturn`: Pointer, - uniffiCallStatus: UniffiRustCallStatus, - ) + fun callback(`uniffiHandle`: Long,`error`: RustBuffer.ByValue,`uniffiOutReturn`: Pointer,uniffiCallStatus: UniffiRustCallStatus,) } - internal interface UniffiCallbackInterfaceFfiMessageCallbackMethod0 : com.sun.jna.Callback { - fun callback( - `uniffiHandle`: Long, - `message`: RustBuffer.ByValue, - `uniffiOutReturn`: Pointer, - uniffiCallStatus: UniffiRustCallStatus, - ) + fun callback(`uniffiHandle`: Long,`message`: RustBuffer.ByValue,`uniffiOutReturn`: Pointer,uniffiCallStatus: UniffiRustCallStatus,) } - internal interface UniffiCallbackInterfaceFfiMessageCallbackMethod1 : com.sun.jna.Callback { - fun callback( - `uniffiHandle`: Long, - `error`: RustBuffer.ByValue, - `uniffiOutReturn`: Pointer, - uniffiCallStatus: UniffiRustCallStatus, - ) + fun callback(`uniffiHandle`: Long,`error`: RustBuffer.ByValue,`uniffiOutReturn`: Pointer,uniffiCallStatus: UniffiRustCallStatus,) } - internal interface UniffiCallbackInterfaceFfiPreferenceCallbackMethod0 : com.sun.jna.Callback { - fun callback( - `uniffiHandle`: Long, - `preference`: RustBuffer.ByValue, - `uniffiOutReturn`: Pointer, - uniffiCallStatus: UniffiRustCallStatus, - ) + fun callback(`uniffiHandle`: Long,`preference`: RustBuffer.ByValue,`uniffiOutReturn`: Pointer,uniffiCallStatus: UniffiRustCallStatus,) } - internal interface UniffiCallbackInterfaceFfiPreferenceCallbackMethod1 : com.sun.jna.Callback { - fun callback( - `uniffiHandle`: Long, - `error`: RustBuffer.ByValue, - `uniffiOutReturn`: Pointer, - uniffiCallStatus: UniffiRustCallStatus, - ) + fun callback(`uniffiHandle`: Long,`error`: RustBuffer.ByValue,`uniffiOutReturn`: Pointer,uniffiCallStatus: UniffiRustCallStatus,) } - internal interface UniffiCallbackInterfaceFfiV2SubscriptionCallbackMethod0 : com.sun.jna.Callback { - fun callback( - `uniffiHandle`: Long, - `message`: RustBuffer.ByValue, - `uniffiOutReturn`: Pointer, - uniffiCallStatus: UniffiRustCallStatus, - ) + fun callback(`uniffiHandle`: Long,`message`: RustBuffer.ByValue,`uniffiOutReturn`: Pointer,uniffiCallStatus: UniffiRustCallStatus,) } - internal interface UniffiCallbackInterfaceFfiV2SubscriptionCallbackMethod1 : com.sun.jna.Callback { - fun callback( - `uniffiHandle`: Long, - `error`: RustBuffer.ByValue, - `uniffiOutReturn`: Pointer, - uniffiCallStatus: UniffiRustCallStatus, - ) + fun callback(`uniffiHandle`: Long,`error`: RustBuffer.ByValue,`uniffiOutReturn`: Pointer,uniffiCallStatus: UniffiRustCallStatus,) } - @Structure.FieldOrder("getAddress", "sign", "uniffiFree") internal open class UniffiVTableCallbackInterfaceFfiInboxOwner( @JvmField internal var `getAddress`: UniffiCallbackInterfaceFfiInboxOwnerMethod0? = null, @@ -826,17 +707,15 @@ internal open class UniffiVTableCallbackInterfaceFfiInboxOwner( `getAddress`: UniffiCallbackInterfaceFfiInboxOwnerMethod0? = null, `sign`: UniffiCallbackInterfaceFfiInboxOwnerMethod1? = null, `uniffiFree`: UniffiCallbackInterfaceFree? = null, - ) : UniffiVTableCallbackInterfaceFfiInboxOwner(`getAddress`, `sign`, `uniffiFree`), - Structure.ByValue + ): UniffiVTableCallbackInterfaceFfiInboxOwner(`getAddress`,`sign`,`uniffiFree`,), Structure.ByValue - internal fun uniffiSetValue(other: UniffiVTableCallbackInterfaceFfiInboxOwner) { + internal fun uniffiSetValue(other: UniffiVTableCallbackInterfaceFfiInboxOwner) { `getAddress` = other.`getAddress` `sign` = other.`sign` `uniffiFree` = other.`uniffiFree` } } - @Structure.FieldOrder("onConsentUpdate", "onError", "uniffiFree") internal open class UniffiVTableCallbackInterfaceFfiConsentCallback( @JvmField internal var `onConsentUpdate`: UniffiCallbackInterfaceFfiConsentCallbackMethod0? = null, @@ -847,20 +726,15 @@ internal open class UniffiVTableCallbackInterfaceFfiConsentCallback( `onConsentUpdate`: UniffiCallbackInterfaceFfiConsentCallbackMethod0? = null, `onError`: UniffiCallbackInterfaceFfiConsentCallbackMethod1? = null, `uniffiFree`: UniffiCallbackInterfaceFree? = null, - ) : UniffiVTableCallbackInterfaceFfiConsentCallback( - `onConsentUpdate`, - `onError`, - `uniffiFree`, - ), Structure.ByValue + ): UniffiVTableCallbackInterfaceFfiConsentCallback(`onConsentUpdate`,`onError`,`uniffiFree`,), Structure.ByValue - internal fun uniffiSetValue(other: UniffiVTableCallbackInterfaceFfiConsentCallback) { + internal fun uniffiSetValue(other: UniffiVTableCallbackInterfaceFfiConsentCallback) { `onConsentUpdate` = other.`onConsentUpdate` `onError` = other.`onError` `uniffiFree` = other.`uniffiFree` } } - @Structure.FieldOrder("onConversation", "onError", "uniffiFree") internal open class UniffiVTableCallbackInterfaceFfiConversationCallback( @JvmField internal var `onConversation`: UniffiCallbackInterfaceFfiConversationCallbackMethod0? = null, @@ -871,20 +745,15 @@ internal open class UniffiVTableCallbackInterfaceFfiConversationCallback( `onConversation`: UniffiCallbackInterfaceFfiConversationCallbackMethod0? = null, `onError`: UniffiCallbackInterfaceFfiConversationCallbackMethod1? = null, `uniffiFree`: UniffiCallbackInterfaceFree? = null, - ) : UniffiVTableCallbackInterfaceFfiConversationCallback( - `onConversation`, - `onError`, - `uniffiFree`, - ), Structure.ByValue + ): UniffiVTableCallbackInterfaceFfiConversationCallback(`onConversation`,`onError`,`uniffiFree`,), Structure.ByValue - internal fun uniffiSetValue(other: UniffiVTableCallbackInterfaceFfiConversationCallback) { + internal fun uniffiSetValue(other: UniffiVTableCallbackInterfaceFfiConversationCallback) { `onConversation` = other.`onConversation` `onError` = other.`onError` `uniffiFree` = other.`uniffiFree` } } - @Structure.FieldOrder("onMessage", "onError", "uniffiFree") internal open class UniffiVTableCallbackInterfaceFfiMessageCallback( @JvmField internal var `onMessage`: UniffiCallbackInterfaceFfiMessageCallbackMethod0? = null, @@ -895,17 +764,15 @@ internal open class UniffiVTableCallbackInterfaceFfiMessageCallback( `onMessage`: UniffiCallbackInterfaceFfiMessageCallbackMethod0? = null, `onError`: UniffiCallbackInterfaceFfiMessageCallbackMethod1? = null, `uniffiFree`: UniffiCallbackInterfaceFree? = null, - ) : UniffiVTableCallbackInterfaceFfiMessageCallback(`onMessage`, `onError`, `uniffiFree`), - Structure.ByValue + ): UniffiVTableCallbackInterfaceFfiMessageCallback(`onMessage`,`onError`,`uniffiFree`,), Structure.ByValue - internal fun uniffiSetValue(other: UniffiVTableCallbackInterfaceFfiMessageCallback) { + internal fun uniffiSetValue(other: UniffiVTableCallbackInterfaceFfiMessageCallback) { `onMessage` = other.`onMessage` `onError` = other.`onError` `uniffiFree` = other.`uniffiFree` } } - @Structure.FieldOrder("onPreferenceUpdate", "onError", "uniffiFree") internal open class UniffiVTableCallbackInterfaceFfiPreferenceCallback( @JvmField internal var `onPreferenceUpdate`: UniffiCallbackInterfaceFfiPreferenceCallbackMethod0? = null, @@ -916,20 +783,15 @@ internal open class UniffiVTableCallbackInterfaceFfiPreferenceCallback( `onPreferenceUpdate`: UniffiCallbackInterfaceFfiPreferenceCallbackMethod0? = null, `onError`: UniffiCallbackInterfaceFfiPreferenceCallbackMethod1? = null, `uniffiFree`: UniffiCallbackInterfaceFree? = null, - ) : UniffiVTableCallbackInterfaceFfiPreferenceCallback( - `onPreferenceUpdate`, - `onError`, - `uniffiFree`, - ), Structure.ByValue + ): UniffiVTableCallbackInterfaceFfiPreferenceCallback(`onPreferenceUpdate`,`onError`,`uniffiFree`,), Structure.ByValue - internal fun uniffiSetValue(other: UniffiVTableCallbackInterfaceFfiPreferenceCallback) { + internal fun uniffiSetValue(other: UniffiVTableCallbackInterfaceFfiPreferenceCallback) { `onPreferenceUpdate` = other.`onPreferenceUpdate` `onError` = other.`onError` `uniffiFree` = other.`uniffiFree` } } - @Structure.FieldOrder("onMessage", "onError", "uniffiFree") internal open class UniffiVTableCallbackInterfaceFfiV2SubscriptionCallback( @JvmField internal var `onMessage`: UniffiCallbackInterfaceFfiV2SubscriptionCallbackMethod0? = null, @@ -940,13 +802,9 @@ internal open class UniffiVTableCallbackInterfaceFfiV2SubscriptionCallback( `onMessage`: UniffiCallbackInterfaceFfiV2SubscriptionCallbackMethod0? = null, `onError`: UniffiCallbackInterfaceFfiV2SubscriptionCallbackMethod1? = null, `uniffiFree`: UniffiCallbackInterfaceFree? = null, - ) : UniffiVTableCallbackInterfaceFfiV2SubscriptionCallback( - `onMessage`, - `onError`, - `uniffiFree`, - ), Structure.ByValue + ): UniffiVTableCallbackInterfaceFfiV2SubscriptionCallback(`onMessage`,`onError`,`uniffiFree`,), Structure.ByValue - internal fun uniffiSetValue(other: UniffiVTableCallbackInterfaceFfiV2SubscriptionCallback) { + internal fun uniffiSetValue(other: UniffiVTableCallbackInterfaceFfiV2SubscriptionCallback) { `onMessage` = other.`onMessage` `onError` = other.`onError` `uniffiFree` = other.`uniffiFree` @@ -955,1393 +813,1144 @@ internal open class UniffiVTableCallbackInterfaceFfiV2SubscriptionCallback( } -// A JNA Library to expose the extern-C FFI definitions. -// This is an implementation detail which will be called internally by the public API. -internal interface UniffiLib : Library { - companion object { - internal val INSTANCE: UniffiLib by lazy { - loadIndirect(componentName = "xmtpv3") - .also { lib: UniffiLib -> - uniffiCheckContractApiVersion(lib) - uniffiCheckApiChecksums(lib) - uniffiCallbackInterfaceFfiConsentCallback.register(lib) - uniffiCallbackInterfaceFfiConversationCallback.register(lib) - uniffiCallbackInterfaceFfiMessageCallback.register(lib) - uniffiCallbackInterfaceFfiPreferenceCallback.register(lib) - uniffiCallbackInterfaceFfiV2SubscriptionCallback.register(lib) - uniffiCallbackInterfaceFfiInboxOwner.register(lib) - } - } - // The Cleaner for the whole library - internal val CLEANER: UniffiCleaner by lazy { - UniffiCleaner.create() - } - } - fun uniffi_xmtpv3_fn_clone_fficonsentcallback( - `ptr`: Pointer, uniffi_out_err: UniffiRustCallStatus, - ): Pointer - fun uniffi_xmtpv3_fn_free_fficonsentcallback( - `ptr`: Pointer, uniffi_out_err: UniffiRustCallStatus, - ): Unit - fun uniffi_xmtpv3_fn_init_callback_vtable_fficonsentcallback( - `vtable`: UniffiVTableCallbackInterfaceFfiConsentCallback, - ): Unit - fun uniffi_xmtpv3_fn_method_fficonsentcallback_on_consent_update( - `ptr`: Pointer, `consent`: RustBuffer.ByValue, uniffi_out_err: UniffiRustCallStatus, - ): Unit - fun uniffi_xmtpv3_fn_method_fficonsentcallback_on_error( - `ptr`: Pointer, `error`: RustBuffer.ByValue, uniffi_out_err: UniffiRustCallStatus, - ): Unit - fun uniffi_xmtpv3_fn_clone_fficonversation( - `ptr`: Pointer, uniffi_out_err: UniffiRustCallStatus, - ): Pointer - fun uniffi_xmtpv3_fn_free_fficonversation( - `ptr`: Pointer, uniffi_out_err: UniffiRustCallStatus, - ): Unit - fun uniffi_xmtpv3_fn_method_fficonversation_add_admin( - `ptr`: Pointer, `inboxId`: RustBuffer.ByValue, - ): Long - fun uniffi_xmtpv3_fn_method_fficonversation_add_members( - `ptr`: Pointer, `accountAddresses`: RustBuffer.ByValue, - ): Long - fun uniffi_xmtpv3_fn_method_fficonversation_add_members_by_inbox_id( - `ptr`: Pointer, `inboxIds`: RustBuffer.ByValue, - ): Long - fun uniffi_xmtpv3_fn_method_fficonversation_add_super_admin( - `ptr`: Pointer, `inboxId`: RustBuffer.ByValue, - ): Long - fun uniffi_xmtpv3_fn_method_fficonversation_added_by_inbox_id( - `ptr`: Pointer, uniffi_out_err: UniffiRustCallStatus, - ): RustBuffer.ByValue - fun uniffi_xmtpv3_fn_method_fficonversation_admin_list( - `ptr`: Pointer, uniffi_out_err: UniffiRustCallStatus, - ): RustBuffer.ByValue - fun uniffi_xmtpv3_fn_method_fficonversation_consent_state( - `ptr`: Pointer, uniffi_out_err: UniffiRustCallStatus, - ): RustBuffer.ByValue - fun uniffi_xmtpv3_fn_method_fficonversation_conversation_type( - `ptr`: Pointer, - ): Long - fun uniffi_xmtpv3_fn_method_fficonversation_created_at_ns( - `ptr`: Pointer, uniffi_out_err: UniffiRustCallStatus, - ): Long - fun uniffi_xmtpv3_fn_method_fficonversation_dm_peer_inbox_id( - `ptr`: Pointer, uniffi_out_err: UniffiRustCallStatus, - ): RustBuffer.ByValue - fun uniffi_xmtpv3_fn_method_fficonversation_find_messages( - `ptr`: Pointer, `opts`: RustBuffer.ByValue, - ): Long - fun uniffi_xmtpv3_fn_method_fficonversation_group_description( - `ptr`: Pointer, uniffi_out_err: UniffiRustCallStatus, - ): RustBuffer.ByValue - fun uniffi_xmtpv3_fn_method_fficonversation_group_image_url_square( - `ptr`: Pointer, uniffi_out_err: UniffiRustCallStatus, - ): RustBuffer.ByValue - fun uniffi_xmtpv3_fn_method_fficonversation_group_metadata( - `ptr`: Pointer, - ): Long - fun uniffi_xmtpv3_fn_method_fficonversation_group_name( - `ptr`: Pointer, uniffi_out_err: UniffiRustCallStatus, - ): RustBuffer.ByValue - fun uniffi_xmtpv3_fn_method_fficonversation_group_permissions( - `ptr`: Pointer, uniffi_out_err: UniffiRustCallStatus, - ): Pointer - fun uniffi_xmtpv3_fn_method_fficonversation_group_pinned_frame_url( - `ptr`: Pointer, uniffi_out_err: UniffiRustCallStatus, - ): RustBuffer.ByValue - fun uniffi_xmtpv3_fn_method_fficonversation_id( - `ptr`: Pointer, uniffi_out_err: UniffiRustCallStatus, - ): RustBuffer.ByValue - fun uniffi_xmtpv3_fn_method_fficonversation_is_active( - `ptr`: Pointer, uniffi_out_err: UniffiRustCallStatus, - ): Byte - fun uniffi_xmtpv3_fn_method_fficonversation_is_admin( - `ptr`: Pointer, `inboxId`: RustBuffer.ByValue, uniffi_out_err: UniffiRustCallStatus, - ): Byte - fun uniffi_xmtpv3_fn_method_fficonversation_is_super_admin( - `ptr`: Pointer, `inboxId`: RustBuffer.ByValue, uniffi_out_err: UniffiRustCallStatus, - ): Byte - fun uniffi_xmtpv3_fn_method_fficonversation_list_members( - `ptr`: Pointer, - ): Long - fun uniffi_xmtpv3_fn_method_fficonversation_process_streamed_conversation_message( - `ptr`: Pointer, `envelopeBytes`: RustBuffer.ByValue, - ): Long - fun uniffi_xmtpv3_fn_method_fficonversation_publish_messages( - `ptr`: Pointer, - ): Long - fun uniffi_xmtpv3_fn_method_fficonversation_remove_admin( - `ptr`: Pointer, `inboxId`: RustBuffer.ByValue, - ): Long - fun uniffi_xmtpv3_fn_method_fficonversation_remove_members( - `ptr`: Pointer, `accountAddresses`: RustBuffer.ByValue, - ): Long - fun uniffi_xmtpv3_fn_method_fficonversation_remove_members_by_inbox_id( - `ptr`: Pointer, `inboxIds`: RustBuffer.ByValue, - ): Long - fun uniffi_xmtpv3_fn_method_fficonversation_remove_super_admin( - `ptr`: Pointer, `inboxId`: RustBuffer.ByValue, - ): Long - fun uniffi_xmtpv3_fn_method_fficonversation_send( - `ptr`: Pointer, `contentBytes`: RustBuffer.ByValue, - ): Long - fun uniffi_xmtpv3_fn_method_fficonversation_send_optimistic( - `ptr`: Pointer, `contentBytes`: RustBuffer.ByValue, uniffi_out_err: UniffiRustCallStatus, - ): RustBuffer.ByValue - fun uniffi_xmtpv3_fn_method_fficonversation_stream( - `ptr`: Pointer, `messageCallback`: Pointer, - ): Long - fun uniffi_xmtpv3_fn_method_fficonversation_super_admin_list( - `ptr`: Pointer, uniffi_out_err: UniffiRustCallStatus, - ): RustBuffer.ByValue - fun uniffi_xmtpv3_fn_method_fficonversation_sync( - `ptr`: Pointer, - ): Long - fun uniffi_xmtpv3_fn_method_fficonversation_update_consent_state( - `ptr`: Pointer, `state`: RustBuffer.ByValue, uniffi_out_err: UniffiRustCallStatus, - ): Unit - fun uniffi_xmtpv3_fn_method_fficonversation_update_group_description( - `ptr`: Pointer, `groupDescription`: RustBuffer.ByValue, - ): Long - fun uniffi_xmtpv3_fn_method_fficonversation_update_group_image_url_square( - `ptr`: Pointer, `groupImageUrlSquare`: RustBuffer.ByValue, - ): Long - fun uniffi_xmtpv3_fn_method_fficonversation_update_group_name( - `ptr`: Pointer, `groupName`: RustBuffer.ByValue, - ): Long - fun uniffi_xmtpv3_fn_method_fficonversation_update_group_pinned_frame_url( - `ptr`: Pointer, `pinnedFrameUrl`: RustBuffer.ByValue, - ): Long - fun uniffi_xmtpv3_fn_method_fficonversation_update_permission_policy( - `ptr`: Pointer, - `permissionUpdateType`: RustBuffer.ByValue, - `permissionPolicyOption`: RustBuffer.ByValue, - `metadataField`: RustBuffer.ByValue, - ): Long - fun uniffi_xmtpv3_fn_clone_fficonversationcallback( - `ptr`: Pointer, uniffi_out_err: UniffiRustCallStatus, - ): Pointer - fun uniffi_xmtpv3_fn_free_fficonversationcallback( - `ptr`: Pointer, uniffi_out_err: UniffiRustCallStatus, - ): Unit - fun uniffi_xmtpv3_fn_init_callback_vtable_fficonversationcallback( - `vtable`: UniffiVTableCallbackInterfaceFfiConversationCallback, - ): Unit - fun uniffi_xmtpv3_fn_method_fficonversationcallback_on_conversation( - `ptr`: Pointer, `conversation`: Pointer, uniffi_out_err: UniffiRustCallStatus, - ): Unit - fun uniffi_xmtpv3_fn_method_fficonversationcallback_on_error( - `ptr`: Pointer, `error`: RustBuffer.ByValue, uniffi_out_err: UniffiRustCallStatus, - ): Unit - fun uniffi_xmtpv3_fn_clone_fficonversationlistitem( - `ptr`: Pointer, uniffi_out_err: UniffiRustCallStatus, - ): Pointer - fun uniffi_xmtpv3_fn_free_fficonversationlistitem( - `ptr`: Pointer, uniffi_out_err: UniffiRustCallStatus, - ): Unit - fun uniffi_xmtpv3_fn_method_fficonversationlistitem_conversation( - `ptr`: Pointer, uniffi_out_err: UniffiRustCallStatus, - ): Pointer - fun uniffi_xmtpv3_fn_method_fficonversationlistitem_last_message( - `ptr`: Pointer, uniffi_out_err: UniffiRustCallStatus, - ): RustBuffer.ByValue - fun uniffi_xmtpv3_fn_clone_fficonversationmetadata( - `ptr`: Pointer, uniffi_out_err: UniffiRustCallStatus, - ): Pointer - fun uniffi_xmtpv3_fn_free_fficonversationmetadata( - `ptr`: Pointer, uniffi_out_err: UniffiRustCallStatus, - ): Unit - fun uniffi_xmtpv3_fn_method_fficonversationmetadata_conversation_type( - `ptr`: Pointer, uniffi_out_err: UniffiRustCallStatus, - ): RustBuffer.ByValue - fun uniffi_xmtpv3_fn_method_fficonversationmetadata_creator_inbox_id( - `ptr`: Pointer, uniffi_out_err: UniffiRustCallStatus, - ): RustBuffer.ByValue - fun uniffi_xmtpv3_fn_clone_fficonversations( - `ptr`: Pointer, uniffi_out_err: UniffiRustCallStatus, - ): Pointer - fun uniffi_xmtpv3_fn_free_fficonversations( - `ptr`: Pointer, uniffi_out_err: UniffiRustCallStatus, - ): Unit - fun uniffi_xmtpv3_fn_method_fficonversations_create_dm( - `ptr`: Pointer, `accountAddress`: RustBuffer.ByValue, - ): Long - fun uniffi_xmtpv3_fn_method_fficonversations_create_group( - `ptr`: Pointer, `accountAddresses`: RustBuffer.ByValue, `opts`: RustBuffer.ByValue, - ): Long - fun uniffi_xmtpv3_fn_method_fficonversations_get_hmac_keys( - `ptr`: Pointer, uniffi_out_err: UniffiRustCallStatus, - ): RustBuffer.ByValue - fun uniffi_xmtpv3_fn_method_fficonversations_get_sync_group( - `ptr`: Pointer, uniffi_out_err: UniffiRustCallStatus, - ): Pointer - fun uniffi_xmtpv3_fn_method_fficonversations_list( - `ptr`: Pointer, `opts`: RustBuffer.ByValue, uniffi_out_err: UniffiRustCallStatus, - ): RustBuffer.ByValue - fun uniffi_xmtpv3_fn_method_fficonversations_list_dms( - `ptr`: Pointer, `opts`: RustBuffer.ByValue, uniffi_out_err: UniffiRustCallStatus, - ): RustBuffer.ByValue - fun uniffi_xmtpv3_fn_method_fficonversations_list_groups( - `ptr`: Pointer, `opts`: RustBuffer.ByValue, uniffi_out_err: UniffiRustCallStatus, - ): RustBuffer.ByValue - fun uniffi_xmtpv3_fn_method_fficonversations_process_streamed_welcome_message( - `ptr`: Pointer, `envelopeBytes`: RustBuffer.ByValue, - ): Long - fun uniffi_xmtpv3_fn_method_fficonversations_stream( - `ptr`: Pointer, `callback`: Pointer, - ): Long - fun uniffi_xmtpv3_fn_method_fficonversations_stream_all_dm_messages( - `ptr`: Pointer, `messageCallback`: Pointer, - ): Long - fun uniffi_xmtpv3_fn_method_fficonversations_stream_all_group_messages( - `ptr`: Pointer, `messageCallback`: Pointer, - ): Long - fun uniffi_xmtpv3_fn_method_fficonversations_stream_all_messages( - `ptr`: Pointer, `messageCallback`: Pointer, - ): Long - fun uniffi_xmtpv3_fn_method_fficonversations_stream_consent( - `ptr`: Pointer, `callback`: Pointer, - ): Long - fun uniffi_xmtpv3_fn_method_fficonversations_stream_dms( - `ptr`: Pointer, `callback`: Pointer, - ): Long - fun uniffi_xmtpv3_fn_method_fficonversations_stream_groups( - `ptr`: Pointer, `callback`: Pointer, - ): Long - fun uniffi_xmtpv3_fn_method_fficonversations_stream_messages( - `ptr`: Pointer, `messageCallback`: Pointer, `conversationType`: RustBuffer.ByValue, - ): Long - fun uniffi_xmtpv3_fn_method_fficonversations_stream_preferences( - `ptr`: Pointer, `callback`: Pointer, - ): Long - fun uniffi_xmtpv3_fn_method_fficonversations_sync( - `ptr`: Pointer, - ): Long - fun uniffi_xmtpv3_fn_method_fficonversations_sync_all_conversations( - `ptr`: Pointer, `consentState`: RustBuffer.ByValue, - ): Long - fun uniffi_xmtpv3_fn_clone_ffigrouppermissions( - `ptr`: Pointer, uniffi_out_err: UniffiRustCallStatus, - ): Pointer - fun uniffi_xmtpv3_fn_free_ffigrouppermissions( - `ptr`: Pointer, uniffi_out_err: UniffiRustCallStatus, - ): Unit - fun uniffi_xmtpv3_fn_method_ffigrouppermissions_policy_set( - `ptr`: Pointer, uniffi_out_err: UniffiRustCallStatus, - ): RustBuffer.ByValue - fun uniffi_xmtpv3_fn_method_ffigrouppermissions_policy_type( - `ptr`: Pointer, uniffi_out_err: UniffiRustCallStatus, - ): RustBuffer.ByValue - fun uniffi_xmtpv3_fn_clone_ffimessagecallback( - `ptr`: Pointer, uniffi_out_err: UniffiRustCallStatus, - ): Pointer - fun uniffi_xmtpv3_fn_free_ffimessagecallback( - `ptr`: Pointer, uniffi_out_err: UniffiRustCallStatus, - ): Unit - fun uniffi_xmtpv3_fn_init_callback_vtable_ffimessagecallback( - `vtable`: UniffiVTableCallbackInterfaceFfiMessageCallback, - ): Unit - fun uniffi_xmtpv3_fn_method_ffimessagecallback_on_message( - `ptr`: Pointer, `message`: RustBuffer.ByValue, uniffi_out_err: UniffiRustCallStatus, - ): Unit - fun uniffi_xmtpv3_fn_method_ffimessagecallback_on_error( - `ptr`: Pointer, `error`: RustBuffer.ByValue, uniffi_out_err: UniffiRustCallStatus, - ): Unit - fun uniffi_xmtpv3_fn_clone_ffipreferencecallback( - `ptr`: Pointer, uniffi_out_err: UniffiRustCallStatus, - ): Pointer - fun uniffi_xmtpv3_fn_free_ffipreferencecallback( - `ptr`: Pointer, uniffi_out_err: UniffiRustCallStatus, - ): Unit - fun uniffi_xmtpv3_fn_init_callback_vtable_ffipreferencecallback( - `vtable`: UniffiVTableCallbackInterfaceFfiPreferenceCallback, - ): Unit - fun uniffi_xmtpv3_fn_method_ffipreferencecallback_on_preference_update( - `ptr`: Pointer, `preference`: RustBuffer.ByValue, uniffi_out_err: UniffiRustCallStatus, - ): Unit - fun uniffi_xmtpv3_fn_method_ffipreferencecallback_on_error( - `ptr`: Pointer, `error`: RustBuffer.ByValue, uniffi_out_err: UniffiRustCallStatus, - ): Unit - fun uniffi_xmtpv3_fn_clone_ffisignaturerequest( - `ptr`: Pointer, uniffi_out_err: UniffiRustCallStatus, - ): Pointer - fun uniffi_xmtpv3_fn_free_ffisignaturerequest( - `ptr`: Pointer, uniffi_out_err: UniffiRustCallStatus, - ): Unit - fun uniffi_xmtpv3_fn_method_ffisignaturerequest_add_ecdsa_signature( - `ptr`: Pointer, `signatureBytes`: RustBuffer.ByValue, - ): Long - fun uniffi_xmtpv3_fn_method_ffisignaturerequest_add_scw_signature( - `ptr`: Pointer, - `signatureBytes`: RustBuffer.ByValue, - `address`: RustBuffer.ByValue, - `chainId`: Long, - `blockNumber`: RustBuffer.ByValue, - ): Long - fun uniffi_xmtpv3_fn_method_ffisignaturerequest_is_ready( - `ptr`: Pointer, - ): Long - fun uniffi_xmtpv3_fn_method_ffisignaturerequest_missing_address_signatures( - `ptr`: Pointer, - ): Long - fun uniffi_xmtpv3_fn_method_ffisignaturerequest_signature_text( - `ptr`: Pointer, - ): Long - fun uniffi_xmtpv3_fn_clone_ffistreamcloser( - `ptr`: Pointer, uniffi_out_err: UniffiRustCallStatus, - ): Pointer - fun uniffi_xmtpv3_fn_free_ffistreamcloser( - `ptr`: Pointer, uniffi_out_err: UniffiRustCallStatus, - ): Unit - fun uniffi_xmtpv3_fn_method_ffistreamcloser_end( - `ptr`: Pointer, uniffi_out_err: UniffiRustCallStatus, - ): Unit - fun uniffi_xmtpv3_fn_method_ffistreamcloser_end_and_wait( - `ptr`: Pointer, - ): Long - fun uniffi_xmtpv3_fn_method_ffistreamcloser_is_closed( - `ptr`: Pointer, uniffi_out_err: UniffiRustCallStatus, - ): Byte - fun uniffi_xmtpv3_fn_method_ffistreamcloser_wait_for_ready( - `ptr`: Pointer, - ): Long - fun uniffi_xmtpv3_fn_clone_ffiv2apiclient( - `ptr`: Pointer, uniffi_out_err: UniffiRustCallStatus, - ): Pointer - fun uniffi_xmtpv3_fn_free_ffiv2apiclient( - `ptr`: Pointer, uniffi_out_err: UniffiRustCallStatus, - ): Unit - fun uniffi_xmtpv3_fn_method_ffiv2apiclient_batch_query( - `ptr`: Pointer, `req`: RustBuffer.ByValue, - ): Long - fun uniffi_xmtpv3_fn_method_ffiv2apiclient_publish( - `ptr`: Pointer, `request`: RustBuffer.ByValue, `authToken`: RustBuffer.ByValue, - ): Long - fun uniffi_xmtpv3_fn_method_ffiv2apiclient_query( - `ptr`: Pointer, `request`: RustBuffer.ByValue, - ): Long - fun uniffi_xmtpv3_fn_method_ffiv2apiclient_set_app_version( - `ptr`: Pointer, `version`: RustBuffer.ByValue, uniffi_out_err: UniffiRustCallStatus, - ): Unit - fun uniffi_xmtpv3_fn_method_ffiv2apiclient_subscribe( - `ptr`: Pointer, `request`: RustBuffer.ByValue, `callback`: Pointer, - ): Long - fun uniffi_xmtpv3_fn_clone_ffiv2subscription( - `ptr`: Pointer, uniffi_out_err: UniffiRustCallStatus, - ): Pointer - fun uniffi_xmtpv3_fn_free_ffiv2subscription( - `ptr`: Pointer, uniffi_out_err: UniffiRustCallStatus, - ): Unit - fun uniffi_xmtpv3_fn_method_ffiv2subscription_end( - `ptr`: Pointer, - ): Long - fun uniffi_xmtpv3_fn_method_ffiv2subscription_is_closed( - `ptr`: Pointer, uniffi_out_err: UniffiRustCallStatus, - ): Byte - fun uniffi_xmtpv3_fn_method_ffiv2subscription_update( - `ptr`: Pointer, `req`: RustBuffer.ByValue, - ): Long - fun uniffi_xmtpv3_fn_clone_ffiv2subscriptioncallback( - `ptr`: Pointer, uniffi_out_err: UniffiRustCallStatus, - ): Pointer - fun uniffi_xmtpv3_fn_free_ffiv2subscriptioncallback( - `ptr`: Pointer, uniffi_out_err: UniffiRustCallStatus, - ): Unit - fun uniffi_xmtpv3_fn_init_callback_vtable_ffiv2subscriptioncallback( - `vtable`: UniffiVTableCallbackInterfaceFfiV2SubscriptionCallback, - ): Unit - fun uniffi_xmtpv3_fn_method_ffiv2subscriptioncallback_on_message( - `ptr`: Pointer, `message`: RustBuffer.ByValue, uniffi_out_err: UniffiRustCallStatus, - ): Unit - fun uniffi_xmtpv3_fn_method_ffiv2subscriptioncallback_on_error( - `ptr`: Pointer, `error`: RustBuffer.ByValue, uniffi_out_err: UniffiRustCallStatus, - ): Unit - fun uniffi_xmtpv3_fn_clone_ffixmtpclient( - `ptr`: Pointer, uniffi_out_err: UniffiRustCallStatus, - ): Pointer - fun uniffi_xmtpv3_fn_free_ffixmtpclient( - `ptr`: Pointer, uniffi_out_err: UniffiRustCallStatus, - ): Unit - fun uniffi_xmtpv3_fn_method_ffixmtpclient_add_wallet( - `ptr`: Pointer, `newWalletAddress`: RustBuffer.ByValue, - ): Long - fun uniffi_xmtpv3_fn_method_ffixmtpclient_addresses_from_inbox_id( - `ptr`: Pointer, `refreshFromNetwork`: Byte, `inboxIds`: RustBuffer.ByValue, - ): Long - fun uniffi_xmtpv3_fn_method_ffixmtpclient_apply_signature_request( - `ptr`: Pointer, `signatureRequest`: Pointer, - ): Long - fun uniffi_xmtpv3_fn_method_ffixmtpclient_can_message( - `ptr`: Pointer, `accountAddresses`: RustBuffer.ByValue, - ): Long - fun uniffi_xmtpv3_fn_method_ffixmtpclient_conversation( - `ptr`: Pointer, `conversationId`: RustBuffer.ByValue, uniffi_out_err: UniffiRustCallStatus, - ): Pointer - fun uniffi_xmtpv3_fn_method_ffixmtpclient_conversations( - `ptr`: Pointer, uniffi_out_err: UniffiRustCallStatus, - ): Pointer - fun uniffi_xmtpv3_fn_method_ffixmtpclient_db_reconnect( - `ptr`: Pointer, - ): Long - fun uniffi_xmtpv3_fn_method_ffixmtpclient_dm_conversation( - `ptr`: Pointer, `targetInboxId`: RustBuffer.ByValue, uniffi_out_err: UniffiRustCallStatus, - ): Pointer - fun uniffi_xmtpv3_fn_method_ffixmtpclient_find_inbox_id( - `ptr`: Pointer, `address`: RustBuffer.ByValue, - ): Long - fun uniffi_xmtpv3_fn_method_ffixmtpclient_get_consent_state( - `ptr`: Pointer, `entityType`: RustBuffer.ByValue, `entity`: RustBuffer.ByValue, - ): Long - fun uniffi_xmtpv3_fn_method_ffixmtpclient_get_latest_inbox_state( - `ptr`: Pointer, `inboxId`: RustBuffer.ByValue, - ): Long - fun uniffi_xmtpv3_fn_method_ffixmtpclient_inbox_id( - `ptr`: Pointer, uniffi_out_err: UniffiRustCallStatus, - ): RustBuffer.ByValue - fun uniffi_xmtpv3_fn_method_ffixmtpclient_inbox_state( - `ptr`: Pointer, `refreshFromNetwork`: Byte, - ): Long - fun uniffi_xmtpv3_fn_method_ffixmtpclient_installation_id( - `ptr`: Pointer, uniffi_out_err: UniffiRustCallStatus, - ): RustBuffer.ByValue - fun uniffi_xmtpv3_fn_method_ffixmtpclient_message( - `ptr`: Pointer, `messageId`: RustBuffer.ByValue, uniffi_out_err: UniffiRustCallStatus, - ): RustBuffer.ByValue - fun uniffi_xmtpv3_fn_method_ffixmtpclient_register_identity( - `ptr`: Pointer, `signatureRequest`: Pointer, - ): Long - fun uniffi_xmtpv3_fn_method_ffixmtpclient_release_db_connection( - `ptr`: Pointer, uniffi_out_err: UniffiRustCallStatus, - ): Unit - fun uniffi_xmtpv3_fn_method_ffixmtpclient_revoke_all_other_installations( - `ptr`: Pointer, - ): Long - fun uniffi_xmtpv3_fn_method_ffixmtpclient_revoke_installations( - `ptr`: Pointer, `installationIds`: RustBuffer.ByValue, - ): Long - fun uniffi_xmtpv3_fn_method_ffixmtpclient_revoke_wallet( - `ptr`: Pointer, `walletAddress`: RustBuffer.ByValue, - ): Long - fun uniffi_xmtpv3_fn_method_ffixmtpclient_send_sync_request( - `ptr`: Pointer, `kind`: RustBuffer.ByValue, - ): Long - fun uniffi_xmtpv3_fn_method_ffixmtpclient_set_consent_states( - `ptr`: Pointer, `records`: RustBuffer.ByValue, - ): Long - fun uniffi_xmtpv3_fn_method_ffixmtpclient_sign_with_installation_key( - `ptr`: Pointer, `text`: RustBuffer.ByValue, uniffi_out_err: UniffiRustCallStatus, - ): RustBuffer.ByValue - fun uniffi_xmtpv3_fn_method_ffixmtpclient_signature_request( - `ptr`: Pointer, uniffi_out_err: UniffiRustCallStatus, - ): RustBuffer.ByValue - fun uniffi_xmtpv3_fn_method_ffixmtpclient_verify_signed_with_installation_key( - `ptr`: Pointer, - `signatureText`: RustBuffer.ByValue, - `signatureBytes`: RustBuffer.ByValue, - uniffi_out_err: UniffiRustCallStatus, - ): Unit - fun uniffi_xmtpv3_fn_method_ffixmtpclient_verify_signed_with_public_key( - `ptr`: Pointer, - `signatureText`: RustBuffer.ByValue, - `signatureBytes`: RustBuffer.ByValue, - `publicKey`: RustBuffer.ByValue, - uniffi_out_err: UniffiRustCallStatus, - ): Unit - fun uniffi_xmtpv3_fn_clone_xmtpapiclient( - `ptr`: Pointer, uniffi_out_err: UniffiRustCallStatus, - ): Pointer - fun uniffi_xmtpv3_fn_free_xmtpapiclient( - `ptr`: Pointer, uniffi_out_err: UniffiRustCallStatus, - ): Unit - fun uniffi_xmtpv3_fn_init_callback_vtable_ffiinboxowner( - `vtable`: UniffiVTableCallbackInterfaceFfiInboxOwner, - ): Unit - fun uniffi_xmtpv3_fn_func_connect_to_backend( - `host`: RustBuffer.ByValue, `isSecure`: Byte, - ): Long - fun uniffi_xmtpv3_fn_func_create_client( - `api`: Pointer, - `db`: RustBuffer.ByValue, - `encryptionKey`: RustBuffer.ByValue, - `inboxId`: RustBuffer.ByValue, - `accountAddress`: RustBuffer.ByValue, - `nonce`: Long, - `legacySignedPrivateKeyProto`: RustBuffer.ByValue, - `historySyncUrl`: RustBuffer.ByValue, - ): Long - fun uniffi_xmtpv3_fn_func_create_v2_client( - `host`: RustBuffer.ByValue, `isSecure`: Byte, - ): Long - fun uniffi_xmtpv3_fn_func_diffie_hellman_k256( - `privateKeyBytes`: RustBuffer.ByValue, - `publicKeyBytes`: RustBuffer.ByValue, - uniffi_out_err: UniffiRustCallStatus, - ): RustBuffer.ByValue - fun uniffi_xmtpv3_fn_func_generate_inbox_id( - `accountAddress`: RustBuffer.ByValue, `nonce`: Long, uniffi_out_err: UniffiRustCallStatus, - ): RustBuffer.ByValue - fun uniffi_xmtpv3_fn_func_generate_private_preferences_topic_identifier( - `privateKey`: RustBuffer.ByValue, uniffi_out_err: UniffiRustCallStatus, - ): RustBuffer.ByValue - fun uniffi_xmtpv3_fn_func_get_inbox_id_for_address( - `api`: Pointer, `accountAddress`: RustBuffer.ByValue, - ): Long - fun uniffi_xmtpv3_fn_func_get_version_info( - uniffi_out_err: UniffiRustCallStatus, - ): RustBuffer.ByValue - fun uniffi_xmtpv3_fn_func_keccak256( - `input`: RustBuffer.ByValue, uniffi_out_err: UniffiRustCallStatus, - ): RustBuffer.ByValue - fun uniffi_xmtpv3_fn_func_public_key_from_private_key_k256( - `privateKeyBytes`: RustBuffer.ByValue, uniffi_out_err: UniffiRustCallStatus, - ): RustBuffer.ByValue - fun uniffi_xmtpv3_fn_func_recover_address( - `signatureBytes`: RustBuffer.ByValue, - `predigestMessage`: RustBuffer.ByValue, - uniffi_out_err: UniffiRustCallStatus, - ): RustBuffer.ByValue - fun uniffi_xmtpv3_fn_func_recover_public_key_k256_keccak256( - `message`: RustBuffer.ByValue, - `signature`: RustBuffer.ByValue, - uniffi_out_err: UniffiRustCallStatus, - ): RustBuffer.ByValue - fun uniffi_xmtpv3_fn_func_recover_public_key_k256_sha256( - `message`: RustBuffer.ByValue, - `signature`: RustBuffer.ByValue, - uniffi_out_err: UniffiRustCallStatus, - ): RustBuffer.ByValue - fun uniffi_xmtpv3_fn_func_sha256( - `input`: RustBuffer.ByValue, uniffi_out_err: UniffiRustCallStatus, - ): RustBuffer.ByValue - fun uniffi_xmtpv3_fn_func_user_preferences_decrypt( - `publicKey`: RustBuffer.ByValue, - `privateKey`: RustBuffer.ByValue, - `message`: RustBuffer.ByValue, - uniffi_out_err: UniffiRustCallStatus, - ): RustBuffer.ByValue - fun uniffi_xmtpv3_fn_func_user_preferences_encrypt( - `publicKey`: RustBuffer.ByValue, - `privateKey`: RustBuffer.ByValue, - `message`: RustBuffer.ByValue, - uniffi_out_err: UniffiRustCallStatus, - ): RustBuffer.ByValue - fun uniffi_xmtpv3_fn_func_verify_k256_sha256( - `signedBy`: RustBuffer.ByValue, - `message`: RustBuffer.ByValue, - `signature`: RustBuffer.ByValue, - `recoveryId`: Byte, - uniffi_out_err: UniffiRustCallStatus, - ): Byte - fun ffi_xmtpv3_rustbuffer_alloc( - `size`: Long, uniffi_out_err: UniffiRustCallStatus, - ): RustBuffer.ByValue - fun ffi_xmtpv3_rustbuffer_from_bytes( - `bytes`: ForeignBytes.ByValue, uniffi_out_err: UniffiRustCallStatus, - ): RustBuffer.ByValue - fun ffi_xmtpv3_rustbuffer_free( - `buf`: RustBuffer.ByValue, uniffi_out_err: UniffiRustCallStatus, - ): Unit - fun ffi_xmtpv3_rustbuffer_reserve( - `buf`: RustBuffer.ByValue, `additional`: Long, uniffi_out_err: UniffiRustCallStatus, - ): RustBuffer.ByValue - fun ffi_xmtpv3_rust_future_poll_u8( - `handle`: Long, `callback`: UniffiRustFutureContinuationCallback, `callbackData`: Long, - ): Unit - fun ffi_xmtpv3_rust_future_cancel_u8( - `handle`: Long, - ): Unit - fun ffi_xmtpv3_rust_future_free_u8( - `handle`: Long, - ): Unit - fun ffi_xmtpv3_rust_future_complete_u8( - `handle`: Long, uniffi_out_err: UniffiRustCallStatus, - ): Byte - fun ffi_xmtpv3_rust_future_poll_i8( - `handle`: Long, `callback`: UniffiRustFutureContinuationCallback, `callbackData`: Long, - ): Unit - fun ffi_xmtpv3_rust_future_cancel_i8( - `handle`: Long, - ): Unit - fun ffi_xmtpv3_rust_future_free_i8( - `handle`: Long, - ): Unit - fun ffi_xmtpv3_rust_future_complete_i8( - `handle`: Long, uniffi_out_err: UniffiRustCallStatus, - ): Byte - fun ffi_xmtpv3_rust_future_poll_u16( - `handle`: Long, `callback`: UniffiRustFutureContinuationCallback, `callbackData`: Long, - ): Unit - fun ffi_xmtpv3_rust_future_cancel_u16( - `handle`: Long, - ): Unit - fun ffi_xmtpv3_rust_future_free_u16( - `handle`: Long, - ): Unit - fun ffi_xmtpv3_rust_future_complete_u16( - `handle`: Long, uniffi_out_err: UniffiRustCallStatus, - ): Short - fun ffi_xmtpv3_rust_future_poll_i16( - `handle`: Long, `callback`: UniffiRustFutureContinuationCallback, `callbackData`: Long, - ): Unit - fun ffi_xmtpv3_rust_future_cancel_i16( - `handle`: Long, - ): Unit - fun ffi_xmtpv3_rust_future_free_i16( - `handle`: Long, - ): Unit - fun ffi_xmtpv3_rust_future_complete_i16( - `handle`: Long, uniffi_out_err: UniffiRustCallStatus, - ): Short - fun ffi_xmtpv3_rust_future_poll_u32( - `handle`: Long, `callback`: UniffiRustFutureContinuationCallback, `callbackData`: Long, - ): Unit - fun ffi_xmtpv3_rust_future_cancel_u32( - `handle`: Long, - ): Unit - fun ffi_xmtpv3_rust_future_free_u32( - `handle`: Long, - ): Unit - fun ffi_xmtpv3_rust_future_complete_u32( - `handle`: Long, uniffi_out_err: UniffiRustCallStatus, - ): Int - fun ffi_xmtpv3_rust_future_poll_i32( - `handle`: Long, `callback`: UniffiRustFutureContinuationCallback, `callbackData`: Long, - ): Unit - fun ffi_xmtpv3_rust_future_cancel_i32( - `handle`: Long, - ): Unit - fun ffi_xmtpv3_rust_future_free_i32( - `handle`: Long, - ): Unit - fun ffi_xmtpv3_rust_future_complete_i32( - `handle`: Long, uniffi_out_err: UniffiRustCallStatus, - ): Int - fun ffi_xmtpv3_rust_future_poll_u64( - `handle`: Long, `callback`: UniffiRustFutureContinuationCallback, `callbackData`: Long, - ): Unit - fun ffi_xmtpv3_rust_future_cancel_u64( - `handle`: Long, - ): Unit - fun ffi_xmtpv3_rust_future_free_u64( - `handle`: Long, - ): Unit - fun ffi_xmtpv3_rust_future_complete_u64( - `handle`: Long, uniffi_out_err: UniffiRustCallStatus, - ): Long - fun ffi_xmtpv3_rust_future_poll_i64( - `handle`: Long, `callback`: UniffiRustFutureContinuationCallback, `callbackData`: Long, - ): Unit - fun ffi_xmtpv3_rust_future_cancel_i64( - `handle`: Long, - ): Unit - fun ffi_xmtpv3_rust_future_free_i64( - `handle`: Long, - ): Unit - fun ffi_xmtpv3_rust_future_complete_i64( - `handle`: Long, uniffi_out_err: UniffiRustCallStatus, - ): Long - fun ffi_xmtpv3_rust_future_poll_f32( - `handle`: Long, `callback`: UniffiRustFutureContinuationCallback, `callbackData`: Long, - ): Unit - fun ffi_xmtpv3_rust_future_cancel_f32( - `handle`: Long, - ): Unit - fun ffi_xmtpv3_rust_future_free_f32( - `handle`: Long, - ): Unit - fun ffi_xmtpv3_rust_future_complete_f32( - `handle`: Long, uniffi_out_err: UniffiRustCallStatus, - ): Float - fun ffi_xmtpv3_rust_future_poll_f64( - `handle`: Long, `callback`: UniffiRustFutureContinuationCallback, `callbackData`: Long, - ): Unit - fun ffi_xmtpv3_rust_future_cancel_f64( - `handle`: Long, - ): Unit - fun ffi_xmtpv3_rust_future_free_f64( - `handle`: Long, - ): Unit - fun ffi_xmtpv3_rust_future_complete_f64( - `handle`: Long, uniffi_out_err: UniffiRustCallStatus, - ): Double - fun ffi_xmtpv3_rust_future_poll_pointer( - `handle`: Long, `callback`: UniffiRustFutureContinuationCallback, `callbackData`: Long, - ): Unit - fun ffi_xmtpv3_rust_future_cancel_pointer( - `handle`: Long, - ): Unit - fun ffi_xmtpv3_rust_future_free_pointer( - `handle`: Long, - ): Unit - fun ffi_xmtpv3_rust_future_complete_pointer( - `handle`: Long, uniffi_out_err: UniffiRustCallStatus, - ): Pointer - fun ffi_xmtpv3_rust_future_poll_rust_buffer( - `handle`: Long, `callback`: UniffiRustFutureContinuationCallback, `callbackData`: Long, - ): Unit - fun ffi_xmtpv3_rust_future_cancel_rust_buffer( - `handle`: Long, - ): Unit - fun ffi_xmtpv3_rust_future_free_rust_buffer( - `handle`: Long, - ): Unit - fun ffi_xmtpv3_rust_future_complete_rust_buffer( - `handle`: Long, uniffi_out_err: UniffiRustCallStatus, - ): RustBuffer.ByValue - fun ffi_xmtpv3_rust_future_poll_void( - `handle`: Long, `callback`: UniffiRustFutureContinuationCallback, `callbackData`: Long, - ): Unit - fun ffi_xmtpv3_rust_future_cancel_void( - `handle`: Long, - ): Unit - fun ffi_xmtpv3_rust_future_free_void( - `handle`: Long, - ): Unit - fun ffi_xmtpv3_rust_future_complete_void( - `handle`: Long, uniffi_out_err: UniffiRustCallStatus, - ): Unit - fun uniffi_xmtpv3_checksum_func_connect_to_backend( - ): Short - fun uniffi_xmtpv3_checksum_func_create_client( - ): Short - fun uniffi_xmtpv3_checksum_func_create_v2_client( - ): Short - fun uniffi_xmtpv3_checksum_func_diffie_hellman_k256( - ): Short - fun uniffi_xmtpv3_checksum_func_generate_inbox_id( - ): Short - fun uniffi_xmtpv3_checksum_func_generate_private_preferences_topic_identifier( - ): Short - fun uniffi_xmtpv3_checksum_func_get_inbox_id_for_address( - ): Short - fun uniffi_xmtpv3_checksum_func_get_version_info( - ): Short - fun uniffi_xmtpv3_checksum_func_keccak256( - ): Short - fun uniffi_xmtpv3_checksum_func_public_key_from_private_key_k256( - ): Short - fun uniffi_xmtpv3_checksum_func_recover_address( - ): Short - fun uniffi_xmtpv3_checksum_func_recover_public_key_k256_keccak256( - ): Short - fun uniffi_xmtpv3_checksum_func_recover_public_key_k256_sha256( - ): Short - fun uniffi_xmtpv3_checksum_func_sha256( - ): Short - fun uniffi_xmtpv3_checksum_func_user_preferences_decrypt( - ): Short - fun uniffi_xmtpv3_checksum_func_user_preferences_encrypt( - ): Short - fun uniffi_xmtpv3_checksum_func_verify_k256_sha256( - ): Short - fun uniffi_xmtpv3_checksum_method_fficonsentcallback_on_consent_update( - ): Short - fun uniffi_xmtpv3_checksum_method_fficonsentcallback_on_error( - ): Short - fun uniffi_xmtpv3_checksum_method_fficonversation_add_admin( - ): Short - fun uniffi_xmtpv3_checksum_method_fficonversation_add_members( - ): Short - fun uniffi_xmtpv3_checksum_method_fficonversation_add_members_by_inbox_id( - ): Short - fun uniffi_xmtpv3_checksum_method_fficonversation_add_super_admin( - ): Short - fun uniffi_xmtpv3_checksum_method_fficonversation_added_by_inbox_id( - ): Short - fun uniffi_xmtpv3_checksum_method_fficonversation_admin_list( - ): Short - fun uniffi_xmtpv3_checksum_method_fficonversation_consent_state( - ): Short - fun uniffi_xmtpv3_checksum_method_fficonversation_conversation_type( - ): Short - fun uniffi_xmtpv3_checksum_method_fficonversation_created_at_ns( - ): Short - fun uniffi_xmtpv3_checksum_method_fficonversation_dm_peer_inbox_id( - ): Short - fun uniffi_xmtpv3_checksum_method_fficonversation_find_messages( - ): Short - fun uniffi_xmtpv3_checksum_method_fficonversation_group_description( - ): Short - fun uniffi_xmtpv3_checksum_method_fficonversation_group_image_url_square( - ): Short - fun uniffi_xmtpv3_checksum_method_fficonversation_group_metadata( - ): Short - fun uniffi_xmtpv3_checksum_method_fficonversation_group_name( - ): Short - fun uniffi_xmtpv3_checksum_method_fficonversation_group_permissions( - ): Short - fun uniffi_xmtpv3_checksum_method_fficonversation_group_pinned_frame_url( - ): Short - fun uniffi_xmtpv3_checksum_method_fficonversation_id( - ): Short - fun uniffi_xmtpv3_checksum_method_fficonversation_is_active( - ): Short - fun uniffi_xmtpv3_checksum_method_fficonversation_is_admin( - ): Short - fun uniffi_xmtpv3_checksum_method_fficonversation_is_super_admin( - ): Short - fun uniffi_xmtpv3_checksum_method_fficonversation_list_members( - ): Short - fun uniffi_xmtpv3_checksum_method_fficonversation_process_streamed_conversation_message( - ): Short - fun uniffi_xmtpv3_checksum_method_fficonversation_publish_messages( - ): Short - fun uniffi_xmtpv3_checksum_method_fficonversation_remove_admin( - ): Short - fun uniffi_xmtpv3_checksum_method_fficonversation_remove_members( - ): Short - fun uniffi_xmtpv3_checksum_method_fficonversation_remove_members_by_inbox_id( - ): Short - fun uniffi_xmtpv3_checksum_method_fficonversation_remove_super_admin( - ): Short - fun uniffi_xmtpv3_checksum_method_fficonversation_send( - ): Short - fun uniffi_xmtpv3_checksum_method_fficonversation_send_optimistic( - ): Short - fun uniffi_xmtpv3_checksum_method_fficonversation_stream( - ): Short - fun uniffi_xmtpv3_checksum_method_fficonversation_super_admin_list( - ): Short - fun uniffi_xmtpv3_checksum_method_fficonversation_sync( - ): Short - fun uniffi_xmtpv3_checksum_method_fficonversation_update_consent_state( - ): Short - fun uniffi_xmtpv3_checksum_method_fficonversation_update_group_description( - ): Short - fun uniffi_xmtpv3_checksum_method_fficonversation_update_group_image_url_square( - ): Short - fun uniffi_xmtpv3_checksum_method_fficonversation_update_group_name( - ): Short - fun uniffi_xmtpv3_checksum_method_fficonversation_update_group_pinned_frame_url( - ): Short - fun uniffi_xmtpv3_checksum_method_fficonversation_update_permission_policy( - ): Short - fun uniffi_xmtpv3_checksum_method_fficonversationcallback_on_conversation( - ): Short - fun uniffi_xmtpv3_checksum_method_fficonversationcallback_on_error( - ): Short - fun uniffi_xmtpv3_checksum_method_fficonversationlistitem_conversation( - ): Short - fun uniffi_xmtpv3_checksum_method_fficonversationlistitem_last_message( - ): Short - fun uniffi_xmtpv3_checksum_method_fficonversationmetadata_conversation_type( - ): Short - fun uniffi_xmtpv3_checksum_method_fficonversationmetadata_creator_inbox_id( - ): Short - fun uniffi_xmtpv3_checksum_method_fficonversations_create_dm( - ): Short - fun uniffi_xmtpv3_checksum_method_fficonversations_create_group( - ): Short - fun uniffi_xmtpv3_checksum_method_fficonversations_get_hmac_keys( - ): Short - fun uniffi_xmtpv3_checksum_method_fficonversations_get_sync_group( - ): Short - fun uniffi_xmtpv3_checksum_method_fficonversations_list( - ): Short - fun uniffi_xmtpv3_checksum_method_fficonversations_list_dms( - ): Short - fun uniffi_xmtpv3_checksum_method_fficonversations_list_groups( - ): Short - fun uniffi_xmtpv3_checksum_method_fficonversations_process_streamed_welcome_message( - ): Short - fun uniffi_xmtpv3_checksum_method_fficonversations_stream( - ): Short - fun uniffi_xmtpv3_checksum_method_fficonversations_stream_all_dm_messages( - ): Short - fun uniffi_xmtpv3_checksum_method_fficonversations_stream_all_group_messages( - ): Short - fun uniffi_xmtpv3_checksum_method_fficonversations_stream_all_messages( - ): Short - fun uniffi_xmtpv3_checksum_method_fficonversations_stream_consent( - ): Short - fun uniffi_xmtpv3_checksum_method_fficonversations_stream_dms( - ): Short - fun uniffi_xmtpv3_checksum_method_fficonversations_stream_groups( - ): Short - fun uniffi_xmtpv3_checksum_method_fficonversations_stream_messages( - ): Short - fun uniffi_xmtpv3_checksum_method_fficonversations_stream_preferences( - ): Short - fun uniffi_xmtpv3_checksum_method_fficonversations_sync( - ): Short - fun uniffi_xmtpv3_checksum_method_fficonversations_sync_all_conversations( - ): Short - fun uniffi_xmtpv3_checksum_method_ffigrouppermissions_policy_set( - ): Short - fun uniffi_xmtpv3_checksum_method_ffigrouppermissions_policy_type( - ): Short - fun uniffi_xmtpv3_checksum_method_ffimessagecallback_on_message( - ): Short - fun uniffi_xmtpv3_checksum_method_ffimessagecallback_on_error( - ): Short - fun uniffi_xmtpv3_checksum_method_ffipreferencecallback_on_preference_update( - ): Short - fun uniffi_xmtpv3_checksum_method_ffipreferencecallback_on_error( - ): Short - fun uniffi_xmtpv3_checksum_method_ffisignaturerequest_add_ecdsa_signature( - ): Short - fun uniffi_xmtpv3_checksum_method_ffisignaturerequest_add_scw_signature( - ): Short - fun uniffi_xmtpv3_checksum_method_ffisignaturerequest_is_ready( - ): Short - fun uniffi_xmtpv3_checksum_method_ffisignaturerequest_missing_address_signatures( - ): Short - fun uniffi_xmtpv3_checksum_method_ffisignaturerequest_signature_text( - ): Short - fun uniffi_xmtpv3_checksum_method_ffistreamcloser_end( - ): Short - fun uniffi_xmtpv3_checksum_method_ffistreamcloser_end_and_wait( - ): Short - fun uniffi_xmtpv3_checksum_method_ffistreamcloser_is_closed( - ): Short - fun uniffi_xmtpv3_checksum_method_ffistreamcloser_wait_for_ready( - ): Short - fun uniffi_xmtpv3_checksum_method_ffiv2apiclient_batch_query( - ): Short + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +// A JNA Library to expose the extern-C FFI definitions. +// This is an implementation detail which will be called internally by the public API. + +internal interface UniffiLib : Library { + companion object { + internal val INSTANCE: UniffiLib by lazy { + loadIndirect(componentName = "xmtpv3") + .also { lib: UniffiLib -> + uniffiCheckContractApiVersion(lib) + uniffiCheckApiChecksums(lib) + uniffiCallbackInterfaceFfiConsentCallback.register(lib) + uniffiCallbackInterfaceFfiConversationCallback.register(lib) + uniffiCallbackInterfaceFfiMessageCallback.register(lib) + uniffiCallbackInterfaceFfiPreferenceCallback.register(lib) + uniffiCallbackInterfaceFfiV2SubscriptionCallback.register(lib) + uniffiCallbackInterfaceFfiInboxOwner.register(lib) + } + } + + // The Cleaner for the whole library + internal val CLEANER: UniffiCleaner by lazy { + UniffiCleaner.create() + } + } + + fun uniffi_xmtpv3_fn_clone_fficonsentcallback(`ptr`: Pointer,uniffi_out_err: UniffiRustCallStatus, + ): Pointer + fun uniffi_xmtpv3_fn_free_fficonsentcallback(`ptr`: Pointer,uniffi_out_err: UniffiRustCallStatus, + ): Unit + fun uniffi_xmtpv3_fn_init_callback_vtable_fficonsentcallback(`vtable`: UniffiVTableCallbackInterfaceFfiConsentCallback, + ): Unit + fun uniffi_xmtpv3_fn_method_fficonsentcallback_on_consent_update(`ptr`: Pointer,`consent`: RustBuffer.ByValue,uniffi_out_err: UniffiRustCallStatus, + ): Unit + fun uniffi_xmtpv3_fn_method_fficonsentcallback_on_error(`ptr`: Pointer,`error`: RustBuffer.ByValue,uniffi_out_err: UniffiRustCallStatus, + ): Unit + fun uniffi_xmtpv3_fn_clone_fficonversation(`ptr`: Pointer,uniffi_out_err: UniffiRustCallStatus, + ): Pointer + fun uniffi_xmtpv3_fn_free_fficonversation(`ptr`: Pointer,uniffi_out_err: UniffiRustCallStatus, + ): Unit + fun uniffi_xmtpv3_fn_method_fficonversation_add_admin(`ptr`: Pointer,`inboxId`: RustBuffer.ByValue, + ): Long + fun uniffi_xmtpv3_fn_method_fficonversation_add_members(`ptr`: Pointer,`accountAddresses`: RustBuffer.ByValue, + ): Long + fun uniffi_xmtpv3_fn_method_fficonversation_add_members_by_inbox_id(`ptr`: Pointer,`inboxIds`: RustBuffer.ByValue, + ): Long + fun uniffi_xmtpv3_fn_method_fficonversation_add_super_admin(`ptr`: Pointer,`inboxId`: RustBuffer.ByValue, + ): Long + fun uniffi_xmtpv3_fn_method_fficonversation_added_by_inbox_id(`ptr`: Pointer,uniffi_out_err: UniffiRustCallStatus, + ): RustBuffer.ByValue + fun uniffi_xmtpv3_fn_method_fficonversation_admin_list(`ptr`: Pointer,uniffi_out_err: UniffiRustCallStatus, + ): RustBuffer.ByValue + fun uniffi_xmtpv3_fn_method_fficonversation_consent_state(`ptr`: Pointer,uniffi_out_err: UniffiRustCallStatus, + ): RustBuffer.ByValue + fun uniffi_xmtpv3_fn_method_fficonversation_conversation_type(`ptr`: Pointer, + ): Long + fun uniffi_xmtpv3_fn_method_fficonversation_created_at_ns(`ptr`: Pointer,uniffi_out_err: UniffiRustCallStatus, + ): Long + fun uniffi_xmtpv3_fn_method_fficonversation_dm_peer_inbox_id(`ptr`: Pointer,uniffi_out_err: UniffiRustCallStatus, + ): RustBuffer.ByValue + fun uniffi_xmtpv3_fn_method_fficonversation_find_messages(`ptr`: Pointer,`opts`: RustBuffer.ByValue, + ): Long + fun uniffi_xmtpv3_fn_method_fficonversation_find_messages_with_reactions(`ptr`: Pointer,`opts`: RustBuffer.ByValue, + ): Long + fun uniffi_xmtpv3_fn_method_fficonversation_group_description(`ptr`: Pointer,uniffi_out_err: UniffiRustCallStatus, + ): RustBuffer.ByValue + fun uniffi_xmtpv3_fn_method_fficonversation_group_image_url_square(`ptr`: Pointer,uniffi_out_err: UniffiRustCallStatus, + ): RustBuffer.ByValue + fun uniffi_xmtpv3_fn_method_fficonversation_group_metadata(`ptr`: Pointer, + ): Long + fun uniffi_xmtpv3_fn_method_fficonversation_group_name(`ptr`: Pointer,uniffi_out_err: UniffiRustCallStatus, + ): RustBuffer.ByValue + fun uniffi_xmtpv3_fn_method_fficonversation_group_permissions(`ptr`: Pointer,uniffi_out_err: UniffiRustCallStatus, + ): Pointer + fun uniffi_xmtpv3_fn_method_fficonversation_group_pinned_frame_url(`ptr`: Pointer,uniffi_out_err: UniffiRustCallStatus, + ): RustBuffer.ByValue + fun uniffi_xmtpv3_fn_method_fficonversation_id(`ptr`: Pointer,uniffi_out_err: UniffiRustCallStatus, + ): RustBuffer.ByValue + fun uniffi_xmtpv3_fn_method_fficonversation_is_active(`ptr`: Pointer,uniffi_out_err: UniffiRustCallStatus, + ): Byte + fun uniffi_xmtpv3_fn_method_fficonversation_is_admin(`ptr`: Pointer,`inboxId`: RustBuffer.ByValue,uniffi_out_err: UniffiRustCallStatus, + ): Byte + fun uniffi_xmtpv3_fn_method_fficonversation_is_super_admin(`ptr`: Pointer,`inboxId`: RustBuffer.ByValue,uniffi_out_err: UniffiRustCallStatus, + ): Byte + fun uniffi_xmtpv3_fn_method_fficonversation_list_members(`ptr`: Pointer, + ): Long + fun uniffi_xmtpv3_fn_method_fficonversation_process_streamed_conversation_message(`ptr`: Pointer,`envelopeBytes`: RustBuffer.ByValue, + ): Long + fun uniffi_xmtpv3_fn_method_fficonversation_publish_messages(`ptr`: Pointer, + ): Long + fun uniffi_xmtpv3_fn_method_fficonversation_remove_admin(`ptr`: Pointer,`inboxId`: RustBuffer.ByValue, + ): Long + fun uniffi_xmtpv3_fn_method_fficonversation_remove_members(`ptr`: Pointer,`accountAddresses`: RustBuffer.ByValue, + ): Long + fun uniffi_xmtpv3_fn_method_fficonversation_remove_members_by_inbox_id(`ptr`: Pointer,`inboxIds`: RustBuffer.ByValue, + ): Long + fun uniffi_xmtpv3_fn_method_fficonversation_remove_super_admin(`ptr`: Pointer,`inboxId`: RustBuffer.ByValue, + ): Long + fun uniffi_xmtpv3_fn_method_fficonversation_send(`ptr`: Pointer,`contentBytes`: RustBuffer.ByValue, + ): Long + fun uniffi_xmtpv3_fn_method_fficonversation_send_optimistic(`ptr`: Pointer,`contentBytes`: RustBuffer.ByValue,uniffi_out_err: UniffiRustCallStatus, + ): RustBuffer.ByValue + fun uniffi_xmtpv3_fn_method_fficonversation_stream(`ptr`: Pointer,`messageCallback`: Pointer, + ): Long + fun uniffi_xmtpv3_fn_method_fficonversation_super_admin_list(`ptr`: Pointer,uniffi_out_err: UniffiRustCallStatus, + ): RustBuffer.ByValue + fun uniffi_xmtpv3_fn_method_fficonversation_sync(`ptr`: Pointer, + ): Long + fun uniffi_xmtpv3_fn_method_fficonversation_update_consent_state(`ptr`: Pointer,`state`: RustBuffer.ByValue,uniffi_out_err: UniffiRustCallStatus, + ): Unit + fun uniffi_xmtpv3_fn_method_fficonversation_update_group_description(`ptr`: Pointer,`groupDescription`: RustBuffer.ByValue, + ): Long + fun uniffi_xmtpv3_fn_method_fficonversation_update_group_image_url_square(`ptr`: Pointer,`groupImageUrlSquare`: RustBuffer.ByValue, + ): Long + fun uniffi_xmtpv3_fn_method_fficonversation_update_group_name(`ptr`: Pointer,`groupName`: RustBuffer.ByValue, + ): Long + fun uniffi_xmtpv3_fn_method_fficonversation_update_group_pinned_frame_url(`ptr`: Pointer,`pinnedFrameUrl`: RustBuffer.ByValue, + ): Long + fun uniffi_xmtpv3_fn_method_fficonversation_update_permission_policy(`ptr`: Pointer,`permissionUpdateType`: RustBuffer.ByValue,`permissionPolicyOption`: RustBuffer.ByValue,`metadataField`: RustBuffer.ByValue, + ): Long + fun uniffi_xmtpv3_fn_clone_fficonversationcallback(`ptr`: Pointer,uniffi_out_err: UniffiRustCallStatus, + ): Pointer + fun uniffi_xmtpv3_fn_free_fficonversationcallback(`ptr`: Pointer,uniffi_out_err: UniffiRustCallStatus, + ): Unit + fun uniffi_xmtpv3_fn_init_callback_vtable_fficonversationcallback(`vtable`: UniffiVTableCallbackInterfaceFfiConversationCallback, + ): Unit + fun uniffi_xmtpv3_fn_method_fficonversationcallback_on_conversation(`ptr`: Pointer,`conversation`: Pointer,uniffi_out_err: UniffiRustCallStatus, + ): Unit + fun uniffi_xmtpv3_fn_method_fficonversationcallback_on_error(`ptr`: Pointer,`error`: RustBuffer.ByValue,uniffi_out_err: UniffiRustCallStatus, + ): Unit + fun uniffi_xmtpv3_fn_clone_fficonversationlistitem(`ptr`: Pointer,uniffi_out_err: UniffiRustCallStatus, + ): Pointer + fun uniffi_xmtpv3_fn_free_fficonversationlistitem(`ptr`: Pointer,uniffi_out_err: UniffiRustCallStatus, + ): Unit + fun uniffi_xmtpv3_fn_method_fficonversationlistitem_conversation(`ptr`: Pointer,uniffi_out_err: UniffiRustCallStatus, + ): Pointer + fun uniffi_xmtpv3_fn_method_fficonversationlistitem_last_message(`ptr`: Pointer,uniffi_out_err: UniffiRustCallStatus, + ): RustBuffer.ByValue + fun uniffi_xmtpv3_fn_clone_fficonversationmetadata(`ptr`: Pointer,uniffi_out_err: UniffiRustCallStatus, + ): Pointer + fun uniffi_xmtpv3_fn_free_fficonversationmetadata(`ptr`: Pointer,uniffi_out_err: UniffiRustCallStatus, + ): Unit + fun uniffi_xmtpv3_fn_method_fficonversationmetadata_conversation_type(`ptr`: Pointer,uniffi_out_err: UniffiRustCallStatus, + ): RustBuffer.ByValue + fun uniffi_xmtpv3_fn_method_fficonversationmetadata_creator_inbox_id(`ptr`: Pointer,uniffi_out_err: UniffiRustCallStatus, + ): RustBuffer.ByValue + fun uniffi_xmtpv3_fn_clone_fficonversations(`ptr`: Pointer,uniffi_out_err: UniffiRustCallStatus, + ): Pointer + fun uniffi_xmtpv3_fn_free_fficonversations(`ptr`: Pointer,uniffi_out_err: UniffiRustCallStatus, + ): Unit + fun uniffi_xmtpv3_fn_method_fficonversations_create_dm(`ptr`: Pointer,`accountAddress`: RustBuffer.ByValue, + ): Long + fun uniffi_xmtpv3_fn_method_fficonversations_create_group(`ptr`: Pointer,`accountAddresses`: RustBuffer.ByValue,`opts`: RustBuffer.ByValue, + ): Long + fun uniffi_xmtpv3_fn_method_fficonversations_get_hmac_keys(`ptr`: Pointer,uniffi_out_err: UniffiRustCallStatus, + ): RustBuffer.ByValue + fun uniffi_xmtpv3_fn_method_fficonversations_get_sync_group(`ptr`: Pointer,uniffi_out_err: UniffiRustCallStatus, + ): Pointer + fun uniffi_xmtpv3_fn_method_fficonversations_list(`ptr`: Pointer,`opts`: RustBuffer.ByValue,uniffi_out_err: UniffiRustCallStatus, + ): RustBuffer.ByValue + fun uniffi_xmtpv3_fn_method_fficonversations_list_dms(`ptr`: Pointer,`opts`: RustBuffer.ByValue,uniffi_out_err: UniffiRustCallStatus, + ): RustBuffer.ByValue + fun uniffi_xmtpv3_fn_method_fficonversations_list_groups(`ptr`: Pointer,`opts`: RustBuffer.ByValue,uniffi_out_err: UniffiRustCallStatus, + ): RustBuffer.ByValue + fun uniffi_xmtpv3_fn_method_fficonversations_process_streamed_welcome_message(`ptr`: Pointer,`envelopeBytes`: RustBuffer.ByValue, + ): Long + fun uniffi_xmtpv3_fn_method_fficonversations_stream(`ptr`: Pointer,`callback`: Pointer, + ): Long + fun uniffi_xmtpv3_fn_method_fficonversations_stream_all_dm_messages(`ptr`: Pointer,`messageCallback`: Pointer, + ): Long + fun uniffi_xmtpv3_fn_method_fficonversations_stream_all_group_messages(`ptr`: Pointer,`messageCallback`: Pointer, + ): Long + fun uniffi_xmtpv3_fn_method_fficonversations_stream_all_messages(`ptr`: Pointer,`messageCallback`: Pointer, + ): Long + fun uniffi_xmtpv3_fn_method_fficonversations_stream_consent(`ptr`: Pointer,`callback`: Pointer, + ): Long + fun uniffi_xmtpv3_fn_method_fficonversations_stream_dms(`ptr`: Pointer,`callback`: Pointer, + ): Long + fun uniffi_xmtpv3_fn_method_fficonversations_stream_groups(`ptr`: Pointer,`callback`: Pointer, + ): Long + fun uniffi_xmtpv3_fn_method_fficonversations_stream_messages(`ptr`: Pointer,`messageCallback`: Pointer,`conversationType`: RustBuffer.ByValue, + ): Long + fun uniffi_xmtpv3_fn_method_fficonversations_stream_preferences(`ptr`: Pointer,`callback`: Pointer, + ): Long + fun uniffi_xmtpv3_fn_method_fficonversations_sync(`ptr`: Pointer, + ): Long + fun uniffi_xmtpv3_fn_method_fficonversations_sync_all_conversations(`ptr`: Pointer,`consentState`: RustBuffer.ByValue, + ): Long + fun uniffi_xmtpv3_fn_clone_ffigrouppermissions(`ptr`: Pointer,uniffi_out_err: UniffiRustCallStatus, + ): Pointer + fun uniffi_xmtpv3_fn_free_ffigrouppermissions(`ptr`: Pointer,uniffi_out_err: UniffiRustCallStatus, + ): Unit + fun uniffi_xmtpv3_fn_method_ffigrouppermissions_policy_set(`ptr`: Pointer,uniffi_out_err: UniffiRustCallStatus, + ): RustBuffer.ByValue + fun uniffi_xmtpv3_fn_method_ffigrouppermissions_policy_type(`ptr`: Pointer,uniffi_out_err: UniffiRustCallStatus, + ): RustBuffer.ByValue + fun uniffi_xmtpv3_fn_clone_ffimessagecallback(`ptr`: Pointer,uniffi_out_err: UniffiRustCallStatus, + ): Pointer + fun uniffi_xmtpv3_fn_free_ffimessagecallback(`ptr`: Pointer,uniffi_out_err: UniffiRustCallStatus, + ): Unit + fun uniffi_xmtpv3_fn_init_callback_vtable_ffimessagecallback(`vtable`: UniffiVTableCallbackInterfaceFfiMessageCallback, + ): Unit + fun uniffi_xmtpv3_fn_method_ffimessagecallback_on_message(`ptr`: Pointer,`message`: RustBuffer.ByValue,uniffi_out_err: UniffiRustCallStatus, + ): Unit + fun uniffi_xmtpv3_fn_method_ffimessagecallback_on_error(`ptr`: Pointer,`error`: RustBuffer.ByValue,uniffi_out_err: UniffiRustCallStatus, + ): Unit + fun uniffi_xmtpv3_fn_clone_ffipreferencecallback(`ptr`: Pointer,uniffi_out_err: UniffiRustCallStatus, + ): Pointer + fun uniffi_xmtpv3_fn_free_ffipreferencecallback(`ptr`: Pointer,uniffi_out_err: UniffiRustCallStatus, + ): Unit + fun uniffi_xmtpv3_fn_init_callback_vtable_ffipreferencecallback(`vtable`: UniffiVTableCallbackInterfaceFfiPreferenceCallback, + ): Unit + fun uniffi_xmtpv3_fn_method_ffipreferencecallback_on_preference_update(`ptr`: Pointer,`preference`: RustBuffer.ByValue,uniffi_out_err: UniffiRustCallStatus, + ): Unit + fun uniffi_xmtpv3_fn_method_ffipreferencecallback_on_error(`ptr`: Pointer,`error`: RustBuffer.ByValue,uniffi_out_err: UniffiRustCallStatus, + ): Unit + fun uniffi_xmtpv3_fn_clone_ffisignaturerequest(`ptr`: Pointer,uniffi_out_err: UniffiRustCallStatus, + ): Pointer + fun uniffi_xmtpv3_fn_free_ffisignaturerequest(`ptr`: Pointer,uniffi_out_err: UniffiRustCallStatus, + ): Unit + fun uniffi_xmtpv3_fn_method_ffisignaturerequest_add_ecdsa_signature(`ptr`: Pointer,`signatureBytes`: RustBuffer.ByValue, + ): Long + fun uniffi_xmtpv3_fn_method_ffisignaturerequest_add_scw_signature(`ptr`: Pointer,`signatureBytes`: RustBuffer.ByValue,`address`: RustBuffer.ByValue,`chainId`: Long,`blockNumber`: RustBuffer.ByValue, + ): Long + fun uniffi_xmtpv3_fn_method_ffisignaturerequest_is_ready(`ptr`: Pointer, + ): Long + fun uniffi_xmtpv3_fn_method_ffisignaturerequest_missing_address_signatures(`ptr`: Pointer, + ): Long + fun uniffi_xmtpv3_fn_method_ffisignaturerequest_signature_text(`ptr`: Pointer, + ): Long + fun uniffi_xmtpv3_fn_clone_ffistreamcloser(`ptr`: Pointer,uniffi_out_err: UniffiRustCallStatus, + ): Pointer + fun uniffi_xmtpv3_fn_free_ffistreamcloser(`ptr`: Pointer,uniffi_out_err: UniffiRustCallStatus, + ): Unit + fun uniffi_xmtpv3_fn_method_ffistreamcloser_end(`ptr`: Pointer,uniffi_out_err: UniffiRustCallStatus, + ): Unit + fun uniffi_xmtpv3_fn_method_ffistreamcloser_end_and_wait(`ptr`: Pointer, + ): Long + fun uniffi_xmtpv3_fn_method_ffistreamcloser_is_closed(`ptr`: Pointer,uniffi_out_err: UniffiRustCallStatus, + ): Byte + fun uniffi_xmtpv3_fn_method_ffistreamcloser_wait_for_ready(`ptr`: Pointer, + ): Long + fun uniffi_xmtpv3_fn_clone_ffiv2apiclient(`ptr`: Pointer,uniffi_out_err: UniffiRustCallStatus, + ): Pointer + fun uniffi_xmtpv3_fn_free_ffiv2apiclient(`ptr`: Pointer,uniffi_out_err: UniffiRustCallStatus, + ): Unit + fun uniffi_xmtpv3_fn_method_ffiv2apiclient_batch_query(`ptr`: Pointer,`req`: RustBuffer.ByValue, + ): Long + fun uniffi_xmtpv3_fn_method_ffiv2apiclient_publish(`ptr`: Pointer,`request`: RustBuffer.ByValue,`authToken`: RustBuffer.ByValue, + ): Long + fun uniffi_xmtpv3_fn_method_ffiv2apiclient_query(`ptr`: Pointer,`request`: RustBuffer.ByValue, + ): Long + fun uniffi_xmtpv3_fn_method_ffiv2apiclient_set_app_version(`ptr`: Pointer,`version`: RustBuffer.ByValue,uniffi_out_err: UniffiRustCallStatus, + ): Unit + fun uniffi_xmtpv3_fn_method_ffiv2apiclient_subscribe(`ptr`: Pointer,`request`: RustBuffer.ByValue,`callback`: Pointer, + ): Long + fun uniffi_xmtpv3_fn_clone_ffiv2subscription(`ptr`: Pointer,uniffi_out_err: UniffiRustCallStatus, + ): Pointer + fun uniffi_xmtpv3_fn_free_ffiv2subscription(`ptr`: Pointer,uniffi_out_err: UniffiRustCallStatus, + ): Unit + fun uniffi_xmtpv3_fn_method_ffiv2subscription_end(`ptr`: Pointer, + ): Long + fun uniffi_xmtpv3_fn_method_ffiv2subscription_is_closed(`ptr`: Pointer,uniffi_out_err: UniffiRustCallStatus, + ): Byte + fun uniffi_xmtpv3_fn_method_ffiv2subscription_update(`ptr`: Pointer,`req`: RustBuffer.ByValue, + ): Long + fun uniffi_xmtpv3_fn_clone_ffiv2subscriptioncallback(`ptr`: Pointer,uniffi_out_err: UniffiRustCallStatus, + ): Pointer + fun uniffi_xmtpv3_fn_free_ffiv2subscriptioncallback(`ptr`: Pointer,uniffi_out_err: UniffiRustCallStatus, + ): Unit + fun uniffi_xmtpv3_fn_init_callback_vtable_ffiv2subscriptioncallback(`vtable`: UniffiVTableCallbackInterfaceFfiV2SubscriptionCallback, + ): Unit + fun uniffi_xmtpv3_fn_method_ffiv2subscriptioncallback_on_message(`ptr`: Pointer,`message`: RustBuffer.ByValue,uniffi_out_err: UniffiRustCallStatus, + ): Unit + fun uniffi_xmtpv3_fn_method_ffiv2subscriptioncallback_on_error(`ptr`: Pointer,`error`: RustBuffer.ByValue,uniffi_out_err: UniffiRustCallStatus, + ): Unit + fun uniffi_xmtpv3_fn_clone_ffixmtpclient(`ptr`: Pointer,uniffi_out_err: UniffiRustCallStatus, + ): Pointer + fun uniffi_xmtpv3_fn_free_ffixmtpclient(`ptr`: Pointer,uniffi_out_err: UniffiRustCallStatus, + ): Unit + fun uniffi_xmtpv3_fn_method_ffixmtpclient_add_wallet(`ptr`: Pointer,`newWalletAddress`: RustBuffer.ByValue, + ): Long + fun uniffi_xmtpv3_fn_method_ffixmtpclient_addresses_from_inbox_id(`ptr`: Pointer,`refreshFromNetwork`: Byte,`inboxIds`: RustBuffer.ByValue, + ): Long + fun uniffi_xmtpv3_fn_method_ffixmtpclient_apply_signature_request(`ptr`: Pointer,`signatureRequest`: Pointer, + ): Long + fun uniffi_xmtpv3_fn_method_ffixmtpclient_can_message(`ptr`: Pointer,`accountAddresses`: RustBuffer.ByValue, + ): Long + fun uniffi_xmtpv3_fn_method_ffixmtpclient_conversation(`ptr`: Pointer,`conversationId`: RustBuffer.ByValue,uniffi_out_err: UniffiRustCallStatus, + ): Pointer + fun uniffi_xmtpv3_fn_method_ffixmtpclient_conversations(`ptr`: Pointer,uniffi_out_err: UniffiRustCallStatus, + ): Pointer + fun uniffi_xmtpv3_fn_method_ffixmtpclient_db_reconnect(`ptr`: Pointer, + ): Long + fun uniffi_xmtpv3_fn_method_ffixmtpclient_dm_conversation(`ptr`: Pointer,`targetInboxId`: RustBuffer.ByValue,uniffi_out_err: UniffiRustCallStatus, + ): Pointer + fun uniffi_xmtpv3_fn_method_ffixmtpclient_find_inbox_id(`ptr`: Pointer,`address`: RustBuffer.ByValue, + ): Long + fun uniffi_xmtpv3_fn_method_ffixmtpclient_get_consent_state(`ptr`: Pointer,`entityType`: RustBuffer.ByValue,`entity`: RustBuffer.ByValue, + ): Long + fun uniffi_xmtpv3_fn_method_ffixmtpclient_get_latest_inbox_state(`ptr`: Pointer,`inboxId`: RustBuffer.ByValue, + ): Long + fun uniffi_xmtpv3_fn_method_ffixmtpclient_inbox_id(`ptr`: Pointer,uniffi_out_err: UniffiRustCallStatus, + ): RustBuffer.ByValue + fun uniffi_xmtpv3_fn_method_ffixmtpclient_inbox_state(`ptr`: Pointer,`refreshFromNetwork`: Byte, + ): Long + fun uniffi_xmtpv3_fn_method_ffixmtpclient_installation_id(`ptr`: Pointer,uniffi_out_err: UniffiRustCallStatus, + ): RustBuffer.ByValue + fun uniffi_xmtpv3_fn_method_ffixmtpclient_message(`ptr`: Pointer,`messageId`: RustBuffer.ByValue,uniffi_out_err: UniffiRustCallStatus, + ): RustBuffer.ByValue + fun uniffi_xmtpv3_fn_method_ffixmtpclient_register_identity(`ptr`: Pointer,`signatureRequest`: Pointer, + ): Long + fun uniffi_xmtpv3_fn_method_ffixmtpclient_release_db_connection(`ptr`: Pointer,uniffi_out_err: UniffiRustCallStatus, + ): Unit + fun uniffi_xmtpv3_fn_method_ffixmtpclient_revoke_all_other_installations(`ptr`: Pointer, + ): Long + fun uniffi_xmtpv3_fn_method_ffixmtpclient_revoke_installations(`ptr`: Pointer,`installationIds`: RustBuffer.ByValue, + ): Long + fun uniffi_xmtpv3_fn_method_ffixmtpclient_revoke_wallet(`ptr`: Pointer,`walletAddress`: RustBuffer.ByValue, + ): Long + fun uniffi_xmtpv3_fn_method_ffixmtpclient_send_sync_request(`ptr`: Pointer,`kind`: RustBuffer.ByValue, + ): Long + fun uniffi_xmtpv3_fn_method_ffixmtpclient_set_consent_states(`ptr`: Pointer,`records`: RustBuffer.ByValue, + ): Long + fun uniffi_xmtpv3_fn_method_ffixmtpclient_sign_with_installation_key(`ptr`: Pointer,`text`: RustBuffer.ByValue,uniffi_out_err: UniffiRustCallStatus, + ): RustBuffer.ByValue + fun uniffi_xmtpv3_fn_method_ffixmtpclient_signature_request(`ptr`: Pointer,uniffi_out_err: UniffiRustCallStatus, + ): RustBuffer.ByValue + fun uniffi_xmtpv3_fn_method_ffixmtpclient_verify_signed_with_installation_key(`ptr`: Pointer,`signatureText`: RustBuffer.ByValue,`signatureBytes`: RustBuffer.ByValue,uniffi_out_err: UniffiRustCallStatus, + ): Unit + fun uniffi_xmtpv3_fn_method_ffixmtpclient_verify_signed_with_public_key(`ptr`: Pointer,`signatureText`: RustBuffer.ByValue,`signatureBytes`: RustBuffer.ByValue,`publicKey`: RustBuffer.ByValue,uniffi_out_err: UniffiRustCallStatus, + ): Unit + fun uniffi_xmtpv3_fn_clone_xmtpapiclient(`ptr`: Pointer,uniffi_out_err: UniffiRustCallStatus, + ): Pointer + fun uniffi_xmtpv3_fn_free_xmtpapiclient(`ptr`: Pointer,uniffi_out_err: UniffiRustCallStatus, + ): Unit + fun uniffi_xmtpv3_fn_init_callback_vtable_ffiinboxowner(`vtable`: UniffiVTableCallbackInterfaceFfiInboxOwner, + ): Unit + fun uniffi_xmtpv3_fn_func_connect_to_backend(`host`: RustBuffer.ByValue,`isSecure`: Byte, + ): Long + fun uniffi_xmtpv3_fn_func_create_client(`api`: Pointer,`db`: RustBuffer.ByValue,`encryptionKey`: RustBuffer.ByValue,`inboxId`: RustBuffer.ByValue,`accountAddress`: RustBuffer.ByValue,`nonce`: Long,`legacySignedPrivateKeyProto`: RustBuffer.ByValue,`historySyncUrl`: RustBuffer.ByValue, + ): Long + fun uniffi_xmtpv3_fn_func_create_v2_client(`host`: RustBuffer.ByValue,`isSecure`: Byte, + ): Long + fun uniffi_xmtpv3_fn_func_decode_reaction(`bytes`: RustBuffer.ByValue,uniffi_out_err: UniffiRustCallStatus, + ): RustBuffer.ByValue + fun uniffi_xmtpv3_fn_func_diffie_hellman_k256(`privateKeyBytes`: RustBuffer.ByValue,`publicKeyBytes`: RustBuffer.ByValue,uniffi_out_err: UniffiRustCallStatus, + ): RustBuffer.ByValue + fun uniffi_xmtpv3_fn_func_encode_reaction(`reaction`: RustBuffer.ByValue,uniffi_out_err: UniffiRustCallStatus, + ): RustBuffer.ByValue + fun uniffi_xmtpv3_fn_func_generate_inbox_id(`accountAddress`: RustBuffer.ByValue,`nonce`: Long,uniffi_out_err: UniffiRustCallStatus, + ): RustBuffer.ByValue + fun uniffi_xmtpv3_fn_func_generate_private_preferences_topic_identifier(`privateKey`: RustBuffer.ByValue,uniffi_out_err: UniffiRustCallStatus, + ): RustBuffer.ByValue + fun uniffi_xmtpv3_fn_func_get_inbox_id_for_address(`api`: Pointer,`accountAddress`: RustBuffer.ByValue, + ): Long + fun uniffi_xmtpv3_fn_func_get_version_info(uniffi_out_err: UniffiRustCallStatus, + ): RustBuffer.ByValue + fun uniffi_xmtpv3_fn_func_keccak256(`input`: RustBuffer.ByValue,uniffi_out_err: UniffiRustCallStatus, + ): RustBuffer.ByValue + fun uniffi_xmtpv3_fn_func_public_key_from_private_key_k256(`privateKeyBytes`: RustBuffer.ByValue,uniffi_out_err: UniffiRustCallStatus, + ): RustBuffer.ByValue + fun uniffi_xmtpv3_fn_func_recover_address(`signatureBytes`: RustBuffer.ByValue,`predigestMessage`: RustBuffer.ByValue,uniffi_out_err: UniffiRustCallStatus, + ): RustBuffer.ByValue + fun uniffi_xmtpv3_fn_func_recover_public_key_k256_keccak256(`message`: RustBuffer.ByValue,`signature`: RustBuffer.ByValue,uniffi_out_err: UniffiRustCallStatus, + ): RustBuffer.ByValue + fun uniffi_xmtpv3_fn_func_recover_public_key_k256_sha256(`message`: RustBuffer.ByValue,`signature`: RustBuffer.ByValue,uniffi_out_err: UniffiRustCallStatus, + ): RustBuffer.ByValue + fun uniffi_xmtpv3_fn_func_sha256(`input`: RustBuffer.ByValue,uniffi_out_err: UniffiRustCallStatus, + ): RustBuffer.ByValue + fun uniffi_xmtpv3_fn_func_user_preferences_decrypt(`publicKey`: RustBuffer.ByValue,`privateKey`: RustBuffer.ByValue,`message`: RustBuffer.ByValue,uniffi_out_err: UniffiRustCallStatus, + ): RustBuffer.ByValue + fun uniffi_xmtpv3_fn_func_user_preferences_encrypt(`publicKey`: RustBuffer.ByValue,`privateKey`: RustBuffer.ByValue,`message`: RustBuffer.ByValue,uniffi_out_err: UniffiRustCallStatus, + ): RustBuffer.ByValue + fun uniffi_xmtpv3_fn_func_verify_k256_sha256(`signedBy`: RustBuffer.ByValue,`message`: RustBuffer.ByValue,`signature`: RustBuffer.ByValue,`recoveryId`: Byte,uniffi_out_err: UniffiRustCallStatus, + ): Byte + fun ffi_xmtpv3_rustbuffer_alloc(`size`: Long,uniffi_out_err: UniffiRustCallStatus, + ): RustBuffer.ByValue + fun ffi_xmtpv3_rustbuffer_from_bytes(`bytes`: ForeignBytes.ByValue,uniffi_out_err: UniffiRustCallStatus, + ): RustBuffer.ByValue + fun ffi_xmtpv3_rustbuffer_free(`buf`: RustBuffer.ByValue,uniffi_out_err: UniffiRustCallStatus, + ): Unit + fun ffi_xmtpv3_rustbuffer_reserve(`buf`: RustBuffer.ByValue,`additional`: Long,uniffi_out_err: UniffiRustCallStatus, + ): RustBuffer.ByValue + fun ffi_xmtpv3_rust_future_poll_u8(`handle`: Long,`callback`: UniffiRustFutureContinuationCallback,`callbackData`: Long, + ): Unit + fun ffi_xmtpv3_rust_future_cancel_u8(`handle`: Long, + ): Unit + fun ffi_xmtpv3_rust_future_free_u8(`handle`: Long, + ): Unit + fun ffi_xmtpv3_rust_future_complete_u8(`handle`: Long,uniffi_out_err: UniffiRustCallStatus, + ): Byte + fun ffi_xmtpv3_rust_future_poll_i8(`handle`: Long,`callback`: UniffiRustFutureContinuationCallback,`callbackData`: Long, + ): Unit + fun ffi_xmtpv3_rust_future_cancel_i8(`handle`: Long, + ): Unit + fun ffi_xmtpv3_rust_future_free_i8(`handle`: Long, + ): Unit + fun ffi_xmtpv3_rust_future_complete_i8(`handle`: Long,uniffi_out_err: UniffiRustCallStatus, + ): Byte + fun ffi_xmtpv3_rust_future_poll_u16(`handle`: Long,`callback`: UniffiRustFutureContinuationCallback,`callbackData`: Long, + ): Unit + fun ffi_xmtpv3_rust_future_cancel_u16(`handle`: Long, + ): Unit + fun ffi_xmtpv3_rust_future_free_u16(`handle`: Long, + ): Unit + fun ffi_xmtpv3_rust_future_complete_u16(`handle`: Long,uniffi_out_err: UniffiRustCallStatus, + ): Short + fun ffi_xmtpv3_rust_future_poll_i16(`handle`: Long,`callback`: UniffiRustFutureContinuationCallback,`callbackData`: Long, + ): Unit + fun ffi_xmtpv3_rust_future_cancel_i16(`handle`: Long, + ): Unit + fun ffi_xmtpv3_rust_future_free_i16(`handle`: Long, + ): Unit + fun ffi_xmtpv3_rust_future_complete_i16(`handle`: Long,uniffi_out_err: UniffiRustCallStatus, + ): Short + fun ffi_xmtpv3_rust_future_poll_u32(`handle`: Long,`callback`: UniffiRustFutureContinuationCallback,`callbackData`: Long, + ): Unit + fun ffi_xmtpv3_rust_future_cancel_u32(`handle`: Long, + ): Unit + fun ffi_xmtpv3_rust_future_free_u32(`handle`: Long, + ): Unit + fun ffi_xmtpv3_rust_future_complete_u32(`handle`: Long,uniffi_out_err: UniffiRustCallStatus, + ): Int + fun ffi_xmtpv3_rust_future_poll_i32(`handle`: Long,`callback`: UniffiRustFutureContinuationCallback,`callbackData`: Long, + ): Unit + fun ffi_xmtpv3_rust_future_cancel_i32(`handle`: Long, + ): Unit + fun ffi_xmtpv3_rust_future_free_i32(`handle`: Long, + ): Unit + fun ffi_xmtpv3_rust_future_complete_i32(`handle`: Long,uniffi_out_err: UniffiRustCallStatus, + ): Int + fun ffi_xmtpv3_rust_future_poll_u64(`handle`: Long,`callback`: UniffiRustFutureContinuationCallback,`callbackData`: Long, + ): Unit + fun ffi_xmtpv3_rust_future_cancel_u64(`handle`: Long, + ): Unit + fun ffi_xmtpv3_rust_future_free_u64(`handle`: Long, + ): Unit + fun ffi_xmtpv3_rust_future_complete_u64(`handle`: Long,uniffi_out_err: UniffiRustCallStatus, + ): Long + fun ffi_xmtpv3_rust_future_poll_i64(`handle`: Long,`callback`: UniffiRustFutureContinuationCallback,`callbackData`: Long, + ): Unit + fun ffi_xmtpv3_rust_future_cancel_i64(`handle`: Long, + ): Unit + fun ffi_xmtpv3_rust_future_free_i64(`handle`: Long, + ): Unit + fun ffi_xmtpv3_rust_future_complete_i64(`handle`: Long,uniffi_out_err: UniffiRustCallStatus, + ): Long + fun ffi_xmtpv3_rust_future_poll_f32(`handle`: Long,`callback`: UniffiRustFutureContinuationCallback,`callbackData`: Long, + ): Unit + fun ffi_xmtpv3_rust_future_cancel_f32(`handle`: Long, + ): Unit + fun ffi_xmtpv3_rust_future_free_f32(`handle`: Long, + ): Unit + fun ffi_xmtpv3_rust_future_complete_f32(`handle`: Long,uniffi_out_err: UniffiRustCallStatus, + ): Float + fun ffi_xmtpv3_rust_future_poll_f64(`handle`: Long,`callback`: UniffiRustFutureContinuationCallback,`callbackData`: Long, + ): Unit + fun ffi_xmtpv3_rust_future_cancel_f64(`handle`: Long, + ): Unit + fun ffi_xmtpv3_rust_future_free_f64(`handle`: Long, + ): Unit + fun ffi_xmtpv3_rust_future_complete_f64(`handle`: Long,uniffi_out_err: UniffiRustCallStatus, + ): Double + fun ffi_xmtpv3_rust_future_poll_pointer(`handle`: Long,`callback`: UniffiRustFutureContinuationCallback,`callbackData`: Long, + ): Unit + fun ffi_xmtpv3_rust_future_cancel_pointer(`handle`: Long, + ): Unit + fun ffi_xmtpv3_rust_future_free_pointer(`handle`: Long, + ): Unit + fun ffi_xmtpv3_rust_future_complete_pointer(`handle`: Long,uniffi_out_err: UniffiRustCallStatus, + ): Pointer + fun ffi_xmtpv3_rust_future_poll_rust_buffer(`handle`: Long,`callback`: UniffiRustFutureContinuationCallback,`callbackData`: Long, + ): Unit + fun ffi_xmtpv3_rust_future_cancel_rust_buffer(`handle`: Long, + ): Unit + fun ffi_xmtpv3_rust_future_free_rust_buffer(`handle`: Long, + ): Unit + fun ffi_xmtpv3_rust_future_complete_rust_buffer(`handle`: Long,uniffi_out_err: UniffiRustCallStatus, + ): RustBuffer.ByValue + fun ffi_xmtpv3_rust_future_poll_void(`handle`: Long,`callback`: UniffiRustFutureContinuationCallback,`callbackData`: Long, + ): Unit + fun ffi_xmtpv3_rust_future_cancel_void(`handle`: Long, + ): Unit + fun ffi_xmtpv3_rust_future_free_void(`handle`: Long, + ): Unit + fun ffi_xmtpv3_rust_future_complete_void(`handle`: Long,uniffi_out_err: UniffiRustCallStatus, + ): Unit + fun uniffi_xmtpv3_checksum_func_connect_to_backend( + ): Short + fun uniffi_xmtpv3_checksum_func_create_client( + ): Short + fun uniffi_xmtpv3_checksum_func_create_v2_client( + ): Short + fun uniffi_xmtpv3_checksum_func_decode_reaction( + ): Short + fun uniffi_xmtpv3_checksum_func_diffie_hellman_k256( + ): Short + fun uniffi_xmtpv3_checksum_func_encode_reaction( + ): Short + fun uniffi_xmtpv3_checksum_func_generate_inbox_id( + ): Short + fun uniffi_xmtpv3_checksum_func_generate_private_preferences_topic_identifier( + ): Short + fun uniffi_xmtpv3_checksum_func_get_inbox_id_for_address( + ): Short + fun uniffi_xmtpv3_checksum_func_get_version_info( + ): Short + fun uniffi_xmtpv3_checksum_func_keccak256( + ): Short + fun uniffi_xmtpv3_checksum_func_public_key_from_private_key_k256( + ): Short + fun uniffi_xmtpv3_checksum_func_recover_address( + ): Short + fun uniffi_xmtpv3_checksum_func_recover_public_key_k256_keccak256( + ): Short + fun uniffi_xmtpv3_checksum_func_recover_public_key_k256_sha256( + ): Short + fun uniffi_xmtpv3_checksum_func_sha256( + ): Short + fun uniffi_xmtpv3_checksum_func_user_preferences_decrypt( + ): Short + fun uniffi_xmtpv3_checksum_func_user_preferences_encrypt( + ): Short + fun uniffi_xmtpv3_checksum_func_verify_k256_sha256( + ): Short + fun uniffi_xmtpv3_checksum_method_fficonsentcallback_on_consent_update( + ): Short + fun uniffi_xmtpv3_checksum_method_fficonsentcallback_on_error( + ): Short + fun uniffi_xmtpv3_checksum_method_fficonversation_add_admin( + ): Short + fun uniffi_xmtpv3_checksum_method_fficonversation_add_members( + ): Short + fun uniffi_xmtpv3_checksum_method_fficonversation_add_members_by_inbox_id( + ): Short + fun uniffi_xmtpv3_checksum_method_fficonversation_add_super_admin( + ): Short + fun uniffi_xmtpv3_checksum_method_fficonversation_added_by_inbox_id( + ): Short + fun uniffi_xmtpv3_checksum_method_fficonversation_admin_list( + ): Short + fun uniffi_xmtpv3_checksum_method_fficonversation_consent_state( + ): Short + fun uniffi_xmtpv3_checksum_method_fficonversation_conversation_type( + ): Short + fun uniffi_xmtpv3_checksum_method_fficonversation_created_at_ns( + ): Short + fun uniffi_xmtpv3_checksum_method_fficonversation_dm_peer_inbox_id( + ): Short + fun uniffi_xmtpv3_checksum_method_fficonversation_find_messages( + ): Short + fun uniffi_xmtpv3_checksum_method_fficonversation_find_messages_with_reactions( + ): Short + fun uniffi_xmtpv3_checksum_method_fficonversation_group_description( + ): Short + fun uniffi_xmtpv3_checksum_method_fficonversation_group_image_url_square( + ): Short + fun uniffi_xmtpv3_checksum_method_fficonversation_group_metadata( + ): Short + fun uniffi_xmtpv3_checksum_method_fficonversation_group_name( + ): Short + fun uniffi_xmtpv3_checksum_method_fficonversation_group_permissions( + ): Short + fun uniffi_xmtpv3_checksum_method_fficonversation_group_pinned_frame_url( + ): Short + fun uniffi_xmtpv3_checksum_method_fficonversation_id( + ): Short + fun uniffi_xmtpv3_checksum_method_fficonversation_is_active( + ): Short + fun uniffi_xmtpv3_checksum_method_fficonversation_is_admin( + ): Short + fun uniffi_xmtpv3_checksum_method_fficonversation_is_super_admin( + ): Short + fun uniffi_xmtpv3_checksum_method_fficonversation_list_members( + ): Short + fun uniffi_xmtpv3_checksum_method_fficonversation_process_streamed_conversation_message( + ): Short + fun uniffi_xmtpv3_checksum_method_fficonversation_publish_messages( + ): Short + fun uniffi_xmtpv3_checksum_method_fficonversation_remove_admin( + ): Short + fun uniffi_xmtpv3_checksum_method_fficonversation_remove_members( + ): Short + fun uniffi_xmtpv3_checksum_method_fficonversation_remove_members_by_inbox_id( + ): Short + fun uniffi_xmtpv3_checksum_method_fficonversation_remove_super_admin( + ): Short + fun uniffi_xmtpv3_checksum_method_fficonversation_send( + ): Short + fun uniffi_xmtpv3_checksum_method_fficonversation_send_optimistic( + ): Short + fun uniffi_xmtpv3_checksum_method_fficonversation_stream( + ): Short + fun uniffi_xmtpv3_checksum_method_fficonversation_super_admin_list( + ): Short + fun uniffi_xmtpv3_checksum_method_fficonversation_sync( + ): Short + fun uniffi_xmtpv3_checksum_method_fficonversation_update_consent_state( + ): Short + fun uniffi_xmtpv3_checksum_method_fficonversation_update_group_description( + ): Short + fun uniffi_xmtpv3_checksum_method_fficonversation_update_group_image_url_square( + ): Short + fun uniffi_xmtpv3_checksum_method_fficonversation_update_group_name( + ): Short + fun uniffi_xmtpv3_checksum_method_fficonversation_update_group_pinned_frame_url( + ): Short + fun uniffi_xmtpv3_checksum_method_fficonversation_update_permission_policy( + ): Short + fun uniffi_xmtpv3_checksum_method_fficonversationcallback_on_conversation( + ): Short + fun uniffi_xmtpv3_checksum_method_fficonversationcallback_on_error( + ): Short + fun uniffi_xmtpv3_checksum_method_fficonversationlistitem_conversation( + ): Short + fun uniffi_xmtpv3_checksum_method_fficonversationlistitem_last_message( + ): Short + fun uniffi_xmtpv3_checksum_method_fficonversationmetadata_conversation_type( + ): Short + fun uniffi_xmtpv3_checksum_method_fficonversationmetadata_creator_inbox_id( + ): Short + fun uniffi_xmtpv3_checksum_method_fficonversations_create_dm( + ): Short + fun uniffi_xmtpv3_checksum_method_fficonversations_create_group( + ): Short + fun uniffi_xmtpv3_checksum_method_fficonversations_get_hmac_keys( + ): Short + fun uniffi_xmtpv3_checksum_method_fficonversations_get_sync_group( + ): Short + fun uniffi_xmtpv3_checksum_method_fficonversations_list( + ): Short + fun uniffi_xmtpv3_checksum_method_fficonversations_list_dms( + ): Short + fun uniffi_xmtpv3_checksum_method_fficonversations_list_groups( + ): Short + fun uniffi_xmtpv3_checksum_method_fficonversations_process_streamed_welcome_message( + ): Short + fun uniffi_xmtpv3_checksum_method_fficonversations_stream( + ): Short + fun uniffi_xmtpv3_checksum_method_fficonversations_stream_all_dm_messages( + ): Short + fun uniffi_xmtpv3_checksum_method_fficonversations_stream_all_group_messages( + ): Short + fun uniffi_xmtpv3_checksum_method_fficonversations_stream_all_messages( + ): Short + fun uniffi_xmtpv3_checksum_method_fficonversations_stream_consent( + ): Short + fun uniffi_xmtpv3_checksum_method_fficonversations_stream_dms( + ): Short + fun uniffi_xmtpv3_checksum_method_fficonversations_stream_groups( + ): Short + fun uniffi_xmtpv3_checksum_method_fficonversations_stream_messages( + ): Short + fun uniffi_xmtpv3_checksum_method_fficonversations_stream_preferences( + ): Short + fun uniffi_xmtpv3_checksum_method_fficonversations_sync( + ): Short + fun uniffi_xmtpv3_checksum_method_fficonversations_sync_all_conversations( + ): Short + fun uniffi_xmtpv3_checksum_method_ffigrouppermissions_policy_set( + ): Short + fun uniffi_xmtpv3_checksum_method_ffigrouppermissions_policy_type( + ): Short + fun uniffi_xmtpv3_checksum_method_ffimessagecallback_on_message( + ): Short + fun uniffi_xmtpv3_checksum_method_ffimessagecallback_on_error( + ): Short + fun uniffi_xmtpv3_checksum_method_ffipreferencecallback_on_preference_update( + ): Short + fun uniffi_xmtpv3_checksum_method_ffipreferencecallback_on_error( + ): Short + fun uniffi_xmtpv3_checksum_method_ffisignaturerequest_add_ecdsa_signature( + ): Short + fun uniffi_xmtpv3_checksum_method_ffisignaturerequest_add_scw_signature( + ): Short + fun uniffi_xmtpv3_checksum_method_ffisignaturerequest_is_ready( + ): Short + fun uniffi_xmtpv3_checksum_method_ffisignaturerequest_missing_address_signatures( + ): Short + fun uniffi_xmtpv3_checksum_method_ffisignaturerequest_signature_text( + ): Short + fun uniffi_xmtpv3_checksum_method_ffistreamcloser_end( + ): Short + fun uniffi_xmtpv3_checksum_method_ffistreamcloser_end_and_wait( + ): Short + fun uniffi_xmtpv3_checksum_method_ffistreamcloser_is_closed( + ): Short + fun uniffi_xmtpv3_checksum_method_ffistreamcloser_wait_for_ready( + ): Short + fun uniffi_xmtpv3_checksum_method_ffiv2apiclient_batch_query( + ): Short fun uniffi_xmtpv3_checksum_method_ffiv2apiclient_publish( ): Short - fun uniffi_xmtpv3_checksum_method_ffiv2apiclient_query( ): Short - fun uniffi_xmtpv3_checksum_method_ffiv2apiclient_set_app_version( ): Short - fun uniffi_xmtpv3_checksum_method_ffiv2apiclient_subscribe( ): Short - fun uniffi_xmtpv3_checksum_method_ffiv2subscription_end( ): Short - fun uniffi_xmtpv3_checksum_method_ffiv2subscription_is_closed( ): Short - fun uniffi_xmtpv3_checksum_method_ffiv2subscription_update( ): Short - fun uniffi_xmtpv3_checksum_method_ffiv2subscriptioncallback_on_message( ): Short - fun uniffi_xmtpv3_checksum_method_ffiv2subscriptioncallback_on_error( ): Short - fun uniffi_xmtpv3_checksum_method_ffixmtpclient_add_wallet( ): Short - fun uniffi_xmtpv3_checksum_method_ffixmtpclient_addresses_from_inbox_id( ): Short - fun uniffi_xmtpv3_checksum_method_ffixmtpclient_apply_signature_request( ): Short - fun uniffi_xmtpv3_checksum_method_ffixmtpclient_can_message( ): Short - fun uniffi_xmtpv3_checksum_method_ffixmtpclient_conversation( ): Short - fun uniffi_xmtpv3_checksum_method_ffixmtpclient_conversations( ): Short - fun uniffi_xmtpv3_checksum_method_ffixmtpclient_db_reconnect( ): Short - fun uniffi_xmtpv3_checksum_method_ffixmtpclient_dm_conversation( ): Short - fun uniffi_xmtpv3_checksum_method_ffixmtpclient_find_inbox_id( ): Short - fun uniffi_xmtpv3_checksum_method_ffixmtpclient_get_consent_state( ): Short - fun uniffi_xmtpv3_checksum_method_ffixmtpclient_get_latest_inbox_state( ): Short - fun uniffi_xmtpv3_checksum_method_ffixmtpclient_inbox_id( ): Short - fun uniffi_xmtpv3_checksum_method_ffixmtpclient_inbox_state( ): Short - fun uniffi_xmtpv3_checksum_method_ffixmtpclient_installation_id( ): Short - fun uniffi_xmtpv3_checksum_method_ffixmtpclient_message( ): Short - fun uniffi_xmtpv3_checksum_method_ffixmtpclient_register_identity( ): Short - fun uniffi_xmtpv3_checksum_method_ffixmtpclient_release_db_connection( ): Short - fun uniffi_xmtpv3_checksum_method_ffixmtpclient_revoke_all_other_installations( ): Short - fun uniffi_xmtpv3_checksum_method_ffixmtpclient_revoke_installations( ): Short - fun uniffi_xmtpv3_checksum_method_ffixmtpclient_revoke_wallet( ): Short - fun uniffi_xmtpv3_checksum_method_ffixmtpclient_send_sync_request( ): Short - fun uniffi_xmtpv3_checksum_method_ffixmtpclient_set_consent_states( ): Short - fun uniffi_xmtpv3_checksum_method_ffixmtpclient_sign_with_installation_key( ): Short - fun uniffi_xmtpv3_checksum_method_ffixmtpclient_signature_request( ): Short - fun uniffi_xmtpv3_checksum_method_ffixmtpclient_verify_signed_with_installation_key( ): Short - fun uniffi_xmtpv3_checksum_method_ffixmtpclient_verify_signed_with_public_key( ): Short - fun uniffi_xmtpv3_checksum_method_ffiinboxowner_get_address( ): Short - fun uniffi_xmtpv3_checksum_method_ffiinboxowner_sign( ): Short - fun ffi_xmtpv3_uniffi_contract_version( ): Int - + } private fun uniffiCheckContractApiVersion(lib: UniffiLib) { @@ -2365,9 +1974,15 @@ private fun uniffiCheckApiChecksums(lib: UniffiLib) { if (lib.uniffi_xmtpv3_checksum_func_create_v2_client() != 48060.toShort()) { throw RuntimeException("UniFFI API checksum mismatch: try cleaning and rebuilding your project") } + if (lib.uniffi_xmtpv3_checksum_func_decode_reaction() != 28885.toShort()) { + throw RuntimeException("UniFFI API checksum mismatch: try cleaning and rebuilding your project") + } if (lib.uniffi_xmtpv3_checksum_func_diffie_hellman_k256() != 37475.toShort()) { throw RuntimeException("UniFFI API checksum mismatch: try cleaning and rebuilding your project") } + if (lib.uniffi_xmtpv3_checksum_func_encode_reaction() != 6548.toShort()) { + throw RuntimeException("UniFFI API checksum mismatch: try cleaning and rebuilding your project") + } if (lib.uniffi_xmtpv3_checksum_func_generate_inbox_id() != 47637.toShort()) { throw RuntimeException("UniFFI API checksum mismatch: try cleaning and rebuilding your project") } @@ -2446,6 +2061,9 @@ private fun uniffiCheckApiChecksums(lib: UniffiLib) { if (lib.uniffi_xmtpv3_checksum_method_fficonversation_find_messages() != 19931.toShort()) { throw RuntimeException("UniFFI API checksum mismatch: try cleaning and rebuilding your project") } + if (lib.uniffi_xmtpv3_checksum_method_fficonversation_find_messages_with_reactions() != 33179.toShort()) { + throw RuntimeException("UniFFI API checksum mismatch: try cleaning and rebuilding your project") + } if (lib.uniffi_xmtpv3_checksum_method_fficonversation_group_description() != 53570.toShort()) { throw RuntimeException("UniFFI API checksum mismatch: try cleaning and rebuilding your project") } @@ -2775,19 +2393,19 @@ internal const val UNIFFI_RUST_FUTURE_POLL_MAYBE_READY = 1.toByte() internal val uniffiContinuationHandleMap = UniffiHandleMap>() // FFI type for Rust future continuations -internal object uniffiRustFutureContinuationCallbackImpl : UniffiRustFutureContinuationCallback { +internal object uniffiRustFutureContinuationCallbackImpl: UniffiRustFutureContinuationCallback { override fun callback(data: Long, pollResult: Byte) { uniffiContinuationHandleMap.remove(data).resume(pollResult) } } -internal suspend fun uniffiRustCallAsync( +internal suspend fun uniffiRustCallAsync( rustFuture: Long, pollFunc: (Long, UniffiRustFutureContinuationCallback, Long) -> Unit, completeFunc: (Long, UniffiRustCallStatus) -> F, freeFunc: (Long) -> Unit, liftFunc: (F) -> T, - errorHandler: UniffiRustCallStatusErrorHandler, + errorHandler: UniffiRustCallStatusErrorHandler ): T { try { do { @@ -2821,7 +2439,6 @@ internal suspend fun uniffiRustCallAsync( // helper method to execute a block and destroy the object at the end. interface Disposable { fun destroy() - companion object { fun destroy(vararg args: Any?) { args.filterIsInstance() @@ -2845,7 +2462,7 @@ inline fun T.use(block: (T) -> R) = } } -/** +/** * Used to instantiate an interface without an actual pointer, for fakes in tests, mostly. * * @suppress @@ -2855,7 +2472,7 @@ object NoPointer /** * @suppress */ -public object FfiConverterUByte : FfiConverter { +public object FfiConverterUByte: FfiConverter { override fun lift(value: Byte): UByte { return value.toUByte() } @@ -2878,7 +2495,7 @@ public object FfiConverterUByte : FfiConverter { /** * @suppress */ -public object FfiConverterUInt : FfiConverter { +public object FfiConverterUInt: FfiConverter { override fun lift(value: Int): UInt { return value.toUInt() } @@ -2901,7 +2518,7 @@ public object FfiConverterUInt : FfiConverter { /** * @suppress */ -public object FfiConverterULong : FfiConverter { +public object FfiConverterULong: FfiConverter { override fun lift(value: Long): ULong { return value.toULong() } @@ -2924,7 +2541,7 @@ public object FfiConverterULong : FfiConverter { /** * @suppress */ -public object FfiConverterLong : FfiConverter { +public object FfiConverterLong: FfiConverter { override fun lift(value: Long): Long { return value } @@ -2947,7 +2564,7 @@ public object FfiConverterLong : FfiConverter { /** * @suppress */ -public object FfiConverterBoolean : FfiConverter { +public object FfiConverterBoolean: FfiConverter { override fun lift(value: Byte): Boolean { return value.toInt() != 0 } @@ -2970,7 +2587,7 @@ public object FfiConverterBoolean : FfiConverter { /** * @suppress */ -public object FfiConverterString : FfiConverter { +public object FfiConverterString: FfiConverter { // Note: we don't inherit from FfiConverterRustBuffer, because we use a // special encoding when lowering/lifting. We can use `RustBuffer.len` to // store our length and avoid writing it out to the buffer. @@ -3027,18 +2644,16 @@ public object FfiConverterString : FfiConverter { /** * @suppress */ -public object FfiConverterByteArray : FfiConverterRustBuffer { +public object FfiConverterByteArray: FfiConverterRustBuffer { override fun read(buf: ByteBuffer): ByteArray { val len = buf.getInt() val byteArr = ByteArray(len) buf.get(byteArr) return byteArr } - override fun allocationSize(value: ByteArray): ULong { return 4UL + value.size.toULong() } - override fun write(value: ByteArray, buf: ByteBuffer) { buf.putInt(value.size) buf.put(value) @@ -3203,21 +2818,20 @@ private class JavaLangRefCleaner : UniffiCleaner { } private class JavaLangRefCleanable( - val cleanable: java.lang.ref.Cleaner.Cleanable, + val cleanable: java.lang.ref.Cleaner.Cleanable ) : UniffiCleaner.Cleanable { override fun clean() = cleanable.clean() } - public interface FfiConsentCallback { - + fun `onConsentUpdate`(`consent`: List) - + fun `onError`(`error`: FfiSubscribeException) - + companion object } -open class FfiConsentCallbackImpl : Disposable, AutoCloseable, FfiConsentCallback { +open class FfiConsentCallbackImpl: Disposable, AutoCloseable, FfiConsentCallback { constructor(pointer: Pointer) { this.pointer = pointer @@ -3268,7 +2882,7 @@ open class FfiConsentCallbackImpl : Disposable, AutoCloseable, FfiConsentCallbac if (c == Long.MAX_VALUE) { throw IllegalStateException("${this.javaClass.simpleName} call counter would overflow") } - } while (!this.callCounter.compareAndSet(c, c + 1L)) + } while (! this.callCounter.compareAndSet(c, c + 1L)) // Now we can safely do the method call without the pointer being freed concurrently. try { return block(this.uniffiClonePointer()) @@ -3298,34 +2912,38 @@ open class FfiConsentCallbackImpl : Disposable, AutoCloseable, FfiConsentCallbac } } - override fun `onConsentUpdate`(`consent`: List) = - callWithPointer { - uniffiRustCall() { _status -> - UniffiLib.INSTANCE.uniffi_xmtpv3_fn_method_fficonsentcallback_on_consent_update( - it, FfiConverterSequenceTypeFfiConsent.lower(`consent`), _status - ) - } - } - + override fun `onConsentUpdate`(`consent`: List) + = + callWithPointer { + uniffiRustCall() { _status -> + UniffiLib.INSTANCE.uniffi_xmtpv3_fn_method_fficonsentcallback_on_consent_update( + it, FfiConverterSequenceTypeFfiConsent.lower(`consent`),_status) +} + } + + - override fun `onError`(`error`: FfiSubscribeException) = - callWithPointer { - uniffiRustCall() { _status -> - UniffiLib.INSTANCE.uniffi_xmtpv3_fn_method_fficonsentcallback_on_error( - it, FfiConverterTypeFfiSubscribeError.lower(`error`), _status - ) - } - } + override fun `onError`(`error`: FfiSubscribeException) + = + callWithPointer { + uniffiRustCall() { _status -> + UniffiLib.INSTANCE.uniffi_xmtpv3_fn_method_fficonsentcallback_on_error( + it, FfiConverterTypeFfiSubscribeError.lower(`error`),_status) +} + } + + + + + companion object - + } - // Magic number for the Rust proxy to call using the same mechanism as every other method, // to free the callback once it's dropped by Rust. internal const val IDX_CALLBACK_FREE = 0 - // Callback return codes internal const val UNIFFI_CALLBACK_SUCCESS = 0 internal const val UNIFFI_CALLBACK_ERROR = 1 @@ -3334,8 +2952,7 @@ internal const val UNIFFI_CALLBACK_UNEXPECTED_ERROR = 2 /** * @suppress */ -public abstract class FfiConverterCallbackInterface : - FfiConverter { +public abstract class FfiConverterCallbackInterface: FfiConverter { internal val handleMap = UniffiHandleMap() internal fun drop(handle: Long) { @@ -3359,13 +2976,8 @@ public abstract class FfiConverterCallbackInterface : // Put the implementation in an object so we don't pollute the top-level namespace internal object uniffiCallbackInterfaceFfiConsentCallback { - internal object `onConsentUpdate` : UniffiCallbackInterfaceFfiConsentCallbackMethod0 { - override fun callback( - `uniffiHandle`: Long, - `consent`: RustBuffer.ByValue, - `uniffiOutReturn`: Pointer, - uniffiCallStatus: UniffiRustCallStatus, - ) { + internal object `onConsentUpdate`: UniffiCallbackInterfaceFfiConsentCallbackMethod0 { + override fun callback(`uniffiHandle`: Long,`consent`: RustBuffer.ByValue,`uniffiOutReturn`: Pointer,uniffiCallStatus: UniffiRustCallStatus,) { val uniffiObj = FfiConverterTypeFfiConsentCallback.handleMap.get(uniffiHandle) val makeCall = { -> uniffiObj.`onConsentUpdate`( @@ -3376,14 +2988,8 @@ internal object uniffiCallbackInterfaceFfiConsentCallback { uniffiTraitInterfaceCall(uniffiCallStatus, makeCall, writeReturn) } } - - internal object `onError` : UniffiCallbackInterfaceFfiConsentCallbackMethod1 { - override fun callback( - `uniffiHandle`: Long, - `error`: RustBuffer.ByValue, - `uniffiOutReturn`: Pointer, - uniffiCallStatus: UniffiRustCallStatus, - ) { + internal object `onError`: UniffiCallbackInterfaceFfiConsentCallbackMethod1 { + override fun callback(`uniffiHandle`: Long,`error`: RustBuffer.ByValue,`uniffiOutReturn`: Pointer,uniffiCallStatus: UniffiRustCallStatus,) { val uniffiObj = FfiConverterTypeFfiConsentCallback.handleMap.get(uniffiHandle) val makeCall = { -> uniffiObj.`onError`( @@ -3395,7 +3001,7 @@ internal object uniffiCallbackInterfaceFfiConsentCallback { } } - internal object uniffiFree : UniffiCallbackInterfaceFree { + internal object uniffiFree: UniffiCallbackInterfaceFree { override fun callback(handle: Long) { FfiConverterTypeFfiConsentCallback.handleMap.remove(handle) } @@ -3417,7 +3023,7 @@ internal object uniffiCallbackInterfaceFfiConsentCallback { /** * @suppress */ -public object FfiConverterTypeFfiConsentCallback : FfiConverter { +public object FfiConverterTypeFfiConsentCallback: FfiConverter { internal val handleMap = UniffiHandleMap() override fun lower(value: FfiConsentCallback): Pointer { @@ -3543,99 +3149,97 @@ public object FfiConverterTypeFfiConsentCallback : FfiConverter) - + suspend fun `addMembersByInboxId`(`inboxIds`: List) - + suspend fun `addSuperAdmin`(`inboxId`: kotlin.String) - + fun `addedByInboxId`(): kotlin.String - + fun `adminList`(): List - + fun `consentState`(): FfiConsentState - + suspend fun `conversationType`(): FfiConversationType - + fun `createdAtNs`(): kotlin.Long - + fun `dmPeerInboxId`(): kotlin.String - + suspend fun `findMessages`(`opts`: FfiListMessagesOptions): List - + + suspend fun `findMessagesWithReactions`(`opts`: FfiListMessagesOptions): List + fun `groupDescription`(): kotlin.String - + fun `groupImageUrlSquare`(): kotlin.String - + suspend fun `groupMetadata`(): FfiConversationMetadata - + fun `groupName`(): kotlin.String - + fun `groupPermissions`(): FfiGroupPermissions - + fun `groupPinnedFrameUrl`(): kotlin.String - + fun `id`(): kotlin.ByteArray - + fun `isActive`(): kotlin.Boolean - + fun `isAdmin`(`inboxId`: kotlin.String): kotlin.Boolean - + fun `isSuperAdmin`(`inboxId`: kotlin.String): kotlin.Boolean - + suspend fun `listMembers`(): List - + suspend fun `processStreamedConversationMessage`(`envelopeBytes`: kotlin.ByteArray): FfiMessage - + /** * Publish all unpublished messages */ suspend fun `publishMessages`() - + suspend fun `removeAdmin`(`inboxId`: kotlin.String) - + suspend fun `removeMembers`(`accountAddresses`: List) - + suspend fun `removeMembersByInboxId`(`inboxIds`: List) - + suspend fun `removeSuperAdmin`(`inboxId`: kotlin.String) - + suspend fun `send`(`contentBytes`: kotlin.ByteArray): kotlin.ByteArray - + /** * send a message without immediately publishing to the delivery service. */ fun `sendOptimistic`(`contentBytes`: kotlin.ByteArray): kotlin.ByteArray - + suspend fun `stream`(`messageCallback`: FfiMessageCallback): FfiStreamCloser - + fun `superAdminList`(): List - + suspend fun `sync`() - + fun `updateConsentState`(`state`: FfiConsentState) - + suspend fun `updateGroupDescription`(`groupDescription`: kotlin.String) - + suspend fun `updateGroupImageUrlSquare`(`groupImageUrlSquare`: kotlin.String) - + suspend fun `updateGroupName`(`groupName`: kotlin.String) - + suspend fun `updateGroupPinnedFrameUrl`(`pinnedFrameUrl`: kotlin.String) - - suspend fun `updatePermissionPolicy`( - `permissionUpdateType`: FfiPermissionUpdateType, - `permissionPolicyOption`: FfiPermissionPolicy, - `metadataField`: FfiMetadataField?, - ) - + + suspend fun `updatePermissionPolicy`(`permissionUpdateType`: FfiPermissionUpdateType, `permissionPolicyOption`: FfiPermissionPolicy, `metadataField`: FfiMetadataField?) + companion object } -open class FfiConversation : Disposable, AutoCloseable, FfiConversationInterface { +open class FfiConversation: Disposable, AutoCloseable, FfiConversationInterface { constructor(pointer: Pointer) { this.pointer = pointer @@ -3686,7 +3290,7 @@ open class FfiConversation : Disposable, AutoCloseable, FfiConversationInterface if (c == Long.MAX_VALUE) { throw IllegalStateException("${this.javaClass.simpleName} call counter would overflow") } - } while (!this.callCounter.compareAndSet(c, c + 1L)) + } while (! this.callCounter.compareAndSet(c, c + 1L)) // Now we can safely do the method call without the pointer being freed concurrently. try { return block(this.uniffiClonePointer()) @@ -3716,492 +3320,401 @@ open class FfiConversation : Disposable, AutoCloseable, FfiConversationInterface } } - + @Throws(GenericException::class) @Suppress("ASSIGNED_BUT_NEVER_ACCESSED_VARIABLE") override suspend fun `addAdmin`(`inboxId`: kotlin.String) { return uniffiRustCallAsync( - callWithPointer { thisPtr -> - UniffiLib.INSTANCE.uniffi_xmtpv3_fn_method_fficonversation_add_admin( - thisPtr, - FfiConverterString.lower(`inboxId`), - ) - }, - { future, callback, continuation -> - UniffiLib.INSTANCE.ffi_xmtpv3_rust_future_poll_void( - future, - callback, - continuation - ) - }, - { future, continuation -> - UniffiLib.INSTANCE.ffi_xmtpv3_rust_future_complete_void( - future, - continuation - ) - }, - { future -> UniffiLib.INSTANCE.ffi_xmtpv3_rust_future_free_void(future) }, - // lift function - { Unit }, - - // Error FFI converter - GenericException.ErrorHandler, - ) + callWithPointer { thisPtr -> + UniffiLib.INSTANCE.uniffi_xmtpv3_fn_method_fficonversation_add_admin( + thisPtr, + FfiConverterString.lower(`inboxId`), + ) + }, + { future, callback, continuation -> UniffiLib.INSTANCE.ffi_xmtpv3_rust_future_poll_void(future, callback, continuation) }, + { future, continuation -> UniffiLib.INSTANCE.ffi_xmtpv3_rust_future_complete_void(future, continuation) }, + { future -> UniffiLib.INSTANCE.ffi_xmtpv3_rust_future_free_void(future) }, + // lift function + { Unit }, + + // Error FFI converter + GenericException.ErrorHandler, + ) } - + @Throws(GenericException::class) @Suppress("ASSIGNED_BUT_NEVER_ACCESSED_VARIABLE") override suspend fun `addMembers`(`accountAddresses`: List) { return uniffiRustCallAsync( - callWithPointer { thisPtr -> - UniffiLib.INSTANCE.uniffi_xmtpv3_fn_method_fficonversation_add_members( - thisPtr, - FfiConverterSequenceString.lower(`accountAddresses`), - ) - }, - { future, callback, continuation -> - UniffiLib.INSTANCE.ffi_xmtpv3_rust_future_poll_void( - future, - callback, - continuation - ) - }, - { future, continuation -> - UniffiLib.INSTANCE.ffi_xmtpv3_rust_future_complete_void( - future, - continuation - ) - }, - { future -> UniffiLib.INSTANCE.ffi_xmtpv3_rust_future_free_void(future) }, - // lift function - { Unit }, - - // Error FFI converter - GenericException.ErrorHandler, - ) + callWithPointer { thisPtr -> + UniffiLib.INSTANCE.uniffi_xmtpv3_fn_method_fficonversation_add_members( + thisPtr, + FfiConverterSequenceString.lower(`accountAddresses`), + ) + }, + { future, callback, continuation -> UniffiLib.INSTANCE.ffi_xmtpv3_rust_future_poll_void(future, callback, continuation) }, + { future, continuation -> UniffiLib.INSTANCE.ffi_xmtpv3_rust_future_complete_void(future, continuation) }, + { future -> UniffiLib.INSTANCE.ffi_xmtpv3_rust_future_free_void(future) }, + // lift function + { Unit }, + + // Error FFI converter + GenericException.ErrorHandler, + ) } - + @Throws(GenericException::class) @Suppress("ASSIGNED_BUT_NEVER_ACCESSED_VARIABLE") override suspend fun `addMembersByInboxId`(`inboxIds`: List) { return uniffiRustCallAsync( - callWithPointer { thisPtr -> - UniffiLib.INSTANCE.uniffi_xmtpv3_fn_method_fficonversation_add_members_by_inbox_id( - thisPtr, - FfiConverterSequenceString.lower(`inboxIds`), - ) - }, - { future, callback, continuation -> - UniffiLib.INSTANCE.ffi_xmtpv3_rust_future_poll_void( - future, - callback, - continuation - ) - }, - { future, continuation -> - UniffiLib.INSTANCE.ffi_xmtpv3_rust_future_complete_void( - future, - continuation - ) - }, - { future -> UniffiLib.INSTANCE.ffi_xmtpv3_rust_future_free_void(future) }, - // lift function - { Unit }, - - // Error FFI converter - GenericException.ErrorHandler, - ) + callWithPointer { thisPtr -> + UniffiLib.INSTANCE.uniffi_xmtpv3_fn_method_fficonversation_add_members_by_inbox_id( + thisPtr, + FfiConverterSequenceString.lower(`inboxIds`), + ) + }, + { future, callback, continuation -> UniffiLib.INSTANCE.ffi_xmtpv3_rust_future_poll_void(future, callback, continuation) }, + { future, continuation -> UniffiLib.INSTANCE.ffi_xmtpv3_rust_future_complete_void(future, continuation) }, + { future -> UniffiLib.INSTANCE.ffi_xmtpv3_rust_future_free_void(future) }, + // lift function + { Unit }, + + // Error FFI converter + GenericException.ErrorHandler, + ) } - + @Throws(GenericException::class) @Suppress("ASSIGNED_BUT_NEVER_ACCESSED_VARIABLE") override suspend fun `addSuperAdmin`(`inboxId`: kotlin.String) { return uniffiRustCallAsync( - callWithPointer { thisPtr -> - UniffiLib.INSTANCE.uniffi_xmtpv3_fn_method_fficonversation_add_super_admin( - thisPtr, - FfiConverterString.lower(`inboxId`), - ) - }, - { future, callback, continuation -> - UniffiLib.INSTANCE.ffi_xmtpv3_rust_future_poll_void( - future, - callback, - continuation - ) - }, - { future, continuation -> - UniffiLib.INSTANCE.ffi_xmtpv3_rust_future_complete_void( - future, - continuation - ) - }, - { future -> UniffiLib.INSTANCE.ffi_xmtpv3_rust_future_free_void(future) }, - // lift function - { Unit }, - - // Error FFI converter - GenericException.ErrorHandler, - ) - } - - - @Throws(GenericException::class) - override fun `addedByInboxId`(): kotlin.String { - return FfiConverterString.lift( - callWithPointer { - uniffiRustCallWithError(GenericException) { _status -> - UniffiLib.INSTANCE.uniffi_xmtpv3_fn_method_fficonversation_added_by_inbox_id( - it, _status - ) - } - } - ) + callWithPointer { thisPtr -> + UniffiLib.INSTANCE.uniffi_xmtpv3_fn_method_fficonversation_add_super_admin( + thisPtr, + FfiConverterString.lower(`inboxId`), + ) + }, + { future, callback, continuation -> UniffiLib.INSTANCE.ffi_xmtpv3_rust_future_poll_void(future, callback, continuation) }, + { future, continuation -> UniffiLib.INSTANCE.ffi_xmtpv3_rust_future_complete_void(future, continuation) }, + { future -> UniffiLib.INSTANCE.ffi_xmtpv3_rust_future_free_void(future) }, + // lift function + { Unit }, + + // Error FFI converter + GenericException.ErrorHandler, + ) } - - @Throws(GenericException::class) - override fun `adminList`(): List { - return FfiConverterSequenceString.lift( - callWithPointer { - uniffiRustCallWithError(GenericException) { _status -> - UniffiLib.INSTANCE.uniffi_xmtpv3_fn_method_fficonversation_admin_list( - it, _status - ) - } - } - ) + + @Throws(GenericException::class)override fun `addedByInboxId`(): kotlin.String { + return FfiConverterString.lift( + callWithPointer { + uniffiRustCallWithError(GenericException) { _status -> + UniffiLib.INSTANCE.uniffi_xmtpv3_fn_method_fficonversation_added_by_inbox_id( + it, _status) +} } + ) + } + - - @Throws(GenericException::class) - override fun `consentState`(): FfiConsentState { - return FfiConverterTypeFfiConsentState.lift( - callWithPointer { - uniffiRustCallWithError(GenericException) { _status -> - UniffiLib.INSTANCE.uniffi_xmtpv3_fn_method_fficonversation_consent_state( - it, _status - ) - } - } - ) + + @Throws(GenericException::class)override fun `adminList`(): List { + return FfiConverterSequenceString.lift( + callWithPointer { + uniffiRustCallWithError(GenericException) { _status -> + UniffiLib.INSTANCE.uniffi_xmtpv3_fn_method_fficonversation_admin_list( + it, _status) +} } + ) + } + + + @Throws(GenericException::class)override fun `consentState`(): FfiConsentState { + return FfiConverterTypeFfiConsentState.lift( + callWithPointer { + uniffiRustCallWithError(GenericException) { _status -> + UniffiLib.INSTANCE.uniffi_xmtpv3_fn_method_fficonversation_consent_state( + it, _status) +} + } + ) + } + + @Throws(GenericException::class) @Suppress("ASSIGNED_BUT_NEVER_ACCESSED_VARIABLE") - override suspend fun `conversationType`(): FfiConversationType { + override suspend fun `conversationType`() : FfiConversationType { return uniffiRustCallAsync( - callWithPointer { thisPtr -> - UniffiLib.INSTANCE.uniffi_xmtpv3_fn_method_fficonversation_conversation_type( - thisPtr, - - ) - }, - { future, callback, continuation -> - UniffiLib.INSTANCE.ffi_xmtpv3_rust_future_poll_rust_buffer( - future, - callback, - continuation - ) - }, - { future, continuation -> - UniffiLib.INSTANCE.ffi_xmtpv3_rust_future_complete_rust_buffer( - future, - continuation - ) - }, - { future -> UniffiLib.INSTANCE.ffi_xmtpv3_rust_future_free_rust_buffer(future) }, - // lift function - { FfiConverterTypeFfiConversationType.lift(it) }, - // Error FFI converter - GenericException.ErrorHandler, - ) + callWithPointer { thisPtr -> + UniffiLib.INSTANCE.uniffi_xmtpv3_fn_method_fficonversation_conversation_type( + thisPtr, + + ) + }, + { future, callback, continuation -> UniffiLib.INSTANCE.ffi_xmtpv3_rust_future_poll_rust_buffer(future, callback, continuation) }, + { future, continuation -> UniffiLib.INSTANCE.ffi_xmtpv3_rust_future_complete_rust_buffer(future, continuation) }, + { future -> UniffiLib.INSTANCE.ffi_xmtpv3_rust_future_free_rust_buffer(future) }, + // lift function + { FfiConverterTypeFfiConversationType.lift(it) }, + // Error FFI converter + GenericException.ErrorHandler, + ) } override fun `createdAtNs`(): kotlin.Long { - return FfiConverterLong.lift( - callWithPointer { - uniffiRustCall() { _status -> - UniffiLib.INSTANCE.uniffi_xmtpv3_fn_method_fficonversation_created_at_ns( - it, _status - ) - } - } - ) + return FfiConverterLong.lift( + callWithPointer { + uniffiRustCall() { _status -> + UniffiLib.INSTANCE.uniffi_xmtpv3_fn_method_fficonversation_created_at_ns( + it, _status) +} } - - - @Throws(GenericException::class) - override fun `dmPeerInboxId`(): kotlin.String { - return FfiConverterString.lift( - callWithPointer { - uniffiRustCallWithError(GenericException) { _status -> - UniffiLib.INSTANCE.uniffi_xmtpv3_fn_method_fficonversation_dm_peer_inbox_id( - it, _status - ) - } - } - ) + ) } + + + @Throws(GenericException::class)override fun `dmPeerInboxId`(): kotlin.String { + return FfiConverterString.lift( + callWithPointer { + uniffiRustCallWithError(GenericException) { _status -> + UniffiLib.INSTANCE.uniffi_xmtpv3_fn_method_fficonversation_dm_peer_inbox_id( + it, _status) +} + } + ) + } + + @Throws(GenericException::class) @Suppress("ASSIGNED_BUT_NEVER_ACCESSED_VARIABLE") - override suspend fun `findMessages`(`opts`: FfiListMessagesOptions): List { + override suspend fun `findMessages`(`opts`: FfiListMessagesOptions) : List { return uniffiRustCallAsync( - callWithPointer { thisPtr -> - UniffiLib.INSTANCE.uniffi_xmtpv3_fn_method_fficonversation_find_messages( - thisPtr, - FfiConverterTypeFfiListMessagesOptions.lower(`opts`), - ) - }, - { future, callback, continuation -> - UniffiLib.INSTANCE.ffi_xmtpv3_rust_future_poll_rust_buffer( - future, - callback, - continuation - ) - }, - { future, continuation -> - UniffiLib.INSTANCE.ffi_xmtpv3_rust_future_complete_rust_buffer( - future, - continuation - ) - }, - { future -> UniffiLib.INSTANCE.ffi_xmtpv3_rust_future_free_rust_buffer(future) }, - // lift function - { FfiConverterSequenceTypeFfiMessage.lift(it) }, - // Error FFI converter - GenericException.ErrorHandler, - ) + callWithPointer { thisPtr -> + UniffiLib.INSTANCE.uniffi_xmtpv3_fn_method_fficonversation_find_messages( + thisPtr, + FfiConverterTypeFfiListMessagesOptions.lower(`opts`), + ) + }, + { future, callback, continuation -> UniffiLib.INSTANCE.ffi_xmtpv3_rust_future_poll_rust_buffer(future, callback, continuation) }, + { future, continuation -> UniffiLib.INSTANCE.ffi_xmtpv3_rust_future_complete_rust_buffer(future, continuation) }, + { future -> UniffiLib.INSTANCE.ffi_xmtpv3_rust_future_free_rust_buffer(future) }, + // lift function + { FfiConverterSequenceTypeFfiMessage.lift(it) }, + // Error FFI converter + GenericException.ErrorHandler, + ) } - + @Throws(GenericException::class) - override fun `groupDescription`(): kotlin.String { - return FfiConverterString.lift( - callWithPointer { - uniffiRustCallWithError(GenericException) { _status -> - UniffiLib.INSTANCE.uniffi_xmtpv3_fn_method_fficonversation_group_description( - it, _status - ) - } - } - ) + @Suppress("ASSIGNED_BUT_NEVER_ACCESSED_VARIABLE") + override suspend fun `findMessagesWithReactions`(`opts`: FfiListMessagesOptions) : List { + return uniffiRustCallAsync( + callWithPointer { thisPtr -> + UniffiLib.INSTANCE.uniffi_xmtpv3_fn_method_fficonversation_find_messages_with_reactions( + thisPtr, + FfiConverterTypeFfiListMessagesOptions.lower(`opts`), + ) + }, + { future, callback, continuation -> UniffiLib.INSTANCE.ffi_xmtpv3_rust_future_poll_rust_buffer(future, callback, continuation) }, + { future, continuation -> UniffiLib.INSTANCE.ffi_xmtpv3_rust_future_complete_rust_buffer(future, continuation) }, + { future -> UniffiLib.INSTANCE.ffi_xmtpv3_rust_future_free_rust_buffer(future) }, + // lift function + { FfiConverterSequenceTypeFfiMessageWithReactions.lift(it) }, + // Error FFI converter + GenericException.ErrorHandler, + ) } - - @Throws(GenericException::class) - override fun `groupImageUrlSquare`(): kotlin.String { - return FfiConverterString.lift( - callWithPointer { - uniffiRustCallWithError(GenericException) { _status -> - UniffiLib.INSTANCE.uniffi_xmtpv3_fn_method_fficonversation_group_image_url_square( - it, _status - ) - } - } - ) + + @Throws(GenericException::class)override fun `groupDescription`(): kotlin.String { + return FfiConverterString.lift( + callWithPointer { + uniffiRustCallWithError(GenericException) { _status -> + UniffiLib.INSTANCE.uniffi_xmtpv3_fn_method_fficonversation_group_description( + it, _status) +} + } + ) } + + + @Throws(GenericException::class)override fun `groupImageUrlSquare`(): kotlin.String { + return FfiConverterString.lift( + callWithPointer { + uniffiRustCallWithError(GenericException) { _status -> + UniffiLib.INSTANCE.uniffi_xmtpv3_fn_method_fficonversation_group_image_url_square( + it, _status) +} + } + ) + } + + @Throws(GenericException::class) @Suppress("ASSIGNED_BUT_NEVER_ACCESSED_VARIABLE") - override suspend fun `groupMetadata`(): FfiConversationMetadata { + override suspend fun `groupMetadata`() : FfiConversationMetadata { return uniffiRustCallAsync( - callWithPointer { thisPtr -> - UniffiLib.INSTANCE.uniffi_xmtpv3_fn_method_fficonversation_group_metadata( - thisPtr, - - ) - }, - { future, callback, continuation -> - UniffiLib.INSTANCE.ffi_xmtpv3_rust_future_poll_pointer( - future, - callback, - continuation - ) - }, - { future, continuation -> - UniffiLib.INSTANCE.ffi_xmtpv3_rust_future_complete_pointer( - future, - continuation - ) - }, - { future -> UniffiLib.INSTANCE.ffi_xmtpv3_rust_future_free_pointer(future) }, - // lift function - { FfiConverterTypeFfiConversationMetadata.lift(it) }, - // Error FFI converter - GenericException.ErrorHandler, - ) + callWithPointer { thisPtr -> + UniffiLib.INSTANCE.uniffi_xmtpv3_fn_method_fficonversation_group_metadata( + thisPtr, + + ) + }, + { future, callback, continuation -> UniffiLib.INSTANCE.ffi_xmtpv3_rust_future_poll_pointer(future, callback, continuation) }, + { future, continuation -> UniffiLib.INSTANCE.ffi_xmtpv3_rust_future_complete_pointer(future, continuation) }, + { future -> UniffiLib.INSTANCE.ffi_xmtpv3_rust_future_free_pointer(future) }, + // lift function + { FfiConverterTypeFfiConversationMetadata.lift(it) }, + // Error FFI converter + GenericException.ErrorHandler, + ) } - - @Throws(GenericException::class) - override fun `groupName`(): kotlin.String { - return FfiConverterString.lift( - callWithPointer { - uniffiRustCallWithError(GenericException) { _status -> - UniffiLib.INSTANCE.uniffi_xmtpv3_fn_method_fficonversation_group_name( - it, _status - ) - } - } - ) + + @Throws(GenericException::class)override fun `groupName`(): kotlin.String { + return FfiConverterString.lift( + callWithPointer { + uniffiRustCallWithError(GenericException) { _status -> + UniffiLib.INSTANCE.uniffi_xmtpv3_fn_method_fficonversation_group_name( + it, _status) +} } - - - @Throws(GenericException::class) - override fun `groupPermissions`(): FfiGroupPermissions { - return FfiConverterTypeFfiGroupPermissions.lift( - callWithPointer { - uniffiRustCallWithError(GenericException) { _status -> - UniffiLib.INSTANCE.uniffi_xmtpv3_fn_method_fficonversation_group_permissions( - it, _status - ) - } - } - ) + ) } + - - @Throws(GenericException::class) - override fun `groupPinnedFrameUrl`(): kotlin.String { - return FfiConverterString.lift( - callWithPointer { - uniffiRustCallWithError(GenericException) { _status -> - UniffiLib.INSTANCE.uniffi_xmtpv3_fn_method_fficonversation_group_pinned_frame_url( - it, _status - ) - } - } - ) + + @Throws(GenericException::class)override fun `groupPermissions`(): FfiGroupPermissions { + return FfiConverterTypeFfiGroupPermissions.lift( + callWithPointer { + uniffiRustCallWithError(GenericException) { _status -> + UniffiLib.INSTANCE.uniffi_xmtpv3_fn_method_fficonversation_group_permissions( + it, _status) +} + } + ) } + + + @Throws(GenericException::class)override fun `groupPinnedFrameUrl`(): kotlin.String { + return FfiConverterString.lift( + callWithPointer { + uniffiRustCallWithError(GenericException) { _status -> + UniffiLib.INSTANCE.uniffi_xmtpv3_fn_method_fficonversation_group_pinned_frame_url( + it, _status) +} + } + ) + } + override fun `id`(): kotlin.ByteArray { - return FfiConverterByteArray.lift( - callWithPointer { - uniffiRustCall() { _status -> - UniffiLib.INSTANCE.uniffi_xmtpv3_fn_method_fficonversation_id( - it, _status - ) - } - } - ) + return FfiConverterByteArray.lift( + callWithPointer { + uniffiRustCall() { _status -> + UniffiLib.INSTANCE.uniffi_xmtpv3_fn_method_fficonversation_id( + it, _status) +} } - - - @Throws(GenericException::class) - override fun `isActive`(): kotlin.Boolean { - return FfiConverterBoolean.lift( - callWithPointer { - uniffiRustCallWithError(GenericException) { _status -> - UniffiLib.INSTANCE.uniffi_xmtpv3_fn_method_fficonversation_is_active( - it, _status - ) - } - } - ) + ) } + - - @Throws(GenericException::class) - override fun `isAdmin`(`inboxId`: kotlin.String): kotlin.Boolean { - return FfiConverterBoolean.lift( - callWithPointer { - uniffiRustCallWithError(GenericException) { _status -> - UniffiLib.INSTANCE.uniffi_xmtpv3_fn_method_fficonversation_is_admin( - it, FfiConverterString.lower(`inboxId`), _status - ) - } - } - ) + + @Throws(GenericException::class)override fun `isActive`(): kotlin.Boolean { + return FfiConverterBoolean.lift( + callWithPointer { + uniffiRustCallWithError(GenericException) { _status -> + UniffiLib.INSTANCE.uniffi_xmtpv3_fn_method_fficonversation_is_active( + it, _status) +} } + ) + } + - - @Throws(GenericException::class) - override fun `isSuperAdmin`(`inboxId`: kotlin.String): kotlin.Boolean { - return FfiConverterBoolean.lift( - callWithPointer { - uniffiRustCallWithError(GenericException) { _status -> - UniffiLib.INSTANCE.uniffi_xmtpv3_fn_method_fficonversation_is_super_admin( - it, FfiConverterString.lower(`inboxId`), _status - ) - } - } - ) + + @Throws(GenericException::class)override fun `isAdmin`(`inboxId`: kotlin.String): kotlin.Boolean { + return FfiConverterBoolean.lift( + callWithPointer { + uniffiRustCallWithError(GenericException) { _status -> + UniffiLib.INSTANCE.uniffi_xmtpv3_fn_method_fficonversation_is_admin( + it, FfiConverterString.lower(`inboxId`),_status) +} + } + ) } + + + @Throws(GenericException::class)override fun `isSuperAdmin`(`inboxId`: kotlin.String): kotlin.Boolean { + return FfiConverterBoolean.lift( + callWithPointer { + uniffiRustCallWithError(GenericException) { _status -> + UniffiLib.INSTANCE.uniffi_xmtpv3_fn_method_fficonversation_is_super_admin( + it, FfiConverterString.lower(`inboxId`),_status) +} + } + ) + } + + @Throws(GenericException::class) @Suppress("ASSIGNED_BUT_NEVER_ACCESSED_VARIABLE") - override suspend fun `listMembers`(): List { + override suspend fun `listMembers`() : List { return uniffiRustCallAsync( - callWithPointer { thisPtr -> - UniffiLib.INSTANCE.uniffi_xmtpv3_fn_method_fficonversation_list_members( - thisPtr, - - ) - }, - { future, callback, continuation -> - UniffiLib.INSTANCE.ffi_xmtpv3_rust_future_poll_rust_buffer( - future, - callback, - continuation - ) - }, - { future, continuation -> - UniffiLib.INSTANCE.ffi_xmtpv3_rust_future_complete_rust_buffer( - future, - continuation - ) - }, - { future -> UniffiLib.INSTANCE.ffi_xmtpv3_rust_future_free_rust_buffer(future) }, - // lift function - { FfiConverterSequenceTypeFfiConversationMember.lift(it) }, - // Error FFI converter - GenericException.ErrorHandler, - ) + callWithPointer { thisPtr -> + UniffiLib.INSTANCE.uniffi_xmtpv3_fn_method_fficonversation_list_members( + thisPtr, + + ) + }, + { future, callback, continuation -> UniffiLib.INSTANCE.ffi_xmtpv3_rust_future_poll_rust_buffer(future, callback, continuation) }, + { future, continuation -> UniffiLib.INSTANCE.ffi_xmtpv3_rust_future_complete_rust_buffer(future, continuation) }, + { future -> UniffiLib.INSTANCE.ffi_xmtpv3_rust_future_free_rust_buffer(future) }, + // lift function + { FfiConverterSequenceTypeFfiConversationMember.lift(it) }, + // Error FFI converter + GenericException.ErrorHandler, + ) } - + @Throws(FfiSubscribeException::class) @Suppress("ASSIGNED_BUT_NEVER_ACCESSED_VARIABLE") - override suspend fun `processStreamedConversationMessage`(`envelopeBytes`: kotlin.ByteArray): FfiMessage { + override suspend fun `processStreamedConversationMessage`(`envelopeBytes`: kotlin.ByteArray) : FfiMessage { return uniffiRustCallAsync( - callWithPointer { thisPtr -> - UniffiLib.INSTANCE.uniffi_xmtpv3_fn_method_fficonversation_process_streamed_conversation_message( - thisPtr, - FfiConverterByteArray.lower(`envelopeBytes`), - ) - }, - { future, callback, continuation -> - UniffiLib.INSTANCE.ffi_xmtpv3_rust_future_poll_rust_buffer( - future, - callback, - continuation - ) - }, - { future, continuation -> - UniffiLib.INSTANCE.ffi_xmtpv3_rust_future_complete_rust_buffer( - future, - continuation - ) - }, - { future -> UniffiLib.INSTANCE.ffi_xmtpv3_rust_future_free_rust_buffer(future) }, - // lift function - { FfiConverterTypeFfiMessage.lift(it) }, - // Error FFI converter - FfiSubscribeException.ErrorHandler, - ) + callWithPointer { thisPtr -> + UniffiLib.INSTANCE.uniffi_xmtpv3_fn_method_fficonversation_process_streamed_conversation_message( + thisPtr, + FfiConverterByteArray.lower(`envelopeBytes`), + ) + }, + { future, callback, continuation -> UniffiLib.INSTANCE.ffi_xmtpv3_rust_future_poll_rust_buffer(future, callback, continuation) }, + { future, continuation -> UniffiLib.INSTANCE.ffi_xmtpv3_rust_future_complete_rust_buffer(future, continuation) }, + { future -> UniffiLib.INSTANCE.ffi_xmtpv3_rust_future_free_rust_buffer(future) }, + // lift function + { FfiConverterTypeFfiMessage.lift(it) }, + // Error FFI converter + FfiSubscribeException.ErrorHandler, + ) } - + /** * Publish all unpublished messages */ @@ -4209,484 +3722,337 @@ open class FfiConversation : Disposable, AutoCloseable, FfiConversationInterface @Suppress("ASSIGNED_BUT_NEVER_ACCESSED_VARIABLE") override suspend fun `publishMessages`() { return uniffiRustCallAsync( - callWithPointer { thisPtr -> - UniffiLib.INSTANCE.uniffi_xmtpv3_fn_method_fficonversation_publish_messages( - thisPtr, - - ) - }, - { future, callback, continuation -> - UniffiLib.INSTANCE.ffi_xmtpv3_rust_future_poll_void( - future, - callback, - continuation - ) - }, - { future, continuation -> - UniffiLib.INSTANCE.ffi_xmtpv3_rust_future_complete_void( - future, - continuation - ) - }, - { future -> UniffiLib.INSTANCE.ffi_xmtpv3_rust_future_free_void(future) }, - // lift function - { Unit }, - - // Error FFI converter - GenericException.ErrorHandler, - ) + callWithPointer { thisPtr -> + UniffiLib.INSTANCE.uniffi_xmtpv3_fn_method_fficonversation_publish_messages( + thisPtr, + + ) + }, + { future, callback, continuation -> UniffiLib.INSTANCE.ffi_xmtpv3_rust_future_poll_void(future, callback, continuation) }, + { future, continuation -> UniffiLib.INSTANCE.ffi_xmtpv3_rust_future_complete_void(future, continuation) }, + { future -> UniffiLib.INSTANCE.ffi_xmtpv3_rust_future_free_void(future) }, + // lift function + { Unit }, + + // Error FFI converter + GenericException.ErrorHandler, + ) } - + @Throws(GenericException::class) @Suppress("ASSIGNED_BUT_NEVER_ACCESSED_VARIABLE") override suspend fun `removeAdmin`(`inboxId`: kotlin.String) { return uniffiRustCallAsync( - callWithPointer { thisPtr -> - UniffiLib.INSTANCE.uniffi_xmtpv3_fn_method_fficonversation_remove_admin( - thisPtr, - FfiConverterString.lower(`inboxId`), - ) - }, - { future, callback, continuation -> - UniffiLib.INSTANCE.ffi_xmtpv3_rust_future_poll_void( - future, - callback, - continuation - ) - }, - { future, continuation -> - UniffiLib.INSTANCE.ffi_xmtpv3_rust_future_complete_void( - future, - continuation - ) - }, - { future -> UniffiLib.INSTANCE.ffi_xmtpv3_rust_future_free_void(future) }, - // lift function - { Unit }, - - // Error FFI converter - GenericException.ErrorHandler, - ) + callWithPointer { thisPtr -> + UniffiLib.INSTANCE.uniffi_xmtpv3_fn_method_fficonversation_remove_admin( + thisPtr, + FfiConverterString.lower(`inboxId`), + ) + }, + { future, callback, continuation -> UniffiLib.INSTANCE.ffi_xmtpv3_rust_future_poll_void(future, callback, continuation) }, + { future, continuation -> UniffiLib.INSTANCE.ffi_xmtpv3_rust_future_complete_void(future, continuation) }, + { future -> UniffiLib.INSTANCE.ffi_xmtpv3_rust_future_free_void(future) }, + // lift function + { Unit }, + + // Error FFI converter + GenericException.ErrorHandler, + ) } - + @Throws(GenericException::class) @Suppress("ASSIGNED_BUT_NEVER_ACCESSED_VARIABLE") override suspend fun `removeMembers`(`accountAddresses`: List) { return uniffiRustCallAsync( - callWithPointer { thisPtr -> - UniffiLib.INSTANCE.uniffi_xmtpv3_fn_method_fficonversation_remove_members( - thisPtr, - FfiConverterSequenceString.lower(`accountAddresses`), - ) - }, - { future, callback, continuation -> - UniffiLib.INSTANCE.ffi_xmtpv3_rust_future_poll_void( - future, - callback, - continuation - ) - }, - { future, continuation -> - UniffiLib.INSTANCE.ffi_xmtpv3_rust_future_complete_void( - future, - continuation - ) - }, - { future -> UniffiLib.INSTANCE.ffi_xmtpv3_rust_future_free_void(future) }, - // lift function - { Unit }, - - // Error FFI converter - GenericException.ErrorHandler, - ) + callWithPointer { thisPtr -> + UniffiLib.INSTANCE.uniffi_xmtpv3_fn_method_fficonversation_remove_members( + thisPtr, + FfiConverterSequenceString.lower(`accountAddresses`), + ) + }, + { future, callback, continuation -> UniffiLib.INSTANCE.ffi_xmtpv3_rust_future_poll_void(future, callback, continuation) }, + { future, continuation -> UniffiLib.INSTANCE.ffi_xmtpv3_rust_future_complete_void(future, continuation) }, + { future -> UniffiLib.INSTANCE.ffi_xmtpv3_rust_future_free_void(future) }, + // lift function + { Unit }, + + // Error FFI converter + GenericException.ErrorHandler, + ) } - + @Throws(GenericException::class) @Suppress("ASSIGNED_BUT_NEVER_ACCESSED_VARIABLE") override suspend fun `removeMembersByInboxId`(`inboxIds`: List) { return uniffiRustCallAsync( - callWithPointer { thisPtr -> - UniffiLib.INSTANCE.uniffi_xmtpv3_fn_method_fficonversation_remove_members_by_inbox_id( - thisPtr, - FfiConverterSequenceString.lower(`inboxIds`), - ) - }, - { future, callback, continuation -> - UniffiLib.INSTANCE.ffi_xmtpv3_rust_future_poll_void( - future, - callback, - continuation - ) - }, - { future, continuation -> - UniffiLib.INSTANCE.ffi_xmtpv3_rust_future_complete_void( - future, - continuation - ) - }, - { future -> UniffiLib.INSTANCE.ffi_xmtpv3_rust_future_free_void(future) }, - // lift function - { Unit }, - - // Error FFI converter - GenericException.ErrorHandler, - ) + callWithPointer { thisPtr -> + UniffiLib.INSTANCE.uniffi_xmtpv3_fn_method_fficonversation_remove_members_by_inbox_id( + thisPtr, + FfiConverterSequenceString.lower(`inboxIds`), + ) + }, + { future, callback, continuation -> UniffiLib.INSTANCE.ffi_xmtpv3_rust_future_poll_void(future, callback, continuation) }, + { future, continuation -> UniffiLib.INSTANCE.ffi_xmtpv3_rust_future_complete_void(future, continuation) }, + { future -> UniffiLib.INSTANCE.ffi_xmtpv3_rust_future_free_void(future) }, + // lift function + { Unit }, + + // Error FFI converter + GenericException.ErrorHandler, + ) } - + @Throws(GenericException::class) @Suppress("ASSIGNED_BUT_NEVER_ACCESSED_VARIABLE") override suspend fun `removeSuperAdmin`(`inboxId`: kotlin.String) { return uniffiRustCallAsync( - callWithPointer { thisPtr -> - UniffiLib.INSTANCE.uniffi_xmtpv3_fn_method_fficonversation_remove_super_admin( - thisPtr, - FfiConverterString.lower(`inboxId`), - ) - }, - { future, callback, continuation -> - UniffiLib.INSTANCE.ffi_xmtpv3_rust_future_poll_void( - future, - callback, - continuation - ) - }, - { future, continuation -> - UniffiLib.INSTANCE.ffi_xmtpv3_rust_future_complete_void( - future, - continuation - ) - }, - { future -> UniffiLib.INSTANCE.ffi_xmtpv3_rust_future_free_void(future) }, - // lift function - { Unit }, - - // Error FFI converter - GenericException.ErrorHandler, - ) + callWithPointer { thisPtr -> + UniffiLib.INSTANCE.uniffi_xmtpv3_fn_method_fficonversation_remove_super_admin( + thisPtr, + FfiConverterString.lower(`inboxId`), + ) + }, + { future, callback, continuation -> UniffiLib.INSTANCE.ffi_xmtpv3_rust_future_poll_void(future, callback, continuation) }, + { future, continuation -> UniffiLib.INSTANCE.ffi_xmtpv3_rust_future_complete_void(future, continuation) }, + { future -> UniffiLib.INSTANCE.ffi_xmtpv3_rust_future_free_void(future) }, + // lift function + { Unit }, + + // Error FFI converter + GenericException.ErrorHandler, + ) } - + @Throws(GenericException::class) @Suppress("ASSIGNED_BUT_NEVER_ACCESSED_VARIABLE") - override suspend fun `send`(`contentBytes`: kotlin.ByteArray): kotlin.ByteArray { + override suspend fun `send`(`contentBytes`: kotlin.ByteArray) : kotlin.ByteArray { return uniffiRustCallAsync( - callWithPointer { thisPtr -> - UniffiLib.INSTANCE.uniffi_xmtpv3_fn_method_fficonversation_send( - thisPtr, - FfiConverterByteArray.lower(`contentBytes`), - ) - }, - { future, callback, continuation -> - UniffiLib.INSTANCE.ffi_xmtpv3_rust_future_poll_rust_buffer( - future, - callback, - continuation - ) - }, - { future, continuation -> - UniffiLib.INSTANCE.ffi_xmtpv3_rust_future_complete_rust_buffer( - future, - continuation - ) - }, - { future -> UniffiLib.INSTANCE.ffi_xmtpv3_rust_future_free_rust_buffer(future) }, - // lift function - { FfiConverterByteArray.lift(it) }, - // Error FFI converter - GenericException.ErrorHandler, - ) + callWithPointer { thisPtr -> + UniffiLib.INSTANCE.uniffi_xmtpv3_fn_method_fficonversation_send( + thisPtr, + FfiConverterByteArray.lower(`contentBytes`), + ) + }, + { future, callback, continuation -> UniffiLib.INSTANCE.ffi_xmtpv3_rust_future_poll_rust_buffer(future, callback, continuation) }, + { future, continuation -> UniffiLib.INSTANCE.ffi_xmtpv3_rust_future_complete_rust_buffer(future, continuation) }, + { future -> UniffiLib.INSTANCE.ffi_xmtpv3_rust_future_free_rust_buffer(future) }, + // lift function + { FfiConverterByteArray.lift(it) }, + // Error FFI converter + GenericException.ErrorHandler, + ) } - + /** * send a message without immediately publishing to the delivery service. */ - @Throws(GenericException::class) - override fun `sendOptimistic`(`contentBytes`: kotlin.ByteArray): kotlin.ByteArray { - return FfiConverterByteArray.lift( - callWithPointer { - uniffiRustCallWithError(GenericException) { _status -> - UniffiLib.INSTANCE.uniffi_xmtpv3_fn_method_fficonversation_send_optimistic( - it, FfiConverterByteArray.lower(`contentBytes`), _status - ) - } - } - ) + @Throws(GenericException::class)override fun `sendOptimistic`(`contentBytes`: kotlin.ByteArray): kotlin.ByteArray { + return FfiConverterByteArray.lift( + callWithPointer { + uniffiRustCallWithError(GenericException) { _status -> + UniffiLib.INSTANCE.uniffi_xmtpv3_fn_method_fficonversation_send_optimistic( + it, FfiConverterByteArray.lower(`contentBytes`),_status) +} } + ) + } + - + @Suppress("ASSIGNED_BUT_NEVER_ACCESSED_VARIABLE") - override suspend fun `stream`(`messageCallback`: FfiMessageCallback): FfiStreamCloser { + override suspend fun `stream`(`messageCallback`: FfiMessageCallback) : FfiStreamCloser { return uniffiRustCallAsync( - callWithPointer { thisPtr -> - UniffiLib.INSTANCE.uniffi_xmtpv3_fn_method_fficonversation_stream( - thisPtr, - FfiConverterTypeFfiMessageCallback.lower(`messageCallback`), - ) - }, - { future, callback, continuation -> - UniffiLib.INSTANCE.ffi_xmtpv3_rust_future_poll_pointer( - future, - callback, - continuation - ) - }, - { future, continuation -> - UniffiLib.INSTANCE.ffi_xmtpv3_rust_future_complete_pointer( - future, - continuation - ) - }, - { future -> UniffiLib.INSTANCE.ffi_xmtpv3_rust_future_free_pointer(future) }, - // lift function - { FfiConverterTypeFfiStreamCloser.lift(it) }, - // Error FFI converter - UniffiNullRustCallStatusErrorHandler, - ) + callWithPointer { thisPtr -> + UniffiLib.INSTANCE.uniffi_xmtpv3_fn_method_fficonversation_stream( + thisPtr, + FfiConverterTypeFfiMessageCallback.lower(`messageCallback`), + ) + }, + { future, callback, continuation -> UniffiLib.INSTANCE.ffi_xmtpv3_rust_future_poll_pointer(future, callback, continuation) }, + { future, continuation -> UniffiLib.INSTANCE.ffi_xmtpv3_rust_future_complete_pointer(future, continuation) }, + { future -> UniffiLib.INSTANCE.ffi_xmtpv3_rust_future_free_pointer(future) }, + // lift function + { FfiConverterTypeFfiStreamCloser.lift(it) }, + // Error FFI converter + UniffiNullRustCallStatusErrorHandler, + ) } - - @Throws(GenericException::class) - override fun `superAdminList`(): List { - return FfiConverterSequenceString.lift( - callWithPointer { - uniffiRustCallWithError(GenericException) { _status -> - UniffiLib.INSTANCE.uniffi_xmtpv3_fn_method_fficonversation_super_admin_list( - it, _status - ) - } - } - ) + + @Throws(GenericException::class)override fun `superAdminList`(): List { + return FfiConverterSequenceString.lift( + callWithPointer { + uniffiRustCallWithError(GenericException) { _status -> + UniffiLib.INSTANCE.uniffi_xmtpv3_fn_method_fficonversation_super_admin_list( + it, _status) +} } + ) + } + - + @Throws(GenericException::class) @Suppress("ASSIGNED_BUT_NEVER_ACCESSED_VARIABLE") override suspend fun `sync`() { return uniffiRustCallAsync( - callWithPointer { thisPtr -> - UniffiLib.INSTANCE.uniffi_xmtpv3_fn_method_fficonversation_sync( - thisPtr, - - ) - }, - { future, callback, continuation -> - UniffiLib.INSTANCE.ffi_xmtpv3_rust_future_poll_void( - future, - callback, - continuation - ) - }, - { future, continuation -> - UniffiLib.INSTANCE.ffi_xmtpv3_rust_future_complete_void( - future, - continuation - ) - }, - { future -> UniffiLib.INSTANCE.ffi_xmtpv3_rust_future_free_void(future) }, - // lift function - { Unit }, - - // Error FFI converter - GenericException.ErrorHandler, - ) + callWithPointer { thisPtr -> + UniffiLib.INSTANCE.uniffi_xmtpv3_fn_method_fficonversation_sync( + thisPtr, + + ) + }, + { future, callback, continuation -> UniffiLib.INSTANCE.ffi_xmtpv3_rust_future_poll_void(future, callback, continuation) }, + { future, continuation -> UniffiLib.INSTANCE.ffi_xmtpv3_rust_future_complete_void(future, continuation) }, + { future -> UniffiLib.INSTANCE.ffi_xmtpv3_rust_future_free_void(future) }, + // lift function + { Unit }, + + // Error FFI converter + GenericException.ErrorHandler, + ) } + + @Throws(GenericException::class)override fun `updateConsentState`(`state`: FfiConsentState) + = + callWithPointer { + uniffiRustCallWithError(GenericException) { _status -> + UniffiLib.INSTANCE.uniffi_xmtpv3_fn_method_fficonversation_update_consent_state( + it, FfiConverterTypeFfiConsentState.lower(`state`),_status) +} + } + + - @Throws(GenericException::class) - override fun `updateConsentState`(`state`: FfiConsentState) = - callWithPointer { - uniffiRustCallWithError(GenericException) { _status -> - UniffiLib.INSTANCE.uniffi_xmtpv3_fn_method_fficonversation_update_consent_state( - it, FfiConverterTypeFfiConsentState.lower(`state`), _status - ) - } - } - - + @Throws(GenericException::class) @Suppress("ASSIGNED_BUT_NEVER_ACCESSED_VARIABLE") override suspend fun `updateGroupDescription`(`groupDescription`: kotlin.String) { return uniffiRustCallAsync( - callWithPointer { thisPtr -> - UniffiLib.INSTANCE.uniffi_xmtpv3_fn_method_fficonversation_update_group_description( - thisPtr, - FfiConverterString.lower(`groupDescription`), - ) - }, - { future, callback, continuation -> - UniffiLib.INSTANCE.ffi_xmtpv3_rust_future_poll_void( - future, - callback, - continuation - ) - }, - { future, continuation -> - UniffiLib.INSTANCE.ffi_xmtpv3_rust_future_complete_void( - future, - continuation - ) - }, - { future -> UniffiLib.INSTANCE.ffi_xmtpv3_rust_future_free_void(future) }, - // lift function - { Unit }, - - // Error FFI converter - GenericException.ErrorHandler, - ) + callWithPointer { thisPtr -> + UniffiLib.INSTANCE.uniffi_xmtpv3_fn_method_fficonversation_update_group_description( + thisPtr, + FfiConverterString.lower(`groupDescription`), + ) + }, + { future, callback, continuation -> UniffiLib.INSTANCE.ffi_xmtpv3_rust_future_poll_void(future, callback, continuation) }, + { future, continuation -> UniffiLib.INSTANCE.ffi_xmtpv3_rust_future_complete_void(future, continuation) }, + { future -> UniffiLib.INSTANCE.ffi_xmtpv3_rust_future_free_void(future) }, + // lift function + { Unit }, + + // Error FFI converter + GenericException.ErrorHandler, + ) } - + @Throws(GenericException::class) @Suppress("ASSIGNED_BUT_NEVER_ACCESSED_VARIABLE") override suspend fun `updateGroupImageUrlSquare`(`groupImageUrlSquare`: kotlin.String) { return uniffiRustCallAsync( - callWithPointer { thisPtr -> - UniffiLib.INSTANCE.uniffi_xmtpv3_fn_method_fficonversation_update_group_image_url_square( - thisPtr, - FfiConverterString.lower(`groupImageUrlSquare`), - ) - }, - { future, callback, continuation -> - UniffiLib.INSTANCE.ffi_xmtpv3_rust_future_poll_void( - future, - callback, - continuation - ) - }, - { future, continuation -> - UniffiLib.INSTANCE.ffi_xmtpv3_rust_future_complete_void( - future, - continuation - ) - }, - { future -> UniffiLib.INSTANCE.ffi_xmtpv3_rust_future_free_void(future) }, - // lift function - { Unit }, - - // Error FFI converter - GenericException.ErrorHandler, - ) + callWithPointer { thisPtr -> + UniffiLib.INSTANCE.uniffi_xmtpv3_fn_method_fficonversation_update_group_image_url_square( + thisPtr, + FfiConverterString.lower(`groupImageUrlSquare`), + ) + }, + { future, callback, continuation -> UniffiLib.INSTANCE.ffi_xmtpv3_rust_future_poll_void(future, callback, continuation) }, + { future, continuation -> UniffiLib.INSTANCE.ffi_xmtpv3_rust_future_complete_void(future, continuation) }, + { future -> UniffiLib.INSTANCE.ffi_xmtpv3_rust_future_free_void(future) }, + // lift function + { Unit }, + + // Error FFI converter + GenericException.ErrorHandler, + ) } - + @Throws(GenericException::class) @Suppress("ASSIGNED_BUT_NEVER_ACCESSED_VARIABLE") override suspend fun `updateGroupName`(`groupName`: kotlin.String) { return uniffiRustCallAsync( - callWithPointer { thisPtr -> - UniffiLib.INSTANCE.uniffi_xmtpv3_fn_method_fficonversation_update_group_name( - thisPtr, - FfiConverterString.lower(`groupName`), - ) - }, - { future, callback, continuation -> - UniffiLib.INSTANCE.ffi_xmtpv3_rust_future_poll_void( - future, - callback, - continuation - ) - }, - { future, continuation -> - UniffiLib.INSTANCE.ffi_xmtpv3_rust_future_complete_void( - future, - continuation - ) - }, - { future -> UniffiLib.INSTANCE.ffi_xmtpv3_rust_future_free_void(future) }, - // lift function - { Unit }, - - // Error FFI converter - GenericException.ErrorHandler, - ) + callWithPointer { thisPtr -> + UniffiLib.INSTANCE.uniffi_xmtpv3_fn_method_fficonversation_update_group_name( + thisPtr, + FfiConverterString.lower(`groupName`), + ) + }, + { future, callback, continuation -> UniffiLib.INSTANCE.ffi_xmtpv3_rust_future_poll_void(future, callback, continuation) }, + { future, continuation -> UniffiLib.INSTANCE.ffi_xmtpv3_rust_future_complete_void(future, continuation) }, + { future -> UniffiLib.INSTANCE.ffi_xmtpv3_rust_future_free_void(future) }, + // lift function + { Unit }, + + // Error FFI converter + GenericException.ErrorHandler, + ) } - + @Throws(GenericException::class) @Suppress("ASSIGNED_BUT_NEVER_ACCESSED_VARIABLE") override suspend fun `updateGroupPinnedFrameUrl`(`pinnedFrameUrl`: kotlin.String) { return uniffiRustCallAsync( - callWithPointer { thisPtr -> - UniffiLib.INSTANCE.uniffi_xmtpv3_fn_method_fficonversation_update_group_pinned_frame_url( - thisPtr, - FfiConverterString.lower(`pinnedFrameUrl`), - ) - }, - { future, callback, continuation -> - UniffiLib.INSTANCE.ffi_xmtpv3_rust_future_poll_void( - future, - callback, - continuation - ) - }, - { future, continuation -> - UniffiLib.INSTANCE.ffi_xmtpv3_rust_future_complete_void( - future, - continuation - ) - }, - { future -> UniffiLib.INSTANCE.ffi_xmtpv3_rust_future_free_void(future) }, - // lift function - { Unit }, - - // Error FFI converter - GenericException.ErrorHandler, - ) + callWithPointer { thisPtr -> + UniffiLib.INSTANCE.uniffi_xmtpv3_fn_method_fficonversation_update_group_pinned_frame_url( + thisPtr, + FfiConverterString.lower(`pinnedFrameUrl`), + ) + }, + { future, callback, continuation -> UniffiLib.INSTANCE.ffi_xmtpv3_rust_future_poll_void(future, callback, continuation) }, + { future, continuation -> UniffiLib.INSTANCE.ffi_xmtpv3_rust_future_complete_void(future, continuation) }, + { future -> UniffiLib.INSTANCE.ffi_xmtpv3_rust_future_free_void(future) }, + // lift function + { Unit }, + + // Error FFI converter + GenericException.ErrorHandler, + ) } - + @Throws(GenericException::class) @Suppress("ASSIGNED_BUT_NEVER_ACCESSED_VARIABLE") - override suspend fun `updatePermissionPolicy`( - `permissionUpdateType`: FfiPermissionUpdateType, - `permissionPolicyOption`: FfiPermissionPolicy, - `metadataField`: FfiMetadataField?, - ) { + override suspend fun `updatePermissionPolicy`(`permissionUpdateType`: FfiPermissionUpdateType, `permissionPolicyOption`: FfiPermissionPolicy, `metadataField`: FfiMetadataField?) { return uniffiRustCallAsync( - callWithPointer { thisPtr -> - UniffiLib.INSTANCE.uniffi_xmtpv3_fn_method_fficonversation_update_permission_policy( - thisPtr, - FfiConverterTypeFfiPermissionUpdateType.lower(`permissionUpdateType`), - FfiConverterTypeFfiPermissionPolicy.lower(`permissionPolicyOption`), - FfiConverterOptionalTypeFfiMetadataField.lower(`metadataField`), - ) - }, - { future, callback, continuation -> - UniffiLib.INSTANCE.ffi_xmtpv3_rust_future_poll_void( - future, - callback, - continuation - ) - }, - { future, continuation -> - UniffiLib.INSTANCE.ffi_xmtpv3_rust_future_complete_void( - future, - continuation - ) - }, - { future -> UniffiLib.INSTANCE.ffi_xmtpv3_rust_future_free_void(future) }, - // lift function - { Unit }, - - // Error FFI converter - GenericException.ErrorHandler, - ) + callWithPointer { thisPtr -> + UniffiLib.INSTANCE.uniffi_xmtpv3_fn_method_fficonversation_update_permission_policy( + thisPtr, + FfiConverterTypeFfiPermissionUpdateType.lower(`permissionUpdateType`),FfiConverterTypeFfiPermissionPolicy.lower(`permissionPolicyOption`),FfiConverterOptionalTypeFfiMetadataField.lower(`metadataField`), + ) + }, + { future, callback, continuation -> UniffiLib.INSTANCE.ffi_xmtpv3_rust_future_poll_void(future, callback, continuation) }, + { future, continuation -> UniffiLib.INSTANCE.ffi_xmtpv3_rust_future_complete_void(future, continuation) }, + { future -> UniffiLib.INSTANCE.ffi_xmtpv3_rust_future_free_void(future) }, + // lift function + { Unit }, + + // Error FFI converter + GenericException.ErrorHandler, + ) } + + + companion object - + } /** * @suppress */ -public object FfiConverterTypeFfiConversation : FfiConverter { +public object FfiConverterTypeFfiConversation: FfiConverter { override fun lower(value: FfiConversation): Pointer { return value.uniffiClonePointer() @@ -4811,15 +4177,15 @@ public object FfiConverterTypeFfiConversation : FfiConverter - UniffiLib.INSTANCE.uniffi_xmtpv3_fn_method_fficonversationcallback_on_conversation( - it, FfiConverterTypeFfiConversation.lower(`conversation`), _status - ) - } - } - + override fun `onConversation`(`conversation`: FfiConversation) + = + callWithPointer { + uniffiRustCall() { _status -> + UniffiLib.INSTANCE.uniffi_xmtpv3_fn_method_fficonversationcallback_on_conversation( + it, FfiConverterTypeFfiConversation.lower(`conversation`),_status) +} + } + + - override fun `onError`(`error`: FfiSubscribeException) = - callWithPointer { - uniffiRustCall() { _status -> - UniffiLib.INSTANCE.uniffi_xmtpv3_fn_method_fficonversationcallback_on_error( - it, FfiConverterTypeFfiSubscribeError.lower(`error`), _status - ) - } - } + override fun `onError`(`error`: FfiSubscribeException) + = + callWithPointer { + uniffiRustCall() { _status -> + UniffiLib.INSTANCE.uniffi_xmtpv3_fn_method_fficonversationcallback_on_error( + it, FfiConverterTypeFfiSubscribeError.lower(`error`),_status) +} + } + + + + + companion object - + } // Put the implementation in an object so we don't pollute the top-level namespace internal object uniffiCallbackInterfaceFfiConversationCallback { - internal object `onConversation` : UniffiCallbackInterfaceFfiConversationCallbackMethod0 { - override fun callback( - `uniffiHandle`: Long, - `conversation`: Pointer, - `uniffiOutReturn`: Pointer, - uniffiCallStatus: UniffiRustCallStatus, - ) { + internal object `onConversation`: UniffiCallbackInterfaceFfiConversationCallbackMethod0 { + override fun callback(`uniffiHandle`: Long,`conversation`: Pointer,`uniffiOutReturn`: Pointer,uniffiCallStatus: UniffiRustCallStatus,) { val uniffiObj = FfiConverterTypeFfiConversationCallback.handleMap.get(uniffiHandle) val makeCall = { -> uniffiObj.`onConversation`( @@ -4944,14 +4311,8 @@ internal object uniffiCallbackInterfaceFfiConversationCallback { uniffiTraitInterfaceCall(uniffiCallStatus, makeCall, writeReturn) } } - - internal object `onError` : UniffiCallbackInterfaceFfiConversationCallbackMethod1 { - override fun callback( - `uniffiHandle`: Long, - `error`: RustBuffer.ByValue, - `uniffiOutReturn`: Pointer, - uniffiCallStatus: UniffiRustCallStatus, - ) { + internal object `onError`: UniffiCallbackInterfaceFfiConversationCallbackMethod1 { + override fun callback(`uniffiHandle`: Long,`error`: RustBuffer.ByValue,`uniffiOutReturn`: Pointer,uniffiCallStatus: UniffiRustCallStatus,) { val uniffiObj = FfiConverterTypeFfiConversationCallback.handleMap.get(uniffiHandle) val makeCall = { -> uniffiObj.`onError`( @@ -4963,7 +4324,7 @@ internal object uniffiCallbackInterfaceFfiConversationCallback { } } - internal object uniffiFree : UniffiCallbackInterfaceFree { + internal object uniffiFree: UniffiCallbackInterfaceFree { override fun callback(handle: Long) { FfiConverterTypeFfiConversationCallback.handleMap.remove(handle) } @@ -4985,8 +4346,7 @@ internal object uniffiCallbackInterfaceFfiConversationCallback { /** * @suppress */ -public object FfiConverterTypeFfiConversationCallback : - FfiConverter { +public object FfiConverterTypeFfiConversationCallback: FfiConverter { internal val handleMap = UniffiHandleMap() override fun lower(value: FfiConversationCallback): Pointer { @@ -5112,15 +4472,15 @@ public object FfiConverterTypeFfiConversationCallback : public interface FfiConversationListItemInterface { - + fun `conversation`(): FfiConversation - + fun `lastMessage`(): FfiMessage? - + companion object } -open class FfiConversationListItem : Disposable, AutoCloseable, FfiConversationListItemInterface { +open class FfiConversationListItem: Disposable, AutoCloseable, FfiConversationListItemInterface { constructor(pointer: Pointer) { this.pointer = pointer @@ -5171,7 +4531,7 @@ open class FfiConversationListItem : Disposable, AutoCloseable, FfiConversationL if (c == Long.MAX_VALUE) { throw IllegalStateException("${this.javaClass.simpleName} call counter would overflow") } - } while (!this.callCounter.compareAndSet(c, c + 1L)) + } while (! this.callCounter.compareAndSet(c, c + 1L)) // Now we can safely do the method call without the pointer being freed concurrently. try { return block(this.uniffiClonePointer()) @@ -5202,40 +4562,41 @@ open class FfiConversationListItem : Disposable, AutoCloseable, FfiConversationL } override fun `conversation`(): FfiConversation { - return FfiConverterTypeFfiConversation.lift( - callWithPointer { - uniffiRustCall() { _status -> - UniffiLib.INSTANCE.uniffi_xmtpv3_fn_method_fficonversationlistitem_conversation( - it, _status - ) - } - } - ) + return FfiConverterTypeFfiConversation.lift( + callWithPointer { + uniffiRustCall() { _status -> + UniffiLib.INSTANCE.uniffi_xmtpv3_fn_method_fficonversationlistitem_conversation( + it, _status) +} } - + ) + } + override fun `lastMessage`(): FfiMessage? { - return FfiConverterOptionalTypeFfiMessage.lift( - callWithPointer { - uniffiRustCall() { _status -> - UniffiLib.INSTANCE.uniffi_xmtpv3_fn_method_fficonversationlistitem_last_message( - it, _status - ) - } - } - ) + return FfiConverterOptionalTypeFfiMessage.lift( + callWithPointer { + uniffiRustCall() { _status -> + UniffiLib.INSTANCE.uniffi_xmtpv3_fn_method_fficonversationlistitem_last_message( + it, _status) +} + } + ) } + + + + companion object - + } /** * @suppress */ -public object FfiConverterTypeFfiConversationListItem : - FfiConverter { +public object FfiConverterTypeFfiConversationListItem: FfiConverter { override fun lower(value: FfiConversationListItem): Pointer { return value.uniffiClonePointer() @@ -5360,15 +4721,15 @@ public object FfiConverterTypeFfiConversationListItem : public interface FfiConversationMetadataInterface { - + fun `conversationType`(): FfiConversationType - + fun `creatorInboxId`(): kotlin.String - + companion object } -open class FfiConversationMetadata : Disposable, AutoCloseable, FfiConversationMetadataInterface { +open class FfiConversationMetadata: Disposable, AutoCloseable, FfiConversationMetadataInterface { constructor(pointer: Pointer) { this.pointer = pointer @@ -5419,7 +4780,7 @@ open class FfiConversationMetadata : Disposable, AutoCloseable, FfiConversationM if (c == Long.MAX_VALUE) { throw IllegalStateException("${this.javaClass.simpleName} call counter would overflow") } - } while (!this.callCounter.compareAndSet(c, c + 1L)) + } while (! this.callCounter.compareAndSet(c, c + 1L)) // Now we can safely do the method call without the pointer being freed concurrently. try { return block(this.uniffiClonePointer()) @@ -5450,40 +4811,41 @@ open class FfiConversationMetadata : Disposable, AutoCloseable, FfiConversationM } override fun `conversationType`(): FfiConversationType { - return FfiConverterTypeFfiConversationType.lift( - callWithPointer { - uniffiRustCall() { _status -> - UniffiLib.INSTANCE.uniffi_xmtpv3_fn_method_fficonversationmetadata_conversation_type( - it, _status - ) - } - } - ) + return FfiConverterTypeFfiConversationType.lift( + callWithPointer { + uniffiRustCall() { _status -> + UniffiLib.INSTANCE.uniffi_xmtpv3_fn_method_fficonversationmetadata_conversation_type( + it, _status) +} } - + ) + } + override fun `creatorInboxId`(): kotlin.String { - return FfiConverterString.lift( - callWithPointer { - uniffiRustCall() { _status -> - UniffiLib.INSTANCE.uniffi_xmtpv3_fn_method_fficonversationmetadata_creator_inbox_id( - it, _status - ) - } - } - ) + return FfiConverterString.lift( + callWithPointer { + uniffiRustCall() { _status -> + UniffiLib.INSTANCE.uniffi_xmtpv3_fn_method_fficonversationmetadata_creator_inbox_id( + it, _status) +} + } + ) } + + + + companion object - + } /** * @suppress */ -public object FfiConverterTypeFfiConversationMetadata : - FfiConverter { +public object FfiConverterTypeFfiConversationMetadata: FfiConverter { override fun lower(value: FfiConversationMetadata): Pointer { return value.uniffiClonePointer() @@ -5608,63 +4970,57 @@ public object FfiConverterTypeFfiConversationMetadata : public interface FfiConversationsInterface { - + suspend fun `createDm`(`accountAddress`: kotlin.String): FfiConversation - - suspend fun `createGroup`( - `accountAddresses`: List, - `opts`: FfiCreateGroupOptions, - ): FfiConversation - + + suspend fun `createGroup`(`accountAddresses`: List, `opts`: FfiCreateGroupOptions): FfiConversation + fun `getHmacKeys`(): Map> - + fun `getSyncGroup`(): FfiConversation - + fun `list`(`opts`: FfiListConversationsOptions): List - + fun `listDms`(`opts`: FfiListConversationsOptions): List - + fun `listGroups`(`opts`: FfiListConversationsOptions): List - + suspend fun `processStreamedWelcomeMessage`(`envelopeBytes`: kotlin.ByteArray): FfiConversation - + suspend fun `stream`(`callback`: FfiConversationCallback): FfiStreamCloser - + suspend fun `streamAllDmMessages`(`messageCallback`: FfiMessageCallback): FfiStreamCloser - + suspend fun `streamAllGroupMessages`(`messageCallback`: FfiMessageCallback): FfiStreamCloser - + suspend fun `streamAllMessages`(`messageCallback`: FfiMessageCallback): FfiStreamCloser - + /** * Get notified when there is a new consent update either locally or is synced from another device * allowing the user to re-render the new state appropriately */ suspend fun `streamConsent`(`callback`: FfiConsentCallback): FfiStreamCloser - + suspend fun `streamDms`(`callback`: FfiConversationCallback): FfiStreamCloser - + suspend fun `streamGroups`(`callback`: FfiConversationCallback): FfiStreamCloser - - suspend fun `streamMessages`( - `messageCallback`: FfiMessageCallback, - `conversationType`: FfiConversationType?, - ): FfiStreamCloser - + + suspend fun `streamMessages`(`messageCallback`: FfiMessageCallback, `conversationType`: FfiConversationType?): FfiStreamCloser + /** * Get notified when a preference changes either locally or is synced from another device * allowing the user to re-render the new state appropriately. */ suspend fun `streamPreferences`(`callback`: FfiPreferenceCallback): FfiStreamCloser - + suspend fun `sync`() - + suspend fun `syncAllConversations`(`consentState`: FfiConsentState?): kotlin.UInt - + companion object } -open class FfiConversations : Disposable, AutoCloseable, FfiConversationsInterface { +open class FfiConversations: Disposable, AutoCloseable, FfiConversationsInterface { constructor(pointer: Pointer) { this.pointer = pointer @@ -5715,7 +5071,7 @@ open class FfiConversations : Disposable, AutoCloseable, FfiConversationsInterfa if (c == Long.MAX_VALUE) { throw IllegalStateException("${this.javaClass.simpleName} call counter would overflow") } - } while (!this.callCounter.compareAndSet(c, c + 1L)) + } while (! this.callCounter.compareAndSet(c, c + 1L)) // Now we can safely do the method call without the pointer being freed concurrently. try { return block(this.uniffiClonePointer()) @@ -5745,541 +5101,377 @@ open class FfiConversations : Disposable, AutoCloseable, FfiConversationsInterfa } } - + @Throws(GenericException::class) @Suppress("ASSIGNED_BUT_NEVER_ACCESSED_VARIABLE") - override suspend fun `createDm`(`accountAddress`: kotlin.String): FfiConversation { + override suspend fun `createDm`(`accountAddress`: kotlin.String) : FfiConversation { return uniffiRustCallAsync( - callWithPointer { thisPtr -> - UniffiLib.INSTANCE.uniffi_xmtpv3_fn_method_fficonversations_create_dm( - thisPtr, - FfiConverterString.lower(`accountAddress`), - ) - }, - { future, callback, continuation -> - UniffiLib.INSTANCE.ffi_xmtpv3_rust_future_poll_pointer( - future, - callback, - continuation - ) - }, - { future, continuation -> - UniffiLib.INSTANCE.ffi_xmtpv3_rust_future_complete_pointer( - future, - continuation - ) - }, - { future -> UniffiLib.INSTANCE.ffi_xmtpv3_rust_future_free_pointer(future) }, - // lift function - { FfiConverterTypeFfiConversation.lift(it) }, - // Error FFI converter - GenericException.ErrorHandler, - ) + callWithPointer { thisPtr -> + UniffiLib.INSTANCE.uniffi_xmtpv3_fn_method_fficonversations_create_dm( + thisPtr, + FfiConverterString.lower(`accountAddress`), + ) + }, + { future, callback, continuation -> UniffiLib.INSTANCE.ffi_xmtpv3_rust_future_poll_pointer(future, callback, continuation) }, + { future, continuation -> UniffiLib.INSTANCE.ffi_xmtpv3_rust_future_complete_pointer(future, continuation) }, + { future -> UniffiLib.INSTANCE.ffi_xmtpv3_rust_future_free_pointer(future) }, + // lift function + { FfiConverterTypeFfiConversation.lift(it) }, + // Error FFI converter + GenericException.ErrorHandler, + ) } - + @Throws(GenericException::class) @Suppress("ASSIGNED_BUT_NEVER_ACCESSED_VARIABLE") - override suspend fun `createGroup`( - `accountAddresses`: List, - `opts`: FfiCreateGroupOptions, - ): FfiConversation { + override suspend fun `createGroup`(`accountAddresses`: List, `opts`: FfiCreateGroupOptions) : FfiConversation { return uniffiRustCallAsync( - callWithPointer { thisPtr -> - UniffiLib.INSTANCE.uniffi_xmtpv3_fn_method_fficonversations_create_group( - thisPtr, - FfiConverterSequenceString.lower(`accountAddresses`), - FfiConverterTypeFfiCreateGroupOptions.lower(`opts`), - ) - }, - { future, callback, continuation -> - UniffiLib.INSTANCE.ffi_xmtpv3_rust_future_poll_pointer( - future, - callback, - continuation - ) - }, - { future, continuation -> - UniffiLib.INSTANCE.ffi_xmtpv3_rust_future_complete_pointer( - future, - continuation - ) - }, - { future -> UniffiLib.INSTANCE.ffi_xmtpv3_rust_future_free_pointer(future) }, - // lift function - { FfiConverterTypeFfiConversation.lift(it) }, - // Error FFI converter - GenericException.ErrorHandler, - ) + callWithPointer { thisPtr -> + UniffiLib.INSTANCE.uniffi_xmtpv3_fn_method_fficonversations_create_group( + thisPtr, + FfiConverterSequenceString.lower(`accountAddresses`),FfiConverterTypeFfiCreateGroupOptions.lower(`opts`), + ) + }, + { future, callback, continuation -> UniffiLib.INSTANCE.ffi_xmtpv3_rust_future_poll_pointer(future, callback, continuation) }, + { future, continuation -> UniffiLib.INSTANCE.ffi_xmtpv3_rust_future_complete_pointer(future, continuation) }, + { future -> UniffiLib.INSTANCE.ffi_xmtpv3_rust_future_free_pointer(future) }, + // lift function + { FfiConverterTypeFfiConversation.lift(it) }, + // Error FFI converter + GenericException.ErrorHandler, + ) } - - @Throws(GenericException::class) - override fun `getHmacKeys`(): Map> { - return FfiConverterMapByteArraySequenceTypeFfiHmacKey.lift( - callWithPointer { - uniffiRustCallWithError(GenericException) { _status -> - UniffiLib.INSTANCE.uniffi_xmtpv3_fn_method_fficonversations_get_hmac_keys( - it, _status - ) - } - } - ) + + @Throws(GenericException::class)override fun `getHmacKeys`(): Map> { + return FfiConverterMapByteArraySequenceTypeFfiHmacKey.lift( + callWithPointer { + uniffiRustCallWithError(GenericException) { _status -> + UniffiLib.INSTANCE.uniffi_xmtpv3_fn_method_fficonversations_get_hmac_keys( + it, _status) +} } - - - @Throws(GenericException::class) - override fun `getSyncGroup`(): FfiConversation { - return FfiConverterTypeFfiConversation.lift( - callWithPointer { - uniffiRustCallWithError(GenericException) { _status -> - UniffiLib.INSTANCE.uniffi_xmtpv3_fn_method_fficonversations_get_sync_group( - it, _status - ) - } - } - ) + ) } + - - @Throws(GenericException::class) - override fun `list`(`opts`: FfiListConversationsOptions): List { - return FfiConverterSequenceTypeFfiConversationListItem.lift( - callWithPointer { - uniffiRustCallWithError(GenericException) { _status -> - UniffiLib.INSTANCE.uniffi_xmtpv3_fn_method_fficonversations_list( - it, FfiConverterTypeFfiListConversationsOptions.lower(`opts`), _status - ) - } - } - ) + + @Throws(GenericException::class)override fun `getSyncGroup`(): FfiConversation { + return FfiConverterTypeFfiConversation.lift( + callWithPointer { + uniffiRustCallWithError(GenericException) { _status -> + UniffiLib.INSTANCE.uniffi_xmtpv3_fn_method_fficonversations_get_sync_group( + it, _status) +} } - - - @Throws(GenericException::class) - override fun `listDms`(`opts`: FfiListConversationsOptions): List { - return FfiConverterSequenceTypeFfiConversationListItem.lift( - callWithPointer { - uniffiRustCallWithError(GenericException) { _status -> - UniffiLib.INSTANCE.uniffi_xmtpv3_fn_method_fficonversations_list_dms( - it, FfiConverterTypeFfiListConversationsOptions.lower(`opts`), _status - ) - } - } - ) + ) } + + + @Throws(GenericException::class)override fun `list`(`opts`: FfiListConversationsOptions): List { + return FfiConverterSequenceTypeFfiConversationListItem.lift( + callWithPointer { + uniffiRustCallWithError(GenericException) { _status -> + UniffiLib.INSTANCE.uniffi_xmtpv3_fn_method_fficonversations_list( + it, FfiConverterTypeFfiListConversationsOptions.lower(`opts`),_status) +} + } + ) + } + - @Throws(GenericException::class) - override fun `listGroups`(`opts`: FfiListConversationsOptions): List { - return FfiConverterSequenceTypeFfiConversationListItem.lift( - callWithPointer { - uniffiRustCallWithError(GenericException) { _status -> - UniffiLib.INSTANCE.uniffi_xmtpv3_fn_method_fficonversations_list_groups( - it, FfiConverterTypeFfiListConversationsOptions.lower(`opts`), _status - ) - } - } - ) + + @Throws(GenericException::class)override fun `listDms`(`opts`: FfiListConversationsOptions): List { + return FfiConverterSequenceTypeFfiConversationListItem.lift( + callWithPointer { + uniffiRustCallWithError(GenericException) { _status -> + UniffiLib.INSTANCE.uniffi_xmtpv3_fn_method_fficonversations_list_dms( + it, FfiConverterTypeFfiListConversationsOptions.lower(`opts`),_status) +} } + ) + } + + + @Throws(GenericException::class)override fun `listGroups`(`opts`: FfiListConversationsOptions): List { + return FfiConverterSequenceTypeFfiConversationListItem.lift( + callWithPointer { + uniffiRustCallWithError(GenericException) { _status -> + UniffiLib.INSTANCE.uniffi_xmtpv3_fn_method_fficonversations_list_groups( + it, FfiConverterTypeFfiListConversationsOptions.lower(`opts`),_status) +} + } + ) + } + + @Throws(GenericException::class) @Suppress("ASSIGNED_BUT_NEVER_ACCESSED_VARIABLE") - override suspend fun `processStreamedWelcomeMessage`(`envelopeBytes`: kotlin.ByteArray): FfiConversation { + override suspend fun `processStreamedWelcomeMessage`(`envelopeBytes`: kotlin.ByteArray) : FfiConversation { return uniffiRustCallAsync( - callWithPointer { thisPtr -> - UniffiLib.INSTANCE.uniffi_xmtpv3_fn_method_fficonversations_process_streamed_welcome_message( - thisPtr, - FfiConverterByteArray.lower(`envelopeBytes`), - ) - }, - { future, callback, continuation -> - UniffiLib.INSTANCE.ffi_xmtpv3_rust_future_poll_pointer( - future, - callback, - continuation - ) - }, - { future, continuation -> - UniffiLib.INSTANCE.ffi_xmtpv3_rust_future_complete_pointer( - future, - continuation - ) - }, - { future -> UniffiLib.INSTANCE.ffi_xmtpv3_rust_future_free_pointer(future) }, - // lift function - { FfiConverterTypeFfiConversation.lift(it) }, - // Error FFI converter - GenericException.ErrorHandler, - ) + callWithPointer { thisPtr -> + UniffiLib.INSTANCE.uniffi_xmtpv3_fn_method_fficonversations_process_streamed_welcome_message( + thisPtr, + FfiConverterByteArray.lower(`envelopeBytes`), + ) + }, + { future, callback, continuation -> UniffiLib.INSTANCE.ffi_xmtpv3_rust_future_poll_pointer(future, callback, continuation) }, + { future, continuation -> UniffiLib.INSTANCE.ffi_xmtpv3_rust_future_complete_pointer(future, continuation) }, + { future -> UniffiLib.INSTANCE.ffi_xmtpv3_rust_future_free_pointer(future) }, + // lift function + { FfiConverterTypeFfiConversation.lift(it) }, + // Error FFI converter + GenericException.ErrorHandler, + ) } - + @Suppress("ASSIGNED_BUT_NEVER_ACCESSED_VARIABLE") - override suspend fun `stream`(`callback`: FfiConversationCallback): FfiStreamCloser { + override suspend fun `stream`(`callback`: FfiConversationCallback) : FfiStreamCloser { return uniffiRustCallAsync( - callWithPointer { thisPtr -> - UniffiLib.INSTANCE.uniffi_xmtpv3_fn_method_fficonversations_stream( - thisPtr, - FfiConverterTypeFfiConversationCallback.lower(`callback`), - ) - }, - { future, callback, continuation -> - UniffiLib.INSTANCE.ffi_xmtpv3_rust_future_poll_pointer( - future, - callback, - continuation - ) - }, - { future, continuation -> - UniffiLib.INSTANCE.ffi_xmtpv3_rust_future_complete_pointer( - future, - continuation - ) - }, - { future -> UniffiLib.INSTANCE.ffi_xmtpv3_rust_future_free_pointer(future) }, - // lift function - { FfiConverterTypeFfiStreamCloser.lift(it) }, - // Error FFI converter - UniffiNullRustCallStatusErrorHandler, - ) + callWithPointer { thisPtr -> + UniffiLib.INSTANCE.uniffi_xmtpv3_fn_method_fficonversations_stream( + thisPtr, + FfiConverterTypeFfiConversationCallback.lower(`callback`), + ) + }, + { future, callback, continuation -> UniffiLib.INSTANCE.ffi_xmtpv3_rust_future_poll_pointer(future, callback, continuation) }, + { future, continuation -> UniffiLib.INSTANCE.ffi_xmtpv3_rust_future_complete_pointer(future, continuation) }, + { future -> UniffiLib.INSTANCE.ffi_xmtpv3_rust_future_free_pointer(future) }, + // lift function + { FfiConverterTypeFfiStreamCloser.lift(it) }, + // Error FFI converter + UniffiNullRustCallStatusErrorHandler, + ) } - + @Suppress("ASSIGNED_BUT_NEVER_ACCESSED_VARIABLE") - override suspend fun `streamAllDmMessages`(`messageCallback`: FfiMessageCallback): FfiStreamCloser { + override suspend fun `streamAllDmMessages`(`messageCallback`: FfiMessageCallback) : FfiStreamCloser { return uniffiRustCallAsync( - callWithPointer { thisPtr -> - UniffiLib.INSTANCE.uniffi_xmtpv3_fn_method_fficonversations_stream_all_dm_messages( - thisPtr, - FfiConverterTypeFfiMessageCallback.lower(`messageCallback`), - ) - }, - { future, callback, continuation -> - UniffiLib.INSTANCE.ffi_xmtpv3_rust_future_poll_pointer( - future, - callback, - continuation - ) - }, - { future, continuation -> - UniffiLib.INSTANCE.ffi_xmtpv3_rust_future_complete_pointer( - future, - continuation - ) - }, - { future -> UniffiLib.INSTANCE.ffi_xmtpv3_rust_future_free_pointer(future) }, - // lift function - { FfiConverterTypeFfiStreamCloser.lift(it) }, - // Error FFI converter - UniffiNullRustCallStatusErrorHandler, - ) + callWithPointer { thisPtr -> + UniffiLib.INSTANCE.uniffi_xmtpv3_fn_method_fficonversations_stream_all_dm_messages( + thisPtr, + FfiConverterTypeFfiMessageCallback.lower(`messageCallback`), + ) + }, + { future, callback, continuation -> UniffiLib.INSTANCE.ffi_xmtpv3_rust_future_poll_pointer(future, callback, continuation) }, + { future, continuation -> UniffiLib.INSTANCE.ffi_xmtpv3_rust_future_complete_pointer(future, continuation) }, + { future -> UniffiLib.INSTANCE.ffi_xmtpv3_rust_future_free_pointer(future) }, + // lift function + { FfiConverterTypeFfiStreamCloser.lift(it) }, + // Error FFI converter + UniffiNullRustCallStatusErrorHandler, + ) } - + @Suppress("ASSIGNED_BUT_NEVER_ACCESSED_VARIABLE") - override suspend fun `streamAllGroupMessages`(`messageCallback`: FfiMessageCallback): FfiStreamCloser { + override suspend fun `streamAllGroupMessages`(`messageCallback`: FfiMessageCallback) : FfiStreamCloser { return uniffiRustCallAsync( - callWithPointer { thisPtr -> - UniffiLib.INSTANCE.uniffi_xmtpv3_fn_method_fficonversations_stream_all_group_messages( - thisPtr, - FfiConverterTypeFfiMessageCallback.lower(`messageCallback`), - ) - }, - { future, callback, continuation -> - UniffiLib.INSTANCE.ffi_xmtpv3_rust_future_poll_pointer( - future, - callback, - continuation - ) - }, - { future, continuation -> - UniffiLib.INSTANCE.ffi_xmtpv3_rust_future_complete_pointer( - future, - continuation - ) - }, - { future -> UniffiLib.INSTANCE.ffi_xmtpv3_rust_future_free_pointer(future) }, - // lift function - { FfiConverterTypeFfiStreamCloser.lift(it) }, - // Error FFI converter - UniffiNullRustCallStatusErrorHandler, - ) + callWithPointer { thisPtr -> + UniffiLib.INSTANCE.uniffi_xmtpv3_fn_method_fficonversations_stream_all_group_messages( + thisPtr, + FfiConverterTypeFfiMessageCallback.lower(`messageCallback`), + ) + }, + { future, callback, continuation -> UniffiLib.INSTANCE.ffi_xmtpv3_rust_future_poll_pointer(future, callback, continuation) }, + { future, continuation -> UniffiLib.INSTANCE.ffi_xmtpv3_rust_future_complete_pointer(future, continuation) }, + { future -> UniffiLib.INSTANCE.ffi_xmtpv3_rust_future_free_pointer(future) }, + // lift function + { FfiConverterTypeFfiStreamCloser.lift(it) }, + // Error FFI converter + UniffiNullRustCallStatusErrorHandler, + ) } - + @Suppress("ASSIGNED_BUT_NEVER_ACCESSED_VARIABLE") - override suspend fun `streamAllMessages`(`messageCallback`: FfiMessageCallback): FfiStreamCloser { + override suspend fun `streamAllMessages`(`messageCallback`: FfiMessageCallback) : FfiStreamCloser { return uniffiRustCallAsync( - callWithPointer { thisPtr -> - UniffiLib.INSTANCE.uniffi_xmtpv3_fn_method_fficonversations_stream_all_messages( - thisPtr, - FfiConverterTypeFfiMessageCallback.lower(`messageCallback`), - ) - }, - { future, callback, continuation -> - UniffiLib.INSTANCE.ffi_xmtpv3_rust_future_poll_pointer( - future, - callback, - continuation - ) - }, - { future, continuation -> - UniffiLib.INSTANCE.ffi_xmtpv3_rust_future_complete_pointer( - future, - continuation - ) - }, - { future -> UniffiLib.INSTANCE.ffi_xmtpv3_rust_future_free_pointer(future) }, - // lift function - { FfiConverterTypeFfiStreamCloser.lift(it) }, - // Error FFI converter - UniffiNullRustCallStatusErrorHandler, - ) + callWithPointer { thisPtr -> + UniffiLib.INSTANCE.uniffi_xmtpv3_fn_method_fficonversations_stream_all_messages( + thisPtr, + FfiConverterTypeFfiMessageCallback.lower(`messageCallback`), + ) + }, + { future, callback, continuation -> UniffiLib.INSTANCE.ffi_xmtpv3_rust_future_poll_pointer(future, callback, continuation) }, + { future, continuation -> UniffiLib.INSTANCE.ffi_xmtpv3_rust_future_complete_pointer(future, continuation) }, + { future -> UniffiLib.INSTANCE.ffi_xmtpv3_rust_future_free_pointer(future) }, + // lift function + { FfiConverterTypeFfiStreamCloser.lift(it) }, + // Error FFI converter + UniffiNullRustCallStatusErrorHandler, + ) } - + /** * Get notified when there is a new consent update either locally or is synced from another device * allowing the user to re-render the new state appropriately */ @Suppress("ASSIGNED_BUT_NEVER_ACCESSED_VARIABLE") - override suspend fun `streamConsent`(`callback`: FfiConsentCallback): FfiStreamCloser { + override suspend fun `streamConsent`(`callback`: FfiConsentCallback) : FfiStreamCloser { return uniffiRustCallAsync( - callWithPointer { thisPtr -> - UniffiLib.INSTANCE.uniffi_xmtpv3_fn_method_fficonversations_stream_consent( - thisPtr, - FfiConverterTypeFfiConsentCallback.lower(`callback`), - ) - }, - { future, callback, continuation -> - UniffiLib.INSTANCE.ffi_xmtpv3_rust_future_poll_pointer( - future, - callback, - continuation - ) - }, - { future, continuation -> - UniffiLib.INSTANCE.ffi_xmtpv3_rust_future_complete_pointer( - future, - continuation - ) - }, - { future -> UniffiLib.INSTANCE.ffi_xmtpv3_rust_future_free_pointer(future) }, - // lift function - { FfiConverterTypeFfiStreamCloser.lift(it) }, - // Error FFI converter - UniffiNullRustCallStatusErrorHandler, - ) + callWithPointer { thisPtr -> + UniffiLib.INSTANCE.uniffi_xmtpv3_fn_method_fficonversations_stream_consent( + thisPtr, + FfiConverterTypeFfiConsentCallback.lower(`callback`), + ) + }, + { future, callback, continuation -> UniffiLib.INSTANCE.ffi_xmtpv3_rust_future_poll_pointer(future, callback, continuation) }, + { future, continuation -> UniffiLib.INSTANCE.ffi_xmtpv3_rust_future_complete_pointer(future, continuation) }, + { future -> UniffiLib.INSTANCE.ffi_xmtpv3_rust_future_free_pointer(future) }, + // lift function + { FfiConverterTypeFfiStreamCloser.lift(it) }, + // Error FFI converter + UniffiNullRustCallStatusErrorHandler, + ) } - + @Suppress("ASSIGNED_BUT_NEVER_ACCESSED_VARIABLE") - override suspend fun `streamDms`(`callback`: FfiConversationCallback): FfiStreamCloser { + override suspend fun `streamDms`(`callback`: FfiConversationCallback) : FfiStreamCloser { return uniffiRustCallAsync( - callWithPointer { thisPtr -> - UniffiLib.INSTANCE.uniffi_xmtpv3_fn_method_fficonversations_stream_dms( - thisPtr, - FfiConverterTypeFfiConversationCallback.lower(`callback`), - ) - }, - { future, callback, continuation -> - UniffiLib.INSTANCE.ffi_xmtpv3_rust_future_poll_pointer( - future, - callback, - continuation - ) - }, - { future, continuation -> - UniffiLib.INSTANCE.ffi_xmtpv3_rust_future_complete_pointer( - future, - continuation - ) - }, - { future -> UniffiLib.INSTANCE.ffi_xmtpv3_rust_future_free_pointer(future) }, - // lift function - { FfiConverterTypeFfiStreamCloser.lift(it) }, - // Error FFI converter - UniffiNullRustCallStatusErrorHandler, - ) + callWithPointer { thisPtr -> + UniffiLib.INSTANCE.uniffi_xmtpv3_fn_method_fficonversations_stream_dms( + thisPtr, + FfiConverterTypeFfiConversationCallback.lower(`callback`), + ) + }, + { future, callback, continuation -> UniffiLib.INSTANCE.ffi_xmtpv3_rust_future_poll_pointer(future, callback, continuation) }, + { future, continuation -> UniffiLib.INSTANCE.ffi_xmtpv3_rust_future_complete_pointer(future, continuation) }, + { future -> UniffiLib.INSTANCE.ffi_xmtpv3_rust_future_free_pointer(future) }, + // lift function + { FfiConverterTypeFfiStreamCloser.lift(it) }, + // Error FFI converter + UniffiNullRustCallStatusErrorHandler, + ) } - + @Suppress("ASSIGNED_BUT_NEVER_ACCESSED_VARIABLE") - override suspend fun `streamGroups`(`callback`: FfiConversationCallback): FfiStreamCloser { + override suspend fun `streamGroups`(`callback`: FfiConversationCallback) : FfiStreamCloser { return uniffiRustCallAsync( - callWithPointer { thisPtr -> - UniffiLib.INSTANCE.uniffi_xmtpv3_fn_method_fficonversations_stream_groups( - thisPtr, - FfiConverterTypeFfiConversationCallback.lower(`callback`), - ) - }, - { future, callback, continuation -> - UniffiLib.INSTANCE.ffi_xmtpv3_rust_future_poll_pointer( - future, - callback, - continuation - ) - }, - { future, continuation -> - UniffiLib.INSTANCE.ffi_xmtpv3_rust_future_complete_pointer( - future, - continuation - ) - }, - { future -> UniffiLib.INSTANCE.ffi_xmtpv3_rust_future_free_pointer(future) }, - // lift function - { FfiConverterTypeFfiStreamCloser.lift(it) }, - // Error FFI converter - UniffiNullRustCallStatusErrorHandler, - ) + callWithPointer { thisPtr -> + UniffiLib.INSTANCE.uniffi_xmtpv3_fn_method_fficonversations_stream_groups( + thisPtr, + FfiConverterTypeFfiConversationCallback.lower(`callback`), + ) + }, + { future, callback, continuation -> UniffiLib.INSTANCE.ffi_xmtpv3_rust_future_poll_pointer(future, callback, continuation) }, + { future, continuation -> UniffiLib.INSTANCE.ffi_xmtpv3_rust_future_complete_pointer(future, continuation) }, + { future -> UniffiLib.INSTANCE.ffi_xmtpv3_rust_future_free_pointer(future) }, + // lift function + { FfiConverterTypeFfiStreamCloser.lift(it) }, + // Error FFI converter + UniffiNullRustCallStatusErrorHandler, + ) } - + @Suppress("ASSIGNED_BUT_NEVER_ACCESSED_VARIABLE") - override suspend fun `streamMessages`( - `messageCallback`: FfiMessageCallback, - `conversationType`: FfiConversationType?, - ): FfiStreamCloser { + override suspend fun `streamMessages`(`messageCallback`: FfiMessageCallback, `conversationType`: FfiConversationType?) : FfiStreamCloser { return uniffiRustCallAsync( - callWithPointer { thisPtr -> - UniffiLib.INSTANCE.uniffi_xmtpv3_fn_method_fficonversations_stream_messages( - thisPtr, - FfiConverterTypeFfiMessageCallback.lower(`messageCallback`), - FfiConverterOptionalTypeFfiConversationType.lower(`conversationType`), - ) - }, - { future, callback, continuation -> - UniffiLib.INSTANCE.ffi_xmtpv3_rust_future_poll_pointer( - future, - callback, - continuation - ) - }, - { future, continuation -> - UniffiLib.INSTANCE.ffi_xmtpv3_rust_future_complete_pointer( - future, - continuation - ) - }, - { future -> UniffiLib.INSTANCE.ffi_xmtpv3_rust_future_free_pointer(future) }, - // lift function - { FfiConverterTypeFfiStreamCloser.lift(it) }, - // Error FFI converter - UniffiNullRustCallStatusErrorHandler, - ) + callWithPointer { thisPtr -> + UniffiLib.INSTANCE.uniffi_xmtpv3_fn_method_fficonversations_stream_messages( + thisPtr, + FfiConverterTypeFfiMessageCallback.lower(`messageCallback`),FfiConverterOptionalTypeFfiConversationType.lower(`conversationType`), + ) + }, + { future, callback, continuation -> UniffiLib.INSTANCE.ffi_xmtpv3_rust_future_poll_pointer(future, callback, continuation) }, + { future, continuation -> UniffiLib.INSTANCE.ffi_xmtpv3_rust_future_complete_pointer(future, continuation) }, + { future -> UniffiLib.INSTANCE.ffi_xmtpv3_rust_future_free_pointer(future) }, + // lift function + { FfiConverterTypeFfiStreamCloser.lift(it) }, + // Error FFI converter + UniffiNullRustCallStatusErrorHandler, + ) } - + /** * Get notified when a preference changes either locally or is synced from another device * allowing the user to re-render the new state appropriately. */ @Suppress("ASSIGNED_BUT_NEVER_ACCESSED_VARIABLE") - override suspend fun `streamPreferences`(`callback`: FfiPreferenceCallback): FfiStreamCloser { + override suspend fun `streamPreferences`(`callback`: FfiPreferenceCallback) : FfiStreamCloser { return uniffiRustCallAsync( - callWithPointer { thisPtr -> - UniffiLib.INSTANCE.uniffi_xmtpv3_fn_method_fficonversations_stream_preferences( - thisPtr, - FfiConverterTypeFfiPreferenceCallback.lower(`callback`), - ) - }, - { future, callback, continuation -> - UniffiLib.INSTANCE.ffi_xmtpv3_rust_future_poll_pointer( - future, - callback, - continuation - ) - }, - { future, continuation -> - UniffiLib.INSTANCE.ffi_xmtpv3_rust_future_complete_pointer( - future, - continuation - ) - }, - { future -> UniffiLib.INSTANCE.ffi_xmtpv3_rust_future_free_pointer(future) }, - // lift function - { FfiConverterTypeFfiStreamCloser.lift(it) }, - // Error FFI converter - UniffiNullRustCallStatusErrorHandler, - ) + callWithPointer { thisPtr -> + UniffiLib.INSTANCE.uniffi_xmtpv3_fn_method_fficonversations_stream_preferences( + thisPtr, + FfiConverterTypeFfiPreferenceCallback.lower(`callback`), + ) + }, + { future, callback, continuation -> UniffiLib.INSTANCE.ffi_xmtpv3_rust_future_poll_pointer(future, callback, continuation) }, + { future, continuation -> UniffiLib.INSTANCE.ffi_xmtpv3_rust_future_complete_pointer(future, continuation) }, + { future -> UniffiLib.INSTANCE.ffi_xmtpv3_rust_future_free_pointer(future) }, + // lift function + { FfiConverterTypeFfiStreamCloser.lift(it) }, + // Error FFI converter + UniffiNullRustCallStatusErrorHandler, + ) } - + @Throws(GenericException::class) @Suppress("ASSIGNED_BUT_NEVER_ACCESSED_VARIABLE") override suspend fun `sync`() { return uniffiRustCallAsync( - callWithPointer { thisPtr -> - UniffiLib.INSTANCE.uniffi_xmtpv3_fn_method_fficonversations_sync( - thisPtr, - - ) - }, - { future, callback, continuation -> - UniffiLib.INSTANCE.ffi_xmtpv3_rust_future_poll_void( - future, - callback, - continuation - ) - }, - { future, continuation -> - UniffiLib.INSTANCE.ffi_xmtpv3_rust_future_complete_void( - future, - continuation - ) - }, - { future -> UniffiLib.INSTANCE.ffi_xmtpv3_rust_future_free_void(future) }, - // lift function - { Unit }, - - // Error FFI converter - GenericException.ErrorHandler, - ) + callWithPointer { thisPtr -> + UniffiLib.INSTANCE.uniffi_xmtpv3_fn_method_fficonversations_sync( + thisPtr, + + ) + }, + { future, callback, continuation -> UniffiLib.INSTANCE.ffi_xmtpv3_rust_future_poll_void(future, callback, continuation) }, + { future, continuation -> UniffiLib.INSTANCE.ffi_xmtpv3_rust_future_complete_void(future, continuation) }, + { future -> UniffiLib.INSTANCE.ffi_xmtpv3_rust_future_free_void(future) }, + // lift function + { Unit }, + + // Error FFI converter + GenericException.ErrorHandler, + ) } - + @Throws(GenericException::class) @Suppress("ASSIGNED_BUT_NEVER_ACCESSED_VARIABLE") - override suspend fun `syncAllConversations`(`consentState`: FfiConsentState?): kotlin.UInt { + override suspend fun `syncAllConversations`(`consentState`: FfiConsentState?) : kotlin.UInt { return uniffiRustCallAsync( - callWithPointer { thisPtr -> - UniffiLib.INSTANCE.uniffi_xmtpv3_fn_method_fficonversations_sync_all_conversations( - thisPtr, - FfiConverterOptionalTypeFfiConsentState.lower(`consentState`), - ) - }, - { future, callback, continuation -> - UniffiLib.INSTANCE.ffi_xmtpv3_rust_future_poll_u32( - future, - callback, - continuation - ) - }, - { future, continuation -> - UniffiLib.INSTANCE.ffi_xmtpv3_rust_future_complete_u32( - future, - continuation - ) - }, - { future -> UniffiLib.INSTANCE.ffi_xmtpv3_rust_future_free_u32(future) }, - // lift function - { FfiConverterUInt.lift(it) }, - // Error FFI converter - GenericException.ErrorHandler, - ) + callWithPointer { thisPtr -> + UniffiLib.INSTANCE.uniffi_xmtpv3_fn_method_fficonversations_sync_all_conversations( + thisPtr, + FfiConverterOptionalTypeFfiConsentState.lower(`consentState`), + ) + }, + { future, callback, continuation -> UniffiLib.INSTANCE.ffi_xmtpv3_rust_future_poll_u32(future, callback, continuation) }, + { future, continuation -> UniffiLib.INSTANCE.ffi_xmtpv3_rust_future_complete_u32(future, continuation) }, + { future -> UniffiLib.INSTANCE.ffi_xmtpv3_rust_future_free_u32(future) }, + // lift function + { FfiConverterUInt.lift(it) }, + // Error FFI converter + GenericException.ErrorHandler, + ) } + + + companion object - + } /** * @suppress */ -public object FfiConverterTypeFfiConversations : FfiConverter { +public object FfiConverterTypeFfiConversations: FfiConverter { override fun lower(value: FfiConversations): Pointer { return value.uniffiClonePointer() @@ -6404,15 +5596,15 @@ public object FfiConverterTypeFfiConversations : FfiConverter + UniffiLib.INSTANCE.uniffi_xmtpv3_fn_method_ffigrouppermissions_policy_set( + it, _status) +} + } + ) + } + - @Throws(GenericException::class) - override fun `policySet`(): FfiPermissionPolicySet { - return FfiConverterTypeFfiPermissionPolicySet.lift( - callWithPointer { - uniffiRustCallWithError(GenericException) { _status -> - UniffiLib.INSTANCE.uniffi_xmtpv3_fn_method_ffigrouppermissions_policy_set( - it, _status - ) - } - } - ) + + @Throws(GenericException::class)override fun `policyType`(): FfiGroupPermissionsOptions { + return FfiConverterTypeFfiGroupPermissionsOptions.lift( + callWithPointer { + uniffiRustCallWithError(GenericException) { _status -> + UniffiLib.INSTANCE.uniffi_xmtpv3_fn_method_ffigrouppermissions_policy_type( + it, _status) +} } - - - @Throws(GenericException::class) - override fun `policyType`(): FfiGroupPermissionsOptions { - return FfiConverterTypeFfiGroupPermissionsOptions.lift( - callWithPointer { - uniffiRustCallWithError(GenericException) { _status -> - UniffiLib.INSTANCE.uniffi_xmtpv3_fn_method_ffigrouppermissions_policy_type( - it, _status - ) - } - } - ) + ) } + + + + companion object - + } /** * @suppress */ -public object FfiConverterTypeFfiGroupPermissions : FfiConverter { +public object FfiConverterTypeFfiGroupPermissions: FfiConverter { override fun lower(value: FfiGroupPermissions): Pointer { return value.uniffiClonePointer() @@ -6654,15 +5847,15 @@ public object FfiConverterTypeFfiGroupPermissions : FfiConverter - UniffiLib.INSTANCE.uniffi_xmtpv3_fn_method_ffimessagecallback_on_message( - it, FfiConverterTypeFfiMessage.lower(`message`), _status - ) - } - } - + override fun `onMessage`(`message`: FfiMessage) + = + callWithPointer { + uniffiRustCall() { _status -> + UniffiLib.INSTANCE.uniffi_xmtpv3_fn_method_ffimessagecallback_on_message( + it, FfiConverterTypeFfiMessage.lower(`message`),_status) +} + } + + - override fun `onError`(`error`: FfiSubscribeException) = - callWithPointer { - uniffiRustCall() { _status -> - UniffiLib.INSTANCE.uniffi_xmtpv3_fn_method_ffimessagecallback_on_error( - it, FfiConverterTypeFfiSubscribeError.lower(`error`), _status - ) - } - } + override fun `onError`(`error`: FfiSubscribeException) + = + callWithPointer { + uniffiRustCall() { _status -> + UniffiLib.INSTANCE.uniffi_xmtpv3_fn_method_ffimessagecallback_on_error( + it, FfiConverterTypeFfiSubscribeError.lower(`error`),_status) +} + } + + + + + companion object - + } // Put the implementation in an object so we don't pollute the top-level namespace internal object uniffiCallbackInterfaceFfiMessageCallback { - internal object `onMessage` : UniffiCallbackInterfaceFfiMessageCallbackMethod0 { - override fun callback( - `uniffiHandle`: Long, - `message`: RustBuffer.ByValue, - `uniffiOutReturn`: Pointer, - uniffiCallStatus: UniffiRustCallStatus, - ) { + internal object `onMessage`: UniffiCallbackInterfaceFfiMessageCallbackMethod0 { + override fun callback(`uniffiHandle`: Long,`message`: RustBuffer.ByValue,`uniffiOutReturn`: Pointer,uniffiCallStatus: UniffiRustCallStatus,) { val uniffiObj = FfiConverterTypeFfiMessageCallback.handleMap.get(uniffiHandle) val makeCall = { -> uniffiObj.`onMessage`( @@ -6787,14 +5981,8 @@ internal object uniffiCallbackInterfaceFfiMessageCallback { uniffiTraitInterfaceCall(uniffiCallStatus, makeCall, writeReturn) } } - - internal object `onError` : UniffiCallbackInterfaceFfiMessageCallbackMethod1 { - override fun callback( - `uniffiHandle`: Long, - `error`: RustBuffer.ByValue, - `uniffiOutReturn`: Pointer, - uniffiCallStatus: UniffiRustCallStatus, - ) { + internal object `onError`: UniffiCallbackInterfaceFfiMessageCallbackMethod1 { + override fun callback(`uniffiHandle`: Long,`error`: RustBuffer.ByValue,`uniffiOutReturn`: Pointer,uniffiCallStatus: UniffiRustCallStatus,) { val uniffiObj = FfiConverterTypeFfiMessageCallback.handleMap.get(uniffiHandle) val makeCall = { -> uniffiObj.`onError`( @@ -6806,7 +5994,7 @@ internal object uniffiCallbackInterfaceFfiMessageCallback { } } - internal object uniffiFree : UniffiCallbackInterfaceFree { + internal object uniffiFree: UniffiCallbackInterfaceFree { override fun callback(handle: Long) { FfiConverterTypeFfiMessageCallback.handleMap.remove(handle) } @@ -6828,7 +6016,7 @@ internal object uniffiCallbackInterfaceFfiMessageCallback { /** * @suppress */ -public object FfiConverterTypeFfiMessageCallback : FfiConverter { +public object FfiConverterTypeFfiMessageCallback: FfiConverter { internal val handleMap = UniffiHandleMap() override fun lower(value: FfiMessageCallback): Pointer { @@ -6954,15 +6142,15 @@ public object FfiConverterTypeFfiMessageCallback : FfiConverter) - + fun `onError`(`error`: FfiSubscribeException) - + companion object } -open class FfiPreferenceCallbackImpl : Disposable, AutoCloseable, FfiPreferenceCallback { +open class FfiPreferenceCallbackImpl: Disposable, AutoCloseable, FfiPreferenceCallback { constructor(pointer: Pointer) { this.pointer = pointer @@ -7013,7 +6201,7 @@ open class FfiPreferenceCallbackImpl : Disposable, AutoCloseable, FfiPreferenceC if (c == Long.MAX_VALUE) { throw IllegalStateException("${this.javaClass.simpleName} call counter would overflow") } - } while (!this.callCounter.compareAndSet(c, c + 1L)) + } while (! this.callCounter.compareAndSet(c, c + 1L)) // Now we can safely do the method call without the pointer being freed concurrently. try { return block(this.uniffiClonePointer()) @@ -7043,40 +6231,41 @@ open class FfiPreferenceCallbackImpl : Disposable, AutoCloseable, FfiPreferenceC } } - override fun `onPreferenceUpdate`(`preference`: List) = - callWithPointer { - uniffiRustCall() { _status -> - UniffiLib.INSTANCE.uniffi_xmtpv3_fn_method_ffipreferencecallback_on_preference_update( - it, FfiConverterSequenceTypeFfiPreferenceUpdate.lower(`preference`), _status - ) - } - } - + override fun `onPreferenceUpdate`(`preference`: List) + = + callWithPointer { + uniffiRustCall() { _status -> + UniffiLib.INSTANCE.uniffi_xmtpv3_fn_method_ffipreferencecallback_on_preference_update( + it, FfiConverterSequenceTypeFfiPreferenceUpdate.lower(`preference`),_status) +} + } + + - override fun `onError`(`error`: FfiSubscribeException) = - callWithPointer { - uniffiRustCall() { _status -> - UniffiLib.INSTANCE.uniffi_xmtpv3_fn_method_ffipreferencecallback_on_error( - it, FfiConverterTypeFfiSubscribeError.lower(`error`), _status - ) - } - } + override fun `onError`(`error`: FfiSubscribeException) + = + callWithPointer { + uniffiRustCall() { _status -> + UniffiLib.INSTANCE.uniffi_xmtpv3_fn_method_ffipreferencecallback_on_error( + it, FfiConverterTypeFfiSubscribeError.lower(`error`),_status) +} + } + + + + + companion object - + } // Put the implementation in an object so we don't pollute the top-level namespace internal object uniffiCallbackInterfaceFfiPreferenceCallback { - internal object `onPreferenceUpdate` : UniffiCallbackInterfaceFfiPreferenceCallbackMethod0 { - override fun callback( - `uniffiHandle`: Long, - `preference`: RustBuffer.ByValue, - `uniffiOutReturn`: Pointer, - uniffiCallStatus: UniffiRustCallStatus, - ) { + internal object `onPreferenceUpdate`: UniffiCallbackInterfaceFfiPreferenceCallbackMethod0 { + override fun callback(`uniffiHandle`: Long,`preference`: RustBuffer.ByValue,`uniffiOutReturn`: Pointer,uniffiCallStatus: UniffiRustCallStatus,) { val uniffiObj = FfiConverterTypeFfiPreferenceCallback.handleMap.get(uniffiHandle) val makeCall = { -> uniffiObj.`onPreferenceUpdate`( @@ -7087,14 +6276,8 @@ internal object uniffiCallbackInterfaceFfiPreferenceCallback { uniffiTraitInterfaceCall(uniffiCallStatus, makeCall, writeReturn) } } - - internal object `onError` : UniffiCallbackInterfaceFfiPreferenceCallbackMethod1 { - override fun callback( - `uniffiHandle`: Long, - `error`: RustBuffer.ByValue, - `uniffiOutReturn`: Pointer, - uniffiCallStatus: UniffiRustCallStatus, - ) { + internal object `onError`: UniffiCallbackInterfaceFfiPreferenceCallbackMethod1 { + override fun callback(`uniffiHandle`: Long,`error`: RustBuffer.ByValue,`uniffiOutReturn`: Pointer,uniffiCallStatus: UniffiRustCallStatus,) { val uniffiObj = FfiConverterTypeFfiPreferenceCallback.handleMap.get(uniffiHandle) val makeCall = { -> uniffiObj.`onError`( @@ -7106,7 +6289,7 @@ internal object uniffiCallbackInterfaceFfiPreferenceCallback { } } - internal object uniffiFree : UniffiCallbackInterfaceFree { + internal object uniffiFree: UniffiCallbackInterfaceFree { override fun callback(handle: Long) { FfiConverterTypeFfiPreferenceCallback.handleMap.remove(handle) } @@ -7128,7 +6311,7 @@ internal object uniffiCallbackInterfaceFfiPreferenceCallback { /** * @suppress */ -public object FfiConverterTypeFfiPreferenceCallback : FfiConverter { +public object FfiConverterTypeFfiPreferenceCallback: FfiConverter { internal val handleMap = UniffiHandleMap() override fun lower(value: FfiPreferenceCallback): Pointer { @@ -7254,29 +6437,24 @@ public object FfiConverterTypeFfiPreferenceCallback : FfiConverter - + suspend fun `signatureText`(): kotlin.String - + companion object } -open class FfiSignatureRequest : Disposable, AutoCloseable, FfiSignatureRequestInterface { +open class FfiSignatureRequest: Disposable, AutoCloseable, FfiSignatureRequestInterface { constructor(pointer: Pointer) { this.pointer = pointer @@ -7327,7 +6505,7 @@ open class FfiSignatureRequest : Disposable, AutoCloseable, FfiSignatureRequestI if (c == Long.MAX_VALUE) { throw IllegalStateException("${this.javaClass.simpleName} call counter would overflow") } - } while (!this.callCounter.compareAndSet(c, c + 1L)) + } while (! this.callCounter.compareAndSet(c, c + 1L)) // Now we can safely do the method call without the pointer being freed concurrently. try { return block(this.uniffiClonePointer()) @@ -7357,187 +6535,127 @@ open class FfiSignatureRequest : Disposable, AutoCloseable, FfiSignatureRequestI } } - + @Throws(GenericException::class) @Suppress("ASSIGNED_BUT_NEVER_ACCESSED_VARIABLE") override suspend fun `addEcdsaSignature`(`signatureBytes`: kotlin.ByteArray) { return uniffiRustCallAsync( - callWithPointer { thisPtr -> - UniffiLib.INSTANCE.uniffi_xmtpv3_fn_method_ffisignaturerequest_add_ecdsa_signature( - thisPtr, - FfiConverterByteArray.lower(`signatureBytes`), - ) - }, - { future, callback, continuation -> - UniffiLib.INSTANCE.ffi_xmtpv3_rust_future_poll_void( - future, - callback, - continuation - ) - }, - { future, continuation -> - UniffiLib.INSTANCE.ffi_xmtpv3_rust_future_complete_void( - future, - continuation - ) - }, - { future -> UniffiLib.INSTANCE.ffi_xmtpv3_rust_future_free_void(future) }, - // lift function - { Unit }, - - // Error FFI converter - GenericException.ErrorHandler, - ) + callWithPointer { thisPtr -> + UniffiLib.INSTANCE.uniffi_xmtpv3_fn_method_ffisignaturerequest_add_ecdsa_signature( + thisPtr, + FfiConverterByteArray.lower(`signatureBytes`), + ) + }, + { future, callback, continuation -> UniffiLib.INSTANCE.ffi_xmtpv3_rust_future_poll_void(future, callback, continuation) }, + { future, continuation -> UniffiLib.INSTANCE.ffi_xmtpv3_rust_future_complete_void(future, continuation) }, + { future -> UniffiLib.INSTANCE.ffi_xmtpv3_rust_future_free_void(future) }, + // lift function + { Unit }, + + // Error FFI converter + GenericException.ErrorHandler, + ) } - + @Throws(GenericException::class) @Suppress("ASSIGNED_BUT_NEVER_ACCESSED_VARIABLE") - override suspend fun `addScwSignature`( - `signatureBytes`: kotlin.ByteArray, - `address`: kotlin.String, - `chainId`: kotlin.ULong, - `blockNumber`: kotlin.ULong?, - ) { + override suspend fun `addScwSignature`(`signatureBytes`: kotlin.ByteArray, `address`: kotlin.String, `chainId`: kotlin.ULong, `blockNumber`: kotlin.ULong?) { return uniffiRustCallAsync( - callWithPointer { thisPtr -> - UniffiLib.INSTANCE.uniffi_xmtpv3_fn_method_ffisignaturerequest_add_scw_signature( - thisPtr, - FfiConverterByteArray.lower(`signatureBytes`), - FfiConverterString.lower(`address`), - FfiConverterULong.lower(`chainId`), - FfiConverterOptionalULong.lower(`blockNumber`), - ) - }, - { future, callback, continuation -> - UniffiLib.INSTANCE.ffi_xmtpv3_rust_future_poll_void( - future, - callback, - continuation - ) - }, - { future, continuation -> - UniffiLib.INSTANCE.ffi_xmtpv3_rust_future_complete_void( - future, - continuation - ) - }, - { future -> UniffiLib.INSTANCE.ffi_xmtpv3_rust_future_free_void(future) }, - // lift function - { Unit }, - - // Error FFI converter - GenericException.ErrorHandler, - ) + callWithPointer { thisPtr -> + UniffiLib.INSTANCE.uniffi_xmtpv3_fn_method_ffisignaturerequest_add_scw_signature( + thisPtr, + FfiConverterByteArray.lower(`signatureBytes`),FfiConverterString.lower(`address`),FfiConverterULong.lower(`chainId`),FfiConverterOptionalULong.lower(`blockNumber`), + ) + }, + { future, callback, continuation -> UniffiLib.INSTANCE.ffi_xmtpv3_rust_future_poll_void(future, callback, continuation) }, + { future, continuation -> UniffiLib.INSTANCE.ffi_xmtpv3_rust_future_complete_void(future, continuation) }, + { future -> UniffiLib.INSTANCE.ffi_xmtpv3_rust_future_free_void(future) }, + // lift function + { Unit }, + + // Error FFI converter + GenericException.ErrorHandler, + ) } - + @Suppress("ASSIGNED_BUT_NEVER_ACCESSED_VARIABLE") - override suspend fun `isReady`(): kotlin.Boolean { + override suspend fun `isReady`() : kotlin.Boolean { return uniffiRustCallAsync( - callWithPointer { thisPtr -> - UniffiLib.INSTANCE.uniffi_xmtpv3_fn_method_ffisignaturerequest_is_ready( - thisPtr, - - ) - }, - { future, callback, continuation -> - UniffiLib.INSTANCE.ffi_xmtpv3_rust_future_poll_i8( - future, - callback, - continuation - ) - }, - { future, continuation -> - UniffiLib.INSTANCE.ffi_xmtpv3_rust_future_complete_i8( - future, - continuation - ) - }, - { future -> UniffiLib.INSTANCE.ffi_xmtpv3_rust_future_free_i8(future) }, - // lift function - { FfiConverterBoolean.lift(it) }, - // Error FFI converter - UniffiNullRustCallStatusErrorHandler, - ) + callWithPointer { thisPtr -> + UniffiLib.INSTANCE.uniffi_xmtpv3_fn_method_ffisignaturerequest_is_ready( + thisPtr, + + ) + }, + { future, callback, continuation -> UniffiLib.INSTANCE.ffi_xmtpv3_rust_future_poll_i8(future, callback, continuation) }, + { future, continuation -> UniffiLib.INSTANCE.ffi_xmtpv3_rust_future_complete_i8(future, continuation) }, + { future -> UniffiLib.INSTANCE.ffi_xmtpv3_rust_future_free_i8(future) }, + // lift function + { FfiConverterBoolean.lift(it) }, + // Error FFI converter + UniffiNullRustCallStatusErrorHandler, + ) } - + /** * missing signatures that are from [MemberKind::Address] */ @Throws(GenericException::class) @Suppress("ASSIGNED_BUT_NEVER_ACCESSED_VARIABLE") - override suspend fun `missingAddressSignatures`(): List { + override suspend fun `missingAddressSignatures`() : List { return uniffiRustCallAsync( - callWithPointer { thisPtr -> - UniffiLib.INSTANCE.uniffi_xmtpv3_fn_method_ffisignaturerequest_missing_address_signatures( - thisPtr, - - ) - }, - { future, callback, continuation -> - UniffiLib.INSTANCE.ffi_xmtpv3_rust_future_poll_rust_buffer( - future, - callback, - continuation - ) - }, - { future, continuation -> - UniffiLib.INSTANCE.ffi_xmtpv3_rust_future_complete_rust_buffer( - future, - continuation - ) - }, - { future -> UniffiLib.INSTANCE.ffi_xmtpv3_rust_future_free_rust_buffer(future) }, - // lift function - { FfiConverterSequenceString.lift(it) }, - // Error FFI converter - GenericException.ErrorHandler, - ) + callWithPointer { thisPtr -> + UniffiLib.INSTANCE.uniffi_xmtpv3_fn_method_ffisignaturerequest_missing_address_signatures( + thisPtr, + + ) + }, + { future, callback, continuation -> UniffiLib.INSTANCE.ffi_xmtpv3_rust_future_poll_rust_buffer(future, callback, continuation) }, + { future, continuation -> UniffiLib.INSTANCE.ffi_xmtpv3_rust_future_complete_rust_buffer(future, continuation) }, + { future -> UniffiLib.INSTANCE.ffi_xmtpv3_rust_future_free_rust_buffer(future) }, + // lift function + { FfiConverterSequenceString.lift(it) }, + // Error FFI converter + GenericException.ErrorHandler, + ) } - + @Throws(GenericException::class) @Suppress("ASSIGNED_BUT_NEVER_ACCESSED_VARIABLE") - override suspend fun `signatureText`(): kotlin.String { + override suspend fun `signatureText`() : kotlin.String { return uniffiRustCallAsync( - callWithPointer { thisPtr -> - UniffiLib.INSTANCE.uniffi_xmtpv3_fn_method_ffisignaturerequest_signature_text( - thisPtr, - - ) - }, - { future, callback, continuation -> - UniffiLib.INSTANCE.ffi_xmtpv3_rust_future_poll_rust_buffer( - future, - callback, - continuation - ) - }, - { future, continuation -> - UniffiLib.INSTANCE.ffi_xmtpv3_rust_future_complete_rust_buffer( - future, - continuation - ) - }, - { future -> UniffiLib.INSTANCE.ffi_xmtpv3_rust_future_free_rust_buffer(future) }, - // lift function - { FfiConverterString.lift(it) }, - // Error FFI converter - GenericException.ErrorHandler, - ) + callWithPointer { thisPtr -> + UniffiLib.INSTANCE.uniffi_xmtpv3_fn_method_ffisignaturerequest_signature_text( + thisPtr, + + ) + }, + { future, callback, continuation -> UniffiLib.INSTANCE.ffi_xmtpv3_rust_future_poll_rust_buffer(future, callback, continuation) }, + { future, continuation -> UniffiLib.INSTANCE.ffi_xmtpv3_rust_future_complete_rust_buffer(future, continuation) }, + { future -> UniffiLib.INSTANCE.ffi_xmtpv3_rust_future_free_rust_buffer(future) }, + // lift function + { FfiConverterString.lift(it) }, + // Error FFI converter + GenericException.ErrorHandler, + ) } + + + companion object - + } /** * @suppress */ -public object FfiConverterTypeFfiSignatureRequest : FfiConverter { +public object FfiConverterTypeFfiSignatureRequest: FfiConverter { override fun lower(value: FfiSignatureRequest): Pointer { return value.uniffiClonePointer() @@ -7662,26 +6780,26 @@ public object FfiConverterTypeFfiSignatureRequest : FfiConverter - UniffiLib.INSTANCE.uniffi_xmtpv3_fn_method_ffistreamcloser_end( - it, _status - ) - } - } - + */override fun `end`() + = + callWithPointer { + uniffiRustCall() { _status -> + UniffiLib.INSTANCE.uniffi_xmtpv3_fn_method_ffistreamcloser_end( + it, _status) +} + } + + + /** * End the stream and asyncronously wait for it to shutdown */ @@ -7784,87 +6903,68 @@ open class FfiStreamCloser : Disposable, AutoCloseable, FfiStreamCloserInterface @Suppress("ASSIGNED_BUT_NEVER_ACCESSED_VARIABLE") override suspend fun `endAndWait`() { return uniffiRustCallAsync( - callWithPointer { thisPtr -> - UniffiLib.INSTANCE.uniffi_xmtpv3_fn_method_ffistreamcloser_end_and_wait( - thisPtr, - - ) - }, - { future, callback, continuation -> - UniffiLib.INSTANCE.ffi_xmtpv3_rust_future_poll_void( - future, - callback, - continuation - ) - }, - { future, continuation -> - UniffiLib.INSTANCE.ffi_xmtpv3_rust_future_complete_void( - future, - continuation - ) - }, - { future -> UniffiLib.INSTANCE.ffi_xmtpv3_rust_future_free_void(future) }, - // lift function - { Unit }, - - // Error FFI converter - GenericException.ErrorHandler, - ) + callWithPointer { thisPtr -> + UniffiLib.INSTANCE.uniffi_xmtpv3_fn_method_ffistreamcloser_end_and_wait( + thisPtr, + + ) + }, + { future, callback, continuation -> UniffiLib.INSTANCE.ffi_xmtpv3_rust_future_poll_void(future, callback, continuation) }, + { future, continuation -> UniffiLib.INSTANCE.ffi_xmtpv3_rust_future_complete_void(future, continuation) }, + { future -> UniffiLib.INSTANCE.ffi_xmtpv3_rust_future_free_void(future) }, + // lift function + { Unit }, + + // Error FFI converter + GenericException.ErrorHandler, + ) } override fun `isClosed`(): kotlin.Boolean { - return FfiConverterBoolean.lift( - callWithPointer { - uniffiRustCall() { _status -> - UniffiLib.INSTANCE.uniffi_xmtpv3_fn_method_ffistreamcloser_is_closed( - it, _status - ) - } - } - ) + return FfiConverterBoolean.lift( + callWithPointer { + uniffiRustCall() { _status -> + UniffiLib.INSTANCE.uniffi_xmtpv3_fn_method_ffistreamcloser_is_closed( + it, _status) +} } + ) + } + - + @Suppress("ASSIGNED_BUT_NEVER_ACCESSED_VARIABLE") override suspend fun `waitForReady`() { return uniffiRustCallAsync( - callWithPointer { thisPtr -> - UniffiLib.INSTANCE.uniffi_xmtpv3_fn_method_ffistreamcloser_wait_for_ready( - thisPtr, - - ) - }, - { future, callback, continuation -> - UniffiLib.INSTANCE.ffi_xmtpv3_rust_future_poll_void( - future, - callback, - continuation - ) - }, - { future, continuation -> - UniffiLib.INSTANCE.ffi_xmtpv3_rust_future_complete_void( - future, - continuation - ) - }, - { future -> UniffiLib.INSTANCE.ffi_xmtpv3_rust_future_free_void(future) }, - // lift function - { Unit }, - - // Error FFI converter - UniffiNullRustCallStatusErrorHandler, - ) + callWithPointer { thisPtr -> + UniffiLib.INSTANCE.uniffi_xmtpv3_fn_method_ffistreamcloser_wait_for_ready( + thisPtr, + + ) + }, + { future, callback, continuation -> UniffiLib.INSTANCE.ffi_xmtpv3_rust_future_poll_void(future, callback, continuation) }, + { future, continuation -> UniffiLib.INSTANCE.ffi_xmtpv3_rust_future_complete_void(future, continuation) }, + { future -> UniffiLib.INSTANCE.ffi_xmtpv3_rust_future_free_void(future) }, + // lift function + { Unit }, + + // Error FFI converter + UniffiNullRustCallStatusErrorHandler, + ) } + + + companion object - + } /** * @suppress */ -public object FfiConverterTypeFfiStreamCloser : FfiConverter { +public object FfiConverterTypeFfiStreamCloser: FfiConverter { override fun lower(value: FfiStreamCloser): Pointer { return value.uniffiClonePointer() @@ -7989,24 +7089,21 @@ public object FfiConverterTypeFfiStreamCloser : FfiConverter - UniffiLib.INSTANCE.uniffi_xmtpv3_fn_method_ffiv2apiclient_batch_query( - thisPtr, - FfiConverterTypeFfiV2BatchQueryRequest.lower(`req`), - ) - }, - { future, callback, continuation -> - UniffiLib.INSTANCE.ffi_xmtpv3_rust_future_poll_rust_buffer( - future, - callback, - continuation - ) - }, - { future, continuation -> - UniffiLib.INSTANCE.ffi_xmtpv3_rust_future_complete_rust_buffer( - future, - continuation - ) - }, - { future -> UniffiLib.INSTANCE.ffi_xmtpv3_rust_future_free_rust_buffer(future) }, - // lift function - { FfiConverterTypeFfiV2BatchQueryResponse.lift(it) }, - // Error FFI converter - GenericException.ErrorHandler, - ) + callWithPointer { thisPtr -> + UniffiLib.INSTANCE.uniffi_xmtpv3_fn_method_ffiv2apiclient_batch_query( + thisPtr, + FfiConverterTypeFfiV2BatchQueryRequest.lower(`req`), + ) + }, + { future, callback, continuation -> UniffiLib.INSTANCE.ffi_xmtpv3_rust_future_poll_rust_buffer(future, callback, continuation) }, + { future, continuation -> UniffiLib.INSTANCE.ffi_xmtpv3_rust_future_complete_rust_buffer(future, continuation) }, + { future -> UniffiLib.INSTANCE.ffi_xmtpv3_rust_future_free_rust_buffer(future) }, + // lift function + { FfiConverterTypeFfiV2BatchQueryResponse.lift(it) }, + // Error FFI converter + GenericException.ErrorHandler, + ) } - + @Throws(GenericException::class) @Suppress("ASSIGNED_BUT_NEVER_ACCESSED_VARIABLE") override suspend fun `publish`(`request`: FfiPublishRequest, `authToken`: kotlin.String) { return uniffiRustCallAsync( - callWithPointer { thisPtr -> - UniffiLib.INSTANCE.uniffi_xmtpv3_fn_method_ffiv2apiclient_publish( - thisPtr, - FfiConverterTypeFfiPublishRequest.lower(`request`), - FfiConverterString.lower(`authToken`), - ) - }, - { future, callback, continuation -> - UniffiLib.INSTANCE.ffi_xmtpv3_rust_future_poll_void( - future, - callback, - continuation - ) - }, - { future, continuation -> - UniffiLib.INSTANCE.ffi_xmtpv3_rust_future_complete_void( - future, - continuation - ) - }, - { future -> UniffiLib.INSTANCE.ffi_xmtpv3_rust_future_free_void(future) }, - // lift function - { Unit }, - - // Error FFI converter - GenericException.ErrorHandler, - ) + callWithPointer { thisPtr -> + UniffiLib.INSTANCE.uniffi_xmtpv3_fn_method_ffiv2apiclient_publish( + thisPtr, + FfiConverterTypeFfiPublishRequest.lower(`request`),FfiConverterString.lower(`authToken`), + ) + }, + { future, callback, continuation -> UniffiLib.INSTANCE.ffi_xmtpv3_rust_future_poll_void(future, callback, continuation) }, + { future, continuation -> UniffiLib.INSTANCE.ffi_xmtpv3_rust_future_complete_void(future, continuation) }, + { future -> UniffiLib.INSTANCE.ffi_xmtpv3_rust_future_free_void(future) }, + // lift function + { Unit }, + + // Error FFI converter + GenericException.ErrorHandler, + ) } - + @Throws(GenericException::class) @Suppress("ASSIGNED_BUT_NEVER_ACCESSED_VARIABLE") - override suspend fun `query`(`request`: FfiV2QueryRequest): FfiV2QueryResponse { + override suspend fun `query`(`request`: FfiV2QueryRequest) : FfiV2QueryResponse { return uniffiRustCallAsync( - callWithPointer { thisPtr -> - UniffiLib.INSTANCE.uniffi_xmtpv3_fn_method_ffiv2apiclient_query( - thisPtr, - FfiConverterTypeFfiV2QueryRequest.lower(`request`), - ) - }, - { future, callback, continuation -> - UniffiLib.INSTANCE.ffi_xmtpv3_rust_future_poll_rust_buffer( - future, - callback, - continuation - ) - }, - { future, continuation -> - UniffiLib.INSTANCE.ffi_xmtpv3_rust_future_complete_rust_buffer( - future, - continuation - ) - }, - { future -> UniffiLib.INSTANCE.ffi_xmtpv3_rust_future_free_rust_buffer(future) }, - // lift function - { FfiConverterTypeFfiV2QueryResponse.lift(it) }, - // Error FFI converter - GenericException.ErrorHandler, - ) + callWithPointer { thisPtr -> + UniffiLib.INSTANCE.uniffi_xmtpv3_fn_method_ffiv2apiclient_query( + thisPtr, + FfiConverterTypeFfiV2QueryRequest.lower(`request`), + ) + }, + { future, callback, continuation -> UniffiLib.INSTANCE.ffi_xmtpv3_rust_future_poll_rust_buffer(future, callback, continuation) }, + { future, continuation -> UniffiLib.INSTANCE.ffi_xmtpv3_rust_future_complete_rust_buffer(future, continuation) }, + { future -> UniffiLib.INSTANCE.ffi_xmtpv3_rust_future_free_rust_buffer(future) }, + // lift function + { FfiConverterTypeFfiV2QueryResponse.lift(it) }, + // Error FFI converter + GenericException.ErrorHandler, + ) } - override fun `setAppVersion`(`version`: kotlin.String) = - callWithPointer { - uniffiRustCall() { _status -> - UniffiLib.INSTANCE.uniffi_xmtpv3_fn_method_ffiv2apiclient_set_app_version( - it, FfiConverterString.lower(`version`), _status - ) - } - } - + override fun `setAppVersion`(`version`: kotlin.String) + = + callWithPointer { + uniffiRustCall() { _status -> + UniffiLib.INSTANCE.uniffi_xmtpv3_fn_method_ffiv2apiclient_set_app_version( + it, FfiConverterString.lower(`version`),_status) +} + } + + + @Throws(GenericException::class) @Suppress("ASSIGNED_BUT_NEVER_ACCESSED_VARIABLE") - override suspend fun `subscribe`( - `request`: FfiV2SubscribeRequest, - `callback`: FfiV2SubscriptionCallback, - ): FfiV2Subscription { + override suspend fun `subscribe`(`request`: FfiV2SubscribeRequest, `callback`: FfiV2SubscriptionCallback) : FfiV2Subscription { return uniffiRustCallAsync( - callWithPointer { thisPtr -> - UniffiLib.INSTANCE.uniffi_xmtpv3_fn_method_ffiv2apiclient_subscribe( - thisPtr, - FfiConverterTypeFfiV2SubscribeRequest.lower(`request`), - FfiConverterTypeFfiV2SubscriptionCallback.lower(`callback`), - ) - }, - { future, callback, continuation -> - UniffiLib.INSTANCE.ffi_xmtpv3_rust_future_poll_pointer( - future, - callback, - continuation - ) - }, - { future, continuation -> - UniffiLib.INSTANCE.ffi_xmtpv3_rust_future_complete_pointer( - future, - continuation - ) - }, - { future -> UniffiLib.INSTANCE.ffi_xmtpv3_rust_future_free_pointer(future) }, - // lift function - { FfiConverterTypeFfiV2Subscription.lift(it) }, - // Error FFI converter - GenericException.ErrorHandler, - ) + callWithPointer { thisPtr -> + UniffiLib.INSTANCE.uniffi_xmtpv3_fn_method_ffiv2apiclient_subscribe( + thisPtr, + FfiConverterTypeFfiV2SubscribeRequest.lower(`request`),FfiConverterTypeFfiV2SubscriptionCallback.lower(`callback`), + ) + }, + { future, callback, continuation -> UniffiLib.INSTANCE.ffi_xmtpv3_rust_future_poll_pointer(future, callback, continuation) }, + { future, continuation -> UniffiLib.INSTANCE.ffi_xmtpv3_rust_future_complete_pointer(future, continuation) }, + { future -> UniffiLib.INSTANCE.ffi_xmtpv3_rust_future_free_pointer(future) }, + // lift function + { FfiConverterTypeFfiV2Subscription.lift(it) }, + // Error FFI converter + GenericException.ErrorHandler, + ) } + + + companion object - + } /** * @suppress */ -public object FfiConverterTypeFfiV2ApiClient : FfiConverter { +public object FfiConverterTypeFfiV2ApiClient: FfiConverter { override fun lower(value: FfiV2ApiClient): Pointer { return value.uniffiClonePointer() @@ -8366,31 +7419,31 @@ public object FfiConverterTypeFfiV2ApiClient : FfiConverter - UniffiLib.INSTANCE.uniffi_xmtpv3_fn_method_ffiv2subscription_end( - thisPtr, - - ) - }, - { future, callback, continuation -> - UniffiLib.INSTANCE.ffi_xmtpv3_rust_future_poll_void( - future, - callback, - continuation - ) - }, - { future, continuation -> - UniffiLib.INSTANCE.ffi_xmtpv3_rust_future_complete_void( - future, - continuation - ) - }, - { future -> UniffiLib.INSTANCE.ffi_xmtpv3_rust_future_free_void(future) }, - // lift function - { Unit }, - - // Error FFI converter - GenericException.ErrorHandler, - ) + callWithPointer { thisPtr -> + UniffiLib.INSTANCE.uniffi_xmtpv3_fn_method_ffiv2subscription_end( + thisPtr, + + ) + }, + { future, callback, continuation -> UniffiLib.INSTANCE.ffi_xmtpv3_rust_future_poll_void(future, callback, continuation) }, + { future, continuation -> UniffiLib.INSTANCE.ffi_xmtpv3_rust_future_complete_void(future, continuation) }, + { future -> UniffiLib.INSTANCE.ffi_xmtpv3_rust_future_free_void(future) }, + // lift function + { Unit }, + + // Error FFI converter + GenericException.ErrorHandler, + ) } - + /** * Check if the subscription is closed - */ - override fun `isClosed`(): kotlin.Boolean { - return FfiConverterBoolean.lift( - callWithPointer { - uniffiRustCall() { _status -> - UniffiLib.INSTANCE.uniffi_xmtpv3_fn_method_ffiv2subscription_is_closed( - it, _status - ) - } - } - ) + */override fun `isClosed`(): kotlin.Boolean { + return FfiConverterBoolean.lift( + callWithPointer { + uniffiRustCall() { _status -> + UniffiLib.INSTANCE.uniffi_xmtpv3_fn_method_ffiv2subscription_is_closed( + it, _status) +} } + ) + } + - + /** * Update subscription with new topics */ @@ -8533,43 +7574,35 @@ open class FfiV2Subscription : Disposable, AutoCloseable, FfiV2SubscriptionInter @Suppress("ASSIGNED_BUT_NEVER_ACCESSED_VARIABLE") override suspend fun `update`(`req`: FfiV2SubscribeRequest) { return uniffiRustCallAsync( - callWithPointer { thisPtr -> - UniffiLib.INSTANCE.uniffi_xmtpv3_fn_method_ffiv2subscription_update( - thisPtr, - FfiConverterTypeFfiV2SubscribeRequest.lower(`req`), - ) - }, - { future, callback, continuation -> - UniffiLib.INSTANCE.ffi_xmtpv3_rust_future_poll_void( - future, - callback, - continuation - ) - }, - { future, continuation -> - UniffiLib.INSTANCE.ffi_xmtpv3_rust_future_complete_void( - future, - continuation - ) - }, - { future -> UniffiLib.INSTANCE.ffi_xmtpv3_rust_future_free_void(future) }, - // lift function - { Unit }, - - // Error FFI converter - GenericException.ErrorHandler, - ) + callWithPointer { thisPtr -> + UniffiLib.INSTANCE.uniffi_xmtpv3_fn_method_ffiv2subscription_update( + thisPtr, + FfiConverterTypeFfiV2SubscribeRequest.lower(`req`), + ) + }, + { future, callback, continuation -> UniffiLib.INSTANCE.ffi_xmtpv3_rust_future_poll_void(future, callback, continuation) }, + { future, continuation -> UniffiLib.INSTANCE.ffi_xmtpv3_rust_future_complete_void(future, continuation) }, + { future -> UniffiLib.INSTANCE.ffi_xmtpv3_rust_future_free_void(future) }, + // lift function + { Unit }, + + // Error FFI converter + GenericException.ErrorHandler, + ) } + + + companion object - + } /** * @suppress */ -public object FfiConverterTypeFfiV2Subscription : FfiConverter { +public object FfiConverterTypeFfiV2Subscription: FfiConverter { override fun lower(value: FfiV2Subscription): Pointer { return value.uniffiClonePointer() @@ -8694,15 +7727,15 @@ public object FfiConverterTypeFfiV2Subscription : FfiConverter - UniffiLib.INSTANCE.uniffi_xmtpv3_fn_method_ffiv2subscriptioncallback_on_message( - it, FfiConverterTypeFfiEnvelope.lower(`message`), _status - ) - } - } - + override fun `onMessage`(`message`: FfiEnvelope) + = + callWithPointer { + uniffiRustCall() { _status -> + UniffiLib.INSTANCE.uniffi_xmtpv3_fn_method_ffiv2subscriptioncallback_on_message( + it, FfiConverterTypeFfiEnvelope.lower(`message`),_status) +} + } + + - override fun `onError`(`error`: GenericException) = - callWithPointer { - uniffiRustCall() { _status -> - UniffiLib.INSTANCE.uniffi_xmtpv3_fn_method_ffiv2subscriptioncallback_on_error( - it, FfiConverterTypeGenericError.lower(`error`), _status - ) - } - } + override fun `onError`(`error`: GenericException) + = + callWithPointer { + uniffiRustCall() { _status -> + UniffiLib.INSTANCE.uniffi_xmtpv3_fn_method_ffiv2subscriptioncallback_on_error( + it, FfiConverterTypeGenericError.lower(`error`),_status) +} + } + + + + + companion object - + } // Put the implementation in an object so we don't pollute the top-level namespace internal object uniffiCallbackInterfaceFfiV2SubscriptionCallback { - internal object `onMessage` : UniffiCallbackInterfaceFfiV2SubscriptionCallbackMethod0 { - override fun callback( - `uniffiHandle`: Long, - `message`: RustBuffer.ByValue, - `uniffiOutReturn`: Pointer, - uniffiCallStatus: UniffiRustCallStatus, - ) { + internal object `onMessage`: UniffiCallbackInterfaceFfiV2SubscriptionCallbackMethod0 { + override fun callback(`uniffiHandle`: Long,`message`: RustBuffer.ByValue,`uniffiOutReturn`: Pointer,uniffiCallStatus: UniffiRustCallStatus,) { val uniffiObj = FfiConverterTypeFfiV2SubscriptionCallback.handleMap.get(uniffiHandle) val makeCall = { -> uniffiObj.`onMessage`( @@ -8827,14 +7861,8 @@ internal object uniffiCallbackInterfaceFfiV2SubscriptionCallback { uniffiTraitInterfaceCall(uniffiCallStatus, makeCall, writeReturn) } } - - internal object `onError` : UniffiCallbackInterfaceFfiV2SubscriptionCallbackMethod1 { - override fun callback( - `uniffiHandle`: Long, - `error`: RustBuffer.ByValue, - `uniffiOutReturn`: Pointer, - uniffiCallStatus: UniffiRustCallStatus, - ) { + internal object `onError`: UniffiCallbackInterfaceFfiV2SubscriptionCallbackMethod1 { + override fun callback(`uniffiHandle`: Long,`error`: RustBuffer.ByValue,`uniffiOutReturn`: Pointer,uniffiCallStatus: UniffiRustCallStatus,) { val uniffiObj = FfiConverterTypeFfiV2SubscriptionCallback.handleMap.get(uniffiHandle) val makeCall = { -> uniffiObj.`onError`( @@ -8846,7 +7874,7 @@ internal object uniffiCallbackInterfaceFfiV2SubscriptionCallback { } } - internal object uniffiFree : UniffiCallbackInterfaceFree { + internal object uniffiFree: UniffiCallbackInterfaceFree { override fun callback(handle: Long) { FfiConverterTypeFfiV2SubscriptionCallback.handleMap.remove(handle) } @@ -8868,8 +7896,7 @@ internal object uniffiCallbackInterfaceFfiV2SubscriptionCallback { /** * @suppress */ -public object FfiConverterTypeFfiV2SubscriptionCallback : - FfiConverter { +public object FfiConverterTypeFfiV2SubscriptionCallback: FfiConverter { internal val handleMap = UniffiHandleMap() override fun lower(value: FfiV2SubscriptionCallback): Pointer { @@ -8995,46 +8022,40 @@ public object FfiConverterTypeFfiV2SubscriptionCallback : public interface FfiXmtpClientInterface { - + /** * Adds a wallet address to the existing client */ suspend fun `addWallet`(`newWalletAddress`: kotlin.String): FfiSignatureRequest - + /** * * Get the inbox state for each `inbox_id`. * * * * If `refresh_from_network` is true, the client will go to the network first to refresh the state. * * Otherwise, the state will be read from the local database. */ - suspend fun `addressesFromInboxId`( - `refreshFromNetwork`: kotlin.Boolean, - `inboxIds`: List, - ): List - + suspend fun `addressesFromInboxId`(`refreshFromNetwork`: kotlin.Boolean, `inboxIds`: List): List + suspend fun `applySignatureRequest`(`signatureRequest`: FfiSignatureRequest) - + suspend fun `canMessage`(`accountAddresses`: List): Map - + fun `conversation`(`conversationId`: kotlin.ByteArray): FfiConversation - + fun `conversations`(): FfiConversations - + suspend fun `dbReconnect`() - + fun `dmConversation`(`targetInboxId`: kotlin.String): FfiConversation - + suspend fun `findInboxId`(`address`: kotlin.String): kotlin.String? - - suspend fun `getConsentState`( - `entityType`: FfiConsentEntityType, - `entity`: kotlin.String, - ): FfiConsentState - + + suspend fun `getConsentState`(`entityType`: FfiConsentEntityType, `entity`: kotlin.String): FfiConsentState + suspend fun `getLatestInboxState`(`inboxId`: kotlin.String): FfiInboxState - + fun `inboxId`(): kotlin.String - + /** * * Get the client's inbox state. * * @@ -9042,53 +8063,46 @@ public interface FfiXmtpClientInterface { * * Otherwise, the state will be read from the local database. */ suspend fun `inboxState`(`refreshFromNetwork`: kotlin.Boolean): FfiInboxState - + fun `installationId`(): kotlin.ByteArray - + fun `message`(`messageId`: kotlin.ByteArray): FfiMessage - + suspend fun `registerIdentity`(`signatureRequest`: FfiSignatureRequest) - + fun `releaseDbConnection`() - + /** * * Revokes all installations except the one the client is currently using */ suspend fun `revokeAllOtherInstallations`(): FfiSignatureRequest - + /** * * Revoke a list of installations */ suspend fun `revokeInstallations`(`installationIds`: List): FfiSignatureRequest - + /** * Revokes or removes an identity - really a wallet address - from the existing client */ suspend fun `revokeWallet`(`walletAddress`: kotlin.String): FfiSignatureRequest - + suspend fun `sendSyncRequest`(`kind`: FfiDeviceSyncKind) - + suspend fun `setConsentStates`(`records`: List) - + fun `signWithInstallationKey`(`text`: kotlin.String): kotlin.ByteArray - + fun `signatureRequest`(): FfiSignatureRequest? - - fun `verifySignedWithInstallationKey`( - `signatureText`: kotlin.String, - `signatureBytes`: kotlin.ByteArray, - ) - - fun `verifySignedWithPublicKey`( - `signatureText`: kotlin.String, - `signatureBytes`: kotlin.ByteArray, - `publicKey`: kotlin.ByteArray, - ) - + + fun `verifySignedWithInstallationKey`(`signatureText`: kotlin.String, `signatureBytes`: kotlin.ByteArray) + + fun `verifySignedWithPublicKey`(`signatureText`: kotlin.String, `signatureBytes`: kotlin.ByteArray, `publicKey`: kotlin.ByteArray) + companion object } -open class FfiXmtpClient : Disposable, AutoCloseable, FfiXmtpClientInterface { +open class FfiXmtpClient: Disposable, AutoCloseable, FfiXmtpClientInterface { constructor(pointer: Pointer) { this.pointer = pointer @@ -9139,7 +8153,7 @@ open class FfiXmtpClient : Disposable, AutoCloseable, FfiXmtpClientInterface { if (c == Long.MAX_VALUE) { throw IllegalStateException("${this.javaClass.simpleName} call counter would overflow") } - } while (!this.callCounter.compareAndSet(c, c + 1L)) + } while (! this.callCounter.compareAndSet(c, c + 1L)) // Now we can safely do the method call without the pointer being freed concurrently. try { return block(this.uniffiClonePointer()) @@ -9169,42 +8183,31 @@ open class FfiXmtpClient : Disposable, AutoCloseable, FfiXmtpClientInterface { } } - + /** * Adds a wallet address to the existing client */ @Throws(GenericException::class) @Suppress("ASSIGNED_BUT_NEVER_ACCESSED_VARIABLE") - override suspend fun `addWallet`(`newWalletAddress`: kotlin.String): FfiSignatureRequest { + override suspend fun `addWallet`(`newWalletAddress`: kotlin.String) : FfiSignatureRequest { return uniffiRustCallAsync( - callWithPointer { thisPtr -> - UniffiLib.INSTANCE.uniffi_xmtpv3_fn_method_ffixmtpclient_add_wallet( - thisPtr, - FfiConverterString.lower(`newWalletAddress`), - ) - }, - { future, callback, continuation -> - UniffiLib.INSTANCE.ffi_xmtpv3_rust_future_poll_pointer( - future, - callback, - continuation - ) - }, - { future, continuation -> - UniffiLib.INSTANCE.ffi_xmtpv3_rust_future_complete_pointer( - future, - continuation - ) - }, - { future -> UniffiLib.INSTANCE.ffi_xmtpv3_rust_future_free_pointer(future) }, - // lift function - { FfiConverterTypeFfiSignatureRequest.lift(it) }, - // Error FFI converter - GenericException.ErrorHandler, - ) + callWithPointer { thisPtr -> + UniffiLib.INSTANCE.uniffi_xmtpv3_fn_method_ffixmtpclient_add_wallet( + thisPtr, + FfiConverterString.lower(`newWalletAddress`), + ) + }, + { future, callback, continuation -> UniffiLib.INSTANCE.ffi_xmtpv3_rust_future_poll_pointer(future, callback, continuation) }, + { future, continuation -> UniffiLib.INSTANCE.ffi_xmtpv3_rust_future_complete_pointer(future, continuation) }, + { future -> UniffiLib.INSTANCE.ffi_xmtpv3_rust_future_free_pointer(future) }, + // lift function + { FfiConverterTypeFfiSignatureRequest.lift(it) }, + // Error FFI converter + GenericException.ErrorHandler, + ) } - + /** * * Get the inbox state for each `inbox_id`. * * @@ -9213,291 +8216,203 @@ open class FfiXmtpClient : Disposable, AutoCloseable, FfiXmtpClientInterface { */ @Throws(GenericException::class) @Suppress("ASSIGNED_BUT_NEVER_ACCESSED_VARIABLE") - override suspend fun `addressesFromInboxId`( - `refreshFromNetwork`: kotlin.Boolean, - `inboxIds`: List, - ): List { + override suspend fun `addressesFromInboxId`(`refreshFromNetwork`: kotlin.Boolean, `inboxIds`: List) : List { return uniffiRustCallAsync( - callWithPointer { thisPtr -> - UniffiLib.INSTANCE.uniffi_xmtpv3_fn_method_ffixmtpclient_addresses_from_inbox_id( - thisPtr, - FfiConverterBoolean.lower(`refreshFromNetwork`), - FfiConverterSequenceString.lower(`inboxIds`), - ) - }, - { future, callback, continuation -> - UniffiLib.INSTANCE.ffi_xmtpv3_rust_future_poll_rust_buffer( - future, - callback, - continuation - ) - }, - { future, continuation -> - UniffiLib.INSTANCE.ffi_xmtpv3_rust_future_complete_rust_buffer( - future, - continuation - ) - }, - { future -> UniffiLib.INSTANCE.ffi_xmtpv3_rust_future_free_rust_buffer(future) }, - // lift function - { FfiConverterSequenceTypeFfiInboxState.lift(it) }, - // Error FFI converter - GenericException.ErrorHandler, - ) + callWithPointer { thisPtr -> + UniffiLib.INSTANCE.uniffi_xmtpv3_fn_method_ffixmtpclient_addresses_from_inbox_id( + thisPtr, + FfiConverterBoolean.lower(`refreshFromNetwork`),FfiConverterSequenceString.lower(`inboxIds`), + ) + }, + { future, callback, continuation -> UniffiLib.INSTANCE.ffi_xmtpv3_rust_future_poll_rust_buffer(future, callback, continuation) }, + { future, continuation -> UniffiLib.INSTANCE.ffi_xmtpv3_rust_future_complete_rust_buffer(future, continuation) }, + { future -> UniffiLib.INSTANCE.ffi_xmtpv3_rust_future_free_rust_buffer(future) }, + // lift function + { FfiConverterSequenceTypeFfiInboxState.lift(it) }, + // Error FFI converter + GenericException.ErrorHandler, + ) } - + @Throws(GenericException::class) @Suppress("ASSIGNED_BUT_NEVER_ACCESSED_VARIABLE") override suspend fun `applySignatureRequest`(`signatureRequest`: FfiSignatureRequest) { return uniffiRustCallAsync( - callWithPointer { thisPtr -> - UniffiLib.INSTANCE.uniffi_xmtpv3_fn_method_ffixmtpclient_apply_signature_request( - thisPtr, - FfiConverterTypeFfiSignatureRequest.lower(`signatureRequest`), - ) - }, - { future, callback, continuation -> - UniffiLib.INSTANCE.ffi_xmtpv3_rust_future_poll_void( - future, - callback, - continuation - ) - }, - { future, continuation -> - UniffiLib.INSTANCE.ffi_xmtpv3_rust_future_complete_void( - future, - continuation - ) - }, - { future -> UniffiLib.INSTANCE.ffi_xmtpv3_rust_future_free_void(future) }, - // lift function - { Unit }, - - // Error FFI converter - GenericException.ErrorHandler, - ) + callWithPointer { thisPtr -> + UniffiLib.INSTANCE.uniffi_xmtpv3_fn_method_ffixmtpclient_apply_signature_request( + thisPtr, + FfiConverterTypeFfiSignatureRequest.lower(`signatureRequest`), + ) + }, + { future, callback, continuation -> UniffiLib.INSTANCE.ffi_xmtpv3_rust_future_poll_void(future, callback, continuation) }, + { future, continuation -> UniffiLib.INSTANCE.ffi_xmtpv3_rust_future_complete_void(future, continuation) }, + { future -> UniffiLib.INSTANCE.ffi_xmtpv3_rust_future_free_void(future) }, + // lift function + { Unit }, + + // Error FFI converter + GenericException.ErrorHandler, + ) } - + @Throws(GenericException::class) @Suppress("ASSIGNED_BUT_NEVER_ACCESSED_VARIABLE") - override suspend fun `canMessage`(`accountAddresses`: List): Map { + override suspend fun `canMessage`(`accountAddresses`: List) : Map { return uniffiRustCallAsync( - callWithPointer { thisPtr -> - UniffiLib.INSTANCE.uniffi_xmtpv3_fn_method_ffixmtpclient_can_message( - thisPtr, - FfiConverterSequenceString.lower(`accountAddresses`), - ) - }, - { future, callback, continuation -> - UniffiLib.INSTANCE.ffi_xmtpv3_rust_future_poll_rust_buffer( - future, - callback, - continuation - ) - }, - { future, continuation -> - UniffiLib.INSTANCE.ffi_xmtpv3_rust_future_complete_rust_buffer( - future, - continuation - ) - }, - { future -> UniffiLib.INSTANCE.ffi_xmtpv3_rust_future_free_rust_buffer(future) }, - // lift function - { FfiConverterMapStringBoolean.lift(it) }, - // Error FFI converter - GenericException.ErrorHandler, - ) + callWithPointer { thisPtr -> + UniffiLib.INSTANCE.uniffi_xmtpv3_fn_method_ffixmtpclient_can_message( + thisPtr, + FfiConverterSequenceString.lower(`accountAddresses`), + ) + }, + { future, callback, continuation -> UniffiLib.INSTANCE.ffi_xmtpv3_rust_future_poll_rust_buffer(future, callback, continuation) }, + { future, continuation -> UniffiLib.INSTANCE.ffi_xmtpv3_rust_future_complete_rust_buffer(future, continuation) }, + { future -> UniffiLib.INSTANCE.ffi_xmtpv3_rust_future_free_rust_buffer(future) }, + // lift function + { FfiConverterMapStringBoolean.lift(it) }, + // Error FFI converter + GenericException.ErrorHandler, + ) } - - @Throws(GenericException::class) - override fun `conversation`(`conversationId`: kotlin.ByteArray): FfiConversation { - return FfiConverterTypeFfiConversation.lift( - callWithPointer { - uniffiRustCallWithError(GenericException) { _status -> - UniffiLib.INSTANCE.uniffi_xmtpv3_fn_method_ffixmtpclient_conversation( - it, FfiConverterByteArray.lower(`conversationId`), _status - ) - } - } - ) + + @Throws(GenericException::class)override fun `conversation`(`conversationId`: kotlin.ByteArray): FfiConversation { + return FfiConverterTypeFfiConversation.lift( + callWithPointer { + uniffiRustCallWithError(GenericException) { _status -> + UniffiLib.INSTANCE.uniffi_xmtpv3_fn_method_ffixmtpclient_conversation( + it, FfiConverterByteArray.lower(`conversationId`),_status) +} } - + ) + } + override fun `conversations`(): FfiConversations { - return FfiConverterTypeFfiConversations.lift( - callWithPointer { - uniffiRustCall() { _status -> - UniffiLib.INSTANCE.uniffi_xmtpv3_fn_method_ffixmtpclient_conversations( - it, _status - ) - } - } - ) + return FfiConverterTypeFfiConversations.lift( + callWithPointer { + uniffiRustCall() { _status -> + UniffiLib.INSTANCE.uniffi_xmtpv3_fn_method_ffixmtpclient_conversations( + it, _status) +} } + ) + } + - + @Throws(GenericException::class) @Suppress("ASSIGNED_BUT_NEVER_ACCESSED_VARIABLE") override suspend fun `dbReconnect`() { return uniffiRustCallAsync( - callWithPointer { thisPtr -> - UniffiLib.INSTANCE.uniffi_xmtpv3_fn_method_ffixmtpclient_db_reconnect( - thisPtr, - - ) - }, - { future, callback, continuation -> - UniffiLib.INSTANCE.ffi_xmtpv3_rust_future_poll_void( - future, - callback, - continuation - ) - }, - { future, continuation -> - UniffiLib.INSTANCE.ffi_xmtpv3_rust_future_complete_void( - future, - continuation - ) - }, - { future -> UniffiLib.INSTANCE.ffi_xmtpv3_rust_future_free_void(future) }, - // lift function - { Unit }, - - // Error FFI converter - GenericException.ErrorHandler, - ) + callWithPointer { thisPtr -> + UniffiLib.INSTANCE.uniffi_xmtpv3_fn_method_ffixmtpclient_db_reconnect( + thisPtr, + + ) + }, + { future, callback, continuation -> UniffiLib.INSTANCE.ffi_xmtpv3_rust_future_poll_void(future, callback, continuation) }, + { future, continuation -> UniffiLib.INSTANCE.ffi_xmtpv3_rust_future_complete_void(future, continuation) }, + { future -> UniffiLib.INSTANCE.ffi_xmtpv3_rust_future_free_void(future) }, + // lift function + { Unit }, + + // Error FFI converter + GenericException.ErrorHandler, + ) } - - @Throws(GenericException::class) - override fun `dmConversation`(`targetInboxId`: kotlin.String): FfiConversation { - return FfiConverterTypeFfiConversation.lift( - callWithPointer { - uniffiRustCallWithError(GenericException) { _status -> - UniffiLib.INSTANCE.uniffi_xmtpv3_fn_method_ffixmtpclient_dm_conversation( - it, FfiConverterString.lower(`targetInboxId`), _status - ) - } - } - ) + + @Throws(GenericException::class)override fun `dmConversation`(`targetInboxId`: kotlin.String): FfiConversation { + return FfiConverterTypeFfiConversation.lift( + callWithPointer { + uniffiRustCallWithError(GenericException) { _status -> + UniffiLib.INSTANCE.uniffi_xmtpv3_fn_method_ffixmtpclient_dm_conversation( + it, FfiConverterString.lower(`targetInboxId`),_status) +} } + ) + } + - + @Throws(GenericException::class) @Suppress("ASSIGNED_BUT_NEVER_ACCESSED_VARIABLE") - override suspend fun `findInboxId`(`address`: kotlin.String): kotlin.String? { + override suspend fun `findInboxId`(`address`: kotlin.String) : kotlin.String? { return uniffiRustCallAsync( - callWithPointer { thisPtr -> - UniffiLib.INSTANCE.uniffi_xmtpv3_fn_method_ffixmtpclient_find_inbox_id( - thisPtr, - FfiConverterString.lower(`address`), - ) - }, - { future, callback, continuation -> - UniffiLib.INSTANCE.ffi_xmtpv3_rust_future_poll_rust_buffer( - future, - callback, - continuation - ) - }, - { future, continuation -> - UniffiLib.INSTANCE.ffi_xmtpv3_rust_future_complete_rust_buffer( - future, - continuation - ) - }, - { future -> UniffiLib.INSTANCE.ffi_xmtpv3_rust_future_free_rust_buffer(future) }, - // lift function - { FfiConverterOptionalString.lift(it) }, - // Error FFI converter - GenericException.ErrorHandler, - ) + callWithPointer { thisPtr -> + UniffiLib.INSTANCE.uniffi_xmtpv3_fn_method_ffixmtpclient_find_inbox_id( + thisPtr, + FfiConverterString.lower(`address`), + ) + }, + { future, callback, continuation -> UniffiLib.INSTANCE.ffi_xmtpv3_rust_future_poll_rust_buffer(future, callback, continuation) }, + { future, continuation -> UniffiLib.INSTANCE.ffi_xmtpv3_rust_future_complete_rust_buffer(future, continuation) }, + { future -> UniffiLib.INSTANCE.ffi_xmtpv3_rust_future_free_rust_buffer(future) }, + // lift function + { FfiConverterOptionalString.lift(it) }, + // Error FFI converter + GenericException.ErrorHandler, + ) } - + @Throws(GenericException::class) @Suppress("ASSIGNED_BUT_NEVER_ACCESSED_VARIABLE") - override suspend fun `getConsentState`( - `entityType`: FfiConsentEntityType, - `entity`: kotlin.String, - ): FfiConsentState { + override suspend fun `getConsentState`(`entityType`: FfiConsentEntityType, `entity`: kotlin.String) : FfiConsentState { return uniffiRustCallAsync( - callWithPointer { thisPtr -> - UniffiLib.INSTANCE.uniffi_xmtpv3_fn_method_ffixmtpclient_get_consent_state( - thisPtr, - FfiConverterTypeFfiConsentEntityType.lower(`entityType`), - FfiConverterString.lower(`entity`), - ) - }, - { future, callback, continuation -> - UniffiLib.INSTANCE.ffi_xmtpv3_rust_future_poll_rust_buffer( - future, - callback, - continuation - ) - }, - { future, continuation -> - UniffiLib.INSTANCE.ffi_xmtpv3_rust_future_complete_rust_buffer( - future, - continuation - ) - }, - { future -> UniffiLib.INSTANCE.ffi_xmtpv3_rust_future_free_rust_buffer(future) }, - // lift function - { FfiConverterTypeFfiConsentState.lift(it) }, - // Error FFI converter - GenericException.ErrorHandler, - ) + callWithPointer { thisPtr -> + UniffiLib.INSTANCE.uniffi_xmtpv3_fn_method_ffixmtpclient_get_consent_state( + thisPtr, + FfiConverterTypeFfiConsentEntityType.lower(`entityType`),FfiConverterString.lower(`entity`), + ) + }, + { future, callback, continuation -> UniffiLib.INSTANCE.ffi_xmtpv3_rust_future_poll_rust_buffer(future, callback, continuation) }, + { future, continuation -> UniffiLib.INSTANCE.ffi_xmtpv3_rust_future_complete_rust_buffer(future, continuation) }, + { future -> UniffiLib.INSTANCE.ffi_xmtpv3_rust_future_free_rust_buffer(future) }, + // lift function + { FfiConverterTypeFfiConsentState.lift(it) }, + // Error FFI converter + GenericException.ErrorHandler, + ) } - + @Throws(GenericException::class) @Suppress("ASSIGNED_BUT_NEVER_ACCESSED_VARIABLE") - override suspend fun `getLatestInboxState`(`inboxId`: kotlin.String): FfiInboxState { + override suspend fun `getLatestInboxState`(`inboxId`: kotlin.String) : FfiInboxState { return uniffiRustCallAsync( - callWithPointer { thisPtr -> - UniffiLib.INSTANCE.uniffi_xmtpv3_fn_method_ffixmtpclient_get_latest_inbox_state( - thisPtr, - FfiConverterString.lower(`inboxId`), - ) - }, - { future, callback, continuation -> - UniffiLib.INSTANCE.ffi_xmtpv3_rust_future_poll_rust_buffer( - future, - callback, - continuation - ) - }, - { future, continuation -> - UniffiLib.INSTANCE.ffi_xmtpv3_rust_future_complete_rust_buffer( - future, - continuation - ) - }, - { future -> UniffiLib.INSTANCE.ffi_xmtpv3_rust_future_free_rust_buffer(future) }, - // lift function - { FfiConverterTypeFfiInboxState.lift(it) }, - // Error FFI converter - GenericException.ErrorHandler, - ) + callWithPointer { thisPtr -> + UniffiLib.INSTANCE.uniffi_xmtpv3_fn_method_ffixmtpclient_get_latest_inbox_state( + thisPtr, + FfiConverterString.lower(`inboxId`), + ) + }, + { future, callback, continuation -> UniffiLib.INSTANCE.ffi_xmtpv3_rust_future_poll_rust_buffer(future, callback, continuation) }, + { future, continuation -> UniffiLib.INSTANCE.ffi_xmtpv3_rust_future_complete_rust_buffer(future, continuation) }, + { future -> UniffiLib.INSTANCE.ffi_xmtpv3_rust_future_free_rust_buffer(future) }, + // lift function + { FfiConverterTypeFfiInboxState.lift(it) }, + // Error FFI converter + GenericException.ErrorHandler, + ) } override fun `inboxId`(): kotlin.String { - return FfiConverterString.lift( - callWithPointer { - uniffiRustCall() { _status -> - UniffiLib.INSTANCE.uniffi_xmtpv3_fn_method_ffixmtpclient_inbox_id( - it, _status - ) - } - } - ) + return FfiConverterString.lift( + callWithPointer { + uniffiRustCall() { _status -> + UniffiLib.INSTANCE.uniffi_xmtpv3_fn_method_ffixmtpclient_inbox_id( + it, _status) +} } + ) + } + - + /** * * Get the client's inbox state. * * @@ -9506,348 +8421,260 @@ open class FfiXmtpClient : Disposable, AutoCloseable, FfiXmtpClientInterface { */ @Throws(GenericException::class) @Suppress("ASSIGNED_BUT_NEVER_ACCESSED_VARIABLE") - override suspend fun `inboxState`(`refreshFromNetwork`: kotlin.Boolean): FfiInboxState { + override suspend fun `inboxState`(`refreshFromNetwork`: kotlin.Boolean) : FfiInboxState { return uniffiRustCallAsync( - callWithPointer { thisPtr -> - UniffiLib.INSTANCE.uniffi_xmtpv3_fn_method_ffixmtpclient_inbox_state( - thisPtr, - FfiConverterBoolean.lower(`refreshFromNetwork`), - ) - }, - { future, callback, continuation -> - UniffiLib.INSTANCE.ffi_xmtpv3_rust_future_poll_rust_buffer( - future, - callback, - continuation - ) - }, - { future, continuation -> - UniffiLib.INSTANCE.ffi_xmtpv3_rust_future_complete_rust_buffer( - future, - continuation - ) - }, - { future -> UniffiLib.INSTANCE.ffi_xmtpv3_rust_future_free_rust_buffer(future) }, - // lift function - { FfiConverterTypeFfiInboxState.lift(it) }, - // Error FFI converter - GenericException.ErrorHandler, - ) + callWithPointer { thisPtr -> + UniffiLib.INSTANCE.uniffi_xmtpv3_fn_method_ffixmtpclient_inbox_state( + thisPtr, + FfiConverterBoolean.lower(`refreshFromNetwork`), + ) + }, + { future, callback, continuation -> UniffiLib.INSTANCE.ffi_xmtpv3_rust_future_poll_rust_buffer(future, callback, continuation) }, + { future, continuation -> UniffiLib.INSTANCE.ffi_xmtpv3_rust_future_complete_rust_buffer(future, continuation) }, + { future -> UniffiLib.INSTANCE.ffi_xmtpv3_rust_future_free_rust_buffer(future) }, + // lift function + { FfiConverterTypeFfiInboxState.lift(it) }, + // Error FFI converter + GenericException.ErrorHandler, + ) } override fun `installationId`(): kotlin.ByteArray { - return FfiConverterByteArray.lift( - callWithPointer { - uniffiRustCall() { _status -> - UniffiLib.INSTANCE.uniffi_xmtpv3_fn_method_ffixmtpclient_installation_id( - it, _status - ) - } - } - ) + return FfiConverterByteArray.lift( + callWithPointer { + uniffiRustCall() { _status -> + UniffiLib.INSTANCE.uniffi_xmtpv3_fn_method_ffixmtpclient_installation_id( + it, _status) +} } - - - @Throws(GenericException::class) - override fun `message`(`messageId`: kotlin.ByteArray): FfiMessage { - return FfiConverterTypeFfiMessage.lift( - callWithPointer { - uniffiRustCallWithError(GenericException) { _status -> - UniffiLib.INSTANCE.uniffi_xmtpv3_fn_method_ffixmtpclient_message( - it, FfiConverterByteArray.lower(`messageId`), _status - ) - } - } - ) + ) } + + + @Throws(GenericException::class)override fun `message`(`messageId`: kotlin.ByteArray): FfiMessage { + return FfiConverterTypeFfiMessage.lift( + callWithPointer { + uniffiRustCallWithError(GenericException) { _status -> + UniffiLib.INSTANCE.uniffi_xmtpv3_fn_method_ffixmtpclient_message( + it, FfiConverterByteArray.lower(`messageId`),_status) +} + } + ) + } + + @Throws(GenericException::class) @Suppress("ASSIGNED_BUT_NEVER_ACCESSED_VARIABLE") override suspend fun `registerIdentity`(`signatureRequest`: FfiSignatureRequest) { return uniffiRustCallAsync( - callWithPointer { thisPtr -> - UniffiLib.INSTANCE.uniffi_xmtpv3_fn_method_ffixmtpclient_register_identity( - thisPtr, - FfiConverterTypeFfiSignatureRequest.lower(`signatureRequest`), - ) - }, - { future, callback, continuation -> - UniffiLib.INSTANCE.ffi_xmtpv3_rust_future_poll_void( - future, - callback, - continuation - ) - }, - { future, continuation -> - UniffiLib.INSTANCE.ffi_xmtpv3_rust_future_complete_void( - future, - continuation - ) - }, - { future -> UniffiLib.INSTANCE.ffi_xmtpv3_rust_future_free_void(future) }, - // lift function - { Unit }, - - // Error FFI converter - GenericException.ErrorHandler, - ) + callWithPointer { thisPtr -> + UniffiLib.INSTANCE.uniffi_xmtpv3_fn_method_ffixmtpclient_register_identity( + thisPtr, + FfiConverterTypeFfiSignatureRequest.lower(`signatureRequest`), + ) + }, + { future, callback, continuation -> UniffiLib.INSTANCE.ffi_xmtpv3_rust_future_poll_void(future, callback, continuation) }, + { future, continuation -> UniffiLib.INSTANCE.ffi_xmtpv3_rust_future_complete_void(future, continuation) }, + { future -> UniffiLib.INSTANCE.ffi_xmtpv3_rust_future_free_void(future) }, + // lift function + { Unit }, + + // Error FFI converter + GenericException.ErrorHandler, + ) } + + @Throws(GenericException::class)override fun `releaseDbConnection`() + = + callWithPointer { + uniffiRustCallWithError(GenericException) { _status -> + UniffiLib.INSTANCE.uniffi_xmtpv3_fn_method_ffixmtpclient_release_db_connection( + it, _status) +} + } + + - @Throws(GenericException::class) - override fun `releaseDbConnection`() = - callWithPointer { - uniffiRustCallWithError(GenericException) { _status -> - UniffiLib.INSTANCE.uniffi_xmtpv3_fn_method_ffixmtpclient_release_db_connection( - it, _status - ) - } - } - - + /** * * Revokes all installations except the one the client is currently using */ @Throws(GenericException::class) @Suppress("ASSIGNED_BUT_NEVER_ACCESSED_VARIABLE") - override suspend fun `revokeAllOtherInstallations`(): FfiSignatureRequest { + override suspend fun `revokeAllOtherInstallations`() : FfiSignatureRequest { return uniffiRustCallAsync( - callWithPointer { thisPtr -> - UniffiLib.INSTANCE.uniffi_xmtpv3_fn_method_ffixmtpclient_revoke_all_other_installations( - thisPtr, - - ) - }, - { future, callback, continuation -> - UniffiLib.INSTANCE.ffi_xmtpv3_rust_future_poll_pointer( - future, - callback, - continuation - ) - }, - { future, continuation -> - UniffiLib.INSTANCE.ffi_xmtpv3_rust_future_complete_pointer( - future, - continuation - ) - }, - { future -> UniffiLib.INSTANCE.ffi_xmtpv3_rust_future_free_pointer(future) }, - // lift function - { FfiConverterTypeFfiSignatureRequest.lift(it) }, - // Error FFI converter - GenericException.ErrorHandler, - ) + callWithPointer { thisPtr -> + UniffiLib.INSTANCE.uniffi_xmtpv3_fn_method_ffixmtpclient_revoke_all_other_installations( + thisPtr, + + ) + }, + { future, callback, continuation -> UniffiLib.INSTANCE.ffi_xmtpv3_rust_future_poll_pointer(future, callback, continuation) }, + { future, continuation -> UniffiLib.INSTANCE.ffi_xmtpv3_rust_future_complete_pointer(future, continuation) }, + { future -> UniffiLib.INSTANCE.ffi_xmtpv3_rust_future_free_pointer(future) }, + // lift function + { FfiConverterTypeFfiSignatureRequest.lift(it) }, + // Error FFI converter + GenericException.ErrorHandler, + ) } - + /** * * Revoke a list of installations */ @Throws(GenericException::class) @Suppress("ASSIGNED_BUT_NEVER_ACCESSED_VARIABLE") - override suspend fun `revokeInstallations`(`installationIds`: List): FfiSignatureRequest { + override suspend fun `revokeInstallations`(`installationIds`: List) : FfiSignatureRequest { return uniffiRustCallAsync( - callWithPointer { thisPtr -> - UniffiLib.INSTANCE.uniffi_xmtpv3_fn_method_ffixmtpclient_revoke_installations( - thisPtr, - FfiConverterSequenceByteArray.lower(`installationIds`), - ) - }, - { future, callback, continuation -> - UniffiLib.INSTANCE.ffi_xmtpv3_rust_future_poll_pointer( - future, - callback, - continuation - ) - }, - { future, continuation -> - UniffiLib.INSTANCE.ffi_xmtpv3_rust_future_complete_pointer( - future, - continuation - ) - }, - { future -> UniffiLib.INSTANCE.ffi_xmtpv3_rust_future_free_pointer(future) }, - // lift function - { FfiConverterTypeFfiSignatureRequest.lift(it) }, - // Error FFI converter - GenericException.ErrorHandler, - ) + callWithPointer { thisPtr -> + UniffiLib.INSTANCE.uniffi_xmtpv3_fn_method_ffixmtpclient_revoke_installations( + thisPtr, + FfiConverterSequenceByteArray.lower(`installationIds`), + ) + }, + { future, callback, continuation -> UniffiLib.INSTANCE.ffi_xmtpv3_rust_future_poll_pointer(future, callback, continuation) }, + { future, continuation -> UniffiLib.INSTANCE.ffi_xmtpv3_rust_future_complete_pointer(future, continuation) }, + { future -> UniffiLib.INSTANCE.ffi_xmtpv3_rust_future_free_pointer(future) }, + // lift function + { FfiConverterTypeFfiSignatureRequest.lift(it) }, + // Error FFI converter + GenericException.ErrorHandler, + ) } - + /** * Revokes or removes an identity - really a wallet address - from the existing client */ @Throws(GenericException::class) @Suppress("ASSIGNED_BUT_NEVER_ACCESSED_VARIABLE") - override suspend fun `revokeWallet`(`walletAddress`: kotlin.String): FfiSignatureRequest { + override suspend fun `revokeWallet`(`walletAddress`: kotlin.String) : FfiSignatureRequest { return uniffiRustCallAsync( - callWithPointer { thisPtr -> - UniffiLib.INSTANCE.uniffi_xmtpv3_fn_method_ffixmtpclient_revoke_wallet( - thisPtr, - FfiConverterString.lower(`walletAddress`), - ) - }, - { future, callback, continuation -> - UniffiLib.INSTANCE.ffi_xmtpv3_rust_future_poll_pointer( - future, - callback, - continuation - ) - }, - { future, continuation -> - UniffiLib.INSTANCE.ffi_xmtpv3_rust_future_complete_pointer( - future, - continuation - ) - }, - { future -> UniffiLib.INSTANCE.ffi_xmtpv3_rust_future_free_pointer(future) }, - // lift function - { FfiConverterTypeFfiSignatureRequest.lift(it) }, - // Error FFI converter - GenericException.ErrorHandler, - ) + callWithPointer { thisPtr -> + UniffiLib.INSTANCE.uniffi_xmtpv3_fn_method_ffixmtpclient_revoke_wallet( + thisPtr, + FfiConverterString.lower(`walletAddress`), + ) + }, + { future, callback, continuation -> UniffiLib.INSTANCE.ffi_xmtpv3_rust_future_poll_pointer(future, callback, continuation) }, + { future, continuation -> UniffiLib.INSTANCE.ffi_xmtpv3_rust_future_complete_pointer(future, continuation) }, + { future -> UniffiLib.INSTANCE.ffi_xmtpv3_rust_future_free_pointer(future) }, + // lift function + { FfiConverterTypeFfiSignatureRequest.lift(it) }, + // Error FFI converter + GenericException.ErrorHandler, + ) } - + @Throws(GenericException::class) @Suppress("ASSIGNED_BUT_NEVER_ACCESSED_VARIABLE") override suspend fun `sendSyncRequest`(`kind`: FfiDeviceSyncKind) { return uniffiRustCallAsync( - callWithPointer { thisPtr -> - UniffiLib.INSTANCE.uniffi_xmtpv3_fn_method_ffixmtpclient_send_sync_request( - thisPtr, - FfiConverterTypeFfiDeviceSyncKind.lower(`kind`), - ) - }, - { future, callback, continuation -> - UniffiLib.INSTANCE.ffi_xmtpv3_rust_future_poll_void( - future, - callback, - continuation - ) - }, - { future, continuation -> - UniffiLib.INSTANCE.ffi_xmtpv3_rust_future_complete_void( - future, - continuation - ) - }, - { future -> UniffiLib.INSTANCE.ffi_xmtpv3_rust_future_free_void(future) }, - // lift function - { Unit }, - - // Error FFI converter - GenericException.ErrorHandler, - ) + callWithPointer { thisPtr -> + UniffiLib.INSTANCE.uniffi_xmtpv3_fn_method_ffixmtpclient_send_sync_request( + thisPtr, + FfiConverterTypeFfiDeviceSyncKind.lower(`kind`), + ) + }, + { future, callback, continuation -> UniffiLib.INSTANCE.ffi_xmtpv3_rust_future_poll_void(future, callback, continuation) }, + { future, continuation -> UniffiLib.INSTANCE.ffi_xmtpv3_rust_future_complete_void(future, continuation) }, + { future -> UniffiLib.INSTANCE.ffi_xmtpv3_rust_future_free_void(future) }, + // lift function + { Unit }, + + // Error FFI converter + GenericException.ErrorHandler, + ) } - + @Throws(GenericException::class) @Suppress("ASSIGNED_BUT_NEVER_ACCESSED_VARIABLE") override suspend fun `setConsentStates`(`records`: List) { return uniffiRustCallAsync( - callWithPointer { thisPtr -> - UniffiLib.INSTANCE.uniffi_xmtpv3_fn_method_ffixmtpclient_set_consent_states( - thisPtr, - FfiConverterSequenceTypeFfiConsent.lower(`records`), - ) - }, - { future, callback, continuation -> - UniffiLib.INSTANCE.ffi_xmtpv3_rust_future_poll_void( - future, - callback, - continuation - ) - }, - { future, continuation -> - UniffiLib.INSTANCE.ffi_xmtpv3_rust_future_complete_void( - future, - continuation - ) - }, - { future -> UniffiLib.INSTANCE.ffi_xmtpv3_rust_future_free_void(future) }, - // lift function - { Unit }, - - // Error FFI converter - GenericException.ErrorHandler, - ) + callWithPointer { thisPtr -> + UniffiLib.INSTANCE.uniffi_xmtpv3_fn_method_ffixmtpclient_set_consent_states( + thisPtr, + FfiConverterSequenceTypeFfiConsent.lower(`records`), + ) + }, + { future, callback, continuation -> UniffiLib.INSTANCE.ffi_xmtpv3_rust_future_poll_void(future, callback, continuation) }, + { future, continuation -> UniffiLib.INSTANCE.ffi_xmtpv3_rust_future_complete_void(future, continuation) }, + { future -> UniffiLib.INSTANCE.ffi_xmtpv3_rust_future_free_void(future) }, + // lift function + { Unit }, + + // Error FFI converter + GenericException.ErrorHandler, + ) } - - @Throws(GenericException::class) - override fun `signWithInstallationKey`(`text`: kotlin.String): kotlin.ByteArray { - return FfiConverterByteArray.lift( - callWithPointer { - uniffiRustCallWithError(GenericException) { _status -> - UniffiLib.INSTANCE.uniffi_xmtpv3_fn_method_ffixmtpclient_sign_with_installation_key( - it, FfiConverterString.lower(`text`), _status - ) - } - } - ) + + @Throws(GenericException::class)override fun `signWithInstallationKey`(`text`: kotlin.String): kotlin.ByteArray { + return FfiConverterByteArray.lift( + callWithPointer { + uniffiRustCallWithError(GenericException) { _status -> + UniffiLib.INSTANCE.uniffi_xmtpv3_fn_method_ffixmtpclient_sign_with_installation_key( + it, FfiConverterString.lower(`text`),_status) +} } - + ) + } + override fun `signatureRequest`(): FfiSignatureRequest? { - return FfiConverterOptionalTypeFfiSignatureRequest.lift( - callWithPointer { - uniffiRustCall() { _status -> - UniffiLib.INSTANCE.uniffi_xmtpv3_fn_method_ffixmtpclient_signature_request( - it, _status - ) - } - } - ) + return FfiConverterOptionalTypeFfiSignatureRequest.lift( + callWithPointer { + uniffiRustCall() { _status -> + UniffiLib.INSTANCE.uniffi_xmtpv3_fn_method_ffixmtpclient_signature_request( + it, _status) +} } + ) + } + + + @Throws(GenericException::class)override fun `verifySignedWithInstallationKey`(`signatureText`: kotlin.String, `signatureBytes`: kotlin.ByteArray) + = + callWithPointer { + uniffiRustCallWithError(GenericException) { _status -> + UniffiLib.INSTANCE.uniffi_xmtpv3_fn_method_ffixmtpclient_verify_signed_with_installation_key( + it, FfiConverterString.lower(`signatureText`),FfiConverterByteArray.lower(`signatureBytes`),_status) +} + } + + - @Throws(GenericException::class) - override fun `verifySignedWithInstallationKey`( - `signatureText`: kotlin.String, - `signatureBytes`: kotlin.ByteArray, - ) = - callWithPointer { - uniffiRustCallWithError(GenericException) { _status -> - UniffiLib.INSTANCE.uniffi_xmtpv3_fn_method_ffixmtpclient_verify_signed_with_installation_key( - it, - FfiConverterString.lower(`signatureText`), - FfiConverterByteArray.lower(`signatureBytes`), - _status - ) - } - } - - - @Throws(GenericException::class) - override fun `verifySignedWithPublicKey`( - `signatureText`: kotlin.String, - `signatureBytes`: kotlin.ByteArray, - `publicKey`: kotlin.ByteArray, - ) = - callWithPointer { - uniffiRustCallWithError(GenericException) { _status -> - UniffiLib.INSTANCE.uniffi_xmtpv3_fn_method_ffixmtpclient_verify_signed_with_public_key( - it, - FfiConverterString.lower(`signatureText`), - FfiConverterByteArray.lower(`signatureBytes`), - FfiConverterByteArray.lower(`publicKey`), - _status - ) - } - } + + @Throws(GenericException::class)override fun `verifySignedWithPublicKey`(`signatureText`: kotlin.String, `signatureBytes`: kotlin.ByteArray, `publicKey`: kotlin.ByteArray) + = + callWithPointer { + uniffiRustCallWithError(GenericException) { _status -> + UniffiLib.INSTANCE.uniffi_xmtpv3_fn_method_ffixmtpclient_verify_signed_with_public_key( + it, FfiConverterString.lower(`signatureText`),FfiConverterByteArray.lower(`signatureBytes`),FfiConverterByteArray.lower(`publicKey`),_status) +} + } + + + + + companion object - + } /** * @suppress */ -public object FfiConverterTypeFfiXmtpClient : FfiConverter { +public object FfiConverterTypeFfiXmtpClient: FfiConverter { override fun lower(value: FfiXmtpClient): Pointer { return value.uniffiClonePointer() @@ -9972,11 +8799,11 @@ public object FfiConverterTypeFfiXmtpClient : FfiConverter { +public object FfiConverterTypeXmtpApiClient: FfiConverter { override fun lower(value: XmtpApiClient): Pointer { return value.uniffiClonePointer() @@ -10091,19 +8921,20 @@ public object FfiConverterTypeXmtpApiClient : FfiConverter { +public object FfiConverterTypeFfiConsent: FfiConverterRustBuffer { override fun read(buf: ByteBuffer): FfiConsent { return FfiConsent( FfiConverterTypeFfiConsentEntityType.read(buf), @@ -10114,34 +8945,34 @@ public object FfiConverterTypeFfiConsent : FfiConverterRustBuffer { override fun allocationSize(value: FfiConsent) = ( FfiConverterTypeFfiConsentEntityType.allocationSize(value.`entityType`) + - FfiConverterTypeFfiConsentState.allocationSize(value.`state`) + - FfiConverterString.allocationSize(value.`entity`) - ) + FfiConverterTypeFfiConsentState.allocationSize(value.`state`) + + FfiConverterString.allocationSize(value.`entity`) + ) override fun write(value: FfiConsent, buf: ByteBuffer) { - FfiConverterTypeFfiConsentEntityType.write(value.`entityType`, buf) - FfiConverterTypeFfiConsentState.write(value.`state`, buf) - FfiConverterString.write(value.`entity`, buf) + FfiConverterTypeFfiConsentEntityType.write(value.`entityType`, buf) + FfiConverterTypeFfiConsentState.write(value.`state`, buf) + FfiConverterString.write(value.`entity`, buf) } } -data class FfiConversationMember( - var `inboxId`: kotlin.String, - var `accountAddresses`: List, - var `installationIds`: List, - var `permissionLevel`: FfiPermissionLevel, - var `consentState`: FfiConsentState, -) { +data class FfiConversationMember ( + var `inboxId`: kotlin.String, + var `accountAddresses`: List, + var `installationIds`: List, + var `permissionLevel`: FfiPermissionLevel, + var `consentState`: FfiConsentState +) { + companion object } /** * @suppress */ -public object FfiConverterTypeFfiConversationMember : - FfiConverterRustBuffer { +public object FfiConverterTypeFfiConversationMember: FfiConverterRustBuffer { override fun read(buf: ByteBuffer): FfiConversationMember { return FfiConversationMember( FfiConverterString.read(buf), @@ -10154,39 +8985,41 @@ public object FfiConverterTypeFfiConversationMember : override fun allocationSize(value: FfiConversationMember) = ( FfiConverterString.allocationSize(value.`inboxId`) + - FfiConverterSequenceString.allocationSize(value.`accountAddresses`) + - FfiConverterSequenceByteArray.allocationSize(value.`installationIds`) + - FfiConverterTypeFfiPermissionLevel.allocationSize(value.`permissionLevel`) + - FfiConverterTypeFfiConsentState.allocationSize(value.`consentState`) - ) + FfiConverterSequenceString.allocationSize(value.`accountAddresses`) + + FfiConverterSequenceByteArray.allocationSize(value.`installationIds`) + + FfiConverterTypeFfiPermissionLevel.allocationSize(value.`permissionLevel`) + + FfiConverterTypeFfiConsentState.allocationSize(value.`consentState`) + ) override fun write(value: FfiConversationMember, buf: ByteBuffer) { - FfiConverterString.write(value.`inboxId`, buf) - FfiConverterSequenceString.write(value.`accountAddresses`, buf) - FfiConverterSequenceByteArray.write(value.`installationIds`, buf) - FfiConverterTypeFfiPermissionLevel.write(value.`permissionLevel`, buf) - FfiConverterTypeFfiConsentState.write(value.`consentState`, buf) + FfiConverterString.write(value.`inboxId`, buf) + FfiConverterSequenceString.write(value.`accountAddresses`, buf) + FfiConverterSequenceByteArray.write(value.`installationIds`, buf) + FfiConverterTypeFfiPermissionLevel.write(value.`permissionLevel`, buf) + FfiConverterTypeFfiConsentState.write(value.`consentState`, buf) } } -data class FfiCreateGroupOptions( - var `permissions`: FfiGroupPermissionsOptions?, - var `groupName`: kotlin.String?, - var `groupImageUrlSquare`: kotlin.String?, - var `groupDescription`: kotlin.String?, - var `groupPinnedFrameUrl`: kotlin.String?, - var `customPermissionPolicySet`: FfiPermissionPolicySet?, -) { +data class FfiCreateGroupOptions ( + var `permissions`: FfiGroupPermissionsOptions?, + var `groupName`: kotlin.String?, + var `groupImageUrlSquare`: kotlin.String?, + var `groupDescription`: kotlin.String?, + var `groupPinnedFrameUrl`: kotlin.String?, + var `customPermissionPolicySet`: FfiPermissionPolicySet?, + var `messageExpirationFromMs`: kotlin.Long?, + var `messageExpirationMs`: kotlin.Long? +) { + companion object } /** * @suppress */ -public object FfiConverterTypeFfiCreateGroupOptions : - FfiConverterRustBuffer { +public object FfiConverterTypeFfiCreateGroupOptions: FfiConverterRustBuffer { override fun read(buf: ByteBuffer): FfiCreateGroupOptions { return FfiCreateGroupOptions( FfiConverterOptionalTypeFfiGroupPermissionsOptions.read(buf), @@ -10195,41 +9028,48 @@ public object FfiConverterTypeFfiCreateGroupOptions : FfiConverterOptionalString.read(buf), FfiConverterOptionalString.read(buf), FfiConverterOptionalTypeFfiPermissionPolicySet.read(buf), + FfiConverterOptionalLong.read(buf), + FfiConverterOptionalLong.read(buf), ) } override fun allocationSize(value: FfiCreateGroupOptions) = ( FfiConverterOptionalTypeFfiGroupPermissionsOptions.allocationSize(value.`permissions`) + - FfiConverterOptionalString.allocationSize(value.`groupName`) + - FfiConverterOptionalString.allocationSize(value.`groupImageUrlSquare`) + - FfiConverterOptionalString.allocationSize(value.`groupDescription`) + - FfiConverterOptionalString.allocationSize(value.`groupPinnedFrameUrl`) + - FfiConverterOptionalTypeFfiPermissionPolicySet.allocationSize(value.`customPermissionPolicySet`) - ) + FfiConverterOptionalString.allocationSize(value.`groupName`) + + FfiConverterOptionalString.allocationSize(value.`groupImageUrlSquare`) + + FfiConverterOptionalString.allocationSize(value.`groupDescription`) + + FfiConverterOptionalString.allocationSize(value.`groupPinnedFrameUrl`) + + FfiConverterOptionalTypeFfiPermissionPolicySet.allocationSize(value.`customPermissionPolicySet`) + + FfiConverterOptionalLong.allocationSize(value.`messageExpirationFromMs`) + + FfiConverterOptionalLong.allocationSize(value.`messageExpirationMs`) + ) override fun write(value: FfiCreateGroupOptions, buf: ByteBuffer) { - FfiConverterOptionalTypeFfiGroupPermissionsOptions.write(value.`permissions`, buf) - FfiConverterOptionalString.write(value.`groupName`, buf) - FfiConverterOptionalString.write(value.`groupImageUrlSquare`, buf) - FfiConverterOptionalString.write(value.`groupDescription`, buf) - FfiConverterOptionalString.write(value.`groupPinnedFrameUrl`, buf) - FfiConverterOptionalTypeFfiPermissionPolicySet.write(value.`customPermissionPolicySet`, buf) + FfiConverterOptionalTypeFfiGroupPermissionsOptions.write(value.`permissions`, buf) + FfiConverterOptionalString.write(value.`groupName`, buf) + FfiConverterOptionalString.write(value.`groupImageUrlSquare`, buf) + FfiConverterOptionalString.write(value.`groupDescription`, buf) + FfiConverterOptionalString.write(value.`groupPinnedFrameUrl`, buf) + FfiConverterOptionalTypeFfiPermissionPolicySet.write(value.`customPermissionPolicySet`, buf) + FfiConverterOptionalLong.write(value.`messageExpirationFromMs`, buf) + FfiConverterOptionalLong.write(value.`messageExpirationMs`, buf) } } -data class FfiCursor( - var `digest`: kotlin.ByteArray, - var `senderTimeNs`: kotlin.ULong, -) { +data class FfiCursor ( + var `digest`: kotlin.ByteArray, + var `senderTimeNs`: kotlin.ULong +) { + companion object } /** * @suppress */ -public object FfiConverterTypeFfiCursor : FfiConverterRustBuffer { +public object FfiConverterTypeFfiCursor: FfiConverterRustBuffer { override fun read(buf: ByteBuffer): FfiCursor { return FfiCursor( FfiConverterByteArray.read(buf), @@ -10239,29 +9079,30 @@ public object FfiConverterTypeFfiCursor : FfiConverterRustBuffer { override fun allocationSize(value: FfiCursor) = ( FfiConverterByteArray.allocationSize(value.`digest`) + - FfiConverterULong.allocationSize(value.`senderTimeNs`) - ) + FfiConverterULong.allocationSize(value.`senderTimeNs`) + ) override fun write(value: FfiCursor, buf: ByteBuffer) { - FfiConverterByteArray.write(value.`digest`, buf) - FfiConverterULong.write(value.`senderTimeNs`, buf) + FfiConverterByteArray.write(value.`digest`, buf) + FfiConverterULong.write(value.`senderTimeNs`, buf) } } -data class FfiEnvelope( - var `contentTopic`: kotlin.String, - var `timestampNs`: kotlin.ULong, - var `message`: kotlin.ByteArray, -) { +data class FfiEnvelope ( + var `contentTopic`: kotlin.String, + var `timestampNs`: kotlin.ULong, + var `message`: kotlin.ByteArray +) { + companion object } /** * @suppress */ -public object FfiConverterTypeFfiEnvelope : FfiConverterRustBuffer { +public object FfiConverterTypeFfiEnvelope: FfiConverterRustBuffer { override fun read(buf: ByteBuffer): FfiEnvelope { return FfiEnvelope( FfiConverterString.read(buf), @@ -10272,30 +9113,31 @@ public object FfiConverterTypeFfiEnvelope : FfiConverterRustBuffer override fun allocationSize(value: FfiEnvelope) = ( FfiConverterString.allocationSize(value.`contentTopic`) + - FfiConverterULong.allocationSize(value.`timestampNs`) + - FfiConverterByteArray.allocationSize(value.`message`) - ) + FfiConverterULong.allocationSize(value.`timestampNs`) + + FfiConverterByteArray.allocationSize(value.`message`) + ) override fun write(value: FfiEnvelope, buf: ByteBuffer) { - FfiConverterString.write(value.`contentTopic`, buf) - FfiConverterULong.write(value.`timestampNs`, buf) - FfiConverterByteArray.write(value.`message`, buf) + FfiConverterString.write(value.`contentTopic`, buf) + FfiConverterULong.write(value.`timestampNs`, buf) + FfiConverterByteArray.write(value.`message`, buf) } } -data class FfiHmacKey( - var `key`: kotlin.ByteArray, - var `epoch`: kotlin.Long, -) { +data class FfiHmacKey ( + var `key`: kotlin.ByteArray, + var `epoch`: kotlin.Long +) { + companion object } /** * @suppress */ -public object FfiConverterTypeFfiHmacKey : FfiConverterRustBuffer { +public object FfiConverterTypeFfiHmacKey: FfiConverterRustBuffer { override fun read(buf: ByteBuffer): FfiHmacKey { return FfiHmacKey( FfiConverterByteArray.read(buf), @@ -10305,30 +9147,31 @@ public object FfiConverterTypeFfiHmacKey : FfiConverterRustBuffer { override fun allocationSize(value: FfiHmacKey) = ( FfiConverterByteArray.allocationSize(value.`key`) + - FfiConverterLong.allocationSize(value.`epoch`) - ) + FfiConverterLong.allocationSize(value.`epoch`) + ) override fun write(value: FfiHmacKey, buf: ByteBuffer) { - FfiConverterByteArray.write(value.`key`, buf) - FfiConverterLong.write(value.`epoch`, buf) + FfiConverterByteArray.write(value.`key`, buf) + FfiConverterLong.write(value.`epoch`, buf) } } -data class FfiInboxState( - var `inboxId`: kotlin.String, - var `recoveryAddress`: kotlin.String, - var `installations`: List, - var `accountAddresses`: List, -) { +data class FfiInboxState ( + var `inboxId`: kotlin.String, + var `recoveryAddress`: kotlin.String, + var `installations`: List, + var `accountAddresses`: List +) { + companion object } /** * @suppress */ -public object FfiConverterTypeFfiInboxState : FfiConverterRustBuffer { +public object FfiConverterTypeFfiInboxState: FfiConverterRustBuffer { override fun read(buf: ByteBuffer): FfiInboxState { return FfiInboxState( FfiConverterString.read(buf), @@ -10340,32 +9183,33 @@ public object FfiConverterTypeFfiInboxState : FfiConverterRustBuffer { +public object FfiConverterTypeFfiInstallation: FfiConverterRustBuffer { override fun read(buf: ByteBuffer): FfiInstallation { return FfiInstallation( FfiConverterByteArray.read(buf), @@ -10375,32 +9219,32 @@ public object FfiConverterTypeFfiInstallation : FfiConverterRustBuffer { +public object FfiConverterTypeFfiListConversationsOptions: FfiConverterRustBuffer { override fun read(buf: ByteBuffer): FfiListConversationsOptions { return FfiListConversationsOptions( FfiConverterOptionalLong.read(buf), @@ -10413,39 +9257,39 @@ public object FfiConverterTypeFfiListConversationsOptions : override fun allocationSize(value: FfiListConversationsOptions) = ( FfiConverterOptionalLong.allocationSize(value.`createdAfterNs`) + - FfiConverterOptionalLong.allocationSize(value.`createdBeforeNs`) + - FfiConverterOptionalLong.allocationSize(value.`limit`) + - FfiConverterOptionalTypeFfiConsentState.allocationSize(value.`consentState`) + - FfiConverterBoolean.allocationSize(value.`includeDuplicateDms`) - ) + FfiConverterOptionalLong.allocationSize(value.`createdBeforeNs`) + + FfiConverterOptionalLong.allocationSize(value.`limit`) + + FfiConverterOptionalTypeFfiConsentState.allocationSize(value.`consentState`) + + FfiConverterBoolean.allocationSize(value.`includeDuplicateDms`) + ) override fun write(value: FfiListConversationsOptions, buf: ByteBuffer) { - FfiConverterOptionalLong.write(value.`createdAfterNs`, buf) - FfiConverterOptionalLong.write(value.`createdBeforeNs`, buf) - FfiConverterOptionalLong.write(value.`limit`, buf) - FfiConverterOptionalTypeFfiConsentState.write(value.`consentState`, buf) - FfiConverterBoolean.write(value.`includeDuplicateDms`, buf) + FfiConverterOptionalLong.write(value.`createdAfterNs`, buf) + FfiConverterOptionalLong.write(value.`createdBeforeNs`, buf) + FfiConverterOptionalLong.write(value.`limit`, buf) + FfiConverterOptionalTypeFfiConsentState.write(value.`consentState`, buf) + FfiConverterBoolean.write(value.`includeDuplicateDms`, buf) } } -data class FfiListMessagesOptions( - var `sentBeforeNs`: kotlin.Long?, - var `sentAfterNs`: kotlin.Long?, - var `limit`: kotlin.Long?, - var `deliveryStatus`: FfiDeliveryStatus?, - var `direction`: FfiDirection?, - var `contentTypes`: List?, -) { +data class FfiListMessagesOptions ( + var `sentBeforeNs`: kotlin.Long?, + var `sentAfterNs`: kotlin.Long?, + var `limit`: kotlin.Long?, + var `deliveryStatus`: FfiDeliveryStatus?, + var `direction`: FfiDirection?, + var `contentTypes`: List? +) { + companion object } /** * @suppress */ -public object FfiConverterTypeFfiListMessagesOptions : - FfiConverterRustBuffer { +public object FfiConverterTypeFfiListMessagesOptions: FfiConverterRustBuffer { override fun read(buf: ByteBuffer): FfiListMessagesOptions { return FfiListMessagesOptions( FfiConverterOptionalLong.read(buf), @@ -10459,41 +9303,42 @@ public object FfiConverterTypeFfiListMessagesOptions : override fun allocationSize(value: FfiListMessagesOptions) = ( FfiConverterOptionalLong.allocationSize(value.`sentBeforeNs`) + - FfiConverterOptionalLong.allocationSize(value.`sentAfterNs`) + - FfiConverterOptionalLong.allocationSize(value.`limit`) + - FfiConverterOptionalTypeFfiDeliveryStatus.allocationSize(value.`deliveryStatus`) + - FfiConverterOptionalTypeFfiDirection.allocationSize(value.`direction`) + - FfiConverterOptionalSequenceTypeFfiContentType.allocationSize(value.`contentTypes`) - ) + FfiConverterOptionalLong.allocationSize(value.`sentAfterNs`) + + FfiConverterOptionalLong.allocationSize(value.`limit`) + + FfiConverterOptionalTypeFfiDeliveryStatus.allocationSize(value.`deliveryStatus`) + + FfiConverterOptionalTypeFfiDirection.allocationSize(value.`direction`) + + FfiConverterOptionalSequenceTypeFfiContentType.allocationSize(value.`contentTypes`) + ) override fun write(value: FfiListMessagesOptions, buf: ByteBuffer) { - FfiConverterOptionalLong.write(value.`sentBeforeNs`, buf) - FfiConverterOptionalLong.write(value.`sentAfterNs`, buf) - FfiConverterOptionalLong.write(value.`limit`, buf) - FfiConverterOptionalTypeFfiDeliveryStatus.write(value.`deliveryStatus`, buf) - FfiConverterOptionalTypeFfiDirection.write(value.`direction`, buf) - FfiConverterOptionalSequenceTypeFfiContentType.write(value.`contentTypes`, buf) + FfiConverterOptionalLong.write(value.`sentBeforeNs`, buf) + FfiConverterOptionalLong.write(value.`sentAfterNs`, buf) + FfiConverterOptionalLong.write(value.`limit`, buf) + FfiConverterOptionalTypeFfiDeliveryStatus.write(value.`deliveryStatus`, buf) + FfiConverterOptionalTypeFfiDirection.write(value.`direction`, buf) + FfiConverterOptionalSequenceTypeFfiContentType.write(value.`contentTypes`, buf) } } -data class FfiMessage( - var `id`: kotlin.ByteArray, - var `sentAtNs`: kotlin.Long, - var `convoId`: kotlin.ByteArray, - var `senderInboxId`: kotlin.String, - var `content`: kotlin.ByteArray, - var `kind`: FfiConversationMessageKind, - var `deliveryStatus`: FfiDeliveryStatus, + +data class FfiMessage ( + var `id`: kotlin.ByteArray, + var `sentAtNs`: kotlin.Long, + var `convoId`: kotlin.ByteArray, + var `senderInboxId`: kotlin.String, + var `content`: kotlin.ByteArray, + var `kind`: FfiConversationMessageKind, + var `deliveryStatus`: FfiDeliveryStatus ) { - + companion object } /** * @suppress */ -public object FfiConverterTypeFfiMessage : FfiConverterRustBuffer { +public object FfiConverterTypeFfiMessage: FfiConverterRustBuffer { override fun read(buf: ByteBuffer): FfiMessage { return FfiMessage( FfiConverterByteArray.read(buf), @@ -10508,39 +9353,72 @@ public object FfiConverterTypeFfiMessage : FfiConverterRustBuffer { override fun allocationSize(value: FfiMessage) = ( FfiConverterByteArray.allocationSize(value.`id`) + - FfiConverterLong.allocationSize(value.`sentAtNs`) + - FfiConverterByteArray.allocationSize(value.`convoId`) + - FfiConverterString.allocationSize(value.`senderInboxId`) + - FfiConverterByteArray.allocationSize(value.`content`) + - FfiConverterTypeFfiConversationMessageKind.allocationSize(value.`kind`) + - FfiConverterTypeFfiDeliveryStatus.allocationSize(value.`deliveryStatus`) - ) + FfiConverterLong.allocationSize(value.`sentAtNs`) + + FfiConverterByteArray.allocationSize(value.`convoId`) + + FfiConverterString.allocationSize(value.`senderInboxId`) + + FfiConverterByteArray.allocationSize(value.`content`) + + FfiConverterTypeFfiConversationMessageKind.allocationSize(value.`kind`) + + FfiConverterTypeFfiDeliveryStatus.allocationSize(value.`deliveryStatus`) + ) override fun write(value: FfiMessage, buf: ByteBuffer) { - FfiConverterByteArray.write(value.`id`, buf) - FfiConverterLong.write(value.`sentAtNs`, buf) - FfiConverterByteArray.write(value.`convoId`, buf) - FfiConverterString.write(value.`senderInboxId`, buf) - FfiConverterByteArray.write(value.`content`, buf) - FfiConverterTypeFfiConversationMessageKind.write(value.`kind`, buf) - FfiConverterTypeFfiDeliveryStatus.write(value.`deliveryStatus`, buf) + FfiConverterByteArray.write(value.`id`, buf) + FfiConverterLong.write(value.`sentAtNs`, buf) + FfiConverterByteArray.write(value.`convoId`, buf) + FfiConverterString.write(value.`senderInboxId`, buf) + FfiConverterByteArray.write(value.`content`, buf) + FfiConverterTypeFfiConversationMessageKind.write(value.`kind`, buf) + FfiConverterTypeFfiDeliveryStatus.write(value.`deliveryStatus`, buf) } } -data class FfiPagingInfo( - var `limit`: kotlin.UInt, - var `cursor`: FfiCursor?, - var `direction`: FfiSortDirection, + +data class FfiMessageWithReactions ( + var `message`: FfiMessage, + var `reactions`: List ) { + + companion object +} + +/** + * @suppress + */ +public object FfiConverterTypeFfiMessageWithReactions: FfiConverterRustBuffer { + override fun read(buf: ByteBuffer): FfiMessageWithReactions { + return FfiMessageWithReactions( + FfiConverterTypeFfiMessage.read(buf), + FfiConverterSequenceTypeFfiMessage.read(buf), + ) + } + + override fun allocationSize(value: FfiMessageWithReactions) = ( + FfiConverterTypeFfiMessage.allocationSize(value.`message`) + + FfiConverterSequenceTypeFfiMessage.allocationSize(value.`reactions`) + ) + override fun write(value: FfiMessageWithReactions, buf: ByteBuffer) { + FfiConverterTypeFfiMessage.write(value.`message`, buf) + FfiConverterSequenceTypeFfiMessage.write(value.`reactions`, buf) + } +} + + + +data class FfiPagingInfo ( + var `limit`: kotlin.UInt, + var `cursor`: FfiCursor?, + var `direction`: FfiSortDirection +) { + companion object } /** * @suppress */ -public object FfiConverterTypeFfiPagingInfo : FfiConverterRustBuffer { +public object FfiConverterTypeFfiPagingInfo: FfiConverterRustBuffer { override fun read(buf: ByteBuffer): FfiPagingInfo { return FfiPagingInfo( FfiConverterUInt.read(buf), @@ -10551,37 +9429,38 @@ public object FfiConverterTypeFfiPagingInfo : FfiConverterRustBuffer { +public object FfiConverterTypeFfiPermissionPolicySet: FfiConverterRustBuffer { override fun read(buf: ByteBuffer): FfiPermissionPolicySet { return FfiPermissionPolicySet( FfiConverterTypeFfiPermissionPolicy.read(buf), @@ -10592,44 +9471,48 @@ public object FfiConverterTypeFfiPermissionPolicySet : FfiConverterTypeFfiPermissionPolicy.read(buf), FfiConverterTypeFfiPermissionPolicy.read(buf), FfiConverterTypeFfiPermissionPolicy.read(buf), + FfiConverterTypeFfiPermissionPolicy.read(buf), ) } override fun allocationSize(value: FfiPermissionPolicySet) = ( FfiConverterTypeFfiPermissionPolicy.allocationSize(value.`addMemberPolicy`) + - FfiConverterTypeFfiPermissionPolicy.allocationSize(value.`removeMemberPolicy`) + - FfiConverterTypeFfiPermissionPolicy.allocationSize(value.`addAdminPolicy`) + - FfiConverterTypeFfiPermissionPolicy.allocationSize(value.`removeAdminPolicy`) + - FfiConverterTypeFfiPermissionPolicy.allocationSize(value.`updateGroupNamePolicy`) + - FfiConverterTypeFfiPermissionPolicy.allocationSize(value.`updateGroupDescriptionPolicy`) + - FfiConverterTypeFfiPermissionPolicy.allocationSize(value.`updateGroupImageUrlSquarePolicy`) + - FfiConverterTypeFfiPermissionPolicy.allocationSize(value.`updateGroupPinnedFrameUrlPolicy`) - ) + FfiConverterTypeFfiPermissionPolicy.allocationSize(value.`removeMemberPolicy`) + + FfiConverterTypeFfiPermissionPolicy.allocationSize(value.`addAdminPolicy`) + + FfiConverterTypeFfiPermissionPolicy.allocationSize(value.`removeAdminPolicy`) + + FfiConverterTypeFfiPermissionPolicy.allocationSize(value.`updateGroupNamePolicy`) + + FfiConverterTypeFfiPermissionPolicy.allocationSize(value.`updateGroupDescriptionPolicy`) + + FfiConverterTypeFfiPermissionPolicy.allocationSize(value.`updateGroupImageUrlSquarePolicy`) + + FfiConverterTypeFfiPermissionPolicy.allocationSize(value.`updateGroupPinnedFrameUrlPolicy`) + + FfiConverterTypeFfiPermissionPolicy.allocationSize(value.`updateMessageExpirationMsPolicy`) + ) override fun write(value: FfiPermissionPolicySet, buf: ByteBuffer) { - FfiConverterTypeFfiPermissionPolicy.write(value.`addMemberPolicy`, buf) - FfiConverterTypeFfiPermissionPolicy.write(value.`removeMemberPolicy`, buf) - FfiConverterTypeFfiPermissionPolicy.write(value.`addAdminPolicy`, buf) - FfiConverterTypeFfiPermissionPolicy.write(value.`removeAdminPolicy`, buf) - FfiConverterTypeFfiPermissionPolicy.write(value.`updateGroupNamePolicy`, buf) - FfiConverterTypeFfiPermissionPolicy.write(value.`updateGroupDescriptionPolicy`, buf) - FfiConverterTypeFfiPermissionPolicy.write(value.`updateGroupImageUrlSquarePolicy`, buf) - FfiConverterTypeFfiPermissionPolicy.write(value.`updateGroupPinnedFrameUrlPolicy`, buf) + FfiConverterTypeFfiPermissionPolicy.write(value.`addMemberPolicy`, buf) + FfiConverterTypeFfiPermissionPolicy.write(value.`removeMemberPolicy`, buf) + FfiConverterTypeFfiPermissionPolicy.write(value.`addAdminPolicy`, buf) + FfiConverterTypeFfiPermissionPolicy.write(value.`removeAdminPolicy`, buf) + FfiConverterTypeFfiPermissionPolicy.write(value.`updateGroupNamePolicy`, buf) + FfiConverterTypeFfiPermissionPolicy.write(value.`updateGroupDescriptionPolicy`, buf) + FfiConverterTypeFfiPermissionPolicy.write(value.`updateGroupImageUrlSquarePolicy`, buf) + FfiConverterTypeFfiPermissionPolicy.write(value.`updateGroupPinnedFrameUrlPolicy`, buf) + FfiConverterTypeFfiPermissionPolicy.write(value.`updateMessageExpirationMsPolicy`, buf) } } -data class FfiPublishRequest( - var `envelopes`: List, -) { +data class FfiPublishRequest ( + var `envelopes`: List +) { + companion object } /** * @suppress */ -public object FfiConverterTypeFfiPublishRequest : FfiConverterRustBuffer { +public object FfiConverterTypeFfiPublishRequest: FfiConverterRustBuffer { override fun read(buf: ByteBuffer): FfiPublishRequest { return FfiPublishRequest( FfiConverterSequenceTypeFfiEnvelope.read(buf), @@ -10638,26 +9521,70 @@ public object FfiConverterTypeFfiPublishRequest : FfiConverterRustBuffer, + +data class FfiReaction ( + var `reference`: kotlin.String, + var `referenceInboxId`: kotlin.String, + var `action`: FfiReactionAction, + var `content`: kotlin.String, + var `schema`: FfiReactionSchema ) { + + companion object +} + +/** + * @suppress + */ +public object FfiConverterTypeFfiReaction: FfiConverterRustBuffer { + override fun read(buf: ByteBuffer): FfiReaction { + return FfiReaction( + FfiConverterString.read(buf), + FfiConverterString.read(buf), + FfiConverterTypeFfiReactionAction.read(buf), + FfiConverterString.read(buf), + FfiConverterTypeFfiReactionSchema.read(buf), + ) + } + + override fun allocationSize(value: FfiReaction) = ( + FfiConverterString.allocationSize(value.`reference`) + + FfiConverterString.allocationSize(value.`referenceInboxId`) + + FfiConverterTypeFfiReactionAction.allocationSize(value.`action`) + + FfiConverterString.allocationSize(value.`content`) + + FfiConverterTypeFfiReactionSchema.allocationSize(value.`schema`) + ) + + override fun write(value: FfiReaction, buf: ByteBuffer) { + FfiConverterString.write(value.`reference`, buf) + FfiConverterString.write(value.`referenceInboxId`, buf) + FfiConverterTypeFfiReactionAction.write(value.`action`, buf) + FfiConverterString.write(value.`content`, buf) + FfiConverterTypeFfiReactionSchema.write(value.`schema`, buf) + } +} + + +data class FfiV2BatchQueryRequest ( + var `requests`: List +) { + companion object } /** * @suppress */ -public object FfiConverterTypeFfiV2BatchQueryRequest : - FfiConverterRustBuffer { +public object FfiConverterTypeFfiV2BatchQueryRequest: FfiConverterRustBuffer { override fun read(buf: ByteBuffer): FfiV2BatchQueryRequest { return FfiV2BatchQueryRequest( FfiConverterSequenceTypeFfiV2QueryRequest.read(buf), @@ -10666,26 +9593,26 @@ public object FfiConverterTypeFfiV2BatchQueryRequest : override fun allocationSize(value: FfiV2BatchQueryRequest) = ( FfiConverterSequenceTypeFfiV2QueryRequest.allocationSize(value.`requests`) - ) + ) override fun write(value: FfiV2BatchQueryRequest, buf: ByteBuffer) { - FfiConverterSequenceTypeFfiV2QueryRequest.write(value.`requests`, buf) + FfiConverterSequenceTypeFfiV2QueryRequest.write(value.`requests`, buf) } } -data class FfiV2BatchQueryResponse( - var `responses`: List, -) { +data class FfiV2BatchQueryResponse ( + var `responses`: List +) { + companion object } /** * @suppress */ -public object FfiConverterTypeFfiV2BatchQueryResponse : - FfiConverterRustBuffer { +public object FfiConverterTypeFfiV2BatchQueryResponse: FfiConverterRustBuffer { override fun read(buf: ByteBuffer): FfiV2BatchQueryResponse { return FfiV2BatchQueryResponse( FfiConverterSequenceTypeFfiV2QueryResponse.read(buf), @@ -10694,28 +9621,29 @@ public object FfiConverterTypeFfiV2BatchQueryResponse : override fun allocationSize(value: FfiV2BatchQueryResponse) = ( FfiConverterSequenceTypeFfiV2QueryResponse.allocationSize(value.`responses`) - ) + ) override fun write(value: FfiV2BatchQueryResponse, buf: ByteBuffer) { - FfiConverterSequenceTypeFfiV2QueryResponse.write(value.`responses`, buf) + FfiConverterSequenceTypeFfiV2QueryResponse.write(value.`responses`, buf) } } -data class FfiV2QueryRequest( - var `contentTopics`: List, - var `startTimeNs`: kotlin.ULong, - var `endTimeNs`: kotlin.ULong, - var `pagingInfo`: FfiPagingInfo?, -) { +data class FfiV2QueryRequest ( + var `contentTopics`: List, + var `startTimeNs`: kotlin.ULong, + var `endTimeNs`: kotlin.ULong, + var `pagingInfo`: FfiPagingInfo? +) { + companion object } /** * @suppress */ -public object FfiConverterTypeFfiV2QueryRequest : FfiConverterRustBuffer { +public object FfiConverterTypeFfiV2QueryRequest: FfiConverterRustBuffer { override fun read(buf: ByteBuffer): FfiV2QueryRequest { return FfiV2QueryRequest( FfiConverterSequenceString.read(buf), @@ -10727,32 +9655,33 @@ public object FfiConverterTypeFfiV2QueryRequest : FfiConverterRustBuffer, - var `pagingInfo`: FfiPagingInfo?, -) { +data class FfiV2QueryResponse ( + var `envelopes`: List, + var `pagingInfo`: FfiPagingInfo? +) { + companion object } /** * @suppress */ -public object FfiConverterTypeFfiV2QueryResponse : FfiConverterRustBuffer { +public object FfiConverterTypeFfiV2QueryResponse: FfiConverterRustBuffer { override fun read(buf: ByteBuffer): FfiV2QueryResponse { return FfiV2QueryResponse( FfiConverterSequenceTypeFfiEnvelope.read(buf), @@ -10762,28 +9691,28 @@ public object FfiConverterTypeFfiV2QueryResponse : FfiConverterRustBuffer, -) { +data class FfiV2SubscribeRequest ( + var `contentTopics`: List +) { + companion object } /** * @suppress */ -public object FfiConverterTypeFfiV2SubscribeRequest : - FfiConverterRustBuffer { +public object FfiConverterTypeFfiV2SubscribeRequest: FfiConverterRustBuffer { override fun read(buf: ByteBuffer): FfiV2SubscribeRequest { return FfiV2SubscribeRequest( FfiConverterSequenceString.read(buf), @@ -10792,20 +9721,21 @@ public object FfiConverterTypeFfiV2SubscribeRequest : override fun allocationSize(value: FfiV2SubscribeRequest) = ( FfiConverterSequenceString.allocationSize(value.`contentTopics`) - ) + ) override fun write(value: FfiV2SubscribeRequest, buf: ByteBuffer) { - FfiConverterSequenceString.write(value.`contentTopics`, buf) + FfiConverterSequenceString.write(value.`contentTopics`, buf) } } -enum class FfiConsentEntityType { + +enum class FfiConsentEntityType { + CONVERSATION_ID, INBOX_ID, ADDRESS; - companion object } @@ -10813,7 +9743,7 @@ enum class FfiConsentEntityType { /** * @suppress */ -public object FfiConverterTypeFfiConsentEntityType : FfiConverterRustBuffer { +public object FfiConverterTypeFfiConsentEntityType: FfiConverterRustBuffer { override fun read(buf: ByteBuffer) = try { FfiConsentEntityType.values()[buf.getInt() - 1] } catch (e: IndexOutOfBoundsException) { @@ -10828,12 +9758,15 @@ public object FfiConverterTypeFfiConsentEntityType : FfiConverterRustBuffer { +public object FfiConverterTypeFfiConsentState: FfiConverterRustBuffer { override fun read(buf: ByteBuffer) = try { FfiConsentState.values()[buf.getInt() - 1] } catch (e: IndexOutOfBoundsException) { @@ -10856,8 +9789,12 @@ public object FfiConverterTypeFfiConsentState : FfiConverterRustBuffer { +public object FfiConverterTypeFfiContentType: FfiConverterRustBuffer { override fun read(buf: ByteBuffer) = try { FfiContentType.values()[buf.getInt() - 1] } catch (e: IndexOutOfBoundsException) { @@ -10891,11 +9827,14 @@ public object FfiConverterTypeFfiContentType : FfiConverterRustBuffer { +public object FfiConverterTypeFfiConversationMessageKind: FfiConverterRustBuffer { override fun read(buf: ByteBuffer) = try { FfiConversationMessageKind.values()[buf.getInt() - 1] } catch (e: IndexOutOfBoundsException) { @@ -10919,12 +9857,15 @@ public object FfiConverterTypeFfiConversationMessageKind : } -enum class FfiConversationType { + + + +enum class FfiConversationType { + GROUP, DM, SYNC; - companion object } @@ -10932,7 +9873,7 @@ enum class FfiConversationType { /** * @suppress */ -public object FfiConverterTypeFfiConversationType : FfiConverterRustBuffer { +public object FfiConverterTypeFfiConversationType: FfiConverterRustBuffer { override fun read(buf: ByteBuffer) = try { FfiConversationType.values()[buf.getInt() - 1] } catch (e: IndexOutOfBoundsException) { @@ -10947,12 +9888,15 @@ public object FfiConverterTypeFfiConversationType : FfiConverterRustBuffer { +public object FfiConverterTypeFfiDeliveryStatus: FfiConverterRustBuffer { override fun read(buf: ByteBuffer) = try { FfiDeliveryStatus.values()[buf.getInt() - 1] } catch (e: IndexOutOfBoundsException) { @@ -10975,11 +9919,14 @@ public object FfiConverterTypeFfiDeliveryStatus : FfiConverterRustBuffer { +public object FfiConverterTypeFfiDeviceSyncKind: FfiConverterRustBuffer { override fun read(buf: ByteBuffer) = try { FfiDeviceSyncKind.values()[buf.getInt() - 1] } catch (e: IndexOutOfBoundsException) { @@ -11002,11 +9949,14 @@ public object FfiConverterTypeFfiDeviceSyncKind : FfiConverterRustBuffer { +public object FfiConverterTypeFfiDirection: FfiConverterRustBuffer { override fun read(buf: ByteBuffer) = try { FfiDirection.values()[buf.getInt() - 1] } catch (e: IndexOutOfBoundsException) { @@ -11029,12 +9979,15 @@ public object FfiConverterTypeFfiDirection : FfiConverterRustBuffer { +public object FfiConverterTypeFfiGroupPermissionsOptions: FfiConverterRustBuffer { override fun read(buf: ByteBuffer) = try { FfiGroupPermissionsOptions.values()[buf.getInt() - 1] } catch (e: IndexOutOfBoundsException) { @@ -11058,13 +10010,16 @@ public object FfiConverterTypeFfiGroupPermissionsOptions : } -enum class FfiMetadataField { + + + +enum class FfiMetadataField { + GROUP_NAME, DESCRIPTION, IMAGE_URL_SQUARE, PINNED_FRAME_URL; - companion object } @@ -11072,7 +10027,7 @@ enum class FfiMetadataField { /** * @suppress */ -public object FfiConverterTypeFfiMetadataField : FfiConverterRustBuffer { +public object FfiConverterTypeFfiMetadataField: FfiConverterRustBuffer { override fun read(buf: ByteBuffer) = try { FfiMetadataField.values()[buf.getInt() - 1] } catch (e: IndexOutOfBoundsException) { @@ -11087,12 +10042,15 @@ public object FfiConverterTypeFfiMetadataField : FfiConverterRustBuffer { +public object FfiConverterTypeFfiPermissionLevel: FfiConverterRustBuffer { override fun read(buf: ByteBuffer) = try { FfiPermissionLevel.values()[buf.getInt() - 1] } catch (e: IndexOutOfBoundsException) { @@ -11115,15 +10073,18 @@ public object FfiConverterTypeFfiPermissionLevel : FfiConverterRustBuffer { +public object FfiConverterTypeFfiPermissionPolicy: FfiConverterRustBuffer { override fun read(buf: ByteBuffer) = try { FfiPermissionPolicy.values()[buf.getInt() - 1] } catch (e: IndexOutOfBoundsException) { @@ -11146,14 +10107,17 @@ public object FfiConverterTypeFfiPermissionPolicy : FfiConverterRustBuffer { +public object FfiConverterTypeFfiPermissionUpdateType: FfiConverterRustBuffer { override fun read(buf: ByteBuffer) = try { FfiPermissionUpdateType.values()[buf.getInt() - 1] } catch (e: IndexOutOfBoundsException) { @@ -11177,44 +10140,46 @@ public object FfiConverterTypeFfiPermissionUpdateType : } -sealed class FfiPreferenceUpdate { + + +sealed class FfiPreferenceUpdate { + data class Hmac( - val `key`: kotlin.ByteArray, - ) : FfiPreferenceUpdate() { + val `key`: kotlin.ByteArray) : FfiPreferenceUpdate() { companion object } + - + companion object } /** * @suppress */ -public object FfiConverterTypeFfiPreferenceUpdate : FfiConverterRustBuffer { +public object FfiConverterTypeFfiPreferenceUpdate : FfiConverterRustBuffer{ override fun read(buf: ByteBuffer): FfiPreferenceUpdate { - return when (buf.getInt()) { + return when(buf.getInt()) { 1 -> FfiPreferenceUpdate.Hmac( FfiConverterByteArray.read(buf), - ) - + ) else -> throw RuntimeException("invalid enum value, something is very wrong!!") } } - override fun allocationSize(value: FfiPreferenceUpdate) = when (value) { + override fun allocationSize(value: FfiPreferenceUpdate) = when(value) { is FfiPreferenceUpdate.Hmac -> { // Add the size for the Int that specifies the variant plus the size needed for all fields ( - 4UL - + FfiConverterByteArray.allocationSize(value.`key`) - ) + 4UL + + FfiConverterByteArray.allocationSize(value.`key`) + ) } } override fun write(value: FfiPreferenceUpdate, buf: ByteBuffer) { - when (value) { + when(value) { is FfiPreferenceUpdate.Hmac -> { buf.putInt(1) FfiConverterByteArray.write(value.`key`, buf) @@ -11225,12 +10190,78 @@ public object FfiConverterTypeFfiPreferenceUpdate : FfiConverterRustBuffer { + override fun read(buf: ByteBuffer) = try { + FfiReactionAction.values()[buf.getInt() - 1] + } catch (e: IndexOutOfBoundsException) { + throw RuntimeException("invalid enum value, something is very wrong!!", e) + } + + override fun allocationSize(value: FfiReactionAction) = 4UL + + override fun write(value: FfiReactionAction, buf: ByteBuffer) { + buf.putInt(value.ordinal + 1) + } +} + + + + + + +enum class FfiReactionSchema { + + UNKNOWN, + UNICODE, + SHORTCODE, + CUSTOM; + companion object +} + + +/** + * @suppress + */ +public object FfiConverterTypeFfiReactionSchema: FfiConverterRustBuffer { + override fun read(buf: ByteBuffer) = try { + FfiReactionSchema.values()[buf.getInt() - 1] + } catch (e: IndexOutOfBoundsException) { + throw RuntimeException("invalid enum value, something is very wrong!!", e) + } + + override fun allocationSize(value: FfiReactionSchema) = 4UL + + override fun write(value: FfiReactionSchema, buf: ByteBuffer) { + buf.putInt(value.ordinal + 1) + } +} + + + + + + +enum class FfiSortDirection { + UNSPECIFIED, ASCENDING, DESCENDING; - companion object } @@ -11238,7 +10269,7 @@ enum class FfiSortDirection { /** * @suppress */ -public object FfiConverterTypeFfiSortDirection : FfiConverterRustBuffer { +public object FfiConverterTypeFfiSortDirection: FfiConverterRustBuffer { override fun read(buf: ByteBuffer) = try { FfiSortDirection.values()[buf.getInt() - 1] } catch (e: IndexOutOfBoundsException) { @@ -11253,16 +10284,20 @@ public object FfiConverterTypeFfiSortDirection : FfiConverterRustBuffer { - override fun lift(error_buf: RustBuffer.ByValue): FfiSubscribeException = - FfiConverterTypeFfiSubscribeError.lift(error_buf) + override fun lift(error_buf: RustBuffer.ByValue): FfiSubscribeException = FfiConverterTypeFfiSubscribeError.lift(error_buf) } } @@ -11271,13 +10306,13 @@ sealed class FfiSubscribeException(message: String) : kotlin.Exception(message) */ public object FfiConverterTypeFfiSubscribeError : FfiConverterRustBuffer { override fun read(buf: ByteBuffer): FfiSubscribeException { - - return when (buf.getInt()) { + + return when(buf.getInt()) { 1 -> FfiSubscribeException.Subscribe(FfiConverterString.read(buf)) 2 -> FfiSubscribeException.Storage(FfiConverterString.read(buf)) else -> throw RuntimeException("invalid error enum value, something is very wrong!!") } - + } override fun allocationSize(value: FfiSubscribeException): ULong { @@ -11285,12 +10320,11 @@ public object FfiConverterTypeFfiSubscribeError : FfiConverterRustBuffer { buf.putInt(1) Unit } - is FfiSubscribeException.Storage -> { buf.putInt(2) Unit @@ -11301,44 +10335,46 @@ public object FfiConverterTypeFfiSubscribeError : FfiConverterRustBuffer { - override fun lift(error_buf: RustBuffer.ByValue): GenericException = - FfiConverterTypeGenericError.lift(error_buf) + override fun lift(error_buf: RustBuffer.ByValue): GenericException = FfiConverterTypeGenericError.lift(error_buf) } } @@ -11347,8 +10383,8 @@ sealed class GenericException(message: String) : kotlin.Exception(message) { */ public object FfiConverterTypeGenericError : FfiConverterRustBuffer { override fun read(buf: ByteBuffer): GenericException { - - return when (buf.getInt()) { + + return when(buf.getInt()) { 1 -> GenericException.Client(FfiConverterString.read(buf)) 2 -> GenericException.ClientBuilder(FfiConverterString.read(buf)) 3 -> GenericException.Storage(FfiConverterString.read(buf)) @@ -11367,7 +10403,7 @@ public object FfiConverterTypeGenericError : FfiConverterRustBuffer GenericException.Identity(FfiConverterString.read(buf)) else -> throw RuntimeException("invalid error enum value, something is very wrong!!") } - + } override fun allocationSize(value: GenericException): ULong { @@ -11375,82 +10411,67 @@ public object FfiConverterTypeGenericError : FfiConverterRustBuffer { buf.putInt(1) Unit } - is GenericException.ClientBuilder -> { buf.putInt(2) Unit } - is GenericException.Storage -> { buf.putInt(3) Unit } - is GenericException.ApiException -> { buf.putInt(4) Unit } - is GenericException.GroupException -> { buf.putInt(5) Unit } - is GenericException.Signature -> { buf.putInt(6) Unit } - is GenericException.GroupMetadata -> { buf.putInt(7) Unit } - is GenericException.GroupMutablePermissions -> { buf.putInt(8) Unit } - is GenericException.Generic -> { buf.putInt(9) Unit } - is GenericException.SignatureRequestException -> { buf.putInt(10) Unit } - is GenericException.Erc1271SignatureException -> { buf.putInt(11) Unit } - is GenericException.Verifier -> { buf.putInt(12) Unit } - is GenericException.FailedToConvertToU32 -> { buf.putInt(13) Unit } - is GenericException.Association -> { buf.putInt(14) Unit } - is GenericException.DeviceSync -> { buf.putInt(15) Unit } - is GenericException.Identity -> { buf.putInt(16) Unit @@ -11461,14 +10482,16 @@ public object FfiConverterTypeGenericError : FfiConverterRustBuffer { - override fun lift(error_buf: RustBuffer.ByValue): SigningException = - FfiConverterTypeSigningError.lift(error_buf) + override fun lift(error_buf: RustBuffer.ByValue): SigningException = FfiConverterTypeSigningError.lift(error_buf) } } @@ -11477,12 +10500,12 @@ sealed class SigningException(message: String) : kotlin.Exception(message) { */ public object FfiConverterTypeSigningError : FfiConverterRustBuffer { override fun read(buf: ByteBuffer): SigningException { - - return when (buf.getInt()) { + + return when(buf.getInt()) { 1 -> SigningException.Generic(FfiConverterString.read(buf)) else -> throw RuntimeException("invalid error enum value, something is very wrong!!") } - + } override fun allocationSize(value: SigningException): ULong { @@ -11490,7 +10513,7 @@ public object FfiConverterTypeSigningError : FfiConverterRustBuffer { buf.putInt(1) Unit @@ -11501,53 +10524,42 @@ public object FfiConverterTypeSigningError : FfiConverterRustBuffer uniffiObj.`getAddress`( ) } - val writeReturn = - { value: kotlin.String -> uniffiOutReturn.setValue(FfiConverterString.lower(value)) } + val writeReturn = { value: kotlin.String -> uniffiOutReturn.setValue(FfiConverterString.lower(value)) } uniffiTraitInterfaceCall(uniffiCallStatus, makeCall, writeReturn) } } - - internal object `sign` : UniffiCallbackInterfaceFfiInboxOwnerMethod1 { - override fun callback( - `uniffiHandle`: Long, - `text`: RustBuffer.ByValue, - `uniffiOutReturn`: RustBuffer, - uniffiCallStatus: UniffiRustCallStatus, - ) { + internal object `sign`: UniffiCallbackInterfaceFfiInboxOwnerMethod1 { + override fun callback(`uniffiHandle`: Long,`text`: RustBuffer.ByValue,`uniffiOutReturn`: RustBuffer,uniffiCallStatus: UniffiRustCallStatus,) { val uniffiObj = FfiConverterTypeFfiInboxOwner.handleMap.get(uniffiHandle) val makeCall = { -> uniffiObj.`sign`( FfiConverterString.lift(`text`), ) } - val writeReturn = { value: kotlin.ByteArray -> - uniffiOutReturn.setValue( - FfiConverterByteArray.lower(value) - ) - } + val writeReturn = { value: kotlin.ByteArray -> uniffiOutReturn.setValue(FfiConverterByteArray.lower(value)) } uniffiTraitInterfaceCallWithError( uniffiCallStatus, makeCall, @@ -11557,7 +10569,7 @@ internal object uniffiCallbackInterfaceFfiInboxOwner { } } - internal object uniffiFree : UniffiCallbackInterfaceFree { + internal object uniffiFree: UniffiCallbackInterfaceFree { override fun callback(handle: Long) { FfiConverterTypeFfiInboxOwner.handleMap.remove(handle) } @@ -11581,13 +10593,15 @@ internal object uniffiCallbackInterfaceFfiInboxOwner { * * @suppress */ -public object FfiConverterTypeFfiInboxOwner : FfiConverterCallbackInterface() +public object FfiConverterTypeFfiInboxOwner: FfiConverterCallbackInterface() + + /** * @suppress */ -public object FfiConverterOptionalULong : FfiConverterRustBuffer { +public object FfiConverterOptionalULong: FfiConverterRustBuffer { override fun read(buf: ByteBuffer): kotlin.ULong? { if (buf.get().toInt() == 0) { return null @@ -11614,10 +10628,12 @@ public object FfiConverterOptionalULong : FfiConverterRustBuffer } + + /** * @suppress */ -public object FfiConverterOptionalLong : FfiConverterRustBuffer { +public object FfiConverterOptionalLong: FfiConverterRustBuffer { override fun read(buf: ByteBuffer): kotlin.Long? { if (buf.get().toInt() == 0) { return null @@ -11644,10 +10660,12 @@ public object FfiConverterOptionalLong : FfiConverterRustBuffer { } + + /** * @suppress */ -public object FfiConverterOptionalString : FfiConverterRustBuffer { +public object FfiConverterOptionalString: FfiConverterRustBuffer { override fun read(buf: ByteBuffer): kotlin.String? { if (buf.get().toInt() == 0) { return null @@ -11674,10 +10692,12 @@ public object FfiConverterOptionalString : FfiConverterRustBuffer { +public object FfiConverterOptionalByteArray: FfiConverterRustBuffer { override fun read(buf: ByteBuffer): kotlin.ByteArray? { if (buf.get().toInt() == 0) { return null @@ -11704,11 +10724,12 @@ public object FfiConverterOptionalByteArray : FfiConverterRustBuffer { +public object FfiConverterOptionalTypeFfiSignatureRequest: FfiConverterRustBuffer { override fun read(buf: ByteBuffer): FfiSignatureRequest? { if (buf.get().toInt() == 0) { return null @@ -11735,10 +10756,12 @@ public object FfiConverterOptionalTypeFfiSignatureRequest : } + + /** * @suppress */ -public object FfiConverterOptionalTypeFfiCursor : FfiConverterRustBuffer { +public object FfiConverterOptionalTypeFfiCursor: FfiConverterRustBuffer { override fun read(buf: ByteBuffer): FfiCursor? { if (buf.get().toInt() == 0) { return null @@ -11765,10 +10788,12 @@ public object FfiConverterOptionalTypeFfiCursor : FfiConverterRustBuffer { +public object FfiConverterOptionalTypeFfiMessage: FfiConverterRustBuffer { override fun read(buf: ByteBuffer): FfiMessage? { if (buf.get().toInt() == 0) { return null @@ -11795,10 +10820,12 @@ public object FfiConverterOptionalTypeFfiMessage : FfiConverterRustBuffer { +public object FfiConverterOptionalTypeFfiPagingInfo: FfiConverterRustBuffer { override fun read(buf: ByteBuffer): FfiPagingInfo? { if (buf.get().toInt() == 0) { return null @@ -11825,11 +10852,12 @@ public object FfiConverterOptionalTypeFfiPagingInfo : FfiConverterRustBuffer { +public object FfiConverterOptionalTypeFfiPermissionPolicySet: FfiConverterRustBuffer { override fun read(buf: ByteBuffer): FfiPermissionPolicySet? { if (buf.get().toInt() == 0) { return null @@ -11856,10 +10884,12 @@ public object FfiConverterOptionalTypeFfiPermissionPolicySet : } + + /** * @suppress */ -public object FfiConverterOptionalTypeFfiConsentState : FfiConverterRustBuffer { +public object FfiConverterOptionalTypeFfiConsentState: FfiConverterRustBuffer { override fun read(buf: ByteBuffer): FfiConsentState? { if (buf.get().toInt() == 0) { return null @@ -11886,11 +10916,12 @@ public object FfiConverterOptionalTypeFfiConsentState : FfiConverterRustBuffer { +public object FfiConverterOptionalTypeFfiConversationType: FfiConverterRustBuffer { override fun read(buf: ByteBuffer): FfiConversationType? { if (buf.get().toInt() == 0) { return null @@ -11917,11 +10948,12 @@ public object FfiConverterOptionalTypeFfiConversationType : } + + /** * @suppress */ -public object FfiConverterOptionalTypeFfiDeliveryStatus : - FfiConverterRustBuffer { +public object FfiConverterOptionalTypeFfiDeliveryStatus: FfiConverterRustBuffer { override fun read(buf: ByteBuffer): FfiDeliveryStatus? { if (buf.get().toInt() == 0) { return null @@ -11948,10 +10980,12 @@ public object FfiConverterOptionalTypeFfiDeliveryStatus : } + + /** * @suppress */ -public object FfiConverterOptionalTypeFfiDirection : FfiConverterRustBuffer { +public object FfiConverterOptionalTypeFfiDirection: FfiConverterRustBuffer { override fun read(buf: ByteBuffer): FfiDirection? { if (buf.get().toInt() == 0) { return null @@ -11978,11 +11012,12 @@ public object FfiConverterOptionalTypeFfiDirection : FfiConverterRustBuffer { +public object FfiConverterOptionalTypeFfiGroupPermissionsOptions: FfiConverterRustBuffer { override fun read(buf: ByteBuffer): FfiGroupPermissionsOptions? { if (buf.get().toInt() == 0) { return null @@ -12009,10 +11044,12 @@ public object FfiConverterOptionalTypeFfiGroupPermissionsOptions : } + + /** * @suppress */ -public object FfiConverterOptionalTypeFfiMetadataField : FfiConverterRustBuffer { +public object FfiConverterOptionalTypeFfiMetadataField: FfiConverterRustBuffer { override fun read(buf: ByteBuffer): FfiMetadataField? { if (buf.get().toInt() == 0) { return null @@ -12039,11 +11076,12 @@ public object FfiConverterOptionalTypeFfiMetadataField : FfiConverterRustBuffer< } + + /** * @suppress */ -public object FfiConverterOptionalSequenceTypeFfiContentType : - FfiConverterRustBuffer?> { +public object FfiConverterOptionalSequenceTypeFfiContentType: FfiConverterRustBuffer?> { override fun read(buf: ByteBuffer): List? { if (buf.get().toInt() == 0) { return null @@ -12070,10 +11108,12 @@ public object FfiConverterOptionalSequenceTypeFfiContentType : } + + /** * @suppress */ -public object FfiConverterSequenceString : FfiConverterRustBuffer> { +public object FfiConverterSequenceString: FfiConverterRustBuffer> { override fun read(buf: ByteBuffer): List { val len = buf.getInt() return List(len) { @@ -12096,10 +11136,12 @@ public object FfiConverterSequenceString : FfiConverterRustBuffer> { +public object FfiConverterSequenceByteArray: FfiConverterRustBuffer> { override fun read(buf: ByteBuffer): List { val len = buf.getInt() return List(len) { @@ -12122,11 +11164,12 @@ public object FfiConverterSequenceByteArray : FfiConverterRustBuffer> { +public object FfiConverterSequenceTypeFfiConversationListItem: FfiConverterRustBuffer> { override fun read(buf: ByteBuffer): List { val len = buf.getInt() return List(len) { @@ -12136,8 +11179,7 @@ public object FfiConverterSequenceTypeFfiConversationListItem : override fun allocationSize(value: List): ULong { val sizeForLength = 4UL - val sizeForItems = - value.map { FfiConverterTypeFfiConversationListItem.allocationSize(it) }.sum() + val sizeForItems = value.map { FfiConverterTypeFfiConversationListItem.allocationSize(it) }.sum() return sizeForLength + sizeForItems } @@ -12150,10 +11192,12 @@ public object FfiConverterSequenceTypeFfiConversationListItem : } + + /** * @suppress */ -public object FfiConverterSequenceTypeFfiConsent : FfiConverterRustBuffer> { +public object FfiConverterSequenceTypeFfiConsent: FfiConverterRustBuffer> { override fun read(buf: ByteBuffer): List { val len = buf.getInt() return List(len) { @@ -12176,11 +11220,12 @@ public object FfiConverterSequenceTypeFfiConsent : FfiConverterRustBuffer> { +public object FfiConverterSequenceTypeFfiConversationMember: FfiConverterRustBuffer> { override fun read(buf: ByteBuffer): List { val len = buf.getInt() return List(len) { @@ -12190,8 +11235,7 @@ public object FfiConverterSequenceTypeFfiConversationMember : override fun allocationSize(value: List): ULong { val sizeForLength = 4UL - val sizeForItems = - value.map { FfiConverterTypeFfiConversationMember.allocationSize(it) }.sum() + val sizeForItems = value.map { FfiConverterTypeFfiConversationMember.allocationSize(it) }.sum() return sizeForLength + sizeForItems } @@ -12204,10 +11248,12 @@ public object FfiConverterSequenceTypeFfiConversationMember : } + + /** * @suppress */ -public object FfiConverterSequenceTypeFfiEnvelope : FfiConverterRustBuffer> { +public object FfiConverterSequenceTypeFfiEnvelope: FfiConverterRustBuffer> { override fun read(buf: ByteBuffer): List { val len = buf.getInt() return List(len) { @@ -12230,10 +11276,12 @@ public object FfiConverterSequenceTypeFfiEnvelope : FfiConverterRustBuffer> { +public object FfiConverterSequenceTypeFfiHmacKey: FfiConverterRustBuffer> { override fun read(buf: ByteBuffer): List { val len = buf.getInt() return List(len) { @@ -12256,10 +11304,12 @@ public object FfiConverterSequenceTypeFfiHmacKey : FfiConverterRustBuffer> { +public object FfiConverterSequenceTypeFfiInboxState: FfiConverterRustBuffer> { override fun read(buf: ByteBuffer): List { val len = buf.getInt() return List(len) { @@ -12282,11 +11332,12 @@ public object FfiConverterSequenceTypeFfiInboxState : FfiConverterRustBuffer> { +public object FfiConverterSequenceTypeFfiInstallation: FfiConverterRustBuffer> { override fun read(buf: ByteBuffer): List { val len = buf.getInt() return List(len) { @@ -12309,10 +11360,12 @@ public object FfiConverterSequenceTypeFfiInstallation : } + + /** * @suppress */ -public object FfiConverterSequenceTypeFfiMessage : FfiConverterRustBuffer> { +public object FfiConverterSequenceTypeFfiMessage: FfiConverterRustBuffer> { override fun read(buf: ByteBuffer): List { val len = buf.getInt() return List(len) { @@ -12335,11 +11388,40 @@ public object FfiConverterSequenceTypeFfiMessage : FfiConverterRustBuffer> { + override fun read(buf: ByteBuffer): List { + val len = buf.getInt() + return List(len) { + FfiConverterTypeFfiMessageWithReactions.read(buf) + } + } + + override fun allocationSize(value: List): ULong { + val sizeForLength = 4UL + val sizeForItems = value.map { FfiConverterTypeFfiMessageWithReactions.allocationSize(it) }.sum() + return sizeForLength + sizeForItems + } + + override fun write(value: List, buf: ByteBuffer) { + buf.putInt(value.size) + value.iterator().forEach { + FfiConverterTypeFfiMessageWithReactions.write(it, buf) + } + } +} + + + + /** * @suppress */ -public object FfiConverterSequenceTypeFfiV2QueryRequest : - FfiConverterRustBuffer> { +public object FfiConverterSequenceTypeFfiV2QueryRequest: FfiConverterRustBuffer> { override fun read(buf: ByteBuffer): List { val len = buf.getInt() return List(len) { @@ -12362,11 +11444,12 @@ public object FfiConverterSequenceTypeFfiV2QueryRequest : } + + /** * @suppress */ -public object FfiConverterSequenceTypeFfiV2QueryResponse : - FfiConverterRustBuffer> { +public object FfiConverterSequenceTypeFfiV2QueryResponse: FfiConverterRustBuffer> { override fun read(buf: ByteBuffer): List { val len = buf.getInt() return List(len) { @@ -12389,11 +11472,12 @@ public object FfiConverterSequenceTypeFfiV2QueryResponse : } + + /** * @suppress */ -public object FfiConverterSequenceTypeFfiContentType : - FfiConverterRustBuffer> { +public object FfiConverterSequenceTypeFfiContentType: FfiConverterRustBuffer> { override fun read(buf: ByteBuffer): List { val len = buf.getInt() return List(len) { @@ -12416,11 +11500,12 @@ public object FfiConverterSequenceTypeFfiContentType : } + + /** * @suppress */ -public object FfiConverterSequenceTypeFfiPreferenceUpdate : - FfiConverterRustBuffer> { +public object FfiConverterSequenceTypeFfiPreferenceUpdate: FfiConverterRustBuffer> { override fun read(buf: ByteBuffer): List { val len = buf.getInt() return List(len) { @@ -12430,8 +11515,7 @@ public object FfiConverterSequenceTypeFfiPreferenceUpdate : override fun allocationSize(value: List): ULong { val sizeForLength = 4UL - val sizeForItems = - value.map { FfiConverterTypeFfiPreferenceUpdate.allocationSize(it) }.sum() + val sizeForItems = value.map { FfiConverterTypeFfiPreferenceUpdate.allocationSize(it) }.sum() return sizeForLength + sizeForItems } @@ -12444,11 +11528,12 @@ public object FfiConverterSequenceTypeFfiPreferenceUpdate : } + + /** * @suppress */ -public object FfiConverterMapStringBoolean : - FfiConverterRustBuffer> { +public object FfiConverterMapStringBoolean: FfiConverterRustBuffer> { override fun read(buf: ByteBuffer): Map { val len = buf.getInt() return buildMap(len) { @@ -12464,7 +11549,7 @@ public object FfiConverterMapStringBoolean : val spaceForMapSize = 4UL val spaceForChildren = value.map { (k, v) -> FfiConverterString.allocationSize(k) + - FfiConverterBoolean.allocationSize(v) + FfiConverterBoolean.allocationSize(v) }.sum() return spaceForMapSize + spaceForChildren } @@ -12482,11 +11567,12 @@ public object FfiConverterMapStringBoolean : } + + /** * @suppress */ -public object FfiConverterMapByteArraySequenceTypeFfiHmacKey : - FfiConverterRustBuffer>> { +public object FfiConverterMapByteArraySequenceTypeFfiHmacKey: FfiConverterRustBuffer>> { override fun read(buf: ByteBuffer): Map> { val len = buf.getInt() return buildMap>(len) { @@ -12502,7 +11588,7 @@ public object FfiConverterMapByteArraySequenceTypeFfiHmacKey : val spaceForMapSize = 4UL val spaceForChildren = value.map { (k, v) -> FfiConverterByteArray.allocationSize(k) + - FfiConverterSequenceTypeFfiHmacKey.allocationSize(v) + FfiConverterSequenceTypeFfiHmacKey.allocationSize(v) }.sum() return spaceForMapSize + spaceForChildren } @@ -12520,357 +11606,238 @@ public object FfiConverterMapByteArraySequenceTypeFfiHmacKey : } -@Throws(GenericException::class) -@Suppress("ASSIGNED_BUT_NEVER_ACCESSED_VARIABLE") -suspend fun `connectToBackend`(`host`: kotlin.String, `isSecure`: kotlin.Boolean): XmtpApiClient { - return uniffiRustCallAsync( - UniffiLib.INSTANCE.uniffi_xmtpv3_fn_func_connect_to_backend( - FfiConverterString.lower(`host`), - FfiConverterBoolean.lower(`isSecure`), - ), - { future, callback, continuation -> - UniffiLib.INSTANCE.ffi_xmtpv3_rust_future_poll_pointer( - future, - callback, - continuation - ) - }, - { future, continuation -> - UniffiLib.INSTANCE.ffi_xmtpv3_rust_future_complete_pointer( - future, - continuation - ) - }, + + + + + + + @Throws(GenericException::class) + @Suppress("ASSIGNED_BUT_NEVER_ACCESSED_VARIABLE") + suspend fun `connectToBackend`(`host`: kotlin.String, `isSecure`: kotlin.Boolean) : XmtpApiClient { + return uniffiRustCallAsync( + UniffiLib.INSTANCE.uniffi_xmtpv3_fn_func_connect_to_backend(FfiConverterString.lower(`host`),FfiConverterBoolean.lower(`isSecure`),), + { future, callback, continuation -> UniffiLib.INSTANCE.ffi_xmtpv3_rust_future_poll_pointer(future, callback, continuation) }, + { future, continuation -> UniffiLib.INSTANCE.ffi_xmtpv3_rust_future_complete_pointer(future, continuation) }, { future -> UniffiLib.INSTANCE.ffi_xmtpv3_rust_future_free_pointer(future) }, // lift function { FfiConverterTypeXmtpApiClient.lift(it) }, // Error FFI converter GenericException.ErrorHandler, ) -} + } -/** - * It returns a new client of the specified `inbox_id`. - * Note that the `inbox_id` must be either brand new or already associated with the `account_address`. - * i.e. `inbox_id` cannot be associated with another account address. - * - * Prior to calling this function, it's suggested to form `inbox_id`, `account_address`, and `nonce` like below. - * - * ```text - * inbox_id = get_inbox_id_for_address(account_address) - * nonce = 0 - * - * // if inbox_id is not associated, we will create new one. - * if !inbox_id { - * if !legacy_key { nonce = random_u64() } - * inbox_id = generate_inbox_id(account_address, nonce) - * } // Otherwise, we will just use the inbox and ignore the nonce. - * db_path = $inbox_id-$env - * - * xmtp.create_client(account_address, nonce, inbox_id, Option) - * ``` - */ -@Throws(GenericException::class) -@Suppress("ASSIGNED_BUT_NEVER_ACCESSED_VARIABLE") -suspend fun `createClient`( - `api`: XmtpApiClient, - `db`: kotlin.String?, - `encryptionKey`: kotlin.ByteArray?, - `inboxId`: kotlin.String, - `accountAddress`: kotlin.String, - `nonce`: kotlin.ULong, - `legacySignedPrivateKeyProto`: kotlin.ByteArray?, - `historySyncUrl`: kotlin.String?, -): FfiXmtpClient { - return uniffiRustCallAsync( - UniffiLib.INSTANCE.uniffi_xmtpv3_fn_func_create_client( - FfiConverterTypeXmtpApiClient.lower( - `api` - ), - FfiConverterOptionalString.lower(`db`), - FfiConverterOptionalByteArray.lower(`encryptionKey`), - FfiConverterString.lower(`inboxId`), - FfiConverterString.lower(`accountAddress`), - FfiConverterULong.lower(`nonce`), - FfiConverterOptionalByteArray.lower(`legacySignedPrivateKeyProto`), - FfiConverterOptionalString.lower(`historySyncUrl`), - ), - { future, callback, continuation -> - UniffiLib.INSTANCE.ffi_xmtpv3_rust_future_poll_pointer( - future, - callback, - continuation - ) - }, - { future, continuation -> - UniffiLib.INSTANCE.ffi_xmtpv3_rust_future_complete_pointer( - future, - continuation - ) - }, + /** + * It returns a new client of the specified `inbox_id`. + * Note that the `inbox_id` must be either brand new or already associated with the `account_address`. + * i.e. `inbox_id` cannot be associated with another account address. + * + * Prior to calling this function, it's suggested to form `inbox_id`, `account_address`, and `nonce` like below. + * + * ```text + * inbox_id = get_inbox_id_for_address(account_address) + * nonce = 0 + * + * // if inbox_id is not associated, we will create new one. + * if !inbox_id { + * if !legacy_key { nonce = random_u64() } + * inbox_id = generate_inbox_id(account_address, nonce) + * } // Otherwise, we will just use the inbox and ignore the nonce. + * db_path = $inbox_id-$env + * + * xmtp.create_client(account_address, nonce, inbox_id, Option) + * ``` + */ + @Throws(GenericException::class) + @Suppress("ASSIGNED_BUT_NEVER_ACCESSED_VARIABLE") + suspend fun `createClient`(`api`: XmtpApiClient, `db`: kotlin.String?, `encryptionKey`: kotlin.ByteArray?, `inboxId`: kotlin.String, `accountAddress`: kotlin.String, `nonce`: kotlin.ULong, `legacySignedPrivateKeyProto`: kotlin.ByteArray?, `historySyncUrl`: kotlin.String?) : FfiXmtpClient { + return uniffiRustCallAsync( + UniffiLib.INSTANCE.uniffi_xmtpv3_fn_func_create_client(FfiConverterTypeXmtpApiClient.lower(`api`),FfiConverterOptionalString.lower(`db`),FfiConverterOptionalByteArray.lower(`encryptionKey`),FfiConverterString.lower(`inboxId`),FfiConverterString.lower(`accountAddress`),FfiConverterULong.lower(`nonce`),FfiConverterOptionalByteArray.lower(`legacySignedPrivateKeyProto`),FfiConverterOptionalString.lower(`historySyncUrl`),), + { future, callback, continuation -> UniffiLib.INSTANCE.ffi_xmtpv3_rust_future_poll_pointer(future, callback, continuation) }, + { future, continuation -> UniffiLib.INSTANCE.ffi_xmtpv3_rust_future_complete_pointer(future, continuation) }, { future -> UniffiLib.INSTANCE.ffi_xmtpv3_rust_future_free_pointer(future) }, // lift function { FfiConverterTypeFfiXmtpClient.lift(it) }, // Error FFI converter GenericException.ErrorHandler, ) -} + } -@Throws(GenericException::class) -@Suppress("ASSIGNED_BUT_NEVER_ACCESSED_VARIABLE") -suspend fun `createV2Client`(`host`: kotlin.String, `isSecure`: kotlin.Boolean): FfiV2ApiClient { - return uniffiRustCallAsync( - UniffiLib.INSTANCE.uniffi_xmtpv3_fn_func_create_v2_client( - FfiConverterString.lower(`host`), - FfiConverterBoolean.lower(`isSecure`), - ), - { future, callback, continuation -> - UniffiLib.INSTANCE.ffi_xmtpv3_rust_future_poll_pointer( - future, - callback, - continuation - ) - }, - { future, continuation -> - UniffiLib.INSTANCE.ffi_xmtpv3_rust_future_complete_pointer( - future, - continuation - ) - }, + @Throws(GenericException::class) + @Suppress("ASSIGNED_BUT_NEVER_ACCESSED_VARIABLE") + suspend fun `createV2Client`(`host`: kotlin.String, `isSecure`: kotlin.Boolean) : FfiV2ApiClient { + return uniffiRustCallAsync( + UniffiLib.INSTANCE.uniffi_xmtpv3_fn_func_create_v2_client(FfiConverterString.lower(`host`),FfiConverterBoolean.lower(`isSecure`),), + { future, callback, continuation -> UniffiLib.INSTANCE.ffi_xmtpv3_rust_future_poll_pointer(future, callback, continuation) }, + { future, continuation -> UniffiLib.INSTANCE.ffi_xmtpv3_rust_future_complete_pointer(future, continuation) }, { future -> UniffiLib.INSTANCE.ffi_xmtpv3_rust_future_free_pointer(future) }, // lift function { FfiConverterTypeFfiV2ApiClient.lift(it) }, // Error FFI converter GenericException.ErrorHandler, ) -} + } -@Throws(GenericException::class) -fun `diffieHellmanK256`( - `privateKeyBytes`: kotlin.ByteArray, - `publicKeyBytes`: kotlin.ByteArray, -): kotlin.ByteArray { - return FfiConverterByteArray.lift( - uniffiRustCallWithError(GenericException) { _status -> - UniffiLib.INSTANCE.uniffi_xmtpv3_fn_func_diffie_hellman_k256( - FfiConverterByteArray.lower(`privateKeyBytes`), - FfiConverterByteArray.lower(`publicKeyBytes`), - _status - ) - } - ) + @Throws(GenericException::class) fun `decodeReaction`(`bytes`: kotlin.ByteArray): FfiReaction { + return FfiConverterTypeFfiReaction.lift( + uniffiRustCallWithError(GenericException) { _status -> + UniffiLib.INSTANCE.uniffi_xmtpv3_fn_func_decode_reaction( + FfiConverterByteArray.lower(`bytes`),_status) } - - -@Throws(GenericException::class) -fun `generateInboxId`(`accountAddress`: kotlin.String, `nonce`: kotlin.ULong): kotlin.String { - return FfiConverterString.lift( - uniffiRustCallWithError(GenericException) { _status -> - UniffiLib.INSTANCE.uniffi_xmtpv3_fn_func_generate_inbox_id( - FfiConverterString.lower(`accountAddress`), - FfiConverterULong.lower(`nonce`), - _status - ) - } ) -} + } + + @Throws(GenericException::class) fun `diffieHellmanK256`(`privateKeyBytes`: kotlin.ByteArray, `publicKeyBytes`: kotlin.ByteArray): kotlin.ByteArray { + return FfiConverterByteArray.lift( + uniffiRustCallWithError(GenericException) { _status -> + UniffiLib.INSTANCE.uniffi_xmtpv3_fn_func_diffie_hellman_k256( + FfiConverterByteArray.lower(`privateKeyBytes`),FfiConverterByteArray.lower(`publicKeyBytes`),_status) +} + ) + } + -@Throws(GenericException::class) -fun `generatePrivatePreferencesTopicIdentifier`(`privateKey`: kotlin.ByteArray): kotlin.String { - return FfiConverterString.lift( - uniffiRustCallWithError(GenericException) { _status -> - UniffiLib.INSTANCE.uniffi_xmtpv3_fn_func_generate_private_preferences_topic_identifier( - FfiConverterByteArray.lower(`privateKey`), _status - ) - } + @Throws(GenericException::class) fun `encodeReaction`(`reaction`: FfiReaction): kotlin.ByteArray { + return FfiConverterByteArray.lift( + uniffiRustCallWithError(GenericException) { _status -> + UniffiLib.INSTANCE.uniffi_xmtpv3_fn_func_encode_reaction( + FfiConverterTypeFfiReaction.lower(`reaction`),_status) +} ) + } + + + @Throws(GenericException::class) fun `generateInboxId`(`accountAddress`: kotlin.String, `nonce`: kotlin.ULong): kotlin.String { + return FfiConverterString.lift( + uniffiRustCallWithError(GenericException) { _status -> + UniffiLib.INSTANCE.uniffi_xmtpv3_fn_func_generate_inbox_id( + FfiConverterString.lower(`accountAddress`),FfiConverterULong.lower(`nonce`),_status) } + ) + } + + @Throws(GenericException::class) fun `generatePrivatePreferencesTopicIdentifier`(`privateKey`: kotlin.ByteArray): kotlin.String { + return FfiConverterString.lift( + uniffiRustCallWithError(GenericException) { _status -> + UniffiLib.INSTANCE.uniffi_xmtpv3_fn_func_generate_private_preferences_topic_identifier( + FfiConverterByteArray.lower(`privateKey`),_status) +} + ) + } + -@Throws(GenericException::class) -@Suppress("ASSIGNED_BUT_NEVER_ACCESSED_VARIABLE") -suspend fun `getInboxIdForAddress`( - `api`: XmtpApiClient, - `accountAddress`: kotlin.String, -): kotlin.String? { - return uniffiRustCallAsync( - UniffiLib.INSTANCE.uniffi_xmtpv3_fn_func_get_inbox_id_for_address( - FfiConverterTypeXmtpApiClient.lower(`api`), - FfiConverterString.lower(`accountAddress`), - ), - { future, callback, continuation -> - UniffiLib.INSTANCE.ffi_xmtpv3_rust_future_poll_rust_buffer( - future, - callback, - continuation - ) - }, - { future, continuation -> - UniffiLib.INSTANCE.ffi_xmtpv3_rust_future_complete_rust_buffer( - future, - continuation - ) - }, + @Throws(GenericException::class) + @Suppress("ASSIGNED_BUT_NEVER_ACCESSED_VARIABLE") + suspend fun `getInboxIdForAddress`(`api`: XmtpApiClient, `accountAddress`: kotlin.String) : kotlin.String? { + return uniffiRustCallAsync( + UniffiLib.INSTANCE.uniffi_xmtpv3_fn_func_get_inbox_id_for_address(FfiConverterTypeXmtpApiClient.lower(`api`),FfiConverterString.lower(`accountAddress`),), + { future, callback, continuation -> UniffiLib.INSTANCE.ffi_xmtpv3_rust_future_poll_rust_buffer(future, callback, continuation) }, + { future, continuation -> UniffiLib.INSTANCE.ffi_xmtpv3_rust_future_complete_rust_buffer(future, continuation) }, { future -> UniffiLib.INSTANCE.ffi_xmtpv3_rust_future_free_rust_buffer(future) }, // lift function { FfiConverterOptionalString.lift(it) }, // Error FFI converter GenericException.ErrorHandler, ) + } + fun `getVersionInfo`(): kotlin.String { + return FfiConverterString.lift( + uniffiRustCall() { _status -> + UniffiLib.INSTANCE.uniffi_xmtpv3_fn_func_get_version_info( + _status) } - -fun `getVersionInfo`(): kotlin.String { - return FfiConverterString.lift( - uniffiRustCall() { _status -> - UniffiLib.INSTANCE.uniffi_xmtpv3_fn_func_get_version_info( - _status - ) - } ) + } + + fun `keccak256`(`input`: kotlin.ByteArray): kotlin.ByteArray { + return FfiConverterByteArray.lift( + uniffiRustCall() { _status -> + UniffiLib.INSTANCE.uniffi_xmtpv3_fn_func_keccak256( + FfiConverterByteArray.lower(`input`),_status) } - -fun `keccak256`(`input`: kotlin.ByteArray): kotlin.ByteArray { - return FfiConverterByteArray.lift( - uniffiRustCall() { _status -> - UniffiLib.INSTANCE.uniffi_xmtpv3_fn_func_keccak256( - FfiConverterByteArray.lower(`input`), _status - ) - } ) -} - + } + -@Throws(GenericException::class) -fun `publicKeyFromPrivateKeyK256`(`privateKeyBytes`: kotlin.ByteArray): kotlin.ByteArray { - return FfiConverterByteArray.lift( - uniffiRustCallWithError(GenericException) { _status -> - UniffiLib.INSTANCE.uniffi_xmtpv3_fn_func_public_key_from_private_key_k256( - FfiConverterByteArray.lower(`privateKeyBytes`), _status - ) - } - ) + @Throws(GenericException::class) fun `publicKeyFromPrivateKeyK256`(`privateKeyBytes`: kotlin.ByteArray): kotlin.ByteArray { + return FfiConverterByteArray.lift( + uniffiRustCallWithError(GenericException) { _status -> + UniffiLib.INSTANCE.uniffi_xmtpv3_fn_func_public_key_from_private_key_k256( + FfiConverterByteArray.lower(`privateKeyBytes`),_status) } - - -@Throws(GenericException::class) -fun `recoverAddress`( - `signatureBytes`: kotlin.ByteArray, - `predigestMessage`: kotlin.String, -): kotlin.String { - return FfiConverterString.lift( - uniffiRustCallWithError(GenericException) { _status -> - UniffiLib.INSTANCE.uniffi_xmtpv3_fn_func_recover_address( - FfiConverterByteArray.lower(`signatureBytes`), - FfiConverterString.lower(`predigestMessage`), - _status - ) - } ) -} - + } + -@Throws(GenericException::class) -fun `recoverPublicKeyK256Keccak256`( - `message`: kotlin.ByteArray, - `signature`: kotlin.ByteArray, -): kotlin.ByteArray { - return FfiConverterByteArray.lift( - uniffiRustCallWithError(GenericException) { _status -> - UniffiLib.INSTANCE.uniffi_xmtpv3_fn_func_recover_public_key_k256_keccak256( - FfiConverterByteArray.lower(`message`), - FfiConverterByteArray.lower(`signature`), - _status - ) - } - ) + @Throws(GenericException::class) fun `recoverAddress`(`signatureBytes`: kotlin.ByteArray, `predigestMessage`: kotlin.String): kotlin.String { + return FfiConverterString.lift( + uniffiRustCallWithError(GenericException) { _status -> + UniffiLib.INSTANCE.uniffi_xmtpv3_fn_func_recover_address( + FfiConverterByteArray.lower(`signatureBytes`),FfiConverterString.lower(`predigestMessage`),_status) } - - -@Throws(GenericException::class) -fun `recoverPublicKeyK256Sha256`( - `message`: kotlin.ByteArray, - `signature`: kotlin.ByteArray, -): kotlin.ByteArray { - return FfiConverterByteArray.lift( - uniffiRustCallWithError(GenericException) { _status -> - UniffiLib.INSTANCE.uniffi_xmtpv3_fn_func_recover_public_key_k256_sha256( - FfiConverterByteArray.lower(`message`), - FfiConverterByteArray.lower(`signature`), - _status - ) - } ) -} + } + -fun `sha256`(`input`: kotlin.ByteArray): kotlin.ByteArray { - return FfiConverterByteArray.lift( - uniffiRustCall() { _status -> - UniffiLib.INSTANCE.uniffi_xmtpv3_fn_func_sha256( - FfiConverterByteArray.lower(`input`), _status - ) - } - ) + @Throws(GenericException::class) fun `recoverPublicKeyK256Keccak256`(`message`: kotlin.ByteArray, `signature`: kotlin.ByteArray): kotlin.ByteArray { + return FfiConverterByteArray.lift( + uniffiRustCallWithError(GenericException) { _status -> + UniffiLib.INSTANCE.uniffi_xmtpv3_fn_func_recover_public_key_k256_keccak256( + FfiConverterByteArray.lower(`message`),FfiConverterByteArray.lower(`signature`),_status) } - - -@Throws(GenericException::class) -fun `userPreferencesDecrypt`( - `publicKey`: kotlin.ByteArray, - `privateKey`: kotlin.ByteArray, - `message`: kotlin.ByteArray, -): kotlin.ByteArray { - return FfiConverterByteArray.lift( - uniffiRustCallWithError(GenericException) { _status -> - UniffiLib.INSTANCE.uniffi_xmtpv3_fn_func_user_preferences_decrypt( - FfiConverterByteArray.lower(`publicKey`), - FfiConverterByteArray.lower(`privateKey`), - FfiConverterByteArray.lower(`message`), - _status - ) - } ) -} - + } + -@Throws(GenericException::class) -fun `userPreferencesEncrypt`( - `publicKey`: kotlin.ByteArray, - `privateKey`: kotlin.ByteArray, - `message`: kotlin.ByteArray, -): kotlin.ByteArray { - return FfiConverterByteArray.lift( - uniffiRustCallWithError(GenericException) { _status -> - UniffiLib.INSTANCE.uniffi_xmtpv3_fn_func_user_preferences_encrypt( - FfiConverterByteArray.lower(`publicKey`), - FfiConverterByteArray.lower(`privateKey`), - FfiConverterByteArray.lower(`message`), - _status - ) - } + @Throws(GenericException::class) fun `recoverPublicKeyK256Sha256`(`message`: kotlin.ByteArray, `signature`: kotlin.ByteArray): kotlin.ByteArray { + return FfiConverterByteArray.lift( + uniffiRustCallWithError(GenericException) { _status -> + UniffiLib.INSTANCE.uniffi_xmtpv3_fn_func_recover_public_key_k256_sha256( + FfiConverterByteArray.lower(`message`),FfiConverterByteArray.lower(`signature`),_status) +} ) + } + + fun `sha256`(`input`: kotlin.ByteArray): kotlin.ByteArray { + return FfiConverterByteArray.lift( + uniffiRustCall() { _status -> + UniffiLib.INSTANCE.uniffi_xmtpv3_fn_func_sha256( + FfiConverterByteArray.lower(`input`),_status) } + ) + } + + @Throws(GenericException::class) fun `userPreferencesDecrypt`(`publicKey`: kotlin.ByteArray, `privateKey`: kotlin.ByteArray, `message`: kotlin.ByteArray): kotlin.ByteArray { + return FfiConverterByteArray.lift( + uniffiRustCallWithError(GenericException) { _status -> + UniffiLib.INSTANCE.uniffi_xmtpv3_fn_func_user_preferences_decrypt( + FfiConverterByteArray.lower(`publicKey`),FfiConverterByteArray.lower(`privateKey`),FfiConverterByteArray.lower(`message`),_status) +} + ) + } + -@Throws(GenericException::class) -fun `verifyK256Sha256`( - `signedBy`: kotlin.ByteArray, - `message`: kotlin.ByteArray, - `signature`: kotlin.ByteArray, - `recoveryId`: kotlin.UByte, -): kotlin.Boolean { - return FfiConverterBoolean.lift( - uniffiRustCallWithError(GenericException) { _status -> - UniffiLib.INSTANCE.uniffi_xmtpv3_fn_func_verify_k256_sha256( - FfiConverterByteArray.lower(`signedBy`), - FfiConverterByteArray.lower(`message`), - FfiConverterByteArray.lower(`signature`), - FfiConverterUByte.lower(`recoveryId`), - _status - ) - } + @Throws(GenericException::class) fun `userPreferencesEncrypt`(`publicKey`: kotlin.ByteArray, `privateKey`: kotlin.ByteArray, `message`: kotlin.ByteArray): kotlin.ByteArray { + return FfiConverterByteArray.lift( + uniffiRustCallWithError(GenericException) { _status -> + UniffiLib.INSTANCE.uniffi_xmtpv3_fn_func_user_preferences_encrypt( + FfiConverterByteArray.lower(`publicKey`),FfiConverterByteArray.lower(`privateKey`),FfiConverterByteArray.lower(`message`),_status) +} ) + } + + + @Throws(GenericException::class) fun `verifyK256Sha256`(`signedBy`: kotlin.ByteArray, `message`: kotlin.ByteArray, `signature`: kotlin.ByteArray, `recoveryId`: kotlin.UByte): kotlin.Boolean { + return FfiConverterBoolean.lift( + uniffiRustCallWithError(GenericException) { _status -> + UniffiLib.INSTANCE.uniffi_xmtpv3_fn_func_verify_k256_sha256( + FfiConverterByteArray.lower(`signedBy`),FfiConverterByteArray.lower(`message`),FfiConverterByteArray.lower(`signature`),FfiConverterUByte.lower(`recoveryId`),_status) } + ) + } diff --git a/library/src/main/jniLibs/arm64-v8a/libuniffi_xmtpv3.so b/library/src/main/jniLibs/arm64-v8a/libuniffi_xmtpv3.so index 42ab1bff..1c4b104f 100644 Binary files a/library/src/main/jniLibs/arm64-v8a/libuniffi_xmtpv3.so and b/library/src/main/jniLibs/arm64-v8a/libuniffi_xmtpv3.so differ diff --git a/library/src/main/jniLibs/armeabi-v7a/libuniffi_xmtpv3.so b/library/src/main/jniLibs/armeabi-v7a/libuniffi_xmtpv3.so index dda1dfcd..8627856d 100644 Binary files a/library/src/main/jniLibs/armeabi-v7a/libuniffi_xmtpv3.so and b/library/src/main/jniLibs/armeabi-v7a/libuniffi_xmtpv3.so differ diff --git a/library/src/main/jniLibs/x86/libuniffi_xmtpv3.so b/library/src/main/jniLibs/x86/libuniffi_xmtpv3.so index 9e8180c9..7f4ca8cb 100644 Binary files a/library/src/main/jniLibs/x86/libuniffi_xmtpv3.so and b/library/src/main/jniLibs/x86/libuniffi_xmtpv3.so differ diff --git a/library/src/main/jniLibs/x86_64/libuniffi_xmtpv3.so b/library/src/main/jniLibs/x86_64/libuniffi_xmtpv3.so index 8fa328be..d51d5a7a 100644 Binary files a/library/src/main/jniLibs/x86_64/libuniffi_xmtpv3.so and b/library/src/main/jniLibs/x86_64/libuniffi_xmtpv3.so differ