From f811af04032098b0fd423e31284a38f2a568599e Mon Sep 17 00:00:00 2001 From: Lucian Hymer Date: Mon, 30 Dec 2024 12:07:08 -0700 Subject: [PATCH 1/8] wip --- iam/package.json | 4 ++-- identity/src/credentials.ts | 20 +++++++++++++++++++- yarn.lock | 11 ++++++++--- 3 files changed, 29 insertions(+), 6 deletions(-) diff --git a/iam/package.json b/iam/package.json index 6b6ee58549..7abf61754f 100644 --- a/iam/package.json +++ b/iam/package.json @@ -31,8 +31,9 @@ "@gitcoin/passport-identity": "^1.0.0", "@gitcoin/passport-platforms": "^1.0.0", "@gitcoin/passport-types": "^1.0.0", + "@holonym-foundation/mishtiwasm": "^0.3.0-robustnet", + "@ipld/dag-cbor": "^7.0.3", "@spruceid/didkit-wasm-node": "^0.2.1", - "multiformats": "^13.0.1", "axios": "^0.27.2", "brightid_sdk": "^1.0.1", "cors": "^2.8.5", @@ -41,7 +42,6 @@ "ethers": "^6.13.4", "express": "4", "google-auth-library": "^7.14.1", - "@ipld/dag-cbor": "^7.0.3", "luxon": "^2.4.0", "moralis": "^2.24.2", "multiformats": "^9.9.0", diff --git a/identity/src/credentials.ts b/identity/src/credentials.ts index 3527456f26..7c733d4ea5 100644 --- a/identity/src/credentials.ts +++ b/identity/src/credentials.ts @@ -20,6 +20,9 @@ import * as base64 from "@ethersproject/base64"; // --- Crypto lib for hashing import { createHash } from "crypto"; +import initMishtiWasm, { InitOutput, generate_oprf } from "@holonym-foundation/mishtiwasm"; +let mishti: InitOutput | undefined; + // Keeping track of the hashing mechanism (algo + content) export const VERSION = "v0.0.0"; @@ -32,7 +35,7 @@ import { challengeSignatureDocument, DocumentType, stampCredentialDocument, -} from "./signingDocuments"; +} from "./signingDocuments.js"; // Control expiry times of issued credentials export const CHALLENGE_EXPIRES_AFTER_SECONDS = 60; // 1min @@ -212,6 +215,21 @@ export const issueHashedCredential = async ( // Generate a hash like SHA256(IAM_PRIVATE_KEY+PII), where PII is the (deterministic) JSON representation // of the PII object after transforming it to an array of the form [[key:string, value:string], ...] // with the elements sorted by key + // important to call init -- wasm is initialized asynchronously. + // without it, the other functions won't work + if (mishti === undefined) { + mishti = await initMishtiWasm(); + } + + const nullifier = await generate_oprf( + "0xde7642ddc5c6315505dd4ecd2d82a93cf2bc81ae1b1ca505f1a0647308a5da61", + // JSON.stringify(objToSortedArray(record)), + "usr:1234", + "OPRFSecp256k1", + "http://192.168.0.33:8081" + ); + + console.log("nullifier", nullifier); const hash = base64.encode( createHash("sha256") .update(key, "utf-8") diff --git a/yarn.lock b/yarn.lock index bf17aeda6d..7c47b66baa 100644 --- a/yarn.lock +++ b/yarn.lock @@ -6046,6 +6046,11 @@ resolved "https://registry.yarnpkg.com/@heroicons/react/-/react-2.0.17.tgz#42a8086bc434ceefc03592f20c4e81b11e915cf8" integrity sha512-90GMZktkA53YbNzHp6asVEDevUQCMtxWH+2UK2S8OpnLEu7qckTJPhNxNQG52xIR1WFTwFqtH6bt7a60ZNcLLA== +"@holonym-foundation/mishtiwasm@^0.3.0-robustnet": + version "0.3.0-robustnet" + resolved "https://registry.yarnpkg.com/@holonym-foundation/mishtiwasm/-/mishtiwasm-0.3.0-robustnet.tgz#621cec90bae996aeb0eb396f77d256b3abe81668" + integrity sha512-0wCFQdeDx1XDsKcc7/jnnADY60kBf1HhbswS5rZ46kD9ZbPzm1LDYAmC5k7FLmgaCmyJdeGewLiSX1xSzFOFZQ== + "@humanwhocodes/config-array@^0.11.13": version "0.11.14" resolved "https://registry.yarnpkg.com/@humanwhocodes/config-array/-/config-array-0.11.14.tgz#d78e481a039f7566ecc9660b4ea7fe6b1fec442b" @@ -11477,9 +11482,9 @@ agentkeepalive@^4.1.3: humanize-ms "^1.2.1" agentkeepalive@^4.2.1: - version "4.5.0" - resolved "https://registry.yarnpkg.com/agentkeepalive/-/agentkeepalive-4.5.0.tgz#2673ad1389b3c418c5a20c5d7364f93ca04be923" - integrity sha512-5GG/5IbQQpC9FpkRGsSvZI5QYeSCzlJHdpBQntCsuTOxhKD8lqKhrleg2Yi7yvMIf82Ycmmqln9U8V9qwEiJew== + version "4.6.0" + resolved "https://registry.yarnpkg.com/agentkeepalive/-/agentkeepalive-4.6.0.tgz#35f73e94b3f40bf65f105219c623ad19c136ea6a" + integrity sha512-kja8j7PjmncONqaTsB8fQ+wE2mSU2DJ9D4XKoJ5PFWIdRMa6SLSN1ff4mOr4jCbfRSsxR4keIiySJU0N9T5hIQ== dependencies: humanize-ms "^1.2.1" From b602c8de7caff7c40c7c812ec231bf660291497e Mon Sep 17 00:00:00 2001 From: Lucian Hymer Date: Mon, 30 Dec 2024 13:39:13 -0700 Subject: [PATCH 2/8] feat(iam): build working with mishtiwasm --- iam/__tests__/additional_signer.test.ts | 4 +- iam/__tests__/autoVerification.test.ts | 2 +- iam/__tests__/challenge.test.ts | 2 +- iam/__tests__/credential_issuance.test.ts | 4 +- iam/__tests__/easFees.test.ts | 2 +- iam/__tests__/easPassportSchema.test.ts | 4 +- iam/__tests__/easStampSchema.test.ts | 2 +- iam/__tests__/index.test.ts | 18 ++++---- iam/__tests__/index_eas_score.test.ts | 10 ++-- iam/__tests__/scorerService.test.ts | 4 +- iam/__tests__/scrollDevBadge.test.ts | 8 ++-- iam/package.json | 2 +- iam/src/missingTypes.d.ts | 42 +++++++++++++++++ iam/src/scripts/buildProviderBitMapInfo.ts | 2 +- iam/src/utils/credentials.ts | 54 ++++++++++++++-------- iam/src/utils/scorerService.ts | 2 +- iam/src/utils/verifyDidChallenge.ts | 9 ++-- iam/tsconfig.json | 4 +- identity/src/credentials.ts | 47 ++++++++----------- yarn.lock | 14 ++++++ 20 files changed, 151 insertions(+), 85 deletions(-) create mode 100644 iam/src/missingTypes.d.ts diff --git a/iam/__tests__/additional_signer.test.ts b/iam/__tests__/additional_signer.test.ts index b798b9e1b0..4d701ca787 100644 --- a/iam/__tests__/additional_signer.test.ts +++ b/iam/__tests__/additional_signer.test.ts @@ -2,8 +2,8 @@ import request from "supertest"; // ---- Test subject -import { app } from "../src/index"; -import { getEip712Issuer } from "../src/issuers"; +import { app } from "../src/index.js"; +import { getEip712Issuer } from "../src/issuers.js"; const issuer = getEip712Issuer(); diff --git a/iam/__tests__/autoVerification.test.ts b/iam/__tests__/autoVerification.test.ts index 2544253742..fa90c09f44 100644 --- a/iam/__tests__/autoVerification.test.ts +++ b/iam/__tests__/autoVerification.test.ts @@ -1,7 +1,7 @@ import { Request, Response } from "express"; import { isAddress } from "ethers"; import axios from "axios"; -import { autoVerificationHandler } from "../src/utils/autoVerification"; +import { autoVerificationHandler } from "../src/utils/autoVerification.js"; import { ApiError } from "../src/utils/helpers.js"; import { checkConditionsAndIssueCredentials } from "../src/utils/credentials.js"; import { VerifiableCredential } from "@gitcoin/passport-types"; diff --git a/iam/__tests__/challenge.test.ts b/iam/__tests__/challenge.test.ts index 4f1d70a9dc..34636d26da 100644 --- a/iam/__tests__/challenge.test.ts +++ b/iam/__tests__/challenge.test.ts @@ -1,5 +1,5 @@ import { RequestPayload } from "@gitcoin/passport-types"; -import { getChallenge } from "../src/utils/challenge"; +import { getChallenge } from "../src/utils/challenge.js"; describe("getChallenge", () => { it("returns a challenge for SignerChallenge", () => { diff --git a/iam/__tests__/credential_issuance.test.ts b/iam/__tests__/credential_issuance.test.ts index 1b8aeecb92..f51341df73 100644 --- a/iam/__tests__/credential_issuance.test.ts +++ b/iam/__tests__/credential_issuance.test.ts @@ -1,7 +1,7 @@ import axios from "axios"; -import { checkCredentialBans } from "../src/utils/bans"; +import { checkCredentialBans } from "../src/utils/bans.js"; import { ErrorResponseBody } from "@gitcoin/passport-types"; -import { ApiError } from "../src/utils/helpers"; +import { ApiError } from "../src/utils/helpers.js"; jest.mock("axios"); const mockedAxios = axios as jest.Mocked; diff --git a/iam/__tests__/easFees.test.ts b/iam/__tests__/easFees.test.ts index f95112a146..71f570db98 100644 --- a/iam/__tests__/easFees.test.ts +++ b/iam/__tests__/easFees.test.ts @@ -1,4 +1,4 @@ -import { getEASFeeAmount } from "../src/utils/easFees"; +import { getEASFeeAmount } from "../src/utils/easFees.js"; import { parseEther } from "ethers"; import Moralis from "moralis"; import { PassportCache } from "@gitcoin/passport-platforms"; diff --git a/iam/__tests__/easPassportSchema.test.ts b/iam/__tests__/easPassportSchema.test.ts index e628ca728c..3dec410cf1 100644 --- a/iam/__tests__/easPassportSchema.test.ts +++ b/iam/__tests__/easPassportSchema.test.ts @@ -1,5 +1,5 @@ -import * as easPassportModule from "../src/utils/easPassportSchema"; -import * as easStampModule from "../src/utils/easStampSchema"; +import * as easPassportModule from "../src/utils/easPassportSchema.js"; +import * as easStampModule from "../src/utils/easStampSchema.js"; import onchainInfo from "../../deployments/onchainInfo.json"; import { VerifiableCredential } from "@gitcoin/passport-types"; diff --git a/iam/__tests__/easStampSchema.test.ts b/iam/__tests__/easStampSchema.test.ts index 429ab75292..46a58c3bf1 100644 --- a/iam/__tests__/easStampSchema.test.ts +++ b/iam/__tests__/easStampSchema.test.ts @@ -1,4 +1,4 @@ -import * as easStampModule from "../src/utils/easStampSchema"; +import * as easStampModule from "../src/utils/easStampSchema.js"; import { VerifiableCredential } from "@gitcoin/passport-types"; import { NO_EXPIRATION, ZERO_BYTES32 } from "@ethereum-attestation-service/eas-sdk"; import { SchemaEncoder } from "@ethereum-attestation-service/eas-sdk"; diff --git a/iam/__tests__/index.test.ts b/iam/__tests__/index.test.ts index 6c0a0c5c24..83110120ce 100644 --- a/iam/__tests__/index.test.ts +++ b/iam/__tests__/index.test.ts @@ -4,8 +4,8 @@ import * as DIDKit from "@spruceid/didkit-wasm-node"; import { PassportCache, providers } from "@gitcoin/passport-platforms"; // ---- Test subject -import { app } from "../src/index"; -import { getAttestationDomainSeparator } from "../src/utils/attestations"; +import { app } from "../src/index.js"; +import { getAttestationDomainSeparator } from "../src/utils/attestations.js"; // ---- Types import { @@ -21,14 +21,14 @@ import { import { MultiAttestationRequest, ZERO_BYTES32, NO_EXPIRATION } from "@ethereum-attestation-service/eas-sdk"; import { parseEther } from "ethers"; -import * as easFeesMock from "../src/utils/easFees"; +import * as easFeesMock from "../src/utils/easFees.js"; import * as identityMock from "@gitcoin/passport-identity"; -import * as easSchemaMock from "../src/utils/easStampSchema"; -import * as easPassportSchemaMock from "../src/utils/easPassportSchema"; -import { IAMError } from "../src/utils/scorerService"; -import { VerifyDidChallengeBaseError, verifyDidChallenge } from "../src/utils/verifyDidChallenge"; -import { getEip712Issuer } from "../src/issuers"; -import { toJsonObject } from "../src/utils/json"; +import * as easSchemaMock from "../src/utils/easStampSchema.js"; +import * as easPassportSchemaMock from "../src/utils/easPassportSchema.js"; +import { IAMError } from "../src/utils/scorerService.js"; +import { VerifyDidChallengeBaseError, verifyDidChallenge } from "../src/utils/verifyDidChallenge.js"; +import { getEip712Issuer } from "../src/issuers.js"; +import { toJsonObject } from "../src/utils/json.js"; const issuer = getEip712Issuer(); diff --git a/iam/__tests__/index_eas_score.test.ts b/iam/__tests__/index_eas_score.test.ts index 016db6e5a7..a41adcf3d5 100644 --- a/iam/__tests__/index_eas_score.test.ts +++ b/iam/__tests__/index_eas_score.test.ts @@ -3,15 +3,15 @@ import request from "supertest"; import { PassportCache } from "@gitcoin/passport-platforms"; // ---- Test subject -import { app } from "../src/index"; +import { app } from "../src/index.js"; import { MultiAttestationRequest, ZERO_BYTES32, NO_EXPIRATION } from "@ethereum-attestation-service/eas-sdk"; import * as identityMock from "@gitcoin/passport-identity"; -import * as easSchemaMock from "../src/utils/easStampSchema"; -import * as easPassportSchemaMock from "../src/utils/easPassportSchema"; -import { IAMError } from "../src/utils/scorerService"; -import { serializeJson, toJsonObject } from "../src/utils/json"; +import * as easSchemaMock from "../src/utils/easStampSchema.js"; +import * as easPassportSchemaMock from "../src/utils/easPassportSchema.js"; +import { IAMError } from "../src/utils/scorerService.js"; +import { serializeJson, toJsonObject } from "../src/utils/json.js"; jest.mock("@gitcoin/passport-identity", () => ({ ...jest.requireActual("@gitcoin/passport-identity"), diff --git a/iam/__tests__/scorerService.test.ts b/iam/__tests__/scorerService.test.ts index a0d3eb4178..6c73f102cc 100644 --- a/iam/__tests__/scorerService.test.ts +++ b/iam/__tests__/scorerService.test.ts @@ -1,7 +1,7 @@ -import { fetchPassportScore } from "../src/utils/scorerService"; +import { fetchPassportScore } from "../src/utils/scorerService.js"; // Import the entire module to help with typing -import * as scorerService from "../src/utils/scorerService"; +import * as scorerService from "../src/utils/scorerService.js"; // Type for the mocked function (adjust as needed based on the actual implementation) type MockedFunction = jest.MockedFunction; diff --git a/iam/__tests__/scrollDevBadge.test.ts b/iam/__tests__/scrollDevBadge.test.ts index d5062a64c7..ab8be30ebd 100644 --- a/iam/__tests__/scrollDevBadge.test.ts +++ b/iam/__tests__/scrollDevBadge.test.ts @@ -1,9 +1,9 @@ import { Request, Response } from "express"; import { Signature, Contract } from "ethers"; -import { scrollDevBadgeHandler, getScrollRpcUrl } from "../src/utils/scrollDevBadge"; -import { getAttestationSignerForChain } from "../src/utils/attestations"; -import { hasValidIssuer } from "../src/issuers"; -import { getEASFeeAmount } from "../src/utils/easFees"; +import { scrollDevBadgeHandler, getScrollRpcUrl } from "../src/utils/scrollDevBadge.js"; +import { getAttestationSignerForChain } from "../src/utils/attestations.js"; +import { hasValidIssuer } from "../src/issuers.js"; +import { getEASFeeAmount } from "../src/utils/easFees.js"; // Mock external dependencies jest.mock("@spruceid/didkit-wasm-node"); diff --git a/iam/package.json b/iam/package.json index 7abf61754f..44dae83246 100644 --- a/iam/package.json +++ b/iam/package.json @@ -34,7 +34,7 @@ "@holonym-foundation/mishtiwasm": "^0.3.0-robustnet", "@ipld/dag-cbor": "^7.0.3", "@spruceid/didkit-wasm-node": "^0.2.1", - "axios": "^0.27.2", + "axios": "^1.7.9", "brightid_sdk": "^1.0.1", "cors": "^2.8.5", "dids": "^5.0.2", diff --git a/iam/src/missingTypes.d.ts b/iam/src/missingTypes.d.ts new file mode 100644 index 0000000000..39db6fe229 --- /dev/null +++ b/iam/src/missingTypes.d.ts @@ -0,0 +1,42 @@ +declare module "ceramic-cacao" { + export declare type Cacao = { + h: Header; + p: Payload; + s?: Signature; + }; + + export declare namespace Cacao { + function fromBlockBytes(bytes: Uint8Array): Promise; + } +} + +declare module "multiformats/cid" { + export class CID { + static decode(bytes: Uint8Array): CID; + toString(): string; + } +} + +declare module "multiformats/block" { + export class CID { + static decode(bytes: Uint8Array): CID; + toString(): string; + } + + export class Block { + cid: CID; + } + + export function encode({ + value, + codec, + hasher, + }: { + value: T; + codec: import("./codecs/interface").BlockEncoder; + hasher: import("./hashes/interface").MultihashHasher; + }): Promise>; +} + +declare module "multiformats/hashes/sha2"; +declare module "@ipld/dag-cbor"; diff --git a/iam/src/scripts/buildProviderBitMapInfo.ts b/iam/src/scripts/buildProviderBitMapInfo.ts index 18d9db7ae9..b631e068d6 100644 --- a/iam/src/scripts/buildProviderBitMapInfo.ts +++ b/iam/src/scripts/buildProviderBitMapInfo.ts @@ -3,7 +3,7 @@ import { writeFileSync } from "fs"; import { join } from "path"; import axios from "axios"; -import { StampMetadata, mapBitMapInfo } from "../utils/easPassportSchema"; +import { StampMetadata, mapBitMapInfo } from "../utils/easPassportSchema.js"; dotenv.config(); diff --git a/iam/src/utils/credentials.ts b/iam/src/utils/credentials.ts index 70f1896be7..305a4db397 100644 --- a/iam/src/utils/credentials.ts +++ b/iam/src/utils/credentials.ts @@ -12,6 +12,11 @@ import { import { getIssuerKey } from "../issuers.js"; +// Need to do this here instead of in the identity package +// so that this isn't loaded in the browser +import initMishtiWasm, { generate_oprf } from "@holonym-foundation/mishtiwasm"; +let mishtiWasmInitialized = false; + // ---- Generate & Verify methods import * as DIDKit from "@spruceid/didkit-wasm-node"; import { issueHashedCredential, verifyCredential } from "@gitcoin/passport-identity"; @@ -21,30 +26,24 @@ import { providers, platforms } from "@gitcoin/passport-platforms"; import { ApiError } from "./helpers.js"; import { checkCredentialBans } from "./bans.js"; -const providerTypePlatformMap = Object.entries(platforms).reduce( - (acc, [platformName, { providers }]) => { - providers.forEach(({ type }) => { - acc[type] = platformName; - }); +const providerTypePlatformMap = Object.entries(platforms).reduce((acc, [platformName, { providers }]) => { + providers.forEach(({ type }) => { + acc[type] = platformName; + }); - return acc; - }, - {} as { [k: string]: string } -); + return acc; +}, {} as { [k: string]: string }); function groupProviderTypesByPlatform(types: string[]): string[][] { return Object.values( - types.reduce( - (groupedProviders, type) => { - const platform = providerTypePlatformMap[type] || "generic"; + types.reduce((groupedProviders, type) => { + const platform = providerTypePlatformMap[type] || "generic"; - if (!groupedProviders[platform]) groupedProviders[platform] = []; - groupedProviders[platform].push(type); + if (!groupedProviders[platform]) groupedProviders[platform] = []; + groupedProviders[platform].push(type); - return groupedProviders; - }, - {} as { [k: keyof typeof platforms]: string[] } - ) + return groupedProviders; + }, {} as { [k: keyof typeof platforms]: string[] }) ); } @@ -54,6 +53,10 @@ const issueCredentials = async ( address: string, payload: RequestPayload ): Promise => { + if (!mishtiWasmInitialized) { + await initMishtiWasm(); + mishtiWasmInitialized = true; + } // if the payload includes an additional signer, use that to issue credential. if (payload.signer) { // We can assume that the signer is a valid address because the challenge was verified within the /verify endpoint @@ -89,7 +92,20 @@ const issueCredentials = async ( address, record, verifyResult.expiresInSeconds, - payload.signatureType + payload.signatureType, + async () => { + const nullifier = await generate_oprf( + process.env.TMP_PRIVATE_KEY, + // JSON.stringify(objToSortedArray(record)), + "usr:1234", + "OPRFSecp256k1", + "http://192.168.0.33:8081" + ); + + console.log("nullifier", nullifier); + + return nullifier; + } )); } } catch { diff --git a/iam/src/utils/scorerService.ts b/iam/src/utils/scorerService.ts index de5dc9416b..0def230c4d 100644 --- a/iam/src/utils/scorerService.ts +++ b/iam/src/utils/scorerService.ts @@ -1,5 +1,5 @@ import axios from "axios"; -import { Score } from "./easStampSchema"; +import { Score } from "./easStampSchema.js"; import { handleAxiosError } from "@gitcoin/passport-platforms"; export class IAMError extends Error { diff --git a/iam/src/utils/verifyDidChallenge.ts b/iam/src/utils/verifyDidChallenge.ts index 0d0da2eabb..15e2b7ef01 100644 --- a/iam/src/utils/verifyDidChallenge.ts +++ b/iam/src/utils/verifyDidChallenge.ts @@ -4,9 +4,8 @@ import { Cacao } from "ceramic-cacao"; import { CID } from "multiformats/cid"; import { SignedDidChallenge } from "@gitcoin/passport-types"; import * as dagCBOR from "@ipld/dag-cbor"; -import { encode } from "multiformats/block"; +import { encode, Block } from "multiformats/block"; import { sha256 } from "multiformats/hashes/sha2"; -import { MAX_VALID_DID_SESSION_AGE } from "@gitcoin/passport-identity"; export class VerifyDidChallengeBaseError extends Error {} @@ -36,7 +35,11 @@ const verifyMatchesExpectedChallenge = async ( expectedChallenge: string ): Promise => { try { - const expectedBlock = await encode({ value: expectedChallenge, codec: dagCBOR, hasher: sha256 }); + const expectedBlock: Block = await encode({ + value: expectedChallenge, + codec: dagCBOR, + hasher: sha256, + }); const signedCID = CID.decode(new Uint8Array(signedChallenge.cid)); diff --git a/iam/tsconfig.json b/iam/tsconfig.json index 1cdb01b9c5..cf299a73f3 100644 --- a/iam/tsconfig.json +++ b/iam/tsconfig.json @@ -1,13 +1,13 @@ { "extends": "../tsconfig.settings.json", "compilerOptions": { - "module": "esnext", + "module": "NodeNext", "esModuleInterop": true, "allowSyntheticDefaultImports": true, "allowJs": true, "target": "es6", "noImplicitAny": true, - "moduleResolution": "node", + "moduleResolution": "nodenext", "sourceMap": true, "outDir": "dist", "baseUrl": ".", diff --git a/identity/src/credentials.ts b/identity/src/credentials.ts index 7c733d4ea5..c228f5b13b 100644 --- a/identity/src/credentials.ts +++ b/identity/src/credentials.ts @@ -20,9 +20,6 @@ import * as base64 from "@ethersproject/base64"; // --- Crypto lib for hashing import { createHash } from "crypto"; -import initMishtiWasm, { InitOutput, generate_oprf } from "@holonym-foundation/mishtiwasm"; -let mishti: InitOutput | undefined; - // Keeping track of the hashing mechanism (algo + content) export const VERSION = "v0.0.0"; @@ -203,6 +200,22 @@ export const issueChallengeCredential = async ( } as IssuedCredential; }; +const getNullifier = ({ key, record, oprf }: { key: string; record: ProofRecord; oprf?: () => Promise }) => { + if (oprf) { + return oprf(); + } else { + // Generate a hash like SHA256(IAM_PRIVATE_KEY+PII), where PII is the (deterministic) JSON representation + // of the PII object after transforming it to an array of the form [[key:string, value:string], ...] + // with the elements sorted by key + return base64.encode( + createHash("sha256") + .update(key, "utf-8") + .update(JSON.stringify(objToSortedArray(record))) + .digest() + ); + } +}; + // Return a verifiable credential with embedded hash export const issueHashedCredential = async ( DIDKit: DIDKitLib, @@ -210,32 +223,10 @@ export const issueHashedCredential = async ( address: string, record: ProofRecord, expiresInSeconds: number = CREDENTIAL_EXPIRES_AFTER_SECONDS, - signatureType?: string + signatureType?: string, + oprf?: () => Promise ): Promise => { - // Generate a hash like SHA256(IAM_PRIVATE_KEY+PII), where PII is the (deterministic) JSON representation - // of the PII object after transforming it to an array of the form [[key:string, value:string], ...] - // with the elements sorted by key - // important to call init -- wasm is initialized asynchronously. - // without it, the other functions won't work - if (mishti === undefined) { - mishti = await initMishtiWasm(); - } - - const nullifier = await generate_oprf( - "0xde7642ddc5c6315505dd4ecd2d82a93cf2bc81ae1b1ca505f1a0647308a5da61", - // JSON.stringify(objToSortedArray(record)), - "usr:1234", - "OPRFSecp256k1", - "http://192.168.0.33:8081" - ); - - console.log("nullifier", nullifier); - const hash = base64.encode( - createHash("sha256") - .update(key, "utf-8") - .update(JSON.stringify(objToSortedArray(record))) - .digest() - ); + const hash = getNullifier({ key, record, oprf }); let credential: VerifiableCredential; if (signatureType === "EIP712") { diff --git a/yarn.lock b/yarn.lock index 7c47b66baa..6da6d9860f 100644 --- a/yarn.lock +++ b/yarn.lock @@ -12025,6 +12025,15 @@ axios@^1.2.1: form-data "^4.0.0" proxy-from-env "^1.1.0" +axios@^1.7.9: + version "1.7.9" + resolved "https://registry.yarnpkg.com/axios/-/axios-1.7.9.tgz#d7d071380c132a24accda1b2cfc1535b79ec650a" + integrity sha512-LhLcE7Hbiryz8oMDdDptSrWowmB4Bl6RCt6sIJKpRB4XtVf0iEgewX3au/pJqm+Py1kCASkb/FFKjxQaLtxJvw== + dependencies: + follow-redirects "^1.15.6" + form-data "^4.0.0" + proxy-from-env "^1.1.0" + axobject-query@^3.2.1: version "3.2.1" resolved "https://registry.yarnpkg.com/axobject-query/-/axobject-query-3.2.1.tgz#39c378a6e3b06ca679f29138151e45b2b32da62a" @@ -16245,6 +16254,11 @@ follow-redirects@^1.12.1, follow-redirects@^1.14.0, follow-redirects@^1.14.4, fo resolved "https://registry.yarnpkg.com/follow-redirects/-/follow-redirects-1.15.2.tgz#b460864144ba63f2681096f274c4e57026da2c13" integrity sha512-VQLG33o04KaQ8uYi2tVNbdrWp1QWxNNea+nmIB4EVM28v0hmP17z7aG1+wAkNzVq4KeXTq3221ye5qTJP91JwA== +follow-redirects@^1.15.6: + version "1.15.9" + resolved "https://registry.yarnpkg.com/follow-redirects/-/follow-redirects-1.15.9.tgz#a604fa10e443bf98ca94228d9eebcc2e8a2c8ee1" + integrity sha512-gew4GsXizNgdoRyqmyfMHyAmXsZDk6mHkSxZFCzW9gwlbtOW44CDtYavM+y+72qD/Vq2l550kMF52DT8fOLJqQ== + for-each@^0.3.3: version "0.3.3" resolved "https://registry.yarnpkg.com/for-each/-/for-each-0.3.3.tgz#69b447e88a0a5d32c3e7084f3f1710034b21376e" From 2a487beb38a21519a3a00589b559f594e5d2d967 Mon Sep 17 00:00:00 2001 From: Lucian Hymer Date: Mon, 30 Dec 2024 13:46:35 -0700 Subject: [PATCH 3/8] fix lint --- iam/src/utils/credentials.ts | 30 ++++++++++++++++++------------ 1 file changed, 18 insertions(+), 12 deletions(-) diff --git a/iam/src/utils/credentials.ts b/iam/src/utils/credentials.ts index 305a4db397..2124c127f6 100644 --- a/iam/src/utils/credentials.ts +++ b/iam/src/utils/credentials.ts @@ -26,24 +26,30 @@ import { providers, platforms } from "@gitcoin/passport-platforms"; import { ApiError } from "./helpers.js"; import { checkCredentialBans } from "./bans.js"; -const providerTypePlatformMap = Object.entries(platforms).reduce((acc, [platformName, { providers }]) => { - providers.forEach(({ type }) => { - acc[type] = platformName; - }); +const providerTypePlatformMap = Object.entries(platforms).reduce( + (acc, [platformName, { providers }]) => { + providers.forEach(({ type }) => { + acc[type] = platformName; + }); - return acc; -}, {} as { [k: string]: string }); + return acc; + }, + {} as { [k: string]: string } +); function groupProviderTypesByPlatform(types: string[]): string[][] { return Object.values( - types.reduce((groupedProviders, type) => { - const platform = providerTypePlatformMap[type] || "generic"; + types.reduce( + (groupedProviders, type) => { + const platform = providerTypePlatformMap[type] || "generic"; - if (!groupedProviders[platform]) groupedProviders[platform] = []; - groupedProviders[platform].push(type); + if (!groupedProviders[platform]) groupedProviders[platform] = []; + groupedProviders[platform].push(type); - return groupedProviders; - }, {} as { [k: keyof typeof platforms]: string[] }) + return groupedProviders; + }, + {} as { [k: keyof typeof platforms]: string[] } + ) ); } From cd971a5a513342ce8a6437c34ceee1266a9cb574 Mon Sep 17 00:00:00 2001 From: Lucian Hymer Date: Thu, 2 Jan 2025 08:53:29 -0800 Subject: [PATCH 4/8] successful init --- iam/package.json | 2 +- iam/src/index.ts | 1 + iam/src/utils/credentials.ts | 62 ++++++++++++++++-------------------- yarn.lock | 8 ++--- 4 files changed, 34 insertions(+), 39 deletions(-) diff --git a/iam/package.json b/iam/package.json index 44dae83246..68a79088b3 100644 --- a/iam/package.json +++ b/iam/package.json @@ -31,7 +31,7 @@ "@gitcoin/passport-identity": "^1.0.0", "@gitcoin/passport-platforms": "^1.0.0", "@gitcoin/passport-types": "^1.0.0", - "@holonym-foundation/mishtiwasm": "^0.3.0-robustnet", + "@holonym-foundation/mishtiwasm": "0.2.2", "@ipld/dag-cbor": "^7.0.3", "@spruceid/didkit-wasm-node": "^0.2.1", "axios": "^1.7.9", diff --git a/iam/src/index.ts b/iam/src/index.ts index 958e37207f..31140b2d59 100644 --- a/iam/src/index.ts +++ b/iam/src/index.ts @@ -254,6 +254,7 @@ app.post("/api/v0.0.0/verify", (req: Request, res: Response): void => { return void errorRes(res, "Unable to verify payload", 401); }) .catch((error) => { + console.log("ERROR", error); if (error instanceof ApiError) { return void errorRes(res, error.message, error.code); } diff --git a/iam/src/utils/credentials.ts b/iam/src/utils/credentials.ts index 2124c127f6..f57b6c94a5 100644 --- a/iam/src/utils/credentials.ts +++ b/iam/src/utils/credentials.ts @@ -12,11 +12,6 @@ import { import { getIssuerKey } from "../issuers.js"; -// Need to do this here instead of in the identity package -// so that this isn't loaded in the browser -import initMishtiWasm, { generate_oprf } from "@holonym-foundation/mishtiwasm"; -let mishtiWasmInitialized = false; - // ---- Generate & Verify methods import * as DIDKit from "@spruceid/didkit-wasm-node"; import { issueHashedCredential, verifyCredential } from "@gitcoin/passport-identity"; @@ -25,31 +20,26 @@ import { issueHashedCredential, verifyCredential } from "@gitcoin/passport-ident import { providers, platforms } from "@gitcoin/passport-platforms"; import { ApiError } from "./helpers.js"; import { checkCredentialBans } from "./bans.js"; +import { readFileSync } from "fs"; -const providerTypePlatformMap = Object.entries(platforms).reduce( - (acc, [platformName, { providers }]) => { - providers.forEach(({ type }) => { - acc[type] = platformName; - }); +const providerTypePlatformMap = Object.entries(platforms).reduce((acc, [platformName, { providers }]) => { + providers.forEach(({ type }) => { + acc[type] = platformName; + }); - return acc; - }, - {} as { [k: string]: string } -); + return acc; +}, {} as { [k: string]: string }); function groupProviderTypesByPlatform(types: string[]): string[][] { return Object.values( - types.reduce( - (groupedProviders, type) => { - const platform = providerTypePlatformMap[type] || "generic"; + types.reduce((groupedProviders, type) => { + const platform = providerTypePlatformMap[type] || "generic"; - if (!groupedProviders[platform]) groupedProviders[platform] = []; - groupedProviders[platform].push(type); + if (!groupedProviders[platform]) groupedProviders[platform] = []; + groupedProviders[platform].push(type); - return groupedProviders; - }, - {} as { [k: keyof typeof platforms]: string[] } - ) + return groupedProviders; + }, {} as { [k: keyof typeof platforms]: string[] }) ); } @@ -59,10 +49,6 @@ const issueCredentials = async ( address: string, payload: RequestPayload ): Promise => { - if (!mishtiWasmInitialized) { - await initMishtiWasm(); - mishtiWasmInitialized = true; - } // if the payload includes an additional signer, use that to issue credential. if (payload.signer) { // We can assume that the signer is a valid address because the challenge was verified within the /verify endpoint @@ -100,17 +86,25 @@ const issueCredentials = async ( verifyResult.expiresInSeconds, payload.signatureType, async () => { - const nullifier = await generate_oprf( - process.env.TMP_PRIVATE_KEY, - // JSON.stringify(objToSortedArray(record)), - "usr:1234", - "OPRFSecp256k1", - "http://192.168.0.33:8081" + // Need to do this here instead of in the identity package + // so that this isn't loaded in the browser + const mishtiWasm = await import("@holonym-foundation/mishtiwasm"); + + const wasmModuleBuffer = readFileSync( + "/Users/lucian/projects/passport/node_modules/@holonym-foundation/mishtiwasm/pkg/esm/mishtiwasm_bg.wasm" ); + console.log("Loaded wasm module"); + + mishtiWasm.initSync(wasmModuleBuffer); + + console.log("Initialized wasm module"); + + const nullifier = await mishtiWasm.make_jwt_request("abc", "def"); + console.log("nullifier", nullifier); - return nullifier; + return nullifier as string; } )); } diff --git a/yarn.lock b/yarn.lock index 6da6d9860f..1585e93db5 100644 --- a/yarn.lock +++ b/yarn.lock @@ -6046,10 +6046,10 @@ resolved "https://registry.yarnpkg.com/@heroicons/react/-/react-2.0.17.tgz#42a8086bc434ceefc03592f20c4e81b11e915cf8" integrity sha512-90GMZktkA53YbNzHp6asVEDevUQCMtxWH+2UK2S8OpnLEu7qckTJPhNxNQG52xIR1WFTwFqtH6bt7a60ZNcLLA== -"@holonym-foundation/mishtiwasm@^0.3.0-robustnet": - version "0.3.0-robustnet" - resolved "https://registry.yarnpkg.com/@holonym-foundation/mishtiwasm/-/mishtiwasm-0.3.0-robustnet.tgz#621cec90bae996aeb0eb396f77d256b3abe81668" - integrity sha512-0wCFQdeDx1XDsKcc7/jnnADY60kBf1HhbswS5rZ46kD9ZbPzm1LDYAmC5k7FLmgaCmyJdeGewLiSX1xSzFOFZQ== +"@holonym-foundation/mishtiwasm@0.2.2": + version "0.2.2" + resolved "https://registry.yarnpkg.com/@holonym-foundation/mishtiwasm/-/mishtiwasm-0.2.2.tgz#1910c16c5f7cc606d26dbb91be69ddc5d420abd1" + integrity sha512-mVE5qGrOfqhruwm9sehrEjMLXrcsp0HbTIlkttvGOP6HNajMsyF53jRd+E77OgQuLARguhwgJJmvp4L5GVdcEA== "@humanwhocodes/config-array@^0.11.13": version "0.11.14" From 1ea12b86224c2de50db343516343cce5d180951e Mon Sep 17 00:00:00 2001 From: Lucian Hymer Date: Thu, 2 Jan 2025 09:08:54 -0800 Subject: [PATCH 5/8] working wasm oprf --- iam/package.json | 2 +- iam/src/utils/credentials.ts | 42 +++++++++++++++++++++++------------- yarn.lock | 8 +++---- 3 files changed, 32 insertions(+), 20 deletions(-) diff --git a/iam/package.json b/iam/package.json index 68a79088b3..44dae83246 100644 --- a/iam/package.json +++ b/iam/package.json @@ -31,7 +31,7 @@ "@gitcoin/passport-identity": "^1.0.0", "@gitcoin/passport-platforms": "^1.0.0", "@gitcoin/passport-types": "^1.0.0", - "@holonym-foundation/mishtiwasm": "0.2.2", + "@holonym-foundation/mishtiwasm": "^0.3.0-robustnet", "@ipld/dag-cbor": "^7.0.3", "@spruceid/didkit-wasm-node": "^0.2.1", "axios": "^1.7.9", diff --git a/iam/src/utils/credentials.ts b/iam/src/utils/credentials.ts index f57b6c94a5..6a349c1314 100644 --- a/iam/src/utils/credentials.ts +++ b/iam/src/utils/credentials.ts @@ -22,24 +22,30 @@ import { ApiError } from "./helpers.js"; import { checkCredentialBans } from "./bans.js"; import { readFileSync } from "fs"; -const providerTypePlatformMap = Object.entries(platforms).reduce((acc, [platformName, { providers }]) => { - providers.forEach(({ type }) => { - acc[type] = platformName; - }); +const providerTypePlatformMap = Object.entries(platforms).reduce( + (acc, [platformName, { providers }]) => { + providers.forEach(({ type }) => { + acc[type] = platformName; + }); - return acc; -}, {} as { [k: string]: string }); + return acc; + }, + {} as { [k: string]: string } +); function groupProviderTypesByPlatform(types: string[]): string[][] { return Object.values( - types.reduce((groupedProviders, type) => { - const platform = providerTypePlatformMap[type] || "generic"; + types.reduce( + (groupedProviders, type) => { + const platform = providerTypePlatformMap[type] || "generic"; - if (!groupedProviders[platform]) groupedProviders[platform] = []; - groupedProviders[platform].push(type); + if (!groupedProviders[platform]) groupedProviders[platform] = []; + groupedProviders[platform].push(type); - return groupedProviders; - }, {} as { [k: keyof typeof platforms]: string[] }) + return groupedProviders; + }, + {} as { [k: keyof typeof platforms]: string[] } + ) ); } @@ -96,15 +102,21 @@ const issueCredentials = async ( console.log("Loaded wasm module"); - mishtiWasm.initSync(wasmModuleBuffer); + mishtiWasm.initSync({ module: wasmModuleBuffer }); console.log("Initialized wasm module"); - const nullifier = await mishtiWasm.make_jwt_request("abc", "def"); + const nullifier = await mishtiWasm.generate_oprf( + process.env.TMP_PRIVATE_KEY, + // JSON.stringify(objToSortedArray(record)), + "usr:1234", + "OPRFSecp256k1", + "http://127.0.0.1:8081" + ); console.log("nullifier", nullifier); - return nullifier as string; + return nullifier; } )); } diff --git a/yarn.lock b/yarn.lock index 1585e93db5..6da6d9860f 100644 --- a/yarn.lock +++ b/yarn.lock @@ -6046,10 +6046,10 @@ resolved "https://registry.yarnpkg.com/@heroicons/react/-/react-2.0.17.tgz#42a8086bc434ceefc03592f20c4e81b11e915cf8" integrity sha512-90GMZktkA53YbNzHp6asVEDevUQCMtxWH+2UK2S8OpnLEu7qckTJPhNxNQG52xIR1WFTwFqtH6bt7a60ZNcLLA== -"@holonym-foundation/mishtiwasm@0.2.2": - version "0.2.2" - resolved "https://registry.yarnpkg.com/@holonym-foundation/mishtiwasm/-/mishtiwasm-0.2.2.tgz#1910c16c5f7cc606d26dbb91be69ddc5d420abd1" - integrity sha512-mVE5qGrOfqhruwm9sehrEjMLXrcsp0HbTIlkttvGOP6HNajMsyF53jRd+E77OgQuLARguhwgJJmvp4L5GVdcEA== +"@holonym-foundation/mishtiwasm@^0.3.0-robustnet": + version "0.3.0-robustnet" + resolved "https://registry.yarnpkg.com/@holonym-foundation/mishtiwasm/-/mishtiwasm-0.3.0-robustnet.tgz#621cec90bae996aeb0eb396f77d256b3abe81668" + integrity sha512-0wCFQdeDx1XDsKcc7/jnnADY60kBf1HhbswS5rZ46kD9ZbPzm1LDYAmC5k7FLmgaCmyJdeGewLiSX1xSzFOFZQ== "@humanwhocodes/config-array@^0.11.13": version "0.11.14" From a8ddd72c50011901fdb0670b86274621c60ce90d Mon Sep 17 00:00:00 2001 From: Lucian Hymer Date: Thu, 2 Jan 2025 09:56:48 -0800 Subject: [PATCH 6/8] cleanup --- iam/src/utils/credentials.ts | 52 +++++++++++++++++++++++------------- identity/src/credentials.ts | 12 +++++++-- 2 files changed, 43 insertions(+), 21 deletions(-) diff --git a/iam/src/utils/credentials.ts b/iam/src/utils/credentials.ts index 6a349c1314..8b6a31491f 100644 --- a/iam/src/utils/credentials.ts +++ b/iam/src/utils/credentials.ts @@ -8,19 +8,45 @@ import { ProviderContext, VerifiedPayload, VerifiableCredential, + ProofRecord, } from "@gitcoin/passport-types"; import { getIssuerKey } from "../issuers.js"; // ---- Generate & Verify methods import * as DIDKit from "@spruceid/didkit-wasm-node"; -import { issueHashedCredential, verifyCredential } from "@gitcoin/passport-identity"; +import { issueHashedCredential, objToSortedArray, verifyCredential } from "@gitcoin/passport-identity"; // All provider exports from platforms import { providers, platforms } from "@gitcoin/passport-platforms"; import { ApiError } from "./helpers.js"; import { checkCredentialBans } from "./bans.js"; import { readFileSync } from "fs"; +import { join, dirname } from "path"; +import { fileURLToPath } from "url"; + +// Need to do this here instead of in the identity package +// so that this isn't loaded in the browser +import { initSync as mishtiInitSync, generate_oprf } from "@holonym-foundation/mishtiwasm"; + +let mishtiInitialized = false; +const initializeMishti = () => { + if (mishtiInitialized) return; + + const __dirname = dirname(fileURLToPath(import.meta.url)); + const modulePath = join( + __dirname, + "../../../../../", + "node_modules/@holonym-foundation/mishtiwasm/pkg/esm/mishtiwasm_bg.wasm" + ); + + // console.log("Loading wasm module", modulePath); + const wasmModuleBuffer = readFileSync(modulePath); + + mishtiInitSync({ module: wasmModuleBuffer }); + + mishtiInitialized = true; +}; const providerTypePlatformMap = Object.entries(platforms).reduce( (acc, [platformName, { providers }]) => { @@ -67,7 +93,8 @@ const issueCredentials = async ( results.map(async ({ verifyResult, code: verifyCode, error: verifyError, type }) => { let code = verifyCode; let error = verifyError; - let record, credential; + let record: ProofRecord | undefined; + let credential; try { // check if the request is valid against the selected Identity Provider @@ -92,24 +119,11 @@ const issueCredentials = async ( verifyResult.expiresInSeconds, payload.signatureType, async () => { - // Need to do this here instead of in the identity package - // so that this isn't loaded in the browser - const mishtiWasm = await import("@holonym-foundation/mishtiwasm"); - - const wasmModuleBuffer = readFileSync( - "/Users/lucian/projects/passport/node_modules/@holonym-foundation/mishtiwasm/pkg/esm/mishtiwasm_bg.wasm" - ); - - console.log("Loaded wasm module"); - - mishtiWasm.initSync({ module: wasmModuleBuffer }); - - console.log("Initialized wasm module"); + initializeMishti(); - const nullifier = await mishtiWasm.generate_oprf( - process.env.TMP_PRIVATE_KEY, - // JSON.stringify(objToSortedArray(record)), - "usr:1234", + const nullifier = await generate_oprf( + process.env.MISHTI_CLIENT_PRIVATE_KEY, + JSON.stringify(objToSortedArray(record)), "OPRFSecp256k1", "http://127.0.0.1:8081" ); diff --git a/identity/src/credentials.ts b/identity/src/credentials.ts index c228f5b13b..197aa52dd0 100644 --- a/identity/src/credentials.ts +++ b/identity/src/credentials.ts @@ -200,7 +200,15 @@ export const issueChallengeCredential = async ( } as IssuedCredential; }; -const getNullifier = ({ key, record, oprf }: { key: string; record: ProofRecord; oprf?: () => Promise }) => { +const getNullifier = async ({ + key, + record, + oprf, +}: { + key: string; + record: ProofRecord; + oprf?: () => Promise; +}) => { if (oprf) { return oprf(); } else { @@ -226,7 +234,7 @@ export const issueHashedCredential = async ( signatureType?: string, oprf?: () => Promise ): Promise => { - const hash = getNullifier({ key, record, oprf }); + const hash = await getNullifier({ key, record, oprf }); let credential: VerifiableCredential; if (signatureType === "EIP712") { From fe527f7588c746c6ea5add153dd8afd5f07ab289 Mon Sep 17 00:00:00 2001 From: Lucian Hymer Date: Fri, 3 Jan 2025 16:20:32 -0800 Subject: [PATCH 7/8] working tests with hacky fix, need to remove --- iam/__tests__/index.test.ts | 7 +- iam/jest.setup.cjs | 2 + iam/src/index.ts | 70 ++----- iam/src/utils/credentials.ts | 47 +---- iam/src/utils/oprf.ts | 55 ++++++ identity/jest.config.js | 3 + yarn.lock | 361 ++++++++++++++++------------------- 7 files changed, 255 insertions(+), 290 deletions(-) create mode 100644 iam/src/utils/oprf.ts diff --git a/iam/__tests__/index.test.ts b/iam/__tests__/index.test.ts index 83110120ce..dfb89bc1d4 100644 --- a/iam/__tests__/index.test.ts +++ b/iam/__tests__/index.test.ts @@ -831,12 +831,17 @@ describe("POST /verify", function () { jest.spyOn(identityMock, "verifyCredential").mockResolvedValue(true); // create a req against the express app - await request(app) + const response = await request(app) .post("/api/v0.0.0/verify") .send({ challenge, payload }) .set("Accept", "application/json") .expect(200) .expect("Content-Type", /json/); + + response.body.forEach((item: any) => { + expect(item).toHaveProperty("record"); + expect(item.record).toMatchObject({ type: "Simple" }); + }); }); it("should not issue credential for additional signer when invalid address is provided", async () => { (identityMock.verifyCredential as jest.Mock).mockResolvedValueOnce(true); diff --git a/iam/jest.setup.cjs b/iam/jest.setup.cjs index 7362c3139a..d2217d5eaa 100644 --- a/iam/jest.setup.cjs +++ b/iam/jest.setup.cjs @@ -18,3 +18,5 @@ process.env.SCROLL_BADGE_PROVIDER_INFO = '{"DeveloperList#PassportCommiterLevel1#6a51c84c":{"contractAddress":"0x71A848A38fFCcA5c7A431F2BB411Ab632Fa0c456","level":1}}'; process.env.SCROLL_BADGE_ATTESTATION_SCHEMA_UID = "0xa35b5470ebb301aa5d309a8ee6ea258cad680ea112c86e456d5f2254448afc74"; +process.env.MISHTI_CLIENT_PRIVATE_KEY = + "0x04d16281ff3bf268b29cdd684183f72542757d24ae9fdfb863e7c755e599163a"; diff --git a/iam/src/index.ts b/iam/src/index.ts index 31140b2d59..00b9405ef8 100644 --- a/iam/src/index.ts +++ b/iam/src/index.ts @@ -50,58 +50,24 @@ import { filterRevokedCredentials } from "./utils/revocations.js"; // ---- Config - check for all required env variables // We want to prevent the app from starting with default values or if it is misconfigured -const configErrors = []; - -if (!process.env.IAM_JWK) { - configErrors.push("IAM_JWK is required"); -} - -if (!process.env.ATTESTATION_SIGNER_PRIVATE_KEY) { - configErrors.push("ATTESTATION_SIGNER_PRIVATE_KEY is required"); -} - -if (!process.env.TESTNET_ATTESTATION_SIGNER_PRIVATE_KEY) { - configErrors.push("TESTNET_ATTESTATION_SIGNER_PRIVATE_KEY is required"); -} - -if (!process.env.ALLO_SCORER_ID) { - configErrors.push("ALLO_SCORER_ID is required"); -} - -if (!process.env.SCORER_ENDPOINT) { - configErrors.push("SCORER_ENDPOINT is required"); -} - -if (!process.env.SCORER_API_KEY) { - configErrors.push("SCORER_API_KEY is required"); -} - -if (!process.env.EAS_GITCOIN_STAMP_SCHEMA) { - configErrors.push("EAS_GITCOIN_STAMP_SCHEMA is required"); -} - -if (!process.env.MORALIS_API_KEY) { - configErrors.push("MORALIS_API_KEY is required"); -} - -if (!process.env.IAM_JWK_EIP712) { - configErrors.push("IAM_JWK_EIP712 is required"); -} - -if (!process.env.EAS_FEE_USD) { - configErrors.push("EAS_FEE_USD is required"); -} - -if (!process.env.SCROLL_BADGE_PROVIDER_INFO) { - configErrors.push("SCROLL_BADGE_PROVIDER_INFO is required"); -} - -if (!process.env.SCROLL_BADGE_ATTESTATION_SCHEMA_UID) { - configErrors.push("SCROLL_BADGE_ATTESTATION_SCHEMA_UID is required"); -} - -if (configErrors.length > 0) { - configErrors.forEach((error) => console.error(error)); // eslint-disable-line no-console +const missingEnvVars = [ + "IAM_JWK", + "ATTESTATION_SIGNER_PRIVATE_KEY", + "TESTNET_ATTESTATION_SIGNER_PRIVATE_KEY", + "ALLO_SCORER_ID", + "SCORER_ENDPOINT", + "SCORER_API_KEY", + "EAS_GITCOIN_STAMP_SCHEMA", + "MORALIS_API_KEY", + "IAM_JWK_EIP712", + "EAS_FEE_USD", + "SCROLL_BADGE_PROVIDER_INFO", + "SCROLL_BADGE_ATTESTATION_SCHEMA_UID", + "MISHTI_CLIENT_PRIVATE_KEY", +].filter((env) => !process.env[env]); + +if (missingEnvVars.length > 0) { + missingEnvVars.forEach((envVar) => console.error(`${envVar} is required`)); throw new Error("Missing required configuration"); } diff --git a/iam/src/utils/credentials.ts b/iam/src/utils/credentials.ts index 8b6a31491f..9e9bcdfd34 100644 --- a/iam/src/utils/credentials.ts +++ b/iam/src/utils/credentials.ts @@ -15,38 +15,13 @@ import { getIssuerKey } from "../issuers.js"; // ---- Generate & Verify methods import * as DIDKit from "@spruceid/didkit-wasm-node"; -import { issueHashedCredential, objToSortedArray, verifyCredential } from "@gitcoin/passport-identity"; +import { issueHashedCredential, verifyCredential } from "@gitcoin/passport-identity"; // All provider exports from platforms import { providers, platforms } from "@gitcoin/passport-platforms"; import { ApiError } from "./helpers.js"; import { checkCredentialBans } from "./bans.js"; -import { readFileSync } from "fs"; -import { join, dirname } from "path"; -import { fileURLToPath } from "url"; - -// Need to do this here instead of in the identity package -// so that this isn't loaded in the browser -import { initSync as mishtiInitSync, generate_oprf } from "@holonym-foundation/mishtiwasm"; - -let mishtiInitialized = false; -const initializeMishti = () => { - if (mishtiInitialized) return; - - const __dirname = dirname(fileURLToPath(import.meta.url)); - const modulePath = join( - __dirname, - "../../../../../", - "node_modules/@holonym-foundation/mishtiwasm/pkg/esm/mishtiwasm_bg.wasm" - ); - - // console.log("Loading wasm module", modulePath); - const wasmModuleBuffer = readFileSync(modulePath); - - mishtiInitSync({ module: wasmModuleBuffer }); - - mishtiInitialized = true; -}; +import { recordToNullifier } from "./oprf.js"; const providerTypePlatformMap = Object.entries(platforms).reduce( (acc, [platformName, { providers }]) => { @@ -118,23 +93,11 @@ const issueCredentials = async ( record, verifyResult.expiresInSeconds, payload.signatureType, - async () => { - initializeMishti(); - - const nullifier = await generate_oprf( - process.env.MISHTI_CLIENT_PRIVATE_KEY, - JSON.stringify(objToSortedArray(record)), - "OPRFSecp256k1", - "http://127.0.0.1:8081" - ); - - console.log("nullifier", nullifier); - - return nullifier; - } + () => recordToNullifier({ record }) )); } - } catch { + } catch (e) { + console.error(e); error = "Unable to produce a verifiable credential"; code = 500; } diff --git a/iam/src/utils/oprf.ts b/iam/src/utils/oprf.ts new file mode 100644 index 0000000000..8a5527876d --- /dev/null +++ b/iam/src/utils/oprf.ts @@ -0,0 +1,55 @@ +// Need to do this here instead of in the identity package +// so that this isn't loaded in the browser + +// ---- Web3 packages +import { keccak256 } from "ethers"; + +// ---- Types +import { ProofRecord } from "@gitcoin/passport-types"; + +// ---- Generate & Verify methods +import { objToSortedArray } from "@gitcoin/passport-identity"; + +// All provider exports from platforms +import { readFileSync } from "fs"; +import { join, dirname } from "path"; +import { fileURLToPath } from "url"; + +import { initSync as mishtiInitSync, generate_oprf } from "@holonym-foundation/mishtiwasm"; + +let mishtiInitialized = false; +const initializeMishti = async () => { + if (mishtiInitialized) return; + + await Promise.resolve(); + const monorepoBaseDir = dirname(process.cwd()); + const wasmPath = join(monorepoBaseDir, "node_modules/@holonym-foundation/mishtiwasm/pkg/esm", "mishtiwasm_bg.wasm"); + + // console.log("Loading wasm module", wasmPath); + const wasmModuleBuffer = readFileSync(wasmPath); + + mishtiInitSync({ module: wasmModuleBuffer }); + + mishtiInitialized = true; +}; + +export const recordToNullifier = async ({ record }: { record: ProofRecord }) => { + const cleartextNullifier = JSON.stringify(objToSortedArray(record)); + // TODO + if (process.env.NODE_ENV === "TEST") { + return keccak256(cleartextNullifier); + } else { + await initializeMishti(); + + const nullifier = await generate_oprf( + process.env.MISHTI_CLIENT_PRIVATE_KEY, + cleartextNullifier, + "OPRFSecp256k1", + "http://127.0.0.1:8081" + ); + + console.log("nullifier", nullifier); + + return nullifier; + } +}; diff --git a/identity/jest.config.js b/identity/jest.config.js index 652c929fd7..8e2bba4554 100644 --- a/identity/jest.config.js +++ b/identity/jest.config.js @@ -4,4 +4,7 @@ module.exports = { "^.+\\.tsx?$": "ts-jest", }, modulePathIgnorePatterns: ["/dist/"], + moduleNameMapper: { + "^(\\.{1,2}/.*)\\.js$": "$1", + }, }; diff --git a/yarn.lock b/yarn.lock index 6da6d9860f..ada0808f5b 100644 --- a/yarn.lock +++ b/yarn.lock @@ -5193,7 +5193,7 @@ resolved "https://registry.yarnpkg.com/@floating-ui/utils/-/utils-0.2.7.tgz#d0ece53ce99ab5a8e37ebdfe5e32452a2bfc073e" integrity sha512-X8R8Oj771YRl/w+c1HqAC1szL8zWQRwFvgDwT129k9ACdBoud/+/rX9V0qiMl6LWUdP9voC2nDVZYPMQQsb6eA== -"@gar/promisify@^1.0.1", "@gar/promisify@^1.1.3": +"@gar/promisify@^1.0.1": version "1.1.3" resolved "https://registry.yarnpkg.com/@gar/promisify/-/promisify-1.1.3.tgz#555193ab2e3bb3b6adc3d551c9c030d9e860daf6" integrity sha512-k2Ty1JcVojjJFwrg/ThKi2ujJ7XNLYaFGNB/bWT9wGR+oSMJHMa5w+CUq6p/pVrKeNNgA7pCqEcjSnHVoqJQFw== @@ -7455,12 +7455,19 @@ multiformats "^11.0.0" uint8arrays "^4.0.2" -"@lit-labs/ssr-dom-shim@^1.2.0": +"@lit-labs/ssr-dom-shim@^1.0.0", "@lit-labs/ssr-dom-shim@^1.1.0", "@lit-labs/ssr-dom-shim@^1.2.0": version "1.2.1" resolved "https://registry.yarnpkg.com/@lit-labs/ssr-dom-shim/-/ssr-dom-shim-1.2.1.tgz#2f3a8f1d688935c704dbc89132394a41029acbb8" integrity sha512-wx4aBmgeGvFmOKucFKY+8VFJSYZxs9poN3SDNQFF6lT6NrQUnHiPB2PWz2sc4ieEcAaYYzN+1uWahEeTq2aRIQ== -"@lit/reactive-element@^2.0.4": +"@lit/reactive-element@^1.3.0", "@lit/reactive-element@^1.6.0": + version "1.6.3" + resolved "https://registry.yarnpkg.com/@lit/reactive-element/-/reactive-element-1.6.3.tgz#25b4eece2592132845d303e091bad9b04cdcfe03" + integrity sha512-QuTgnG52Poic7uM1AN5yJ09QMe0O28e10XzSvWDz02TJiiKee4stsiownEIadWm8nYzyDAyT+gKzUoZmiWQtsQ== + dependencies: + "@lit-labs/ssr-dom-shim" "^1.0.0" + +"@lit/reactive-element@^2.0.0", "@lit/reactive-element@^2.0.4": version "2.0.4" resolved "https://registry.yarnpkg.com/@lit/reactive-element/-/reactive-element-2.0.4.tgz#8f2ed950a848016383894a26180ff06c56ae001b" integrity sha512-GFn91inaUa2oHLak8awSIigYz0cU0Payr1rcFsrkf5OJ5eSPxElyZfKh0f2p9FsTiZWXQdWGJeXZICEfXXYSXQ== @@ -8301,14 +8308,6 @@ "@gar/promisify" "^1.0.1" semver "^7.3.5" -"@npmcli/fs@^2.1.0": - version "2.1.2" - resolved "https://registry.yarnpkg.com/@npmcli/fs/-/fs-2.1.2.tgz#a9e2541a4a2fec2e69c29b35e6060973da79b865" - integrity sha512-yOJKRvohFOaLqipNtwYB9WugyZKhC/DZC4VYPmpaCzDBrA8YpK3qHZ8/HGscMnE4GqbkLNuVcCnxkeQEdGt6LQ== - dependencies: - "@gar/promisify" "^1.1.3" - semver "^7.3.5" - "@npmcli/git@^2.1.0": version "2.1.0" resolved "https://registry.yarnpkg.com/@npmcli/git/-/git-2.1.0.tgz#2fbd77e147530247d37f325930d457b3ebe894f6" @@ -8339,14 +8338,6 @@ mkdirp "^1.0.4" rimraf "^3.0.2" -"@npmcli/move-file@^2.0.0": - version "2.0.1" - resolved "https://registry.yarnpkg.com/@npmcli/move-file/-/move-file-2.0.1.tgz#26f6bdc379d87f75e55739bab89db525b06100e4" - integrity sha512-mJd2Z5TjYWq/ttPLLGqArdtnC74J6bOzg4rMDnN+p1xTacZ2yPRCk2y0oSWQtygLR9YVQXgOcONrwtnk3JupxQ== - dependencies: - mkdirp "^1.0.4" - rimraf "^3.0.2" - "@npmcli/node-gyp@^1.0.2": version "1.0.3" resolved "https://registry.yarnpkg.com/@npmcli/node-gyp/-/node-gyp-1.0.3.tgz#a912e637418ffc5f2db375e93b85837691a43a33" @@ -10093,11 +10084,6 @@ resolved "https://registry.yarnpkg.com/@tootallnate/once/-/once-1.1.2.tgz#ccb91445360179a04e7fe6aff78c00ffc1eeaf82" integrity sha512-RbzJvlNzmRq5c3O09UipeuXno4tA1FE6ikOjxZK0tuxVv3412l64l5t1W5pj4+rJq9vpkm/kwiR07aZXnsKPxw== -"@tootallnate/once@2": - version "2.0.0" - resolved "https://registry.yarnpkg.com/@tootallnate/once/-/once-2.0.0.tgz#f544a148d3ab35801c1f633a7441fd87c2e484bf" - integrity sha512-XCuKFP5PS55gnMVu3dty8KPatLqUoy/ZYzDzAGCQ8JNFCkLXzmI7vNHCR+XpbZaMWQK/vQubr7PkYq8g470J/A== - "@tsconfig/node10@^1.0.7": version "1.0.9" resolved "https://registry.yarnpkg.com/@tsconfig/node10/-/node10-1.0.9.tgz#df4907fc07a886922637b15e02d4cebc4c0021b2" @@ -11297,7 +11283,7 @@ abab@^2.0.3, abab@^2.0.5: resolved "https://registry.yarnpkg.com/abab/-/abab-2.0.6.tgz#41b80f2c871d19686216b82309231cfd3cb3d291" integrity sha512-j2afSsaIENvHZN2B8GOpF566vZ5WVk5opAiMTvWgaQT8DkbOqsTfvNAvHoRGU2zzP8cPoqys+xHTRDWW8L+/BA== -abbrev@1, abbrev@^1.0.0: +abbrev@1: version "1.1.1" resolved "https://registry.yarnpkg.com/abbrev/-/abbrev-1.1.1.tgz#f8f2c887ad10bf67f634f005b6987fed3179aac8" integrity sha512-nne9/IiQ/hzIhY6pdDnbBtz7DjPTKrY00P/zvPSm5pOFkl6xuGrGnXn/VtTNNfNtAfZ9/1RtehkszU9qcTii0Q== @@ -11481,13 +11467,6 @@ agentkeepalive@^4.1.3: depd "^1.1.2" humanize-ms "^1.2.1" -agentkeepalive@^4.2.1: - version "4.6.0" - resolved "https://registry.yarnpkg.com/agentkeepalive/-/agentkeepalive-4.6.0.tgz#35f73e94b3f40bf65f105219c623ad19c136ea6a" - integrity sha512-kja8j7PjmncONqaTsB8fQ+wE2mSU2DJ9D4XKoJ5PFWIdRMa6SLSN1ff4mOr4jCbfRSsxR4keIiySJU0N9T5hIQ== - dependencies: - humanize-ms "^1.2.1" - aggregate-error@^3.0.0, aggregate-error@^3.1.0: version "3.1.0" resolved "https://registry.yarnpkg.com/aggregate-error/-/aggregate-error-3.1.0.tgz#92670ff50f5359bdb7a3e0d40d0ec30c5737687a" @@ -12829,30 +12808,6 @@ cacache@^15.0.5, cacache@^15.2.0: tar "^6.0.2" unique-filename "^1.1.1" -cacache@^16.1.0: - version "16.1.3" - resolved "https://registry.yarnpkg.com/cacache/-/cacache-16.1.3.tgz#a02b9f34ecfaf9a78c9f4bc16fceb94d5d67a38e" - integrity sha512-/+Emcj9DAXxX4cwlLmRI9c166RuL3w30zp4R7Joiv2cQTtTtA+jeuCAjH3ZlGnYS3tKENSrKhAzVVP9GVyzeYQ== - dependencies: - "@npmcli/fs" "^2.1.0" - "@npmcli/move-file" "^2.0.0" - chownr "^2.0.0" - fs-minipass "^2.1.0" - glob "^8.0.1" - infer-owner "^1.0.4" - lru-cache "^7.7.1" - minipass "^3.1.6" - minipass-collect "^1.0.2" - minipass-flush "^1.0.5" - minipass-pipeline "^1.2.4" - mkdirp "^1.0.4" - p-map "^4.0.0" - promise-inflight "^1.0.1" - rimraf "^3.0.2" - ssri "^9.0.0" - tar "^6.1.11" - unique-filename "^2.0.0" - cacheable-lookup@^5.0.3: version "5.0.4" resolved "https://registry.yarnpkg.com/cacheable-lookup/-/cacheable-lookup-5.0.4.tgz#5a6b865b2c44357be3d5ebc2a467b032719a7005" @@ -13187,7 +13142,7 @@ chokidar@^4.0.1: dependencies: readdirp "^4.0.1" -chownr@^1.1.1: +chownr@^1.1.1, chownr@^1.1.4: version "1.1.4" resolved "https://registry.yarnpkg.com/chownr/-/chownr-1.1.4.tgz#6fc9d7b42d32a583596337666e7d08084da2cc6b" integrity sha512-jJ0bqzaylmJtVnNgzTeSOs8DPavpbYgEr/b0YL8/2GO3xJEhInFmhKMUnEJQjZumK7KXGFhUy89PrsJWlakBVg== @@ -13943,7 +13898,12 @@ cssstyle@^2.3.0: dependencies: cssom "~0.3.6" -csstype@3.0.10, csstype@^3.0.11, csstype@^3.0.2: +csstype@^3.0.11: + version "3.1.3" + resolved "https://registry.yarnpkg.com/csstype/-/csstype-3.1.3.tgz#d80ff294d114fb0e6ac500fbf85b60137d7eff81" + integrity sha512-M1uQkMl8rQK/szD0LNhtqxIPLpimGm8sOBwU7lLnCpSbTyY3yeU1Vc7l4KT5zT4s/yOxHH5O7tIuuLOCnLADRw== + +csstype@^3.0.2: version "3.0.10" resolved "https://registry.yarnpkg.com/csstype/-/csstype-3.0.10.tgz#2ad3a7bed70f35b965707c092e5f30b327c290e5" integrity sha512-2u44ZG2OcNUO9HDp/Jl8C07x6pU/eTR3ncV91SiK3dhG9TWvRVsCoJw14Ckx5DgWkzGA3waZWO3d7pgqpUI/XA== @@ -15915,11 +15875,6 @@ expect@^29.6.4: jest-message-util "^29.6.3" jest-util "^29.6.3" -exponential-backoff@^3.1.1: - version "3.1.1" - resolved "https://registry.yarnpkg.com/exponential-backoff/-/exponential-backoff-3.1.1.tgz#64ac7526fe341ab18a39016cd22c787d01e00bf6" - integrity sha512-dX7e/LHVJ6W3DE1MHWi9S1EYzDESENfLrYohG2G++ovZrYOkm4Knwa0mc1cn84xJOR4KEU0WSchhLbd0UklbHw== - express@4, express@^4.17.2: version "4.18.1" resolved "https://registry.yarnpkg.com/express/-/express-4.18.1.tgz#7797de8b9c72c857b9cd0e14a5eea80666267caf" @@ -16429,6 +16384,13 @@ fs-extra@^9.1.0: jsonfile "^6.0.1" universalify "^2.0.0" +fs-minipass@^1.2.7: + version "1.2.7" + resolved "https://registry.yarnpkg.com/fs-minipass/-/fs-minipass-1.2.7.tgz#ccff8570841e7fe4265693da88936c55aed7f7c7" + integrity sha512-GWSSJGFy4e9GUeCcbIkED+bgAoFyj7XF1mV8rma3QW4NIqX9Kyx79N/PF61H5udOV3aY1IaMLs6pGbH71nlCTA== + dependencies: + minipass "^2.6.0" + fs-minipass@^2.0.0, fs-minipass@^2.1.0: version "2.1.0" resolved "https://registry.yarnpkg.com/fs-minipass/-/fs-minipass-2.1.0.tgz#7f5036fdbf12c63c169190cbe4199c852271f9fb" @@ -16808,17 +16770,6 @@ glob@^7.1.1, glob@^7.1.2, glob@^7.1.3, glob@^7.1.4, glob@^7.1.6: once "^1.3.0" path-is-absolute "^1.0.0" -glob@^8.0.1: - version "8.1.0" - resolved "https://registry.yarnpkg.com/glob/-/glob-8.1.0.tgz#d388f656593ef708ee3e34640fdfb99a9fd1c33e" - integrity sha512-r8hpEjiQEYlF2QU0df3dS+nxxSIreXQS1qRhMJM0Q5NDdR386C7jb7Hwwod8Fgiuex+k0GFjgft18yvxm5XoCQ== - dependencies: - fs.realpath "^1.0.0" - inflight "^1.0.4" - inherits "2" - minimatch "^5.0.1" - once "^1.3.0" - global-dirs@^0.1.1: version "0.1.1" resolved "https://registry.yarnpkg.com/global-dirs/-/global-dirs-0.1.1.tgz#b319c0dd4607f353f3be9cca4c72fc148c49f445" @@ -16944,7 +16895,7 @@ graceful-fs@^4.1.11, graceful-fs@^4.1.15, graceful-fs@^4.1.2, graceful-fs@^4.1.6 resolved "https://registry.yarnpkg.com/graceful-fs/-/graceful-fs-4.2.10.tgz#147d3a006da4ca3ce14728c7aefc287c367d7a6c" integrity sha512-9ByhssR2fPVsNZj478qUUbKfmL0+t5BDVyjShtyZZLiK7ZDAArFFfopyOTj0M05wE2tJPisA4iTnnXl2YoPvOA== -graceful-fs@^4.1.9: +graceful-fs@^4.1.9, graceful-fs@^4.2.2, graceful-fs@^4.2.3: version "4.2.11" resolved "https://registry.yarnpkg.com/graceful-fs/-/graceful-fs-4.2.11.tgz#4183e4e8bf08bb6e05bbb2f7d2e0c8f712ca40e3" integrity sha512-RbJ5/jmFcNNCcDV5o9eTnBLJ/HszWV0P73bc+Ff4nS/rJj+YaS6IGyiOL0VoBYX+l1Wrl3k63h/KrH+nhJ0XvQ== @@ -17355,15 +17306,6 @@ http-proxy-agent@^4.0.1: agent-base "6" debug "4" -http-proxy-agent@^5.0.0: - version "5.0.0" - resolved "https://registry.yarnpkg.com/http-proxy-agent/-/http-proxy-agent-5.0.0.tgz#5129800203520d434f142bc78ff3c170800f2b43" - integrity sha512-n2hY8YdoRE1i7r6M0w9DIw5GgZN0G25P8zLCRQ8rjXtTU3vsNFBI/vWK/UIeE6g5MUUz6avwAPXmL6Fy9D/90w== - dependencies: - "@tootallnate/once" "2" - agent-base "6" - debug "4" - http-shutdown@^1.2.2: version "1.2.2" resolved "https://registry.yarnpkg.com/http-shutdown/-/http-shutdown-1.2.2.tgz#41bc78fc767637c4c95179bc492f312c0ae64c5f" @@ -21041,7 +20983,16 @@ listr@^0.14.3: p-map "^2.0.0" rxjs "^6.3.3" -lit-element@^4.1.0: +lit-element@^3.3.0: + version "3.3.3" + resolved "https://registry.yarnpkg.com/lit-element/-/lit-element-3.3.3.tgz#10bc19702b96ef5416cf7a70177255bfb17b3209" + integrity sha512-XbeRxmTHubXENkV4h8RIPyr8lXc+Ff28rkcQzw3G6up2xg5E8Zu1IgOWIwBLEQsu3cOVFqdYwiVi0hv0SlpqUA== + dependencies: + "@lit-labs/ssr-dom-shim" "^1.1.0" + "@lit/reactive-element" "^1.3.0" + lit-html "^2.8.0" + +lit-element@^4.0.0: version "4.1.1" resolved "https://registry.yarnpkg.com/lit-element/-/lit-element-4.1.1.tgz#07905992815076e388cf6f1faffc7d6866c82007" integrity sha512-HO9Tkkh34QkTeUmEdNYhMT8hzLid7YlMlATSi1q4q17HE5d9mrrEHJ/o8O2D0cMi182zK1F3v7x0PWFjrhXFew== @@ -21050,21 +21001,37 @@ lit-element@^4.1.0: "@lit/reactive-element" "^2.0.4" lit-html "^3.2.0" -lit-html@^3.2.0: +lit-html@^2.8.0: + version "2.8.0" + resolved "https://registry.yarnpkg.com/lit-html/-/lit-html-2.8.0.tgz#96456a4bb4ee717b9a7d2f94562a16509d39bffa" + integrity sha512-o9t+MQM3P4y7M7yNzqAyjp7z+mQGa4NS4CxiyLqFPyFWyc4O+nodLrkrxSaCTrla6M5YOLaT3RpbbqjszB5g3Q== + dependencies: + "@types/trusted-types" "^2.0.2" + +lit-html@^3.1.0, lit-html@^3.2.0: version "3.2.1" resolved "https://registry.yarnpkg.com/lit-html/-/lit-html-3.2.1.tgz#8fc49e3531ee5947e4d93e8a5aa642ab1649833b" integrity sha512-qI/3lziaPMSKsrwlxH/xMgikhQ0EGOX2ICU73Bi/YHFvz2j/yMCIrw4+puF2IpQ4+upd3EWbvnHM9+PnJn48YA== dependencies: "@types/trusted-types" "^2.0.2" -lit@2.8.0, lit@3.1.0, lit@^3.1.0: - version "3.2.1" - resolved "https://registry.yarnpkg.com/lit/-/lit-3.2.1.tgz#d6dd15eac20db3a098e81e2c85f70a751ff55592" - integrity sha512-1BBa1E/z0O9ye5fZprPtdqnc0BFzxIxTTOO/tQFmyC/hj1O3jL4TfmLBw0WEwjAokdLwpclkvGgDJwTIh0/22w== +lit@2.8.0: + version "2.8.0" + resolved "https://registry.yarnpkg.com/lit/-/lit-2.8.0.tgz#4d838ae03059bf9cafa06e5c61d8acc0081e974e" + integrity sha512-4Sc3OFX9QHOJaHbmTMk28SYgVxLN3ePDjg7hofEft2zWlehFL3LiAuapWc4U/kYwMYJSh2hTCPZ6/LIC7ii0MA== dependencies: - "@lit/reactive-element" "^2.0.4" - lit-element "^4.1.0" - lit-html "^3.2.0" + "@lit/reactive-element" "^1.6.0" + lit-element "^3.3.0" + lit-html "^2.8.0" + +lit@3.1.0: + version "3.1.0" + resolved "https://registry.yarnpkg.com/lit/-/lit-3.1.0.tgz#76429b85dc1f5169fed499a0f7e89e2e619010c9" + integrity sha512-rzo/hmUqX8zmOdamDAeydfjsGXbbdtAFqMhmocnh2j9aDYqbu0fjXygjCa0T99Od9VQ/2itwaGrjZz/ZELVl7w== + dependencies: + "@lit/reactive-element" "^2.0.0" + lit-element "^4.0.0" + lit-html "^3.1.0" load-json-file@^4.0.0: version "4.0.0" @@ -21305,11 +21272,6 @@ lru-cache@^6.0.0: dependencies: yallist "^4.0.0" -lru-cache@^7.7.1: - version "7.18.3" - resolved "https://registry.yarnpkg.com/lru-cache/-/lru-cache-7.18.3.tgz#f793896e0fd0e954a59dfdd82f0773808df6aa89" - integrity sha512-jumlc0BIUrS3qJGgIkWZsyfAM7NCWiBcCDhnd+3NNM5KbBmLTgHVfWBcg6W+rLUsIpzpERPsvwUP7CckAQSOoA== - lru_map@^0.3.3: version "0.3.3" resolved "https://registry.yarnpkg.com/lru_map/-/lru_map-0.3.3.tgz#b5c8351b9464cbd750335a79650a0ec0e56118dd" @@ -21374,28 +21336,6 @@ make-error@1.x, make-error@^1.1.1: resolved "https://registry.yarnpkg.com/make-error/-/make-error-1.3.6.tgz#2eb2e37ea9b67c4891f684a1394799af484cf7a2" integrity sha512-s8UhlNe7vPKomQhC1qFelMokr/Sc3AgNbso3n74mVPA5LTZwkB9NlXf4XPamLxJE8h0gh73rM94xvwRT2CVInw== -make-fetch-happen@^10.0.3: - version "10.2.1" - resolved "https://registry.yarnpkg.com/make-fetch-happen/-/make-fetch-happen-10.2.1.tgz#f5e3835c5e9817b617f2770870d9492d28678164" - integrity sha512-NgOPbRiaQM10DYXvN3/hhGVI2M5MtITFryzBGxHM5p4wnFxsVCbxkrBrDsk+EZ5OB4jEOT7AjDxtdF+KVEFT7w== - dependencies: - agentkeepalive "^4.2.1" - cacache "^16.1.0" - http-cache-semantics "^4.1.0" - http-proxy-agent "^5.0.0" - https-proxy-agent "^5.0.0" - is-lambda "^1.0.1" - lru-cache "^7.7.1" - minipass "^3.1.6" - minipass-collect "^1.0.2" - minipass-fetch "^2.0.3" - minipass-flush "^1.0.5" - minipass-pipeline "^1.2.4" - negotiator "^0.6.3" - promise-retry "^2.0.1" - socks-proxy-agent "^7.0.0" - ssri "^9.0.0" - make-fetch-happen@^8.0.9: version "8.0.14" resolved "https://registry.yarnpkg.com/make-fetch-happen/-/make-fetch-happen-8.0.14.tgz#aaba73ae0ab5586ad8eaa68bd83332669393e222" @@ -21417,7 +21357,7 @@ make-fetch-happen@^8.0.9: socks-proxy-agent "^5.0.0" ssri "^8.0.0" -make-fetch-happen@^9.0.1: +make-fetch-happen@^9.0.1, make-fetch-happen@^9.1.0: version "9.1.0" resolved "https://registry.yarnpkg.com/make-fetch-happen/-/make-fetch-happen-9.1.0.tgz#53085a09e7971433e6765f7971bf63f4e05cb968" integrity sha512-+zopwDy7DNknmwPQplem5lAZX/eCOzSvSNNcSKm5eVwTkOBzoktEfXsa9L23J/GIRhxRsaxzkPEhrJEpE2F4Gg== @@ -21696,17 +21636,6 @@ minipass-fetch@^1.3.0, minipass-fetch@^1.3.2: optionalDependencies: encoding "^0.1.12" -minipass-fetch@^2.0.3: - version "2.1.2" - resolved "https://registry.yarnpkg.com/minipass-fetch/-/minipass-fetch-2.1.2.tgz#95560b50c472d81a3bc76f20ede80eaed76d8add" - integrity sha512-LT49Zi2/WMROHYoqGgdlQIZh8mLPZmOrN2NdJjMXxYe4nkN6FUyuPuOAOedNJDrx0IRGg9+4guZewtp8hE6TxA== - dependencies: - minipass "^3.1.6" - minipass-sized "^1.0.3" - minizlib "^2.1.2" - optionalDependencies: - encoding "^0.1.13" - minipass-flush@^1.0.5: version "1.0.5" resolved "https://registry.yarnpkg.com/minipass-flush/-/minipass-flush-1.0.5.tgz#82e7135d7e89a50ffe64610a787953c4c4cbb373" @@ -21736,6 +21665,14 @@ minipass-sized@^1.0.3: dependencies: minipass "^3.0.0" +minipass@^2.6.0, minipass@^2.9.0: + version "2.9.0" + resolved "https://registry.yarnpkg.com/minipass/-/minipass-2.9.0.tgz#e713762e7d3e32fed803115cf93e04bca9fcc9a6" + integrity sha512-wxfUjg9WebH+CUDX/CdbRlh5SmfZiy/hpkxaRI16Y9W56Pa75sWgd/rvFilSgrauD9NyFymP/+JFV3KwzIsJeg== + dependencies: + safe-buffer "^5.1.2" + yallist "^3.0.0" + minipass@^3.0.0, minipass@^3.1.0, minipass@^3.1.1, minipass@^3.1.3: version "3.3.4" resolved "https://registry.yarnpkg.com/minipass/-/minipass-3.3.4.tgz#ca99f95dd77c43c7a76bf51e6d200025eee0ffae" @@ -21743,13 +21680,6 @@ minipass@^3.0.0, minipass@^3.1.0, minipass@^3.1.1, minipass@^3.1.3: dependencies: yallist "^4.0.0" -minipass@^3.1.6: - version "3.3.6" - resolved "https://registry.yarnpkg.com/minipass/-/minipass-3.3.6.tgz#7bba384db3a1520d18c9c0e5251c3444e95dd94a" - integrity sha512-DxiNidxSEK+tHG6zOIklvNOwm3hvCrbUrdtzY74U6HKTJxvIDfOUL5W5P2Ghd3DTkhhKPYGqeNUIh5qcM4YBfw== - dependencies: - yallist "^4.0.0" - "minipass@^5.0.0 || ^6.0.2 || ^7.0.0": version "7.0.4" resolved "https://registry.yarnpkg.com/minipass/-/minipass-7.0.4.tgz#dbce03740f50a4786ba994c1fb908844d27b038c" @@ -21760,7 +21690,14 @@ minipass@^7.1.2: resolved "https://registry.yarnpkg.com/minipass/-/minipass-7.1.2.tgz#93a9626ce5e5e66bd4db86849e7515e92340a707" integrity sha512-qOOzS1cBTWYF4BH8fVePDBOO9iptMnGUEZwNc/cMWnTV2nVLZ7VoNWEPHkYczZA0pdoA7dl6e7FL659nX9S2aw== -minizlib@^2.0.0, minizlib@^2.1.1, minizlib@^2.1.2: +minizlib@^1.3.3: + version "1.3.3" + resolved "https://registry.yarnpkg.com/minizlib/-/minizlib-1.3.3.tgz#2290de96818a34c29551c8a8d301216bd65a861d" + integrity sha512-6ZYMOEnmVsdCeTJVE0W9ZD+pVnE8h9Hma/iOwwRDsdQoePpoX56/8B6z3P9VNwppJuBKNRuFDRNRqRWexT9G9Q== + dependencies: + minipass "^2.9.0" + +minizlib@^2.0.0, minizlib@^2.1.1: version "2.1.2" resolved "https://registry.yarnpkg.com/minizlib/-/minizlib-2.1.2.tgz#e90d3466ba209b932451508a11ce3d3632145931" integrity sha512-bAxsR8BVfj60DWXHE3u30oHzfl4G7khkSuPW+qvpd7jFRHm7dLxOjUk1EHACJ/hxLY8phGJ0YhYHZo7jil7Qdg== @@ -21787,7 +21724,7 @@ mkdirp-infer-owner@^2.0.0: infer-owner "^1.0.4" mkdirp "^1.0.3" -mkdirp@^0.5.1, mkdirp@^0.5.3: +mkdirp@^0.5.1, mkdirp@^0.5.3, mkdirp@^0.5.5: version "0.5.6" resolved "https://registry.yarnpkg.com/mkdirp/-/mkdirp-0.5.6.tgz#7def03d2432dcae4ba1d611445c48396062255f6" integrity sha512-FP+p8RB8OWpF3YZBCrP5gtADmtXApB5AMLn+vdyA+PyxCjrCs00mjyUozssO33cwDeT3wNGdLxJ5M//YqtHAJw== @@ -22199,11 +22136,6 @@ negotiator@0.6.3, negotiator@^0.6.2: resolved "https://registry.yarnpkg.com/negotiator/-/negotiator-0.6.3.tgz#58e323a72fedc0d6f9cd4d31fe49f51479590ccd" integrity sha512-+EUsqGPLsM+j/zdChZjsnX51g4XrHFOIXwfnCVPGlQk/k5giakcKsuxCObBRu6DSm9opw/O6slWbJdghQM4bBg== -negotiator@^0.6.3: - version "0.6.4" - resolved "https://registry.yarnpkg.com/negotiator/-/negotiator-0.6.4.tgz#777948e2452651c570b712dd01c23e262713fff7" - integrity sha512-myRT3DiWPHqho5PrJaIRyaMv2kgYf0mUVgBNOYMuCH5Ki1yEiQaf/ZJuQ62nvpc44wL5WDbTX7yGJi1Neevw8w== - neo-async@^2.6.0: version "2.6.2" resolved "https://registry.yarnpkg.com/neo-async/-/neo-async-2.6.2.tgz#b4aafb93e3aeb2d8174ca53cf163ab7d7308305f" @@ -22335,23 +22267,55 @@ node-gyp-build@^4.2.0, node-gyp-build@^4.3.0: resolved "https://registry.yarnpkg.com/node-gyp-build/-/node-gyp-build-4.5.0.tgz#7a64eefa0b21112f89f58379da128ac177f20e40" integrity sha512-2iGbaQBV+ITgCz76ZEjmhUKAKVf7xfY1sRl4UiKQspfZMH2h06SyhNsnSVy50cwkFQDGLyif6m/6uFXHkOZ6rg== -node-gyp@8.x, node-gyp@^5.0.2, node-gyp@^7.1.0, node-gyp@^9.0.0: - version "9.4.1" - resolved "https://registry.yarnpkg.com/node-gyp/-/node-gyp-9.4.1.tgz#8a1023e0d6766ecb52764cc3a734b36ff275e185" - integrity sha512-OQkWKbjQKbGkMf/xqI1jjy3oCTgMKJac58G2+bjZb3fza6gW2YrCSdMQYaoTb70crvE//Gngr4f0AgVHmqHvBQ== +node-gyp@8.x: + version "8.4.1" + resolved "https://registry.yarnpkg.com/node-gyp/-/node-gyp-8.4.1.tgz#3d49308fc31f768180957d6b5746845fbd429937" + integrity sha512-olTJRgUtAb/hOXG0E93wZDs5YiJlgbXxTwQAFHyNlRsXQnYzUaF2aGgujZbw+hR8aF4ZG/rST57bWMWD16jr9w== dependencies: env-paths "^2.2.0" - exponential-backoff "^3.1.1" glob "^7.1.4" graceful-fs "^4.2.6" - make-fetch-happen "^10.0.3" - nopt "^6.0.0" + make-fetch-happen "^9.1.0" + nopt "^5.0.0" npmlog "^6.0.0" rimraf "^3.0.2" semver "^7.3.5" tar "^6.1.2" which "^2.0.2" +node-gyp@^5.0.2: + version "5.1.1" + resolved "https://registry.yarnpkg.com/node-gyp/-/node-gyp-5.1.1.tgz#eb915f7b631c937d282e33aed44cb7a025f62a3e" + integrity sha512-WH0WKGi+a4i4DUt2mHnvocex/xPLp9pYt5R6M2JdFB7pJ7Z34hveZ4nDTGTiLXCkitA9T8HFZjhinBCiVHYcWw== + dependencies: + env-paths "^2.2.0" + glob "^7.1.4" + graceful-fs "^4.2.2" + mkdirp "^0.5.1" + nopt "^4.0.1" + npmlog "^4.1.2" + request "^2.88.0" + rimraf "^2.6.3" + semver "^5.7.1" + tar "^4.4.12" + which "^1.3.1" + +node-gyp@^7.1.0: + version "7.1.2" + resolved "https://registry.yarnpkg.com/node-gyp/-/node-gyp-7.1.2.tgz#21a810aebb187120251c3bcec979af1587b188ae" + integrity sha512-CbpcIo7C3eMu3dL1c3d0xw449fHIGALIJsRP4DDPHpyiW8vcriNY7ubh9TE4zEKfSxscY7PjeFnshE7h75ynjQ== + dependencies: + env-paths "^2.2.0" + glob "^7.1.4" + graceful-fs "^4.2.3" + nopt "^5.0.0" + npmlog "^4.1.2" + request "^2.88.2" + rimraf "^3.0.2" + semver "^7.3.2" + tar "^6.0.2" + which "^2.0.2" + node-int64@^0.4.0: version "0.4.0" resolved "https://registry.yarnpkg.com/node-int64/-/node-int64-0.4.0.tgz#87a9065cdb355d3182d8f94ce11188b825c68a3b" @@ -22372,6 +22336,14 @@ node-releases@^2.0.6: resolved "https://registry.yarnpkg.com/node-releases/-/node-releases-2.0.6.tgz#8a7088c63a55e493845683ebf3c828d8c51c5503" integrity sha512-PiVXnNuFm5+iYkLBNeq5211hvO38y63T0i2KKh2KnUs3RpzJ+JtODFjkD8yjLwnDkTYF1eKXheUwdssR+NRZdg== +nopt@^4.0.1: + version "4.0.3" + resolved "https://registry.yarnpkg.com/nopt/-/nopt-4.0.3.tgz#a375cad9d02fd921278d954c2254d5aa57e15e48" + integrity sha512-CvaGwVMztSMJLOeXPrez7fyfObdZqNUK1cPAEzLHrTybIua9pMdmmPR5YwtfNftIOMv3DPUhFaxsZMNTQO20Kg== + dependencies: + abbrev "1" + osenv "^0.1.4" + nopt@^5.0.0: version "5.0.0" resolved "https://registry.yarnpkg.com/nopt/-/nopt-5.0.0.tgz#530942bb58a512fccafe53fe210f13a25355dc88" @@ -22379,13 +22351,6 @@ nopt@^5.0.0: dependencies: abbrev "1" -nopt@^6.0.0: - version "6.0.0" - resolved "https://registry.yarnpkg.com/nopt/-/nopt-6.0.0.tgz#245801d8ebf409c6df22ab9d95b65e1309cdb16d" - integrity sha512-ZwLpbTgdhuZUnZzjd7nb1ZV+4DoiC6/sfiVKok72ym/4Tlf+DFdlHYmT2JPmcNNWV6Pi3SDf1kT+A4r9RTuT9g== - dependencies: - abbrev "^1.0.0" - normalize-package-data@^2.0.0, normalize-package-data@^2.3.2, normalize-package-data@^2.5.0: version "2.5.0" resolved "https://registry.yarnpkg.com/normalize-package-data/-/normalize-package-data-2.5.0.tgz#e66db1838b200c1dfc233225d12cb36520e234a8" @@ -22832,11 +22797,24 @@ ora@^7.0.1: string-width "^6.1.0" strip-ansi "^7.1.0" -os-tmpdir@~1.0.2: +os-homedir@^1.0.0: + version "1.0.2" + resolved "https://registry.yarnpkg.com/os-homedir/-/os-homedir-1.0.2.tgz#ffbc4988336e0e833de0c168c7ef152121aa7fb3" + integrity sha512-B5JU3cabzk8c67mRRd3ECmROafjYMXbuzlwtqdM8IbS8ktlTix8aFGb2bAGKrSRIlnfKwovGUUr72JUPyOb6kQ== + +os-tmpdir@^1.0.0, os-tmpdir@~1.0.2: version "1.0.2" resolved "https://registry.yarnpkg.com/os-tmpdir/-/os-tmpdir-1.0.2.tgz#bbe67406c79aa85c5cfec766fe5734555dfa1274" integrity sha512-D2FR03Vir7FIu45XBY20mTb+/ZSWB00sjU9jdQXt83gDrI4Ztz5Fs7/yy74g2N5SVQY4xY1qDr4rNddwYRVX0g== +osenv@^0.1.4: + version "0.1.5" + resolved "https://registry.yarnpkg.com/osenv/-/osenv-0.1.5.tgz#85cdfafaeb28e8677f416e287592b5f3f49ea410" + integrity sha512-0CWcCECdMVc2Rw3U5w9ZjqX6ga6ubk1xDVKxtBQPK7wis/0F2r9T6k4ydGYhecl7YUBxBVxhL5oisPsNxAPe2g== + dependencies: + os-homedir "^1.0.0" + os-tmpdir "^1.0.0" + p-any@^3.0.0: version "3.0.0" resolved "https://registry.yarnpkg.com/p-any/-/p-any-3.0.0.tgz#79847aeed70b5d3a10ea625296c0c3d2e90a87b9" @@ -24623,7 +24601,7 @@ remove-accents@0.5.0: resolved "https://registry.yarnpkg.com/remove-accents/-/remove-accents-0.5.0.tgz#77991f37ba212afba162e375b627631315bed687" integrity sha512-8g3/Otx1eJaVD12e31UbJj1YzdtVvzH85HV7t+9MJYk/u3XmkOUJ5Ys9wQrf9PCPK8+xn4ymzqYCiZl6QWKn+A== -request@^2.88.2: +request@^2.88.0, request@^2.88.2: version "2.88.2" resolved "https://registry.yarnpkg.com/request/-/request-2.88.2.tgz#d73c918731cb5a87da047e207234146f664d12b3" integrity sha512-MsvtOrfG9ZcrOwAW+Qi+F6HbD0CWXEh9ou77uOb7FM2WPhwT7smM833PzanhJLsgXjN89Ir6V2PczXNnMpwKhw== @@ -24805,7 +24783,7 @@ rimraf@3.0.2, rimraf@^3.0.0, rimraf@^3.0.2: dependencies: glob "^7.1.3" -rimraf@^2.2.8: +rimraf@^2.2.8, rimraf@^2.6.3: version "2.7.1" resolved "https://registry.yarnpkg.com/rimraf/-/rimraf-2.7.1.tgz#35797f13a7fdadc566142c29d4f07ccad483e3ec" integrity sha512-uWjbaKIK3T1OSVptzX7Nl6PvQ3qAGtKEtVRjRuazjfL3Bx5eI409VZSqgND+4UNnmzLVdPj9FqFJNPqBZFve4w== @@ -24937,7 +24915,7 @@ safe-buffer@5.1.2, safe-buffer@~5.1.0, safe-buffer@~5.1.1: resolved "https://registry.yarnpkg.com/safe-buffer/-/safe-buffer-5.1.2.tgz#991ec69d296e0313747d59bdfd2b745c35f8828d" integrity sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g== -safe-buffer@5.2.1, safe-buffer@^5.0.1, safe-buffer@^5.1.0, safe-buffer@^5.1.1, safe-buffer@^5.1.2, safe-buffer@^5.2.0, safe-buffer@~5.2.0: +safe-buffer@5.2.1, safe-buffer@^5.0.1, safe-buffer@^5.1.0, safe-buffer@^5.1.1, safe-buffer@^5.1.2, safe-buffer@^5.2.0, safe-buffer@^5.2.1, safe-buffer@~5.2.0: version "5.2.1" resolved "https://registry.yarnpkg.com/safe-buffer/-/safe-buffer-5.2.1.tgz#1eaf9fa9bdb1fdd4ec75f58f9cdb4e6b7827eec6" integrity sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ== @@ -25043,6 +25021,11 @@ semver@7.3.7, semver@7.x, semver@^7.1.1, semver@^7.1.3, semver@^7.3.2, semver@^7 dependencies: lru-cache "^6.0.0" +semver@^5.7.1: + version "5.7.2" + resolved "https://registry.yarnpkg.com/semver/-/semver-5.7.2.tgz#48d55db737c3287cd4835e17fa13feace1c41ef8" + integrity sha512-cBznnQ9KjJqU67B52RMC65CMarK2600WFnbkcaiwWq3xy/5haFJlshgnpjovMVJ+Hff49d8GEn0b87C5pDQ10g== + semver@^6.0.0, semver@^6.3.0: version "6.3.0" resolved "https://registry.yarnpkg.com/semver/-/semver-6.3.0.tgz#ee0a64c8af5e8ceea67687b133761e1becbd1d3d" @@ -25320,15 +25303,6 @@ socks-proxy-agent@^6.0.0: debug "^4.3.3" socks "^2.6.2" -socks-proxy-agent@^7.0.0: - version "7.0.0" - resolved "https://registry.yarnpkg.com/socks-proxy-agent/-/socks-proxy-agent-7.0.0.tgz#dc069ecf34436621acb41e3efa66ca1b5fed15b6" - integrity sha512-Fgl0YPZ902wEsAyiQ+idGd1A7rSFx/ayC1CQVMw5P+EQx2V0SgpGtf6OKFhVjPflPUl9YMmEOnmfjCdMUsygww== - dependencies: - agent-base "^6.0.2" - debug "^4.3.3" - socks "^2.6.2" - socks@^2.3.3, socks@^2.6.2: version "2.7.0" resolved "https://registry.yarnpkg.com/socks/-/socks-2.7.0.tgz#f9225acdb841e874dca25f870e9130990f3913d0" @@ -25534,13 +25508,6 @@ ssri@^8.0.0, ssri@^8.0.1: dependencies: minipass "^3.1.1" -ssri@^9.0.0: - version "9.0.1" - resolved "https://registry.yarnpkg.com/ssri/-/ssri-9.0.1.tgz#544d4c357a8d7b71a19700074b6883fcb4eae057" - integrity sha512-o57Wcn66jMQvfHG1FlYbWeZWW/dHZhJXjpIcTfXldXEk5nz5lStPo3mK0OJQfGR3RbZUlbISexbljkJzuEj/8Q== - dependencies: - minipass "^3.1.1" - stack-utils@^2.0.3: version "2.0.5" resolved "https://registry.yarnpkg.com/stack-utils/-/stack-utils-2.0.5.tgz#d25265fca995154659dbbfba3b49254778d2fdd5" @@ -26049,6 +26016,19 @@ tar-stream@^2.1.4: inherits "^2.0.3" readable-stream "^3.1.1" +tar@^4.4.12: + version "4.4.19" + resolved "https://registry.yarnpkg.com/tar/-/tar-4.4.19.tgz#2e4d7263df26f2b914dee10c825ab132123742f3" + integrity sha512-a20gEsvHnWe0ygBY8JbxoM4w3SJdhc7ZAuxkLqh+nvNQN2IOt0B5lLgM490X5Hl8FF0dl0tOf2ewFYAlIFgzVA== + dependencies: + chownr "^1.1.4" + fs-minipass "^1.2.7" + minipass "^2.9.0" + minizlib "^1.3.3" + mkdirp "^0.5.5" + safe-buffer "^5.2.1" + yallist "^3.1.1" + tar@^6.0.2, tar@^6.1.0, tar@^6.1.11, tar@^6.1.2: version "6.1.11" resolved "https://registry.yarnpkg.com/tar/-/tar-6.1.11.tgz#6760a38f003afa1b2ffd0ffe9e9abbd0eab3d621" @@ -26384,6 +26364,11 @@ ts-interface-checker@^0.1.9: resolved "https://registry.yarnpkg.com/ts-interface-checker/-/ts-interface-checker-0.1.13.tgz#784fd3d679722bc103b1b4b8030bcddb5db2a699" integrity sha512-Y/arvbn+rrz3JCKl9C4kVNfTfSm2/mEp5FSz5EsZSANGPSlQrpRI5M4PKF+mJnE52jOO90PnPSc3Ur3bTQw0gA== +ts-jest-mock-import-meta@^1.2.1: + version "1.2.1" + resolved "https://registry.yarnpkg.com/ts-jest-mock-import-meta/-/ts-jest-mock-import-meta-1.2.1.tgz#773a67810eede5f48df23a2f2f0bd4532bdc9129" + integrity sha512-+qh8ZijpFnh7nMNdw1yYrvmnhe3Rctau5a3AFtgBAtps46RSiC8SHr3Z0S9sNqCU3cNOGumCAVO7Ac65fstxRA== + ts-jest@^27.1.4: version "27.1.5" resolved "https://registry.yarnpkg.com/ts-jest/-/ts-jest-27.1.5.tgz#0ddf1b163fbaae3d5b7504a1e65c914a95cff297" @@ -26856,13 +26841,6 @@ unique-filename@^1.1.1: dependencies: unique-slug "^2.0.0" -unique-filename@^2.0.0: - version "2.0.1" - resolved "https://registry.yarnpkg.com/unique-filename/-/unique-filename-2.0.1.tgz#e785f8675a9a7589e0ac77e0b5c34d2eaeac6da2" - integrity sha512-ODWHtkkdx3IAR+veKxFV+VBkUMcN+FaqzUUd7IZzt+0zhDZFPFxhlqwPF3YQvMHx1TD0tdgYl+kuPnJ8E6ql7A== - dependencies: - unique-slug "^3.0.0" - unique-slug@^2.0.0: version "2.0.2" resolved "https://registry.yarnpkg.com/unique-slug/-/unique-slug-2.0.2.tgz#baabce91083fc64e945b0f3ad613e264f7cd4e6c" @@ -26870,13 +26848,6 @@ unique-slug@^2.0.0: dependencies: imurmurhash "^0.1.4" -unique-slug@^3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/unique-slug/-/unique-slug-3.0.0.tgz#6d347cf57c8a7a7a6044aabd0e2d74e4d76dc7c9" - integrity sha512-8EyMynh679x/0gqE9fT9oilG+qEt+ibFyqjuVTsZn1+CMxH+XLlpvr2UZx4nVcCwTpx81nICr2JQFkM+HPLq4w== - dependencies: - imurmurhash "^0.1.4" - universal-user-agent@^6.0.0: version "6.0.0" resolved "https://registry.yarnpkg.com/universal-user-agent/-/universal-user-agent-6.0.0.tgz#3381f8503b251c0d9cd21bc1de939ec9df5480ee" @@ -27840,7 +27811,7 @@ yallist@4.0.0, yallist@^4.0.0: resolved "https://registry.yarnpkg.com/yallist/-/yallist-4.0.0.tgz#9bb92790d9c0effec63be73519e11a35019a3a72" integrity sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A== -yallist@^3.0.2: +yallist@^3.0.0, yallist@^3.0.2, yallist@^3.1.1: version "3.1.1" resolved "https://registry.yarnpkg.com/yallist/-/yallist-3.1.1.tgz#dbb7daf9bfd8bac9ab45ebf602b8cbad0d5d08fd" integrity sha512-a4UGQaWPH59mOXUYnAG2ewncQS4i4F43Tv3JoAM+s2VDAmS9NsK8GpDMLrCHPksFT7h3K6TOoUNn2pb7RoXx4g== From 903faca795f84c5b194bc71f04f0bae7462ad771 Mon Sep 17 00:00:00 2001 From: Lucian Hymer Date: Mon, 6 Jan 2025 12:59:37 -0700 Subject: [PATCH 8/8] fixed tests --- iam/__tests__/additional_signer.test.ts | 11 + iam/__tests__/index.test.ts | 11 + iam/jest.setup.cjs | 1 + iam/src/index.ts | 1 + iam/src/utils/oprf.ts | 32 +-- yarn.lock | 361 +++++++++++++----------- 6 files changed, 230 insertions(+), 187 deletions(-) diff --git a/iam/__tests__/additional_signer.test.ts b/iam/__tests__/additional_signer.test.ts index 4d701ca787..921282392b 100644 --- a/iam/__tests__/additional_signer.test.ts +++ b/iam/__tests__/additional_signer.test.ts @@ -7,6 +7,17 @@ import { getEip712Issuer } from "../src/issuers.js"; const issuer = getEip712Issuer(); +jest.mock("../src/utils/oprf", () => ({ + recordToNullifier: async ({ record }: any) => { + const crypto = await import("crypto"); + const hash = crypto.createHash("sha256"); + + hash.update(JSON.stringify(record)); + + return hash.digest("hex"); + }, +})); + jest.mock("../src/utils/bans", () => ({ checkCredentialBans: jest.fn().mockImplementation((input) => Promise.resolve(input)), })); diff --git a/iam/__tests__/index.test.ts b/iam/__tests__/index.test.ts index dfb89bc1d4..3a58a5f15b 100644 --- a/iam/__tests__/index.test.ts +++ b/iam/__tests__/index.test.ts @@ -32,6 +32,17 @@ import { toJsonObject } from "../src/utils/json.js"; const issuer = getEip712Issuer(); +jest.mock("../src/utils/oprf", () => ({ + recordToNullifier: async ({ record }: any) => { + const crypto = await import("crypto"); + const hash = crypto.createHash("sha256"); + + hash.update(JSON.stringify(record)); + + return hash.digest("hex"); + }, +})); + jest.mock("../src/utils/bans", () => ({ checkCredentialBans: jest.fn().mockImplementation((input) => Promise.resolve(input)), })); diff --git a/iam/jest.setup.cjs b/iam/jest.setup.cjs index d2217d5eaa..585031153f 100644 --- a/iam/jest.setup.cjs +++ b/iam/jest.setup.cjs @@ -20,3 +20,4 @@ process.env.SCROLL_BADGE_ATTESTATION_SCHEMA_UID = "0xa35b5470ebb301aa5d309a8ee6ea258cad680ea112c86e456d5f2254448afc74"; process.env.MISHTI_CLIENT_PRIVATE_KEY = "0x04d16281ff3bf268b29cdd684183f72542757d24ae9fdfb863e7c755e599163a"; +process.env.MISHTI_RELAY_URL = "http://127.0.0.1:8081"; diff --git a/iam/src/index.ts b/iam/src/index.ts index 00b9405ef8..0b1faa8c60 100644 --- a/iam/src/index.ts +++ b/iam/src/index.ts @@ -64,6 +64,7 @@ const missingEnvVars = [ "SCROLL_BADGE_PROVIDER_INFO", "SCROLL_BADGE_ATTESTATION_SCHEMA_UID", "MISHTI_CLIENT_PRIVATE_KEY", + "MISHTI_RELAY_URL", ].filter((env) => !process.env[env]); if (missingEnvVars.length > 0) { diff --git a/iam/src/utils/oprf.ts b/iam/src/utils/oprf.ts index 8a5527876d..a160ee71d9 100644 --- a/iam/src/utils/oprf.ts +++ b/iam/src/utils/oprf.ts @@ -1,9 +1,6 @@ // Need to do this here instead of in the identity package // so that this isn't loaded in the browser -// ---- Web3 packages -import { keccak256 } from "ethers"; - // ---- Types import { ProofRecord } from "@gitcoin/passport-types"; @@ -13,7 +10,6 @@ import { objToSortedArray } from "@gitcoin/passport-identity"; // All provider exports from platforms import { readFileSync } from "fs"; import { join, dirname } from "path"; -import { fileURLToPath } from "url"; import { initSync as mishtiInitSync, generate_oprf } from "@holonym-foundation/mishtiwasm"; @@ -35,21 +31,15 @@ const initializeMishti = async () => { export const recordToNullifier = async ({ record }: { record: ProofRecord }) => { const cleartextNullifier = JSON.stringify(objToSortedArray(record)); - // TODO - if (process.env.NODE_ENV === "TEST") { - return keccak256(cleartextNullifier); - } else { - await initializeMishti(); - - const nullifier = await generate_oprf( - process.env.MISHTI_CLIENT_PRIVATE_KEY, - cleartextNullifier, - "OPRFSecp256k1", - "http://127.0.0.1:8081" - ); - - console.log("nullifier", nullifier); - - return nullifier; - } + await initializeMishti(); + + const nullifier = await generate_oprf( + process.env.MISHTI_CLIENT_PRIVATE_KEY, + cleartextNullifier, + "OPRFSecp256k1", + process.env.MISHTI_RELAY_URL + ); + + // console.log("nullifier", nullifier); + return nullifier; }; diff --git a/yarn.lock b/yarn.lock index ada0808f5b..6da6d9860f 100644 --- a/yarn.lock +++ b/yarn.lock @@ -5193,7 +5193,7 @@ resolved "https://registry.yarnpkg.com/@floating-ui/utils/-/utils-0.2.7.tgz#d0ece53ce99ab5a8e37ebdfe5e32452a2bfc073e" integrity sha512-X8R8Oj771YRl/w+c1HqAC1szL8zWQRwFvgDwT129k9ACdBoud/+/rX9V0qiMl6LWUdP9voC2nDVZYPMQQsb6eA== -"@gar/promisify@^1.0.1": +"@gar/promisify@^1.0.1", "@gar/promisify@^1.1.3": version "1.1.3" resolved "https://registry.yarnpkg.com/@gar/promisify/-/promisify-1.1.3.tgz#555193ab2e3bb3b6adc3d551c9c030d9e860daf6" integrity sha512-k2Ty1JcVojjJFwrg/ThKi2ujJ7XNLYaFGNB/bWT9wGR+oSMJHMa5w+CUq6p/pVrKeNNgA7pCqEcjSnHVoqJQFw== @@ -7455,19 +7455,12 @@ multiformats "^11.0.0" uint8arrays "^4.0.2" -"@lit-labs/ssr-dom-shim@^1.0.0", "@lit-labs/ssr-dom-shim@^1.1.0", "@lit-labs/ssr-dom-shim@^1.2.0": +"@lit-labs/ssr-dom-shim@^1.2.0": version "1.2.1" resolved "https://registry.yarnpkg.com/@lit-labs/ssr-dom-shim/-/ssr-dom-shim-1.2.1.tgz#2f3a8f1d688935c704dbc89132394a41029acbb8" integrity sha512-wx4aBmgeGvFmOKucFKY+8VFJSYZxs9poN3SDNQFF6lT6NrQUnHiPB2PWz2sc4ieEcAaYYzN+1uWahEeTq2aRIQ== -"@lit/reactive-element@^1.3.0", "@lit/reactive-element@^1.6.0": - version "1.6.3" - resolved "https://registry.yarnpkg.com/@lit/reactive-element/-/reactive-element-1.6.3.tgz#25b4eece2592132845d303e091bad9b04cdcfe03" - integrity sha512-QuTgnG52Poic7uM1AN5yJ09QMe0O28e10XzSvWDz02TJiiKee4stsiownEIadWm8nYzyDAyT+gKzUoZmiWQtsQ== - dependencies: - "@lit-labs/ssr-dom-shim" "^1.0.0" - -"@lit/reactive-element@^2.0.0", "@lit/reactive-element@^2.0.4": +"@lit/reactive-element@^2.0.4": version "2.0.4" resolved "https://registry.yarnpkg.com/@lit/reactive-element/-/reactive-element-2.0.4.tgz#8f2ed950a848016383894a26180ff06c56ae001b" integrity sha512-GFn91inaUa2oHLak8awSIigYz0cU0Payr1rcFsrkf5OJ5eSPxElyZfKh0f2p9FsTiZWXQdWGJeXZICEfXXYSXQ== @@ -8308,6 +8301,14 @@ "@gar/promisify" "^1.0.1" semver "^7.3.5" +"@npmcli/fs@^2.1.0": + version "2.1.2" + resolved "https://registry.yarnpkg.com/@npmcli/fs/-/fs-2.1.2.tgz#a9e2541a4a2fec2e69c29b35e6060973da79b865" + integrity sha512-yOJKRvohFOaLqipNtwYB9WugyZKhC/DZC4VYPmpaCzDBrA8YpK3qHZ8/HGscMnE4GqbkLNuVcCnxkeQEdGt6LQ== + dependencies: + "@gar/promisify" "^1.1.3" + semver "^7.3.5" + "@npmcli/git@^2.1.0": version "2.1.0" resolved "https://registry.yarnpkg.com/@npmcli/git/-/git-2.1.0.tgz#2fbd77e147530247d37f325930d457b3ebe894f6" @@ -8338,6 +8339,14 @@ mkdirp "^1.0.4" rimraf "^3.0.2" +"@npmcli/move-file@^2.0.0": + version "2.0.1" + resolved "https://registry.yarnpkg.com/@npmcli/move-file/-/move-file-2.0.1.tgz#26f6bdc379d87f75e55739bab89db525b06100e4" + integrity sha512-mJd2Z5TjYWq/ttPLLGqArdtnC74J6bOzg4rMDnN+p1xTacZ2yPRCk2y0oSWQtygLR9YVQXgOcONrwtnk3JupxQ== + dependencies: + mkdirp "^1.0.4" + rimraf "^3.0.2" + "@npmcli/node-gyp@^1.0.2": version "1.0.3" resolved "https://registry.yarnpkg.com/@npmcli/node-gyp/-/node-gyp-1.0.3.tgz#a912e637418ffc5f2db375e93b85837691a43a33" @@ -10084,6 +10093,11 @@ resolved "https://registry.yarnpkg.com/@tootallnate/once/-/once-1.1.2.tgz#ccb91445360179a04e7fe6aff78c00ffc1eeaf82" integrity sha512-RbzJvlNzmRq5c3O09UipeuXno4tA1FE6ikOjxZK0tuxVv3412l64l5t1W5pj4+rJq9vpkm/kwiR07aZXnsKPxw== +"@tootallnate/once@2": + version "2.0.0" + resolved "https://registry.yarnpkg.com/@tootallnate/once/-/once-2.0.0.tgz#f544a148d3ab35801c1f633a7441fd87c2e484bf" + integrity sha512-XCuKFP5PS55gnMVu3dty8KPatLqUoy/ZYzDzAGCQ8JNFCkLXzmI7vNHCR+XpbZaMWQK/vQubr7PkYq8g470J/A== + "@tsconfig/node10@^1.0.7": version "1.0.9" resolved "https://registry.yarnpkg.com/@tsconfig/node10/-/node10-1.0.9.tgz#df4907fc07a886922637b15e02d4cebc4c0021b2" @@ -11283,7 +11297,7 @@ abab@^2.0.3, abab@^2.0.5: resolved "https://registry.yarnpkg.com/abab/-/abab-2.0.6.tgz#41b80f2c871d19686216b82309231cfd3cb3d291" integrity sha512-j2afSsaIENvHZN2B8GOpF566vZ5WVk5opAiMTvWgaQT8DkbOqsTfvNAvHoRGU2zzP8cPoqys+xHTRDWW8L+/BA== -abbrev@1: +abbrev@1, abbrev@^1.0.0: version "1.1.1" resolved "https://registry.yarnpkg.com/abbrev/-/abbrev-1.1.1.tgz#f8f2c887ad10bf67f634f005b6987fed3179aac8" integrity sha512-nne9/IiQ/hzIhY6pdDnbBtz7DjPTKrY00P/zvPSm5pOFkl6xuGrGnXn/VtTNNfNtAfZ9/1RtehkszU9qcTii0Q== @@ -11467,6 +11481,13 @@ agentkeepalive@^4.1.3: depd "^1.1.2" humanize-ms "^1.2.1" +agentkeepalive@^4.2.1: + version "4.6.0" + resolved "https://registry.yarnpkg.com/agentkeepalive/-/agentkeepalive-4.6.0.tgz#35f73e94b3f40bf65f105219c623ad19c136ea6a" + integrity sha512-kja8j7PjmncONqaTsB8fQ+wE2mSU2DJ9D4XKoJ5PFWIdRMa6SLSN1ff4mOr4jCbfRSsxR4keIiySJU0N9T5hIQ== + dependencies: + humanize-ms "^1.2.1" + aggregate-error@^3.0.0, aggregate-error@^3.1.0: version "3.1.0" resolved "https://registry.yarnpkg.com/aggregate-error/-/aggregate-error-3.1.0.tgz#92670ff50f5359bdb7a3e0d40d0ec30c5737687a" @@ -12808,6 +12829,30 @@ cacache@^15.0.5, cacache@^15.2.0: tar "^6.0.2" unique-filename "^1.1.1" +cacache@^16.1.0: + version "16.1.3" + resolved "https://registry.yarnpkg.com/cacache/-/cacache-16.1.3.tgz#a02b9f34ecfaf9a78c9f4bc16fceb94d5d67a38e" + integrity sha512-/+Emcj9DAXxX4cwlLmRI9c166RuL3w30zp4R7Joiv2cQTtTtA+jeuCAjH3ZlGnYS3tKENSrKhAzVVP9GVyzeYQ== + dependencies: + "@npmcli/fs" "^2.1.0" + "@npmcli/move-file" "^2.0.0" + chownr "^2.0.0" + fs-minipass "^2.1.0" + glob "^8.0.1" + infer-owner "^1.0.4" + lru-cache "^7.7.1" + minipass "^3.1.6" + minipass-collect "^1.0.2" + minipass-flush "^1.0.5" + minipass-pipeline "^1.2.4" + mkdirp "^1.0.4" + p-map "^4.0.0" + promise-inflight "^1.0.1" + rimraf "^3.0.2" + ssri "^9.0.0" + tar "^6.1.11" + unique-filename "^2.0.0" + cacheable-lookup@^5.0.3: version "5.0.4" resolved "https://registry.yarnpkg.com/cacheable-lookup/-/cacheable-lookup-5.0.4.tgz#5a6b865b2c44357be3d5ebc2a467b032719a7005" @@ -13142,7 +13187,7 @@ chokidar@^4.0.1: dependencies: readdirp "^4.0.1" -chownr@^1.1.1, chownr@^1.1.4: +chownr@^1.1.1: version "1.1.4" resolved "https://registry.yarnpkg.com/chownr/-/chownr-1.1.4.tgz#6fc9d7b42d32a583596337666e7d08084da2cc6b" integrity sha512-jJ0bqzaylmJtVnNgzTeSOs8DPavpbYgEr/b0YL8/2GO3xJEhInFmhKMUnEJQjZumK7KXGFhUy89PrsJWlakBVg== @@ -13898,12 +13943,7 @@ cssstyle@^2.3.0: dependencies: cssom "~0.3.6" -csstype@^3.0.11: - version "3.1.3" - resolved "https://registry.yarnpkg.com/csstype/-/csstype-3.1.3.tgz#d80ff294d114fb0e6ac500fbf85b60137d7eff81" - integrity sha512-M1uQkMl8rQK/szD0LNhtqxIPLpimGm8sOBwU7lLnCpSbTyY3yeU1Vc7l4KT5zT4s/yOxHH5O7tIuuLOCnLADRw== - -csstype@^3.0.2: +csstype@3.0.10, csstype@^3.0.11, csstype@^3.0.2: version "3.0.10" resolved "https://registry.yarnpkg.com/csstype/-/csstype-3.0.10.tgz#2ad3a7bed70f35b965707c092e5f30b327c290e5" integrity sha512-2u44ZG2OcNUO9HDp/Jl8C07x6pU/eTR3ncV91SiK3dhG9TWvRVsCoJw14Ckx5DgWkzGA3waZWO3d7pgqpUI/XA== @@ -15875,6 +15915,11 @@ expect@^29.6.4: jest-message-util "^29.6.3" jest-util "^29.6.3" +exponential-backoff@^3.1.1: + version "3.1.1" + resolved "https://registry.yarnpkg.com/exponential-backoff/-/exponential-backoff-3.1.1.tgz#64ac7526fe341ab18a39016cd22c787d01e00bf6" + integrity sha512-dX7e/LHVJ6W3DE1MHWi9S1EYzDESENfLrYohG2G++ovZrYOkm4Knwa0mc1cn84xJOR4KEU0WSchhLbd0UklbHw== + express@4, express@^4.17.2: version "4.18.1" resolved "https://registry.yarnpkg.com/express/-/express-4.18.1.tgz#7797de8b9c72c857b9cd0e14a5eea80666267caf" @@ -16384,13 +16429,6 @@ fs-extra@^9.1.0: jsonfile "^6.0.1" universalify "^2.0.0" -fs-minipass@^1.2.7: - version "1.2.7" - resolved "https://registry.yarnpkg.com/fs-minipass/-/fs-minipass-1.2.7.tgz#ccff8570841e7fe4265693da88936c55aed7f7c7" - integrity sha512-GWSSJGFy4e9GUeCcbIkED+bgAoFyj7XF1mV8rma3QW4NIqX9Kyx79N/PF61H5udOV3aY1IaMLs6pGbH71nlCTA== - dependencies: - minipass "^2.6.0" - fs-minipass@^2.0.0, fs-minipass@^2.1.0: version "2.1.0" resolved "https://registry.yarnpkg.com/fs-minipass/-/fs-minipass-2.1.0.tgz#7f5036fdbf12c63c169190cbe4199c852271f9fb" @@ -16770,6 +16808,17 @@ glob@^7.1.1, glob@^7.1.2, glob@^7.1.3, glob@^7.1.4, glob@^7.1.6: once "^1.3.0" path-is-absolute "^1.0.0" +glob@^8.0.1: + version "8.1.0" + resolved "https://registry.yarnpkg.com/glob/-/glob-8.1.0.tgz#d388f656593ef708ee3e34640fdfb99a9fd1c33e" + integrity sha512-r8hpEjiQEYlF2QU0df3dS+nxxSIreXQS1qRhMJM0Q5NDdR386C7jb7Hwwod8Fgiuex+k0GFjgft18yvxm5XoCQ== + dependencies: + fs.realpath "^1.0.0" + inflight "^1.0.4" + inherits "2" + minimatch "^5.0.1" + once "^1.3.0" + global-dirs@^0.1.1: version "0.1.1" resolved "https://registry.yarnpkg.com/global-dirs/-/global-dirs-0.1.1.tgz#b319c0dd4607f353f3be9cca4c72fc148c49f445" @@ -16895,7 +16944,7 @@ graceful-fs@^4.1.11, graceful-fs@^4.1.15, graceful-fs@^4.1.2, graceful-fs@^4.1.6 resolved "https://registry.yarnpkg.com/graceful-fs/-/graceful-fs-4.2.10.tgz#147d3a006da4ca3ce14728c7aefc287c367d7a6c" integrity sha512-9ByhssR2fPVsNZj478qUUbKfmL0+t5BDVyjShtyZZLiK7ZDAArFFfopyOTj0M05wE2tJPisA4iTnnXl2YoPvOA== -graceful-fs@^4.1.9, graceful-fs@^4.2.2, graceful-fs@^4.2.3: +graceful-fs@^4.1.9: version "4.2.11" resolved "https://registry.yarnpkg.com/graceful-fs/-/graceful-fs-4.2.11.tgz#4183e4e8bf08bb6e05bbb2f7d2e0c8f712ca40e3" integrity sha512-RbJ5/jmFcNNCcDV5o9eTnBLJ/HszWV0P73bc+Ff4nS/rJj+YaS6IGyiOL0VoBYX+l1Wrl3k63h/KrH+nhJ0XvQ== @@ -17306,6 +17355,15 @@ http-proxy-agent@^4.0.1: agent-base "6" debug "4" +http-proxy-agent@^5.0.0: + version "5.0.0" + resolved "https://registry.yarnpkg.com/http-proxy-agent/-/http-proxy-agent-5.0.0.tgz#5129800203520d434f142bc78ff3c170800f2b43" + integrity sha512-n2hY8YdoRE1i7r6M0w9DIw5GgZN0G25P8zLCRQ8rjXtTU3vsNFBI/vWK/UIeE6g5MUUz6avwAPXmL6Fy9D/90w== + dependencies: + "@tootallnate/once" "2" + agent-base "6" + debug "4" + http-shutdown@^1.2.2: version "1.2.2" resolved "https://registry.yarnpkg.com/http-shutdown/-/http-shutdown-1.2.2.tgz#41bc78fc767637c4c95179bc492f312c0ae64c5f" @@ -20983,16 +21041,7 @@ listr@^0.14.3: p-map "^2.0.0" rxjs "^6.3.3" -lit-element@^3.3.0: - version "3.3.3" - resolved "https://registry.yarnpkg.com/lit-element/-/lit-element-3.3.3.tgz#10bc19702b96ef5416cf7a70177255bfb17b3209" - integrity sha512-XbeRxmTHubXENkV4h8RIPyr8lXc+Ff28rkcQzw3G6up2xg5E8Zu1IgOWIwBLEQsu3cOVFqdYwiVi0hv0SlpqUA== - dependencies: - "@lit-labs/ssr-dom-shim" "^1.1.0" - "@lit/reactive-element" "^1.3.0" - lit-html "^2.8.0" - -lit-element@^4.0.0: +lit-element@^4.1.0: version "4.1.1" resolved "https://registry.yarnpkg.com/lit-element/-/lit-element-4.1.1.tgz#07905992815076e388cf6f1faffc7d6866c82007" integrity sha512-HO9Tkkh34QkTeUmEdNYhMT8hzLid7YlMlATSi1q4q17HE5d9mrrEHJ/o8O2D0cMi182zK1F3v7x0PWFjrhXFew== @@ -21001,37 +21050,21 @@ lit-element@^4.0.0: "@lit/reactive-element" "^2.0.4" lit-html "^3.2.0" -lit-html@^2.8.0: - version "2.8.0" - resolved "https://registry.yarnpkg.com/lit-html/-/lit-html-2.8.0.tgz#96456a4bb4ee717b9a7d2f94562a16509d39bffa" - integrity sha512-o9t+MQM3P4y7M7yNzqAyjp7z+mQGa4NS4CxiyLqFPyFWyc4O+nodLrkrxSaCTrla6M5YOLaT3RpbbqjszB5g3Q== - dependencies: - "@types/trusted-types" "^2.0.2" - -lit-html@^3.1.0, lit-html@^3.2.0: +lit-html@^3.2.0: version "3.2.1" resolved "https://registry.yarnpkg.com/lit-html/-/lit-html-3.2.1.tgz#8fc49e3531ee5947e4d93e8a5aa642ab1649833b" integrity sha512-qI/3lziaPMSKsrwlxH/xMgikhQ0EGOX2ICU73Bi/YHFvz2j/yMCIrw4+puF2IpQ4+upd3EWbvnHM9+PnJn48YA== dependencies: "@types/trusted-types" "^2.0.2" -lit@2.8.0: - version "2.8.0" - resolved "https://registry.yarnpkg.com/lit/-/lit-2.8.0.tgz#4d838ae03059bf9cafa06e5c61d8acc0081e974e" - integrity sha512-4Sc3OFX9QHOJaHbmTMk28SYgVxLN3ePDjg7hofEft2zWlehFL3LiAuapWc4U/kYwMYJSh2hTCPZ6/LIC7ii0MA== - dependencies: - "@lit/reactive-element" "^1.6.0" - lit-element "^3.3.0" - lit-html "^2.8.0" - -lit@3.1.0: - version "3.1.0" - resolved "https://registry.yarnpkg.com/lit/-/lit-3.1.0.tgz#76429b85dc1f5169fed499a0f7e89e2e619010c9" - integrity sha512-rzo/hmUqX8zmOdamDAeydfjsGXbbdtAFqMhmocnh2j9aDYqbu0fjXygjCa0T99Od9VQ/2itwaGrjZz/ZELVl7w== +lit@2.8.0, lit@3.1.0, lit@^3.1.0: + version "3.2.1" + resolved "https://registry.yarnpkg.com/lit/-/lit-3.2.1.tgz#d6dd15eac20db3a098e81e2c85f70a751ff55592" + integrity sha512-1BBa1E/z0O9ye5fZprPtdqnc0BFzxIxTTOO/tQFmyC/hj1O3jL4TfmLBw0WEwjAokdLwpclkvGgDJwTIh0/22w== dependencies: - "@lit/reactive-element" "^2.0.0" - lit-element "^4.0.0" - lit-html "^3.1.0" + "@lit/reactive-element" "^2.0.4" + lit-element "^4.1.0" + lit-html "^3.2.0" load-json-file@^4.0.0: version "4.0.0" @@ -21272,6 +21305,11 @@ lru-cache@^6.0.0: dependencies: yallist "^4.0.0" +lru-cache@^7.7.1: + version "7.18.3" + resolved "https://registry.yarnpkg.com/lru-cache/-/lru-cache-7.18.3.tgz#f793896e0fd0e954a59dfdd82f0773808df6aa89" + integrity sha512-jumlc0BIUrS3qJGgIkWZsyfAM7NCWiBcCDhnd+3NNM5KbBmLTgHVfWBcg6W+rLUsIpzpERPsvwUP7CckAQSOoA== + lru_map@^0.3.3: version "0.3.3" resolved "https://registry.yarnpkg.com/lru_map/-/lru_map-0.3.3.tgz#b5c8351b9464cbd750335a79650a0ec0e56118dd" @@ -21336,6 +21374,28 @@ make-error@1.x, make-error@^1.1.1: resolved "https://registry.yarnpkg.com/make-error/-/make-error-1.3.6.tgz#2eb2e37ea9b67c4891f684a1394799af484cf7a2" integrity sha512-s8UhlNe7vPKomQhC1qFelMokr/Sc3AgNbso3n74mVPA5LTZwkB9NlXf4XPamLxJE8h0gh73rM94xvwRT2CVInw== +make-fetch-happen@^10.0.3: + version "10.2.1" + resolved "https://registry.yarnpkg.com/make-fetch-happen/-/make-fetch-happen-10.2.1.tgz#f5e3835c5e9817b617f2770870d9492d28678164" + integrity sha512-NgOPbRiaQM10DYXvN3/hhGVI2M5MtITFryzBGxHM5p4wnFxsVCbxkrBrDsk+EZ5OB4jEOT7AjDxtdF+KVEFT7w== + dependencies: + agentkeepalive "^4.2.1" + cacache "^16.1.0" + http-cache-semantics "^4.1.0" + http-proxy-agent "^5.0.0" + https-proxy-agent "^5.0.0" + is-lambda "^1.0.1" + lru-cache "^7.7.1" + minipass "^3.1.6" + minipass-collect "^1.0.2" + minipass-fetch "^2.0.3" + minipass-flush "^1.0.5" + minipass-pipeline "^1.2.4" + negotiator "^0.6.3" + promise-retry "^2.0.1" + socks-proxy-agent "^7.0.0" + ssri "^9.0.0" + make-fetch-happen@^8.0.9: version "8.0.14" resolved "https://registry.yarnpkg.com/make-fetch-happen/-/make-fetch-happen-8.0.14.tgz#aaba73ae0ab5586ad8eaa68bd83332669393e222" @@ -21357,7 +21417,7 @@ make-fetch-happen@^8.0.9: socks-proxy-agent "^5.0.0" ssri "^8.0.0" -make-fetch-happen@^9.0.1, make-fetch-happen@^9.1.0: +make-fetch-happen@^9.0.1: version "9.1.0" resolved "https://registry.yarnpkg.com/make-fetch-happen/-/make-fetch-happen-9.1.0.tgz#53085a09e7971433e6765f7971bf63f4e05cb968" integrity sha512-+zopwDy7DNknmwPQplem5lAZX/eCOzSvSNNcSKm5eVwTkOBzoktEfXsa9L23J/GIRhxRsaxzkPEhrJEpE2F4Gg== @@ -21636,6 +21696,17 @@ minipass-fetch@^1.3.0, minipass-fetch@^1.3.2: optionalDependencies: encoding "^0.1.12" +minipass-fetch@^2.0.3: + version "2.1.2" + resolved "https://registry.yarnpkg.com/minipass-fetch/-/minipass-fetch-2.1.2.tgz#95560b50c472d81a3bc76f20ede80eaed76d8add" + integrity sha512-LT49Zi2/WMROHYoqGgdlQIZh8mLPZmOrN2NdJjMXxYe4nkN6FUyuPuOAOedNJDrx0IRGg9+4guZewtp8hE6TxA== + dependencies: + minipass "^3.1.6" + minipass-sized "^1.0.3" + minizlib "^2.1.2" + optionalDependencies: + encoding "^0.1.13" + minipass-flush@^1.0.5: version "1.0.5" resolved "https://registry.yarnpkg.com/minipass-flush/-/minipass-flush-1.0.5.tgz#82e7135d7e89a50ffe64610a787953c4c4cbb373" @@ -21665,14 +21736,6 @@ minipass-sized@^1.0.3: dependencies: minipass "^3.0.0" -minipass@^2.6.0, minipass@^2.9.0: - version "2.9.0" - resolved "https://registry.yarnpkg.com/minipass/-/minipass-2.9.0.tgz#e713762e7d3e32fed803115cf93e04bca9fcc9a6" - integrity sha512-wxfUjg9WebH+CUDX/CdbRlh5SmfZiy/hpkxaRI16Y9W56Pa75sWgd/rvFilSgrauD9NyFymP/+JFV3KwzIsJeg== - dependencies: - safe-buffer "^5.1.2" - yallist "^3.0.0" - minipass@^3.0.0, minipass@^3.1.0, minipass@^3.1.1, minipass@^3.1.3: version "3.3.4" resolved "https://registry.yarnpkg.com/minipass/-/minipass-3.3.4.tgz#ca99f95dd77c43c7a76bf51e6d200025eee0ffae" @@ -21680,6 +21743,13 @@ minipass@^3.0.0, minipass@^3.1.0, minipass@^3.1.1, minipass@^3.1.3: dependencies: yallist "^4.0.0" +minipass@^3.1.6: + version "3.3.6" + resolved "https://registry.yarnpkg.com/minipass/-/minipass-3.3.6.tgz#7bba384db3a1520d18c9c0e5251c3444e95dd94a" + integrity sha512-DxiNidxSEK+tHG6zOIklvNOwm3hvCrbUrdtzY74U6HKTJxvIDfOUL5W5P2Ghd3DTkhhKPYGqeNUIh5qcM4YBfw== + dependencies: + yallist "^4.0.0" + "minipass@^5.0.0 || ^6.0.2 || ^7.0.0": version "7.0.4" resolved "https://registry.yarnpkg.com/minipass/-/minipass-7.0.4.tgz#dbce03740f50a4786ba994c1fb908844d27b038c" @@ -21690,14 +21760,7 @@ minipass@^7.1.2: resolved "https://registry.yarnpkg.com/minipass/-/minipass-7.1.2.tgz#93a9626ce5e5e66bd4db86849e7515e92340a707" integrity sha512-qOOzS1cBTWYF4BH8fVePDBOO9iptMnGUEZwNc/cMWnTV2nVLZ7VoNWEPHkYczZA0pdoA7dl6e7FL659nX9S2aw== -minizlib@^1.3.3: - version "1.3.3" - resolved "https://registry.yarnpkg.com/minizlib/-/minizlib-1.3.3.tgz#2290de96818a34c29551c8a8d301216bd65a861d" - integrity sha512-6ZYMOEnmVsdCeTJVE0W9ZD+pVnE8h9Hma/iOwwRDsdQoePpoX56/8B6z3P9VNwppJuBKNRuFDRNRqRWexT9G9Q== - dependencies: - minipass "^2.9.0" - -minizlib@^2.0.0, minizlib@^2.1.1: +minizlib@^2.0.0, minizlib@^2.1.1, minizlib@^2.1.2: version "2.1.2" resolved "https://registry.yarnpkg.com/minizlib/-/minizlib-2.1.2.tgz#e90d3466ba209b932451508a11ce3d3632145931" integrity sha512-bAxsR8BVfj60DWXHE3u30oHzfl4G7khkSuPW+qvpd7jFRHm7dLxOjUk1EHACJ/hxLY8phGJ0YhYHZo7jil7Qdg== @@ -21724,7 +21787,7 @@ mkdirp-infer-owner@^2.0.0: infer-owner "^1.0.4" mkdirp "^1.0.3" -mkdirp@^0.5.1, mkdirp@^0.5.3, mkdirp@^0.5.5: +mkdirp@^0.5.1, mkdirp@^0.5.3: version "0.5.6" resolved "https://registry.yarnpkg.com/mkdirp/-/mkdirp-0.5.6.tgz#7def03d2432dcae4ba1d611445c48396062255f6" integrity sha512-FP+p8RB8OWpF3YZBCrP5gtADmtXApB5AMLn+vdyA+PyxCjrCs00mjyUozssO33cwDeT3wNGdLxJ5M//YqtHAJw== @@ -22136,6 +22199,11 @@ negotiator@0.6.3, negotiator@^0.6.2: resolved "https://registry.yarnpkg.com/negotiator/-/negotiator-0.6.3.tgz#58e323a72fedc0d6f9cd4d31fe49f51479590ccd" integrity sha512-+EUsqGPLsM+j/zdChZjsnX51g4XrHFOIXwfnCVPGlQk/k5giakcKsuxCObBRu6DSm9opw/O6slWbJdghQM4bBg== +negotiator@^0.6.3: + version "0.6.4" + resolved "https://registry.yarnpkg.com/negotiator/-/negotiator-0.6.4.tgz#777948e2452651c570b712dd01c23e262713fff7" + integrity sha512-myRT3DiWPHqho5PrJaIRyaMv2kgYf0mUVgBNOYMuCH5Ki1yEiQaf/ZJuQ62nvpc44wL5WDbTX7yGJi1Neevw8w== + neo-async@^2.6.0: version "2.6.2" resolved "https://registry.yarnpkg.com/neo-async/-/neo-async-2.6.2.tgz#b4aafb93e3aeb2d8174ca53cf163ab7d7308305f" @@ -22267,55 +22335,23 @@ node-gyp-build@^4.2.0, node-gyp-build@^4.3.0: resolved "https://registry.yarnpkg.com/node-gyp-build/-/node-gyp-build-4.5.0.tgz#7a64eefa0b21112f89f58379da128ac177f20e40" integrity sha512-2iGbaQBV+ITgCz76ZEjmhUKAKVf7xfY1sRl4UiKQspfZMH2h06SyhNsnSVy50cwkFQDGLyif6m/6uFXHkOZ6rg== -node-gyp@8.x: - version "8.4.1" - resolved "https://registry.yarnpkg.com/node-gyp/-/node-gyp-8.4.1.tgz#3d49308fc31f768180957d6b5746845fbd429937" - integrity sha512-olTJRgUtAb/hOXG0E93wZDs5YiJlgbXxTwQAFHyNlRsXQnYzUaF2aGgujZbw+hR8aF4ZG/rST57bWMWD16jr9w== +node-gyp@8.x, node-gyp@^5.0.2, node-gyp@^7.1.0, node-gyp@^9.0.0: + version "9.4.1" + resolved "https://registry.yarnpkg.com/node-gyp/-/node-gyp-9.4.1.tgz#8a1023e0d6766ecb52764cc3a734b36ff275e185" + integrity sha512-OQkWKbjQKbGkMf/xqI1jjy3oCTgMKJac58G2+bjZb3fza6gW2YrCSdMQYaoTb70crvE//Gngr4f0AgVHmqHvBQ== dependencies: env-paths "^2.2.0" + exponential-backoff "^3.1.1" glob "^7.1.4" graceful-fs "^4.2.6" - make-fetch-happen "^9.1.0" - nopt "^5.0.0" + make-fetch-happen "^10.0.3" + nopt "^6.0.0" npmlog "^6.0.0" rimraf "^3.0.2" semver "^7.3.5" tar "^6.1.2" which "^2.0.2" -node-gyp@^5.0.2: - version "5.1.1" - resolved "https://registry.yarnpkg.com/node-gyp/-/node-gyp-5.1.1.tgz#eb915f7b631c937d282e33aed44cb7a025f62a3e" - integrity sha512-WH0WKGi+a4i4DUt2mHnvocex/xPLp9pYt5R6M2JdFB7pJ7Z34hveZ4nDTGTiLXCkitA9T8HFZjhinBCiVHYcWw== - dependencies: - env-paths "^2.2.0" - glob "^7.1.4" - graceful-fs "^4.2.2" - mkdirp "^0.5.1" - nopt "^4.0.1" - npmlog "^4.1.2" - request "^2.88.0" - rimraf "^2.6.3" - semver "^5.7.1" - tar "^4.4.12" - which "^1.3.1" - -node-gyp@^7.1.0: - version "7.1.2" - resolved "https://registry.yarnpkg.com/node-gyp/-/node-gyp-7.1.2.tgz#21a810aebb187120251c3bcec979af1587b188ae" - integrity sha512-CbpcIo7C3eMu3dL1c3d0xw449fHIGALIJsRP4DDPHpyiW8vcriNY7ubh9TE4zEKfSxscY7PjeFnshE7h75ynjQ== - dependencies: - env-paths "^2.2.0" - glob "^7.1.4" - graceful-fs "^4.2.3" - nopt "^5.0.0" - npmlog "^4.1.2" - request "^2.88.2" - rimraf "^3.0.2" - semver "^7.3.2" - tar "^6.0.2" - which "^2.0.2" - node-int64@^0.4.0: version "0.4.0" resolved "https://registry.yarnpkg.com/node-int64/-/node-int64-0.4.0.tgz#87a9065cdb355d3182d8f94ce11188b825c68a3b" @@ -22336,14 +22372,6 @@ node-releases@^2.0.6: resolved "https://registry.yarnpkg.com/node-releases/-/node-releases-2.0.6.tgz#8a7088c63a55e493845683ebf3c828d8c51c5503" integrity sha512-PiVXnNuFm5+iYkLBNeq5211hvO38y63T0i2KKh2KnUs3RpzJ+JtODFjkD8yjLwnDkTYF1eKXheUwdssR+NRZdg== -nopt@^4.0.1: - version "4.0.3" - resolved "https://registry.yarnpkg.com/nopt/-/nopt-4.0.3.tgz#a375cad9d02fd921278d954c2254d5aa57e15e48" - integrity sha512-CvaGwVMztSMJLOeXPrez7fyfObdZqNUK1cPAEzLHrTybIua9pMdmmPR5YwtfNftIOMv3DPUhFaxsZMNTQO20Kg== - dependencies: - abbrev "1" - osenv "^0.1.4" - nopt@^5.0.0: version "5.0.0" resolved "https://registry.yarnpkg.com/nopt/-/nopt-5.0.0.tgz#530942bb58a512fccafe53fe210f13a25355dc88" @@ -22351,6 +22379,13 @@ nopt@^5.0.0: dependencies: abbrev "1" +nopt@^6.0.0: + version "6.0.0" + resolved "https://registry.yarnpkg.com/nopt/-/nopt-6.0.0.tgz#245801d8ebf409c6df22ab9d95b65e1309cdb16d" + integrity sha512-ZwLpbTgdhuZUnZzjd7nb1ZV+4DoiC6/sfiVKok72ym/4Tlf+DFdlHYmT2JPmcNNWV6Pi3SDf1kT+A4r9RTuT9g== + dependencies: + abbrev "^1.0.0" + normalize-package-data@^2.0.0, normalize-package-data@^2.3.2, normalize-package-data@^2.5.0: version "2.5.0" resolved "https://registry.yarnpkg.com/normalize-package-data/-/normalize-package-data-2.5.0.tgz#e66db1838b200c1dfc233225d12cb36520e234a8" @@ -22797,24 +22832,11 @@ ora@^7.0.1: string-width "^6.1.0" strip-ansi "^7.1.0" -os-homedir@^1.0.0: - version "1.0.2" - resolved "https://registry.yarnpkg.com/os-homedir/-/os-homedir-1.0.2.tgz#ffbc4988336e0e833de0c168c7ef152121aa7fb3" - integrity sha512-B5JU3cabzk8c67mRRd3ECmROafjYMXbuzlwtqdM8IbS8ktlTix8aFGb2bAGKrSRIlnfKwovGUUr72JUPyOb6kQ== - -os-tmpdir@^1.0.0, os-tmpdir@~1.0.2: +os-tmpdir@~1.0.2: version "1.0.2" resolved "https://registry.yarnpkg.com/os-tmpdir/-/os-tmpdir-1.0.2.tgz#bbe67406c79aa85c5cfec766fe5734555dfa1274" integrity sha512-D2FR03Vir7FIu45XBY20mTb+/ZSWB00sjU9jdQXt83gDrI4Ztz5Fs7/yy74g2N5SVQY4xY1qDr4rNddwYRVX0g== -osenv@^0.1.4: - version "0.1.5" - resolved "https://registry.yarnpkg.com/osenv/-/osenv-0.1.5.tgz#85cdfafaeb28e8677f416e287592b5f3f49ea410" - integrity sha512-0CWcCECdMVc2Rw3U5w9ZjqX6ga6ubk1xDVKxtBQPK7wis/0F2r9T6k4ydGYhecl7YUBxBVxhL5oisPsNxAPe2g== - dependencies: - os-homedir "^1.0.0" - os-tmpdir "^1.0.0" - p-any@^3.0.0: version "3.0.0" resolved "https://registry.yarnpkg.com/p-any/-/p-any-3.0.0.tgz#79847aeed70b5d3a10ea625296c0c3d2e90a87b9" @@ -24601,7 +24623,7 @@ remove-accents@0.5.0: resolved "https://registry.yarnpkg.com/remove-accents/-/remove-accents-0.5.0.tgz#77991f37ba212afba162e375b627631315bed687" integrity sha512-8g3/Otx1eJaVD12e31UbJj1YzdtVvzH85HV7t+9MJYk/u3XmkOUJ5Ys9wQrf9PCPK8+xn4ymzqYCiZl6QWKn+A== -request@^2.88.0, request@^2.88.2: +request@^2.88.2: version "2.88.2" resolved "https://registry.yarnpkg.com/request/-/request-2.88.2.tgz#d73c918731cb5a87da047e207234146f664d12b3" integrity sha512-MsvtOrfG9ZcrOwAW+Qi+F6HbD0CWXEh9ou77uOb7FM2WPhwT7smM833PzanhJLsgXjN89Ir6V2PczXNnMpwKhw== @@ -24783,7 +24805,7 @@ rimraf@3.0.2, rimraf@^3.0.0, rimraf@^3.0.2: dependencies: glob "^7.1.3" -rimraf@^2.2.8, rimraf@^2.6.3: +rimraf@^2.2.8: version "2.7.1" resolved "https://registry.yarnpkg.com/rimraf/-/rimraf-2.7.1.tgz#35797f13a7fdadc566142c29d4f07ccad483e3ec" integrity sha512-uWjbaKIK3T1OSVptzX7Nl6PvQ3qAGtKEtVRjRuazjfL3Bx5eI409VZSqgND+4UNnmzLVdPj9FqFJNPqBZFve4w== @@ -24915,7 +24937,7 @@ safe-buffer@5.1.2, safe-buffer@~5.1.0, safe-buffer@~5.1.1: resolved "https://registry.yarnpkg.com/safe-buffer/-/safe-buffer-5.1.2.tgz#991ec69d296e0313747d59bdfd2b745c35f8828d" integrity sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g== -safe-buffer@5.2.1, safe-buffer@^5.0.1, safe-buffer@^5.1.0, safe-buffer@^5.1.1, safe-buffer@^5.1.2, safe-buffer@^5.2.0, safe-buffer@^5.2.1, safe-buffer@~5.2.0: +safe-buffer@5.2.1, safe-buffer@^5.0.1, safe-buffer@^5.1.0, safe-buffer@^5.1.1, safe-buffer@^5.1.2, safe-buffer@^5.2.0, safe-buffer@~5.2.0: version "5.2.1" resolved "https://registry.yarnpkg.com/safe-buffer/-/safe-buffer-5.2.1.tgz#1eaf9fa9bdb1fdd4ec75f58f9cdb4e6b7827eec6" integrity sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ== @@ -25021,11 +25043,6 @@ semver@7.3.7, semver@7.x, semver@^7.1.1, semver@^7.1.3, semver@^7.3.2, semver@^7 dependencies: lru-cache "^6.0.0" -semver@^5.7.1: - version "5.7.2" - resolved "https://registry.yarnpkg.com/semver/-/semver-5.7.2.tgz#48d55db737c3287cd4835e17fa13feace1c41ef8" - integrity sha512-cBznnQ9KjJqU67B52RMC65CMarK2600WFnbkcaiwWq3xy/5haFJlshgnpjovMVJ+Hff49d8GEn0b87C5pDQ10g== - semver@^6.0.0, semver@^6.3.0: version "6.3.0" resolved "https://registry.yarnpkg.com/semver/-/semver-6.3.0.tgz#ee0a64c8af5e8ceea67687b133761e1becbd1d3d" @@ -25303,6 +25320,15 @@ socks-proxy-agent@^6.0.0: debug "^4.3.3" socks "^2.6.2" +socks-proxy-agent@^7.0.0: + version "7.0.0" + resolved "https://registry.yarnpkg.com/socks-proxy-agent/-/socks-proxy-agent-7.0.0.tgz#dc069ecf34436621acb41e3efa66ca1b5fed15b6" + integrity sha512-Fgl0YPZ902wEsAyiQ+idGd1A7rSFx/ayC1CQVMw5P+EQx2V0SgpGtf6OKFhVjPflPUl9YMmEOnmfjCdMUsygww== + dependencies: + agent-base "^6.0.2" + debug "^4.3.3" + socks "^2.6.2" + socks@^2.3.3, socks@^2.6.2: version "2.7.0" resolved "https://registry.yarnpkg.com/socks/-/socks-2.7.0.tgz#f9225acdb841e874dca25f870e9130990f3913d0" @@ -25508,6 +25534,13 @@ ssri@^8.0.0, ssri@^8.0.1: dependencies: minipass "^3.1.1" +ssri@^9.0.0: + version "9.0.1" + resolved "https://registry.yarnpkg.com/ssri/-/ssri-9.0.1.tgz#544d4c357a8d7b71a19700074b6883fcb4eae057" + integrity sha512-o57Wcn66jMQvfHG1FlYbWeZWW/dHZhJXjpIcTfXldXEk5nz5lStPo3mK0OJQfGR3RbZUlbISexbljkJzuEj/8Q== + dependencies: + minipass "^3.1.1" + stack-utils@^2.0.3: version "2.0.5" resolved "https://registry.yarnpkg.com/stack-utils/-/stack-utils-2.0.5.tgz#d25265fca995154659dbbfba3b49254778d2fdd5" @@ -26016,19 +26049,6 @@ tar-stream@^2.1.4: inherits "^2.0.3" readable-stream "^3.1.1" -tar@^4.4.12: - version "4.4.19" - resolved "https://registry.yarnpkg.com/tar/-/tar-4.4.19.tgz#2e4d7263df26f2b914dee10c825ab132123742f3" - integrity sha512-a20gEsvHnWe0ygBY8JbxoM4w3SJdhc7ZAuxkLqh+nvNQN2IOt0B5lLgM490X5Hl8FF0dl0tOf2ewFYAlIFgzVA== - dependencies: - chownr "^1.1.4" - fs-minipass "^1.2.7" - minipass "^2.9.0" - minizlib "^1.3.3" - mkdirp "^0.5.5" - safe-buffer "^5.2.1" - yallist "^3.1.1" - tar@^6.0.2, tar@^6.1.0, tar@^6.1.11, tar@^6.1.2: version "6.1.11" resolved "https://registry.yarnpkg.com/tar/-/tar-6.1.11.tgz#6760a38f003afa1b2ffd0ffe9e9abbd0eab3d621" @@ -26364,11 +26384,6 @@ ts-interface-checker@^0.1.9: resolved "https://registry.yarnpkg.com/ts-interface-checker/-/ts-interface-checker-0.1.13.tgz#784fd3d679722bc103b1b4b8030bcddb5db2a699" integrity sha512-Y/arvbn+rrz3JCKl9C4kVNfTfSm2/mEp5FSz5EsZSANGPSlQrpRI5M4PKF+mJnE52jOO90PnPSc3Ur3bTQw0gA== -ts-jest-mock-import-meta@^1.2.1: - version "1.2.1" - resolved "https://registry.yarnpkg.com/ts-jest-mock-import-meta/-/ts-jest-mock-import-meta-1.2.1.tgz#773a67810eede5f48df23a2f2f0bd4532bdc9129" - integrity sha512-+qh8ZijpFnh7nMNdw1yYrvmnhe3Rctau5a3AFtgBAtps46RSiC8SHr3Z0S9sNqCU3cNOGumCAVO7Ac65fstxRA== - ts-jest@^27.1.4: version "27.1.5" resolved "https://registry.yarnpkg.com/ts-jest/-/ts-jest-27.1.5.tgz#0ddf1b163fbaae3d5b7504a1e65c914a95cff297" @@ -26841,6 +26856,13 @@ unique-filename@^1.1.1: dependencies: unique-slug "^2.0.0" +unique-filename@^2.0.0: + version "2.0.1" + resolved "https://registry.yarnpkg.com/unique-filename/-/unique-filename-2.0.1.tgz#e785f8675a9a7589e0ac77e0b5c34d2eaeac6da2" + integrity sha512-ODWHtkkdx3IAR+veKxFV+VBkUMcN+FaqzUUd7IZzt+0zhDZFPFxhlqwPF3YQvMHx1TD0tdgYl+kuPnJ8E6ql7A== + dependencies: + unique-slug "^3.0.0" + unique-slug@^2.0.0: version "2.0.2" resolved "https://registry.yarnpkg.com/unique-slug/-/unique-slug-2.0.2.tgz#baabce91083fc64e945b0f3ad613e264f7cd4e6c" @@ -26848,6 +26870,13 @@ unique-slug@^2.0.0: dependencies: imurmurhash "^0.1.4" +unique-slug@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/unique-slug/-/unique-slug-3.0.0.tgz#6d347cf57c8a7a7a6044aabd0e2d74e4d76dc7c9" + integrity sha512-8EyMynh679x/0gqE9fT9oilG+qEt+ibFyqjuVTsZn1+CMxH+XLlpvr2UZx4nVcCwTpx81nICr2JQFkM+HPLq4w== + dependencies: + imurmurhash "^0.1.4" + universal-user-agent@^6.0.0: version "6.0.0" resolved "https://registry.yarnpkg.com/universal-user-agent/-/universal-user-agent-6.0.0.tgz#3381f8503b251c0d9cd21bc1de939ec9df5480ee" @@ -27811,7 +27840,7 @@ yallist@4.0.0, yallist@^4.0.0: resolved "https://registry.yarnpkg.com/yallist/-/yallist-4.0.0.tgz#9bb92790d9c0effec63be73519e11a35019a3a72" integrity sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A== -yallist@^3.0.0, yallist@^3.0.2, yallist@^3.1.1: +yallist@^3.0.2: version "3.1.1" resolved "https://registry.yarnpkg.com/yallist/-/yallist-3.1.1.tgz#dbb7daf9bfd8bac9ab45ebf602b8cbad0d5d08fd" integrity sha512-a4UGQaWPH59mOXUYnAG2ewncQS4i4F43Tv3JoAM+s2VDAmS9NsK8GpDMLrCHPksFT7h3K6TOoUNn2pb7RoXx4g==