-
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.
added hash for tokencommitment during commitmentRequest
- Loading branch information
1 parent
4d87ed3
commit 52a0cb3
Showing
4 changed files
with
28 additions
and
13 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
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 |
---|---|---|
|
@@ -23,8 +23,11 @@ final class torus_utils_swiftTests: XCTestCase { | |
let nodeList = ["https://lrc-test-13-a.torusnode.com/jrpc", "https://lrc-test-13-b.torusnode.com/jrpc", "https://lrc-test-13-c.torusnode.com/jrpc", "https://lrc-test-13-d.torusnode.com/jrpc", "https://lrc-test-13-e.torusnode.com/jrpc"] | ||
let nodePubKeys : Array<TorusNodePub> = [TorusNodePub(_X: "4086d123bd8b370db29e84604cd54fa9f1aeb544dba1cc9ff7c856f41b5bf269", _Y: "fde2ac475d8d2796aab2dea7426bc57571c26acad4f141463c036c9df3a8b8e8"),TorusNodePub(_X: "1d6ae1e674fdc1849e8d6dacf193daa97c5d484251aa9f82ff740f8277ee8b7d", _Y: "43095ae6101b2e04fa187e3a3eb7fbe1de706062157f9561b1ff07fe924a9528"),TorusNodePub(_X: "fd2af691fe4289ffbcb30885737a34d8f3f1113cbf71d48968da84cab7d0c262", _Y: "c37097edc6d6323142e0f310f0c2fb33766dbe10d07693d73d5d490c1891b8dc"),TorusNodePub(_X: "e078195f5fd6f58977531135317a0f8d3af6d3b893be9762f433686f782bec58", _Y: "843f87df076c26bf5d4d66120770a0aecf0f5667d38aa1ec518383d50fa0fb88"),TorusNodePub(_X: "a127de58df2e7a612fd256c42b57bb311ce41fd5d0ab58e6426fbf82c72e742f", _Y: "388842e57a4df814daef7dceb2065543dd5727f0ee7b40d527f36f905013fa96")] | ||
let verifierId = "[email protected]" | ||
let verifier = "google-shubs" | ||
let token = "eyJhbGciOiJSUzI1NiIsImtpZCI6Ijc0YmQ4NmZjNjFlNGM2Y2I0NTAxMjZmZjRlMzhiMDY5YjhmOGYzNWMiLCJ0eXAiOiJKV1QifQ.eyJpc3MiOiJodHRwczovL2FjY291bnRzLmdvb2dsZS5jb20iLCJhenAiOiIyMzg5NDE3NDY3MTMtcXFlNGE3cmR1dWsyNTZkOG9pNWwwcTM0cXR1OWdwZmcuYXBwcy5nb29nbGV1c2VyY29udGVudC5jb20iLCJhdWQiOiIyMzg5NDE3NDY3MTMtcXFlNGE3cmR1dWsyNTZkOG9pNWwwcTM0cXR1OWdwZmcuYXBwcy5nb29nbGV1c2VyY29udGVudC5jb20iLCJzdWIiOiIxMDk1ODQzNTA5MTA3Mjc0NzAzNDkiLCJoZCI6InRvci51cyIsImVtYWlsIjoic2h1YmhhbUB0b3IudXMiLCJlbWFpbF92ZXJpZmllZCI6dHJ1ZSwiYXRfaGFzaCI6IjY2bXVLVS1NTzNmTjFNbV9LdnhJWHciLCJub25jZSI6IjEyMyIsIm5hbWUiOiJTaHViaGFtIFJhdGhpIiwicGljdHVyZSI6Imh0dHBzOi8vbGg0Lmdvb2dsZXVzZXJjb250ZW50LmNvbS8tT19SUi1aYlQwZVUvQUFBQUFBQUFBQUkvQUFBQUFBQUFBQUEvQUFLV0pKTmVleHhiRHozcjFVVnBrWjVGbzdsYTNhMXZRZy9zOTYtYy9waG90by5qcGciLCJnaXZlbl9uYW1lIjoiU2h1YmhhbSIsImZhbWlseV9uYW1lIjoiUmF0aGkiLCJsb2NhbGUiOiJlbiIsImlhdCI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yZSI6Imh0dHBzOi8vbGg0Lmdvb2dsZXVzZXJjb250ZW50LmNvbS8tT19SUi1aYlQwZVUvQUFBQUFBQUFBQUkvQUFBQUFBQUFBQUEvQU1adXVjazdCR2hkRkhZdEtfQVN6T01wZlpTSWVHU2NmZy9zOTYtYy9waG90by5qcGciLCJnaXZlbl9uYW1lIjoiU2h1YmhhbSIsImZhbWlseV9uYW1lIjoiUmF0aGkiLCJsb2NhbGUiOiJlbiIsImlhdCI6MTU4OTc5NDI2NywiZXhwIjoxNTg5Nzk3ODY3LCJqdGkiOiIxNzIyNmYwMWMxMGNjNTIyZjMwNjkwMDFhZmI1NWVlYjhkNjNmNTBhIn0.sJ3VBXnqBvRUOwKIwuvV8tt9Eh8I8OZtWMGljuz8SGg83f90Bf-llVNfsnxTBbdntIpVP75sTcSpSKEm35T407QrCPcbAsnawHTFtDvwdqkMSW2Y5FaOkJsrI9iFcRFpOmqqloB4k-OD64vdkw-rInDrrRmgS8f6nui5QQmhk8GS8Mgm6BGNa6isWXPcHCZZgg2R6r03rjfqFM_LNtEb-Zg0h8KbnlmOwo1wKD_iWWszHaWOgWC4iXZRVO-ORz_IAY6g-QXEFSSjju9fAZe4Sr0vjVEE48PZuvTFslU9FrrYi2lW2V5NEJMi5KEj6wc75b55zIbIxqPH6WJXSUm5HA" | ||
let verifyParams = [["GOOGLE_CLIENT_ID": "238941746713-qqe4a7rduuk256d8oi5l0q34qtu9gpfg.apps.googleusercontent.com", | ||
"typeOfLogin": "google", | ||
"verifier": "google-shubs",]] | ||
|
||
override class func setUp() { | ||
super.setUp() | ||
|
@@ -98,7 +101,7 @@ final class torus_utils_swiftTests: XCTestCase { | |
func testRetreiveShares(){ | ||
let exp1 = XCTestExpectation(description: "reterive privatekey") | ||
let obj = TorusUtils() | ||
let key = obj.retreiveShares(endpoints: self.nodeList, verifier: verifier, verifierParams: ["verifier_id": verifierId], idToken: token) | ||
let key = obj.retreiveShares(endpoints: self.nodeList, verifierIdentifier: verifier, verifierParams: [["verifier_id": verifierId, "idtoken": token]], subVerifierIds: ["google-shubs"], verifierId: verifierId) | ||
key.done{ data in | ||
print("data", data) | ||
XCTAssertEqual(64, data.count) | ||
|