Skip to content

Commit

Permalink
feat: update for cocoapods
Browse files Browse the repository at this point in the history
  • Loading branch information
metalurgical committed Apr 22, 2024
1 parent 0b1020f commit 4d52586
Show file tree
Hide file tree
Showing 9 changed files with 34 additions and 27 deletions.
11 changes: 11 additions & 0 deletions License.md
Original file line number Diff line number Diff line change
@@ -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.
15 changes: 7 additions & 8 deletions Package.swift
Original file line number Diff line number Diff line change
Expand Up @@ -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.0.3"),
// 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: [
Expand All @@ -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"
),
]
Expand Down
1 change: 0 additions & 1 deletion Sources/ThresholdKey/Modules/TssModule.swift
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ import Foundation
#if canImport(tkey)
import tkey
#endif
import CommonSources
import FetchNodeDetails
import TorusUtils

Expand Down
1 change: 0 additions & 1 deletion Sources/ThresholdKey/ServiceProvider.swift
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ import TorusUtils
import tkey
#endif
import FetchNodeDetails
import CommonSources

public final class ServiceProvider {
private(set) var pointer: OpaquePointer?
Expand Down
2 changes: 1 addition & 1 deletion Sources/ThresholdKey/ThresholdKey.swift
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import Foundation
#if canImport(tkey)
import tkey
#endif
import CommonSources
import FetchNodeDetails
import TorusUtils

public class ThresholdKey {
Expand Down
1 change: 0 additions & 1 deletion Tests/tkeypkgTests/IntegrationTests.swift
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
import CommonSources
import FetchNodeDetails
import Foundation
@testable import tkey_mpc_swift
Expand Down
2 changes: 1 addition & 1 deletion Tests/tkeypkgTests/tkey_base.swift
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ 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()
Expand Down
14 changes: 14 additions & 0 deletions tkey-mpc-swift.podspec
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
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" => "[email protected]" }
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.source_files = "Sources/**/*.{swift,c,h}"
end
14 changes: 0 additions & 14 deletions tkey-rust-ios.podspec

This file was deleted.

0 comments on commit 4d52586

Please sign in to comment.