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

Publish for all kotlin platforms #5

Open
Alex009 opened this issue Jul 18, 2021 · 16 comments
Open

Publish for all kotlin platforms #5

Alex009 opened this issue Jul 18, 2021 · 16 comments
Labels
enhancement New feature or request

Comments

@Alex009
Copy link
Member

Alex009 commented Jul 18, 2021

our dependencies support all platforms and we not use expect/actual - it's time to publish for all platforms

@Alex009 Alex009 added the enhancement New feature or request label Jul 18, 2021
@luca992
Copy link

luca992 commented Jan 24, 2022

Is there any eta on this?

@y9san9
Copy link
Collaborator

y9san9 commented Jan 25, 2022

We've just started to work in this way, stay tuned. We are going to publish iOS and JS platforms within this month and add a transaction signing process into the library

@luca992
Copy link

luca992 commented Jan 25, 2022

We've just started to work in this way, stay tuned. We are going to publish iOS and JS platforms within this month and add a transaction signing process into the library

Do you mean all native platforms? iOS is already targeted from what I see.

@y9san9
Copy link
Collaborator

y9san9 commented Jan 25, 2022

I mean only iOS for now, because of the our needs, we will use web3swift for transaction signing. Can you tell a bit more about your usecase?

@luca992
Copy link

luca992 commented Jan 25, 2022

I mean only iOS for now, because of the our needs, we will use web3swift for transaction signing. Can you tell a bit more about your usecase?

Making a web3 app in compose ui. Which is now supporting js and native if you compile it yourself, it probably is going to be released soon (js,ios/macOS at least). Would be nice to have a web3 library which supports all platforms.

@y9san9
Copy link
Collaborator

y9san9 commented Jan 25, 2022

Do you need to sign transactions/transfer/write smart contract methods in your app?

@luca992
Copy link

luca992 commented Jan 25, 2022

Do you need to sign transactions/transfer/write smart contract methods in your app?

Still figuring web3 out and learning as I go... so I don't fully understand all my requirements yet haha. But, I will need to be able to both mint and purchase nfts essentially

@y9san9
Copy link
Collaborator

y9san9 commented Jan 25, 2022

So yes, you need this functionality. It's hard to implement in Kotlin since there are cryptographic functions being used for signing. So we decided to use native frameworks for these cases, but it may be problematic to find a framework for every single platform.

@y9san9
Copy link
Collaborator

y9san9 commented Jan 25, 2022

It's not problem to do it with JS/iOS/jvm and that's our goals for now. Rewriting the entire signing process to Kotlin Multiplatform will help us to release the library to every platform, but as I meantioned above it's not so easy.

@luca992
Copy link

luca992 commented Jan 25, 2022

I understand. JS/iOS/jvm would be great for my needs for now 👍. A native mac target would be cool too if web3swift supports it. Thanks for the quick response

@luca992
Copy link

luca992 commented Feb 21, 2022

Any reason why you guys are using the OkHttp engine for ktor? Just swapping that for the CIO engine seems to get it working for JVM. If I submitted that as a pull request would you consider it? (That or using different engines for jvm and android?)

@y9san9
Copy link
Collaborator

y9san9 commented Mar 1, 2022

@Alex009 I think the comment above is up to you

@Alex009
Copy link
Member Author

Alex009 commented Mar 1, 2022

@luca992 OkHttp work on jvm too.
CIO engine available for all kotlin targets but not completed on native - https not supported yet as i know

@luca992
Copy link

luca992 commented Mar 1, 2022

@Alex009 cio is the only option which support both Android and jvm according to the docs. https://ktor.io/docs/http-client-engines.html#jvm-android

Plus, I tried using okhttp and confirmed it did not work on jvm.

I could always make a pull request with okhttp for Android and maybe apache for jvm? Or whatever engine you prefer for jvm

@Alex009
Copy link
Member Author

Alex009 commented Mar 1, 2022

You do something wrong. Okhttp is jvm library an we already use it in jvm https://github.com/icerockdev/binance-futures-kotlin-api/blob/master/src/main/kotlin/dev/icerock/binance/futures/FuturesApi.kt

@luca992
Copy link

luca992 commented Mar 1, 2022

Huh, I guess you're right.

I just rebuilt with OkHttp and I'm not getting the runtime error I was getting before. I think there was an issue with the ktor version I was using in the app and the older version being used in moko-web3. I updated my fork of moko-web3 to use ktor 2.0.0-beta which is what I'm also using in my app and now everything seems to be playing nice.

Sorry for the confusion, ktor's documentation isn't very clear. Disregard this issue.

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

No branches or pull requests

3 participants