diff --git a/License.md b/License.md new file mode 100644 index 0000000..5eec43e --- /dev/null +++ b/License.md @@ -0,0 +1,11 @@ +Copyright (c) 2020 Torus Labs Private Limited (https://tor.us) + +Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: + +1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. + +2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. + +3. Neither the name of the copyright holder nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/Package.swift b/Package.swift index 1ed653d..49c42fe 100644 --- a/Package.swift +++ b/Package.swift @@ -11,15 +11,14 @@ let package = Package( products: [ // Products define the executables and libraries a package produces, and make them visible to other packages. .library( - name: "tkey-mpc-swift", - targets: ["tkey-mpc-swift"]), + 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.0.0"), + .package(name: "TorusUtils", url: "https://github.com/torusresearch/torus-utils-swift" , from: "8.1.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"), ], targets: [ @@ -28,18 +27,18 @@ let package = Package( .binaryTarget(name: "libtkey", path: "Sources/libtkey/libtkey.xcframework" ), - .target(name: "tkey", + .target(name: "lib", dependencies: ["libtkey"], path: "Sources/libtkey" ), .target( - name: "tkey-mpc-swift", - dependencies: ["tkey", "TorusUtils"], + name: "tkey", + dependencies: ["lib", "TorusUtils"], path: "Sources/ThresholdKey" ), .testTarget( name: "tkey-pkgTests", - dependencies: ["tkey-mpc-swift", "CryptoSwift", .product(name: "JWTKit", package: "jwt-kit")], + dependencies: ["tkey", .product(name: "JWTKit", package: "jwt-kit")], path: "Tests/tkeypkgTests" ), ] diff --git a/Sources/ThresholdKey/Common/KeyPoint.swift b/Sources/ThresholdKey/Common/KeyPoint.swift index dabe7ae..7dd35c5 100644 --- a/Sources/ThresholdKey/Common/KeyPoint.swift +++ b/Sources/ThresholdKey/Common/KeyPoint.swift @@ -1,6 +1,6 @@ import Foundation -#if canImport(tkey) - import tkey +#if canImport(lib) + import lib #endif diff --git a/Sources/ThresholdKey/Common/NodeDetails.swift b/Sources/ThresholdKey/Common/NodeDetails.swift index 6eb9b3e..368b79b 100644 --- a/Sources/ThresholdKey/Common/NodeDetails.swift +++ b/Sources/ThresholdKey/Common/NodeDetails.swift @@ -1,6 +1,6 @@ import Foundation -#if canImport(tkey) -import tkey +#if canImport(lib) + import lib #endif public final class NodeDetails { diff --git a/Sources/ThresholdKey/Common/PrivateKey.swift b/Sources/ThresholdKey/Common/PrivateKey.swift index a00644d..f05dcdf 100644 --- a/Sources/ThresholdKey/Common/PrivateKey.swift +++ b/Sources/ThresholdKey/Common/PrivateKey.swift @@ -1,6 +1,6 @@ import Foundation -#if canImport(tkey) - import tkey +#if canImport(lib) + import lib #endif public final class PrivateKey { diff --git a/Sources/ThresholdKey/Common/ShareStore.swift b/Sources/ThresholdKey/Common/ShareStore.swift index e2db1a1..9bcf6ad 100644 --- a/Sources/ThresholdKey/Common/ShareStore.swift +++ b/Sources/ThresholdKey/Common/ShareStore.swift @@ -1,6 +1,6 @@ import Foundation -#if canImport(tkey) - import tkey +#if canImport(lib) + import lib #endif public final class ShareStore { diff --git a/Sources/ThresholdKey/Common/TssOptions.swift b/Sources/ThresholdKey/Common/TssOptions.swift index a4a43f8..351fbf3 100644 --- a/Sources/ThresholdKey/Common/TssOptions.swift +++ b/Sources/ThresholdKey/Common/TssOptions.swift @@ -1,6 +1,6 @@ import Foundation -#if canImport(tkey) -import tkey +#if canImport(lib) + import lib #endif public final class TssOptions { diff --git a/Sources/ThresholdKey/GenerateShareStoreResult.swift b/Sources/ThresholdKey/GenerateShareStoreResult.swift index c057260..046ff77 100644 --- a/Sources/ThresholdKey/GenerateShareStoreResult.swift +++ b/Sources/ThresholdKey/GenerateShareStoreResult.swift @@ -1,6 +1,6 @@ import Foundation -#if canImport(tkey) - import tkey +#if canImport(lib) + import lib #endif public final class GenerateShareStoreResult { diff --git a/Sources/ThresholdKey/KeyDetails.swift b/Sources/ThresholdKey/KeyDetails.swift index 1c3b462..7a1ed9c 100644 --- a/Sources/ThresholdKey/KeyDetails.swift +++ b/Sources/ThresholdKey/KeyDetails.swift @@ -1,6 +1,6 @@ import Foundation -#if canImport(tkey) - import tkey +#if canImport(lib) + import lib #endif public final class KeyDetails { diff --git a/Sources/ThresholdKey/KeyPointArray.swift b/Sources/ThresholdKey/KeyPointArray.swift index 5c50203..57ca029 100644 --- a/Sources/ThresholdKey/KeyPointArray.swift +++ b/Sources/ThresholdKey/KeyPointArray.swift @@ -1,7 +1,7 @@ import Foundation -#if canImport(tkey) - import tkey +#if canImport(lib) + import lib #endif public class KeyPointArray { diff --git a/Sources/ThresholdKey/KeyReconstructionDetails.swift b/Sources/ThresholdKey/KeyReconstructionDetails.swift index 138d785..088e439 100644 --- a/Sources/ThresholdKey/KeyReconstructionDetails.swift +++ b/Sources/ThresholdKey/KeyReconstructionDetails.swift @@ -1,6 +1,6 @@ import Foundation -#if canImport(tkey) - import tkey +#if canImport(lib) + import lib #endif public final class KeyReconstructionDetails: Codable { diff --git a/Sources/ThresholdKey/LocalMetadataTransitions.swift b/Sources/ThresholdKey/LocalMetadataTransitions.swift index 5620970..1ed97d2 100644 --- a/Sources/ThresholdKey/LocalMetadataTransitions.swift +++ b/Sources/ThresholdKey/LocalMetadataTransitions.swift @@ -1,7 +1,7 @@ import Foundation -#if canImport(tkey) - import tkey +#if canImport(lib) + import lib #endif public final class LocalMetadataTransitions { diff --git a/Sources/ThresholdKey/Metadata.swift b/Sources/ThresholdKey/Metadata.swift index fa5e94c..bcfd3ed 100644 --- a/Sources/ThresholdKey/Metadata.swift +++ b/Sources/ThresholdKey/Metadata.swift @@ -1,6 +1,6 @@ import Foundation -#if canImport(tkey) - import tkey +#if canImport(lib) + import lib #endif public final class Metadata { diff --git a/Sources/ThresholdKey/Modules/PrivateKeysModule.swift b/Sources/ThresholdKey/Modules/PrivateKeysModule.swift index c7a3396..e7f6b71 100644 --- a/Sources/ThresholdKey/Modules/PrivateKeysModule.swift +++ b/Sources/ThresholdKey/Modules/PrivateKeysModule.swift @@ -1,6 +1,6 @@ import Foundation -#if canImport(tkey) - import tkey +#if canImport(lib) + import lib #endif public struct KeyData: Decodable { diff --git a/Sources/ThresholdKey/Modules/SecurityQuestionModule.swift b/Sources/ThresholdKey/Modules/SecurityQuestionModule.swift index f4917c1..a374d46 100644 --- a/Sources/ThresholdKey/Modules/SecurityQuestionModule.swift +++ b/Sources/ThresholdKey/Modules/SecurityQuestionModule.swift @@ -1,6 +1,6 @@ import Foundation -#if canImport(tkey) - import tkey +#if canImport(lib) + import lib #endif public final class SecurityQuestionModule { diff --git a/Sources/ThresholdKey/Modules/SeedPhraseModule.swift b/Sources/ThresholdKey/Modules/SeedPhraseModule.swift index b18034d..25da1a6 100644 --- a/Sources/ThresholdKey/Modules/SeedPhraseModule.swift +++ b/Sources/ThresholdKey/Modules/SeedPhraseModule.swift @@ -1,6 +1,6 @@ import Foundation -#if canImport(tkey) - import tkey +#if canImport(lib) + import lib #endif public struct SeedPhrase: Codable { diff --git a/Sources/ThresholdKey/Modules/ShareSerializationModule.swift b/Sources/ThresholdKey/Modules/ShareSerializationModule.swift index 32a51ea..590e40c 100644 --- a/Sources/ThresholdKey/Modules/ShareSerializationModule.swift +++ b/Sources/ThresholdKey/Modules/ShareSerializationModule.swift @@ -1,6 +1,6 @@ import Foundation -#if canImport(tkey) - import tkey +#if canImport(lib) + import lib #endif public final class ShareSerializationModule { diff --git a/Sources/ThresholdKey/Modules/ShareTransferModule.swift b/Sources/ThresholdKey/Modules/ShareTransferModule.swift index 04a11cf..a1dfa17 100644 --- a/Sources/ThresholdKey/Modules/ShareTransferModule.swift +++ b/Sources/ThresholdKey/Modules/ShareTransferModule.swift @@ -1,6 +1,6 @@ import Foundation -#if canImport(tkey) - import tkey +#if canImport(lib) + import lib #endif public final class ShareTransferModule { diff --git a/Sources/ThresholdKey/Modules/TssModule.swift b/Sources/ThresholdKey/Modules/TssModule.swift index 0276c20..8881ad4 100644 --- a/Sources/ThresholdKey/Modules/TssModule.swift +++ b/Sources/ThresholdKey/Modules/TssModule.swift @@ -1,10 +1,9 @@ import Foundation import Foundation -#if canImport(tkey) - import tkey +#if canImport(lib) + import lib #endif -import CommonSources import FetchNodeDetails import TorusUtils diff --git a/Sources/ThresholdKey/Polynomial.swift b/Sources/ThresholdKey/Polynomial.swift index 926f5bc..1ca78f5 100644 --- a/Sources/ThresholdKey/Polynomial.swift +++ b/Sources/ThresholdKey/Polynomial.swift @@ -1,6 +1,6 @@ import Foundation -#if canImport(tkey) -import tkey +#if canImport(lib) + import lib #endif public final class Polynomial { diff --git a/Sources/ThresholdKey/PublicPolynomial.swift b/Sources/ThresholdKey/PublicPolynomial.swift index 88f3a79..440b122 100644 --- a/Sources/ThresholdKey/PublicPolynomial.swift +++ b/Sources/ThresholdKey/PublicPolynomial.swift @@ -1,6 +1,6 @@ import Foundation -#if canImport(tkey) -import tkey +#if canImport(lib) + import lib #endif public final class PublicPolynomial { diff --git a/Sources/ThresholdKey/RssComm.swift b/Sources/ThresholdKey/RssComm.swift index 0b41ba5..0c82c73 100644 --- a/Sources/ThresholdKey/RssComm.swift +++ b/Sources/ThresholdKey/RssComm.swift @@ -1,6 +1,6 @@ import Foundation -#if canImport(tkey) -import tkey +#if canImport(lib) + import lib #endif public final class RssComm { diff --git a/Sources/ThresholdKey/ServiceProvider.swift b/Sources/ThresholdKey/ServiceProvider.swift index dde8266..b77db41 100644 --- a/Sources/ThresholdKey/ServiceProvider.swift +++ b/Sources/ThresholdKey/ServiceProvider.swift @@ -1,10 +1,9 @@ import Foundation import TorusUtils -#if canImport(tkey) - import tkey +#if canImport(lib) + import lib #endif import FetchNodeDetails -import CommonSources public final class ServiceProvider { private(set) var pointer: OpaquePointer? diff --git a/Sources/ThresholdKey/ShareMap.swift b/Sources/ThresholdKey/ShareMap.swift index 0a62922..4103f42 100644 --- a/Sources/ThresholdKey/ShareMap.swift +++ b/Sources/ThresholdKey/ShareMap.swift @@ -1,6 +1,6 @@ import Foundation -#if canImport(tkey) - import tkey +#if canImport(lib) + import lib #endif public final class ShareMap { diff --git a/Sources/ThresholdKey/ShareStoreArray.swift b/Sources/ThresholdKey/ShareStoreArray.swift index 074646d..c921a09 100644 --- a/Sources/ThresholdKey/ShareStoreArray.swift +++ b/Sources/ThresholdKey/ShareStoreArray.swift @@ -1,7 +1,7 @@ import Foundation -#if canImport(tkey) - import tkey +#if canImport(lib) + import lib #endif public class ShareStoreArray { diff --git a/Sources/ThresholdKey/ShareStoreMap.swift b/Sources/ThresholdKey/ShareStoreMap.swift index 518082d..7a40ec9 100644 --- a/Sources/ThresholdKey/ShareStoreMap.swift +++ b/Sources/ThresholdKey/ShareStoreMap.swift @@ -1,6 +1,6 @@ import Foundation -#if canImport(tkey) - import tkey +#if canImport(lib) + import lib #endif public final class ShareStoreMap { diff --git a/Sources/ThresholdKey/ShareStorePolyIdIndexMap.swift b/Sources/ThresholdKey/ShareStorePolyIdIndexMap.swift index 945f068..1df3084 100644 --- a/Sources/ThresholdKey/ShareStorePolyIdIndexMap.swift +++ b/Sources/ThresholdKey/ShareStorePolyIdIndexMap.swift @@ -1,6 +1,6 @@ import Foundation -#if canImport(tkey) - import tkey +#if canImport(lib) + import lib #endif public final class ShareStorePolyIdIndexMap { diff --git a/Sources/ThresholdKey/ShareTransferStore.swift b/Sources/ThresholdKey/ShareTransferStore.swift index dd98148..b2f7310 100644 --- a/Sources/ThresholdKey/ShareTransferStore.swift +++ b/Sources/ThresholdKey/ShareTransferStore.swift @@ -1,6 +1,6 @@ import Foundation -#if canImport(tkey) - import tkey +#if canImport(lib) + import lib #endif public final class ShareTransferStore { diff --git a/Sources/ThresholdKey/StorageLayer.swift b/Sources/ThresholdKey/StorageLayer.swift index fc457a7..92ce5ee 100644 --- a/Sources/ThresholdKey/StorageLayer.swift +++ b/Sources/ThresholdKey/StorageLayer.swift @@ -1,6 +1,6 @@ import Foundation -#if canImport(tkey) - import tkey +#if canImport(lib) + import lib #endif diff --git a/Sources/ThresholdKey/ThresholdKey.swift b/Sources/ThresholdKey/ThresholdKey.swift index 020a7b7..a8396ed 100644 --- a/Sources/ThresholdKey/ThresholdKey.swift +++ b/Sources/ThresholdKey/ThresholdKey.swift @@ -1,8 +1,8 @@ import Foundation -#if canImport(tkey) - import tkey +#if canImport(lib) + import lib #endif -import CommonSources +import FetchNodeDetails import TorusUtils public class ThresholdKey { diff --git a/Sources/ThresholdKey/Version.swift b/Sources/ThresholdKey/Version.swift index 2ae82ea..754415b 100644 --- a/Sources/ThresholdKey/Version.swift +++ b/Sources/ThresholdKey/Version.swift @@ -1,6 +1,6 @@ import Foundation -#if canImport(tkey) - import tkey +#if canImport(lib) + import lib #endif /// Returns the library version. diff --git a/Tests/tkeypkgTests/IntegrationTests.swift b/Tests/tkeypkgTests/IntegrationTests.swift index 77915b4..ffe94f1 100644 --- a/Tests/tkeypkgTests/IntegrationTests.swift +++ b/Tests/tkeypkgTests/IntegrationTests.swift @@ -1,7 +1,6 @@ -import CommonSources import FetchNodeDetails import Foundation -@testable import tkey_mpc_swift +@testable import tkey import TorusUtils import XCTest diff --git a/Tests/tkeypkgTests/modules/tkey_pkgPrivateKeysModuleTests.swift b/Tests/tkeypkgTests/modules/tkey_pkgPrivateKeysModuleTests.swift index b54c4c6..8980001 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_mpc_swift +@testable 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 3ec78ca..09c9137 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_mpc_swift +@testable 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 e0e0333..c2a55d8 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_mpc_swift +@testable 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 c6ff2b7..a87da60 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_mpc_swift +@testable 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 06e23ee..f553f5f 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_mpc_swift +@testable import tkey import Foundation final class tkey_pkgShareTransferModuleTests: XCTestCase { diff --git a/Tests/tkeypkgTests/tkey_base.swift b/Tests/tkeypkgTests/tkey_base.swift index 6d1ac89..117a626 100644 --- a/Tests/tkeypkgTests/tkey_base.swift +++ b/Tests/tkeypkgTests/tkey_base.swift @@ -8,12 +8,12 @@ import Foundation import XCTest import Foundation -@testable import tkey_mpc_swift +@testable import tkey import TorusUtils class tkey_baseTests: XCTestCase { - var torus = TorusUtils.init(clientId: "CLIENT ID") + var torus = TorusUtils.init(network: .sapphire(.SAPPHIRE_DEVNET), clientId: "CLIENT ID") override func setUp() async throws { let postbox_key = try! PrivateKey.generate() diff --git a/Tests/tkeypkgTests/tkey_pkgGenerateShareStoreResultTests.swift b/Tests/tkeypkgTests/tkey_pkgGenerateShareStoreResultTests.swift index 1834045..a15bfd3 100644 --- a/Tests/tkeypkgTests/tkey_pkgGenerateShareStoreResultTests.swift +++ b/Tests/tkeypkgTests/tkey_pkgGenerateShareStoreResultTests.swift @@ -1,6 +1,6 @@ import XCTest import Foundation -@testable import tkey_mpc_swift +@testable import tkey import Foundation final class tkey_pkgGenerateShareStoreResultTests: XCTestCase { diff --git a/Tests/tkeypkgTests/tkey_pkgKeyDetailsTest.swift b/Tests/tkeypkgTests/tkey_pkgKeyDetailsTest.swift index ed0777c..97d25ce 100644 --- a/Tests/tkeypkgTests/tkey_pkgKeyDetailsTest.swift +++ b/Tests/tkeypkgTests/tkey_pkgKeyDetailsTest.swift @@ -1,6 +1,6 @@ import XCTest import Foundation -@testable import tkey_mpc_swift +@testable import tkey import Foundation final class tkey_pkgKeyDetailsTests: XCTestCase { diff --git a/Tests/tkeypkgTests/tkey_pkgKeyPointArrayTests.swift b/Tests/tkeypkgTests/tkey_pkgKeyPointArrayTests.swift index 16992fc..ceebfeb 100644 --- a/Tests/tkeypkgTests/tkey_pkgKeyPointArrayTests.swift +++ b/Tests/tkeypkgTests/tkey_pkgKeyPointArrayTests.swift @@ -1,6 +1,6 @@ import XCTest import Foundation -@testable import tkey_mpc_swift +@testable import tkey import Foundation final class tkey_pkgKeyPointArrayTests: XCTestCase { diff --git a/Tests/tkeypkgTests/tkey_pkgKeyPointTests.swift b/Tests/tkeypkgTests/tkey_pkgKeyPointTests.swift index 7384f09..6404c9b 100644 --- a/Tests/tkeypkgTests/tkey_pkgKeyPointTests.swift +++ b/Tests/tkeypkgTests/tkey_pkgKeyPointTests.swift @@ -1,6 +1,6 @@ import XCTest import Foundation -@testable import tkey_mpc_swift +@testable import tkey import Foundation final class tkey_pkgKeyPointTests: XCTestCase { diff --git a/Tests/tkeypkgTests/tkey_pkgKeyReconstructionDetailsTests.swift b/Tests/tkeypkgTests/tkey_pkgKeyReconstructionDetailsTests.swift index bac4944..d7f781b 100644 --- a/Tests/tkeypkgTests/tkey_pkgKeyReconstructionDetailsTests.swift +++ b/Tests/tkeypkgTests/tkey_pkgKeyReconstructionDetailsTests.swift @@ -1,6 +1,6 @@ import XCTest import Foundation -@testable import tkey_mpc_swift +@testable import tkey import Foundation final class tkey_pkgKeyReconstructionDetailsTests: XCTestCase { diff --git a/Tests/tkeypkgTests/tkey_pkgLocalMetadataTransitionsTests.swift b/Tests/tkeypkgTests/tkey_pkgLocalMetadataTransitionsTests.swift index d74fc08..3a0f1a1 100644 --- a/Tests/tkeypkgTests/tkey_pkgLocalMetadataTransitionsTests.swift +++ b/Tests/tkeypkgTests/tkey_pkgLocalMetadataTransitionsTests.swift @@ -1,6 +1,6 @@ import XCTest import Foundation -@testable import tkey_mpc_swift +@testable import tkey import Foundation final class tkey_pkgLocalMetadataTransitionsTests: XCTestCase { diff --git a/Tests/tkeypkgTests/tkey_pkgMetadataTests.swift b/Tests/tkeypkgTests/tkey_pkgMetadataTests.swift index fb029cf..32a2e97 100644 --- a/Tests/tkeypkgTests/tkey_pkgMetadataTests.swift +++ b/Tests/tkeypkgTests/tkey_pkgMetadataTests.swift @@ -1,6 +1,6 @@ import XCTest import Foundation -@testable import tkey_mpc_swift +@testable import tkey import Foundation final class tkey_pkgMetadataTests: XCTestCase { diff --git a/Tests/tkeypkgTests/tkey_pkgNodeDetailsTests.swift b/Tests/tkeypkgTests/tkey_pkgNodeDetailsTests.swift index f325a4c..155d7b4 100644 --- a/Tests/tkeypkgTests/tkey_pkgNodeDetailsTests.swift +++ b/Tests/tkeypkgTests/tkey_pkgNodeDetailsTests.swift @@ -1,6 +1,6 @@ import XCTest import Foundation -@testable import tkey_mpc_swift +@testable import tkey import Foundation final class tkey_pkgNodeDetailsTests: XCTestCase { diff --git a/Tests/tkeypkgTests/tkey_pkgPolynomialTests.swift b/Tests/tkeypkgTests/tkey_pkgPolynomialTests.swift index 51372fe..5699833 100644 --- a/Tests/tkeypkgTests/tkey_pkgPolynomialTests.swift +++ b/Tests/tkeypkgTests/tkey_pkgPolynomialTests.swift @@ -1,6 +1,6 @@ import XCTest import Foundation -@testable import tkey_mpc_swift +@testable import tkey import Foundation final class tkey_pkgPolynomialTests: XCTestCase { diff --git a/Tests/tkeypkgTests/tkey_pkgPrivateKeyTests.swift b/Tests/tkeypkgTests/tkey_pkgPrivateKeyTests.swift index 2d33d73..6133b27 100644 --- a/Tests/tkeypkgTests/tkey_pkgPrivateKeyTests.swift +++ b/Tests/tkeypkgTests/tkey_pkgPrivateKeyTests.swift @@ -1,6 +1,6 @@ import XCTest import Foundation -@testable import tkey_mpc_swift +@testable import tkey import Foundation final class tkey_pkgPrivateKeyTests: XCTestCase { diff --git a/Tests/tkeypkgTests/tkey_pkgPublicPolynomialTests.swift b/Tests/tkeypkgTests/tkey_pkgPublicPolynomialTests.swift index 0a34349..f3a63e7 100644 --- a/Tests/tkeypkgTests/tkey_pkgPublicPolynomialTests.swift +++ b/Tests/tkeypkgTests/tkey_pkgPublicPolynomialTests.swift @@ -1,6 +1,6 @@ import XCTest import Foundation -@testable import tkey_mpc_swift +@testable import tkey import Foundation final class tkey_pkgPublicPolynomialTests: XCTestCase { diff --git a/Tests/tkeypkgTests/tkey_pkgServiceProviderTests.swift b/Tests/tkeypkgTests/tkey_pkgServiceProviderTests.swift index 07fdee9..03450ed 100644 --- a/Tests/tkeypkgTests/tkey_pkgServiceProviderTests.swift +++ b/Tests/tkeypkgTests/tkey_pkgServiceProviderTests.swift @@ -1,6 +1,6 @@ import XCTest import Foundation -@testable import tkey_mpc_swift +@testable import tkey import Foundation final class tkey_pkgServiceProviderTests: XCTestCase { diff --git a/Tests/tkeypkgTests/tkey_pkgShareStoreArrayTests.swift b/Tests/tkeypkgTests/tkey_pkgShareStoreArrayTests.swift index 0d65220..356f0e3 100644 --- a/Tests/tkeypkgTests/tkey_pkgShareStoreArrayTests.swift +++ b/Tests/tkeypkgTests/tkey_pkgShareStoreArrayTests.swift @@ -1,6 +1,6 @@ import XCTest import Foundation -@testable import tkey_mpc_swift +@testable import tkey import Foundation final class tkey_pkgShareStoreArrayTests: XCTestCase { diff --git a/Tests/tkeypkgTests/tkey_pkgShareStoreMapTests.swift b/Tests/tkeypkgTests/tkey_pkgShareStoreMapTests.swift index fbae2c3..93d0e14 100644 --- a/Tests/tkeypkgTests/tkey_pkgShareStoreMapTests.swift +++ b/Tests/tkeypkgTests/tkey_pkgShareStoreMapTests.swift @@ -1,6 +1,6 @@ import XCTest import Foundation -@testable import tkey_mpc_swift +@testable import tkey import Foundation final class tkey_pkgShareStoreMapTests: XCTestCase { diff --git a/Tests/tkeypkgTests/tkey_pkgShareStorePolyIdIndexMapTests.swift b/Tests/tkeypkgTests/tkey_pkgShareStorePolyIdIndexMapTests.swift index b49f9d2..7bcbdb3 100644 --- a/Tests/tkeypkgTests/tkey_pkgShareStorePolyIdIndexMapTests.swift +++ b/Tests/tkeypkgTests/tkey_pkgShareStorePolyIdIndexMapTests.swift @@ -1,6 +1,6 @@ import XCTest import Foundation -@testable import tkey_mpc_swift +@testable import tkey import Foundation final class tkey_pkgShareStorePolyIdIndexMapTests: XCTestCase { diff --git a/Tests/tkeypkgTests/tkey_pkgShareStoreTests.swift b/Tests/tkeypkgTests/tkey_pkgShareStoreTests.swift index be2a0ed..4e54bbf 100644 --- a/Tests/tkeypkgTests/tkey_pkgShareStoreTests.swift +++ b/Tests/tkeypkgTests/tkey_pkgShareStoreTests.swift @@ -1,6 +1,6 @@ import XCTest import Foundation -@testable import tkey_mpc_swift +@testable import tkey import Foundation final class tkey_pkgShareStoreTests: XCTestCase { diff --git a/Tests/tkeypkgTests/tkey_pkgStorageLayerTests.swift b/Tests/tkeypkgTests/tkey_pkgStorageLayerTests.swift index d52e46f..5556a63 100644 --- a/Tests/tkeypkgTests/tkey_pkgStorageLayerTests.swift +++ b/Tests/tkeypkgTests/tkey_pkgStorageLayerTests.swift @@ -1,6 +1,6 @@ import XCTest import Foundation -@testable import tkey_mpc_swift +@testable import tkey import Foundation final class tkey_pkgStorageLayerTests: XCTestCase { diff --git a/Tests/tkeypkgTests/tkey_pkgThresholdKeyTests.swift b/Tests/tkeypkgTests/tkey_pkgThresholdKeyTests.swift index 2a78f9d..e8ec7cb 100644 --- a/Tests/tkeypkgTests/tkey_pkgThresholdKeyTests.swift +++ b/Tests/tkeypkgTests/tkey_pkgThresholdKeyTests.swift @@ -1,6 +1,6 @@ import XCTest import Foundation -@testable import tkey_mpc_swift +@testable 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 ba34f43..0f8edb3 100644 --- a/Tests/tkeypkgTests/tkey_pkgTssOptionsTests.swift +++ b/Tests/tkeypkgTests/tkey_pkgTssOptionsTests.swift @@ -1,6 +1,6 @@ import XCTest import Foundation -@testable import tkey_mpc_swift +@testable import tkey import Foundation final class tkey_pkgTssOptionsTests: XCTestCase { diff --git a/Tests/tkeypkgTests/tkey_pkgVersionTests.swift b/Tests/tkeypkgTests/tkey_pkgVersionTests.swift index e3dbe46..0380a1e 100644 --- a/Tests/tkeypkgTests/tkey_pkgVersionTests.swift +++ b/Tests/tkeypkgTests/tkey_pkgVersionTests.swift @@ -1,6 +1,6 @@ import XCTest import Foundation -@testable import tkey_mpc_swift +@testable import tkey final class tkey_pkgVersionTests: XCTestCase { func test_library_version() { diff --git a/tkey-mpc-swift.podspec b/tkey-mpc-swift.podspec new file mode 100644 index 0000000..5a10b22 --- /dev/null +++ b/tkey-mpc-swift.podspec @@ -0,0 +1,15 @@ +Pod::Spec.new do |spec| + spec.name = "tkey-mpc-swift" + spec.version = "3.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/" + spec.license = { :type => 'BSD', :file => 'License.md' } + spec.swift_version = "5.3" + spec.author = { "Torus Labs" => "hello@tor.us" } + 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.source_files = "Sources/**/*.{swift,c,h}" +end diff --git a/tkey-rust-ios.podspec b/tkey-rust-ios.podspec deleted file mode 100644 index e568963..0000000 --- a/tkey-rust-ios.podspec +++ /dev/null @@ -1,14 +0,0 @@ -Pod::Spec.new do |spec| - spec.name = "tkey-rust-ios" - spec.version = "0.0.3" - spec.platform = :ios, "14.0" - spec.summary = "SDK allows you to create threshold key setup natively" - spec.homepage = "https://github.com/torusresearch/tkey-rust-ios" - spec.license = { :type => 'BSD', :file => 'License.md' } - spec.swift_version = "5.3" - spec.author = { "Torus Labs" => "rathishubham017@gmail.com" } - spec.module_name = "tkey" - spec.source = { :git => "https://github.com/torusresearch/tkey-rust-ios.git", :tag => spec.version } - spec.vendored_framework = "Sources/libtkey/libtkey.xcframework" - spec.source_files = "Sources/ThresholdKey/**/*.{swift}","Sources/libtkey/include/tkey.h" -end