Skip to content

Commit

Permalink
Rename wallet-sdk to mobile-sdk (#19)
Browse files Browse the repository at this point in the history
  • Loading branch information
sbihel authored Aug 2, 2024
1 parent 5a3ad87 commit 157e47f
Show file tree
Hide file tree
Showing 44 changed files with 85 additions and 83 deletions.
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -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
File renamed without changes.
16 changes: 8 additions & 8 deletions WalletSdk/build.gradle.kts → MobileSdk/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -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")
Expand All @@ -20,8 +20,8 @@ publishing {
publications {
// Creates a Maven publication called "release".
create<MavenPublication>("release") {
groupId = "com.spruceid.wallet.sdk"
artifactId = "walletsdk"
groupId = "com.spruceid.mobile.sdk"
artifactId = "mobilesdk"
version = System.getenv("VERSION")

afterEvaluate {
Expand All @@ -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")
Expand Down Expand Up @@ -76,7 +76,7 @@ nmcp {


android {
namespace = "com.spruceid.wallet.sdk"
namespace = "com.spruceid.mobile.sdk"
compileSdk = 33

defaultConfig {
Expand Down Expand Up @@ -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 */
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package com.spruceid.wallet.sdk
package com.spruceid.mobile.sdk

open class BaseCredential constructor(private val id: String?) {

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package com.spruceid.wallet.sdk
package com.spruceid.mobile.sdk

import android.bluetooth.le.*
import android.os.Handler
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package com.spruceid.wallet.sdk
package com.spruceid.mobile.sdk

import android.bluetooth.le.ScanResult

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package com.spruceid.wallet.sdk
package com.spruceid.mobile.sdk

import android.bluetooth.BluetoothAdapter
import android.bluetooth.le.AdvertiseCallback
Expand Down
Original file line number Diff line number Diff line change
@@ -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
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package com.spruceid.wallet.sdk
package com.spruceid.mobile.sdk

enum class BleStates(val string: String) {
Scanning("scanning"),
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package com.spruceid.wallet.sdk
package com.spruceid.mobile.sdk

import android.content.Context
import android.content.Context.CONNECTIVITY_SERVICE
Expand Down
Original file line number Diff line number Diff line change
@@ -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
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package com.spruceid.wallet.sdk
package com.spruceid.mobile.sdk

import android.bluetooth.BluetoothDevice
import android.bluetooth.BluetoothGatt
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package com.spruceid.wallet.sdk
package com.spruceid.mobile.sdk

abstract class GattClientCallback {
open fun onPeerConnected() {}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package com.spruceid.wallet.sdk
package com.spruceid.mobile.sdk


import android.bluetooth.*
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package com.spruceid.wallet.sdk
package com.spruceid.mobile.sdk

abstract class GattServerCallback {
open fun onPeerConnected() {}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package com.spruceid.wallet.sdk
package com.spruceid.mobile.sdk

import android.os.Build
import android.security.keystore.KeyGenParameterSpec
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package com.spruceid.wallet.sdk
package com.spruceid.mobile.sdk

/**
* The Keystore environment used for the key generation.
Expand Down
Original file line number Diff line number Diff line change
@@ -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
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package com.spruceid.wallet.sdk
package com.spruceid.mobile.sdk

import android.bluetooth.BluetoothManager
import android.util.Log
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package com.spruceid.wallet.sdk
package com.spruceid.mobile.sdk

import android.bluetooth.BluetoothManager
import android.util.Log
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package com.spruceid.wallet.sdk
package com.spruceid.mobile.sdk

import android.app.Activity
import android.bluetooth.BluetoothAdapter
Expand Down
Original file line number Diff line number Diff line change
@@ -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
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package com.spruceid.wallet.sdk
package com.spruceid.mobile.sdk


fun hexToByteArray(value: String): ByteArray {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package com.spruceid.wallet.sdk.ui
package com.spruceid.mobile.sdk.ui

import android.graphics.ImageFormat
import android.os.Build
Expand Down
Original file line number Diff line number Diff line change
@@ -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
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package com.spruceid.wallet.sdk
package com.spruceid.mobile.sdk

import org.junit.Test

Expand Down
12 changes: 6 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
@@ -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
Expand All @@ -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.

Expand All @@ -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)
6 changes: 3 additions & 3 deletions example/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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")
Expand Down
Original file line number Diff line number Diff line change
@@ -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
Expand All @@ -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)
}
}
4 changes: 2 additions & 2 deletions example/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -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">

<activity
android:name=".MainActivity"
android:exported="true"
android:theme="@style/Theme.WalletSdk">
android:theme="@style/Theme.MobileSdk">
<intent-filter>
<action android:name="android.intent.action.MAIN" />

Expand Down
Original file line number Diff line number Diff line change
@@ -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) {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package com.spruceid.walletsdkexample
package com.spruceid.mobilesdkexample

import android.content.Context
import android.content.pm.PackageManager
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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(),
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package com.spruceid.walletsdkexample
package com.spruceid.mobilesdkexample

import androidx.compose.foundation.layout.Arrangement
import androidx.compose.foundation.layout.Row
Expand All @@ -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<String, Boolean>, isChecked: Boolean, onCheck: (Boolean) -> Unit) {
WalletSdkTheme {
MobileSdkTheme {
Row(
horizontalArrangement = Arrangement.SpaceBetween,
verticalAlignment = Alignment.CenterVertically,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package com.spruceid.walletsdkexample.ui.theme
package com.spruceid.mobilesdkexample.ui.theme

import androidx.compose.ui.graphics.Color

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package com.spruceid.walletsdkexample.ui.theme
package com.spruceid.mobilesdkexample.ui.theme

import android.graphics.Bitmap
import android.graphics.Color
Expand Down
Loading

0 comments on commit 157e47f

Please sign in to comment.