-
Notifications
You must be signed in to change notification settings - Fork 11
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
8069060
commit 1e3a938
Showing
10 changed files
with
62 additions
and
62 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -21,7 +21,7 @@ class AquaTest: XCTestCase { | |
let verifier: String = "tkey-google-aqua" | ||
let verifierID: String = TORUS_TEST_EMAIL | ||
let nodeDetails = try await fnd.getNodeDetails(verifier: verifier, verifierID: verifierID) | ||
let val = try await torus.getPublicAddress(endpoints: nodeDetails.getTorusNodeEndpoints(), torusNodePubs: nodeDetails.getTorusNodePub(), verifier: verifier, verifierId: verifierID) | ||
let val = try await torus.getPublicAddress(endpoints: nodeDetails.getTorusNodeEndpoints(), verifier: verifier, verifierId: verifierID) | ||
|
||
XCTAssertEqual(val.finalKeyData!.evmAddress, "0xDfA967285AC699A70DA340F60d00DB19A272639d") | ||
XCTAssertLessThan(val.metadata!.serverTimeOffset, 20) | ||
|
@@ -43,7 +43,7 @@ class AquaTest: XCTestCase { | |
var verifier: String = "tkey-google-aqua" | ||
var verifierID: String = TORUS_TEST_EMAIL | ||
let nodeDetails = try await fnd.getNodeDetails(verifier: verifier, verifierID: verifierID) | ||
let result1 = try await torus.getUserTypeAndAddress(endpoints: nodeDetails.getTorusNodeEndpoints(), torusNodePubs: nodeDetails.getTorusNodePub(), verifier: verifier, verifierId: verifierID) | ||
let result1 = try await torus.getUserTypeAndAddress(endpoints: nodeDetails.getTorusNodeEndpoints(), verifier: verifier, verifierId: verifierID) | ||
XCTAssertLessThan(result1.metadata!.serverTimeOffset, 20) | ||
|
||
XCTAssertEqual(result1.oAuthKeyData!.evmAddress, "0xDfA967285AC699A70DA340F60d00DB19A272639d") | ||
|
@@ -62,7 +62,7 @@ class AquaTest: XCTestCase { | |
// 1/1 user | ||
verifier = "tkey-google-aqua" | ||
verifierID = "[email protected]" | ||
let result2 = try await torus.getUserTypeAndAddress(endpoints: nodeDetails.getTorusNodeEndpoints(), torusNodePubs: nodeDetails.getTorusNodePub(), verifier: verifier, verifierId: verifierID) | ||
let result2 = try await torus.getUserTypeAndAddress(endpoints: nodeDetails.getTorusNodeEndpoints(), verifier: verifier, verifierId: verifierID) | ||
|
||
XCTAssertLessThan(result2.metadata!.serverTimeOffset, 20) | ||
|
||
|
@@ -82,7 +82,7 @@ class AquaTest: XCTestCase { | |
|
||
// 2/n user | ||
verifierID = "[email protected]" | ||
let result3 = try await torus.getUserTypeAndAddress(endpoints: nodeDetails.getTorusNodeEndpoints(), torusNodePubs: nodeDetails.getTorusNodePub(), verifier: verifier, verifierId: verifierID) | ||
let result3 = try await torus.getUserTypeAndAddress(endpoints: nodeDetails.getTorusNodeEndpoints(), verifier: verifier, verifierId: verifierID) | ||
|
||
XCTAssertLessThan(result2.metadata!.serverTimeOffset, 20) | ||
|
||
|
@@ -105,7 +105,7 @@ class AquaTest: XCTestCase { | |
let verifier: String = "tkey-google-aqua" | ||
let verifierID: String = fakeEmail | ||
let nodeDetails = try await fnd.getNodeDetails(verifier: verifier, verifierID: verifierID) | ||
let data = try await torus.getPublicAddress(endpoints: nodeDetails.getTorusNodeEndpoints(), torusNodePubs: nodeDetails.getTorusNodePub(), verifier: verifier, verifierId: verifierID) | ||
let data = try await torus.getPublicAddress(endpoints: nodeDetails.getTorusNodeEndpoints(), verifier: verifier, verifierId: verifierID) | ||
//note: duplicated checks on next two lines in javascript | ||
XCTAssertNotNil(data.finalKeyData?.evmAddress) | ||
XCTAssertNotNil(data.oAuthKeyData?.evmAddress) | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -21,7 +21,7 @@ class CelesteTest: XCTestCase { | |
let verifier = "tkey-google-celeste" | ||
let verifierID = TORUS_TEST_EMAIL | ||
let nodeDetails = try await fnd.getNodeDetails(verifier: verifier, verifierID: verifierID) | ||
let val = try await torus.getPublicAddress(endpoints: nodeDetails.torusNodeEndpoints, torusNodePubs: nodeDetails.getTorusNodePub(), verifier: verifier, verifierId: verifierID) | ||
let val = try await torus.getPublicAddress(endpoints: nodeDetails.torusNodeEndpoints, verifier: verifier, verifierId: verifierID) | ||
|
||
XCTAssertEqual(val.finalKeyData!.evmAddress, "0xC3115b9d6FaB99739b23DA9dfcBA47A4Ec4Cd113") | ||
XCTAssertLessThan(val.metadata!.serverTimeOffset, 20) | ||
|
@@ -43,7 +43,7 @@ class CelesteTest: XCTestCase { | |
var verifier: String = "tkey-google-celeste" | ||
var verifierID: String = TORUS_TEST_EMAIL | ||
let nodeDetails = try await fnd.getNodeDetails(verifier: verifier, verifierID: verifierID) | ||
var val = try await torus.getUserTypeAndAddress(endpoints: nodeDetails.getTorusNodeEndpoints(), torusNodePubs: nodeDetails.getTorusNodePub(), verifier: verifier, verifierId: verifierID) | ||
var val = try await torus.getUserTypeAndAddress(endpoints: nodeDetails.getTorusNodeEndpoints(), verifier: verifier, verifierId: verifierID) | ||
|
||
XCTAssertEqual(val.finalKeyData!.evmAddress, "0xC3115b9d6FaB99739b23DA9dfcBA47A4Ec4Cd113") | ||
XCTAssertLessThan(val.metadata!.serverTimeOffset, 20) | ||
|
@@ -60,7 +60,7 @@ class CelesteTest: XCTestCase { | |
|
||
verifier = "tkey-google-celeste" | ||
verifierID = "[email protected]" | ||
val = try await torus.getUserTypeAndAddress(endpoints: nodeDetails.getTorusNodeEndpoints(), torusNodePubs: nodeDetails.getTorusNodePub(), verifier: verifier, verifierId: verifierID) | ||
val = try await torus.getUserTypeAndAddress(endpoints: nodeDetails.getTorusNodeEndpoints(), verifier: verifier, verifierId: verifierID) | ||
|
||
XCTAssertEqual(val.finalKeyData!.evmAddress, "0x8d69CE354DA39413f205FdC8680dE1F3FBBb36e2") | ||
XCTAssertLessThan(val.metadata!.serverTimeOffset, 20) | ||
|
@@ -82,7 +82,7 @@ class CelesteTest: XCTestCase { | |
|
||
verifier = "tkey-google-celeste" | ||
verifierID = "[email protected]" | ||
val = try await torus.getUserTypeAndAddress(endpoints: nodeDetails.getTorusNodeEndpoints(), torusNodePubs: nodeDetails.getTorusNodePub(), verifier: verifier, verifierId: verifierID) | ||
val = try await torus.getUserTypeAndAddress(endpoints: nodeDetails.getTorusNodeEndpoints(), verifier: verifier, verifierId: verifierID) | ||
|
||
XCTAssertEqual(val.finalKeyData!.evmAddress, "0x8108c29976C458e76f797AD55A3715Ce80a3fe78") | ||
XCTAssertLessThan(val.metadata!.serverTimeOffset, 20) | ||
|
@@ -106,7 +106,7 @@ class CelesteTest: XCTestCase { | |
let verifier: String = "tkey-google-celeste" | ||
let verifierID: String = fakeEmail | ||
let nodeDetails = try await fnd.getNodeDetails(verifier: verifier, verifierID: verifierID) | ||
let data = try await torus.getPublicAddress(endpoints: nodeDetails.getTorusNodeEndpoints(), torusNodePubs: nodeDetails.getTorusNodePub(), verifier: verifier, verifierId: verifierID) | ||
let data = try await torus.getPublicAddress(endpoints: nodeDetails.getTorusNodeEndpoints(), verifier: verifier, verifierId: verifierID) | ||
XCTAssertNotEqual(data.finalKeyData?.evmAddress, "") | ||
XCTAssertNotEqual(data.oAuthKeyData?.evmAddress, "") | ||
XCTAssertEqual(data.metadata?.typeOfUser, .v1) | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -21,7 +21,7 @@ class CyanTest: XCTestCase { | |
let verifier: String = "tkey-google-cyan" | ||
let verifierID: String = TORUS_TEST_EMAIL | ||
let nodeDetails = try await fnd.getNodeDetails(verifier: verifier, verifierID: verifierID) | ||
let val = try await torus.getPublicAddress(endpoints: nodeDetails.getTorusNodeEndpoints(), torusNodePubs: nodeDetails.getTorusNodePub(), verifier: verifier, verifierId: verifierID) | ||
let val = try await torus.getPublicAddress(endpoints: nodeDetails.getTorusNodeEndpoints(), verifier: verifier, verifierId: verifierID) | ||
|
||
XCTAssertEqual(val.finalKeyData!.evmAddress, "0xA3767911A84bE6907f26C572bc89426dDdDB2825") | ||
XCTAssertLessThan(val.metadata!.serverTimeOffset, 20) | ||
|
@@ -43,7 +43,7 @@ class CyanTest: XCTestCase { | |
var verifier: String = "tkey-google-cyan" | ||
var verifierID: String = TORUS_TEST_EMAIL | ||
let nodeDetails = try await fnd.getNodeDetails(verifier: verifier, verifierID: verifierID) | ||
var data = try await torus.getUserTypeAndAddress(endpoints: nodeDetails.getTorusNodeEndpoints(), torusNodePubs: nodeDetails.getTorusNodePub(), verifier: verifier, verifierId: verifierID) | ||
var data = try await torus.getUserTypeAndAddress(endpoints: nodeDetails.getTorusNodeEndpoints(), verifier: verifier, verifierId: verifierID) | ||
|
||
XCTAssertEqual(data.finalKeyData!.evmAddress, "0x3507F0d192a44E436B8a6C32a37d57D022861b1a") | ||
XCTAssertLessThan(data.metadata!.serverTimeOffset, 20) | ||
|
@@ -63,7 +63,7 @@ class CyanTest: XCTestCase { | |
|
||
verifier = "tkey-google-cyan" | ||
verifierID = "[email protected]" | ||
data = try await torus.getUserTypeAndAddress(endpoints: nodeDetails.getTorusNodeEndpoints(), torusNodePubs: nodeDetails.getTorusNodePub(), verifier: verifier, verifierId: verifierID) | ||
data = try await torus.getUserTypeAndAddress(endpoints: nodeDetails.getTorusNodeEndpoints(), verifier: verifier, verifierId: verifierID) | ||
|
||
XCTAssertEqual(data.finalKeyData!.evmAddress, "0x8EA83Ace86EB414747F2b23f03C38A34E0217814") | ||
XCTAssertLessThan(data.metadata!.serverTimeOffset, 20) | ||
|
@@ -83,7 +83,7 @@ class CyanTest: XCTestCase { | |
|
||
verifier = "tkey-google-cyan" | ||
verifierID = "[email protected]" | ||
data = try await torus.getUserTypeAndAddress(endpoints: nodeDetails.getTorusNodeEndpoints(), torusNodePubs: nodeDetails.getTorusNodePub(), verifier: verifier, verifierId: verifierID) | ||
data = try await torus.getUserTypeAndAddress(endpoints: nodeDetails.getTorusNodeEndpoints(), verifier: verifier, verifierId: verifierID) | ||
|
||
XCTAssertEqual(data.finalKeyData!.evmAddress, "0xCC1f953f6972a9e3d685d260399D6B85E2117561") | ||
XCTAssertLessThan(data.metadata!.serverTimeOffset, 20) | ||
|
@@ -107,7 +107,7 @@ class CyanTest: XCTestCase { | |
let verifier: String = "tkey-google-cyan" | ||
let verifierID: String = fakeEmail | ||
let nodeDetails = try await fnd.getNodeDetails(verifier: verifier, verifierID: verifierID) | ||
let data = try await torus.getPublicAddress(endpoints: nodeDetails.getTorusNodeEndpoints(), torusNodePubs: nodeDetails.getTorusNodePub(), verifier: verifier, verifierId: verifierID) | ||
let data = try await torus.getPublicAddress(endpoints: nodeDetails.getTorusNodeEndpoints(), verifier: verifier, verifierId: verifierID) | ||
XCTAssertNotEqual(data.finalKeyData?.evmAddress, "") | ||
XCTAssertNotEqual(data.oAuthKeyData?.evmAddress, "") | ||
XCTAssertEqual(data.metadata?.typeOfUser, .v1) | ||
|
Oops, something went wrong.