diff --git a/library/src/main/java/libxmtp-version.txt b/library/src/main/java/libxmtp-version.txt index 0b75f3a40..1422536b4 100644 --- a/library/src/main/java/libxmtp-version.txt +++ b/library/src/main/java/libxmtp-version.txt @@ -1,3 +1,3 @@ -Version: 211e87cd +Version: 5641e261 Branch: st/fix-openssl-binding -Date: 2024-07-24 19:07:41 +0000 +Date: 2024-07-24 20:22:11 +0000 diff --git a/library/src/main/java/xmtpv3.kt b/library/src/main/java/xmtpv3.kt index f9472ba3a..9b9a2742b 100644 --- a/library/src/main/java/xmtpv3.kt +++ b/library/src/main/java/xmtpv3.kt @@ -275,7 +275,7 @@ interface UniffiRustCallStatusErrorHandler { // 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 + callback: (UniffiRustCallStatus) -> U, ): U { var status = UniffiRustCallStatus() val return_value = callback(status) @@ -286,7 +286,7 @@ private inline fun uniffiRustCallWithError( // Check UniffiRustCallStatus and throw an error if the call wasn't successful private fun uniffiCheckCallStatus( errorHandler: UniffiRustCallStatusErrorHandler, - status: UniffiRustCallStatus + status: UniffiRustCallStatus, ) { if (status.isSuccess()) { return @@ -335,7 +335,7 @@ internal inline fun uniffiTraitInterfaceCallWithError callStatus: UniffiRustCallStatus, makeCall: () -> T, writeReturn: (T) -> Unit, - lowerError: (E) -> RustBuffer.ByValue + lowerError: (E) -> RustBuffer.ByValue, ) { try { writeReturn(makeCall()) @@ -2212,7 +2212,7 @@ internal suspend fun uniffiRustCallAsync( completeFunc: (Long, UniffiRustCallStatus) -> F, freeFunc: (Long) -> Unit, liftFunc: (F) -> T, - errorHandler: UniffiRustCallStatusErrorHandler + errorHandler: UniffiRustCallStatusErrorHandler, ): T { try { do { @@ -2595,7 +2595,7 @@ 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() } @@ -2603,7 +2603,7 @@ private class JavaLangRefCleanable( public interface FfiConversationsInterface { suspend fun `createGroup`( `accountAddresses`: List, - `opts`: FfiCreateGroupOptions + `opts`: FfiCreateGroupOptions, ): FfiGroup suspend fun `list`(`opts`: FfiListConversationsOptions): List @@ -3025,7 +3025,7 @@ public interface FfiGroupInterface { suspend fun `updatePermissionPolicy`( `permissionUpdateType`: FfiPermissionUpdateType, `permissionPolicyOption`: FfiPermissionPolicy, - `metadataField`: FfiMetadataField? + `metadataField`: FfiMetadataField?, ) companion object @@ -4343,7 +4343,7 @@ public interface FfiSignatureRequestInterface { suspend fun `addScwSignature`( `signatureBytes`: kotlin.ByteArray, `address`: kotlin.String, - `chainRpcUrl`: kotlin.String + `chainRpcUrl`: kotlin.String, ) suspend fun `isReady`(): kotlin.Boolean @@ -4961,7 +4961,7 @@ public interface FfiV2ApiClientInterface { suspend fun `subscribe`( `request`: FfiV2SubscribeRequest, - `callback`: FfiV2SubscriptionCallback + `callback`: FfiV2SubscriptionCallback, ): FfiV2Subscription companion object @@ -5580,7 +5580,7 @@ public interface FfiXmtpClientInterface { */ suspend fun `addWallet`( `existingWalletAddress`: kotlin.String, - `newWalletAddress`: kotlin.String + `newWalletAddress`: kotlin.String, ): FfiSignatureRequest suspend fun `applySignatureRequest`(`signatureRequest`: FfiSignatureRequest) @@ -5998,7 +5998,7 @@ data class FfiCreateGroupOptions( var `groupImageUrlSquare`: kotlin.String?, var `groupDescription`: kotlin.String?, var `groupPinnedFrameUrl`: kotlin.String?, - var `customPermissionPolicySet`: FfiPermissionPolicySet? + var `customPermissionPolicySet`: FfiPermissionPolicySet?, ) { companion object } @@ -6020,7 +6020,8 @@ public object FfiConverterTypeFfiCreateGroupOptions : FfiConverterRustBuffer { data class FfiEnvelope( var `contentTopic`: kotlin.String, var `timestampNs`: kotlin.ULong, - var `message`: kotlin.ByteArray + var `message`: kotlin.ByteArray, ) { companion object } @@ -6102,7 +6103,7 @@ data class FfiGroupMember( var `inboxId`: kotlin.String, var `accountAddresses`: List, var `installationIds`: List, - var `permissionLevel`: FfiPermissionLevel + var `permissionLevel`: FfiPermissionLevel, ) { companion object } @@ -6138,7 +6139,7 @@ public object FfiConverterTypeFfiGroupMember : FfiConverterRustBuffer { data class FfiPagingInfo( var `limit`: kotlin.UInt, var `cursor`: FfiCursor?, - var `direction`: FfiSortDirection + var `direction`: FfiSortDirection, ) { companion object } @@ -6295,7 +6296,7 @@ data class FfiPermissionPolicySet( var `updateGroupNamePolicy`: FfiPermissionPolicy, var `updateGroupDescriptionPolicy`: FfiPermissionPolicy, var `updateGroupImageUrlSquarePolicy`: FfiPermissionPolicy, - var `updateGroupPinnedFrameUrlPolicy`: FfiPermissionPolicy + var `updateGroupPinnedFrameUrlPolicy`: FfiPermissionPolicy, ) { companion object } @@ -6341,7 +6342,7 @@ public object FfiConverterTypeFfiPermissionPolicySet : FfiConverterRustBuffer + var `envelopes`: List, ) { companion object } @@ -6366,7 +6367,7 @@ public object FfiConverterTypeFfiPublishRequest : FfiConverterRustBuffer + var `requests`: List, ) { companion object } @@ -6391,7 +6392,7 @@ public object FfiConverterTypeFfiV2BatchQueryRequest : FfiConverterRustBuffer + var `responses`: List, ) { companion object } @@ -6419,7 +6420,7 @@ data class FfiV2QueryRequest( var `contentTopics`: List, var `startTimeNs`: kotlin.ULong, var `endTimeNs`: kotlin.ULong, - var `pagingInfo`: FfiPagingInfo? + var `pagingInfo`: FfiPagingInfo?, ) { companion object } @@ -6454,7 +6455,7 @@ public object FfiConverterTypeFfiV2QueryRequest : FfiConverterRustBuffer, - var `pagingInfo`: FfiPagingInfo? + var `pagingInfo`: FfiPagingInfo?, ) { companion object } @@ -6482,7 +6483,7 @@ public object FfiConverterTypeFfiV2QueryResponse : FfiConverterRustBuffer + var `contentTopics`: List, ) { companion object } @@ -7355,6 +7356,35 @@ public object FfiConverterOptionalTypeFfiPagingInfo : FfiConverterRustBuffer { + override fun read(buf: ByteBuffer): FfiPermissionPolicySet? { + if (buf.get().toInt() == 0) { + return null + } + return FfiConverterTypeFfiPermissionPolicySet.read(buf) + } + + override fun allocationSize(value: FfiPermissionPolicySet?): ULong { + if (value == null) { + return 1UL + } else { + return 1UL + FfiConverterTypeFfiPermissionPolicySet.allocationSize(value) + } + } + + override fun write( + value: FfiPermissionPolicySet?, + buf: ByteBuffer, + ) { + if (value == null) { + buf.put(0) + } else { + buf.put(1) + FfiConverterTypeFfiPermissionPolicySet.write(value, buf) + } + } +} + public object FfiConverterOptionalTypeFfiDeliveryStatus : FfiConverterRustBuffer { override fun read(buf: ByteBuffer): FfiDeliveryStatus? { if (buf.get().toInt() == 0) { diff --git a/library/src/main/jniLibs/arm64-v8a/libuniffi_xmtpv3.so b/library/src/main/jniLibs/arm64-v8a/libuniffi_xmtpv3.so index 3f81c7298..fd83ff30a 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 f3a8fdc74..5492653f7 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 838a6366f..92f7a77f1 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 d3bda378f..8b842d5e2 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