diff --git a/Sources/TorusUtils/Extensions/TorusUtils+extension.swift b/Sources/TorusUtils/Extensions/TorusUtils+extension.swift index 2b18fdd3..5bd5c3d0 100644 --- a/Sources/TorusUtils/Extensions/TorusUtils+extension.swift +++ b/Sources/TorusUtils/Extensions/TorusUtils+extension.swift @@ -504,6 +504,17 @@ extension TorusUtils { let encoder = JSONEncoder() let rpcdata = try! encoder.encode(JSONRPCrequest(method: "VerifierLookupRequest", params: ["verifier":verifier, "verifier_id":verifierId])) + // allowHost = 'https://signer.tor.us/api/allow' + var allowHostRequest = self.makeUrlRequest(url: "https://signer.tor.us/api/allow") + allowHostRequest.httpMethod = "GET" + allowHostRequest.addValue("torus-default", forHTTPHeaderField: "x-api-key") + allowHostRequest.addValue(verifier, forHTTPHeaderField: "Origin") + URLSession.shared.dataTask(.promise, with: allowHostRequest).done{ data in + // swallow + }.catch{error in + self.logger.error("KeyLookup: signer allow:", error) + } + // Create Array of URLRequest Promises var promisesArray = Array >() for el in endpoints { diff --git a/Sources/TorusUtils/TorusUtils.swift b/Sources/TorusUtils/TorusUtils.swift index 6a16ea72..aaa2bcd1 100644 --- a/Sources/TorusUtils/TorusUtils.swift +++ b/Sources/TorusUtils/TorusUtils.swift @@ -106,6 +106,8 @@ public class TorusUtils{ seal.reject(TorusError.timeout) } + + getPublicAddress(endpoints: endpoints, torusNodePubs: nodePubKeys, verifier: verifierIdentifier, verifierId: verifierId, isExtended: true).then{ data -> Promise<[[String:String]]> in publicAddress = data["address"] ?? "" lookupPubkeyX = data["pub_key_X"]!.addLeading0sForLength64() diff --git a/Torus-utils.podspec b/Torus-utils.podspec index 44c9605b..a8c466db 100644 --- a/Torus-utils.podspec +++ b/Torus-utils.podspec @@ -1,6 +1,6 @@ Pod::Spec.new do |spec| spec.name = "Torus-utils" - spec.version = "0.1.1" + spec.version = "0.1.4" spec.platform = :ios, "10.0" spec.summary = "Retrieve user shares" spec.homepage = "https://github.com/torusresearch/torus-utils-swift"