diff --git a/.gitignore b/.gitignore index 0f8b0e1..010ba1e 100644 --- a/.gitignore +++ b/.gitignore @@ -335,3 +335,5 @@ $RECYCLE.BIN/ !gradle/wrapper/gradle-wrapper.jar # End of https://www.gitignore.io/api/java,linux,macos,windows,android,intellij,androidstudio + +kls_database.db diff --git a/WalletSdk/.gitignore b/MobileSdk/.gitignore similarity index 100% rename from WalletSdk/.gitignore rename to MobileSdk/.gitignore diff --git a/WalletSdk/build.gradle.kts b/MobileSdk/build.gradle.kts similarity index 89% rename from WalletSdk/build.gradle.kts rename to MobileSdk/build.gradle.kts index b627da1..c96a955 100644 --- a/WalletSdk/build.gradle.kts +++ b/MobileSdk/build.gradle.kts @@ -10,7 +10,7 @@ publishing { repositories { maven { name = "GitHubPackages" - url = uri("https://maven.pkg.github.com/spruceid/wallet-sdk-kt") + url = uri("https://maven.pkg.github.com/spruceid/mobile-sdk-kt") credentials { username = System.getenv("GITHUB_ACTOR") password = System.getenv("GITHUB_TOKEN") @@ -20,8 +20,8 @@ publishing { publications { // Creates a Maven publication called "release". create("release") { - groupId = "com.spruceid.wallet.sdk" - artifactId = "walletsdk" + groupId = "com.spruceid.mobile.sdk" + artifactId = "mobilesdk" version = System.getenv("VERSION") afterEvaluate { @@ -30,9 +30,9 @@ publishing { pom { packaging = "aar" - name.set("walletsdk") - description.set("Android SpruceID Wallet SDK") - url.set("https://github.com/spruceid/wallet-sdk-kt") + name.set("mobilesdk") + description.set("Android SpruceID Mobile SDK") + url.set("https://github.com/spruceid/mobile-sdk-kt") licenses { license { name.set("MIT License") @@ -76,7 +76,7 @@ nmcp { android { - namespace = "com.spruceid.wallet.sdk" + namespace = "com.spruceid.mobile.sdk" compileSdk = 33 defaultConfig { @@ -118,7 +118,7 @@ android { } dependencies { - api("com.spruceid.wallet.sdk.rs:walletsdkrs:0.0.25") + api("com.spruceid.mobile.sdk.rs:mobilesdkrs:0.0.26") //noinspection GradleCompatible implementation("com.android.support:appcompat-v7:28.0.0") /* Begin UI dependencies */ diff --git a/WalletSdk/consumer-rules.pro b/MobileSdk/consumer-rules.pro similarity index 100% rename from WalletSdk/consumer-rules.pro rename to MobileSdk/consumer-rules.pro diff --git a/WalletSdk/proguard-rules.pro b/MobileSdk/proguard-rules.pro similarity index 100% rename from WalletSdk/proguard-rules.pro rename to MobileSdk/proguard-rules.pro diff --git a/WalletSdk/src/main/AndroidManifest.xml b/MobileSdk/src/main/AndroidManifest.xml similarity index 100% rename from WalletSdk/src/main/AndroidManifest.xml rename to MobileSdk/src/main/AndroidManifest.xml diff --git a/WalletSdk/src/main/java/com/spruceid/wallet/sdk/BaseCredential.kt b/MobileSdk/src/main/java/com/spruceid/mobile/sdk/BaseCredential.kt similarity index 86% rename from WalletSdk/src/main/java/com/spruceid/wallet/sdk/BaseCredential.kt rename to MobileSdk/src/main/java/com/spruceid/mobile/sdk/BaseCredential.kt index 7d9e7b9..a736d7a 100644 --- a/WalletSdk/src/main/java/com/spruceid/wallet/sdk/BaseCredential.kt +++ b/MobileSdk/src/main/java/com/spruceid/mobile/sdk/BaseCredential.kt @@ -1,4 +1,4 @@ -package com.spruceid.wallet.sdk +package com.spruceid.mobile.sdk open class BaseCredential constructor(private val id: String?) { diff --git a/WalletSdk/src/main/java/com/spruceid/wallet/sdk/BleCentral.kt b/MobileSdk/src/main/java/com/spruceid/mobile/sdk/BleCentral.kt similarity index 99% rename from WalletSdk/src/main/java/com/spruceid/wallet/sdk/BleCentral.kt rename to MobileSdk/src/main/java/com/spruceid/mobile/sdk/BleCentral.kt index b9f413a..a08569b 100644 --- a/WalletSdk/src/main/java/com/spruceid/wallet/sdk/BleCentral.kt +++ b/MobileSdk/src/main/java/com/spruceid/mobile/sdk/BleCentral.kt @@ -1,4 +1,4 @@ -package com.spruceid.wallet.sdk +package com.spruceid.mobile.sdk import android.bluetooth.le.* import android.os.Handler diff --git a/WalletSdk/src/main/java/com/spruceid/wallet/sdk/BleCentralCallback.kt b/MobileSdk/src/main/java/com/spruceid/mobile/sdk/BleCentralCallback.kt similarity index 92% rename from WalletSdk/src/main/java/com/spruceid/wallet/sdk/BleCentralCallback.kt rename to MobileSdk/src/main/java/com/spruceid/mobile/sdk/BleCentralCallback.kt index ea94843..51ce81b 100644 --- a/WalletSdk/src/main/java/com/spruceid/wallet/sdk/BleCentralCallback.kt +++ b/MobileSdk/src/main/java/com/spruceid/mobile/sdk/BleCentralCallback.kt @@ -1,4 +1,4 @@ -package com.spruceid.wallet.sdk +package com.spruceid.mobile.sdk import android.bluetooth.le.ScanResult diff --git a/WalletSdk/src/main/java/com/spruceid/wallet/sdk/BlePeripheral.kt b/MobileSdk/src/main/java/com/spruceid/mobile/sdk/BlePeripheral.kt similarity index 99% rename from WalletSdk/src/main/java/com/spruceid/wallet/sdk/BlePeripheral.kt rename to MobileSdk/src/main/java/com/spruceid/mobile/sdk/BlePeripheral.kt index f6192f4..fc2d874 100644 --- a/WalletSdk/src/main/java/com/spruceid/wallet/sdk/BlePeripheral.kt +++ b/MobileSdk/src/main/java/com/spruceid/mobile/sdk/BlePeripheral.kt @@ -1,4 +1,4 @@ -package com.spruceid.wallet.sdk +package com.spruceid.mobile.sdk import android.bluetooth.BluetoothAdapter import android.bluetooth.le.AdvertiseCallback diff --git a/WalletSdk/src/main/java/com/spruceid/wallet/sdk/BleSessionManager.kt b/MobileSdk/src/main/java/com/spruceid/mobile/sdk/BleSessionManager.kt similarity index 88% rename from WalletSdk/src/main/java/com/spruceid/wallet/sdk/BleSessionManager.kt rename to MobileSdk/src/main/java/com/spruceid/mobile/sdk/BleSessionManager.kt index bd02b95..bff5fe5 100644 --- a/WalletSdk/src/main/java/com/spruceid/wallet/sdk/BleSessionManager.kt +++ b/MobileSdk/src/main/java/com/spruceid/mobile/sdk/BleSessionManager.kt @@ -1,14 +1,14 @@ -package com.spruceid.wallet.sdk +package com.spruceid.mobile.sdk import android.bluetooth.BluetoothManager import android.util.Log -import com.spruceid.wallet.sdk.rs.ItemsRequest -import com.spruceid.wallet.sdk.rs.SessionManager -import com.spruceid.wallet.sdk.rs.SessionManagerEngaged -import com.spruceid.wallet.sdk.rs.initialiseSession -import com.spruceid.wallet.sdk.rs.handleRequest -import com.spruceid.wallet.sdk.rs.submitResponse -import com.spruceid.wallet.sdk.rs.submitSignature +import com.spruceid.mobile.sdk.rs.ItemsRequest +import com.spruceid.mobile.sdk.rs.SessionManager +import com.spruceid.mobile.sdk.rs.SessionManagerEngaged +import com.spruceid.mobile.sdk.rs.initialiseSession +import com.spruceid.mobile.sdk.rs.handleRequest +import com.spruceid.mobile.sdk.rs.submitResponse +import com.spruceid.mobile.sdk.rs.submitSignature import java.security.KeyStore import java.security.Signature import java.util.UUID diff --git a/WalletSdk/src/main/java/com/spruceid/wallet/sdk/BleStates.kt b/MobileSdk/src/main/java/com/spruceid/mobile/sdk/BleStates.kt similarity index 95% rename from WalletSdk/src/main/java/com/spruceid/wallet/sdk/BleStates.kt rename to MobileSdk/src/main/java/com/spruceid/mobile/sdk/BleStates.kt index f58d219..7da5bcc 100644 --- a/WalletSdk/src/main/java/com/spruceid/wallet/sdk/BleStates.kt +++ b/MobileSdk/src/main/java/com/spruceid/mobile/sdk/BleStates.kt @@ -1,4 +1,4 @@ -package com.spruceid.wallet.sdk +package com.spruceid.mobile.sdk enum class BleStates(val string: String) { Scanning("scanning"), diff --git a/WalletSdk/src/main/java/com/spruceid/wallet/sdk/ConnectionLiveData.kt b/MobileSdk/src/main/java/com/spruceid/mobile/sdk/ConnectionLiveData.kt similarity index 98% rename from WalletSdk/src/main/java/com/spruceid/wallet/sdk/ConnectionLiveData.kt rename to MobileSdk/src/main/java/com/spruceid/mobile/sdk/ConnectionLiveData.kt index e2cfb4d..d04edaf 100644 --- a/WalletSdk/src/main/java/com/spruceid/wallet/sdk/ConnectionLiveData.kt +++ b/MobileSdk/src/main/java/com/spruceid/mobile/sdk/ConnectionLiveData.kt @@ -1,4 +1,4 @@ -package com.spruceid.wallet.sdk +package com.spruceid.mobile.sdk import android.content.Context import android.content.Context.CONNECTIVITY_SERVICE diff --git a/WalletSdk/src/main/java/com/spruceid/wallet/sdk/CredentialsViewModel.kt b/MobileSdk/src/main/java/com/spruceid/mobile/sdk/CredentialsViewModel.kt similarity index 93% rename from WalletSdk/src/main/java/com/spruceid/wallet/sdk/CredentialsViewModel.kt rename to MobileSdk/src/main/java/com/spruceid/mobile/sdk/CredentialsViewModel.kt index de9b2fa..459a18f 100644 --- a/WalletSdk/src/main/java/com/spruceid/wallet/sdk/CredentialsViewModel.kt +++ b/MobileSdk/src/main/java/com/spruceid/mobile/sdk/CredentialsViewModel.kt @@ -1,14 +1,14 @@ -package com.spruceid.wallet.sdk +package com.spruceid.mobile.sdk import android.bluetooth.BluetoothManager import android.util.Log import androidx.lifecycle.ViewModel -import com.spruceid.wallet.sdk.rs.RequestData -import com.spruceid.wallet.sdk.rs.SessionData -import com.spruceid.wallet.sdk.rs.handleRequest -import com.spruceid.wallet.sdk.rs.initialiseSession -import com.spruceid.wallet.sdk.rs.submitResponse -import com.spruceid.wallet.sdk.rs.submitSignature +import com.spruceid.mobile.sdk.rs.RequestData +import com.spruceid.mobile.sdk.rs.SessionData +import com.spruceid.mobile.sdk.rs.handleRequest +import com.spruceid.mobile.sdk.rs.initialiseSession +import com.spruceid.mobile.sdk.rs.submitResponse +import com.spruceid.mobile.sdk.rs.submitSignature import kotlinx.coroutines.flow.MutableStateFlow import kotlinx.coroutines.flow.asStateFlow import java.security.KeyStore diff --git a/WalletSdk/src/main/java/com/spruceid/wallet/sdk/GattClient.kt b/MobileSdk/src/main/java/com/spruceid/mobile/sdk/GattClient.kt similarity index 99% rename from WalletSdk/src/main/java/com/spruceid/wallet/sdk/GattClient.kt rename to MobileSdk/src/main/java/com/spruceid/mobile/sdk/GattClient.kt index 42b57ef..110fec8 100644 --- a/WalletSdk/src/main/java/com/spruceid/wallet/sdk/GattClient.kt +++ b/MobileSdk/src/main/java/com/spruceid/mobile/sdk/GattClient.kt @@ -1,4 +1,4 @@ -package com.spruceid.wallet.sdk +package com.spruceid.mobile.sdk import android.bluetooth.BluetoothDevice import android.bluetooth.BluetoothGatt diff --git a/WalletSdk/src/main/java/com/spruceid/wallet/sdk/GattClientCallback.kt b/MobileSdk/src/main/java/com/spruceid/mobile/sdk/GattClientCallback.kt similarity index 92% rename from WalletSdk/src/main/java/com/spruceid/wallet/sdk/GattClientCallback.kt rename to MobileSdk/src/main/java/com/spruceid/mobile/sdk/GattClientCallback.kt index 3a6ea6d..fe50803 100644 --- a/WalletSdk/src/main/java/com/spruceid/wallet/sdk/GattClientCallback.kt +++ b/MobileSdk/src/main/java/com/spruceid/mobile/sdk/GattClientCallback.kt @@ -1,4 +1,4 @@ -package com.spruceid.wallet.sdk +package com.spruceid.mobile.sdk abstract class GattClientCallback { open fun onPeerConnected() {} diff --git a/WalletSdk/src/main/java/com/spruceid/wallet/sdk/GattServer.kt b/MobileSdk/src/main/java/com/spruceid/mobile/sdk/GattServer.kt similarity index 99% rename from WalletSdk/src/main/java/com/spruceid/wallet/sdk/GattServer.kt rename to MobileSdk/src/main/java/com/spruceid/mobile/sdk/GattServer.kt index cab3efe..2e42f60 100644 --- a/WalletSdk/src/main/java/com/spruceid/wallet/sdk/GattServer.kt +++ b/MobileSdk/src/main/java/com/spruceid/mobile/sdk/GattServer.kt @@ -1,4 +1,4 @@ -package com.spruceid.wallet.sdk +package com.spruceid.mobile.sdk import android.bluetooth.* diff --git a/WalletSdk/src/main/java/com/spruceid/wallet/sdk/GattServerCallback.kt b/MobileSdk/src/main/java/com/spruceid/mobile/sdk/GattServerCallback.kt similarity index 92% rename from WalletSdk/src/main/java/com/spruceid/wallet/sdk/GattServerCallback.kt rename to MobileSdk/src/main/java/com/spruceid/mobile/sdk/GattServerCallback.kt index 71ea112..ce9286d 100644 --- a/WalletSdk/src/main/java/com/spruceid/wallet/sdk/GattServerCallback.kt +++ b/MobileSdk/src/main/java/com/spruceid/mobile/sdk/GattServerCallback.kt @@ -1,4 +1,4 @@ -package com.spruceid.wallet.sdk +package com.spruceid.mobile.sdk abstract class GattServerCallback { open fun onPeerConnected() {} diff --git a/WalletSdk/src/main/java/com/spruceid/wallet/sdk/KeyManager.kt b/MobileSdk/src/main/java/com/spruceid/mobile/sdk/KeyManager.kt similarity index 99% rename from WalletSdk/src/main/java/com/spruceid/wallet/sdk/KeyManager.kt rename to MobileSdk/src/main/java/com/spruceid/mobile/sdk/KeyManager.kt index d71afc7..4a6c020 100644 --- a/WalletSdk/src/main/java/com/spruceid/wallet/sdk/KeyManager.kt +++ b/MobileSdk/src/main/java/com/spruceid/mobile/sdk/KeyManager.kt @@ -1,4 +1,4 @@ -package com.spruceid.wallet.sdk +package com.spruceid.mobile.sdk import android.os.Build import android.security.keystore.KeyGenParameterSpec diff --git a/WalletSdk/src/main/java/com/spruceid/wallet/sdk/KeyManagerEnvironment.kt b/MobileSdk/src/main/java/com/spruceid/mobile/sdk/KeyManagerEnvironment.kt similarity index 83% rename from WalletSdk/src/main/java/com/spruceid/wallet/sdk/KeyManagerEnvironment.kt rename to MobileSdk/src/main/java/com/spruceid/mobile/sdk/KeyManagerEnvironment.kt index 50dbd93..0f5e73e 100644 --- a/WalletSdk/src/main/java/com/spruceid/wallet/sdk/KeyManagerEnvironment.kt +++ b/MobileSdk/src/main/java/com/spruceid/mobile/sdk/KeyManagerEnvironment.kt @@ -1,4 +1,4 @@ -package com.spruceid.wallet.sdk +package com.spruceid.mobile.sdk /** * The Keystore environment used for the key generation. diff --git a/WalletSdk/src/main/java/com/spruceid/wallet/sdk/MDoc.kt b/MobileSdk/src/main/java/com/spruceid/mobile/sdk/MDoc.kt similarity index 79% rename from WalletSdk/src/main/java/com/spruceid/wallet/sdk/MDoc.kt rename to MobileSdk/src/main/java/com/spruceid/mobile/sdk/MDoc.kt index 82dc1c9..c7e1c53 100644 --- a/WalletSdk/src/main/java/com/spruceid/wallet/sdk/MDoc.kt +++ b/MobileSdk/src/main/java/com/spruceid/mobile/sdk/MDoc.kt @@ -1,7 +1,7 @@ -package com.spruceid.wallet.sdk +package com.spruceid.mobile.sdk import android.util.Log -import com.spruceid.wallet.sdk.rs.MDoc as InnerMDoc +import com.spruceid.mobile.sdk.rs.MDoc as InnerMDoc class MDoc(id: String, issuerAuth: ByteArray, val keyAlias: String) : BaseCredential(id) { val inner: InnerMDoc diff --git a/WalletSdk/src/main/java/com/spruceid/wallet/sdk/Transport.kt b/MobileSdk/src/main/java/com/spruceid/mobile/sdk/Transport.kt similarity index 98% rename from WalletSdk/src/main/java/com/spruceid/wallet/sdk/Transport.kt rename to MobileSdk/src/main/java/com/spruceid/mobile/sdk/Transport.kt index b2f59c4..73c7b99 100644 --- a/WalletSdk/src/main/java/com/spruceid/wallet/sdk/Transport.kt +++ b/MobileSdk/src/main/java/com/spruceid/mobile/sdk/Transport.kt @@ -1,4 +1,4 @@ -package com.spruceid.wallet.sdk +package com.spruceid.mobile.sdk import android.bluetooth.BluetoothManager import android.util.Log diff --git a/WalletSdk/src/main/java/com/spruceid/wallet/sdk/TransportBle.kt b/MobileSdk/src/main/java/com/spruceid/mobile/sdk/TransportBle.kt similarity index 99% rename from WalletSdk/src/main/java/com/spruceid/wallet/sdk/TransportBle.kt rename to MobileSdk/src/main/java/com/spruceid/mobile/sdk/TransportBle.kt index 22ca399..373b1dd 100644 --- a/WalletSdk/src/main/java/com/spruceid/wallet/sdk/TransportBle.kt +++ b/MobileSdk/src/main/java/com/spruceid/mobile/sdk/TransportBle.kt @@ -1,4 +1,4 @@ -package com.spruceid.wallet.sdk +package com.spruceid.mobile.sdk import android.bluetooth.BluetoothManager import android.util.Log diff --git a/WalletSdk/src/main/java/com/spruceid/wallet/sdk/TransportBleCentralClientHolder.kt b/MobileSdk/src/main/java/com/spruceid/mobile/sdk/TransportBleCentralClientHolder.kt similarity index 99% rename from WalletSdk/src/main/java/com/spruceid/wallet/sdk/TransportBleCentralClientHolder.kt rename to MobileSdk/src/main/java/com/spruceid/mobile/sdk/TransportBleCentralClientHolder.kt index ed476e9..1ad75e9 100644 --- a/WalletSdk/src/main/java/com/spruceid/wallet/sdk/TransportBleCentralClientHolder.kt +++ b/MobileSdk/src/main/java/com/spruceid/mobile/sdk/TransportBleCentralClientHolder.kt @@ -1,4 +1,4 @@ -package com.spruceid.wallet.sdk +package com.spruceid.mobile.sdk import android.app.Activity import android.bluetooth.BluetoothAdapter diff --git a/WalletSdk/src/main/java/com/spruceid/wallet/sdk/TransportBlePeripheralServerHolder.kt b/MobileSdk/src/main/java/com/spruceid/mobile/sdk/TransportBlePeripheralServerHolder.kt similarity index 99% rename from WalletSdk/src/main/java/com/spruceid/wallet/sdk/TransportBlePeripheralServerHolder.kt rename to MobileSdk/src/main/java/com/spruceid/mobile/sdk/TransportBlePeripheralServerHolder.kt index 4cb6e45..95bdccb 100644 --- a/WalletSdk/src/main/java/com/spruceid/wallet/sdk/TransportBlePeripheralServerHolder.kt +++ b/MobileSdk/src/main/java/com/spruceid/mobile/sdk/TransportBlePeripheralServerHolder.kt @@ -1,4 +1,4 @@ -package com.spruceid.wallet.sdk +package com.spruceid.mobile.sdk import android.app.Activity import android.bluetooth.BluetoothAdapter import android.bluetooth.BluetoothManager diff --git a/WalletSdk/src/main/java/com/spruceid/wallet/sdk/Utils.kt b/MobileSdk/src/main/java/com/spruceid/mobile/sdk/Utils.kt similarity index 95% rename from WalletSdk/src/main/java/com/spruceid/wallet/sdk/Utils.kt rename to MobileSdk/src/main/java/com/spruceid/mobile/sdk/Utils.kt index 6f1ca93..aa7b454 100644 --- a/WalletSdk/src/main/java/com/spruceid/wallet/sdk/Utils.kt +++ b/MobileSdk/src/main/java/com/spruceid/mobile/sdk/Utils.kt @@ -1,4 +1,4 @@ -package com.spruceid.wallet.sdk +package com.spruceid.mobile.sdk fun hexToByteArray(value: String): ByteArray { diff --git a/WalletSdk/src/main/java/com/spruceid/wallet/sdk/ui/QRCodeAnalyzer.kt b/MobileSdk/src/main/java/com/spruceid/mobile/sdk/ui/QRCodeAnalyzer.kt similarity index 98% rename from WalletSdk/src/main/java/com/spruceid/wallet/sdk/ui/QRCodeAnalyzer.kt rename to MobileSdk/src/main/java/com/spruceid/mobile/sdk/ui/QRCodeAnalyzer.kt index 8bcf56f..25ca5be 100644 --- a/WalletSdk/src/main/java/com/spruceid/wallet/sdk/ui/QRCodeAnalyzer.kt +++ b/MobileSdk/src/main/java/com/spruceid/mobile/sdk/ui/QRCodeAnalyzer.kt @@ -1,4 +1,4 @@ -package com.spruceid.wallet.sdk.ui +package com.spruceid.mobile.sdk.ui import android.graphics.ImageFormat import android.os.Build diff --git a/WalletSdk/src/main/java/com/spruceid/wallet/sdk/ui/QRCodeScanner.kt b/MobileSdk/src/main/java/com/spruceid/mobile/sdk/ui/QRCodeScanner.kt similarity index 99% rename from WalletSdk/src/main/java/com/spruceid/wallet/sdk/ui/QRCodeScanner.kt rename to MobileSdk/src/main/java/com/spruceid/mobile/sdk/ui/QRCodeScanner.kt index 2cf3146..14f9df8 100644 --- a/WalletSdk/src/main/java/com/spruceid/wallet/sdk/ui/QRCodeScanner.kt +++ b/MobileSdk/src/main/java/com/spruceid/mobile/sdk/ui/QRCodeScanner.kt @@ -1,4 +1,4 @@ -package com.spruceid.wallet.sdk.ui +package com.spruceid.mobile.sdk.ui import android.content.res.Resources import android.util.Range diff --git a/WalletSdk/src/test/java/com/spruceid/wallet/sdk/KeyManagerTest.kt b/MobileSdk/src/test/java/com/spruceid/mobile/sdk/KeyManagerTest.kt similarity index 97% rename from WalletSdk/src/test/java/com/spruceid/wallet/sdk/KeyManagerTest.kt rename to MobileSdk/src/test/java/com/spruceid/mobile/sdk/KeyManagerTest.kt index 0d483eb..a177c41 100644 --- a/WalletSdk/src/test/java/com/spruceid/wallet/sdk/KeyManagerTest.kt +++ b/MobileSdk/src/test/java/com/spruceid/mobile/sdk/KeyManagerTest.kt @@ -1,4 +1,4 @@ -package com.spruceid.wallet.sdk +package com.spruceid.mobile.sdk import org.junit.Test diff --git a/README.md b/README.md index b3aa09f..3952128 100644 --- a/README.md +++ b/README.md @@ -1,8 +1,8 @@ -# Kotlin Wallet SDK +# Kotlin Mobile SDK ## Maturity Disclaimer -In its current version, Wallet SDK has not yet undergone a formal security audit +In its current version, Mobile SDK has not yet undergone a formal security audit to desired levels of confidence for suitable use in production systems. This implementation is currently suitable for exploratory work and experimentation only. We welcome feedback on the usability, architecture, and security of this @@ -11,7 +11,7 @@ security firm before the v1.0 release. ## Architecture -Our Wallet SDKs use shared code, with most of the logic being written once in +Our Mobile SDKs use shared code, with most of the logic being written once in Rust, and when not possible, native APIs (e.g. Bluetooth, OS Keychain) are called in native SDKs. @@ -30,6 +30,6 @@ called in native SDKs. │Rust│ └────┘ ``` -- [Kotlin SDK](https://github.com/spruceid/wallet-sdk-kt) -- [Swift SDK](https://github.com/spruceid/wallet-sdk-swift) -- [Rust layer](https://github.com/spruceid/wallet-sdk-rs) +- [Kotlin SDK](https://github.com/spruceid/mobile-sdk-kt) +- [Swift SDK](https://github.com/spruceid/mobile-sdk-swift) +- [Rust layer](https://github.com/spruceid/mobile-sdk-rs) diff --git a/example/build.gradle.kts b/example/build.gradle.kts index cdf423b..ea114c5 100644 --- a/example/build.gradle.kts +++ b/example/build.gradle.kts @@ -4,11 +4,11 @@ plugins { } android { - namespace = "com.spruceid.walletsdkexample" + namespace = "com.spruceid.mobilesdkexample" compileSdk = 34 defaultConfig { - applicationId = "com.spruceid.walletsdkexample" + applicationId = "com.spruceid.mobilesdkexample" minSdk = 26 targetSdk = 34 versionCode = 1 @@ -59,7 +59,7 @@ dependencies { implementation("androidx.compose.ui:ui-graphics") implementation("androidx.compose.ui:ui-tooling-preview") implementation("androidx.compose.material3:material3") - implementation(project(mapOf("path" to ":WalletSdk"))) + implementation(project(mapOf("path" to ":MobileSdk"))) implementation("com.google.zxing:core:3.5.1") testImplementation("junit:junit:4.13.2") androidTestImplementation("androidx.test.ext:junit:1.1.5") diff --git a/example/src/androidTest/java/com/spruceid/walletsdkexample/ExampleInstrumentedTest.kt b/example/src/androidTest/java/com/spruceid/mobilesdkexample/ExampleInstrumentedTest.kt similarity index 84% rename from example/src/androidTest/java/com/spruceid/walletsdkexample/ExampleInstrumentedTest.kt rename to example/src/androidTest/java/com/spruceid/mobilesdkexample/ExampleInstrumentedTest.kt index d0ade2e..926901d 100644 --- a/example/src/androidTest/java/com/spruceid/walletsdkexample/ExampleInstrumentedTest.kt +++ b/example/src/androidTest/java/com/spruceid/mobilesdkexample/ExampleInstrumentedTest.kt @@ -1,4 +1,4 @@ -package com.spruceid.walletsdkexample +package com.spruceid.mobilesdkexample import androidx.test.platform.app.InstrumentationRegistry import androidx.test.ext.junit.runners.AndroidJUnit4 @@ -19,6 +19,6 @@ class ExampleInstrumentedTest { fun useAppContext() { // Context of the app under test. val appContext = InstrumentationRegistry.getInstrumentation().targetContext - assertEquals("com.spruceid.walletsdk", appContext.packageName) + assertEquals("com.spruceid.mobilesdk", appContext.packageName) } } \ No newline at end of file diff --git a/example/src/main/AndroidManifest.xml b/example/src/main/AndroidManifest.xml index 1364f7c..4ace2ee 100644 --- a/example/src/main/AndroidManifest.xml +++ b/example/src/main/AndroidManifest.xml @@ -27,13 +27,13 @@ android:label="@string/app_name" android:roundIcon="@mipmap/ic_launcher_round" android:supportsRtl="true" - android:theme="@style/Theme.WalletSdk" + android:theme="@style/Theme.MobileSdk" tools:targetApi="31"> + android:theme="@style/Theme.MobileSdk"> diff --git a/example/src/main/java/com/spruceid/walletsdkexample/BleCentralCallbackHandler.kt b/example/src/main/java/com/spruceid/mobilesdkexample/BleCentralCallbackHandler.kt similarity index 87% rename from example/src/main/java/com/spruceid/walletsdkexample/BleCentralCallbackHandler.kt rename to example/src/main/java/com/spruceid/mobilesdkexample/BleCentralCallbackHandler.kt index 10ee5e9..5bbdd75 100644 --- a/example/src/main/java/com/spruceid/walletsdkexample/BleCentralCallbackHandler.kt +++ b/example/src/main/java/com/spruceid/mobilesdkexample/BleCentralCallbackHandler.kt @@ -1,8 +1,8 @@ -package com.spruceid.walletsdkexample +package com.spruceid.mobilesdkexample import android.bluetooth.le.ScanResult import android.util.Log -import com.spruceid.wallet.sdk.BleCentralCallback +import com.spruceid.mobile.sdk.BleCentralCallback class BleCentralCallbackHandler: BleCentralCallback() { override fun onScanResult(callbackType: Int, result: ScanResult) { diff --git a/example/src/main/java/com/spruceid/walletsdkexample/MainActivity.kt b/example/src/main/java/com/spruceid/mobilesdkexample/MainActivity.kt similarity index 99% rename from example/src/main/java/com/spruceid/walletsdkexample/MainActivity.kt rename to example/src/main/java/com/spruceid/mobilesdkexample/MainActivity.kt index 04fa704..b469906 100644 --- a/example/src/main/java/com/spruceid/walletsdkexample/MainActivity.kt +++ b/example/src/main/java/com/spruceid/mobilesdkexample/MainActivity.kt @@ -1,4 +1,4 @@ -package com.spruceid.walletsdkexample +package com.spruceid.mobilesdkexample import android.content.Context import android.content.pm.PackageManager @@ -35,14 +35,14 @@ import androidx.compose.ui.graphics.Color import androidx.compose.ui.layout.ContentScale import androidx.compose.ui.unit.dp import androidx.core.content.ContextCompat -import com.spruceid.wallet.sdk.ConnectionLiveData -import com.spruceid.wallet.sdk.CredentialsViewModel -import com.spruceid.wallet.sdk.MDoc -import com.spruceid.wallet.sdk.PresentmentState -import com.spruceid.wallet.sdk.getBluetoothManager -import com.spruceid.wallet.sdk.getPermissions -import com.spruceid.walletsdkexample.ui.theme.WalletSdkTheme -import com.spruceid.walletsdkexample.ui.theme.rememberQrBitmapPainter +import com.spruceid.mobile.sdk.ConnectionLiveData +import com.spruceid.mobile.sdk.CredentialsViewModel +import com.spruceid.mobile.sdk.MDoc +import com.spruceid.mobile.sdk.PresentmentState +import com.spruceid.mobile.sdk.getBluetoothManager +import com.spruceid.mobile.sdk.getPermissions +import com.spruceid.mobilesdkexample.ui.theme.MobileSdkTheme +import com.spruceid.mobilesdkexample.ui.theme.rememberQrBitmapPainter import java.security.KeyFactory import java.security.KeyStore import java.security.cert.Certificate @@ -70,7 +70,7 @@ class MainActivity : ComponentActivity() { viewModel.storeCredential(generateMDoc()) - WalletSdkTheme { + MobileSdkTheme { // A surface container using the 'background' color from the theme Surface( modifier = Modifier.fillMaxSize(), diff --git a/example/src/main/java/com/spruceid/walletsdkexample/NamespaceField.kt b/example/src/main/java/com/spruceid/mobilesdkexample/NamespaceField.kt similarity index 88% rename from example/src/main/java/com/spruceid/walletsdkexample/NamespaceField.kt rename to example/src/main/java/com/spruceid/mobilesdkexample/NamespaceField.kt index 2019817..48c88e7 100644 --- a/example/src/main/java/com/spruceid/walletsdkexample/NamespaceField.kt +++ b/example/src/main/java/com/spruceid/mobilesdkexample/NamespaceField.kt @@ -1,4 +1,4 @@ -package com.spruceid.walletsdkexample +package com.spruceid.mobilesdkexample import androidx.compose.foundation.layout.Arrangement import androidx.compose.foundation.layout.Row @@ -10,11 +10,11 @@ import androidx.compose.runtime.Composable import androidx.compose.ui.Alignment import androidx.compose.ui.Modifier import androidx.compose.ui.unit.dp -import com.spruceid.walletsdkexample.ui.theme.WalletSdkTheme +import com.spruceid.mobilesdkexample.ui.theme.MobileSdkTheme @Composable fun NamespaceField(namespace: Map.Entry, isChecked: Boolean, onCheck: (Boolean) -> Unit) { - WalletSdkTheme { + MobileSdkTheme { Row( horizontalArrangement = Arrangement.SpaceBetween, verticalAlignment = Alignment.CenterVertically, diff --git a/example/src/main/java/com/spruceid/walletsdkexample/ui/theme/Color.kt b/example/src/main/java/com/spruceid/mobilesdkexample/ui/theme/Color.kt similarity index 83% rename from example/src/main/java/com/spruceid/walletsdkexample/ui/theme/Color.kt rename to example/src/main/java/com/spruceid/mobilesdkexample/ui/theme/Color.kt index b78fb87..bbff626 100644 --- a/example/src/main/java/com/spruceid/walletsdkexample/ui/theme/Color.kt +++ b/example/src/main/java/com/spruceid/mobilesdkexample/ui/theme/Color.kt @@ -1,4 +1,4 @@ -package com.spruceid.walletsdkexample.ui.theme +package com.spruceid.mobilesdkexample.ui.theme import androidx.compose.ui.graphics.Color diff --git a/example/src/main/java/com/spruceid/walletsdkexample/ui/theme/QRPainter.kt b/example/src/main/java/com/spruceid/mobilesdkexample/ui/theme/QRPainter.kt similarity index 98% rename from example/src/main/java/com/spruceid/walletsdkexample/ui/theme/QRPainter.kt rename to example/src/main/java/com/spruceid/mobilesdkexample/ui/theme/QRPainter.kt index 2a43644..82bae33 100644 --- a/example/src/main/java/com/spruceid/walletsdkexample/ui/theme/QRPainter.kt +++ b/example/src/main/java/com/spruceid/mobilesdkexample/ui/theme/QRPainter.kt @@ -1,4 +1,4 @@ -package com.spruceid.walletsdkexample.ui.theme +package com.spruceid.mobilesdkexample.ui.theme import android.graphics.Bitmap import android.graphics.Color diff --git a/example/src/main/java/com/spruceid/walletsdkexample/ui/theme/Theme.kt b/example/src/main/java/com/spruceid/mobilesdkexample/ui/theme/Theme.kt similarity index 97% rename from example/src/main/java/com/spruceid/walletsdkexample/ui/theme/Theme.kt rename to example/src/main/java/com/spruceid/mobilesdkexample/ui/theme/Theme.kt index 2e2475a..f912882 100644 --- a/example/src/main/java/com/spruceid/walletsdkexample/ui/theme/Theme.kt +++ b/example/src/main/java/com/spruceid/mobilesdkexample/ui/theme/Theme.kt @@ -1,4 +1,4 @@ -package com.spruceid.walletsdkexample.ui.theme +package com.spruceid.mobilesdkexample.ui.theme import android.app.Activity import android.os.Build @@ -38,7 +38,7 @@ private val LightColorScheme = lightColorScheme( ) @Composable -fun WalletSdkTheme( +fun MobileSdkTheme( darkTheme: Boolean = isSystemInDarkTheme(), // Dynamic color is available on Android 12+ dynamicColor: Boolean = true, diff --git a/example/src/main/java/com/spruceid/walletsdkexample/ui/theme/Type.kt b/example/src/main/java/com/spruceid/mobilesdkexample/ui/theme/Type.kt similarity index 95% rename from example/src/main/java/com/spruceid/walletsdkexample/ui/theme/Type.kt rename to example/src/main/java/com/spruceid/mobilesdkexample/ui/theme/Type.kt index a260af8..75860d1 100644 --- a/example/src/main/java/com/spruceid/walletsdkexample/ui/theme/Type.kt +++ b/example/src/main/java/com/spruceid/mobilesdkexample/ui/theme/Type.kt @@ -1,4 +1,4 @@ -package com.spruceid.walletsdkexample.ui.theme +package com.spruceid.mobilesdkexample.ui.theme import androidx.compose.material3.Typography import androidx.compose.ui.text.TextStyle diff --git a/example/src/main/res/values/strings.xml b/example/src/main/res/values/strings.xml index 263aa3c..51c58b3 100644 --- a/example/src/main/res/values/strings.xml +++ b/example/src/main/res/values/strings.xml @@ -1,3 +1,3 @@ - WalletSdk Example + MobileSdk Example \ No newline at end of file diff --git a/example/src/main/res/values/themes.xml b/example/src/main/res/values/themes.xml index 2e9b093..271f405 100644 --- a/example/src/main/res/values/themes.xml +++ b/example/src/main/res/values/themes.xml @@ -1,5 +1,5 @@ -