diff --git a/library/src/main/java/libxmtp-version.txt b/library/src/main/java/libxmtp-version.txt index b785844e..94933af8 100644 --- a/library/src/main/java/libxmtp-version.txt +++ b/library/src/main/java/libxmtp-version.txt @@ -1,3 +1,3 @@ -Version: 822236dc +Version: ba0b09cf Branch: mc/thread-safe-groups -Date: 2024-12-13 16:29:34 +0000 +Date: 2024-12-13 16:39:08 +0000 diff --git a/library/src/main/java/xmtpv3.kt b/library/src/main/java/xmtpv3.kt index 98aa37dd..a3719de6 100644 --- a/library/src/main/java/xmtpv3.kt +++ b/library/src/main/java/xmtpv3.kt @@ -281,7 +281,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) @@ -292,7 +292,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 @@ -346,7 +346,7 @@ internal inline fun uniffiTraitInterfaceCallWithError callStatus: UniffiRustCallStatus, makeCall: () -> T, writeReturn: (T) -> Unit, - lowerError: (E) -> RustBuffer.ByValue + lowerError: (E) -> RustBuffer.ByValue, ) { try { writeReturn(makeCall()) @@ -401,7 +401,7 @@ private fun findLibraryName(componentName: String): String { } private inline fun loadIndirect( - componentName: String + componentName: String, ): Lib { return Native.load(findLibraryName(componentName), Lib::class.java) } @@ -2647,7 +2647,7 @@ internal suspend fun uniffiRustCallAsync( completeFunc: (Long, UniffiRustCallStatus) -> F, freeFunc: (Long) -> Unit, liftFunc: (F) -> T, - errorHandler: UniffiRustCallStatusErrorHandler + errorHandler: UniffiRustCallStatusErrorHandler, ): T { try { do { @@ -3063,7 +3063,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() } @@ -3489,7 +3489,7 @@ public interface FfiConversationInterface { suspend fun `updatePermissionPolicy`( `permissionUpdateType`: FfiPermissionUpdateType, `permissionPolicyOption`: FfiPermissionPolicy, - `metadataField`: FfiMetadataField? + `metadataField`: FfiMetadataField?, ) companion object @@ -4452,7 +4452,7 @@ open class FfiConversation : Disposable, AutoCloseable, FfiConversationInterface override suspend fun `updatePermissionPolicy`( `permissionUpdateType`: FfiPermissionUpdateType, `permissionPolicyOption`: FfiPermissionPolicy, - `metadataField`: FfiMetadataField? + `metadataField`: FfiMetadataField?, ) { return uniffiRustCallAsync( callWithPointer { thisPtr -> @@ -5172,7 +5172,7 @@ public interface FfiConversationsInterface { suspend fun `createGroup`( `accountAddresses`: List, - `opts`: FfiCreateGroupOptions + `opts`: FfiCreateGroupOptions, ): FfiConversation fun `getSyncGroup`(): FfiConversation @@ -5201,7 +5201,7 @@ public interface FfiConversationsInterface { suspend fun `streamMessages`( `messageCallback`: FfiMessageCallback, - `conversationType`: FfiConversationType? + `conversationType`: FfiConversationType?, ): FfiStreamCloser suspend fun `sync`() @@ -5329,7 +5329,7 @@ open class FfiConversations : Disposable, AutoCloseable, FfiConversationsInterfa @Suppress("ASSIGNED_BUT_NEVER_ACCESSED_VARIABLE") override suspend fun `createGroup`( `accountAddresses`: List, - `opts`: FfiCreateGroupOptions + `opts`: FfiCreateGroupOptions, ): FfiConversation { return uniffiRustCallAsync( callWithPointer { thisPtr -> @@ -5723,7 +5723,7 @@ open class FfiConversations : Disposable, AutoCloseable, FfiConversationsInterfa @Suppress("ASSIGNED_BUT_NEVER_ACCESSED_VARIABLE") override suspend fun `streamMessages`( `messageCallback`: FfiMessageCallback, - `conversationType`: FfiConversationType? + `conversationType`: FfiConversationType?, ): FfiStreamCloser { return uniffiRustCallAsync( callWithPointer { thisPtr -> @@ -6509,7 +6509,7 @@ public interface FfiSignatureRequestInterface { `signatureBytes`: kotlin.ByteArray, `address`: kotlin.String, `chainId`: kotlin.ULong, - `blockNumber`: kotlin.ULong? + `blockNumber`: kotlin.ULong?, ) suspend fun `isReady`(): kotlin.Boolean @@ -6645,7 +6645,7 @@ open class FfiSignatureRequest : Disposable, AutoCloseable, FfiSignatureRequestI `signatureBytes`: kotlin.ByteArray, `address`: kotlin.String, `chainId`: kotlin.ULong, - `blockNumber`: kotlin.ULong? + `blockNumber`: kotlin.ULong?, ) { return uniffiRustCallAsync( callWithPointer { thisPtr -> @@ -7248,7 +7248,7 @@ public interface FfiV2ApiClientInterface { suspend fun `subscribe`( `request`: FfiV2SubscribeRequest, - `callback`: FfiV2SubscriptionCallback + `callback`: FfiV2SubscriptionCallback, ): FfiV2Subscription companion object @@ -7447,7 +7447,7 @@ open class FfiV2ApiClient : Disposable, AutoCloseable, FfiV2ApiClientInterface { @Suppress("ASSIGNED_BUT_NEVER_ACCESSED_VARIABLE") override suspend fun `subscribe`( `request`: FfiV2SubscribeRequest, - `callback`: FfiV2SubscriptionCallback + `callback`: FfiV2SubscriptionCallback, ): FfiV2Subscription { return uniffiRustCallAsync( callWithPointer { thisPtr -> @@ -8257,7 +8257,7 @@ public interface FfiXmtpClientInterface { */ suspend fun `addressesFromInboxId`( `refreshFromNetwork`: kotlin.Boolean, - `inboxIds`: List + `inboxIds`: List, ): List suspend fun `applySignatureRequest`(`signatureRequest`: FfiSignatureRequest) @@ -8276,7 +8276,7 @@ public interface FfiXmtpClientInterface { suspend fun `getConsentState`( `entityType`: FfiConsentEntityType, - `entity`: kotlin.String + `entity`: kotlin.String, ): FfiConsentState fun `getHmacKeys`(): List @@ -8321,13 +8321,13 @@ public interface FfiXmtpClientInterface { fun `verifySignedWithInstallationKey`( `signatureText`: kotlin.String, - `signatureBytes`: kotlin.ByteArray + `signatureBytes`: kotlin.ByteArray, ) fun `verifySignedWithPublicKey`( `signatureText`: kotlin.String, `signatureBytes`: kotlin.ByteArray, - `publicKey`: kotlin.ByteArray + `publicKey`: kotlin.ByteArray, ) companion object @@ -8460,7 +8460,7 @@ open class FfiXmtpClient : Disposable, AutoCloseable, FfiXmtpClientInterface { @Suppress("ASSIGNED_BUT_NEVER_ACCESSED_VARIABLE") override suspend fun `addressesFromInboxId`( `refreshFromNetwork`: kotlin.Boolean, - `inboxIds`: List + `inboxIds`: List, ): List { return uniffiRustCallAsync( callWithPointer { thisPtr -> @@ -8667,7 +8667,7 @@ open class FfiXmtpClient : Disposable, AutoCloseable, FfiXmtpClientInterface { @Suppress("ASSIGNED_BUT_NEVER_ACCESSED_VARIABLE") override suspend fun `getConsentState`( `entityType`: FfiConsentEntityType, - `entity`: kotlin.String + `entity`: kotlin.String, ): FfiConsentState { return uniffiRustCallAsync( callWithPointer { thisPtr -> @@ -9031,7 +9031,7 @@ open class FfiXmtpClient : Disposable, AutoCloseable, FfiXmtpClientInterface { @Throws(GenericException::class) override fun `verifySignedWithInstallationKey`( `signatureText`: kotlin.String, - `signatureBytes`: kotlin.ByteArray + `signatureBytes`: kotlin.ByteArray, ) = callWithPointer { uniffiRustCallWithError(GenericException) { _status -> @@ -9049,7 +9049,7 @@ open class FfiXmtpClient : Disposable, AutoCloseable, FfiXmtpClientInterface { override fun `verifySignedWithPublicKey`( `signatureText`: kotlin.String, `signatureBytes`: kotlin.ByteArray, - `publicKey`: kotlin.ByteArray + `publicKey`: kotlin.ByteArray, ) = callWithPointer { uniffiRustCallWithError(GenericException) { _status -> @@ -9100,7 +9100,7 @@ public object FfiConverterTypeFfiXmtpClient : FfiConverter, var `installationIds`: List, var `permissionLevel`: FfiPermissionLevel, - var `consentState`: FfiConsentState + var `consentState`: FfiConsentState, ) { companion object @@ -9182,7 +9182,7 @@ data class FfiCreateGroupOptions( var `groupImageUrlSquare`: kotlin.String?, var `groupDescription`: kotlin.String?, var `groupPinnedFrameUrl`: kotlin.String?, - var `customPermissionPolicySet`: FfiPermissionPolicySet? + var `customPermissionPolicySet`: FfiPermissionPolicySet?, ) { companion object @@ -9226,7 +9226,7 @@ public object FfiConverterTypeFfiCreateGroupOptions : data class FfiCursor( var `digest`: kotlin.ByteArray, - var `senderTimeNs`: kotlin.ULong + var `senderTimeNs`: kotlin.ULong, ) { companion object @@ -9258,7 +9258,7 @@ public object FfiConverterTypeFfiCursor : FfiConverterRustBuffer { data class FfiEnvelope( var `contentTopic`: kotlin.String, var `timestampNs`: kotlin.ULong, - var `message`: kotlin.ByteArray + var `message`: kotlin.ByteArray, ) { companion object @@ -9292,7 +9292,7 @@ public object FfiConverterTypeFfiEnvelope : FfiConverterRustBuffer data class FfiHmacKey( var `key`: kotlin.ByteArray, - var `epoch`: kotlin.Long + var `epoch`: kotlin.Long, ) { companion object @@ -9325,7 +9325,7 @@ data class FfiInboxState( var `inboxId`: kotlin.String, var `recoveryAddress`: kotlin.String, var `installations`: List, - var `accountAddresses`: List + var `accountAddresses`: List, ) { companion object @@ -9362,7 +9362,7 @@ public object FfiConverterTypeFfiInboxState : FfiConverterRustBuffer { data class FfiPagingInfo( var `limit`: kotlin.UInt, var `cursor`: FfiCursor?, - var `direction`: FfiSortDirection + var `direction`: FfiSortDirection, ) { companion object @@ -9569,7 +9569,7 @@ data class FfiPermissionPolicySet( var `updateGroupNamePolicy`: FfiPermissionPolicy, var `updateGroupDescriptionPolicy`: FfiPermissionPolicy, var `updateGroupImageUrlSquarePolicy`: FfiPermissionPolicy, - var `updateGroupPinnedFrameUrlPolicy`: FfiPermissionPolicy + var `updateGroupPinnedFrameUrlPolicy`: FfiPermissionPolicy, ) { companion object @@ -9618,7 +9618,7 @@ public object FfiConverterTypeFfiPermissionPolicySet : data class FfiPublishRequest( - var `envelopes`: List + var `envelopes`: List, ) { companion object @@ -9645,7 +9645,7 @@ public object FfiConverterTypeFfiPublishRequest : FfiConverterRustBuffer + var `requests`: List, ) { companion object @@ -9673,7 +9673,7 @@ public object FfiConverterTypeFfiV2BatchQueryRequest : data class FfiV2BatchQueryResponse( - var `responses`: List + var `responses`: List, ) { companion object @@ -9704,7 +9704,7 @@ data class FfiV2QueryRequest( var `contentTopics`: List, var `startTimeNs`: kotlin.ULong, var `endTimeNs`: kotlin.ULong, - var `pagingInfo`: FfiPagingInfo? + var `pagingInfo`: FfiPagingInfo?, ) { companion object @@ -9741,7 +9741,7 @@ public object FfiConverterTypeFfiV2QueryRequest : FfiConverterRustBuffer, - var `pagingInfo`: FfiPagingInfo? + var `pagingInfo`: FfiPagingInfo?, ) { companion object @@ -9771,7 +9771,7 @@ public object FfiConverterTypeFfiV2QueryResponse : FfiConverterRustBuffer + var `contentTopics`: List, ) { companion object @@ -11272,7 +11272,7 @@ public object FfiConverterMapStringBoolean : // The parens on `(k, v)` here ensure we're calling the right method, // which is important for compatibility with older android devices. // Ref https://blog.danlew.net/2017/03/16/kotlin-puzzler-whose-line-is-it-anyways/ - value.forEach { (k, v) -> + value.iterator().forEach { (k, v) -> FfiConverterString.write(k, buf) FfiConverterBoolean.write(v, buf) } @@ -11312,7 +11312,7 @@ suspend fun `createClient`( `accountAddress`: kotlin.String, `nonce`: kotlin.ULong, `legacySignedPrivateKeyProto`: kotlin.ByteArray?, - `historySyncUrl`: kotlin.String? + `historySyncUrl`: kotlin.String?, ): FfiXmtpClient { return uniffiRustCallAsync( UniffiLib.INSTANCE.uniffi_xmtpv3_fn_func_create_client( @@ -11379,7 +11379,7 @@ suspend fun `createV2Client`(`host`: kotlin.String, `isSecure`: kotlin.Boolean): @Throws(GenericException::class) fun `diffieHellmanK256`( `privateKeyBytes`: kotlin.ByteArray, - `publicKeyBytes`: kotlin.ByteArray + `publicKeyBytes`: kotlin.ByteArray, ): kotlin.ByteArray { return FfiConverterByteArray.lift( uniffiRustCallWithError(GenericException) { _status -> @@ -11424,7 +11424,7 @@ fun `generatePrivatePreferencesTopicIdentifier`(`privateKey`: kotlin.ByteArray): suspend fun `getInboxIdForAddress`( `host`: kotlin.String, `isSecure`: kotlin.Boolean, - `accountAddress`: kotlin.String + `accountAddress`: kotlin.String, ): kotlin.String? { return uniffiRustCallAsync( UniffiLib.INSTANCE.uniffi_xmtpv3_fn_func_get_inbox_id_for_address( @@ -11489,7 +11489,7 @@ fun `publicKeyFromPrivateKeyK256`(`privateKeyBytes`: kotlin.ByteArray): kotlin.B @Throws(GenericException::class) fun `recoverAddress`( `signatureBytes`: kotlin.ByteArray, - `predigestMessage`: kotlin.String + `predigestMessage`: kotlin.String, ): kotlin.String { return FfiConverterString.lift( uniffiRustCallWithError(GenericException) { _status -> @@ -11506,7 +11506,7 @@ fun `recoverAddress`( @Throws(GenericException::class) fun `recoverPublicKeyK256Keccak256`( `message`: kotlin.ByteArray, - `signature`: kotlin.ByteArray + `signature`: kotlin.ByteArray, ): kotlin.ByteArray { return FfiConverterByteArray.lift( uniffiRustCallWithError(GenericException) { _status -> @@ -11523,7 +11523,7 @@ fun `recoverPublicKeyK256Keccak256`( @Throws(GenericException::class) fun `recoverPublicKeyK256Sha256`( `message`: kotlin.ByteArray, - `signature`: kotlin.ByteArray + `signature`: kotlin.ByteArray, ): kotlin.ByteArray { return FfiConverterByteArray.lift( uniffiRustCallWithError(GenericException) { _status -> @@ -11551,7 +11551,7 @@ fun `sha256`(`input`: kotlin.ByteArray): kotlin.ByteArray { fun `userPreferencesDecrypt`( `publicKey`: kotlin.ByteArray, `privateKey`: kotlin.ByteArray, - `message`: kotlin.ByteArray + `message`: kotlin.ByteArray, ): kotlin.ByteArray { return FfiConverterByteArray.lift( uniffiRustCallWithError(GenericException) { _status -> @@ -11570,7 +11570,7 @@ fun `userPreferencesDecrypt`( fun `userPreferencesEncrypt`( `publicKey`: kotlin.ByteArray, `privateKey`: kotlin.ByteArray, - `message`: kotlin.ByteArray + `message`: kotlin.ByteArray, ): kotlin.ByteArray { return FfiConverterByteArray.lift( uniffiRustCallWithError(GenericException) { _status -> @@ -11590,7 +11590,7 @@ fun `verifyK256Sha256`( `signedBy`: kotlin.ByteArray, `message`: kotlin.ByteArray, `signature`: kotlin.ByteArray, - `recoveryId`: kotlin.UByte + `recoveryId`: kotlin.UByte, ): kotlin.Boolean { return FfiConverterBoolean.lift( uniffiRustCallWithError(GenericException) { _status -> diff --git a/library/src/main/jniLibs/arm64-v8a/libuniffi_xmtpv3.so b/library/src/main/jniLibs/arm64-v8a/libuniffi_xmtpv3.so index f0c89a3f..3668d0bc 100755 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 5fa4fbd1..23413950 100755 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 59d50f51..e152000b 100755 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 2c3f6ca0..5214b5ab 100755 Binary files a/library/src/main/jniLibs/x86_64/libuniffi_xmtpv3.so and b/library/src/main/jniLibs/x86_64/libuniffi_xmtpv3.so differ