Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
21 commits
Select commit Hold shift + click to select a range
6756edb
feat: support 4.2-dev
HashEngineering Sep 25, 2026
42ff8ff
feat: upgrade to v4.2-dev.8
HashEngineering Sep 28, 2026
949074e
feat: expose the network's Platform protocol version
HashEngineering Sep 28, 2026
9b94cd5
ci: skip retired Android SDK tools package
HashEngineering Oct 8, 2026
486548b
feat: upgrade to Platform 5.0 and support App Connect
HashEngineering Oct 20, 2026
25c83e7
feat: expose safe wallet token-purchase requests
HashEngineering Oct 20, 2026
06b95e9
fix: provision wallet signing keys and prove current application key …
HashEngineering Oct 21, 2026
9030c70
fix: propagate data contract query and conversion failures
HashEngineering Oct 22, 2026
ee4e03f
fix: require opt-in critical key migration and use DashJ 24
HashEngineering Oct 24, 2026
76d0a48
fix: guard identity updates and wallet signing with caller authorization
HashEngineering Oct 25, 2026
9fdfe17
Expose complete proof-verified contract group scope for Android
HashEngineering Oct 26, 2026
d475d12
Pin DashJ 24 to the published timestamped build
HashEngineering Oct 26, 2026
e9d3709
Preserve purchase operation nonces and expose canonical replay IDs
HashEngineering Oct 29, 2026
f4add6f
Upgrade Platform SDK integration to 5.0.1
HashEngineering Oct 29, 2026
e32047a
Regenerate Android Ferment bindings for Platform 5.0.1
HashEngineering Oct 29, 2026
8e1c91b
Use unsigned local publication in SDK CI
HashEngineering Oct 29, 2026
e223d83
chore: set dash-sdk-bindings to 5.0.1
HashEngineering Oct 29, 2026
68a7dcb
feat: add the DIP-13 rotation level to application encryption keys (#42)
PastaPastaPasta Oct 29, 2026
3b30555
fix: sync bindings lockfile with 5.0.1
HashEngineering Oct 29, 2026
bb3eeae
Forward declare ValueMap independently of generated header order
HashEngineering Oct 30, 2026
ebf32c4
chore: prepare 5.0.1 Maven Central release
HashEngineering Nov 4, 2026
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
26 changes: 19 additions & 7 deletions .github/workflows/build-and-verify-alignment.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,9 @@ jobs:

- name: Setup Android SDK
uses: android-actions/setup-android@v3
with:
# The action defaults to the retired SDK package "tools".
packages: platform-tools

- name: Install Android NDK
run: |
Expand All @@ -43,7 +46,9 @@ jobs:
${{ runner.os }}-gradle-

- name: clone platform repo
run: git clone --branch ferment-4.0 https://github.com/hashengineering/platform.git ../platform
run: |
git clone --branch ferment-5.0.1 https://github.com/HashEngineering/platform.git ../platform
git -C ../platform checkout --detach "$(cat platform-revision.txt)"

- name: clone rs-x11-hash repo
run: git clone --branch feat/add-android-support https://github.com/hashengineering/rs-x11-hash.git ../rs-x11-hash
Expand Down Expand Up @@ -72,7 +77,7 @@ jobs:
echo "PROTOC_INCLUDE=$HOME/.local/include" >> $GITHUB_ENV

- name: Install cbindgen
run: cargo install cbindgen
run: cargo install cbindgen --version 0.29.0 --locked

- name: generate the header file
run: |
Expand All @@ -88,15 +93,15 @@ jobs:

- name: Install Cargo NDK and Rust targets
run: |
cargo install cargo-ndk --version "^3"
rustup component add rust-src --toolchain nightly
rustup target add aarch64-linux-android armv7-linux-androideabi i686-linux-android x86_64-linux-android --toolchain nightly
cargo install cargo-ndk --version 4.1.2 --locked
rustup toolchain install nightly-2026-09-24 --profile minimal --component rust-src
rustup target add aarch64-linux-android armv7-linux-androideabi i686-linux-android x86_64-linux-android --toolchain nightly-2026-09-24

- name: Build CMake
run: ./gradlew cmakeClean cmakeConfigure cmakeBuild

- name: Build with Gradle
run: ./gradlew build -x test -PskipDetekt
run: ./gradlew build -x test -PskipDetekt -PskipSigning

- name: Verify 16KB Page Size Alignment
run: ./scripts/verify-16kb-alignment.sh
Expand Down Expand Up @@ -130,6 +135,13 @@ jobs:
echo
done

sdk_aar=dash-sdk-android/build/outputs/aar/dash-sdk-android-release.aar
test -s "$sdk_aar"
unzip -Z1 "$sdk_aar" > "$RUNNER_TEMP/sdk-aar-entries.txt"
for abi in arm64-v8a x86_64; do
grep -Fxq "jni/$abi/libsdklib.so" "$RUNNER_TEMP/sdk-aar-entries.txt"
done

- name: Upload build artifacts
uses: actions/upload-artifact@v4
if: always()
Expand All @@ -147,4 +159,4 @@ jobs:
name: lint-reports
path: |
**/build/reports/lint-results-*.html
retention-days: 7
retention-days: 7
52 changes: 52 additions & 0 deletions DEVNETS.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
# Explicit network configuration

Use `NetworkConfiguration` to send the same HTTPS endpoints to the Kotlin DAPI
client and the native Platform SDK. The legacy boolean constructors remain for
mainnet/testnet; they cannot identify a named devnet.

```kotlin
val configuration = NetworkConfiguration.sakura()
val options = ClientOptions.builder()
.network(configuration, sakuraCoreParams)
.build()
val client = Client(options)
```

`sakuraCoreParams` must be an operator-configured DashJ `DevNetParams` whose
`devNetName` is `devnet-sakura`. Supply the correct Core P2P port, spork address,
quorum settings and bootstrap peers. These are not inferred from Platform IPs.
Configure the client's masternode-list manager/context provider as usual before
making proof-verified requests. The native explicit-network constructor requires
a quorum-public-key callback; it does not silently use mainnet/testnet Core RPC.

For direct Platform construction:

```kotlin
val platform = Platform(sakuraCoreParams, NetworkConfiguration.sakura())
```

For another devnet, supply its name and complete endpoints:

```kotlin
val configuration = NetworkConfiguration(
"devnet-example",
listOf("https://node.example.org:1443")
)
```

Endpoints require HTTPS, an explicit port, and valid certificates. Credentials,
paths other than `/`, queries, fragments, and empty lists are rejected. Explicit
configuration does not disable certificate verification or read Rust `.env`
settings. Do not also supply `dapiAddresses` or a separate address provider in
`ClientOptions`. This is an initial node list, not automatic node discovery.

The Sakura preset contains the 13 validator IPs advertised by
https://status.testnet.networks.dash.org/n/devnet-sakura/connect on 2026-10-09,
using port 1443. One endpoint was checked with normal TLS verification. Devnet
deployments can change; applications may supply an updated list without an SDK
release. The dashboard advertised protocol v14 at inspection time; the SDK uses
its devnet bootstrap version and normal protocol discovery, not a Sakura-specific
hard-coded protocol version.

This SDK change does not add a wallet build flavor, provision Core parameters,
publish a Maven artifact, or prove that a funded registration succeeds on Sakura.
13 changes: 12 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,17 @@ kotlin-platform is the library that supports Platform functionality for the Java
* _tools_ - a module that contains the WalletTool program

## Build Instructions
The sibling `../platform` checkout must use `HashEngineering/platform`, branch
`ferment-5.0.1`, at the commit in `platform-revision.txt`. This includes upstream
Platform `v5.0.1` and the Ferment/JNI compatibility patches. CI uses the same
revision; the Platform commit must be pushed before running CI for an updated pin.
Desktop Rust uses `1.98.1`; Android uses `nightly-2026-09-24` with `rust-src`.

```bash
git clone --branch ferment-5.0.1 https://github.com/HashEngineering/platform.git ../platform
git -C ../platform checkout --detach "$(cat platform-revision.txt)"
```

See [dash-sdk-bindings readme](dash-sdk-bindings/README.md) for build instructions of the basic bindings system.
Perform these steps first.

Expand Down Expand Up @@ -69,4 +80,4 @@ Currently only building for Android on a Mac is supported.
| **Mac (x86_64)** | N/A | N/A | N/A | N/A | N/A | N/A | N/A | N/A | N/A |
| **Linux (arm64)** | N/A | N/A | N/A | N/A | N/A | N/A | N/A | N/A | N/A |
| **Linux (x86_64)** | No 32-bit support Crashes | No Crashes | No 32-bit support Crashes | No Crashes | N/A | N/A | N/A | N/A | N/A |
| **Windows (x86_64)** | Not supported | Not supported | Not supported | Not supported | Not Tested | N/A | N/A | N/A | N/A |
| **Windows (x86_64)** | Not supported | Not supported | Not supported | Not supported | Not Tested | N/A | N/A | N/A | N/A |
7 changes: 4 additions & 3 deletions build.gradle
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
buildscript {
ext.version = '4.0.1'
ext.version = '5.0.1'
ext.kotlin_version = '2.1.20'
ext.dashj_version = '22.0.1'
ext.dashj_version = '24.0.0'
repositories {
google() // Required for Android library and application projects
mavenCentral()
Expand All @@ -23,7 +23,8 @@ allprojects {
google() // Required for Android library and application projects
mavenCentral()
maven { url 'https://s01.oss.sonatype.org/content/repositories/snapshots/' }
maven { url 'https://central.sonatype.com/repository/maven-snapshots/' }
}

group = 'org.dashj.platform'
}
}
23 changes: 20 additions & 3 deletions dash-sdk-android/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,14 @@ android {

testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
consumerProguardFiles "consumer-rules.pro"
def cargoTargetDir = System.getenv('CARGO_TARGET_DIR')
if (cargoTargetDir) {
externalNativeBuild {
cmake {
arguments "-DCARGO_TARGET_DIR=${rootProject.file(cargoTargetDir).absolutePath}"
}
}
}
}

buildTypes {
Expand Down Expand Up @@ -77,7 +85,7 @@ task buildRustRelease() {
workingDir 'src/main/rust' // Adjust to the path of your Rust project relative to your Android project
environment "CARGO_TARGET_DIR", "target"
//environment "CARGO_FEATURE_STD", 1 // this is to trick indexmap v1.9.3, among others
commandLine 'cargo', '+nightly', 'ndk', '-t', abi, '--platform', '24', 'build', '--release', '-Zbuild-std'
commandLine 'cargo', '+nightly-2026-09-24', 'ndk', '-t', abi, '--platform', '24', 'build', '--release', '-Zbuild-std'
// Uncomment the next line if you need verbose output for debugging
// commandLine 'cargo', '+nightly', 'ndk', '-t', abi, '-o', outputPath, '--platform', '24', 'build', '--release', '-Zbuild-std', '-vv'
}
Expand All @@ -102,6 +110,13 @@ dependencies {
androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.2'
}

// Android compiles the C++ wrapper generated by the Java SDK's SWIG task.
tasks.configureEach {
if (name.startsWith('configureCMake') || name.startsWith('buildCMake')) {
dependsOn ':dash-sdk-java:generateSWIG'
}
}

task sourcesJar(type: Jar) {
from android.sourceSets.main.java.srcDirs
archiveClassifier.set("sources")
Expand Down Expand Up @@ -218,6 +233,8 @@ afterEvaluate {
}
signing {
required { gradle.taskGraph.hasTask("publish") }
sign publishing.publications.release
if (!project.hasProperty('skipSigning')) {
sign publishing.publications.release
}
}
}
}
10 changes: 7 additions & 3 deletions dash-sdk-android/src/main/cpp/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ set(RUST_SOURCE_DIR "${CMAKE_SOURCE_DIR}/../rust")
# Override with -DCARGO_TARGET_DIR=/path if needed.
if(NOT DEFINED CARGO_TARGET_DIR)
execute_process(
COMMAND cargo +nightly metadata --format-version 1 --no-deps
COMMAND cargo +nightly-2026-09-24 metadata --format-version 1 --no-deps
WORKING_DIRECTORY ${RUST_SOURCE_DIR}
OUTPUT_VARIABLE CARGO_METADATA
RESULT_VARIABLE CARGO_METADATA_RESULT
Expand All @@ -60,6 +60,10 @@ file(
RUST_PROJECT_FILES "${RUST_SOURCE_DIR}/build.rs"
"${RUST_SOURCE_DIR}/src/*.rs"
"${RUST_SOURCE_DIR}/Cargo.toml"
"${RUST_SOURCE_DIR}/Cargo.lock"
"${CMAKE_SOURCE_DIR}/../../../../platform-mobile/src/*.rs"
"${CMAKE_SOURCE_DIR}/../../../../platform-mobile/Cargo.toml"
"${CMAKE_SOURCE_DIR}/../../../../rust-toolchain.toml"
)
# Set RUSTFLAGS for 16KB page alignment
set(RUSTFLAGS_16KB "-C link-arg=-Wl,-z,max-page-size=16384")
Expand All @@ -68,7 +72,7 @@ set(RUSTFLAGS_16KB "-C link-arg=-Wl,-z,max-page-size=16384")
add_custom_command(
OUTPUT ${RUST_LIB_OUTPUT_PATH}
COMMAND ${CMAKE_COMMAND} -E touch ${RUST_SOURCE_DIR}/Cargo.toml
COMMAND ${CMAKE_COMMAND} -E env RUSTFLAGS=${RUSTFLAGS_16KB} cargo +nightly ndk -t ${RUST_TARGET_TRIPLE} --platform ${ANDROID_API_LEVEL} build --release -Zbuild-std
COMMAND ${CMAKE_COMMAND} -E env CARGO_TARGET_DIR=${CARGO_TARGET_DIR} RUSTFLAGS=${RUSTFLAGS_16KB} cargo +nightly-2026-09-24 ndk -t ${RUST_TARGET_TRIPLE} --platform ${ANDROID_API_LEVEL} build --release -Zbuild-std
WORKING_DIRECTORY ${RUST_SOURCE_DIR}
COMMENT "Building Rust library with cargo ndk"
DEPENDS ${RUST_PROJECT_FILES}
Expand All @@ -95,4 +99,4 @@ find_library(ANDROID_LIB android)
include_directories(${JNI_INCLUDE_DIRS}, ${CMAKE_SOURCE_DIR}/../../../../dash-sdk-java/src/main/cpp)
add_library(sdklib SHARED ${C_SOURCE_FILE})
add_dependencies(sdklib BuildRustLib)
target_link_libraries(sdklib PRIVATE ${RUST_LIB_OUTPUT_PATH} ${LOG_LIB} ${ANDROID_LIB})
target_link_libraries(sdklib PRIVATE ${RUST_LIB_OUTPUT_PATH} ${LOG_LIB} ${ANDROID_LIB})
Loading
Loading