@waiaas/daemon 2.0.0-rc.1
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/dist/api/error-hints.d.ts +15 -0
- package/dist/api/error-hints.d.ts.map +1 -0
- package/dist/api/error-hints.js +71 -0
- package/dist/api/error-hints.js.map +1 -0
- package/dist/api/index.d.ts +11 -0
- package/dist/api/index.d.ts.map +1 -0
- package/dist/api/index.js +14 -0
- package/dist/api/index.js.map +1 -0
- package/dist/api/middleware/address-validation.d.ts +38 -0
- package/dist/api/middleware/address-validation.d.ts.map +1 -0
- package/dist/api/middleware/address-validation.js +134 -0
- package/dist/api/middleware/address-validation.js.map +1 -0
- package/dist/api/middleware/csp.d.ts +17 -0
- package/dist/api/middleware/csp.d.ts.map +1 -0
- package/dist/api/middleware/csp.js +31 -0
- package/dist/api/middleware/csp.js.map +1 -0
- package/dist/api/middleware/error-handler.d.ts +16 -0
- package/dist/api/middleware/error-handler.d.ts.map +1 -0
- package/dist/api/middleware/error-handler.js +46 -0
- package/dist/api/middleware/error-handler.js.map +1 -0
- package/dist/api/middleware/host-guard.d.ts +11 -0
- package/dist/api/middleware/host-guard.d.ts.map +1 -0
- package/dist/api/middleware/host-guard.js +25 -0
- package/dist/api/middleware/host-guard.js.map +1 -0
- package/dist/api/middleware/index.d.ts +13 -0
- package/dist/api/middleware/index.d.ts.map +1 -0
- package/dist/api/middleware/index.js +13 -0
- package/dist/api/middleware/index.js.map +1 -0
- package/dist/api/middleware/kill-switch-guard.d.ts +19 -0
- package/dist/api/middleware/kill-switch-guard.d.ts.map +1 -0
- package/dist/api/middleware/kill-switch-guard.js +49 -0
- package/dist/api/middleware/kill-switch-guard.js.map +1 -0
- package/dist/api/middleware/master-auth.d.ts +15 -0
- package/dist/api/middleware/master-auth.d.ts.map +1 -0
- package/dist/api/middleware/master-auth.js +35 -0
- package/dist/api/middleware/master-auth.js.map +1 -0
- package/dist/api/middleware/owner-auth.d.ts +30 -0
- package/dist/api/middleware/owner-auth.d.ts.map +1 -0
- package/dist/api/middleware/owner-auth.js +133 -0
- package/dist/api/middleware/owner-auth.js.map +1 -0
- package/dist/api/middleware/request-id.d.ts +10 -0
- package/dist/api/middleware/request-id.d.ts.map +1 -0
- package/dist/api/middleware/request-id.js +18 -0
- package/dist/api/middleware/request-id.js.map +1 -0
- package/dist/api/middleware/request-logger.d.ts +9 -0
- package/dist/api/middleware/request-logger.d.ts.map +1 -0
- package/dist/api/middleware/request-logger.js +18 -0
- package/dist/api/middleware/request-logger.js.map +1 -0
- package/dist/api/middleware/session-auth.d.ts +21 -0
- package/dist/api/middleware/session-auth.d.ts.map +1 -0
- package/dist/api/middleware/session-auth.js +51 -0
- package/dist/api/middleware/session-auth.js.map +1 -0
- package/dist/api/middleware/siwe-verify.d.ts +31 -0
- package/dist/api/middleware/siwe-verify.d.ts.map +1 -0
- package/dist/api/middleware/siwe-verify.js +55 -0
- package/dist/api/middleware/siwe-verify.js.map +1 -0
- package/dist/api/routes/actions.d.ts +56 -0
- package/dist/api/routes/actions.d.ts.map +1 -0
- package/dist/api/routes/actions.js +291 -0
- package/dist/api/routes/actions.js.map +1 -0
- package/dist/api/routes/admin.d.ts +99 -0
- package/dist/api/routes/admin.d.ts.map +1 -0
- package/dist/api/routes/admin.js +1304 -0
- package/dist/api/routes/admin.js.map +1 -0
- package/dist/api/routes/display-currency-helper.d.ts +26 -0
- package/dist/api/routes/display-currency-helper.d.ts.map +1 -0
- package/dist/api/routes/display-currency-helper.js +47 -0
- package/dist/api/routes/display-currency-helper.js.map +1 -0
- package/dist/api/routes/health.d.ts +14 -0
- package/dist/api/routes/health.d.ts.map +1 -0
- package/dist/api/routes/health.js +47 -0
- package/dist/api/routes/health.js.map +1 -0
- package/dist/api/routes/index.d.ts +15 -0
- package/dist/api/routes/index.d.ts.map +1 -0
- package/dist/api/routes/index.js +15 -0
- package/dist/api/routes/index.js.map +1 -0
- package/dist/api/routes/mcp.d.ts +30 -0
- package/dist/api/routes/mcp.d.ts.map +1 -0
- package/dist/api/routes/mcp.js +156 -0
- package/dist/api/routes/mcp.js.map +1 -0
- package/dist/api/routes/nonce.d.ts +20 -0
- package/dist/api/routes/nonce.d.ts.map +1 -0
- package/dist/api/routes/nonce.js +48 -0
- package/dist/api/routes/nonce.js.map +1 -0
- package/dist/api/routes/openapi-schemas.d.ts +2281 -0
- package/dist/api/routes/openapi-schemas.d.ts.map +1 -0
- package/dist/api/routes/openapi-schemas.js +770 -0
- package/dist/api/routes/openapi-schemas.js.map +1 -0
- package/dist/api/routes/policies.d.ts +29 -0
- package/dist/api/routes/policies.d.ts.map +1 -0
- package/dist/api/routes/policies.js +332 -0
- package/dist/api/routes/policies.js.map +1 -0
- package/dist/api/routes/sessions.d.ts +35 -0
- package/dist/api/routes/sessions.d.ts.map +1 -0
- package/dist/api/routes/sessions.js +347 -0
- package/dist/api/routes/sessions.js.map +1 -0
- package/dist/api/routes/skills.d.ts +9 -0
- package/dist/api/routes/skills.d.ts.map +1 -0
- package/dist/api/routes/skills.js +59 -0
- package/dist/api/routes/skills.js.map +1 -0
- package/dist/api/routes/tokens.d.ts +25 -0
- package/dist/api/routes/tokens.d.ts.map +1 -0
- package/dist/api/routes/tokens.js +161 -0
- package/dist/api/routes/tokens.js.map +1 -0
- package/dist/api/routes/transactions.d.ts +68 -0
- package/dist/api/routes/transactions.d.ts.map +1 -0
- package/dist/api/routes/transactions.js +576 -0
- package/dist/api/routes/transactions.js.map +1 -0
- package/dist/api/routes/utils.d.ts +9 -0
- package/dist/api/routes/utils.d.ts.map +1 -0
- package/dist/api/routes/utils.js +52 -0
- package/dist/api/routes/utils.js.map +1 -0
- package/dist/api/routes/wallet.d.ts +36 -0
- package/dist/api/routes/wallet.d.ts.map +1 -0
- package/dist/api/routes/wallet.js +358 -0
- package/dist/api/routes/wallet.js.map +1 -0
- package/dist/api/routes/wallets.d.ts +43 -0
- package/dist/api/routes/wallets.d.ts.map +1 -0
- package/dist/api/routes/wallets.js +630 -0
- package/dist/api/routes/wallets.js.map +1 -0
- package/dist/api/routes/wc.d.ts +46 -0
- package/dist/api/routes/wc.d.ts.map +1 -0
- package/dist/api/routes/wc.js +354 -0
- package/dist/api/routes/wc.js.map +1 -0
- package/dist/api/routes/x402.d.ts +61 -0
- package/dist/api/routes/x402.d.ts.map +1 -0
- package/dist/api/routes/x402.js +493 -0
- package/dist/api/routes/x402.js.map +1 -0
- package/dist/api/server.d.ts +81 -0
- package/dist/api/server.d.ts.map +1 -0
- package/dist/api/server.js +406 -0
- package/dist/api/server.js.map +1 -0
- package/dist/index.d.ts +35 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +43 -0
- package/dist/index.js.map +1 -0
- package/dist/infrastructure/action/action-provider-registry.d.ts +77 -0
- package/dist/infrastructure/action/action-provider-registry.d.ts.map +1 -0
- package/dist/infrastructure/action/action-provider-registry.js +239 -0
- package/dist/infrastructure/action/action-provider-registry.js.map +1 -0
- package/dist/infrastructure/action/api-key-store.d.ts +60 -0
- package/dist/infrastructure/action/api-key-store.d.ts.map +1 -0
- package/dist/infrastructure/action/api-key-store.js +130 -0
- package/dist/infrastructure/action/api-key-store.js.map +1 -0
- package/dist/infrastructure/action/index.d.ts +10 -0
- package/dist/infrastructure/action/index.d.ts.map +1 -0
- package/dist/infrastructure/action/index.js +9 -0
- package/dist/infrastructure/action/index.js.map +1 -0
- package/dist/infrastructure/adapter-pool.d.ts +50 -0
- package/dist/infrastructure/adapter-pool.d.ts.map +1 -0
- package/dist/infrastructure/adapter-pool.js +110 -0
- package/dist/infrastructure/adapter-pool.js.map +1 -0
- package/dist/infrastructure/backup/backup-service.d.ts +53 -0
- package/dist/infrastructure/backup/backup-service.d.ts.map +1 -0
- package/dist/infrastructure/backup/backup-service.js +158 -0
- package/dist/infrastructure/backup/backup-service.js.map +1 -0
- package/dist/infrastructure/backup/index.d.ts +2 -0
- package/dist/infrastructure/backup/index.d.ts.map +1 -0
- package/dist/infrastructure/backup/index.js +2 -0
- package/dist/infrastructure/backup/index.js.map +1 -0
- package/dist/infrastructure/config/index.d.ts +8 -0
- package/dist/infrastructure/config/index.d.ts.map +1 -0
- package/dist/infrastructure/config/index.js +7 -0
- package/dist/infrastructure/config/index.js.map +1 -0
- package/dist/infrastructure/config/loader.d.ts +555 -0
- package/dist/infrastructure/config/loader.d.ts.map +1 -0
- package/dist/infrastructure/config/loader.js +311 -0
- package/dist/infrastructure/config/loader.js.map +1 -0
- package/dist/infrastructure/database/checks.d.ts +19 -0
- package/dist/infrastructure/database/checks.d.ts.map +1 -0
- package/dist/infrastructure/database/checks.js +27 -0
- package/dist/infrastructure/database/checks.js.map +1 -0
- package/dist/infrastructure/database/compatibility.d.ts +36 -0
- package/dist/infrastructure/database/compatibility.d.ts.map +1 -0
- package/dist/infrastructure/database/compatibility.js +75 -0
- package/dist/infrastructure/database/compatibility.js.map +1 -0
- package/dist/infrastructure/database/connection.d.ts +36 -0
- package/dist/infrastructure/database/connection.d.ts.map +1 -0
- package/dist/infrastructure/database/connection.js +47 -0
- package/dist/infrastructure/database/connection.js.map +1 -0
- package/dist/infrastructure/database/id.d.ts +17 -0
- package/dist/infrastructure/database/id.d.ts.map +1 -0
- package/dist/infrastructure/database/id.js +20 -0
- package/dist/infrastructure/database/id.js.map +1 -0
- package/dist/infrastructure/database/index.d.ts +15 -0
- package/dist/infrastructure/database/index.d.ts.map +1 -0
- package/dist/infrastructure/database/index.js +12 -0
- package/dist/infrastructure/database/index.js.map +1 -0
- package/dist/infrastructure/database/migrate.d.ts +76 -0
- package/dist/infrastructure/database/migrate.d.ts.map +1 -0
- package/dist/infrastructure/database/migrate.js +1214 -0
- package/dist/infrastructure/database/migrate.js.map +1 -0
- package/dist/infrastructure/database/schema.d.ts +2352 -0
- package/dist/infrastructure/database/schema.d.ts.map +1 -0
- package/dist/infrastructure/database/schema.js +288 -0
- package/dist/infrastructure/database/schema.js.map +1 -0
- package/dist/infrastructure/jwt/index.d.ts +2 -0
- package/dist/infrastructure/jwt/index.d.ts.map +1 -0
- package/dist/infrastructure/jwt/index.js +2 -0
- package/dist/infrastructure/jwt/index.js.map +1 -0
- package/dist/infrastructure/jwt/jwt-secret-manager.d.ts +58 -0
- package/dist/infrastructure/jwt/jwt-secret-manager.d.ts.map +1 -0
- package/dist/infrastructure/jwt/jwt-secret-manager.js +222 -0
- package/dist/infrastructure/jwt/jwt-secret-manager.js.map +1 -0
- package/dist/infrastructure/keystore/crypto.d.ts +62 -0
- package/dist/infrastructure/keystore/crypto.d.ts.map +1 -0
- package/dist/infrastructure/keystore/crypto.js +89 -0
- package/dist/infrastructure/keystore/crypto.js.map +1 -0
- package/dist/infrastructure/keystore/index.d.ts +4 -0
- package/dist/infrastructure/keystore/index.d.ts.map +1 -0
- package/dist/infrastructure/keystore/index.js +5 -0
- package/dist/infrastructure/keystore/index.js.map +1 -0
- package/dist/infrastructure/keystore/keystore.d.ts +115 -0
- package/dist/infrastructure/keystore/keystore.d.ts.map +1 -0
- package/dist/infrastructure/keystore/keystore.js +327 -0
- package/dist/infrastructure/keystore/keystore.js.map +1 -0
- package/dist/infrastructure/keystore/memory.d.ts +45 -0
- package/dist/infrastructure/keystore/memory.d.ts.map +1 -0
- package/dist/infrastructure/keystore/memory.js +105 -0
- package/dist/infrastructure/keystore/memory.js.map +1 -0
- package/dist/infrastructure/oracle/coingecko-forex.d.ts +35 -0
- package/dist/infrastructure/oracle/coingecko-forex.d.ts.map +1 -0
- package/dist/infrastructure/oracle/coingecko-forex.js +69 -0
- package/dist/infrastructure/oracle/coingecko-forex.js.map +1 -0
- package/dist/infrastructure/oracle/coingecko-oracle.d.ts +73 -0
- package/dist/infrastructure/oracle/coingecko-oracle.d.ts.map +1 -0
- package/dist/infrastructure/oracle/coingecko-oracle.js +199 -0
- package/dist/infrastructure/oracle/coingecko-oracle.js.map +1 -0
- package/dist/infrastructure/oracle/coingecko-platform-ids.d.ts +32 -0
- package/dist/infrastructure/oracle/coingecko-platform-ids.d.ts.map +1 -0
- package/dist/infrastructure/oracle/coingecko-platform-ids.js +30 -0
- package/dist/infrastructure/oracle/coingecko-platform-ids.js.map +1 -0
- package/dist/infrastructure/oracle/forex-currencies.d.ts +36 -0
- package/dist/infrastructure/oracle/forex-currencies.d.ts.map +1 -0
- package/dist/infrastructure/oracle/forex-currencies.js +71 -0
- package/dist/infrastructure/oracle/forex-currencies.js.map +1 -0
- package/dist/infrastructure/oracle/forex-rate-service.d.ts +51 -0
- package/dist/infrastructure/oracle/forex-rate-service.d.ts.map +1 -0
- package/dist/infrastructure/oracle/forex-rate-service.js +149 -0
- package/dist/infrastructure/oracle/forex-rate-service.js.map +1 -0
- package/dist/infrastructure/oracle/index.d.ts +18 -0
- package/dist/infrastructure/oracle/index.d.ts.map +1 -0
- package/dist/infrastructure/oracle/index.js +19 -0
- package/dist/infrastructure/oracle/index.js.map +1 -0
- package/dist/infrastructure/oracle/oracle-chain.d.ts +101 -0
- package/dist/infrastructure/oracle/oracle-chain.d.ts.map +1 -0
- package/dist/infrastructure/oracle/oracle-chain.js +163 -0
- package/dist/infrastructure/oracle/oracle-chain.js.map +1 -0
- package/dist/infrastructure/oracle/oracle-errors.d.ts +42 -0
- package/dist/infrastructure/oracle/oracle-errors.d.ts.map +1 -0
- package/dist/infrastructure/oracle/oracle-errors.js +53 -0
- package/dist/infrastructure/oracle/oracle-errors.js.map +1 -0
- package/dist/infrastructure/oracle/price-age.d.ts +38 -0
- package/dist/infrastructure/oracle/price-age.d.ts.map +1 -0
- package/dist/infrastructure/oracle/price-age.js +44 -0
- package/dist/infrastructure/oracle/price-age.js.map +1 -0
- package/dist/infrastructure/oracle/price-cache.d.ts +99 -0
- package/dist/infrastructure/oracle/price-cache.d.ts.map +1 -0
- package/dist/infrastructure/oracle/price-cache.js +173 -0
- package/dist/infrastructure/oracle/price-cache.js.map +1 -0
- package/dist/infrastructure/oracle/pyth-feed-ids.d.ts +31 -0
- package/dist/infrastructure/oracle/pyth-feed-ids.d.ts.map +1 -0
- package/dist/infrastructure/oracle/pyth-feed-ids.js +44 -0
- package/dist/infrastructure/oracle/pyth-feed-ids.js.map +1 -0
- package/dist/infrastructure/oracle/pyth-oracle.d.ts +69 -0
- package/dist/infrastructure/oracle/pyth-oracle.d.ts.map +1 -0
- package/dist/infrastructure/oracle/pyth-oracle.js +149 -0
- package/dist/infrastructure/oracle/pyth-oracle.js.map +1 -0
- package/dist/infrastructure/settings/hot-reload.d.ts +71 -0
- package/dist/infrastructure/settings/hot-reload.d.ts.map +1 -0
- package/dist/infrastructure/settings/hot-reload.js +315 -0
- package/dist/infrastructure/settings/hot-reload.js.map +1 -0
- package/dist/infrastructure/settings/index.d.ts +13 -0
- package/dist/infrastructure/settings/index.d.ts.map +1 -0
- package/dist/infrastructure/settings/index.js +10 -0
- package/dist/infrastructure/settings/index.js.map +1 -0
- package/dist/infrastructure/settings/setting-keys.d.ts +28 -0
- package/dist/infrastructure/settings/setting-keys.d.ts.map +1 -0
- package/dist/infrastructure/settings/setting-keys.js +105 -0
- package/dist/infrastructure/settings/setting-keys.js.map +1 -0
- package/dist/infrastructure/settings/settings-crypto.d.ts +39 -0
- package/dist/infrastructure/settings/settings-crypto.d.ts.map +1 -0
- package/dist/infrastructure/settings/settings-crypto.js +73 -0
- package/dist/infrastructure/settings/settings-crypto.js.map +1 -0
- package/dist/infrastructure/settings/settings-service.d.ts +82 -0
- package/dist/infrastructure/settings/settings-service.d.ts.map +1 -0
- package/dist/infrastructure/settings/settings-service.js +267 -0
- package/dist/infrastructure/settings/settings-service.js.map +1 -0
- package/dist/infrastructure/telegram/index.d.ts +6 -0
- package/dist/infrastructure/telegram/index.d.ts.map +1 -0
- package/dist/infrastructure/telegram/index.js +5 -0
- package/dist/infrastructure/telegram/index.js.map +1 -0
- package/dist/infrastructure/telegram/telegram-api.d.ts +35 -0
- package/dist/infrastructure/telegram/telegram-api.d.ts.map +1 -0
- package/dist/infrastructure/telegram/telegram-api.js +82 -0
- package/dist/infrastructure/telegram/telegram-api.js.map +1 -0
- package/dist/infrastructure/telegram/telegram-auth.d.ts +57 -0
- package/dist/infrastructure/telegram/telegram-auth.d.ts.map +1 -0
- package/dist/infrastructure/telegram/telegram-auth.js +88 -0
- package/dist/infrastructure/telegram/telegram-auth.js.map +1 -0
- package/dist/infrastructure/telegram/telegram-bot-service.d.ts +95 -0
- package/dist/infrastructure/telegram/telegram-bot-service.d.ts.map +1 -0
- package/dist/infrastructure/telegram/telegram-bot-service.js +564 -0
- package/dist/infrastructure/telegram/telegram-bot-service.js.map +1 -0
- package/dist/infrastructure/telegram/telegram-keyboard.d.ts +27 -0
- package/dist/infrastructure/telegram/telegram-keyboard.d.ts.map +1 -0
- package/dist/infrastructure/telegram/telegram-keyboard.js +52 -0
- package/dist/infrastructure/telegram/telegram-keyboard.js.map +1 -0
- package/dist/infrastructure/telegram/telegram-types.d.ts +43 -0
- package/dist/infrastructure/telegram/telegram-types.d.ts.map +1 -0
- package/dist/infrastructure/telegram/telegram-types.js +8 -0
- package/dist/infrastructure/telegram/telegram-types.js.map +1 -0
- package/dist/infrastructure/token-registry/builtin-tokens.d.ts +39 -0
- package/dist/infrastructure/token-registry/builtin-tokens.d.ts.map +1 -0
- package/dist/infrastructure/token-registry/builtin-tokens.js +135 -0
- package/dist/infrastructure/token-registry/builtin-tokens.js.map +1 -0
- package/dist/infrastructure/token-registry/index.d.ts +8 -0
- package/dist/infrastructure/token-registry/index.d.ts.map +1 -0
- package/dist/infrastructure/token-registry/index.js +8 -0
- package/dist/infrastructure/token-registry/index.js.map +1 -0
- package/dist/infrastructure/token-registry/token-registry-service.d.ts +49 -0
- package/dist/infrastructure/token-registry/token-registry-service.d.ts.map +1 -0
- package/dist/infrastructure/token-registry/token-registry-service.js +93 -0
- package/dist/infrastructure/token-registry/token-registry-service.js.map +1 -0
- package/dist/infrastructure/version/index.d.ts +5 -0
- package/dist/infrastructure/version/index.d.ts.map +1 -0
- package/dist/infrastructure/version/index.js +5 -0
- package/dist/infrastructure/version/index.js.map +1 -0
- package/dist/infrastructure/version/version-check-service.d.ts +35 -0
- package/dist/infrastructure/version/version-check-service.d.ts.map +1 -0
- package/dist/infrastructure/version/version-check-service.js +92 -0
- package/dist/infrastructure/version/version-check-service.js.map +1 -0
- package/dist/lifecycle/daemon.d.ts +103 -0
- package/dist/lifecycle/daemon.d.ts.map +1 -0
- package/dist/lifecycle/daemon.js +934 -0
- package/dist/lifecycle/daemon.js.map +1 -0
- package/dist/lifecycle/index.d.ts +9 -0
- package/dist/lifecycle/index.d.ts.map +1 -0
- package/dist/lifecycle/index.js +9 -0
- package/dist/lifecycle/index.js.map +1 -0
- package/dist/lifecycle/signal-handler.d.ts +18 -0
- package/dist/lifecycle/signal-handler.d.ts.map +1 -0
- package/dist/lifecycle/signal-handler.js +37 -0
- package/dist/lifecycle/signal-handler.js.map +1 -0
- package/dist/lifecycle/workers.d.ts +46 -0
- package/dist/lifecycle/workers.d.ts.map +1 -0
- package/dist/lifecycle/workers.js +101 -0
- package/dist/lifecycle/workers.js.map +1 -0
- package/dist/notifications/channels/discord.d.ts +10 -0
- package/dist/notifications/channels/discord.d.ts.map +1 -0
- package/dist/notifications/channels/discord.js +54 -0
- package/dist/notifications/channels/discord.js.map +1 -0
- package/dist/notifications/channels/ntfy.d.ts +13 -0
- package/dist/notifications/channels/ntfy.d.ts.map +1 -0
- package/dist/notifications/channels/ntfy.js +58 -0
- package/dist/notifications/channels/ntfy.js.map +1 -0
- package/dist/notifications/channels/slack.d.ts +10 -0
- package/dist/notifications/channels/slack.d.ts.map +1 -0
- package/dist/notifications/channels/slack.js +55 -0
- package/dist/notifications/channels/slack.js.map +1 -0
- package/dist/notifications/channels/telegram.d.ts +10 -0
- package/dist/notifications/channels/telegram.d.ts.map +1 -0
- package/dist/notifications/channels/telegram.js +40 -0
- package/dist/notifications/channels/telegram.js.map +1 -0
- package/dist/notifications/index.d.ts +9 -0
- package/dist/notifications/index.d.ts.map +1 -0
- package/dist/notifications/index.js +7 -0
- package/dist/notifications/index.js.map +1 -0
- package/dist/notifications/notification-service.d.ts +75 -0
- package/dist/notifications/notification-service.d.ts.map +1 -0
- package/dist/notifications/notification-service.js +213 -0
- package/dist/notifications/notification-service.js.map +1 -0
- package/dist/notifications/templates/message-templates.d.ts +12 -0
- package/dist/notifications/templates/message-templates.d.ts.map +1 -0
- package/dist/notifications/templates/message-templates.js +22 -0
- package/dist/notifications/templates/message-templates.js.map +1 -0
- package/dist/pipeline/database-policy-engine.d.ts +286 -0
- package/dist/pipeline/database-policy-engine.d.ts.map +1 -0
- package/dist/pipeline/database-policy-engine.js +992 -0
- package/dist/pipeline/database-policy-engine.js.map +1 -0
- package/dist/pipeline/default-policy-engine.d.ts +26 -0
- package/dist/pipeline/default-policy-engine.d.ts.map +1 -0
- package/dist/pipeline/default-policy-engine.js +25 -0
- package/dist/pipeline/default-policy-engine.js.map +1 -0
- package/dist/pipeline/index.d.ts +9 -0
- package/dist/pipeline/index.d.ts.map +1 -0
- package/dist/pipeline/index.js +9 -0
- package/dist/pipeline/index.js.map +1 -0
- package/dist/pipeline/network-resolver.d.ts +22 -0
- package/dist/pipeline/network-resolver.d.ts.map +1 -0
- package/dist/pipeline/network-resolver.js +32 -0
- package/dist/pipeline/network-resolver.js.map +1 -0
- package/dist/pipeline/pipeline.d.ts +72 -0
- package/dist/pipeline/pipeline.d.ts.map +1 -0
- package/dist/pipeline/pipeline.js +87 -0
- package/dist/pipeline/pipeline.js.map +1 -0
- package/dist/pipeline/resolve-effective-amount-usd.d.ts +41 -0
- package/dist/pipeline/resolve-effective-amount-usd.d.ts.map +1 -0
- package/dist/pipeline/resolve-effective-amount-usd.js +208 -0
- package/dist/pipeline/resolve-effective-amount-usd.js.map +1 -0
- package/dist/pipeline/sign-only.d.ts +99 -0
- package/dist/pipeline/sign-only.d.ts.map +1 -0
- package/dist/pipeline/sign-only.js +267 -0
- package/dist/pipeline/sign-only.js.map +1 -0
- package/dist/pipeline/sleep.d.ts +6 -0
- package/dist/pipeline/sleep.d.ts.map +1 -0
- package/dist/pipeline/sleep.js +8 -0
- package/dist/pipeline/sleep.js.map +1 -0
- package/dist/pipeline/stages.d.ts +82 -0
- package/dist/pipeline/stages.d.ts.map +1 -0
- package/dist/pipeline/stages.js +784 -0
- package/dist/pipeline/stages.js.map +1 -0
- package/dist/services/autostop-rules.d.ts +79 -0
- package/dist/services/autostop-rules.d.ts.map +1 -0
- package/dist/services/autostop-rules.js +174 -0
- package/dist/services/autostop-rules.js.map +1 -0
- package/dist/services/autostop-service.d.ts +82 -0
- package/dist/services/autostop-service.d.ts.map +1 -0
- package/dist/services/autostop-service.js +223 -0
- package/dist/services/autostop-service.js.map +1 -0
- package/dist/services/kill-switch-service.d.ts +118 -0
- package/dist/services/kill-switch-service.d.ts.map +1 -0
- package/dist/services/kill-switch-service.js +291 -0
- package/dist/services/kill-switch-service.js.map +1 -0
- package/dist/services/monitoring/balance-monitor-service.d.ts +65 -0
- package/dist/services/monitoring/balance-monitor-service.d.ts.map +1 -0
- package/dist/services/monitoring/balance-monitor-service.js +207 -0
- package/dist/services/monitoring/balance-monitor-service.js.map +1 -0
- package/dist/services/wc-session-service.d.ts +123 -0
- package/dist/services/wc-session-service.d.ts.map +1 -0
- package/dist/services/wc-session-service.js +363 -0
- package/dist/services/wc-session-service.js.map +1 -0
- package/dist/services/wc-signing-bridge.d.ts +60 -0
- package/dist/services/wc-signing-bridge.d.ts.map +1 -0
- package/dist/services/wc-signing-bridge.js +334 -0
- package/dist/services/wc-signing-bridge.js.map +1 -0
- package/dist/services/wc-storage.d.ts +32 -0
- package/dist/services/wc-storage.d.ts.map +1 -0
- package/dist/services/wc-storage.js +64 -0
- package/dist/services/wc-storage.js.map +1 -0
- package/dist/services/x402/payment-signer.d.ts +88 -0
- package/dist/services/x402/payment-signer.d.ts.map +1 -0
- package/dist/services/x402/payment-signer.js +311 -0
- package/dist/services/x402/payment-signer.js.map +1 -0
- package/dist/services/x402/ssrf-guard.d.ts +27 -0
- package/dist/services/x402/ssrf-guard.d.ts.map +1 -0
- package/dist/services/x402/ssrf-guard.js +236 -0
- package/dist/services/x402/ssrf-guard.js.map +1 -0
- package/dist/services/x402/x402-domain-policy.d.ts +50 -0
- package/dist/services/x402/x402-domain-policy.d.ts.map +1 -0
- package/dist/services/x402/x402-domain-policy.js +78 -0
- package/dist/services/x402/x402-domain-policy.js.map +1 -0
- package/dist/services/x402/x402-handler.d.ts +71 -0
- package/dist/services/x402/x402-handler.d.ts.map +1 -0
- package/dist/services/x402/x402-handler.js +195 -0
- package/dist/services/x402/x402-handler.js.map +1 -0
- package/dist/services/x402/x402-usd-resolver.d.ts +26 -0
- package/dist/services/x402/x402-usd-resolver.d.ts.map +1 -0
- package/dist/services/x402/x402-usd-resolver.js +79 -0
- package/dist/services/x402/x402-usd-resolver.js.map +1 -0
- package/dist/workflow/approval-workflow.d.ts +103 -0
- package/dist/workflow/approval-workflow.d.ts.map +1 -0
- package/dist/workflow/approval-workflow.js +202 -0
- package/dist/workflow/approval-workflow.js.map +1 -0
- package/dist/workflow/delay-queue.d.ts +78 -0
- package/dist/workflow/delay-queue.d.ts.map +1 -0
- package/dist/workflow/delay-queue.js +174 -0
- package/dist/workflow/delay-queue.js.map +1 -0
- package/dist/workflow/index.d.ts +11 -0
- package/dist/workflow/index.d.ts.map +1 -0
- package/dist/workflow/index.js +9 -0
- package/dist/workflow/index.js.map +1 -0
- package/dist/workflow/owner-state.d.ts +97 -0
- package/dist/workflow/owner-state.d.ts.map +1 -0
- package/dist/workflow/owner-state.js +168 -0
- package/dist/workflow/owner-state.js.map +1 -0
- package/package.json +71 -0
- package/public/admin/assets/index-BPoUSH8W.css +1 -0
- package/public/admin/assets/index-CDi1qoXB.js +1 -0
- package/public/admin/index.html +13 -0
|
@@ -0,0 +1,291 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Action routes: POST /v1/actions/:provider/:action, GET /v1/actions/providers.
|
|
3
|
+
*
|
|
4
|
+
* POST /v1/actions/:provider/:action:
|
|
5
|
+
* - Requires sessionAuth (applied at server level in createApp())
|
|
6
|
+
* - Resolves action parameters via ActionProviderRegistry.executeResolve()
|
|
7
|
+
* - Injects the resulting ContractCallRequest into the existing 6-stage pipeline
|
|
8
|
+
* - Returns 201 with txId (same pattern as POST /v1/transactions/send)
|
|
9
|
+
*
|
|
10
|
+
* GET /v1/actions/providers:
|
|
11
|
+
* - Requires sessionAuth
|
|
12
|
+
* - Lists registered action providers with their actions and API key status
|
|
13
|
+
*
|
|
14
|
+
* @see docs/62-action-provider-architecture.md
|
|
15
|
+
*/
|
|
16
|
+
import { OpenAPIHono, createRoute, z } from '@hono/zod-openapi';
|
|
17
|
+
import { eq } from 'drizzle-orm';
|
|
18
|
+
import { WAIaaSError } from '@waiaas/core';
|
|
19
|
+
import { resolveRpcUrl } from '../../infrastructure/adapter-pool.js';
|
|
20
|
+
import { wallets, transactions } from '../../infrastructure/database/schema.js';
|
|
21
|
+
import { stage1Validate, stage2Auth, stage3Policy, stage4Wait, stage5Execute, stage6Confirm, } from '../../pipeline/stages.js';
|
|
22
|
+
import { resolveNetwork } from '../../pipeline/network-resolver.js';
|
|
23
|
+
import { TxSendResponseSchema, buildErrorResponses, openApiValidationHook, } from './openapi-schemas.js';
|
|
24
|
+
// ---------------------------------------------------------------------------
|
|
25
|
+
// OpenAPI Response Schemas
|
|
26
|
+
// ---------------------------------------------------------------------------
|
|
27
|
+
const ActionDefinitionResponseSchema = z.object({
|
|
28
|
+
name: z.string(),
|
|
29
|
+
description: z.string(),
|
|
30
|
+
chain: z.string(),
|
|
31
|
+
riskLevel: z.string(),
|
|
32
|
+
defaultTier: z.string(),
|
|
33
|
+
});
|
|
34
|
+
const ProviderResponseSchema = z.object({
|
|
35
|
+
name: z.string(),
|
|
36
|
+
description: z.string(),
|
|
37
|
+
version: z.string(),
|
|
38
|
+
chains: z.array(z.string()),
|
|
39
|
+
mcpExpose: z.boolean(),
|
|
40
|
+
requiresApiKey: z.boolean(),
|
|
41
|
+
hasApiKey: z.boolean(),
|
|
42
|
+
actions: z.array(ActionDefinitionResponseSchema),
|
|
43
|
+
});
|
|
44
|
+
const ProvidersListResponseSchema = z
|
|
45
|
+
.object({
|
|
46
|
+
providers: z.array(ProviderResponseSchema),
|
|
47
|
+
})
|
|
48
|
+
.openapi('ProvidersListResponse');
|
|
49
|
+
const ActionExecuteRequestSchema = z
|
|
50
|
+
.object({
|
|
51
|
+
params: z.record(z.unknown()).optional().default({}),
|
|
52
|
+
network: z.string().optional(),
|
|
53
|
+
})
|
|
54
|
+
.openapi('ActionExecuteRequest');
|
|
55
|
+
// ---------------------------------------------------------------------------
|
|
56
|
+
// Route definitions
|
|
57
|
+
// ---------------------------------------------------------------------------
|
|
58
|
+
const listProvidersRoute = createRoute({
|
|
59
|
+
method: 'get',
|
|
60
|
+
path: '/actions/providers',
|
|
61
|
+
tags: ['Actions'],
|
|
62
|
+
summary: 'List registered action providers',
|
|
63
|
+
responses: {
|
|
64
|
+
200: {
|
|
65
|
+
description: 'Registered action providers with their actions',
|
|
66
|
+
content: { 'application/json': { schema: ProvidersListResponseSchema } },
|
|
67
|
+
},
|
|
68
|
+
},
|
|
69
|
+
});
|
|
70
|
+
const executeActionRoute = createRoute({
|
|
71
|
+
method: 'post',
|
|
72
|
+
path: '/actions/{provider}/{action}',
|
|
73
|
+
tags: ['Actions'],
|
|
74
|
+
summary: 'Execute an action via provider',
|
|
75
|
+
description: 'Resolve action parameters into a ContractCallRequest and execute through the 6-stage pipeline.',
|
|
76
|
+
request: {
|
|
77
|
+
params: z.object({
|
|
78
|
+
provider: z.string(),
|
|
79
|
+
action: z.string(),
|
|
80
|
+
}),
|
|
81
|
+
body: {
|
|
82
|
+
content: {
|
|
83
|
+
'application/json': { schema: ActionExecuteRequestSchema },
|
|
84
|
+
},
|
|
85
|
+
},
|
|
86
|
+
},
|
|
87
|
+
responses: {
|
|
88
|
+
201: {
|
|
89
|
+
description: 'Action submitted to pipeline',
|
|
90
|
+
content: { 'application/json': { schema: TxSendResponseSchema } },
|
|
91
|
+
},
|
|
92
|
+
...buildErrorResponses([
|
|
93
|
+
'ACTION_NOT_FOUND',
|
|
94
|
+
'API_KEY_REQUIRED',
|
|
95
|
+
'ACTION_VALIDATION_FAILED',
|
|
96
|
+
'ACTION_RESOLVE_FAILED',
|
|
97
|
+
'ACTION_RETURN_INVALID',
|
|
98
|
+
'WALLET_NOT_FOUND',
|
|
99
|
+
]),
|
|
100
|
+
},
|
|
101
|
+
});
|
|
102
|
+
// ---------------------------------------------------------------------------
|
|
103
|
+
// Route factory
|
|
104
|
+
// ---------------------------------------------------------------------------
|
|
105
|
+
/**
|
|
106
|
+
* Create action route sub-router.
|
|
107
|
+
*
|
|
108
|
+
* GET /actions/providers -> list registered providers + actions
|
|
109
|
+
* POST /actions/:provider/:action -> resolve + pipeline execution
|
|
110
|
+
*/
|
|
111
|
+
export function actionRoutes(deps) {
|
|
112
|
+
const router = new OpenAPIHono({ defaultHook: openApiValidationHook });
|
|
113
|
+
// -------------------------------------------------------------------------
|
|
114
|
+
// GET /actions/providers
|
|
115
|
+
// -------------------------------------------------------------------------
|
|
116
|
+
router.openapi(listProvidersRoute, async (c) => {
|
|
117
|
+
const providerMetadataList = deps.registry.listProviders();
|
|
118
|
+
const providers = providerMetadataList.map((meta) => {
|
|
119
|
+
const providerActions = deps.registry.listActions(meta.name);
|
|
120
|
+
return {
|
|
121
|
+
name: meta.name,
|
|
122
|
+
description: meta.description,
|
|
123
|
+
version: meta.version,
|
|
124
|
+
chains: meta.chains,
|
|
125
|
+
mcpExpose: meta.mcpExpose,
|
|
126
|
+
requiresApiKey: meta.requiresApiKey,
|
|
127
|
+
hasApiKey: deps.apiKeyStore.has(meta.name),
|
|
128
|
+
actions: providerActions.map((a) => ({
|
|
129
|
+
name: a.action.name,
|
|
130
|
+
description: a.action.description,
|
|
131
|
+
chain: a.action.chain,
|
|
132
|
+
riskLevel: a.action.riskLevel,
|
|
133
|
+
defaultTier: a.action.defaultTier,
|
|
134
|
+
})),
|
|
135
|
+
};
|
|
136
|
+
});
|
|
137
|
+
return c.json({ providers }, 200);
|
|
138
|
+
});
|
|
139
|
+
// -------------------------------------------------------------------------
|
|
140
|
+
// POST /actions/:provider/:action
|
|
141
|
+
// -------------------------------------------------------------------------
|
|
142
|
+
router.openapi(executeActionRoute, async (c) => {
|
|
143
|
+
const { provider, action } = c.req.valid('param');
|
|
144
|
+
const body = c.req.valid('json');
|
|
145
|
+
const actionKey = `${provider}/${action}`;
|
|
146
|
+
// 1. Look up action entry
|
|
147
|
+
const entry = deps.registry.getAction(actionKey);
|
|
148
|
+
if (!entry) {
|
|
149
|
+
throw new WAIaaSError('ACTION_NOT_FOUND', {
|
|
150
|
+
message: `Action '${actionKey}' not found`,
|
|
151
|
+
details: { provider, action },
|
|
152
|
+
});
|
|
153
|
+
}
|
|
154
|
+
// 2. Check API key requirement
|
|
155
|
+
if (entry.provider.metadata.requiresApiKey) {
|
|
156
|
+
if (!deps.apiKeyStore.has(entry.provider.metadata.name)) {
|
|
157
|
+
throw new WAIaaSError('API_KEY_REQUIRED', {
|
|
158
|
+
message: `Admin > Settings에서 ${entry.provider.metadata.name} API 키를 설정하세요`,
|
|
159
|
+
details: { provider: entry.provider.metadata.name },
|
|
160
|
+
});
|
|
161
|
+
}
|
|
162
|
+
}
|
|
163
|
+
// 3. Extract session context (set by sessionAuth middleware)
|
|
164
|
+
const walletId = c.get('walletId');
|
|
165
|
+
const sessionId = c.get('sessionId');
|
|
166
|
+
// 4. Look up wallet
|
|
167
|
+
const wallet = await deps.db.select().from(wallets).where(eq(wallets.id, walletId)).get();
|
|
168
|
+
if (!wallet) {
|
|
169
|
+
throw new WAIaaSError('WALLET_NOT_FOUND', {
|
|
170
|
+
message: `Wallet '${walletId}' not found`,
|
|
171
|
+
});
|
|
172
|
+
}
|
|
173
|
+
if (wallet.status === 'TERMINATED') {
|
|
174
|
+
throw new WAIaaSError('WALLET_TERMINATED');
|
|
175
|
+
}
|
|
176
|
+
// 5. Build ActionContext
|
|
177
|
+
const actionContext = {
|
|
178
|
+
walletAddress: wallet.publicKey,
|
|
179
|
+
chain: wallet.chain,
|
|
180
|
+
walletId,
|
|
181
|
+
sessionId,
|
|
182
|
+
};
|
|
183
|
+
// 6. Execute resolve via registry (validates input + return value)
|
|
184
|
+
let contractCall;
|
|
185
|
+
try {
|
|
186
|
+
contractCall = await deps.registry.executeResolve(actionKey, body.params ?? {}, actionContext);
|
|
187
|
+
}
|
|
188
|
+
catch (err) {
|
|
189
|
+
// Re-throw WAIaaSError as-is (ACTION_VALIDATION_FAILED, ACTION_RETURN_INVALID, etc.)
|
|
190
|
+
if (err instanceof WAIaaSError)
|
|
191
|
+
throw err;
|
|
192
|
+
// Wrap unexpected errors as ACTION_RESOLVE_FAILED
|
|
193
|
+
throw new WAIaaSError('ACTION_RESOLVE_FAILED', {
|
|
194
|
+
message: `Action resolve failed: ${err instanceof Error ? err.message : 'Unknown error'}`,
|
|
195
|
+
details: { actionKey },
|
|
196
|
+
cause: err instanceof Error ? err : undefined,
|
|
197
|
+
});
|
|
198
|
+
}
|
|
199
|
+
// 7. Resolve network: body.network > wallet.defaultNetwork > environment default
|
|
200
|
+
let resolvedNetwork;
|
|
201
|
+
try {
|
|
202
|
+
resolvedNetwork = resolveNetwork(body.network, wallet.defaultNetwork, wallet.environment, wallet.chain);
|
|
203
|
+
}
|
|
204
|
+
catch (err) {
|
|
205
|
+
if (err instanceof Error && err.message.includes('environment')) {
|
|
206
|
+
throw new WAIaaSError('ENVIRONMENT_NETWORK_MISMATCH', {
|
|
207
|
+
message: err.message,
|
|
208
|
+
});
|
|
209
|
+
}
|
|
210
|
+
throw new WAIaaSError('ACTION_VALIDATION_FAILED', {
|
|
211
|
+
message: err instanceof Error ? err.message : 'Network validation failed',
|
|
212
|
+
});
|
|
213
|
+
}
|
|
214
|
+
// 8. Resolve adapter from pool
|
|
215
|
+
const rpcUrl = resolveRpcUrl(deps.config.rpc, wallet.chain, resolvedNetwork);
|
|
216
|
+
const adapter = await deps.adapterPool.resolve(wallet.chain, resolvedNetwork, rpcUrl);
|
|
217
|
+
// 9. Build pipeline context (inject ContractCallRequest as the request)
|
|
218
|
+
const ctx = {
|
|
219
|
+
db: deps.db,
|
|
220
|
+
adapter,
|
|
221
|
+
keyStore: deps.keyStore,
|
|
222
|
+
policyEngine: deps.policyEngine,
|
|
223
|
+
masterPassword: deps.masterPassword,
|
|
224
|
+
walletId,
|
|
225
|
+
wallet: {
|
|
226
|
+
publicKey: wallet.publicKey,
|
|
227
|
+
chain: wallet.chain,
|
|
228
|
+
environment: wallet.environment,
|
|
229
|
+
defaultNetwork: wallet.defaultNetwork ?? null,
|
|
230
|
+
},
|
|
231
|
+
resolvedNetwork,
|
|
232
|
+
request: contractCall, // ContractCallRequest with type: 'CONTRACT_CALL'
|
|
233
|
+
txId: '', // stage1Validate will assign
|
|
234
|
+
sessionId,
|
|
235
|
+
sqlite: deps.sqlite,
|
|
236
|
+
delayQueue: deps.delayQueue,
|
|
237
|
+
approvalWorkflow: deps.approvalWorkflow,
|
|
238
|
+
config: {
|
|
239
|
+
policy_defaults_delay_seconds: deps.config.security.policy_defaults_delay_seconds,
|
|
240
|
+
policy_defaults_approval_timeout: deps.config.security.policy_defaults_approval_timeout,
|
|
241
|
+
},
|
|
242
|
+
notificationService: deps.notificationService,
|
|
243
|
+
priceOracle: deps.priceOracle,
|
|
244
|
+
settingsService: deps.settingsService,
|
|
245
|
+
};
|
|
246
|
+
// 10. Stage 1: Validate + DB INSERT (synchronous -- assigns ctx.txId)
|
|
247
|
+
await stage1Validate(ctx);
|
|
248
|
+
// Return 201 immediately with txId
|
|
249
|
+
const response = c.json({
|
|
250
|
+
id: ctx.txId,
|
|
251
|
+
status: 'PENDING',
|
|
252
|
+
}, 201);
|
|
253
|
+
// 11. Stages 2-6 run asynchronously (fire-and-forget)
|
|
254
|
+
void (async () => {
|
|
255
|
+
try {
|
|
256
|
+
await stage2Auth(ctx);
|
|
257
|
+
await stage3Policy(ctx);
|
|
258
|
+
await stage4Wait(ctx);
|
|
259
|
+
await stage5Execute(ctx);
|
|
260
|
+
await stage6Confirm(ctx);
|
|
261
|
+
}
|
|
262
|
+
catch (error) {
|
|
263
|
+
// PIPELINE_HALTED is intentional -- transaction is QUEUED
|
|
264
|
+
if (error instanceof WAIaaSError && error.code === 'PIPELINE_HALTED') {
|
|
265
|
+
return;
|
|
266
|
+
}
|
|
267
|
+
// If stages 2-6 fail, mark as FAILED
|
|
268
|
+
try {
|
|
269
|
+
const tx = await deps.db
|
|
270
|
+
.select()
|
|
271
|
+
.from(transactions)
|
|
272
|
+
.where(eq(transactions.id, ctx.txId))
|
|
273
|
+
.get();
|
|
274
|
+
if (tx && tx.status !== 'CONFIRMED' && tx.status !== 'FAILED' && tx.status !== 'CANCELLED') {
|
|
275
|
+
const errorMessage = error instanceof Error ? error.message : 'Pipeline execution failed';
|
|
276
|
+
await deps.db
|
|
277
|
+
.update(transactions)
|
|
278
|
+
.set({ status: 'FAILED', error: errorMessage })
|
|
279
|
+
.where(eq(transactions.id, ctx.txId));
|
|
280
|
+
}
|
|
281
|
+
}
|
|
282
|
+
catch {
|
|
283
|
+
// Swallow DB update errors in background
|
|
284
|
+
}
|
|
285
|
+
}
|
|
286
|
+
})();
|
|
287
|
+
return response;
|
|
288
|
+
});
|
|
289
|
+
return router;
|
|
290
|
+
}
|
|
291
|
+
//# sourceMappingURL=actions.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"actions.js","sourceRoot":"","sources":["../../../src/api/routes/actions.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,EAAE,WAAW,EAAE,WAAW,EAAE,CAAC,EAAE,MAAM,mBAAmB,CAAC;AAChE,OAAO,EAAE,EAAE,EAAE,MAAM,aAAa,CAAC;AACjC,OAAO,EAAE,WAAW,EAAE,MAAM,cAAc,CAAC;AAO3C,OAAO,EAAE,aAAa,EAAE,MAAM,sCAAsC,CAAC;AAIrE,OAAO,EAAE,OAAO,EAAE,YAAY,EA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 daemon administration endpoints.
|
|
3
|
+
*
|
|
4
|
+
* GET /admin/status - Daemon health/uptime/version (masterAuth)
|
|
5
|
+
* POST /admin/kill-switch - Activate kill switch (masterAuth)
|
|
6
|
+
* GET /admin/kill-switch - Get kill switch state (public)
|
|
7
|
+
* POST /admin/recover - Deactivate kill switch (masterAuth)
|
|
8
|
+
* POST /admin/shutdown - Graceful daemon shutdown (masterAuth)
|
|
9
|
+
* POST /admin/rotate-secret - Rotate JWT secret (masterAuth)
|
|
10
|
+
* GET /admin/notifications/status - Notification channel status (masterAuth)
|
|
11
|
+
* POST /admin/notifications/test - Send test notification (masterAuth)
|
|
12
|
+
* GET /admin/notifications/log - Query notification logs (masterAuth)
|
|
13
|
+
* GET /admin/settings - Get all settings (masterAuth)
|
|
14
|
+
* PUT /admin/settings - Update settings (masterAuth)
|
|
15
|
+
* POST /admin/settings/test-rpc - Test RPC connectivity (masterAuth)
|
|
16
|
+
* GET /admin/oracle-status - Oracle cache/source/cross-validation status (masterAuth)
|
|
17
|
+
* GET /admin/api-keys - List Action Provider API key status (masterAuth)
|
|
18
|
+
* PUT /admin/api-keys/:provider - Set or update API key (masterAuth)
|
|
19
|
+
* DELETE /admin/api-keys/:provider - Delete API key (masterAuth)
|
|
20
|
+
* GET /admin/forex/rates - Forex exchange rates for display currency (masterAuth)
|
|
21
|
+
* GET /admin/telegram-users - List Telegram bot users (masterAuth)
|
|
22
|
+
* PUT /admin/telegram-users/:chatId - Update Telegram user role (masterAuth)
|
|
23
|
+
* DELETE /admin/telegram-users/:chatId - Delete Telegram user (masterAuth)
|
|
24
|
+
*
|
|
25
|
+
* @see docs/37-rest-api-complete-spec.md
|
|
26
|
+
* @see docs/36-killswitch-evm-freeze.md
|
|
27
|
+
*/
|
|
28
|
+
import { OpenAPIHono } from '@hono/zod-openapi';
|
|
29
|
+
import type { BetterSQLite3Database } from 'drizzle-orm/better-sqlite3';
|
|
30
|
+
import type { Database as SQLiteDatabase } from 'better-sqlite3';
|
|
31
|
+
import type { IPriceOracle, IForexRateService } from '@waiaas/core';
|
|
32
|
+
import type { JwtSecretManager } from '../../infrastructure/jwt/jwt-secret-manager.js';
|
|
33
|
+
import type * as schema from '../../infrastructure/database/schema.js';
|
|
34
|
+
import type { NotificationService } from '../../notifications/notification-service.js';
|
|
35
|
+
import type { DaemonConfig } from '../../infrastructure/config/loader.js';
|
|
36
|
+
import type { SettingsService } from '../../infrastructure/settings/index.js';
|
|
37
|
+
import type { AdapterPool } from '../../infrastructure/adapter-pool.js';
|
|
38
|
+
import type { ApiKeyStore } from '../../infrastructure/action/api-key-store.js';
|
|
39
|
+
import type { ActionProviderRegistry } from '../../infrastructure/action/action-provider-registry.js';
|
|
40
|
+
import type { KillSwitchService } from '../../services/kill-switch-service.js';
|
|
41
|
+
export interface KillSwitchState {
|
|
42
|
+
state: string;
|
|
43
|
+
activatedAt: number | null;
|
|
44
|
+
activatedBy: string | null;
|
|
45
|
+
}
|
|
46
|
+
export interface AdminRouteDeps {
|
|
47
|
+
db: BetterSQLite3Database<typeof schema>;
|
|
48
|
+
jwtSecretManager?: JwtSecretManager;
|
|
49
|
+
getKillSwitchState: () => KillSwitchState;
|
|
50
|
+
setKillSwitchState: (state: string, activatedBy?: string) => void;
|
|
51
|
+
killSwitchService?: KillSwitchService;
|
|
52
|
+
requestShutdown?: () => void;
|
|
53
|
+
startTime: number;
|
|
54
|
+
version: string;
|
|
55
|
+
adminTimeout: number;
|
|
56
|
+
notificationService?: NotificationService;
|
|
57
|
+
notificationConfig?: DaemonConfig['notifications'];
|
|
58
|
+
settingsService?: SettingsService;
|
|
59
|
+
onSettingsChanged?: (changedKeys: string[]) => void;
|
|
60
|
+
adapterPool?: AdapterPool | null;
|
|
61
|
+
daemonConfig?: DaemonConfig;
|
|
62
|
+
priceOracle?: IPriceOracle;
|
|
63
|
+
oracleConfig?: {
|
|
64
|
+
coingeckoApiKeyConfigured: boolean;
|
|
65
|
+
crossValidationThreshold: number;
|
|
66
|
+
};
|
|
67
|
+
apiKeyStore?: ApiKeyStore;
|
|
68
|
+
actionProviderRegistry?: ActionProviderRegistry;
|
|
69
|
+
forexRateService?: IForexRateService;
|
|
70
|
+
sqlite?: SQLiteDatabase;
|
|
71
|
+
}
|
|
72
|
+
/**
|
|
73
|
+
* Create admin route sub-router.
|
|
74
|
+
*
|
|
75
|
+
* GET /admin/status - Daemon health info (masterAuth)
|
|
76
|
+
* POST /admin/kill-switch - Activate kill switch (masterAuth)
|
|
77
|
+
* GET /admin/kill-switch - Get kill switch state (public)
|
|
78
|
+
* POST /admin/recover - Deactivate kill switch (masterAuth)
|
|
79
|
+
* POST /admin/shutdown - Graceful shutdown (masterAuth)
|
|
80
|
+
* POST /admin/rotate-secret - Rotate JWT secret (masterAuth)
|
|
81
|
+
* GET /admin/notifications/status - Notification channel status (masterAuth)
|
|
82
|
+
* POST /admin/notifications/test - Send test notification (masterAuth)
|
|
83
|
+
* GET /admin/notifications/log - Query notification logs (masterAuth)
|
|
84
|
+
* GET /admin/settings - Get all settings (masterAuth)
|
|
85
|
+
* PUT /admin/settings - Update settings (masterAuth)
|
|
86
|
+
* POST /admin/settings/test-rpc - Test RPC connectivity (masterAuth)
|
|
87
|
+
* GET /admin/oracle-status - Oracle cache/source/cross-validation status (masterAuth)
|
|
88
|
+
* GET /admin/api-keys - List Action Provider API key status (masterAuth)
|
|
89
|
+
* PUT /admin/api-keys/:provider - Set or update API key (masterAuth)
|
|
90
|
+
* DELETE /admin/api-keys/:provider - Delete API key (masterAuth)
|
|
91
|
+
* GET /admin/forex/rates - Forex exchange rates (masterAuth)
|
|
92
|
+
* GET /admin/wallets/:id/balance - Wallet native+token balance (masterAuth)
|
|
93
|
+
* GET /admin/wallets/:id/transactions - Wallet transaction history (masterAuth)
|
|
94
|
+
* GET /admin/telegram-users - List Telegram bot users (masterAuth)
|
|
95
|
+
* PUT /admin/telegram-users/:chatId - Update Telegram user role (masterAuth)
|
|
96
|
+
* DELETE /admin/telegram-users/:chatId - Delete Telegram user (masterAuth)
|
|
97
|
+
*/
|
|
98
|
+
export declare function adminRoutes(deps: AdminRouteDeps): OpenAPIHono;
|
|
99
|
+
//# sourceMappingURL=admin.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"admin.d.ts","sourceRoot":"","sources":["../../../src/api/routes/admin.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;GA0BG;AAEH,OAAO,EAAE,WAAW,EAAkB,MAAM,mBAAmB,CAAC;AAEhE,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,4BAA4B,CAAC;AACxE,OAAO,KAAK,EAAE,QAAQ,IAAI,cAAc,EAAE,MAAM,gBAAgB,CAAC;AAEjE,OAAO,KAAK,EAAsF,YAAY,EAAE,iBAAiB,EAAgB,MAAM,cAAc,CAAC;AAEtK,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,gDAAgD,CAAC;AAEvF,OAAO,KAAK,KAAK,MAAM,MAAM,yCAAyC,CAAC;AACvE,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,6CAA6C,CAAC;AACvF,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,uCAAuC,CAAC;AAC1E,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,wCAAwC,CAAC;AAE9E,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,sCAAsC,CAAC;AAExE,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,8CAA8C,CAAC;AAChF,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,yDAAyD,CAAC;AACtG,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,uCAAuC,CAAC;AA4B/E,MAAM,WAAW,eAAe;IAC9B,KAAK,EAAE,MAAM,CAAC;IACd,WAAW,EAAE,MAAM,GAAG,IAAI,CAAC;IAC3B,WAAW,EAAE,MAAM,GAAG,IAAI,CAAC;CAC5B;AAED,MAAM,WAAW,cAAc;IAC7B,EAAE,EAAE,qBAAq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