Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix naming #21

Merged
merged 16 commits into from
Feb 1, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
3 changes: 1 addition & 2 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ on:
push:
branches:
- main
- alpha
pull_request:
types:
- opened
Expand All @@ -20,4 +19,4 @@ jobs:
with:
xcode-version: "14.2.0"
- name: package
run: xcodebuild test -scheme tkey_pkg -destination "platform=iOS Simulator,OS=16.2,name=iPhone 14" COMPILER_INDEX_STORE_ENABLE=NO
run: xcodebuild test -scheme tkey-mpc-swift -destination "platform=iOS Simulator,OS=16.2,name=iPhone 14" COMPILER_INDEX_STORE_ENABLE=NO
18 changes: 9 additions & 9 deletions Package.swift
Original file line number Diff line number Diff line change
Expand Up @@ -4,20 +4,20 @@
import PackageDescription

let package = Package(
name: "tkey_pkg",
name: "tkey-mpc-swift",
platforms: [
.iOS(SupportedPlatform.IOSVersion.v14),
.iOS(.v13), .macOS(.v10_15)
],
products: [
// Products define the executables and libraries a package produces, and make them visible to other packages.
.library(
name: "ThresholdKey",
targets: ["tkey-pkg"]),
name: "tkey-mpc-swift",
targets: ["tkey-mpc-swift"]),
],
dependencies: [
// Dependencies declare other packages that this package depends on.
// .package(url: /* package url */, from: "1.0.0"),
.package(name: "TorusUtils", url: "https://github.com/torusresearch/torus-utils-swift" , from: "6.1.0"),
.package(name: "TorusUtils", url: "https://github.com/torusresearch/torus-utils-swift" , from: "7.0.0"),
// dev dependencies only
.package(name:"CryptoSwift", url: "https://github.com/krzyzanowskim/CryptoSwift.git",from: "1.5.1"),
.package(name:"jwt-kit", url: "https://github.com/vapor/jwt-kit.git", from: "4.0.0"),
Expand All @@ -28,18 +28,18 @@ let package = Package(
.binaryTarget(name: "libtkey",
path: "Sources/libtkey/libtkey.xcframework"
),
.target(name: "lib",
.target(name: "tkey",
dependencies: ["libtkey"],
path: "Sources/libtkey"
),
.target(
name: "tkey-pkg",
dependencies: ["lib", "TorusUtils"],
name: "tkey-mpc-swift",
dependencies: ["tkey", "TorusUtils"],
path: "Sources/ThresholdKey"
),
.testTarget(
name: "tkey-pkgTests",
dependencies: ["tkey-pkg", "CryptoSwift", .product(name: "JWTKit", package: "jwt-kit")],
dependencies: ["tkey-mpc-swift", "CryptoSwift", .product(name: "JWTKit", package: "jwt-kit")],
path: "Tests/tkeypkgTests"
),
]
Expand Down
6 changes: 3 additions & 3 deletions Sources/ThresholdKey/Common/KeyPoint.swift
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import Foundation
#if canImport(lib)
import lib
#if canImport(tkey)
import tkey
#endif


Expand Down Expand Up @@ -150,7 +150,7 @@ public final class KeyPoint: Equatable {
key_point_encode(pointer, encoder_format, error)
})
guard errorCode == 0 else {
throw RuntimeError("Error in KeyPoint, getAsCompressedPublicKey")
throw RuntimeError("Error in KeyPoint, getPublicKey")
}
let compressed = String.init(cString: result!)
string_free(result)
Expand Down
4 changes: 2 additions & 2 deletions Sources/ThresholdKey/Common/NodeDetails.swift
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import Foundation
#if canImport(lib)
import lib
#if canImport(tkey)
import tkey
#endif

public final class NodeDetails {
Expand Down
4 changes: 2 additions & 2 deletions Sources/ThresholdKey/Common/PrivateKey.swift
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import Foundation
#if canImport(lib)
import lib
#if canImport(tkey)
import tkey
#endif

public final class PrivateKey {
Expand Down
4 changes: 2 additions & 2 deletions Sources/ThresholdKey/Common/ShareStore.swift
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import Foundation
#if canImport(lib)
import lib
#if canImport(tkey)
import tkey
#endif

public final class ShareStore {
Expand Down
4 changes: 2 additions & 2 deletions Sources/ThresholdKey/Common/TssOptions.swift
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import Foundation
#if canImport(lib)
import lib
#if canImport(tkey)
import tkey
#endif

public final class TssOptions {
Expand Down
4 changes: 2 additions & 2 deletions Sources/ThresholdKey/GenerateShareStoreResult.swift
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import Foundation
#if canImport(lib)
import lib
#if canImport(tkey)
import tkey
#endif

public final class GenerateShareStoreResult {
Expand Down
4 changes: 2 additions & 2 deletions Sources/ThresholdKey/KeyDetails.swift
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import Foundation
#if canImport(lib)
import lib
#if canImport(tkey)
import tkey
#endif

public final class KeyDetails {
Expand Down
4 changes: 2 additions & 2 deletions Sources/ThresholdKey/KeyPointArray.swift
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import Foundation

#if canImport(lib)
import lib
#if canImport(tkey)
import tkey
#endif

public class KeyPointArray {
Expand Down
4 changes: 2 additions & 2 deletions Sources/ThresholdKey/KeyReconstructionDetails.swift
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import Foundation
#if canImport(lib)
import lib
#if canImport(tkey)
import tkey
#endif

public final class KeyReconstructionDetails: Codable {
Expand Down
4 changes: 2 additions & 2 deletions Sources/ThresholdKey/LocalMetadataTransitions.swift
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import Foundation

#if canImport(lib)
import lib
#if canImport(tkey)
import tkey
#endif

public final class LocalMetadataTransitions {
Expand Down
4 changes: 2 additions & 2 deletions Sources/ThresholdKey/Metadata.swift
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import Foundation
#if canImport(lib)
import lib
#if canImport(tkey)
import tkey
#endif

public final class Metadata {
Expand Down
4 changes: 2 additions & 2 deletions Sources/ThresholdKey/Modules/PrivateKeysModule.swift
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import Foundation
#if canImport(lib)
import lib
#if canImport(tkey)
import tkey
#endif

public struct KeyData: Decodable {
Expand Down
4 changes: 2 additions & 2 deletions Sources/ThresholdKey/Modules/SecurityQuestionModule.swift
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import Foundation
#if canImport(lib)
import lib
#if canImport(tkey)
import tkey
#endif

public final class SecurityQuestionModule {
Expand Down
4 changes: 2 additions & 2 deletions Sources/ThresholdKey/Modules/SeedPhraseModule.swift
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import Foundation
#if canImport(lib)
import lib
#if canImport(tkey)
import tkey
#endif

public struct SeedPhrase: Codable {
Expand Down
4 changes: 2 additions & 2 deletions Sources/ThresholdKey/Modules/ShareSerializationModule.swift
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import Foundation
#if canImport(lib)
import lib
#if canImport(tkey)
import tkey
#endif

public final class ShareSerializationModule {
Expand Down
4 changes: 2 additions & 2 deletions Sources/ThresholdKey/Modules/ShareTransferModule.swift
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import Foundation
#if canImport(lib)
import lib
#if canImport(tkey)
import tkey
#endif

public final class ShareTransferModule {
Expand Down
4 changes: 2 additions & 2 deletions Sources/ThresholdKey/Modules/TssModule.swift
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import Foundation

import Foundation
#if canImport(lib)
import lib
#if canImport(tkey)
import tkey
#endif
import CommonSources
import FetchNodeDetails
Expand Down
4 changes: 2 additions & 2 deletions Sources/ThresholdKey/Polynomial.swift
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import Foundation
#if canImport(lib)
import lib
#if canImport(tkey)
import tkey
#endif

public final class Polynomial {
Expand Down
4 changes: 2 additions & 2 deletions Sources/ThresholdKey/PublicPolynomial.swift
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import Foundation
#if canImport(lib)
import lib
#if canImport(tkey)
import tkey
#endif

public final class PublicPolynomial {
Expand Down
4 changes: 2 additions & 2 deletions Sources/ThresholdKey/RssComm.swift
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import Foundation
#if canImport(lib)
import lib
#if canImport(tkey)
import tkey
#endif

public final class RssComm {
Expand Down
4 changes: 2 additions & 2 deletions Sources/ThresholdKey/ServiceProvider.swift
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import Foundation
import TorusUtils
#if canImport(lib)
import lib
#if canImport(tkey)
import tkey
#endif
import FetchNodeDetails
import CommonSources
Expand Down
4 changes: 2 additions & 2 deletions Sources/ThresholdKey/ShareMap.swift
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import Foundation
#if canImport(lib)
import lib
#if canImport(tkey)
import tkey
#endif

public final class ShareMap {
Expand Down
4 changes: 2 additions & 2 deletions Sources/ThresholdKey/ShareStoreArray.swift
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import Foundation

#if canImport(lib)
import lib
#if canImport(tkey)
import tkey
#endif

public class ShareStoreArray {
Expand Down
4 changes: 2 additions & 2 deletions Sources/ThresholdKey/ShareStoreMap.swift
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import Foundation
#if canImport(lib)
import lib
#if canImport(tkey)
import tkey
#endif

public final class ShareStoreMap {
Expand Down
4 changes: 2 additions & 2 deletions Sources/ThresholdKey/ShareStorePolyIdIndexMap.swift
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import Foundation
#if canImport(lib)
import lib
#if canImport(tkey)
import tkey
#endif

public final class ShareStorePolyIdIndexMap {
Expand Down
4 changes: 2 additions & 2 deletions Sources/ThresholdKey/ShareTransferStore.swift
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import Foundation
#if canImport(lib)
import lib
#if canImport(tkey)
import tkey
#endif

public final class ShareTransferStore {
Expand Down
4 changes: 2 additions & 2 deletions Sources/ThresholdKey/StorageLayer.swift
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import Foundation
#if canImport(lib)
import lib
#if canImport(tkey)
import tkey
#endif


Expand Down
Loading
Loading