ChainKit is a cross-platform blockchain utility library providing native interfaces for both iOS/macOS and Android platforms. Built with Rust at its core, ChainKit offers high-performance cryptographic and blockchain utilities with native bindings for Swift and Kotlin.
ChainKit can be built for Apple platforms (iOS/macOS) and Android.
- Rust and Cargo
- Xcode and iOS SDK (for Apple platforms)
Build for both platforms:
make all VERSION=x.y.z
Build for Apple platforms only:
make apple
Build for Android only:
make android
Clean build artifacts:
make clean
After successful builds, the framework files will be located at:
-
iOS/macOS:
platforms/ios
- Swift interface:
ChainKit.swift
- XCFramework:
ChainKitFFI.xcframework
- Swift interface:
-
Android:
platforms/android
- Native libraries for multiple architectures (arm64-v8a, armeabi-v7a, x86, x86_64)
The release process follows these steps:
-
Create a new feature branch from main
-
Implement your changes and test them locally.
-
Build and package the changes:
make yolo VERSION=x.y.z
This will clean, build all platforms, package the binaries, and update Package.swift.
-
Create a Pull Request with your changes (including updated Package.swift and generated files).
-
After PR merge, create the release:
make release VERSION=x.y.z
Please see RELEASE for more details.
Add ChainKit as a standard Swift Package Manager dependency:
dependencies: [
.package(url: "https://github.com/jup-ag/chainkit.git", from: "1.0.0")
]
Add ChainKit as a dependency using GitHub Packages:
- Add the GitHub Packages repository to your
settings.gradle
orsettings.gradle.kts
:
dependencyResolutionManagement {
repositories {
// ... other repositories ...
maven {
name = "GitHubPackages"
url = uri("https://maven.pkg.github.com/jup-ag/chainkit")
credentials {
username = project.findProperty("gpr.user") as String? ?: System.getenv("GITHUB_ACTOR")
password = project.findProperty("gpr.key") as String? ?: System.getenv("GITHUB_TOKEN")
}
}
}
}
- Add the dependency to your module's
build.gradle
orbuild.gradle.kts
:
dependencies {
implementation("ag.jup.chainkit:chainkit:1.0.0")
}
- Make sure to provide GitHub credentials either through environment variables or Gradle properties.