Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
42 commits
Select commit Hold shift + click to select a range
776c16f
Support decoding metadata v15
valentunn May 14, 2024
7333284
Roollback debug logs
valentunn May 14, 2024
948f482
Code style
valentunn May 14, 2024
3b25458
Support check metadata extension draft
valentunn May 17, 2024
dceb47c
Include check metadata hash into extrinsic
valentunn May 17, 2024
077bb96
Code style; Bump versions
valentunn May 17, 2024
67a0182
Actualize GetRuntimeVersion request
valentunn May 20, 2024
8389886
Adjust CheckMetadataHash encoding
valentunn May 20, 2024
05c076b
Fix CheckMetadataHash encoding
valentunn May 20, 2024
89b0510
Improve working with metadata version
valentunn May 20, 2024
34fd02b
Fix tests
valentunn May 20, 2024
3f87d96
Merge pull request #89 from novasamatech/feature/metadata_v15
valentunn May 24, 2024
2dd0ad6
Merge pull request #90 from novasamatech/feature/check_metadata_exten…
valentunn May 24, 2024
ecfa18a
Allow to get the call out of extrinsic builder
valentunn May 28, 2024
8fde9b3
Code style
valentunn May 28, 2024
012b8ce
Merge pull request #91 from novasamatech/extrinsic_builder_call
valentunn Jun 3, 2024
33b62a8
Improve errors (#92)
valentunn Aug 15, 2024
eb9e234
Fix/build (#93)
valentunn Aug 15, 2024
c43c1cf
Do not nullify entropy when its returned as a part of Mnemonic (#95)
valentunn Sep 3, 2024
132aeb5
Combine full extrinsic and signature creation (#96)
valentunn Oct 4, 2024
97e7a39
Fix/stack overflow (#97)
valentunn Oct 25, 2024
d08d350
Feature/keyed enum (#98)
foxwoosh Nov 19, 2024
c1d44d7
Support automatic runtime apis detection for metadata v15 and above (…
valentunn Nov 19, 2024
dbe13fe
Enrich sendable extrinsic (#100)
valentunn Dec 8, 2024
9714d87
Feature/transaction extensions (#101)
valentunn Feb 10, 2025
0518931
Feature/koltinx serialization scale (#103)
valentunn Feb 28, 2025
0cfd8f2
Fixes and TransactionExtension improvements (#104)
valentunn Apr 11, 2025
f0bf2b4
Hotfix: Scale plugin - Backport to 2.6.0 (#107)
foxwoosh May 21, 2025
6961a09
Merge pull request #108 from novasamatech/tuple-support
foxwoosh May 21, 2025
04a8088
Feature/scale kotlinx tuples (#106)
valentunn May 21, 2025
8f584fe
core dependencies update (#109)
foxwoosh May 30, 2025
5d3f0ba
Feature/bip32 ed25519 (#110)
valentunn Aug 8, 2025
7d7eae3
fix: change sonatype urls (#111)
stepanLav Aug 11, 2025
7fbdea4
Fix/json import (#113)
valentunn Aug 12, 2025
997b014
feature/camel-snake-decoding (#115)
foxwoosh Sep 22, 2025
2acffc2
Feature/raw scale encoding (#117)
valentunn Oct 13, 2025
03e7f3d
Add create random seed (#118)
antonijzelinskij Oct 29, 2025
a9c23d0
Feature/binary scale (#119)
valentunn Nov 17, 2025
3ff9ea7
Added qr secret format (#120)
antonijzelinskij Dec 3, 2025
a4c5a0a
Fix/binary scale large enum indices (#121)
valentunn Dec 23, 2025
b6a5dd4
Binary scale result (#122)
valentunn Dec 23, 2025
39676ac
Fix/annotation search (#123)
valentunn Feb 27, 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
19 changes: 12 additions & 7 deletions .github/workflows/install/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,16 +4,19 @@ runs:
using: "composite"
steps:
- name: ☕️ Install Java
uses: actions/setup-java@v3
uses: actions/setup-java@v4.0.0
with:
distribution: 'temurin'
java-version: '8'
java-version: '17'
cache: 'gradle'

- uses: nttld/setup-ndk@v1
with:
ndk-version: r21d
local-cache: true

- name: Install NDK
run: echo "y" | sudo ${ANDROID_SDK_ROOT}/cmdline-tools/latest/bin/sdkmanager --install "ndk;26.1.10909125" --sdk_root=${ANDROID_SDK_ROOT}
shell: bash

- name: Set ndk.dir in local.properties
run: echo "ndk.dir=${{ steps.setup-ndk.outputs.ndk-path }}" >> local.properties
shell: bash

- name: Install Rust
uses: actions-rs/toolchain@v1
Expand All @@ -29,4 +32,6 @@ runs:
rustup target add i686-linux-android
rustup target add x86_64-linux-android
rustup target add aarch64-linux-android
rustup target add x86_64-unknown-linux-gnu
rustup target add aarch64-apple-darwin
shell: bash
84 changes: 84 additions & 0 deletions CHANGELOG.MD
Original file line number Diff line number Diff line change
@@ -0,0 +1,84 @@
# Changelog

## v2.10.0

### Changes

#### Binary Scale Format (BinaryScale)

* Added comprehensive support for binary SCALE codec encoding and decoding
* `BinaryScale` provides direct conversion between Kotlin types and SCALE-encoded byte arrays
* Supports all SCALE types: primitives, compact integers, strings, byte arrays, lists, optionals, classes, objects, value classes, enums, and sealed classes
* Introduced binary-specific annotations:
* `@EnumIndex` - Specify custom indices for enum entries and sealed class variants
* `@FixedLength` - Encode collections without length prefix for fixed-size arrays and lists
* Wrapper classes `WithLength20`, `WithLength32`, `WithLength64` for generic fixed-length types
* Added complete test coverage with symmetrical encode/decode test suites

## v2.9.3

### Changes

#### Randomly generated seed

* Useful to create temporary accounts without mnemonic such as for gifts

## v2.9.2

* Support for raw scale serialization
* Support for encoding regular enums to DictEnum.Entry with null associated value
* Improve error messages for enum decoding

### Changes

#### Raw scale serialization

* Useful when we want to operate low level scale structures for some of the fields / arguments
* `RawScaleValue` can be used for fields
* `AsRawScaleValue` wrapper can be used for top-level serialization (e.g. storage keys / whole values)

#### Regular enum encoding to DictEnum.Entry with null associated value

* Introduced`AsDictEnum` annotation that can be applied to `enum class` to signal that it should be encoded as `DictEnum.Entry`

## v2.9.1

### Changes

* Automatically convert between snake and camel case for struct fields

## v2.9.0

This release is focused around fixes and refactoring of import from json feature

### Changes

* Fix compatibility of ED25519 and ECDSA JSON files when custom derivation path is used
* Finally make sr25519 work in tests
* Refactor and improve coverage of json-related tests. Now tests cover self-compatibility as well as
compatibility with external sources (like polkadot-js) for all encryption x derivation path cases
* Add post-conditions to ensure we always derive a public key that corresponds to the one present in json

### Breaking changes

* `JsonSeedEncoder` and `JsonSeedDecoder` are renamed to `JsonEncoder` and `JsonDecoder` respectively
* Removed `seed` argument from `JsonEncoder#generate` as well as from return type of `JsonDecoder#decode`
Seed is a vague concept in a context of a json import, which is solely focused around private key exports
so it should not be used

## v2.8.0

This release is focused around Bip32 and Bip39 derivation improvements

### New features

* Added `Bip32Ed25519KeypairFactory` that implement bip32 derivation with ed25519 curve

### Breaking changes

* `Bip32KeypairFactory` is renamed to `Bip32EcdsaKeypairFactory`
* `EthereumSeedFactory` is renamed to `Bip39SeedFactory`. It is also moved into `bip39` package (was `ethereum`)
* `EthereumKeypairFactory` is removed. `Bip32EcdsaKeypairFactory` should be used instead
* All classes related to bip32 are moved from `ethereum` to `bip32` package:
`Bip32EcdsaKeypairFactory`, `Bip32ExtendedKeyPair`

10 changes: 7 additions & 3 deletions app/build.gradle
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
apply plugin: 'com.android.application'
apply plugin: 'kotlin-android'
apply plugin: 'kotlin-android-extensions'
apply plugin: 'kotlin-kapt'

android {
namespace 'io.novasama.substrate_sdk_app'

compileSdkVersion rootProject.compileVersion
defaultConfig {
minSdkVersion rootProject.minVersion
Expand All @@ -14,10 +15,13 @@ android {
}

compileOptions {
sourceCompatibility 1.8
targetCompatibility 1.8
sourceCompatibility JavaVersion.VERSION_17
targetCompatibility JavaVersion.VERSION_17
}

kotlin {
jvmToolchain(17)
}

buildTypes {
debug {
Expand Down
38 changes: 24 additions & 14 deletions build.gradle
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
buildscript {
ext {
// App version
versionName = '2.0.2'
versionName = '2.11.2'
versionCode = 1

// SDK and tools
compileVersion = 28
compileVersion = 30
minVersion = 21
targetVersion = 28
targetVersion = 30

kotlinVersion = '1.4.31'
kotlinVersion = '2.2.21'

supportVersion = '1.0.0'
constraintVersion = '1.1.3'
Expand All @@ -23,7 +23,6 @@ buildscript {

spoungyCastleVersion = '1.58.0.0'
ed25519Version = '0.3.0'
bip39version = '2019.01.27'
web3jVersion = '4.8.0'
apacheXercesVersion = '2.9.0'

Expand All @@ -48,8 +47,8 @@ buildscript {
web3jDep = "org.web3j:crypto:$web3jVersion"
apacheXercesDep = "org.eclipse.birt.runtime.3_7_1:org.apache.xerces:$apacheXercesVersion"

bip39Dep = "io.github.novacrypto:BIP39:$bip39version"
secureStringDep = "io.github.novacrypto:securestring:$bip39version@jar"
secureStringDep = "io.github.novacrypto:SecureString:2022.01.17@jar"

wsDep = "com.neovisionaries:nv-websocket-client:$wsVersion"
xxHashDep = "org.lz4:lz4-java:$xxHashVersion"
svgDep = "com.caverock:androidsvg-aar:$svgVersion"
Expand All @@ -71,10 +70,22 @@ buildscript {
}
}
dependencies {
classpath 'com.android.tools.build:gradle:3.6.0'
classpath 'org.mozilla.rust-android-gradle:plugin:0.9.0'
classpath 'com.android.tools.build:gradle:8.10.0'
classpath 'org.mozilla.rust-android-gradle:plugin:0.9.6'
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlinVersion"
classpath 'io.github.gradle-nexus:publish-plugin:1.1.0'
classpath 'io.github.gradle-nexus:publish-plugin:2.0.0'
}
}

ext.computeVersionName = {
def verMatcher = rootProject.versionName =~ /^([0-9]+\.[0-9]+)\.([0-9]+)$/
if (!verMatcher.find()) {
throw new GradleException("Invalid versionName!")
}
if (System.getenv('BUILD_ID') != null && System.getenv('BRANCH_NAME') != null && System.getenv('BRANCH_NAME') == 'develop') {
return "${verMatcher.group(1)}.${System.getenv('BUILD_ID')}"
} else {
return "${rootProject.versionName}"
}
}

Expand All @@ -88,30 +99,29 @@ allprojects {
maven {
url "https://jitpack.io"
}
mavenCentral()
}
}

configurations {
ktlint
}

task clean(type: Delete) {
tasks.register('clean', Delete) {
delete rootProject.buildDir
}

dependencies {
ktlint "com.pinterest:ktlint:0.40.0"
}

task ktlint(type: JavaExec, group: "verification") {
tasks.register('ktlint', JavaExec) {
description = "Check Kotlin code style."
classpath = configurations.ktlint
main = "com.pinterest.ktlint.Main"
args "$project.rootDir/**/src/main/**/*.kt", "--reporter=plain", "--reporter=checkstyle,output=${buildDir}/reports/checkstyle/kotlin-checkstyle-report.xml"
}

task ktlintFormat(type: JavaExec, group: "formatting") {
tasks.register('ktlintFormat', JavaExec) {
description = "Fix Kotlin code style deviations."
classpath = configurations.ktlint
main = "com.pinterest.ktlint.Main"
Expand Down
5 changes: 4 additions & 1 deletion gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -20,4 +20,7 @@ android.enableJetifier=true
# Kotlin code style for this project: "official" or "obsolete":
kotlin.code.style=official

signing.secretKeyRingFile=./signing/key.gpg
signing.secretKeyRingFile=../signing/key.gpg
android.defaults.buildfeatures.buildconfig=true
android.nonTransitiveRClass=false
android.nonFinalResIds=false
2 changes: 1 addition & 1 deletion gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,4 @@ distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-6.1.1-all.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-8.11.1-all.zip
1 change: 1 addition & 0 deletions koltinx-serialization-scale/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
/build
Loading
Loading