Skip to content

Commit

Permalink
Merge pull request #21 from tkey/fix_naming
Browse files Browse the repository at this point in the history
Fix naming
  • Loading branch information
metalurgical authored Feb 1, 2024
2 parents e2ab8ad + 8e995c2 commit a744a76
Show file tree
Hide file tree
Showing 62 changed files with 124 additions and 119 deletions.
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

0 comments on commit a744a76

Please sign in to comment.