Skip to content

feat: Android WalletKit SDK implementation#40

Merged
TrueCarry merged 48 commits into
mainfrom
dev/android-kit
Oct 17, 2025
Merged

feat: Android WalletKit SDK implementation#40
TrueCarry merged 48 commits into
mainfrom
dev/android-kit

Conversation

@nikdim03
Copy link
Copy Markdown
Contributor

No description provided.

TrueCarry and others added 30 commits September 9, 2025 00:11
- 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.
Copy link
Copy Markdown
Collaborator

@TrueCarry TrueCarry left a comment

Choose a reason for hiding this comment

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

Need to do proper cleanup, remove quickjs, excessive md files

Comment thread apps/androidkit/TONWalletKit-Android/local.properties Outdated
- 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.
package io.ton.walletkit.demo.model

enum class TonNetwork {
MAINNET,
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

What about '-239' and '-3'?

@TrueCarry TrueCarry merged commit b1e7a4a into main Oct 17, 2025
4 of 9 checks passed
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