feat: Android WalletKit SDK implementation#40
Merged
Conversation
- Integrated QuickJS-NG C++ library for native JavaScript execution - Implemented comprehensive Web API polyfills for wallet functionality * fetch() with automatic Content-Type header handling * crypto.subtle (PBKDF2, HMAC, SHA-256) via NaCl bridge * localStorage using SharedPreferences for persistence * EventSource for server-sent events * Headers, Request, Response APIs * URL and URLSearchParams with custom scheme support (tc://) * AbortController and AbortSignal - Added UTF-8 encoding utilities for TonConnect bridge communication - Created QuickJs wrapper with native loader for Android NDK - Added instrumentation tests for QuickJS integration - Updated build configuration to compile QuickJS C++ library via CMake This enables running TonConnect wallet logic in native QuickJS engine as an alternative to WebView, providing better performance, reduced memory footprint, and tighter integration with Android platform APIs.
* feat: Add auto-init and initialization check for WalletKit requests * test: Add unit tests for auto-initialization flow * feat: Handle connection/transaction/sign data request responses * feat: Add UI for request handling in demo app * feat: Add transaction sending UI * feat: Add wallet type switching UI * feat: Add wallet import from seed phrase paste * feat: Implement wallet switching functionality * feat: Add remove wallet capability * refactor: Improve current wallet display * fix: Fix approve connection flow * test: Verify transaction functionality * feat: Implement transaction sending * feat: Add sign data UI * test: Test transaction sending with dapp integration
…, and user preferences - Introduced `StoredBridgeConfig`, `StoredSessionData`, and `StoredUserPreferences` data classes for persisting relevant data. - Implemented `SecurityValidator` for comprehensive device security checks, including secure lock screen and hardware keystore validation. - Added unit tests for `SecureWalletKitStorage` to ensure data integrity and functionality of raw key-value methods. - Enhanced JavaScript bridge with initialization checks for walletKit.
…e improvements * test: Test transaction sending with dapp integration * fix: Fix crypto storage library crash * fix: Fix wallets disappearing issue * fix: Fix wallet persistence after app restart * refactor: Change response types from JSONObjects to Kotlin data classes * refactor: Update API to match iOS WalletKit implementation * refactor: Remove deprecated storage methods * fix: Update UI after API changes * feat: Auto-switch to newly created wallet and persist selection * fix: Fix transactions disappearing intermittently * feat: Add transaction list caching * perf: Add DiffUtil for transaction list updates * feat: Add secure persistent storage to Android WalletKit
…variants - Split SDK into independent `TONWalletKit-Android` project - Created `AndroidDemo` that consumes SDK via AAR files - Implemented product flavors: `webview` (1.2MB) and `full` (4.3MB with QuickJS) - Added automated Gradle tasks to build and copy AARs to demo app - Moved QuickJS sources to `src/full/` for variant-specific code - Implemented `WalletKitEngineFactory` to decouple demo from engine implementations - Removed Maven publishing configuration (using simple AAR distribution) - Cleaned up project structure and added comprehensive .gitignore - Configured Android Studio run configurations for variant switching WebView variant excludes native libs and OkHttp dependency. Full variant includes QuickJS engine with native libraries.
e88bba5 to
235925f
Compare
235925f to
5a63369
Compare
TrueCarry
requested changes
Oct 10, 2025
Collaborator
TrueCarry
left a comment
There was a problem hiding this comment.
Need to do proper cleanup, remove quickjs, excessive md files
- Remove duplicate endpoint defaults (JS already handles this) - Change requestId from Any to String for type safety - Remove pending Maps, add event queue to prevent event loss - Pass full events instead of IDs in approve/reject methods
Add walletManifest and deviceInfo to initialization for TonConnect compatibility. Update engines to use typed events (ConnectRequestEvent, TransactionRequestEvent, SignDataRequestEvent). Add configuration options for wallet branding and features.
6225485 to
e11df34
Compare
TrueCarry
approved these changes
Oct 17, 2025
| package io.ton.walletkit.demo.model | ||
|
|
||
| enum class TonNetwork { | ||
| MAINNET, |
Collaborator
There was a problem hiding this comment.
What about '-239' and '-3'?
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.