The Good Tech Companies - Integrating JavaScript into Crypto Trading Apps: Challenges & Solutions
Episode Date: April 16, 2025This story was originally published on HackerNoon at: https://hackernoon.com/integrating-javascript-into-crypto-trading-apps-challenges-and-solutions. Discover how integ...rating a TypeScript SDK into native crypto apps enhances stability, reduces errors, and improves mobile trading experiences. Check more stories related to programming at: https://hackernoon.com/c/programming. You can also check exclusive content about #javascript-integration, #crypto-trading, #typescript-sd, #mobile-app-development, #crypto-wallet-integration, #webview, #eip-1193, #good-company, and more. This story was written by: @evedex. Learn more about this writer by checking @evedex's about page, and for more stories, please visit hackernoon.com. EVEDEX and CleverPumpkin tackled integrating a TypeScript SDK into native crypto apps, overcoming JavaScript compatibility and native integration challenges. Using native code for network tasks, WebView for wallet interactions, and standard APIs like EIP-1193 ensured unified logic, fast development, and stable performance—laying groundwork for future mobile crypto app innovation.
Transcript
Discussion (0)
This audio is presented by Hacker Noon, where anyone can learn anything about any technology.
Integrating JavaScript into Crypto Trading Apps, Challenges and Solutions
by EVEDEX
How to build a mobile crypto app and ensure its stability
Modern crypto traders are increasingly choosing smartphones as their primary tool.
According to industry data, over 60% of trades are made via mobile devices.
This demands that developers create
not just visually appealing apps, but fully functional, secure, and high-speed trading
platforms, where even minor bugs can lead to serious consequences, from incorrect balance
displays to lost funds. Building a mobile crypto trading app is not just about porting a web
interface into an app. It's a standalone engineering challenge
with many nuances. Users expect to trade quickly, conveniently, and securely, without needing
to understand the technical details. Key trends shaping the mobile crypto trading
market include a shift from web to mobile, interfaces are embracing mobile-first design,
and performance demands are rising. Demand for native experiences. Apps must
be fast, secure, and feel, native, to the operating system. In this article, we
share how the EVEDEX team and developers from Clever Pumpkin integrated a
TypeScript SDK, originally built for the web, into native apps to maintain unified
business logic across platforms. This solution offered many advantages,
but also brought a fair share of challenges with it.
Why we chose SDK and the challenges we faced,
the web version of EVEDX already used a custom exchange SDK,
a TypeScript library that connects the exchange API
on the client side.
Over time, it has developed comprehensive business logic,
including market data aggregation,
order signing, and validation.
The key objective was to ensure consistent behavior across all platforms.
Our aim was to avoid duplicating logic, reduce the number of bugs, and speed UP development.
This meant integrating the existing web SDK into native mobile apps.
However, the SDK was written in TypeScript and wasn't
originally designed for us outside of a browser. This became our primary technical challenge.
Greater than, we discussed all possible implementation options in detail.
Taking the full greater than context into account, we decided to try integrating the full
TypeScript SDK greater than into the native apps. This was new territory for us, but we were ready to greater than tackle this unconventional
task.
Greater than greater than greater than Alexander Kiakin, CTO of Clever Pumpkin the first step
was embedding a fully fledged JavaScript engine into the app.
Only OS, we had access to the built-in JavaScript core, but for Android, we had to look for
an alternative. We chose Liquid Core, we had to look for an alternative.
We chose Liquid Core, an independent, open-source JS engine.
To ensure smooth interaction with the SDK from the native code, we developed a cross-platform
wrapper that facilitated communication between the SDK and the app's business logic.
Challenges we faced not all JS engines support the latest ECMAScript syntax.
We had to downgrade the TypeScript Transpilation target to a JavaScript version that is compatible with the engine.
JS engines don't have direct access to system capabilities.
Things like HTTP requests, WebSockets, and network communication had to be implemented in the native code.
As a result, the SDK was modified.
It now uses external interfaces for network logic,
HTTP and WebSocket interactions are handled on the Swift, Kotlin side, while the processing logic remains in JavaScript.
In the end, the business logic stayed within the SDK, and low-level network operations were delegated to the native code.
This allowed us to preserve architectural consistency and speed UP development without compromising performance. Wallet integration.
Implementing deposits and withdrawals no crypto exchange can operate without
deposit and withdrawal functionality. Our goal was to make this process intuitive
and secure. To enhance user convenience, we added support for flexible asset
transfers between networks using the Li-Fi service, which allows users to transfer assets from one network to another.
Do it in just a few clicks, without manually searching for bridges or understanding the
complex logic of cross-chain interactions.
Choose the best option based on price, speed preferences.
We intentionally chose to use WebView. Although the app is built using native
technologies, and a separate JavaScript engine is used for SDK operations, WebView allowed us
to quickly integrate the Li-Fi interface without having Tor implement its UI natively. This enabled
a consistent user experience across both web and mobile platforms and made it easier to update
deposit functionality. At the same time, we had to consider the specifics of working with crypto wallets in a mobile
environment.
For connecting and interacting with wallets, Woosd.ip 1193, Ethereum provider JavaScript
API, which is the standard that defines how apps can integrate with Ethereum wallets.
The mobile app supports several connection methods via Metamask. importing an external wallet using a seed phrase or private key, creating a new wallet directly inside the app.
Regardless of the chosen method, the app can serve as the wallet provider's fourth deposit page.
This allowed us to reuse the existing web interface without needing to build a separate system for the mobile app. NB At the current stage, EVEDX operates with
Ethereum-compatible networks only, so alternative standards were not considered.
Conclusion and key take-away ways integrating a TypeScript SDK into a native mobile app
turned out to be an unconventional and sometimes challenging task, but it allowed us to ensure
consistent behavior across all platforms, eliminate logic duplication,
reduce the number of errors, and significantly speed up the development process. A web SDK can
be adapted for mobile environments, but it requires architectural reconsideration and
proper logic decomposition. Decoupling business logic from system-level operations is essential
for sustainable architecture. In our case, the native code handles network operations
and WebSocket communication, while the SDK focuses solely on business logic.
Using standards like EIP-1193 helps to maintain wallet compatibility
and simplify implementation.
Combining native code, a JavaScript engine, and WebView gave us the right balance
between development speed, flexibility,
and user experience.
Greater than, it wasn't easy, but now we know exactly how to embed a TypeScript SDK
into a greater than native crypto app.
This not only sped up development but also gave us an greater than architectural foundation
for the future.
Greater than greater than greater than, Vlad Komsarov, CTO at Evadex The development of
the EVEDEX mobile app wasn't just another product launch, it was a real technological
experiment that can now serve as a starting point for other teams looking for unconventional
solutions in the crypto world.
Written by, Vlad Komsarov, CTO of Evadex Alexander Kiakin, CTO of Clever Pumpkin
Thank you for listening to this Hacker Noon story, read by Artificial Intelligence.
Visit HackerNoon.com to read, write, learn and publish.