From dc7b3b3250cc7d398e1ad9b7acc211d2d24dd1c8 Mon Sep 17 00:00:00 2001 From: metalurgical <97008724+metalurgical@users.noreply.github.com> Date: Thu, 18 Apr 2024 10:45:06 +0200 Subject: [PATCH 1/9] feat: add podspec for cocoapods --- Package.resolved | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Package.resolved b/Package.resolved index 5c722eef..041617d4 100644 --- a/Package.resolved +++ b/Package.resolved @@ -30,7 +30,7 @@ { "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" @@ -41,8 +41,8 @@ "kind" : "remoteSourceControl", "location" : "https://github.com/vapor/jwt-kit", "state" : { - "revision" : "c2595b9ad7f512d7f334830b4df1fed6e917946a", - "version" : "4.13.4" + "revision" : "e05513b5aec24f88012b6e3034115b6bc915356a", + "version" : "4.13.2" } }, { From 978dcb0c3c6e70e4a575d6968b4215f1ed48257b Mon Sep 17 00:00:00 2001 From: metalurgical <97008724+metalurgical@users.noreply.github.com> Date: Thu, 18 Apr 2024 13:28:39 +0200 Subject: [PATCH 2/9] feat: update cocoapods --- Sources/TorusUtils/AbstractTorusUtils.swift | 5 ++- .../Extensions/TorusUtils+extension.swift | 4 +- .../Interfaces/TorusConstants.swift | 4 +- Sources/TorusUtils/TorusUtils.swift | 4 +- Tests/TorusUtilsTests/AquaTest.swift | 4 +- Tests/TorusUtilsTests/CyanTest.swift | 4 +- Tests/TorusUtilsTests/IntegrationTest.swift | 4 +- Tests/TorusUtilsTests/MainnetTest.swift | 4 +- Tests/TorusUtilsTests/SapphireTest.swift | 4 +- .../TorusUtilsTests/StubURLProtocolTest.swift | 4 +- Tests/TorusUtilsTests/TestnetTest.swift | 4 +- .../Utils/MockTorusUtils.swift | 4 +- Tests/TorusUtilsTests/oneKeyTest.swift | 4 +- Torus-utils.podspec | 7 ++-- cocoapods/Podfile.lock | 42 +++++++------------ 15 files changed, 57 insertions(+), 45 deletions(-) diff --git a/Sources/TorusUtils/AbstractTorusUtils.swift b/Sources/TorusUtils/AbstractTorusUtils.swift index ffcacf8a..42cc840b 100644 --- a/Sources/TorusUtils/AbstractTorusUtils.swift +++ b/Sources/TorusUtils/AbstractTorusUtils.swift @@ -1,5 +1,6 @@ -//import BigInt -import CommonSources +#if canImport(CommonSources) + import CommonSources +#endif import BigInt import FetchNodeDetails import Foundation diff --git a/Sources/TorusUtils/Extensions/TorusUtils+extension.swift b/Sources/TorusUtils/Extensions/TorusUtils+extension.swift index 333913a5..e2543aad 100644 --- a/Sources/TorusUtils/Extensions/TorusUtils+extension.swift +++ b/Sources/TorusUtils/Extensions/TorusUtils+extension.swift @@ -4,7 +4,9 @@ import Foundation #endif import AnyCodable import BigInt -import CommonSources +#if canImport(CommonSources) + import CommonSources +#endif import CryptoKit import FetchNodeDetails import OSLog diff --git a/Sources/TorusUtils/Interfaces/TorusConstants.swift b/Sources/TorusUtils/Interfaces/TorusConstants.swift index 6c4b5a8c..74fd8d8f 100644 --- a/Sources/TorusUtils/Interfaces/TorusConstants.swift +++ b/Sources/TorusUtils/Interfaces/TorusConstants.swift @@ -1,5 +1,7 @@ import BigInt -import CommonSources +#if canImport(CommonSources) + import CommonSources +#endif import Foundation enum TORUS_SAPPHIRE_NETWORK_TYPE { diff --git a/Sources/TorusUtils/TorusUtils.swift b/Sources/TorusUtils/TorusUtils.swift index 06ba7d2c..02a5271c 100644 --- a/Sources/TorusUtils/TorusUtils.swift +++ b/Sources/TorusUtils/TorusUtils.swift @@ -1,5 +1,7 @@ import BigInt -import CommonSources +#if canImport(CommonSources) + import CommonSources +#endif import FetchNodeDetails import Foundation import OSLog diff --git a/Tests/TorusUtilsTests/AquaTest.swift b/Tests/TorusUtilsTests/AquaTest.swift index 930af24d..e4c22390 100644 --- a/Tests/TorusUtilsTests/AquaTest.swift +++ b/Tests/TorusUtilsTests/AquaTest.swift @@ -1,5 +1,7 @@ import BigInt -import CommonSources +#if canImport(CommonSources) + import CommonSources +#endif import FetchNodeDetails import JWTKit import XCTest diff --git a/Tests/TorusUtilsTests/CyanTest.swift b/Tests/TorusUtilsTests/CyanTest.swift index 25df03f2..012ab040 100644 --- a/Tests/TorusUtilsTests/CyanTest.swift +++ b/Tests/TorusUtilsTests/CyanTest.swift @@ -1,5 +1,7 @@ import BigInt -import CommonSources +#if canImport(CommonSources) + import CommonSources +#endif import FetchNodeDetails import JWTKit import XCTest diff --git a/Tests/TorusUtilsTests/IntegrationTest.swift b/Tests/TorusUtilsTests/IntegrationTest.swift index bdfeee14..d7a42746 100644 --- a/Tests/TorusUtilsTests/IntegrationTest.swift +++ b/Tests/TorusUtilsTests/IntegrationTest.swift @@ -3,7 +3,9 @@ import FetchNodeDetails import JWTKit import XCTest -import CommonSources +#if canImport(CommonSources) + import CommonSources +#endif @testable import TorusUtils diff --git a/Tests/TorusUtilsTests/MainnetTest.swift b/Tests/TorusUtilsTests/MainnetTest.swift index d4b6fe37..b35bbf59 100644 --- a/Tests/TorusUtilsTests/MainnetTest.swift +++ b/Tests/TorusUtilsTests/MainnetTest.swift @@ -3,7 +3,9 @@ import FetchNodeDetails import JWTKit import XCTest -import CommonSources +#if canImport(CommonSources) + import CommonSources +#endif @testable import TorusUtils diff --git a/Tests/TorusUtilsTests/SapphireTest.swift b/Tests/TorusUtilsTests/SapphireTest.swift index e8e6325a..a8cfb6be 100644 --- a/Tests/TorusUtilsTests/SapphireTest.swift +++ b/Tests/TorusUtilsTests/SapphireTest.swift @@ -3,7 +3,9 @@ import FetchNodeDetails import JWTKit import XCTest import curveSecp256k1 -import CommonSources +#if canImport(CommonSources) + import CommonSources +#endif @testable import TorusUtils diff --git a/Tests/TorusUtilsTests/StubURLProtocolTest.swift b/Tests/TorusUtilsTests/StubURLProtocolTest.swift index d61e88e1..ec57f76b 100644 --- a/Tests/TorusUtilsTests/StubURLProtocolTest.swift +++ b/Tests/TorusUtilsTests/StubURLProtocolTest.swift @@ -4,7 +4,9 @@ import OSLog import TorusUtils import XCTest -import CommonSources +#if canImport(CommonSources) + import CommonSources +#endif final class StubURLProtocolTests: XCTestCase {} diff --git a/Tests/TorusUtilsTests/TestnetTest.swift b/Tests/TorusUtilsTests/TestnetTest.swift index 5d318ea7..20287182 100644 --- a/Tests/TorusUtilsTests/TestnetTest.swift +++ b/Tests/TorusUtilsTests/TestnetTest.swift @@ -1,5 +1,7 @@ import BigInt -import CommonSources +#if canImport(CommonSources) + import CommonSources +#endif import FetchNodeDetails import JWTKit import XCTest diff --git a/Tests/TorusUtilsTests/Utils/MockTorusUtils.swift b/Tests/TorusUtilsTests/Utils/MockTorusUtils.swift index 23a1fe28..ef1503f7 100644 --- a/Tests/TorusUtilsTests/Utils/MockTorusUtils.swift +++ b/Tests/TorusUtilsTests/Utils/MockTorusUtils.swift @@ -1,5 +1,7 @@ import BigInt -import CommonSources +#if canImport(CommonSources) + import CommonSources +#endif import FetchNodeDetails import Foundation import TorusUtils diff --git a/Tests/TorusUtilsTests/oneKeyTest.swift b/Tests/TorusUtilsTests/oneKeyTest.swift index 7df55ed5..2c3f6e78 100644 --- a/Tests/TorusUtilsTests/oneKeyTest.swift +++ b/Tests/TorusUtilsTests/oneKeyTest.swift @@ -1,5 +1,7 @@ import BigInt -import CommonSources +#if canImport(CommonSources) + import CommonSources +#endif import FetchNodeDetails import JWTKit import XCTest diff --git a/Torus-utils.podspec b/Torus-utils.podspec index 8d1a860c..7aa1efb6 100644 --- a/Torus-utils.podspec +++ b/Torus-utils.podspec @@ -1,6 +1,6 @@ Pod::Spec.new do |spec| spec.name = "Torus-utils" - spec.version = "5.0.0" + spec.version = "8.0.2" spec.ios.deployment_target = "13.0" spec.summary = "Retrieve user shares" spec.homepage = "https://github.com/torusresearch/torus-utils-swift" @@ -10,7 +10,6 @@ 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', '~> 5.2.0' + spec.dependency 'curvelib.swift', '~> 1.0.0' end diff --git a/cocoapods/Podfile.lock b/cocoapods/Podfile.lock index 45d8c3a3..f2852ecd 100644 --- a/cocoapods/Podfile.lock +++ b/cocoapods/Podfile.lock @@ -1,18 +1,11 @@ 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) + - BigInt (5.2.0) + - curvelib.swift (1.0.0) + - Torus-fetchNodeDetails (5.2.0): + - BigInt (~> 5.2.0) + - Torus-utils (5.0.0): + - curvelib.swift (~> 1.0.0) + - Torus-fetchNodeDetails (~> 5.2.0) DEPENDENCIES: - Torus-utils (from `../`) @@ -20,25 +13,20 @@ DEPENDENCIES: SPEC REPOS: https://github.com/CocoaPods/Specs.git: - BigInt - - CryptoSwift - - GenericJSON - - secp256k1.swift - Torus-fetchNodeDetails - - web3.swift + https://github.com/metalurgical/podspec: + - curvelib.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 + BigInt: f668a80089607f521586bbe29513d708491ef2f7 + curvelib.swift: eb18aab93231777ee546553f4c617dc119d5ab20 + Torus-fetchNodeDetails: aa6b8df4466254200ed002a400f276c2bfdf5466 + Torus-utils: 16059df76c676e017a98ac809325690ae96ce251 -PODFILE CHECKSUM: 9e74ec64413946e46948113d1a431b427cad7612 +PODFILE CHECKSUM: a0fe07b86376ff1e4c07c01b972b2b222c71a8a0 -COCOAPODS: 1.11.3 +COCOAPODS: 1.13.0 From e87b2bf8ba005a2d1b8d6463c44ad7bf16ddf3a3 Mon Sep 17 00:00:00 2001 From: metalurgical <97008724+metalurgical@users.noreply.github.com> Date: Thu, 18 Apr 2024 13:29:00 +0200 Subject: [PATCH 3/9] Update Torus-utils.podspec --- Torus-utils.podspec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Torus-utils.podspec b/Torus-utils.podspec index 7aa1efb6..7d2731f1 100644 --- a/Torus-utils.podspec +++ b/Torus-utils.podspec @@ -1,6 +1,6 @@ Pod::Spec.new do |spec| spec.name = "Torus-utils" - spec.version = "8.0.2" + 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" From f07b62abd1e43853363635bf30b32ffbb80ee1fa Mon Sep 17 00:00:00 2001 From: metalurgical <97008724+metalurgical@users.noreply.github.com> Date: Thu, 18 Apr 2024 13:31:12 +0200 Subject: [PATCH 4/9] update --- Torus-utils.podspec | 1 + cocoapods/Podfile.lock | 10 +++++++--- 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/Torus-utils.podspec b/Torus-utils.podspec index 7d2731f1..22beb7a6 100644 --- a/Torus-utils.podspec +++ b/Torus-utils.podspec @@ -12,4 +12,5 @@ Pod::Spec.new do |spec| spec.source_files = "Sources/TorusUtils/*.{swift,json}","Sources/TorusUtils/**/*.{swift,json}" spec.dependency 'Torus-fetchNodeDetails', '~> 5.2.0' spec.dependency 'curvelib.swift', '~> 1.0.0' + spec.dependency 'AnyCodable-FlightSchool', '~> 0.6.0' end diff --git a/cocoapods/Podfile.lock b/cocoapods/Podfile.lock index f2852ecd..24d0b81d 100644 --- a/cocoapods/Podfile.lock +++ b/cocoapods/Podfile.lock @@ -1,9 +1,11 @@ PODS: + - AnyCodable-FlightSchool (0.6.7) - BigInt (5.2.0) - curvelib.swift (1.0.0) - Torus-fetchNodeDetails (5.2.0): - BigInt (~> 5.2.0) - - Torus-utils (5.0.0): + - Torus-utils (8.0.3): + - AnyCodable-FlightSchool (~> 0.6.0) - curvelib.swift (~> 1.0.0) - Torus-fetchNodeDetails (~> 5.2.0) @@ -12,6 +14,7 @@ DEPENDENCIES: SPEC REPOS: https://github.com/CocoaPods/Specs.git: + - AnyCodable-FlightSchool - BigInt - Torus-fetchNodeDetails https://github.com/metalurgical/podspec: @@ -22,11 +25,12 @@ EXTERNAL SOURCES: :path: "../" SPEC CHECKSUMS: + AnyCodable-FlightSchool: 261cbe76757802b17d471b9059b21e6fa5edf57b BigInt: f668a80089607f521586bbe29513d708491ef2f7 curvelib.swift: eb18aab93231777ee546553f4c617dc119d5ab20 Torus-fetchNodeDetails: aa6b8df4466254200ed002a400f276c2bfdf5466 - Torus-utils: 16059df76c676e017a98ac809325690ae96ce251 + Torus-utils: 9dbf942eee9ec25ea1708710635d2584b8c470f1 -PODFILE CHECKSUM: a0fe07b86376ff1e4c07c01b972b2b222c71a8a0 +PODFILE CHECKSUM: 2d35466879f2d32f53c6ccbca958796c381f0e62 COCOAPODS: 1.13.0 From b18ff77bc1c9a106ae27a333f61a5cb1460bfd41 Mon Sep 17 00:00:00 2001 From: metalurgical <97008724+metalurgical@users.noreply.github.com> Date: Thu, 18 Apr 2024 13:31:29 +0200 Subject: [PATCH 5/9] Update Torus-utils.podspec --- Torus-utils.podspec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Torus-utils.podspec b/Torus-utils.podspec index 22beb7a6..ce43cde4 100644 --- a/Torus-utils.podspec +++ b/Torus-utils.podspec @@ -1,6 +1,6 @@ Pod::Spec.new do |spec| spec.name = "Torus-utils" - spec.version = "8.0.3" + spec.version = "8.0.4" spec.ios.deployment_target = "13.0" spec.summary = "Retrieve user shares" spec.homepage = "https://github.com/torusresearch/torus-utils-swift" From 11988e04d183d89eee57190ebacbdfd6c78fb949 Mon Sep 17 00:00:00 2001 From: metalurgical <97008724+metalurgical@users.noreply.github.com> Date: Thu, 18 Apr 2024 13:43:49 +0200 Subject: [PATCH 6/9] update --- Sources/TorusUtils/Interfaces/TorusConstants.swift | 1 + Torus-utils.podspec | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/Sources/TorusUtils/Interfaces/TorusConstants.swift b/Sources/TorusUtils/Interfaces/TorusConstants.swift index 74fd8d8f..789c3a8b 100644 --- a/Sources/TorusUtils/Interfaces/TorusConstants.swift +++ b/Sources/TorusUtils/Interfaces/TorusConstants.swift @@ -1,4 +1,5 @@ import BigInt +import FetchNodeDetails #if canImport(CommonSources) import CommonSources #endif diff --git a/Torus-utils.podspec b/Torus-utils.podspec index ce43cde4..345edfa3 100644 --- a/Torus-utils.podspec +++ b/Torus-utils.podspec @@ -1,6 +1,6 @@ Pod::Spec.new do |spec| spec.name = "Torus-utils" - spec.version = "8.0.4" + spec.version = "8.0.5" spec.ios.deployment_target = "13.0" spec.summary = "Retrieve user shares" spec.homepage = "https://github.com/torusresearch/torus-utils-swift" From b2e598e444747a497d1310e9cfc63249679939f9 Mon Sep 17 00:00:00 2001 From: metalurgical <97008724+metalurgical@users.noreply.github.com> Date: Thu, 18 Apr 2024 13:48:23 +0200 Subject: [PATCH 7/9] update --- Sources/TorusUtils/Extensions/TorusUtils+extension.swift | 2 +- Sources/TorusUtils/TorusUtils.swift | 4 ++-- Torus-utils.podspec | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/Sources/TorusUtils/Extensions/TorusUtils+extension.swift b/Sources/TorusUtils/Extensions/TorusUtils+extension.swift index e2543aad..32fd24d3 100644 --- a/Sources/TorusUtils/Extensions/TorusUtils+extension.swift +++ b/Sources/TorusUtils/Extensions/TorusUtils+extension.swift @@ -1206,7 +1206,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() diff --git a/Sources/TorusUtils/TorusUtils.swift b/Sources/TorusUtils/TorusUtils.swift index 02a5271c..7ed922a1 100644 --- a/Sources/TorusUtils/TorusUtils.swift +++ b/Sources/TorusUtils/TorusUtils.swift @@ -78,8 +78,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) diff --git a/Torus-utils.podspec b/Torus-utils.podspec index 345edfa3..bfe137c3 100644 --- a/Torus-utils.podspec +++ b/Torus-utils.podspec @@ -1,6 +1,6 @@ Pod::Spec.new do |spec| spec.name = "Torus-utils" - spec.version = "8.0.5" + spec.version = "8.0.6" spec.ios.deployment_target = "13.0" spec.summary = "Retrieve user shares" spec.homepage = "https://github.com/torusresearch/torus-utils-swift" From 8ad5abef76a58f69840be953ff7e175d51c22127 Mon Sep 17 00:00:00 2001 From: metalurgical <97008724+metalurgical@users.noreply.github.com> Date: Fri, 19 Apr 2024 08:40:14 +0200 Subject: [PATCH 8/9] cleanup --- Package.resolved | 8 ++++---- Package.swift | 4 ++-- Sources/TorusUtils/AbstractTorusUtils.swift | 3 --- Sources/TorusUtils/Extensions/TorusUtils+extension.swift | 7 +------ Sources/TorusUtils/Interfaces/TorusConstants.swift | 3 --- Sources/TorusUtils/TorusUtils.swift | 3 --- Tests/TorusUtilsTests/AquaTest.swift | 3 --- Tests/TorusUtilsTests/CyanTest.swift | 3 --- Tests/TorusUtilsTests/IntegrationTest.swift | 4 ---- Tests/TorusUtilsTests/MainnetTest.swift | 4 ---- Tests/TorusUtilsTests/SapphireTest.swift | 3 --- Tests/TorusUtilsTests/StubURLProtocolTest.swift | 4 ---- Tests/TorusUtilsTests/TestnetTest.swift | 3 --- Tests/TorusUtilsTests/Utils/MockTorusUtils.swift | 3 --- Tests/TorusUtilsTests/oneKeyTest.swift | 3 --- Torus-utils.podspec | 6 +++--- 16 files changed, 10 insertions(+), 54 deletions(-) diff --git a/Package.resolved b/Package.resolved index 041617d4..5987e702 100644 --- a/Package.resolved +++ b/Package.resolved @@ -23,8 +23,8 @@ "kind" : "remoteSourceControl", "location" : "https://github.com/tkey/curvelib.swift", "state" : { - "revision" : "2df9f638fd121b445ce3b410cd79ac4d0cfa94ed", - "version" : "1.0.0" + "revision" : "9f88bd5e56d1df443a908f7a7e81ae4f4d9170ea", + "version" : "1.0.1" } }, { @@ -32,8 +32,8 @@ "kind" : "remoteSourceControl", "location" : "https://github.com/torusresearch/fetch-node-details-swift.git", "state" : { - "revision" : "bf2f0759da5c5c80765773b08c2756045edf608f", - "version" : "5.2.0" + "revision" : "6d9b100321cbca8abf70d378236d4e3c45e3f2cb", + "version" : "6.0.0" } }, { diff --git a/Package.swift b/Package.swift index c0123670..f373520b 100644 --- a/Package.swift +++ b/Package.swift @@ -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", diff --git a/Sources/TorusUtils/AbstractTorusUtils.swift b/Sources/TorusUtils/AbstractTorusUtils.swift index 42cc840b..d22f90a8 100644 --- a/Sources/TorusUtils/AbstractTorusUtils.swift +++ b/Sources/TorusUtils/AbstractTorusUtils.swift @@ -1,6 +1,3 @@ -#if canImport(CommonSources) - import CommonSources -#endif import BigInt import FetchNodeDetails import Foundation diff --git a/Sources/TorusUtils/Extensions/TorusUtils+extension.swift b/Sources/TorusUtils/Extensions/TorusUtils+extension.swift index 32fd24d3..b01e1eda 100644 --- a/Sources/TorusUtils/Extensions/TorusUtils+extension.swift +++ b/Sources/TorusUtils/Extensions/TorusUtils+extension.swift @@ -1,12 +1,7 @@ import Foundation -#if canImport(curveSecp256k1) - import curveSecp256k1 -#endif +import curveSecp256k1 import AnyCodable import BigInt -#if canImport(CommonSources) - import CommonSources -#endif import CryptoKit import FetchNodeDetails import OSLog diff --git a/Sources/TorusUtils/Interfaces/TorusConstants.swift b/Sources/TorusUtils/Interfaces/TorusConstants.swift index 789c3a8b..4b8bb4fc 100644 --- a/Sources/TorusUtils/Interfaces/TorusConstants.swift +++ b/Sources/TorusUtils/Interfaces/TorusConstants.swift @@ -1,8 +1,5 @@ import BigInt import FetchNodeDetails -#if canImport(CommonSources) - import CommonSources -#endif import Foundation enum TORUS_SAPPHIRE_NETWORK_TYPE { diff --git a/Sources/TorusUtils/TorusUtils.swift b/Sources/TorusUtils/TorusUtils.swift index 7ed922a1..03c5f5c6 100644 --- a/Sources/TorusUtils/TorusUtils.swift +++ b/Sources/TorusUtils/TorusUtils.swift @@ -1,7 +1,4 @@ import BigInt -#if canImport(CommonSources) - import CommonSources -#endif import FetchNodeDetails import Foundation import OSLog diff --git a/Tests/TorusUtilsTests/AquaTest.swift b/Tests/TorusUtilsTests/AquaTest.swift index e4c22390..bd61e8ff 100644 --- a/Tests/TorusUtilsTests/AquaTest.swift +++ b/Tests/TorusUtilsTests/AquaTest.swift @@ -1,7 +1,4 @@ import BigInt -#if canImport(CommonSources) - import CommonSources -#endif import FetchNodeDetails import JWTKit import XCTest diff --git a/Tests/TorusUtilsTests/CyanTest.swift b/Tests/TorusUtilsTests/CyanTest.swift index 012ab040..0c90aae4 100644 --- a/Tests/TorusUtilsTests/CyanTest.swift +++ b/Tests/TorusUtilsTests/CyanTest.swift @@ -1,7 +1,4 @@ import BigInt -#if canImport(CommonSources) - import CommonSources -#endif import FetchNodeDetails import JWTKit import XCTest diff --git a/Tests/TorusUtilsTests/IntegrationTest.swift b/Tests/TorusUtilsTests/IntegrationTest.swift index d7a42746..d8ed3f3e 100644 --- a/Tests/TorusUtilsTests/IntegrationTest.swift +++ b/Tests/TorusUtilsTests/IntegrationTest.swift @@ -3,10 +3,6 @@ import FetchNodeDetails import JWTKit import XCTest -#if canImport(CommonSources) - import CommonSources -#endif - @testable import TorusUtils class IntegrationTests: XCTestCase { diff --git a/Tests/TorusUtilsTests/MainnetTest.swift b/Tests/TorusUtilsTests/MainnetTest.swift index b35bbf59..3c42bd74 100644 --- a/Tests/TorusUtilsTests/MainnetTest.swift +++ b/Tests/TorusUtilsTests/MainnetTest.swift @@ -3,10 +3,6 @@ import FetchNodeDetails import JWTKit import XCTest -#if canImport(CommonSources) - import CommonSources -#endif - @testable import TorusUtils class MainnetTests: XCTestCase { diff --git a/Tests/TorusUtilsTests/SapphireTest.swift b/Tests/TorusUtilsTests/SapphireTest.swift index a8cfb6be..2095b628 100644 --- a/Tests/TorusUtilsTests/SapphireTest.swift +++ b/Tests/TorusUtilsTests/SapphireTest.swift @@ -3,9 +3,6 @@ import FetchNodeDetails import JWTKit import XCTest import curveSecp256k1 -#if canImport(CommonSources) - import CommonSources -#endif @testable import TorusUtils diff --git a/Tests/TorusUtilsTests/StubURLProtocolTest.swift b/Tests/TorusUtilsTests/StubURLProtocolTest.swift index ec57f76b..4b48764f 100644 --- a/Tests/TorusUtilsTests/StubURLProtocolTest.swift +++ b/Tests/TorusUtilsTests/StubURLProtocolTest.swift @@ -4,10 +4,6 @@ import OSLog import TorusUtils import XCTest -#if canImport(CommonSources) - import CommonSources -#endif - final class StubURLProtocolTests: XCTestCase {} public class StubMockTorusUtils: TorusUtils { diff --git a/Tests/TorusUtilsTests/TestnetTest.swift b/Tests/TorusUtilsTests/TestnetTest.swift index 20287182..4d03ddbf 100644 --- a/Tests/TorusUtilsTests/TestnetTest.swift +++ b/Tests/TorusUtilsTests/TestnetTest.swift @@ -1,7 +1,4 @@ import BigInt -#if canImport(CommonSources) - import CommonSources -#endif import FetchNodeDetails import JWTKit import XCTest diff --git a/Tests/TorusUtilsTests/Utils/MockTorusUtils.swift b/Tests/TorusUtilsTests/Utils/MockTorusUtils.swift index ef1503f7..3dccf9cf 100644 --- a/Tests/TorusUtilsTests/Utils/MockTorusUtils.swift +++ b/Tests/TorusUtilsTests/Utils/MockTorusUtils.swift @@ -1,7 +1,4 @@ import BigInt -#if canImport(CommonSources) - import CommonSources -#endif import FetchNodeDetails import Foundation import TorusUtils diff --git a/Tests/TorusUtilsTests/oneKeyTest.swift b/Tests/TorusUtilsTests/oneKeyTest.swift index 2c3f6e78..9a85d823 100644 --- a/Tests/TorusUtilsTests/oneKeyTest.swift +++ b/Tests/TorusUtilsTests/oneKeyTest.swift @@ -1,7 +1,4 @@ import BigInt -#if canImport(CommonSources) - import CommonSources -#endif import FetchNodeDetails import JWTKit import XCTest diff --git a/Torus-utils.podspec b/Torus-utils.podspec index bfe137c3..3383a42b 100644 --- a/Torus-utils.podspec +++ b/Torus-utils.podspec @@ -1,6 +1,6 @@ Pod::Spec.new do |spec| spec.name = "Torus-utils" - spec.version = "8.0.6" + 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" @@ -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', '~> 5.2.0' - spec.dependency 'curvelib.swift', '~> 1.0.0' + spec.dependency 'Torus-fetchNodeDetails', '~> 6.0.0' + spec.dependency 'curvelib.swift', '~> 1.0.1' spec.dependency 'AnyCodable-FlightSchool', '~> 0.6.0' end From 70142c993965fc72cfbdebae5dcd29e8c8365470 Mon Sep 17 00:00:00 2001 From: metalurgical <97008724+metalurgical@users.noreply.github.com> Date: Fri, 19 Apr 2024 08:43:48 +0200 Subject: [PATCH 9/9] update podfile.lock --- cocoapods/Podfile.lock | 17 ++++++++--------- 1 file changed, 8 insertions(+), 9 deletions(-) diff --git a/cocoapods/Podfile.lock b/cocoapods/Podfile.lock index 24d0b81d..a05e6c42 100644 --- a/cocoapods/Podfile.lock +++ b/cocoapods/Podfile.lock @@ -1,13 +1,13 @@ PODS: - AnyCodable-FlightSchool (0.6.7) - BigInt (5.2.0) - - curvelib.swift (1.0.0) - - Torus-fetchNodeDetails (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.0) - - Torus-fetchNodeDetails (~> 5.2.0) + - curvelib.swift (~> 1.0.1) + - Torus-fetchNodeDetails (~> 6.0.0) DEPENDENCIES: - Torus-utils (from `../`) @@ -16,9 +16,8 @@ SPEC REPOS: https://github.com/CocoaPods/Specs.git: - AnyCodable-FlightSchool - BigInt - - Torus-fetchNodeDetails - https://github.com/metalurgical/podspec: - curvelib.swift + - Torus-fetchNodeDetails EXTERNAL SOURCES: Torus-utils: @@ -27,9 +26,9 @@ EXTERNAL SOURCES: SPEC CHECKSUMS: AnyCodable-FlightSchool: 261cbe76757802b17d471b9059b21e6fa5edf57b BigInt: f668a80089607f521586bbe29513d708491ef2f7 - curvelib.swift: eb18aab93231777ee546553f4c617dc119d5ab20 - Torus-fetchNodeDetails: aa6b8df4466254200ed002a400f276c2bfdf5466 - Torus-utils: 9dbf942eee9ec25ea1708710635d2584b8c470f1 + curvelib.swift: d0746ae82bee34016c06da3567a97e493b3c979f + Torus-fetchNodeDetails: e27940bc2151f80b76e3732987a52ea802eb34be + Torus-utils: ce29be461bc6ae9a946d23188d1d3a50bfa4c667 PODFILE CHECKSUM: 2d35466879f2d32f53c6ccbca958796c381f0e62