From f0cda4199e36a420ab9a3c4cc6b28765834ba1ac Mon Sep 17 00:00:00 2001 From: Jurij Skornik Date: Mon, 23 Feb 2026 21:41:50 +0100 Subject: [PATCH 1/3] Unify publisher plugin database setup and migration paths - Make Drizzle migrations the single source of truth, replacing dual raw DDL + Drizzle paths in setup.js - Auto-run migrations on plugin startup (zero manual steps for updates) - Add bootstrap guard for databases created by old setup.js (seeds __drizzle_migrations journal so Drizzle can take over) - Fix migration 0001 FK incompatibility: change PKs from serial (BIGINT UNSIGNED) to int AUTO_INCREMENT to match int FK columns - Add 0002 migration for error_details column and private_key rename - Fix migration folder path resolution for tsup flat bundle output - Improve setup.js: hide password input, fix Mode 1 config overwrite, replace raw DDL with migrate(), update wording - Add structured error details to publishing attempts Co-Authored-By: Claude Opus 4.6 --- package-lock.json | 4227 +++++++++++------ package.json | 5 +- packages/plugin-dkg-publisher/migrate.js | 4 +- packages/plugin-dkg-publisher/setup.js | 344 +- .../src/database/bootstrap.ts | 131 + .../src/database/index.ts | 14 +- .../migrations/0001_amused_dexter_bennett.sql | 14 +- .../migrations/0002_add_error_details.sql | 2 + .../20250905_rename_private_key_column.sql | 5 - .../migrations/meta/0002_snapshot.json | 813 ++++ .../database/migrations/meta/_journal.json | 7 + .../src/database/schema.ts | 13 +- .../src/services/AssetService.ts | 1 + .../src/services/PublishingService.ts | 9 +- .../src/services/QueueService.ts | 10 +- .../src/services/WalletService.ts | 5 +- .../src/services/errorUtils.ts | 63 + .../src/services/index.ts | 8 +- 18 files changed, 4064 insertions(+), 1611 deletions(-) create mode 100644 packages/plugin-dkg-publisher/src/database/bootstrap.ts create mode 100644 packages/plugin-dkg-publisher/src/database/migrations/0002_add_error_details.sql delete mode 100644 packages/plugin-dkg-publisher/src/database/migrations/20250905_rename_private_key_column.sql create mode 100644 packages/plugin-dkg-publisher/src/database/migrations/meta/0002_snapshot.json create mode 100644 packages/plugin-dkg-publisher/src/services/errorUtils.ts diff --git a/package-lock.json b/package-lock.json index 150c7fe3..18b7ea94 100644 --- a/package-lock.json +++ b/package-lock.json @@ -11,6 +11,7 @@ "apps/agent/tests/integration" ], "dependencies": { + "dkg.js": "^8.2.4", "mysql2": "^3.15.3" }, "devDependencies": { @@ -51,6 +52,7 @@ "dependencies": { "@dkg/expo-forcegraph": "^0.0.0", "@dkg/plugin-dkg-essentials": "^0.0.3", + "@dkg/plugin-dkg-publisher": "^1.0.0", "@dkg/plugin-example": "^0.0.3", "@dkg/plugin-oauth": "^0.0.2", "@dkg/plugin-swagger": "^0.0.2", @@ -2897,20 +2899,6 @@ "node": ">=14.0" } }, - "node_modules/@digitalbazaar/http-client/node_modules/web-streams-polyfill": { - "version": "4.2.0", - "license": "MIT", - "optional": true, - "peer": true, - "workspaces": [ - "test/benchmark-test", - "test/rollup-test", - "test/webpack-test" - ], - "engines": { - "node": ">= 8" - } - }, "node_modules/@dkg/agent": { "resolved": "apps/agent", "link": true @@ -3018,68 +3006,59 @@ "source-map-support": "^0.5.21" } }, - "node_modules/@esbuild-kit/core-utils/node_modules/@esbuild/darwin-arm64": { + "node_modules/@esbuild-kit/core-utils/node_modules/@esbuild/android-arm": { "version": "0.18.20", + "resolved": "https://registry.npmjs.org/@esbuild/android-arm/-/android-arm-0.18.20.tgz", + "integrity": "sha512-fyi7TDI/ijKKNZTUJAQqiG5T7YjJXgnzkURqmGj13C6dCqckZBLdl4h7bkhHt/t0WP+zO9/zwroDvANaOqO5Sw==", "cpu": [ - "arm64" + "arm" ], "dev": true, "license": "MIT", "optional": true, "os": [ - "darwin" + "android" ], "engines": { "node": ">=12" } }, - "node_modules/@esbuild-kit/core-utils/node_modules/esbuild": { + "node_modules/@esbuild-kit/core-utils/node_modules/@esbuild/android-arm64": { "version": "0.18.20", + "resolved": "https://registry.npmjs.org/@esbuild/android-arm64/-/android-arm64-0.18.20.tgz", + "integrity": "sha512-Nz4rJcchGDtENV0eMKUNa6L12zz2zBDXuhj/Vjh18zGqB44Bi7MBMSXjgunJgjRhCmKOjnPuZp4Mb6OKqtMHLQ==", + "cpu": [ + "arm64" + ], "dev": true, - "hasInstallScript": true, "license": "MIT", - "bin": { - "esbuild": "bin/esbuild" - }, + "optional": true, + "os": [ + "android" + ], "engines": { "node": ">=12" - }, - "optionalDependencies": { - "@esbuild/android-arm": "0.18.20", - "@esbuild/android-arm64": "0.18.20", - "@esbuild/android-x64": "0.18.20", - "@esbuild/darwin-arm64": "0.18.20", - "@esbuild/darwin-x64": "0.18.20", - "@esbuild/freebsd-arm64": "0.18.20", - "@esbuild/freebsd-x64": "0.18.20", - "@esbuild/linux-arm": "0.18.20", - "@esbuild/linux-arm64": "0.18.20", - "@esbuild/linux-ia32": "0.18.20", - "@esbuild/linux-loong64": "0.18.20", - "@esbuild/linux-mips64el": "0.18.20", - "@esbuild/linux-ppc64": "0.18.20", - "@esbuild/linux-riscv64": "0.18.20", - "@esbuild/linux-s390x": "0.18.20", - "@esbuild/linux-x64": "0.18.20", - "@esbuild/netbsd-x64": "0.18.20", - "@esbuild/openbsd-x64": "0.18.20", - "@esbuild/sunos-x64": "0.18.20", - "@esbuild/win32-arm64": "0.18.20", - "@esbuild/win32-ia32": "0.18.20", - "@esbuild/win32-x64": "0.18.20" } }, - "node_modules/@esbuild-kit/esm-loader": { - "version": "2.6.5", + "node_modules/@esbuild-kit/core-utils/node_modules/@esbuild/android-x64": { + "version": "0.18.20", + "resolved": "https://registry.npmjs.org/@esbuild/android-x64/-/android-x64-0.18.20.tgz", + "integrity": "sha512-8GDdlePJA8D6zlZYJV/jnrRAi6rOiNaCC/JclcXpB+KIuvfBN4owLtgzY2bsxnx666XjJx2kDPUmnTtR8qKQUg==", + "cpu": [ + "x64" + ], "dev": true, "license": "MIT", - "dependencies": { - "@esbuild-kit/core-utils": "^3.3.2", - "get-tsconfig": "^4.7.0" + "optional": true, + "os": [ + "android" + ], + "engines": { + "node": ">=12" } }, - "node_modules/@esbuild/darwin-arm64": { - "version": "0.25.11", + "node_modules/@esbuild-kit/core-utils/node_modules/@esbuild/darwin-arm64": { + "version": "0.18.20", "cpu": [ "arm64" ], @@ -3090,909 +3069,1103 @@ "darwin" ], "engines": { - "node": ">=18" + "node": ">=12" } }, - "node_modules/@eslint-community/eslint-utils": { - "version": "4.9.0", + "node_modules/@esbuild-kit/core-utils/node_modules/@esbuild/darwin-x64": { + "version": "0.18.20", + "resolved": "https://registry.npmjs.org/@esbuild/darwin-x64/-/darwin-x64-0.18.20.tgz", + "integrity": "sha512-pc5gxlMDxzm513qPGbCbDukOdsGtKhfxD1zJKXjCCcU7ju50O7MeAZ8c4krSJcOIJGFR+qx21yMMVYwiQvyTyQ==", + "cpu": [ + "x64" + ], "dev": true, "license": "MIT", - "dependencies": { - "eslint-visitor-keys": "^3.4.3" - }, + "optional": true, + "os": [ + "darwin" + ], "engines": { - "node": "^12.22.0 || ^14.17.0 || >=16.0.0" - }, - "funding": { - "url": "https://opencollective.com/eslint" - }, - "peerDependencies": { - "eslint": "^6.0.0 || ^7.0.0 || >=8.0.0" + "node": ">=12" } }, - "node_modules/@eslint-community/eslint-utils/node_modules/eslint-visitor-keys": { - "version": "3.4.3", + "node_modules/@esbuild-kit/core-utils/node_modules/@esbuild/freebsd-arm64": { + "version": "0.18.20", + "resolved": "https://registry.npmjs.org/@esbuild/freebsd-arm64/-/freebsd-arm64-0.18.20.tgz", + "integrity": "sha512-yqDQHy4QHevpMAaxhhIwYPMv1NECwOvIpGCZkECn8w2WFHXjEwrBn3CeNIYsibZ/iZEUemj++M26W3cNR5h+Tw==", + "cpu": [ + "arm64" + ], "dev": true, - "license": "Apache-2.0", + "license": "MIT", + "optional": true, + "os": [ + "freebsd" + ], "engines": { - "node": "^12.22.0 || ^14.17.0 || >=16.0.0" - }, - "funding": { - "url": "https://opencollective.com/eslint" + "node": ">=12" } }, - "node_modules/@eslint-community/regexpp": { - "version": "4.12.2", + "node_modules/@esbuild-kit/core-utils/node_modules/@esbuild/freebsd-x64": { + "version": "0.18.20", + "resolved": "https://registry.npmjs.org/@esbuild/freebsd-x64/-/freebsd-x64-0.18.20.tgz", + "integrity": "sha512-tgWRPPuQsd3RmBZwarGVHZQvtzfEBOreNuxEMKFcd5DaDn2PbBxfwLcj4+aenoh7ctXcbXmOQIn8HI6mCSw5MQ==", + "cpu": [ + "x64" + ], "dev": true, "license": "MIT", + "optional": true, + "os": [ + "freebsd" + ], "engines": { - "node": "^12.0.0 || ^14.0.0 || >=16.0.0" + "node": ">=12" } }, - "node_modules/@eslint/config-array": { - "version": "0.21.1", + "node_modules/@esbuild-kit/core-utils/node_modules/@esbuild/linux-arm": { + "version": "0.18.20", + "resolved": "https://registry.npmjs.org/@esbuild/linux-arm/-/linux-arm-0.18.20.tgz", + "integrity": "sha512-/5bHkMWnq1EgKr1V+Ybz3s1hWXok7mDFUMQ4cG10AfW3wL02PSZi5kFpYKrptDsgb2WAJIvRcDm+qIvXf/apvg==", + "cpu": [ + "arm" + ], "dev": true, - "license": "Apache-2.0", - "dependencies": { - "@eslint/object-schema": "^2.1.7", - "debug": "^4.3.1", - "minimatch": "^3.1.2" - }, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], "engines": { - "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + "node": ">=12" } }, - "node_modules/@eslint/config-array/node_modules/brace-expansion": { - "version": "1.1.12", + "node_modules/@esbuild-kit/core-utils/node_modules/@esbuild/linux-arm64": { + "version": "0.18.20", + "resolved": "https://registry.npmjs.org/@esbuild/linux-arm64/-/linux-arm64-0.18.20.tgz", + "integrity": "sha512-2YbscF+UL7SQAVIpnWvYwM+3LskyDmPhe31pE7/aoTMFKKzIc9lLbyGUpmmb8a8AixOL61sQ/mFh3jEjHYFvdA==", + "cpu": [ + "arm64" + ], "dev": true, "license": "MIT", - "dependencies": { - "balanced-match": "^1.0.0", - "concat-map": "0.0.1" + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=12" } }, - "node_modules/@eslint/config-array/node_modules/minimatch": { - "version": "3.1.2", + "node_modules/@esbuild-kit/core-utils/node_modules/@esbuild/linux-ia32": { + "version": "0.18.20", + "resolved": "https://registry.npmjs.org/@esbuild/linux-ia32/-/linux-ia32-0.18.20.tgz", + "integrity": "sha512-P4etWwq6IsReT0E1KHU40bOnzMHoH73aXp96Fs8TIT6z9Hu8G6+0SHSw9i2isWrD2nbx2qo5yUqACgdfVGx7TA==", + "cpu": [ + "ia32" + ], "dev": true, - "license": "ISC", - "dependencies": { - "brace-expansion": "^1.1.7" - }, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], "engines": { - "node": "*" + "node": ">=12" } }, - "node_modules/@eslint/config-helpers": { - "version": "0.4.1", + "node_modules/@esbuild-kit/core-utils/node_modules/@esbuild/linux-loong64": { + "version": "0.18.20", + "resolved": "https://registry.npmjs.org/@esbuild/linux-loong64/-/linux-loong64-0.18.20.tgz", + "integrity": "sha512-nXW8nqBTrOpDLPgPY9uV+/1DjxoQ7DoB2N8eocyq8I9XuqJ7BiAMDMf9n1xZM9TgW0J8zrquIb/A7s3BJv7rjg==", + "cpu": [ + "loong64" + ], "dev": true, - "license": "Apache-2.0", - "dependencies": { - "@eslint/core": "^0.16.0" - }, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], "engines": { - "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + "node": ">=12" } }, - "node_modules/@eslint/core": { - "version": "0.16.0", + "node_modules/@esbuild-kit/core-utils/node_modules/@esbuild/linux-mips64el": { + "version": "0.18.20", + "resolved": "https://registry.npmjs.org/@esbuild/linux-mips64el/-/linux-mips64el-0.18.20.tgz", + "integrity": "sha512-d5NeaXZcHp8PzYy5VnXV3VSd2D328Zb+9dEq5HE6bw6+N86JVPExrA6O68OPwobntbNJ0pzCpUFZTo3w0GyetQ==", + "cpu": [ + "mips64el" + ], "dev": true, - "license": "Apache-2.0", - "dependencies": { - "@types/json-schema": "^7.0.15" - }, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], "engines": { - "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + "node": ">=12" } }, - "node_modules/@eslint/eslintrc": { - "version": "3.3.1", + "node_modules/@esbuild-kit/core-utils/node_modules/@esbuild/linux-ppc64": { + "version": "0.18.20", + "resolved": "https://registry.npmjs.org/@esbuild/linux-ppc64/-/linux-ppc64-0.18.20.tgz", + "integrity": "sha512-WHPyeScRNcmANnLQkq6AfyXRFr5D6N2sKgkFo2FqguP44Nw2eyDlbTdZwd9GYk98DZG9QItIiTlFLHJHjxP3FA==", + "cpu": [ + "ppc64" + ], "dev": true, "license": "MIT", - "dependencies": { - "ajv": "^6.12.4", - "debug": "^4.3.2", - "espree": "^10.0.1", - "globals": "^14.0.0", - "ignore": "^5.2.0", - "import-fresh": "^3.2.1", - "js-yaml": "^4.1.0", - "minimatch": "^3.1.2", - "strip-json-comments": "^3.1.1" - }, + "optional": true, + "os": [ + "linux" + ], "engines": { - "node": "^18.18.0 || ^20.9.0 || >=21.1.0" - }, - "funding": { - "url": "https://opencollective.com/eslint" + "node": ">=12" } }, - "node_modules/@eslint/eslintrc/node_modules/argparse": { - "version": "2.0.1", - "dev": true, - "license": "Python-2.0" - }, - "node_modules/@eslint/eslintrc/node_modules/brace-expansion": { - "version": "1.1.12", + "node_modules/@esbuild-kit/core-utils/node_modules/@esbuild/linux-riscv64": { + "version": "0.18.20", + "resolved": "https://registry.npmjs.org/@esbuild/linux-riscv64/-/linux-riscv64-0.18.20.tgz", + "integrity": "sha512-WSxo6h5ecI5XH34KC7w5veNnKkju3zBRLEQNY7mv5mtBmrP/MjNBCAlsM2u5hDBlS3NGcTQpoBvRzqBcRtpq1A==", + "cpu": [ + "riscv64" + ], "dev": true, "license": "MIT", - "dependencies": { - "balanced-match": "^1.0.0", - "concat-map": "0.0.1" + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=12" } }, - "node_modules/@eslint/eslintrc/node_modules/js-yaml": { - "version": "4.1.0", + "node_modules/@esbuild-kit/core-utils/node_modules/@esbuild/linux-s390x": { + "version": "0.18.20", + "resolved": "https://registry.npmjs.org/@esbuild/linux-s390x/-/linux-s390x-0.18.20.tgz", + "integrity": "sha512-+8231GMs3mAEth6Ja1iK0a1sQ3ohfcpzpRLH8uuc5/KVDFneH6jtAJLFGafpzpMRO6DzJ6AvXKze9LfFMrIHVQ==", + "cpu": [ + "s390x" + ], "dev": true, "license": "MIT", - "dependencies": { - "argparse": "^2.0.1" - }, - "bin": { - "js-yaml": "bin/js-yaml.js" + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=12" } }, - "node_modules/@eslint/eslintrc/node_modules/minimatch": { - "version": "3.1.2", + "node_modules/@esbuild-kit/core-utils/node_modules/@esbuild/linux-x64": { + "version": "0.18.20", + "resolved": "https://registry.npmjs.org/@esbuild/linux-x64/-/linux-x64-0.18.20.tgz", + "integrity": "sha512-UYqiqemphJcNsFEskc73jQ7B9jgwjWrSayxawS6UVFZGWrAAtkzjxSqnoclCXxWtfwLdzU+vTpcNYhpn43uP1w==", + "cpu": [ + "x64" + ], "dev": true, - "license": "ISC", - "dependencies": { - "brace-expansion": "^1.1.7" - }, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], "engines": { - "node": "*" + "node": ">=12" } }, - "node_modules/@eslint/js": { - "version": "9.38.0", + "node_modules/@esbuild-kit/core-utils/node_modules/@esbuild/netbsd-x64": { + "version": "0.18.20", + "resolved": "https://registry.npmjs.org/@esbuild/netbsd-x64/-/netbsd-x64-0.18.20.tgz", + "integrity": "sha512-iO1c++VP6xUBUmltHZoMtCUdPlnPGdBom6IrO4gyKPFFVBKioIImVooR5I83nTew5UOYrk3gIJhbZh8X44y06A==", + "cpu": [ + "x64" + ], "dev": true, "license": "MIT", + "optional": true, + "os": [ + "netbsd" + ], "engines": { - "node": "^18.18.0 || ^20.9.0 || >=21.1.0" - }, - "funding": { - "url": "https://eslint.org/donate" + "node": ">=12" } }, - "node_modules/@eslint/object-schema": { - "version": "2.1.7", + "node_modules/@esbuild-kit/core-utils/node_modules/@esbuild/openbsd-x64": { + "version": "0.18.20", + "resolved": "https://registry.npmjs.org/@esbuild/openbsd-x64/-/openbsd-x64-0.18.20.tgz", + "integrity": "sha512-e5e4YSsuQfX4cxcygw/UCPIEP6wbIL+se3sxPdCiMbFLBWu0eiZOJ7WoD+ptCLrmjZBK1Wk7I6D/I3NglUGOxg==", + "cpu": [ + "x64" + ], "dev": true, - "license": "Apache-2.0", + "license": "MIT", + "optional": true, + "os": [ + "openbsd" + ], "engines": { - "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + "node": ">=12" } }, - "node_modules/@eslint/plugin-kit": { - "version": "0.4.0", + "node_modules/@esbuild-kit/core-utils/node_modules/@esbuild/sunos-x64": { + "version": "0.18.20", + "resolved": "https://registry.npmjs.org/@esbuild/sunos-x64/-/sunos-x64-0.18.20.tgz", + "integrity": "sha512-kDbFRFp0YpTQVVrqUd5FTYmWo45zGaXe0X8E1G/LKFC0v8x0vWrhOWSLITcCn63lmZIxfOMXtCfti/RxN/0wnQ==", + "cpu": [ + "x64" + ], "dev": true, - "license": "Apache-2.0", - "dependencies": { - "@eslint/core": "^0.16.0", - "levn": "^0.4.1" - }, + "license": "MIT", + "optional": true, + "os": [ + "sunos" + ], "engines": { - "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + "node": ">=12" } }, - "node_modules/@ethereumjs/common": { - "version": "2.6.5", + "node_modules/@esbuild-kit/core-utils/node_modules/@esbuild/win32-arm64": { + "version": "0.18.20", + "resolved": "https://registry.npmjs.org/@esbuild/win32-arm64/-/win32-arm64-0.18.20.tgz", + "integrity": "sha512-ddYFR6ItYgoaq4v4JmQQaAI5s7npztfV4Ag6NrhiaW0RrnOXqBkgwZLofVTlq1daVTQNhtI5oieTvkRPfZrePg==", + "cpu": [ + "arm64" + ], + "dev": true, "license": "MIT", - "dependencies": { - "crc-32": "^1.2.0", - "ethereumjs-util": "^7.1.5" + "optional": true, + "os": [ + "win32" + ], + "engines": { + "node": ">=12" } }, - "node_modules/@ethereumjs/rlp": { - "version": "5.0.2", - "license": "MPL-2.0", - "bin": { - "rlp": "bin/rlp.cjs" - }, + "node_modules/@esbuild-kit/core-utils/node_modules/@esbuild/win32-ia32": { + "version": "0.18.20", + "resolved": "https://registry.npmjs.org/@esbuild/win32-ia32/-/win32-ia32-0.18.20.tgz", + "integrity": "sha512-Wv7QBi3ID/rROT08SABTS7eV4hX26sVduqDOTe1MvGMjNd3EjOz4b7zeexIR62GTIEKrfJXKL9LFxTYgkyeu7g==", + "cpu": [ + "ia32" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "win32" + ], "engines": { - "node": ">=18" + "node": ">=12" } }, - "node_modules/@ethereumjs/tx": { - "version": "3.5.2", - "license": "MPL-2.0", - "dependencies": { - "@ethereumjs/common": "^2.6.4", - "ethereumjs-util": "^7.1.5" + "node_modules/@esbuild-kit/core-utils/node_modules/@esbuild/win32-x64": { + "version": "0.18.20", + "resolved": "https://registry.npmjs.org/@esbuild/win32-x64/-/win32-x64-0.18.20.tgz", + "integrity": "sha512-kTdfRcSiDfQca/y9QIkng02avJ+NCaQvrMejlsB3RRv5sE9rRoeBPISaZpKxHELzRxZyLvNts1P27W3wV+8geQ==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "win32" + ], + "engines": { + "node": ">=12" } }, - "node_modules/@ethereumjs/util": { - "version": "9.1.0", - "license": "MPL-2.0", - "dependencies": { - "@ethereumjs/rlp": "^5.0.2", - "ethereum-cryptography": "^2.2.1" + "node_modules/@esbuild-kit/core-utils/node_modules/esbuild": { + "version": "0.18.20", + "dev": true, + "hasInstallScript": true, + "license": "MIT", + "bin": { + "esbuild": "bin/esbuild" }, "engines": { - "node": ">=18" + "node": ">=12" + }, + "optionalDependencies": { + "@esbuild/android-arm": "0.18.20", + "@esbuild/android-arm64": "0.18.20", + "@esbuild/android-x64": "0.18.20", + "@esbuild/darwin-arm64": "0.18.20", + "@esbuild/darwin-x64": "0.18.20", + "@esbuild/freebsd-arm64": "0.18.20", + "@esbuild/freebsd-x64": "0.18.20", + "@esbuild/linux-arm": "0.18.20", + "@esbuild/linux-arm64": "0.18.20", + "@esbuild/linux-ia32": "0.18.20", + "@esbuild/linux-loong64": "0.18.20", + "@esbuild/linux-mips64el": "0.18.20", + "@esbuild/linux-ppc64": "0.18.20", + "@esbuild/linux-riscv64": "0.18.20", + "@esbuild/linux-s390x": "0.18.20", + "@esbuild/linux-x64": "0.18.20", + "@esbuild/netbsd-x64": "0.18.20", + "@esbuild/openbsd-x64": "0.18.20", + "@esbuild/sunos-x64": "0.18.20", + "@esbuild/win32-arm64": "0.18.20", + "@esbuild/win32-ia32": "0.18.20", + "@esbuild/win32-x64": "0.18.20" } }, - "node_modules/@ethereumjs/util/node_modules/@noble/curves": { - "version": "1.4.2", + "node_modules/@esbuild-kit/esm-loader": { + "version": "2.6.5", + "dev": true, "license": "MIT", "dependencies": { - "@noble/hashes": "1.4.0" - }, - "funding": { - "url": "https://paulmillr.com/funding/" + "@esbuild-kit/core-utils": "^3.3.2", + "get-tsconfig": "^4.7.0" } }, - "node_modules/@ethereumjs/util/node_modules/@noble/hashes": { - "version": "1.4.0", + "node_modules/@esbuild/aix-ppc64": { + "version": "0.25.11", + "resolved": "https://registry.npmjs.org/@esbuild/aix-ppc64/-/aix-ppc64-0.25.11.tgz", + "integrity": "sha512-Xt1dOL13m8u0WE8iplx9Ibbm+hFAO0GsU2P34UNoDGvZYkY8ifSiy6Zuc1lYxfG7svWE2fzqCUmFp5HCn51gJg==", + "cpu": [ + "ppc64" + ], + "dev": true, "license": "MIT", + "optional": true, + "os": [ + "aix" + ], "engines": { - "node": ">= 16" - }, - "funding": { - "url": "https://paulmillr.com/funding/" + "node": ">=18" } }, - "node_modules/@ethereumjs/util/node_modules/@scure/base": { - "version": "1.1.9", + "node_modules/@esbuild/android-arm": { + "version": "0.25.11", + "resolved": "https://registry.npmjs.org/@esbuild/android-arm/-/android-arm-0.25.11.tgz", + "integrity": "sha512-uoa7dU+Dt3HYsethkJ1k6Z9YdcHjTrSb5NUy66ZfZaSV8hEYGD5ZHbEMXnqLFlbBflLsl89Zke7CAdDJ4JI+Gg==", + "cpu": [ + "arm" + ], + "dev": true, "license": "MIT", - "funding": { - "url": "https://paulmillr.com/funding/" + "optional": true, + "os": [ + "android" + ], + "engines": { + "node": ">=18" } }, - "node_modules/@ethereumjs/util/node_modules/@scure/bip32": { - "version": "1.4.0", + "node_modules/@esbuild/android-arm64": { + "version": "0.25.11", + "resolved": "https://registry.npmjs.org/@esbuild/android-arm64/-/android-arm64-0.25.11.tgz", + "integrity": "sha512-9slpyFBc4FPPz48+f6jyiXOx/Y4v34TUeDDXJpZqAWQn/08lKGeD8aDp9TMn9jDz2CiEuHwfhRmGBvpnd/PWIQ==", + "cpu": [ + "arm64" + ], + "dev": true, "license": "MIT", - "dependencies": { - "@noble/curves": "~1.4.0", - "@noble/hashes": "~1.4.0", - "@scure/base": "~1.1.6" - }, - "funding": { - "url": "https://paulmillr.com/funding/" + "optional": true, + "os": [ + "android" + ], + "engines": { + "node": ">=18" } }, - "node_modules/@ethereumjs/util/node_modules/@scure/bip39": { - "version": "1.3.0", + "node_modules/@esbuild/android-x64": { + "version": "0.25.11", + "resolved": "https://registry.npmjs.org/@esbuild/android-x64/-/android-x64-0.25.11.tgz", + "integrity": "sha512-Sgiab4xBjPU1QoPEIqS3Xx+R2lezu0LKIEcYe6pftr56PqPygbB7+szVnzoShbx64MUupqoE0KyRlN7gezbl8g==", + "cpu": [ + "x64" + ], + "dev": true, "license": "MIT", - "dependencies": { - "@noble/hashes": "~1.4.0", - "@scure/base": "~1.1.6" - }, - "funding": { - "url": "https://paulmillr.com/funding/" + "optional": true, + "os": [ + "android" + ], + "engines": { + "node": ">=18" } }, - "node_modules/@ethereumjs/util/node_modules/ethereum-cryptography": { - "version": "2.2.1", + "node_modules/@esbuild/darwin-arm64": { + "version": "0.25.11", + "cpu": [ + "arm64" + ], + "dev": true, "license": "MIT", - "dependencies": { - "@noble/curves": "1.4.2", - "@noble/hashes": "1.4.0", - "@scure/bip32": "1.4.0", - "@scure/bip39": "1.3.0" - } - }, - "node_modules/@ethersproject/abi": { - "version": "5.8.0", - "funding": [ - { - "type": "individual", - "url": "https://gitcoin.co/grants/13/ethersjs-complete-simple-and-tiny-2" - }, - { - "type": "individual", - "url": "https://www.buymeacoffee.com/ricmoo" - } + "optional": true, + "os": [ + "darwin" ], - "license": "MIT", - "dependencies": { - "@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" + "engines": { + "node": ">=18" } }, - "node_modules/@ethersproject/abstract-provider": { - "version": "5.8.0", - "funding": [ - { - "type": "individual", - "url": "https://gitcoin.co/grants/13/ethersjs-complete-simple-and-tiny-2" - }, - { - "type": "individual", - "url": "https://www.buymeacoffee.com/ricmoo" - } + "node_modules/@esbuild/darwin-x64": { + "version": "0.25.11", + "resolved": "https://registry.npmjs.org/@esbuild/darwin-x64/-/darwin-x64-0.25.11.tgz", + "integrity": "sha512-+hfp3yfBalNEpTGp9loYgbknjR695HkqtY3d3/JjSRUyPg/xd6q+mQqIb5qdywnDxRZykIHs3axEqU6l1+oWEQ==", + "cpu": [ + "x64" ], + "dev": true, "license": "MIT", - "dependencies": { - "@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" + "optional": true, + "os": [ + "darwin" + ], + "engines": { + "node": ">=18" } }, - "node_modules/@ethersproject/abstract-signer": { - "version": "5.8.0", - "funding": [ - { - "type": "individual", - "url": "https://gitcoin.co/grants/13/ethersjs-complete-simple-and-tiny-2" - }, - { - "type": "individual", - "url": "https://www.buymeacoffee.com/ricmoo" - } + "node_modules/@esbuild/freebsd-arm64": { + "version": "0.25.11", + "resolved": "https://registry.npmjs.org/@esbuild/freebsd-arm64/-/freebsd-arm64-0.25.11.tgz", + "integrity": "sha512-CmKjrnayyTJF2eVuO//uSjl/K3KsMIeYeyN7FyDBjsR3lnSJHaXlVoAK8DZa7lXWChbuOk7NjAc7ygAwrnPBhA==", + "cpu": [ + "arm64" ], + "dev": true, "license": "MIT", - "dependencies": { - "@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" + "optional": true, + "os": [ + "freebsd" + ], + "engines": { + "node": ">=18" } }, - "node_modules/@ethersproject/address": { - "version": "5.8.0", - "funding": [ - { - "type": "individual", - "url": "https://gitcoin.co/grants/13/ethersjs-complete-simple-and-tiny-2" - }, - { - "type": "individual", - "url": "https://www.buymeacoffee.com/ricmoo" - } + "node_modules/@esbuild/freebsd-x64": { + "version": "0.25.11", + "resolved": "https://registry.npmjs.org/@esbuild/freebsd-x64/-/freebsd-x64-0.25.11.tgz", + "integrity": "sha512-Dyq+5oscTJvMaYPvW3x3FLpi2+gSZTCE/1ffdwuM6G1ARang/mb3jvjxs0mw6n3Lsw84ocfo9CrNMqc5lTfGOw==", + "cpu": [ + "x64" ], + "dev": true, "license": "MIT", - "dependencies": { - "@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" + "optional": true, + "os": [ + "freebsd" + ], + "engines": { + "node": ">=18" } }, - "node_modules/@ethersproject/base64": { - "version": "5.8.0", - "funding": [ - { - "type": "individual", - "url": "https://gitcoin.co/grants/13/ethersjs-complete-simple-and-tiny-2" - }, - { - "type": "individual", - "url": "https://www.buymeacoffee.com/ricmoo" - } + "node_modules/@esbuild/linux-arm": { + "version": "0.25.11", + "resolved": "https://registry.npmjs.org/@esbuild/linux-arm/-/linux-arm-0.25.11.tgz", + "integrity": "sha512-TBMv6B4kCfrGJ8cUPo7vd6NECZH/8hPpBHHlYI3qzoYFvWu2AdTvZNuU/7hsbKWqu/COU7NIK12dHAAqBLLXgw==", + "cpu": [ + "arm" ], + "dev": true, "license": "MIT", - "dependencies": { - "@ethersproject/bytes": "^5.8.0" + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=18" } }, - "node_modules/@ethersproject/basex": { - "version": "5.8.0", - "funding": [ - { - "type": "individual", - "url": "https://gitcoin.co/grants/13/ethersjs-complete-simple-and-tiny-2" - }, - { - "type": "individual", - "url": "https://www.buymeacoffee.com/ricmoo" - } + "node_modules/@esbuild/linux-arm64": { + "version": "0.25.11", + "resolved": "https://registry.npmjs.org/@esbuild/linux-arm64/-/linux-arm64-0.25.11.tgz", + "integrity": "sha512-Qr8AzcplUhGvdyUF08A1kHU3Vr2O88xxP0Tm8GcdVOUm25XYcMPp2YqSVHbLuXzYQMf9Bh/iKx7YPqECs6ffLA==", + "cpu": [ + "arm64" ], + "dev": true, "license": "MIT", - "dependencies": { - "@ethersproject/bytes": "^5.8.0", - "@ethersproject/properties": "^5.8.0" + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=18" } }, - "node_modules/@ethersproject/bignumber": { - "version": "5.8.0", - "funding": [ - { - "type": "individual", - "url": "https://gitcoin.co/grants/13/ethersjs-complete-simple-and-tiny-2" - }, - { - "type": "individual", - "url": "https://www.buymeacoffee.com/ricmoo" - } + "node_modules/@esbuild/linux-ia32": { + "version": "0.25.11", + "resolved": "https://registry.npmjs.org/@esbuild/linux-ia32/-/linux-ia32-0.25.11.tgz", + "integrity": "sha512-TmnJg8BMGPehs5JKrCLqyWTVAvielc615jbkOirATQvWWB1NMXY77oLMzsUjRLa0+ngecEmDGqt5jiDC6bfvOw==", + "cpu": [ + "ia32" ], + "dev": true, "license": "MIT", - "dependencies": { - "@ethersproject/bytes": "^5.8.0", - "@ethersproject/logger": "^5.8.0", - "bn.js": "^5.2.1" + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=18" } }, - "node_modules/@ethersproject/bytes": { - "version": "5.8.0", - "funding": [ - { - "type": "individual", - "url": "https://gitcoin.co/grants/13/ethersjs-complete-simple-and-tiny-2" - }, - { - "type": "individual", - "url": "https://www.buymeacoffee.com/ricmoo" - } + "node_modules/@esbuild/linux-loong64": { + "version": "0.25.11", + "resolved": "https://registry.npmjs.org/@esbuild/linux-loong64/-/linux-loong64-0.25.11.tgz", + "integrity": "sha512-DIGXL2+gvDaXlaq8xruNXUJdT5tF+SBbJQKbWy/0J7OhU8gOHOzKmGIlfTTl6nHaCOoipxQbuJi7O++ldrxgMw==", + "cpu": [ + "loong64" ], + "dev": true, "license": "MIT", - "dependencies": { - "@ethersproject/logger": "^5.8.0" + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=18" } }, - "node_modules/@ethersproject/constants": { - "version": "5.8.0", - "funding": [ - { - "type": "individual", - "url": "https://gitcoin.co/grants/13/ethersjs-complete-simple-and-tiny-2" - }, - { - "type": "individual", - "url": "https://www.buymeacoffee.com/ricmoo" - } + "node_modules/@esbuild/linux-mips64el": { + "version": "0.25.11", + "resolved": "https://registry.npmjs.org/@esbuild/linux-mips64el/-/linux-mips64el-0.25.11.tgz", + "integrity": "sha512-Osx1nALUJu4pU43o9OyjSCXokFkFbyzjXb6VhGIJZQ5JZi8ylCQ9/LFagolPsHtgw6himDSyb5ETSfmp4rpiKQ==", + "cpu": [ + "mips64el" ], + "dev": true, "license": "MIT", - "dependencies": { - "@ethersproject/bignumber": "^5.8.0" + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=18" } }, - "node_modules/@ethersproject/contracts": { - "version": "5.8.0", - "funding": [ - { - "type": "individual", - "url": "https://gitcoin.co/grants/13/ethersjs-complete-simple-and-tiny-2" - }, - { - "type": "individual", - "url": "https://www.buymeacoffee.com/ricmoo" - } + "node_modules/@esbuild/linux-ppc64": { + "version": "0.25.11", + "resolved": "https://registry.npmjs.org/@esbuild/linux-ppc64/-/linux-ppc64-0.25.11.tgz", + "integrity": "sha512-nbLFgsQQEsBa8XSgSTSlrnBSrpoWh7ioFDUmwo158gIm5NNP+17IYmNWzaIzWmgCxq56vfr34xGkOcZ7jX6CPw==", + "cpu": [ + "ppc64" ], + "dev": true, "license": "MIT", - "dependencies": { - "@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" + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=18" } }, - "node_modules/@ethersproject/hash": { - "version": "5.8.0", - "funding": [ - { - "type": "individual", - "url": "https://gitcoin.co/grants/13/ethersjs-complete-simple-and-tiny-2" - }, - { - "type": "individual", - "url": "https://www.buymeacoffee.com/ricmoo" - } + "node_modules/@esbuild/linux-riscv64": { + "version": "0.25.11", + "resolved": "https://registry.npmjs.org/@esbuild/linux-riscv64/-/linux-riscv64-0.25.11.tgz", + "integrity": "sha512-HfyAmqZi9uBAbgKYP1yGuI7tSREXwIb438q0nqvlpxAOs3XnZ8RsisRfmVsgV486NdjD7Mw2UrFSw51lzUk1ww==", + "cpu": [ + "riscv64" ], + "dev": true, "license": "MIT", - "dependencies": { - "@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" + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=18" } }, - "node_modules/@ethersproject/hdnode": { - "version": "5.8.0", - "funding": [ - { - "type": "individual", - "url": "https://gitcoin.co/grants/13/ethersjs-complete-simple-and-tiny-2" - }, - { - "type": "individual", - "url": "https://www.buymeacoffee.com/ricmoo" - } + "node_modules/@esbuild/linux-s390x": { + "version": "0.25.11", + "resolved": "https://registry.npmjs.org/@esbuild/linux-s390x/-/linux-s390x-0.25.11.tgz", + "integrity": "sha512-HjLqVgSSYnVXRisyfmzsH6mXqyvj0SA7pG5g+9W7ESgwA70AXYNpfKBqh1KbTxmQVaYxpzA/SvlB9oclGPbApw==", + "cpu": [ + "s390x" ], + "dev": true, "license": "MIT", - "dependencies": { - "@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" + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=18" } }, - "node_modules/@ethersproject/json-wallets": { - "version": "5.8.0", - "funding": [ - { - "type": "individual", - "url": "https://gitcoin.co/grants/13/ethersjs-complete-simple-and-tiny-2" - }, - { - "type": "individual", - "url": "https://www.buymeacoffee.com/ricmoo" - } + "node_modules/@esbuild/linux-x64": { + "version": "0.25.11", + "resolved": "https://registry.npmjs.org/@esbuild/linux-x64/-/linux-x64-0.25.11.tgz", + "integrity": "sha512-HSFAT4+WYjIhrHxKBwGmOOSpphjYkcswF449j6EjsjbinTZbp8PJtjsVK1XFJStdzXdy/jaddAep2FGY+wyFAQ==", + "cpu": [ + "x64" ], + "dev": true, "license": "MIT", - "dependencies": { - "@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" + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=18" } }, - "node_modules/@ethersproject/json-wallets/node_modules/aes-js": { - "version": "3.0.0", - "license": "MIT" - }, - "node_modules/@ethersproject/keccak256": { - "version": "5.8.0", - "funding": [ - { - "type": "individual", - "url": "https://gitcoin.co/grants/13/ethersjs-complete-simple-and-tiny-2" - }, - { - "type": "individual", - "url": "https://www.buymeacoffee.com/ricmoo" - } + "node_modules/@esbuild/netbsd-arm64": { + "version": "0.25.11", + "resolved": "https://registry.npmjs.org/@esbuild/netbsd-arm64/-/netbsd-arm64-0.25.11.tgz", + "integrity": "sha512-hr9Oxj1Fa4r04dNpWr3P8QKVVsjQhqrMSUzZzf+LZcYjZNqhA3IAfPQdEh1FLVUJSiu6sgAwp3OmwBfbFgG2Xg==", + "cpu": [ + "arm64" ], + "dev": true, "license": "MIT", - "dependencies": { - "@ethersproject/bytes": "^5.8.0", - "js-sha3": "0.8.0" + "optional": true, + "os": [ + "netbsd" + ], + "engines": { + "node": ">=18" } }, - "node_modules/@ethersproject/logger": { - "version": "5.8.0", - "funding": [ - { - "type": "individual", - "url": "https://gitcoin.co/grants/13/ethersjs-complete-simple-and-tiny-2" - }, - { - "type": "individual", - "url": "https://www.buymeacoffee.com/ricmoo" - } + "node_modules/@esbuild/netbsd-x64": { + "version": "0.25.11", + "resolved": "https://registry.npmjs.org/@esbuild/netbsd-x64/-/netbsd-x64-0.25.11.tgz", + "integrity": "sha512-u7tKA+qbzBydyj0vgpu+5h5AeudxOAGncb8N6C9Kh1N4n7wU1Xw1JDApsRjpShRpXRQlJLb9wY28ELpwdPcZ7A==", + "cpu": [ + "x64" ], - "license": "MIT" + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "netbsd" + ], + "engines": { + "node": ">=18" + } }, - "node_modules/@ethersproject/networks": { - "version": "5.8.0", - "funding": [ - { - "type": "individual", - "url": "https://gitcoin.co/grants/13/ethersjs-complete-simple-and-tiny-2" - }, - { - "type": "individual", - "url": "https://www.buymeacoffee.com/ricmoo" - } + "node_modules/@esbuild/openbsd-arm64": { + "version": "0.25.11", + "resolved": "https://registry.npmjs.org/@esbuild/openbsd-arm64/-/openbsd-arm64-0.25.11.tgz", + "integrity": "sha512-Qq6YHhayieor3DxFOoYM1q0q1uMFYb7cSpLD2qzDSvK1NAvqFi8Xgivv0cFC6J+hWVw2teCYltyy9/m/14ryHg==", + "cpu": [ + "arm64" ], + "dev": true, "license": "MIT", - "dependencies": { - "@ethersproject/logger": "^5.8.0" + "optional": true, + "os": [ + "openbsd" + ], + "engines": { + "node": ">=18" } }, - "node_modules/@ethersproject/pbkdf2": { - "version": "5.8.0", - "funding": [ - { - "type": "individual", - "url": "https://gitcoin.co/grants/13/ethersjs-complete-simple-and-tiny-2" - }, - { - "type": "individual", - "url": "https://www.buymeacoffee.com/ricmoo" - } + "node_modules/@esbuild/openbsd-x64": { + "version": "0.25.11", + "resolved": "https://registry.npmjs.org/@esbuild/openbsd-x64/-/openbsd-x64-0.25.11.tgz", + "integrity": "sha512-CN+7c++kkbrckTOz5hrehxWN7uIhFFlmS/hqziSFVWpAzpWrQoAG4chH+nN3Be+Kzv/uuo7zhX716x3Sn2Jduw==", + "cpu": [ + "x64" ], + "dev": true, "license": "MIT", - "dependencies": { - "@ethersproject/bytes": "^5.8.0", - "@ethersproject/sha2": "^5.8.0" + "optional": true, + "os": [ + "openbsd" + ], + "engines": { + "node": ">=18" } }, - "node_modules/@ethersproject/properties": { - "version": "5.8.0", - "funding": [ - { - "type": "individual", - "url": "https://gitcoin.co/grants/13/ethersjs-complete-simple-and-tiny-2" - }, - { - "type": "individual", - "url": "https://www.buymeacoffee.com/ricmoo" - } + "node_modules/@esbuild/openharmony-arm64": { + "version": "0.25.11", + "resolved": "https://registry.npmjs.org/@esbuild/openharmony-arm64/-/openharmony-arm64-0.25.11.tgz", + "integrity": "sha512-rOREuNIQgaiR+9QuNkbkxubbp8MSO9rONmwP5nKncnWJ9v5jQ4JxFnLu4zDSRPf3x4u+2VN4pM4RdyIzDty/wQ==", + "cpu": [ + "arm64" ], + "dev": true, "license": "MIT", - "dependencies": { - "@ethersproject/logger": "^5.8.0" + "optional": true, + "os": [ + "openharmony" + ], + "engines": { + "node": ">=18" } }, - "node_modules/@ethersproject/providers": { - "version": "5.8.0", - "funding": [ - { - "type": "individual", - "url": "https://gitcoin.co/grants/13/ethersjs-complete-simple-and-tiny-2" - }, - { - "type": "individual", - "url": "https://www.buymeacoffee.com/ricmoo" - } + "node_modules/@esbuild/sunos-x64": { + "version": "0.25.11", + "resolved": "https://registry.npmjs.org/@esbuild/sunos-x64/-/sunos-x64-0.25.11.tgz", + "integrity": "sha512-nq2xdYaWxyg9DcIyXkZhcYulC6pQ2FuCgem3LI92IwMgIZ69KHeY8T4Y88pcwoLIjbed8n36CyKoYRDygNSGhA==", + "cpu": [ + "x64" ], + "dev": true, "license": "MIT", - "dependencies": { - "@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": "8.18.0" + "optional": true, + "os": [ + "sunos" + ], + "engines": { + "node": ">=18" } }, - "node_modules/@ethersproject/providers/node_modules/ws": { - "version": "8.18.0", + "node_modules/@esbuild/win32-arm64": { + "version": "0.25.11", + "resolved": "https://registry.npmjs.org/@esbuild/win32-arm64/-/win32-arm64-0.25.11.tgz", + "integrity": "sha512-3XxECOWJq1qMZ3MN8srCJ/QfoLpL+VaxD/WfNRm1O3B4+AZ/BnLVgFbUV3eiRYDMXetciH16dwPbbHqwe1uU0Q==", + "cpu": [ + "arm64" + ], + "dev": true, "license": "MIT", + "optional": true, + "os": [ + "win32" + ], "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": ">=18" } }, - "node_modules/@ethersproject/random": { - "version": "5.8.0", - "funding": [ - { - "type": "individual", - "url": "https://gitcoin.co/grants/13/ethersjs-complete-simple-and-tiny-2" - }, - { - "type": "individual", - "url": "https://www.buymeacoffee.com/ricmoo" - } + "node_modules/@esbuild/win32-ia32": { + "version": "0.25.11", + "resolved": "https://registry.npmjs.org/@esbuild/win32-ia32/-/win32-ia32-0.25.11.tgz", + "integrity": "sha512-3ukss6gb9XZ8TlRyJlgLn17ecsK4NSQTmdIXRASVsiS2sQ6zPPZklNJT5GR5tE/MUarymmy8kCEf5xPCNCqVOA==", + "cpu": [ + "ia32" ], + "dev": true, "license": "MIT", - "dependencies": { - "@ethersproject/bytes": "^5.8.0", - "@ethersproject/logger": "^5.8.0" + "optional": true, + "os": [ + "win32" + ], + "engines": { + "node": ">=18" } }, - "node_modules/@ethersproject/rlp": { - "version": "5.8.0", - "funding": [ - { - "type": "individual", - "url": "https://gitcoin.co/grants/13/ethersjs-complete-simple-and-tiny-2" - }, - { - "type": "individual", - "url": "https://www.buymeacoffee.com/ricmoo" - } + "node_modules/@esbuild/win32-x64": { + "version": "0.25.11", + "resolved": "https://registry.npmjs.org/@esbuild/win32-x64/-/win32-x64-0.25.11.tgz", + "integrity": "sha512-D7Hpz6A2L4hzsRpPaCYkQnGOotdUpDzSGRIv9I+1ITdHROSFUWW95ZPZWQmGka1Fg7W3zFJowyn9WGwMJ0+KPA==", + "cpu": [ + "x64" ], + "dev": true, "license": "MIT", - "dependencies": { - "@ethersproject/bytes": "^5.8.0", - "@ethersproject/logger": "^5.8.0" + "optional": true, + "os": [ + "win32" + ], + "engines": { + "node": ">=18" } }, - "node_modules/@ethersproject/sha2": { - "version": "5.8.0", - "funding": [ - { - "type": "individual", - "url": "https://gitcoin.co/grants/13/ethersjs-complete-simple-and-tiny-2" - }, - { - "type": "individual", - "url": "https://www.buymeacoffee.com/ricmoo" - } - ], + "node_modules/@eslint-community/eslint-utils": { + "version": "4.9.0", + "dev": true, "license": "MIT", "dependencies": { - "@ethersproject/bytes": "^5.8.0", - "@ethersproject/logger": "^5.8.0", - "hash.js": "1.1.7" + "eslint-visitor-keys": "^3.4.3" + }, + "engines": { + "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + }, + "funding": { + "url": "https://opencollective.com/eslint" + }, + "peerDependencies": { + "eslint": "^6.0.0 || ^7.0.0 || >=8.0.0" } }, - "node_modules/@ethersproject/signing-key": { - "version": "5.8.0", - "funding": [ - { - "type": "individual", - "url": "https://gitcoin.co/grants/13/ethersjs-complete-simple-and-tiny-2" - }, - { - "type": "individual", - "url": "https://www.buymeacoffee.com/ricmoo" - } - ], - "license": "MIT", - "dependencies": { - "@ethersproject/bytes": "^5.8.0", - "@ethersproject/logger": "^5.8.0", - "@ethersproject/properties": "^5.8.0", - "bn.js": "^5.2.1", - "elliptic": "6.6.1", - "hash.js": "1.1.7" + "node_modules/@eslint-community/eslint-utils/node_modules/eslint-visitor-keys": { + "version": "3.4.3", + "dev": true, + "license": "Apache-2.0", + "engines": { + "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + }, + "funding": { + "url": "https://opencollective.com/eslint" } }, - "node_modules/@ethersproject/solidity": { - "version": "5.8.0", - "funding": [ - { - "type": "individual", - "url": "https://gitcoin.co/grants/13/ethersjs-complete-simple-and-tiny-2" - }, - { - "type": "individual", - "url": "https://www.buymeacoffee.com/ricmoo" - } - ], + "node_modules/@eslint-community/regexpp": { + "version": "4.12.2", + "dev": true, "license": "MIT", + "engines": { + "node": "^12.0.0 || ^14.0.0 || >=16.0.0" + } + }, + "node_modules/@eslint/config-array": { + "version": "0.21.1", + "dev": true, + "license": "Apache-2.0", "dependencies": { - "@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" + "@eslint/object-schema": "^2.1.7", + "debug": "^4.3.1", + "minimatch": "^3.1.2" + }, + "engines": { + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" } }, - "node_modules/@ethersproject/strings": { - "version": "5.8.0", - "funding": [ - { - "type": "individual", - "url": "https://gitcoin.co/grants/13/ethersjs-complete-simple-and-tiny-2" - }, - { - "type": "individual", - "url": "https://www.buymeacoffee.com/ricmoo" - } - ], + "node_modules/@eslint/config-array/node_modules/brace-expansion": { + "version": "1.1.12", + "dev": true, "license": "MIT", "dependencies": { - "@ethersproject/bytes": "^5.8.0", - "@ethersproject/constants": "^5.8.0", - "@ethersproject/logger": "^5.8.0" + "balanced-match": "^1.0.0", + "concat-map": "0.0.1" } }, - "node_modules/@ethersproject/transactions": { - "version": "5.8.0", - "funding": [ - { - "type": "individual", - "url": "https://gitcoin.co/grants/13/ethersjs-complete-simple-and-tiny-2" - }, - { - "type": "individual", - "url": "https://www.buymeacoffee.com/ricmoo" - } - ], - "license": "MIT", + "node_modules/@eslint/config-array/node_modules/minimatch": { + "version": "3.1.2", + "dev": true, + "license": "ISC", "dependencies": { - "@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" + "brace-expansion": "^1.1.7" + }, + "engines": { + "node": "*" } }, - "node_modules/@ethersproject/units": { - "version": "5.8.0", - "funding": [ - { - "type": "individual", - "url": "https://gitcoin.co/grants/13/ethersjs-complete-simple-and-tiny-2" - }, - { - "type": "individual", - "url": "https://www.buymeacoffee.com/ricmoo" - } - ], - "license": "MIT", + "node_modules/@eslint/config-helpers": { + "version": "0.4.1", + "dev": true, + "license": "Apache-2.0", "dependencies": { - "@ethersproject/bignumber": "^5.8.0", - "@ethersproject/constants": "^5.8.0", - "@ethersproject/logger": "^5.8.0" + "@eslint/core": "^0.16.0" + }, + "engines": { + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" } }, - "node_modules/@ethersproject/wallet": { - "version": "5.8.0", - "funding": [ - { - "type": "individual", - "url": "https://gitcoin.co/grants/13/ethersjs-complete-simple-and-tiny-2" - }, - { - "type": "individual", - "url": "https://www.buymeacoffee.com/ricmoo" - } - ], - "license": "MIT", + "node_modules/@eslint/core": { + "version": "0.16.0", + "dev": true, + "license": "Apache-2.0", + "dependencies": { + "@types/json-schema": "^7.0.15" + }, + "engines": { + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + } + }, + "node_modules/@eslint/eslintrc": { + "version": "3.3.1", + "dev": true, + "license": "MIT", + "dependencies": { + "ajv": "^6.12.4", + "debug": "^4.3.2", + "espree": "^10.0.1", + "globals": "^14.0.0", + "ignore": "^5.2.0", + "import-fresh": "^3.2.1", + "js-yaml": "^4.1.0", + "minimatch": "^3.1.2", + "strip-json-comments": "^3.1.1" + }, + "engines": { + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + }, + "funding": { + "url": "https://opencollective.com/eslint" + } + }, + "node_modules/@eslint/eslintrc/node_modules/argparse": { + "version": "2.0.1", + "dev": true, + "license": "Python-2.0" + }, + "node_modules/@eslint/eslintrc/node_modules/brace-expansion": { + "version": "1.1.12", + "dev": true, + "license": "MIT", + "dependencies": { + "balanced-match": "^1.0.0", + "concat-map": "0.0.1" + } + }, + "node_modules/@eslint/eslintrc/node_modules/js-yaml": { + "version": "4.1.0", + "dev": true, + "license": "MIT", + "dependencies": { + "argparse": "^2.0.1" + }, + "bin": { + "js-yaml": "bin/js-yaml.js" + } + }, + "node_modules/@eslint/eslintrc/node_modules/minimatch": { + "version": "3.1.2", + "dev": true, + "license": "ISC", + "dependencies": { + "brace-expansion": "^1.1.7" + }, + "engines": { + "node": "*" + } + }, + "node_modules/@eslint/js": { + "version": "9.38.0", + "dev": true, + "license": "MIT", + "engines": { + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + }, + "funding": { + "url": "https://eslint.org/donate" + } + }, + "node_modules/@eslint/object-schema": { + "version": "2.1.7", + "dev": true, + "license": "Apache-2.0", + "engines": { + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + } + }, + "node_modules/@eslint/plugin-kit": { + "version": "0.4.0", + "dev": true, + "license": "Apache-2.0", + "dependencies": { + "@eslint/core": "^0.16.0", + "levn": "^0.4.1" + }, + "engines": { + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + } + }, + "node_modules/@ethereumjs/common": { + "version": "2.6.5", + "license": "MIT", + "dependencies": { + "crc-32": "^1.2.0", + "ethereumjs-util": "^7.1.5" + } + }, + "node_modules/@ethereumjs/rlp": { + "version": "5.0.2", + "license": "MPL-2.0", + "bin": { + "rlp": "bin/rlp.cjs" + }, + "engines": { + "node": ">=18" + } + }, + "node_modules/@ethereumjs/tx": { + "version": "3.5.2", + "license": "MPL-2.0", + "dependencies": { + "@ethereumjs/common": "^2.6.4", + "ethereumjs-util": "^7.1.5" + } + }, + "node_modules/@ethereumjs/util": { + "version": "9.1.0", + "license": "MPL-2.0", + "dependencies": { + "@ethereumjs/rlp": "^5.0.2", + "ethereum-cryptography": "^2.2.1" + }, + "engines": { + "node": ">=18" + } + }, + "node_modules/@ethereumjs/util/node_modules/@noble/curves": { + "version": "1.4.2", + "license": "MIT", + "dependencies": { + "@noble/hashes": "1.4.0" + }, + "funding": { + "url": "https://paulmillr.com/funding/" + } + }, + "node_modules/@ethereumjs/util/node_modules/@noble/hashes": { + "version": "1.4.0", + "license": "MIT", + "engines": { + "node": ">= 16" + }, + "funding": { + "url": "https://paulmillr.com/funding/" + } + }, + "node_modules/@ethereumjs/util/node_modules/@scure/base": { + "version": "1.1.9", + "license": "MIT", + "funding": { + "url": "https://paulmillr.com/funding/" + } + }, + "node_modules/@ethereumjs/util/node_modules/@scure/bip32": { + "version": "1.4.0", + "license": "MIT", + "dependencies": { + "@noble/curves": "~1.4.0", + "@noble/hashes": "~1.4.0", + "@scure/base": "~1.1.6" + }, + "funding": { + "url": "https://paulmillr.com/funding/" + } + }, + "node_modules/@ethereumjs/util/node_modules/@scure/bip39": { + "version": "1.3.0", + "license": "MIT", + "dependencies": { + "@noble/hashes": "~1.4.0", + "@scure/base": "~1.1.6" + }, + "funding": { + "url": "https://paulmillr.com/funding/" + } + }, + "node_modules/@ethereumjs/util/node_modules/ethereum-cryptography": { + "version": "2.2.1", + "license": "MIT", + "dependencies": { + "@noble/curves": "1.4.2", + "@noble/hashes": "1.4.0", + "@scure/bip32": "1.4.0", + "@scure/bip39": "1.3.0" + } + }, + "node_modules/@ethersproject/abi": { + "version": "5.8.0", + "funding": [ + { + "type": "individual", + "url": "https://gitcoin.co/grants/13/ethersjs-complete-simple-and-tiny-2" + }, + { + "type": "individual", + "url": "https://www.buymeacoffee.com/ricmoo" + } + ], + "license": "MIT", "dependencies": { - "@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/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" + "@ethersproject/strings": "^5.8.0" } }, - "node_modules/@ethersproject/web": { + "node_modules/@ethersproject/abstract-provider": { "version": "5.8.0", "funding": [ { @@ -4006,14 +4179,16 @@ ], "license": "MIT", "dependencies": { - "@ethersproject/base64": "^5.8.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/strings": "^5.8.0" + "@ethersproject/transactions": "^5.8.0", + "@ethersproject/web": "^5.8.0" } }, - "node_modules/@ethersproject/wordlists": { + "node_modules/@ethersproject/abstract-signer": { "version": "5.8.0", "funding": [ { @@ -4027,27 +4202,622 @@ ], "license": "MIT", "dependencies": { + "@ethersproject/abstract-provider": "^5.8.0", + "@ethersproject/bignumber": "^5.8.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" + "@ethersproject/properties": "^5.8.0" } }, - "node_modules/@expo-google-fonts/manrope": { - "version": "0.4.2", - "license": "MIT AND OFL-1.1" - }, - "node_modules/@expo-google-fonts/space-grotesk": { - "version": "0.4.1", - "license": "MIT AND OFL-1.1" - }, - "node_modules/@expo/cli": { - "version": "0.24.20", + "node_modules/@ethersproject/address": { + "version": "5.8.0", + "funding": [ + { + "type": "individual", + "url": "https://gitcoin.co/grants/13/ethersjs-complete-simple-and-tiny-2" + }, + { + "type": "individual", + "url": "https://www.buymeacoffee.com/ricmoo" + } + ], "license": "MIT", "dependencies": { - "@0no-co/graphql.web": "^1.0.8", - "@babel/runtime": "^7.20.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.8.0", + "funding": [ + { + "type": "individual", + "url": "https://gitcoin.co/grants/13/ethersjs-complete-simple-and-tiny-2" + }, + { + "type": "individual", + "url": "https://www.buymeacoffee.com/ricmoo" + } + ], + "license": "MIT", + "dependencies": { + "@ethersproject/bytes": "^5.8.0" + } + }, + "node_modules/@ethersproject/basex": { + "version": "5.8.0", + "funding": [ + { + "type": "individual", + "url": "https://gitcoin.co/grants/13/ethersjs-complete-simple-and-tiny-2" + }, + { + "type": "individual", + "url": "https://www.buymeacoffee.com/ricmoo" + } + ], + "license": "MIT", + "dependencies": { + "@ethersproject/bytes": "^5.8.0", + "@ethersproject/properties": "^5.8.0" + } + }, + "node_modules/@ethersproject/bignumber": { + "version": "5.8.0", + "funding": [ + { + "type": "individual", + "url": "https://gitcoin.co/grants/13/ethersjs-complete-simple-and-tiny-2" + }, + { + "type": "individual", + "url": "https://www.buymeacoffee.com/ricmoo" + } + ], + "license": "MIT", + "dependencies": { + "@ethersproject/bytes": "^5.8.0", + "@ethersproject/logger": "^5.8.0", + "bn.js": "^5.2.1" + } + }, + "node_modules/@ethersproject/bytes": { + "version": "5.8.0", + "funding": [ + { + "type": "individual", + "url": "https://gitcoin.co/grants/13/ethersjs-complete-simple-and-tiny-2" + }, + { + "type": "individual", + "url": "https://www.buymeacoffee.com/ricmoo" + } + ], + "license": "MIT", + "dependencies": { + "@ethersproject/logger": "^5.8.0" + } + }, + "node_modules/@ethersproject/constants": { + "version": "5.8.0", + "funding": [ + { + "type": "individual", + "url": "https://gitcoin.co/grants/13/ethersjs-complete-simple-and-tiny-2" + }, + { + "type": "individual", + "url": "https://www.buymeacoffee.com/ricmoo" + } + ], + "license": "MIT", + "dependencies": { + "@ethersproject/bignumber": "^5.8.0" + } + }, + "node_modules/@ethersproject/contracts": { + "version": "5.8.0", + "funding": [ + { + "type": "individual", + "url": "https://gitcoin.co/grants/13/ethersjs-complete-simple-and-tiny-2" + }, + { + "type": "individual", + "url": "https://www.buymeacoffee.com/ricmoo" + } + ], + "license": "MIT", + "dependencies": { + "@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.8.0", + "funding": [ + { + "type": "individual", + "url": "https://gitcoin.co/grants/13/ethersjs-complete-simple-and-tiny-2" + }, + { + "type": "individual", + "url": "https://www.buymeacoffee.com/ricmoo" + } + ], + "license": "MIT", + "dependencies": { + "@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.8.0", + "funding": [ + { + "type": "individual", + "url": "https://gitcoin.co/grants/13/ethersjs-complete-simple-and-tiny-2" + }, + { + "type": "individual", + "url": "https://www.buymeacoffee.com/ricmoo" + } + ], + "license": "MIT", + "dependencies": { + "@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.8.0", + "funding": [ + { + "type": "individual", + "url": "https://gitcoin.co/grants/13/ethersjs-complete-simple-and-tiny-2" + }, + { + "type": "individual", + "url": "https://www.buymeacoffee.com/ricmoo" + } + ], + "license": "MIT", + "dependencies": { + "@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/json-wallets/node_modules/aes-js": { + "version": "3.0.0", + "license": "MIT" + }, + "node_modules/@ethersproject/keccak256": { + "version": "5.8.0", + "funding": [ + { + "type": "individual", + "url": "https://gitcoin.co/grants/13/ethersjs-complete-simple-and-tiny-2" + }, + { + "type": "individual", + "url": "https://www.buymeacoffee.com/ricmoo" + } + ], + "license": "MIT", + "dependencies": { + "@ethersproject/bytes": "^5.8.0", + "js-sha3": "0.8.0" + } + }, + "node_modules/@ethersproject/logger": { + "version": "5.8.0", + "funding": [ + { + "type": "individual", + "url": "https://gitcoin.co/grants/13/ethersjs-complete-simple-and-tiny-2" + }, + { + "type": "individual", + "url": "https://www.buymeacoffee.com/ricmoo" + } + ], + "license": "MIT" + }, + "node_modules/@ethersproject/networks": { + "version": "5.8.0", + "funding": [ + { + "type": "individual", + "url": "https://gitcoin.co/grants/13/ethersjs-complete-simple-and-tiny-2" + }, + { + "type": "individual", + "url": "https://www.buymeacoffee.com/ricmoo" + } + ], + "license": "MIT", + "dependencies": { + "@ethersproject/logger": "^5.8.0" + } + }, + "node_modules/@ethersproject/pbkdf2": { + "version": "5.8.0", + "funding": [ + { + "type": "individual", + "url": "https://gitcoin.co/grants/13/ethersjs-complete-simple-and-tiny-2" + }, + { + "type": "individual", + "url": "https://www.buymeacoffee.com/ricmoo" + } + ], + "license": "MIT", + "dependencies": { + "@ethersproject/bytes": "^5.8.0", + "@ethersproject/sha2": "^5.8.0" + } + }, + "node_modules/@ethersproject/properties": { + "version": "5.8.0", + "funding": [ + { + "type": "individual", + "url": "https://gitcoin.co/grants/13/ethersjs-complete-simple-and-tiny-2" + }, + { + "type": "individual", + "url": "https://www.buymeacoffee.com/ricmoo" + } + ], + "license": "MIT", + "dependencies": { + "@ethersproject/logger": "^5.8.0" + } + }, + "node_modules/@ethersproject/providers": { + "version": "5.8.0", + "funding": [ + { + "type": "individual", + "url": "https://gitcoin.co/grants/13/ethersjs-complete-simple-and-tiny-2" + }, + { + "type": "individual", + "url": "https://www.buymeacoffee.com/ricmoo" + } + ], + "license": "MIT", + "dependencies": { + "@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": "8.18.0" + } + }, + "node_modules/@ethersproject/providers/node_modules/ws": { + "version": "8.18.0", + "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/@ethersproject/random": { + "version": "5.8.0", + "funding": [ + { + "type": "individual", + "url": "https://gitcoin.co/grants/13/ethersjs-complete-simple-and-tiny-2" + }, + { + "type": "individual", + "url": "https://www.buymeacoffee.com/ricmoo" + } + ], + "license": "MIT", + "dependencies": { + "@ethersproject/bytes": "^5.8.0", + "@ethersproject/logger": "^5.8.0" + } + }, + "node_modules/@ethersproject/rlp": { + "version": "5.8.0", + "funding": [ + { + "type": "individual", + "url": "https://gitcoin.co/grants/13/ethersjs-complete-simple-and-tiny-2" + }, + { + "type": "individual", + "url": "https://www.buymeacoffee.com/ricmoo" + } + ], + "license": "MIT", + "dependencies": { + "@ethersproject/bytes": "^5.8.0", + "@ethersproject/logger": "^5.8.0" + } + }, + "node_modules/@ethersproject/sha2": { + "version": "5.8.0", + "funding": [ + { + "type": "individual", + "url": "https://gitcoin.co/grants/13/ethersjs-complete-simple-and-tiny-2" + }, + { + "type": "individual", + "url": "https://www.buymeacoffee.com/ricmoo" + } + ], + "license": "MIT", + "dependencies": { + "@ethersproject/bytes": "^5.8.0", + "@ethersproject/logger": "^5.8.0", + "hash.js": "1.1.7" + } + }, + "node_modules/@ethersproject/signing-key": { + "version": "5.8.0", + "funding": [ + { + "type": "individual", + "url": "https://gitcoin.co/grants/13/ethersjs-complete-simple-and-tiny-2" + }, + { + "type": "individual", + "url": "https://www.buymeacoffee.com/ricmoo" + } + ], + "license": "MIT", + "dependencies": { + "@ethersproject/bytes": "^5.8.0", + "@ethersproject/logger": "^5.8.0", + "@ethersproject/properties": "^5.8.0", + "bn.js": "^5.2.1", + "elliptic": "6.6.1", + "hash.js": "1.1.7" + } + }, + "node_modules/@ethersproject/solidity": { + "version": "5.8.0", + "funding": [ + { + "type": "individual", + "url": "https://gitcoin.co/grants/13/ethersjs-complete-simple-and-tiny-2" + }, + { + "type": "individual", + "url": "https://www.buymeacoffee.com/ricmoo" + } + ], + "license": "MIT", + "dependencies": { + "@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.8.0", + "funding": [ + { + "type": "individual", + "url": "https://gitcoin.co/grants/13/ethersjs-complete-simple-and-tiny-2" + }, + { + "type": "individual", + "url": "https://www.buymeacoffee.com/ricmoo" + } + ], + "license": "MIT", + "dependencies": { + "@ethersproject/bytes": "^5.8.0", + "@ethersproject/constants": "^5.8.0", + "@ethersproject/logger": "^5.8.0" + } + }, + "node_modules/@ethersproject/transactions": { + "version": "5.8.0", + "funding": [ + { + "type": "individual", + "url": "https://gitcoin.co/grants/13/ethersjs-complete-simple-and-tiny-2" + }, + { + "type": "individual", + "url": "https://www.buymeacoffee.com/ricmoo" + } + ], + "license": "MIT", + "dependencies": { + "@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.8.0", + "funding": [ + { + "type": "individual", + "url": "https://gitcoin.co/grants/13/ethersjs-complete-simple-and-tiny-2" + }, + { + "type": "individual", + "url": "https://www.buymeacoffee.com/ricmoo" + } + ], + "license": "MIT", + "dependencies": { + "@ethersproject/bignumber": "^5.8.0", + "@ethersproject/constants": "^5.8.0", + "@ethersproject/logger": "^5.8.0" + } + }, + "node_modules/@ethersproject/wallet": { + "version": "5.8.0", + "funding": [ + { + "type": "individual", + "url": "https://gitcoin.co/grants/13/ethersjs-complete-simple-and-tiny-2" + }, + { + "type": "individual", + "url": "https://www.buymeacoffee.com/ricmoo" + } + ], + "license": "MIT", + "dependencies": { + "@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.8.0", + "funding": [ + { + "type": "individual", + "url": "https://gitcoin.co/grants/13/ethersjs-complete-simple-and-tiny-2" + }, + { + "type": "individual", + "url": "https://www.buymeacoffee.com/ricmoo" + } + ], + "license": "MIT", + "dependencies": { + "@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.8.0", + "funding": [ + { + "type": "individual", + "url": "https://gitcoin.co/grants/13/ethersjs-complete-simple-and-tiny-2" + }, + { + "type": "individual", + "url": "https://www.buymeacoffee.com/ricmoo" + } + ], + "license": "MIT", + "dependencies": { + "@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/@expo-google-fonts/manrope": { + "version": "0.4.2", + "license": "MIT AND OFL-1.1" + }, + "node_modules/@expo-google-fonts/space-grotesk": { + "version": "0.4.1", + "license": "MIT AND OFL-1.1" + }, + "node_modules/@expo/cli": { + "version": "0.24.20", + "license": "MIT", + "dependencies": { + "@0no-co/graphql.web": "^1.0.8", + "@babel/runtime": "^7.20.0", "@expo/code-signing-certificates": "^0.0.5", "@expo/config": "~11.0.13", "@expo/config-plugins": "~10.1.2", @@ -7094,33 +7864,313 @@ "node_modules/@react-navigation/routers": { "version": "7.5.1", "license": "MIT", - "dependencies": { - "nanoid": "^3.3.11" - } + "dependencies": { + "nanoid": "^3.3.11" + } + }, + "node_modules/@rollup/rollup-android-arm-eabi": { + "version": "4.52.5", + "resolved": "https://registry.npmjs.org/@rollup/rollup-android-arm-eabi/-/rollup-android-arm-eabi-4.52.5.tgz", + "integrity": "sha512-8c1vW4ocv3UOMp9K+gToY5zL2XiiVw3k7f1ksf4yO1FlDFQ1C2u72iACFnSOceJFsWskc2WZNqeRhFRPzv+wtQ==", + "cpu": [ + "arm" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "android" + ] + }, + "node_modules/@rollup/rollup-android-arm64": { + "version": "4.52.5", + "resolved": "https://registry.npmjs.org/@rollup/rollup-android-arm64/-/rollup-android-arm64-4.52.5.tgz", + "integrity": "sha512-mQGfsIEFcu21mvqkEKKu2dYmtuSZOBMmAl5CFlPGLY94Vlcm+zWApK7F/eocsNzp8tKmbeBP8yXyAbx0XHsFNA==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "android" + ] + }, + "node_modules/@rollup/rollup-darwin-arm64": { + "version": "4.52.5", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "darwin" + ] + }, + "node_modules/@rollup/rollup-darwin-x64": { + "version": "4.52.5", + "resolved": "https://registry.npmjs.org/@rollup/rollup-darwin-x64/-/rollup-darwin-x64-4.52.5.tgz", + "integrity": "sha512-W901Pla8Ya95WpxDn//VF9K9u2JbocwV/v75TE0YIHNTbhqUTv9w4VuQ9MaWlNOkkEfFwkdNhXgcLqPSmHy0fA==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "darwin" + ] + }, + "node_modules/@rollup/rollup-freebsd-arm64": { + "version": "4.52.5", + "resolved": "https://registry.npmjs.org/@rollup/rollup-freebsd-arm64/-/rollup-freebsd-arm64-4.52.5.tgz", + "integrity": "sha512-QofO7i7JycsYOWxe0GFqhLmF6l1TqBswJMvICnRUjqCx8b47MTo46W8AoeQwiokAx3zVryVnxtBMcGcnX12LvA==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "freebsd" + ] + }, + "node_modules/@rollup/rollup-freebsd-x64": { + "version": "4.52.5", + "resolved": "https://registry.npmjs.org/@rollup/rollup-freebsd-x64/-/rollup-freebsd-x64-4.52.5.tgz", + "integrity": "sha512-jr21b/99ew8ujZubPo9skbrItHEIE50WdV86cdSoRkKtmWa+DDr6fu2c/xyRT0F/WazZpam6kk7IHBerSL7LDQ==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "freebsd" + ] + }, + "node_modules/@rollup/rollup-linux-arm-gnueabihf": { + "version": "4.52.5", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm-gnueabihf/-/rollup-linux-arm-gnueabihf-4.52.5.tgz", + "integrity": "sha512-PsNAbcyv9CcecAUagQefwX8fQn9LQ4nZkpDboBOttmyffnInRy8R8dSg6hxxl2Re5QhHBf6FYIDhIj5v982ATQ==", + "cpu": [ + "arm" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@rollup/rollup-linux-arm-musleabihf": { + "version": "4.52.5", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm-musleabihf/-/rollup-linux-arm-musleabihf-4.52.5.tgz", + "integrity": "sha512-Fw4tysRutyQc/wwkmcyoqFtJhh0u31K+Q6jYjeicsGJJ7bbEq8LwPWV/w0cnzOqR2m694/Af6hpFayLJZkG2VQ==", + "cpu": [ + "arm" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@rollup/rollup-linux-arm64-gnu": { + "version": "4.52.5", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm64-gnu/-/rollup-linux-arm64-gnu-4.52.5.tgz", + "integrity": "sha512-a+3wVnAYdQClOTlyapKmyI6BLPAFYs0JM8HRpgYZQO02rMR09ZcV9LbQB+NL6sljzG38869YqThrRnfPMCDtZg==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@rollup/rollup-linux-arm64-musl": { + "version": "4.52.5", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm64-musl/-/rollup-linux-arm64-musl-4.52.5.tgz", + "integrity": "sha512-AvttBOMwO9Pcuuf7m9PkC1PUIKsfaAJ4AYhy944qeTJgQOqJYJ9oVl2nYgY7Rk0mkbsuOpCAYSs6wLYB2Xiw0Q==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@rollup/rollup-linux-loong64-gnu": { + "version": "4.52.5", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-loong64-gnu/-/rollup-linux-loong64-gnu-4.52.5.tgz", + "integrity": "sha512-DkDk8pmXQV2wVrF6oq5tONK6UHLz/XcEVow4JTTerdeV1uqPeHxwcg7aFsfnSm9L+OO8WJsWotKM2JJPMWrQtA==", + "cpu": [ + "loong64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@rollup/rollup-linux-ppc64-gnu": { + "version": "4.52.5", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-ppc64-gnu/-/rollup-linux-ppc64-gnu-4.52.5.tgz", + "integrity": "sha512-W/b9ZN/U9+hPQVvlGwjzi+Wy4xdoH2I8EjaCkMvzpI7wJUs8sWJ03Rq96jRnHkSrcHTpQe8h5Tg3ZzUPGauvAw==", + "cpu": [ + "ppc64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@rollup/rollup-linux-riscv64-gnu": { + "version": "4.52.5", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-riscv64-gnu/-/rollup-linux-riscv64-gnu-4.52.5.tgz", + "integrity": "sha512-sjQLr9BW7R/ZiXnQiWPkErNfLMkkWIoCz7YMn27HldKsADEKa5WYdobaa1hmN6slu9oWQbB6/jFpJ+P2IkVrmw==", + "cpu": [ + "riscv64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@rollup/rollup-linux-riscv64-musl": { + "version": "4.52.5", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-riscv64-musl/-/rollup-linux-riscv64-musl-4.52.5.tgz", + "integrity": "sha512-hq3jU/kGyjXWTvAh2awn8oHroCbrPm8JqM7RUpKjalIRWWXE01CQOf/tUNWNHjmbMHg/hmNCwc/Pz3k1T/j/Lg==", + "cpu": [ + "riscv64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@rollup/rollup-linux-s390x-gnu": { + "version": "4.52.5", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-s390x-gnu/-/rollup-linux-s390x-gnu-4.52.5.tgz", + "integrity": "sha512-gn8kHOrku8D4NGHMK1Y7NA7INQTRdVOntt1OCYypZPRt6skGbddska44K8iocdpxHTMMNui5oH4elPH4QOLrFQ==", + "cpu": [ + "s390x" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@rollup/rollup-linux-x64-gnu": { + "version": "4.52.5", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-x64-gnu/-/rollup-linux-x64-gnu-4.52.5.tgz", + "integrity": "sha512-hXGLYpdhiNElzN770+H2nlx+jRog8TyynpTVzdlc6bndktjKWyZyiCsuDAlpd+j+W+WNqfcyAWz9HxxIGfZm1Q==", + "cpu": [ + "x64" + ], + "license": "MIT", + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@rollup/rollup-linux-x64-musl": { + "version": "4.52.5", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-x64-musl/-/rollup-linux-x64-musl-4.52.5.tgz", + "integrity": "sha512-arCGIcuNKjBoKAXD+y7XomR9gY6Mw7HnFBv5Rw7wQRvwYLR7gBAgV7Mb2QTyjXfTveBNFAtPt46/36vV9STLNg==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@rollup/rollup-openharmony-arm64": { + "version": "4.52.5", + "resolved": "https://registry.npmjs.org/@rollup/rollup-openharmony-arm64/-/rollup-openharmony-arm64-4.52.5.tgz", + "integrity": "sha512-QoFqB6+/9Rly/RiPjaomPLmR/13cgkIGfA40LHly9zcH1S0bN2HVFYk3a1eAyHQyjs3ZJYlXvIGtcCs5tko9Cw==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "openharmony" + ] + }, + "node_modules/@rollup/rollup-win32-arm64-msvc": { + "version": "4.52.5", + "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-arm64-msvc/-/rollup-win32-arm64-msvc-4.52.5.tgz", + "integrity": "sha512-w0cDWVR6MlTstla1cIfOGyl8+qb93FlAVutcor14Gf5Md5ap5ySfQ7R9S/NjNaMLSFdUnKGEasmVnu3lCMqB7w==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "win32" + ] + }, + "node_modules/@rollup/rollup-win32-ia32-msvc": { + "version": "4.52.5", + "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-ia32-msvc/-/rollup-win32-ia32-msvc-4.52.5.tgz", + "integrity": "sha512-Aufdpzp7DpOTULJCuvzqcItSGDH73pF3ko/f+ckJhxQyHtp67rHw3HMNxoIdDMUITJESNE6a8uh4Lo4SLouOUg==", + "cpu": [ + "ia32" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "win32" + ] }, - "node_modules/@rollup/rollup-darwin-arm64": { + "node_modules/@rollup/rollup-win32-x64-gnu": { "version": "4.52.5", + "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-x64-gnu/-/rollup-win32-x64-gnu-4.52.5.tgz", + "integrity": "sha512-UGBUGPFp1vkj6p8wCRraqNhqwX/4kNQPS57BCFc8wYh0g94iVIW33wJtQAx3G7vrjjNtRaxiMUylM0ktp/TRSQ==", "cpu": [ - "arm64" + "x64" ], "dev": true, "license": "MIT", "optional": true, "os": [ - "darwin" + "win32" ] }, - "node_modules/@rollup/rollup-linux-x64-gnu": { + "node_modules/@rollup/rollup-win32-x64-msvc": { "version": "4.52.5", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-x64-gnu/-/rollup-linux-x64-gnu-4.52.5.tgz", - "integrity": "sha512-hXGLYpdhiNElzN770+H2nlx+jRog8TyynpTVzdlc6bndktjKWyZyiCsuDAlpd+j+W+WNqfcyAWz9HxxIGfZm1Q==", + "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-x64-msvc/-/rollup-win32-x64-msvc-4.52.5.tgz", + "integrity": "sha512-TAcgQh2sSkykPRWLrdyy2AiceMckNf5loITqXxFI5VuQjS5tSuw3WlwdN8qv8vzjLAUTvYaH/mVjSFpbkFbpTg==", "cpu": [ "x64" ], + "dev": true, "license": "MIT", "optional": true, "os": [ - "linux" + "win32" ] }, "node_modules/@rtsao/scc": { @@ -12310,7 +13360,9 @@ } }, "node_modules/dkg.js": { - "version": "8.2.2", + "version": "8.2.4", + "resolved": "https://registry.npmjs.org/dkg.js/-/dkg.js-8.2.4.tgz", + "integrity": "sha512-dqzbzuaco1+4kAf/uXiYC6G3SQLhE1e44WSeYb2emVkD8/SBwQOsWApULbctQxNiyAk7pNmmvKp64fM+sNXi3w==", "hasInstallScript": true, "license": "Apache-2.0", "dependencies": { @@ -15370,6 +16422,20 @@ "version": "1.0.0", "license": "ISC" }, + "node_modules/fsevents": { + "version": "2.3.2", + "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-2.3.2.tgz", + "integrity": "sha512-xiqMQR4xAeHTuB9uWm+fFRcIOgKBMiOBP+eXiyT7jsgVCq1bkVygt00oASowB7EdtpOHaaPgKt812P9ab+DDKA==", + "hasInstallScript": true, + "license": "MIT", + "optional": true, + "os": [ + "darwin" + ], + "engines": { + "node": "^8.16.0 || ^10.6.0 || >=11.0.0" + } + }, "node_modules/fsu": { "version": "1.1.1", "dev": true, @@ -25257,6 +26323,21 @@ "fsevents": "~2.3.3" } }, + "node_modules/tsx/node_modules/fsevents": { + "version": "2.3.3", + "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-2.3.3.tgz", + "integrity": "sha512-5xoDfX+fL7faATnagmWPpbFtwh/R77WmMMqqHGS65C3vvB0YHrgF+B1YmZ3441tMj5n63k0212XNoJwzlhffQw==", + "dev": true, + "hasInstallScript": true, + "license": "MIT", + "optional": true, + "os": [ + "darwin" + ], + "engines": { + "node": "^8.16.0 || ^10.6.0 || >=11.0.0" + } + }, "node_modules/tunnel-agent": { "version": "0.6.0", "license": "Apache-2.0", @@ -25283,6 +26364,20 @@ "turbo-windows-arm64": "2.5.8" } }, + "node_modules/turbo-darwin-64": { + "version": "2.5.8", + "resolved": "https://registry.npmjs.org/turbo-darwin-64/-/turbo-darwin-64-2.5.8.tgz", + "integrity": "sha512-Dh5bCACiHO8rUXZLpKw+m3FiHtAp2CkanSyJre+SInEvEr5kIxjGvCK/8MFX8SFRjQuhjtvpIvYYZJB4AGCxNQ==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "darwin" + ] + }, "node_modules/turbo-darwin-arm64": { "version": "2.5.8", "cpu": [ @@ -25295,6 +26390,62 @@ "darwin" ] }, + "node_modules/turbo-linux-64": { + "version": "2.5.8", + "resolved": "https://registry.npmjs.org/turbo-linux-64/-/turbo-linux-64-2.5.8.tgz", + "integrity": "sha512-hMyvc7w7yadBlZBGl/bnR6O+dJTx3XkTeyTTH4zEjERO6ChEs0SrN8jTFj1lueNXKIHh1SnALmy6VctKMGnWfw==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/turbo-linux-arm64": { + "version": "2.5.8", + "resolved": "https://registry.npmjs.org/turbo-linux-arm64/-/turbo-linux-arm64-2.5.8.tgz", + "integrity": "sha512-LQELGa7bAqV2f+3rTMRPnj5G/OHAe2U+0N9BwsZvfMvHSUbsQ3bBMWdSQaYNicok7wOZcHjz2TkESn1hYK6xIQ==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/turbo-windows-64": { + "version": "2.5.8", + "resolved": "https://registry.npmjs.org/turbo-windows-64/-/turbo-windows-64-2.5.8.tgz", + "integrity": "sha512-3YdcaW34TrN1AWwqgYL9gUqmZsMT4T7g8Y5Azz+uwwEJW+4sgcJkIi9pYFyU4ZBSjBvkfuPZkGgfStir5BBDJQ==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "win32" + ] + }, + "node_modules/turbo-windows-arm64": { + "version": "2.5.8", + "resolved": "https://registry.npmjs.org/turbo-windows-arm64/-/turbo-windows-arm64-2.5.8.tgz", + "integrity": "sha512-eFC5XzLmgXJfnAK3UMTmVECCwuBcORrWdewoiXBnUm934DY6QN8YowC/srhNnROMpaKaqNeRpoB5FxCww3eteQ==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "win32" + ] + }, "node_modules/tweetnacl": { "version": "0.14.5", "license": "Unlicense" @@ -27057,69 +28208,273 @@ "version": "16.2.0", "license": "MIT", "dependencies": { - "cliui": "^7.0.2", - "escalade": "^3.1.1", - "get-caller-file": "^2.0.5", - "require-directory": "^2.1.1", - "string-width": "^4.2.0", - "y18n": "^5.0.5", - "yargs-parser": "^20.2.2" - }, - "engines": { - "node": ">=10" + "cliui": "^7.0.2", + "escalade": "^3.1.1", + "get-caller-file": "^2.0.5", + "require-directory": "^2.1.1", + "string-width": "^4.2.0", + "y18n": "^5.0.5", + "yargs-parser": "^20.2.2" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/yargs-parser": { + "version": "20.2.9", + "license": "ISC", + "engines": { + "node": ">=10" + } + }, + "node_modules/yargs-unparser": { + "version": "2.0.0", + "license": "MIT", + "dependencies": { + "camelcase": "^6.0.0", + "decamelize": "^4.0.0", + "flat": "^5.0.2", + "is-plain-obj": "^2.1.0" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/yn": { + "version": "3.1.1", + "license": "MIT", + "engines": { + "node": ">=6" + } + }, + "node_modules/yocto-queue": { + "version": "0.1.0", + "license": "MIT", + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/zksync-ethers": { + "version": "5.11.0", + "license": "MIT", + "dependencies": { + "ethers": "~5.7.0" + }, + "engines": { + "node": ">=16.0.0" + }, + "peerDependencies": { + "ethers": "~5.7.0" + } + }, + "node_modules/zksync-ethers/node_modules/@ethersproject/abi": { + "version": "5.7.0", + "funding": [ + { + "type": "individual", + "url": "https://gitcoin.co/grants/13/ethersjs-complete-simple-and-tiny-2" + }, + { + "type": "individual", + "url": "https://www.buymeacoffee.com/ricmoo" + } + ], + "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" + } + }, + "node_modules/zksync-ethers/node_modules/@ethersproject/abstract-provider": { + "version": "5.7.0", + "funding": [ + { + "type": "individual", + "url": "https://gitcoin.co/grants/13/ethersjs-complete-simple-and-tiny-2" + }, + { + "type": "individual", + "url": "https://www.buymeacoffee.com/ricmoo" + } + ], + "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" + } + }, + "node_modules/zksync-ethers/node_modules/@ethersproject/abstract-signer": { + "version": "5.7.0", + "funding": [ + { + "type": "individual", + "url": "https://gitcoin.co/grants/13/ethersjs-complete-simple-and-tiny-2" + }, + { + "type": "individual", + "url": "https://www.buymeacoffee.com/ricmoo" + } + ], + "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" + } + }, + "node_modules/zksync-ethers/node_modules/@ethersproject/address": { + "version": "5.7.0", + "funding": [ + { + "type": "individual", + "url": "https://gitcoin.co/grants/13/ethersjs-complete-simple-and-tiny-2" + }, + { + "type": "individual", + "url": "https://www.buymeacoffee.com/ricmoo" + } + ], + "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" + } + }, + "node_modules/zksync-ethers/node_modules/@ethersproject/base64": { + "version": "5.7.0", + "funding": [ + { + "type": "individual", + "url": "https://gitcoin.co/grants/13/ethersjs-complete-simple-and-tiny-2" + }, + { + "type": "individual", + "url": "https://www.buymeacoffee.com/ricmoo" + } + ], + "license": "MIT", + "dependencies": { + "@ethersproject/bytes": "^5.7.0" } }, - "node_modules/yargs-parser": { - "version": "20.2.9", - "license": "ISC", - "engines": { - "node": ">=10" + "node_modules/zksync-ethers/node_modules/@ethersproject/basex": { + "version": "5.7.0", + "funding": [ + { + "type": "individual", + "url": "https://gitcoin.co/grants/13/ethersjs-complete-simple-and-tiny-2" + }, + { + "type": "individual", + "url": "https://www.buymeacoffee.com/ricmoo" + } + ], + "license": "MIT", + "dependencies": { + "@ethersproject/bytes": "^5.7.0", + "@ethersproject/properties": "^5.7.0" } }, - "node_modules/yargs-unparser": { - "version": "2.0.0", + "node_modules/zksync-ethers/node_modules/@ethersproject/bignumber": { + "version": "5.7.0", + "funding": [ + { + "type": "individual", + "url": "https://gitcoin.co/grants/13/ethersjs-complete-simple-and-tiny-2" + }, + { + "type": "individual", + "url": "https://www.buymeacoffee.com/ricmoo" + } + ], "license": "MIT", "dependencies": { - "camelcase": "^6.0.0", - "decamelize": "^4.0.0", - "flat": "^5.0.2", - "is-plain-obj": "^2.1.0" - }, - "engines": { - "node": ">=10" + "@ethersproject/bytes": "^5.7.0", + "@ethersproject/logger": "^5.7.0", + "bn.js": "^5.2.1" } }, - "node_modules/yn": { - "version": "3.1.1", + "node_modules/zksync-ethers/node_modules/@ethersproject/bytes": { + "version": "5.7.0", + "funding": [ + { + "type": "individual", + "url": "https://gitcoin.co/grants/13/ethersjs-complete-simple-and-tiny-2" + }, + { + "type": "individual", + "url": "https://www.buymeacoffee.com/ricmoo" + } + ], "license": "MIT", - "engines": { - "node": ">=6" + "dependencies": { + "@ethersproject/logger": "^5.7.0" } }, - "node_modules/yocto-queue": { - "version": "0.1.0", + "node_modules/zksync-ethers/node_modules/@ethersproject/constants": { + "version": "5.7.0", + "funding": [ + { + "type": "individual", + "url": "https://gitcoin.co/grants/13/ethersjs-complete-simple-and-tiny-2" + }, + { + "type": "individual", + "url": "https://www.buymeacoffee.com/ricmoo" + } + ], "license": "MIT", - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" + "dependencies": { + "@ethersproject/bignumber": "^5.7.0" } }, - "node_modules/zksync-ethers": { - "version": "5.11.0", + "node_modules/zksync-ethers/node_modules/@ethersproject/contracts": { + "version": "5.7.0", + "funding": [ + { + "type": "individual", + "url": "https://gitcoin.co/grants/13/ethersjs-complete-simple-and-tiny-2" + }, + { + "type": "individual", + "url": "https://www.buymeacoffee.com/ricmoo" + } + ], "license": "MIT", "dependencies": { - "ethers": "~5.7.0" - }, - "engines": { - "node": ">=16.0.0" - }, - "peerDependencies": { - "ethers": "~5.7.0" + "@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" } }, - "node_modules/zksync-ethers/node_modules/@ethersproject/abi": { + "node_modules/zksync-ethers/node_modules/@ethersproject/hash": { "version": "5.7.0", "funding": [ { @@ -27133,18 +28488,18 @@ ], "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/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" } }, - "node_modules/zksync-ethers/node_modules/@ethersproject/abstract-provider": { + "node_modules/zksync-ethers/node_modules/@ethersproject/hdnode": { "version": "5.7.0", "funding": [ { @@ -27158,16 +28513,21 @@ ], "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/networks": "^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/web": "^5.7.0" + "@ethersproject/wordlists": "^5.7.0" } }, - "node_modules/zksync-ethers/node_modules/@ethersproject/abstract-signer": { + "node_modules/zksync-ethers/node_modules/@ethersproject/json-wallets": { "version": "5.7.0", "funding": [ { @@ -27181,14 +28541,22 @@ ], "license": "MIT", "dependencies": { - "@ethersproject/abstract-provider": "^5.7.0", - "@ethersproject/bignumber": "^5.7.0", + "@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/properties": "^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", + "aes-js": "3.0.0", + "scrypt-js": "3.0.1" } }, - "node_modules/zksync-ethers/node_modules/@ethersproject/address": { + "node_modules/zksync-ethers/node_modules/@ethersproject/keccak256": { "version": "5.7.0", "funding": [ { @@ -27202,14 +28570,11 @@ ], "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" + "js-sha3": "0.8.0" } }, - "node_modules/zksync-ethers/node_modules/@ethersproject/base64": { + "node_modules/zksync-ethers/node_modules/@ethersproject/logger": { "version": "5.7.0", "funding": [ { @@ -27221,12 +28586,26 @@ "url": "https://www.buymeacoffee.com/ricmoo" } ], + "license": "MIT" + }, + "node_modules/zksync-ethers/node_modules/@ethersproject/networks": { + "version": "5.7.1", + "funding": [ + { + "type": "individual", + "url": "https://gitcoin.co/grants/13/ethersjs-complete-simple-and-tiny-2" + }, + { + "type": "individual", + "url": "https://www.buymeacoffee.com/ricmoo" + } + ], "license": "MIT", "dependencies": { - "@ethersproject/bytes": "^5.7.0" + "@ethersproject/logger": "^5.7.0" } }, - "node_modules/zksync-ethers/node_modules/@ethersproject/basex": { + "node_modules/zksync-ethers/node_modules/@ethersproject/pbkdf2": { "version": "5.7.0", "funding": [ { @@ -27241,10 +28620,10 @@ "license": "MIT", "dependencies": { "@ethersproject/bytes": "^5.7.0", - "@ethersproject/properties": "^5.7.0" + "@ethersproject/sha2": "^5.7.0" } }, - "node_modules/zksync-ethers/node_modules/@ethersproject/bignumber": { + "node_modules/zksync-ethers/node_modules/@ethersproject/properties": { "version": "5.7.0", "funding": [ { @@ -27258,12 +28637,46 @@ ], "license": "MIT", "dependencies": { + "@ethersproject/logger": "^5.7.0" + } + }, + "node_modules/zksync-ethers/node_modules/@ethersproject/providers": { + "version": "5.7.2", + "funding": [ + { + "type": "individual", + "url": "https://gitcoin.co/grants/13/ethersjs-complete-simple-and-tiny-2" + }, + { + "type": "individual", + "url": "https://www.buymeacoffee.com/ricmoo" + } + ], + "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", - "bn.js": "^5.2.1" + "@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", + "bech32": "1.1.4", + "ws": "7.4.6" } }, - "node_modules/zksync-ethers/node_modules/@ethersproject/bytes": { + "node_modules/zksync-ethers/node_modules/@ethersproject/random": { "version": "5.7.0", "funding": [ { @@ -27277,10 +28690,11 @@ ], "license": "MIT", "dependencies": { + "@ethersproject/bytes": "^5.7.0", "@ethersproject/logger": "^5.7.0" } }, - "node_modules/zksync-ethers/node_modules/@ethersproject/constants": { + "node_modules/zksync-ethers/node_modules/@ethersproject/rlp": { "version": "5.7.0", "funding": [ { @@ -27294,10 +28708,30 @@ ], "license": "MIT", "dependencies": { - "@ethersproject/bignumber": "^5.7.0" + "@ethersproject/bytes": "^5.7.0", + "@ethersproject/logger": "^5.7.0" + } + }, + "node_modules/zksync-ethers/node_modules/@ethersproject/sha2": { + "version": "5.7.0", + "funding": [ + { + "type": "individual", + "url": "https://gitcoin.co/grants/13/ethersjs-complete-simple-and-tiny-2" + }, + { + "type": "individual", + "url": "https://www.buymeacoffee.com/ricmoo" + } + ], + "license": "MIT", + "dependencies": { + "@ethersproject/bytes": "^5.7.0", + "@ethersproject/logger": "^5.7.0", + "hash.js": "1.1.7" } }, - "node_modules/zksync-ethers/node_modules/@ethersproject/contracts": { + "node_modules/zksync-ethers/node_modules/@ethersproject/signing-key": { "version": "5.7.0", "funding": [ { @@ -27311,19 +28745,15 @@ ], "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" + "bn.js": "^5.2.1", + "elliptic": "6.5.4", + "hash.js": "1.1.7" } }, - "node_modules/zksync-ethers/node_modules/@ethersproject/hash": { + "node_modules/zksync-ethers/node_modules/@ethersproject/solidity": { "version": "5.7.0", "funding": [ { @@ -27337,18 +28767,15 @@ ], "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/sha2": "^5.7.0", "@ethersproject/strings": "^5.7.0" } }, - "node_modules/zksync-ethers/node_modules/@ethersproject/hdnode": { + "node_modules/zksync-ethers/node_modules/@ethersproject/strings": { "version": "5.7.0", "funding": [ { @@ -27362,21 +28789,12 @@ ], "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/constants": "^5.7.0", + "@ethersproject/logger": "^5.7.0" } }, - "node_modules/zksync-ethers/node_modules/@ethersproject/json-wallets": { + "node_modules/zksync-ethers/node_modules/@ethersproject/transactions": { "version": "5.7.0", "funding": [ { @@ -27390,22 +28808,18 @@ ], "license": "MIT", "dependencies": { - "@ethersproject/abstract-signer": "^5.7.0", "@ethersproject/address": "^5.7.0", + "@ethersproject/bignumber": "^5.7.0", "@ethersproject/bytes": "^5.7.0", - "@ethersproject/hdnode": "^5.7.0", + "@ethersproject/constants": "^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", - "aes-js": "3.0.0", - "scrypt-js": "3.0.1" + "@ethersproject/rlp": "^5.7.0", + "@ethersproject/signing-key": "^5.7.0" } }, - "node_modules/zksync-ethers/node_modules/@ethersproject/keccak256": { + "node_modules/zksync-ethers/node_modules/@ethersproject/units": { "version": "5.7.0", "funding": [ { @@ -27419,11 +28833,12 @@ ], "license": "MIT", "dependencies": { - "@ethersproject/bytes": "^5.7.0", - "js-sha3": "0.8.0" + "@ethersproject/bignumber": "^5.7.0", + "@ethersproject/constants": "^5.7.0", + "@ethersproject/logger": "^5.7.0" } }, - "node_modules/zksync-ethers/node_modules/@ethersproject/logger": { + "node_modules/zksync-ethers/node_modules/@ethersproject/wallet": { "version": "5.7.0", "funding": [ { @@ -27435,9 +28850,26 @@ "url": "https://www.buymeacoffee.com/ricmoo" } ], - "license": "MIT" + "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" + } }, - "node_modules/zksync-ethers/node_modules/@ethersproject/networks": { + "node_modules/zksync-ethers/node_modules/@ethersproject/web": { "version": "5.7.1", "funding": [ { @@ -27451,10 +28883,14 @@ ], "license": "MIT", "dependencies": { - "@ethersproject/logger": "^5.7.0" + "@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" } }, - "node_modules/zksync-ethers/node_modules/@ethersproject/pbkdf2": { + "node_modules/zksync-ethers/node_modules/@ethersproject/wordlists": { "version": "5.7.0", "funding": [ { @@ -27469,11 +28905,35 @@ "license": "MIT", "dependencies": { "@ethersproject/bytes": "^5.7.0", - "@ethersproject/sha2": "^5.7.0" + "@ethersproject/hash": "^5.7.0", + "@ethersproject/logger": "^5.7.0", + "@ethersproject/properties": "^5.7.0", + "@ethersproject/strings": "^5.7.0" } }, - "node_modules/zksync-ethers/node_modules/@ethersproject/properties": { - "version": "5.7.0", + "node_modules/zksync-ethers/node_modules/aes-js": { + "version": "3.0.0", + "license": "MIT" + }, + "node_modules/zksync-ethers/node_modules/elliptic": { + "version": "6.5.4", + "license": "MIT", + "dependencies": { + "bn.js": "^4.11.9", + "brorand": "^1.1.0", + "hash.js": "^1.0.0", + "hmac-drbg": "^1.0.1", + "inherits": "^2.0.4", + "minimalistic-assert": "^1.0.1", + "minimalistic-crypto-utils": "^1.0.1" + } + }, + "node_modules/zksync-ethers/node_modules/elliptic/node_modules/bn.js": { + "version": "4.12.2", + "license": "MIT" + }, + "node_modules/zksync-ethers/node_modules/ethers": { + "version": "5.7.2", "funding": [ { "type": "individual", @@ -27486,515 +28946,580 @@ ], "license": "MIT", "dependencies": { - "@ethersproject/logger": "^5.7.0" + "@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" } }, - "node_modules/zksync-ethers/node_modules/@ethersproject/providers": { - "version": "5.7.2", - "funding": [ - { - "type": "individual", - "url": "https://gitcoin.co/grants/13/ethersjs-complete-simple-and-tiny-2" + "node_modules/zksync-ethers/node_modules/ws": { + "version": "7.4.6", + "license": "MIT", + "engines": { + "node": ">=8.3.0" + }, + "peerDependencies": { + "bufferutil": "^4.0.1", + "utf-8-validate": "^5.0.2" + }, + "peerDependenciesMeta": { + "bufferutil": { + "optional": true }, - { - "type": "individual", - "url": "https://www.buymeacoffee.com/ricmoo" + "utf-8-validate": { + "optional": true } - ], + } + }, + "node_modules/zod": { + "version": "3.25.76", + "license": "MIT", + "funding": { + "url": "https://github.com/sponsors/colinhacks" + } + }, + "node_modules/zod-to-json-schema": { + "version": "3.24.6", + "license": "ISC", + "peerDependencies": { + "zod": "^3.24.1" + } + }, + "packages/eslint-config": { + "name": "@dkg/eslint-config", + "version": "0.0.2", + "devDependencies": { + "@eslint/js": "^9.29.0", + "@next/eslint-plugin-next": "^15.3.0", + "eslint": "^9.29.0", + "eslint-config-expo": "~9.2.0", + "eslint-config-prettier": "^10.1.1", + "eslint-plugin-only-warn": "^1.1.0", + "eslint-plugin-react": "^7.37.5", + "eslint-plugin-react-hooks": "^5.2.0", + "eslint-plugin-turbo": "^2.5.0", + "globals": "^16.2.0", + "typescript-eslint": "^8.33.0" + } + }, + "packages/eslint-config/node_modules/globals": { + "version": "16.4.0", + "dev": true, "license": "MIT", + "engines": { + "node": ">=18" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "packages/expo-forcegraph": { + "name": "@dkg/expo-forcegraph", + "version": "0.0.0", + "dependencies": { + "react-force-graph": "^1.48.0" + }, + "devDependencies": { + "@dkg/eslint-config": "*", + "tsup": "^8.5.0" + }, + "peerDependencies": { + "expo": "^53.0.0" + } + }, + "packages/internal": { + "version": "0.0.2", + "devDependencies": { + "@dkg/typescript-config": "*", + "@turbo/gen": "^2.5.0" + } + }, + "packages/plugin-auth": { + "name": "@dkg/plugin-auth", + "version": "0.0.2", + "dependencies": { + "@dkg/plugins": "^0.0.2", + "jsonwebtoken": "^9.0.2", + "passport": "^0.7.0", + "passport-jwt": "^4.0.1" + }, + "devDependencies": { + "@dkg/eslint-config": "*", + "@dkg/typescript-config": "*", + "@types/jsonwebtoken": "^9.0.7", + "@types/passport": "^1.0.17", + "@types/passport-jwt": "^4.0.1", + "tsup": "^8.5.0" + } + }, + "packages/plugin-dkg-essentials": { + "name": "@dkg/plugin-dkg-essentials", + "version": "0.0.3", "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", - "bech32": "1.1.4", - "ws": "7.4.6" + "@dkg/plugin-swagger": "^0.0.2", + "@dkg/plugins": "^0.0.2", + "busboy": "^1.6.0", + "sparqljs": "^3.7.3" + }, + "devDependencies": { + "@dkg/eslint-config": "*", + "@dkg/typescript-config": "*", + "@types/busboy": "^1.5.4", + "@types/sparqljs": "^3.1.12", + "tsup": "^8.5.0" } }, - "node_modules/zksync-ethers/node_modules/@ethersproject/random": { - "version": "5.7.0", - "funding": [ - { - "type": "individual", - "url": "https://gitcoin.co/grants/13/ethersjs-complete-simple-and-tiny-2" - }, - { - "type": "individual", - "url": "https://www.buymeacoffee.com/ricmoo" - } - ], + "packages/plugin-dkg-publisher": { + "name": "@dkg/plugin-dkg-publisher", + "version": "1.0.0", "license": "MIT", "dependencies": { - "@ethersproject/bytes": "^5.7.0", - "@ethersproject/logger": "^5.7.0" + "@bull-board/api": "^5.9.1", + "@bull-board/express": "^5.9.1", + "@dkg/plugin-swagger": "^0.0.2", + "@dkg/plugins": "^0.0.2", + "bull-board": "^2.1.3", + "bullmq": "^4.15.0", + "crypto-js": "^4.2.0", + "dkg.js": "^8.2.2", + "dotenv": "^16.0.0", + "drizzle-orm": "^0.44.7", + "ethers": "^6.13.0", + "express": "^5.1.0", + "ioredis": "^5.3.2", + "mysql2": "^3.6.5", + "uuid": "^9.0.1", + "winston": "^3.17.0", + "winston-daily-rotate-file": "^5.0.0" + }, + "devDependencies": { + "@dkg/eslint-config": "*", + "@dkg/typescript-config": "*", + "@types/crypto-js": "^4.2.1", + "@types/express": "^5.0.3", + "@types/mocha": "^10.0.6", + "@types/supertest": "^6.0.2", + "@types/uuid": "^9.0.7", + "chai": "^6.2.0", + "deep-eql": "^4.1.3", + "drizzle-kit": "^0.20.0", + "eslint": "^9.29.0", + "mocha": "^10.2.0", + "supertest": "^6.3.3", + "ts-node": "^10.9.1", + "tsup": "^8.5.0" } }, - "node_modules/zksync-ethers/node_modules/@ethersproject/rlp": { - "version": "5.7.0", - "funding": [ - { - "type": "individual", - "url": "https://gitcoin.co/grants/13/ethersjs-complete-simple-and-tiny-2" - }, - { - "type": "individual", - "url": "https://www.buymeacoffee.com/ricmoo" - } + "packages/plugin-dkg-publisher/node_modules/@esbuild/aix-ppc64": { + "version": "0.19.12", + "resolved": "https://registry.npmjs.org/@esbuild/aix-ppc64/-/aix-ppc64-0.19.12.tgz", + "integrity": "sha512-bmoCYyWdEL3wDQIVbcyzRyeKLgk2WtWLTWz1ZIAZF/EGbNOwSA6ew3PftJ1PqMiOOGu0OyFMzG53L0zqIpPeNA==", + "cpu": [ + "ppc64" ], + "dev": true, "license": "MIT", - "dependencies": { - "@ethersproject/bytes": "^5.7.0", - "@ethersproject/logger": "^5.7.0" + "optional": true, + "os": [ + "aix" + ], + "engines": { + "node": ">=12" } }, - "node_modules/zksync-ethers/node_modules/@ethersproject/sha2": { - "version": "5.7.0", - "funding": [ - { - "type": "individual", - "url": "https://gitcoin.co/grants/13/ethersjs-complete-simple-and-tiny-2" - }, - { - "type": "individual", - "url": "https://www.buymeacoffee.com/ricmoo" - } + "packages/plugin-dkg-publisher/node_modules/@esbuild/android-arm": { + "version": "0.19.12", + "resolved": "https://registry.npmjs.org/@esbuild/android-arm/-/android-arm-0.19.12.tgz", + "integrity": "sha512-qg/Lj1mu3CdQlDEEiWrlC4eaPZ1KztwGJ9B6J+/6G+/4ewxJg7gqj8eVYWvao1bXrqGiW2rsBZFSX3q2lcW05w==", + "cpu": [ + "arm" ], + "dev": true, "license": "MIT", - "dependencies": { - "@ethersproject/bytes": "^5.7.0", - "@ethersproject/logger": "^5.7.0", - "hash.js": "1.1.7" + "optional": true, + "os": [ + "android" + ], + "engines": { + "node": ">=12" } }, - "node_modules/zksync-ethers/node_modules/@ethersproject/signing-key": { - "version": "5.7.0", - "funding": [ - { - "type": "individual", - "url": "https://gitcoin.co/grants/13/ethersjs-complete-simple-and-tiny-2" - }, - { - "type": "individual", - "url": "https://www.buymeacoffee.com/ricmoo" - } + "packages/plugin-dkg-publisher/node_modules/@esbuild/android-arm64": { + "version": "0.19.12", + "resolved": "https://registry.npmjs.org/@esbuild/android-arm64/-/android-arm64-0.19.12.tgz", + "integrity": "sha512-P0UVNGIienjZv3f5zq0DP3Nt2IE/3plFzuaS96vihvD0Hd6H/q4WXUGpCxD/E8YrSXfNyRPbpTq+T8ZQioSuPA==", + "cpu": [ + "arm64" ], + "dev": true, "license": "MIT", - "dependencies": { - "@ethersproject/bytes": "^5.7.0", - "@ethersproject/logger": "^5.7.0", - "@ethersproject/properties": "^5.7.0", - "bn.js": "^5.2.1", - "elliptic": "6.5.4", - "hash.js": "1.1.7" + "optional": true, + "os": [ + "android" + ], + "engines": { + "node": ">=12" } }, - "node_modules/zksync-ethers/node_modules/@ethersproject/solidity": { - "version": "5.7.0", - "funding": [ - { - "type": "individual", - "url": "https://gitcoin.co/grants/13/ethersjs-complete-simple-and-tiny-2" - }, - { - "type": "individual", - "url": "https://www.buymeacoffee.com/ricmoo" - } + "packages/plugin-dkg-publisher/node_modules/@esbuild/android-x64": { + "version": "0.19.12", + "resolved": "https://registry.npmjs.org/@esbuild/android-x64/-/android-x64-0.19.12.tgz", + "integrity": "sha512-3k7ZoUW6Q6YqhdhIaq/WZ7HwBpnFBlW905Fa4s4qWJyiNOgT1dOqDiVAQFwBH7gBRZr17gLrlFCRzF6jFh7Kew==", + "cpu": [ + "x64" ], + "dev": true, "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" + "optional": true, + "os": [ + "android" + ], + "engines": { + "node": ">=12" } }, - "node_modules/zksync-ethers/node_modules/@ethersproject/strings": { - "version": "5.7.0", - "funding": [ - { - "type": "individual", - "url": "https://gitcoin.co/grants/13/ethersjs-complete-simple-and-tiny-2" - }, - { - "type": "individual", - "url": "https://www.buymeacoffee.com/ricmoo" - } + "packages/plugin-dkg-publisher/node_modules/@esbuild/darwin-arm64": { + "version": "0.19.12", + "cpu": [ + "arm64" ], + "dev": true, "license": "MIT", - "dependencies": { - "@ethersproject/bytes": "^5.7.0", - "@ethersproject/constants": "^5.7.0", - "@ethersproject/logger": "^5.7.0" + "optional": true, + "os": [ + "darwin" + ], + "engines": { + "node": ">=12" } }, - "node_modules/zksync-ethers/node_modules/@ethersproject/transactions": { - "version": "5.7.0", - "funding": [ - { - "type": "individual", - "url": "https://gitcoin.co/grants/13/ethersjs-complete-simple-and-tiny-2" - }, - { - "type": "individual", - "url": "https://www.buymeacoffee.com/ricmoo" - } + "packages/plugin-dkg-publisher/node_modules/@esbuild/darwin-x64": { + "version": "0.19.12", + "resolved": "https://registry.npmjs.org/@esbuild/darwin-x64/-/darwin-x64-0.19.12.tgz", + "integrity": "sha512-hKoVkKzFiToTgn+41qGhsUJXFlIjxI/jSYeZf3ugemDYZldIXIxhvwN6erJGlX4t5h417iFuheZ7l+YVn05N3A==", + "cpu": [ + "x64" ], + "dev": true, "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" + "optional": true, + "os": [ + "darwin" + ], + "engines": { + "node": ">=12" } }, - "node_modules/zksync-ethers/node_modules/@ethersproject/units": { - "version": "5.7.0", - "funding": [ - { - "type": "individual", - "url": "https://gitcoin.co/grants/13/ethersjs-complete-simple-and-tiny-2" - }, - { - "type": "individual", - "url": "https://www.buymeacoffee.com/ricmoo" - } + "packages/plugin-dkg-publisher/node_modules/@esbuild/freebsd-arm64": { + "version": "0.19.12", + "resolved": "https://registry.npmjs.org/@esbuild/freebsd-arm64/-/freebsd-arm64-0.19.12.tgz", + "integrity": "sha512-4aRvFIXmwAcDBw9AueDQ2YnGmz5L6obe5kmPT8Vd+/+x/JMVKCgdcRwH6APrbpNXsPz+K653Qg8HB/oXvXVukA==", + "cpu": [ + "arm64" ], + "dev": true, "license": "MIT", - "dependencies": { - "@ethersproject/bignumber": "^5.7.0", - "@ethersproject/constants": "^5.7.0", - "@ethersproject/logger": "^5.7.0" + "optional": true, + "os": [ + "freebsd" + ], + "engines": { + "node": ">=12" } }, - "node_modules/zksync-ethers/node_modules/@ethersproject/wallet": { - "version": "5.7.0", - "funding": [ - { - "type": "individual", - "url": "https://gitcoin.co/grants/13/ethersjs-complete-simple-and-tiny-2" - }, - { - "type": "individual", - "url": "https://www.buymeacoffee.com/ricmoo" - } + "packages/plugin-dkg-publisher/node_modules/@esbuild/freebsd-x64": { + "version": "0.19.12", + "resolved": "https://registry.npmjs.org/@esbuild/freebsd-x64/-/freebsd-x64-0.19.12.tgz", + "integrity": "sha512-EYoXZ4d8xtBoVN7CEwWY2IN4ho76xjYXqSXMNccFSx2lgqOG/1TBPW0yPx1bJZk94qu3tX0fycJeeQsKovA8gg==", + "cpu": [ + "x64" ], + "dev": true, "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" + "optional": true, + "os": [ + "freebsd" + ], + "engines": { + "node": ">=12" } }, - "node_modules/zksync-ethers/node_modules/@ethersproject/web": { - "version": "5.7.1", - "funding": [ - { - "type": "individual", - "url": "https://gitcoin.co/grants/13/ethersjs-complete-simple-and-tiny-2" - }, - { - "type": "individual", - "url": "https://www.buymeacoffee.com/ricmoo" - } + "packages/plugin-dkg-publisher/node_modules/@esbuild/linux-arm": { + "version": "0.19.12", + "resolved": "https://registry.npmjs.org/@esbuild/linux-arm/-/linux-arm-0.19.12.tgz", + "integrity": "sha512-J5jPms//KhSNv+LO1S1TX1UWp1ucM6N6XuL6ITdKWElCu8wXP72l9MM0zDTzzeikVyqFE6U8YAV9/tFyj0ti+w==", + "cpu": [ + "arm" ], + "dev": true, "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" + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=12" } }, - "node_modules/zksync-ethers/node_modules/@ethersproject/wordlists": { - "version": "5.7.0", - "funding": [ - { - "type": "individual", - "url": "https://gitcoin.co/grants/13/ethersjs-complete-simple-and-tiny-2" - }, - { - "type": "individual", - "url": "https://www.buymeacoffee.com/ricmoo" - } + "packages/plugin-dkg-publisher/node_modules/@esbuild/linux-arm64": { + "version": "0.19.12", + "resolved": "https://registry.npmjs.org/@esbuild/linux-arm64/-/linux-arm64-0.19.12.tgz", + "integrity": "sha512-EoTjyYyLuVPfdPLsGVVVC8a0p1BFFvtpQDB/YLEhaXyf/5bczaGeN15QkR+O4S5LeJ92Tqotve7i1jn35qwvdA==", + "cpu": [ + "arm64" ], + "dev": true, "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" + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=12" } }, - "node_modules/zksync-ethers/node_modules/aes-js": { - "version": "3.0.0", - "license": "MIT" - }, - "node_modules/zksync-ethers/node_modules/elliptic": { - "version": "6.5.4", + "packages/plugin-dkg-publisher/node_modules/@esbuild/linux-ia32": { + "version": "0.19.12", + "resolved": "https://registry.npmjs.org/@esbuild/linux-ia32/-/linux-ia32-0.19.12.tgz", + "integrity": "sha512-Thsa42rrP1+UIGaWz47uydHSBOgTUnwBwNq59khgIwktK6x60Hivfbux9iNR0eHCHzOLjLMLfUMLCypBkZXMHA==", + "cpu": [ + "ia32" + ], + "dev": true, "license": "MIT", - "dependencies": { - "bn.js": "^4.11.9", - "brorand": "^1.1.0", - "hash.js": "^1.0.0", - "hmac-drbg": "^1.0.1", - "inherits": "^2.0.4", - "minimalistic-assert": "^1.0.1", - "minimalistic-crypto-utils": "^1.0.1" + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=12" } }, - "node_modules/zksync-ethers/node_modules/elliptic/node_modules/bn.js": { - "version": "4.12.2", - "license": "MIT" - }, - "node_modules/zksync-ethers/node_modules/ethers": { - "version": "5.7.2", - "funding": [ - { - "type": "individual", - "url": "https://gitcoin.co/grants/13/ethersjs-complete-simple-and-tiny-2" - }, - { - "type": "individual", - "url": "https://www.buymeacoffee.com/ricmoo" - } + "packages/plugin-dkg-publisher/node_modules/@esbuild/linux-loong64": { + "version": "0.19.12", + "resolved": "https://registry.npmjs.org/@esbuild/linux-loong64/-/linux-loong64-0.19.12.tgz", + "integrity": "sha512-LiXdXA0s3IqRRjm6rV6XaWATScKAXjI4R4LoDlvO7+yQqFdlr1Bax62sRwkVvRIrwXxvtYEHHI4dm50jAXkuAA==", + "cpu": [ + "loong64" ], + "dev": true, "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" + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=12" } }, - "node_modules/zksync-ethers/node_modules/ws": { - "version": "7.4.6", + "packages/plugin-dkg-publisher/node_modules/@esbuild/linux-mips64el": { + "version": "0.19.12", + "resolved": "https://registry.npmjs.org/@esbuild/linux-mips64el/-/linux-mips64el-0.19.12.tgz", + "integrity": "sha512-fEnAuj5VGTanfJ07ff0gOA6IPsvrVHLVb6Lyd1g2/ed67oU1eFzL0r9WL7ZzscD+/N6i3dWumGE1Un4f7Amf+w==", + "cpu": [ + "mips64el" + ], + "dev": true, "license": "MIT", + "optional": true, + "os": [ + "linux" + ], "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 - } + "node": ">=12" } }, - "node_modules/zod": { - "version": "3.25.76", + "packages/plugin-dkg-publisher/node_modules/@esbuild/linux-ppc64": { + "version": "0.19.12", + "resolved": "https://registry.npmjs.org/@esbuild/linux-ppc64/-/linux-ppc64-0.19.12.tgz", + "integrity": "sha512-nYJA2/QPimDQOh1rKWedNOe3Gfc8PabU7HT3iXWtNUbRzXS9+vgB0Fjaqr//XNbd82mCxHzik2qotuI89cfixg==", + "cpu": [ + "ppc64" + ], + "dev": true, "license": "MIT", - "funding": { - "url": "https://github.com/sponsors/colinhacks" + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=12" } }, - "node_modules/zod-to-json-schema": { - "version": "3.24.6", - "license": "ISC", - "peerDependencies": { - "zod": "^3.24.1" + "packages/plugin-dkg-publisher/node_modules/@esbuild/linux-riscv64": { + "version": "0.19.12", + "resolved": "https://registry.npmjs.org/@esbuild/linux-riscv64/-/linux-riscv64-0.19.12.tgz", + "integrity": "sha512-2MueBrlPQCw5dVJJpQdUYgeqIzDQgw3QtiAHUC4RBz9FXPrskyyU3VI1hw7C0BSKB9OduwSJ79FTCqtGMWqJHg==", + "cpu": [ + "riscv64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=12" } }, - "packages/eslint-config": { - "name": "@dkg/eslint-config", - "version": "0.0.2", - "devDependencies": { - "@eslint/js": "^9.29.0", - "@next/eslint-plugin-next": "^15.3.0", - "eslint": "^9.29.0", - "eslint-config-expo": "~9.2.0", - "eslint-config-prettier": "^10.1.1", - "eslint-plugin-only-warn": "^1.1.0", - "eslint-plugin-react": "^7.37.5", - "eslint-plugin-react-hooks": "^5.2.0", - "eslint-plugin-turbo": "^2.5.0", - "globals": "^16.2.0", - "typescript-eslint": "^8.33.0" + "packages/plugin-dkg-publisher/node_modules/@esbuild/linux-s390x": { + "version": "0.19.12", + "resolved": "https://registry.npmjs.org/@esbuild/linux-s390x/-/linux-s390x-0.19.12.tgz", + "integrity": "sha512-+Pil1Nv3Umes4m3AZKqA2anfhJiVmNCYkPchwFJNEJN5QxmTs1uzyy4TvmDrCRNT2ApwSari7ZIgrPeUx4UZDg==", + "cpu": [ + "s390x" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=12" } }, - "packages/eslint-config/node_modules/globals": { - "version": "16.4.0", + "packages/plugin-dkg-publisher/node_modules/@esbuild/linux-x64": { + "version": "0.19.12", + "resolved": "https://registry.npmjs.org/@esbuild/linux-x64/-/linux-x64-0.19.12.tgz", + "integrity": "sha512-B71g1QpxfwBvNrfyJdVDexenDIt1CiDN1TIXLbhOw0KhJzE78KIFGX6OJ9MrtC0oOqMWf+0xop4qEU8JrJTwCg==", + "cpu": [ + "x64" + ], "dev": true, "license": "MIT", + "optional": true, + "os": [ + "linux" + ], "engines": { - "node": ">=18" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" + "node": ">=12" } }, - "packages/expo-forcegraph": { - "name": "@dkg/expo-forcegraph", - "version": "0.0.0", - "dependencies": { - "react-force-graph": "^1.48.0" - }, - "devDependencies": { - "@dkg/eslint-config": "*", - "tsup": "^8.5.0" - }, - "peerDependencies": { - "expo": "^53.0.0" + "packages/plugin-dkg-publisher/node_modules/@esbuild/netbsd-x64": { + "version": "0.19.12", + "resolved": "https://registry.npmjs.org/@esbuild/netbsd-x64/-/netbsd-x64-0.19.12.tgz", + "integrity": "sha512-3ltjQ7n1owJgFbuC61Oj++XhtzmymoCihNFgT84UAmJnxJfm4sYCiSLTXZtE00VWYpPMYc+ZQmB6xbSdVh0JWA==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "netbsd" + ], + "engines": { + "node": ">=12" } }, - "packages/internal": { - "version": "0.0.2", - "devDependencies": { - "@dkg/typescript-config": "*", - "@turbo/gen": "^2.5.0" + "packages/plugin-dkg-publisher/node_modules/@esbuild/openbsd-x64": { + "version": "0.19.12", + "resolved": "https://registry.npmjs.org/@esbuild/openbsd-x64/-/openbsd-x64-0.19.12.tgz", + "integrity": "sha512-RbrfTB9SWsr0kWmb9srfF+L933uMDdu9BIzdA7os2t0TXhCRjrQyCeOt6wVxr79CKD4c+p+YhCj31HBkYcXebw==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "openbsd" + ], + "engines": { + "node": ">=12" } }, - "packages/plugin-auth": { - "name": "@dkg/plugin-auth", - "version": "0.0.2", - "dependencies": { - "@dkg/plugins": "^0.0.2", - "jsonwebtoken": "^9.0.2", - "passport": "^0.7.0", - "passport-jwt": "^4.0.1" - }, - "devDependencies": { - "@dkg/eslint-config": "*", - "@dkg/typescript-config": "*", - "@types/jsonwebtoken": "^9.0.7", - "@types/passport": "^1.0.17", - "@types/passport-jwt": "^4.0.1", - "tsup": "^8.5.0" + "packages/plugin-dkg-publisher/node_modules/@esbuild/sunos-x64": { + "version": "0.19.12", + "resolved": "https://registry.npmjs.org/@esbuild/sunos-x64/-/sunos-x64-0.19.12.tgz", + "integrity": "sha512-HKjJwRrW8uWtCQnQOz9qcU3mUZhTUQvi56Q8DPTLLB+DawoiQdjsYq+j+D3s9I8VFtDr+F9CjgXKKC4ss89IeA==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "sunos" + ], + "engines": { + "node": ">=12" } }, - "packages/plugin-dkg-essentials": { - "name": "@dkg/plugin-dkg-essentials", - "version": "0.0.3", - "dependencies": { - "@dkg/plugin-swagger": "^0.0.2", - "@dkg/plugins": "^0.0.2", - "busboy": "^1.6.0", - "sparqljs": "^3.7.3" - }, - "devDependencies": { - "@dkg/eslint-config": "*", - "@dkg/typescript-config": "*", - "@types/busboy": "^1.5.4", - "@types/sparqljs": "^3.1.12", - "tsup": "^8.5.0" + "packages/plugin-dkg-publisher/node_modules/@esbuild/win32-arm64": { + "version": "0.19.12", + "resolved": "https://registry.npmjs.org/@esbuild/win32-arm64/-/win32-arm64-0.19.12.tgz", + "integrity": "sha512-URgtR1dJnmGvX864pn1B2YUYNzjmXkuJOIqG2HdU62MVS4EHpU2946OZoTMnRUHklGtJdJZ33QfzdjGACXhn1A==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "win32" + ], + "engines": { + "node": ">=12" } }, - "packages/plugin-dkg-publisher": { - "name": "@dkg/plugin-dkg-publisher", - "version": "1.0.0", + "packages/plugin-dkg-publisher/node_modules/@esbuild/win32-ia32": { + "version": "0.19.12", + "resolved": "https://registry.npmjs.org/@esbuild/win32-ia32/-/win32-ia32-0.19.12.tgz", + "integrity": "sha512-+ZOE6pUkMOJfmxmBZElNOx72NKpIa/HFOMGzu8fqzQJ5kgf6aTGrcJaFsNiVMH4JKpMipyK+7k0n2UXN7a8YKQ==", + "cpu": [ + "ia32" + ], + "dev": true, "license": "MIT", - "dependencies": { - "@bull-board/api": "^5.9.1", - "@bull-board/express": "^5.9.1", - "@dkg/plugin-swagger": "^0.0.2", - "@dkg/plugins": "^0.0.2", - "bull-board": "^2.1.3", - "bullmq": "^4.15.0", - "crypto-js": "^4.2.0", - "dkg.js": "^8.2.2", - "dotenv": "^16.0.0", - "drizzle-orm": "^0.44.7", - "ethers": "^6.13.0", - "express": "^5.1.0", - "ioredis": "^5.3.2", - "mysql2": "^3.6.5", - "uuid": "^9.0.1", - "winston": "^3.17.0", - "winston-daily-rotate-file": "^5.0.0" - }, - "devDependencies": { - "@dkg/eslint-config": "*", - "@dkg/typescript-config": "*", - "@types/crypto-js": "^4.2.1", - "@types/express": "^5.0.3", - "@types/mocha": "^10.0.6", - "@types/supertest": "^6.0.2", - "@types/uuid": "^9.0.7", - "chai": "^6.2.0", - "deep-eql": "^4.1.3", - "drizzle-kit": "^0.20.0", - "eslint": "^9.29.0", - "mocha": "^10.2.0", - "supertest": "^6.3.3", - "ts-node": "^10.9.1", - "tsup": "^8.5.0" + "optional": true, + "os": [ + "win32" + ], + "engines": { + "node": ">=12" } }, - "packages/plugin-dkg-publisher/node_modules/@esbuild/darwin-arm64": { + "packages/plugin-dkg-publisher/node_modules/@esbuild/win32-x64": { "version": "0.19.12", + "resolved": "https://registry.npmjs.org/@esbuild/win32-x64/-/win32-x64-0.19.12.tgz", + "integrity": "sha512-T1QyPSDCyMXaO3pzBkF96E8xMkiRYbUEZADd29SyPGabqxMViNoii+NcK7eWJAEoU6RZyEm5lVSIjTmcdoB9HA==", "cpu": [ - "arm64" + "x64" ], "dev": true, "license": "MIT", "optional": true, "os": [ - "darwin" + "win32" ], "engines": { "node": ">=12" @@ -28091,102 +29616,6 @@ "url": "https://github.com/sponsors/isaacs" } }, - "packages/plugin-dkg-publisher/node_modules/drizzle-orm": { - "version": "0.29.5", - "license": "Apache-2.0", - "peerDependencies": { - "@aws-sdk/client-rds-data": ">=3", - "@cloudflare/workers-types": ">=3", - "@libsql/client": "*", - "@neondatabase/serverless": ">=0.1", - "@opentelemetry/api": "^1.4.1", - "@planetscale/database": ">=1", - "@types/better-sqlite3": "*", - "@types/pg": "*", - "@types/react": ">=18", - "@types/sql.js": "*", - "@vercel/postgres": "*", - "better-sqlite3": ">=7", - "bun-types": "*", - "expo-sqlite": ">=13.2.0", - "knex": "*", - "kysely": "*", - "mysql2": ">=2", - "pg": ">=8", - "postgres": ">=3", - "react": ">=18", - "sql.js": ">=1", - "sqlite3": ">=5" - }, - "peerDependenciesMeta": { - "@aws-sdk/client-rds-data": { - "optional": true - }, - "@cloudflare/workers-types": { - "optional": true - }, - "@libsql/client": { - "optional": true - }, - "@neondatabase/serverless": { - "optional": true - }, - "@opentelemetry/api": { - "optional": true - }, - "@planetscale/database": { - "optional": true - }, - "@types/better-sqlite3": { - "optional": true - }, - "@types/pg": { - "optional": true - }, - "@types/react": { - "optional": true - }, - "@types/sql.js": { - "optional": true - }, - "@vercel/postgres": { - "optional": true - }, - "better-sqlite3": { - "optional": true - }, - "bun-types": { - "optional": true - }, - "expo-sqlite": { - "optional": true - }, - "knex": { - "optional": true - }, - "kysely": { - "optional": true - }, - "mysql2": { - "optional": true - }, - "pg": { - "optional": true - }, - "postgres": { - "optional": true - }, - "react": { - "optional": true - }, - "sql.js": { - "optional": true - }, - "sqlite3": { - "optional": true - } - } - }, "packages/plugin-dkg-publisher/node_modules/env-paths": { "version": "3.0.0", "dev": true, diff --git a/package.json b/package.json index dba5f9ac..a64266e7 100644 --- a/package.json +++ b/package.json @@ -53,13 +53,14 @@ "apps/agent/tests/integration" ], "dependencies": { + "dkg.js": "^8.2.4", "mysql2": "^3.15.3" }, "overrides": { "@types/express": "^5.0.3" }, "optionalDependencies": { - "@rollup/rollup-linux-x64-gnu": "^4.52.5", - "@node-rs/argon2-linux-x64-gnu": "^1.7.0" + "@node-rs/argon2-linux-x64-gnu": "^1.7.0", + "@rollup/rollup-linux-x64-gnu": "^4.52.5" } } diff --git a/packages/plugin-dkg-publisher/migrate.js b/packages/plugin-dkg-publisher/migrate.js index 4953594c..1f9b870b 100644 --- a/packages/plugin-dkg-publisher/migrate.js +++ b/packages/plugin-dkg-publisher/migrate.js @@ -2,7 +2,9 @@ /** * Database migration script for DKG Publisher Plugin - * This script runs Drizzle migrations to create/update database tables + * + * NOTE: Migrations now run automatically on plugin startup (see services/index.ts). + * This script is provided for manual/debug use only. */ const { drizzle } = require("drizzle-orm/mysql2"); diff --git a/packages/plugin-dkg-publisher/setup.js b/packages/plugin-dkg-publisher/setup.js index a52ea17f..de1e8558 100644 --- a/packages/plugin-dkg-publisher/setup.js +++ b/packages/plugin-dkg-publisher/setup.js @@ -49,7 +49,21 @@ function ask(question, options = {}) { ? question.replace(/:/g, " (input hidden):") : question; + // Mute output for password fields so typed characters are not echoed + if (options.password) { + rl._writeToOutput = (str) => { + // Only suppress characters after the prompt has been written + if (str === prompt || str.includes(prompt)) { + process.stdout.write(str); + } + }; + } + rl.question(`${colors.yellow}${prompt}${colors.reset} `, (answer) => { + if (options.password) { + // Print a newline since the user's Enter was not echoed + process.stdout.write("\n"); + } rl.close(); // Handle empty input - use default if available @@ -131,6 +145,90 @@ function getAddressFromPrivateKey(privateKey) { } } +// Bootstrap migration journal for databases created by a previous version of +// setup.js (raw DDL, no __drizzle_migrations table). Without this, migrate() +// would try to re-run CREATE TABLE statements on existing tables and fail. +// This mirrors the logic in src/database/bootstrap.ts but uses raw mysql2 queries. +async function bootstrapJournalForSetup(pool) { + const fsSync = require("fs"); + + const [journals] = await pool.execute( + `SELECT COUNT(*) as cnt FROM information_schema.tables WHERE table_schema = DATABASE() AND table_name = '__drizzle_migrations'`, + ); + if (Number(journals[0].cnt) > 0) return; + + const [tables] = await pool.execute( + `SELECT COUNT(*) as cnt FROM information_schema.tables WHERE table_schema = DATABASE() AND table_name IN ('assets', 'wallets', 'publishing_attempts', 'batches')`, + ); + const tableCount = Number(tables[0].cnt); + if (tableCount === 0) return; // Fresh DB + + if (tableCount < 4) { + throw new Error( + "Database is in a partial state (some tables missing). Please choose 'Start fresh' (option 2).", + ); + } + + log(" Bootstrapping migration journal for existing database...", "cyan"); + + await pool.execute(` + CREATE TABLE IF NOT EXISTS __drizzle_migrations ( + id SERIAL PRIMARY KEY, + hash text NOT NULL, + created_at bigint + ) + `); + + const journalPath = path.join( + __dirname, + "src/database/migrations/meta/_journal.json", + ); + const journal = JSON.parse(fsSync.readFileSync(journalPath, "utf-8")); + + // Seed 0000 and 0001 (setup.js schema = post-0001 state) + for (const entry of journal.entries) { + if (entry.idx > 1) break; + const sqlFile = path.join( + __dirname, + `src/database/migrations/${entry.tag}.sql`, + ); + const content = fsSync.readFileSync(sqlFile, "utf-8"); + const hash = crypto.createHash("sha256").update(content).digest("hex"); + await pool.execute( + `INSERT INTO __drizzle_migrations (hash, created_at) VALUES (?, ?)`, + [hash, entry.when], + ); + } + + // Check if 0002 changes are already present + const entry0002 = journal.entries.find((e) => e.idx === 2); + if (entry0002) { + const [hasErrorDetails] = await pool.execute( + `SELECT COUNT(*) as cnt FROM information_schema.columns WHERE table_schema = DATABASE() AND table_name = 'publishing_attempts' AND column_name = 'error_details'`, + ); + const [hasPrivateKey] = await pool.execute( + `SELECT COUNT(*) as cnt FROM information_schema.columns WHERE table_schema = DATABASE() AND table_name = 'wallets' AND column_name = 'private_key'`, + ); + if ( + Number(hasErrorDetails[0].cnt) > 0 && + Number(hasPrivateKey[0].cnt) > 0 + ) { + const sqlFile = path.join( + __dirname, + `src/database/migrations/${entry0002.tag}.sql`, + ); + const content = fsSync.readFileSync(sqlFile, "utf-8"); + const hash = crypto.createHash("sha256").update(content).digest("hex"); + await pool.execute( + `INSERT INTO __drizzle_migrations (hash, created_at) VALUES (?, ?)`, + [hash, entry0002.when], + ); + } + } + + log(" āœ“ Migration journal bootstrapped", "green"); +} + // Check if configuration already exists async function checkExistingConfig() { const existingEnv = ".env.publisher"; @@ -312,7 +410,7 @@ async function addWalletsOnly(configDetails) { // Insert new wallets for (const wallet of wallets) { await connection.execute( - `INSERT INTO wallets (address, private_key_encrypted, blockchain) VALUES (?, ?, ?)`, + `INSERT INTO wallets (address, private_key, blockchain) VALUES (?, ?, ?)`, [wallet.address, wallet.privateKey, wallet.blockchain], ); } @@ -351,13 +449,15 @@ async function setup() { // Check for existing configuration const { hasConfig, configDetails } = await checkExistingConfig(); + let setupMode; + if (hasConfig) { log("šŸ” Existing configuration detected:", "yellow"); if (configDetails.env) log(" • .env.publisher found", "cyan"); if (configDetails.compose) log(" • docker-compose.knowledge-manager.yml found", "cyan"); - const setupMode = await ask( + setupMode = await ask( "\nChoose setup mode:\n1. Update existing configuration\n2. Start fresh (will backup existing files)\n3. Add wallets only\nChoice (1-3):", { validate: (input) => ["1", "2", "3"].includes(input), @@ -435,7 +535,7 @@ async function setup() { logStep("3/7", "DKG Network Configuration"); const dkgEndpoint = await ask( - "DKG OT-Node URL (default: http://localhost:8900):", + "DKG Engine URL (default: http://localhost:8900):", { default: "http://localhost:8900", }, @@ -656,7 +756,8 @@ JWT_SECRET=${jwtSecret} # DATADOG_API_KEY= `; - await createFile(".env.publisher", envContent); + const overwriteConfig = setupMode === "1" || setupMode === "2"; + await createFile(".env.publisher", envContent, overwriteConfig); // Skip wallet configuration file - wallets will be inserted directly into database @@ -707,6 +808,7 @@ volumes: await createFile( "docker-compose.knowledge-manager.yml", dockerComposeContent, + overwriteConfig, ); // Package.json scripts @@ -776,177 +878,60 @@ volumes: await connection.changeUser({ database: dbName }); log(`āœ“ Connected to database '${dbName}'`, "green"); - // Create tables one by one (MySQL can't handle multiple CREATE statements in one execute) - log("Creating tables...", "cyan"); - - // Drop existing tables if they exist to ensure clean schema - log(" Dropping existing tables if they exist...", "white"); - await connection.execute("SET FOREIGN_KEY_CHECKS = 0"); - await connection.execute("DROP TABLE IF EXISTS wallet_metrics"); - await connection.execute("DROP TABLE IF EXISTS publishing_attempts"); - await connection.execute("DROP TABLE IF EXISTS assets"); - await connection.execute("DROP TABLE IF EXISTS wallets"); - await connection.execute("DROP TABLE IF EXISTS batches"); - await connection.execute("DROP TABLE IF EXISTS metrics_hourly"); - await connection.execute("SET FOREIGN_KEY_CHECKS = 1"); - - // Assets table with new schema - log(" Creating assets table...", "white"); - await connection.execute(` - CREATE TABLE assets ( - id INT AUTO_INCREMENT PRIMARY KEY, - wallet_id INT, - batch_id INT, - - -- Content and metadata - content_url TEXT NOT NULL, - content_size BIGINT NOT NULL, - source VARCHAR(100), - source_id VARCHAR(255), - - -- Publishing configuration - priority INTEGER DEFAULT 50, - privacy ENUM('private', 'public') DEFAULT 'private', - epochs INTEGER DEFAULT 2, - replications INTEGER DEFAULT 1, - max_attempts INTEGER DEFAULT 3, - - -- Status and attempts - status ENUM('pending', 'queued', 'assigned', 'publishing', 'published', 'failed') NOT NULL DEFAULT 'pending', - status_message TEXT, - attempt_count INTEGER DEFAULT 0, - retry_count INTEGER DEFAULT 0, - next_retry_at TIMESTAMP NULL, - last_error TEXT, - - -- Publishing results - ual VARCHAR(255) UNIQUE, - transaction_hash VARCHAR(66), - blockchain VARCHAR(50), - - -- Timestamps - created_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP, - queued_at TIMESTAMP NULL, - assigned_at TIMESTAMP NULL, - publishing_started_at TIMESTAMP NULL, - published_at TIMESTAMP NULL, - updated_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, - - INDEX idx_status (status), - INDEX idx_retry (status, next_retry_at), - INDEX idx_source (source, source_id), - INDEX idx_pending (status, created_at), - INDEX idx_batch (batch_id) - ) - `); - - // Wallets table - log(" Creating wallets table...", "white"); - await connection.execute(` - CREATE TABLE wallets ( - id INT AUTO_INCREMENT PRIMARY KEY, - address VARCHAR(42) UNIQUE NOT NULL, - private_key_encrypted TEXT NOT NULL, - blockchain VARCHAR(50) NOT NULL, - is_active BOOLEAN DEFAULT TRUE, - is_locked BOOLEAN DEFAULT FALSE, - locked_by VARCHAR(100), - locked_at TIMESTAMP NULL, - last_used_at TIMESTAMP NULL, - total_uses INTEGER DEFAULT 0, - successful_uses INTEGER DEFAULT 0, - failed_uses INTEGER DEFAULT 0, - created_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP, - INDEX idx_available (is_active, is_locked, last_used_at) - ) - `); - - // Publishing attempts table - log(" Creating publishing_attempts table...", "white"); - await connection.execute(` - CREATE TABLE publishing_attempts ( - id INT AUTO_INCREMENT PRIMARY KEY, - asset_id INT NOT NULL, - attempt_number INTEGER NOT NULL, - worker_id VARCHAR(100), - wallet_address VARCHAR(42) NOT NULL, - wallet_id INT, - otnode_url TEXT, - blockchain VARCHAR(50), - transaction_hash VARCHAR(66), - gas_used BIGINT, - status ENUM('started', 'success', 'failed', 'timeout') NOT NULL, - ual VARCHAR(255), - error_type VARCHAR(50), - error_message TEXT, - started_at TIMESTAMP NOT NULL, - completed_at TIMESTAMP NULL, - duration_seconds INTEGER, - created_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP, - FOREIGN KEY (asset_id) REFERENCES assets(id) ON DELETE CASCADE, - INDEX idx_asset_attempts (asset_id, attempt_number), - INDEX idx_wallet_usage (wallet_address, started_at) - ) - `); - - // Batches table - log(" Creating batches table...", "white"); - await connection.execute(` - CREATE TABLE batches ( - id INT AUTO_INCREMENT PRIMARY KEY, - batch_name VARCHAR(255), - source VARCHAR(100), - total_assets INT NOT NULL DEFAULT 0, - pending_count INT NOT NULL DEFAULT 0, - processing_count INT NOT NULL DEFAULT 0, - published_count INT NOT NULL DEFAULT 0, - failed_count INT NOT NULL DEFAULT 0, - created_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP, - completed_at TIMESTAMP NULL, - INDEX idx_batch_status (created_at, completed_at) - ) - `); - - // Metrics hourly table - log(" Creating metrics_hourly table...", "white"); - await connection.execute(` - CREATE TABLE metrics_hourly ( - hour_timestamp TIMESTAMP PRIMARY KEY NOT NULL, - assets_registered INT DEFAULT 0, - assets_published INT DEFAULT 0, - assets_failed INT DEFAULT 0, - avg_publish_duration_seconds INT, - total_gas_used BIGINT, - unique_wallets_used INT, - INDEX idx_metrics_hour (hour_timestamp) - ) - `); - - // Wallet metrics table - log(" Creating wallet_metrics table...", "white"); - await connection.execute(` - CREATE TABLE wallet_metrics ( - wallet_id INT NOT NULL, - date TIMESTAMP NOT NULL, - total_publishes INT DEFAULT 0, - successful_publishes INT DEFAULT 0, - failed_publishes INT DEFAULT 0, - avg_duration_seconds INT, - total_gas_used BIGINT, - PRIMARY KEY (wallet_id, date), - FOREIGN KEY (wallet_id) REFERENCES wallets(id) ON DELETE CASCADE - ) - `); - - // Add foreign key constraints after all tables are created - log(" Adding foreign key constraints...", "white"); - await connection.execute(` - ALTER TABLE assets - ADD CONSTRAINT fk_assets_wallet_id - FOREIGN KEY (wallet_id) REFERENCES wallets(id) ON DELETE SET NULL - `); - - log("āœ“ Database tables created/verified", "green"); + // Run Drizzle migrations to create/update tables + log("Running database migrations...", "cyan"); + + // Check if this is a fresh start (Mode 2) — drop all tables first + if (setupMode === "2" || !hasConfig) { + log(" Dropping existing tables for fresh setup...", "white"); + await connection.execute("SET FOREIGN_KEY_CHECKS = 0"); + await connection.execute("DROP TABLE IF EXISTS __drizzle_migrations"); + await connection.execute("DROP TABLE IF EXISTS wallet_metrics"); + await connection.execute("DROP TABLE IF EXISTS publishing_attempts"); + await connection.execute("DROP TABLE IF EXISTS assets"); + await connection.execute("DROP TABLE IF EXISTS wallets"); + await connection.execute("DROP TABLE IF EXISTS batches"); + await connection.execute("DROP TABLE IF EXISTS metrics_hourly"); + await connection.execute("SET FOREIGN_KEY_CHECKS = 1"); + } + + // Close the single connection — Drizzle needs a pool + await connection.end(); + connection = null; + + // Run Drizzle migrations via a dedicated connection with FK checks disabled. + // Migration 0001 changes column types that have FK references, and MySQL + // validates FK compatibility on each ALTER TABLE. + const { drizzle } = require("drizzle-orm/mysql2"); + const { migrate } = require("drizzle-orm/mysql2/migrator"); + const migrationConn = await mysql.createConnection({ + host: dbHost, + port: parseInt(dbPort), + user: dbUser, + password: dbPassword, + database: dbName, + }); + try { + // Bootstrap migration journal for existing databases without one + // (e.g. created by a previous version of setup.js with raw DDL) + await bootstrapJournalForSetup(migrationConn); + + await migrate(drizzle(migrationConn), { + migrationsFolder: path.join(__dirname, "src/database/migrations"), + }); + } finally { + await migrationConn.end(); + } + log("āœ“ Database migrations completed", "green"); + + // Reconnect with single connection for wallet insertion + connection = await mysql.createConnection({ + host: dbHost, + port: parseInt(dbPort), + user: dbUser, + password: dbPassword, + database: dbName, + }); // Verify tables were created const [tables] = await connection.execute("SHOW TABLES"); @@ -991,7 +976,7 @@ volumes: const privateKey = wallet.privateKey; const [result] = await connection.execute( - `INSERT INTO wallets (address, private_key_encrypted, blockchain) VALUES (?, ?, ?)`, + `INSERT INTO wallets (address, private_key, blockchain) VALUES (?, ?, ?)`, [wallet.address, privateKey, wallet.blockchain], ); @@ -1086,7 +1071,6 @@ volumes: log("• Add more wallets: npm run setup (choose option 3)", "white"); log(" Workers will auto-restart to match new wallet count", "white"); log("• View dashboard at: /admin/queues (when agent is running)", "white"); - log("• Docker alternative: npm run km:docker:up", "white"); log("• Check health: GET /api/knowledge/health", "white"); log("\nExample usage in DKG Agent plugin:", "yellow"); @@ -1110,16 +1094,12 @@ GET /api/knowledge/metrics/queue GET /api/knowledge/metrics/wallets GET /api/knowledge/health -// MCP Tool (for Claude integration) +// MCP Tool knowledge-asset-publish`, "white", ); log("\nāš ļø Security Notes:", "red"); - log( - "• Wallet private keys are encrypted and stored in the database", - "yellow", - ); log("• Keep your DATABASE_URL and ENCRYPTION_KEY secure", "yellow"); log("• Use environment variables for production deployments", "yellow"); diff --git a/packages/plugin-dkg-publisher/src/database/bootstrap.ts b/packages/plugin-dkg-publisher/src/database/bootstrap.ts new file mode 100644 index 00000000..f6191d24 --- /dev/null +++ b/packages/plugin-dkg-publisher/src/database/bootstrap.ts @@ -0,0 +1,131 @@ +import { Database } from "./index"; +import { sql } from "drizzle-orm"; +import crypto from "crypto"; +import fs from "fs"; +import path from "path"; + +/** + * Bootstrap migration journal for databases created by setup.js (raw DDL). + * + * setup.js creates tables directly without Drizzle migration tracking. + * Without this guard, runMigrations() would try to run 0000 (CREATE TABLE) + * on existing tables and fail. + * + * Logic: + * 1. If __drizzle_migrations exists → already managed by Drizzle, return early + * 2. If core tables don't all exist → fresh DB, let migrations handle it + * 3. If tables exist but no journal → seed journal with already-applied migrations + */ +export async function bootstrapMigrationJournal(db: Database): Promise { + // Check if __drizzle_migrations table exists + const journalExists = await tableExists(db, "__drizzle_migrations"); + if (journalExists) { + return; // Already managed by Drizzle + } + + // Check if core tables exist (setup.js creates these) + const coreTables = ["assets", "wallets", "publishing_attempts", "batches"]; + const existingTables = await Promise.all( + coreTables.map((t) => tableExists(db, t)), + ); + const existingCount = existingTables.filter(Boolean).length; + + if (existingCount === 0) { + return; // Fresh DB — let migrations create everything + } + + if (existingCount < coreTables.length) { + const missing = coreTables.filter((_, i) => !existingTables[i]); + throw new Error( + `Database is in a partial state: tables ${missing.join(", ")} are missing. ` + + `This usually means setup.js crashed mid-creation. ` + + `Please drop all tables and run setup again.`, + ); + } + + // Tables exist but no journal — setup.js-created database + console.log( + "šŸ“‹ Detected setup.js-created database without migration journal. Bootstrapping...", + ); + + // Create the __drizzle_migrations table (same schema Drizzle uses) + await db.execute(sql` + CREATE TABLE IF NOT EXISTS \`__drizzle_migrations\` ( + id SERIAL PRIMARY KEY, + hash text NOT NULL, + created_at bigint + ) + `); + + // Read migration files and compute hashes to seed the journal + const migrationsDir = path.join( + __dirname, + "../src/database/migrations", + ); + const journalPath = path.join(migrationsDir, "meta/_journal.json"); + const journal = JSON.parse(fs.readFileSync(journalPath, "utf-8")); + + // Always seed 0000 and 0001 (setup.js schema = post-0001 state) + for (const entry of journal.entries) { + if (entry.idx > 1) break; // Only seed 0000 and 0001 unconditionally + + const sqlFile = path.join(migrationsDir, `${entry.tag}.sql`); + const content = fs.readFileSync(sqlFile, "utf-8"); + const hash = crypto.createHash("sha256").update(content).digest("hex"); + + await db.execute( + sql`INSERT INTO \`__drizzle_migrations\` (hash, created_at) VALUES (${hash}, ${entry.when})`, + ); + } + + console.log(" āœ“ Seeded journal with migrations 0000 and 0001"); + + // Check if 0002 changes are already present + const entry0002 = journal.entries.find( + (e: { idx: number }) => e.idx === 2, + ); + if (entry0002) { + const hasErrorDetails = await columnExists( + db, + "publishing_attempts", + "error_details", + ); + const hasPrivateKey = await columnExists(db, "wallets", "private_key"); + + if (hasErrorDetails && hasPrivateKey) { + const sqlFile = path.join(migrationsDir, `${entry0002.tag}.sql`); + const content = fs.readFileSync(sqlFile, "utf-8"); + const hash = crypto + .createHash("sha256") + .update(content) + .digest("hex"); + + await db.execute( + sql`INSERT INTO \`__drizzle_migrations\` (hash, created_at) VALUES (${hash}, ${entry0002.when})`, + ); + console.log(" āœ“ Seeded journal with migration 0002 (already applied)"); + } + } + + console.log("āœ… Migration journal bootstrapped successfully"); +} + +async function tableExists(db: Database, tableName: string): Promise { + const result = await db.execute( + sql`SELECT COUNT(*) as cnt FROM information_schema.tables WHERE table_schema = DATABASE() AND table_name = ${tableName}`, + ); + const rows = result[0] as Array<{ cnt: number | bigint }>; + return Number(rows[0]?.cnt) > 0; +} + +async function columnExists( + db: Database, + tableName: string, + columnName: string, +): Promise { + const result = await db.execute( + sql`SELECT COUNT(*) as cnt FROM information_schema.columns WHERE table_schema = DATABASE() AND table_name = ${tableName} AND column_name = ${columnName}`, + ); + const rows = result[0] as Array<{ cnt: number | bigint }>; + return Number(rows[0]?.cnt) > 0; +} diff --git a/packages/plugin-dkg-publisher/src/database/index.ts b/packages/plugin-dkg-publisher/src/database/index.ts index cb16f959..a8962988 100644 --- a/packages/plugin-dkg-publisher/src/database/index.ts +++ b/packages/plugin-dkg-publisher/src/database/index.ts @@ -11,10 +11,16 @@ export function createDatabase(connectionString: string) { return drizzle(pool, { schema, mode: "default" }); } -export async function runMigrations(db: Database) { - await migrate(db, { - migrationsFolder: path.join(__dirname, "./migrations"), - }); +export async function runMigrations(connectionString: string) { + // Use a dedicated single connection (not the pool) for migration isolation. + const connection = await mysql.createConnection(connectionString); + try { + await migrate(drizzle(connection), { + migrationsFolder: path.join(__dirname, "../src/database/migrations"), + }); + } finally { + await connection.end(); + } } export * from "./schema"; diff --git a/packages/plugin-dkg-publisher/src/database/migrations/0001_amused_dexter_bennett.sql b/packages/plugin-dkg-publisher/src/database/migrations/0001_amused_dexter_bennett.sql index 86dda8a8..dcd4c76e 100644 --- a/packages/plugin-dkg-publisher/src/database/migrations/0001_amused_dexter_bennett.sql +++ b/packages/plugin-dkg-publisher/src/database/migrations/0001_amused_dexter_bennett.sql @@ -1,14 +1,17 @@ +ALTER TABLE `publishing_attempts` DROP FOREIGN KEY `publishing_attempts_asset_id_assets_id_fk`;--> statement-breakpoint +ALTER TABLE `publishing_attempts` DROP FOREIGN KEY `publishing_attempts_wallet_id_wallets_id_fk`;--> statement-breakpoint +ALTER TABLE `wallet_metrics` DROP FOREIGN KEY `wallet_metrics_wallet_id_wallets_id_fk`;--> statement-breakpoint DROP INDEX `idx_content_hash` ON `assets`;--> statement-breakpoint DROP INDEX `idx_source` ON `assets`;--> statement-breakpoint -ALTER TABLE `assets` MODIFY COLUMN `id` serial AUTO_INCREMENT NOT NULL;--> statement-breakpoint +ALTER TABLE `assets` MODIFY COLUMN `id` int NOT NULL AUTO_INCREMENT;--> statement-breakpoint ALTER TABLE `assets` MODIFY COLUMN `batch_id` int;--> statement-breakpoint ALTER TABLE `assets` MODIFY COLUMN `status` enum('pending','queued','assigned','publishing','published','failed') NOT NULL DEFAULT 'pending';--> statement-breakpoint -ALTER TABLE `batches` MODIFY COLUMN `id` serial AUTO_INCREMENT NOT NULL;--> statement-breakpoint -ALTER TABLE `publishing_attempts` MODIFY COLUMN `id` serial AUTO_INCREMENT NOT NULL;--> statement-breakpoint +ALTER TABLE `batches` MODIFY COLUMN `id` int NOT NULL AUTO_INCREMENT;--> statement-breakpoint +ALTER TABLE `publishing_attempts` MODIFY COLUMN `id` int NOT NULL AUTO_INCREMENT;--> statement-breakpoint ALTER TABLE `publishing_attempts` MODIFY COLUMN `asset_id` int NOT NULL;--> statement-breakpoint ALTER TABLE `publishing_attempts` MODIFY COLUMN `wallet_id` int;--> statement-breakpoint ALTER TABLE `wallet_metrics` MODIFY COLUMN `wallet_id` int NOT NULL;--> statement-breakpoint -ALTER TABLE `wallets` MODIFY COLUMN `id` serial AUTO_INCREMENT NOT NULL;--> statement-breakpoint +ALTER TABLE `wallets` MODIFY COLUMN `id` int NOT NULL AUTO_INCREMENT;--> statement-breakpoint ALTER TABLE `assets` DROP INDEX `assets_content_hash_unique`;--> statement-breakpoint ALTER TABLE `assets` ADD `wallet_id` int;--> statement-breakpoint ALTER TABLE `assets` ADD `source` varchar(100);--> statement-breakpoint @@ -18,6 +21,9 @@ ALTER TABLE `assets` ADD `queued_at` timestamp;--> statement-breakpoint ALTER TABLE `assets` ADD `assigned_at` timestamp;--> statement-breakpoint ALTER TABLE `assets` ADD `publishing_started_at` timestamp;--> statement-breakpoint CREATE INDEX `idx_source` ON `assets` (`source`,`source_id`);--> statement-breakpoint +ALTER TABLE `publishing_attempts` ADD CONSTRAINT `publishing_attempts_asset_id_assets_id_fk` FOREIGN KEY (`asset_id`) REFERENCES `assets`(`id`) ON DELETE cascade ON UPDATE no action;--> statement-breakpoint +ALTER TABLE `publishing_attempts` ADD CONSTRAINT `publishing_attempts_wallet_id_wallets_id_fk` FOREIGN KEY (`wallet_id`) REFERENCES `wallets`(`id`) ON DELETE no action ON UPDATE no action;--> statement-breakpoint +ALTER TABLE `wallet_metrics` ADD CONSTRAINT `wallet_metrics_wallet_id_wallets_id_fk` FOREIGN KEY (`wallet_id`) REFERENCES `wallets`(`id`) ON DELETE cascade ON UPDATE no action;--> statement-breakpoint ALTER TABLE `assets` ADD CONSTRAINT `assets_wallet_id_wallets_id_fk` FOREIGN KEY (`wallet_id`) REFERENCES `wallets`(`id`) ON DELETE set null ON UPDATE no action;--> statement-breakpoint ALTER TABLE `assets` DROP COLUMN `content_hash`;--> statement-breakpoint ALTER TABLE `assets` DROP COLUMN `external_id`;--> statement-breakpoint diff --git a/packages/plugin-dkg-publisher/src/database/migrations/0002_add_error_details.sql b/packages/plugin-dkg-publisher/src/database/migrations/0002_add_error_details.sql new file mode 100644 index 00000000..d2bd8fea --- /dev/null +++ b/packages/plugin-dkg-publisher/src/database/migrations/0002_add_error_details.sql @@ -0,0 +1,2 @@ +ALTER TABLE `publishing_attempts` ADD COLUMN `error_details` json;--> statement-breakpoint +ALTER TABLE `wallets` CHANGE COLUMN `private_key_encrypted` `private_key` text NOT NULL; diff --git a/packages/plugin-dkg-publisher/src/database/migrations/20250905_rename_private_key_column.sql b/packages/plugin-dkg-publisher/src/database/migrations/20250905_rename_private_key_column.sql deleted file mode 100644 index bba25d67..00000000 --- a/packages/plugin-dkg-publisher/src/database/migrations/20250905_rename_private_key_column.sql +++ /dev/null @@ -1,5 +0,0 @@ --- Migration to rename private_key_encrypted column to private_key --- The column contains unencrypted private keys, so the name should reflect that - -ALTER TABLE wallets -CHANGE COLUMN private_key_encrypted private_key TEXT NOT NULL; \ No newline at end of file diff --git a/packages/plugin-dkg-publisher/src/database/migrations/meta/0002_snapshot.json b/packages/plugin-dkg-publisher/src/database/migrations/meta/0002_snapshot.json new file mode 100644 index 00000000..11d851d4 --- /dev/null +++ b/packages/plugin-dkg-publisher/src/database/migrations/meta/0002_snapshot.json @@ -0,0 +1,813 @@ +{ + "version": "5", + "dialect": "mysql", + "id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890", + "prevId": "f0a69756-52d0-4f78-bfe8-7c3cafc00cce", + "tables": { + "assets": { + "name": "assets", + "columns": { + "id": { + "name": "id", + "type": "int", + "primaryKey": false, + "notNull": true, + "autoincrement": true + }, + "wallet_id": { + "name": "wallet_id", + "type": "int", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "batch_id": { + "name": "batch_id", + "type": "int", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "content_url": { + "name": "content_url", + "type": "text", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "content_size": { + "name": "content_size", + "type": "bigint", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "source": { + "name": "source", + "type": "varchar(100)", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "source_id": { + "name": "source_id", + "type": "varchar(255)", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "priority": { + "name": "priority", + "type": "int", + "primaryKey": false, + "notNull": false, + "autoincrement": false, + "default": 50 + }, + "privacy": { + "name": "privacy", + "type": "enum('private','public')", + "primaryKey": false, + "notNull": false, + "autoincrement": false, + "default": "'private'" + }, + "epochs": { + "name": "epochs", + "type": "int", + "primaryKey": false, + "notNull": false, + "autoincrement": false, + "default": 2 + }, + "replications": { + "name": "replications", + "type": "int", + "primaryKey": false, + "notNull": false, + "autoincrement": false, + "default": 1 + }, + "max_attempts": { + "name": "max_attempts", + "type": "int", + "primaryKey": false, + "notNull": false, + "autoincrement": false, + "default": 3 + }, + "status": { + "name": "status", + "type": "enum('pending','queued','assigned','publishing','published','failed')", + "primaryKey": false, + "notNull": true, + "autoincrement": false, + "default": "'pending'" + }, + "status_message": { + "name": "status_message", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "attempt_count": { + "name": "attempt_count", + "type": "int", + "primaryKey": false, + "notNull": false, + "autoincrement": false, + "default": 0 + }, + "retry_count": { + "name": "retry_count", + "type": "int", + "primaryKey": false, + "notNull": false, + "autoincrement": false, + "default": 0 + }, + "next_retry_at": { + "name": "next_retry_at", + "type": "timestamp", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "last_error": { + "name": "last_error", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "ual": { + "name": "ual", + "type": "varchar(255)", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "transaction_hash": { + "name": "transaction_hash", + "type": "varchar(66)", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "blockchain": { + "name": "blockchain", + "type": "varchar(50)", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "created_at": { + "name": "created_at", + "type": "timestamp", + "primaryKey": false, + "notNull": false, + "autoincrement": false, + "default": "(now())" + }, + "queued_at": { + "name": "queued_at", + "type": "timestamp", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "assigned_at": { + "name": "assigned_at", + "type": "timestamp", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "publishing_started_at": { + "name": "publishing_started_at", + "type": "timestamp", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "published_at": { + "name": "published_at", + "type": "timestamp", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "updated_at": { + "name": "updated_at", + "type": "timestamp", + "primaryKey": false, + "notNull": false, + "autoincrement": false, + "onUpdate": true, + "default": "(now())" + } + }, + "indexes": { + "idx_status": { + "name": "idx_status", + "columns": ["status"], + "isUnique": false + }, + "idx_retry": { + "name": "idx_retry", + "columns": ["status", "next_retry_at"], + "isUnique": false + }, + "idx_source": { + "name": "idx_source", + "columns": ["source", "source_id"], + "isUnique": false + }, + "idx_pending": { + "name": "idx_pending", + "columns": ["status", "created_at"], + "isUnique": false + }, + "idx_batch": { + "name": "idx_batch", + "columns": ["batch_id"], + "isUnique": false + } + }, + "foreignKeys": { + "assets_wallet_id_wallets_id_fk": { + "name": "assets_wallet_id_wallets_id_fk", + "tableFrom": "assets", + "tableTo": "wallets", + "columnsFrom": ["wallet_id"], + "columnsTo": ["id"], + "onDelete": "set null", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": { + "assets_id": { + "name": "assets_id", + "columns": ["id"] + } + }, + "uniqueConstraints": { + "assets_ual_unique": { + "name": "assets_ual_unique", + "columns": ["ual"] + } + } + }, + "batches": { + "name": "batches", + "columns": { + "id": { + "name": "id", + "type": "int", + "primaryKey": false, + "notNull": true, + "autoincrement": true + }, + "batch_name": { + "name": "batch_name", + "type": "varchar(255)", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "source": { + "name": "source", + "type": "varchar(100)", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "total_assets": { + "name": "total_assets", + "type": "int", + "primaryKey": false, + "notNull": true, + "autoincrement": false, + "default": 0 + }, + "pending_count": { + "name": "pending_count", + "type": "int", + "primaryKey": false, + "notNull": true, + "autoincrement": false, + "default": 0 + }, + "processing_count": { + "name": "processing_count", + "type": "int", + "primaryKey": false, + "notNull": true, + "autoincrement": false, + "default": 0 + }, + "published_count": { + "name": "published_count", + "type": "int", + "primaryKey": false, + "notNull": true, + "autoincrement": false, + "default": 0 + }, + "failed_count": { + "name": "failed_count", + "type": "int", + "primaryKey": false, + "notNull": true, + "autoincrement": false, + "default": 0 + }, + "created_at": { + "name": "created_at", + "type": "timestamp", + "primaryKey": false, + "notNull": false, + "autoincrement": false, + "default": "(now())" + }, + "completed_at": { + "name": "completed_at", + "type": "timestamp", + "primaryKey": false, + "notNull": false, + "autoincrement": false + } + }, + "indexes": { + "idx_batch_status": { + "name": "idx_batch_status", + "columns": ["created_at", "completed_at"], + "isUnique": false + } + }, + "foreignKeys": {}, + "compositePrimaryKeys": { + "batches_id": { + "name": "batches_id", + "columns": ["id"] + } + }, + "uniqueConstraints": {} + }, + "metrics_hourly": { + "name": "metrics_hourly", + "columns": { + "hour_timestamp": { + "name": "hour_timestamp", + "type": "timestamp", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "assets_registered": { + "name": "assets_registered", + "type": "int", + "primaryKey": false, + "notNull": false, + "autoincrement": false, + "default": 0 + }, + "assets_published": { + "name": "assets_published", + "type": "int", + "primaryKey": false, + "notNull": false, + "autoincrement": false, + "default": 0 + }, + "assets_failed": { + "name": "assets_failed", + "type": "int", + "primaryKey": false, + "notNull": false, + "autoincrement": false, + "default": 0 + }, + "avg_publish_duration_seconds": { + "name": "avg_publish_duration_seconds", + "type": "int", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "total_gas_used": { + "name": "total_gas_used", + "type": "bigint", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "unique_wallets_used": { + "name": "unique_wallets_used", + "type": "int", + "primaryKey": false, + "notNull": false, + "autoincrement": false + } + }, + "indexes": { + "idx_metrics_hour": { + "name": "idx_metrics_hour", + "columns": ["hour_timestamp"], + "isUnique": false + } + }, + "foreignKeys": {}, + "compositePrimaryKeys": { + "metrics_hourly_hour_timestamp": { + "name": "metrics_hourly_hour_timestamp", + "columns": ["hour_timestamp"] + } + }, + "uniqueConstraints": {} + }, + "publishing_attempts": { + "name": "publishing_attempts", + "columns": { + "id": { + "name": "id", + "type": "int", + "primaryKey": false, + "notNull": true, + "autoincrement": true + }, + "asset_id": { + "name": "asset_id", + "type": "int", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "attempt_number": { + "name": "attempt_number", + "type": "int", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "worker_id": { + "name": "worker_id", + "type": "varchar(100)", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "wallet_address": { + "name": "wallet_address", + "type": "varchar(42)", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "wallet_id": { + "name": "wallet_id", + "type": "int", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "otnode_url": { + "name": "otnode_url", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "blockchain": { + "name": "blockchain", + "type": "varchar(50)", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "transaction_hash": { + "name": "transaction_hash", + "type": "varchar(66)", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "gas_used": { + "name": "gas_used", + "type": "bigint", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "status": { + "name": "status", + "type": "enum('started','success','failed','timeout')", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "ual": { + "name": "ual", + "type": "varchar(255)", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "error_type": { + "name": "error_type", + "type": "varchar(50)", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "error_message": { + "name": "error_message", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "error_details": { + "name": "error_details", + "type": "json", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "started_at": { + "name": "started_at", + "type": "timestamp", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "completed_at": { + "name": "completed_at", + "type": "timestamp", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "duration_seconds": { + "name": "duration_seconds", + "type": "int", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "created_at": { + "name": "created_at", + "type": "timestamp", + "primaryKey": false, + "notNull": false, + "autoincrement": false, + "default": "(now())" + } + }, + "indexes": { + "idx_asset_attempts": { + "name": "idx_asset_attempts", + "columns": ["asset_id", "attempt_number"], + "isUnique": false + }, + "idx_wallet_usage": { + "name": "idx_wallet_usage", + "columns": ["wallet_address", "started_at"], + "isUnique": false + } + }, + "foreignKeys": { + "publishing_attempts_asset_id_assets_id_fk": { + "name": "publishing_attempts_asset_id_assets_id_fk", + "tableFrom": "publishing_attempts", + "tableTo": "assets", + "columnsFrom": ["asset_id"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "publishing_attempts_wallet_id_wallets_id_fk": { + "name": "publishing_attempts_wallet_id_wallets_id_fk", + "tableFrom": "publishing_attempts", + "tableTo": "wallets", + "columnsFrom": ["wallet_id"], + "columnsTo": ["id"], + "onDelete": "no action", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": { + "publishing_attempts_id": { + "name": "publishing_attempts_id", + "columns": ["id"] + } + }, + "uniqueConstraints": {} + }, + "wallet_metrics": { + "name": "wallet_metrics", + "columns": { + "wallet_id": { + "name": "wallet_id", + "type": "int", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "date": { + "name": "date", + "type": "timestamp", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "total_publishes": { + "name": "total_publishes", + "type": "int", + "primaryKey": false, + "notNull": false, + "autoincrement": false, + "default": 0 + }, + "successful_publishes": { + "name": "successful_publishes", + "type": "int", + "primaryKey": false, + "notNull": false, + "autoincrement": false, + "default": 0 + }, + "failed_publishes": { + "name": "failed_publishes", + "type": "int", + "primaryKey": false, + "notNull": false, + "autoincrement": false, + "default": 0 + }, + "avg_duration_seconds": { + "name": "avg_duration_seconds", + "type": "int", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "total_gas_used": { + "name": "total_gas_used", + "type": "bigint", + "primaryKey": false, + "notNull": false, + "autoincrement": false + } + }, + "indexes": {}, + "foreignKeys": { + "wallet_metrics_wallet_id_wallets_id_fk": { + "name": "wallet_metrics_wallet_id_wallets_id_fk", + "tableFrom": "wallet_metrics", + "tableTo": "wallets", + "columnsFrom": ["wallet_id"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": { + "wallet_metrics_wallet_id_date_pk": { + "name": "wallet_metrics_wallet_id_date_pk", + "columns": ["wallet_id", "date"] + } + }, + "uniqueConstraints": {} + }, + "wallets": { + "name": "wallets", + "columns": { + "id": { + "name": "id", + "type": "int", + "primaryKey": false, + "notNull": true, + "autoincrement": true + }, + "address": { + "name": "address", + "type": "varchar(42)", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "private_key": { + "name": "private_key", + "type": "text", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "blockchain": { + "name": "blockchain", + "type": "varchar(50)", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "is_active": { + "name": "is_active", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "autoincrement": false, + "default": true + }, + "is_locked": { + "name": "is_locked", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "autoincrement": false, + "default": false + }, + "locked_by": { + "name": "locked_by", + "type": "varchar(100)", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "locked_at": { + "name": "locked_at", + "type": "timestamp", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "last_used_at": { + "name": "last_used_at", + "type": "timestamp", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "total_uses": { + "name": "total_uses", + "type": "int", + "primaryKey": false, + "notNull": false, + "autoincrement": false, + "default": 0 + }, + "successful_uses": { + "name": "successful_uses", + "type": "int", + "primaryKey": false, + "notNull": false, + "autoincrement": false, + "default": 0 + }, + "failed_uses": { + "name": "failed_uses", + "type": "int", + "primaryKey": false, + "notNull": false, + "autoincrement": false, + "default": 0 + }, + "created_at": { + "name": "created_at", + "type": "timestamp", + "primaryKey": false, + "notNull": false, + "autoincrement": false, + "default": "(now())" + } + }, + "indexes": { + "idx_available": { + "name": "idx_available", + "columns": ["is_active", "is_locked", "last_used_at"], + "isUnique": false + } + }, + "foreignKeys": {}, + "compositePrimaryKeys": { + "wallets_id": { + "name": "wallets_id", + "columns": ["id"] + } + }, + "uniqueConstraints": { + "wallets_address_unique": { + "name": "wallets_address_unique", + "columns": ["address"] + } + } + } + }, + "schemas": {}, + "_meta": { + "schemas": {}, + "tables": {}, + "columns": {} + } +} diff --git a/packages/plugin-dkg-publisher/src/database/migrations/meta/_journal.json b/packages/plugin-dkg-publisher/src/database/migrations/meta/_journal.json index 1bc3a605..b229091a 100644 --- a/packages/plugin-dkg-publisher/src/database/migrations/meta/_journal.json +++ b/packages/plugin-dkg-publisher/src/database/migrations/meta/_journal.json @@ -15,6 +15,13 @@ "when": 1756889502071, "tag": "0001_amused_dexter_bennett", "breakpoints": true + }, + { + "idx": 2, + "version": "5", + "when": 1756900000000, + "tag": "0002_add_error_details", + "breakpoints": true } ] } diff --git a/packages/plugin-dkg-publisher/src/database/schema.ts b/packages/plugin-dkg-publisher/src/database/schema.ts index 9b523c3b..c04009ca 100644 --- a/packages/plugin-dkg-publisher/src/database/schema.ts +++ b/packages/plugin-dkg-publisher/src/database/schema.ts @@ -11,7 +11,7 @@ import { index, primaryKey, char, - serial, + json, } from "drizzle-orm/mysql-core"; import { relations } from "drizzle-orm"; @@ -19,7 +19,7 @@ import { relations } from "drizzle-orm"; export const assets = mysqlTable( "assets", { - id: serial("id").primaryKey(), + id: int("id").autoincrement().primaryKey(), walletId: int("wallet_id").references(() => wallets.id, { onDelete: "set null", }), @@ -81,9 +81,9 @@ export const assets = mysqlTable( export const wallets = mysqlTable( "wallets", { - id: serial("id").primaryKey(), + id: int("id").autoincrement().primaryKey(), address: varchar("address", { length: 42 }).notNull().unique(), - privateKey: text("private_key_encrypted").notNull(), + privateKey: text("private_key").notNull(), blockchain: varchar("blockchain", { length: 50 }).notNull(), isActive: boolean("is_active").default(true), isLocked: boolean("is_locked").default(false), @@ -108,7 +108,7 @@ export const wallets = mysqlTable( export const publishingAttempts = mysqlTable( "publishing_attempts", { - id: serial("id").primaryKey(), + id: int("id").autoincrement().primaryKey(), assetId: int("asset_id") .notNull() .references(() => assets.id, { onDelete: "cascade" }), @@ -129,6 +129,7 @@ export const publishingAttempts = mysqlTable( ual: varchar("ual", { length: 255 }), errorType: varchar("error_type", { length: 50 }), errorMessage: text("error_message"), + errorDetails: json("error_details"), startedAt: timestamp("started_at").notNull(), completedAt: timestamp("completed_at"), durationSeconds: int("duration_seconds"), @@ -150,7 +151,7 @@ export const publishingAttempts = mysqlTable( export const batches = mysqlTable( "batches", { - id: serial("id").primaryKey(), + id: int("id").autoincrement().primaryKey(), batchName: varchar("batch_name", { length: 255 }), source: varchar("source", { length: 100 }), totalAssets: int("total_assets").notNull().default(0), diff --git a/packages/plugin-dkg-publisher/src/services/AssetService.ts b/packages/plugin-dkg-publisher/src/services/AssetService.ts index 6c955c9a..acf0c2c3 100644 --- a/packages/plugin-dkg-publisher/src/services/AssetService.ts +++ b/packages/plugin-dkg-publisher/src/services/AssetService.ts @@ -395,6 +395,7 @@ export class AssetService extends EventEmitter { transactionHash?: string; errorType?: string; errorMessage?: string; + errorDetails?: Record; gasUsed?: number; durationSeconds?: number; }, diff --git a/packages/plugin-dkg-publisher/src/services/PublishingService.ts b/packages/plugin-dkg-publisher/src/services/PublishingService.ts index 1774c2aa..797c9178 100644 --- a/packages/plugin-dkg-publisher/src/services/PublishingService.ts +++ b/packages/plugin-dkg-publisher/src/services/PublishingService.ts @@ -4,12 +4,14 @@ import { assets } from "../database/schema"; import { eq, and, sql } from "drizzle-orm"; import { publishingLogger as logger } from "./Logger"; import { DkgService } from "./DkgService"; +import { serializeErrorDetails } from "./errorUtils"; export interface PublishResult { success: boolean; ual?: string; transactionHash?: string; error?: string; + errorDetails?: Record; } export class PublishingService { @@ -163,7 +165,11 @@ export class PublishingService { status: result.operation.publish.status, }); - throw new Error(`DKG API Error: ${errorType} - ${errorMessage}`); + const err = new Error(`DKG API Error: ${errorType} - ${errorMessage}`); + (err as any).operationId = result.operation.publish.operationId; + (err as any).operationStatus = result.operation.publish.status; + (err as any).dkgOperation = result.operation.publish; + throw err; } // ONLY update as published if we actually have a UAL @@ -223,6 +229,7 @@ export class PublishingService { return { success: false, error: error.message, + errorDetails: serializeErrorDetails(error), }; } } diff --git a/packages/plugin-dkg-publisher/src/services/QueueService.ts b/packages/plugin-dkg-publisher/src/services/QueueService.ts index 1e391beb..0f366967 100644 --- a/packages/plugin-dkg-publisher/src/services/QueueService.ts +++ b/packages/plugin-dkg-publisher/src/services/QueueService.ts @@ -8,6 +8,7 @@ import { PublishingService } from "./PublishingService"; import { WalletService } from "./WalletService"; import { AssetService } from "./AssetService"; import { queueLogger as logger } from "./Logger"; +import { serializeErrorDetails } from "./errorUtils"; export interface QueueStats { waiting: number; @@ -275,7 +276,11 @@ export class QueueService { `āŒ PUBLISHING FAILED for asset ${assetId}: ${result.error}`, { workerId: i, assetId, error: result.error }, ); - throw new Error(result.error || "Publishing failed"); + const publishError = new Error(result.error || "Publishing failed"); + if (result.errorDetails) { + (publishError as any).errorDetails = result.errorDetails; + } + throw publishError; } logger.info(`šŸŽ‰ PUBLISHING SUCCESSFUL for asset ${assetId}`, { @@ -320,11 +325,14 @@ export class QueueService { } // Update publishing attempt record as failed + // Use pre-serialized errorDetails from PublishingService if available, + // otherwise serialize the raw error (e.g. "No available wallets") if (attemptId) { await this.assetService.updatePublishingAttempt(attemptId, { status: "failed", errorType: error.name || "Error", errorMessage: error.message, + errorDetails: error.errorDetails ?? serializeErrorDetails(error), durationSeconds: Math.floor( (Date.now() - job.timestamp) / 1000, ), diff --git a/packages/plugin-dkg-publisher/src/services/WalletService.ts b/packages/plugin-dkg-publisher/src/services/WalletService.ts index 3e95f6d0..45923127 100644 --- a/packages/plugin-dkg-publisher/src/services/WalletService.ts +++ b/packages/plugin-dkg-publisher/src/services/WalletService.ts @@ -134,10 +134,7 @@ export class WalletService { return null; } - // Add private key (stored as plaintext for now) - const walletWithKey = wallet[0] as any; - walletWithKey.privateKey = walletWithKey.privateKeyEncrypted; - return walletWithKey; + return wallet[0]; } /** diff --git a/packages/plugin-dkg-publisher/src/services/errorUtils.ts b/packages/plugin-dkg-publisher/src/services/errorUtils.ts new file mode 100644 index 00000000..073320d7 --- /dev/null +++ b/packages/plugin-dkg-publisher/src/services/errorUtils.ts @@ -0,0 +1,63 @@ +/** + * Serializes an error object into a plain object capturing all useful properties. + * Handles circular references, BigInt values, and non-enumerable Error properties. + */ +export function serializeErrorDetails(error: unknown): Record { + if (error === null || error === undefined) { + return { message: String(error) }; + } + + if (typeof error === "string") { + return { message: error }; + } + + if (typeof error !== "object") { + return { message: String(error) }; + } + + const seen = new WeakSet(); + + function sanitize(value: unknown): unknown { + if (value === null || value === undefined) return value; + if (typeof value === "bigint") return value.toString(); + if (typeof value === "function") return undefined; + if (typeof value !== "object") return value; + + if (seen.has(value as object)) return "[Circular]"; + seen.add(value as object); + + if (Array.isArray(value)) { + return value.map(sanitize); + } + + const result: Record = {}; + for (const key of Object.keys(value as Record)) { + if (key === "stack") continue; + result[key] = sanitize((value as Record)[key]); + } + return result; + } + + // Add root error to seen set to prevent circular references back to it + seen.add(error as object); + + const err = error as Record; + const result: Record = {}; + + // Extract standard Error properties (non-enumerable on some engines) + if (error instanceof Error) { + result.message = err.message; + result.name = err.name; + if ((error as any).code !== undefined) result.code = (error as any).code; + if ((error as any).reason !== undefined) + result.reason = (error as any).reason; + } + + // Merge all enumerable properties + for (const key of Object.keys(err)) { + if (key === "stack") continue; + result[key] = sanitize(err[key]); + } + + return result; +} diff --git a/packages/plugin-dkg-publisher/src/services/index.ts b/packages/plugin-dkg-publisher/src/services/index.ts index e74df5b2..12112f54 100644 --- a/packages/plugin-dkg-publisher/src/services/index.ts +++ b/packages/plugin-dkg-publisher/src/services/index.ts @@ -1,5 +1,6 @@ import IORedis from "ioredis"; -import { Database, createDatabase } from "../database"; +import { Database, createDatabase, runMigrations } from "../database"; +import { bootstrapMigrationJournal } from "../database/bootstrap"; import { ServiceContainer } from "./ServiceContainer"; import { WalletService } from "./WalletService"; import { AssetService } from "./AssetService"; @@ -23,10 +24,13 @@ export async function initializeServices( console.log(`šŸ”§ initializeServices called at ${Date.now()}`); const container = new ServiceContainer(); - // Initialize database + // Initialize database and run migrations const db = createDatabase(config.database.connectionString); container.register("db", db); + await bootstrapMigrationJournal(db); + await runMigrations(config.database.connectionString); + // Initialize Redis const redis = new IORedis({ host: config.redis.host, From 4fb2665d27c83a34f30c90b0b7237681c03efa77 Mon Sep 17 00:00:00 2001 From: Jurij Skornik Date: Mon, 23 Feb 2026 21:57:21 +0100 Subject: [PATCH 2/3] Reorder setup modes: fresh setup first, update second - Mode 1 is now "Start fresh" with a warning about table deletion - Mode 2 is now "Update existing configuration" - Mode 3 remains "Add wallets only" --- packages/plugin-dkg-publisher/setup.js | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/packages/plugin-dkg-publisher/setup.js b/packages/plugin-dkg-publisher/setup.js index de1e8558..f7847fad 100644 --- a/packages/plugin-dkg-publisher/setup.js +++ b/packages/plugin-dkg-publisher/setup.js @@ -165,7 +165,7 @@ async function bootstrapJournalForSetup(pool) { if (tableCount < 4) { throw new Error( - "Database is in a partial state (some tables missing). Please choose 'Start fresh' (option 2).", + "Database is in a partial state (some tables missing). Please choose 'Start fresh' (option 1).", ); } @@ -458,14 +458,14 @@ async function setup() { log(" • docker-compose.knowledge-manager.yml found", "cyan"); setupMode = await ask( - "\nChoose setup mode:\n1. Update existing configuration\n2. Start fresh (will backup existing files)\n3. Add wallets only\nChoice (1-3):", + "\nChoose setup mode:\n1. Start fresh (āš ļø will delete existing tables and backup config files)\n2. Update existing configuration\n3. Add wallets only\nChoice (1-3):", { validate: (input) => ["1", "2", "3"].includes(input), error: "Please enter 1, 2, or 3", }, ); - if (setupMode === "2") { + if (setupMode === "1") { // Backup existing files const timestamp = new Date().toISOString().replace(/[:.]/g, "-"); try { @@ -756,7 +756,7 @@ JWT_SECRET=${jwtSecret} # DATADOG_API_KEY= `; - const overwriteConfig = setupMode === "1" || setupMode === "2"; + const overwriteConfig = setupMode === "1" || setupMode === "2"; // Fresh or Update await createFile(".env.publisher", envContent, overwriteConfig); // Skip wallet configuration file - wallets will be inserted directly into database @@ -881,8 +881,8 @@ volumes: // Run Drizzle migrations to create/update tables log("Running database migrations...", "cyan"); - // Check if this is a fresh start (Mode 2) — drop all tables first - if (setupMode === "2" || !hasConfig) { + // Check if this is a fresh start (Mode 1) — drop all tables first + if (setupMode === "1" || !hasConfig) { log(" Dropping existing tables for fresh setup...", "white"); await connection.execute("SET FOREIGN_KEY_CHECKS = 0"); await connection.execute("DROP TABLE IF EXISTS __drizzle_migrations"); From 86b0605ec8218b8ba4b57587a1938cb43e8a8a55 Mon Sep 17 00:00:00 2001 From: Jurij Skornik Date: Mon, 23 Feb 2026 22:04:47 +0100 Subject: [PATCH 3/3] =?UTF-8?q?Remove=20migrate.js=20=E2=80=94=20migration?= =?UTF-8?q?s=20now=20auto-run=20on=20plugin=20startup?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- packages/plugin-dkg-publisher/migrate.js | 68 ------------------------ 1 file changed, 68 deletions(-) delete mode 100644 packages/plugin-dkg-publisher/migrate.js diff --git a/packages/plugin-dkg-publisher/migrate.js b/packages/plugin-dkg-publisher/migrate.js deleted file mode 100644 index 1f9b870b..00000000 --- a/packages/plugin-dkg-publisher/migrate.js +++ /dev/null @@ -1,68 +0,0 @@ -#!/usr/bin/env node - -/** - * Database migration script for DKG Publisher Plugin - * - * NOTE: Migrations now run automatically on plugin startup (see services/index.ts). - * This script is provided for manual/debug use only. - */ - -const { drizzle } = require("drizzle-orm/mysql2"); -const { migrate } = require("drizzle-orm/mysql2/migrator"); -const mysql = require("mysql2/promise"); -const dotenv = require("dotenv"); -const path = require("path"); - -// Load environment variables -dotenv.config({ path: ".env.publisher" }); -dotenv.config(); // Also load from .env if present - -async function runMigrations() { - console.log("šŸš€ Starting database migrations..."); - - // Get database URL from environment - const databaseUrl = process.env.DKGP_DATABASE_URL; - - if (!databaseUrl) { - console.error("āŒ DKGP_DATABASE_URL not found in environment variables"); - console.log("Make sure you have run the setup script: npm run setup"); - process.exit(1); - } - - console.log("šŸ“Š Connecting to database..."); - - let connection; - try { - // Create connection - connection = mysql.createPool(databaseUrl); - - // Create Drizzle instance - const db = drizzle(connection); - - // Run migrations - console.log("šŸ”§ Running migrations..."); - await migrate(db, { - migrationsFolder: path.join(__dirname, "src/database/migrations"), - }); - - console.log("āœ… Migrations completed successfully!"); - - // Verify tables were created - const [tables] = await connection.execute("SHOW TABLES"); - console.log( - `šŸ“‹ Created ${tables.length} tables:`, - tables.map((t) => Object.values(t)[0]).join(", "), - ); - } catch (error) { - console.error("āŒ Migration failed:", error.message); - process.exit(1); - } finally { - if (connection) { - await connection.end(); - console.log("šŸ”Œ Database connection closed"); - } - } -} - -// Run migrations -runMigrations();