From ed78f1e7a3870040e7b9690a54b89896f395bc9a Mon Sep 17 00:00:00 2001 From: AndreaRettaroli Date: Thu, 5 Dec 2024 00:27:35 +0100 Subject: [PATCH 1/5] integrated zkVerify example --- apps/tutorial/.env.example | 1 + apps/tutorial/package.json | 4 +- apps/tutorial/src/useZkVerify.ts | 318 +++++++++ pnpm-lock.yaml | 1094 +++++++++++++++++++++++++++++- 4 files changed, 1409 insertions(+), 8 deletions(-) create mode 100644 apps/tutorial/src/useZkVerify.ts diff --git a/apps/tutorial/.env.example b/apps/tutorial/.env.example index 56b1c27..c1e8031 100644 --- a/apps/tutorial/.env.example +++ b/apps/tutorial/.env.example @@ -1 +1,2 @@ NEBRA_SIGNER_PK="" +ZKVERIFY_SIGNER_PK="" \ No newline at end of file diff --git a/apps/tutorial/package.json b/apps/tutorial/package.json index d9d0830..a94c1dd 100644 --- a/apps/tutorial/package.json +++ b/apps/tutorial/package.json @@ -12,6 +12,7 @@ "build": "echo NOTHING", "test": "echo TODO", "tutorial1": "ts-node -T src/tutorial1.ts", + "useZkVerify": "ts-node -T src/useZkVerify.ts", "useNebraUpa": "ts-node -T src/useNebraUpa.ts", "prettier:write": "prettier --write ./src", "lint": "eslint --ignore-path ./.eslintignore --ext .js,.ts ." @@ -27,7 +28,8 @@ "node-fetch": "^3.3.2", "tslog": "^4.9.2", "typescript": "^5.4.5", - "yargs": "^17.7.2" + "yargs": "^17.7.2", + "zkverifyjs": "^0.3.1" }, "devDependencies": { "rimraf": "^5.0.6", diff --git a/apps/tutorial/src/useZkVerify.ts b/apps/tutorial/src/useZkVerify.ts new file mode 100644 index 0000000..bfdc494 --- /dev/null +++ b/apps/tutorial/src/useZkVerify.ts @@ -0,0 +1,318 @@ +import { + prepare, + credential, + evm, + credType, + errors, + user, + issuer, + utils, + babyzkTypes, +} from "@galxe-identity-protocol/sdk"; +import { ethers } from "ethers"; +import { VerifyTransactionInfo, VKRegistrationTransactionInfo, ZkVerifyEvents, zkVerifySession } from "zkverifyjs"; + +// conviniently unwrap the result of a function call by throwing an error if the result is an error. +const unwrap = errors.unwrap; + +// Use ankr's free open rpc in this example. +const MAINNET_RPC = "https://rpc.ankr.com/eth"; +const provider = new ethers.JsonRpcProvider(MAINNET_RPC); + +// This is a dummy issuer's EVM address that has been registered on mainnet. +// Because it authroize the private key that is public to everyone, +// it should not be used in production! +const dummyIssuerEvmAddr = "0x15f4a32c40152a0f48E61B7aed455702D1Ea725e"; + +// demonstration of the issuingProcess. +async function issuingProcess(userEvmAddr: string, userIdc: bigint) { + // 1. First of all, we must create the type of the credential. + // In this example, Let's use the primitive type Scalar. + const typeSpec = credType.primitiveTypes.scalar; + const tp = unwrap(credType.createTypeFromSpec(typeSpec)); + + // 2. Creating a credential based on the type. + // In general, this is when the issuer decides "claims" about the user. + // Because we are issuing a credential that represents the number of transactions, + // let's fetch it from the Ethereum network. + const txCount = await provider.getTransactionCount(userEvmAddr); + // The contextID is a unique identifier representing the context of the credential. + // We will just use the string "Number of transactions". + // NOTE: The contextID must be registered on the chain before issuing the credential for visibility. + const contextID = credential.computeContextID("Number of transactions"); + // Now, let's create the credential. + const newCred = unwrap( + credential.Credential.create( + { + type: tp, + contextID: contextID, + userID: BigInt(userEvmAddr), + }, + { + val: BigInt(txCount).toString(), // credential value, number of transactions + } + ) + ); + // Add additional attributes to the credential attachments, if needed + // these attributes will not be part of the zero-knowledge proof, but + // they will be signed by the issuer as well. + // So, you must add them before signing the credential. + newCred.attachments["creativity"] = "uncountable"; + + // 3. Signing the credential. + // After the credential is created, it must be signed by the issuer. + // The issuer must have been registered on the chain, at least on the chain of the supplied ChainID. + // Registering the issuer on more chains is recommended for better interoperability. + // Also, the signing key's keyID must be active correspondingly on chains. + // For demonstration purposes, we use the dummy issuer with a publicly known key. + // The dummy issuer has been registered on etheruem mainnet, and the following key is also activated. + // Don't use this issuer or key in production! + const issuerID = BigInt(dummyIssuerEvmAddr); + const issuerChainID = BigInt(1); // mainnet + // A mock private key for the signer, which is used to sign the credential. + // This key has been registered and activated on mainnet by the dummy issuer. + const dummyKey = utils.decodeFromHex("0xfd60ceb442aca7f74d2e56c1f0e93507798e8a6e02c4cd1a5585a36167fa7b03"); + const issuerPk = dummyKey; + // create a new issuer object using the private key, issuerID, and issuerChainID. + const myIssuer = new issuer.BabyzkIssuer(issuerPk, issuerID, issuerChainID); + // sign the credential to user's identity commitment, with a unique signature id and expiration date. + myIssuer.sign(newCred, { + sigID: BigInt(100), + expiredAt: BigInt(Math.ceil(new Date().getTime() / 1000) + 7 * 24 * 60 * 60), // assuming the credential will be expired after 7 days + identityCommitment: userIdc, + }); + + // all done, return the credential to the owner. + return newCred; +} + +// demonstration of the proofGenProcess. +async function proofGenProcess(myCred: credential.Credential, u: user.User) { + // Now issuer can issue a credential to the user. + // In this example, we will issue a credential that represents the number of transactions, + // that the user has made on the Ethereum, at the time of issuance. + // Assuming that the user has received the credential, + // user can generate a zk proof to prove that he has sent more than 500 transactions, but no more than 5000. + // Let's first decide the external nullifier for the proof. + const externalNullifier = utils.computeExternalNullifier("Galxe Identity Protocol tutorial's verification"); + // Now we need to fetch the proof generation gadgets. It is explicitly fetched outside the proof generation function + // because usually, the proof generation gadgets are stored in a remote server, and may be large (3-10MB). + // It's highly recommended to cache the proof generation gadgets locally. + console.log("downloading proof generation gadgets..."); + const proofGenGagets = await user.User.fetchProofGenGadgetsByTypeID(myCred.header.type, provider); + console.log("proof generation gadgets are downloaded successfully."); + // Finally, let's generate the proof. + // Assume that we want to verify that the credential is still valid after 3 days. + const expiredAtLowerBound = BigInt(Math.ceil(new Date().getTime() / 1000) + 3 * 24 * 60 * 60); + // Do not reveal the credential's actual id, which is the evm address in this example + const equalCheckId = BigInt(0); + // Instead, claim to be Mr.Deadbeef. It's verifier's responsibility to verify that the pseudonym is who + // he claims to be, after verifying the proof. + const pseudonym = BigInt("0xdeadbeef"); + // We want to prove that the credential's 'val' value is between 500 and 5000, inclusively. + const proof = await u.genBabyzkProofWithQuery( + u.getIdentityCommitment("evm")!, + myCred, + proofGenGagets, + ` + { + "conditions": [ + { + "identifier": "val", + "operation": "IN", + "value": { + "from": "500", + "to": "5000" + } + } + ], + "options": { + "expiredAtLowerBound": "${expiredAtLowerBound}", + "externalNullifier": "${externalNullifier}", + "equalCheckId": "${equalCheckId}", + "pseudonym": "${pseudonym}" + } + } + ` + ); + return proof; +} + +async function executeVerificationWithZkVerify(proof: babyzkTypes.WholeProof, vk: unknown) { + try { + // Start a new zkVerifySession on our testnet + const session = await zkVerifySession.start().Testnet().withAccount(process.env.ZKVERIFY_SIGNER_PK!); + + // Execute the verification transaction + const { events, transactionResult } = await session + .verify() + .groth16() + .execute({ + proofData: { + vk: vk, + proof: proof.proof, + publicSignals: proof.publicSignals, + }, + }); + + // Listen for the 'includedInBlock' event + events.on(ZkVerifyEvents.IncludedInBlock, eventData => { + console.log("Transaction included in block:", eventData); + }); + + // Listen for the 'finalized' event + events.on(ZkVerifyEvents.Finalized, eventData => { + console.log("Transaction finalized:", eventData); + }); + + // Handle errors during the transaction process + events.on("error", error => { + console.error("An error occurred during the transaction:", error); + throw error; + }); + + // Await the final transaction result + const transactionInfo: VerifyTransactionInfo = await transactionResult; + console.log("Transaction completed successfully:", transactionInfo); + return transactionInfo; + } catch (error) { + console.error("Transaction failed:", error); + throw error; + } +} + +async function executeVerificationWithZkVerifyRegisteredZK( + proof: babyzkTypes.WholeProof, + vkTransactionInfo: VKRegistrationTransactionInfo +) { + try { + // Start a new zkVerifySession on our testnet + const session = await zkVerifySession.start().Testnet().withAccount(process.env.ZKVERIFY_SIGNER_PK!); + + // Execute the verification transaction + const { events, transactionResult } = await session + .verify() + .groth16() + .withRegisteredVk() + .execute({ + proofData: { + vk: vkTransactionInfo.statementHash!, + proof: proof.proof, + publicSignals: proof.publicSignals, + }, + }); + + // Listen for the 'includedInBlock' event + events.on(ZkVerifyEvents.IncludedInBlock, eventData => { + console.log("Transaction included in block:", eventData); + }); + + // Listen for the 'finalized' event + events.on(ZkVerifyEvents.Finalized, eventData => { + console.log("Transaction finalized:", eventData); + }); + + // Handle errors during the transaction process + events.on("error", error => { + console.error("An error occurred during the transaction:", error); + throw error; + }); + + // Await the final transaction result + const transactionInfo: VerifyTransactionInfo = await transactionResult; + console.log("Transaction completed successfully:", transactionInfo); + return transactionInfo; + } catch (error) { + console.error("Transaction failed:", error); + throw error; + } +} + +export async function registerVerficationKey(vkJson: any): Promise { + try { + const session = await zkVerifySession.start().Testnet().withAccount(process.env.ZKVERIFY_SIGNER_PK!); + const { transactionResult } = await session.registerVerificationKey().groth16().execute(vkJson); + const { statementHash } = await transactionResult; + console.log(statementHash); + return transactionResult; + } catch (error) { + console.error("Error in registerVerficationKey:", error); + throw error; + } +} + +async function verifyWithZkVerify(proof: babyzkTypes.WholeProof): Promise { + const expectedTypeID = credType.primitiveTypes.scalar.type_id; + + // When using zkVerify on-chain verification, you must first get the verification key. + // You can embed the verification key in your application, or fetch it from a remote server. + // We will fetch the verification key from the chain in this example. + // The first step is to do a static proof verification, making sure that the zk proof is valid. + const tpRegistry = evm.v1.createTypeRegistry({ + signerOrProvider: provider, + }); + const verifier = await tpRegistry.getVerifier(expectedTypeID, credential.VerificationStackEnum.BabyZK); + const vKey = await verifier.getVerificationKeysRaw(); + console.log("on zkVerify-chain static proof verification start, executing verification transaction"); + const verifyResult = await executeVerificationWithZkVerify(proof, vKey); + console.log("on zkVerify-chain static proof verification result: ", verifyResult); + + return true; +} + +async function verifyWithZkVerifyRegisteredZK(proof: babyzkTypes.WholeProof): Promise { + const expectedTypeID = credType.primitiveTypes.scalar.type_id; + + // When using zkVerify on-chain verification, you must first get the verification key. + // You can embed the verification key in your application, or fetch it from a remote server. + // We will fetch the verification key from the chain in this example. + // The first step is to do a static proof verification, making sure that the zk proof is valid. + const tpRegistry = evm.v1.createTypeRegistry({ + signerOrProvider: provider, + }); + const verifier = await tpRegistry.getVerifier(expectedTypeID, credential.VerificationStackEnum.BabyZK); + const vKey = await verifier.getVerificationKeysRaw(); + // on-chain proof verification + console.log("on zkVerify-chain zk proof, registering verification key"); + const transactionHash = await registerVerficationKey(vKey); + console.log("on zkVerify-chain static proof verification start, executing verification transaction"); + const verifyResult = await executeVerificationWithZkVerifyRegisteredZK(proof, transactionHash); + console.log("on zkVerify-chain static proof verification result: ", verifyResult); + + return true; +} + +async function main() { + // prepare must be called by the application before any other function. + await prepare(); + + // The very first step is to create a user with a random identity. + // This should be done on user's device and the identity should be stored securely. + const u = new user.User(); + const evmIdSlice = u.createNewIdentitySlice("evm"); + + // User's identity commitment is computed based on the secrets of the identity slice. + // You can also retrive the identity commitment from the identity slice. + const userIdc = user.User.computeIdentityCommitment(evmIdSlice); + + // let's use a famous Ethereum address in this example. + const userEvmAddr = "0xd8dA6BF26964aF9D7eEd9e03E53415D37aA96045"; + + // Issuer's process: issuing a credential to the user. + const myCred = await issuingProcess(userEvmAddr, userIdc); + console.log("Credential is issued successfully."); + console.log(myCred.marshal(2)); + + // User's process: generating a zk proof to prove some statements about the credential. + const proof = await proofGenProcess(myCred, u); + console.log("Proof is generated successfully.", proof); + + // On zkVeirfy chain verification process: verifying the proof. + await verifyWithZkVerify(proof); + + await verifyWithZkVerifyRegisteredZK(proof); + + process.exit(0); +} + +main(); diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index acac6bc..409da9a 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -206,6 +206,9 @@ importers: yargs: specifier: ^17.7.2 version: 17.7.2 + zkverifyjs: + specifier: ^0.3.1 + version: 0.3.1(@polkadot/util-crypto@13.2.3(@polkadot/util@13.2.3))(@polkadot/util@13.2.3)(bufferutil@4.0.7)(typescript@5.4.5)(utf-8-validate@5.0.7)(zod@3.23.8) devDependencies: rimraf: specifier: ^5.0.6 @@ -267,7 +270,7 @@ importers: version: 1.0.10(hardhat@2.22.3(bufferutil@4.0.7)(ts-node@10.9.2(@types/node@18.19.33)(typescript@4.9.5))(typescript@4.9.5)(utf-8-validate@5.0.7)) '@nomicfoundation/hardhat-toolbox': specifier: ^3.0.0 - version: 3.0.0(@nomicfoundation/hardhat-chai-matchers@2.0.6(@nomicfoundation/hardhat-ethers@3.0.5(ethers@6.12.1(bufferutil@4.0.7)(utf-8-validate@5.0.7))(hardhat@2.22.3(bufferutil@4.0.7)(ts-node@10.9.2(@types/node@18.19.33)(typescript@4.9.5))(typescript@4.9.5)(utf-8-validate@5.0.7)))(chai@4.4.1)(ethers@6.12.1(bufferutil@4.0.7)(utf-8-validate@5.0.7))(hardhat@2.22.3(bufferutil@4.0.7)(ts-node@10.9.2(@types/node@18.19.33)(typescript@4.9.5))(typescript@4.9.5)(utf-8-validate@5.0.7)))(@nomicfoundation/hardhat-ethers@3.0.5(ethers@6.12.1(bufferutil@4.0.7)(utf-8-validate@5.0.7))(hardhat@2.22.3(bufferutil@4.0.7)(ts-node@10.9.2(@types/node@18.19.33)(typescript@4.9.5))(typescript@4.9.5)(utf-8-validate@5.0.7)))(@nomicfoundation/hardhat-network-helpers@1.0.10(hardhat@2.22.3(bufferutil@4.0.7)(ts-node@10.9.2(@types/node@18.19.33)(typescript@4.9.5))(typescript@4.9.5)(utf-8-validate@5.0.7)))(@nomicfoundation/hardhat-verify@1.1.1(hardhat@2.22.3(bufferutil@4.0.7)(ts-node@10.9.2(@types/node@18.19.33)(typescript@4.9.5))(typescript@4.9.5)(utf-8-validate@5.0.7)))(@typechain/ethers-v6@0.4.3(ethers@6.12.1(bufferutil@4.0.7)(utf-8-validate@5.0.7))(typechain@8.3.2(typescript@4.9.5))(typescript@4.9.5))(@typechain/hardhat@8.0.3(@typechain/ethers-v6@0.4.3(ethers@6.12.1(bufferutil@4.0.7)(utf-8-validate@5.0.7))(typechain@8.3.2(typescript@4.9.5))(typescript@4.9.5))(ethers@6.12.1(bufferutil@4.0.7)(utf-8-validate@5.0.7))(hardhat@2.22.3(bufferutil@4.0.7)(ts-node@10.9.2(@types/node@18.19.33)(typescript@4.9.5))(typescript@4.9.5)(utf-8-validate@5.0.7))(typechain@8.3.2(typescript@4.9.5)))(@types/chai@4.3.16)(@types/mocha@10.0.6)(@types/node@18.19.33)(chai@4.4.1)(ethers@6.12.1(bufferutil@4.0.7)(utf-8-validate@5.0.7))(hardhat-gas-reporter@1.0.10(bufferutil@4.0.7)(hardhat@2.22.3(bufferutil@4.0.7)(ts-node@10.9.2(@types/node@18.19.33)(typescript@4.9.5))(typescript@4.9.5)(utf-8-validate@5.0.7))(utf-8-validate@5.0.7))(hardhat@2.22.3(bufferutil@4.0.7)(ts-node@10.9.2(@types/node@18.19.33)(typescript@4.9.5))(typescript@4.9.5)(utf-8-validate@5.0.7))(solidity-coverage@0.8.12(hardhat@2.22.3(bufferutil@4.0.7)(ts-node@10.9.2(@types/node@18.19.33)(typescript@4.9.5))(typescript@4.9.5)(utf-8-validate@5.0.7)))(ts-node@10.9.2(@types/node@18.19.33)(typescript@4.9.5))(typechain@8.3.2(typescript@4.9.5))(typescript@4.9.5) + version: 3.0.0(yevzuesbfogatmjxtvp5awybgu) '@nomicfoundation/hardhat-verify': specifier: ^1.1.1 version: 1.1.1(hardhat@2.22.3(bufferutil@4.0.7)(ts-node@10.9.2(@types/node@18.19.33)(typescript@4.9.5))(typescript@4.9.5)(utf-8-validate@5.0.7)) @@ -933,6 +936,11 @@ packages: engines: {node: '>=14'} hasBin: true + '@ethereumjs/rlp@5.0.2': + resolution: {integrity: sha512-DziebCdg4JpGlEqEdGgXmjqcFoJi+JGulUXwEjsZGAscAQ7MyD/7LE/GVCP29vEQxKc7AAwjT3A2ywHp2xfoCA==} + engines: {node: '>=18'} + hasBin: true + '@ethereumjs/util@8.1.0': resolution: {integrity: sha512-zQ0IqbdX8FZ9aw11vP+dZkKDkS+kgIvQPHnSAXzP9pLu+Rfu3D3XEeLbicvoXJTYnhZiPmsZUxgdzXwNKxRPbA==} engines: {node: '>=14'} @@ -1043,6 +1051,7 @@ packages: '@humanwhocodes/config-array@0.11.14': resolution: {integrity: sha512-3T8LkOmg45BV5FICb15QQMsyUSWrQ8AygVfC7ZG32zOalnqrilm018ZVCw0eapXux8FtA33q8PSRSstjee3jSg==} engines: {node: '>=10.10.0'} + deprecated: Use @eslint/config-array instead '@humanwhocodes/module-importer@1.0.1': resolution: {integrity: sha512-bxveV4V8v5Yb4ncFTT3rPSgZBOpCkjfK0y4oVVVJwIuDVBRMDXrPyXRL988i5ap9m9bnyEEjWfm5WkBmtffLfA==} @@ -1050,6 +1059,7 @@ packages: '@humanwhocodes/object-schema@2.0.3': resolution: {integrity: sha512-93zYdMES/c1D69yZiKDBj0V24vqNzB/koF26KPaagAfd3P/4gUlh3Dys5ogAK+Exi9QyzlD8x/08Zt7wIKcDcA==} + deprecated: Use @eslint/object-schema instead '@iden3/bigarray@0.0.2': resolution: {integrity: sha512-Xzdyxqm1bOFF6pdIsiHLLl3HkSLjbhqJHVyqaTxXt3RqXBEnmsUmEW47H7VOi/ak7TdkRpNkxjyK5Zbkm+y52g==} @@ -1466,6 +1476,188 @@ packages: resolution: {integrity: sha512-cq8o4cWH0ibXh9VGi5P20Tu9XF/0fFXl9EUinr9QfTM7a7p0oTA4iJRCQWppXR1Pg8dSM0UCItCkPwsk9qWWYA==} engines: {node: ^12.20.0 || ^14.18.0 || >=16.0.0} + '@polkadot-api/json-rpc-provider-proxy@0.1.0': + resolution: {integrity: sha512-8GSFE5+EF73MCuLQm8tjrbCqlgclcHBSRaswvXziJ0ZW7iw3UEMsKkkKvELayWyBuOPa2T5i1nj6gFOeIsqvrg==} + + '@polkadot-api/json-rpc-provider@0.0.1': + resolution: {integrity: sha512-/SMC/l7foRjpykLTUTacIH05H3mr9ip8b5xxfwXlVezXrNVLp3Cv0GX6uItkKd+ZjzVPf3PFrDF2B2/HLSNESA==} + + '@polkadot-api/metadata-builders@0.3.2': + resolution: {integrity: sha512-TKpfoT6vTb+513KDzMBTfCb/ORdgRnsS3TDFpOhAhZ08ikvK+hjHMt5plPiAX/OWkm1Wc9I3+K6W0hX5Ab7MVg==} + + '@polkadot-api/observable-client@0.3.2': + resolution: {integrity: sha512-HGgqWgEutVyOBXoGOPp4+IAq6CNdK/3MfQJmhCJb8YaJiaK4W6aRGrdQuQSTPHfERHCARt9BrOmEvTXAT257Ug==} + peerDependencies: + '@polkadot-api/substrate-client': 0.1.4 + rxjs: '>=7.8.0' + + '@polkadot-api/substrate-bindings@0.6.0': + resolution: {integrity: sha512-lGuhE74NA1/PqdN7fKFdE5C1gNYX357j1tWzdlPXI0kQ7h3kN0zfxNOpPUN7dIrPcOFZ6C0tRRVrBylXkI6xPw==} + + '@polkadot-api/substrate-client@0.1.4': + resolution: {integrity: sha512-MljrPobN0ZWTpn++da9vOvt+Ex+NlqTlr/XT7zi9sqPtDJiQcYl+d29hFAgpaeTqbeQKZwz3WDE9xcEfLE8c5A==} + + '@polkadot-api/utils@0.1.0': + resolution: {integrity: sha512-MXzWZeuGxKizPx2Xf/47wx9sr/uxKw39bVJUptTJdsaQn/TGq+z310mHzf1RCGvC1diHM8f593KrnDgc9oNbJA==} + + '@polkadot/api-augment@12.4.2': + resolution: {integrity: sha512-BkG2tQpUUO0iUm65nSqP8hwHkNfN8jQw8apqflJNt9H8EkEL6v7sqwbLvGqtlxM9wzdxbg7lrWp3oHg4rOP31g==} + engines: {node: '>=18'} + + '@polkadot/api-base@12.4.2': + resolution: {integrity: sha512-XYI7Po8i6C4lYZah7Xo0v7zOAawBUfkmtx0YxsLY/665Sup8oqzEj666xtV9qjBzR9coNhQonIFOn+9fh27Ncw==} + engines: {node: '>=18'} + + '@polkadot/api-derive@12.4.2': + resolution: {integrity: sha512-R0AMANEnqs5AiTaiQX2FXCxUlOibeDSgqlkyG1/0KDsdr6PO/l3dJOgEO+grgAwh4hdqzk4I9uQpdKxG83f2Gw==} + engines: {node: '>=18'} + + '@polkadot/api@12.4.2': + resolution: {integrity: sha512-e1KS048471iBWZU10TJNEYOZqLO+8h8ajmVqpaIBOVkamN7tmacBxmHgq0+IA8VrGxjxtYNa1xF5Sqrg76uBEg==} + engines: {node: '>=18'} + + '@polkadot/extension-dapp@0.52.3': + resolution: {integrity: sha512-wI2c/VZHlEMK7OMDMqeIzyE2+MqGwXC+5MTVDNLYfMQdDdESMj3V0yYSB9lgWwBAr5bGToiThX2MwlYlLJ737w==} + engines: {node: '>=18'} + peerDependencies: + '@polkadot/api': '*' + '@polkadot/util': '*' + '@polkadot/util-crypto': '*' + + '@polkadot/extension-inject@0.52.3': + resolution: {integrity: sha512-T4SBImnpzGrx64SGeUQgWqhkONIck7xVHELzq2JiGJ1taVVijb85R+AoWZrMeapdEI713ELWARwJZAW18C5VAw==} + engines: {node: '>=18'} + peerDependencies: + '@polkadot/api': '*' + '@polkadot/util': '*' + + '@polkadot/keyring@13.2.3': + resolution: {integrity: sha512-pgTo6DXNXub0wGD+MnVHYhKxf80Jl+QMOCb818ioGdXz++Uw4mTueFAwtB+N7TGo0HafhChUiNJDxFdlDkcAng==} + engines: {node: '>=18'} + peerDependencies: + '@polkadot/util': 13.2.3 + '@polkadot/util-crypto': 13.2.3 + + '@polkadot/networks@13.2.3': + resolution: {integrity: sha512-mG+zkXg/33AyPrkv2xBbAo3LBUwOwBn6qznBU/4jxiZPnVvCwMaxE7xHM22B5riItbNJ169FXv3wy0v6ZmkFbw==} + engines: {node: '>=18'} + + '@polkadot/rpc-augment@12.4.2': + resolution: {integrity: sha512-IEco5pnso+fYkZNMlMAN5i4XAxdXPv0PZ0HNuWlCwF/MmRvWl8pq5JFtY1FiByHEbeuHwMIUhHM5SDKQ85q9Hg==} + engines: {node: '>=18'} + + '@polkadot/rpc-core@12.4.2': + resolution: {integrity: sha512-yaveqxNcmyluyNgsBT5tpnCa/md0CGbOtRK7K82LWsz7gsbh0x80GBbJrQGxsUybg1gPeZbO1q9IigwA6fY8ag==} + engines: {node: '>=18'} + + '@polkadot/rpc-provider@12.4.2': + resolution: {integrity: sha512-cAhfN937INyxwW1AdjABySdCKhC7QCIONRDHDea1aLpiuxq/w+QwjxauR9fCNGh3lTaAwwnmZ5WfFU2PtkDMGQ==} + engines: {node: '>=18'} + + '@polkadot/types-augment@12.4.2': + resolution: {integrity: sha512-3fDCOy2BEMuAtMYl4crKg76bv/0pDNEuzpAzV4EBUMIlJwypmjy5sg3gUPCMcA+ckX3xb8DhkWU4ceUdS7T2KQ==} + engines: {node: '>=18'} + + '@polkadot/types-codec@12.4.2': + resolution: {integrity: sha512-DiPGRFWtVMepD9i05eC3orSbGtpN7un/pXOrXu0oriU+oxLkpvZH68ZsPNtJhKdQy03cAYtvB8elJOFJZYqoqQ==} + engines: {node: '>=18'} + + '@polkadot/types-create@12.4.2': + resolution: {integrity: sha512-nOpeAKZLdSqNMfzS3waQXgyPPaNt8rUHEmR5+WNv6c/Ke/vyf710wjxiTewfp0wpBgtdrimlgG4DLX1J9Ms1LA==} + engines: {node: '>=18'} + + '@polkadot/types-known@12.4.2': + resolution: {integrity: sha512-bvhO4KQu/dgPmdwQXsweSMRiRisJ7Bp38lZVEIFykfd2qYyRW3OQEbIPKYpx9raD+fDATU0bTiKQnELrSGhYXw==} + engines: {node: '>=18'} + + '@polkadot/types-support@12.4.2': + resolution: {integrity: sha512-bz6JSt23UEZ2eXgN4ust6z5QF9pO5uNH7UzCP+8I/Nm85ZipeBYj2Wu6pLlE3Hw30hWZpuPxMDOKoEhN5bhLgw==} + engines: {node: '>=18'} + + '@polkadot/types@12.4.2': + resolution: {integrity: sha512-ivYtt7hYcRvo69ULb1BJA9BE1uefijXcaR089Dzosr9+sMzvsB1yslNQReOq+Wzq6h6AQj4qex6qVqjWZE6Z4A==} + engines: {node: '>=18'} + + '@polkadot/util-crypto@13.2.3': + resolution: {integrity: sha512-5sbggmLbn5eiuVMyPROPlT5roHRqdKHOfSpioNbGvGIZ1qIWVoC1RfsK0NWJOVGDzy6DpQe0KYT/kgcU5Xsrzw==} + engines: {node: '>=18'} + peerDependencies: + '@polkadot/util': 13.2.3 + + '@polkadot/util@13.2.3': + resolution: {integrity: sha512-pioNnsig3qHXrfOKMe4Yqos8B8N3/EZUpS+WfTpWnn1VjYban/0GrTXeavPlAwggnY27b8fS6rBzQBhnVYDw8g==} + engines: {node: '>=18'} + + '@polkadot/wasm-bridge@7.4.1': + resolution: {integrity: sha512-tdkJaV453tezBxhF39r4oeG0A39sPKGDJmN81LYLf+Fihb7astzwju+u75BRmDrHZjZIv00un3razJEWCxze6g==} + engines: {node: '>=18'} + peerDependencies: + '@polkadot/util': '*' + '@polkadot/x-randomvalues': '*' + + '@polkadot/wasm-crypto-asmjs@7.4.1': + resolution: {integrity: sha512-pwU8QXhUW7IberyHJIQr37IhbB6DPkCG5FhozCiNTq4vFBsFPjm9q8aZh7oX1QHQaiAZa2m2/VjIVE+FHGbvHQ==} + engines: {node: '>=18'} + peerDependencies: + '@polkadot/util': '*' + + '@polkadot/wasm-crypto-init@7.4.1': + resolution: {integrity: sha512-AVka33+f7MvXEEIGq5U0dhaA2SaXMXnxVCQyhJTaCnJ5bRDj0Xlm3ijwDEQUiaDql7EikbkkRtmlvs95eSUWYQ==} + engines: {node: '>=18'} + peerDependencies: + '@polkadot/util': '*' + '@polkadot/x-randomvalues': '*' + + '@polkadot/wasm-crypto-wasm@7.4.1': + resolution: {integrity: sha512-PE1OAoupFR0ZOV2O8tr7D1FEUAwaggzxtfs3Aa5gr+yxlSOaWUKeqsOYe1KdrcjmZVV3iINEAXxgrbzCmiuONg==} + engines: {node: '>=18'} + peerDependencies: + '@polkadot/util': '*' + + '@polkadot/wasm-crypto@7.4.1': + resolution: {integrity: sha512-kHN/kF7hYxm1y0WeFLWeWir6oTzvcFmR4N8fJJokR+ajYbdmrafPN+6iLgQVbhZnDdxyv9jWDuRRsDnBx8tPMQ==} + engines: {node: '>=18'} + peerDependencies: + '@polkadot/util': '*' + '@polkadot/x-randomvalues': '*' + + '@polkadot/wasm-util@7.4.1': + resolution: {integrity: sha512-RAcxNFf3zzpkr+LX/ItAsvj+QyM56TomJ0xjUMo4wKkHjwsxkz4dWJtx5knIgQz/OthqSDMR59VNEycQeNuXzA==} + engines: {node: '>=18'} + peerDependencies: + '@polkadot/util': '*' + + '@polkadot/x-bigint@13.2.3': + resolution: {integrity: sha512-VKgEAh0LsxTd/Hg517Tt5ZU4CySjBwMpaojbkjgv3fOdg1cN7t4eFEUxpyj7mlO0cp22SzDh7nmy4TO98qhLQA==} + engines: {node: '>=18'} + + '@polkadot/x-fetch@13.2.3': + resolution: {integrity: sha512-7Nmk+8ieEGzz43nc1rX6nH3rQo6rhGmAaIXJWnXY9gOHY0k1me1bJYbP+xDdh8vcLh8eY3D1sESUwG6QYZW2lg==} + engines: {node: '>=18'} + + '@polkadot/x-global@13.2.3': + resolution: {integrity: sha512-7MYQIAEwBkRcNrgqac5PbB0kNPlI6ISJEy6/Nb+crj8BFjQ8rf11PF49fq0QsvDeuYM1aNLigrvYZNptQs4lbw==} + engines: {node: '>=18'} + + '@polkadot/x-randomvalues@13.2.3': + resolution: {integrity: sha512-Zf0GTfLmVk+VzPUmcQSpXjjmFzMTjPhXoLuIoE7xIu73T+vQ+TX9j7DvorN6bIRsnZ9l1SyTZsSf/NTjNZKIZg==} + engines: {node: '>=18'} + peerDependencies: + '@polkadot/util': 13.2.3 + '@polkadot/wasm-util': '*' + + '@polkadot/x-textdecoder@13.2.3': + resolution: {integrity: sha512-i8hRXPtGknmdm3FYv6/94I52VXHJZa5sgYNw1+Hqb4Jqmq4awUjea35CKXd/+aw70Qn8Ngg31l2GoiH494fa+Q==} + engines: {node: '>=18'} + + '@polkadot/x-textencoder@13.2.3': + resolution: {integrity: sha512-wJI3Bb/dC4zyBXJFm5+ZhyBXWoI5wvP8k8qX0/ZC0PQsgSAqs7LVhiofk4Wd94n0P41W5re58LrGXLyziSAshw==} + engines: {node: '>=18'} + + '@polkadot/x-ws@13.2.3': + resolution: {integrity: sha512-Y6MTAWgcnrnx/LkBx65X3ZyoJH5EFj3tXtflRoKg1+PLHSLuNBV7Wi5mLcE70z4e5c+4hgBbLq+8SqCqzFtSPw==} + engines: {node: '>=18'} + '@promptbook/utils@0.49.0': resolution: {integrity: sha512-E/dMOZw5L84BLkODUrIu4f3hwU3QdozZRQ7ea24qYaRqNuOEw2Z8hZ6Wp/2o3Yj1+3+LS+I28zYMjOgv23PHdA==} @@ -1600,6 +1792,9 @@ packages: '@scure/base@1.1.6': resolution: {integrity: sha512-ok9AWwhcgYuGG3Zfhyqg+zwl+Wn5uE+dwC0NV/2qQkx4dABbb/bx96vWu8NSj+BNjjSjno+JRYRjle1jV08k3g==} + '@scure/base@1.2.1': + resolution: {integrity: sha512-DGmGtC8Tt63J5GfHgfl5CuAXh96VF/LD8K9Hr/Gv0J2lAoRGlPOMpqMpMbCTOoOJMZCk2Xt+DskdDyn6dEFdzQ==} + '@scure/bip32@1.1.5': resolution: {integrity: sha512-XyNh1rB0SkEqd3tXcXMi+Xe1fvg+kUIcoRIEujP1Jgv7DqW2r9lg3Ah0NkFaCs9sTkQAQA8kw7xiRXzENi9Rtw==} @@ -1663,6 +1858,24 @@ packages: '@solidity-parser/parser@0.18.0': resolution: {integrity: sha512-yfORGUIPgLck41qyN7nbwJRAx17/jAIXCTanHOJZhB6PJ1iAk/84b/xlsVKFSyNyLXIj0dhppoE0+CRws7wlzA==} + '@substrate/connect-extension-protocol@2.2.1': + resolution: {integrity: sha512-GoafTgm/Jey9E4Xlj4Z5ZBt/H4drH2CNq8VrAro80rtoznrXnFDNVivLQzZN0Xaj2g8YXSn9pC9Oc9IovYZJXw==} + + '@substrate/connect-known-chains@1.8.0': + resolution: {integrity: sha512-sl7WfeDgnZuPvUl5Xw0XIziOTe8rEBJ3uugyDETGnafxEbjYMv5aJL0ilq5djhnQ7l9OuMJCN3Ckved2yINeeQ==} + + '@substrate/connect@0.8.11': + resolution: {integrity: sha512-ofLs1PAO9AtDdPbdyTYj217Pe+lBfTLltdHDs3ds8no0BseoLeAGxpz1mHfi7zB4IxI3YyAiLjH6U8cw4pj4Nw==} + deprecated: versions below 1.x are no longer maintained + + '@substrate/light-client-extension-helpers@1.0.0': + resolution: {integrity: sha512-TdKlni1mBBZptOaeVrKnusMg/UBpWUORNDv5fdCaJklP4RJiFOzBCrzC+CyVI5kQzsXBisZ+2pXm+rIjS38kHg==} + peerDependencies: + smoldot: 2.x + + '@substrate/ss58-registry@1.51.0': + resolution: {integrity: sha512-TWDurLiPxndFgKjVavCniytBIw+t4ViOi7TYp9h/D0NMmkEc9klFTo+827eyEJ0lELpqO207Ey7uGxUa+BS1jQ==} + '@szmarczak/http-timer@5.0.1': resolution: {integrity: sha512-+PmQX0PiAYPMeVYe237LJAYvOMYW1j2rH5YROyS3b4CTVJum34HfRvKvAzozHAQG0TnHNdUfY9nCeUyRAs//cw==} engines: {node: '>=14.16'} @@ -1715,6 +1928,9 @@ packages: '@types/bn.js@5.1.5': resolution: {integrity: sha512-V46N0zwKRF5Q00AZ6hWtN0T8gGmDUaUzLWQvHFo5yThtVwK/VCenFY3wXVbOvNfajEpsTfQM4IN9k/d6gUVX3A==} + '@types/bn.js@5.1.6': + resolution: {integrity: sha512-Xh8vSwUeMKeYYrj3cX4lGQgFSF/N03r+tv4AiLl1SucqV+uTQpxRcnM8AkXKHwYP9ZPXOYXRr2KPXpVlIvqh9w==} + '@types/chai-as-promised@7.1.8': resolution: {integrity: sha512-ThlRVIJhr69FLlh6IctTXFkmhtP3NpMZ2QGq69StYLyKZFp/HOp1VdKZj7RvfNWYYcJ1xlbLGLLWj1UvP5u/Gw==} @@ -1829,6 +2045,9 @@ packages: '@types/ws@8.5.10': resolution: {integrity: sha512-vmQSUcfalpIq0R9q7uTo2lXs6eGIpt9wtnLdMv9LVpIjCA/+ufZRozlVoVelIYixx1ugCBKDhn89vnsEGOCx9A==} + '@types/ws@8.5.3': + resolution: {integrity: sha512-6YOoWjruKj1uLf3INHH7D3qTXwFfEsg1kf3c0uDdSBJwfa/llkwIjrAGV7j7mVgGNbzTQ3HiHKKDXl6bJPD97w==} + '@types/yargs-parser@21.0.3': resolution: {integrity: sha512-I4q9QU9MQv4oEOz4tAHJtNz1cwuLxn2F3xcc2iV5WdqLPpUnj30aUuxt1mAxYTG+oe8CZMV/+6rU4S4gRDzqtQ==} @@ -2074,6 +2293,15 @@ packages: abbrev@1.0.9: resolution: {integrity: sha512-LEyx4aLEC3x6T0UguF6YILf+ntvmOaWsVfENmIW0E9H09vKlLDGelMjjSm0jkDHALj8A8quZ/HapKNigzwge+Q==} + abitype@0.7.1: + resolution: {integrity: sha512-VBkRHTDZf9Myaek/dO3yMmOzB/y2s3Zo6nVU7yaw1G+TvCHAjwaJzNGN9yo4K5D8bU/VZXKP1EJpRhFr862PlQ==} + peerDependencies: + typescript: '>=4.9.4' + zod: ^3 >=3.19.1 + peerDependenciesMeta: + zod: + optional: true + abort-controller@3.0.0: resolution: {integrity: sha512-h8lQ8tacZYnR3vNQTgibj+tODHI5/+l06Au2Pcriv/Gmet0eaj4TwWH41sO9wnHDiQsEj19q0drzdWdeAHtweg==} engines: {node: '>=6.5'} @@ -2085,6 +2313,7 @@ packages: abstract-leveldown@7.2.0: resolution: {integrity: sha512-DnhQwcFEaYsvYDnACLZhMmCWd3rkOeEvglpa4q5i/5Jlm3UIsWaxVzuXvDLFCSCWRO3yy2/+V/G7FusFgejnfQ==} engines: {node: '>=10'} + deprecated: Superseded by abstract-level (https://github.com/Level/community#faq) accepts@1.3.8: resolution: {integrity: sha512-PYAthTa2m2VKxuvSD3DPC/Gy+U+sOA1LAuT8mkmRuvw+NACSaeXEQ+NHcVF7rONl6qcaxV3Uuemwawk+7+SJLw==} @@ -2408,6 +2637,9 @@ packages: resolution: {integrity: sha512-QxD8cf2eVqJOOz63z6JIN9BzvVs/dlySa5HGSBH5xtR8dPteIRQnBxxKqkNTiT6jbDTF6jAfrd4oMcND9RGbQg==} engines: {node: '>=0.6'} + bignumber.js@9.1.2: + resolution: {integrity: sha512-2/mKyZH9K85bzOEfhXDBFZTGd1CTs+5IHpeFQo9luiBG7hghdC851Pj2WAhb6E3R6b9tZj/XKhbg4fum+Kepug==} + binary-extensions@2.3.0: resolution: {integrity: sha512-Ceh+7ox5qe7LJuLHoY0feh3pHuUDHAcRUeyL2VYghZwfpkNIy/+8Ocg0a3UuSoYzavmylwuLWQOf3hl0jjMMIw==} engines: {node: '>=8'} @@ -3375,6 +3607,7 @@ packages: eslint@8.57.0: resolution: {integrity: sha512-dZ6+mexnaTIbSBZWgou51U6OmzIhYM2VcNdtiTtI7qPNZm35Akpr0f6vtw3w1Kmn5PYo+tZVfh13WrhpS6oLqQ==} engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} + deprecated: This version is no longer supported. Please see https://eslint.org/version-support for other options. hasBin: true espree@9.6.1: @@ -3437,6 +3670,7 @@ packages: ethereum-bloom-filters@1.1.0: resolution: {integrity: sha512-J1gDRkLpuGNvWYzWslBQR9cDV4nd4kfvVTE/Wy4Kkm4yb3EYRSlyi0eB/inTsSTTVyA0+HyzHgbr95Fn/Z1fSw==} + deprecated: do not use this package use package versions above as this can miss some topics ethereum-cryptography@0.1.3: resolution: {integrity: sha512-w8/4x1SGGzc+tO97TASLja6SLd3fRIK2tLVcV2Gx4IB21hE19atll5Cq9o3d0ZmAYC/8aw0ipieTSiekAea4SQ==} @@ -3449,6 +3683,7 @@ packages: ethereumjs-abi@0.6.8: resolution: {integrity: sha512-Tx0r/iXI6r+lRsdvkFDlut0N08jWMnKRZ6Gkq+Nmw75lZe4e6o3EkSnkaBP5NF6+m5PTGAr9JP43N3LyeoglsA==} + deprecated: This library has been deprecated and usage is discouraged. ethereumjs-util@6.2.1: resolution: {integrity: sha512-W2Ktez4L01Vexijrm5EB6w7dg4n/TgpoYU4avuT5T3Vmnw/eCRtiBrJfQYS/DCSvDIOLn2k57GcHdeBcgVxAqw==} @@ -3686,6 +3921,7 @@ packages: fstream@1.0.12: resolution: {integrity: sha512-WvJ193OHa0GHPEL+AycEJgxvBEwyfRkN1vhjca23OaPVMCaLCXTd5qAu82AjTcgP1UJmytkOKb63Ypde7raDIg==} engines: {node: '>=0.6'} + deprecated: This package is no longer supported. function-bind@1.1.2: resolution: {integrity: sha512-7XHNxH7qX9xG5mIwxkhumTox/MIRNcOgDrxWsMt2pAr23WHp6MrRlN7FBSFpCpr+oVO0F744iUgR82nJMfG2SA==} @@ -3787,19 +4023,24 @@ packages: glob@5.0.15: resolution: {integrity: sha512-c9IPMazfRITpmAAKi22dK1VKxGDX9ehhqfABDriL/lzO92xcUKEJPQHrVA/2YHSNFB4iFlykVmWvwo48nr3OxA==} + deprecated: Glob versions prior to v9 are no longer supported glob@7.1.7: resolution: {integrity: sha512-OvD9ENzPLbegENnYP5UUfJIirTg4+XwMWGaQfQTY0JenxNvvIKP3U3/tAQSPIu/lHxXYSZmpXlUHeqAIdKzBLQ==} + deprecated: Glob versions prior to v9 are no longer supported glob@7.2.0: resolution: {integrity: sha512-lmLf6gtyrPq8tTjSmrO94wBeQbFR3HbLHbuyD69wuyQkImp2hWqMGB47OX65FBkPffO641IP9jWa1z4ivqG26Q==} + deprecated: Glob versions prior to v9 are no longer supported glob@7.2.3: resolution: {integrity: sha512-nFR0zLpU2YCaRxwoCJvL6UvCH2JFyFVIvwTLsIf21AuHlMskA1hhTdk+LlYJtOlYt9v6dvszD2BGRqBL+iQK9Q==} + deprecated: Glob versions prior to v9 are no longer supported glob@8.1.0: resolution: {integrity: sha512-r8hpEjiQEYlF2QU0df3dS+nxxSIreXQS1qRhMJM0Q5NDdR386C7jb7Hwwod8Fgiuex+k0GFjgft18yvxm5XoCQ==} engines: {node: '>=12'} + deprecated: Glob versions prior to v9 are no longer supported glob@9.3.5: resolution: {integrity: sha512-e1LleDykUz2Iu+MTYdkSsuWX8lvAjAcs0Xef0lNIu0S2wOAzuTxCJtcd9S3cijlwYF18EsU3rzb8jPVobxDh9Q==} @@ -4044,6 +4285,7 @@ packages: inflight@1.0.6: resolution: {integrity: sha512-k92I/b08q4wvFscXCLvqfsHCrjrF7yiXsQuIVvVE7N82W3+aqpzuUdBbfhWcy/FZR3/4IgflMgKLOsvPDrGCJA==} + deprecated: This module is not supported, and leaks memory. Do not use it. Check out lru-cache if you want a good and tested way to coalesce async requests by a key value, which is much more comprehensive and powerful. inherits@2.0.4: resolution: {integrity: sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==} @@ -4070,6 +4312,10 @@ packages: resolution: {integrity: sha512-0KI/607xoxSToH7GjN1FfSbLoU0+btTicjsQSWQlh/hZykN8KpmMf7uYwPW3R+akZ6R/w18ZlXSHBYXiYUPO3g==} engines: {node: '>= 0.10'} + is-arguments@1.1.1: + resolution: {integrity: sha512-8Q7EARjzEnKpt/PCD7e1cgUS0a6X8u5tdSiMqXhojOdoV9TsMsiO+9VLC5vAmO8N7/GmXn7yjR8qnA6bVAEzfA==} + engines: {node: '>= 0.4'} + is-array-buffer@3.0.4: resolution: {integrity: sha512-wcjaerHw0ydZwfhiKbXJWLDY8A7yV7KhjQOpb83hGgGfId/aQa4TOvwyzn2PuswW2gPCYEL/nEAiSVpdOj1lXw==} engines: {node: '>= 0.4'} @@ -4251,6 +4497,11 @@ packages: isomorphic-unfetch@3.1.0: resolution: {integrity: sha512-geDJjpoZ8N0kWexiwkX8F9NkTsXhetLPVbZFQ+JTW239QNOwvB0gniuR1Wc6f0AMTn7/mFGyXvHTifrCp/GH8Q==} + isomorphic-ws@5.0.0: + resolution: {integrity: sha512-muId7Zzn9ywDsyXgTIafTry2sV3nySZeUDe6YedVd1Hvuuep5AsIlqK+XefWpYTyJG5e503F2xIuT2lcU6rCSw==} + peerDependencies: + ws: '*' + iterator.prototype@1.1.2: resolution: {integrity: sha512-DR33HMMr8EzwuRL8Y9D3u2BMj8+RqSE850jfGu59kS7tbmPLzGkZmVSfyCFSDxuZiEY6Rzt3T2NA/qU+NwVj1w==} @@ -4279,6 +4530,9 @@ packages: js-sha3@0.8.0: resolution: {integrity: sha512-gF1cRrHhIzNfToc802P800N8PpXS+evLLXfsVpowqmAFR9uwbi89WvXg2QspOmXL8QL86J4T1EpFu+yUkwJY3Q==} + js-sha3@0.9.3: + resolution: {integrity: sha512-BcJPCQeLg6WjEx3FE591wVAevlli8lxsxm9/FzV4HXkV49TmBH38Yvrpce6fjbADGMKFrBMGTqrVz3qPIZ88Gg==} + js-tokens@4.0.0: resolution: {integrity: sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ==} @@ -4328,6 +4582,9 @@ packages: json-stable-stringify-without-jsonify@1.0.1: resolution: {integrity: sha512-Bdboy+l7tA3OGW6FjyFHWkP5LuByj1Tk33Ljyq0axyzdk9//JSi2u3fP1QSmd1KNwq6VOKYGlAu87CisVir6Pw==} + json-stringify-safe@5.0.1: + resolution: {integrity: sha512-ZClg6AaYvamvYEE82d3Iyd3vSSIjQ+odgjaTzRuO3s7toCdFKczob2i0zCh7JE8kWn17yvAWhUVxvqGwUalsRA==} + json5@1.0.2: resolution: {integrity: sha512-g1MWMLBiz8FKi1e4w0UyVL3w+iJceWAFBAaBnnGKOpNa5f8TLktkbre1+s6oICydWAm+HRUGTmI+//xv2hvXYA==} hasBin: true @@ -4714,6 +4971,10 @@ packages: engines: {node: '>= 14.0.0'} hasBin: true + mock-socket@9.3.1: + resolution: {integrity: sha512-qxBgB7Qa2sEQgHFjj0dSigq7fX4k6Saisd5Nelwp2q8mlbAFh5dHV9JTTlF8viYJLSSWgMCZFUom8PJcMNBoJw==} + engines: {node: '>= 8'} + module-error@1.0.2: resolution: {integrity: sha512-0yuvsqSCv8LbaOKhnsQ/T5JhyFlCYLPXK3U2sgV10zoKQwzs/MyfuQUOZQ1V/6OCOJsK/TRgNVrPuPDqtdMFtA==} engines: {node: '>=10'} @@ -4761,6 +5022,10 @@ packages: resolution: {integrity: sha512-dBpDMdxv9Irdq66304OLfEmQ9tbNRFnFTuZiLo+bD+r332bBmMJ8GBLXklIXXgxd3+v9+KUnZaUR5PJMa75Gsg==} engines: {node: '>= 0.4.0'} + nock@13.5.6: + resolution: {integrity: sha512-o2zOYiCpzRqSzPj0Zt/dQ/DqZeYoaQ7TUonc/xUPjCGl9WeHpNbxgVvOquXYAaJzI0M9BXV3HTzG0p8IUAbBTQ==} + engines: {node: '>= 10.13'} + node-addon-api@2.0.2: resolution: {integrity: sha512-Ntyt4AIXyaLIuMHF6IOoTakB3K+RWxwtsHNRxllEoA6vPwP9o4866g6YWDLUdnucilZhmkxiHwHr11gAENw+QA==} @@ -5163,6 +5428,10 @@ packages: prop-types@15.8.1: resolution: {integrity: sha512-oj87CgZICdulUohogVAR7AjlC0327U4el4L6eAvOqCeudMDVU0NThNaV+b9Df4dXgSP1gXMTnPdhfe/2qDH5cg==} + propagate@2.0.1: + resolution: {integrity: sha512-vGrhOavPSTz4QVNuBNdcNXePNdNMaO1xj9yBeH1ScQPjk/rhg9sSlCXPhMkFuaNNW/syTvYqsnbIJxMBfRbbag==} + engines: {node: '>= 8'} + proper-lockfile@4.1.2: resolution: {integrity: sha512-TjNPblN4BwAWMXU8s9AEz4JmQxnD1NNL7bNOY/AKUzyamc379FWASUhc/K1pL2noVb+XmZKLL68cjzLsiOAMaA==} @@ -5396,10 +5665,12 @@ packages: rimraf@2.7.1: resolution: {integrity: sha512-uWjbaKIK3T1OSVptzX7Nl6PvQ3qAGtKEtVRjRuazjfL3Bx5eI409VZSqgND+4UNnmzLVdPj9FqFJNPqBZFve4w==} + deprecated: Rimraf versions prior to v4 are no longer supported hasBin: true rimraf@3.0.2: resolution: {integrity: sha512-JZkJMZkAGFFPP2YqXZXPbMlMBgsxzE8ILs4lMIX/2o0L9UBw9O/Y3o6wFw/i9YLapcUJWwqbi3kdxIPdC62TIA==} + deprecated: Rimraf versions prior to v4 are no longer supported hasBin: true rimraf@4.4.1: @@ -5427,6 +5698,9 @@ packages: run-parallel@1.2.0: resolution: {integrity: sha512-5l4VyZR86LZ/lDxZTR6jqL8AFE2S0IFLMP26AbjsLVADxHdhB/c0GUsH+y39UfCi3dzz8OlQuPmnaJOMoDHQBA==} + rxjs@7.8.1: + resolution: {integrity: sha512-AA3TVj+0A2iuIoQkWEK/tqFjBq2j+6PO6Y0zJcvzLAFhEFIO3HL0vls9hWLncZbAAbK0mar7oZ4V079I/qPMxg==} + safaridriver@0.1.2: resolution: {integrity: sha512-4R309+gWflJktzPXBQCobbWEHlzC4aK3a+Ov3tz2Ib2aBxiwd11phkdIBH1l0EO22x24CJMUQkpKFumRriCSRg==} @@ -5455,6 +5729,9 @@ packages: resolution: {integrity: sha512-qJFF/8tW/zJsbyfh/iT/ZM5QNHE3CXxtLJbZsL+CzdJLBsPD7SedJZoUA4d8iAcN2IoMp/Dx80shOOd2x96X/g==} hasBin: true + scale-ts@1.6.1: + resolution: {integrity: sha512-PBMc2AWc6wSEqJYBDPcyCLUj9/tMKnLX70jLOSndMtcUoLQucP/DM0vnQo1wJAYjTrQiq8iG9rD0q6wFzgjH7g==} + scrypt-js@3.0.1: resolution: {integrity: sha512-cdwTTnqPu0Hyvf5in5asVdZocVDTNRmR7XEcJuIzMjJeSHybHl7vpB66AzwTaIg6CLSbtjcxc8fqcySfnTkccA==} @@ -5564,6 +5841,9 @@ packages: resolution: {integrity: sha512-94hK0Hh8rPqQl2xXc3HsaBoOXKV20MToPkcXvwbISWLEs+64sBq5kFgn2kJDHb1Pry9yrP0dxrCI9RRci7RXKg==} engines: {node: '>= 6.0.0', npm: '>= 3.0.0'} + smoldot@2.0.26: + resolution: {integrity: sha512-F+qYmH4z2s2FK+CxGj8moYcd1ekSIKH8ywkdqlOz88Dat35iB1DIYL11aILN46YSGMzQW/lbJNS307zBSDN5Ig==} + snappy@7.2.2: resolution: {integrity: sha512-iADMq1kY0v3vJmGTuKcFWSXt15qYUz7wFkArOrsSg0IFfI3nJqIJvK2/ZbEIndg7erIJLtAVX2nSOqPz7DcwbA==} engines: {node: '>= 10'} @@ -6033,6 +6313,9 @@ packages: tslib@2.6.2: resolution: {integrity: sha512-AEYxH93jGFPn/a2iVAwW87VuUIkR1FVUKB77NwMF7nBTDkDrrT/Hpt/IrCJ0QXhW27jTBDcf5ZY7w6RiqTMw2Q==} + tslib@2.8.1: + resolution: {integrity: sha512-oJFu94HQb+KVduSUQL7wnpmqnfmLsOA/nAh6b6EH0wCEoK0/mPeXU6c3wKDV83MkOuHPRHtSXKKU99IBazS/2w==} + tslog@4.9.2: resolution: {integrity: sha512-wBM+LRJoNl34Bdu8mYEFxpvmOUedpNUwMNQB/NcuPIZKwdDde6xLHUev3bBjXQU7gdurX++X/YE7gLH8eXYsiQ==} engines: {node: '>=16'} @@ -6295,6 +6578,9 @@ packages: util-deprecate@1.0.2: resolution: {integrity: sha512-EPD5q1uXyFxJpCrLnCc1nHnq3gOa6DZBocAIiI2TaSCA7VCJ1UJDMagCzIkXNsUYfD1daK//LTEQ8xiIbrHtcw==} + util@0.12.5: + resolution: {integrity: sha512-kZf/K6hEIrWHI6XqOFUiiMa+79wE/D8Q+NCNAWclkyg3b4d2k7s0QGepNjiABc+aR3N1PAyHL7p6UcLY6LmrnA==} + utils-merge@1.0.1: resolution: {integrity: sha512-pMZTvIkT1d+TFGvDOqodOclx0QWkkgi6Tdoa8gC8ffGAAqz9pzPTZWAybbsHHoED/ztMtkv/VoYTYyShUn81hA==} engines: {node: '>= 0.4.0'} @@ -6406,10 +6692,86 @@ packages: web-worker@1.2.0: resolution: {integrity: sha512-PgF341avzqyx60neE9DD+XS26MMNMoUQRz9NOZwW32nPQrF6p77f1htcnjBSEV8BGMKZ16choqUG4hyI0Hx7mA==} + web3-core@4.7.1: + resolution: {integrity: sha512-9KSeASCb/y6BG7rwhgtYC4CvYY66JfkmGNEYb7q1xgjt9BWfkf09MJPaRyoyT5trdOxYDHkT9tDlypvQWaU8UQ==} + engines: {node: '>=14', npm: '>=6.12.0'} + + web3-errors@1.3.1: + resolution: {integrity: sha512-w3NMJujH+ZSW4ltIZZKtdbkbyQEvBzyp3JRn59Ckli0Nz4VMsVq8aF1bLWM7A2kuQ+yVEm3ySeNU+7mSRwx7RQ==} + engines: {node: '>=14', npm: '>=6.12.0'} + + web3-eth-abi@4.4.1: + resolution: {integrity: sha512-60ecEkF6kQ9zAfbTY04Nc9q4eEYM0++BySpGi8wZ2PD1tw/c0SDvsKhV6IKURxLJhsDlb08dATc3iD6IbtWJmg==} + engines: {node: '>=14', npm: '>=6.12.0'} + + web3-eth-accounts@4.3.1: + resolution: {integrity: sha512-rTXf+H9OKze6lxi7WMMOF1/2cZvJb2AOnbNQxPhBDssKOllAMzLhg1FbZ4Mf3lWecWfN6luWgRhaeSqO1l+IBQ==} + engines: {node: '>=14', npm: '>=6.12.0'} + + web3-eth-contract@4.7.2: + resolution: {integrity: sha512-3ETqs2pMNPEAc7BVY/C3voOhTUeJdkf2aM3X1v+edbngJLHAxbvxKpOqrcO0cjXzC4uc2Q8Zpf8n8zT5r0eLnA==} + engines: {node: '>=14', npm: '>=6.12.0'} + + web3-eth-ens@4.4.0: + resolution: {integrity: sha512-DeyVIS060hNV9g8dnTx92syqvgbvPricE3MerCxe/DquNZT3tD8aVgFfq65GATtpCgDDJffO2bVeHp3XBemnSQ==} + engines: {node: '>=14', npm: '>=6.12.0'} + + web3-eth-iban@4.0.7: + resolution: {integrity: sha512-8weKLa9KuKRzibC87vNLdkinpUE30gn0IGY027F8doeJdcPUfsa4IlBgNC4k4HLBembBB2CTU0Kr/HAOqMeYVQ==} + engines: {node: '>=14', npm: '>=6.12.0'} + + web3-eth-personal@4.1.0: + resolution: {integrity: sha512-RFN83uMuvA5cu1zIwwJh9A/bAj0OBxmGN3tgx19OD/9ygeUZbifOL06jgFzN0t+1ekHqm3DXYQM8UfHpXi7yDQ==} + engines: {node: '>=14', npm: '>=6.12.0'} + + web3-eth@4.11.1: + resolution: {integrity: sha512-q9zOkzHnbLv44mwgLjLXuyqszHuUgZWsQayD2i/rus2uk0G7hMn11bE2Q3hOVnJS4ws4VCtUznlMxwKQ+38V2w==} + engines: {node: '>=14', npm: '>=6.12.0'} + + web3-net@4.1.0: + resolution: {integrity: sha512-WWmfvHVIXWEoBDWdgKNYKN8rAy6SgluZ0abyRyXOL3ESr7ym7pKWbfP4fjApIHlYTh8tNqkrdPfM4Dyi6CA0SA==} + engines: {node: '>=14', npm: '>=6.12.0'} + + web3-providers-http@4.2.0: + resolution: {integrity: sha512-IPMnDtHB7dVwaB7/mMxAZzyq7d5ezfO1+Vw0bNfAeIi7gaDlJiggp85SdyAfOgov8AMUA/dyiY72kQ0KmjXKvQ==} + engines: {node: '>=14', npm: '>=6.12.0'} + + web3-providers-ipc@4.0.7: + resolution: {integrity: sha512-YbNqY4zUvIaK2MHr1lQFE53/8t/ejHtJchrWn9zVbFMGXlTsOAbNoIoZWROrg1v+hCBvT2c9z8xt7e/+uz5p1g==} + engines: {node: '>=14', npm: '>=6.12.0'} + + web3-providers-ws@4.0.8: + resolution: {integrity: sha512-goJdgata7v4pyzHRsg9fSegUG4gVnHZSHODhNnn6J93ykHkBI1nz4fjlGpcQLUMi4jAMz6SHl9Ibzs2jj9xqPw==} + engines: {node: '>=14', npm: '>=6.12.0'} + + web3-rpc-methods@1.3.0: + resolution: {integrity: sha512-/CHmzGN+IYgdBOme7PdqzF+FNeMleefzqs0LVOduncSaqsppeOEoskLXb2anSpzmQAP3xZJPaTrkQPWSJMORig==} + engines: {node: '>=14', npm: '>=6.12.0'} + + web3-rpc-providers@1.0.0-rc.4: + resolution: {integrity: sha512-PXosCqHW0EADrYzgmueNHP3Y5jcSmSwH+Dkqvn7EYD0T2jcsdDAIHqk6szBiwIdhumM7gv9Raprsu/s/f7h1fw==} + engines: {node: '>=14', npm: '>=6.12.0'} + + web3-types@1.10.0: + resolution: {integrity: sha512-0IXoaAFtFc8Yin7cCdQfB9ZmjafrbP6BO0f0KT/khMhXKUpoJ6yShrVhiNpyRBo8QQjuOagsWzwSK2H49I7sbw==} + engines: {node: '>=14', npm: '>=6.12.0'} + web3-utils@1.10.4: resolution: {integrity: sha512-tsu8FiKJLk2PzhDl9fXbGUWTkkVXYhtTA+SmEFkKft+9BgwLxfCRpU96sWv7ICC8zixBNd3JURVoiR3dUXgP8A==} engines: {node: '>=8.0.0'} + web3-utils@4.3.3: + resolution: {integrity: sha512-kZUeCwaQm+RNc2Bf1V3BYbF29lQQKz28L0y+FA4G0lS8IxtJVGi5SeDTUkpwqqkdHHC7JcapPDnyyzJ1lfWlOw==} + engines: {node: '>=14', npm: '>=6.12.0'} + + web3-validator@2.0.6: + resolution: {integrity: sha512-qn9id0/l1bWmvH4XfnG/JtGKKwut2Vokl6YXP5Kfg424npysmtRLe9DgiNBM9Op7QL/aSiaA0TVXibuIuWcizg==} + engines: {node: '>=14', npm: '>=6.12.0'} + + web3@4.11.1: + resolution: {integrity: sha512-KUntBtnc+cj9ur/yNcdTok9MpCI9dHf8h1hRmLPVICF5wyKyHbR4t+51vqUnK5bI6UxVfRPT++qCcP7KhDACVA==} + engines: {node: '>=14.0.0', npm: '>=6.12.0'} + webdriver@8.36.1: resolution: {integrity: sha512-547RivYCHStVqtiGQBBcABAkzJbPnAWsxpXGzmj5KL+TOM2JF41N2iQRtUxXqr0jme1Nzzye7WS7Y7iSnK6i1g==} engines: {node: ^16.13 || >=18} @@ -6564,6 +6926,18 @@ packages: utf-8-validate: optional: true + ws@8.18.0: + resolution: {integrity: sha512-8VbfWfHLbbwu3+N6OKsOMpBdT4kXPDDB9cJk2bJ6mh9ucxdlnNvH1e+roYkKmN9Nxw2yjz7VzeO9oOz2zJ04Pw==} + engines: {node: '>=10.0.0'} + peerDependencies: + bufferutil: ^4.0.1 + utf-8-validate: '>=5.0.2' + peerDependenciesMeta: + bufferutil: + optional: true + utf-8-validate: + optional: true + ws@8.5.0: resolution: {integrity: sha512-BWX0SWVgLPzYwF8lTzEy1egjhS4S4OEAHfsO8o65WOVsrnSRGaSiUaa9e0ggGlkMTtBlmOpEXiie9RUcBO86qg==} engines: {node: '>=10.0.0'} @@ -6656,6 +7030,13 @@ packages: peerDependencies: ethers: ~5.7.0 + zkverifyjs@0.3.1: + resolution: {integrity: sha512-5v+z4EWmC+HSBjITREUA1RXqTDwA/GfMjpO03DmBZuKaDoHBbzZeEe1lzhTj+KbaDpPfKTKoGeGbu77zqQTpSg==} + engines: {node: '>= 18'} + + zod@3.23.8: + resolution: {integrity: sha512-XBx9AXhXktjUqnepgTiE5flcKIYWi/rme0Eaj+5Y0lftuGBq+jyRu/md4WnuxqgP1ubdpNCsYEYPxrzVHD8d6g==} + snapshots: '@adraffy/ens-normalize@1.10.1': {} @@ -7029,6 +7410,8 @@ snapshots: '@ethereumjs/rlp@4.0.1': {} + '@ethereumjs/rlp@5.0.2': {} + '@ethereumjs/util@8.1.0': dependencies: '@ethereumjs/rlp': 4.0.1 @@ -7596,8 +7979,8 @@ snapshots: ethereumjs-util: 7.1.5 hardhat: 2.22.3(bufferutil@4.0.7)(ts-node@10.9.2(@types/node@18.19.33)(typescript@4.9.5))(typescript@4.9.5)(utf-8-validate@5.0.7) - ? '@nomicfoundation/hardhat-toolbox@3.0.0(@nomicfoundation/hardhat-chai-matchers@2.0.6(@nomicfoundation/hardhat-ethers@3.0.5(ethers@6.12.1(bufferutil@4.0.7)(utf-8-validate@5.0.7))(hardhat@2.22.3(bufferutil@4.0.7)(ts-node@10.9.2(@types/node@18.19.33)(typescript@4.9.5))(typescript@4.9.5)(utf-8-validate@5.0.7)))(chai@4.4.1)(ethers@6.12.1(bufferutil@4.0.7)(utf-8-validate@5.0.7))(hardhat@2.22.3(bufferutil@4.0.7)(ts-node@10.9.2(@types/node@18.19.33)(typescript@4.9.5))(typescript@4.9.5)(utf-8-validate@5.0.7)))(@nomicfoundation/hardhat-ethers@3.0.5(ethers@6.12.1(bufferutil@4.0.7)(utf-8-validate@5.0.7))(hardhat@2.22.3(bufferutil@4.0.7)(ts-node@10.9.2(@types/node@18.19.33)(typescript@4.9.5))(typescript@4.9.5)(utf-8-validate@5.0.7)))(@nomicfoundation/hardhat-network-helpers@1.0.10(hardhat@2.22.3(bufferutil@4.0.7)(ts-node@10.9.2(@types/node@18.19.33)(typescript@4.9.5))(typescript@4.9.5)(utf-8-validate@5.0.7)))(@nomicfoundation/hardhat-verify@1.1.1(hardhat@2.22.3(bufferutil@4.0.7)(ts-node@10.9.2(@types/node@18.19.33)(typescript@4.9.5))(typescript@4.9.5)(utf-8-validate@5.0.7)))(@typechain/ethers-v6@0.4.3(ethers@6.12.1(bufferutil@4.0.7)(utf-8-validate@5.0.7))(typechain@8.3.2(typescript@4.9.5))(typescript@4.9.5))(@typechain/hardhat@8.0.3(@typechain/ethers-v6@0.4.3(ethers@6.12.1(bufferutil@4.0.7)(utf-8-validate@5.0.7))(typechain@8.3.2(typescript@4.9.5))(typescript@4.9.5))(ethers@6.12.1(bufferutil@4.0.7)(utf-8-validate@5.0.7))(hardhat@2.22.3(bufferutil@4.0.7)(ts-node@10.9.2(@types/node@18.19.33)(typescript@4.9.5))(typescript@4.9.5)(utf-8-validate@5.0.7))(typechain@8.3.2(typescript@4.9.5)))(@types/chai@4.3.16)(@types/mocha@10.0.6)(@types/node@18.19.33)(chai@4.4.1)(ethers@6.12.1(bufferutil@4.0.7)(utf-8-validate@5.0.7))(hardhat-gas-reporter@1.0.10(bufferutil@4.0.7)(hardhat@2.22.3(bufferutil@4.0.7)(ts-node@10.9.2(@types/node@18.19.33)(typescript@4.9.5))(typescript@4.9.5)(utf-8-validate@5.0.7))(utf-8-validate@5.0.7))(hardhat@2.22.3(bufferutil@4.0.7)(ts-node@10.9.2(@types/node@18.19.33)(typescript@4.9.5))(typescript@4.9.5)(utf-8-validate@5.0.7))(solidity-coverage@0.8.12(hardhat@2.22.3(bufferutil@4.0.7)(ts-node@10.9.2(@types/node@18.19.33)(typescript@4.9.5))(typescript@4.9.5)(utf-8-validate@5.0.7)))(ts-node@10.9.2(@types/node@18.19.33)(typescript@4.9.5))(typechain@8.3.2(typescript@4.9.5))(typescript@4.9.5)' - : dependencies: + '@nomicfoundation/hardhat-toolbox@3.0.0(yevzuesbfogatmjxtvp5awybgu)': + dependencies: '@nomicfoundation/hardhat-chai-matchers': 2.0.6(@nomicfoundation/hardhat-ethers@3.0.5(ethers@6.12.1(bufferutil@4.0.7)(utf-8-validate@5.0.7))(hardhat@2.22.3(bufferutil@4.0.7)(ts-node@10.9.2(@types/node@18.19.33)(typescript@4.9.5))(typescript@4.9.5)(utf-8-validate@5.0.7)))(chai@4.4.1)(ethers@6.12.1(bufferutil@4.0.7)(utf-8-validate@5.0.7))(hardhat@2.22.3(bufferutil@4.0.7)(ts-node@10.9.2(@types/node@18.19.33)(typescript@4.9.5))(typescript@4.9.5)(utf-8-validate@5.0.7)) '@nomicfoundation/hardhat-ethers': 3.0.5(ethers@6.12.1(bufferutil@4.0.7)(utf-8-validate@5.0.7))(hardhat@2.22.3(bufferutil@4.0.7)(ts-node@10.9.2(@types/node@18.19.33)(typescript@4.9.5))(typescript@4.9.5)(utf-8-validate@5.0.7)) '@nomicfoundation/hardhat-network-helpers': 1.0.10(hardhat@2.22.3(bufferutil@4.0.7)(ts-node@10.9.2(@types/node@18.19.33)(typescript@4.9.5))(typescript@4.9.5)(utf-8-validate@5.0.7)) @@ -7771,6 +8154,347 @@ snapshots: '@pkgr/core@0.1.1': {} + '@polkadot-api/json-rpc-provider-proxy@0.1.0': + optional: true + + '@polkadot-api/json-rpc-provider@0.0.1': + optional: true + + '@polkadot-api/metadata-builders@0.3.2': + dependencies: + '@polkadot-api/substrate-bindings': 0.6.0 + '@polkadot-api/utils': 0.1.0 + optional: true + + '@polkadot-api/observable-client@0.3.2(@polkadot-api/substrate-client@0.1.4)(rxjs@7.8.1)': + dependencies: + '@polkadot-api/metadata-builders': 0.3.2 + '@polkadot-api/substrate-bindings': 0.6.0 + '@polkadot-api/substrate-client': 0.1.4 + '@polkadot-api/utils': 0.1.0 + rxjs: 7.8.1 + optional: true + + '@polkadot-api/substrate-bindings@0.6.0': + dependencies: + '@noble/hashes': 1.4.0 + '@polkadot-api/utils': 0.1.0 + '@scure/base': 1.1.6 + scale-ts: 1.6.1 + optional: true + + '@polkadot-api/substrate-client@0.1.4': + dependencies: + '@polkadot-api/json-rpc-provider': 0.0.1 + '@polkadot-api/utils': 0.1.0 + optional: true + + '@polkadot-api/utils@0.1.0': + optional: true + + '@polkadot/api-augment@12.4.2(bufferutil@4.0.7)(utf-8-validate@5.0.7)': + dependencies: + '@polkadot/api-base': 12.4.2(bufferutil@4.0.7)(utf-8-validate@5.0.7) + '@polkadot/rpc-augment': 12.4.2(bufferutil@4.0.7)(utf-8-validate@5.0.7) + '@polkadot/types': 12.4.2 + '@polkadot/types-augment': 12.4.2 + '@polkadot/types-codec': 12.4.2 + '@polkadot/util': 13.2.3 + tslib: 2.8.1 + transitivePeerDependencies: + - bufferutil + - supports-color + - utf-8-validate + + '@polkadot/api-base@12.4.2(bufferutil@4.0.7)(utf-8-validate@5.0.7)': + dependencies: + '@polkadot/rpc-core': 12.4.2(bufferutil@4.0.7)(utf-8-validate@5.0.7) + '@polkadot/types': 12.4.2 + '@polkadot/util': 13.2.3 + rxjs: 7.8.1 + tslib: 2.8.1 + transitivePeerDependencies: + - bufferutil + - supports-color + - utf-8-validate + + '@polkadot/api-derive@12.4.2(bufferutil@4.0.7)(utf-8-validate@5.0.7)': + dependencies: + '@polkadot/api': 12.4.2(bufferutil@4.0.7)(utf-8-validate@5.0.7) + '@polkadot/api-augment': 12.4.2(bufferutil@4.0.7)(utf-8-validate@5.0.7) + '@polkadot/api-base': 12.4.2(bufferutil@4.0.7)(utf-8-validate@5.0.7) + '@polkadot/rpc-core': 12.4.2(bufferutil@4.0.7)(utf-8-validate@5.0.7) + '@polkadot/types': 12.4.2 + '@polkadot/types-codec': 12.4.2 + '@polkadot/util': 13.2.3 + '@polkadot/util-crypto': 13.2.3(@polkadot/util@13.2.3) + rxjs: 7.8.1 + tslib: 2.8.1 + transitivePeerDependencies: + - bufferutil + - supports-color + - utf-8-validate + + '@polkadot/api@12.4.2(bufferutil@4.0.7)(utf-8-validate@5.0.7)': + dependencies: + '@polkadot/api-augment': 12.4.2(bufferutil@4.0.7)(utf-8-validate@5.0.7) + '@polkadot/api-base': 12.4.2(bufferutil@4.0.7)(utf-8-validate@5.0.7) + '@polkadot/api-derive': 12.4.2(bufferutil@4.0.7)(utf-8-validate@5.0.7) + '@polkadot/keyring': 13.2.3(@polkadot/util-crypto@13.2.3(@polkadot/util@13.2.3))(@polkadot/util@13.2.3) + '@polkadot/rpc-augment': 12.4.2(bufferutil@4.0.7)(utf-8-validate@5.0.7) + '@polkadot/rpc-core': 12.4.2(bufferutil@4.0.7)(utf-8-validate@5.0.7) + '@polkadot/rpc-provider': 12.4.2(bufferutil@4.0.7)(utf-8-validate@5.0.7) + '@polkadot/types': 12.4.2 + '@polkadot/types-augment': 12.4.2 + '@polkadot/types-codec': 12.4.2 + '@polkadot/types-create': 12.4.2 + '@polkadot/types-known': 12.4.2 + '@polkadot/util': 13.2.3 + '@polkadot/util-crypto': 13.2.3(@polkadot/util@13.2.3) + eventemitter3: 5.0.1 + rxjs: 7.8.1 + tslib: 2.8.1 + transitivePeerDependencies: + - bufferutil + - supports-color + - utf-8-validate + + '@polkadot/extension-dapp@0.52.3(@polkadot/api@12.4.2(bufferutil@4.0.7)(utf-8-validate@5.0.7))(@polkadot/util-crypto@13.2.3(@polkadot/util@13.2.3))(@polkadot/util@13.2.3)(bufferutil@4.0.7)(utf-8-validate@5.0.7)': + dependencies: + '@polkadot/api': 12.4.2(bufferutil@4.0.7)(utf-8-validate@5.0.7) + '@polkadot/extension-inject': 0.52.3(@polkadot/api@12.4.2(bufferutil@4.0.7)(utf-8-validate@5.0.7))(@polkadot/util@13.2.3)(bufferutil@4.0.7)(utf-8-validate@5.0.7) + '@polkadot/util': 13.2.3 + '@polkadot/util-crypto': 13.2.3(@polkadot/util@13.2.3) + tslib: 2.6.2 + transitivePeerDependencies: + - bufferutil + - supports-color + - utf-8-validate + + '@polkadot/extension-inject@0.52.3(@polkadot/api@12.4.2(bufferutil@4.0.7)(utf-8-validate@5.0.7))(@polkadot/util@13.2.3)(bufferutil@4.0.7)(utf-8-validate@5.0.7)': + dependencies: + '@polkadot/api': 12.4.2(bufferutil@4.0.7)(utf-8-validate@5.0.7) + '@polkadot/rpc-provider': 12.4.2(bufferutil@4.0.7)(utf-8-validate@5.0.7) + '@polkadot/types': 12.4.2 + '@polkadot/util': 13.2.3 + '@polkadot/util-crypto': 13.2.3(@polkadot/util@13.2.3) + '@polkadot/x-global': 13.2.3 + tslib: 2.6.2 + transitivePeerDependencies: + - bufferutil + - supports-color + - utf-8-validate + + '@polkadot/keyring@13.2.3(@polkadot/util-crypto@13.2.3(@polkadot/util@13.2.3))(@polkadot/util@13.2.3)': + dependencies: + '@polkadot/util': 13.2.3 + '@polkadot/util-crypto': 13.2.3(@polkadot/util@13.2.3) + tslib: 2.8.1 + + '@polkadot/networks@13.2.3': + dependencies: + '@polkadot/util': 13.2.3 + '@substrate/ss58-registry': 1.51.0 + tslib: 2.8.1 + + '@polkadot/rpc-augment@12.4.2(bufferutil@4.0.7)(utf-8-validate@5.0.7)': + dependencies: + '@polkadot/rpc-core': 12.4.2(bufferutil@4.0.7)(utf-8-validate@5.0.7) + '@polkadot/types': 12.4.2 + '@polkadot/types-codec': 12.4.2 + '@polkadot/util': 13.2.3 + tslib: 2.8.1 + transitivePeerDependencies: + - bufferutil + - supports-color + - utf-8-validate + + '@polkadot/rpc-core@12.4.2(bufferutil@4.0.7)(utf-8-validate@5.0.7)': + dependencies: + '@polkadot/rpc-augment': 12.4.2(bufferutil@4.0.7)(utf-8-validate@5.0.7) + '@polkadot/rpc-provider': 12.4.2(bufferutil@4.0.7)(utf-8-validate@5.0.7) + '@polkadot/types': 12.4.2 + '@polkadot/util': 13.2.3 + rxjs: 7.8.1 + tslib: 2.8.1 + transitivePeerDependencies: + - bufferutil + - supports-color + - utf-8-validate + + '@polkadot/rpc-provider@12.4.2(bufferutil@4.0.7)(utf-8-validate@5.0.7)': + dependencies: + '@polkadot/keyring': 13.2.3(@polkadot/util-crypto@13.2.3(@polkadot/util@13.2.3))(@polkadot/util@13.2.3) + '@polkadot/types': 12.4.2 + '@polkadot/types-support': 12.4.2 + '@polkadot/util': 13.2.3 + '@polkadot/util-crypto': 13.2.3(@polkadot/util@13.2.3) + '@polkadot/x-fetch': 13.2.3 + '@polkadot/x-global': 13.2.3 + '@polkadot/x-ws': 13.2.3(bufferutil@4.0.7)(utf-8-validate@5.0.7) + eventemitter3: 5.0.1 + mock-socket: 9.3.1 + nock: 13.5.6 + tslib: 2.8.1 + optionalDependencies: + '@substrate/connect': 0.8.11(bufferutil@4.0.7)(utf-8-validate@5.0.7) + transitivePeerDependencies: + - bufferutil + - supports-color + - utf-8-validate + + '@polkadot/types-augment@12.4.2': + dependencies: + '@polkadot/types': 12.4.2 + '@polkadot/types-codec': 12.4.2 + '@polkadot/util': 13.2.3 + tslib: 2.8.1 + + '@polkadot/types-codec@12.4.2': + dependencies: + '@polkadot/util': 13.2.3 + '@polkadot/x-bigint': 13.2.3 + tslib: 2.8.1 + + '@polkadot/types-create@12.4.2': + dependencies: + '@polkadot/types-codec': 12.4.2 + '@polkadot/util': 13.2.3 + tslib: 2.8.1 + + '@polkadot/types-known@12.4.2': + dependencies: + '@polkadot/networks': 13.2.3 + '@polkadot/types': 12.4.2 + '@polkadot/types-codec': 12.4.2 + '@polkadot/types-create': 12.4.2 + '@polkadot/util': 13.2.3 + tslib: 2.8.1 + + '@polkadot/types-support@12.4.2': + dependencies: + '@polkadot/util': 13.2.3 + tslib: 2.8.1 + + '@polkadot/types@12.4.2': + dependencies: + '@polkadot/keyring': 13.2.3(@polkadot/util-crypto@13.2.3(@polkadot/util@13.2.3))(@polkadot/util@13.2.3) + '@polkadot/types-augment': 12.4.2 + '@polkadot/types-codec': 12.4.2 + '@polkadot/types-create': 12.4.2 + '@polkadot/util': 13.2.3 + '@polkadot/util-crypto': 13.2.3(@polkadot/util@13.2.3) + rxjs: 7.8.1 + tslib: 2.8.1 + + '@polkadot/util-crypto@13.2.3(@polkadot/util@13.2.3)': + dependencies: + '@noble/curves': 1.3.0 + '@noble/hashes': 1.4.0 + '@polkadot/networks': 13.2.3 + '@polkadot/util': 13.2.3 + '@polkadot/wasm-crypto': 7.4.1(@polkadot/util@13.2.3)(@polkadot/x-randomvalues@13.2.3(@polkadot/util@13.2.3)(@polkadot/wasm-util@7.4.1(@polkadot/util@13.2.3))) + '@polkadot/wasm-util': 7.4.1(@polkadot/util@13.2.3) + '@polkadot/x-bigint': 13.2.3 + '@polkadot/x-randomvalues': 13.2.3(@polkadot/util@13.2.3)(@polkadot/wasm-util@7.4.1(@polkadot/util@13.2.3)) + '@scure/base': 1.2.1 + tslib: 2.8.1 + + '@polkadot/util@13.2.3': + dependencies: + '@polkadot/x-bigint': 13.2.3 + '@polkadot/x-global': 13.2.3 + '@polkadot/x-textdecoder': 13.2.3 + '@polkadot/x-textencoder': 13.2.3 + '@types/bn.js': 5.1.6 + bn.js: 5.2.1 + tslib: 2.8.1 + + '@polkadot/wasm-bridge@7.4.1(@polkadot/util@13.2.3)(@polkadot/x-randomvalues@13.2.3(@polkadot/util@13.2.3)(@polkadot/wasm-util@7.4.1(@polkadot/util@13.2.3)))': + dependencies: + '@polkadot/util': 13.2.3 + '@polkadot/wasm-util': 7.4.1(@polkadot/util@13.2.3) + '@polkadot/x-randomvalues': 13.2.3(@polkadot/util@13.2.3)(@polkadot/wasm-util@7.4.1(@polkadot/util@13.2.3)) + tslib: 2.8.1 + + '@polkadot/wasm-crypto-asmjs@7.4.1(@polkadot/util@13.2.3)': + dependencies: + '@polkadot/util': 13.2.3 + tslib: 2.8.1 + + '@polkadot/wasm-crypto-init@7.4.1(@polkadot/util@13.2.3)(@polkadot/x-randomvalues@13.2.3(@polkadot/util@13.2.3)(@polkadot/wasm-util@7.4.1(@polkadot/util@13.2.3)))': + dependencies: + '@polkadot/util': 13.2.3 + '@polkadot/wasm-bridge': 7.4.1(@polkadot/util@13.2.3)(@polkadot/x-randomvalues@13.2.3(@polkadot/util@13.2.3)(@polkadot/wasm-util@7.4.1(@polkadot/util@13.2.3))) + '@polkadot/wasm-crypto-asmjs': 7.4.1(@polkadot/util@13.2.3) + '@polkadot/wasm-crypto-wasm': 7.4.1(@polkadot/util@13.2.3) + '@polkadot/wasm-util': 7.4.1(@polkadot/util@13.2.3) + '@polkadot/x-randomvalues': 13.2.3(@polkadot/util@13.2.3)(@polkadot/wasm-util@7.4.1(@polkadot/util@13.2.3)) + tslib: 2.8.1 + + '@polkadot/wasm-crypto-wasm@7.4.1(@polkadot/util@13.2.3)': + dependencies: + '@polkadot/util': 13.2.3 + '@polkadot/wasm-util': 7.4.1(@polkadot/util@13.2.3) + tslib: 2.8.1 + + '@polkadot/wasm-crypto@7.4.1(@polkadot/util@13.2.3)(@polkadot/x-randomvalues@13.2.3(@polkadot/util@13.2.3)(@polkadot/wasm-util@7.4.1(@polkadot/util@13.2.3)))': + dependencies: + '@polkadot/util': 13.2.3 + '@polkadot/wasm-bridge': 7.4.1(@polkadot/util@13.2.3)(@polkadot/x-randomvalues@13.2.3(@polkadot/util@13.2.3)(@polkadot/wasm-util@7.4.1(@polkadot/util@13.2.3))) + '@polkadot/wasm-crypto-asmjs': 7.4.1(@polkadot/util@13.2.3) + '@polkadot/wasm-crypto-init': 7.4.1(@polkadot/util@13.2.3)(@polkadot/x-randomvalues@13.2.3(@polkadot/util@13.2.3)(@polkadot/wasm-util@7.4.1(@polkadot/util@13.2.3))) + '@polkadot/wasm-crypto-wasm': 7.4.1(@polkadot/util@13.2.3) + '@polkadot/wasm-util': 7.4.1(@polkadot/util@13.2.3) + '@polkadot/x-randomvalues': 13.2.3(@polkadot/util@13.2.3)(@polkadot/wasm-util@7.4.1(@polkadot/util@13.2.3)) + tslib: 2.8.1 + + '@polkadot/wasm-util@7.4.1(@polkadot/util@13.2.3)': + dependencies: + '@polkadot/util': 13.2.3 + tslib: 2.8.1 + + '@polkadot/x-bigint@13.2.3': + dependencies: + '@polkadot/x-global': 13.2.3 + tslib: 2.8.1 + + '@polkadot/x-fetch@13.2.3': + dependencies: + '@polkadot/x-global': 13.2.3 + node-fetch: 3.3.2 + tslib: 2.8.1 + + '@polkadot/x-global@13.2.3': + dependencies: + tslib: 2.8.1 + + '@polkadot/x-randomvalues@13.2.3(@polkadot/util@13.2.3)(@polkadot/wasm-util@7.4.1(@polkadot/util@13.2.3))': + dependencies: + '@polkadot/util': 13.2.3 + '@polkadot/wasm-util': 7.4.1(@polkadot/util@13.2.3) + '@polkadot/x-global': 13.2.3 + tslib: 2.8.1 + + '@polkadot/x-textdecoder@13.2.3': + dependencies: + '@polkadot/x-global': 13.2.3 + tslib: 2.8.1 + + '@polkadot/x-textencoder@13.2.3': + dependencies: + '@polkadot/x-global': 13.2.3 + tslib: 2.8.1 + + '@polkadot/x-ws@13.2.3(bufferutil@4.0.7)(utf-8-validate@5.0.7)': + dependencies: + '@polkadot/x-global': 13.2.3 + tslib: 2.8.1 + ws: 8.18.0(bufferutil@4.0.7)(utf-8-validate@5.0.7) + transitivePeerDependencies: + - bufferutil + - utf-8-validate + '@promptbook/utils@0.49.0': dependencies: moment: 2.30.1 @@ -7878,6 +8602,8 @@ snapshots: '@scure/base@1.1.6': {} + '@scure/base@1.2.1': {} + '@scure/bip32@1.1.5': dependencies: '@noble/hashes': 1.2.0 @@ -7969,6 +8695,37 @@ snapshots: '@solidity-parser/parser@0.18.0': {} + '@substrate/connect-extension-protocol@2.2.1': + optional: true + + '@substrate/connect-known-chains@1.8.0': + optional: true + + '@substrate/connect@0.8.11(bufferutil@4.0.7)(utf-8-validate@5.0.7)': + dependencies: + '@substrate/connect-extension-protocol': 2.2.1 + '@substrate/connect-known-chains': 1.8.0 + '@substrate/light-client-extension-helpers': 1.0.0(smoldot@2.0.26(bufferutil@4.0.7)(utf-8-validate@5.0.7)) + smoldot: 2.0.26(bufferutil@4.0.7)(utf-8-validate@5.0.7) + transitivePeerDependencies: + - bufferutil + - utf-8-validate + optional: true + + '@substrate/light-client-extension-helpers@1.0.0(smoldot@2.0.26(bufferutil@4.0.7)(utf-8-validate@5.0.7))': + dependencies: + '@polkadot-api/json-rpc-provider': 0.0.1 + '@polkadot-api/json-rpc-provider-proxy': 0.1.0 + '@polkadot-api/observable-client': 0.3.2(@polkadot-api/substrate-client@0.1.4)(rxjs@7.8.1) + '@polkadot-api/substrate-client': 0.1.4 + '@substrate/connect-extension-protocol': 2.2.1 + '@substrate/connect-known-chains': 1.8.0 + rxjs: 7.8.1 + smoldot: 2.0.26(bufferutil@4.0.7)(utf-8-validate@5.0.7) + optional: true + + '@substrate/ss58-registry@1.51.0': {} + '@szmarczak/http-timer@5.0.1': dependencies: defer-to-connect: 2.0.1 @@ -8026,6 +8783,10 @@ snapshots: dependencies: '@types/node': 18.19.33 + '@types/bn.js@5.1.6': + dependencies: + '@types/node': 20.12.11 + '@types/chai-as-promised@7.1.8': dependencies: '@types/chai': 4.3.16 @@ -8136,6 +8897,10 @@ snapshots: dependencies: '@types/node': 18.19.33 + '@types/ws@8.5.3': + dependencies: + '@types/node': 20.12.11 + '@types/yargs-parser@21.0.3': {} '@types/yargs@17.0.32': @@ -8485,7 +9250,7 @@ snapshots: '@typescript-eslint/eslint-plugin': 6.21.0(@typescript-eslint/parser@6.21.0(eslint@8.57.0)(typescript@5.4.5))(eslint@8.57.0)(typescript@5.4.5) '@typescript-eslint/parser': 6.21.0(eslint@8.57.0)(typescript@5.4.5) eslint-config-prettier: 9.1.0(eslint@8.57.0) - eslint-import-resolver-alias: 1.1.2(eslint-plugin-import@2.29.1(@typescript-eslint/parser@6.21.0(eslint@8.57.0)(typescript@5.4.5))(eslint-import-resolver-typescript@3.6.1)(eslint@8.57.0)) + eslint-import-resolver-alias: 1.1.2(eslint-plugin-import@2.29.1) eslint-import-resolver-typescript: 3.6.1(@typescript-eslint/parser@6.21.0(eslint@8.57.0)(typescript@5.4.5))(eslint-plugin-import@2.29.1)(eslint@8.57.0) eslint-plugin-eslint-comments: 3.2.0(eslint@8.57.0) eslint-plugin-import: 2.29.1(@typescript-eslint/parser@7.8.0(eslint@8.57.0)(typescript@5.4.5))(eslint@8.57.0) @@ -8586,6 +9351,12 @@ snapshots: abbrev@1.0.9: {} + abitype@0.7.1(typescript@5.4.5)(zod@3.23.8): + dependencies: + typescript: 5.4.5 + optionalDependencies: + zod: 3.23.8 + abort-controller@3.0.0: dependencies: event-target-shim: 5.0.1 @@ -8967,6 +9738,8 @@ snapshots: big-integer@1.6.52: {} + bignumber.js@9.1.2: {} + binary-extensions@2.3.0: {} blake-hash@2.0.0: @@ -9928,7 +10701,7 @@ snapshots: eslint: 8.57.0 eslint-plugin-turbo: 1.13.3(eslint@8.57.0) - eslint-import-resolver-alias@1.1.2(eslint-plugin-import@2.29.1(@typescript-eslint/parser@6.21.0(eslint@8.57.0)(typescript@5.4.5))(eslint-import-resolver-typescript@3.6.1)(eslint@8.57.0)): + eslint-import-resolver-alias@1.1.2(eslint-plugin-import@2.29.1): dependencies: eslint-plugin-import: 2.29.1(@typescript-eslint/parser@7.8.0(eslint@8.57.0)(typescript@5.4.5))(eslint@8.57.0) @@ -9945,7 +10718,7 @@ snapshots: debug: 4.3.4(supports-color@8.1.1) enhanced-resolve: 5.16.1 eslint: 8.57.0 - eslint-module-utils: 2.8.1(@typescript-eslint/parser@6.21.0(eslint@8.57.0)(typescript@5.4.5))(eslint-import-resolver-node@0.3.9)(eslint-import-resolver-typescript@3.6.1(@typescript-eslint/parser@6.21.0(eslint@8.57.0)(typescript@5.4.5))(eslint-plugin-import@2.29.1)(eslint@8.57.0))(eslint@8.57.0) + eslint-module-utils: 2.8.1(@typescript-eslint/parser@6.21.0(eslint@8.57.0)(typescript@5.4.5))(eslint-import-resolver-node@0.3.9)(eslint-import-resolver-typescript@3.6.1)(eslint@8.57.0) eslint-plugin-import: 2.29.1(@typescript-eslint/parser@7.8.0(eslint@8.57.0)(typescript@5.4.5))(eslint@8.57.0) fast-glob: 3.3.2 get-tsconfig: 4.7.5 @@ -9957,7 +10730,7 @@ snapshots: - eslint-import-resolver-webpack - supports-color - eslint-module-utils@2.8.1(@typescript-eslint/parser@6.21.0(eslint@8.57.0)(typescript@5.4.5))(eslint-import-resolver-node@0.3.9)(eslint-import-resolver-typescript@3.6.1(@typescript-eslint/parser@6.21.0(eslint@8.57.0)(typescript@5.4.5))(eslint-plugin-import@2.29.1)(eslint@8.57.0))(eslint@8.57.0): + eslint-module-utils@2.8.1(@typescript-eslint/parser@6.21.0(eslint@8.57.0)(typescript@5.4.5))(eslint-import-resolver-node@0.3.9)(eslint-import-resolver-typescript@3.6.1)(eslint@8.57.0): dependencies: debug: 3.2.7 optionalDependencies: @@ -11258,6 +12031,11 @@ snapshots: ipaddr.js@1.9.1: {} + is-arguments@1.1.1: + dependencies: + call-bind: 1.0.7 + has-tostringtag: 1.0.2 + is-array-buffer@3.0.4: dependencies: call-bind: 1.0.7 @@ -11403,6 +12181,10 @@ snapshots: transitivePeerDependencies: - encoding + isomorphic-ws@5.0.0(ws@8.18.0(bufferutil@4.0.7)(utf-8-validate@5.0.7)): + dependencies: + ws: 8.18.0(bufferutil@4.0.7)(utf-8-validate@5.0.7) + iterator.prototype@1.1.2: dependencies: define-properties: 1.2.1 @@ -11434,6 +12216,8 @@ snapshots: js-sha3@0.8.0: {} + js-sha3@0.9.3: {} + js-tokens@4.0.0: {} js-tokens@9.0.0: {} @@ -11467,6 +12251,8 @@ snapshots: json-stable-stringify-without-jsonify@1.0.1: {} + json-stringify-safe@5.0.1: {} + json5@1.0.2: dependencies: minimist: 1.2.8 @@ -11850,6 +12636,8 @@ snapshots: yargs-parser: 20.2.4 yargs-unparser: 2.0.0 + mock-socket@9.3.1: {} + module-error@1.0.2: {} moment@2.30.1: {} @@ -11886,6 +12674,14 @@ snapshots: netmask@2.0.2: {} + nock@13.5.6: + dependencies: + debug: 4.3.4(supports-color@8.1.1) + json-stringify-safe: 5.0.1 + propagate: 2.0.1 + transitivePeerDependencies: + - supports-color + node-addon-api@2.0.2: {} node-addon-api@3.2.1: {} @@ -12270,6 +13066,8 @@ snapshots: object-assign: 4.1.1 react-is: 16.13.1 + propagate@2.0.1: {} + proper-lockfile@4.1.2: dependencies: graceful-fs: 4.2.11 @@ -12602,6 +13400,10 @@ snapshots: dependencies: queue-microtask: 1.2.3 + rxjs@7.8.1: + dependencies: + tslib: 2.8.1 + safaridriver@0.1.2: {} safe-array-concat@1.1.2: @@ -12642,6 +13444,9 @@ snapshots: which: 1.3.1 wordwrap: 1.0.0 + scale-ts@1.6.1: + optional: true + scrypt-js@3.0.1: {} secp256k1@4.0.3: @@ -12774,6 +13579,14 @@ snapshots: smart-buffer@4.2.0: {} + smoldot@2.0.26(bufferutil@4.0.7)(utf-8-validate@5.0.7): + dependencies: + ws: 8.17.0(bufferutil@4.0.7)(utf-8-validate@5.0.7) + transitivePeerDependencies: + - bufferutil + - utf-8-validate + optional: true + snappy@7.2.2: optionalDependencies: '@napi-rs/snappy-android-arm-eabi': 7.2.2 @@ -13440,6 +14253,8 @@ snapshots: tslib@2.6.2: {} + tslib@2.8.1: {} + tslog@4.9.2: {} tsort@0.0.1: {} @@ -13707,6 +14522,14 @@ snapshots: util-deprecate@1.0.2: {} + util@0.12.5: + dependencies: + inherits: 2.0.4 + is-arguments: 1.1.1 + is-generator-function: 1.0.10 + is-typed-array: 1.1.13 + which-typed-array: 1.1.15 + utils-merge@1.0.1: {} uuid@8.3.2: {} @@ -13884,6 +14707,189 @@ snapshots: web-worker@1.2.0: {} + web3-core@4.7.1(bufferutil@4.0.7)(utf-8-validate@5.0.7): + dependencies: + web3-errors: 1.3.1 + web3-eth-accounts: 4.3.1 + web3-eth-iban: 4.0.7 + web3-providers-http: 4.2.0 + web3-providers-ws: 4.0.8(bufferutil@4.0.7)(utf-8-validate@5.0.7) + web3-types: 1.10.0 + web3-utils: 4.3.3 + web3-validator: 2.0.6 + optionalDependencies: + web3-providers-ipc: 4.0.7 + transitivePeerDependencies: + - bufferutil + - encoding + - utf-8-validate + + web3-errors@1.3.1: + dependencies: + web3-types: 1.10.0 + + web3-eth-abi@4.4.1(typescript@5.4.5)(zod@3.23.8): + dependencies: + abitype: 0.7.1(typescript@5.4.5)(zod@3.23.8) + web3-errors: 1.3.1 + web3-types: 1.10.0 + web3-utils: 4.3.3 + web3-validator: 2.0.6 + transitivePeerDependencies: + - typescript + - zod + + web3-eth-accounts@4.3.1: + dependencies: + '@ethereumjs/rlp': 4.0.1 + crc-32: 1.2.2 + ethereum-cryptography: 2.1.3 + web3-errors: 1.3.1 + web3-types: 1.10.0 + web3-utils: 4.3.3 + web3-validator: 2.0.6 + + web3-eth-contract@4.7.2(bufferutil@4.0.7)(typescript@5.4.5)(utf-8-validate@5.0.7)(zod@3.23.8): + dependencies: + '@ethereumjs/rlp': 5.0.2 + web3-core: 4.7.1(bufferutil@4.0.7)(utf-8-validate@5.0.7) + web3-errors: 1.3.1 + web3-eth: 4.11.1(bufferutil@4.0.7)(typescript@5.4.5)(utf-8-validate@5.0.7)(zod@3.23.8) + web3-eth-abi: 4.4.1(typescript@5.4.5)(zod@3.23.8) + web3-types: 1.10.0 + web3-utils: 4.3.3 + web3-validator: 2.0.6 + transitivePeerDependencies: + - bufferutil + - encoding + - typescript + - utf-8-validate + - zod + + web3-eth-ens@4.4.0(bufferutil@4.0.7)(typescript@5.4.5)(utf-8-validate@5.0.7)(zod@3.23.8): + dependencies: + '@adraffy/ens-normalize': 1.10.1 + web3-core: 4.7.1(bufferutil@4.0.7)(utf-8-validate@5.0.7) + web3-errors: 1.3.1 + web3-eth: 4.11.1(bufferutil@4.0.7)(typescript@5.4.5)(utf-8-validate@5.0.7)(zod@3.23.8) + web3-eth-contract: 4.7.2(bufferutil@4.0.7)(typescript@5.4.5)(utf-8-validate@5.0.7)(zod@3.23.8) + web3-net: 4.1.0(bufferutil@4.0.7)(utf-8-validate@5.0.7) + web3-types: 1.10.0 + web3-utils: 4.3.3 + web3-validator: 2.0.6 + transitivePeerDependencies: + - bufferutil + - encoding + - typescript + - utf-8-validate + - zod + + web3-eth-iban@4.0.7: + dependencies: + web3-errors: 1.3.1 + web3-types: 1.10.0 + web3-utils: 4.3.3 + web3-validator: 2.0.6 + + web3-eth-personal@4.1.0(bufferutil@4.0.7)(typescript@5.4.5)(utf-8-validate@5.0.7)(zod@3.23.8): + dependencies: + web3-core: 4.7.1(bufferutil@4.0.7)(utf-8-validate@5.0.7) + web3-eth: 4.11.1(bufferutil@4.0.7)(typescript@5.4.5)(utf-8-validate@5.0.7)(zod@3.23.8) + web3-rpc-methods: 1.3.0(bufferutil@4.0.7)(utf-8-validate@5.0.7) + web3-types: 1.10.0 + web3-utils: 4.3.3 + web3-validator: 2.0.6 + transitivePeerDependencies: + - bufferutil + - encoding + - typescript + - utf-8-validate + - zod + + web3-eth@4.11.1(bufferutil@4.0.7)(typescript@5.4.5)(utf-8-validate@5.0.7)(zod@3.23.8): + dependencies: + setimmediate: 1.0.5 + web3-core: 4.7.1(bufferutil@4.0.7)(utf-8-validate@5.0.7) + web3-errors: 1.3.1 + web3-eth-abi: 4.4.1(typescript@5.4.5)(zod@3.23.8) + web3-eth-accounts: 4.3.1 + web3-net: 4.1.0(bufferutil@4.0.7)(utf-8-validate@5.0.7) + web3-providers-ws: 4.0.8(bufferutil@4.0.7)(utf-8-validate@5.0.7) + web3-rpc-methods: 1.3.0(bufferutil@4.0.7)(utf-8-validate@5.0.7) + web3-types: 1.10.0 + web3-utils: 4.3.3 + web3-validator: 2.0.6 + transitivePeerDependencies: + - bufferutil + - encoding + - typescript + - utf-8-validate + - zod + + web3-net@4.1.0(bufferutil@4.0.7)(utf-8-validate@5.0.7): + dependencies: + web3-core: 4.7.1(bufferutil@4.0.7)(utf-8-validate@5.0.7) + web3-rpc-methods: 1.3.0(bufferutil@4.0.7)(utf-8-validate@5.0.7) + web3-types: 1.10.0 + web3-utils: 4.3.3 + transitivePeerDependencies: + - bufferutil + - encoding + - utf-8-validate + + web3-providers-http@4.2.0: + dependencies: + cross-fetch: 4.0.0 + web3-errors: 1.3.1 + web3-types: 1.10.0 + web3-utils: 4.3.3 + transitivePeerDependencies: + - encoding + + web3-providers-ipc@4.0.7: + dependencies: + web3-errors: 1.3.1 + web3-types: 1.10.0 + web3-utils: 4.3.3 + optional: true + + web3-providers-ws@4.0.8(bufferutil@4.0.7)(utf-8-validate@5.0.7): + dependencies: + '@types/ws': 8.5.3 + isomorphic-ws: 5.0.0(ws@8.18.0(bufferutil@4.0.7)(utf-8-validate@5.0.7)) + web3-errors: 1.3.1 + web3-types: 1.10.0 + web3-utils: 4.3.3 + ws: 8.18.0(bufferutil@4.0.7)(utf-8-validate@5.0.7) + transitivePeerDependencies: + - bufferutil + - utf-8-validate + + web3-rpc-methods@1.3.0(bufferutil@4.0.7)(utf-8-validate@5.0.7): + dependencies: + web3-core: 4.7.1(bufferutil@4.0.7)(utf-8-validate@5.0.7) + web3-types: 1.10.0 + web3-validator: 2.0.6 + transitivePeerDependencies: + - bufferutil + - encoding + - utf-8-validate + + web3-rpc-providers@1.0.0-rc.4(bufferutil@4.0.7)(utf-8-validate@5.0.7): + dependencies: + web3-errors: 1.3.1 + web3-providers-http: 4.2.0 + web3-providers-ws: 4.0.8(bufferutil@4.0.7)(utf-8-validate@5.0.7) + web3-types: 1.10.0 + web3-utils: 4.3.3 + web3-validator: 2.0.6 + transitivePeerDependencies: + - bufferutil + - encoding + - utf-8-validate + + web3-types@1.10.0: {} + web3-utils@1.10.4: dependencies: '@ethereumjs/util': 8.1.0 @@ -13895,6 +14901,48 @@ snapshots: randombytes: 2.1.0 utf8: 3.0.0 + web3-utils@4.3.3: + dependencies: + ethereum-cryptography: 2.1.3 + eventemitter3: 5.0.1 + web3-errors: 1.3.1 + web3-types: 1.10.0 + web3-validator: 2.0.6 + + web3-validator@2.0.6: + dependencies: + ethereum-cryptography: 2.1.3 + util: 0.12.5 + web3-errors: 1.3.1 + web3-types: 1.10.0 + zod: 3.23.8 + + web3@4.11.1(bufferutil@4.0.7)(typescript@5.4.5)(utf-8-validate@5.0.7)(zod@3.23.8): + dependencies: + web3-core: 4.7.1(bufferutil@4.0.7)(utf-8-validate@5.0.7) + web3-errors: 1.3.1 + web3-eth: 4.11.1(bufferutil@4.0.7)(typescript@5.4.5)(utf-8-validate@5.0.7)(zod@3.23.8) + web3-eth-abi: 4.4.1(typescript@5.4.5)(zod@3.23.8) + web3-eth-accounts: 4.3.1 + web3-eth-contract: 4.7.2(bufferutil@4.0.7)(typescript@5.4.5)(utf-8-validate@5.0.7)(zod@3.23.8) + web3-eth-ens: 4.4.0(bufferutil@4.0.7)(typescript@5.4.5)(utf-8-validate@5.0.7)(zod@3.23.8) + web3-eth-iban: 4.0.7 + web3-eth-personal: 4.1.0(bufferutil@4.0.7)(typescript@5.4.5)(utf-8-validate@5.0.7)(zod@3.23.8) + web3-net: 4.1.0(bufferutil@4.0.7)(utf-8-validate@5.0.7) + web3-providers-http: 4.2.0 + web3-providers-ws: 4.0.8(bufferutil@4.0.7)(utf-8-validate@5.0.7) + web3-rpc-methods: 1.3.0(bufferutil@4.0.7)(utf-8-validate@5.0.7) + web3-rpc-providers: 1.0.0-rc.4(bufferutil@4.0.7)(utf-8-validate@5.0.7) + web3-types: 1.10.0 + web3-utils: 4.3.3 + web3-validator: 2.0.6 + transitivePeerDependencies: + - bufferutil + - encoding + - typescript + - utf-8-validate + - zod + webdriver@8.36.1(bufferutil@4.0.7)(utf-8-validate@6.0.3): dependencies: '@types/node': 20.12.11 @@ -14102,11 +15150,22 @@ snapshots: bufferutil: 4.0.7 utf-8-validate: 6.0.3 + ws@8.17.0(bufferutil@4.0.7)(utf-8-validate@5.0.7): + optionalDependencies: + bufferutil: 4.0.7 + utf-8-validate: 5.0.7 + optional: true + ws@8.17.0(bufferutil@4.0.7)(utf-8-validate@6.0.3): optionalDependencies: bufferutil: 4.0.7 utf-8-validate: 6.0.3 + ws@8.18.0(bufferutil@4.0.7)(utf-8-validate@5.0.7): + optionalDependencies: + bufferutil: 4.0.7 + utf-8-validate: 5.0.7 + ws@8.5.0(bufferutil@4.0.7)(utf-8-validate@5.0.7): optionalDependencies: bufferutil: 4.0.7 @@ -14194,3 +15253,24 @@ snapshots: zksync-ethers@5.7.2(ethers@5.7.2(bufferutil@4.0.7)(utf-8-validate@5.0.7)): dependencies: ethers: 5.7.2(bufferutil@4.0.7)(utf-8-validate@5.0.7) + + zkverifyjs@0.3.1(@polkadot/util-crypto@13.2.3(@polkadot/util@13.2.3))(@polkadot/util@13.2.3)(bufferutil@4.0.7)(typescript@5.4.5)(utf-8-validate@5.0.7)(zod@3.23.8): + dependencies: + '@polkadot/api': 12.4.2(bufferutil@4.0.7)(utf-8-validate@5.0.7) + '@polkadot/extension-dapp': 0.52.3(@polkadot/api@12.4.2(bufferutil@4.0.7)(utf-8-validate@5.0.7))(@polkadot/util-crypto@13.2.3(@polkadot/util@13.2.3))(@polkadot/util@13.2.3)(bufferutil@4.0.7)(utf-8-validate@5.0.7) + bignumber.js: 9.1.2 + dotenv: 16.4.5 + js-sha3: 0.9.3 + snarkjs: 0.7.4 + web3: 4.11.1(bufferutil@4.0.7)(typescript@5.4.5)(utf-8-validate@5.0.7)(zod@3.23.8) + transitivePeerDependencies: + - '@polkadot/util' + - '@polkadot/util-crypto' + - bufferutil + - encoding + - supports-color + - typescript + - utf-8-validate + - zod + + zod@3.23.8: {} From cfdb35ed5f4424111da9d47b620d35944fdeee97 Mon Sep 17 00:00:00 2001 From: feka7 Date: Fri, 6 Dec 2024 00:55:02 +0100 Subject: [PATCH 2/5] add draft readme --- README-ORIGINAL.md | 61 ++++++++++++++++++++++++++++++ README.md | 93 +++++++++++++++++++++++++++------------------- 2 files changed, 115 insertions(+), 39 deletions(-) create mode 100644 README-ORIGINAL.md diff --git a/README-ORIGINAL.md b/README-ORIGINAL.md new file mode 100644 index 0000000..af7855b --- /dev/null +++ b/README-ORIGINAL.md @@ -0,0 +1,61 @@ +# Galxe Identity Protocol + +## What's inside? + +This is the monorepo for Galxe Identity protocol, powered by Turborepo. It includes the following packages/apps: + +### Packages + +- `@galxe-identity-protocol/evm-contracts`: a hardhat project of all the evm contracts, including typechain generated TypeScript bindings. +- `@galxe-identity-protocol/sdk`: a TypeScript SDK for everything related to the protocol. +- `@repo/eslint-config`: `eslint` configurations (includes `eslint-config-next` and `eslint-config-prettier`) +- `@repo/typescript-config`: `tsconfig.json`s used throughout the monorepo + +### Apps + +- `cli`: a cli tool for managing the protocol, including interacting with the on-chain contracts and type generation. +- `issuer`: a microservice that issues credentials by GRPC request. +- `sstyper`: a fully self-sovereign credential type setup tool. + +## Development setup + +### Node version + +Developers should use the current LTS version of node. Currently, node v20.11.1. For package users, the SDK is compatible with node v18 and above. + +```bash +# For nvm users: +nvm install --lts +nvm use --lts +``` + +### Setup + +We use corepack for managing package managers. + +```bash +corepack enable +corepack install # this will install pnpm version specified in package.json +``` + +## Build, Test, and Lint + +``` +pnpm lint +pnpm build +pnpm test +``` + +## How to create a new credential type + +1. Using type DSL to design the credential type. +2. Use `app/sstyper` to run the setup process, which will generate type artifacts, including + + zkey, vkey, proofgen wasm... + + solidity verifier contract +3. Upload the artifacts to IPFS and create a metadata json file containing URI to the artifacts. See artifacts in `artifacts/**/metadata.json` for reference. +4. Deploy the verifier contract to supported chains. See `evm-contracts/deploy`. +5. Register the type on supported chains, using the `metadata.json` URI. If primitive type, see `evm-contracts/scripts` for reference. + +### NOTICE + +If you saw build error when building a package that is depending on local packages, try `pnpm build` in the root directory first. It is because that dependencies were not built. diff --git a/README.md b/README.md index af7855b..611364d 100644 --- a/README.md +++ b/README.md @@ -1,61 +1,76 @@ -# Galxe Identity Protocol +# Galxe Identity Protocol x ZKVerify -## What's inside? +This project was developed for the ZKVerify online hackathon. It's a fork of the Galxe Identity Protocol [repository](https://github.com/galxe-identity-protocol/tutorial). You can find the original README [here](README-ORIGINAL.md). -This is the monorepo for Galxe Identity protocol, powered by Turborepo. It includes the following packages/apps: +The files modified for the hackathon are: +- [`src/useZkVerify.ts`](apps/tutorial/src/useZkVerify.ts) +- [`package.json`](apps/tutorial/package.json) -### Packages +The goal of this project is to demonstrate how to integrate Galxe Identity Protocol with ZKVerify to significantly reduce verification costs without sacrificing security. -- `@galxe-identity-protocol/evm-contracts`: a hardhat project of all the evm contracts, including typechain generated TypeScript bindings. -- `@galxe-identity-protocol/sdk`: a TypeScript SDK for everything related to the protocol. -- `@repo/eslint-config`: `eslint` configurations (includes `eslint-config-next` and `eslint-config-prettier`) -- `@repo/typescript-config`: `tsconfig.json`s used throughout the monorepo +## Galxe +Galxe is a decentralized super app and web3's largest onchain distribution platform, with over 22 million users and trusted by top partners like Optimism, Polygon, and many more. +Within its infrastructure, Galxe built Identity Protocol, a technology that utilizes privacy-preserving ZK technology to enable safe and seamless integration of digital identities across platforms. +Built on top of Identity Protocol, there is another product by Galxe, the Galxe Passport, chosen by over 1 million users to share their digital identity. -### Apps +## ZKVerify +ZKVerify is a zero-knowledge proof platform that allows users to verify their identity without revealing any personal information. -- `cli`: a cli tool for managing the protocol, including interacting with the on-chain contracts and type generation. -- `issuer`: a microservice that issues credentials by GRPC request. -- `sstyper`: a fully self-sovereign credential type setup tool. +## What we cooked +We created a new tutorial that follows the original one published by Galxe in this repo, but instead of doing an off-chain or on-chain verification, we use ZKVerify to verify the proof submitted. -## Development setup +The process is divided in three steps: +1. Issuer issuing a credential to the user +2. User generating a proof to prove some statements about the credential +3. Submitting the proof to ZKVerify to verify it -### Node version +We implemented the last step in two ways: +- Registering the verification key of the issuer onchain and then submitting the proof to ZKVerify +- Submitting the proof directly to ZKVerify with the verification key -Developers should use the current LTS version of node. Currently, node v20.11.1. For package users, the SDK is compatible with node v18 and above. +We implementing the last step in two way: +- Registering the verification key of the issuer onchain and then submitting the proof to ZKVerify. +- Submitting the proof directly to ZKVerify with the verification key. -```bash -# For nvm users: -nvm install --lts -nvm use --lts -``` - -### Setup ++++ add considerations about the size +++ -We use corepack for managing package managers. +## How to run it +Follow the original tutorial to run the code: ```bash +# Quick start corepack enable -corepack install # this will install pnpm version specified in package.json +corepack install +pnpm build ``` +This will install the dependencies and build the project. -## Build, Test, and Lint - +Then go to the `apps/tutorial` folder and run: +```bash +npm install ``` -pnpm lint -pnpm build -pnpm test +Add `ZKVERIFY_SIGNER_PK` to the `.env` file with the private key of the account that will register the verification key onchain. + +Finally, run the script: +```bash +npm run useZkVerify ``` -## How to create a new credential type +## Considerations + + + + + + + + + + + + + + -1. Using type DSL to design the credential type. -2. Use `app/sstyper` to run the setup process, which will generate type artifacts, including - + zkey, vkey, proofgen wasm... - + solidity verifier contract -3. Upload the artifacts to IPFS and create a metadata json file containing URI to the artifacts. See artifacts in `artifacts/**/metadata.json` for reference. -4. Deploy the verifier contract to supported chains. See `evm-contracts/deploy`. -5. Register the type on supported chains, using the `metadata.json` URI. If primitive type, see `evm-contracts/scripts` for reference. -### NOTICE -If you saw build error when building a package that is depending on local packages, try `pnpm build` in the root directory first. It is because that dependencies were not built. From d448aa17b31402712636c074f85b61e3341b7fa8 Mon Sep 17 00:00:00 2001 From: feka7 Date: Sat, 7 Dec 2024 12:29:41 +0100 Subject: [PATCH 3/5] Update README.md with considerations --- README.md | 21 ++++++++++++++++----- 1 file changed, 16 insertions(+), 5 deletions(-) diff --git a/README.md b/README.md index 611364d..afde647 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@ # Galxe Identity Protocol x ZKVerify -This project was developed for the ZKVerify online hackathon. It's a fork of the Galxe Identity Protocol [repository](https://github.com/galxe-identity-protocol/tutorial). You can find the original README [here](README-ORIGINAL.md). +This project is developed for the ZKVerify online hackathon. It's a fork of the Galxe Identity Protocol [repository](https://github.com/galxe-identity-protocol/tutorial). You can find the original README [here](README-ORIGINAL.md). The files modified for the hackathon are: - [`src/useZkVerify.ts`](apps/tutorial/src/useZkVerify.ts) @@ -9,16 +9,19 @@ The files modified for the hackathon are: The goal of this project is to demonstrate how to integrate Galxe Identity Protocol with ZKVerify to significantly reduce verification costs without sacrificing security. ## Galxe -Galxe is a decentralized super app and web3's largest onchain distribution platform, with over 22 million users and trusted by top partners like Optimism, Polygon, and many more. +Galxe is a decentralized super app and web3's largest onchain distribution platform, with over 31 million active users and trusted by top partners like Optimism, Polygon, and many more. Within its infrastructure, Galxe built Identity Protocol, a technology that utilizes privacy-preserving ZK technology to enable safe and seamless integration of digital identities across platforms. Built on top of Identity Protocol, there is another product by Galxe, the Galxe Passport, chosen by over 1 million users to share their digital identity. ## ZKVerify -ZKVerify is a zero-knowledge proof platform that allows users to verify their identity without revealing any personal information. +zkVerify is a modular blockchain focused on zero-knowledge (ZK) proof verification. It's specifically designed for verifying ZK proofs across different blockchains efficiently, with benefits in terms of cost reduction and fast verification times. +It's support multiple verification schemes, including Groth16, Fflonk, Risc0 and more. ## What we cooked We created a new tutorial that follows the original one published by Galxe in this repo, but instead of doing an off-chain or on-chain verification, we use ZKVerify to verify the proof submitted. +> **Note:** Galxe has already integrated Nebra UPA in a tutorial, a protocol that can aggregate multiple proofs for reducing the verification cost. This validates our idea with zkVerify. + The process is divided in three steps: 1. Issuer issuing a credential to the user 2. User generating a proof to prove some statements about the credential @@ -36,7 +39,7 @@ We implementing the last step in two way: ## How to run it -Follow the original tutorial to run the code: +Follow the original tutorial to initialize the repository: ```bash # Quick start corepack enable @@ -45,8 +48,9 @@ pnpm build ``` This will install the dependencies and build the project. -Then go to the `apps/tutorial` folder and run: +Then go to the `apps/tutorial` folder and install the dependencies: ```bash +cd apps/tutorial npm install ``` Add `ZKVERIFY_SIGNER_PK` to the `.env` file with the private key of the account that will register the verification key onchain. @@ -57,6 +61,13 @@ npm run useZkVerify ``` ## Considerations +Galxe currently serves over 31 million active users and manages more than 350,000 credentials, making it the perfect candidate for testing scalable verification solutions. + +Assessed that zkVerify can reduce proof verification costs by >90% compared to native verification on Ethereum, at Galxe's scale, this translates to a significant costs dropping - a transformation that could generate millions in savings annually. + +Beyond pure cost reduction, this integration opens new possibilities for Web3 identity management. With over 1 million users actively using Galxe Passport, cheaper verification enables more frequent credential checks, enhanced privacy features, and broader accessibility to trustless credential systems for smaller projects. + +On a closing thought, we want to remark how specialized verification layers can solve real problems in large-scale identity systems, with the zkVerify-Galxe integration setting a new standard for efficient, accessible credential verification in Web3. From 1d7fc0ddea7781486155cdf85a8f4db3bd9d8be7 Mon Sep 17 00:00:00 2001 From: AndreaRettaroli Date: Sat, 7 Dec 2024 16:10:55 +0100 Subject: [PATCH 4/5] refactor --- README.md | 83 +++++++++++++++++--------------- apps/tutorial/src/useZkVerify.ts | 18 ++++--- start.sh | 22 +++++++++ 3 files changed, 76 insertions(+), 47 deletions(-) create mode 100755 start.sh diff --git a/README.md b/README.md index afde647..860ca0d 100644 --- a/README.md +++ b/README.md @@ -1,87 +1,90 @@ -# Galxe Identity Protocol x ZKVerify +# Galxe Identity Protocol x zkVerify -This project is developed for the ZKVerify online hackathon. It's a fork of the Galxe Identity Protocol [repository](https://github.com/galxe-identity-protocol/tutorial). You can find the original README [here](README-ORIGINAL.md). +This project is developed for the [zkVerify online hackathon](https://zkverify-zk-application-and-infrastructure-buildin.devfolio.co/overview). It's a fork of the Galxe Identity Protocol [repository](https://github.com/galxe-identity-protocol/tutorial). You can find the original README [here](README-ORIGINAL.md). + +The processed files for the hackathon are: -The files modified for the hackathon are: - [`src/useZkVerify.ts`](apps/tutorial/src/useZkVerify.ts) - [`package.json`](apps/tutorial/package.json) +- [`start.sh`](start.sh) + +The goal of this project is to demonstrate how to integrate zkVerify in Galxe Identity Protocol to significantly reduce verification costs without sacrificing security. + +## zkVerify -The goal of this project is to demonstrate how to integrate Galxe Identity Protocol with ZKVerify to significantly reduce verification costs without sacrificing security. +[zkVerify](https://zkverify.io/) is a modular blockchain focused on proof verification. It's specifically enables blockchain networks to offload the computationally heavy and expensive process of zk (zero-knowledge) proof verification, drastically reducing cost. It's support multiple verification schemes, including Groth16, Fflonk, Risc0 and more. ## Galxe -Galxe is a decentralized super app and web3's largest onchain distribution platform, with over 31 million active users and trusted by top partners like Optimism, Polygon, and many more. -Within its infrastructure, Galxe built Identity Protocol, a technology that utilizes privacy-preserving ZK technology to enable safe and seamless integration of digital identities across platforms. -Built on top of Identity Protocol, there is another product by Galxe, the Galxe Passport, chosen by over 1 million users to share their digital identity. -## ZKVerify -zkVerify is a modular blockchain focused on zero-knowledge (ZK) proof verification. It's specifically designed for verifying ZK proofs across different blockchains efficiently, with benefits in terms of cost reduction and fast verification times. -It's support multiple verification schemes, including Groth16, Fflonk, Risc0 and more. +Galxe is a decentralized super app and web3's largest onchain distribution platform, with over 31 million active users and trusted by top partners like Optimism, Polygon, and many more. +Within its infrastructure, Galxe built [Identity Protocol](https://www.galxe.com/identity), a technology that utilizes privacy-preserving ZK technology to enable safe and seamless integration of digital identities across platforms. +Built on top of Identity Protocol, there is another product by Galxe, the [Galxe Passport](https://www.galxe.com/passport), chosen by around 1 million users to share their digital identity. ## What we cooked -We created a new tutorial that follows the original one published by Galxe in this repo, but instead of doing an off-chain or on-chain verification, we use ZKVerify to verify the proof submitted. -> **Note:** Galxe has already integrated Nebra UPA in a tutorial, a protocol that can aggregate multiple proofs for reducing the verification cost. This validates our idea with zkVerify. +We created a new tutorial that follows the original one published by Galxe in this repo, but instead of doing an off-chain or an expensive on-chain verification, we integrated zkVerify technology as verification layer to efficiently verify the proofs. + +> **Note:** Galxe has already integrated Nebra UPA in a tutorial, a protocol that aggregates multiple proofs for reducing the verification cost. This validates our idea of introducing zkVerify. The process is divided in three steps: + 1. Issuer issuing a credential to the user 2. User generating a proof to prove some statements about the credential -3. Submitting the proof to ZKVerify to verify it +3. Submitting the proof to zkVerify to verify it We implemented the last step in two ways: -- Registering the verification key of the issuer onchain and then submitting the proof to ZKVerify -- Submitting the proof directly to ZKVerify with the verification key -We implementing the last step in two way: -- Registering the verification key of the issuer onchain and then submitting the proof to ZKVerify. -- Submitting the proof directly to ZKVerify with the verification key. - -+++ add considerations about the size +++ +- Registering the verification key of the issuer onchain and then submitting the proof to zkVerify, txHash: [0x11c2ddf64b5ddfcb1b1404d655ac41f23190f579f4bf2d79d612375df7a1fbf6](https://zkverify-explorer.zeeve.net/extrinsics/0x11c2ddf64b5ddfcb1b1404d655ac41f23190f579f4bf2d79d612375df7a1fbf6?tab=events&page=1) +- Submitting the proof directly to zkVerify with the verification key, txHash: [0x7d7a24d8c0c47fcc03f24ec54fa4575f6806bc7f9ef202eff7172496a14c27a2](https://zkverify-explorer.zeeve.net/extrinsics/0x7d7a24d8c0c47fcc03f24ec54fa4575f6806bc7f9ef202eff7172496a14c27a2?tab=events&page=1) ## How to run it Follow the original tutorial to initialize the repository: + ```bash # Quick start corepack enable corepack install pnpm build ``` + This will install the dependencies and build the project. Then go to the `apps/tutorial` folder and install the dependencies: + ```bash cd apps/tutorial -npm install +pnpm install ``` + Add `ZKVERIFY_SIGNER_PK` to the `.env` file with the private key of the account that will register the verification key onchain. Finally, run the script: + ```bash npm run useZkVerify ``` +--- +Alternatively you can run the script: +``` +chmod +x start.sh +./start.sh +``` -## Considerations -Galxe currently serves over 31 million active users and manages more than 350,000 credentials, making it the perfect candidate for testing scalable verification solutions. - -Assessed that zkVerify can reduce proof verification costs by >90% compared to native verification on Ethereum, at Galxe's scale, this translates to a significant costs dropping - a transformation that could generate millions in savings annually. - -Beyond pure cost reduction, this integration opens new possibilities for Web3 identity management. With over 1 million users actively using Galxe Passport, cheaper verification enables more frequent credential checks, enhanced privacy features, and broader accessibility to trustless credential systems for smaller projects. - -On a closing thought, we want to remark how specialized verification layers can solve real problems in large-scale identity systems, with the zkVerify-Galxe integration setting a new standard for efficient, accessible credential verification in Web3. - - - - - - - - - - - +Before to run make sure you have node latest version: +```bash +# For nvm users: +nvm install --lts +nvm use --lts +``` +## Considerations +Galxe currently serves over 31 million active users and manages more than 350k credentials, making it the perfect candidate for testing scalable verification solutions with zkVerify. +Assessed that zkVerify can reduce proof verification costs by >90% compared to native verification on Ethereum, at Galxe's scale, this translates to a significant costs dropping - a transformation that could generate millions in savings annually. +Beyond pure cost reduction, this integration opens new possibilities for Web3 identity management. With around 1 million users actively using Galxe Passport, cheaper verification enables more frequent credential checks, enhanced privacy features, and broader accessibility to trustless credential systems for smaller projects. +On a closing thought, we want to remark how specialized verification layers can solve real problems in large-scale identity systems, with the zkVerify-Galxe integration setting a new standard for efficient, accessible credential verification in Web3. diff --git a/apps/tutorial/src/useZkVerify.ts b/apps/tutorial/src/useZkVerify.ts index bfdc494..b046e2f 100644 --- a/apps/tutorial/src/useZkVerify.ts +++ b/apps/tutorial/src/useZkVerify.ts @@ -247,15 +247,15 @@ async function verifyWithZkVerify(proof: babyzkTypes.WholeProof): Promise Date: Sat, 7 Dec 2024 18:26:27 +0100 Subject: [PATCH 5/5] fix links --- README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 860ca0d..4e50b79 100644 --- a/README.md +++ b/README.md @@ -34,8 +34,8 @@ The process is divided in three steps: We implemented the last step in two ways: -- Registering the verification key of the issuer onchain and then submitting the proof to zkVerify, txHash: [0x11c2ddf64b5ddfcb1b1404d655ac41f23190f579f4bf2d79d612375df7a1fbf6](https://zkverify-explorer.zeeve.net/extrinsics/0x11c2ddf64b5ddfcb1b1404d655ac41f23190f579f4bf2d79d612375df7a1fbf6?tab=events&page=1) -- Submitting the proof directly to zkVerify with the verification key, txHash: [0x7d7a24d8c0c47fcc03f24ec54fa4575f6806bc7f9ef202eff7172496a14c27a2](https://zkverify-explorer.zeeve.net/extrinsics/0x7d7a24d8c0c47fcc03f24ec54fa4575f6806bc7f9ef202eff7172496a14c27a2?tab=events&page=1) +- Registering the verification key of the issuer onchain and then submitting the proof to zkVerify, txHash: [0x11c2ddf64b5ddfcb1b1404d655ac41f23190f579f4bf2d79d612375df7a1fbf6](https://zkverify-explorer.zeeve.net/extrinsics/0x11c2ddf64b5ddfcb1b1404d655ac41f23190f579f4bf2d79d612375df7a1fbf6) +- Submitting the proof directly to zkVerify with the verification key, txHash: [0x7d7a24d8c0c47fcc03f24ec54fa4575f6806bc7f9ef202eff7172496a14c27a2](https://zkverify-explorer.zeeve.net/extrinsics/0x7d7a24d8c0c47fcc03f24ec54fa4575f6806bc7f9ef202eff7172496a14c27a2) ## How to run it