Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
48 commits
Select commit Hold shift + click to select a range
d380ea9
testing ios integration
TrueCarry Sep 1, 2025
a97fe16
Attempt to run native swift code with kit bridge
TrueCarry Sep 2, 2025
30cb49b
Something is loading!
TrueCarry Sep 2, 2025
33dc8e6
App opens and says it's loaded
TrueCarry Sep 2, 2025
4729ad9
Remove duplicates
TrueCarry Sep 2, 2025
d5324d9
Remove more code
TrueCarry Sep 2, 2025
ab93d6f
Fixed main screen
TrueCarry Sep 2, 2025
20eedba
Remove walletkit webview engine
TrueCarry Sep 3, 2025
781f8c9
Update walletkit lib import
TrueCarry Sep 3, 2025
198b944
Polyfill progress
TrueCarry Sep 3, 2025
df2b150
Timeout and fetch polyfills
TrueCarry Sep 4, 2025
08702af
Polyfill crypto secure random
TrueCarry Sep 5, 2025
4835530
Polyfill URL and TextEncoder
TrueCarry Sep 8, 2025
123f775
Fix type error for transaction request modal
TrueCarry Sep 8, 2025
65446f1
Polyfill fetch to self
TrueCarry Sep 8, 2025
4fc8ba2
Add Android WalletKit demo app and bridge scaffolding
nikdim03 Sep 28, 2025
5859d4d
feat: Implement QuickJS-backed WalletKit engine
nikdim03 Sep 28, 2025
0e84f2f
feat(android): Add QuickJS JavaScript engine support
nikdim03 Oct 6, 2025
13dd1c5
feat(android): Add performance benchmarking for QuickJS and WebView e…
nikdim03 Oct 6, 2025
370533e
docs: Revise README.md to reflect new sdk structure
nikdim03 Oct 6, 2025
4fbda96
chore: change Bundle Packaging location for WalletKit Android SDK
nikdim03 Oct 7, 2025
cf4fe27
Merge branch 'main' into dev/android-kit
nikdim03 Oct 7, 2025
828a5c6
feat: Implement WalletKit auto-initialization and request handling
nikdim03 Oct 9, 2025
c77d167
feat(storage): add data models for bridge configuration, session data…
nikdim03 Oct 9, 2025
e689530
feat: API refactor, secure storage, and wallet/transaction persistenc…
nikdim03 Oct 9, 2025
ce82656
test: Add unit tests
nikdim03 Oct 9, 2025
dfc8a22
fix: UI bugs related to transactions
nikdim03 Oct 10, 2025
62c852d
feat: implement separate secure storage for demo app
nikdim03 Oct 10, 2025
6d79060
refactor: restructure SDK and demo into separate projects with build …
nikdim03 Oct 10, 2025
122a8e0
Merge remote-tracking branch 'origin/main' into dev/android-kit
nikdim03 Oct 10, 2025
80c383e
refactor: clean architecture
nikdim03 Oct 10, 2025
5a63369
ci: add GitHub Actions workflow for Android SDK and demo app
nikdim03 Oct 10, 2025
b13004d
refactor: improve type safety and make bridge stateless
nikdim03 Oct 13, 2025
44baf63
feat: add typed events with kotlinx-serialization
nikdim03 Oct 13, 2025
d965eaa
feat: add TonConnect manifest and typed event API
nikdim03 Oct 13, 2025
066fa54
fix: display and copy sign data payload from typed event
nikdim03 Oct 13, 2025
f57528e
fix: remove incorrect fee estimation logic
nikdim03 Oct 13, 2025
c0a6629
chore: Remove QuickJS source from repo
nikdim03 Oct 13, 2025
bc19bbc
fix: fix Unit & Integration tests
nikdim03 Oct 13, 2025
fa70473
chore: remove local.properties file from version control
nikdim03 Oct 13, 2025
2df51ec
Merge remote-tracking branch 'origin/main' into dev/android-kit
nikdim03 Oct 13, 2025
e11df34
fix: Skip QuickJS CMake config for WebView variant
nikdim03 Oct 13, 2025
b34ea10
refactor: refactor WalletKit layers for clean architecture separation
nikdim03 Oct 14, 2025
a2131d3
refactor: get rid of hardcoded literals
nikdim03 Oct 14, 2025
adb0a1c
refactor: hide internal SDK implementation from AAR
nikdim03 Oct 14, 2025
e0e67c3
refactor: android studio code inspection
nikdim03 Oct 14, 2025
8d3f711
Merge branch 'main' into dev/android-kit
nikdim03 Oct 14, 2025
3804e1d
Merge branch 'main' into dev/android-kit
TrueCarry Oct 17, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
177 changes: 177 additions & 0 deletions .github/workflows/android.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,177 @@
name: Android SDK CI

on:
pull_request:
branches:
- main
paths:
- 'apps/androidkit/**'
- '.github/workflows/android.yml'

jobs:
# Build JavaScript bundles for WebView and QuickJS
build-js:
name: Build JS Bundles
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4

- name: Read .nvmrc
run: echo "NVMRC=$(cat .nvmrc)" >> $GITHUB_ENV

- uses: pnpm/action-setup@v4

- name: Set up Node.js
uses: actions/setup-node@v4
with:
node-version: '${{ env.NVMRC }}'
cache: 'pnpm'

- name: Install dependencies
run: pnpm install --frozen-lockfile

- name: Build all packages including @ton/walletkit
run: pnpm build

- name: Build JS bundles for Android
working-directory: apps/androidkit
run: pnpm run build:all

- name: Upload JS bundles
uses: actions/upload-artifact@v4
with:
name: js-bundles
path: |
apps/androidkit/dist-android/
apps/androidkit/dist-android-quickjs/
retention-days: 1

# Code formatting check with Spotless
spotless:
name: Spotless Check
runs-on: ubuntu-latest
needs: build-js
steps:
- name: Checkout code
uses: actions/checkout@v4

- name: Set up JDK 17
uses: actions/setup-java@v4
with:
distribution: 'temurin'
java-version: '17'
cache: 'gradle'

- name: Download JS bundles
uses: actions/download-artifact@v4
with:
name: js-bundles
path: apps/androidkit/

- name: Grant execute permission for gradlew
working-directory: apps/androidkit/TONWalletKit-Android
run: chmod +x gradlew

- name: Run Spotless Check
working-directory: apps/androidkit/TONWalletKit-Android
run: ./gradlew spotlessCheck

# Build and test SDK
test-sdk:
name: Test & Build SDK
runs-on: ubuntu-latest
needs: build-js
steps:
- name: Checkout code
uses: actions/checkout@v4

- name: Set up JDK 17
uses: actions/setup-java@v4
with:
distribution: 'temurin'
java-version: '17'
cache: 'gradle'

- name: Download JS bundles
uses: actions/download-artifact@v4
with:
name: js-bundles
path: apps/androidkit/

- name: Grant execute permission for gradlew
working-directory: apps/androidkit/TONWalletKit-Android
run: chmod +x gradlew

- name: Run unit tests
working-directory: apps/androidkit/TONWalletKit-Android
run: ./gradlew :bridge:testWebviewReleaseUnitTest

- name: Build WebView variant
working-directory: apps/androidkit/TONWalletKit-Android
run: ./gradlew buildWebview

- name: Upload WebView AAR
uses: actions/upload-artifact@v4
with:
name: bridge-webview-release
path: apps/androidkit/TONWalletKit-Android/bridge/build/outputs/aar/bridge-webview-release.aar
retention-days: 7

- name: Upload test results
if: always()
uses: actions/upload-artifact@v4
with:
name: test-results
path: apps/androidkit/TONWalletKit-Android/bridge/build/test-results/
retention-days: 7

# Build Demo App
build-demo:
name: Build Demo App
runs-on: ubuntu-latest
needs: build-js
steps:
- name: Checkout code
uses: actions/checkout@v4

- name: Set up JDK 17
uses: actions/setup-java@v4
with:
distribution: 'temurin'
java-version: '17'
cache: 'gradle'

- name: Download JS bundles
uses: actions/download-artifact@v4
with:
name: js-bundles
path: apps/androidkit/

- name: Grant execute permission for gradlew (SDK)
working-directory: apps/androidkit/TONWalletKit-Android
run: chmod +x gradlew

- name: Build SDK for Demo
working-directory: apps/androidkit/TONWalletKit-Android
run: ./gradlew buildWebview

- name: Copy AAR to Demo app libs
run: |
mkdir -p apps/androidkit/AndroidDemo/app/libs
cp apps/androidkit/TONWalletKit-Android/bridge/build/outputs/aar/bridge-webview-release.aar apps/androidkit/AndroidDemo/app/libs/bridge-release.aar

- name: Grant execute permission for gradlew (Demo)
working-directory: apps/androidkit/AndroidDemo
run: chmod +x gradlew

- name: Build Demo App
working-directory: apps/androidkit/AndroidDemo
run: ./gradlew assembleDebug

- name: Upload Demo APK
uses: actions/upload-artifact@v4
with:
name: demo-app-debug
path: apps/androidkit/AndroidDemo/app/build/outputs/apk/debug/app-debug.apk
retention-days: 7
14 changes: 14 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ node_modules
.env
.DS_Store
dist
dist-android
.idea
.turbo
apps/demo-wallet/dist-extension.pem
Expand All @@ -12,4 +13,17 @@ reports
*-results
*-report

apps/TONWalletApp/Packages/TONWalletKit/.swiftpm/xcode/xcuserdata/
apps/TONWalletApp/Packages/TONWalletKit/Sources/TONWalletKit/Resources/JS/walletkit-ios-bridge.mjs
apps/TONWalletApp/Packages/TONWalletKit/Sources/TONWalletKit/Resources/JS/walletkit-ios-bridge.mjs.map
apps/TONWalletApp/Packages/TONWalletKit/Sources/TONWalletKit/Resources/JS/walletkit-ios-bridge.umd.js
apps/TONWalletApp/Packages/TONWalletKit/Sources/TONWalletKit/Resources/JS/walletkit-ios-bridge.umd.js.map
apps/TONWalletApp/TONWalletApp.xcodeproj/project.xcworkspace/xcuserdata/
apps/TONWalletApp/TONWalletApp.xcodeproj/xcuserdata/
apps/TONWalletApp/TONWalletApp.xcodeproj/xcuserdata/

# Android QuickJS build artifacts
apps/androidkit/AndroidDemo/bridge/.cxx/
apps/androidkit/dist-android-quickjs/
node.log
packages/walletkit-ios-bridge/build/*
53 changes: 53 additions & 0 deletions apps/androidkit/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
# Build outputs (JavaScript bundles)
dist-android/
dist-android-quickjs/

# Dependencies
node_modules/

# macOS
.DS_Store

# Turbo cache
.turbo/

# Local Maven repository (generated artifacts)
local-maven-repo/

# Android Studio / Gradle (project level)
.gradle/
build/
.cxx/
*.iml
.idea/workspace.xml
.idea/tasks.xml
.idea/gradle.xml
.idea/assetWizardSettings.xml
.idea/dictionaries
.idea/libraries
.idea/jarRepositories.xml
.idea/compiler.xml
.idea/misc.xml
.idea/.gitignore
.idea/caches
.idea/modules.xml
.idea/navEditor.xml
.idea/deploymentTargetDropDown.xml

# Local configuration files
local.properties
gradle.properties
# But include gradle.properties for the SDK (contains required build config)
!TONWalletKit-Android/gradle.properties

# AAR files in libs folders (build artifacts)
**/libs/*.aar

# Temporary documentation files (can be regenerated)
JITPACK_QUICKSTART.md
PUBLISHING_GUIDE.md
gradle.properties.template

# Build logs
*.log
node.log
10 changes: 10 additions & 0 deletions apps/androidkit/AndroidDemo/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
# Gradle and build outputs
.gradle/
build/
app/build/
.idea/
local.properties
*.iml
.DS_Store
captures/
.kotlin
4 changes: 4 additions & 0 deletions apps/androidkit/AndroidDemo/META-INF/MANIFEST.MF
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
Manifest-Version: 1.0
Implementation-Title: Gradle
Implementation-Version: 8.7

38 changes: 38 additions & 0 deletions apps/androidkit/AndroidDemo/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
# Android WalletKit Demo

Demo app for TON WalletKit SDK.

## Setup

Build SDK first:

```bash
cd ../TONWalletKit-Android
./gradlew buildAndCopyWebviewToDemo
```

Then open this project in Android Studio and run.

## Features

- Wallet creation and import
- TON Connect integration
- Transaction signing
- Balance display and auto-refresh

## Engine Selection

Edit `WalletKitDemoApp.kt`:

```kotlin
val defaultEngineKind = WalletKitEngineKind.WEBVIEW // Recommended
```

For QuickJS: use full variant and uncomment OkHttp in `app/build.gradle.kts`.

## Structure

- `ui/` - Compose screens
- `viewmodel/` - State management
- `storage/` - Secure wallet storage
- `libs/bridge-release.aar` - SDK (copied by build task)
72 changes: 72 additions & 0 deletions apps/androidkit/AndroidDemo/app/build.gradle.kts
Original file line number Diff line number Diff line change
@@ -0,0 +1,72 @@
import org.jetbrains.kotlin.gradle.dsl.JvmTarget

plugins {
alias(libs.plugins.androidApplication)
alias(libs.plugins.kotlinAndroid)
alias(libs.plugins.kotlinCompose)
}

android {
namespace = "io.ton.walletkit.demo"
compileSdk = 36

defaultConfig {
applicationId = "io.ton.walletkit.demo"
minSdk = 24
targetSdk = 36
versionCode = 1
versionName = "1.0"
testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner"
}

buildTypes {
release {
isMinifyEnabled = false
proguardFiles(getDefaultProguardFile("proguard-android-optimize.txt"), "proguard-rules.pro")
}
}

compileOptions {
sourceCompatibility = JavaVersion.VERSION_17
targetCompatibility = JavaVersion.VERSION_17
}
buildFeatures {
compose = true
}
}

kotlin {
compilerOptions {
jvmTarget.set(JvmTarget.JVM_17)
}
}

dependencies {
implementation(libs.androidxCoreKtx)
implementation(libs.androidxAppcompat)
implementation(libs.googleMaterial)
implementation(libs.androidxActivityKtx)
implementation(libs.androidxConstraintLayout)
implementation(libs.androidxActivityCompose)
implementation(platform(libs.androidxComposeBom))
implementation(libs.androidxComposeUi)
implementation(libs.androidxComposeMaterial3)
implementation(libs.androidxComposeMaterialIconsExtended)
implementation(libs.androidxComposeUiToolingPreview)
debugImplementation(libs.androidxComposeUiTooling)
implementation(libs.androidxLifecycleRuntimeKtx)
implementation(libs.androidxLifecycleViewmodelCompose)
implementation(libs.kotlinxCoroutinesAndroid)
implementation(libs.androidxSecurityCrypto)

// TONWalletKit SDK - AAR file
// Build and copy with: ./gradlew buildAndCopyWebviewToDemo (or buildAndCopyFullToDemo)
implementation(files("libs/bridge-release.aar"))

// Required transitive dependencies (must be declared manually with AAR files)
implementation(libs.androidxWebkit)
implementation(libs.androidxDatastorePreferences)
implementation(libs.kotlinxSerializationJson)
// OkHttp only needed if using full variant:
// implementation(libs.okhttp)
}
1 change: 1 addition & 0 deletions apps/androidkit/AndroidDemo/app/proguard-rules.pro
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
# Keep default rules
Loading
Loading