gnoman 0.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.eslintrc.cjs +24 -0
- package/.gnoman/contracts.json +4094 -0
- package/.gnoman/exec_package/runtime-debug.jsonl +45 -0
- package/.gnoman/holds.sqlite +0 -0
- package/.gnoman/license.json +7 -0
- package/.gnoman/safes.json +37 -0
- package/.gnoman/vanity-jobs.json +67 -0
- package/.gnoman/wallets.db +0 -0
- package/.prettierrc.json +6 -0
- package/CODex_TASKS.md +124 -0
- package/LICENSE.md +164 -0
- package/README.md +95 -0
- package/assets/GnoLogo.jpg +0 -0
- package/assets/self.png +0 -0
- package/backend/controllers/contractController.ts +49 -0
- package/backend/controllers/devToolsController.ts +76 -0
- package/backend/controllers/etherscanController.ts +59 -0
- package/backend/controllers/historyController.ts +7 -0
- package/backend/controllers/keyringController.ts +134 -0
- package/backend/controllers/robinhoodController.ts +80 -0
- package/backend/controllers/safeController.ts +167 -0
- package/backend/controllers/sandboxController.ts +63 -0
- package/backend/controllers/settingsController.ts +38 -0
- package/backend/controllers/walletController.ts +151 -0
- package/backend/index.ts +133 -0
- package/backend/licenses/license_public.pem +3 -0
- package/backend/licenses/verify_license.py +43 -0
- package/backend/routes/contractRoutes.ts +11 -0
- package/backend/routes/devToolsRoutes.ts +11 -0
- package/backend/routes/etherscanRoutes.ts +11 -0
- package/backend/routes/historyRoutes.ts +8 -0
- package/backend/routes/keyringRoutes.ts +25 -0
- package/backend/routes/licenseRoutes.ts +35 -0
- package/backend/routes/robinhoodRoutes.ts +22 -0
- package/backend/routes/runtimeRoutes.ts +29 -0
- package/backend/routes/safeRoutes.ts +28 -0
- package/backend/routes/sandboxRoutes.ts +17 -0
- package/backend/routes/settingsRoutes.ts +14 -0
- package/backend/routes/walletRoutes.ts +21 -0
- package/backend/services/chainlinkService.ts +65 -0
- package/backend/services/contractRegistryService.ts +205 -0
- package/backend/services/devToolsService.ts +251 -0
- package/backend/services/diagnosticsService.ts +350 -0
- package/backend/services/etherscanService.ts +152 -0
- package/backend/services/historyService.ts +89 -0
- package/backend/services/keyringAccessor.ts +4 -0
- package/backend/services/licenseService.ts +163 -0
- package/backend/services/onchain/abiRegistry.ts +57 -0
- package/backend/services/onchain/chainlinkClient.ts +56 -0
- package/backend/services/onchain/errors.ts +16 -0
- package/backend/services/onchain/etherscanClient.ts +94 -0
- package/backend/services/onchain/index.ts +76 -0
- package/backend/services/onchain/tenderlyRpcClient.ts +74 -0
- package/backend/services/onchain/types.ts +33 -0
- package/backend/services/onchainAutomationService.ts +424 -0
- package/backend/services/robinhood/auth.ts +42 -0
- package/backend/services/robinhood/client.ts +123 -0
- package/backend/services/robinhood/integrationService.ts +140 -0
- package/backend/services/robinhood/provider.ts +22 -0
- package/backend/services/robinhood/unofficialClient.ts +66 -0
- package/backend/services/rpcService.ts +44 -0
- package/backend/services/runtimeTelemetryService.ts +158 -0
- package/backend/services/safeConfigRepository.ts +205 -0
- package/backend/services/safeService.ts +588 -0
- package/backend/services/sandboxService.ts +157 -0
- package/backend/services/secureSettingsService.ts +45 -0
- package/backend/services/transactionHoldService.ts +223 -0
- package/backend/services/vanityService.ts +293 -0
- package/backend/services/walletService.ts +290 -0
- package/backend/services/walletStore.ts +179 -0
- package/backend/types/express-async-handler.d.ts +13 -0
- package/backend/types/keyring.d.ts +19 -0
- package/backend/utils/abiResolver.ts +208 -0
- package/backend/utils/http.ts +6 -0
- package/backend/utils/secretsResolver.ts +150 -0
- package/backend/utils/signer.ts +11 -0
- package/backend/workers/vanityWorker.ts +76 -0
- package/capacitor.config.ts +13 -0
- package/cli/gnoman.ts +424 -0
- package/contracts/OracleConsumer.sol +20 -0
- package/contracts/PriceFeedConsumer.sol +22 -0
- package/dist/backend/backend/controllers/contractController.js +41 -0
- package/dist/backend/backend/controllers/contractController.js.map +1 -0
- package/dist/backend/backend/controllers/devToolsController.js +63 -0
- package/dist/backend/backend/controllers/devToolsController.js.map +1 -0
- package/dist/backend/backend/controllers/etherscanController.js +53 -0
- package/dist/backend/backend/controllers/etherscanController.js.map +1 -0
- package/dist/backend/backend/controllers/historyController.js +12 -0
- package/dist/backend/backend/controllers/historyController.js.map +1 -0
- package/dist/backend/backend/controllers/keyringController.js +126 -0
- package/dist/backend/backend/controllers/keyringController.js.map +1 -0
- package/dist/backend/backend/controllers/robinhoodController.js +69 -0
- package/dist/backend/backend/controllers/robinhoodController.js.map +1 -0
- package/dist/backend/backend/controllers/safeController.js +137 -0
- package/dist/backend/backend/controllers/safeController.js.map +1 -0
- package/dist/backend/backend/controllers/sandboxController.js +48 -0
- package/dist/backend/backend/controllers/sandboxController.js.map +1 -0
- package/dist/backend/backend/controllers/settingsController.js +34 -0
- package/dist/backend/backend/controllers/settingsController.js.map +1 -0
- package/dist/backend/backend/controllers/walletController.js +140 -0
- package/dist/backend/backend/controllers/walletController.js.map +1 -0
- package/dist/backend/backend/index.js +119 -0
- package/dist/backend/backend/index.js.map +1 -0
- package/dist/backend/backend/routes/contractRoutes.js +44 -0
- package/dist/backend/backend/routes/contractRoutes.js.map +1 -0
- package/dist/backend/backend/routes/devToolsRoutes.js +44 -0
- package/dist/backend/backend/routes/devToolsRoutes.js.map +1 -0
- package/dist/backend/backend/routes/etherscanRoutes.js +44 -0
- package/dist/backend/backend/routes/etherscanRoutes.js.map +1 -0
- package/dist/backend/backend/routes/historyRoutes.js +41 -0
- package/dist/backend/backend/routes/historyRoutes.js.map +1 -0
- package/dist/backend/backend/routes/keyringRoutes.js +18 -0
- package/dist/backend/backend/routes/keyringRoutes.js.map +1 -0
- package/dist/backend/backend/routes/licenseRoutes.js +30 -0
- package/dist/backend/backend/routes/licenseRoutes.js.map +1 -0
- package/dist/backend/backend/routes/robinhoodRoutes.js +14 -0
- package/dist/backend/backend/routes/robinhoodRoutes.js.map +1 -0
- package/dist/backend/backend/routes/runtimeRoutes.js +26 -0
- package/dist/backend/backend/routes/runtimeRoutes.js.map +1 -0
- package/dist/backend/backend/routes/safeRoutes.js +61 -0
- package/dist/backend/backend/routes/safeRoutes.js.map +1 -0
- package/dist/backend/backend/routes/sandboxRoutes.js +50 -0
- package/dist/backend/backend/routes/sandboxRoutes.js.map +1 -0
- package/dist/backend/backend/routes/settingsRoutes.js +10 -0
- package/dist/backend/backend/routes/settingsRoutes.js.map +1 -0
- package/dist/backend/backend/routes/walletRoutes.js +54 -0
- package/dist/backend/backend/routes/walletRoutes.js.map +1 -0
- package/dist/backend/backend/services/chainlinkService.js +48 -0
- package/dist/backend/backend/services/chainlinkService.js.map +1 -0
- package/dist/backend/backend/services/contractRegistryService.js +138 -0
- package/dist/backend/backend/services/contractRegistryService.js.map +1 -0
- package/dist/backend/backend/services/devToolsService.js +213 -0
- package/dist/backend/backend/services/devToolsService.js.map +1 -0
- package/dist/backend/backend/services/diagnosticsService.js +286 -0
- package/dist/backend/backend/services/diagnosticsService.js.map +1 -0
- package/dist/backend/backend/services/etherscanService.js +125 -0
- package/dist/backend/backend/services/etherscanService.js.map +1 -0
- package/dist/backend/backend/services/historyService.js +75 -0
- package/dist/backend/backend/services/historyService.js.map +1 -0
- package/dist/backend/backend/services/keyringAccessor.js +40 -0
- package/dist/backend/backend/services/keyringAccessor.js.map +1 -0
- package/dist/backend/backend/services/licenseService.js +130 -0
- package/dist/backend/backend/services/licenseService.js.map +1 -0
- package/dist/backend/backend/services/onchain/abiRegistry.js +47 -0
- package/dist/backend/backend/services/onchain/abiRegistry.js.map +1 -0
- package/dist/backend/backend/services/onchain/chainlinkClient.js +43 -0
- package/dist/backend/backend/services/onchain/chainlinkClient.js.map +1 -0
- package/dist/backend/backend/services/onchain/errors.js +13 -0
- package/dist/backend/backend/services/onchain/errors.js.map +1 -0
- package/dist/backend/backend/services/onchain/etherscanClient.js +82 -0
- package/dist/backend/backend/services/onchain/etherscanClient.js.map +1 -0
- package/dist/backend/backend/services/onchain/index.js +79 -0
- package/dist/backend/backend/services/onchain/index.js.map +1 -0
- package/dist/backend/backend/services/onchain/tenderlyRpcClient.js +60 -0
- package/dist/backend/backend/services/onchain/tenderlyRpcClient.js.map +1 -0
- package/dist/backend/backend/services/onchain/types.js +14 -0
- package/dist/backend/backend/services/onchain/types.js.map +1 -0
- package/dist/backend/backend/services/onchainAutomationService.js +316 -0
- package/dist/backend/backend/services/onchainAutomationService.js.map +1 -0
- package/dist/backend/backend/services/robinhood/auth.js +26 -0
- package/dist/backend/backend/services/robinhood/auth.js.map +1 -0
- package/dist/backend/backend/services/robinhood/client.js +73 -0
- package/dist/backend/backend/services/robinhood/client.js.map +1 -0
- package/dist/backend/backend/services/robinhood/integrationService.js +119 -0
- package/dist/backend/backend/services/robinhood/integrationService.js.map +1 -0
- package/dist/backend/backend/services/robinhood/provider.js +17 -0
- package/dist/backend/backend/services/robinhood/provider.js.map +1 -0
- package/dist/backend/backend/services/robinhood/unofficialClient.js +61 -0
- package/dist/backend/backend/services/robinhood/unofficialClient.js.map +1 -0
- package/dist/backend/backend/services/rpcService.js +48 -0
- package/dist/backend/backend/services/rpcService.js.map +1 -0
- package/dist/backend/backend/services/runtimeTelemetryService.js +96 -0
- package/dist/backend/backend/services/runtimeTelemetryService.js.map +1 -0
- package/dist/backend/backend/services/safeConfigRepository.js +147 -0
- package/dist/backend/backend/services/safeConfigRepository.js.map +1 -0
- package/dist/backend/backend/services/safeService.js +527 -0
- package/dist/backend/backend/services/safeService.js.map +1 -0
- package/dist/backend/backend/services/sandboxService.js +135 -0
- package/dist/backend/backend/services/sandboxService.js.map +1 -0
- package/dist/backend/backend/services/secureSettingsService.js +50 -0
- package/dist/backend/backend/services/secureSettingsService.js.map +1 -0
- package/dist/backend/backend/services/transactionHoldService.js +184 -0
- package/dist/backend/backend/services/transactionHoldService.js.map +1 -0
- package/dist/backend/backend/services/vanityService.js +235 -0
- package/dist/backend/backend/services/vanityService.js.map +1 -0
- package/dist/backend/backend/services/walletService.js +202 -0
- package/dist/backend/backend/services/walletService.js.map +1 -0
- package/dist/backend/backend/services/walletStore.js +132 -0
- package/dist/backend/backend/services/walletStore.js.map +1 -0
- package/dist/backend/backend/utils/abiResolver.js +182 -0
- package/dist/backend/backend/utils/abiResolver.js.map +1 -0
- package/dist/backend/backend/utils/http.js +12 -0
- package/dist/backend/backend/utils/http.js.map +1 -0
- package/dist/backend/backend/utils/secretsResolver.js +137 -0
- package/dist/backend/backend/utils/secretsResolver.js.map +1 -0
- package/dist/backend/backend/utils/signer.js +15 -0
- package/dist/backend/backend/utils/signer.js.map +1 -0
- package/dist/backend/backend/workers/vanityWorker.js +63 -0
- package/dist/backend/backend/workers/vanityWorker.js.map +1 -0
- package/dist/backend/cli/gnoman.js +387 -0
- package/dist/backend/cli/gnoman.js.map +1 -0
- package/dist/backend/modules/sandbox/abiLoader.js +78 -0
- package/dist/backend/modules/sandbox/abiLoader.js.map +1 -0
- package/dist/backend/modules/sandbox/contractSimulator.js +205 -0
- package/dist/backend/modules/sandbox/contractSimulator.js.map +1 -0
- package/dist/backend/modules/sandbox/formBuilder.js +14 -0
- package/dist/backend/modules/sandbox/formBuilder.js.map +1 -0
- package/dist/backend/modules/sandbox/index.js +24 -0
- package/dist/backend/modules/sandbox/index.js.map +1 -0
- package/dist/backend/modules/sandbox/localFork.js +103 -0
- package/dist/backend/modules/sandbox/localFork.js.map +1 -0
- package/dist/backend/modules/sandbox/sandboxManager.js +130 -0
- package/dist/backend/modules/sandbox/sandboxManager.js.map +1 -0
- package/dist/backend/modules/sandbox/types.js +3 -0
- package/dist/backend/modules/sandbox/types.js.map +1 -0
- package/dist/backend/src/core/backends/fileBackend.js +136 -0
- package/dist/backend/src/core/backends/fileBackend.js.map +1 -0
- package/dist/backend/src/core/backends/memoryBackend.js +26 -0
- package/dist/backend/src/core/backends/memoryBackend.js.map +1 -0
- package/dist/backend/src/core/backends/systemBackend.js +86 -0
- package/dist/backend/src/core/backends/systemBackend.js.map +1 -0
- package/dist/backend/src/core/backends/types.js +12 -0
- package/dist/backend/src/core/backends/types.js.map +1 -0
- package/dist/backend/src/core/keyringManager.js +178 -0
- package/dist/backend/src/core/keyringManager.js.map +1 -0
- package/dist/backend/src/utils/abiResolver.js +180 -0
- package/dist/backend/src/utils/abiResolver.js.map +1 -0
- package/dist/backend/src/utils/runtimeObservability.js +78 -0
- package/dist/backend/src/utils/runtimeObservability.js.map +1 -0
- package/dist/backend/src/utils/secretsResolver.js +138 -0
- package/dist/backend/src/utils/secretsResolver.js.map +1 -0
- package/dist/cli/backend/services/diagnosticsService.js +286 -0
- package/dist/cli/backend/services/diagnosticsService.js.map +1 -0
- package/dist/cli/backend/services/keyringAccessor.js +40 -0
- package/dist/cli/backend/services/keyringAccessor.js.map +1 -0
- package/dist/cli/backend/services/rpcService.js +48 -0
- package/dist/cli/backend/services/rpcService.js.map +1 -0
- package/dist/cli/backend/services/runtimeTelemetryService.js +96 -0
- package/dist/cli/backend/services/runtimeTelemetryService.js.map +1 -0
- package/dist/cli/backend/services/walletService.js +202 -0
- package/dist/cli/backend/services/walletService.js.map +1 -0
- package/dist/cli/backend/services/walletStore.js +132 -0
- package/dist/cli/backend/services/walletStore.js.map +1 -0
- package/dist/cli/backend/utils/http.js +12 -0
- package/dist/cli/backend/utils/http.js.map +1 -0
- package/dist/cli/backend/utils/secretsResolver.js +137 -0
- package/dist/cli/backend/utils/secretsResolver.js.map +1 -0
- package/dist/cli/cli/gnoman.js +387 -0
- package/dist/cli/cli/gnoman.js.map +1 -0
- package/dist/cli/src/core/backends/fileBackend.js +136 -0
- package/dist/cli/src/core/backends/fileBackend.js.map +1 -0
- package/dist/cli/src/core/backends/memoryBackend.js +26 -0
- package/dist/cli/src/core/backends/memoryBackend.js.map +1 -0
- package/dist/cli/src/core/backends/systemBackend.js +86 -0
- package/dist/cli/src/core/backends/systemBackend.js.map +1 -0
- package/dist/cli/src/core/backends/types.js +12 -0
- package/dist/cli/src/core/backends/types.js.map +1 -0
- package/dist/cli/src/core/keyringManager.js +178 -0
- package/dist/cli/src/core/keyringManager.js.map +1 -0
- package/dist/cli/src/utils/abiResolver.js +180 -0
- package/dist/cli/src/utils/abiResolver.js.map +1 -0
- package/dist/cli/src/utils/runtimeObservability.js +78 -0
- package/dist/cli/src/utils/runtimeObservability.js.map +1 -0
- package/dist/cli/src/utils/secretsResolver.js +138 -0
- package/dist/cli/src/utils/secretsResolver.js.map +1 -0
- package/dist/main/backend/services/keyringAccessor.js +40 -0
- package/dist/main/backend/services/keyringAccessor.js.map +1 -0
- package/dist/main/backend/utils/http.js +12 -0
- package/dist/main/backend/utils/http.js.map +1 -0
- package/dist/main/main/ipcHandlers/index.js +26 -0
- package/dist/main/main/ipcHandlers/index.js.map +1 -0
- package/dist/main/main/keyring/keyringmanager.js +101 -0
- package/dist/main/main/keyring/keyringmanager.js.map +1 -0
- package/dist/main/main/main.js +224 -0
- package/dist/main/main/main.js.map +1 -0
- package/dist/main/main/preload/index.js +19 -0
- package/dist/main/main/preload/index.js.map +1 -0
- package/dist/main/main/preload/licenseBridge.js +105 -0
- package/dist/main/main/preload/licenseBridge.js.map +1 -0
- package/dist/main/src/core/backends/fileBackend.js +136 -0
- package/dist/main/src/core/backends/fileBackend.js.map +1 -0
- package/dist/main/src/core/backends/memoryBackend.js +26 -0
- package/dist/main/src/core/backends/memoryBackend.js.map +1 -0
- package/dist/main/src/core/backends/systemBackend.js +86 -0
- package/dist/main/src/core/backends/systemBackend.js.map +1 -0
- package/dist/main/src/core/backends/types.js +12 -0
- package/dist/main/src/core/backends/types.js.map +1 -0
- package/dist/main/src/core/keyringManager.js +178 -0
- package/dist/main/src/core/keyringManager.js.map +1 -0
- package/dist/main/src/utils/abiResolver.js +180 -0
- package/dist/main/src/utils/abiResolver.js.map +1 -0
- package/dist/main/src/utils/runtimeObservability.js +78 -0
- package/dist/main/src/utils/runtimeObservability.js.map +1 -0
- package/dist/main/src/utils/secretsResolver.js +138 -0
- package/dist/main/src/utils/secretsResolver.js.map +1 -0
- package/docs/development-guide.md +203 -0
- package/docs/etherscan-chainlink-integration.md +44 -0
- package/docs/gnoman-20-user-manual-STANDARD-PRINT-READY.pdf +0 -0
- package/docs/gnoman-20-user-manual-STANDARD.pdf +0 -0
- package/docs/license-dev-guide.md +106 -0
- package/docs/robinhood-integration.md +30 -0
- package/docs/system-audit-gpt-guide.md +208 -0
- package/docs/system-robustness-audit.md +50 -0
- package/docs/user-guide.md +73 -0
- package/docs/wiki/development-guide.md +203 -0
- package/docs/wiki/license-dev-guide.md +106 -0
- package/docs/wiki/user-guide.md +73 -0
- package/eslint.config.js +85 -0
- package/gnoman2.0/.eslintrc.cjs +24 -0
- package/gnoman2.0/.prettierrc.json +6 -0
- package/gnoman2.0/CODex_TASKS.md +124 -0
- package/gnoman2.0/LICENSE.md +164 -0
- package/gnoman2.0/README.md +95 -0
- package/gnoman2.0/assets/GnoLogo.jpg +0 -0
- package/gnoman2.0/assets/self.png +0 -0
- package/gnoman2.0/backend/controllers/contractController.ts +49 -0
- package/gnoman2.0/backend/controllers/devToolsController.ts +76 -0
- package/gnoman2.0/backend/controllers/etherscanController.ts +59 -0
- package/gnoman2.0/backend/controllers/historyController.ts +7 -0
- package/gnoman2.0/backend/controllers/keyringController.ts +134 -0
- package/gnoman2.0/backend/controllers/robinhoodController.ts +80 -0
- package/gnoman2.0/backend/controllers/safeController.ts +167 -0
- package/gnoman2.0/backend/controllers/sandboxController.ts +63 -0
- package/gnoman2.0/backend/controllers/settingsController.ts +38 -0
- package/gnoman2.0/backend/controllers/walletController.ts +151 -0
- package/gnoman2.0/backend/index.ts +133 -0
- package/gnoman2.0/backend/licenses/license_public.pem +3 -0
- package/gnoman2.0/backend/licenses/verify_license.py +43 -0
- package/gnoman2.0/backend/routes/contractRoutes.ts +11 -0
- package/gnoman2.0/backend/routes/devToolsRoutes.ts +11 -0
- package/gnoman2.0/backend/routes/etherscanRoutes.ts +11 -0
- package/gnoman2.0/backend/routes/historyRoutes.ts +8 -0
- package/gnoman2.0/backend/routes/keyringRoutes.ts +25 -0
- package/gnoman2.0/backend/routes/licenseRoutes.ts +35 -0
- package/gnoman2.0/backend/routes/robinhoodRoutes.ts +22 -0
- package/gnoman2.0/backend/routes/runtimeRoutes.ts +29 -0
- package/gnoman2.0/backend/routes/safeRoutes.ts +28 -0
- package/gnoman2.0/backend/routes/sandboxRoutes.ts +17 -0
- package/gnoman2.0/backend/routes/settingsRoutes.ts +14 -0
- package/gnoman2.0/backend/routes/walletRoutes.ts +21 -0
- package/gnoman2.0/backend/services/chainlinkService.ts +65 -0
- package/gnoman2.0/backend/services/contractRegistryService.ts +205 -0
- package/gnoman2.0/backend/services/devToolsService.ts +251 -0
- package/gnoman2.0/backend/services/diagnosticsService.ts +350 -0
- package/gnoman2.0/backend/services/etherscanService.ts +152 -0
- package/gnoman2.0/backend/services/historyService.ts +89 -0
- package/gnoman2.0/backend/services/keyringAccessor.ts +4 -0
- package/gnoman2.0/backend/services/licenseService.ts +163 -0
- package/gnoman2.0/backend/services/onchain/abiRegistry.ts +57 -0
- package/gnoman2.0/backend/services/onchain/chainlinkClient.ts +56 -0
- package/gnoman2.0/backend/services/onchain/errors.ts +16 -0
- package/gnoman2.0/backend/services/onchain/etherscanClient.ts +94 -0
- package/gnoman2.0/backend/services/onchain/index.ts +76 -0
- package/gnoman2.0/backend/services/onchain/tenderlyRpcClient.ts +74 -0
- package/gnoman2.0/backend/services/onchain/types.ts +33 -0
- package/gnoman2.0/backend/services/onchainAutomationService.ts +424 -0
- package/gnoman2.0/backend/services/robinhood/auth.ts +42 -0
- package/gnoman2.0/backend/services/robinhood/client.ts +123 -0
- package/gnoman2.0/backend/services/robinhood/integrationService.ts +140 -0
- package/gnoman2.0/backend/services/robinhood/provider.ts +22 -0
- package/gnoman2.0/backend/services/robinhood/unofficialClient.ts +66 -0
- package/gnoman2.0/backend/services/rpcService.ts +44 -0
- package/gnoman2.0/backend/services/runtimeTelemetryService.ts +158 -0
- package/gnoman2.0/backend/services/safeConfigRepository.ts +205 -0
- package/gnoman2.0/backend/services/safeService.ts +588 -0
- package/gnoman2.0/backend/services/sandboxService.ts +157 -0
- package/gnoman2.0/backend/services/secureSettingsService.ts +45 -0
- package/gnoman2.0/backend/services/transactionHoldService.ts +223 -0
- package/gnoman2.0/backend/services/vanityService.ts +293 -0
- package/gnoman2.0/backend/services/walletService.ts +290 -0
- package/gnoman2.0/backend/services/walletStore.ts +179 -0
- package/gnoman2.0/backend/types/express-async-handler.d.ts +13 -0
- package/gnoman2.0/backend/types/keyring.d.ts +19 -0
- package/gnoman2.0/backend/utils/abiResolver.ts +208 -0
- package/gnoman2.0/backend/utils/http.ts +6 -0
- package/gnoman2.0/backend/utils/secretsResolver.ts +150 -0
- package/gnoman2.0/backend/utils/signer.ts +11 -0
- package/gnoman2.0/backend/workers/vanityWorker.ts +76 -0
- package/gnoman2.0/capacitor.config.ts +13 -0
- package/gnoman2.0/cli/gnoman.ts +424 -0
- package/gnoman2.0/contracts/OracleConsumer.sol +20 -0
- package/gnoman2.0/contracts/PriceFeedConsumer.sol +22 -0
- package/gnoman2.0/docs/development-guide.md +203 -0
- package/gnoman2.0/docs/etherscan-chainlink-integration.md +44 -0
- package/gnoman2.0/docs/gnoman-20-user-manual-STANDARD-PRINT-READY.pdf +0 -0
- package/gnoman2.0/docs/gnoman-20-user-manual-STANDARD.pdf +0 -0
- package/gnoman2.0/docs/license-dev-guide.md +106 -0
- package/gnoman2.0/docs/robinhood-integration.md +30 -0
- package/gnoman2.0/docs/system-audit-gpt-guide.md +208 -0
- package/gnoman2.0/docs/system-robustness-audit.md +50 -0
- package/gnoman2.0/docs/user-guide.md +73 -0
- package/gnoman2.0/docs/wiki/development-guide.md +203 -0
- package/gnoman2.0/docs/wiki/license-dev-guide.md +106 -0
- package/gnoman2.0/docs/wiki/user-guide.md +73 -0
- package/gnoman2.0/eslint.config.js +85 -0
- package/gnoman2.0/gnomon/__init__.py +0 -0
- package/gnoman2.0/gnomon/api/__init__.py +0 -0
- package/gnoman2.0/gnomon/api/etherscan_tracker.py +72 -0
- package/gnoman2.0/gnomon/core/__init__.py +0 -0
- package/gnoman2.0/gnomon/core/safe_manager.py +111 -0
- package/gnoman2.0/gnomon/tests/test_abi_resolver.py +181 -0
- package/gnoman2.0/gnomon/tests/test_safe_persistence_and_etherscan.py +97 -0
- package/gnoman2.0/gnomon/utils/__init__.py +5 -0
- package/gnoman2.0/gnomon/utils/abi_resolver.py +255 -0
- package/gnoman2.0/ios/ExportOptions.plist +16 -0
- package/gnoman2.0/ios/README.md +33 -0
- package/gnoman2.0/jest.config.ts +18 -0
- package/gnoman2.0/keyring/__init__.py +17 -0
- package/gnoman2.0/licensingServer/package.json +23 -0
- package/gnoman2.0/licensingServer/src/config/keys.ts +84 -0
- package/gnoman2.0/licensingServer/src/index.ts +30 -0
- package/gnoman2.0/licensingServer/src/lib/canonicalize.ts +5 -0
- package/gnoman2.0/licensingServer/src/lib/crypto.ts +25 -0
- package/gnoman2.0/licensingServer/src/lib/validate.ts +62 -0
- package/gnoman2.0/licensingServer/src/middleware/auth.ts +20 -0
- package/gnoman2.0/licensingServer/src/routes/licenses.ts +110 -0
- package/gnoman2.0/licensingServer/tsconfig.json +12 -0
- package/gnoman2.0/main/ipcHandlers/index.ts +23 -0
- package/gnoman2.0/main/keyring/keyringmanager.ts +154 -0
- package/gnoman2.0/main/main.ts +234 -0
- package/gnoman2.0/main/preload/index.ts +31 -0
- package/gnoman2.0/main/preload/licenseBridge.ts +73 -0
- package/gnoman2.0/modules/sandbox/abiLoader.ts +78 -0
- package/gnoman2.0/modules/sandbox/contractSimulator.ts +241 -0
- package/gnoman2.0/modules/sandbox/formBuilder.ts +16 -0
- package/gnoman2.0/modules/sandbox/index.ts +6 -0
- package/gnoman2.0/modules/sandbox/localFork.ts +129 -0
- package/gnoman2.0/modules/sandbox/safe.abi.json +82 -0
- package/gnoman2.0/modules/sandbox/sandboxManager.ts +154 -0
- package/gnoman2.0/modules/sandbox/types.ts +84 -0
- package/gnoman2.0/modules/sandbox/ui/LogViewer.tsx +30 -0
- package/gnoman2.0/modules/sandbox/ui/ParameterForm.tsx +49 -0
- package/gnoman2.0/modules/sandbox/ui/SandboxPanel.tsx +568 -0
- package/gnoman2.0/package-lock.json +10904 -0
- package/gnoman2.0/package.json +82 -0
- package/gnoman2.0/renderer/components/LicenseScreen.tsx +134 -0
- package/gnoman2.0/renderer/index.html +12 -0
- package/gnoman2.0/renderer/package-lock.json +4104 -0
- package/gnoman2.0/renderer/package.json +35 -0
- package/gnoman2.0/renderer/postcss.config.cjs +6 -0
- package/gnoman2.0/renderer/src/App.tsx +229 -0
- package/gnoman2.0/renderer/src/context/KeyringContext.tsx +217 -0
- package/gnoman2.0/renderer/src/context/SafeContext.tsx +49 -0
- package/gnoman2.0/renderer/src/context/ThemeContext.tsx +60 -0
- package/gnoman2.0/renderer/src/context/WalletContext.tsx +50 -0
- package/gnoman2.0/renderer/src/context/main.tsx +18 -0
- package/gnoman2.0/renderer/src/main.tsx +18 -0
- package/gnoman2.0/renderer/src/pages/Contracts.tsx +482 -0
- package/gnoman2.0/renderer/src/pages/Dashboard.tsx +653 -0
- package/gnoman2.0/renderer/src/pages/DeveloperTools.tsx +270 -0
- package/gnoman2.0/renderer/src/pages/History.tsx +149 -0
- package/gnoman2.0/renderer/src/pages/Keyring.tsx +449 -0
- package/gnoman2.0/renderer/src/pages/Safes.tsx +1089 -0
- package/gnoman2.0/renderer/src/pages/Sandbox.tsx +146 -0
- package/gnoman2.0/renderer/src/pages/Settings.tsx +871 -0
- package/gnoman2.0/renderer/src/pages/Wallets.tsx +752 -0
- package/gnoman2.0/renderer/src/pages/WikiGuide.tsx +75 -0
- package/gnoman2.0/renderer/src/styles.css +32 -0
- package/gnoman2.0/renderer/src/types/gnoman.d.ts +9 -0
- package/gnoman2.0/renderer/src/types/license.ts +8 -0
- package/gnoman2.0/renderer/src/types/safevault.d.ts +17 -0
- package/gnoman2.0/renderer/src/utils/backend.ts +88 -0
- package/gnoman2.0/renderer/tailwind.config.cjs +8 -0
- package/gnoman2.0/renderer/tsconfig.json +13 -0
- package/gnoman2.0/renderer/tsconfig.node.json +9 -0
- package/gnoman2.0/renderer/vite.config.ts +19 -0
- package/gnoman2.0/requests/__init__.py +35 -0
- package/gnoman2.0/scripts/build-ios.sh +30 -0
- package/gnoman2.0/scripts/copyBackendAssets.js +24 -0
- package/gnoman2.0/scripts/copyRenderer.js +87 -0
- package/gnoman2.0/scripts/launchElectron.js +51 -0
- package/gnoman2.0/src/core/backends/fileBackend.ts +154 -0
- package/gnoman2.0/src/core/backends/memoryBackend.ts +27 -0
- package/gnoman2.0/src/core/backends/systemBackend.ts +66 -0
- package/gnoman2.0/src/core/backends/types.ts +17 -0
- package/gnoman2.0/src/core/keyringManager.ts +208 -0
- package/gnoman2.0/src/utils/abiCache/.gitkeep +0 -0
- package/gnoman2.0/src/utils/abiResolver.ts +200 -0
- package/gnoman2.0/src/utils/runtimeObservability.ts +110 -0
- package/gnoman2.0/src/utils/secretsResolver.ts +144 -0
- package/gnoman2.0/tests/chainlinkService.test.ts +32 -0
- package/gnoman2.0/tests/diagnosticsService.test.ts +68 -0
- package/gnoman2.0/tests/etherscanController.test.ts +99 -0
- package/gnoman2.0/tests/etherscanService.test.ts +116 -0
- package/gnoman2.0/tests/keyringManager.test.ts +135 -0
- package/gnoman2.0/tests/onchainToolkit.test.ts +71 -0
- package/gnoman2.0/tests/robinhoodClient.test.ts +54 -0
- package/gnoman2.0/tests/robinhoodController.test.ts +81 -0
- package/gnoman2.0/tests/robinhoodIntegrationService.test.ts +50 -0
- package/gnoman2.0/tests/safeServicePersistence.test.ts +81 -0
- package/gnoman2.0/tests/test_contract_sandbox/sandbox.test.js +407 -0
- package/gnoman2.0/tests/walletController.test.ts +57 -0
- package/gnoman2.0/tsconfig.backend.json +7 -0
- package/gnoman2.0/tsconfig.cli.json +7 -0
- package/gnoman2.0/tsconfig.json +18 -0
- package/gnoman2.0/tsconfig.main.json +7 -0
- package/gnomon/__init__.py +0 -0
- package/gnomon/__pycache__/__init__.cpython-310.pyc +0 -0
- package/gnomon/api/__init__.py +0 -0
- package/gnomon/api/__pycache__/__init__.cpython-310.pyc +0 -0
- package/gnomon/api/__pycache__/etherscan_tracker.cpython-310.pyc +0 -0
- package/gnomon/api/etherscan_tracker.py +72 -0
- package/gnomon/core/__init__.py +0 -0
- package/gnomon/core/safe_manager.py +111 -0
- package/gnomon/tests/__pycache__/test_safe_persistence_and_etherscan.cpython-310-pytest-8.3.3.pyc +0 -0
- package/gnomon/tests/test_abi_resolver.py +181 -0
- package/gnomon/tests/test_safe_persistence_and_etherscan.py +97 -0
- package/gnomon/utils/__init__.py +5 -0
- package/gnomon/utils/abi_resolver.py +255 -0
- package/ios/ExportOptions.plist +16 -0
- package/ios/README.md +33 -0
- package/jest.config.ts +18 -0
- package/keyring/__init__.py +17 -0
- package/launcher.sh +57 -0
- package/license.env +2 -0
- package/licensingServer/package.json +23 -0
- package/licensingServer/src/config/keys.ts +84 -0
- package/licensingServer/src/index.ts +30 -0
- package/licensingServer/src/lib/canonicalize.ts +5 -0
- package/licensingServer/src/lib/crypto.ts +25 -0
- package/licensingServer/src/lib/validate.ts +62 -0
- package/licensingServer/src/middleware/auth.ts +20 -0
- package/licensingServer/src/routes/licenses.ts +110 -0
- package/licensingServer/tsconfig.json +12 -0
- package/main/ipcHandlers/index.ts +23 -0
- package/main/keyring/keyringmanager.ts +154 -0
- package/main/main.ts +234 -0
- package/main/preload/index.ts +31 -0
- package/main/preload/licenseBridge.ts +73 -0
- package/modules/sandbox/abiLoader.ts +78 -0
- package/modules/sandbox/contractSimulator.ts +241 -0
- package/modules/sandbox/formBuilder.ts +16 -0
- package/modules/sandbox/index.ts +6 -0
- package/modules/sandbox/localFork.ts +129 -0
- package/modules/sandbox/safe.abi.json +82 -0
- package/modules/sandbox/sandboxManager.ts +154 -0
- package/modules/sandbox/types.ts +84 -0
- package/modules/sandbox/ui/LogViewer.tsx +30 -0
- package/modules/sandbox/ui/ParameterForm.tsx +49 -0
- package/modules/sandbox/ui/SandboxPanel.tsx +568 -0
- package/package.json +82 -0
- package/renderer/components/LicenseScreen.tsx +134 -0
- package/renderer/index.html +12 -0
- package/renderer/package-lock.json +4104 -0
- package/renderer/package.json +35 -0
- package/renderer/postcss.config.cjs +6 -0
- package/renderer/src/App.tsx +229 -0
- package/renderer/src/context/KeyringContext.tsx +217 -0
- package/renderer/src/context/SafeContext.tsx +49 -0
- package/renderer/src/context/ThemeContext.tsx +60 -0
- package/renderer/src/context/WalletContext.tsx +50 -0
- package/renderer/src/context/main.tsx +18 -0
- package/renderer/src/main.tsx +18 -0
- package/renderer/src/pages/Contracts.tsx +482 -0
- package/renderer/src/pages/Dashboard.tsx +653 -0
- package/renderer/src/pages/DeveloperTools.tsx +270 -0
- package/renderer/src/pages/History.tsx +149 -0
- package/renderer/src/pages/Keyring.tsx +449 -0
- package/renderer/src/pages/Safes.tsx +1089 -0
- package/renderer/src/pages/Sandbox.tsx +146 -0
- package/renderer/src/pages/Settings.tsx +871 -0
- package/renderer/src/pages/Wallets.tsx +752 -0
- package/renderer/src/pages/WikiGuide.tsx +75 -0
- package/renderer/src/styles.css +32 -0
- package/renderer/src/types/gnoman.d.ts +9 -0
- package/renderer/src/types/license.ts +8 -0
- package/renderer/src/types/safevault.d.ts +17 -0
- package/renderer/src/utils/backend.ts +88 -0
- package/renderer/tailwind.config.cjs +8 -0
- package/renderer/tsconfig.json +13 -0
- package/renderer/tsconfig.node.json +9 -0
- package/renderer/vite.config.ts +19 -0
- package/requests/__init__.py +35 -0
- package/requests/__pycache__/__init__.cpython-310.pyc +0 -0
- package/scripts/build-ios.sh +30 -0
- package/scripts/copyBackendAssets.js +24 -0
- package/scripts/copyRenderer.js +87 -0
- package/scripts/deployBackend.sh +24 -0
- package/scripts/launchElectron.js +51 -0
- package/src/core/backends/fileBackend.ts +154 -0
- package/src/core/backends/memoryBackend.ts +27 -0
- package/src/core/backends/systemBackend.ts +66 -0
- package/src/core/backends/types.ts +17 -0
- package/src/core/keyringManager.ts +208 -0
- package/src/utils/abiCache/.gitkeep +0 -0
- package/src/utils/abiResolver.ts +200 -0
- package/src/utils/runtimeObservability.ts +110 -0
- package/src/utils/secretsResolver.ts +144 -0
- package/tests/chainlinkService.test.ts +32 -0
- package/tests/diagnosticsService.test.ts +68 -0
- package/tests/etherscanController.test.ts +99 -0
- package/tests/etherscanService.test.ts +116 -0
- package/tests/keyringManager.test.ts +135 -0
- package/tests/onchainToolkit.test.ts +71 -0
- package/tests/robinhoodClient.test.ts +54 -0
- package/tests/robinhoodController.test.ts +81 -0
- package/tests/robinhoodIntegrationService.test.ts +50 -0
- package/tests/safeServicePersistence.test.ts +81 -0
- package/tests/test_contract_sandbox/sandbox.test.js +407 -0
- package/tests/walletController.test.ts +57 -0
- package/touch +14 -0
- package/tsconfig.backend.json +7 -0
- package/tsconfig.cli.json +7 -0
- package/tsconfig.json +18 -0
- package/tsconfig.main.json +7 -0
- package/webhook-shim.js +50 -0
|
@@ -0,0 +1,208 @@
|
|
|
1
|
+
# GPT System Robustness Audit Playbook
|
|
2
|
+
|
|
3
|
+
This document defines a standardized set of prompts and configuration blocks for guiding a GPT-based agent through a comprehensive robustness audit. The guidance is organized into reusable instruction dictionaries that can be injected into the agent's context verbatim or adapted as needed.
|
|
4
|
+
|
|
5
|
+
## Basic Audit Instructions
|
|
6
|
+
|
|
7
|
+
```python
|
|
8
|
+
def generate_audit_instructions():
|
|
9
|
+
instructions = {
|
|
10
|
+
"audit_type": "system_robustness",
|
|
11
|
+
"scope": {
|
|
12
|
+
"components": ["core", "security", "infrastructure"],
|
|
13
|
+
"depth": "comprehensive",
|
|
14
|
+
"timeline": "historical_and_current"
|
|
15
|
+
},
|
|
16
|
+
"evaluation_criteria": {
|
|
17
|
+
"security": ["vulnerabilities", "access_controls", "data_protection"],
|
|
18
|
+
"performance": ["response_times", "resource_usage", "scaling"],
|
|
19
|
+
"reliability": ["uptime", "error_rates", "recovery_procedures"]
|
|
20
|
+
},
|
|
21
|
+
"output_format": {
|
|
22
|
+
"structure": "detailed_report",
|
|
23
|
+
"sections": ["findings", "recommendations", "enhancements"],
|
|
24
|
+
"metrics": ["quantitative", "qualitative"]
|
|
25
|
+
}
|
|
26
|
+
}
|
|
27
|
+
return instructions
|
|
28
|
+
```
|
|
29
|
+
|
|
30
|
+
## Enhanced Audit Parameters
|
|
31
|
+
|
|
32
|
+
```python
|
|
33
|
+
def create_enhanced_audit_parameters():
|
|
34
|
+
parameters = {
|
|
35
|
+
"analysis_depth": {
|
|
36
|
+
"code_review": "detailed",
|
|
37
|
+
"configuration_audit": "thorough",
|
|
38
|
+
"security_assessment": "penetration_testing",
|
|
39
|
+
"performance_profiling": "comprehensive"
|
|
40
|
+
},
|
|
41
|
+
"risk_assessment": {
|
|
42
|
+
"categories": ["critical", "high", "medium", "low"],
|
|
43
|
+
"metrics": ["impact", "likelihood", "mitigation_effectiveness"]
|
|
44
|
+
},
|
|
45
|
+
"enhancement_evaluation": {
|
|
46
|
+
"criteria": ["feasibility", "impact", "cost_benefit"],
|
|
47
|
+
"prioritization": "must_should_could_wont"
|
|
48
|
+
}
|
|
49
|
+
}
|
|
50
|
+
return parameters
|
|
51
|
+
```
|
|
52
|
+
|
|
53
|
+
## System Component Analysis
|
|
54
|
+
|
|
55
|
+
```python
|
|
56
|
+
def define_component_analysis():
|
|
57
|
+
components = {
|
|
58
|
+
"core_systems": {
|
|
59
|
+
"evaluation_points": [
|
|
60
|
+
"architecture_integrity",
|
|
61
|
+
"data_consistency",
|
|
62
|
+
"business_logic_validation",
|
|
63
|
+
"state_management"
|
|
64
|
+
],
|
|
65
|
+
"metrics": {
|
|
66
|
+
"processing_latency": "ms",
|
|
67
|
+
"error_rate": "percentage",
|
|
68
|
+
"resource_utilization": "percentage"
|
|
69
|
+
}
|
|
70
|
+
},
|
|
71
|
+
"security_controls": {
|
|
72
|
+
"evaluation_points": [
|
|
73
|
+
"authentication_strength",
|
|
74
|
+
"authorization_effectiveness",
|
|
75
|
+
"data_encryption",
|
|
76
|
+
"access_logging"
|
|
77
|
+
],
|
|
78
|
+
"metrics": {
|
|
79
|
+
"authentication_success_rate": "percentage",
|
|
80
|
+
"authorization_check_performance": "ms",
|
|
81
|
+
"encryption_strength": "bits"
|
|
82
|
+
}
|
|
83
|
+
}
|
|
84
|
+
}
|
|
85
|
+
return components
|
|
86
|
+
```
|
|
87
|
+
|
|
88
|
+
## Enhancement Recommendation Guidelines
|
|
89
|
+
|
|
90
|
+
```python
|
|
91
|
+
def create_enhancement_guidelines():
|
|
92
|
+
guidelines = {
|
|
93
|
+
"recommendation_format": {
|
|
94
|
+
"description": "clear_and_concise",
|
|
95
|
+
"justification": "required",
|
|
96
|
+
"implementation_steps": "detailed",
|
|
97
|
+
"risk_assessment": "included",
|
|
98
|
+
"cost_estimate": "required"
|
|
99
|
+
},
|
|
100
|
+
"priority_levels": {
|
|
101
|
+
"critical": {
|
|
102
|
+
"criteria": ["security_vulnerability", "data_integrity", "system_stability"],
|
|
103
|
+
"implementation_timeline": "immediate"
|
|
104
|
+
},
|
|
105
|
+
"high": {
|
|
106
|
+
"criteria": ["performance_impact", "user_experience", "compliance"],
|
|
107
|
+
"implementation_timeline": "short_term"
|
|
108
|
+
},
|
|
109
|
+
"medium": {
|
|
110
|
+
"criteria": ["enhancement", "optimization", "maintenance"],
|
|
111
|
+
"implementation_timeline": "medium_term"
|
|
112
|
+
}
|
|
113
|
+
}
|
|
114
|
+
}
|
|
115
|
+
return guidelines
|
|
116
|
+
```
|
|
117
|
+
|
|
118
|
+
## Output Format Specifications
|
|
119
|
+
|
|
120
|
+
```python
|
|
121
|
+
def define_report_structure():
|
|
122
|
+
structure = {
|
|
123
|
+
"executive_summary": {
|
|
124
|
+
"length": "1-2_pages",
|
|
125
|
+
"content": ["key_findings", "critical_issues", "high_priority_recommendations"]
|
|
126
|
+
},
|
|
127
|
+
"detailed_findings": {
|
|
128
|
+
"sections": [
|
|
129
|
+
"system_architecture",
|
|
130
|
+
"security_controls",
|
|
131
|
+
"performance_metrics",
|
|
132
|
+
"reliability_assessment"
|
|
133
|
+
],
|
|
134
|
+
"format": "structured_with_evidence"
|
|
135
|
+
},
|
|
136
|
+
"recommendations": {
|
|
137
|
+
"format": "prioritized_list",
|
|
138
|
+
"details": ["implementation_steps", "resource_requirements", "expected_outcomes"]
|
|
139
|
+
},
|
|
140
|
+
"enhancement_proposals": {
|
|
141
|
+
"format": "detailed_specifications",
|
|
142
|
+
"sections": ["technical_design", "implementation_plan", "risk_assessment"]
|
|
143
|
+
}
|
|
144
|
+
}
|
|
145
|
+
return structure
|
|
146
|
+
```
|
|
147
|
+
|
|
148
|
+
## Implementation Timeline
|
|
149
|
+
|
|
150
|
+
```python
|
|
151
|
+
def create_implementation_plan():
|
|
152
|
+
timeline = {
|
|
153
|
+
"critical_enhancements": {
|
|
154
|
+
"implementation_window": "0-2_weeks",
|
|
155
|
+
"verification_steps": ["testing", "validation", "documentation"],
|
|
156
|
+
"review_requirements": ["security_audit", "performance_testing"]
|
|
157
|
+
},
|
|
158
|
+
"high_priority_enhancements": {
|
|
159
|
+
"implementation_window": "2-6_weeks",
|
|
160
|
+
"verification_steps": ["unit_testing", "integration_testing", "user_acceptance"],
|
|
161
|
+
"review_requirements": ["code_review", "security_assessment"]
|
|
162
|
+
},
|
|
163
|
+
"medium_priority_enhancements": {
|
|
164
|
+
"implementation_window": "6-12_weeks",
|
|
165
|
+
"verification_steps": ["testing", "documentation", "training"],
|
|
166
|
+
"review_requirements": ["technical_review", "stakeholder_approval"]
|
|
167
|
+
}
|
|
168
|
+
}
|
|
169
|
+
return timeline
|
|
170
|
+
```
|
|
171
|
+
|
|
172
|
+
## Verification and Validation
|
|
173
|
+
|
|
174
|
+
```python
|
|
175
|
+
def define_verification_procedures():
|
|
176
|
+
procedures = {
|
|
177
|
+
"implementation_verification": {
|
|
178
|
+
"steps": [
|
|
179
|
+
"code_review",
|
|
180
|
+
"unit_testing",
|
|
181
|
+
"integration_testing",
|
|
182
|
+
"security_testing",
|
|
183
|
+
"performance_testing"
|
|
184
|
+
],
|
|
185
|
+
"success_criteria": {
|
|
186
|
+
"test_coverage": "90%",
|
|
187
|
+
"security_compliance": "100%",
|
|
188
|
+
"performance_metrics": "within_thresholds"
|
|
189
|
+
}
|
|
190
|
+
},
|
|
191
|
+
"validation_procedures": {
|
|
192
|
+
"steps": [
|
|
193
|
+
"functional_validation",
|
|
194
|
+
"security_validation",
|
|
195
|
+
"performance_validation",
|
|
196
|
+
"user_acceptance_testing"
|
|
197
|
+
],
|
|
198
|
+
"documentation_requirements": {
|
|
199
|
+
"test_results": "detailed",
|
|
200
|
+
"validation_reports": "signed_off",
|
|
201
|
+
"implementation_records": "complete"
|
|
202
|
+
}
|
|
203
|
+
}
|
|
204
|
+
}
|
|
205
|
+
return procedures
|
|
206
|
+
```
|
|
207
|
+
|
|
208
|
+
These blocks can be supplied individually or composed together to provide GPT agents with precise and comprehensive direction when auditing the robustness of a software system.
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
# GNOMAN 2.0 System Robustness Audit
|
|
2
|
+
|
|
3
|
+
## Executive Summary
|
|
4
|
+
- **Assessment window:** Historical architecture review and point-in-time verification on current main branch (commit HEAD prior to this audit).
|
|
5
|
+
- **Focus areas:** Core wallet lifecycle, sandbox tooling, secure storage, and backend service reliability.
|
|
6
|
+
- **Overall posture:** Medium risk. Critical issues were identified around sandbox command execution and wallet data durability. These have been remediated in this change set. Additional medium-risk gaps remain (notably lack of authentication and rate limiting) and are called out below.
|
|
7
|
+
|
|
8
|
+
## Methodology
|
|
9
|
+
1. Enumerated backend services (`backend/`) and sandbox modules (`modules/sandbox/`) with emphasis on security-sensitive flows.
|
|
10
|
+
2. Reviewed persistence and secret-handling mechanisms for wallet operations.
|
|
11
|
+
3. Exercised threat modelling for RPC sandbox operations and external tool integrations.
|
|
12
|
+
4. Implemented targeted mitigations for high-risk findings, followed by TypeScript compilation to validate correctness (`npm run build:backend`).
|
|
13
|
+
|
|
14
|
+
## Findings & Current Status
|
|
15
|
+
| Area | Issue | Risk | Status |
|
|
16
|
+
| --- | --- | --- | --- |
|
|
17
|
+
| Security | Sandbox fork endpoint accepted arbitrary `command` allowing remote code execution. | **Critical** | **Mitigated** – enforced allow-list validation in service layer and worker orchestration. |
|
|
18
|
+
| Security | Wallet secrets only stored in-memory; loss on restart and vulnerable to process crashes. | **High** | **Mitigated** – introduced encrypted SQLite persistence with durable settings. |
|
|
19
|
+
| Security | RPC fork inputs were not validated (arbitrary ports, malformed URLs). | High | **Mitigated** – strict validation for URL, port, block height, and command fields. |
|
|
20
|
+
| Reliability | Vanity job mnemonic persistence already handled; wallet lifecycle previously volatile. | Medium | **Improved** – wallet metadata now survives restarts. |
|
|
21
|
+
| Reliability | No audit trail for sandbox operations beyond existing logs. | Medium | **Existing** – retained history mechanism; recommend centralising log rotation. |
|
|
22
|
+
| Security | No authentication / rate-limiting on backend API. | High | **Open** – requires product decision; recommendation provided. |
|
|
23
|
+
| Security | Renderer-to-backend communication relies on implicit trust. | Medium | **Open** – recommend API key or signed requests. |
|
|
24
|
+
| Performance | Wallet listing now I/O bound; still acceptable (<1 ms per query in local testing). | Low | **Monitored** – future optimisation optional if dataset grows. |
|
|
25
|
+
|
|
26
|
+
## Remediation Actions Implemented
|
|
27
|
+
1. **Wallet persistence hardening**
|
|
28
|
+
- Added `backend/services/walletStore.ts` with encrypted, journaled SQLite storage inside `.gnoman/wallets.db` using `WAL` + `FULL` sync for crash resilience.
|
|
29
|
+
- Updated `walletService` to sanitise aliases, persist records, and decrypt from durable storage when exporting.
|
|
30
|
+
2. **Sandbox command execution controls**
|
|
31
|
+
- Validated RPC fork inputs server-side, enforcing protocol, numeric port ranges, and non-negative block heights.
|
|
32
|
+
- Restricted fork commands to an allow-list (default `anvil`, extendable via `GNOMAN_FORK_ALLOWLIST`) in both `sandboxService` and the worker harness (`LocalFork`). Path separators and unexpected characters are rejected.
|
|
33
|
+
3. **Operational verification**
|
|
34
|
+
- Built backend TypeScript targets (`npm run build:backend`) ensuring all new modules compile and existing code adapts to persistence changes.
|
|
35
|
+
|
|
36
|
+
## Additional Recommendations
|
|
37
|
+
1. **Introduce authenticated API access** – require a local API token or OS keychain bound secret before serving wallet/sandbox endpoints to prevent unauthorised local usage.
|
|
38
|
+
2. **Rate limiting & request quotas** – apply middleware (e.g. `express-rate-limit`) on wallet export/import endpoints to reduce brute-force attempts.
|
|
39
|
+
3. **Secure configuration checks** – extend startup to verify `.gnoman` permissions (warn if more permissive than `0700`).
|
|
40
|
+
4. **Comprehensive automated tests** – add integration tests that cover wallet import/export persistence and sandbox fork lifecycle to guard against regressions.
|
|
41
|
+
|
|
42
|
+
## Verification & Evidence
|
|
43
|
+
- TypeScript compilation succeeded: `npm run build:backend`.
|
|
44
|
+
- Manual code review confirms new SQLite-backed storage and command validation pathways.
|
|
45
|
+
- See source updates in:
|
|
46
|
+
- `backend/services/walletStore.ts`
|
|
47
|
+
- `backend/services/walletService.ts`
|
|
48
|
+
- `backend/services/sandboxService.ts`
|
|
49
|
+
- `modules/sandbox/localFork.ts`
|
|
50
|
+
|
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
@@ -109,57 +109,59 @@ The renderer surfaces the core workflows through a set of tabs defined in
|
|
2
|
+
`GET /api/safes/:address/owners` and `GET /api/safes/:address/transactions/held`
|
|
3
|
+
to populate data and to surface aggregated hold counters plus the effective
|
|
4
|
+
policy (global defaults + Safe override).
|
|
5
|
+
- Tune Safe-specific hold duration and enable/disable flags directly from the
|
|
6
|
+
page. Changes are persisted to SQLite (`holds.sqlite`) and mirrored back via
|
|
7
|
+
`POST /api/safes/:address/hold`.
|
|
8
|
+
- Held transactions reflect entries tracked by the SQLite-backed hold service in
|
|
9
|
+
`backend/services/transactionHoldService.ts`, complete with live countdowns
|
|
10
|
+
and manual release controls.
|
|
11
|
+
|
|
12
|
+
### 4.4 Sandbox
|
|
13
|
+
- Toggle between the legacy Safe callStatic form and the advanced sandbox panel
|
|
14
|
+
in `modules/sandbox/ui/SandboxPanel.tsx`.
|
|
15
|
+
- Upload or paste ABIs, select contract functions, provide parameters, and run
|
|
16
|
+
simulations via `POST /api/sandbox/contract/simulate`.
|
|
17
|
+
- Replay previous simulations pulled from `GET /api/sandbox/contract/history`
|
|
18
|
+
and optionally run them against a local fork started with
|
|
19
|
+
`POST /api/sandbox/fork/start` (defaults to the `anvil` command).
|
|
20
|
+
- Provide a `forkRpcUrl` to execute simulations against a remote Hardhat/Anvil
|
|
21
|
+
fork when no managed local fork is available—the backend automatically falls
|
|
22
|
+
back to standard RPC calls if neither option is configured.
|
|
23
|
+
- Use the Safe-focused tab to call `POST /api/sandbox/call-static` for quick
|
|
24
|
+
guard checks.
|
|
25
|
+
|
|
26
|
+
### 4.5 Keyring
|
|
27
|
+
- Lists secrets registered through the Electron IPC bridge (`window.gnoman.invoke('keyring:list')`).
|
|
28
|
+
- Proxies every request to the backend AES keyring service (`/api/keyring/*`),
|
|
29
|
+
which stores encrypted payloads under `.gnoman/keyrings/<service>.json`.
|
|
30
|
+
- Reveals a selected secret via `keyring:get`, which maps to `POST /api/keyring/get`.
|
|
31
|
+
If the `keyring` module cannot load (for example, inside a sandbox), the backend
|
|
32
|
+
switches to an in-memory store and logs a warning so you know the data is
|
|
33
|
+
ephemeral.
|
|
34
|
+
- Encrypt, reveal, and delete secrets entirely inside the renderer. Each UI action
|
|
35
|
+
forwards to `/api/keyring/*`, guaranteeing parity with the legacy CLI while
|
|
36
|
+
capturing an auditable activity feed for operators.
|
|
37
|
+
- Switch between keyring services (for example `production`, `staging`, or
|
|
38
|
+
`aes`) without leaving the UI. The currently active service is displayed in the
|
|
39
|
+
global header and sidebar so you never lose track of your namespace.
|
|
40
|
+
- The backend still falls back to an in-memory store if the native `keyring`
|
|
41
|
+
module is unavailable. The UI highlights this state and keeps secrets scoped to
|
|
42
|
+
the session, while the CLI bridge remains for legacy automation only.
|
|
43
|
+
|
|
44
|
+
### 4.6 License & Settings
|
|
45
|
+
- The activation screen uses the preload bridge (`window.safevault`) to run the
|
|
46
|
+
Python verifier (`backend/licenses/verify_license.py`) entirely offline.
|
|
47
|
+
- Successful validation writes `.safevault/license.env` with the raw token and a
|
|
48
|
+
`VALIDATED_AT` timestamp. The preload re-verifies this token on every launch.
|
|
49
|
+
- Settings exposes the stored license metadata, the global transaction hold
|
|
50
|
+
toggle/duration (persisted in the AES keyring via `SAFE_TX_HOLD_ENABLED`), and a
|
|
51
|
+
vanity wallet generator surface with live job dashboards.
|
|
52
|
+
- Vanity jobs are executed in worker threads, persisted to `.gnoman/vanity-jobs.json`
|
|
53
|
+
for auditability, and only expose mnemonic aliases so secrets stay in the
|
|
54
|
+
secure store.
|
|
55
|
+
- For automation, the backend still accepts `POST /api/license`, which stores a
|
|
56
|
+
JSON record in `.gnoman/license.json`. This endpoint exists for legacy flows
|
|
57
|
+
that expect the previous storage format.
|
|
58
|
+
|
|
59
|
+
### 4.7 Wiki Guide
|
|
60
|
+
- Renders Markdown content from `docs/wiki/`, including the mirrored developer
|
|
61
|
+
and licensing guides.
|
|
62
|
+
|
|
63
|
+
---
|
|
64
|
+
|
|
65
|
+
## 5. Offline licensing quick reference
|
|
66
|
+
|
|
67
|
+
| Task | Command |
|
|
68
|
+
|
|
69
|
+
### 4.8 Integrations & Runtime Features (Settings)
|
|
70
|
+
- Settings now includes a dedicated **Integrations & Runtime Features** section that surfaces one-glance enablement + reason status for `safe`, `etherscan`, and `robinhood`.
|
|
71
|
+
- Status values come from `GET /api/runtime/capabilities`, which reflects backend runtime decisions instead of UI guesses.
|
|
72
|
+
- Robinhood credential management is grouped under **Integration Configuration: Robinhood Crypto Trading API** to keep integration setup separate from license/hold/vanity controls.
|
|
73
|
+
- Runtime diagnostics remain available under **Runtime Diagnostics** for detailed ABI cache activity, secrets source status, Safe runtime state, and Robinhood request telemetry.
|
|
@@ -0,0 +1,203 @@
|
|
|
1
|
+
# GNOMAN 2.0 Development Guide
|
|
2
|
+
|
|
3
|
+
This guide documents the authoritative workflow for standing up a GNOMAN 2.0
|
|
4
|
+
workstation, exercising the offline licensing stack, and producing builds that
|
|
5
|
+
match what ships to customers. Every path is written relative to the repository
|
|
6
|
+
root (the directory that contains `package.json`).
|
|
7
|
+
|
|
8
|
+
> ℹ️ A byte-for-byte copy of this guide lives at
|
|
9
|
+
> `docs/wiki/development-guide.md` for the in-app wiki. Whenever you update this
|
|
10
|
+
> file, mirror the edits in the wiki directory so desktop users and GitHub
|
|
11
|
+
> readers see the same information.
|
|
12
|
+
|
|
13
|
+
## 1. Tooling prerequisites
|
|
14
|
+
|
|
15
|
+
| Tool | Required version | Notes |
|
|
16
|
+
| ---- | ---------------- | ----- |
|
|
17
|
+
| Node.js | 18 LTS | Bundles npm 9, which is required by the build scripts. |
|
|
18
|
+
| npm | 9.x | Installed with Node.js. |
|
|
19
|
+
| Python | 3.10 or newer | Powers the Ed25519 licensing utilities. |
|
|
20
|
+
| pip package | `cryptography` | Install with `pip install cryptography`. |
|
|
21
|
+
| Native build chain | OS specific | Xcode Command Line Tools on macOS, `build-essential` on Linux, or Windows Build Tools to compile `better-sqlite3`. The AES keyring runs entirely in user space (no native bindings). |
|
|
22
|
+
|
|
23
|
+
Clone the repository and install dependencies:
|
|
24
|
+
|
|
25
|
+
```bash
|
|
26
|
+
npm install
|
|
27
|
+
(cd renderer && npm install)
|
|
28
|
+
```
|
|
29
|
+
|
|
30
|
+
The root install triggers the renderer install via the `postinstall` hook, but
|
|
31
|
+
running both commands explicitly surfaces dependency errors sooner.
|
|
32
|
+
|
|
33
|
+
## 2. Environment configuration
|
|
34
|
+
|
|
35
|
+
1. Copy the template to create a working `.env`:
|
|
36
|
+
```bash
|
|
37
|
+
cp .env.example .env
|
|
38
|
+
```
|
|
39
|
+
2. Adjust variables as needed:
|
|
40
|
+
- `PORT` controls the Express API port (defaults to `4399`).
|
|
41
|
+
- `VITE_DEV_SERVER_URL` points the Electron shell at the renderer dev server
|
|
42
|
+
during development.
|
|
43
|
+
- `LICENSE_PRIVATE_KEY` points to the Ed25519 signing key used by
|
|
44
|
+
`backend/licenses/gen_license.py`. The default
|
|
45
|
+
`backend/licenses/license_private.pem` is resolved relative to the
|
|
46
|
+
repository root. Keep the actual private key outside of source control.
|
|
47
|
+
|
|
48
|
+
### 2.1 AES keyring management
|
|
49
|
+
|
|
50
|
+
The backend, main process, and renderer now rely on a unified keyring manager
|
|
51
|
+
that can hot-swap between the system keychain, an AES-GCM encrypted file store,
|
|
52
|
+
or an in-memory fallback. Use the REST endpoints to administer secrets without
|
|
53
|
+
restarting the app:
|
|
54
|
+
|
|
55
|
+
```bash
|
|
56
|
+
# List masked secrets for the active backend
|
|
57
|
+
curl http://127.0.0.1:${PORT:-4399}/api/keyring | jq
|
|
58
|
+
|
|
59
|
+
# Store a secret
|
|
60
|
+
curl -X POST http://127.0.0.1:${PORT:-4399}/api/keyring/RPC_URL \
|
|
61
|
+
-H 'Content-Type: application/json' \
|
|
62
|
+
-d '{"value":"https://sepolia.infura.io/v3/..."}'
|
|
63
|
+
|
|
64
|
+
# Reveal a secret (returns the decrypted payload)
|
|
65
|
+
curl http://127.0.0.1:${PORT:-4399}/api/keyring/RPC_URL | jq
|
|
66
|
+
|
|
67
|
+
# Remove a secret
|
|
68
|
+
curl -X DELETE http://127.0.0.1:${PORT:-4399}/api/keyring/RPC_URL
|
|
69
|
+
|
|
70
|
+
# Inspect the active backend and available backends
|
|
71
|
+
curl http://127.0.0.1:${PORT:-4399}/api/keyring/backend | jq
|
|
72
|
+
|
|
73
|
+
# Switch to another backend and reload configuration in place
|
|
74
|
+
curl -X POST http://127.0.0.1:${PORT:-4399}/api/keyring/backend/file
|
|
75
|
+
```
|
|
76
|
+
|
|
77
|
+
When the system keychain is unavailable (for example, inside a sandboxed CI
|
|
78
|
+
runner), the manager automatically falls back to the encrypted file store and,
|
|
79
|
+
if needed, to the in-memory backend while logging warnings so you know secrets
|
|
80
|
+
may not persist between restarts.
|
|
81
|
+
|
|
82
|
+
## 3. Running the stack locally
|
|
83
|
+
|
|
84
|
+
Use separate terminals so logs stay readable.
|
|
85
|
+
|
|
86
|
+
```bash
|
|
87
|
+
npm run dev:backend # Express API at http://localhost:4399
|
|
88
|
+
npm run dev:renderer # Vite dev server at http://localhost:5173
|
|
89
|
+
```
|
|
90
|
+
|
|
91
|
+
If you prefer to start both web stacks together, run `npm run dev`, which wraps
|
|
92
|
+
the two commands above with `concurrently`.
|
|
93
|
+
|
|
94
|
+
Launch the Electron shell after the TypeScript projects finish compiling:
|
|
95
|
+
|
|
96
|
+
```bash
|
|
97
|
+
npm run dev:electron # Builds backend/main/renderer and opens the desktop window
|
|
98
|
+
```
|
|
99
|
+
|
|
100
|
+
The Electron shell loads the renderer URL in development and the packaged
|
|
101
|
+
`dist/renderer/index.html` file after a production build.
|
|
102
|
+
|
|
103
|
+
## 4. Offline licensing workflows
|
|
104
|
+
|
|
105
|
+
GNOMAN 2.0 keeps the private key offline and validates tokens locally. The
|
|
106
|
+
preload bridge (`main/preload/licenseBridge.ts`) invokes the existing Python
|
|
107
|
+
verifier and persists successful validations under `.safevault/license.env`.
|
|
108
|
+
|
|
109
|
+
### 4.1 Generate an Ed25519 keypair (one-time)
|
|
110
|
+
|
|
111
|
+
```bash
|
|
112
|
+
python backend/licenses/make_keys.py
|
|
113
|
+
```
|
|
114
|
+
|
|
115
|
+
The command writes two files:
|
|
116
|
+
|
|
117
|
+
- `backend/licenses/license_private.pem` – keep this file offline and untracked.
|
|
118
|
+
- `backend/licenses/license_public.pem` – commit this file; it ships with the
|
|
119
|
+
application and is used by the verifier.
|
|
120
|
+
|
|
121
|
+
### 4.2 Issue a license token
|
|
122
|
+
|
|
123
|
+
Run the issuer from the repository root so relative paths resolve correctly:
|
|
124
|
+
|
|
125
|
+
```bash
|
|
126
|
+
python backend/licenses/gen_license.py \
|
|
127
|
+
--priv backend/licenses/license_private.pem \
|
|
128
|
+
--id workstation-001 \
|
|
129
|
+
--product GNOMAN \
|
|
130
|
+
--version 2.0.0 \
|
|
131
|
+
--days 365
|
|
132
|
+
```
|
|
133
|
+
|
|
134
|
+
The script prints two representations:
|
|
135
|
+
|
|
136
|
+
- **RAW TOKEN** – base64url payload and signature separated by a dot.
|
|
137
|
+
- **HUMAN-FRIENDLY** – dashed Base32 string that is easier to transcribe.
|
|
138
|
+
|
|
139
|
+
Either format can be supplied to the desktop client. Store the value somewhere
|
|
140
|
+
secure so you do not need to reissue it later.
|
|
141
|
+
|
|
142
|
+
### 4.3 Validate a token without the UI
|
|
143
|
+
|
|
144
|
+
Use the Python helper to verify a token directly from the command line. The
|
|
145
|
+
verifier returns `True` for a valid token and `False` otherwise.
|
|
146
|
+
|
|
147
|
+
```bash
|
|
148
|
+
python -c "import sys; from backend.licenses.verify_license import verify_token; print(verify_token(sys.argv[1], sys.argv[2], 'GNOMAN', '2.0.0'))" backend/licenses/license_public.pem <token>
|
|
149
|
+
```
|
|
150
|
+
|
|
151
|
+
Replace `<token>` with either the raw token or a Base32 string that decodes to
|
|
152
|
+
one. The helper resolves relative paths with respect to the repository root, so
|
|
153
|
+
invoking it from other directories works as long as you supply the correct
|
|
154
|
+
inputs.
|
|
155
|
+
|
|
156
|
+
### 4.4 Desktop activation flow
|
|
157
|
+
|
|
158
|
+
1. Launch the Electron shell (`npm run dev:electron`) and navigate to the
|
|
159
|
+
license screen if it does not appear automatically.
|
|
160
|
+
2. Enter either token representation. The preload bridge runs
|
|
161
|
+
`verify_license.py` with the checked-in public key.
|
|
162
|
+
3. When verification succeeds, the preload writes `.safevault/license.env` with:
|
|
163
|
+
```
|
|
164
|
+
LICENSE_KEY=<raw token>
|
|
165
|
+
VALIDATED_AT=<unix timestamp>
|
|
166
|
+
```
|
|
167
|
+
4. On subsequent launches the preload re-verifies the stored token. If it has
|
|
168
|
+
expired or the verification fails, the renderer prompts for a new license.
|
|
169
|
+
|
|
170
|
+
For headless automation or regression tests, the REST endpoint
|
|
171
|
+
`POST /api/license` remains available. It performs the same Ed25519 checks using
|
|
172
|
+
Node.js and persists JSON metadata under `.gnoman/license.json` for backwards
|
|
173
|
+
compatibility.
|
|
174
|
+
|
|
175
|
+
## 5. Build, lint, and packaging commands
|
|
176
|
+
|
|
177
|
+
| Command | Description |
|
|
178
|
+
| ------- | ----------- |
|
|
179
|
+
| `npm run lint` | Run ESLint across the backend, main process, renderer, and shared modules. |
|
|
180
|
+
| `npm run build:backend` | Compile the Express API to `dist/backend`. |
|
|
181
|
+
| `npm run build:main` | Compile the Electron main process to `dist/main`. |
|
|
182
|
+
| `npm run build:renderer` | Build the renderer UI into `renderer/dist`. |
|
|
183
|
+
| `npm run build` | Clean and produce all distributable artifacts (backend, main, renderer). |
|
|
184
|
+
| `npm start` | Rebuild and launch the packaged Electron shell. |
|
|
185
|
+
| `npm run start:backend` | Run the compiled backend directly from `dist/backend/index.js`. |
|
|
186
|
+
|
|
187
|
+
Distribution builds live under the `dist/` directory. The `scripts/copyRenderer.js`
|
|
188
|
+
helper copies the renderer bundle into `dist/main/` so the packaged Electron app
|
|
189
|
+
can load it from disk.
|
|
190
|
+
|
|
191
|
+
## 6. Troubleshooting checklist
|
|
192
|
+
|
|
193
|
+
| Symptom | Suggested fix |
|
|
194
|
+
| ------- | -------------- |
|
|
195
|
+
| `ModuleNotFoundError: No module named 'cryptography'` | Install the Python dependency with `pip install cryptography`. |
|
|
196
|
+
| `python3` not found when validating a license | Ensure Python 3.10+ is installed and available on your `PATH`. Update the preload bridge to point at the correct executable if you use pyenv. |
|
|
197
|
+
| `better-sqlite3` fails to compile | Install the platform build tools (Xcode CLI tools, `build-essential`, or Windows Build Tools) before running `npm install` again. |
|
|
198
|
+
| Renderer cannot reach the backend | Confirm `npm run dev:backend` is running and the port matches `renderer/src/config/api.ts`. |
|
|
199
|
+
| License verification unexpectedly fails | Delete `.safevault/license.env` and re-run activation to ensure the stored token has not been corrupted. |
|
|
200
|
+
| Electron window opens without UI in production mode | Run `npm run build:renderer` before launching `npm start` so the packaged assets exist. |
|
|
201
|
+
|
|
202
|
+
Following these conventions keeps every workstation aligned with the offline
|
|
203
|
+
licensing flow and build system that GNOMAN 2.0 expects in production.
|
|
@@ -0,0 +1,106 @@
|
|
|
1
|
+
# GNOMAN 2.0 License Development Guide
|
|
2
|
+
|
|
3
|
+
This reference walks through generating, issuing, and validating offline license
|
|
4
|
+
tokens for GNOMAN 2.0. All examples assume you run commands from the repository
|
|
5
|
+
root (the directory containing `package.json`).
|
|
6
|
+
|
|
7
|
+
> ℹ️ A mirrored copy of this document lives at
|
|
8
|
+
> `docs/wiki/license-dev-guide.md` so the in-app wiki surfaces the same
|
|
9
|
+
> instructions. Update both files whenever you make changes.
|
|
10
|
+
|
|
11
|
+
## 1. Prerequisites
|
|
12
|
+
|
|
13
|
+
- Python 3.10 or newer
|
|
14
|
+
- `pip install cryptography`
|
|
15
|
+
- Access to the environment-specific Ed25519 private key (keep it offline)
|
|
16
|
+
|
|
17
|
+
## 2. Generate a keypair
|
|
18
|
+
|
|
19
|
+
Run the helper once per environment to mint a fresh Ed25519 keypair:
|
|
20
|
+
|
|
21
|
+
```bash
|
|
22
|
+
python backend/licenses/make_keys.py
|
|
23
|
+
```
|
|
24
|
+
|
|
25
|
+
Outputs:
|
|
26
|
+
|
|
27
|
+
- `backend/licenses/license_private.pem` – keep offline, never commit.
|
|
28
|
+
- `backend/licenses/license_public.pem` – check into source control and ship
|
|
29
|
+
with the application.
|
|
30
|
+
|
|
31
|
+
## 3. Configure the CLI environment
|
|
32
|
+
|
|
33
|
+
Copy `.env.example` to `.env` and set `LICENSE_PRIVATE_KEY` to the path of the
|
|
34
|
+
private key relative to the repository root. The default value
|
|
35
|
+
`backend/licenses/license_private.pem` is resolved automatically.
|
|
36
|
+
|
|
37
|
+
## 4. Issue a license token
|
|
38
|
+
|
|
39
|
+
Run the issuer with explicit arguments so the command is copy/paste friendly:
|
|
40
|
+
|
|
41
|
+
```bash
|
|
42
|
+
python backend/licenses/gen_license.py \
|
|
43
|
+
--priv backend/licenses/license_private.pem \
|
|
44
|
+
--id customer-or-workstation \
|
|
45
|
+
--product GNOMAN \
|
|
46
|
+
--version 2.0.0 \
|
|
47
|
+
--days 365
|
|
48
|
+
```
|
|
49
|
+
|
|
50
|
+
- `--priv` overrides the default private key path.
|
|
51
|
+
- `--id` can be any identifier useful for auditing (customer, workstation, etc.).
|
|
52
|
+
- `--product` and `--version` must match what the application expects.
|
|
53
|
+
- `--days` controls the validity window.
|
|
54
|
+
|
|
55
|
+
The script prints:
|
|
56
|
+
|
|
57
|
+
- **RAW TOKEN** – base64url payload + signature separated by a dot.
|
|
58
|
+
- **HUMAN-FRIENDLY** – Base32 groups separated by dashes for manual entry.
|
|
59
|
+
|
|
60
|
+
Store the raw token securely. If you need the Base32 form later, you can derive
|
|
61
|
+
it by running the same command again or by base32-encoding the raw value with a
|
|
62
|
+
short Python snippet.
|
|
63
|
+
|
|
64
|
+
## 5. Validate a token locally
|
|
65
|
+
|
|
66
|
+
Confirm a token is still valid before distributing it:
|
|
67
|
+
|
|
68
|
+
```bash
|
|
69
|
+
python -c "import sys; from backend.licenses.verify_license import verify_token; print(verify_token(sys.argv[1], sys.argv[2], 'GNOMAN', '2.0.0'))" backend/licenses/license_public.pem <token>
|
|
70
|
+
```
|
|
71
|
+
|
|
72
|
+
Substitute `<token>` with either representation. A valid token prints `True`;
|
|
73
|
+
any failure (bad signature, wrong product/version, expired timestamp) prints
|
|
74
|
+
`False`.
|
|
75
|
+
|
|
76
|
+
## 6. Desktop activation flow
|
|
77
|
+
|
|
78
|
+
1. Launch the Electron app (`npm run dev:electron`).
|
|
79
|
+
2. Enter the raw or Base32 token on the activation screen.
|
|
80
|
+
3. The preload bridge executes `verify_license.py` with the checked-in public
|
|
81
|
+
key. Successful validation creates `.safevault/license.env` containing:
|
|
82
|
+
```
|
|
83
|
+
LICENSE_KEY=<raw token>
|
|
84
|
+
VALIDATED_AT=<unix timestamp>
|
|
85
|
+
```
|
|
86
|
+
4. On subsequent launches the preload re-verifies the stored token. Expired or
|
|
87
|
+
tampered tokens force the user back to the activation screen.
|
|
88
|
+
|
|
89
|
+
## 7. Backend compatibility endpoint
|
|
90
|
+
|
|
91
|
+
Automation can continue to call the REST endpoint `POST /api/license`. It
|
|
92
|
+
performs the same Ed25519 verification in Node.js and persists metadata to
|
|
93
|
+
`.gnoman/license.json`. The renderer no longer depends on this file, but legacy
|
|
94
|
+
integrations may still read it.
|
|
95
|
+
|
|
96
|
+
## 8. Troubleshooting
|
|
97
|
+
|
|
98
|
+
| Symptom | Resolution |
|
|
99
|
+
| --- | --- |
|
|
100
|
+
| `FileNotFoundError` for the private key | Confirm `LICENSE_PRIVATE_KEY` points at the correct path and that the key lives outside version control. |
|
|
101
|
+
| `ModuleNotFoundError: No module named 'cryptography'` | Install the dependency with `pip install cryptography`. |
|
|
102
|
+
| Token prints `False` unexpectedly | Decode the payload with `python -c "import base64,sys; payload=sys.argv[1].split('.')[0]; pad='='*((4-len(payload)%4)%4); print(base64.urlsafe_b64decode(payload+pad).decode())" <token>` to confirm the product, version, and expiry are correct. |
|
|
103
|
+
| Desktop app refuses a known-good token | Delete `.safevault/license.env` and re-run activation to ensure the cached token has not been modified. |
|
|
104
|
+
|
|
105
|
+
Following this checklist ensures every issued license aligns with the offline
|
|
106
|
+
verification logic that ships with GNOMAN 2.0.
|