Skip to content

Commit a744a76

Browse files
authored
Merge pull request #21 from tkey/fix_naming
Fix naming
2 parents e2ab8ad + 8e995c2 commit a744a76

File tree

62 files changed

+124
-119
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

62 files changed

+124
-119
lines changed

.github/workflows/ci.yaml

+1-2
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@ on:
22
push:
33
branches:
44
- main
5-
- alpha
65
pull_request:
76
types:
87
- opened
@@ -20,4 +19,4 @@ jobs:
2019
with:
2120
xcode-version: "14.2.0"
2221
- name: package
23-
run: xcodebuild test -scheme tkey_pkg -destination "platform=iOS Simulator,OS=16.2,name=iPhone 14" COMPILER_INDEX_STORE_ENABLE=NO
22+
run: xcodebuild test -scheme tkey-mpc-swift -destination "platform=iOS Simulator,OS=16.2,name=iPhone 14" COMPILER_INDEX_STORE_ENABLE=NO

Package.swift

+9-9
Original file line numberDiff line numberDiff line change
@@ -4,20 +4,20 @@
44
import PackageDescription
55

66
let package = Package(
7-
name: "tkey_pkg",
7+
name: "tkey-mpc-swift",
88
platforms: [
9-
.iOS(SupportedPlatform.IOSVersion.v14),
9+
.iOS(.v13), .macOS(.v10_15)
1010
],
1111
products: [
1212
// Products define the executables and libraries a package produces, and make them visible to other packages.
1313
.library(
14-
name: "ThresholdKey",
15-
targets: ["tkey-pkg"]),
14+
name: "tkey-mpc-swift",
15+
targets: ["tkey-mpc-swift"]),
1616
],
1717
dependencies: [
1818
// Dependencies declare other packages that this package depends on.
1919
// .package(url: /* package url */, from: "1.0.0"),
20-
.package(name: "TorusUtils", url: "https://github.com/torusresearch/torus-utils-swift" , from: "6.1.0"),
20+
.package(name: "TorusUtils", url: "https://github.com/torusresearch/torus-utils-swift" , from: "7.0.0"),
2121
// dev dependencies only
2222
.package(name:"CryptoSwift", url: "https://github.com/krzyzanowskim/CryptoSwift.git",from: "1.5.1"),
2323
.package(name:"jwt-kit", url: "https://github.com/vapor/jwt-kit.git", from: "4.0.0"),
@@ -28,18 +28,18 @@ let package = Package(
2828
.binaryTarget(name: "libtkey",
2929
path: "Sources/libtkey/libtkey.xcframework"
3030
),
31-
.target(name: "lib",
31+
.target(name: "tkey",
3232
dependencies: ["libtkey"],
3333
path: "Sources/libtkey"
3434
),
3535
.target(
36-
name: "tkey-pkg",
37-
dependencies: ["lib", "TorusUtils"],
36+
name: "tkey-mpc-swift",
37+
dependencies: ["tkey", "TorusUtils"],
3838
path: "Sources/ThresholdKey"
3939
),
4040
.testTarget(
4141
name: "tkey-pkgTests",
42-
dependencies: ["tkey-pkg", "CryptoSwift", .product(name: "JWTKit", package: "jwt-kit")],
42+
dependencies: ["tkey-mpc-swift", "CryptoSwift", .product(name: "JWTKit", package: "jwt-kit")],
4343
path: "Tests/tkeypkgTests"
4444
),
4545
]

Sources/ThresholdKey/Common/KeyPoint.swift

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import Foundation
2-
#if canImport(lib)
3-
import lib
2+
#if canImport(tkey)
3+
import tkey
44
#endif
55

66

@@ -150,7 +150,7 @@ public final class KeyPoint: Equatable {
150150
key_point_encode(pointer, encoder_format, error)
151151
})
152152
guard errorCode == 0 else {
153-
throw RuntimeError("Error in KeyPoint, getAsCompressedPublicKey")
153+
throw RuntimeError("Error in KeyPoint, getPublicKey")
154154
}
155155
let compressed = String.init(cString: result!)
156156
string_free(result)

Sources/ThresholdKey/Common/NodeDetails.swift

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import Foundation
2-
#if canImport(lib)
3-
import lib
2+
#if canImport(tkey)
3+
import tkey
44
#endif
55

66
public final class NodeDetails {

Sources/ThresholdKey/Common/PrivateKey.swift

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import Foundation
2-
#if canImport(lib)
3-
import lib
2+
#if canImport(tkey)
3+
import tkey
44
#endif
55

66
public final class PrivateKey {

Sources/ThresholdKey/Common/ShareStore.swift

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import Foundation
2-
#if canImport(lib)
3-
import lib
2+
#if canImport(tkey)
3+
import tkey
44
#endif
55

66
public final class ShareStore {

Sources/ThresholdKey/Common/TssOptions.swift

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import Foundation
2-
#if canImport(lib)
3-
import lib
2+
#if canImport(tkey)
3+
import tkey
44
#endif
55

66
public final class TssOptions {

Sources/ThresholdKey/GenerateShareStoreResult.swift

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import Foundation
2-
#if canImport(lib)
3-
import lib
2+
#if canImport(tkey)
3+
import tkey
44
#endif
55

66
public final class GenerateShareStoreResult {

Sources/ThresholdKey/KeyDetails.swift

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import Foundation
2-
#if canImport(lib)
3-
import lib
2+
#if canImport(tkey)
3+
import tkey
44
#endif
55

66
public final class KeyDetails {

Sources/ThresholdKey/KeyPointArray.swift

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import Foundation
22

3-
#if canImport(lib)
4-
import lib
3+
#if canImport(tkey)
4+
import tkey
55
#endif
66

77
public class KeyPointArray {

Sources/ThresholdKey/KeyReconstructionDetails.swift

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import Foundation
2-
#if canImport(lib)
3-
import lib
2+
#if canImport(tkey)
3+
import tkey
44
#endif
55

66
public final class KeyReconstructionDetails: Codable {

Sources/ThresholdKey/LocalMetadataTransitions.swift

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import Foundation
22

3-
#if canImport(lib)
4-
import lib
3+
#if canImport(tkey)
4+
import tkey
55
#endif
66

77
public final class LocalMetadataTransitions {

Sources/ThresholdKey/Metadata.swift

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import Foundation
2-
#if canImport(lib)
3-
import lib
2+
#if canImport(tkey)
3+
import tkey
44
#endif
55

66
public final class Metadata {

Sources/ThresholdKey/Modules/PrivateKeysModule.swift

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import Foundation
2-
#if canImport(lib)
3-
import lib
2+
#if canImport(tkey)
3+
import tkey
44
#endif
55

66
public struct KeyData: Decodable {

Sources/ThresholdKey/Modules/SecurityQuestionModule.swift

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import Foundation
2-
#if canImport(lib)
3-
import lib
2+
#if canImport(tkey)
3+
import tkey
44
#endif
55

66
public final class SecurityQuestionModule {

Sources/ThresholdKey/Modules/SeedPhraseModule.swift

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import Foundation
2-
#if canImport(lib)
3-
import lib
2+
#if canImport(tkey)
3+
import tkey
44
#endif
55

66
public struct SeedPhrase: Codable {

Sources/ThresholdKey/Modules/ShareSerializationModule.swift

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import Foundation
2-
#if canImport(lib)
3-
import lib
2+
#if canImport(tkey)
3+
import tkey
44
#endif
55

66
public final class ShareSerializationModule {

Sources/ThresholdKey/Modules/ShareTransferModule.swift

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import Foundation
2-
#if canImport(lib)
3-
import lib
2+
#if canImport(tkey)
3+
import tkey
44
#endif
55

66
public final class ShareTransferModule {

Sources/ThresholdKey/Modules/TssModule.swift

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
import Foundation
22

33
import Foundation
4-
#if canImport(lib)
5-
import lib
4+
#if canImport(tkey)
5+
import tkey
66
#endif
77
import CommonSources
88
import FetchNodeDetails

Sources/ThresholdKey/Polynomial.swift

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import Foundation
2-
#if canImport(lib)
3-
import lib
2+
#if canImport(tkey)
3+
import tkey
44
#endif
55

66
public final class Polynomial {

Sources/ThresholdKey/PublicPolynomial.swift

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import Foundation
2-
#if canImport(lib)
3-
import lib
2+
#if canImport(tkey)
3+
import tkey
44
#endif
55

66
public final class PublicPolynomial {

Sources/ThresholdKey/RssComm.swift

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import Foundation
2-
#if canImport(lib)
3-
import lib
2+
#if canImport(tkey)
3+
import tkey
44
#endif
55

66
public final class RssComm {

Sources/ThresholdKey/ServiceProvider.swift

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import Foundation
22
import TorusUtils
3-
#if canImport(lib)
4-
import lib
3+
#if canImport(tkey)
4+
import tkey
55
#endif
66
import FetchNodeDetails
77
import CommonSources

Sources/ThresholdKey/ShareMap.swift

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import Foundation
2-
#if canImport(lib)
3-
import lib
2+
#if canImport(tkey)
3+
import tkey
44
#endif
55

66
public final class ShareMap {

Sources/ThresholdKey/ShareStoreArray.swift

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import Foundation
22

3-
#if canImport(lib)
4-
import lib
3+
#if canImport(tkey)
4+
import tkey
55
#endif
66

77
public class ShareStoreArray {

Sources/ThresholdKey/ShareStoreMap.swift

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import Foundation
2-
#if canImport(lib)
3-
import lib
2+
#if canImport(tkey)
3+
import tkey
44
#endif
55

66
public final class ShareStoreMap {

Sources/ThresholdKey/ShareStorePolyIdIndexMap.swift

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import Foundation
2-
#if canImport(lib)
3-
import lib
2+
#if canImport(tkey)
3+
import tkey
44
#endif
55

66
public final class ShareStorePolyIdIndexMap {

Sources/ThresholdKey/ShareTransferStore.swift

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import Foundation
2-
#if canImport(lib)
3-
import lib
2+
#if canImport(tkey)
3+
import tkey
44
#endif
55

66
public final class ShareTransferStore {

Sources/ThresholdKey/StorageLayer.swift

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import Foundation
2-
#if canImport(lib)
3-
import lib
2+
#if canImport(tkey)
3+
import tkey
44
#endif
55

66

0 commit comments

Comments
 (0)