Skip to content

Commit

Permalink
Rename wallet-sdk to mobile-sdk (#23)
Browse files Browse the repository at this point in the history
  • Loading branch information
sbihel authored Aug 2, 2024
1 parent 1ea0c66 commit 48ea405
Show file tree
Hide file tree
Showing 19 changed files with 56 additions and 56 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/cd.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ jobs:
echo "${{ github.ref_name }}" | grep -P '^[0-9]+\.[0-9]+\.[0-9]+'
- name: Validate tag matches podspec version
run: |
cat SpruceIDWalletSdk.podspec | grep -P "${{ github.ref_name }}"
cat SpruceIDMobileSdk.podspec | grep -P "${{ github.ref_name }}"
main:
runs-on: macos-latest
Expand All @@ -27,4 +27,4 @@ jobs:
env:
COCOAPODS_TRUNK_TOKEN: ${{ secrets.COCOAPODS_TRUNK_TOKEN }}
run: |
pod trunk push SpruceIDWalletSdk.podspec --synchronous
pod trunk push SpruceIDMobileSdk.podspec --synchronous
18 changes: 9 additions & 9 deletions Package.resolved
Original file line number Diff line number Diff line change
@@ -1,5 +1,14 @@
{
"pins" : [
{
"identity" : "mobile-sdk-rs",
"kind" : "remoteSourceControl",
"location" : "https://github.com/spruceid/mobile-sdk-rs.git",
"state" : {
"revision" : "e3ed692d6b9530601eefb30c8bab125c764ae291",
"version" : "0.0.26"
}
},
{
"identity" : "swift-algorithms",
"kind" : "remoteSourceControl",
Expand All @@ -17,15 +26,6 @@
"revision" : "0a5bc04095a675662cf24757cc0640aa2204253b",
"version" : "1.0.2"
}
},
{
"identity" : "wallet-sdk-rs",
"kind" : "remoteSourceControl",
"location" : "https://github.com/spruceid/wallet-sdk-rs.git",
"state" : {
"revision" : "d508f610c05a309a3254678d99c17804f04ec1fa",
"version" : "0.0.25"
}
}
],
"version" : 2
Expand Down
18 changes: 9 additions & 9 deletions Package.swift
Original file line number Diff line number Diff line change
Expand Up @@ -4,30 +4,30 @@
import PackageDescription

let package = Package(
name: "SpruceIDWalletSdk",
name: "SpruceIDMobileSdk",
platforms: [
.iOS(.v14)
],
products: [
.library(
name: "SpruceIDWalletSdk",
targets: ["SpruceIDWalletSdk"])
name: "SpruceIDMobileSdk",
targets: ["SpruceIDMobileSdk"])
],
dependencies: [
.package(url: "https://github.com/spruceid/wallet-sdk-rs.git", from: "0.0.25"),
// .package(path: "../wallet-sdk-rs"),
.package(url: "https://github.com/spruceid/mobile-sdk-rs.git", from: "0.0.26"),
// .package(path: "../mobile-sdk-rs"),
.package(url: "https://github.com/apple/swift-algorithms", from: "1.2.0")
],
targets: [
.target(
name: "SpruceIDWalletSdk",
name: "SpruceIDMobileSdk",
dependencies: [
.product(name: "SpruceIDWalletSdkRs", package: "wallet-sdk-rs"),
.product(name: "SpruceIDMobileSdkRs", package: "mobile-sdk-rs"),
.product(name: "Algorithms", package: "swift-algorithms")
]
),
.testTarget(
name: "SpruceIDWalletSdkTests",
dependencies: ["SpruceIDWalletSdk"])
name: "SpruceIDMobileSdkTests",
dependencies: ["SpruceIDMobileSdk"])
]
)
12 changes: 6 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
# Swift Wallet SDK
# Swift 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 @@ -15,7 +15,7 @@ The XCode project is generated using `xcodgen`.

## 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 @@ -34,6 +34,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)
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
16 changes: 8 additions & 8 deletions Sources/WalletSdk/MDoc.swift → Sources/MobileSdk/MDoc.swift
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
import CoreBluetooth
import CryptoKit
import Foundation
import SpruceIDWalletSdkRs
import SpruceIDMobileSdkRs

public typealias MDocNamespace = String
public typealias IssuerSignedItemBytes = Data
public typealias ItemsRequest = SpruceIDWalletSdkRs.ItemsRequest
public typealias ItemsRequest = SpruceIDMobileSdkRs.ItemsRequest

public class MDoc: Credential {
var inner: SpruceIDWalletSdkRs.MDoc
var inner: SpruceIDMobileSdkRs.MDoc
var keyAlias: String

/// issuerAuth is the signed MSO (i.e. CoseSign1 with MSO as payload)
Expand All @@ -18,7 +18,7 @@ public class MDoc: Credential {
public init?(fromMDoc issuerAuth: Data, namespaces: [MDocNamespace: [IssuerSignedItemBytes]], keyAlias: String) {
self.keyAlias = keyAlias
do {
try self.inner = SpruceIDWalletSdkRs.MDoc.fromCbor(value: issuerAuth)
try self.inner = SpruceIDMobileSdkRs.MDoc.fromCbor(value: issuerAuth)
} catch {
print("\(error)")
return nil
Expand Down Expand Up @@ -49,7 +49,7 @@ public class BLESessionManager {
self.uuid = UUID()
self.mdoc = mdoc
do {
let sessionData = try SpruceIDWalletSdkRs.initialiseSession(document: mdoc.inner,
let sessionData = try SpruceIDMobileSdkRs.initialiseSession(document: mdoc.inner,
uuid: self.uuid.uuidString)
self.state = sessionData.state
bleManager = MDocHolderBLECentral(callback: self, serviceUuid: CBUUID(nsuuid: self.uuid))
Expand All @@ -67,7 +67,7 @@ public class BLESessionManager {

public func submitNamespaces(items: [String: [String: [String]]]) {
do {
let payload = try SpruceIDWalletSdkRs.submitResponse(sessionManager: sessionManager!,
let payload = try SpruceIDMobileSdkRs.submitResponse(sessionManager: sessionManager!,
permittedItems: items)
let query = [kSecClass: kSecClassKey,
kSecAttrApplicationLabel: self.mdoc.keyAlias,
Expand Down Expand Up @@ -99,7 +99,7 @@ public class BLESessionManager {
self.cancel()
return
}
let response = try SpruceIDWalletSdkRs.submitSignature(sessionManager: sessionManager!,
let response = try SpruceIDMobileSdkRs.submitSignature(sessionManager: sessionManager!,
derSignature: derSignature)
self.bleManager.writeOutgoingValue(data: response)
} catch {
Expand All @@ -120,7 +120,7 @@ extension BLESessionManager: MDocBLEDelegate {
self.callback.update(state: .uploadProgress(value, total))
case .message(let data):
do {
let requestData = try SpruceIDWalletSdkRs.handleRequest(state: self.state, request: data)
let requestData = try SpruceIDMobileSdkRs.handleRequest(state: self.state, request: data)
self.sessionManager = requestData.sessionManager
self.callback.update(state: .selectNamespaces(requestData.itemsRequests))
} catch {
Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import Algorithms
import CoreBluetooth
import Foundation
import os
import SpruceIDWalletSdkRs
import SpruceIDMobileSdkRs

enum CharacteristicsError: Error {
case missingMandatoryCharacteristic(name: String)
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
16 changes: 8 additions & 8 deletions SpruceIDWalletSdk.podspec → SpruceIDMobileSdk.podspec
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
Pod::Spec.new do |spec|
spec.name = "SpruceIDWalletSdk"
spec.version = "0.0.8"
spec.summary = "Swift Wallet SDK."
spec.name = "SpruceIDMobileSdk"
spec.version = "0.0.9"
spec.summary = "Swift Mobile SDK."
spec.description = <<-DESC
SpruceID Swift Wallet SDK.
SpruceID Swift Mobile SDK.
DESC
spec.homepage = "https://github.com/spruceid/wallet-sdk-swift"
spec.homepage = "https://github.com/spruceid/mobile-sdk-swift"
spec.license = { :type => "MIT & Apache License, Version 2.0", :text => <<-LICENSE
Refer to LICENSE-MIT and LICENSE-APACHE in the repository.
LICENSE
Expand All @@ -16,11 +16,11 @@ Pod::Spec.new do |spec|

spec.ios.deployment_target = '13.0'

spec.source = { :git => "https://github.com/spruceid/wallet-sdk-swift.git", :tag => "#{spec.version}" }
spec.source_files = "Sources/WalletSdk/*.swift"
spec.source = { :git => "https://github.com/spruceid/mobile-sdk-swift.git", :tag => "#{spec.version}" }
spec.source_files = "Sources/MobileSdk/*.swift"

spec.static_framework = true
spec.dependency 'SpruceIDWalletSdkRs', "~> 0.0.24"
spec.dependency 'SpruceIDMobileSdkRs', "~> 0.0.26"
spec.dependency 'SwiftAlgorithms', "~> 1.0.0"
spec.frameworks = 'Foundation', 'CoreBluetooth', 'CryptoKit'
end
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
//

import XCTest
@testable import SpruceIDWalletSdk
@testable import SpruceIDMobileSdk

final class DataConversions: XCTestCase {

Expand Down
2 changes: 2 additions & 0 deletions Tests/MobileSdkTests/lib.swift
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
import XCTest
@testable import SpruceIDMobileSdk
2 changes: 0 additions & 2 deletions Tests/WalletSdkTests/lib.swift

This file was deleted.

20 changes: 10 additions & 10 deletions project.yml
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
name: WalletSdk
name: MobileSdk
options:
bundleIdPrefix: com.spruceid.wallet.sdk
bundleIdPrefix: com.spruceid.mobile.sdk
packages:
SpruceIDWalletSdkRs:
url: https://github.com/spruceid/wallet-sdk-rs
SpruceIDMobileSdkRs:
url: https://github.com/spruceid/mobile-sdk-rs
from: 0.0.4
# path: "../wallet-sdk-rs"
# path: "../mobile-sdk-rs"
SwiftAlgorithms:
url: https://github.com/apple/swift-algorithms
from: 1.2.0
Expand All @@ -17,30 +17,30 @@ settings:
GENERATE_INFOPLIST_FILE: YES
DEVELOPMENT_TEAM: FZVYR3KYL4
targets:
WalletSdk:
MobileSdk:
type: library.dynamic
platform: iOS
deploymentTarget: "13.0"
sources:
- Sources
dependencies:
- package: SpruceIDWalletSdkRs
- package: SpruceIDMobileSdkRs
- package: SwiftAlgorithms
product: Algorithms
scheme:
testTargets:
- WalletSdkTests
- MobileSdkTests
info:
path: Info.plist
properties:
NSBluetoothAlwaysUsageDescription: "Secure transmission of mobile DL data"
buildToolPlugins:
- plugin: SwiftLintPlugin
package: SwiftLint
WalletSdkTests:
MobileSdkTests:
platform: iOS
type: bundle.unit-test
sources:
- Tests
dependencies:
- target: WalletSdk
- target: MobileSdk

0 comments on commit 48ea405

Please sign in to comment.