diff --git a/Package.swift b/Package.swift index 49c42fe..2552962 100644 --- a/Package.swift +++ b/Package.swift @@ -6,24 +6,19 @@ import PackageDescription let package = Package( name: "tkey-mpc-swift", platforms: [ - .iOS(.v13), .macOS(.v10_15) + .iOS(.v14), .macOS(.v11) ], products: [ - // Products define the executables and libraries a package produces, and make them visible to other packages. .library( name: "tkey", targets: ["tkey"]), ], 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: "8.1.0"), + .package(name: "TorusUtils", url: "https://github.com/torusresearch/torus-utils-swift", from: "10.0.0"), // dev dependencies only .package(name:"jwt-kit", url: "https://github.com/vapor/jwt-kit.git", from: "4.0.0"), ], targets: [ - // Targets are the basic building blocks of a package. A target can define a module or a test suite. - // Targets can depend on other targets in this package, and on products in packages this package depends on. .binaryTarget(name: "libtkey", path: "Sources/libtkey/libtkey.xcframework" ), diff --git a/Sources/ThresholdKey/Modules/PrivateKeysModule.swift b/Sources/ThresholdKey/Modules/PrivateKeysModule.swift index e7f6b71..683c45d 100644 --- a/Sources/ThresholdKey/Modules/PrivateKeysModule.swift +++ b/Sources/ThresholdKey/Modules/PrivateKeysModule.swift @@ -4,9 +4,9 @@ import Foundation #endif public struct KeyData: Decodable { - let id: String - let privateKey: String - let type: String + public let id: String + public let privateKey: String + public let type: String } public final class PrivateKeysModule { diff --git a/Sources/ThresholdKey/Modules/TssModule.swift b/Sources/ThresholdKey/Modules/TssModule.swift index 8881ad4..65fa12d 100644 --- a/Sources/ThresholdKey/Modules/TssModule.swift +++ b/Sources/ThresholdKey/Modules/TssModule.swift @@ -45,7 +45,7 @@ public final class TssModule { /// - tss_tag: The tss tag to be set. /// /// - Throws: `RuntimeError`, indicates invalid parameters was used or invalid threshold key. - static func set_tss_tag(threshold_key: ThresholdKey, tss_tag: String) async throws { + public static func set_tss_tag(threshold_key: ThresholdKey, tss_tag: String) async throws { return try await withCheckedThrowingContinuation { continuation in set_tss_tag(threshold_key: threshold_key, tss_tag: tss_tag) { @@ -540,10 +540,10 @@ public final class TssModule { public static func find_device_share_index(threshold_key: ThresholdKey, factor_key: String) async throws -> String { let result = try await threshold_key.storage_layer_get_metadata(private_key: factor_key) guard let resultData = result.data(using: .utf8) else { - throw "Invalid factor key" + throw RuntimeError("Invalid factor key") } guard let resultJson = try JSONSerialization.jsonObject(with: resultData) as? [String: Any] else { - throw "Invalid factor key" + throw RuntimeError("Invalid factor key") } var deviceShareJson = resultJson; @@ -551,16 +551,16 @@ public final class TssModule { // backward competible if resultJson["deviceShare"] != nil { guard let deviceShare = resultJson["deviceShare"] as? [String: Any] else { - throw "Invalid factor key" + throw RuntimeError("Invalid factor key") } deviceShareJson = deviceShare } guard let shareJson = deviceShareJson["share"] as? [String: Any] else { - throw "Invalid factor key" + throw RuntimeError("Invalid factor key") } guard let shareIndex = shareJson["shareIndex"] as? String else { - throw "Invalid factor key" + throw RuntimeError("Invalid factor key") } return shareIndex } @@ -579,7 +579,7 @@ public final class TssModule { let extendedVerifierId = try threshold_key.get_extended_verifier_id() let split = extendedVerifierId.components(separatedBy: "\u{001c}") - let result = try await torusUtils.getPublicAddress(endpoints: nodeDetails.torusNodeEndpoints, torusNodePubs: nodeDetails.torusNodePub, verifier: split[0], verifierId: split[1], extendedVerifierId: "\(split[1])\u{0015}\(tssTag)\u{0016}\(nonce)") + let result = try await torusUtils.getPublicAddress(endpoints: nodeDetails.getTorusNodeEndpoints(), verifier: split[0], verifierId: split[1], extendedVerifierId: "\(split[1])\u{0015}\(tssTag)\u{0016}\(nonce)") guard let x = result.finalKeyData?.X, let y = result.finalKeyData?.Y, let nodeIndexes = result.nodesData?.nodeIndexes else { throw RuntimeError("conversion error") diff --git a/Sources/ThresholdKey/RssComm.swift b/Sources/ThresholdKey/RssComm.swift index 0c82c73..52bb2b2 100644 --- a/Sources/ThresholdKey/RssComm.swift +++ b/Sources/ThresholdKey/RssComm.swift @@ -5,29 +5,29 @@ import Foundation public final class RssComm { private(set) var pointer: OpaquePointer? - + // This is a placeholder to satisfy the interface, // tracking this object is not necessary in swift as it maintains context // on entry for the callback private var obj_ref: UnsafeMutableRawPointer? - public static func percentEscapeString( string: String ) -> String { - var characterSet = CharacterSet.alphanumerics - characterSet.insert(charactersIn: "-.* ") + public static func percentEscapeString(string: String) -> String { + var characterSet = CharacterSet.alphanumerics + characterSet.insert(charactersIn: "-.* ") - return string - .addingPercentEncoding(withAllowedCharacters: characterSet)! - .replacingOccurrences(of: " ", with: "+") - .replacingOccurrences(of: " ", with: "+", options: [], range: nil) + return string + .addingPercentEncoding(withAllowedCharacters: characterSet)! + .replacingOccurrences(of: " ", with: "+") + .replacingOccurrences(of: " ", with: "+", options: [], range: nil) } public init() throws { var errorCode: Int32 = -1 - let network_interface: (@convention(c) (UnsafeMutablePointer?, UnsafeMutablePointer?, UnsafeMutableRawPointer?, UnsafeMutablePointer?) -> UnsafeMutablePointer?)? = {url, data, obj_ref, error_code in - let sem = DispatchSemaphore.init(value: 0) - let urlString = String.init(cString: url!) - let dataString = String.init(cString: data!) + let network_interface: (@convention(c) (UnsafeMutablePointer?, UnsafeMutablePointer?, UnsafeMutableRawPointer?, UnsafeMutablePointer?) -> UnsafeMutablePointer?)? = { url, data, _, error_code in + let sem = DispatchSemaphore(value: 0) + let urlString = String(cString: url!) + let dataString = String(cString: data!) string_free(url) string_free(data) let url = URL(string: urlString)! @@ -37,27 +37,9 @@ public final class RssComm { request.addValue("*", forHTTPHeaderField: "Access-Control-Allow-Origin") request.addValue("GET, POST", forHTTPHeaderField: "Access-Control-Allow-Methods") request.addValue("Content-Type", forHTTPHeaderField: "Access-Control-Allow-Headers") + request.addValue("application/json", forHTTPHeaderField: "Content-Type") - if urlString.split(separator: "/").last == "bulk_set_stream" { - request.addValue("application/x-www-form-urlencoded", forHTTPHeaderField: "Content-Type") - - let json = try! JSONSerialization.jsonObject(with: dataString.data(using: String.Encoding.utf8)!, options: .allowFragments) as! [[String: Any]] - - var form_data: [String] = [] - - for (index, element) in json.enumerated() { - let json_elem = try! JSONSerialization.data(withJSONObject: element, options: .withoutEscapingSlashes) - let json_escaped_string = RssComm.percentEscapeString(string: String(data: json_elem, encoding: .utf8)!) - let final_string = String(index) + "=" + json_escaped_string - form_data.append(final_string) - } - let body_data = form_data.joined(separator: "&") - - request.httpBody = body_data.data(using: String.Encoding.utf8) - } else { - request.addValue("application/json", forHTTPHeaderField: "Content-Type") - request.httpBody = dataString.data(using: String.Encoding.utf8) - } + request.httpBody = dataString.data(using: String.Encoding.utf8) var resultPointer = UnsafeMutablePointer(nil) var result = NSString() session.dataTask(with: request) { data, _, error in @@ -71,7 +53,6 @@ public final class RssComm { if let data = data { let resultString: String = String(decoding: data, as: UTF8.self) result = NSString(string: resultString) - } }.resume() @@ -81,11 +62,11 @@ public final class RssComm { } let result = withUnsafeMutablePointer(to: &errorCode, { error in - rss_comm(network_interface, obj_ref, error) - }) + rss_comm(network_interface, obj_ref, error) + }) guard errorCode == 0 else { throw RuntimeError("Error in RssComm") - } + } pointer = result } diff --git a/Sources/ThresholdKey/ServiceProvider.swift b/Sources/ThresholdKey/ServiceProvider.swift index b77db41..9297c4d 100644 --- a/Sources/ThresholdKey/ServiceProvider.swift +++ b/Sources/ThresholdKey/ServiceProvider.swift @@ -44,7 +44,7 @@ public final class ServiceProvider { let rssEndpoints = try JSONSerialization.data(withJSONObject: nodeDetails.getTorusNodeRSSEndpoints()) let tssEndpoints = try JSONSerialization.data(withJSONObject: nodeDetails.getTorusNodeTSSEndpoints()) - let pub = nodeDetails.torusNodePub + let pub = nodeDetails.getTorusNodePub() let pubkey = try JSONEncoder().encode(pub) sss = try NodeDetails(server_endpoints: String(data: sssEndpoints, encoding: .utf8)!, server_public_keys: String(data: pubkey, encoding: .utf8)!, serverThreshold: 3) diff --git a/Sources/libtkey/libtkey.xcframework/Info.plist b/Sources/libtkey/libtkey.xcframework/Info.plist index 9fbbb86..4827150 100644 --- a/Sources/libtkey/libtkey.xcframework/Info.plist +++ b/Sources/libtkey/libtkey.xcframework/Info.plist @@ -8,24 +8,21 @@ BinaryPath libtkey.a LibraryIdentifier - ios-arm64_x86_64-simulator + ios-arm64 LibraryPath libtkey.a SupportedArchitectures arm64 - x86_64 SupportedPlatform ios - SupportedPlatformVariant - simulator BinaryPath libtkey.a LibraryIdentifier - macos-arm64_x86_64 + ios-arm64_x86_64-simulator LibraryPath libtkey.a SupportedArchitectures @@ -34,21 +31,24 @@ x86_64 SupportedPlatform - macos + ios + SupportedPlatformVariant + simulator BinaryPath libtkey.a LibraryIdentifier - ios-arm64 + macos-arm64_x86_64 LibraryPath libtkey.a SupportedArchitectures arm64 + x86_64 SupportedPlatform - ios + macos CFBundlePackageType diff --git a/Sources/libtkey/libtkey.xcframework/ios-arm64/libtkey.a b/Sources/libtkey/libtkey.xcframework/ios-arm64/libtkey.a index 4a255ee..4113358 100644 Binary files a/Sources/libtkey/libtkey.xcframework/ios-arm64/libtkey.a and b/Sources/libtkey/libtkey.xcframework/ios-arm64/libtkey.a differ diff --git a/Sources/libtkey/libtkey.xcframework/ios-arm64_x86_64-simulator/libtkey.a b/Sources/libtkey/libtkey.xcframework/ios-arm64_x86_64-simulator/libtkey.a index 204ac03..da5fbea 100644 Binary files a/Sources/libtkey/libtkey.xcframework/ios-arm64_x86_64-simulator/libtkey.a and b/Sources/libtkey/libtkey.xcframework/ios-arm64_x86_64-simulator/libtkey.a differ diff --git a/Sources/libtkey/libtkey.xcframework/macos-arm64_x86_64/libtkey.a b/Sources/libtkey/libtkey.xcframework/macos-arm64_x86_64/libtkey.a index 77f65a0..897daec 100644 Binary files a/Sources/libtkey/libtkey.xcframework/macos-arm64_x86_64/libtkey.a and b/Sources/libtkey/libtkey.xcframework/macos-arm64_x86_64/libtkey.a differ diff --git a/Tests/tkeypkgTests/IntegrationTests.swift b/Tests/tkeypkgTests/IntegrationTests.swift index c3f8556..0cdd586 100644 --- a/Tests/tkeypkgTests/IntegrationTests.swift +++ b/Tests/tkeypkgTests/IntegrationTests.swift @@ -1,6 +1,6 @@ import FetchNodeDetails import Foundation -@testable import tkey +import tkey import TorusUtils import XCTest @@ -13,16 +13,17 @@ final class integrationTests: XCTestCase { let TORUS_TEST_VERIFIER = "torus-test-health" - let nodeManager = NodeDetailManager(network: .sapphire(.SAPPHIRE_DEVNET)) + let nodeManager = NodeDetailManager(network: .SAPPHIRE_DEVNET) let nodeDetail = try await nodeManager.getNodeDetails(verifier: TORUS_TEST_VERIFIER, verifierID: TORUS_TEST_EMAIL) - let torusUtils = TorusUtils(serverTimeOffset: 1000, network: .sapphire(.SAPPHIRE_DEVNET), clientId: "CLIENT ID") + let options = TorusOptions(clientId: "CLIENT ID", network: .SAPPHIRE_DEVNET, serverTimeOffset: 1000) + let torusUtils = try TorusUtils(params: options) let idToken = try generateIdToken(email: TORUS_TEST_EMAIL) let verifierParams = VerifierParams(verifier_id: TORUS_TEST_EMAIL) - let retrievedShare = try await torusUtils.retrieveShares(endpoints: nodeDetail.torusNodeEndpoints, torusNodePubs: nodeDetail.torusNodePub, indexes: nodeDetail.torusIndexes, verifier: TORUS_TEST_VERIFIER, verifierParams: verifierParams, idToken: idToken) + let retrievedShare = try await torusUtils.retrieveShares(endpoints: nodeDetail.getTorusNodeEndpoints(), verifier: TORUS_TEST_VERIFIER, verifierParams: verifierParams, idToken: idToken) - let signature_collection = retrievedShare.sessionData!.sessionTokenData.map { token in - ["data": Data(hex: token!.token).base64EncodedString(), + let signature_collection = retrievedShare.sessionData.sessionTokenData.map { token in + ["data": token!.token, "sig": token!.signature] } @@ -60,6 +61,7 @@ final class integrationTests: XCTestCase { let newFactorPub = try newFactorKey.toPublic() // 2/2 -> 2/3 tss try await TssModule.generate_tss_share(threshold_key: threshold, tss_tag: tssTag, input_tss_share: tss_share, tss_input_index: Int32(tss_index)!, auth_signatures: sigs, new_factor_pub: newFactorPub, new_tss_index: 3, nodeDetails: nodeDetail, torusUtils: torusUtils) + /* let (tss_index3, tss_share3) = try await TssModule.get_tss_share(threshold_key: threshold, tss_tag: tssTag, factorKey: newFactorKey.hex) let (_, tss_share_updated) = try await TssModule.get_tss_share(threshold_key: threshold, tss_tag: tssTag, factorKey: factorKey.hex) @@ -107,6 +109,7 @@ final class integrationTests: XCTestCase { // 2/3 -> 2/2 tss try await TssModule.delete_factor_pub(threshold_key: threshold, tss_tag: tssTag, factor_key: factorKey.hex, auth_signatures: sigs, delete_factor_pub: newFactorPub, nodeDetails: nodeDetail, torusUtils: torusUtils) + */ } func test_TssModule_multi_tag() async throws { @@ -120,16 +123,17 @@ final class integrationTests: XCTestCase { var threshold: ThresholdKey! var threshold2: ThresholdKey! - let nodeManager = NodeDetailManager(network: .sapphire(.SAPPHIRE_DEVNET)) + let nodeManager = NodeDetailManager(network: .SAPPHIRE_DEVNET) let nodeDetail = try await nodeManager.getNodeDetails(verifier: TORUS_TEST_VERIFIER, verifierID: TORUS_TEST_EMAIL) - let torusUtils = TorusUtils(serverTimeOffset: 1000, network: .sapphire(.SAPPHIRE_DEVNET), clientId: "CLIENT ID") - + let options = TorusOptions(clientId: "CLIENT ID", network: .SAPPHIRE_DEVNET, serverTimeOffset: 1000) + let torusUtils = try TorusUtils(params: options) + let idToken = try generateIdToken(email: TORUS_TEST_EMAIL) let verifierParams = VerifierParams(verifier_id: TORUS_TEST_EMAIL) - let retrievedShare = try await torusUtils.retrieveShares(endpoints: nodeDetail.torusNodeSSSEndpoints, torusNodePubs: nodeDetail.torusNodePub, indexes: nodeDetail.torusIndexes, verifier: TORUS_TEST_VERIFIER, verifierParams: verifierParams, idToken: idToken) + let retrievedShare = try await torusUtils.retrieveShares(endpoints: nodeDetail.getTorusNodeSSSEndpoints(), verifier: TORUS_TEST_VERIFIER, verifierParams: verifierParams, idToken: idToken) - let signature_collection = retrievedShare.sessionData!.sessionTokenData.map { token in - ["data": Data(hex: token!.token).base64EncodedString(), + let signature_collection = retrievedShare.sessionData.sessionTokenData.map { token in + ["data": token!.token, "sig": token!.signature] } @@ -151,14 +155,13 @@ final class integrationTests: XCTestCase { _ = try! await threshold.reconstruct() let shareIndex = try! await threshold.generate_new_share() let share = try threshold.output_share(shareIndex: shareIndex.hex) - print(share) // TODO: This requires further investigation // Too much tags with too much shares cause the ios complaint // `Receive failed with error "Message too long"` let testTags = ["tag1", "tag2"] - var tssMods: [(ThresholdKey, String)] = [] + var tssMods: [(ThresholdKey, String)] = [] // The way this is used is a problematic, refactor this test var factorKeys: [PrivateKey] = [] var factorPubs: [String] = [] @@ -166,7 +169,6 @@ final class integrationTests: XCTestCase { var tssIndexes: [String] = [] var tssShares: [String] = [] - print(try threshold.get_all_tss_tags()) for tag in testTags { // create tag tss module @@ -265,6 +267,5 @@ final class integrationTests: XCTestCase { try await TssModule.delete_factor_pub(threshold_key: threshold, tss_tag: tag, factor_key: newFactorKeys[index].hex, auth_signatures: sigs, delete_factor_pub: newFactorPubs[index], nodeDetails: nodeDetail, torusUtils: torusUtils) } try await threshold.sync_local_metadata_transistions() - print(try threshold.get_all_tss_tags()) } } diff --git a/Tests/tkeypkgTests/Utils/JwtUtils.swift b/Tests/tkeypkgTests/Utils/JwtUtils.swift index eecb837..39a8508 100644 --- a/Tests/tkeypkgTests/Utils/JwtUtils.swift +++ b/Tests/tkeypkgTests/Utils/JwtUtils.swift @@ -1,10 +1,3 @@ -// -// File.swift -// -// -// Created by CW Lee on 20/07/2023. -// - import Foundation import JWTKit diff --git a/Tests/tkeypkgTests/modules/tkey_pkgPrivateKeysModuleTests.swift b/Tests/tkeypkgTests/modules/tkey_pkgPrivateKeysModuleTests.swift index 8980001..4f0a247 100644 --- a/Tests/tkeypkgTests/modules/tkey_pkgPrivateKeysModuleTests.swift +++ b/Tests/tkeypkgTests/modules/tkey_pkgPrivateKeysModuleTests.swift @@ -1,6 +1,6 @@ import XCTest import Foundation -@testable import tkey +import tkey import Foundation final class tkey_pkgPrivateKeyModuleTests: XCTestCase { diff --git a/Tests/tkeypkgTests/modules/tkey_pkgSecurityQuestionModuleTests.swift b/Tests/tkeypkgTests/modules/tkey_pkgSecurityQuestionModuleTests.swift index 09c9137..c33c6a0 100644 --- a/Tests/tkeypkgTests/modules/tkey_pkgSecurityQuestionModuleTests.swift +++ b/Tests/tkeypkgTests/modules/tkey_pkgSecurityQuestionModuleTests.swift @@ -1,6 +1,6 @@ import XCTest import Foundation -@testable import tkey +import tkey import Foundation final class tkey_pkgSecurityQuestionModuleTests: XCTestCase { diff --git a/Tests/tkeypkgTests/modules/tkey_pkgSeedPhraseModuleTests.swift b/Tests/tkeypkgTests/modules/tkey_pkgSeedPhraseModuleTests.swift index c2a55d8..8a8e91b 100644 --- a/Tests/tkeypkgTests/modules/tkey_pkgSeedPhraseModuleTests.swift +++ b/Tests/tkeypkgTests/modules/tkey_pkgSeedPhraseModuleTests.swift @@ -1,6 +1,6 @@ import XCTest import Foundation -@testable import tkey +import tkey import Foundation final class tkey_pkgSeedPhraseModuleTests: XCTestCase { diff --git a/Tests/tkeypkgTests/modules/tkey_pkgShareSerializationModuleTests.swift b/Tests/tkeypkgTests/modules/tkey_pkgShareSerializationModuleTests.swift index a87da60..ffedd35 100644 --- a/Tests/tkeypkgTests/modules/tkey_pkgShareSerializationModuleTests.swift +++ b/Tests/tkeypkgTests/modules/tkey_pkgShareSerializationModuleTests.swift @@ -1,6 +1,6 @@ import XCTest import Foundation -@testable import tkey +import tkey import Foundation final class tkey_pkgShareSerializationModuleTests: XCTestCase { diff --git a/Tests/tkeypkgTests/modules/tkey_pkgShareTransferModuleTests.swift b/Tests/tkeypkgTests/modules/tkey_pkgShareTransferModuleTests.swift index f553f5f..fd4bd77 100644 --- a/Tests/tkeypkgTests/modules/tkey_pkgShareTransferModuleTests.swift +++ b/Tests/tkeypkgTests/modules/tkey_pkgShareTransferModuleTests.swift @@ -1,6 +1,6 @@ import XCTest import Foundation -@testable import tkey +import tkey import Foundation final class tkey_pkgShareTransferModuleTests: XCTestCase { diff --git a/Tests/tkeypkgTests/tkey_base.swift b/Tests/tkeypkgTests/tkey_base.swift index 117a626..b3ef9b5 100644 --- a/Tests/tkeypkgTests/tkey_base.swift +++ b/Tests/tkeypkgTests/tkey_base.swift @@ -1,21 +1,15 @@ -// -// File.swift -// -// -// Created by CW Lee on 18/07/2023. -// - import Foundation import XCTest import Foundation -@testable import tkey +import tkey import TorusUtils class tkey_baseTests: XCTestCase { - - var torus = TorusUtils.init(network: .sapphire(.SAPPHIRE_DEVNET), clientId: "CLIENT ID") + let options = TorusOptions(clientId: "CLIENT ID", network: .SAPPHIRE_DEVNET) + var torusUtils: TorusUtils! override func setUp() async throws { + torusUtils = try TorusUtils(params: options) let postbox_key = try! PrivateKey.generate() let storage_layer = try! StorageLayer(enable_logging: true, host_url: "https://metadata.tor.us", server_time_offset: 2) let service_provider = try! ServiceProvider(enable_logging: true, postbox_key: postbox_key.hex) diff --git a/Tests/tkeypkgTests/tkey_pkgGenerateShareStoreResultTests.swift b/Tests/tkeypkgTests/tkey_pkgGenerateShareStoreResultTests.swift index a15bfd3..3a23d6f 100644 --- a/Tests/tkeypkgTests/tkey_pkgGenerateShareStoreResultTests.swift +++ b/Tests/tkeypkgTests/tkey_pkgGenerateShareStoreResultTests.swift @@ -1,6 +1,6 @@ import XCTest import Foundation -@testable import tkey +import tkey import Foundation final class tkey_pkgGenerateShareStoreResultTests: XCTestCase { diff --git a/Tests/tkeypkgTests/tkey_pkgKeyDetailsTest.swift b/Tests/tkeypkgTests/tkey_pkgKeyDetailsTest.swift index 97d25ce..a214f7f 100644 --- a/Tests/tkeypkgTests/tkey_pkgKeyDetailsTest.swift +++ b/Tests/tkeypkgTests/tkey_pkgKeyDetailsTest.swift @@ -1,6 +1,6 @@ import XCTest import Foundation -@testable import tkey +import tkey import Foundation final class tkey_pkgKeyDetailsTests: XCTestCase { diff --git a/Tests/tkeypkgTests/tkey_pkgKeyPointArrayTests.swift b/Tests/tkeypkgTests/tkey_pkgKeyPointArrayTests.swift index ceebfeb..9716b47 100644 --- a/Tests/tkeypkgTests/tkey_pkgKeyPointArrayTests.swift +++ b/Tests/tkeypkgTests/tkey_pkgKeyPointArrayTests.swift @@ -1,6 +1,6 @@ import XCTest import Foundation -@testable import tkey +import tkey import Foundation final class tkey_pkgKeyPointArrayTests: XCTestCase { diff --git a/Tests/tkeypkgTests/tkey_pkgKeyPointTests.swift b/Tests/tkeypkgTests/tkey_pkgKeyPointTests.swift index 6404c9b..a525add 100644 --- a/Tests/tkeypkgTests/tkey_pkgKeyPointTests.swift +++ b/Tests/tkeypkgTests/tkey_pkgKeyPointTests.swift @@ -1,6 +1,6 @@ import XCTest import Foundation -@testable import tkey +import tkey import Foundation final class tkey_pkgKeyPointTests: XCTestCase { diff --git a/Tests/tkeypkgTests/tkey_pkgKeyReconstructionDetailsTests.swift b/Tests/tkeypkgTests/tkey_pkgKeyReconstructionDetailsTests.swift index d7f781b..6c2e069 100644 --- a/Tests/tkeypkgTests/tkey_pkgKeyReconstructionDetailsTests.swift +++ b/Tests/tkeypkgTests/tkey_pkgKeyReconstructionDetailsTests.swift @@ -1,6 +1,6 @@ import XCTest import Foundation -@testable import tkey +import tkey import Foundation final class tkey_pkgKeyReconstructionDetailsTests: XCTestCase { diff --git a/Tests/tkeypkgTests/tkey_pkgLocalMetadataTransitionsTests.swift b/Tests/tkeypkgTests/tkey_pkgLocalMetadataTransitionsTests.swift index 3a0f1a1..8c28590 100644 --- a/Tests/tkeypkgTests/tkey_pkgLocalMetadataTransitionsTests.swift +++ b/Tests/tkeypkgTests/tkey_pkgLocalMetadataTransitionsTests.swift @@ -1,6 +1,6 @@ import XCTest import Foundation -@testable import tkey +import tkey import Foundation final class tkey_pkgLocalMetadataTransitionsTests: XCTestCase { diff --git a/Tests/tkeypkgTests/tkey_pkgMetadataTests.swift b/Tests/tkeypkgTests/tkey_pkgMetadataTests.swift index 32a2e97..0ab69d1 100644 --- a/Tests/tkeypkgTests/tkey_pkgMetadataTests.swift +++ b/Tests/tkeypkgTests/tkey_pkgMetadataTests.swift @@ -1,6 +1,6 @@ import XCTest import Foundation -@testable import tkey +import tkey import Foundation final class tkey_pkgMetadataTests: XCTestCase { diff --git a/Tests/tkeypkgTests/tkey_pkgNodeDetailsTests.swift b/Tests/tkeypkgTests/tkey_pkgNodeDetailsTests.swift index 155d7b4..5c4ef78 100644 --- a/Tests/tkeypkgTests/tkey_pkgNodeDetailsTests.swift +++ b/Tests/tkeypkgTests/tkey_pkgNodeDetailsTests.swift @@ -1,6 +1,6 @@ import XCTest import Foundation -@testable import tkey +import tkey import Foundation final class tkey_pkgNodeDetailsTests: XCTestCase { diff --git a/Tests/tkeypkgTests/tkey_pkgPolynomialTests.swift b/Tests/tkeypkgTests/tkey_pkgPolynomialTests.swift index 5699833..fb1b12a 100644 --- a/Tests/tkeypkgTests/tkey_pkgPolynomialTests.swift +++ b/Tests/tkeypkgTests/tkey_pkgPolynomialTests.swift @@ -1,6 +1,6 @@ import XCTest import Foundation -@testable import tkey +import tkey import Foundation final class tkey_pkgPolynomialTests: XCTestCase { diff --git a/Tests/tkeypkgTests/tkey_pkgPrivateKeyTests.swift b/Tests/tkeypkgTests/tkey_pkgPrivateKeyTests.swift index 6133b27..781c198 100644 --- a/Tests/tkeypkgTests/tkey_pkgPrivateKeyTests.swift +++ b/Tests/tkeypkgTests/tkey_pkgPrivateKeyTests.swift @@ -1,6 +1,6 @@ import XCTest import Foundation -@testable import tkey +import tkey import Foundation final class tkey_pkgPrivateKeyTests: XCTestCase { diff --git a/Tests/tkeypkgTests/tkey_pkgPublicPolynomialTests.swift b/Tests/tkeypkgTests/tkey_pkgPublicPolynomialTests.swift index f3a63e7..cfe2810 100644 --- a/Tests/tkeypkgTests/tkey_pkgPublicPolynomialTests.swift +++ b/Tests/tkeypkgTests/tkey_pkgPublicPolynomialTests.swift @@ -1,6 +1,6 @@ import XCTest import Foundation -@testable import tkey +import tkey import Foundation final class tkey_pkgPublicPolynomialTests: XCTestCase { diff --git a/Tests/tkeypkgTests/tkey_pkgServiceProviderTests.swift b/Tests/tkeypkgTests/tkey_pkgServiceProviderTests.swift index 03450ed..aba7dfb 100644 --- a/Tests/tkeypkgTests/tkey_pkgServiceProviderTests.swift +++ b/Tests/tkeypkgTests/tkey_pkgServiceProviderTests.swift @@ -1,6 +1,6 @@ import XCTest import Foundation -@testable import tkey +import tkey import Foundation final class tkey_pkgServiceProviderTests: XCTestCase { diff --git a/Tests/tkeypkgTests/tkey_pkgShareStoreArrayTests.swift b/Tests/tkeypkgTests/tkey_pkgShareStoreArrayTests.swift index 356f0e3..a6722cd 100644 --- a/Tests/tkeypkgTests/tkey_pkgShareStoreArrayTests.swift +++ b/Tests/tkeypkgTests/tkey_pkgShareStoreArrayTests.swift @@ -1,6 +1,6 @@ import XCTest import Foundation -@testable import tkey +import tkey import Foundation final class tkey_pkgShareStoreArrayTests: XCTestCase { diff --git a/Tests/tkeypkgTests/tkey_pkgShareStoreMapTests.swift b/Tests/tkeypkgTests/tkey_pkgShareStoreMapTests.swift index 93d0e14..b031f52 100644 --- a/Tests/tkeypkgTests/tkey_pkgShareStoreMapTests.swift +++ b/Tests/tkeypkgTests/tkey_pkgShareStoreMapTests.swift @@ -1,6 +1,6 @@ import XCTest import Foundation -@testable import tkey +import tkey import Foundation final class tkey_pkgShareStoreMapTests: XCTestCase { diff --git a/Tests/tkeypkgTests/tkey_pkgShareStorePolyIdIndexMapTests.swift b/Tests/tkeypkgTests/tkey_pkgShareStorePolyIdIndexMapTests.swift index 7bcbdb3..e731a06 100644 --- a/Tests/tkeypkgTests/tkey_pkgShareStorePolyIdIndexMapTests.swift +++ b/Tests/tkeypkgTests/tkey_pkgShareStorePolyIdIndexMapTests.swift @@ -1,6 +1,6 @@ import XCTest import Foundation -@testable import tkey +import tkey import Foundation final class tkey_pkgShareStorePolyIdIndexMapTests: XCTestCase { diff --git a/Tests/tkeypkgTests/tkey_pkgShareStoreTests.swift b/Tests/tkeypkgTests/tkey_pkgShareStoreTests.swift index 4e54bbf..38d85f7 100644 --- a/Tests/tkeypkgTests/tkey_pkgShareStoreTests.swift +++ b/Tests/tkeypkgTests/tkey_pkgShareStoreTests.swift @@ -1,6 +1,6 @@ import XCTest import Foundation -@testable import tkey +import tkey import Foundation final class tkey_pkgShareStoreTests: XCTestCase { diff --git a/Tests/tkeypkgTests/tkey_pkgStorageLayerTests.swift b/Tests/tkeypkgTests/tkey_pkgStorageLayerTests.swift index 5556a63..0a17b14 100644 --- a/Tests/tkeypkgTests/tkey_pkgStorageLayerTests.swift +++ b/Tests/tkeypkgTests/tkey_pkgStorageLayerTests.swift @@ -1,6 +1,6 @@ import XCTest import Foundation -@testable import tkey +import tkey import Foundation final class tkey_pkgStorageLayerTests: XCTestCase { diff --git a/Tests/tkeypkgTests/tkey_pkgThresholdKeyTests.swift b/Tests/tkeypkgTests/tkey_pkgThresholdKeyTests.swift index e8ec7cb..21d6296 100644 --- a/Tests/tkeypkgTests/tkey_pkgThresholdKeyTests.swift +++ b/Tests/tkeypkgTests/tkey_pkgThresholdKeyTests.swift @@ -1,6 +1,6 @@ import XCTest import Foundation -@testable import tkey +import tkey final class tkey_pkgThresholdKeyTests: XCTestCase { func test_basic_threshold_key_reconstruct() async { diff --git a/Tests/tkeypkgTests/tkey_pkgTssOptionsTests.swift b/Tests/tkeypkgTests/tkey_pkgTssOptionsTests.swift index 0f8edb3..b1f96cd 100644 --- a/Tests/tkeypkgTests/tkey_pkgTssOptionsTests.swift +++ b/Tests/tkeypkgTests/tkey_pkgTssOptionsTests.swift @@ -1,6 +1,6 @@ import XCTest import Foundation -@testable import tkey +import tkey import Foundation final class tkey_pkgTssOptionsTests: XCTestCase { diff --git a/Tests/tkeypkgTests/tkey_pkgVersionTests.swift b/Tests/tkeypkgTests/tkey_pkgVersionTests.swift index 0380a1e..45c6252 100644 --- a/Tests/tkeypkgTests/tkey_pkgVersionTests.swift +++ b/Tests/tkeypkgTests/tkey_pkgVersionTests.swift @@ -1,6 +1,6 @@ import XCTest import Foundation -@testable import tkey +import tkey final class tkey_pkgVersionTests: XCTestCase { func test_library_version() { diff --git a/tkey-mpc-swift.podspec b/tkey-mpc-swift.podspec index 5a10b22..4c63291 100644 --- a/tkey-mpc-swift.podspec +++ b/tkey-mpc-swift.podspec @@ -1,6 +1,6 @@ Pod::Spec.new do |spec| spec.name = "tkey-mpc-swift" - spec.version = "3.0.0" + spec.version = "4.0.0" spec.platform = :ios, "14.0" spec.summary = "SDK allows you to create threshold key setup natively with multiparty computation support" spec.homepage = "https://web3auth.io/" @@ -10,6 +10,6 @@ Pod::Spec.new do |spec| spec.module_name = "tkey" spec.source = { :git => "https://github.com/tkey/tkey-mpc-swift.git", :tag => spec.version } spec.vendored_framework = "Sources/libtkey/libtkey.xcframework" - spec.dependency 'TorusUtils', '~> 8.1.0' + spec.dependency 'TorusUtils', '~> 10.0.0' spec.source_files = "Sources/**/*.{swift,c,h}" end