diff --git a/library/src/main/java/libxmtp-version.txt b/library/src/main/java/libxmtp-version.txt index 7584779a6..4929643da 100644 --- a/library/src/main/java/libxmtp-version.txt +++ b/library/src/main/java/libxmtp-version.txt @@ -1,3 +1,3 @@ -Version: 29a955a1 +Version: 8e8ff6a6 Branch: main -Date: 2024-11-14 22:21:21 +0000 +Date: 2024-11-19 01:30:43 +0000 diff --git a/library/src/main/java/xmtpv3.kt b/library/src/main/java/xmtpv3.kt index 3039e2cb2..d9fe665d9 100644 --- a/library/src/main/java/xmtpv3.kt +++ b/library/src/main/java/xmtpv3.kt @@ -1448,6 +1448,10 @@ internal interface UniffiLib : Library { `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 @@ -2132,6 +2136,9 @@ internal interface UniffiLib : Library { 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 @@ -2515,6 +2522,9 @@ private fun uniffiCheckApiChecksums(lib: UniffiLib) { if (lib.uniffi_xmtpv3_checksum_method_ffixmtpclient_set_consent_states() != 64566.toShort()) { throw RuntimeException("UniFFI API checksum mismatch: try cleaning and rebuilding your project") } + if (lib.uniffi_xmtpv3_checksum_method_ffixmtpclient_sign_with_installation_key() != 49813.toShort()) { + throw RuntimeException("UniFFI API checksum mismatch: try cleaning and rebuilding your project") + } if (lib.uniffi_xmtpv3_checksum_method_ffixmtpclient_signature_request() != 18270.toShort()) { throw RuntimeException("UniFFI API checksum mismatch: try cleaning and rebuilding your project") } @@ -7835,6 +7845,8 @@ public interface FfiXmtpClientInterface { suspend fun `setConsentStates`(`records`: List) + fun `signWithInstallationKey`(`text`: kotlin.String): kotlin.ByteArray + fun `signatureRequest`(): FfiSignatureRequest? companion object @@ -8533,6 +8545,21 @@ open class FfiXmtpClient : Disposable, AutoCloseable, FfiXmtpClientInterface { ) } + + @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 { @@ -9691,6 +9718,8 @@ sealed class GenericException(message: String) : kotlin.Exception(message) { class DeviceSync(message: String) : GenericException(message) + class Identity(message: String) : GenericException(message) + companion object ErrorHandler : UniffiRustCallStatusErrorHandler { override fun lift(error_buf: RustBuffer.ByValue): GenericException = @@ -9720,6 +9749,7 @@ public object FfiConverterTypeGenericError : FfiConverterRustBuffer GenericException.FailedToConvertToU32(FfiConverterString.read(buf)) 14 -> GenericException.Association(FfiConverterString.read(buf)) 15 -> GenericException.DeviceSync(FfiConverterString.read(buf)) + 16 -> GenericException.Identity(FfiConverterString.read(buf)) else -> throw RuntimeException("invalid error enum value, something is very wrong!!") } @@ -9805,6 +9835,11 @@ public object FfiConverterTypeGenericError : FfiConverterRustBuffer { + buf.putInt(16) + Unit + } }.let { /* this makes the `when` an expression, which ensures it is exhaustive */ } } diff --git a/library/src/main/jniLibs/arm64-v8a/libuniffi_xmtpv3.so b/library/src/main/jniLibs/arm64-v8a/libuniffi_xmtpv3.so index a8e8ba509..13c0a974b 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 453e13caf..8745d3a2a 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 27ecfa2c6..bd32c1caa 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 72faddf76..5826c23b9 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