diff --git a/examples/keystore-management/README.md b/examples/keystore-management/README.md index b00f545..3ae0213 100644 --- a/examples/keystore-management/README.md +++ b/examples/keystore-management/README.md @@ -4,14 +4,15 @@ A simple Next.js application to manage Waku RLN keystores. ## Overview -This application provides an interface for managing keystores for Waku's rate-limiting nullifier (RLN) functionality. It integrates with MetaMask for wallet connectivity and demonstrates how to work with the Waku RLN library. +This application provides an interface for managing keystores for Waku's rate-limiting nullifier (RLN) functionality. It integrates with MetaMask for wallet connectivity. ## Features - Connect to MetaMask wallet - View wallet information including address, network, and balance -- Support for Sepolia testnet +- Support for Linea Sepolia testnet only - Keystore management functionality +- Token approval for RLN membership registration ## Getting Started @@ -19,27 +20,36 @@ This application provides an interface for managing keystores for Waku's rate-li ```bash npm install -# or -yarn ``` 2. Run the development server: ```bash npm run dev -# or -yarn dev ``` 3. Open [http://localhost:3000](http://localhost:3000) with your browser. -4. Connect your MetaMask wallet (Sepolia testnet is supported). +4. Connect your MetaMask wallet (Linea Sepolia testnet is required). -## Technologies +## Linea Sepolia Network + +This application is configured to use ONLY the Linea Sepolia testnet. If you don't have Linea Sepolia configured in your MetaMask, the application will help you add it with the following details: + +- **Network Name**: Linea Sepolia Testnet +- **RPC URL**: https://rpc.sepolia.linea.build +- **Chain ID**: 59141 +- **Currency Symbol**: ETH +- **Block Explorer URL**: https://sepolia.lineascan.build + +You can get Linea Sepolia testnet ETH from the [Linea Faucet](https://faucet.goerli.linea.build/). + +## RLN Membership Registration + +When registering for RLN membership, you'll need to complete two transactions: + +1. **Token Approval**: First, you'll need to approve the RLN contract to spend tokens on your behalf. This is a one-time approval. +2. **Membership Registration**: After approval, the actual membership registration transaction will be submitted. + +If you encounter an "ERC20: insufficient allowance" error, it means the token approval transaction was not completed successfully. Please try again and make sure to approve the token spending in your wallet. -- Next.js -- React -- TypeScript -- TailwindCSS -- Waku RLN library -- Ethers.js diff --git a/examples/keystore-management/package-lock.json b/examples/keystore-management/package-lock.json index 2951761..f946d8b 100644 --- a/examples/keystore-management/package-lock.json +++ b/examples/keystore-management/package-lock.json @@ -1,14 +1,14 @@ { - "name": "keystore-management", + "name": "waku-keystore-management", "version": "0.1.0", "lockfileVersion": 3, "requires": true, "packages": { "": { - "name": "keystore-management", + "name": "waku-keystore-management", "version": "0.1.0", "dependencies": { - "@waku/rln": "0.0.2-c41b319.0", + "@waku/rln": "0.0.2-a3e7f15.0", "next": "15.1.7", "react": "^19.0.0", "react-dom": "^19.0.0" @@ -277,9 +277,9 @@ } }, "node_modules/@ethersproject/abi": { - "version": "5.7.0", - "resolved": "https://registry.npmjs.org/@ethersproject/abi/-/abi-5.7.0.tgz", - "integrity": "sha512-351ktp42TiRcYB3H1OP8yajPeAQstMW/yCFokj/AthP9bLHzQFPlOrxOcwYEDkUAICmOHljvN4K39OMTMUa9RA==", + "version": "5.8.0", + "resolved": "https://registry.npmjs.org/@ethersproject/abi/-/abi-5.8.0.tgz", + "integrity": "sha512-b9YS/43ObplgyV6SlyQsG53/vkSal0MNA1fskSC4mbnCMi8R+NkcH8K9FPYNESf6jUefBUniE4SOKms0E/KK1Q==", "funding": [ { "type": "individual", @@ -292,21 +292,21 @@ ], "license": "MIT", "dependencies": { - "@ethersproject/address": "^5.7.0", - "@ethersproject/bignumber": "^5.7.0", - "@ethersproject/bytes": "^5.7.0", - "@ethersproject/constants": "^5.7.0", - "@ethersproject/hash": "^5.7.0", - "@ethersproject/keccak256": "^5.7.0", - "@ethersproject/logger": "^5.7.0", - "@ethersproject/properties": "^5.7.0", - "@ethersproject/strings": "^5.7.0" + "@ethersproject/address": "^5.8.0", + "@ethersproject/bignumber": "^5.8.0", + "@ethersproject/bytes": "^5.8.0", + "@ethersproject/constants": "^5.8.0", + "@ethersproject/hash": "^5.8.0", + "@ethersproject/keccak256": "^5.8.0", + "@ethersproject/logger": "^5.8.0", + "@ethersproject/properties": "^5.8.0", + "@ethersproject/strings": "^5.8.0" } }, "node_modules/@ethersproject/abstract-provider": { - "version": "5.7.0", - "resolved": "https://registry.npmjs.org/@ethersproject/abstract-provider/-/abstract-provider-5.7.0.tgz", - "integrity": "sha512-R41c9UkchKCpAqStMYUpdunjo3pkEvZC3FAwZn5S5MGbXoMQOHIdHItezTETxAO5bevtMApSyEhn9+CHcDsWBw==", + "version": "5.8.0", + "resolved": "https://registry.npmjs.org/@ethersproject/abstract-provider/-/abstract-provider-5.8.0.tgz", + "integrity": "sha512-wC9SFcmh4UK0oKuLJQItoQdzS/qZ51EJegK6EmAWlh+OptpQ/npECOR3QqECd8iGHC0RJb4WKbVdSfif4ammrg==", "funding": [ { "type": "individual", @@ -319,19 +319,19 @@ ], "license": "MIT", "dependencies": { - "@ethersproject/bignumber": "^5.7.0", - "@ethersproject/bytes": "^5.7.0", - "@ethersproject/logger": "^5.7.0", - "@ethersproject/networks": "^5.7.0", - "@ethersproject/properties": "^5.7.0", - "@ethersproject/transactions": "^5.7.0", - "@ethersproject/web": "^5.7.0" + "@ethersproject/bignumber": "^5.8.0", + "@ethersproject/bytes": "^5.8.0", + "@ethersproject/logger": "^5.8.0", + "@ethersproject/networks": "^5.8.0", + "@ethersproject/properties": "^5.8.0", + "@ethersproject/transactions": "^5.8.0", + "@ethersproject/web": "^5.8.0" } }, "node_modules/@ethersproject/abstract-signer": { - "version": "5.7.0", - "resolved": "https://registry.npmjs.org/@ethersproject/abstract-signer/-/abstract-signer-5.7.0.tgz", - "integrity": "sha512-a16V8bq1/Cz+TGCkE2OPMTOUDLS3grCpdjoJCYNnVBbdYEMSgKrU0+B90s8b6H+ByYTBZN7a3g76jdIJi7UfKQ==", + "version": "5.8.0", + "resolved": "https://registry.npmjs.org/@ethersproject/abstract-signer/-/abstract-signer-5.8.0.tgz", + "integrity": "sha512-N0XhZTswXcmIZQdYtUnd79VJzvEwXQw6PK0dTl9VoYrEBxxCPXqS0Eod7q5TNKRxe1/5WUMuR0u0nqTF/avdCA==", "funding": [ { "type": "individual", @@ -344,17 +344,17 @@ ], "license": "MIT", "dependencies": { - "@ethersproject/abstract-provider": "^5.7.0", - "@ethersproject/bignumber": "^5.7.0", - "@ethersproject/bytes": "^5.7.0", - "@ethersproject/logger": "^5.7.0", - "@ethersproject/properties": "^5.7.0" + "@ethersproject/abstract-provider": "^5.8.0", + "@ethersproject/bignumber": "^5.8.0", + "@ethersproject/bytes": "^5.8.0", + "@ethersproject/logger": "^5.8.0", + "@ethersproject/properties": "^5.8.0" } }, "node_modules/@ethersproject/address": { - "version": "5.7.0", - "resolved": "https://registry.npmjs.org/@ethersproject/address/-/address-5.7.0.tgz", - "integrity": "sha512-9wYhYt7aghVGo758POM5nqcOMaE168Q6aRLJZwUmiqSrAungkG74gSSeKEIR7ukixesdRZGPgVqme6vmxs1fkA==", + "version": "5.8.0", + "resolved": "https://registry.npmjs.org/@ethersproject/address/-/address-5.8.0.tgz", + "integrity": "sha512-GhH/abcC46LJwshoN+uBNoKVFPxUuZm6dA257z0vZkKmU1+t8xTn8oK7B9qrj8W2rFRMch4gbJl6PmVxjxBEBA==", "funding": [ { "type": "individual", @@ -367,17 +367,17 @@ ], "license": "MIT", "dependencies": { - "@ethersproject/bignumber": "^5.7.0", - "@ethersproject/bytes": "^5.7.0", - "@ethersproject/keccak256": "^5.7.0", - "@ethersproject/logger": "^5.7.0", - "@ethersproject/rlp": "^5.7.0" + "@ethersproject/bignumber": "^5.8.0", + "@ethersproject/bytes": "^5.8.0", + "@ethersproject/keccak256": "^5.8.0", + "@ethersproject/logger": "^5.8.0", + "@ethersproject/rlp": "^5.8.0" } }, "node_modules/@ethersproject/base64": { - "version": "5.7.0", - "resolved": "https://registry.npmjs.org/@ethersproject/base64/-/base64-5.7.0.tgz", - "integrity": "sha512-Dr8tcHt2mEbsZr/mwTPIQAf3Ai0Bks/7gTw9dSqk1mQvhW3XvRlmDJr/4n+wg1JmCl16NZue17CDh8xb/vZ0sQ==", + "version": "5.8.0", + "resolved": "https://registry.npmjs.org/@ethersproject/base64/-/base64-5.8.0.tgz", + "integrity": "sha512-lN0oIwfkYj9LbPx4xEkie6rAMJtySbpOAFXSDVQaBnAzYfB4X2Qr+FXJGxMoc3Bxp2Sm8OwvzMrywxyw0gLjIQ==", "funding": [ { "type": "individual", @@ -390,13 +390,13 @@ ], "license": "MIT", "dependencies": { - "@ethersproject/bytes": "^5.7.0" + "@ethersproject/bytes": "^5.8.0" } }, "node_modules/@ethersproject/basex": { - "version": "5.7.0", - "resolved": "https://registry.npmjs.org/@ethersproject/basex/-/basex-5.7.0.tgz", - "integrity": "sha512-ywlh43GwZLv2Voc2gQVTKBoVQ1mti3d8HK5aMxsfu/nRDnMmNqaSJ3r3n85HBByT8OpoY96SXM1FogC533T4zw==", + "version": "5.8.0", + "resolved": "https://registry.npmjs.org/@ethersproject/basex/-/basex-5.8.0.tgz", + "integrity": "sha512-PIgTszMlDRmNwW9nhS6iqtVfdTAKosA7llYXNmGPw4YAI1PUyMv28988wAb41/gHF/WqGdoLv0erHaRcHRKW2Q==", "funding": [ { "type": "individual", @@ -409,14 +409,14 @@ ], "license": "MIT", "dependencies": { - "@ethersproject/bytes": "^5.7.0", - "@ethersproject/properties": "^5.7.0" + "@ethersproject/bytes": "^5.8.0", + "@ethersproject/properties": "^5.8.0" } }, "node_modules/@ethersproject/bignumber": { - "version": "5.7.0", - "resolved": "https://registry.npmjs.org/@ethersproject/bignumber/-/bignumber-5.7.0.tgz", - "integrity": "sha512-n1CAdIHRWjSucQO3MC1zPSVgV/6dy/fjL9pMrPP9peL+QxEg9wOsVqwD4+818B6LUEtaXzVHQiuivzRoxPxUGw==", + "version": "5.8.0", + "resolved": "https://registry.npmjs.org/@ethersproject/bignumber/-/bignumber-5.8.0.tgz", + "integrity": "sha512-ZyaT24bHaSeJon2tGPKIiHszWjD/54Sz8t57Toch475lCLljC6MgPmxk7Gtzz+ddNN5LuHea9qhAe0x3D+uYPA==", "funding": [ { "type": "individual", @@ -429,15 +429,15 @@ ], "license": "MIT", "dependencies": { - "@ethersproject/bytes": "^5.7.0", - "@ethersproject/logger": "^5.7.0", + "@ethersproject/bytes": "^5.8.0", + "@ethersproject/logger": "^5.8.0", "bn.js": "^5.2.1" } }, "node_modules/@ethersproject/bytes": { - "version": "5.7.0", - "resolved": "https://registry.npmjs.org/@ethersproject/bytes/-/bytes-5.7.0.tgz", - "integrity": "sha512-nsbxwgFXWh9NyYWo+U8atvmMsSdKJprTcICAkvbBffT75qDocbuggBU0SJiVK2MuTrp0q+xvLkTnGMPK1+uA9A==", + "version": "5.8.0", + "resolved": "https://registry.npmjs.org/@ethersproject/bytes/-/bytes-5.8.0.tgz", + "integrity": "sha512-vTkeohgJVCPVHu5c25XWaWQOZ4v+DkGoC42/TS2ond+PARCxTJvgTFUNDZovyQ/uAQ4EcpqqowKydcdmRKjg7A==", "funding": [ { "type": "individual", @@ -450,13 +450,13 @@ ], "license": "MIT", "dependencies": { - "@ethersproject/logger": "^5.7.0" + "@ethersproject/logger": "^5.8.0" } }, "node_modules/@ethersproject/constants": { - "version": "5.7.0", - "resolved": "https://registry.npmjs.org/@ethersproject/constants/-/constants-5.7.0.tgz", - "integrity": "sha512-DHI+y5dBNvkpYUMiRQyxRBYBefZkJfo70VUkUAsRjcPs47muV9evftfZ0PJVCXYbAiCgght0DtcF9srFQmIgWA==", + "version": "5.8.0", + "resolved": "https://registry.npmjs.org/@ethersproject/constants/-/constants-5.8.0.tgz", + "integrity": "sha512-wigX4lrf5Vu+axVTIvNsuL6YrV4O5AXl5ubcURKMEME5TnWBouUh0CDTWxZ2GpnRn1kcCgE7l8O5+VbV9QTTcg==", "funding": [ { "type": "individual", @@ -469,13 +469,13 @@ ], "license": "MIT", "dependencies": { - "@ethersproject/bignumber": "^5.7.0" + "@ethersproject/bignumber": "^5.8.0" } }, "node_modules/@ethersproject/contracts": { - "version": "5.7.0", - "resolved": "https://registry.npmjs.org/@ethersproject/contracts/-/contracts-5.7.0.tgz", - "integrity": "sha512-5GJbzEU3X+d33CdfPhcyS+z8MzsTrBGk/sc+G+59+tPa9yFkl6HQ9D6L0QMgNTA9q8dT0XKxxkyp883XsQvbbg==", + "version": "5.8.0", + "resolved": "https://registry.npmjs.org/@ethersproject/contracts/-/contracts-5.8.0.tgz", + "integrity": "sha512-0eFjGz9GtuAi6MZwhb4uvUM216F38xiuR0yYCjKJpNfSEy4HUM8hvqqBj9Jmm0IUz8l0xKEhWwLIhPgxNY0yvQ==", "funding": [ { "type": "individual", @@ -488,22 +488,22 @@ ], "license": "MIT", "dependencies": { - "@ethersproject/abi": "^5.7.0", - "@ethersproject/abstract-provider": "^5.7.0", - "@ethersproject/abstract-signer": "^5.7.0", - "@ethersproject/address": "^5.7.0", - "@ethersproject/bignumber": "^5.7.0", - "@ethersproject/bytes": "^5.7.0", - "@ethersproject/constants": "^5.7.0", - "@ethersproject/logger": "^5.7.0", - "@ethersproject/properties": "^5.7.0", - "@ethersproject/transactions": "^5.7.0" + "@ethersproject/abi": "^5.8.0", + "@ethersproject/abstract-provider": "^5.8.0", + "@ethersproject/abstract-signer": "^5.8.0", + "@ethersproject/address": "^5.8.0", + "@ethersproject/bignumber": "^5.8.0", + "@ethersproject/bytes": "^5.8.0", + "@ethersproject/constants": "^5.8.0", + "@ethersproject/logger": "^5.8.0", + "@ethersproject/properties": "^5.8.0", + "@ethersproject/transactions": "^5.8.0" } }, "node_modules/@ethersproject/hash": { - "version": "5.7.0", - "resolved": "https://registry.npmjs.org/@ethersproject/hash/-/hash-5.7.0.tgz", - "integrity": "sha512-qX5WrQfnah1EFnO5zJv1v46a8HW0+E5xuBBDTwMFZLuVTx0tbU2kkx15NqdjxecrLGatQN9FGQKpb1FKdHCt+g==", + "version": "5.8.0", + "resolved": "https://registry.npmjs.org/@ethersproject/hash/-/hash-5.8.0.tgz", + "integrity": "sha512-ac/lBcTbEWW/VGJij0CNSw/wPcw9bSRgCB0AIBz8CvED/jfvDoV9hsIIiWfvWmFEi8RcXtlNwp2jv6ozWOsooA==", "funding": [ { "type": "individual", @@ -516,21 +516,21 @@ ], "license": "MIT", "dependencies": { - "@ethersproject/abstract-signer": "^5.7.0", - "@ethersproject/address": "^5.7.0", - "@ethersproject/base64": "^5.7.0", - "@ethersproject/bignumber": "^5.7.0", - "@ethersproject/bytes": "^5.7.0", - "@ethersproject/keccak256": "^5.7.0", - "@ethersproject/logger": "^5.7.0", - "@ethersproject/properties": "^5.7.0", - "@ethersproject/strings": "^5.7.0" + "@ethersproject/abstract-signer": "^5.8.0", + "@ethersproject/address": "^5.8.0", + "@ethersproject/base64": "^5.8.0", + "@ethersproject/bignumber": "^5.8.0", + "@ethersproject/bytes": "^5.8.0", + "@ethersproject/keccak256": "^5.8.0", + "@ethersproject/logger": "^5.8.0", + "@ethersproject/properties": "^5.8.0", + "@ethersproject/strings": "^5.8.0" } }, "node_modules/@ethersproject/hdnode": { - "version": "5.7.0", - "resolved": "https://registry.npmjs.org/@ethersproject/hdnode/-/hdnode-5.7.0.tgz", - "integrity": "sha512-OmyYo9EENBPPf4ERhR7oj6uAtUAhYGqOnIS+jE5pTXvdKBS99ikzq1E7Iv0ZQZ5V36Lqx1qZLeak0Ra16qpeOg==", + "version": "5.8.0", + "resolved": "https://registry.npmjs.org/@ethersproject/hdnode/-/hdnode-5.8.0.tgz", + "integrity": "sha512-4bK1VF6E83/3/Im0ERnnUeWOY3P1BZml4ZD3wcH8Ys0/d1h1xaFt6Zc+Dh9zXf9TapGro0T4wvO71UTCp3/uoA==", "funding": [ { "type": "individual", @@ -543,24 +543,24 @@ ], "license": "MIT", "dependencies": { - "@ethersproject/abstract-signer": "^5.7.0", - "@ethersproject/basex": "^5.7.0", - "@ethersproject/bignumber": "^5.7.0", - "@ethersproject/bytes": "^5.7.0", - "@ethersproject/logger": "^5.7.0", - "@ethersproject/pbkdf2": "^5.7.0", - "@ethersproject/properties": "^5.7.0", - "@ethersproject/sha2": "^5.7.0", - "@ethersproject/signing-key": "^5.7.0", - "@ethersproject/strings": "^5.7.0", - "@ethersproject/transactions": "^5.7.0", - "@ethersproject/wordlists": "^5.7.0" + "@ethersproject/abstract-signer": "^5.8.0", + "@ethersproject/basex": "^5.8.0", + "@ethersproject/bignumber": "^5.8.0", + "@ethersproject/bytes": "^5.8.0", + "@ethersproject/logger": "^5.8.0", + "@ethersproject/pbkdf2": "^5.8.0", + "@ethersproject/properties": "^5.8.0", + "@ethersproject/sha2": "^5.8.0", + "@ethersproject/signing-key": "^5.8.0", + "@ethersproject/strings": "^5.8.0", + "@ethersproject/transactions": "^5.8.0", + "@ethersproject/wordlists": "^5.8.0" } }, "node_modules/@ethersproject/json-wallets": { - "version": "5.7.0", - "resolved": "https://registry.npmjs.org/@ethersproject/json-wallets/-/json-wallets-5.7.0.tgz", - "integrity": "sha512-8oee5Xgu6+RKgJTkvEMl2wDgSPSAQ9MB/3JYjFV9jlKvcYHUXZC+cQp0njgmxdHkYWn8s6/IqIZYm0YWCjO/0g==", + "version": "5.8.0", + "resolved": "https://registry.npmjs.org/@ethersproject/json-wallets/-/json-wallets-5.8.0.tgz", + "integrity": "sha512-HxblNck8FVUtNxS3VTEYJAcwiKYsBIF77W15HufqlBF9gGfhmYOJtYZp8fSDZtn9y5EaXTE87zDwzxRoTFk11w==", "funding": [ { "type": "individual", @@ -573,25 +573,25 @@ ], "license": "MIT", "dependencies": { - "@ethersproject/abstract-signer": "^5.7.0", - "@ethersproject/address": "^5.7.0", - "@ethersproject/bytes": "^5.7.0", - "@ethersproject/hdnode": "^5.7.0", - "@ethersproject/keccak256": "^5.7.0", - "@ethersproject/logger": "^5.7.0", - "@ethersproject/pbkdf2": "^5.7.0", - "@ethersproject/properties": "^5.7.0", - "@ethersproject/random": "^5.7.0", - "@ethersproject/strings": "^5.7.0", - "@ethersproject/transactions": "^5.7.0", + "@ethersproject/abstract-signer": "^5.8.0", + "@ethersproject/address": "^5.8.0", + "@ethersproject/bytes": "^5.8.0", + "@ethersproject/hdnode": "^5.8.0", + "@ethersproject/keccak256": "^5.8.0", + "@ethersproject/logger": "^5.8.0", + "@ethersproject/pbkdf2": "^5.8.0", + "@ethersproject/properties": "^5.8.0", + "@ethersproject/random": "^5.8.0", + "@ethersproject/strings": "^5.8.0", + "@ethersproject/transactions": "^5.8.0", "aes-js": "3.0.0", "scrypt-js": "3.0.1" } }, "node_modules/@ethersproject/keccak256": { - "version": "5.7.0", - "resolved": "https://registry.npmjs.org/@ethersproject/keccak256/-/keccak256-5.7.0.tgz", - "integrity": "sha512-2UcPboeL/iW+pSg6vZ6ydF8tCnv3Iu/8tUmLLzWWGzxWKFFqOBQFLo6uLUv6BDrLgCDfN28RJ/wtByx+jZ4KBg==", + "version": "5.8.0", + "resolved": "https://registry.npmjs.org/@ethersproject/keccak256/-/keccak256-5.8.0.tgz", + "integrity": "sha512-A1pkKLZSz8pDaQ1ftutZoaN46I6+jvuqugx5KYNeQOPqq+JZ0Txm7dlWesCHB5cndJSu5vP2VKptKf7cksERng==", "funding": [ { "type": "individual", @@ -604,7 +604,7 @@ ], "license": "MIT", "dependencies": { - "@ethersproject/bytes": "^5.7.0", + "@ethersproject/bytes": "^5.8.0", "js-sha3": "0.8.0" } }, @@ -615,9 +615,9 @@ "license": "MIT" }, "node_modules/@ethersproject/logger": { - "version": "5.7.0", - "resolved": "https://registry.npmjs.org/@ethersproject/logger/-/logger-5.7.0.tgz", - "integrity": "sha512-0odtFdXu/XHtjQXJYA3u9G0G8btm0ND5Cu8M7i5vhEcE8/HmF4Lbdqanwyv4uQTr2tx6b7fQRmgLrsnpQlmnig==", + "version": "5.8.0", + "resolved": "https://registry.npmjs.org/@ethersproject/logger/-/logger-5.8.0.tgz", + "integrity": "sha512-Qe6knGmY+zPPWTC+wQrpitodgBfH7XoceCGL5bJVejmH+yCS3R8jJm8iiWuvWbG76RUmyEG53oqv6GMVWqunjA==", "funding": [ { "type": "individual", @@ -631,9 +631,9 @@ "license": "MIT" }, "node_modules/@ethersproject/networks": { - "version": "5.7.1", - "resolved": "https://registry.npmjs.org/@ethersproject/networks/-/networks-5.7.1.tgz", - "integrity": "sha512-n/MufjFYv3yFcUyfhnXotyDlNdFb7onmkSy8aQERi2PjNcnWQ66xXxa3XlS8nCcA8aJKJjIIMNJTC7tu80GwpQ==", + "version": "5.8.0", + "resolved": "https://registry.npmjs.org/@ethersproject/networks/-/networks-5.8.0.tgz", + "integrity": "sha512-egPJh3aPVAzbHwq8DD7Po53J4OUSsA1MjQp8Vf/OZPav5rlmWUaFLiq8cvQiGK0Z5K6LYzm29+VA/p4RL1FzNg==", "funding": [ { "type": "individual", @@ -646,13 +646,13 @@ ], "license": "MIT", "dependencies": { - "@ethersproject/logger": "^5.7.0" + "@ethersproject/logger": "^5.8.0" } }, "node_modules/@ethersproject/pbkdf2": { - "version": "5.7.0", - "resolved": "https://registry.npmjs.org/@ethersproject/pbkdf2/-/pbkdf2-5.7.0.tgz", - "integrity": "sha512-oR/dBRZR6GTyaofd86DehG72hY6NpAjhabkhxgr3X2FpJtJuodEl2auADWBZfhDHgVCbu3/H/Ocq2uC6dpNjjw==", + "version": "5.8.0", + "resolved": "https://registry.npmjs.org/@ethersproject/pbkdf2/-/pbkdf2-5.8.0.tgz", + "integrity": "sha512-wuHiv97BrzCmfEaPbUFpMjlVg/IDkZThp9Ri88BpjRleg4iePJaj2SW8AIyE8cXn5V1tuAaMj6lzvsGJkGWskg==", "funding": [ { "type": "individual", @@ -665,14 +665,14 @@ ], "license": "MIT", "dependencies": { - "@ethersproject/bytes": "^5.7.0", - "@ethersproject/sha2": "^5.7.0" + "@ethersproject/bytes": "^5.8.0", + "@ethersproject/sha2": "^5.8.0" } }, "node_modules/@ethersproject/properties": { - "version": "5.7.0", - "resolved": "https://registry.npmjs.org/@ethersproject/properties/-/properties-5.7.0.tgz", - "integrity": "sha512-J87jy8suntrAkIZtecpxEPxY//szqr1mlBaYlQ0r4RCaiD2hjheqF9s1LVE8vVuJCXisjIP+JgtK/Do54ej4Sw==", + "version": "5.8.0", + "resolved": "https://registry.npmjs.org/@ethersproject/properties/-/properties-5.8.0.tgz", + "integrity": "sha512-PYuiEoQ+FMaZZNGrStmN7+lWjlsoufGIHdww7454FIaGdbe/p5rnaCXTr5MtBYl3NkeoVhHZuyzChPeGeKIpQw==", "funding": [ { "type": "individual", @@ -685,13 +685,13 @@ ], "license": "MIT", "dependencies": { - "@ethersproject/logger": "^5.7.0" + "@ethersproject/logger": "^5.8.0" } }, "node_modules/@ethersproject/providers": { - "version": "5.7.2", - "resolved": "https://registry.npmjs.org/@ethersproject/providers/-/providers-5.7.2.tgz", - "integrity": "sha512-g34EWZ1WWAVgr4aptGlVBF8mhl3VWjv+8hoAnzStu8Ah22VHBsuGzP17eb6xDVRzw895G4W7vvx60lFFur/1Rg==", + "version": "5.8.0", + "resolved": "https://registry.npmjs.org/@ethersproject/providers/-/providers-5.8.0.tgz", + "integrity": "sha512-3Il3oTzEx3o6kzcg9ZzbE+oCZYyY+3Zh83sKkn4s1DZfTUjIegHnN2Cm0kbn9YFy45FDVcuCLLONhU7ny0SsCw==", "funding": [ { "type": "individual", @@ -704,53 +704,32 @@ ], "license": "MIT", "dependencies": { - "@ethersproject/abstract-provider": "^5.7.0", - "@ethersproject/abstract-signer": "^5.7.0", - "@ethersproject/address": "^5.7.0", - "@ethersproject/base64": "^5.7.0", - "@ethersproject/basex": "^5.7.0", - "@ethersproject/bignumber": "^5.7.0", - "@ethersproject/bytes": "^5.7.0", - "@ethersproject/constants": "^5.7.0", - "@ethersproject/hash": "^5.7.0", - "@ethersproject/logger": "^5.7.0", - "@ethersproject/networks": "^5.7.0", - "@ethersproject/properties": "^5.7.0", - "@ethersproject/random": "^5.7.0", - "@ethersproject/rlp": "^5.7.0", - "@ethersproject/sha2": "^5.7.0", - "@ethersproject/strings": "^5.7.0", - "@ethersproject/transactions": "^5.7.0", - "@ethersproject/web": "^5.7.0", + "@ethersproject/abstract-provider": "^5.8.0", + "@ethersproject/abstract-signer": "^5.8.0", + "@ethersproject/address": "^5.8.0", + "@ethersproject/base64": "^5.8.0", + "@ethersproject/basex": "^5.8.0", + "@ethersproject/bignumber": "^5.8.0", + "@ethersproject/bytes": "^5.8.0", + "@ethersproject/constants": "^5.8.0", + "@ethersproject/hash": "^5.8.0", + "@ethersproject/logger": "^5.8.0", + "@ethersproject/networks": "^5.8.0", + "@ethersproject/properties": "^5.8.0", + "@ethersproject/random": "^5.8.0", + "@ethersproject/rlp": "^5.8.0", + "@ethersproject/sha2": "^5.8.0", + "@ethersproject/strings": "^5.8.0", + "@ethersproject/transactions": "^5.8.0", + "@ethersproject/web": "^5.8.0", "bech32": "1.1.4", - "ws": "7.4.6" - } - }, - "node_modules/@ethersproject/providers/node_modules/ws": { - "version": "7.4.6", - "resolved": "https://registry.npmjs.org/ws/-/ws-7.4.6.tgz", - "integrity": "sha512-YmhHDO4MzaDLB+M9ym/mDA5z0naX8j7SIlT8f8z+I0VtzsRbekxEutHSme7NPS2qE8StCYQNUnfWdXta/Yu85A==", - "license": "MIT", - "engines": { - "node": ">=8.3.0" - }, - "peerDependencies": { - "bufferutil": "^4.0.1", - "utf-8-validate": "^5.0.2" - }, - "peerDependenciesMeta": { - "bufferutil": { - "optional": true - }, - "utf-8-validate": { - "optional": true - } + "ws": "8.18.0" } }, "node_modules/@ethersproject/random": { - "version": "5.7.0", - "resolved": "https://registry.npmjs.org/@ethersproject/random/-/random-5.7.0.tgz", - "integrity": "sha512-19WjScqRA8IIeWclFme75VMXSBvi4e6InrUNuaR4s5pTF2qNhcGdCUwdxUVGtDDqC00sDLCO93jPQoDUH4HVmQ==", + "version": "5.8.0", + "resolved": "https://registry.npmjs.org/@ethersproject/random/-/random-5.8.0.tgz", + "integrity": "sha512-E4I5TDl7SVqyg4/kkA/qTfuLWAQGXmSOgYyO01So8hLfwgKvYK5snIlzxJMk72IFdG/7oh8yuSqY2KX7MMwg+A==", "funding": [ { "type": "individual", @@ -763,14 +742,14 @@ ], "license": "MIT", "dependencies": { - "@ethersproject/bytes": "^5.7.0", - "@ethersproject/logger": "^5.7.0" + "@ethersproject/bytes": "^5.8.0", + "@ethersproject/logger": "^5.8.0" } }, "node_modules/@ethersproject/rlp": { - "version": "5.7.0", - "resolved": "https://registry.npmjs.org/@ethersproject/rlp/-/rlp-5.7.0.tgz", - "integrity": "sha512-rBxzX2vK8mVF7b0Tol44t5Tb8gomOHkj5guL+HhzQ1yBh/ydjGnpw6at+X6Iw0Kp3OzzzkcKp8N9r0W4kYSs9w==", + "version": "5.8.0", + "resolved": "https://registry.npmjs.org/@ethersproject/rlp/-/rlp-5.8.0.tgz", + "integrity": "sha512-LqZgAznqDbiEunaUvykH2JAoXTT9NV0Atqk8rQN9nx9SEgThA/WMx5DnW8a9FOufo//6FZOCHZ+XiClzgbqV9Q==", "funding": [ { "type": "individual", @@ -783,14 +762,14 @@ ], "license": "MIT", "dependencies": { - "@ethersproject/bytes": "^5.7.0", - "@ethersproject/logger": "^5.7.0" + "@ethersproject/bytes": "^5.8.0", + "@ethersproject/logger": "^5.8.0" } }, "node_modules/@ethersproject/sha2": { - "version": "5.7.0", - "resolved": "https://registry.npmjs.org/@ethersproject/sha2/-/sha2-5.7.0.tgz", - "integrity": "sha512-gKlH42riwb3KYp0reLsFTokByAKoJdgFCwI+CCiX/k+Jm2mbNs6oOaCjYQSlI1+XBVejwH2KrmCbMAT/GnRDQw==", + "version": "5.8.0", + "resolved": "https://registry.npmjs.org/@ethersproject/sha2/-/sha2-5.8.0.tgz", + "integrity": "sha512-dDOUrXr9wF/YFltgTBYS0tKslPEKr6AekjqDW2dbn1L1xmjGR+9GiKu4ajxovnrDbwxAKdHjW8jNcwfz8PAz4A==", "funding": [ { "type": "individual", @@ -803,15 +782,15 @@ ], "license": "MIT", "dependencies": { - "@ethersproject/bytes": "^5.7.0", - "@ethersproject/logger": "^5.7.0", + "@ethersproject/bytes": "^5.8.0", + "@ethersproject/logger": "^5.8.0", "hash.js": "1.1.7" } }, "node_modules/@ethersproject/signing-key": { - "version": "5.7.0", - "resolved": "https://registry.npmjs.org/@ethersproject/signing-key/-/signing-key-5.7.0.tgz", - "integrity": "sha512-MZdy2nL3wO0u7gkB4nA/pEf8lu1TlFswPNmy8AiYkfKTdO6eXBJyUdmHO/ehm/htHw9K/qF8ujnTyUAD+Ry54Q==", + "version": "5.8.0", + "resolved": "https://registry.npmjs.org/@ethersproject/signing-key/-/signing-key-5.8.0.tgz", + "integrity": "sha512-LrPW2ZxoigFi6U6aVkFN/fa9Yx/+4AtIUe4/HACTvKJdhm0eeb107EVCIQcrLZkxaSIgc/eCrX8Q1GtbH+9n3w==", "funding": [ { "type": "individual", @@ -824,18 +803,18 @@ ], "license": "MIT", "dependencies": { - "@ethersproject/bytes": "^5.7.0", - "@ethersproject/logger": "^5.7.0", - "@ethersproject/properties": "^5.7.0", + "@ethersproject/bytes": "^5.8.0", + "@ethersproject/logger": "^5.8.0", + "@ethersproject/properties": "^5.8.0", "bn.js": "^5.2.1", - "elliptic": "6.5.4", + "elliptic": "6.6.1", "hash.js": "1.1.7" } }, "node_modules/@ethersproject/solidity": { - "version": "5.7.0", - "resolved": "https://registry.npmjs.org/@ethersproject/solidity/-/solidity-5.7.0.tgz", - "integrity": "sha512-HmabMd2Dt/raavyaGukF4XxizWKhKQ24DoLtdNbBmNKUOPqwjsKQSdV9GQtj9CBEea9DlzETlVER1gYeXXBGaA==", + "version": "5.8.0", + "resolved": "https://registry.npmjs.org/@ethersproject/solidity/-/solidity-5.8.0.tgz", + "integrity": "sha512-4CxFeCgmIWamOHwYN9d+QWGxye9qQLilpgTU0XhYs1OahkclF+ewO+3V1U0mvpiuQxm5EHHmv8f7ClVII8EHsA==", "funding": [ { "type": "individual", @@ -848,18 +827,18 @@ ], "license": "MIT", "dependencies": { - "@ethersproject/bignumber": "^5.7.0", - "@ethersproject/bytes": "^5.7.0", - "@ethersproject/keccak256": "^5.7.0", - "@ethersproject/logger": "^5.7.0", - "@ethersproject/sha2": "^5.7.0", - "@ethersproject/strings": "^5.7.0" + "@ethersproject/bignumber": "^5.8.0", + "@ethersproject/bytes": "^5.8.0", + "@ethersproject/keccak256": "^5.8.0", + "@ethersproject/logger": "^5.8.0", + "@ethersproject/sha2": "^5.8.0", + "@ethersproject/strings": "^5.8.0" } }, "node_modules/@ethersproject/strings": { - "version": "5.7.0", - "resolved": "https://registry.npmjs.org/@ethersproject/strings/-/strings-5.7.0.tgz", - "integrity": "sha512-/9nu+lj0YswRNSH0NXYqrh8775XNyEdUQAuf3f+SmOrnVewcJ5SBNAjF7lpgehKi4abvNNXyf+HX86czCdJ8Mg==", + "version": "5.8.0", + "resolved": "https://registry.npmjs.org/@ethersproject/strings/-/strings-5.8.0.tgz", + "integrity": "sha512-qWEAk0MAvl0LszjdfnZ2uC8xbR2wdv4cDabyHiBh3Cldq/T8dPH3V4BbBsAYJUeonwD+8afVXld274Ls+Y1xXg==", "funding": [ { "type": "individual", @@ -872,15 +851,15 @@ ], "license": "MIT", "dependencies": { - "@ethersproject/bytes": "^5.7.0", - "@ethersproject/constants": "^5.7.0", - "@ethersproject/logger": "^5.7.0" + "@ethersproject/bytes": "^5.8.0", + "@ethersproject/constants": "^5.8.0", + "@ethersproject/logger": "^5.8.0" } }, "node_modules/@ethersproject/transactions": { - "version": "5.7.0", - "resolved": "https://registry.npmjs.org/@ethersproject/transactions/-/transactions-5.7.0.tgz", - "integrity": "sha512-kmcNicCp1lp8qanMTC3RIikGgoJ80ztTyvtsFvCYpSCfkjhD0jZ2LOrnbcuxuToLIUYYf+4XwD1rP+B/erDIhQ==", + "version": "5.8.0", + "resolved": "https://registry.npmjs.org/@ethersproject/transactions/-/transactions-5.8.0.tgz", + "integrity": "sha512-UglxSDjByHG0TuU17bDfCemZ3AnKO2vYrL5/2n2oXvKzvb7Cz+W9gOWXKARjp2URVwcWlQlPOEQyAviKwT4AHg==", "funding": [ { "type": "individual", @@ -893,21 +872,21 @@ ], "license": "MIT", "dependencies": { - "@ethersproject/address": "^5.7.0", - "@ethersproject/bignumber": "^5.7.0", - "@ethersproject/bytes": "^5.7.0", - "@ethersproject/constants": "^5.7.0", - "@ethersproject/keccak256": "^5.7.0", - "@ethersproject/logger": "^5.7.0", - "@ethersproject/properties": "^5.7.0", - "@ethersproject/rlp": "^5.7.0", - "@ethersproject/signing-key": "^5.7.0" + "@ethersproject/address": "^5.8.0", + "@ethersproject/bignumber": "^5.8.0", + "@ethersproject/bytes": "^5.8.0", + "@ethersproject/constants": "^5.8.0", + "@ethersproject/keccak256": "^5.8.0", + "@ethersproject/logger": "^5.8.0", + "@ethersproject/properties": "^5.8.0", + "@ethersproject/rlp": "^5.8.0", + "@ethersproject/signing-key": "^5.8.0" } }, "node_modules/@ethersproject/units": { - "version": "5.7.0", - "resolved": "https://registry.npmjs.org/@ethersproject/units/-/units-5.7.0.tgz", - "integrity": "sha512-pD3xLMy3SJu9kG5xDGI7+xhTEmGXlEqXU4OfNapmfnxLVY4EMSSRp7j1k7eezutBPH7RBN/7QPnwR7hzNlEFeg==", + "version": "5.8.0", + "resolved": "https://registry.npmjs.org/@ethersproject/units/-/units-5.8.0.tgz", + "integrity": "sha512-lxq0CAnc5kMGIiWW4Mr041VT8IhNM+Pn5T3haO74XZWFulk7wH1Gv64HqE96hT4a7iiNMdOCFEBgaxWuk8ETKQ==", "funding": [ { "type": "individual", @@ -920,15 +899,15 @@ ], "license": "MIT", "dependencies": { - "@ethersproject/bignumber": "^5.7.0", - "@ethersproject/constants": "^5.7.0", - "@ethersproject/logger": "^5.7.0" + "@ethersproject/bignumber": "^5.8.0", + "@ethersproject/constants": "^5.8.0", + "@ethersproject/logger": "^5.8.0" } }, "node_modules/@ethersproject/wallet": { - "version": "5.7.0", - "resolved": "https://registry.npmjs.org/@ethersproject/wallet/-/wallet-5.7.0.tgz", - "integrity": "sha512-MhmXlJXEJFBFVKrDLB4ZdDzxcBxQ3rLyCkhNqVu3CDYvR97E+8r01UgrI+TI99Le+aYm/in/0vp86guJuM7FCA==", + "version": "5.8.0", + "resolved": "https://registry.npmjs.org/@ethersproject/wallet/-/wallet-5.8.0.tgz", + "integrity": "sha512-G+jnzmgg6UxurVKRKvw27h0kvG75YKXZKdlLYmAHeF32TGUzHkOFd7Zn6QHOTYRFWnfjtSSFjBowKo7vfrXzPA==", "funding": [ { "type": "individual", @@ -941,27 +920,27 @@ ], "license": "MIT", "dependencies": { - "@ethersproject/abstract-provider": "^5.7.0", - "@ethersproject/abstract-signer": "^5.7.0", - "@ethersproject/address": "^5.7.0", - "@ethersproject/bignumber": "^5.7.0", - "@ethersproject/bytes": "^5.7.0", - "@ethersproject/hash": "^5.7.0", - "@ethersproject/hdnode": "^5.7.0", - "@ethersproject/json-wallets": "^5.7.0", - "@ethersproject/keccak256": "^5.7.0", - "@ethersproject/logger": "^5.7.0", - "@ethersproject/properties": "^5.7.0", - "@ethersproject/random": "^5.7.0", - "@ethersproject/signing-key": "^5.7.0", - "@ethersproject/transactions": "^5.7.0", - "@ethersproject/wordlists": "^5.7.0" + "@ethersproject/abstract-provider": "^5.8.0", + "@ethersproject/abstract-signer": "^5.8.0", + "@ethersproject/address": "^5.8.0", + "@ethersproject/bignumber": "^5.8.0", + "@ethersproject/bytes": "^5.8.0", + "@ethersproject/hash": "^5.8.0", + "@ethersproject/hdnode": "^5.8.0", + "@ethersproject/json-wallets": "^5.8.0", + "@ethersproject/keccak256": "^5.8.0", + "@ethersproject/logger": "^5.8.0", + "@ethersproject/properties": "^5.8.0", + "@ethersproject/random": "^5.8.0", + "@ethersproject/signing-key": "^5.8.0", + "@ethersproject/transactions": "^5.8.0", + "@ethersproject/wordlists": "^5.8.0" } }, "node_modules/@ethersproject/web": { - "version": "5.7.1", - "resolved": "https://registry.npmjs.org/@ethersproject/web/-/web-5.7.1.tgz", - "integrity": "sha512-Gueu8lSvyjBWL4cYsWsjh6MtMwM0+H4HvqFPZfB6dV8ctbP9zFAO73VG1cMWae0FLPCtz0peKPpZY8/ugJJX2w==", + "version": "5.8.0", + "resolved": "https://registry.npmjs.org/@ethersproject/web/-/web-5.8.0.tgz", + "integrity": "sha512-j7+Ksi/9KfGviws6Qtf9Q7KCqRhpwrYKQPs+JBA/rKVFF/yaWLHJEH3zfVP2plVu+eys0d2DlFmhoQJayFewcw==", "funding": [ { "type": "individual", @@ -974,17 +953,17 @@ ], "license": "MIT", "dependencies": { - "@ethersproject/base64": "^5.7.0", - "@ethersproject/bytes": "^5.7.0", - "@ethersproject/logger": "^5.7.0", - "@ethersproject/properties": "^5.7.0", - "@ethersproject/strings": "^5.7.0" + "@ethersproject/base64": "^5.8.0", + "@ethersproject/bytes": "^5.8.0", + "@ethersproject/logger": "^5.8.0", + "@ethersproject/properties": "^5.8.0", + "@ethersproject/strings": "^5.8.0" } }, "node_modules/@ethersproject/wordlists": { - "version": "5.7.0", - "resolved": "https://registry.npmjs.org/@ethersproject/wordlists/-/wordlists-5.7.0.tgz", - "integrity": "sha512-S2TFNJNfHWVHNE6cNDjbVlZ6MgE17MIxMbMg2zv3wn+3XSJGosL1m9ZVv3GXCf/2ymSsQ+hRI5IzoMJTG6aoVA==", + "version": "5.8.0", + "resolved": "https://registry.npmjs.org/@ethersproject/wordlists/-/wordlists-5.8.0.tgz", + "integrity": "sha512-2df9bbXicZws2Sb5S6ET493uJ0Z84Fjr3pC4tu/qlnZERibZCeUVuqdtt+7Tv9xxhUxHoIekIA7avrKUWHrezg==", "funding": [ { "type": "individual", @@ -997,11 +976,11 @@ ], "license": "MIT", "dependencies": { - "@ethersproject/bytes": "^5.7.0", - "@ethersproject/hash": "^5.7.0", - "@ethersproject/logger": "^5.7.0", - "@ethersproject/properties": "^5.7.0", - "@ethersproject/strings": "^5.7.0" + "@ethersproject/bytes": "^5.8.0", + "@ethersproject/hash": "^5.8.0", + "@ethersproject/logger": "^5.8.0", + "@ethersproject/properties": "^5.8.0", + "@ethersproject/strings": "^5.8.0" } }, "node_modules/@humanfs/core": { @@ -1070,15 +1049,6 @@ "url": "https://github.com/sponsors/nzakas" } }, - "node_modules/@iden3/js-crypto": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/@iden3/js-crypto/-/js-crypto-1.3.0.tgz", - "integrity": "sha512-kU0Omlm6P0O0MXGYE2ejTP+bgMMNzam7OfJbGbyu0NgfPag+6LThISmm8JYSc7VsoXtEVgC4s3zxg3hOenX0tA==", - "license": "AGPL-3.0", - "dependencies": { - "@noble/hashes": "^1.7.1" - } - }, "node_modules/@img/sharp-darwin-arm64": { "version": "0.33.5", "resolved": "https://registry.npmjs.org/@img/sharp-darwin-arm64/-/sharp-darwin-arm64-0.33.5.tgz", @@ -1518,15 +1488,14 @@ "license": "MIT" }, "node_modules/@libp2p/crypto": { - "version": "5.0.13", - "resolved": "https://registry.npmjs.org/@libp2p/crypto/-/crypto-5.0.13.tgz", - "integrity": "sha512-OM6uYNA32K/iZPyz3X+4I811FyA7//b8x+H6kwu5bra9qzKOAuUoTKZpOhjL6OKrzeuJ7ULUR4q7UuVItEA1yQ==", + "version": "5.0.15", + "resolved": "https://registry.npmjs.org/@libp2p/crypto/-/crypto-5.0.15.tgz", + "integrity": "sha512-28xYMOn3fs8flsNgCVVxp27gEmDTtZHbz+qEVv3v7cWfGRipaVhNXFV9tQJHWXHQ8mN8v/PQvgcfCcWu5jkrTg==", "license": "Apache-2.0 OR MIT", "dependencies": { - "@libp2p/interface": "^2.6.1", + "@libp2p/interface": "^2.7.0", "@noble/curves": "^1.7.0", "@noble/hashes": "^1.6.1", - "asn1js": "^3.0.5", "multiformats": "^13.3.1", "protons-runtime": "^5.5.0", "uint8arraylist": "^2.4.8", @@ -1534,9 +1503,9 @@ } }, "node_modules/@libp2p/interface": { - "version": "2.6.1", - "resolved": "https://registry.npmjs.org/@libp2p/interface/-/interface-2.6.1.tgz", - "integrity": "sha512-iCH686hAGu1p8nSCCTTDz5jyJ89D9HvhpnmVehknVjNLO63TPAntsaDzEs6wi2nsUJ3xThsXEbani6Ij5dL8Vg==", + "version": "2.7.0", + "resolved": "https://registry.npmjs.org/@libp2p/interface/-/interface-2.7.0.tgz", + "integrity": "sha512-lWmfIGzbSaw//yoEWWJh8dXNDGSCwUyXwC7P1Q6jCFWNoEtCaB1pvwOGBtri7Db/aNFZryMzN5covoq5ulldnA==", "license": "Apache-2.0 OR MIT", "dependencies": { "@multiformats/multiaddr": "^12.3.3", @@ -1548,24 +1517,24 @@ } }, "node_modules/@libp2p/interface-internal": { - "version": "2.3.5", - "resolved": "https://registry.npmjs.org/@libp2p/interface-internal/-/interface-internal-2.3.5.tgz", - "integrity": "sha512-uwKggyLi7UJI7YKGCxJ6R9u9yvtvDMKVI9ki0BG+kADV0TwR7P8gbmEJ8/iilxD//z3aDXT/R59jvDFI7ruOUA==", + "version": "2.3.7", + "resolved": "https://registry.npmjs.org/@libp2p/interface-internal/-/interface-internal-2.3.7.tgz", + "integrity": "sha512-u0I4zqUJhhPbL2ReX88068Sudv2uA/Z1sn6EeD8mr5kkGActTrzxoTjjxscmiQgQybOVyvJbkTiJciorT0ZyPw==", "license": "Apache-2.0 OR MIT", "dependencies": { - "@libp2p/interface": "^2.6.1", - "@libp2p/peer-collections": "^6.0.21", + "@libp2p/interface": "^2.7.0", + "@libp2p/peer-collections": "^6.0.23", "@multiformats/multiaddr": "^12.3.3", "progress-events": "^1.0.1" } }, "node_modules/@libp2p/logger": { - "version": "5.1.10", - "resolved": "https://registry.npmjs.org/@libp2p/logger/-/logger-5.1.10.tgz", - "integrity": "sha512-1Wh0nmW5edgyWyD/Wwt0YidzhZ/r9xA30m39kwo+9rsoWjOSThlhwr6jckuIPlPOCEPXevZDH0FNC/2mH5I1Ng==", + "version": "5.1.12", + "resolved": "https://registry.npmjs.org/@libp2p/logger/-/logger-5.1.12.tgz", + "integrity": "sha512-9K18gnPXxPkgPTQKHgCYaUimlbYheAEogDXvYme1TsPEBPH9oYTVsFpZhe5r92auE3aNuzUSR3VD0TCs/bAZ7g==", "license": "Apache-2.0 OR MIT", "dependencies": { - "@libp2p/interface": "^2.6.1", + "@libp2p/interface": "^2.7.0", "@multiformats/multiaddr": "^12.3.3", "interface-datastore": "^8.3.1", "multiformats": "^13.3.1", @@ -1573,25 +1542,25 @@ } }, "node_modules/@libp2p/peer-collections": { - "version": "6.0.21", - "resolved": "https://registry.npmjs.org/@libp2p/peer-collections/-/peer-collections-6.0.21.tgz", - "integrity": "sha512-WrZCsUw3gmYWg97S++ON84mH1JwxmAUU8IWkW6OwnqF/jkCr3Cs7tS80o36+iBhd3U2nLv2jxADFccPMUm4mCg==", + "version": "6.0.23", + "resolved": "https://registry.npmjs.org/@libp2p/peer-collections/-/peer-collections-6.0.23.tgz", + "integrity": "sha512-eJYmiq2KeUpm5727bl2ngSOnxPnc/VzKnHL2s30x9DfGxl2KpsFBuqAhnjpe5eCshHfQhXsIdbH+5IkY9jobrQ==", "license": "Apache-2.0 OR MIT", "dependencies": { - "@libp2p/interface": "^2.6.1", - "@libp2p/peer-id": "^5.0.14", - "@libp2p/utils": "^6.5.5", + "@libp2p/interface": "^2.7.0", + "@libp2p/peer-id": "^5.0.16", + "@libp2p/utils": "^6.5.7", "multiformats": "^13.3.1" } }, "node_modules/@libp2p/peer-id": { - "version": "5.0.14", - "resolved": "https://registry.npmjs.org/@libp2p/peer-id/-/peer-id-5.0.14.tgz", - "integrity": "sha512-tDghtkrhk4MTjaNUGhsGPb+o0BKuYB1Pdcd31jBuymPTCQNx/DHklRjOG6F1Zcllti9a/bUoxVCUITP9gAEiow==", + "version": "5.0.16", + "resolved": "https://registry.npmjs.org/@libp2p/peer-id/-/peer-id-5.0.16.tgz", + "integrity": "sha512-gRVTWk8LvkSBStvqxc4A1JycEo4H+rJwwefdBmLR+d3fHiUf/2Y6t5elQJzouxykwurAglr8DnUhwCB/pQ9eQQ==", "license": "Apache-2.0 OR MIT", "dependencies": { - "@libp2p/crypto": "^5.0.13", - "@libp2p/interface": "^2.6.1", + "@libp2p/crypto": "^5.0.15", + "@libp2p/interface": "^2.7.0", "multiformats": "^13.3.1", "uint8arrays": "^5.1.0" } @@ -1612,16 +1581,16 @@ } }, "node_modules/@libp2p/utils": { - "version": "6.5.5", - "resolved": "https://registry.npmjs.org/@libp2p/utils/-/utils-6.5.5.tgz", - "integrity": "sha512-WidS5xlEhdWExeXI9ryUF2Xl2qzgdcHSMe44V+qt502ik0ehH2NIaZBZAmlz9ugNGW9D5me4mEm8mi12WxBjPw==", + "version": "6.5.7", + "resolved": "https://registry.npmjs.org/@libp2p/utils/-/utils-6.5.7.tgz", + "integrity": "sha512-fu6oRgSCOYlbuQObuF/ZVynMc7vdAfekxfi7B7TW6KjZEWmzeErvX1iEk9pfyJo5D0IxBCIMPRkN+Rr5MDfNWg==", "license": "Apache-2.0 OR MIT", "dependencies": { "@chainsafe/is-ip": "^2.0.2", "@chainsafe/netmask": "^2.0.0", - "@libp2p/crypto": "^5.0.13", - "@libp2p/interface": "^2.6.1", - "@libp2p/logger": "^5.1.10", + "@libp2p/crypto": "^5.0.15", + "@libp2p/interface": "^2.7.0", + "@libp2p/logger": "^5.1.12", "@multiformats/multiaddr": "^12.3.3", "@sindresorhus/fnv1a": "^3.1.0", "any-signal": "^4.1.1", @@ -1985,37 +1954,6 @@ "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/@stablelib/binary": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/@stablelib/binary/-/binary-2.0.1.tgz", - "integrity": "sha512-U9iAO8lXgEDONsA0zPPSgcf3HUBNAqHiJmSHgZz62OvC3Hi2Bhc5kTnQ3S1/L+sthDTHtCMhcEiklmIly6uQ3w==", - "license": "MIT", - "dependencies": { - "@stablelib/int": "^2.0.1" - } - }, - "node_modules/@stablelib/chacha": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/@stablelib/chacha/-/chacha-2.0.1.tgz", - "integrity": "sha512-lS1FqtNqofxe2vLkRsLli2m3x/XanUyAYRphLhdHumKeIsLbjbCXdCq3Pf/eWiO7G3QlSG5ViqnoVjktzfLWMg==", - "license": "MIT", - "dependencies": { - "@stablelib/binary": "^2.0.1", - "@stablelib/wipe": "^2.0.1" - } - }, - "node_modules/@stablelib/int": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/@stablelib/int/-/int-2.0.1.tgz", - "integrity": "sha512-Ht63fQp3wz/F8U4AlXEPb7hfJOIILs8Lq55jgtD7KueWtyjhVuzcsGLSTAWtZs3XJDZYdF1WcSKn+kBtbzupww==", - "license": "MIT" - }, - "node_modules/@stablelib/wipe": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/@stablelib/wipe/-/wipe-2.0.1.tgz", - "integrity": "sha512-1eU2K9EgOcV4qc9jcP6G72xxZxEm5PfeI5H55l08W95b4oRJaqhmlWRc4xZAm6IVSKhVNxMi66V67hCzzuMTAg==", - "license": "MIT" - }, "node_modules/@swc/counter": { "version": "0.1.3", "resolved": "https://registry.npmjs.org/@swc/counter/-/counter-0.1.3.tgz", @@ -2062,9 +2000,9 @@ "license": "MIT" }, "node_modules/@types/node": { - "version": "20.17.19", - "resolved": "https://registry.npmjs.org/@types/node/-/node-20.17.19.tgz", - "integrity": "sha512-LEwC7o1ifqg/6r2gn9Dns0f1rhK+fPFDoMiceTJ6kWmVk6bgXBI/9IOWfVan4WiAavK9pIVWdX0/e3J+eEUh5A==", + "version": "20.17.23", + "resolved": "https://registry.npmjs.org/@types/node/-/node-20.17.23.tgz", + "integrity": "sha512-8PCGZ1ZJbEZuYNTMqywO+Sj4vSKjSjT6Ua+6RFOYlEvIvKQABPtrNkoVSLSKDb4obYcMhspVKmsw8Cm10NFRUg==", "license": "MIT", "dependencies": { "undici-types": "~6.19.2" @@ -2091,17 +2029,17 @@ } }, "node_modules/@typescript-eslint/eslint-plugin": { - "version": "8.25.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-8.25.0.tgz", - "integrity": "sha512-VM7bpzAe7JO/BFf40pIT1lJqS/z1F8OaSsUB3rpFJucQA4cOSuH2RVVVkFULN+En0Djgr29/jb4EQnedUo95KA==", + "version": "8.26.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-8.26.0.tgz", + "integrity": "sha512-cLr1J6pe56zjKYajK6SSSre6nl1Gj6xDp1TY0trpgPzjVbgDwd09v2Ws37LABxzkicmUjhEeg/fAUjPJJB1v5Q==", "dev": true, "license": "MIT", "dependencies": { "@eslint-community/regexpp": "^4.10.0", - "@typescript-eslint/scope-manager": "8.25.0", - "@typescript-eslint/type-utils": "8.25.0", - "@typescript-eslint/utils": "8.25.0", - "@typescript-eslint/visitor-keys": "8.25.0", + "@typescript-eslint/scope-manager": "8.26.0", + "@typescript-eslint/type-utils": "8.26.0", + "@typescript-eslint/utils": "8.26.0", + "@typescript-eslint/visitor-keys": "8.26.0", "graphemer": "^1.4.0", "ignore": "^5.3.1", "natural-compare": "^1.4.0", @@ -2117,20 +2055,20 @@ "peerDependencies": { "@typescript-eslint/parser": "^8.0.0 || ^8.0.0-alpha.0", "eslint": "^8.57.0 || ^9.0.0", - "typescript": ">=4.8.4 <5.8.0" + "typescript": ">=4.8.4 <5.9.0" } }, "node_modules/@typescript-eslint/parser": { - "version": "8.25.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-8.25.0.tgz", - "integrity": "sha512-4gbs64bnbSzu4FpgMiQ1A+D+urxkoJk/kqlDJ2W//5SygaEiAP2B4GoS7TEdxgwol2el03gckFV9lJ4QOMiiHg==", + "version": "8.26.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-8.26.0.tgz", + "integrity": "sha512-mNtXP9LTVBy14ZF3o7JG69gRPBK/2QWtQd0j0oH26HcY/foyJJau6pNUez7QrM5UHnSvwlQcJXKsk0I99B9pOA==", "dev": true, "license": "MIT", "dependencies": { - "@typescript-eslint/scope-manager": "8.25.0", - "@typescript-eslint/types": "8.25.0", - "@typescript-eslint/typescript-estree": "8.25.0", - "@typescript-eslint/visitor-keys": "8.25.0", + "@typescript-eslint/scope-manager": "8.26.0", + "@typescript-eslint/types": "8.26.0", + "@typescript-eslint/typescript-estree": "8.26.0", + "@typescript-eslint/visitor-keys": "8.26.0", "debug": "^4.3.4" }, "engines": { @@ -2142,18 +2080,18 @@ }, "peerDependencies": { "eslint": "^8.57.0 || ^9.0.0", - "typescript": ">=4.8.4 <5.8.0" + "typescript": ">=4.8.4 <5.9.0" } }, "node_modules/@typescript-eslint/scope-manager": { - "version": "8.25.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-8.25.0.tgz", - "integrity": "sha512-6PPeiKIGbgStEyt4NNXa2ru5pMzQ8OYKO1hX1z53HMomrmiSB+R5FmChgQAP1ro8jMtNawz+TRQo/cSXrauTpg==", + "version": "8.26.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-8.26.0.tgz", + "integrity": "sha512-E0ntLvsfPqnPwng8b8y4OGuzh/iIOm2z8U3S9zic2TeMLW61u5IH2Q1wu0oSTkfrSzwbDJIB/Lm8O3//8BWMPA==", "dev": true, "license": "MIT", "dependencies": { - "@typescript-eslint/types": "8.25.0", - "@typescript-eslint/visitor-keys": "8.25.0" + "@typescript-eslint/types": "8.26.0", + "@typescript-eslint/visitor-keys": "8.26.0" }, "engines": { "node": "^18.18.0 || ^20.9.0 || >=21.1.0" @@ -2164,14 +2102,14 @@ } }, "node_modules/@typescript-eslint/type-utils": { - "version": "8.25.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/type-utils/-/type-utils-8.25.0.tgz", - "integrity": "sha512-d77dHgHWnxmXOPJuDWO4FDWADmGQkN5+tt6SFRZz/RtCWl4pHgFl3+WdYCn16+3teG09DY6XtEpf3gGD0a186g==", + "version": "8.26.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/type-utils/-/type-utils-8.26.0.tgz", + "integrity": "sha512-ruk0RNChLKz3zKGn2LwXuVoeBcUMh+jaqzN461uMMdxy5H9epZqIBtYj7UiPXRuOpaALXGbmRuZQhmwHhaS04Q==", "dev": true, "license": "MIT", "dependencies": { - "@typescript-eslint/typescript-estree": "8.25.0", - "@typescript-eslint/utils": "8.25.0", + "@typescript-eslint/typescript-estree": "8.26.0", + "@typescript-eslint/utils": "8.26.0", "debug": "^4.3.4", "ts-api-utils": "^2.0.1" }, @@ -2184,13 +2122,13 @@ }, "peerDependencies": { "eslint": "^8.57.0 || ^9.0.0", - "typescript": ">=4.8.4 <5.8.0" + "typescript": ">=4.8.4 <5.9.0" } }, "node_modules/@typescript-eslint/types": { - "version": "8.25.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-8.25.0.tgz", - "integrity": "sha512-+vUe0Zb4tkNgznQwicsvLUJgZIRs6ITeWSCclX1q85pR1iOiaj+4uZJIUp//Z27QWu5Cseiw3O3AR8hVpax7Aw==", + "version": "8.26.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-8.26.0.tgz", + "integrity": "sha512-89B1eP3tnpr9A8L6PZlSjBvnJhWXtYfZhECqlBl1D9Lme9mHO6iWlsprBtVenQvY1HMhax1mWOjhtL3fh/u+pA==", "dev": true, "license": "MIT", "engines": { @@ -2202,14 +2140,14 @@ } }, "node_modules/@typescript-eslint/typescript-estree": { - "version": "8.25.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-8.25.0.tgz", - "integrity": "sha512-ZPaiAKEZ6Blt/TPAx5Ot0EIB/yGtLI2EsGoY6F7XKklfMxYQyvtL+gT/UCqkMzO0BVFHLDlzvFqQzurYahxv9Q==", + "version": "8.26.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-8.26.0.tgz", + "integrity": "sha512-tiJ1Hvy/V/oMVRTbEOIeemA2XoylimlDQ03CgPPNaHYZbpsc78Hmngnt+WXZfJX1pjQ711V7g0H7cSJThGYfPQ==", "dev": true, "license": "MIT", "dependencies": { - "@typescript-eslint/types": "8.25.0", - "@typescript-eslint/visitor-keys": "8.25.0", + "@typescript-eslint/types": "8.26.0", + "@typescript-eslint/visitor-keys": "8.26.0", "debug": "^4.3.4", "fast-glob": "^3.3.2", "is-glob": "^4.0.3", @@ -2225,7 +2163,7 @@ "url": "https://opencollective.com/typescript-eslint" }, "peerDependencies": { - "typescript": ">=4.8.4 <5.8.0" + "typescript": ">=4.8.4 <5.9.0" } }, "node_modules/@typescript-eslint/typescript-estree/node_modules/brace-expansion": { @@ -2285,16 +2223,16 @@ } }, "node_modules/@typescript-eslint/utils": { - "version": "8.25.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/utils/-/utils-8.25.0.tgz", - "integrity": "sha512-syqRbrEv0J1wywiLsK60XzHnQe/kRViI3zwFALrNEgnntn1l24Ra2KvOAWwWbWZ1lBZxZljPDGOq967dsl6fkA==", + "version": "8.26.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/utils/-/utils-8.26.0.tgz", + "integrity": "sha512-2L2tU3FVwhvU14LndnQCA2frYC8JnPDVKyQtWFPf8IYFMt/ykEN1bPolNhNbCVgOmdzTlWdusCTKA/9nKrf8Ig==", "dev": true, "license": "MIT", "dependencies": { "@eslint-community/eslint-utils": "^4.4.0", - "@typescript-eslint/scope-manager": "8.25.0", - "@typescript-eslint/types": "8.25.0", - "@typescript-eslint/typescript-estree": "8.25.0" + "@typescript-eslint/scope-manager": "8.26.0", + "@typescript-eslint/types": "8.26.0", + "@typescript-eslint/typescript-estree": "8.26.0" }, "engines": { "node": "^18.18.0 || ^20.9.0 || >=21.1.0" @@ -2305,17 +2243,17 @@ }, "peerDependencies": { "eslint": "^8.57.0 || ^9.0.0", - "typescript": ">=4.8.4 <5.8.0" + "typescript": ">=4.8.4 <5.9.0" } }, "node_modules/@typescript-eslint/visitor-keys": { - "version": "8.25.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-8.25.0.tgz", - "integrity": "sha512-kCYXKAum9CecGVHGij7muybDfTS2sD3t0L4bJsEZLkyrXUImiCTq1M3LG2SRtOhiHFwMR9wAFplpT6XHYjTkwQ==", + "version": "8.26.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-8.26.0.tgz", + "integrity": "sha512-2z8JQJWAzPdDd51dRQ/oqIJxe99/hoLIqmf8RMCAJQtYDc535W/Jt2+RTP4bP0aKeBG1F65yjIZuczOXCmbWwg==", "dev": true, "license": "MIT", "dependencies": { - "@typescript-eslint/types": "8.25.0", + "@typescript-eslint/types": "8.26.0", "eslint-visitor-keys": "^4.2.0" }, "engines": { @@ -2327,16 +2265,16 @@ } }, "node_modules/@waku/core": { - "version": "0.0.34-c41b319.0", - "resolved": "https://registry.npmjs.org/@waku/core/-/core-0.0.34-c41b319.0.tgz", - "integrity": "sha512-YvuMSNvPXoDs4bMxe+v5JtOMh965hZdjYBmsvD8ZUS4Jr25hqQLSupmMugj2VLacyCMiEvIWk3kgbURb62QC6Q==", + "version": "0.0.34-a3e7f15.0", + "resolved": "https://registry.npmjs.org/@waku/core/-/core-0.0.34-a3e7f15.0.tgz", + "integrity": "sha512-KWx7Epz7yAZKt9SJdUPjbZYY90312omLMXzBV9C3I8H94Q7u8C3dQep4wZsTBB+VGnVsKLYEyVmdorGZIgcubg==", "license": "MIT OR Apache-2.0", "dependencies": { "@libp2p/ping": "2.0.1", - "@waku/enr": "0.0.28-c41b319.0", - "@waku/interfaces": "0.0.29-c41b319.0", - "@waku/proto": "0.0.9-c41b319.0", - "@waku/utils": "0.0.22-c41b319.0", + "@waku/enr": "0.0.28-a3e7f15.0", + "@waku/interfaces": "0.0.29-a3e7f15.0", + "@waku/proto": "0.0.9-a3e7f15.0", + "@waku/utils": "0.0.22-a3e7f15.0", "debug": "^4.3.4", "it-all": "^3.0.4", "it-length-prefixed": "^9.0.4", @@ -2374,9 +2312,9 @@ } }, "node_modules/@waku/enr": { - "version": "0.0.28-c41b319.0", - "resolved": "https://registry.npmjs.org/@waku/enr/-/enr-0.0.28-c41b319.0.tgz", - "integrity": "sha512-udECV2m4PR7QQcMdCyzDAzboPHeTEYWAP7eVdCtdqzxgmj5Uqj96Vt1ewJ3v+TMiZkcHf4YEIoKLV+A/soFU1w==", + "version": "0.0.28-a3e7f15.0", + "resolved": "https://registry.npmjs.org/@waku/enr/-/enr-0.0.28-a3e7f15.0.tgz", + "integrity": "sha512-IdVrw04Bi/DJd7caYtYbIGnb26hZJdGMsB0hBaqwto+kgAjp0gzOBB+NSutiBIPsVH0ED4fr1FHjW/pIRjrCfA==", "license": "MIT OR Apache-2.0", "dependencies": { "@ethersproject/rlp": "^5.7.0", @@ -2384,7 +2322,7 @@ "@libp2p/peer-id": "^5.0.1", "@multiformats/multiaddr": "^12.0.0", "@noble/secp256k1": "^1.7.1", - "@waku/utils": "0.0.22-c41b319.0", + "@waku/utils": "0.0.22-a3e7f15.0", "debug": "^4.3.4", "js-sha3": "^0.9.2" }, @@ -2401,21 +2339,21 @@ } }, "node_modules/@waku/interfaces": { - "version": "0.0.29-c41b319.0", - "resolved": "https://registry.npmjs.org/@waku/interfaces/-/interfaces-0.0.29-c41b319.0.tgz", - "integrity": "sha512-zDoAYCYfuPlzbWjr27Ing/bjKCIXNHziI1Q7y8e28uKjpEh+h9fIzzYbpzWGFbGTUxCfjZQw4h/HwNYdoQFgJg==", + "version": "0.0.29-a3e7f15.0", + "resolved": "https://registry.npmjs.org/@waku/interfaces/-/interfaces-0.0.29-a3e7f15.0.tgz", + "integrity": "sha512-RgtxDuLDmzrQBq17fcFRVSpQoeiZocbNTXIhW39+zh5HhggYRu0694W1D2c3toGMTODggEyCfPdFLfC24cMfuQ==", "license": "MIT OR Apache-2.0", "dependencies": { - "@waku/proto": "0.0.9-c41b319.0" + "@waku/proto": "0.0.9-a3e7f15.0" }, "engines": { "node": ">=20" } }, "node_modules/@waku/proto": { - "version": "0.0.9-c41b319.0", - "resolved": "https://registry.npmjs.org/@waku/proto/-/proto-0.0.9-c41b319.0.tgz", - "integrity": "sha512-PQhpO/kadNyXuUm427l3cXOBnMN0WbD5i39OQ72PESA7GXIekiT8jj7eDA/zRh2JUjbHECMXQx4GiMlpfxVtvQ==", + "version": "0.0.9-a3e7f15.0", + "resolved": "https://registry.npmjs.org/@waku/proto/-/proto-0.0.9-a3e7f15.0.tgz", + "integrity": "sha512-nHUDg6QQ1OG1lEcx5o4HawkKWZl8eUd0gU7amk7reAJ64Y0I2UkblQt+FzUM3v8RinZnFUCweRKy1j+/ygiPPw==", "license": "MIT OR Apache-2.0", "dependencies": { "protons-runtime": "^5.4.0" @@ -2425,18 +2363,14 @@ } }, "node_modules/@waku/rln": { - "version": "0.0.2-c41b319.0", - "resolved": "https://registry.npmjs.org/@waku/rln/-/rln-0.0.2-c41b319.0.tgz", - "integrity": "sha512-CEvB5YHJulHA9OQSpBMDwy+Cm6bEkpf62ikoNhINCqVe9VOz7n8/QQ/ntSlxZhlce1A+qOhwGX1iw4wB9MGj7g==", + "version": "0.0.2-a3e7f15.0", + "resolved": "https://registry.npmjs.org/@waku/rln/-/rln-0.0.2-a3e7f15.0.tgz", + "integrity": "sha512-IK0CBJ16XBnODSc1uIaVmCMejSqQbVLEIzP6HdvrGH+9bJuyUzBLL7hkceAlMNPsOwZXb/fj0VR3DvzW1x9rKQ==", "license": "MIT OR Apache-2.0", "dependencies": { "@chainsafe/bls-keystore": "3.0.0", - "@ethersproject/bytes": "^5.7.0", - "@ethersproject/keccak256": "^5.7.0", - "@iden3/js-crypto": "^1.3.0", - "@stablelib/chacha": "^2.0.1", - "@waku/core": "0.0.34-c41b319.0", - "@waku/utils": "0.0.22-c41b319.0", + "@waku/core": "0.0.34-a3e7f15.0", + "@waku/utils": "0.0.22-a3e7f15.0", "@waku/zerokit-rln-wasm": "^0.0.13", "ethereum-cryptography": "^3.1.0", "ethers": "^5.7.2", @@ -2448,13 +2382,13 @@ } }, "node_modules/@waku/utils": { - "version": "0.0.22-c41b319.0", - "resolved": "https://registry.npmjs.org/@waku/utils/-/utils-0.0.22-c41b319.0.tgz", - "integrity": "sha512-E5aLR2+QZ/X8vN4xT+ABqg0cHWwfPFIRYpF5uMsSMmOrvlUWmuh1AE/1NJS76xPu3p19p0gHUVK9Wpp7+vtqbA==", + "version": "0.0.22-a3e7f15.0", + "resolved": "https://registry.npmjs.org/@waku/utils/-/utils-0.0.22-a3e7f15.0.tgz", + "integrity": "sha512-N3JiVD5mzJklheZAyVgMrE/RqrFQjUQ13b24c1XTLGgqrwXAVoLxPK47EQQK/hAt6OxX1ql2f4wHMYLP3mu1Tw==", "license": "MIT OR Apache-2.0", "dependencies": { "@noble/hashes": "^1.3.2", - "@waku/interfaces": "0.0.29-c41b319.0", + "@waku/interfaces": "0.0.29-a3e7f15.0", "chai": "^4.3.10", "debug": "^4.3.4", "uint8arrays": "^5.0.1" @@ -2756,20 +2690,6 @@ "url": "https://github.com/sponsors/ljharb" } }, - "node_modules/asn1js": { - "version": "3.0.5", - "resolved": "https://registry.npmjs.org/asn1js/-/asn1js-3.0.5.tgz", - "integrity": "sha512-FVnvrKJwpt9LP2lAMl8qZswRNm3T4q9CON+bxldk2iwk3FFpuwhx2FfinyitizWHsVYyaY+y5JzDR0rCMV5yTQ==", - "license": "BSD-3-Clause", - "dependencies": { - "pvtsutils": "^1.3.2", - "pvutils": "^1.1.3", - "tslib": "^2.4.0" - }, - "engines": { - "node": ">=12.0.0" - } - }, "node_modules/assertion-error": { "version": "1.1.0", "resolved": "https://registry.npmjs.org/assertion-error/-/assertion-error-1.1.0.tgz", @@ -2983,14 +2903,14 @@ } }, "node_modules/call-bound": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/call-bound/-/call-bound-1.0.3.tgz", - "integrity": "sha512-YTd+6wGlNlPxSuri7Y6X8tY2dmm12UMH66RpKMhiX6rsk5wXXnYgbUcOt8kiS31/AjfoTOvCsE+w8nZQLQnzHA==", + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/call-bound/-/call-bound-1.0.4.tgz", + "integrity": "sha512-+ys997U96po4Kx/ABpBCqhA9EuxJaQWDQg7295H4hBphv3IZg0boBKuwYpt4YXp6MZ5AmZQnU/tyMTlRpaSejg==", "dev": true, "license": "MIT", "dependencies": { - "call-bind-apply-helpers": "^1.0.1", - "get-intrinsic": "^1.2.6" + "call-bind-apply-helpers": "^1.0.2", + "get-intrinsic": "^1.3.0" }, "engines": { "node": ">= 0.4" @@ -3020,9 +2940,9 @@ } }, "node_modules/caniuse-lite": { - "version": "1.0.30001700", - "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001700.tgz", - "integrity": "sha512-2S6XIXwaE7K7erT8dY+kLQcpa5ms63XlRkMkReXjle+kf6c5g38vyMl+Z5y8dSxOFDhcFe+nxnn261PLxBSQsQ==", + "version": "1.0.30001702", + "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001702.tgz", + "integrity": "sha512-LoPe/D7zioC0REI5W73PeR1e1MLCipRGq/VkovJnd6Df+QVqT+vT33OXCp8QUd7kA7RZrHWxb1B36OQKI/0gOA==", "funding": [ { "type": "opencollective", @@ -3444,9 +3364,9 @@ "license": "MIT" }, "node_modules/elliptic": { - "version": "6.5.4", - "resolved": "https://registry.npmjs.org/elliptic/-/elliptic-6.5.4.tgz", - "integrity": "sha512-iLhC6ULemrljPZb+QutR5TQGB+pdW6KGD5RSegS+8sorOZT+rdQFbsQFJgvN3eRqNALqJer4oQ16YvJHlU8hzQ==", + "version": "6.6.1", + "resolved": "https://registry.npmjs.org/elliptic/-/elliptic-6.6.1.tgz", + "integrity": "sha512-RaddvvMatK2LJHqFJ+YA4WysVN5Ita9E35botqIYspQ4TkRAlCicdzKOjlyv/1Za5RyTNn7di//eEV0uTAfe3g==", "license": "MIT", "dependencies": { "bn.js": "^4.11.9", @@ -3963,9 +3883,9 @@ } }, "node_modules/eslint-plugin-react-hooks": { - "version": "5.1.0", - "resolved": "https://registry.npmjs.org/eslint-plugin-react-hooks/-/eslint-plugin-react-hooks-5.1.0.tgz", - "integrity": "sha512-mpJRtPgHN2tNAvZ35AMfqeB3Xqeo273QxrHJsbBEPWODRM4r0yB6jfoROqKEYrOn27UtRPpcpHc2UqyBSuUNTw==", + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/eslint-plugin-react-hooks/-/eslint-plugin-react-hooks-5.2.0.tgz", + "integrity": "sha512-+f15FfK64YQwZdJNELETdn5ibXEUQmW1DZL6KXhNnc2heoy/sg9VJJeT7n8TlMWouzWqSWavFkIhHyIbIAEapg==", "dev": true, "license": "MIT", "engines": { @@ -4115,9 +4035,9 @@ } }, "node_modules/ethers": { - "version": "5.7.2", - "resolved": "https://registry.npmjs.org/ethers/-/ethers-5.7.2.tgz", - "integrity": "sha512-wswUsmWo1aOK8rR7DIKiWSw9DbLWe6x98Jrn8wcTflTVvaXhAMaB5zGAXy0GYQEQp9iO1iSHWVyARQm11zUtyg==", + "version": "5.8.0", + "resolved": "https://registry.npmjs.org/ethers/-/ethers-5.8.0.tgz", + "integrity": "sha512-DUq+7fHrCg1aPDFCHx6UIPb3nmt2XMpM7Y/g2gLhsl3lIBqeAfOJIl1qEvRf2uq3BiKxmh6Fh5pfp2ieyek7Kg==", "funding": [ { "type": "individual", @@ -4130,36 +4050,36 @@ ], "license": "MIT", "dependencies": { - "@ethersproject/abi": "5.7.0", - "@ethersproject/abstract-provider": "5.7.0", - "@ethersproject/abstract-signer": "5.7.0", - "@ethersproject/address": "5.7.0", - "@ethersproject/base64": "5.7.0", - "@ethersproject/basex": "5.7.0", - "@ethersproject/bignumber": "5.7.0", - "@ethersproject/bytes": "5.7.0", - "@ethersproject/constants": "5.7.0", - "@ethersproject/contracts": "5.7.0", - "@ethersproject/hash": "5.7.0", - "@ethersproject/hdnode": "5.7.0", - "@ethersproject/json-wallets": "5.7.0", - "@ethersproject/keccak256": "5.7.0", - "@ethersproject/logger": "5.7.0", - "@ethersproject/networks": "5.7.1", - "@ethersproject/pbkdf2": "5.7.0", - "@ethersproject/properties": "5.7.0", - "@ethersproject/providers": "5.7.2", - "@ethersproject/random": "5.7.0", - "@ethersproject/rlp": "5.7.0", - "@ethersproject/sha2": "5.7.0", - "@ethersproject/signing-key": "5.7.0", - "@ethersproject/solidity": "5.7.0", - "@ethersproject/strings": "5.7.0", - "@ethersproject/transactions": "5.7.0", - "@ethersproject/units": "5.7.0", - "@ethersproject/wallet": "5.7.0", - "@ethersproject/web": "5.7.1", - "@ethersproject/wordlists": "5.7.0" + "@ethersproject/abi": "5.8.0", + "@ethersproject/abstract-provider": "5.8.0", + "@ethersproject/abstract-signer": "5.8.0", + "@ethersproject/address": "5.8.0", + "@ethersproject/base64": "5.8.0", + "@ethersproject/basex": "5.8.0", + "@ethersproject/bignumber": "5.8.0", + "@ethersproject/bytes": "5.8.0", + "@ethersproject/constants": "5.8.0", + "@ethersproject/contracts": "5.8.0", + "@ethersproject/hash": "5.8.0", + "@ethersproject/hdnode": "5.8.0", + "@ethersproject/json-wallets": "5.8.0", + "@ethersproject/keccak256": "5.8.0", + "@ethersproject/logger": "5.8.0", + "@ethersproject/networks": "5.8.0", + "@ethersproject/pbkdf2": "5.8.0", + "@ethersproject/properties": "5.8.0", + "@ethersproject/providers": "5.8.0", + "@ethersproject/random": "5.8.0", + "@ethersproject/rlp": "5.8.0", + "@ethersproject/sha2": "5.8.0", + "@ethersproject/signing-key": "5.8.0", + "@ethersproject/solidity": "5.8.0", + "@ethersproject/strings": "5.8.0", + "@ethersproject/transactions": "5.8.0", + "@ethersproject/units": "5.8.0", + "@ethersproject/wallet": "5.8.0", + "@ethersproject/web": "5.8.0", + "@ethersproject/wordlists": "5.8.0" } }, "node_modules/eventemitter3": { @@ -4220,9 +4140,9 @@ "license": "MIT" }, "node_modules/fastq": { - "version": "1.19.0", - "resolved": "https://registry.npmjs.org/fastq/-/fastq-1.19.0.tgz", - "integrity": "sha512-7SFSRCNjBQIZH/xZR3iy5iQYR8aGBE0h3VG6/cwlbrpdciNYBMotQav8c1XI3HjHH+NikUpP53nPdlZSdWmFzA==", + "version": "1.19.1", + "resolved": "https://registry.npmjs.org/fastq/-/fastq-1.19.1.tgz", + "integrity": "sha512-GwLTyxkCXjXbxqIhTsMI2Nui8huMPtnxg7krajPJAjnEG/iiOS7i+zCtWGZR9G0NBKbXKh6X9m9UIsYX/N6vvQ==", "dev": true, "license": "ISC", "dependencies": { @@ -5238,21 +5158,21 @@ "license": "ISC" }, "node_modules/it-all": { - "version": "3.0.6", - "resolved": "https://registry.npmjs.org/it-all/-/it-all-3.0.6.tgz", - "integrity": "sha512-HXZWbxCgQZJfrv5rXvaVeaayXED8nTKx9tj9fpBhmcUJcedVZshMMMqTj0RG2+scGypb9Ut1zd1ifbf3lA8L+Q==", + "version": "3.0.7", + "resolved": "https://registry.npmjs.org/it-all/-/it-all-3.0.7.tgz", + "integrity": "sha512-PkuYtu6XhJzuPTKXImd6y0qE6H91MUPV/b9xotXMAI6GjmD2v3NoHj2g5L0lS2qZ0EzyGWZU1kp0UxW8POvNBQ==", "license": "Apache-2.0 OR MIT" }, "node_modules/it-first": { - "version": "3.0.6", - "resolved": "https://registry.npmjs.org/it-first/-/it-first-3.0.6.tgz", - "integrity": "sha512-ExIewyK9kXKNAplg2GMeWfgjUcfC1FnUXz/RPfAvIXby+w7U4b3//5Lic0NV03gXT8O/isj5Nmp6KiY0d45pIQ==", + "version": "3.0.7", + "resolved": "https://registry.npmjs.org/it-first/-/it-first-3.0.7.tgz", + "integrity": "sha512-e2dVSlOP+pAxPYPVJBF4fX7au8cvGfvLhIrGCMc5aWDnCvwgOo94xHbi3Da6eXQ2jPL5FGEM8sJMn5uE8Seu+g==", "license": "Apache-2.0 OR MIT" }, "node_modules/it-foreach": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/it-foreach/-/it-foreach-2.1.1.tgz", - "integrity": "sha512-ID4Gxnavk/LVQLQESAQ9hR6dR63Ih6X+8VdxEktX8rpz2dCGAbZpey/eljTNbMfV2UKXHiu6UsneoNBZuac97g==", + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/it-foreach/-/it-foreach-2.1.2.tgz", + "integrity": "sha512-PvXs3v1FaeWDhWzRxnwB4vSKJngxdLgi0PddkfurCvIFBmKTBfWONLeyDk5dxrvtCzdE4y96KzEQynk4/bbI5A==", "license": "Apache-2.0 OR MIT", "dependencies": { "it-peekable": "^3.0.0" @@ -5276,18 +5196,18 @@ } }, "node_modules/it-merge": { - "version": "3.0.5", - "resolved": "https://registry.npmjs.org/it-merge/-/it-merge-3.0.5.tgz", - "integrity": "sha512-2l7+mPf85pyRF5pqi0dKcA54E5Jm/2FyY5GsOaN51Ta0ipC7YZ3szuAsH8wOoB6eKY4XsU4k2X+mzPmFBMayEA==", + "version": "3.0.7", + "resolved": "https://registry.npmjs.org/it-merge/-/it-merge-3.0.7.tgz", + "integrity": "sha512-4Jzk4ysLW9D6EP6tLCQF253X/ZLO/ELjG9S+Ax79Peo3GQvV4Czux8s3gFS3N/t7/mFhG17ouPvuwY9reFIf+w==", "license": "Apache-2.0 OR MIT", "dependencies": { "it-pushable": "^3.2.3" } }, "node_modules/it-peekable": { - "version": "3.0.5", - "resolved": "https://registry.npmjs.org/it-peekable/-/it-peekable-3.0.5.tgz", - "integrity": "sha512-JWQOGMt6rKiPcY30zUVMR4g6YxkpueTwHVE7CMs/aGqCf4OydM6w+7ZM3PvmO1e0TocjuR4aL8xyZWR46cTqCQ==", + "version": "3.0.6", + "resolved": "https://registry.npmjs.org/it-peekable/-/it-peekable-3.0.6.tgz", + "integrity": "sha512-odk9wn8AwFQipy8+tFaZNRCM62riraKZJRysfbmOett9wgJumCwgZFzWUBUwMoiQapEcEVGwjDpMChZIi+zLuQ==", "license": "Apache-2.0 OR MIT" }, "node_modules/it-pipe": { @@ -6366,24 +6286,6 @@ "node": ">=6" } }, - "node_modules/pvtsutils": { - "version": "1.3.6", - "resolved": "https://registry.npmjs.org/pvtsutils/-/pvtsutils-1.3.6.tgz", - "integrity": "sha512-PLgQXQ6H2FWCaeRak8vvk1GW462lMxB5s3Jm673N82zI4vqtVUPuZdffdZbPDFRoU8kAhItWFtPCWiPpp4/EDg==", - "license": "MIT", - "dependencies": { - "tslib": "^2.8.1" - } - }, - "node_modules/pvutils": { - "version": "1.1.3", - "resolved": "https://registry.npmjs.org/pvutils/-/pvutils-1.1.3.tgz", - "integrity": "sha512-pMpnA0qRdFp32b1sJl1wOJNxZLQ2cbQx+k6tjNtZ8CpvVhNqEPRgivZ2WOUev2YMajecdH7ctUPDvEe87nariQ==", - "license": "MIT", - "engines": { - "node": ">=6.0.0" - } - }, "node_modules/queue-microtask": { "version": "1.2.3", "resolved": "https://registry.npmjs.org/queue-microtask/-/queue-microtask-1.2.3.tgz", @@ -6554,9 +6456,9 @@ } }, "node_modules/reusify": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/reusify/-/reusify-1.0.4.tgz", - "integrity": "sha512-U9nH88a3fc/ekCF1l0/UP1IosiuIjyTh7hBvXVMHYgVcfGvt897Xguj2UOLDeI5BG2m7/uwyaLVT6fbtCwTyzw==", + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/reusify/-/reusify-1.1.0.tgz", + "integrity": "sha512-g6QUff04oZpHs0eG5p83rFLhHeV00ug/Yf9nZM6fLeUrPguBTkTQOdpAWWspMh55TZfVQDPaN3NQJfbVRAxdIw==", "dev": true, "license": "MIT", "engines": { @@ -7514,9 +7416,9 @@ } }, "node_modules/typescript": { - "version": "5.7.3", - "resolved": "https://registry.npmjs.org/typescript/-/typescript-5.7.3.tgz", - "integrity": "sha512-84MVSjMEHP+FQRPy3pX9sTVV/INIex71s9TL2Gm5FG/WG1SqXeKyZ0k7/blY/4FdOzI12CBy1vGc4og/eus0fw==", + "version": "5.8.2", + "resolved": "https://registry.npmjs.org/typescript/-/typescript-5.8.2.tgz", + "integrity": "sha512-aJn6wq13/afZp/jT9QZmwEjDqqvSGp1VT5GVg+f/t6/oVyrgXM6BY1h9BRh/O5p3PlUPAe+WuiEZOmb/49RqoQ==", "dev": true, "license": "Apache-2.0", "bin": { @@ -7850,6 +7752,27 @@ "url": "https://github.com/chalk/ansi-styles?sponsor=1" } }, + "node_modules/ws": { + "version": "8.18.0", + "resolved": "https://registry.npmjs.org/ws/-/ws-8.18.0.tgz", + "integrity": "sha512-8VbfWfHLbbwu3+N6OKsOMpBdT4kXPDDB9cJk2bJ6mh9ucxdlnNvH1e+roYkKmN9Nxw2yjz7VzeO9oOz2zJ04Pw==", + "license": "MIT", + "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 + } + } + }, "node_modules/yaml": { "version": "2.7.0", "resolved": "https://registry.npmjs.org/yaml/-/yaml-2.7.0.tgz", diff --git a/examples/keystore-management/package.json b/examples/keystore-management/package.json index 0b65d21..dc6a0db 100644 --- a/examples/keystore-management/package.json +++ b/examples/keystore-management/package.json @@ -10,7 +10,7 @@ "lint": "next lint" }, "dependencies": { - "@waku/rln": "0.0.2-c41b319.0", + "@waku/rln": "0.0.2-a3e7f15.0", "next": "15.1.7", "react": "^19.0.0", "react-dom": "^19.0.0" diff --git a/examples/keystore-management/src/app/layout.tsx b/examples/keystore-management/src/app/layout.tsx index 90bde6b..6676a68 100644 --- a/examples/keystore-management/src/app/layout.tsx +++ b/examples/keystore-management/src/app/layout.tsx @@ -2,6 +2,7 @@ import type { Metadata } from "next"; import { Geist, Geist_Mono } from "next/font/google"; import "./globals.css"; import { WalletProvider } from "../contexts/WalletContext"; +import { RLNProvider } from "../contexts/RLNContext"; import { Header } from "../components/Header"; const geistSans = Geist({ @@ -30,12 +31,14 @@ export default function RootLayout({ className={`${geistSans.variable} ${geistMono.variable} antialiased`} > -
-
-
- {children} -
-
+ +
+
+
+ {children} +
+
+
diff --git a/examples/keystore-management/src/app/page.tsx b/examples/keystore-management/src/app/page.tsx index d80e1aa..00e891e 100644 --- a/examples/keystore-management/src/app/page.tsx +++ b/examples/keystore-management/src/app/page.tsx @@ -1,10 +1,30 @@ +import RLNMembershipRegistration from '../components/RLNMembershipRegistration'; +import { WalletInfo } from '../components/WalletInfo'; + export default function Home() { return (
-

Waku Keystore Management

- {/* Your keystore management content will go here */} +

Waku Keystore Management

+ +
+ {/* Wallet Information Section */} +
+

Wallet Connection

+ +
+ + {/* RLN Membership Registration Section */} +
+

RLN Membership

+

+ Register a new RLN membership to participate in Waku RLN Relay without exposing your private key on your node. + Set your desired rate limit for messages per epoch. +

+ +
+
diff --git a/examples/keystore-management/src/components/RLNMembershipRegistration.tsx b/examples/keystore-management/src/components/RLNMembershipRegistration.tsx new file mode 100644 index 0000000..79cdbf2 --- /dev/null +++ b/examples/keystore-management/src/components/RLNMembershipRegistration.tsx @@ -0,0 +1,321 @@ +"use client"; + +import { useState } from 'react'; +import { useRLN } from '../contexts/RLNContext'; +import { useWallet } from '../contexts/WalletContext'; +import { DecryptedCredentials } from '@waku/rln'; + +export default function RLNMembershipRegistration() { + const { registerMembership, isInitialized, isStarted, rateMinLimit, rateMaxLimit, error, initializeRLN } = useRLN(); + const { isConnected, address, chainId } = useWallet(); + + const [rateLimit, setRateLimit] = useState(rateMinLimit); + const [isRegistering, setIsRegistering] = useState(false); + const [isInitializing, setIsInitializing] = useState(false); + const [registrationResult, setRegistrationResult] = useState<{ + success?: boolean; + error?: string; + txHash?: string; + warning?: string; + credentials?: DecryptedCredentials; + }>({}); + + const isLineaSepolia = chainId === 59141; + + const handleRateLimitChange = (e: React.ChangeEvent) => { + const value = parseInt(e.target.value); + setRateLimit(isNaN(value) ? rateMinLimit : value); + }; + + const handleInitializeRLN = async () => { + setIsInitializing(true); + try { + await initializeRLN(); + } catch (err) { + console.error("Error initializing RLN:", err); + } finally { + setIsInitializing(false); + } + }; + + const handleSubmit = async (e: React.FormEvent) => { + e.preventDefault(); + + if (!isConnected) { + setRegistrationResult({ success: false, error: 'Please connect your wallet first' }); + return; + } + + if (!isInitialized || !isStarted) { + setRegistrationResult({ success: false, error: 'RLN is not initialized' }); + return; + } + + if (!isLineaSepolia) { + setRegistrationResult({ success: false, error: 'Please switch to Linea Sepolia network' }); + return; + } + + setIsRegistering(true); + setRegistrationResult({}); + + try { + setRegistrationResult({ + success: undefined, + warning: 'Please check your wallet to sign the registration message.' + }); + + const result = await registerMembership(rateLimit); + setRegistrationResult({ + ...result, + credentials: result.credentials + }); + } catch (error) { + setRegistrationResult({ + success: false, + error: error instanceof Error ? error.message : 'Registration failed' + }); + } finally { + setIsRegistering(false); + } + }; + + return ( +
+

+ RLN Membership Registration +

+ + {/* Network Warning */} + {isConnected && !isLineaSepolia && ( +
+

+ Warning: You are not connected to Linea Sepolia network. Please switch networks to register. +

+
+ )} + + {/* Informational Box */} +
+

+ About RLN Membership on Linea Sepolia +

+

+ RLN (Rate Limiting Nullifier) membership allows you to participate in Waku RLN Relay with rate limiting protection, + without exposing your private keys on your node. +

+

+ This application is configured to use the Linea Sepolia testnet for RLN registrations. +

+

+ When you register, your wallet will sign a message that will be used to generate a cryptographic identity + for your membership. This allows your node to prove it has permission to send messages without revealing your identity. +

+
+ + {/* Initialization Status */} +
+
+
+

+ RLN Status: + + {isInitialized && isStarted ? "Ready" : "Not Initialized"} + +

+
+ {isConnected && (!isInitialized || !isStarted) && ( + + )} +
+ {error && ( +

{error}

+ )} +
+ + {isInitialized && !isStarted && ( +
+

+ Note: RLN is partially initialized. You can still proceed with registration, but some advanced features might be limited. +

+
+ )} + + {!isConnected ? ( +
+ Please connect your wallet to register a membership +
+ ) : !isInitialized || !isStarted ? ( +
+ Please initialize RLN before registering a membership +
+ ) : ( + <> +
+
+ +
+ + {rateLimit} +
+

+ Select a rate limit between {rateMinLimit} and {rateMaxLimit} +

+
+ + {address && ( +
+

Registration Details:

+

Connected Address: {address.slice(0, 8)}...{address.slice(-6)}

+

When you register, your wallet will sign a secure message containing a random nonce. This signature will be used to generate your RLN credentials without exposing your private key.

+
+ )} + + +
+ + {registrationResult.warning && registrationResult.success === undefined && ( +
+

Important:

+

{registrationResult.warning}

+
+ You'll need to sign a message with your wallet to complete the registration. +
+
+ )} + + {registrationResult.success === true && ( +
+

Registration submitted!

+ {registrationResult.txHash && ( +
+

+ {registrationResult.txHash} +

+ {registrationResult.txHash.startsWith('0x') && ( +

+ + View on Linea Sepolia Explorer + +

+ )} +
+ )} + {registrationResult.warning && ( +

+ Note: {registrationResult.warning} +

+ )} +

+ Your RLN membership is now registered and can be used with your Waku node. +

+ + {registrationResult.credentials && ( +
+

Your RLN Credentials:

+
+

Identity:

+

+ ID Commitment: {Buffer.from(registrationResult.credentials.identity.IDCommitment).toString('hex')} +

+

+ ID Secret Hash: {Buffer.from(registrationResult.credentials.identity.IDSecretHash).toString('hex')} +

+

+ ID Nullifier: {Buffer.from(registrationResult.credentials.identity.IDNullifier).toString('hex')} +

+

+ ID Trapdoor: {Buffer.from(registrationResult.credentials.identity.IDTrapdoor).toString('hex')} +

+ +

Membership:

+

+ Chain ID: {registrationResult.credentials.membership.chainId} +

+

+ Contract Address: {registrationResult.credentials.membership.address} +

+

+ Tree Index: {registrationResult.credentials.membership.treeIndex} +

+
+

+ These credentials are your proof of membership. Store them securely. +

+
+ )} +
+ )} + + {registrationResult.success === false && ( +
+

Registration failed

+

{registrationResult.error}

+ {registrationResult.error?.includes("field") && ( +
+

+ This is a mathematical constraint in the zero-knowledge proof system. + Your wallet's signatures produce values that aren't compatible with the RLN cryptographic system. +

+

Recommended solution:

+

Please try using a different wallet address for registration. Different wallet addresses + generate different signatures, and some are more compatible with the RLN cryptographic system.

+
+ )} +
+ )} + + )} + + {/* Debug Info (For Development) */} +
+

Debug Info:

+

Wallet Connected: {isConnected ? "Yes" : "No"}

+

RLN Initialized: {isInitialized ? "Yes" : "No"}

+

RLN Started: {isStarted ? "Yes" : "No"}

+

Min Rate: {rateMinLimit}, Max Rate: {rateMaxLimit}

+
+
+ ); +} \ No newline at end of file diff --git a/examples/keystore-management/src/components/WalletInfo.tsx b/examples/keystore-management/src/components/WalletInfo.tsx index 053a167..3b81d89 100644 --- a/examples/keystore-management/src/components/WalletInfo.tsx +++ b/examples/keystore-management/src/components/WalletInfo.tsx @@ -7,13 +7,13 @@ function getNetworkName(chainId: number | null): string { if (!chainId) return 'Unknown'; switch (chainId) { - case 11155111: return 'Sepolia Testnet (Supported)'; + case 59141: return 'Linea Sepolia (Supported)'; default: return `Unsupported Network (Chain ID: ${chainId})`; } } -// Sepolia Chain ID -const SEPOLIA_CHAIN_ID = '0xaa36a7'; // 11155111 in hex +// Linea Sepolia Chain ID +const LINEA_SEPOLIA_CHAIN_ID = '0xe705'; // 59141 in hex // Define interface for provider errors interface ProviderRpcError extends Error { @@ -24,18 +24,18 @@ interface ProviderRpcError extends Error { export function WalletInfo() { const { isConnected, address, balance, chainId, connectWallet, disconnectWallet, error } = useWallet(); - // Function to switch to Sepolia network - const switchToSepolia = async () => { + // Function to switch to Linea Sepolia network + const switchToLineaSepolia = async () => { if (!window.ethereum) { console.error("MetaMask not installed"); return; } try { - // Try to switch to Sepolia + // Try to switch to Linea Sepolia await window.ethereum.request({ method: 'wallet_switchEthereumChain', - params: [{ chainId: SEPOLIA_CHAIN_ID }], + params: [{ chainId: LINEA_SEPOLIA_CHAIN_ID }], }); } catch (err) { // If the error code is 4902, the chain hasn't been added to MetaMask @@ -46,29 +46,29 @@ export function WalletInfo() { method: 'wallet_addEthereumChain', params: [ { - chainId: SEPOLIA_CHAIN_ID, - chainName: 'Sepolia Testnet', + chainId: LINEA_SEPOLIA_CHAIN_ID, + chainName: 'Linea Sepolia Testnet', nativeCurrency: { - name: 'Sepolia ETH', + name: 'Linea Sepolia ETH', symbol: 'ETH', decimals: 18, }, - rpcUrls: ['https://sepolia.infura.io/v3/'], - blockExplorerUrls: ['https://sepolia.etherscan.io'], + rpcUrls: ['https://linea-sepolia.infura.io/v3/', 'https://rpc.sepolia.linea.build'], + blockExplorerUrls: ['https://sepolia.lineascan.build'], }, ], }); } catch (addError) { - console.error("Error adding Sepolia chain", addError); + console.error("Error adding Linea Sepolia chain", addError); } } else { - console.error("Error switching to Sepolia chain", providerError); + console.error("Error switching to Linea Sepolia chain", providerError); } } }; // Check if user is on unsupported network - const isUnsupportedNetwork = isConnected && chainId !== 11155111; + const isUnsupportedNetwork = isConnected && chainId !== 59141; return (
@@ -110,12 +110,14 @@ export function WalletInfo() {
{isUnsupportedNetwork && ( - +
+ +
)} ) : ( diff --git a/examples/keystore-management/src/contexts/RLNContext.tsx b/examples/keystore-management/src/contexts/RLNContext.tsx new file mode 100644 index 0000000..5ffda15 --- /dev/null +++ b/examples/keystore-management/src/contexts/RLNContext.tsx @@ -0,0 +1,297 @@ +"use client"; + +import { createContext, useContext, useState, useEffect, ReactNode } from 'react'; +import { createRLN, DecryptedCredentials, RLNInstance } from '@waku/rln'; +import { useWallet } from './WalletContext'; +import { ethers } from 'ethers'; + +// Constants +const SIGNATURE_MESSAGE = "Sign this message to generate your RLN credentials"; +const ERC20_ABI = [ + "function allowance(address owner, address spender) view returns (uint256)", + "function approve(address spender, uint256 amount) returns (bool)", + "function balanceOf(address account) view returns (uint256)" +]; + +// Linea Sepolia configuration +const LINEA_SEPOLIA_CONFIG = { + chainId: 59141, + tokenAddress: '0x185A0015aC462a0aECb81beCc0497b649a64B9ea' +}; + +interface RLNContextType { + rln: RLNInstance | null; + isInitialized: boolean; + isStarted: boolean; + error: string | null; + initializeRLN: () => Promise; + registerMembership: (rateLimit: number) => Promise<{ success: boolean; error?: string; credentials?: DecryptedCredentials }>; + rateMinLimit: number; + rateMaxLimit: number; +} + +const RLNContext = createContext(undefined); + +export function RLNProvider({ children }: { children: ReactNode }) { + const { isConnected, signer } = useWallet(); + const [rln, setRln] = useState(null); + const [isInitialized, setIsInitialized] = useState(false); + const [isStarted, setIsStarted] = useState(false); + const [error, setError] = useState(null); + const [rateMinLimit, setRateMinLimit] = useState(20); + const [rateMaxLimit, setRateMaxLimit] = useState(600); + + const ensureLineaSepoliaNetwork = async (): Promise => { + try { + console.log("Current network: unknown", await signer?.getChainId()); + + // Check if already on Linea Sepolia + if (await signer?.getChainId() === LINEA_SEPOLIA_CONFIG.chainId) { + console.log("Already on Linea Sepolia network"); + return true; + } + + // If not on Linea Sepolia, try to switch + console.log("Not on Linea Sepolia, attempting to switch..."); + + interface EthereumProvider { + request: (args: { + method: string; + params?: unknown[] + }) => Promise; + } + + // Get the provider from window.ethereum + const provider = window.ethereum as EthereumProvider | undefined; + + if (!provider) { + console.warn("No Ethereum provider found"); + return false; + } + + try { + // Request network switch + await provider.request({ + method: 'wallet_switchEthereumChain', + params: [{ chainId: `0x${LINEA_SEPOLIA_CONFIG.chainId.toString(16)}` }], + }); + + console.log("Successfully switched to Linea Sepolia"); + return true; + } catch (switchError: unknown) { + console.error("Error switching network:", switchError); + return false; + } + } catch (err) { + console.error("Error checking or switching network:", err); + return false; + } + }; + + const initializeRLN = async () => { + console.log("InitializeRLN called. Connected:", isConnected, "Signer available:", !!signer); + + try { + setError(null); + + if (!rln) { + console.log("Creating RLN instance..."); + + try { + const rlnInstance = await createRLN(); + + console.log("RLN instance created successfully:", !!rlnInstance); + setRln(rlnInstance); + + setIsInitialized(true); + console.log("isInitialized set to true"); + + // Update rate limits to match contract requirements + setRateMinLimit(20); // Contract minimum (RATE_LIMIT_PARAMS.MIN_RATE) + setRateMaxLimit(600); // Contract maximum (RATE_LIMIT_PARAMS.MAX_RATE) + } catch (createErr) { + console.error("Error creating RLN instance:", createErr); + throw createErr; + } + } else { + console.log("RLN instance already exists, skipping creation"); + } + + // Start RLN if wallet is connected + if (isConnected && signer && rln && !isStarted) { + console.log("Starting RLN with signer..."); + try { + // Initialize with localKeystore if available (just for reference in localStorage) + const localKeystore = localStorage.getItem("rln-keystore") || ""; + console.log("Local keystore available:", !!localKeystore); + + // Start RLN with signer + await rln.start({ signer }); + + setIsStarted(true); + console.log("RLN started successfully, isStarted set to true"); + } catch (startErr) { + console.error("Error starting RLN:", startErr); + throw startErr; + } + } else { + console.log("Skipping RLN start because:", { + isConnected, + hasSigner: !!signer, + hasRln: !!rln, + isAlreadyStarted: isStarted + }); + } + } catch (err) { + console.error('Error in initializeRLN:', err); + setError(err instanceof Error ? err.message : 'Failed to initialize RLN'); + } + }; + + const registerMembership = async (rateLimit: number) => { + console.log("registerMembership called with rate limit:", rateLimit); + + if (!rln || !isStarted) { + return { success: false, error: 'RLN not initialized or not started' }; + } + + if (!signer) { + return { success: false, error: 'No signer available' }; + } + + try { + // Validate rate limit + if (rateLimit < rateMinLimit || rateLimit > rateMaxLimit) { + return { + success: false, + error: `Rate limit must be between ${rateMinLimit} and ${rateMaxLimit}` + }; + } + + // Ensure we're on the correct network + const isOnLineaSepolia = await ensureLineaSepoliaNetwork(); + if (!isOnLineaSepolia) { + console.warn("Could not switch to Linea Sepolia network. Registration may fail."); + } + + // Get user address and contract address + const userAddress = await signer.getAddress(); + + if (!rln.contract || !rln.contract.address) { + return { success: false, error: "RLN contract address not available. Cannot proceed with registration." }; + } + + const contractAddress = rln.contract.address; + const tokenAddress = LINEA_SEPOLIA_CONFIG.tokenAddress; + + // Create token contract instance + const tokenContract = new ethers.Contract( + tokenAddress, + ERC20_ABI, + signer + ); + + // Check token balance + const tokenBalance = await tokenContract.balanceOf(userAddress); + if (tokenBalance.isZero()) { + return { success: false, error: "You need tokens to register a membership. Your token balance is zero." }; + } + + // Check and approve token allowance if needed + const currentAllowance = await tokenContract.allowance(userAddress, contractAddress); + if (currentAllowance.eq(0)) { + console.log("Requesting token approval..."); + + // Approve a large amount (max uint256) + const maxUint256 = ethers.constants.MaxUint256; + + try { + const approveTx = await tokenContract.approve(contractAddress, maxUint256); + console.log("Approval transaction submitted:", approveTx.hash); + + // Wait for the transaction to be mined + await approveTx.wait(1); + console.log("Token approval confirmed"); + } catch (approvalErr) { + console.error("Error during token approval:", approvalErr); + return { + success: false, + error: `Failed to approve token: ${approvalErr instanceof Error ? approvalErr.message : String(approvalErr)}` + }; + } + } else { + console.log("Token allowance already sufficient"); + } + + // Generate signature for identity + const message = `${SIGNATURE_MESSAGE} ${Date.now()}`; + const signature = await signer.signMessage(message); + + const _credentials = await rln.registerMembership({signature: signature}); + if (!_credentials) { + throw new Error("Failed to register membership: No credentials returned"); + } + if (!_credentials.identity) { + throw new Error("Failed to register membership: Missing identity information"); + } + if (!_credentials.membership) { + throw new Error("Failed to register membership: Missing membership information"); + } + + return { success: true, credentials: _credentials }; + } catch (err) { + let errorMsg = "Failed to register membership"; + if (err instanceof Error) { + errorMsg = err.message; + } + + return { success: false, error: errorMsg }; + } + }; + + // Initialize RLN when wallet connects + useEffect(() => { + console.log("Wallet connection state changed:", { isConnected, hasSigner: !!signer }); + if (isConnected && signer) { + console.log("Wallet connected, attempting to initialize RLN"); + initializeRLN(); + } else { + console.log("Wallet not connected or no signer available, skipping RLN initialization"); + } + }, [isConnected, signer]); + + // Debug log for state changes + useEffect(() => { + console.log("RLN Context state:", { + isInitialized, + isStarted, + hasRln: !!rln, + error + }); + }, [isInitialized, isStarted, rln, error]); + + return ( + + {children} + + ); +} + +export function useRLN() { + const context = useContext(RLNContext); + if (context === undefined) { + throw new Error('useRLN must be used within an RLNProvider'); + } + return context; +} \ No newline at end of file