@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,770 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Shared OpenAPI Zod response schemas and error code mapping.
|
|
3
|
+
*
|
|
4
|
+
* This file provides:
|
|
5
|
+
* 1. Response schemas for all 18 routes (using z from @hono/zod-openapi)
|
|
6
|
+
* 2. Error code -> OpenAPI response mapping via buildErrorResponses()
|
|
7
|
+
* 3. Re-exported request schemas with .openapi() metadata
|
|
8
|
+
*
|
|
9
|
+
* @see docs/37-rest-api-complete-spec.md
|
|
10
|
+
*/
|
|
11
|
+
import { z } from '@hono/zod-openapi';
|
|
12
|
+
import { ERROR_CODES, WAIaaSError, CreateWalletRequestSchema, CreateSessionRequestSchema, SendTransactionRequestSchema, CreatePolicyRequestSchema, UpdatePolicyRequestSchema, TransferRequestSchema, TokenTransferRequestSchema, ContractCallRequestSchema, ApproveRequestSchema, BatchRequestSchema, } from '@waiaas/core';
|
|
13
|
+
// ---------------------------------------------------------------------------
|
|
14
|
+
// Error Response Schema
|
|
15
|
+
// ---------------------------------------------------------------------------
|
|
16
|
+
export const ErrorResponseSchema = z
|
|
17
|
+
.object({
|
|
18
|
+
code: z.string(),
|
|
19
|
+
message: z.string(),
|
|
20
|
+
retryable: z.boolean(),
|
|
21
|
+
details: z.record(z.unknown()).optional(),
|
|
22
|
+
requestId: z.string().optional(),
|
|
23
|
+
hint: z.string().optional(),
|
|
24
|
+
})
|
|
25
|
+
.openapi('ErrorResponse');
|
|
26
|
+
// ---------------------------------------------------------------------------
|
|
27
|
+
// Health Response Schema
|
|
28
|
+
// ---------------------------------------------------------------------------
|
|
29
|
+
export const HealthResponseSchema = z
|
|
30
|
+
.object({
|
|
31
|
+
status: z.string(),
|
|
32
|
+
version: z.string(),
|
|
33
|
+
latestVersion: z.string().nullable(),
|
|
34
|
+
updateAvailable: z.boolean(),
|
|
35
|
+
schemaVersion: z.number().int(),
|
|
36
|
+
uptime: z.number().int(),
|
|
37
|
+
timestamp: z.number().int(),
|
|
38
|
+
})
|
|
39
|
+
.openapi('HealthResponse');
|
|
40
|
+
// ---------------------------------------------------------------------------
|
|
41
|
+
// Wallet CRUD Response Schemas
|
|
42
|
+
// ---------------------------------------------------------------------------
|
|
43
|
+
export const WalletCrudResponseSchema = z
|
|
44
|
+
.object({
|
|
45
|
+
id: z.string().uuid(),
|
|
46
|
+
name: z.string(),
|
|
47
|
+
chain: z.string(),
|
|
48
|
+
network: z.string(),
|
|
49
|
+
environment: z.string(),
|
|
50
|
+
publicKey: z.string(),
|
|
51
|
+
status: z.string(),
|
|
52
|
+
ownerAddress: z.string().nullable(),
|
|
53
|
+
ownerState: z.enum(['NONE', 'GRACE', 'LOCKED']),
|
|
54
|
+
createdAt: z.number().int(),
|
|
55
|
+
})
|
|
56
|
+
.openapi('WalletCrudResponse');
|
|
57
|
+
export const WalletOwnerResponseSchema = z
|
|
58
|
+
.object({
|
|
59
|
+
id: z.string().uuid(),
|
|
60
|
+
name: z.string(),
|
|
61
|
+
chain: z.string(),
|
|
62
|
+
network: z.string(),
|
|
63
|
+
environment: z.string(),
|
|
64
|
+
publicKey: z.string(),
|
|
65
|
+
status: z.string(),
|
|
66
|
+
ownerAddress: z.string().nullable(),
|
|
67
|
+
ownerVerified: z.boolean().nullable(),
|
|
68
|
+
updatedAt: z.number().int().nullable(),
|
|
69
|
+
})
|
|
70
|
+
.openapi('WalletOwnerResponse');
|
|
71
|
+
export const OwnerVerifyResponseSchema = z
|
|
72
|
+
.object({
|
|
73
|
+
ownerState: z.enum(['NONE', 'GRACE', 'LOCKED']),
|
|
74
|
+
ownerAddress: z.string().nullable(),
|
|
75
|
+
ownerVerified: z.boolean(),
|
|
76
|
+
})
|
|
77
|
+
.openapi('OwnerVerifyResponse');
|
|
78
|
+
// ---------------------------------------------------------------------------
|
|
79
|
+
// Wallet Query Response Schemas
|
|
80
|
+
// ---------------------------------------------------------------------------
|
|
81
|
+
export const WalletAddressResponseSchema = z
|
|
82
|
+
.object({
|
|
83
|
+
walletId: z.string().uuid(),
|
|
84
|
+
chain: z.string(),
|
|
85
|
+
network: z.string(),
|
|
86
|
+
address: z.string(),
|
|
87
|
+
})
|
|
88
|
+
.openapi('WalletAddressResponse');
|
|
89
|
+
export const WalletBalanceResponseSchema = z
|
|
90
|
+
.object({
|
|
91
|
+
walletId: z.string().uuid(),
|
|
92
|
+
chain: z.string(),
|
|
93
|
+
network: z.string(),
|
|
94
|
+
address: z.string(),
|
|
95
|
+
balance: z.string(),
|
|
96
|
+
decimals: z.number().int(),
|
|
97
|
+
symbol: z.string(),
|
|
98
|
+
displayBalance: z.string().nullable().optional(),
|
|
99
|
+
displayCurrency: z.string().nullable().optional(),
|
|
100
|
+
})
|
|
101
|
+
.openapi('WalletBalanceResponse');
|
|
102
|
+
// ---------------------------------------------------------------------------
|
|
103
|
+
// Session Response Schemas
|
|
104
|
+
// ---------------------------------------------------------------------------
|
|
105
|
+
export const SessionCreateResponseSchema = z
|
|
106
|
+
.object({
|
|
107
|
+
id: z.string().uuid(),
|
|
108
|
+
token: z.string(),
|
|
109
|
+
expiresAt: z.number().int(),
|
|
110
|
+
walletId: z.string().uuid(),
|
|
111
|
+
})
|
|
112
|
+
.openapi('SessionCreateResponse');
|
|
113
|
+
export const SessionListItemSchema = z
|
|
114
|
+
.object({
|
|
115
|
+
id: z.string().uuid(),
|
|
116
|
+
walletId: z.string().uuid(),
|
|
117
|
+
walletName: z.string().nullable(),
|
|
118
|
+
status: z.string(),
|
|
119
|
+
renewalCount: z.number().int(),
|
|
120
|
+
maxRenewals: z.number().int(),
|
|
121
|
+
expiresAt: z.number().int(),
|
|
122
|
+
absoluteExpiresAt: z.number().int(),
|
|
123
|
+
createdAt: z.number().int(),
|
|
124
|
+
lastRenewedAt: z.number().int().nullable(),
|
|
125
|
+
})
|
|
126
|
+
.openapi('SessionListItem');
|
|
127
|
+
export const SessionRevokeResponseSchema = z
|
|
128
|
+
.object({
|
|
129
|
+
id: z.string().uuid(),
|
|
130
|
+
status: z.string(),
|
|
131
|
+
message: z.string().optional(),
|
|
132
|
+
})
|
|
133
|
+
.openapi('SessionRevokeResponse');
|
|
134
|
+
export const SessionRenewResponseSchema = z
|
|
135
|
+
.object({
|
|
136
|
+
id: z.string().uuid(),
|
|
137
|
+
token: z.string(),
|
|
138
|
+
expiresAt: z.number().int(),
|
|
139
|
+
renewalCount: z.number().int(),
|
|
140
|
+
})
|
|
141
|
+
.openapi('SessionRenewResponse');
|
|
142
|
+
// ---------------------------------------------------------------------------
|
|
143
|
+
// Transaction Response Schemas
|
|
144
|
+
// ---------------------------------------------------------------------------
|
|
145
|
+
export const TxSendResponseSchema = z
|
|
146
|
+
.object({
|
|
147
|
+
id: z.string().uuid(),
|
|
148
|
+
status: z.string(),
|
|
149
|
+
})
|
|
150
|
+
.openapi('TxSendResponse');
|
|
151
|
+
export const TxDetailResponseSchema = z
|
|
152
|
+
.object({
|
|
153
|
+
id: z.string().uuid(),
|
|
154
|
+
walletId: z.string().uuid(),
|
|
155
|
+
type: z.string(),
|
|
156
|
+
status: z.string(),
|
|
157
|
+
tier: z.string().nullable(),
|
|
158
|
+
chain: z.string(),
|
|
159
|
+
network: z.string().nullable(),
|
|
160
|
+
toAddress: z.string().nullable(),
|
|
161
|
+
amount: z.string().nullable(),
|
|
162
|
+
txHash: z.string().nullable(),
|
|
163
|
+
error: z.string().nullable(),
|
|
164
|
+
createdAt: z.number().int().nullable(),
|
|
165
|
+
displayAmount: z.string().nullable().optional(),
|
|
166
|
+
displayCurrency: z.string().nullable().optional(),
|
|
167
|
+
})
|
|
168
|
+
.openapi('TxDetailResponse');
|
|
169
|
+
export const TxApproveResponseSchema = z
|
|
170
|
+
.object({
|
|
171
|
+
id: z.string().uuid(),
|
|
172
|
+
status: z.string(),
|
|
173
|
+
approvedAt: z.number().int(),
|
|
174
|
+
})
|
|
175
|
+
.openapi('TxApproveResponse');
|
|
176
|
+
export const TxRejectResponseSchema = z
|
|
177
|
+
.object({
|
|
178
|
+
id: z.string().uuid(),
|
|
179
|
+
status: z.string(),
|
|
180
|
+
rejectedAt: z.number().int(),
|
|
181
|
+
})
|
|
182
|
+
.openapi('TxRejectResponse');
|
|
183
|
+
export const TxCancelResponseSchema = z
|
|
184
|
+
.object({
|
|
185
|
+
id: z.string().uuid(),
|
|
186
|
+
status: z.string(),
|
|
187
|
+
})
|
|
188
|
+
.openapi('TxCancelResponse');
|
|
189
|
+
// ---------------------------------------------------------------------------
|
|
190
|
+
// Policy Response Schemas
|
|
191
|
+
// ---------------------------------------------------------------------------
|
|
192
|
+
export const PolicyResponseSchema = z
|
|
193
|
+
.object({
|
|
194
|
+
id: z.string().uuid(),
|
|
195
|
+
walletId: z.string().uuid().nullable(),
|
|
196
|
+
type: z.string(),
|
|
197
|
+
rules: z.record(z.unknown()),
|
|
198
|
+
priority: z.number().int(),
|
|
199
|
+
enabled: z.boolean(),
|
|
200
|
+
network: z.string().nullable(),
|
|
201
|
+
createdAt: z.number().int(),
|
|
202
|
+
updatedAt: z.number().int(),
|
|
203
|
+
})
|
|
204
|
+
.openapi('PolicyResponse');
|
|
205
|
+
export const PolicyDeleteResponseSchema = z
|
|
206
|
+
.object({
|
|
207
|
+
id: z.string().uuid(),
|
|
208
|
+
deleted: z.boolean(),
|
|
209
|
+
})
|
|
210
|
+
.openapi('PolicyDeleteResponse');
|
|
211
|
+
// ---------------------------------------------------------------------------
|
|
212
|
+
// Error Code -> OpenAPI Response Mapping
|
|
213
|
+
// ---------------------------------------------------------------------------
|
|
214
|
+
/**
|
|
215
|
+
* Build OpenAPI error response entries from a list of error codes.
|
|
216
|
+
* Groups error codes by httpStatus, merging multiple codes into a single
|
|
217
|
+
* response entry with description listing which codes can occur.
|
|
218
|
+
*
|
|
219
|
+
* @param codes - Array of error code keys from ERROR_CODES
|
|
220
|
+
* @returns Record of HTTP status code string -> OpenAPI response definition
|
|
221
|
+
*/
|
|
222
|
+
export function buildErrorResponses(codes) {
|
|
223
|
+
const grouped = new Map();
|
|
224
|
+
for (const code of codes) {
|
|
225
|
+
const entry = ERROR_CODES[code];
|
|
226
|
+
const status = entry.httpStatus;
|
|
227
|
+
if (!grouped.has(status)) {
|
|
228
|
+
grouped.set(status, []);
|
|
229
|
+
}
|
|
230
|
+
grouped.get(status).push(code);
|
|
231
|
+
}
|
|
232
|
+
const result = {};
|
|
233
|
+
for (const [status, codelist] of grouped) {
|
|
234
|
+
const descriptions = codelist.map((c) => `${c}: ${ERROR_CODES[c].message}`);
|
|
235
|
+
result[String(status)] = {
|
|
236
|
+
description: descriptions.join(' | '),
|
|
237
|
+
content: {
|
|
238
|
+
'application/json': { schema: ErrorResponseSchema },
|
|
239
|
+
},
|
|
240
|
+
};
|
|
241
|
+
}
|
|
242
|
+
return result;
|
|
243
|
+
}
|
|
244
|
+
// ---------------------------------------------------------------------------
|
|
245
|
+
// Re-exported Request Schemas with OpenAPI metadata
|
|
246
|
+
// ---------------------------------------------------------------------------
|
|
247
|
+
export const CreateWalletRequestOpenAPI = CreateWalletRequestSchema.openapi('CreateWalletRequest');
|
|
248
|
+
export const CreateSessionRequestOpenAPI = CreateSessionRequestSchema.openapi('CreateSessionRequest');
|
|
249
|
+
export const SendTransactionRequestOpenAPI = SendTransactionRequestSchema.openapi('SendTransactionRequest');
|
|
250
|
+
export const CreatePolicyRequestOpenAPI = CreatePolicyRequestSchema.openapi('CreatePolicyRequest');
|
|
251
|
+
export const UpdatePolicyRequestOpenAPI = UpdatePolicyRequestSchema.openapi('UpdatePolicyRequest');
|
|
252
|
+
// ---------------------------------------------------------------------------
|
|
253
|
+
// 5-type Transaction Request OpenAPI Components (Phase 86-01)
|
|
254
|
+
// ---------------------------------------------------------------------------
|
|
255
|
+
export const TransferRequestOpenAPI = TransferRequestSchema.openapi('TransferRequest');
|
|
256
|
+
export const TokenTransferRequestOpenAPI = TokenTransferRequestSchema.openapi('TokenTransferRequest');
|
|
257
|
+
export const ContractCallRequestOpenAPI = ContractCallRequestSchema.openapi('ContractCallRequest');
|
|
258
|
+
export const ApproveRequestOpenAPI = ApproveRequestSchema.openapi('ApproveRequest');
|
|
259
|
+
export const BatchRequestOpenAPI = BatchRequestSchema.openapi('BatchRequest');
|
|
260
|
+
/**
|
|
261
|
+
* Loose passthrough schema for the send transaction route.
|
|
262
|
+
* Uses z.any() to bypass Hono's built-in Zod validation (validation is delegated
|
|
263
|
+
* to stage1Validate which uses the correct discriminatedUnion or legacy schema).
|
|
264
|
+
* The OpenAPI doc uses manual oneOf to document all 6 request variants.
|
|
265
|
+
*/
|
|
266
|
+
export const TransactionRequestOpenAPI = z.any().openapi({
|
|
267
|
+
type: 'object',
|
|
268
|
+
oneOf: [
|
|
269
|
+
{ $ref: '#/components/schemas/TransferRequest' },
|
|
270
|
+
{ $ref: '#/components/schemas/TokenTransferRequest' },
|
|
271
|
+
{ $ref: '#/components/schemas/ContractCallRequest' },
|
|
272
|
+
{ $ref: '#/components/schemas/ApproveRequest' },
|
|
273
|
+
{ $ref: '#/components/schemas/BatchRequest' },
|
|
274
|
+
{ $ref: '#/components/schemas/SendTransactionRequest' },
|
|
275
|
+
],
|
|
276
|
+
description: 'Transaction request. Legacy format (to/amount/memo without type) is treated as TRANSFER.',
|
|
277
|
+
});
|
|
278
|
+
// ---------------------------------------------------------------------------
|
|
279
|
+
// Default validation hook for OpenAPIHono
|
|
280
|
+
// ---------------------------------------------------------------------------
|
|
281
|
+
/**
|
|
282
|
+
* Default validation hook that throws WAIaaSError on validation failure.
|
|
283
|
+
* This ensures OpenAPIHono's built-in Zod validation produces the same
|
|
284
|
+
* error format as our existing errorHandler (code, message, retryable).
|
|
285
|
+
*/
|
|
286
|
+
export function openApiValidationHook(result, _c) {
|
|
287
|
+
if (!result.success) {
|
|
288
|
+
throw new WAIaaSError('ACTION_VALIDATION_FAILED', {
|
|
289
|
+
message: 'Validation error',
|
|
290
|
+
details: { issues: result.error?.issues ?? [] },
|
|
291
|
+
});
|
|
292
|
+
}
|
|
293
|
+
}
|
|
294
|
+
// ---------------------------------------------------------------------------
|
|
295
|
+
// Wallet Assets Response Schema (GET /v1/wallet/assets)
|
|
296
|
+
// ---------------------------------------------------------------------------
|
|
297
|
+
export const WalletAssetsResponseSchema = z
|
|
298
|
+
.object({
|
|
299
|
+
walletId: z.string().uuid(),
|
|
300
|
+
chain: z.string(),
|
|
301
|
+
network: z.string(),
|
|
302
|
+
assets: z.array(z.object({
|
|
303
|
+
mint: z.string(),
|
|
304
|
+
symbol: z.string(),
|
|
305
|
+
name: z.string(),
|
|
306
|
+
balance: z.string(),
|
|
307
|
+
decimals: z.number().int(),
|
|
308
|
+
isNative: z.boolean(),
|
|
309
|
+
usdValue: z.number().optional(),
|
|
310
|
+
displayValue: z.string().nullable().optional(),
|
|
311
|
+
})),
|
|
312
|
+
displayCurrency: z.string().nullable().optional(),
|
|
313
|
+
})
|
|
314
|
+
.openapi('WalletAssetsResponse');
|
|
315
|
+
// ---------------------------------------------------------------------------
|
|
316
|
+
// Transaction List Response Schemas (GET /v1/transactions, /pending)
|
|
317
|
+
// ---------------------------------------------------------------------------
|
|
318
|
+
export const TxListResponseSchema = z
|
|
319
|
+
.object({
|
|
320
|
+
items: z.array(TxDetailResponseSchema),
|
|
321
|
+
cursor: z.string().nullable(),
|
|
322
|
+
hasMore: z.boolean(),
|
|
323
|
+
})
|
|
324
|
+
.openapi('TxListResponse');
|
|
325
|
+
export const TxPendingListResponseSchema = z
|
|
326
|
+
.object({
|
|
327
|
+
items: z.array(TxDetailResponseSchema),
|
|
328
|
+
})
|
|
329
|
+
.openapi('TxPendingListResponse');
|
|
330
|
+
// ---------------------------------------------------------------------------
|
|
331
|
+
// Nonce Response Schema (GET /v1/nonce)
|
|
332
|
+
// ---------------------------------------------------------------------------
|
|
333
|
+
export const NonceResponseSchema = z
|
|
334
|
+
.object({
|
|
335
|
+
nonce: z.string(),
|
|
336
|
+
expiresAt: z.number().int(),
|
|
337
|
+
})
|
|
338
|
+
.openapi('NonceResponse');
|
|
339
|
+
// ---------------------------------------------------------------------------
|
|
340
|
+
// Wallet List / Detail Response Schemas (GET /v1/wallets, GET /v1/wallets/:id)
|
|
341
|
+
// ---------------------------------------------------------------------------
|
|
342
|
+
export const WalletListResponseSchema = z
|
|
343
|
+
.object({
|
|
344
|
+
items: z.array(WalletCrudResponseSchema),
|
|
345
|
+
})
|
|
346
|
+
.openapi('WalletListResponse');
|
|
347
|
+
export const WalletDetailResponseSchema = z
|
|
348
|
+
.object({
|
|
349
|
+
id: z.string().uuid(),
|
|
350
|
+
name: z.string(),
|
|
351
|
+
chain: z.string(),
|
|
352
|
+
network: z.string(),
|
|
353
|
+
environment: z.string(),
|
|
354
|
+
defaultNetwork: z.string().nullable().optional(),
|
|
355
|
+
publicKey: z.string(),
|
|
356
|
+
status: z.string(),
|
|
357
|
+
ownerAddress: z.string().nullable(),
|
|
358
|
+
ownerVerified: z.boolean().nullable(),
|
|
359
|
+
ownerState: z.enum(['NONE', 'GRACE', 'LOCKED']),
|
|
360
|
+
createdAt: z.number().int(),
|
|
361
|
+
updatedAt: z.number().int().nullable(),
|
|
362
|
+
})
|
|
363
|
+
.openapi('WalletDetailResponse');
|
|
364
|
+
// ---------------------------------------------------------------------------
|
|
365
|
+
// Wallet Network Management Schemas (PUT /wallets/:id/default-network, GET /wallets/:id/networks)
|
|
366
|
+
// ---------------------------------------------------------------------------
|
|
367
|
+
// PUT /wallets/:id/default-network request
|
|
368
|
+
export const UpdateDefaultNetworkRequestSchema = z
|
|
369
|
+
.object({
|
|
370
|
+
network: z.string().min(1),
|
|
371
|
+
})
|
|
372
|
+
.openapi('UpdateDefaultNetworkRequest');
|
|
373
|
+
// PUT /wallets/:id/default-network response
|
|
374
|
+
export const UpdateDefaultNetworkResponseSchema = z
|
|
375
|
+
.object({
|
|
376
|
+
id: z.string().uuid(),
|
|
377
|
+
defaultNetwork: z.string(),
|
|
378
|
+
previousNetwork: z.string().nullable(),
|
|
379
|
+
})
|
|
380
|
+
.openapi('UpdateDefaultNetworkResponse');
|
|
381
|
+
// GET /wallets/:id/networks response
|
|
382
|
+
export const WalletNetworksResponseSchema = z
|
|
383
|
+
.object({
|
|
384
|
+
id: z.string().uuid(),
|
|
385
|
+
chain: z.string(),
|
|
386
|
+
environment: z.string(),
|
|
387
|
+
defaultNetwork: z.string().nullable(),
|
|
388
|
+
availableNetworks: z.array(z.object({
|
|
389
|
+
network: z.string(),
|
|
390
|
+
isDefault: z.boolean(),
|
|
391
|
+
})),
|
|
392
|
+
})
|
|
393
|
+
.openapi('WalletNetworksResponse');
|
|
394
|
+
// Owner address request body schema (for PUT /wallets/:id/owner)
|
|
395
|
+
export const SetOwnerRequestSchema = z
|
|
396
|
+
.object({
|
|
397
|
+
owner_address: z.string().min(1),
|
|
398
|
+
})
|
|
399
|
+
.openapi('SetOwnerRequest');
|
|
400
|
+
// ---------------------------------------------------------------------------
|
|
401
|
+
// Wallet CRUD Schemas (PUT /wallets/:id, DELETE /wallets/:id)
|
|
402
|
+
// ---------------------------------------------------------------------------
|
|
403
|
+
export const UpdateWalletRequestSchema = z
|
|
404
|
+
.object({
|
|
405
|
+
name: z.string().min(1).max(100),
|
|
406
|
+
})
|
|
407
|
+
.openapi('UpdateWalletRequest');
|
|
408
|
+
export const WalletDeleteResponseSchema = z
|
|
409
|
+
.object({
|
|
410
|
+
id: z.string().uuid(),
|
|
411
|
+
status: z.literal('TERMINATED'),
|
|
412
|
+
})
|
|
413
|
+
.openapi('WalletDeleteResponse');
|
|
414
|
+
// ---------------------------------------------------------------------------
|
|
415
|
+
// Admin Response Schemas (6 admin endpoints)
|
|
416
|
+
// ---------------------------------------------------------------------------
|
|
417
|
+
export const AdminStatusResponseSchema = z
|
|
418
|
+
.object({
|
|
419
|
+
status: z.string(),
|
|
420
|
+
version: z.string(),
|
|
421
|
+
uptime: z.number().int(),
|
|
422
|
+
walletCount: z.number().int(),
|
|
423
|
+
activeSessionCount: z.number().int(),
|
|
424
|
+
killSwitchState: z.string(),
|
|
425
|
+
adminTimeout: z.number().int(),
|
|
426
|
+
timestamp: z.number().int(),
|
|
427
|
+
policyCount: z.number().int(),
|
|
428
|
+
recentTxCount: z.number().int(),
|
|
429
|
+
failedTxCount: z.number().int(),
|
|
430
|
+
recentTransactions: z.array(z.object({
|
|
431
|
+
id: z.string(),
|
|
432
|
+
walletId: z.string(),
|
|
433
|
+
walletName: z.string().nullable(),
|
|
434
|
+
type: z.string(),
|
|
435
|
+
status: z.string(),
|
|
436
|
+
toAddress: z.string().nullable(),
|
|
437
|
+
amount: z.string().nullable(),
|
|
438
|
+
network: z.string().nullable(),
|
|
439
|
+
createdAt: z.number().int().nullable(),
|
|
440
|
+
})),
|
|
441
|
+
})
|
|
442
|
+
.openapi('AdminStatusResponse');
|
|
443
|
+
export const KillSwitchResponseSchema = z
|
|
444
|
+
.object({
|
|
445
|
+
state: z.string(),
|
|
446
|
+
activatedAt: z.number().int().nullable(),
|
|
447
|
+
activatedBy: z.string().nullable(),
|
|
448
|
+
})
|
|
449
|
+
.openapi('KillSwitchResponse');
|
|
450
|
+
export const KillSwitchActivateResponseSchema = z
|
|
451
|
+
.object({
|
|
452
|
+
state: z.literal('SUSPENDED'),
|
|
453
|
+
activatedAt: z.number().int(),
|
|
454
|
+
})
|
|
455
|
+
.openapi('KillSwitchActivateResponse');
|
|
456
|
+
export const KillSwitchEscalateResponseSchema = z
|
|
457
|
+
.object({
|
|
458
|
+
state: z.literal('LOCKED'),
|
|
459
|
+
escalatedAt: z.number().int(),
|
|
460
|
+
})
|
|
461
|
+
.openapi('KillSwitchEscalateResponse');
|
|
462
|
+
export const RecoverResponseSchema = z
|
|
463
|
+
.object({
|
|
464
|
+
state: z.literal('ACTIVE'),
|
|
465
|
+
recoveredAt: z.number().int(),
|
|
466
|
+
})
|
|
467
|
+
.openapi('RecoverResponse');
|
|
468
|
+
export const KillSwitchRecoverRequestSchema = z
|
|
469
|
+
.object({
|
|
470
|
+
ownerSignature: z.string().optional(),
|
|
471
|
+
ownerAddress: z.string().optional(),
|
|
472
|
+
chain: z.enum(['solana', 'ethereum']).optional(),
|
|
473
|
+
message: z.string().optional(),
|
|
474
|
+
})
|
|
475
|
+
.openapi('KillSwitchRecoverRequest');
|
|
476
|
+
export const OwnerKillSwitchResponseSchema = z
|
|
477
|
+
.object({
|
|
478
|
+
state: z.literal('SUSPENDED'),
|
|
479
|
+
activatedAt: z.number().int(),
|
|
480
|
+
})
|
|
481
|
+
.openapi('OwnerKillSwitchResponse');
|
|
482
|
+
export const ShutdownResponseSchema = z
|
|
483
|
+
.object({
|
|
484
|
+
message: z.string(),
|
|
485
|
+
})
|
|
486
|
+
.openapi('ShutdownResponse');
|
|
487
|
+
export const RotateSecretResponseSchema = z
|
|
488
|
+
.object({
|
|
489
|
+
rotatedAt: z.number().int(),
|
|
490
|
+
message: z.string(),
|
|
491
|
+
})
|
|
492
|
+
.openapi('RotateSecretResponse');
|
|
493
|
+
// ---------------------------------------------------------------------------
|
|
494
|
+
// Notification Admin Response Schemas (3 notification admin endpoints)
|
|
495
|
+
// ---------------------------------------------------------------------------
|
|
496
|
+
export const NotificationChannelStatusSchema = z
|
|
497
|
+
.object({
|
|
498
|
+
name: z.string(),
|
|
499
|
+
enabled: z.boolean(),
|
|
500
|
+
})
|
|
501
|
+
.openapi('NotificationChannelStatus');
|
|
502
|
+
export const NotificationStatusResponseSchema = z
|
|
503
|
+
.object({
|
|
504
|
+
enabled: z.boolean(),
|
|
505
|
+
channels: z.array(NotificationChannelStatusSchema),
|
|
506
|
+
})
|
|
507
|
+
.openapi('NotificationStatusResponse');
|
|
508
|
+
export const NotificationTestRequestSchema = z
|
|
509
|
+
.object({
|
|
510
|
+
channel: z.string().optional(),
|
|
511
|
+
})
|
|
512
|
+
.openapi('NotificationTestRequest');
|
|
513
|
+
export const NotificationTestResponseSchema = z
|
|
514
|
+
.object({
|
|
515
|
+
results: z.array(z.object({
|
|
516
|
+
channel: z.string(),
|
|
517
|
+
success: z.boolean(),
|
|
518
|
+
error: z.string().optional(),
|
|
519
|
+
})),
|
|
520
|
+
})
|
|
521
|
+
.openapi('NotificationTestResponse');
|
|
522
|
+
export const NotificationLogEntrySchema = z
|
|
523
|
+
.object({
|
|
524
|
+
id: z.string(),
|
|
525
|
+
eventType: z.string(),
|
|
526
|
+
walletId: z.string().nullable(),
|
|
527
|
+
channel: z.string(),
|
|
528
|
+
status: z.string(),
|
|
529
|
+
error: z.string().nullable(),
|
|
530
|
+
message: z.string().nullable(),
|
|
531
|
+
createdAt: z.number(),
|
|
532
|
+
})
|
|
533
|
+
.openapi('NotificationLogEntry');
|
|
534
|
+
export const NotificationLogResponseSchema = z
|
|
535
|
+
.object({
|
|
536
|
+
logs: z.array(NotificationLogEntrySchema),
|
|
537
|
+
total: z.number(),
|
|
538
|
+
page: z.number(),
|
|
539
|
+
pageSize: z.number(),
|
|
540
|
+
})
|
|
541
|
+
.openapi('NotificationLogResponse');
|
|
542
|
+
// ---------------------------------------------------------------------------
|
|
543
|
+
// Token Registry Schemas (GET/POST/DELETE /v1/tokens)
|
|
544
|
+
// ---------------------------------------------------------------------------
|
|
545
|
+
export const TokenRegistryItemSchema = z
|
|
546
|
+
.object({
|
|
547
|
+
address: z.string(),
|
|
548
|
+
symbol: z.string(),
|
|
549
|
+
name: z.string(),
|
|
550
|
+
decimals: z.number().int(),
|
|
551
|
+
source: z.enum(['builtin', 'custom']),
|
|
552
|
+
})
|
|
553
|
+
.openapi('TokenRegistryItem');
|
|
554
|
+
export const TokenRegistryListResponseSchema = z
|
|
555
|
+
.object({
|
|
556
|
+
network: z.string(),
|
|
557
|
+
tokens: z.array(TokenRegistryItemSchema),
|
|
558
|
+
})
|
|
559
|
+
.openapi('TokenRegistryListResponse');
|
|
560
|
+
export const AddTokenRequestSchema = z
|
|
561
|
+
.object({
|
|
562
|
+
network: z.string().openapi({ example: 'ethereum-mainnet' }),
|
|
563
|
+
address: z.string().openapi({ example: '0x...' }),
|
|
564
|
+
symbol: z.string().min(1).max(20).openapi({ example: 'LINK' }),
|
|
565
|
+
name: z.string().min(1).max(100).openapi({ example: 'Chainlink Token' }),
|
|
566
|
+
decimals: z.number().int().min(0).max(18).openapi({ example: 18 }),
|
|
567
|
+
})
|
|
568
|
+
.openapi('AddTokenRequest');
|
|
569
|
+
export const AddTokenResponseSchema = z
|
|
570
|
+
.object({
|
|
571
|
+
id: z.string(),
|
|
572
|
+
network: z.string(),
|
|
573
|
+
address: z.string(),
|
|
574
|
+
symbol: z.string(),
|
|
575
|
+
})
|
|
576
|
+
.openapi('AddTokenResponse');
|
|
577
|
+
export const RemoveTokenRequestSchema = z
|
|
578
|
+
.object({
|
|
579
|
+
network: z.string(),
|
|
580
|
+
address: z.string(),
|
|
581
|
+
})
|
|
582
|
+
.openapi('RemoveTokenRequest');
|
|
583
|
+
export const RemoveTokenResponseSchema = z
|
|
584
|
+
.object({
|
|
585
|
+
removed: z.boolean(),
|
|
586
|
+
network: z.string(),
|
|
587
|
+
address: z.string(),
|
|
588
|
+
})
|
|
589
|
+
.openapi('RemoveTokenResponse');
|
|
590
|
+
// ---------------------------------------------------------------------------
|
|
591
|
+
// Settings Admin Schemas (GET/PUT /v1/admin/settings, POST /v1/admin/settings/test-rpc)
|
|
592
|
+
// ---------------------------------------------------------------------------
|
|
593
|
+
export const SettingsResponseSchema = z
|
|
594
|
+
.object({
|
|
595
|
+
notifications: z.record(z.union([z.string(), z.boolean()])),
|
|
596
|
+
rpc: z.record(z.union([z.string(), z.boolean()])),
|
|
597
|
+
security: z.record(z.union([z.string(), z.boolean()])),
|
|
598
|
+
daemon: z.record(z.union([z.string(), z.boolean()])),
|
|
599
|
+
walletconnect: z.record(z.union([z.string(), z.boolean()])),
|
|
600
|
+
})
|
|
601
|
+
.openapi('SettingsResponse');
|
|
602
|
+
export const SettingsUpdateRequestSchema = z
|
|
603
|
+
.object({
|
|
604
|
+
settings: z
|
|
605
|
+
.array(z.object({
|
|
606
|
+
key: z.string(),
|
|
607
|
+
value: z.string(),
|
|
608
|
+
}))
|
|
609
|
+
.min(1),
|
|
610
|
+
})
|
|
611
|
+
.openapi('SettingsUpdateRequest');
|
|
612
|
+
export const SettingsUpdateResponseSchema = z
|
|
613
|
+
.object({
|
|
614
|
+
updated: z.number().int(),
|
|
615
|
+
settings: SettingsResponseSchema,
|
|
616
|
+
})
|
|
617
|
+
.openapi('SettingsUpdateResponse');
|
|
618
|
+
export const TestRpcRequestSchema = z
|
|
619
|
+
.object({
|
|
620
|
+
url: z.string().url(),
|
|
621
|
+
chain: z.enum(['solana', 'ethereum']).optional().default('ethereum'),
|
|
622
|
+
})
|
|
623
|
+
.openapi('TestRpcRequest');
|
|
624
|
+
export const TestRpcResponseSchema = z
|
|
625
|
+
.object({
|
|
626
|
+
success: z.boolean(),
|
|
627
|
+
latencyMs: z.number().optional(),
|
|
628
|
+
error: z.string().optional(),
|
|
629
|
+
chainId: z.string().optional(),
|
|
630
|
+
blockNumber: z.number().optional(),
|
|
631
|
+
})
|
|
632
|
+
.openapi('TestRpcResponse');
|
|
633
|
+
// ---------------------------------------------------------------------------
|
|
634
|
+
// MCP Token Provisioning Schemas (POST /v1/mcp/tokens) -- BUG-013 fix
|
|
635
|
+
// ---------------------------------------------------------------------------
|
|
636
|
+
export const McpTokenCreateRequestSchema = z
|
|
637
|
+
.object({
|
|
638
|
+
walletId: z.string().uuid(),
|
|
639
|
+
expiresIn: z.number().int().min(300).max(604800).optional(),
|
|
640
|
+
})
|
|
641
|
+
.openapi('McpTokenCreateRequest');
|
|
642
|
+
export const McpTokenCreateResponseSchema = z
|
|
643
|
+
.object({
|
|
644
|
+
walletId: z.string(),
|
|
645
|
+
walletName: z.string().nullable(),
|
|
646
|
+
tokenPath: z.string(),
|
|
647
|
+
expiresAt: z.number(),
|
|
648
|
+
claudeDesktopConfig: z.record(z.unknown()),
|
|
649
|
+
})
|
|
650
|
+
.openapi('McpTokenCreateResponse');
|
|
651
|
+
// ---------------------------------------------------------------------------
|
|
652
|
+
// Utils: Encode Calldata Schemas
|
|
653
|
+
// ---------------------------------------------------------------------------
|
|
654
|
+
export const EncodeCalldataRequestSchema = z
|
|
655
|
+
.object({
|
|
656
|
+
abi: z.array(z.record(z.unknown())).describe('ABI fragment array (JSON)'),
|
|
657
|
+
functionName: z.string().describe('Function name to encode'),
|
|
658
|
+
args: z.array(z.any()).optional().default([]).describe('Function arguments'),
|
|
659
|
+
})
|
|
660
|
+
.openapi('EncodeCalldataRequest');
|
|
661
|
+
export const EncodeCalldataResponseSchema = z
|
|
662
|
+
.object({
|
|
663
|
+
calldata: z.string().describe('Hex-encoded calldata (0x-prefixed)'),
|
|
664
|
+
selector: z.string().describe('Function selector (first 4 bytes, 0x-prefixed)'),
|
|
665
|
+
functionName: z.string().describe('Encoded function name'),
|
|
666
|
+
})
|
|
667
|
+
.openapi('EncodeCalldataResponse');
|
|
668
|
+
// ---------------------------------------------------------------------------
|
|
669
|
+
// Sign-Only Transaction Schemas (POST /v1/transactions/sign)
|
|
670
|
+
// ---------------------------------------------------------------------------
|
|
671
|
+
export const TxSignRequestSchema = z
|
|
672
|
+
.object({
|
|
673
|
+
transaction: z.string().min(1).openapi({
|
|
674
|
+
description: 'Unsigned transaction (base64 for Solana, 0x-hex for EVM)',
|
|
675
|
+
}),
|
|
676
|
+
chain: z.string().optional().openapi({
|
|
677
|
+
description: 'Chain type (optional -- inferred from wallet)',
|
|
678
|
+
}),
|
|
679
|
+
network: z.string().optional().openapi({
|
|
680
|
+
description: 'Network (optional -- resolved from wallet defaults)',
|
|
681
|
+
}),
|
|
682
|
+
})
|
|
683
|
+
.openapi('TxSignRequest');
|
|
684
|
+
export const TxSignResponseSchema = z
|
|
685
|
+
.object({
|
|
686
|
+
id: z.string().uuid(),
|
|
687
|
+
signedTransaction: z.string(),
|
|
688
|
+
txHash: z.string().nullable(),
|
|
689
|
+
operations: z.array(z.object({
|
|
690
|
+
type: z.string(),
|
|
691
|
+
to: z.string().nullable().optional(),
|
|
692
|
+
amount: z.string().nullable().optional(),
|
|
693
|
+
token: z.string().nullable().optional(),
|
|
694
|
+
programId: z.string().nullable().optional(),
|
|
695
|
+
method: z.string().nullable().optional(),
|
|
696
|
+
})),
|
|
697
|
+
policyResult: z.object({
|
|
698
|
+
tier: z.string(),
|
|
699
|
+
}),
|
|
700
|
+
})
|
|
701
|
+
.openapi('TxSignResponse');
|
|
702
|
+
// ---------------------------------------------------------------------------
|
|
703
|
+
// Oracle Status Schema (GET /v1/admin/oracle-status)
|
|
704
|
+
// ---------------------------------------------------------------------------
|
|
705
|
+
export const OracleStatusResponseSchema = z
|
|
706
|
+
.object({
|
|
707
|
+
cache: z.object({
|
|
708
|
+
hits: z.number(),
|
|
709
|
+
misses: z.number(),
|
|
710
|
+
staleHits: z.number(),
|
|
711
|
+
size: z.number(),
|
|
712
|
+
evictions: z.number(),
|
|
713
|
+
}),
|
|
714
|
+
sources: z.object({
|
|
715
|
+
pyth: z.object({
|
|
716
|
+
available: z.boolean(),
|
|
717
|
+
baseUrl: z.string(),
|
|
718
|
+
}),
|
|
719
|
+
coingecko: z.object({
|
|
720
|
+
available: z.boolean(),
|
|
721
|
+
apiKeyConfigured: z.boolean(),
|
|
722
|
+
}),
|
|
723
|
+
}),
|
|
724
|
+
crossValidation: z.object({
|
|
725
|
+
enabled: z.boolean(),
|
|
726
|
+
threshold: z.number(),
|
|
727
|
+
}),
|
|
728
|
+
})
|
|
729
|
+
.openapi('OracleStatusResponse');
|
|
730
|
+
// ---------------------------------------------------------------------------
|
|
731
|
+
// WalletConnect Pairing & Session Schemas
|
|
732
|
+
// ---------------------------------------------------------------------------
|
|
733
|
+
export const WcPairingResponseSchema = z.object({
|
|
734
|
+
uri: z.string(),
|
|
735
|
+
qrCode: z.string(), // data:image/png;base64,...
|
|
736
|
+
expiresAt: z.number().int(),
|
|
737
|
+
}).openapi('WcPairingResponse');
|
|
738
|
+
export const WcSessionResponseSchema = z.object({
|
|
739
|
+
walletId: z.string(),
|
|
740
|
+
topic: z.string(),
|
|
741
|
+
peerName: z.string().nullable(),
|
|
742
|
+
peerUrl: z.string().nullable(),
|
|
743
|
+
chainId: z.string(),
|
|
744
|
+
ownerAddress: z.string(),
|
|
745
|
+
expiry: z.number().int(),
|
|
746
|
+
createdAt: z.number().int(),
|
|
747
|
+
}).openapi('WcSessionResponse');
|
|
748
|
+
export const WcPairingStatusResponseSchema = z.object({
|
|
749
|
+
status: z.enum(['pending', 'connected', 'expired', 'none']),
|
|
750
|
+
session: WcSessionResponseSchema.nullable().optional(),
|
|
751
|
+
}).openapi('WcPairingStatusResponse');
|
|
752
|
+
export const WcDisconnectResponseSchema = z.object({
|
|
753
|
+
disconnected: z.boolean(),
|
|
754
|
+
}).openapi('WcDisconnectResponse');
|
|
755
|
+
// ---------------------------------------------------------------------------
|
|
756
|
+
// Withdraw (sweep) response
|
|
757
|
+
// ---------------------------------------------------------------------------
|
|
758
|
+
export const WithdrawResponseSchema = z.object({
|
|
759
|
+
total: z.number().int(),
|
|
760
|
+
succeeded: z.number().int(),
|
|
761
|
+
failed: z.number().int(),
|
|
762
|
+
results: z.array(z.object({
|
|
763
|
+
asset: z.string(),
|
|
764
|
+
amount: z.string(),
|
|
765
|
+
txHash: z.string().optional(),
|
|
766
|
+
error: z.string().optional(),
|
|
767
|
+
status: z.enum(['success', 'failed']),
|
|
768
|
+
})),
|
|
769
|
+
}).openapi('WithdrawResponse');
|
|
770
|
+
//# sourceMappingURL=openapi-schemas.js.map
|