From 560bac9669fedfac79c6418c0417aa0e31750a35 Mon Sep 17 00:00:00 2001 From: metalurgical <97008724+metalurgical@users.noreply.github.com> Date: Wed, 11 Dec 2024 05:38:04 +0200 Subject: [PATCH 1/3] fix: use hexString for hash in getAggregateTorusKey --- Sources/CustomAuth/CustomAuth.swift | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Sources/CustomAuth/CustomAuth.swift b/Sources/CustomAuth/CustomAuth.swift index 2ea27aa..a8243e8 100644 --- a/Sources/CustomAuth/CustomAuth.swift +++ b/Sources/CustomAuth/CustomAuth.swift @@ -191,9 +191,9 @@ public class CustomAuth { aggregateIdTokenSeeds.sort() let joined = aggregateIdTokenSeeds.joined(separator: "\u{29}").data(using: .utf8)! - let aggregateIdToken = try keccak256(data: joined) + let aggregateIdToken = try keccak256(data: joined).hexString let params: VerifierParams = VerifierParams(verifier_id: verifierParams.verifier_id, extended_verifier_id: verifierParams.extended_verifier_id, sub_verifier_ids: subVerifierIds, verify_params: verifyParams) - return try await torus.retrieveShares(endpoints: nodeDetails.getTorusNodeEndpoints(), verifier: verifier, verifierParams: params, idToken: String(data: aggregateIdToken, encoding: .utf8)!) + return try await torus.retrieveShares(endpoints: nodeDetails.getTorusNodeEndpoints(), verifier: verifier, verifierParams: params, idToken: aggregateIdToken) } } From ec2e0da21fe8ccbbd9d5cca3869f6364d34c017a Mon Sep 17 00:00:00 2001 From: metalurgical <97008724+metalurgical@users.noreply.github.com> Date: Wed, 11 Dec 2024 05:40:12 +0200 Subject: [PATCH 2/3] fix: make constructor public for TorusGenericContainer --- Sources/CustomAuth/Common/TorusGenericContainer.swift | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Sources/CustomAuth/Common/TorusGenericContainer.swift b/Sources/CustomAuth/Common/TorusGenericContainer.swift index ca1abf0..fddec8f 100644 --- a/Sources/CustomAuth/Common/TorusGenericContainer.swift +++ b/Sources/CustomAuth/Common/TorusGenericContainer.swift @@ -3,7 +3,7 @@ import Foundation public class TorusGenericContainer: Codable { public let params: [String: String] - init(params: [String: String]) { + public init(params: [String: String]) { self.params = params } } From ef6ecfa8b8848f9f9c64ef9d40bcdf89b7f4ee26 Mon Sep 17 00:00:00 2001 From: metalurgical <97008724+metalurgical@users.noreply.github.com> Date: Wed, 11 Dec 2024 05:42:05 +0200 Subject: [PATCH 3/3] update podspec --- CustomAuth.podspec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CustomAuth.podspec b/CustomAuth.podspec index 5c12d39..59cab53 100644 --- a/CustomAuth.podspec +++ b/CustomAuth.podspec @@ -1,6 +1,6 @@ Pod::Spec.new do |spec| spec.name = "CustomAuth" - spec.version = "11.0.1" + spec.version = "11.0.2" spec.platform = :ios, "14.0" spec.summary = "Swift SDK that allows applications to directly interact with the Torus Network, similar to how Torus Wallet does." spec.homepage = "https://github.com/torusresearch/customauth-swift-sdk"