Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature parity updates #9

Open
wants to merge 41 commits into
base: main
Choose a base branch
from
Open

Feature parity updates #9

wants to merge 41 commits into from

Conversation

lealobanov
Copy link
Collaborator

@lealobanov lealobanov commented Mar 27, 2025

Closes: #???

Description

> Task :flow:compileIosMainKotlinMetadata
w: file:///Users/lealobanov/Desktop/Projects/flow-kmm/flow/src/iosMain/kotlin/org.onflow.flow.models/NSData.kt:11:10 Expected performance impact from inlining is insignificant. Inlining works best for functions with parameters of function types.
w: file:///Users/lealobanov/Desktop/Projects/flow-kmm/flow/src/iosMain/kotlin/org.onflow.flow.models/NSData.kt:14:19 This declaration needs opt-in. Its usage should be marked with '@kotlinx.cinterop.BetaInteropApi' or '@OptIn(kotlinx.cinterop.BetaInteropApi::class)'
w: file:///Users/lealobanov/Desktop/Projects/flow-kmm/flow/src/iosMain/kotlin/org/onflow/flow/infrastructure/FixedPointFormatter.kt:7:1 'expect'/'actual' classes (including interfaces, objects, annotations, enums, and 'actual' typealiases) are in Beta. You can use -Xexpect-actual-classes flag to suppress this warning. Also see: https://youtrack.jetbrains.com/issue/KT-61573

> Task :flow:compileKotlinIosArm64 FAILED
e: file:///Users/lealobanov/Desktop/Projects/flow-kmm/flow/src/commonMain/kotlin/org/onflow/flow/crypto/Crypto.kt:7:1 Expected Crypto has no actual declaration in module <org.onflow.flow:flow> for Native
e: file:///Users/lealobanov/Desktop/Projects/flow-kmm/flow/src/commonMain/kotlin/org/onflow/flow/crypto/Keys.kt:6:1 Expected KeyPair has no actual declaration in module <org.onflow.flow:flow> for Native
e: file:///Users/lealobanov/Desktop/Projects/flow-kmm/flow/src/commonMain/kotlin/org/onflow/flow/crypto/Keys.kt:11:1 Expected PrivateKey has no actual declaration in module <org.onflow.flow:flow> for Native
e: file:///Users/lealobanov/Desktop/Projects/flow-kmm/flow/src/commonMain/kotlin/org/onflow/flow/crypto/Keys.kt:18:1 Expected PublicKey has no actual declaration in module <org.onflow.flow:flow> for Native

Looks like we will need to add iOS analog methods for the Crypto implementation added to replace functionality that was previously handled by Flow-JVM on Android.


For contributor use:

  • Targeted PR against master branch
  • Linked to Github issue with discussion and accepted design OR link to spec that describes this work.
  • Updated relevant documentation
  • Re-reviewed Files changed in the Github PR explorer
  • Added appropriate labels

@@ -4,7 +4,7 @@ import kotlinx.serialization.*
import org.onflow.flow.infrastructure.Base64ByteArray

@Serializable
data class FlowAddress private constructor(val bytes: ByteArray) {
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is there a reason why the Address class was set to private? Would like to replace FlowAddress import from Flow JVM SDK.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

it should be public, I think we should get rid of flow jvm.

Copy link
Collaborator Author

@lealobanov lealobanov Mar 31, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi @lmcmz,
https://github.com/onflow/flow-kmm/blob/15167f38c5fd2b51c21bcba6f5f17e8e90f35e0f/flow/src/commonMain/kotlin/org/onflow/flow/models/AccountPublicKey.kt

Is there a specific reasons fields like sequence_number, weight, index are set to type String in flow-kmm? Flow-JVM assumes Int type for these fields, so I am having to cast a lot of values .toInt() to work with some of the AccessAPI endpoints. I am working on phasing these out to use methods from flow-kmm instead, just wondering if there was a specific decision why String was used.

Thanks!

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sorry, for late reply for this.
The kmm use http rpc directly, the api return in string format.
I'm happy to convert into int, we need add some custom decoder
https://developers.flow.com/http-api#tag/Accounts/paths/~1accounts~1%7Baddress%7D/get

@@ -4,7 +4,7 @@ import kotlinx.serialization.*
import org.onflow.flow.infrastructure.Base64ByteArray

@Serializable
data class FlowAddress private constructor(val bytes: ByteArray) {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

it should be public, I think we should get rid of flow jvm.

@lealobanov lealobanov changed the title Add transaction status Unknown Feature parity updates Apr 1, 2025
Copy link
Collaborator

@lmcmz lmcmz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great work!
Is it possible to add a unit test to sign a real tx to testnet chain ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants