Skip to content

Commit

Permalink
fix: getAggregateTorusKey, make init public for TorusGenericContainer
Browse files Browse the repository at this point in the history
  • Loading branch information
ieow committed Dec 11, 2024
1 parent b3d0079 commit 892b62c
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion Sources/CustomAuth/Common/TorusGenericContainer.swift
Original file line number Diff line number Diff line change
Expand Up @@ -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
}
}
4 changes: 2 additions & 2 deletions Sources/CustomAuth/CustomAuth.swift
Original file line number Diff line number Diff line change
Expand Up @@ -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)
}
}

0 comments on commit 892b62c

Please sign in to comment.