Skip to content

Commit

Permalink
Merge pull request #19 from Web3Auth/update_dependencies
Browse files Browse the repository at this point in the history
feat: Update dependencies
  • Loading branch information
chaitanyapotti authored Apr 24, 2024
2 parents 8a7eca4 + 73c5066 commit 997d9bf
Show file tree
Hide file tree
Showing 8 changed files with 18 additions and 32 deletions.
25 changes: 8 additions & 17 deletions Package.resolved
Original file line number Diff line number Diff line change
Expand Up @@ -18,31 +18,22 @@
"version" : "5.3.0"
}
},
{
"identity" : "cryptoswift",
"kind" : "remoteSourceControl",
"location" : "https://github.com/krzyzanowskim/CryptoSwift.git",
"state" : {
"revision" : "7892a123f7e8d0fe62f9f03728b17bbd4f94df5c",
"version" : "1.8.1"
}
},
{
"identity" : "curvelib.swift",
"kind" : "remoteSourceControl",
"location" : "https://github.com/tkey/curvelib.swift",
"state" : {
"revision" : "7dad3bf1793de263f83406c08c18c9316abf082f",
"version" : "0.1.2"
"revision" : "9f88bd5e56d1df443a908f7a7e81ae4f4d9170ea",
"version" : "1.0.1"
}
},
{
"identity" : "fetch-node-details-swift",
"kind" : "remoteSourceControl",
"location" : "https://github.com/torusresearch/fetch-node-details-swift.git",
"state" : {
"revision" : "d591af500f32ce3c88d04af9bb74d746585acfea",
"version" : "5.1.0"
"revision" : "5f67cd080c26cf38ae91e7fe63e6217c6e401c07",
"version" : "6.0.2"
}
},
{
Expand All @@ -68,8 +59,8 @@
"kind" : "remoteSourceControl",
"location" : "https://github.com/Web3Auth/session-manager-swift.git",
"state" : {
"revision" : "290e36cd0646f7fb3be737b65bdfc9f5428dfd5c",
"version" : "3.1.0"
"revision" : "20cc7bff065d7fe53164d17e7714a3f17d4cea2a",
"version" : "4.0.2"
}
},
{
Expand All @@ -86,8 +77,8 @@
"kind" : "remoteSourceControl",
"location" : "https://github.com/torusresearch/torus-utils-swift",
"state" : {
"revision" : "04c62fd5f73f21bd01b7c07e08f6135db26c5940",
"version" : "8.0.0"
"revision" : "ff85c3e96bfa29013309b487875c4d9383e4ac80",
"version" : "8.1.1"
}
}
],
Expand Down
6 changes: 3 additions & 3 deletions Package.swift
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,10 @@ let package = Package(
targets: ["SingleFactorAuth"])
],
dependencies: [
.package(url: "https://github.com/torusresearch/fetch-node-details-swift.git", from: "5.1.0"),
.package(url: "https://github.com/torusresearch/torus-utils-swift.git", from: "8.0.0"),
.package(url: "https://github.com/torusresearch/fetch-node-details-swift.git", from: "6.0.1"),
.package(url: "https://github.com/torusresearch/torus-utils-swift.git", from: "8.1.0"),
.package(url: "https://github.com/vapor/jwt-kit.git", from: "4.0.0"),
.package(url: "https://github.com/Web3Auth/session-manager-swift.git", from: "3.1.0")
.package(url: "https://github.com/Web3Auth/session-manager-swift.git", from: "4.0.2"),
],
targets: [
.target(
Expand Down
9 changes: 5 additions & 4 deletions SingleFactorAuth.podspec
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
Pod::Spec.new do |spec|
spec.name = "SingleFactorAuth"
spec.version = "3.0.0"
spec.version = "5.0.0"
spec.ios.deployment_target = "14.0"
spec.summary = "Enable one key flow for Web3Auth"
spec.homepage = "https://github.com/Web3Auth/single-factor-auth-swift"
Expand All @@ -10,7 +10,8 @@ Pod::Spec.new do |spec|
spec.module_name = "SingleFactorAuth"
spec.source = { :git => "https://github.com/web3Auth/single-factor-auth-swift", :tag => spec.version }
spec.source_files = "Sources/SingleFactorAuth/*.{swift,json}","Sources/SingleFactorAuth/**/*.{swift,json}"
spec.dependency 'Torus-fetchNodeDetails', '~> 5.1.0'
spec.dependency 'Torus-utils', '~> 6.1.0'
spec.dependency 'TorusSessionManager', '~> 3.0.1'
spec.dependency 'Torus-fetchNodeDetails', '~> 6.0.1'
spec.dependency 'curvelib.swift', '~> 1.0.1'
spec.dependency 'Torus-utils', '~> 8.1.0'
spec.dependency 'TorusSessionManager', '~> 4.0.2'
end
6 changes: 2 additions & 4 deletions Sources/SingleFactorAuth/SingleFactorAuth.swift
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
import BigInt
import Combine
import CryptoSwift
import FetchNodeDetails
import Foundation
import SessionManager
import TorusUtils
import curveSecp256k1

public class SingleFactorAuth {
let nodeDetailManager: NodeDetailManager
Expand All @@ -16,8 +16,6 @@ public class SingleFactorAuth {
nodeDetailManager = NodeDetailManager(network: singleFactorAuthArgs.getNetwork().network)
torusUtils = TorusUtils(
enableOneKey: true,
signerHost: singleFactorAuthArgs.getSignerUrl()! + "/api/sign",
allowHost: singleFactorAuthArgs.getSignerUrl()! + "/api/allow",
network: singleFactorAuthArgs.getNetwork().network,
clientId: singleFactorAuthArgs.getWeb3AuthClientId()
)
Expand Down Expand Up @@ -65,7 +63,7 @@ public class SingleFactorAuth {

let verifierParams = VerifierParams(verifier_id: loginParams.verifierId)

let aggregateIdToken = aggregateIdTokenSeeds.joined(separator: "\u{001d}").bytes.sha3(.keccak256).toHexString() // drop 0x
let aggregateIdToken = try curveSecp256k1.keccak256(data: Data(aggregateIdTokenSeeds.joined(separator: "\u{001d}").utf8)).toHexString()

retrieveSharesResponse = try await torusUtils.retrieveShares(
endpoints: details.getTorusNodeEndpoints(),
Expand Down
1 change: 0 additions & 1 deletion Sources/SingleFactorAuth/SingleFactorAuthArgs.swift
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
import CommonSources
import FetchNodeDetails
import TorusUtils

Expand Down
1 change: 0 additions & 1 deletion Tests/SingleFactorAuthTests/AquaTest.swift
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import BigInt
import CommonSources
import JWTKit
import XCTest

Expand Down
1 change: 0 additions & 1 deletion Tests/SingleFactorAuthTests/CyanTest.swift
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import BigInt
import CommonSources
import JWTKit
import XCTest

Expand Down
1 change: 0 additions & 1 deletion Tests/SingleFactorAuthTests/SingleFactorAuthTests.swift
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import BigInt
import CommonSources
import JWTKit
import XCTest

Expand Down

0 comments on commit 997d9bf

Please sign in to comment.