Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: update cocoapods podspec #91

Merged
merged 9 commits into from
Apr 19, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 7 additions & 7 deletions Package.resolved
Original file line number Diff line number Diff line change
Expand Up @@ -23,26 +23,26 @@
"kind" : "remoteSourceControl",
"location" : "https://github.com/tkey/curvelib.swift",
"state" : {
"revision" : "2df9f638fd121b445ce3b410cd79ac4d0cfa94ed",
"version" : "1.0.0"
"revision" : "9f88bd5e56d1df443a908f7a7e81ae4f4d9170ea",
"version" : "1.0.1"
}
},
{
"identity" : "fetch-node-details-swift",
"kind" : "remoteSourceControl",
"location" : "https://github.com/torusresearch/fetch-node-details-swift",
"location" : "https://github.com/torusresearch/fetch-node-details-swift.git",
"state" : {
"revision" : "bf2f0759da5c5c80765773b08c2756045edf608f",
"version" : "5.2.0"
"revision" : "6d9b100321cbca8abf70d378236d4e3c45e3f2cb",
"version" : "6.0.0"
}
},
{
"identity" : "jwt-kit",
"kind" : "remoteSourceControl",
"location" : "https://github.com/vapor/jwt-kit",
"state" : {
"revision" : "c2595b9ad7f512d7f334830b4df1fed6e917946a",
"version" : "4.13.4"
"revision" : "e05513b5aec24f88012b6e3034115b6bc915356a",
"version" : "4.13.2"
}
},
{
Expand Down
4 changes: 2 additions & 2 deletions Package.swift
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@ let package = Package(
targets: ["TorusUtils"])
],
dependencies: [
.package(url: "https://github.com/tkey/curvelib.swift", from: "1.0.0"),
.package(url: "https://github.com/torusresearch/fetch-node-details-swift", from: "5.2.0"),
.package(url: "https://github.com/tkey/curvelib.swift", from: "1.0.1"),
.package(url: "https://github.com/torusresearch/fetch-node-details-swift", from: "6.0.0"),
.package(url: "https://github.com/vapor/jwt-kit", from: "4.0.0"),
.package(
url: "https://github.com/Flight-School/AnyCodable",
Expand Down
2 changes: 0 additions & 2 deletions Sources/TorusUtils/AbstractTorusUtils.swift
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
//import BigInt
import CommonSources
import BigInt
import FetchNodeDetails
import Foundation
Expand Down
7 changes: 2 additions & 5 deletions Sources/TorusUtils/Extensions/TorusUtils+extension.swift
Original file line number Diff line number Diff line change
@@ -1,10 +1,7 @@
import Foundation
#if canImport(curveSecp256k1)
import curveSecp256k1
#endif
import curveSecp256k1
import AnyCodable
import BigInt
import CommonSources
import CryptoKit
import FetchNodeDetails
import OSLog
Expand Down Expand Up @@ -1204,7 +1201,7 @@ extension TorusUtils {
internal func getPublicKeyPointFromPubkeyString(pubKey: String) throws -> (String, String) {
let publicKeyHashData = Data(hex: pubKey.strip04Prefix())
if !(publicKeyHashData.count == 64) {
throw "Invalid address,"
throw TorusUtilError.invalidKeySize
}

let xCoordinateData = publicKeyHashData.prefix(32).toHexString()
Expand Down
2 changes: 1 addition & 1 deletion Sources/TorusUtils/Interfaces/TorusConstants.swift
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import BigInt
import CommonSources
import FetchNodeDetails
import Foundation

enum TORUS_SAPPHIRE_NETWORK_TYPE {
Expand Down
5 changes: 2 additions & 3 deletions Sources/TorusUtils/TorusUtils.swift
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import BigInt
import CommonSources
import FetchNodeDetails
import Foundation
import OSLog
Expand Down Expand Up @@ -76,8 +75,8 @@ open class TorusUtils: AbstractTorusUtils {
let result = try await session.data(for: allowHostRequest)
let responseData = try JSONDecoder().decode(AllowSuccess.self, from: result.0)
if (responseData.success == false ) {
let errorData = try JSONDecoder().decode(AllowRejected.self, from: result.0)
throw "code: \(errorData.code), error: \(errorData.error)"
let _ = try JSONDecoder().decode(AllowRejected.self, from: result.0)
// throw "code: \(errorData.code), error: \(errorData.error)"
}
} catch {
os_log("retrieveShares: signer allow: %@", log: getTorusLogger(log: TorusUtilsLogger.core, type: .error), type: .error, error.localizedDescription)
Expand Down
1 change: 0 additions & 1 deletion Tests/TorusUtilsTests/AquaTest.swift
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import BigInt
import CommonSources
import FetchNodeDetails
import JWTKit
import XCTest
Expand Down
1 change: 0 additions & 1 deletion Tests/TorusUtilsTests/CyanTest.swift
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import BigInt
import CommonSources
import FetchNodeDetails
import JWTKit
import XCTest
Expand Down
2 changes: 0 additions & 2 deletions Tests/TorusUtilsTests/IntegrationTest.swift
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,6 @@ import FetchNodeDetails
import JWTKit
import XCTest

import CommonSources

@testable import TorusUtils

class IntegrationTests: XCTestCase {
Expand Down
2 changes: 0 additions & 2 deletions Tests/TorusUtilsTests/MainnetTest.swift
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,6 @@ import FetchNodeDetails
import JWTKit
import XCTest

import CommonSources

@testable import TorusUtils

class MainnetTests: XCTestCase {
Expand Down
1 change: 0 additions & 1 deletion Tests/TorusUtilsTests/SapphireTest.swift
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ import FetchNodeDetails
import JWTKit
import XCTest
import curveSecp256k1
import CommonSources

@testable import TorusUtils

Expand Down
2 changes: 0 additions & 2 deletions Tests/TorusUtilsTests/StubURLProtocolTest.swift
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,6 @@ import OSLog
import TorusUtils
import XCTest

import CommonSources

final class StubURLProtocolTests: XCTestCase {}

public class StubMockTorusUtils: TorusUtils {
Expand Down
1 change: 0 additions & 1 deletion Tests/TorusUtilsTests/TestnetTest.swift
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import BigInt
import CommonSources
import FetchNodeDetails
import JWTKit
import XCTest
Expand Down
1 change: 0 additions & 1 deletion Tests/TorusUtilsTests/Utils/MockTorusUtils.swift
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import BigInt
import CommonSources
import FetchNodeDetails
import Foundation
import TorusUtils
Expand Down
1 change: 0 additions & 1 deletion Tests/TorusUtilsTests/oneKeyTest.swift
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import BigInt
import CommonSources
import FetchNodeDetails
import JWTKit
import XCTest
Expand Down
8 changes: 4 additions & 4 deletions Torus-utils.podspec
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
Pod::Spec.new do |spec|
spec.name = "Torus-utils"
spec.version = "5.0.0"
spec.version = "8.0.3"
spec.ios.deployment_target = "13.0"
spec.summary = "Retrieve user shares"
spec.homepage = "https://github.com/torusresearch/torus-utils-swift"
Expand All @@ -10,7 +10,7 @@ Pod::Spec.new do |spec|
spec.module_name = "TorusUtils"
spec.source = { :git => "https://github.com/torusresearch/torus-utils-swift.git", :tag => spec.version }
spec.source_files = "Sources/TorusUtils/*.{swift,json}","Sources/TorusUtils/**/*.{swift,json}"
spec.dependency 'Torus-fetchNodeDetails', '~> 4.0.0'
spec.dependency 'CryptoSwift', '~> 1.5.1'
spec.dependency 'secp256k1.swift', '~> 0.1.4'
spec.dependency 'Torus-fetchNodeDetails', '~> 6.0.0'
spec.dependency 'curvelib.swift', '~> 1.0.1'
spec.dependency 'AnyCodable-FlightSchool', '~> 0.6.0'
end
45 changes: 18 additions & 27 deletions cocoapods/Podfile.lock
Original file line number Diff line number Diff line change
@@ -1,44 +1,35 @@
PODS:
- BigInt (5.0.0)
- CryptoSwift (1.5.1)
- GenericJSON (2.0.2)
- secp256k1.swift (0.1.4)
- Torus-fetchNodeDetails (4.0.1):
- web3.swift (~> 0.9.3)
- Torus-utils (4.0.0):
- CryptoSwift (~> 1.5.1)
- secp256k1.swift (~> 0.1.4)
- Torus-fetchNodeDetails (~> 4.0.0)
- web3.swift (0.9.3):
- BigInt (~> 5.0.0)
- GenericJSON (~> 2.0)
- secp256k1.swift (~> 0.1)
- AnyCodable-FlightSchool (0.6.7)
- BigInt (5.2.0)
- curvelib.swift (1.0.1)
- Torus-fetchNodeDetails (6.0.0):
- BigInt (~> 5.2.0)
- Torus-utils (8.0.3):
- AnyCodable-FlightSchool (~> 0.6.0)
- curvelib.swift (~> 1.0.1)
- Torus-fetchNodeDetails (~> 6.0.0)

DEPENDENCIES:
- Torus-utils (from `../`)

SPEC REPOS:
https://github.com/CocoaPods/Specs.git:
- AnyCodable-FlightSchool
- BigInt
- CryptoSwift
- GenericJSON
- secp256k1.swift
- curvelib.swift
- Torus-fetchNodeDetails
- web3.swift

EXTERNAL SOURCES:
Torus-utils:
:path: "../"

SPEC CHECKSUMS:
BigInt: 74b4d88367b0e819d9f77393549226d36faeb0d8
CryptoSwift: c4f2debceb38bf44c80659afe009f71e23e4a082
GenericJSON: 79a840eeb77030962e8cf02a62d36bd413b67626
secp256k1.swift: a7e7a214f6db6ce5db32cc6b2b45e5c4dd633634
Torus-fetchNodeDetails: a92d02f1bfe91bd61c90f92d64df023babaa5bfa
Torus-utils: 2517d21b0bc84759fc2cd9617761ce9083e8ee2c
web3.swift: c6c3bf1f853743f8a7a58d263e5f7e46545e22c7
AnyCodable-FlightSchool: 261cbe76757802b17d471b9059b21e6fa5edf57b
BigInt: f668a80089607f521586bbe29513d708491ef2f7
curvelib.swift: d0746ae82bee34016c06da3567a97e493b3c979f
Torus-fetchNodeDetails: e27940bc2151f80b76e3732987a52ea802eb34be
Torus-utils: ce29be461bc6ae9a946d23188d1d3a50bfa4c667

PODFILE CHECKSUM: 9e74ec64413946e46948113d1a431b427cad7612
PODFILE CHECKSUM: 2d35466879f2d32f53c6ccbca958796c381f0e62

COCOAPODS: 1.11.3
COCOAPODS: 1.13.0
Loading