From 24fab6703b8db289a1234f1fdd18b366c8f16794 Mon Sep 17 00:00:00 2001 From: Dimasik Kolezhniuk Date: Tue, 16 Apr 2024 16:27:16 +0200 Subject: [PATCH 1/5] Amoy update --- README.md | 4 +- verifier-integration/go/index.go | 8 +- verifier-integration/js/index.js | 200 +++++++++++----------- verifier-integration/js/package-lock.json | 177 +++++++++++-------- verifier-integration/js/package.json | 2 +- verifier-integration/js/static/index.js | 9 +- 6 files changed, 208 insertions(+), 192 deletions(-) diff --git a/README.md b/README.md index 77bcaaf..9a5bb3c 100644 --- a/README.md +++ b/README.md @@ -1,5 +1,3 @@ # tutorial-examples -Support files for Polygon ID tutorial => https://0xpolygonid.github.io/tutorials/ - - +Support files for Polygon ID tutorial => diff --git a/verifier-integration/go/index.go b/verifier-integration/go/index.go index b54c7ec..fd5ff00 100644 --- a/verifier-integration/go/index.go +++ b/verifier-integration/go/index.go @@ -34,7 +34,7 @@ func GetAuthRequest(w http.ResponseWriter, r *http.Request) { rURL := "" sessionID := 1 CallbackURL := "/api/callback" - Audience := "did:polygonid:polygon:mumbai:2qDyy1kEo2AYcP3RT4XGea7BtxsY285szg6yP9SPrs" + Audience := "did:polygonid:polygon:amoy:2qQ68JkRcf3xrHPQPWZei3YeVzHPP58wYNxx2mEouR" uri := fmt.Sprintf("%s%s?sessionId=%s", rURL, CallbackURL, strconv.Itoa(sessionID)) @@ -84,12 +84,12 @@ func Callback(w http.ResponseWriter, r *http.Request) { tokenBytes, _ := io.ReadAll(r.Body) // Add Polygon Mumbai RPC node endpoint - needed to read on-chain state - ethURL := "MUMBAI_RPC_URL" + ethURL := "AMOY_RPC_URL" // Add identity state contract address - contractAddress := "0x134B1BE34911E39A8397ec6289782989729807a4" + contractAddress := "0x1a4cC30f2aA0377b0c3bc9848766D90cb4404124" - resolverPrefix := "polygon:mumbai" + resolverPrefix := "polygon:amoy" // Locate the directory that contains circuit's verification keys keyDIR := "../keys" diff --git a/verifier-integration/js/index.js b/verifier-integration/js/index.js index 84f889e..95e64bc 100644 --- a/verifier-integration/js/index.js +++ b/verifier-integration/js/index.js @@ -1,120 +1,114 @@ -const path = require('path'); -const express = require('express'); -const {auth, resolver, protocol} = require('@iden3/js-iden3-auth') -const getRawBody = require('raw-body') +const path = require("path"); +const express = require("express"); +const { auth, resolver, protocol } = require("@iden3/js-iden3-auth"); +const getRawBody = require("raw-body"); const app = express(); const port = 8080; -app.use(express.static('static')); +app.use(express.static("static")); app.get("/api/sign-in", (req, res) => { - console.log('get Auth Request'); - GetAuthRequest(req,res); + console.log("get Auth Request"); + getAuthRequest(req, res); }); app.post("/api/callback", (req, res) => { - console.log('callback'); - Callback(req,res); + console.log("callback"); + callback(req, res); }); app.listen(port, () => { - console.log('server running on port 8080'); + console.log("server running on port 8080"); }); // Create a map to store the auth requests and their session IDs const requestMap = new Map(); - // GetQR returns auth request - async function GetAuthRequest(req,res) { - - // Audience is verifier id - const hostUrl = ""; - const sessionId = 1; - const callbackURL = "/api/callback" - const audience = "did:polygonid:polygon:mumbai:2qDyy1kEo2AYcP3RT4XGea7BtxsY285szg6yP9SPrs" - - const uri = `${hostUrl}${callbackURL}?sessionId=${sessionId}`; - - // Generate request for basic authentication - const request = auth.createAuthorizationRequest( - 'test flow', - audience, - uri, - ); - - request.id = '7f38a193-0918-4a48-9fac-36adfdb8b542'; - request.thid = '7f38a193-0918-4a48-9fac-36adfdb8b542'; - - // Add request for a specific proof - const proofRequest = { - id: 1, - circuitId: 'credentialAtomicQuerySigV2', - query: { - allowedIssuers: ['*'], - type: 'KYCAgeCredential', - context: 'https://raw.githubusercontent.com/iden3/claim-schema-vocab/main/schemas/json-ld/kyc-v3.json-ld', - credentialSubject: { - birthday: { - $lt: 20000101, - }, - }, - }, - }; - const scope = request.body.scope ?? []; - request.body.scope = [...scope, proofRequest]; - - // Store auth request in map associated with session ID - requestMap.set(`${sessionId}`, request); - - return res.status(200).set('Content-Type', 'application/json').send(request); - } - - // Callback verifies the proof after sign-in callbacks - async function Callback(req,res) { - - // Get session ID from request - const sessionId = req.query.sessionId; - - // get JWZ token params from the post request - const raw = await getRawBody(req); - const tokenStr = raw.toString().trim(); - - const ethURL = ''; - const contractAddress = "0x134B1BE34911E39A8397ec6289782989729807a4" - const keyDIR = "../keys" - - const ethStateResolver = new resolver.EthStateResolver( - ethURL, - contractAddress, - ); - - const resolvers = { - ['polygon:mumbai']: ethStateResolver, - }; - - - // fetch authRequest from sessionID - const authRequest = requestMap.get(`${sessionId}`); - - - // EXECUTE VERIFICATION - const verifier = await auth.Verifier.newVerifier( - { - stateResolver: resolvers, - circuitsDir: path.join(__dirname, keyDIR), - ipfsGatewayURL:"https://ipfs.io" - } - ); - - - try { - const opts = { - AcceptedStateTransitionDelay: 5 * 60 * 1000, // 5 minute - }; - authResponse = await verifier.fullVerify(tokenStr, authRequest, opts); - } catch (error) { - return res.status(500).send(error); - } - return res.status(200).set('Content-Type', 'application/json').send(authResponse); - } +// GetQR returns auth request +async function getAuthRequest(req, res) { + // Audience is verifier id + const hostUrl = ""; + const sessionId = 1; + const callbackURL = "/api/callback"; + const audience = + "did:polygonid:polygon:amoy:2qQ68JkRcf3xrHPQPWZei3YeVzHPP58wYNxx2mEouR"; + + const uri = `${hostUrl}${callbackURL}?sessionId=${sessionId}`; + + // Generate request for basic authentication + const request = auth.createAuthorizationRequest("test flow", audience, uri); + + request.id = "7f38a193-0918-4a48-9fac-36adfdb8b542"; + request.thid = "7f38a193-0918-4a48-9fac-36adfdb8b542"; + + // Add request for a specific proof + const proofRequest = { + id: 1, + circuitId: "credentialAtomicQuerySigV2", + query: { + allowedIssuers: ["*"], + type: "KYCAgeCredential", + context: + "https://raw.githubusercontent.com/iden3/claim-schema-vocab/main/schemas/json-ld/kyc-v4.jsonld", + credentialSubject: { + birthday: { + $eq: 1713267016597, + }, + }, + }, + }; + const scope = request.body.scope ?? []; + request.body.scope = [...scope, proofRequest]; + + // Store auth request in map associated with session ID + requestMap.set(`${sessionId}`, request); + + return res.status(200).set("Content-Type", "application/json").send(request); +} + +// Callback verifies the proof after sign-in callbacks +async function callback(req, res) { + // Get session ID from request + const sessionId = req.query.sessionId; + + // get JWZ token params from the post request + const raw = await getRawBody(req); + const tokenStr = raw.toString().trim(); + + const ethURL = ""; + const contractAddress = "0x1a4cC30f2aA0377b0c3bc9848766D90cb4404124"; + const keyDIR = "../keys"; + + const ethStateResolver = new resolver.EthStateResolver( + ethURL, + contractAddress + ); + + const resolvers = { + ["polygon:amoy"]: ethStateResolver, + }; + + // fetch authRequest from sessionID + const authRequest = requestMap.get(`${sessionId}`); + + // EXECUTE VERIFICATION + const verifier = await auth.Verifier.newVerifier({ + stateResolver: resolvers, + circuitsDir: path.join(__dirname, keyDIR), + ipfsGatewayURL: "https://ipfs.io", + }); + + try { + const opts = { + AcceptedStateTransitionDelay: 5 * 60 * 1000, // 5 minute + }; + authResponse = await verifier.fullVerify(tokenStr, authRequest, opts); + } catch (error) { + return res.status(500).send(error); + } + return res + .status(200) + .set("Content-Type", "application/json") + .send(authResponse); +} diff --git a/verifier-integration/js/package-lock.json b/verifier-integration/js/package-lock.json index c3fc3b7..811373c 100644 --- a/verifier-integration/js/package-lock.json +++ b/verifier-integration/js/package-lock.json @@ -5,15 +5,16 @@ "packages": { "": { "dependencies": { - "@iden3/js-iden3-auth": "1.1.1", + "@iden3/js-iden3-auth": "1.3.2", "express": "^4.18.2" } }, "node_modules/@0xpolygonid/js-sdk": { - "version": "1.7.4", - "resolved": "https://registry.npmjs.org/@0xpolygonid/js-sdk/-/js-sdk-1.7.4.tgz", - "integrity": "sha512-2JgnXblnFeLoIl2AqnHTFjRwmI+/ITbXP6i6+MBAu3FNbn9AUueqHlzj3Be6yPym3PrsX/5QSMAgi2jpUohHeg==", + "version": "1.10.3", + "resolved": "https://registry.npmjs.org/@0xpolygonid/js-sdk/-/js-sdk-1.10.3.tgz", + "integrity": "sha512-NJdlu2o7uyXXht2GyzLd7VFPMwh3bR1SR+Omiu7zA81d1jf9CAUXpBBlJLIUCN94toA3qcTO+wfKFgK/rXbYHg==", "dependencies": { + "@noble/curves": "^1.4.0", "ajv": "8.12.0", "ajv-formats": "2.1.1", "did-jwt": "6.11.6", @@ -21,22 +22,34 @@ "elliptic": "6.5.4", "ethers": "6.8.0", "idb-keyval": "6.2.0", - "js-sha3": "0.9.2", + "js-sha3": "0.9.3", "jsonld": "8.3.1", + "pubsub-js": "1.9.4", "uuid": "9.0.1" }, "engines": { - "node": ">=18.16.0" + "node": ">=20.11.0" }, "peerDependencies": { - "@iden3/js-crypto": "1.0.3", - "@iden3/js-iden3-core": "1.2.1", - "@iden3/js-jsonld-merklization": "1.1.2", - "@iden3/js-jwz": "1.2.1", - "@iden3/js-merkletree": "1.1.2", - "ffjavascript": "0.2.62", + "@iden3/js-crypto": "1.1.0", + "@iden3/js-iden3-core": "1.3.1", + "@iden3/js-jsonld-merklization": "1.2.0", + "@iden3/js-jwz": "1.4.0", + "@iden3/js-merkletree": "1.2.0", + "ffjavascript": "0.2.63", "rfc4648": "1.5.3", - "snarkjs": "0.7.2" + "snarkjs": "0.7.3" + } + }, + "node_modules/@0xpolygonid/js-sdk/node_modules/@noble/hashes": { + "version": "1.3.2", + "resolved": "https://registry.npmjs.org/@noble/hashes/-/hashes-1.3.2.tgz", + "integrity": "sha512-MVC8EAQp7MvEcm30KWENFjgR+Mkmf+D189XJTkFIlwohU5hcBbn1ZkKq7KVTi2Hme3PMGF390DaL52beVrIihQ==", + "engines": { + "node": ">= 16" + }, + "funding": { + "url": "https://paulmillr.com/funding/" } }, "node_modules/@0xpolygonid/js-sdk/node_modules/aes-js": { @@ -71,6 +84,17 @@ "node": ">=14.0.0" } }, + "node_modules/@0xpolygonid/js-sdk/node_modules/ethers/node_modules/@noble/curves": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/@noble/curves/-/curves-1.2.0.tgz", + "integrity": "sha512-oYclrNgRaM9SsBUBVbb8M6DTV7ZHRTKugureoYEncY5c65HOmRzvSiTE3y5CYaPYJA/GVkrhXEoF0M3Ya9PMnw==", + "dependencies": { + "@noble/hashes": "1.3.2" + }, + "funding": { + "url": "https://paulmillr.com/funding/" + } + }, "node_modules/@0xpolygonid/js-sdk/node_modules/idb-keyval": { "version": "6.2.0", "resolved": "https://registry.npmjs.org/idb-keyval/-/idb-keyval-6.2.0.tgz", @@ -838,21 +862,21 @@ } }, "node_modules/@iden3/js-crypto": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/@iden3/js-crypto/-/js-crypto-1.0.3.tgz", - "integrity": "sha512-IFBLIN1O26mM5MVWO8dlABDC6HKLuhYs+30BT+p6dGWsNXB4Rr5JWuhKBUbKlkW78ly3j3+YSoY+J63q7vPs5Q==" + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/@iden3/js-crypto/-/js-crypto-1.1.0.tgz", + "integrity": "sha512-MbL7OpOxBoCybAPoorxrp+fwjDVESyDe6giIWxErjEIJy0Q2n1DU4VmKh4vDoCyhJx/RdVgT8Dkb59lKwISqsw==" }, "node_modules/@iden3/js-iden3-auth": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/@iden3/js-iden3-auth/-/js-iden3-auth-1.1.1.tgz", - "integrity": "sha512-tTu8xWZ+U8s9j6mmEXwUAYfUhOUxLf3E//up9UX9PXwoTuaOe/KEZAcjHPVaII/bnVPjHPBtkjmCDtBQcH+mGQ==", - "dependencies": { - "@0xpolygonid/js-sdk": "1.7.4", - "@iden3/js-crypto": "1.0.3", - "@iden3/js-iden3-core": "1.2.1", - "@iden3/js-jsonld-merklization": "1.1.2", - "@iden3/js-jwz": "1.2.1", - "@iden3/js-merkletree": "1.1.2", + "version": "1.3.2", + "resolved": "https://registry.npmjs.org/@iden3/js-iden3-auth/-/js-iden3-auth-1.3.2.tgz", + "integrity": "sha512-4lhlo5xdUSNTnPABCInsN1C8g4gzbjL68EP2dnohPJOHhX2eb/ddA9E1HA4XX3O8H0Q/9P5tM9aP5q3M4nC4Mg==", + "dependencies": { + "@0xpolygonid/js-sdk": "1.10.3", + "@iden3/js-crypto": "1.1.0", + "@iden3/js-iden3-core": "1.3.1", + "@iden3/js-jsonld-merklization": "1.2.0", + "@iden3/js-jwz": "1.4.0", + "@iden3/js-merkletree": "1.2.0", "did-resolver": "^4.1.0", "ethers": "^5.4.0", "tslib": "^2.6.2", @@ -860,46 +884,46 @@ } }, "node_modules/@iden3/js-iden3-core": { - "version": "1.2.1", - "resolved": "https://registry.npmjs.org/@iden3/js-iden3-core/-/js-iden3-core-1.2.1.tgz", - "integrity": "sha512-XvRYQY1LfAn3sO2xoZfr3aAotr3snLKVlQ9ipfkfKwBpBbDGIMswljANcjWa2HxHwjKK4XLyPHArNORjw/yXMQ==", + "version": "1.3.1", + "resolved": "https://registry.npmjs.org/@iden3/js-iden3-core/-/js-iden3-core-1.3.1.tgz", + "integrity": "sha512-cCPuEdbTtgqtcK57trS23FmRbLqh8maHyAlxapYPDlua5GFOtKcyPJlglDb1tfIRxEipErfY7gdvBh3hm26kMg==", "peerDependencies": { - "@iden3/js-crypto": "1.0.3" + "@iden3/js-crypto": "1.1.0" } }, "node_modules/@iden3/js-jsonld-merklization": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/@iden3/js-jsonld-merklization/-/js-jsonld-merklization-1.1.2.tgz", - "integrity": "sha512-R8p8EW35YCZQIAfb1GKUEpSdBayACvKFfwQBShGygTmCvA6TzixFc7POu3jmgGcjyRArZjUV6l17YJ33Pu++QQ==", + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/@iden3/js-jsonld-merklization/-/js-jsonld-merklization-1.2.0.tgz", + "integrity": "sha512-7SplwPwNxdwdG/cx2xReEHskgF1Xs+z292M1OYtSrM1PYNY4TRBI5BVMgDcp7im6ehUnsGNOWvdqt78dYiGRqg==", "dependencies": { "@js-temporal/polyfill": "0.4.4", "jsonld": "8.3.1", "n3": "1.17.1" }, "peerDependencies": { - "@iden3/js-crypto": "1.0.3", - "@iden3/js-merkletree": "1.1.2" + "@iden3/js-crypto": "1.1.0", + "@iden3/js-merkletree": "1.2.0" } }, "node_modules/@iden3/js-jwz": { - "version": "1.2.1", - "resolved": "https://registry.npmjs.org/@iden3/js-jwz/-/js-jwz-1.2.1.tgz", - "integrity": "sha512-LzXa81cuH7FkjLbQP5cKdk1XmHGnJDe139aj4ydbtTXEFokaORmMxurMT9WQQBWQlSMsCSfplCpCVz1grd0bFg==", + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/@iden3/js-jwz/-/js-jwz-1.4.0.tgz", + "integrity": "sha512-QaIpgR3Lp/+ZB4ZOgtG3eUsaoeg/CIfAf4NOl64f6kdeH40EdvOxku1Gw6NXUgg1U6Lhl1gU8Y/1RDgs/zzVxA==", "peerDependencies": { - "@iden3/js-crypto": "1.0.3", - "@iden3/js-iden3-core": "1.2.1", - "@iden3/js-merkletree": "1.1.2", - "ffjavascript": "0.2.62", + "@iden3/js-crypto": "1.1.0", + "@iden3/js-iden3-core": "1.3.1", + "@iden3/js-merkletree": "1.2.0", + "ffjavascript": "0.2.63", "rfc4648": "1.5.3", - "snarkjs": "0.7.2" + "snarkjs": "0.7.3" } }, "node_modules/@iden3/js-merkletree": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/@iden3/js-merkletree/-/js-merkletree-1.1.2.tgz", - "integrity": "sha512-NT0L+Nk6barcEnSV5q2M6LkZuR889E856e+awnok6iDlmzYMt2l3gulo//zMqGsO6wQvzVECaSn0LJQ7uM5c1A==", + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/@iden3/js-merkletree/-/js-merkletree-1.2.0.tgz", + "integrity": "sha512-tM6jj1v/41qQ6V2K6CTrv0KsNHQ2y/O6Q9RSB1SdN2LTu+cgA9FnD2Qr3whzSvwgUs7X3SjuJgb9OTgs0lDemQ==", "peerDependencies": { - "@iden3/js-crypto": "1.0.3", + "@iden3/js-crypto": "1.1.0", "idb-keyval": "^6.2.0" } }, @@ -916,20 +940,20 @@ } }, "node_modules/@noble/curves": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/@noble/curves/-/curves-1.2.0.tgz", - "integrity": "sha512-oYclrNgRaM9SsBUBVbb8M6DTV7ZHRTKugureoYEncY5c65HOmRzvSiTE3y5CYaPYJA/GVkrhXEoF0M3Ya9PMnw==", + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/@noble/curves/-/curves-1.4.0.tgz", + "integrity": "sha512-p+4cb332SFCrReJkCYe8Xzm0OWi4Jji5jVdIZRL/PmacmDkFNw6MrrV+gGpiPxLHbV+zKFRywUWbaseT+tZRXg==", "dependencies": { - "@noble/hashes": "1.3.2" + "@noble/hashes": "1.4.0" }, "funding": { "url": "https://paulmillr.com/funding/" } }, "node_modules/@noble/hashes": { - "version": "1.3.2", - "resolved": "https://registry.npmjs.org/@noble/hashes/-/hashes-1.3.2.tgz", - "integrity": "sha512-MVC8EAQp7MvEcm30KWENFjgR+Mkmf+D189XJTkFIlwohU5hcBbn1ZkKq7KVTi2Hme3PMGF390DaL52beVrIihQ==", + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/@noble/hashes/-/hashes-1.4.0.tgz", + "integrity": "sha512-V1JJ1WTRUqHHrOSh597hURcMqVKVGL/ea3kv0gSnEdsEZ0/+VyPghM1lMNGc00z7CIQorSvbKpuJkxvuHbvdbg==", "engines": { "node": ">= 16" }, @@ -1536,9 +1560,9 @@ "integrity": "sha512-WMwm9LhRUo+WUaRN+vRuETqG89IgZphVSNkdFgeb6sS/E4OrDIN7t48CAewSHXc6C8lefD8KKfr5vY61brQlow==" }, "node_modules/ejs": { - "version": "3.1.9", - "resolved": "https://registry.npmjs.org/ejs/-/ejs-3.1.9.tgz", - "integrity": "sha512-rC+QVNMJWv+MtPgkt0y+0rVEIdbtxVADApW9JXrUVlzHetgcyczP/E7DJmWJ4fJCZF2cPcBk0laWO9ZHMG3DmQ==", + "version": "3.1.10", + "resolved": "https://registry.npmjs.org/ejs/-/ejs-3.1.10.tgz", + "integrity": "sha512-UeJmFfOrAQS8OJWPZ4qtgHyWExa088/MtK5UEyoJGFH67cDEXkZSviOiKRCZ4Xij0zxI3JECgYs3oKx+AizQBA==", "peer": true, "dependencies": { "jake": "^10.8.5" @@ -1827,14 +1851,14 @@ } }, "node_modules/ffjavascript": { - "version": "0.2.62", - "resolved": "https://registry.npmjs.org/ffjavascript/-/ffjavascript-0.2.62.tgz", - "integrity": "sha512-uJ7MTrdzhX/3f+hxn0XhdXbJCqYZJSBB6y2/ui4t21vKYVjyTMlU80pPXu40ir6qpqbrdzUeKdlOdJ0aFG9UNA==", + "version": "0.2.63", + "resolved": "https://registry.npmjs.org/ffjavascript/-/ffjavascript-0.2.63.tgz", + "integrity": "sha512-dBgdsfGks58b66JnUZeZpGxdMIDQ4QsD3VYlRJyFVrKQHb2kJy4R2gufx5oetrTxXPT+aEjg0dOvOLg1N0on4A==", "peer": true, "dependencies": { "wasmbuilder": "0.0.16", "wasmcurves": "0.2.2", - "web-worker": "^1.2.0" + "web-worker": "1.2.0" } }, "node_modules/filelist": { @@ -2125,9 +2149,9 @@ } }, "node_modules/js-sha3": { - "version": "0.9.2", - "resolved": "https://registry.npmjs.org/js-sha3/-/js-sha3-0.9.2.tgz", - "integrity": "sha512-8kgvwd03wNGQG1GRvl3yy1Yt40sICAcIMsDU2ZLgoL0Z6z9rkRmf9Vd+bi/gYSzgAqMUGl/jiDKu0J8AWFd+BQ==" + "version": "0.9.3", + "resolved": "https://registry.npmjs.org/js-sha3/-/js-sha3-0.9.3.tgz", + "integrity": "sha512-BcJPCQeLg6WjEx3FE591wVAevlli8lxsxm9/FzV4HXkV49TmBH38Yvrpce6fjbADGMKFrBMGTqrVz3qPIZ88Gg==" }, "node_modules/jsbi": { "version": "4.3.0", @@ -2451,6 +2475,11 @@ "node": ">= 0.10" } }, + "node_modules/pubsub-js": { + "version": "1.9.4", + "resolved": "https://registry.npmjs.org/pubsub-js/-/pubsub-js-1.9.4.tgz", + "integrity": "sha512-hJYpaDvPH4w8ZX/0Fdf9ma1AwRgU353GfbaVfPjfJQf1KxZ2iHaHl3fAUw1qlJIR5dr4F3RzjGaWohYUEyoh7A==" + }, "node_modules/punycode": { "version": "2.3.1", "resolved": "https://registry.npmjs.org/punycode/-/punycode-2.3.1.tgz", @@ -2710,9 +2739,9 @@ } }, "node_modules/snarkjs": { - "version": "0.7.2", - "resolved": "https://registry.npmjs.org/snarkjs/-/snarkjs-0.7.2.tgz", - "integrity": "sha512-A8yPFm9pRnZ7XYXfPSjSFnugEV1rsHGjb8W7c0Qk7nzXl5h3WANTkpVC5FYxakmw/GKWekz7wjjHaOFtPp823Q==", + "version": "0.7.3", + "resolved": "https://registry.npmjs.org/snarkjs/-/snarkjs-0.7.3.tgz", + "integrity": "sha512-cDLpWqdqEJSCQNc+cXYX1XTKdUZBtYEisuOsgmXf/HUsN5WmGN+FO7HfCS+cMQT1Nzbm1a9gAEpKH6KRtDtS1Q==", "peer": true, "dependencies": { "@iden3/binfileutils": "0.0.11", @@ -2721,7 +2750,7 @@ "circom_runtime": "0.1.24", "ejs": "^3.1.6", "fastfile": "0.0.20", - "ffjavascript": "0.2.62", + "ffjavascript": "0.2.63", "js-sha3": "^0.8.0", "logplease": "^1.2.15", "r1csfile": "0.0.47" @@ -2841,9 +2870,9 @@ "peer": true }, "node_modules/undici": { - "version": "5.28.3", - "resolved": "https://registry.npmjs.org/undici/-/undici-5.28.3.tgz", - "integrity": "sha512-3ItfzbrhDlINjaP0duwnNsKpDQk3acHI3gVJ1z4fmwMK31k5G9OVIAMLSIaP6w4FaGkaAkN6zaQO9LUvZ1t7VA==", + "version": "5.28.4", + "resolved": "https://registry.npmjs.org/undici/-/undici-5.28.4.tgz", + "integrity": "sha512-72RFADWFqKmUb2hmmvNODKL3p9hcB6Gt2DOQMis1SEBaV6a4MH8soBvzg+95CYhCKPFedut2JY9bMfrDl9D23g==", "dependencies": { "@fastify/busboy": "^2.0.0" }, @@ -2919,9 +2948,9 @@ } }, "node_modules/web-worker": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/web-worker/-/web-worker-1.3.0.tgz", - "integrity": "sha512-BSR9wyRsy/KOValMgd5kMyr3JzpdeoR9KVId8u5GVlTTAtNChlsE4yTxeY7zMdNSyOmoKBv8NH2qeRY9Tg+IaA==", + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/web-worker/-/web-worker-1.2.0.tgz", + "integrity": "sha512-PgF341avzqyx60neE9DD+XS26MMNMoUQRz9NOZwW32nPQrF6p77f1htcnjBSEV8BGMKZ16choqUG4hyI0Hx7mA==", "peer": true }, "node_modules/word-wrap": { diff --git a/verifier-integration/js/package.json b/verifier-integration/js/package.json index b9c29e6..1b926ce 100644 --- a/verifier-integration/js/package.json +++ b/verifier-integration/js/package.json @@ -1,6 +1,6 @@ { "dependencies": { - "@iden3/js-iden3-auth": "1.1.1", + "@iden3/js-iden3-auth": "1.3.2", "express": "^4.18.2" } } diff --git a/verifier-integration/js/static/index.js b/verifier-integration/js/static/index.js index d3a58c7..7238d7a 100644 --- a/verifier-integration/js/static/index.js +++ b/verifier-integration/js/static/index.js @@ -38,11 +38,6 @@ function handleDisplay(el, needShow, display = 'block') { } function makeDisabled(el, disabled, cls = 'disabled') { - if (disabled) { - el.disabled = true - el.classList.add(cls); - } else { - el.classList.remove(cls); - el.disabled = false; - } + el.disabled = disabled + el.classList.toggle(cls, disabled); } From 27dbdc3572f9320385f44e2b834cdbb7336fc5e7 Mon Sep 17 00:00:00 2001 From: vbasiuk Date: Tue, 16 Apr 2024 17:41:53 +0300 Subject: [PATCH 2/5] update go mod --- verifier-integration/go/go.mod | 24 +++++++-------- verifier-integration/go/go.sum | 56 +++++++++++++++------------------- 2 files changed, 37 insertions(+), 43 deletions(-) diff --git a/verifier-integration/go/go.mod b/verifier-integration/go/go.mod index cf46d75..9735c1e 100644 --- a/verifier-integration/go/go.mod +++ b/verifier-integration/go/go.mod @@ -6,13 +6,14 @@ require github.com/iden3/go-iden3-crypto v0.0.15 // indirect; indirectgo require ( github.com/ethereum/go-ethereum v1.11.5 - github.com/iden3/go-circuits/v2 v2.0.0 // indirect - github.com/iden3/go-iden3-auth/v2 v2.0.0-beta.2 - github.com/iden3/iden3comm/v2 v2.0.0 + github.com/iden3/go-circuits/v2 v2.2.0 + github.com/iden3/go-iden3-auth/v2 v2.2.2 + github.com/iden3/iden3comm/v2 v2.3.2 ) require ( github.com/benbjohnson/clock v1.3.5 // indirect + github.com/blang/semver/v4 v4.0.0 // indirect github.com/btcsuite/btcd/btcec/v2 v2.3.2 // indirect github.com/crackcomm/go-gitignore v0.0.0-20170627025303-887ab5e44cc3 // indirect github.com/dchest/blake512 v1.0.0 // indirect @@ -23,22 +24,22 @@ require ( github.com/go-ole/go-ole v1.2.6 // indirect github.com/go-stack/stack v1.8.1 // indirect github.com/goccy/go-json v0.10.2 // indirect - github.com/google/uuid v1.3.0 // indirect + github.com/google/uuid v1.6.0 // indirect github.com/gorilla/websocket v1.5.0 // indirect github.com/holiman/uint256 v1.2.2-0.20230321075855-87b91420868c // indirect - github.com/iden3/contracts-abi/state/go/abi v1.0.0-beta.3 // indirect - github.com/iden3/go-iden3-core/v2 v2.0.0 // indirect - github.com/iden3/go-jwz/v2 v2.0.0 // indirect + github.com/iden3/contracts-abi/state/go/abi v1.0.1 // indirect + github.com/iden3/go-iden3-core/v2 v2.1.0 // indirect + github.com/iden3/go-jwz/v2 v2.0.2 // indirect github.com/iden3/go-merkletree-sql/v2 v2.0.4 // indirect github.com/iden3/go-rapidsnark/prover v0.0.10 // indirect github.com/iden3/go-rapidsnark/types v0.0.3 // indirect github.com/iden3/go-rapidsnark/verifier v0.0.5 // indirect github.com/iden3/go-rapidsnark/witness/v2 v2.0.0 // indirect github.com/iden3/go-rapidsnark/witness/wazero v0.0.0-20230524142950-0986cf057d4e // indirect - github.com/iden3/go-schema-processor/v2 v2.0.0 // indirect - github.com/ipfs/boxo v0.8.0 // indirect + github.com/iden3/go-schema-processor/v2 v2.3.3 // indirect + github.com/ipfs/boxo v0.12.0 // indirect github.com/ipfs/go-cid v0.4.1 // indirect - github.com/ipfs/go-ipfs-api v0.6.0 // indirect + github.com/ipfs/go-ipfs-api v0.7.0 // indirect github.com/klauspost/cpuid/v2 v2.2.5 // indirect github.com/lestrrat-go/blackmagic v1.0.1 // indirect github.com/lestrrat-go/httpcc v1.0.1 // indirect @@ -57,7 +58,7 @@ require ( github.com/multiformats/go-multiaddr v0.12.1 // indirect github.com/multiformats/go-multibase v0.2.0 // indirect github.com/multiformats/go-multicodec v0.9.0 // indirect - github.com/multiformats/go-multihash v0.2.2 // indirect + github.com/multiformats/go-multihash v0.2.3 // indirect github.com/multiformats/go-multistream v0.4.1 // indirect github.com/multiformats/go-varint v0.0.7 // indirect github.com/piprate/json-gold v0.5.1-0.20230111113000-6ddbe6e6f19f // indirect @@ -70,7 +71,6 @@ require ( github.com/tetratelabs/wazero v1.1.0 // indirect github.com/tklauser/go-sysconf v0.3.11 // indirect github.com/tklauser/numcpus v0.6.0 // indirect - github.com/whyrusleeping/tar-utils v0.0.0-20201201191210-20a61371de5b // indirect github.com/yusufpapurcu/wmi v1.2.2 // indirect golang.org/x/crypto v0.17.0 // indirect golang.org/x/exp v0.0.0-20230725012225-302865e7556b // indirect diff --git a/verifier-integration/go/go.sum b/verifier-integration/go/go.sum index ab994d3..7efe310 100644 --- a/verifier-integration/go/go.sum +++ b/verifier-integration/go/go.sum @@ -3,6 +3,8 @@ github.com/VictoriaMetrics/fastcache v1.6.0 h1:C/3Oi3EiBCqufydp1neRZkqcwmEiuRT9c github.com/benbjohnson/clock v1.3.5 h1:VvXlSJBzZpA/zum6Sj74hxwYI2DIxRWuNIoXAzHZz5o= github.com/benbjohnson/clock v1.3.5/go.mod h1:J11/hYXuz8f4ySSvYwY0FKfm+ezbsZBKZxNJlLklBHA= github.com/beorn7/perks v1.0.1 h1:VlbKKnNfV8bJzeqoa4cOKqO6bYr3WgKZxO8Z16+hsOM= +github.com/blang/semver/v4 v4.0.0 h1:1PFHFE6yCCTv8C1TeyNNarDzntLi7wMI5i/pzqYIsAM= +github.com/blang/semver/v4 v4.0.0/go.mod h1:IbckMUScFkM3pff0VJDNKRiT6TG/YpiHIM2yvyW5YoQ= github.com/btcsuite/btcd v0.23.3 h1:4KH/JKy9WiCd+iUS9Mu0Zp7Dnj17TGdKrg9xc/FGj24= github.com/btcsuite/btcd/btcec/v2 v2.3.2 h1:5n0X6hX0Zk+6omWcihdYvdAlGf2DfasC0GMf7DClJ3U= github.com/btcsuite/btcd/btcec/v2 v2.3.2/go.mod h1:zYzJ8etWJQIv1Ogk7OzpWjowwOdXY1W/17j2MW85J04= @@ -47,7 +49,6 @@ github.com/go-stack/stack v1.8.1/go.mod h1:dcoOX6HbPZSZptuspn9bctJ+N/CnF5gGygcUP github.com/goccy/go-json v0.10.2 h1:CrxCmQqYDkv1z7lO7Wbh2HN93uovUHgrECaO5ZrCXAU= github.com/goccy/go-json v0.10.2/go.mod h1:6MelG93GURQebXPDq3khkgXZkazVtN9CRI+MGFi0w8I= github.com/gofrs/flock v0.8.1 h1:+gYjHKf32LDeiEEFhQaotPbLuUXjY5ZqxKgXy7n59aw= -github.com/gofrs/uuid/v5 v5.0.0 h1:p544++a97kEL+svbcFbCQVM9KFu0Yo25UoISXGNNH9M= github.com/gogo/protobuf v1.3.2 h1:Ov1cvc58UF3b5XjBnZv7+opcTcQFZebYjWzi34vdm4Q= github.com/golang-jwt/jwt/v4 v4.3.0 h1:kHL1vqdqWNfATmA0FNMdmZNMyZI1U6O31X4rlIPoBog= github.com/golang/mock v1.6.0 h1:ErTB+efbowRARo13NNdxyJji2egdxLGQhRaY+DUumQc= @@ -56,8 +57,8 @@ github.com/golang/protobuf v1.5.3 h1:KhyjKVUg7Usr/dYsdSqoFveMYd5ko72D+zANwlG1mmg github.com/golang/snappy v0.0.4 h1:yAGX7huGHXlcLOEtBnF4w7FQwA26wojNCwOYAEhLjQM= github.com/google/go-cmp v0.5.5/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/go-cmp v0.5.9 h1:O2Tfq5qg4qc4AmwVlvv0oLiVAGB7enBSJ2x2DqQFi38= -github.com/google/uuid v1.3.0 h1:t6JiXgmwXMjEs8VusXIJk2BXHsn+wx8BZdTaoZ5fu7I= -github.com/google/uuid v1.3.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= +github.com/google/uuid v1.6.0 h1:NIvaJDMOsjHA8n1jAhLSgzrAzy1Hgr+hNrb57e+94F0= +github.com/google/uuid v1.6.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= github.com/gorilla/websocket v1.5.0 h1:PPwGk2jz7EePpoHN/+ClbZu8SPxiqlu12wZP/3sWmnc= github.com/gorilla/websocket v1.5.0/go.mod h1:YR8l580nyteQvAITg2hZ9XVh4b55+EU/adAjf1fMHhE= github.com/hashicorp/go-bexpr v0.1.10 h1:9kuI5PFotCboP3dkDYFr/wi0gg0QVbSNz5oFRpxn4uE= @@ -65,18 +66,18 @@ github.com/holiman/bloomfilter/v2 v2.0.3 h1:73e0e/V0tCydx14a0SCYS/EWCxgwLZ18CZcZ github.com/holiman/uint256 v1.2.2-0.20230321075855-87b91420868c h1:DZfsyhDK1hnSS5lH8l+JggqzEleHteTYfutAiVlSUM8= github.com/holiman/uint256 v1.2.2-0.20230321075855-87b91420868c/go.mod h1:SC8Ryt4n+UBbPbIBKaG9zbbDlp4jOru9xFZmPzLUTxw= github.com/huin/goupnp v1.2.0 h1:uOKW26NG1hsSSbXIZ1IR7XP9Gjd1U8pnLaCMgntmkmY= -github.com/iden3/contracts-abi/state/go/abi v1.0.0-beta.3 h1:ZHFnK2dU3NJglY+igY48JLHWtNGN/Vhf5/L/qrFk/tM= -github.com/iden3/contracts-abi/state/go/abi v1.0.0-beta.3/go.mod h1:TxgIrXCvxms3sbOdsy8kTvffUCIpEEifNy0fSXdkU4w= -github.com/iden3/go-circuits/v2 v2.0.0 h1:Bw0mpsqeip06d6I2ktgfhTVB7Jk9mSHi8myHZWkoc6w= -github.com/iden3/go-circuits/v2 v2.0.0/go.mod h1:VIFIp51+IH0hOzjnKhb84bCeyq7hq76zX/C14ua6zh4= -github.com/iden3/go-iden3-auth/v2 v2.0.0-beta.2 h1:r5vjH+MyPFzaJ7U62SO5Gz9N9O0RZfDORNHVd9JymNg= -github.com/iden3/go-iden3-auth/v2 v2.0.0-beta.2/go.mod h1:bYr47aev7sh23RL7Ru+TQQSlYDS94+wO8P8SDrwdifc= -github.com/iden3/go-iden3-core/v2 v2.0.0 h1:sQEuuq3RLfyYSY8qPiqxQ6YBpGbiAwepHJD/vjf1adA= -github.com/iden3/go-iden3-core/v2 v2.0.0/go.mod h1:L9PxhWPvoS9qTb3inEkZBm1RpjHBt+VTwvxssdzbAdw= +github.com/iden3/contracts-abi/state/go/abi v1.0.1 h1:FsaLJSy3NSyJl5k1yfDxc5DhUHRY7Z/UCj0/1YueMrY= +github.com/iden3/contracts-abi/state/go/abi v1.0.1/go.mod h1:TxgIrXCvxms3sbOdsy8kTvffUCIpEEifNy0fSXdkU4w= +github.com/iden3/go-circuits/v2 v2.2.0 h1:qJeySVPG9vxZwJyL/CsvXdUhccWOctXQUYGnyX5p2Kc= +github.com/iden3/go-circuits/v2 v2.2.0/go.mod h1:1LET+T8i9Rkfx+RNj2BBHKAPGDODEWWwSEFjR6g3h6c= +github.com/iden3/go-iden3-auth/v2 v2.2.2 h1:4uA+m5H2OvhfOsMJaeXaCjciV2sHypvHgGHewZfXB58= +github.com/iden3/go-iden3-auth/v2 v2.2.2/go.mod h1:1ytFvnSnuNK2m9BoVrgYJoLNH919Bg2pt68pFelcJcM= +github.com/iden3/go-iden3-core/v2 v2.1.0 h1:R1s7Tj3tIx5lDy8S7OJrSNuxXIFeRzWRmTBaQoQHJps= +github.com/iden3/go-iden3-core/v2 v2.1.0/go.mod h1:L9PxhWPvoS9qTb3inEkZBm1RpjHBt+VTwvxssdzbAdw= github.com/iden3/go-iden3-crypto v0.0.15 h1:4MJYlrot1l31Fzlo2sF56u7EVFeHHJkxGXXZCtESgK4= github.com/iden3/go-iden3-crypto v0.0.15/go.mod h1:dLpM4vEPJ3nDHzhWFXDjzkn1qHoBeOT/3UEhXsEsP3E= -github.com/iden3/go-jwz/v2 v2.0.0 h1:VsU2PrmcchPMx/V0IhamMZRNjiQYZoyJopO8K8uSZOY= -github.com/iden3/go-jwz/v2 v2.0.0/go.mod h1:JBJ58Cef8h+4Uz8qaVRsNjiT/Ubqb800dGKTZt66NkU= +github.com/iden3/go-jwz/v2 v2.0.2 h1:yx56x1TZcObeuj6cvX715Jd7QTxnCpHwbETKWCPJmhw= +github.com/iden3/go-jwz/v2 v2.0.2/go.mod h1:B1r6wJpPhIiuZTmgicNoogr7XD/VS3jZu9U519GwWz4= github.com/iden3/go-merkletree-sql/v2 v2.0.4 h1:Dp089P3YNX1BE8+T1tKQHWTtnk84Y/Kr7ZAGTqwscoY= github.com/iden3/go-merkletree-sql/v2 v2.0.4/go.mod h1:kRhHKYpui5DUsry5RpveP6IC4XMe6iApdV9VChRYuEk= github.com/iden3/go-rapidsnark/prover v0.0.10 h1:NvOfRPpex/k646UsqOcUy7a7uVl17t4ok9kWvpQg4+k= @@ -89,16 +90,16 @@ github.com/iden3/go-rapidsnark/witness/v2 v2.0.0 h1:mkY6VDfwKVJc83QGKmwVXY2LYepi github.com/iden3/go-rapidsnark/witness/v2 v2.0.0/go.mod h1:3JRjqUfW1hgI9hzLDO0v8z/DUkR0ZUehhYLlnIfRxnA= github.com/iden3/go-rapidsnark/witness/wazero v0.0.0-20230524142950-0986cf057d4e h1:WeiFCrpj5pLRtSA4Mg03yTrSZhHHqN/k5b6bwxd9/tY= github.com/iden3/go-rapidsnark/witness/wazero v0.0.0-20230524142950-0986cf057d4e/go.mod h1:UEBifEzw62T6VzIHJeHuUgeLg2U/J9ttf7hOwQEqnYk= -github.com/iden3/go-schema-processor/v2 v2.0.0 h1:izbC5+rd7rV1np+tjCqDe016qlOKu6JF7r8LQvdObWM= -github.com/iden3/go-schema-processor/v2 v2.0.0/go.mod h1:eWRQDbxixZ/9k/uPlciKIy6TUYlKX/6hdqyTuAQi3wE= -github.com/iden3/iden3comm/v2 v2.0.0 h1:cFDfF6aJ589ENg5zlTBEPK6Qqv4I11C/gliAWZORpyY= -github.com/iden3/iden3comm/v2 v2.0.0/go.mod h1:wrXoxi8eoQSLopatRW5+hYF9lDRvzGL2As9ZE88q/kA= -github.com/ipfs/boxo v0.8.0 h1:UdjAJmHzQHo/j3g3b1bAcAXCj/GM6iTwvSlBDvPBNBs= -github.com/ipfs/boxo v0.8.0/go.mod h1:RIsi4CnTyQ7AUsNn5gXljJYZlQrHBMnJp94p73liFiA= +github.com/iden3/go-schema-processor/v2 v2.3.3 h1:GfChxMZHG4miA3p/5rLIrM7TGmKu/oAAXgLloYTBHSI= +github.com/iden3/go-schema-processor/v2 v2.3.3/go.mod h1:8y/R0iQpYhyhRQ3sL4F5Aja3+1T68M6uwGQdC4pQ4X0= +github.com/iden3/iden3comm/v2 v2.3.2 h1:ulD0oI/+qsEmnHVELWrxdLNvQOOWr/JLVMFXzEVbr5E= +github.com/iden3/iden3comm/v2 v2.3.2/go.mod h1:HVdSjre4og+kdJ5Cqe2b3Dt2ccOogOdfyWwKaUSAelw= +github.com/ipfs/boxo v0.12.0 h1:AXHg/1ONZdRQHQLgG5JHsSC3XoE4DjCAMgK+asZvUcQ= +github.com/ipfs/boxo v0.12.0/go.mod h1:xAnfiU6PtxWCnRqu7dcXQ10bB5/kvI1kXRotuGqGBhg= github.com/ipfs/go-cid v0.4.1 h1:A/T3qGvxi4kpKWWcPC/PgbvDA2bjVLO7n4UeVwnbs/s= github.com/ipfs/go-cid v0.4.1/go.mod h1:uQHwDeX4c6CtyrFwdqyhpNcxVewur1M7l7fNU7LKwZk= -github.com/ipfs/go-ipfs-api v0.6.0 h1:JARgG0VTbjyVhO5ZfesnbXv9wTcMvoKRBLF1SzJqzmg= -github.com/ipfs/go-ipfs-api v0.6.0/go.mod h1:iDC2VMwN9LUpQV/GzEeZ2zNqd8NUdRmWcFM+K/6odf0= +github.com/ipfs/go-ipfs-api v0.7.0 h1:CMBNCUl0b45coC+lQCXEVpMhwoqjiaCwUIrM+coYW2Q= +github.com/ipfs/go-ipfs-api v0.7.0/go.mod h1:AIxsTNB0+ZhkqIfTZpdZ0VR/cpX5zrXjATa3prSay3g= github.com/jackpal/go-nat-pmp v1.0.2 h1:KzKSgb7qkJvOUTqYl9/Hg/me3pWgBmERKrTGD7BdWus= github.com/klauspost/compress v1.16.5 h1:IFV2oUNUzZaz+XyusxpLzpzS8Pt5rh0Z16For/djlyI= github.com/klauspost/cpuid/v2 v2.2.5 h1:0E5MSMDEoAulmXNFquVs//DdoomxaoTY1kUhbc/qbZg= @@ -142,16 +143,14 @@ github.com/multiformats/go-base32 v0.1.0 h1:pVx9xoSPqEIQG8o+UbAe7DNi51oej1NtK+aG github.com/multiformats/go-base32 v0.1.0/go.mod h1:Kj3tFY6zNr+ABYMqeUNeGvkIC/UYgtWibDcT0rExnbI= github.com/multiformats/go-base36 v0.2.0 h1:lFsAbNOGeKtuKozrtBsAkSVhv1p9D0/qedU9rQyccr0= github.com/multiformats/go-base36 v0.2.0/go.mod h1:qvnKE++v+2MWCfePClUEjE78Z7P2a1UV0xHgWc0hkp4= -github.com/multiformats/go-multiaddr v0.9.0 h1:3h4V1LHIk5w4hJHekMKWALPXErDfz/sggzwC/NcqbDQ= -github.com/multiformats/go-multiaddr v0.9.0/go.mod h1:mI67Lb1EeTOYb8GQfL/7wpIZwc46ElrvzhYnoJOmTT0= github.com/multiformats/go-multiaddr v0.12.1 h1:vm+BA/WZA8QZDp1pF1FWhi5CT3g1tbi5GJmqpb6wnlk= github.com/multiformats/go-multiaddr v0.12.1/go.mod h1:7mPkiBMmLeFipt+nNSq9pHZUeJSt8lHBgH6yhj0YQzE= github.com/multiformats/go-multibase v0.2.0 h1:isdYCVLvksgWlMW9OZRYJEa9pZETFivncJHmHnnd87g= github.com/multiformats/go-multibase v0.2.0/go.mod h1:bFBZX4lKCA/2lyOFSAoKH5SS6oPyjtnzK/XTFDPkNuk= github.com/multiformats/go-multicodec v0.9.0 h1:pb/dlPnzee/Sxv/j4PmkDRxCOi3hXTz3IbPKOXWJkmg= github.com/multiformats/go-multicodec v0.9.0/go.mod h1:L3QTQvMIaVBkXOXXtVmYE+LI16i14xuaojr/H7Ai54k= -github.com/multiformats/go-multihash v0.2.2 h1:Uu7LWs/PmWby1gkj1S1DXx3zyd3aVabA4FiMKn/2tAc= -github.com/multiformats/go-multihash v0.2.2/go.mod h1:dXgKXCXjBzdscBLk9JkjINiEsCKRVch90MdaGiKsvSM= +github.com/multiformats/go-multihash v0.2.3 h1:7Lyc8XfX/IY2jWb/gI7JP+o7JEq9hOa7BFvVU9RSh+U= +github.com/multiformats/go-multihash v0.2.3/go.mod h1:dXgKXCXjBzdscBLk9JkjINiEsCKRVch90MdaGiKsvSM= github.com/multiformats/go-multistream v0.4.1 h1:rFy0Iiyn3YT0asivDUIR05leAdwZq3de4741sbiSdfo= github.com/multiformats/go-multistream v0.4.1/go.mod h1:Mz5eykRVAjJWckE2U78c6xqdtyNUEhKSM0Lwar2p77Q= github.com/multiformats/go-varint v0.0.7 h1:sWSGR+f/eu5ABZA2ZpYKBILXTTs9JWpdEM/nEGOHFS8= @@ -198,19 +197,15 @@ github.com/tklauser/numcpus v0.6.0 h1:kebhY2Qt+3U6RNK7UqpYNA+tJ23IBEGKkB7JQBfDYm github.com/tklauser/numcpus v0.6.0/go.mod h1:FEZLMke0lhOUG6w2JadTzp0a+Nl8PF/GFkQ5UVIcaL4= github.com/tyler-smith/go-bip39 v1.1.0 h1:5eUemwrMargf3BSLRRCalXT93Ns6pQJIjYQN2nyfOP8= github.com/urfave/cli/v2 v2.17.2-0.20221006022127-8f469abc00aa h1:5SqCsI/2Qya2bCzK15ozrqo2sZxkh0FHynJZOTVoV6Q= -github.com/whyrusleeping/tar-utils v0.0.0-20201201191210-20a61371de5b h1:wA3QeTsaAXybLL2kb2cKhCAQTHgYTMwuI8lBlJSv5V8= -github.com/whyrusleeping/tar-utils v0.0.0-20201201191210-20a61371de5b/go.mod h1:xT1Y5p2JR2PfSZihE0s4mjdJaRGp1waCTf5JzhQLBck= github.com/xrash/smetrics v0.0.0-20201216005158-039620a65673 h1:bAn7/zixMGCfxrRTfdpNzjtPYqr8smhKouy9mxVdGPU= github.com/yuin/goldmark v1.4.13/go.mod h1:6yULJ656Px+3vBD8DxQVa3kxgyrAnzto9xy5taEt/CY= github.com/yusufpapurcu/wmi v1.2.2 h1:KBNDSne4vP5mbSWnJbO+51IMOXJB67QiYCSBrubbPRg= github.com/yusufpapurcu/wmi v1.2.2/go.mod h1:SBZ9tNy3G9/m5Oi98Zks0QjeHVDvuK0qfxQmPyzfmi0= golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= golang.org/x/crypto v0.0.0-20210921155107-089bfa567519/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc= -golang.org/x/crypto v0.12.0 h1:tFM/ta59kqch6LlvYnPa0yx5a83cL2nHflFhYKvv9Yk= golang.org/x/crypto v0.12.0/go.mod h1:NF0Gs7EO5K4qLn+Ylc+fih8BSTeIjAP05siRnAh98yw= golang.org/x/crypto v0.17.0 h1:r8bRNjWL3GshPW3gkd+RpvzWrZAwPS49OmTGZ/uhM4k= golang.org/x/crypto v0.17.0/go.mod h1:gCAAfMLgwOJRpTjQ2zCCt2OcSfYMTeZVSRtQlPC7Nq4= -golang.org/x/exp v0.0.0-20230321023759-10a507213a29 h1:ooxPy7fPvB4kwsA2h+iBNHkAbp/4JxTSwCmvdjEYmug= golang.org/x/exp v0.0.0-20230725012225-302865e7556b h1:tK7yjGqVRzYdXsBcfD2MLhFAhHfDgGLm2rY1ub7FA9k= golang.org/x/exp v0.0.0-20230725012225-302865e7556b/go.mod h1:FXUEEKJgO7OQYeo8N01OfiKP8RXMtf6e8aTskBGqWdc= golang.org/x/mod v0.6.0-dev.0.20220419223038-86c51ed26bb4/go.mod h1:jJ57K6gSWd91VN4djpZkiMVwK6gcyfeH4XE8wZrZaV4= @@ -235,7 +230,6 @@ golang.org/x/sys v0.0.0-20220908164124-27713097b956/go.mod h1:oPkhp1MJrh7nUepCBc golang.org/x/sys v0.2.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.5.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.8.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.11.0 h1:eG7RXZHdqOJ1i+0lgLgCpSXAp6M3LYlAo6osgSi0xOM= golang.org/x/sys v0.11.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.15.0 h1:h48lPFYpsTvQJZF4EKyI4aLHaev3CxivZmv7yZig9pc= golang.org/x/sys v0.15.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= @@ -249,8 +243,8 @@ golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= golang.org/x/text v0.3.7/go.mod h1:u+2+/6zg+i71rQMx5EYifcz6MCKuco9NR6JIITiCfzQ= golang.org/x/text v0.7.0/go.mod h1:mrYo+phRRbMaCq/xk9113O4dZlRixOauAjOtrjsXDZ8= golang.org/x/text v0.9.0/go.mod h1:e1OnstbJyHTd6l/uOt8jFFHp6TRDWZR/bV3emEE/zU8= -golang.org/x/text v0.12.0 h1:k+n5B8goJNdU7hSvEtMUz3d1Q6D/XW4COJSJR6fN0mc= golang.org/x/text v0.12.0/go.mod h1:TvPlkZtksWOMsz7fbANvkp4WM8x/WCo/om8BMLbz+aE= +golang.org/x/text v0.14.0 h1:ScX5w1eTa3QqT8oi6+ziP7dTV1S2+ALU0bI+0zXKWiQ= golang.org/x/time v0.0.0-20220922220347-f3bd1da661af h1:Yx9k8YCG3dvF87UAn2tu2HQLf2dt/eR1bXxpLMWeH+Y= golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20191119224855-298f0cb1881e/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= From 65bcca21404bdc1d9bd2244fd29cd220cd14d936 Mon Sep 17 00:00:00 2001 From: Dimasik Kolezhniuk Date: Tue, 16 Apr 2024 17:01:15 +0200 Subject: [PATCH 3/5] fix go --- verifier-integration/go/index.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/verifier-integration/go/index.go b/verifier-integration/go/index.go index fd5ff00..4458b24 100644 --- a/verifier-integration/go/index.go +++ b/verifier-integration/go/index.go @@ -52,10 +52,10 @@ func GetAuthRequest(w http.ResponseWriter, r *http.Request) { "allowedIssuers": []string{"*"}, "credentialSubject": map[string]interface{}{ "birthday": map[string]interface{}{ - "$lt": 20000101, + "$eq": 1713267016597, }, }, - "context": "https://raw.githubusercontent.com/iden3/claim-schema-vocab/main/schemas/json-ld/kyc-v3.json-ld", + "context": "https://raw.githubusercontent.com/iden3/claim-schema-vocab/main/schemas/json-ld/kyc-v4.jsonld", "type": "KYCAgeCredential", } request.Body.Scope = append(request.Body.Scope, mtpProofRequest) From 2fa1c31aed05dc8661640fa4f11fbdd2d341ee7f Mon Sep 17 00:00:00 2001 From: Dimasik Kolezhniuk Date: Tue, 16 Apr 2024 17:42:20 +0200 Subject: [PATCH 4/5] Update url --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 9a5bb3c..c017138 100644 --- a/README.md +++ b/README.md @@ -1,3 +1,3 @@ # tutorial-examples -Support files for Polygon ID tutorial => +Support files for [Polygon ID tutorial](https://devs.polygonid.com/docs/quick-start-demo) From df8e1be1135f7feac565d831cec6361ed38aa360 Mon Sep 17 00:00:00 2001 From: Dimasik Kolezhniuk Date: Tue, 16 Apr 2024 17:42:57 +0200 Subject: [PATCH 5/5] update readme#2 --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index c017138..9c4dbf2 100644 --- a/README.md +++ b/README.md @@ -1,3 +1,3 @@ # tutorial-examples -Support files for [Polygon ID tutorial](https://devs.polygonid.com/docs/quick-start-demo) +For additional info please visit [Polygon ID tutorial](https://devs.polygonid.com/docs/quick-start-demo)