diff --git a/library/src/main/java/libxmtp-version.txt b/library/src/main/java/libxmtp-version.txt index e188c0c23..d32b0586f 100644 --- a/library/src/main/java/libxmtp-version.txt +++ b/library/src/main/java/libxmtp-version.txt @@ -1,3 +1,3 @@ -Version: 4f529aeb +Version: bb7a38f7 Branch: main -Date: 2024-09-26 04:05:26 +0000 +Date: 2024-10-01 18:08:33 +0000 diff --git a/library/src/main/java/xmtpv3.kt b/library/src/main/java/xmtpv3.kt index f4ee4ec8c..a5707aee0 100644 --- a/library/src/main/java/xmtpv3.kt +++ b/library/src/main/java/xmtpv3.kt @@ -868,6 +868,10 @@ internal interface UniffiLib : Library { `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 @@ -1663,6 +1667,9 @@ internal interface UniffiLib : Library { fun uniffi_xmtpv3_checksum_func_verify_k256_sha256( ): Short + fun uniffi_xmtpv3_checksum_method_fficonversations_create_dm( + ): Short + fun uniffi_xmtpv3_checksum_method_fficonversations_create_group( ): Short @@ -1998,6 +2005,9 @@ private fun uniffiCheckApiChecksums(lib: UniffiLib) { if (lib.uniffi_xmtpv3_checksum_func_verify_k256_sha256() != 25521.toShort()) { throw RuntimeException("UniFFI API checksum mismatch: try cleaning and rebuilding your project") } + if (lib.uniffi_xmtpv3_checksum_method_fficonversations_create_dm() != 61687.toShort()) { + throw RuntimeException("UniFFI API checksum mismatch: try cleaning and rebuilding your project") + } if (lib.uniffi_xmtpv3_checksum_method_fficonversations_create_group() != 62996.toShort()) { throw RuntimeException("UniFFI API checksum mismatch: try cleaning and rebuilding your project") } @@ -2682,6 +2692,8 @@ private class JavaLangRefCleanable( public interface FfiConversationsInterface { + suspend fun `createDm`(`accountAddress`: kotlin.String): FfiGroup + suspend fun `createGroup`( `accountAddresses`: List, `opts`: FfiCreateGroupOptions, @@ -2784,6 +2796,38 @@ open class FfiConversations : Disposable, AutoCloseable, FfiConversationsInterfa } + @Throws(GenericException::class) + @Suppress("ASSIGNED_BUT_NEVER_ACCESSED_VARIABLE") + override suspend fun `createDm`(`accountAddress`: kotlin.String): FfiGroup { + 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 + { FfiConverterTypeFfiGroup.lift(it) }, + // Error FFI converter + GenericException.ErrorHandler, + ) + } + + @Throws(GenericException::class) @Suppress("ASSIGNED_BUT_NEVER_ACCESSED_VARIABLE") override suspend fun `createGroup`( diff --git a/library/src/main/jniLibs/arm64-v8a/libuniffi_xmtpv3.so b/library/src/main/jniLibs/arm64-v8a/libuniffi_xmtpv3.so index 77929a222..351d8b4fb 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 4f3b41364..ceda295f6 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 df9465ed8..11c776bfd 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 debc92755..2fbb649b1 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