@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.
Files changed (480) hide show
  1. package/dist/api/error-hints.d.ts +15 -0
  2. package/dist/api/error-hints.d.ts.map +1 -0
  3. package/dist/api/error-hints.js +71 -0
  4. package/dist/api/error-hints.js.map +1 -0
  5. package/dist/api/index.d.ts +11 -0
  6. package/dist/api/index.d.ts.map +1 -0
  7. package/dist/api/index.js +14 -0
  8. package/dist/api/index.js.map +1 -0
  9. package/dist/api/middleware/address-validation.d.ts +38 -0
  10. package/dist/api/middleware/address-validation.d.ts.map +1 -0
  11. package/dist/api/middleware/address-validation.js +134 -0
  12. package/dist/api/middleware/address-validation.js.map +1 -0
  13. package/dist/api/middleware/csp.d.ts +17 -0
  14. package/dist/api/middleware/csp.d.ts.map +1 -0
  15. package/dist/api/middleware/csp.js +31 -0
  16. package/dist/api/middleware/csp.js.map +1 -0
  17. package/dist/api/middleware/error-handler.d.ts +16 -0
  18. package/dist/api/middleware/error-handler.d.ts.map +1 -0
  19. package/dist/api/middleware/error-handler.js +46 -0
  20. package/dist/api/middleware/error-handler.js.map +1 -0
  21. package/dist/api/middleware/host-guard.d.ts +11 -0
  22. package/dist/api/middleware/host-guard.d.ts.map +1 -0
  23. package/dist/api/middleware/host-guard.js +25 -0
  24. package/dist/api/middleware/host-guard.js.map +1 -0
  25. package/dist/api/middleware/index.d.ts +13 -0
  26. package/dist/api/middleware/index.d.ts.map +1 -0
  27. package/dist/api/middleware/index.js +13 -0
  28. package/dist/api/middleware/index.js.map +1 -0
  29. package/dist/api/middleware/kill-switch-guard.d.ts +19 -0
  30. package/dist/api/middleware/kill-switch-guard.d.ts.map +1 -0
  31. package/dist/api/middleware/kill-switch-guard.js +49 -0
  32. package/dist/api/middleware/kill-switch-guard.js.map +1 -0
  33. package/dist/api/middleware/master-auth.d.ts +15 -0
  34. package/dist/api/middleware/master-auth.d.ts.map +1 -0
  35. package/dist/api/middleware/master-auth.js +35 -0
  36. package/dist/api/middleware/master-auth.js.map +1 -0
  37. package/dist/api/middleware/owner-auth.d.ts +30 -0
  38. package/dist/api/middleware/owner-auth.d.ts.map +1 -0
  39. package/dist/api/middleware/owner-auth.js +133 -0
  40. package/dist/api/middleware/owner-auth.js.map +1 -0
  41. package/dist/api/middleware/request-id.d.ts +10 -0
  42. package/dist/api/middleware/request-id.d.ts.map +1 -0
  43. package/dist/api/middleware/request-id.js +18 -0
  44. package/dist/api/middleware/request-id.js.map +1 -0
  45. package/dist/api/middleware/request-logger.d.ts +9 -0
  46. package/dist/api/middleware/request-logger.d.ts.map +1 -0
  47. package/dist/api/middleware/request-logger.js +18 -0
  48. package/dist/api/middleware/request-logger.js.map +1 -0
  49. package/dist/api/middleware/session-auth.d.ts +21 -0
  50. package/dist/api/middleware/session-auth.d.ts.map +1 -0
  51. package/dist/api/middleware/session-auth.js +51 -0
  52. package/dist/api/middleware/session-auth.js.map +1 -0
  53. package/dist/api/middleware/siwe-verify.d.ts +31 -0
  54. package/dist/api/middleware/siwe-verify.d.ts.map +1 -0
  55. package/dist/api/middleware/siwe-verify.js +55 -0
  56. package/dist/api/middleware/siwe-verify.js.map +1 -0
  57. package/dist/api/routes/actions.d.ts +56 -0
  58. package/dist/api/routes/actions.d.ts.map +1 -0
  59. package/dist/api/routes/actions.js +291 -0
  60. package/dist/api/routes/actions.js.map +1 -0
  61. package/dist/api/routes/admin.d.ts +99 -0
  62. package/dist/api/routes/admin.d.ts.map +1 -0
  63. package/dist/api/routes/admin.js +1304 -0
  64. package/dist/api/routes/admin.js.map +1 -0
  65. package/dist/api/routes/display-currency-helper.d.ts +26 -0
  66. package/dist/api/routes/display-currency-helper.d.ts.map +1 -0
  67. package/dist/api/routes/display-currency-helper.js +47 -0
  68. package/dist/api/routes/display-currency-helper.js.map +1 -0
  69. package/dist/api/routes/health.d.ts +14 -0
  70. package/dist/api/routes/health.d.ts.map +1 -0
  71. package/dist/api/routes/health.js +47 -0
  72. package/dist/api/routes/health.js.map +1 -0
  73. package/dist/api/routes/index.d.ts +15 -0
  74. package/dist/api/routes/index.d.ts.map +1 -0
  75. package/dist/api/routes/index.js +15 -0
  76. package/dist/api/routes/index.js.map +1 -0
  77. package/dist/api/routes/mcp.d.ts +30 -0
  78. package/dist/api/routes/mcp.d.ts.map +1 -0
  79. package/dist/api/routes/mcp.js +156 -0
  80. package/dist/api/routes/mcp.js.map +1 -0
  81. package/dist/api/routes/nonce.d.ts +20 -0
  82. package/dist/api/routes/nonce.d.ts.map +1 -0
  83. package/dist/api/routes/nonce.js +48 -0
  84. package/dist/api/routes/nonce.js.map +1 -0
  85. package/dist/api/routes/openapi-schemas.d.ts +2281 -0
  86. package/dist/api/routes/openapi-schemas.d.ts.map +1 -0
  87. package/dist/api/routes/openapi-schemas.js +770 -0
  88. package/dist/api/routes/openapi-schemas.js.map +1 -0
  89. package/dist/api/routes/policies.d.ts +29 -0
  90. package/dist/api/routes/policies.d.ts.map +1 -0
  91. package/dist/api/routes/policies.js +332 -0
  92. package/dist/api/routes/policies.js.map +1 -0
  93. package/dist/api/routes/sessions.d.ts +35 -0
  94. package/dist/api/routes/sessions.d.ts.map +1 -0
  95. package/dist/api/routes/sessions.js +347 -0
  96. package/dist/api/routes/sessions.js.map +1 -0
  97. package/dist/api/routes/skills.d.ts +9 -0
  98. package/dist/api/routes/skills.d.ts.map +1 -0
  99. package/dist/api/routes/skills.js +59 -0
  100. package/dist/api/routes/skills.js.map +1 -0
  101. package/dist/api/routes/tokens.d.ts +25 -0
  102. package/dist/api/routes/tokens.d.ts.map +1 -0
  103. package/dist/api/routes/tokens.js +161 -0
  104. package/dist/api/routes/tokens.js.map +1 -0
  105. package/dist/api/routes/transactions.d.ts +68 -0
  106. package/dist/api/routes/transactions.d.ts.map +1 -0
  107. package/dist/api/routes/transactions.js +576 -0
  108. package/dist/api/routes/transactions.js.map +1 -0
  109. package/dist/api/routes/utils.d.ts +9 -0
  110. package/dist/api/routes/utils.d.ts.map +1 -0
  111. package/dist/api/routes/utils.js +52 -0
  112. package/dist/api/routes/utils.js.map +1 -0
  113. package/dist/api/routes/wallet.d.ts +36 -0
  114. package/dist/api/routes/wallet.d.ts.map +1 -0
  115. package/dist/api/routes/wallet.js +358 -0
  116. package/dist/api/routes/wallet.js.map +1 -0
  117. package/dist/api/routes/wallets.d.ts +43 -0
  118. package/dist/api/routes/wallets.d.ts.map +1 -0
  119. package/dist/api/routes/wallets.js +630 -0
  120. package/dist/api/routes/wallets.js.map +1 -0
  121. package/dist/api/routes/wc.d.ts +46 -0
  122. package/dist/api/routes/wc.d.ts.map +1 -0
  123. package/dist/api/routes/wc.js +354 -0
  124. package/dist/api/routes/wc.js.map +1 -0
  125. package/dist/api/routes/x402.d.ts +61 -0
  126. package/dist/api/routes/x402.d.ts.map +1 -0
  127. package/dist/api/routes/x402.js +493 -0
  128. package/dist/api/routes/x402.js.map +1 -0
  129. package/dist/api/server.d.ts +81 -0
  130. package/dist/api/server.d.ts.map +1 -0
  131. package/dist/api/server.js +406 -0
  132. package/dist/api/server.js.map +1 -0
  133. package/dist/index.d.ts +35 -0
  134. package/dist/index.d.ts.map +1 -0
  135. package/dist/index.js +43 -0
  136. package/dist/index.js.map +1 -0
  137. package/dist/infrastructure/action/action-provider-registry.d.ts +77 -0
  138. package/dist/infrastructure/action/action-provider-registry.d.ts.map +1 -0
  139. package/dist/infrastructure/action/action-provider-registry.js +239 -0
  140. package/dist/infrastructure/action/action-provider-registry.js.map +1 -0
  141. package/dist/infrastructure/action/api-key-store.d.ts +60 -0
  142. package/dist/infrastructure/action/api-key-store.d.ts.map +1 -0
  143. package/dist/infrastructure/action/api-key-store.js +130 -0
  144. package/dist/infrastructure/action/api-key-store.js.map +1 -0
  145. package/dist/infrastructure/action/index.d.ts +10 -0
  146. package/dist/infrastructure/action/index.d.ts.map +1 -0
  147. package/dist/infrastructure/action/index.js +9 -0
  148. package/dist/infrastructure/action/index.js.map +1 -0
  149. package/dist/infrastructure/adapter-pool.d.ts +50 -0
  150. package/dist/infrastructure/adapter-pool.d.ts.map +1 -0
  151. package/dist/infrastructure/adapter-pool.js +110 -0
  152. package/dist/infrastructure/adapter-pool.js.map +1 -0
  153. package/dist/infrastructure/backup/backup-service.d.ts +53 -0
  154. package/dist/infrastructure/backup/backup-service.d.ts.map +1 -0
  155. package/dist/infrastructure/backup/backup-service.js +158 -0
  156. package/dist/infrastructure/backup/backup-service.js.map +1 -0
  157. package/dist/infrastructure/backup/index.d.ts +2 -0
  158. package/dist/infrastructure/backup/index.d.ts.map +1 -0
  159. package/dist/infrastructure/backup/index.js +2 -0
  160. package/dist/infrastructure/backup/index.js.map +1 -0
  161. package/dist/infrastructure/config/index.d.ts +8 -0
  162. package/dist/infrastructure/config/index.d.ts.map +1 -0
  163. package/dist/infrastructure/config/index.js +7 -0
  164. package/dist/infrastructure/config/index.js.map +1 -0
  165. package/dist/infrastructure/config/loader.d.ts +555 -0
  166. package/dist/infrastructure/config/loader.d.ts.map +1 -0
  167. package/dist/infrastructure/config/loader.js +311 -0
  168. package/dist/infrastructure/config/loader.js.map +1 -0
  169. package/dist/infrastructure/database/checks.d.ts +19 -0
  170. package/dist/infrastructure/database/checks.d.ts.map +1 -0
  171. package/dist/infrastructure/database/checks.js +27 -0
  172. package/dist/infrastructure/database/checks.js.map +1 -0
  173. package/dist/infrastructure/database/compatibility.d.ts +36 -0
  174. package/dist/infrastructure/database/compatibility.d.ts.map +1 -0
  175. package/dist/infrastructure/database/compatibility.js +75 -0
  176. package/dist/infrastructure/database/compatibility.js.map +1 -0
  177. package/dist/infrastructure/database/connection.d.ts +36 -0
  178. package/dist/infrastructure/database/connection.d.ts.map +1 -0
  179. package/dist/infrastructure/database/connection.js +47 -0
  180. package/dist/infrastructure/database/connection.js.map +1 -0
  181. package/dist/infrastructure/database/id.d.ts +17 -0
  182. package/dist/infrastructure/database/id.d.ts.map +1 -0
  183. package/dist/infrastructure/database/id.js +20 -0
  184. package/dist/infrastructure/database/id.js.map +1 -0
  185. package/dist/infrastructure/database/index.d.ts +15 -0
  186. package/dist/infrastructure/database/index.d.ts.map +1 -0
  187. package/dist/infrastructure/database/index.js +12 -0
  188. package/dist/infrastructure/database/index.js.map +1 -0
  189. package/dist/infrastructure/database/migrate.d.ts +76 -0
  190. package/dist/infrastructure/database/migrate.d.ts.map +1 -0
  191. package/dist/infrastructure/database/migrate.js +1214 -0
  192. package/dist/infrastructure/database/migrate.js.map +1 -0
  193. package/dist/infrastructure/database/schema.d.ts +2352 -0
  194. package/dist/infrastructure/database/schema.d.ts.map +1 -0
  195. package/dist/infrastructure/database/schema.js +288 -0
  196. package/dist/infrastructure/database/schema.js.map +1 -0
  197. package/dist/infrastructure/jwt/index.d.ts +2 -0
  198. package/dist/infrastructure/jwt/index.d.ts.map +1 -0
  199. package/dist/infrastructure/jwt/index.js +2 -0
  200. package/dist/infrastructure/jwt/index.js.map +1 -0
  201. package/dist/infrastructure/jwt/jwt-secret-manager.d.ts +58 -0
  202. package/dist/infrastructure/jwt/jwt-secret-manager.d.ts.map +1 -0
  203. package/dist/infrastructure/jwt/jwt-secret-manager.js +222 -0
  204. package/dist/infrastructure/jwt/jwt-secret-manager.js.map +1 -0
  205. package/dist/infrastructure/keystore/crypto.d.ts +62 -0
  206. package/dist/infrastructure/keystore/crypto.d.ts.map +1 -0
  207. package/dist/infrastructure/keystore/crypto.js +89 -0
  208. package/dist/infrastructure/keystore/crypto.js.map +1 -0
  209. package/dist/infrastructure/keystore/index.d.ts +4 -0
  210. package/dist/infrastructure/keystore/index.d.ts.map +1 -0
  211. package/dist/infrastructure/keystore/index.js +5 -0
  212. package/dist/infrastructure/keystore/index.js.map +1 -0
  213. package/dist/infrastructure/keystore/keystore.d.ts +115 -0
  214. package/dist/infrastructure/keystore/keystore.d.ts.map +1 -0
  215. package/dist/infrastructure/keystore/keystore.js +327 -0
  216. package/dist/infrastructure/keystore/keystore.js.map +1 -0
  217. package/dist/infrastructure/keystore/memory.d.ts +45 -0
  218. package/dist/infrastructure/keystore/memory.d.ts.map +1 -0
  219. package/dist/infrastructure/keystore/memory.js +105 -0
  220. package/dist/infrastructure/keystore/memory.js.map +1 -0
  221. package/dist/infrastructure/oracle/coingecko-forex.d.ts +35 -0
  222. package/dist/infrastructure/oracle/coingecko-forex.d.ts.map +1 -0
  223. package/dist/infrastructure/oracle/coingecko-forex.js +69 -0
  224. package/dist/infrastructure/oracle/coingecko-forex.js.map +1 -0
  225. package/dist/infrastructure/oracle/coingecko-oracle.d.ts +73 -0
  226. package/dist/infrastructure/oracle/coingecko-oracle.d.ts.map +1 -0
  227. package/dist/infrastructure/oracle/coingecko-oracle.js +199 -0
  228. package/dist/infrastructure/oracle/coingecko-oracle.js.map +1 -0
  229. package/dist/infrastructure/oracle/coingecko-platform-ids.d.ts +32 -0
  230. package/dist/infrastructure/oracle/coingecko-platform-ids.d.ts.map +1 -0
  231. package/dist/infrastructure/oracle/coingecko-platform-ids.js +30 -0
  232. package/dist/infrastructure/oracle/coingecko-platform-ids.js.map +1 -0
  233. package/dist/infrastructure/oracle/forex-currencies.d.ts +36 -0
  234. package/dist/infrastructure/oracle/forex-currencies.d.ts.map +1 -0
  235. package/dist/infrastructure/oracle/forex-currencies.js +71 -0
  236. package/dist/infrastructure/oracle/forex-currencies.js.map +1 -0
  237. package/dist/infrastructure/oracle/forex-rate-service.d.ts +51 -0
  238. package/dist/infrastructure/oracle/forex-rate-service.d.ts.map +1 -0
  239. package/dist/infrastructure/oracle/forex-rate-service.js +149 -0
  240. package/dist/infrastructure/oracle/forex-rate-service.js.map +1 -0
  241. package/dist/infrastructure/oracle/index.d.ts +18 -0
  242. package/dist/infrastructure/oracle/index.d.ts.map +1 -0
  243. package/dist/infrastructure/oracle/index.js +19 -0
  244. package/dist/infrastructure/oracle/index.js.map +1 -0
  245. package/dist/infrastructure/oracle/oracle-chain.d.ts +101 -0
  246. package/dist/infrastructure/oracle/oracle-chain.d.ts.map +1 -0
  247. package/dist/infrastructure/oracle/oracle-chain.js +163 -0
  248. package/dist/infrastructure/oracle/oracle-chain.js.map +1 -0
  249. package/dist/infrastructure/oracle/oracle-errors.d.ts +42 -0
  250. package/dist/infrastructure/oracle/oracle-errors.d.ts.map +1 -0
  251. package/dist/infrastructure/oracle/oracle-errors.js +53 -0
  252. package/dist/infrastructure/oracle/oracle-errors.js.map +1 -0
  253. package/dist/infrastructure/oracle/price-age.d.ts +38 -0
  254. package/dist/infrastructure/oracle/price-age.d.ts.map +1 -0
  255. package/dist/infrastructure/oracle/price-age.js +44 -0
  256. package/dist/infrastructure/oracle/price-age.js.map +1 -0
  257. package/dist/infrastructure/oracle/price-cache.d.ts +99 -0
  258. package/dist/infrastructure/oracle/price-cache.d.ts.map +1 -0
  259. package/dist/infrastructure/oracle/price-cache.js +173 -0
  260. package/dist/infrastructure/oracle/price-cache.js.map +1 -0
  261. package/dist/infrastructure/oracle/pyth-feed-ids.d.ts +31 -0
  262. package/dist/infrastructure/oracle/pyth-feed-ids.d.ts.map +1 -0
  263. package/dist/infrastructure/oracle/pyth-feed-ids.js +44 -0
  264. package/dist/infrastructure/oracle/pyth-feed-ids.js.map +1 -0
  265. package/dist/infrastructure/oracle/pyth-oracle.d.ts +69 -0
  266. package/dist/infrastructure/oracle/pyth-oracle.d.ts.map +1 -0
  267. package/dist/infrastructure/oracle/pyth-oracle.js +149 -0
  268. package/dist/infrastructure/oracle/pyth-oracle.js.map +1 -0
  269. package/dist/infrastructure/settings/hot-reload.d.ts +71 -0
  270. package/dist/infrastructure/settings/hot-reload.d.ts.map +1 -0
  271. package/dist/infrastructure/settings/hot-reload.js +315 -0
  272. package/dist/infrastructure/settings/hot-reload.js.map +1 -0
  273. package/dist/infrastructure/settings/index.d.ts +13 -0
  274. package/dist/infrastructure/settings/index.d.ts.map +1 -0
  275. package/dist/infrastructure/settings/index.js +10 -0
  276. package/dist/infrastructure/settings/index.js.map +1 -0
  277. package/dist/infrastructure/settings/setting-keys.d.ts +28 -0
  278. package/dist/infrastructure/settings/setting-keys.d.ts.map +1 -0
  279. package/dist/infrastructure/settings/setting-keys.js +105 -0
  280. package/dist/infrastructure/settings/setting-keys.js.map +1 -0
  281. package/dist/infrastructure/settings/settings-crypto.d.ts +39 -0
  282. package/dist/infrastructure/settings/settings-crypto.d.ts.map +1 -0
  283. package/dist/infrastructure/settings/settings-crypto.js +73 -0
  284. package/dist/infrastructure/settings/settings-crypto.js.map +1 -0
  285. package/dist/infrastructure/settings/settings-service.d.ts +82 -0
  286. package/dist/infrastructure/settings/settings-service.d.ts.map +1 -0
  287. package/dist/infrastructure/settings/settings-service.js +267 -0
  288. package/dist/infrastructure/settings/settings-service.js.map +1 -0
  289. package/dist/infrastructure/telegram/index.d.ts +6 -0
  290. package/dist/infrastructure/telegram/index.d.ts.map +1 -0
  291. package/dist/infrastructure/telegram/index.js +5 -0
  292. package/dist/infrastructure/telegram/index.js.map +1 -0
  293. package/dist/infrastructure/telegram/telegram-api.d.ts +35 -0
  294. package/dist/infrastructure/telegram/telegram-api.d.ts.map +1 -0
  295. package/dist/infrastructure/telegram/telegram-api.js +82 -0
  296. package/dist/infrastructure/telegram/telegram-api.js.map +1 -0
  297. package/dist/infrastructure/telegram/telegram-auth.d.ts +57 -0
  298. package/dist/infrastructure/telegram/telegram-auth.d.ts.map +1 -0
  299. package/dist/infrastructure/telegram/telegram-auth.js +88 -0
  300. package/dist/infrastructure/telegram/telegram-auth.js.map +1 -0
  301. package/dist/infrastructure/telegram/telegram-bot-service.d.ts +95 -0
  302. package/dist/infrastructure/telegram/telegram-bot-service.d.ts.map +1 -0
  303. package/dist/infrastructure/telegram/telegram-bot-service.js +564 -0
  304. package/dist/infrastructure/telegram/telegram-bot-service.js.map +1 -0
  305. package/dist/infrastructure/telegram/telegram-keyboard.d.ts +27 -0
  306. package/dist/infrastructure/telegram/telegram-keyboard.d.ts.map +1 -0
  307. package/dist/infrastructure/telegram/telegram-keyboard.js +52 -0
  308. package/dist/infrastructure/telegram/telegram-keyboard.js.map +1 -0
  309. package/dist/infrastructure/telegram/telegram-types.d.ts +43 -0
  310. package/dist/infrastructure/telegram/telegram-types.d.ts.map +1 -0
  311. package/dist/infrastructure/telegram/telegram-types.js +8 -0
  312. package/dist/infrastructure/telegram/telegram-types.js.map +1 -0
  313. package/dist/infrastructure/token-registry/builtin-tokens.d.ts +39 -0
  314. package/dist/infrastructure/token-registry/builtin-tokens.d.ts.map +1 -0
  315. package/dist/infrastructure/token-registry/builtin-tokens.js +135 -0
  316. package/dist/infrastructure/token-registry/builtin-tokens.js.map +1 -0
  317. package/dist/infrastructure/token-registry/index.d.ts +8 -0
  318. package/dist/infrastructure/token-registry/index.d.ts.map +1 -0
  319. package/dist/infrastructure/token-registry/index.js +8 -0
  320. package/dist/infrastructure/token-registry/index.js.map +1 -0
  321. package/dist/infrastructure/token-registry/token-registry-service.d.ts +49 -0
  322. package/dist/infrastructure/token-registry/token-registry-service.d.ts.map +1 -0
  323. package/dist/infrastructure/token-registry/token-registry-service.js +93 -0
  324. package/dist/infrastructure/token-registry/token-registry-service.js.map +1 -0
  325. package/dist/infrastructure/version/index.d.ts +5 -0
  326. package/dist/infrastructure/version/index.d.ts.map +1 -0
  327. package/dist/infrastructure/version/index.js +5 -0
  328. package/dist/infrastructure/version/index.js.map +1 -0
  329. package/dist/infrastructure/version/version-check-service.d.ts +35 -0
  330. package/dist/infrastructure/version/version-check-service.d.ts.map +1 -0
  331. package/dist/infrastructure/version/version-check-service.js +92 -0
  332. package/dist/infrastructure/version/version-check-service.js.map +1 -0
  333. package/dist/lifecycle/daemon.d.ts +103 -0
  334. package/dist/lifecycle/daemon.d.ts.map +1 -0
  335. package/dist/lifecycle/daemon.js +934 -0
  336. package/dist/lifecycle/daemon.js.map +1 -0
  337. package/dist/lifecycle/index.d.ts +9 -0
  338. package/dist/lifecycle/index.d.ts.map +1 -0
  339. package/dist/lifecycle/index.js +9 -0
  340. package/dist/lifecycle/index.js.map +1 -0
  341. package/dist/lifecycle/signal-handler.d.ts +18 -0
  342. package/dist/lifecycle/signal-handler.d.ts.map +1 -0
  343. package/dist/lifecycle/signal-handler.js +37 -0
  344. package/dist/lifecycle/signal-handler.js.map +1 -0
  345. package/dist/lifecycle/workers.d.ts +46 -0
  346. package/dist/lifecycle/workers.d.ts.map +1 -0
  347. package/dist/lifecycle/workers.js +101 -0
  348. package/dist/lifecycle/workers.js.map +1 -0
  349. package/dist/notifications/channels/discord.d.ts +10 -0
  350. package/dist/notifications/channels/discord.d.ts.map +1 -0
  351. package/dist/notifications/channels/discord.js +54 -0
  352. package/dist/notifications/channels/discord.js.map +1 -0
  353. package/dist/notifications/channels/ntfy.d.ts +13 -0
  354. package/dist/notifications/channels/ntfy.d.ts.map +1 -0
  355. package/dist/notifications/channels/ntfy.js +58 -0
  356. package/dist/notifications/channels/ntfy.js.map +1 -0
  357. package/dist/notifications/channels/slack.d.ts +10 -0
  358. package/dist/notifications/channels/slack.d.ts.map +1 -0
  359. package/dist/notifications/channels/slack.js +55 -0
  360. package/dist/notifications/channels/slack.js.map +1 -0
  361. package/dist/notifications/channels/telegram.d.ts +10 -0
  362. package/dist/notifications/channels/telegram.d.ts.map +1 -0
  363. package/dist/notifications/channels/telegram.js +40 -0
  364. package/dist/notifications/channels/telegram.js.map +1 -0
  365. package/dist/notifications/index.d.ts +9 -0
  366. package/dist/notifications/index.d.ts.map +1 -0
  367. package/dist/notifications/index.js +7 -0
  368. package/dist/notifications/index.js.map +1 -0
  369. package/dist/notifications/notification-service.d.ts +75 -0
  370. package/dist/notifications/notification-service.d.ts.map +1 -0
  371. package/dist/notifications/notification-service.js +213 -0
  372. package/dist/notifications/notification-service.js.map +1 -0
  373. package/dist/notifications/templates/message-templates.d.ts +12 -0
  374. package/dist/notifications/templates/message-templates.d.ts.map +1 -0
  375. package/dist/notifications/templates/message-templates.js +22 -0
  376. package/dist/notifications/templates/message-templates.js.map +1 -0
  377. package/dist/pipeline/database-policy-engine.d.ts +286 -0
  378. package/dist/pipeline/database-policy-engine.d.ts.map +1 -0
  379. package/dist/pipeline/database-policy-engine.js +992 -0
  380. package/dist/pipeline/database-policy-engine.js.map +1 -0
  381. package/dist/pipeline/default-policy-engine.d.ts +26 -0
  382. package/dist/pipeline/default-policy-engine.d.ts.map +1 -0
  383. package/dist/pipeline/default-policy-engine.js +25 -0
  384. package/dist/pipeline/default-policy-engine.js.map +1 -0
  385. package/dist/pipeline/index.d.ts +9 -0
  386. package/dist/pipeline/index.d.ts.map +1 -0
  387. package/dist/pipeline/index.js +9 -0
  388. package/dist/pipeline/index.js.map +1 -0
  389. package/dist/pipeline/network-resolver.d.ts +22 -0
  390. package/dist/pipeline/network-resolver.d.ts.map +1 -0
  391. package/dist/pipeline/network-resolver.js +32 -0
  392. package/dist/pipeline/network-resolver.js.map +1 -0
  393. package/dist/pipeline/pipeline.d.ts +72 -0
  394. package/dist/pipeline/pipeline.d.ts.map +1 -0
  395. package/dist/pipeline/pipeline.js +87 -0
  396. package/dist/pipeline/pipeline.js.map +1 -0
  397. package/dist/pipeline/resolve-effective-amount-usd.d.ts +41 -0
  398. package/dist/pipeline/resolve-effective-amount-usd.d.ts.map +1 -0
  399. package/dist/pipeline/resolve-effective-amount-usd.js +208 -0
  400. package/dist/pipeline/resolve-effective-amount-usd.js.map +1 -0
  401. package/dist/pipeline/sign-only.d.ts +99 -0
  402. package/dist/pipeline/sign-only.d.ts.map +1 -0
  403. package/dist/pipeline/sign-only.js +267 -0
  404. package/dist/pipeline/sign-only.js.map +1 -0
  405. package/dist/pipeline/sleep.d.ts +6 -0
  406. package/dist/pipeline/sleep.d.ts.map +1 -0
  407. package/dist/pipeline/sleep.js +8 -0
  408. package/dist/pipeline/sleep.js.map +1 -0
  409. package/dist/pipeline/stages.d.ts +82 -0
  410. package/dist/pipeline/stages.d.ts.map +1 -0
  411. package/dist/pipeline/stages.js +784 -0
  412. package/dist/pipeline/stages.js.map +1 -0
  413. package/dist/services/autostop-rules.d.ts +79 -0
  414. package/dist/services/autostop-rules.d.ts.map +1 -0
  415. package/dist/services/autostop-rules.js +174 -0
  416. package/dist/services/autostop-rules.js.map +1 -0
  417. package/dist/services/autostop-service.d.ts +82 -0
  418. package/dist/services/autostop-service.d.ts.map +1 -0
  419. package/dist/services/autostop-service.js +223 -0
  420. package/dist/services/autostop-service.js.map +1 -0
  421. package/dist/services/kill-switch-service.d.ts +118 -0
  422. package/dist/services/kill-switch-service.d.ts.map +1 -0
  423. package/dist/services/kill-switch-service.js +291 -0
  424. package/dist/services/kill-switch-service.js.map +1 -0
  425. package/dist/services/monitoring/balance-monitor-service.d.ts +65 -0
  426. package/dist/services/monitoring/balance-monitor-service.d.ts.map +1 -0
  427. package/dist/services/monitoring/balance-monitor-service.js +207 -0
  428. package/dist/services/monitoring/balance-monitor-service.js.map +1 -0
  429. package/dist/services/wc-session-service.d.ts +123 -0
  430. package/dist/services/wc-session-service.d.ts.map +1 -0
  431. package/dist/services/wc-session-service.js +363 -0
  432. package/dist/services/wc-session-service.js.map +1 -0
  433. package/dist/services/wc-signing-bridge.d.ts +60 -0
  434. package/dist/services/wc-signing-bridge.d.ts.map +1 -0
  435. package/dist/services/wc-signing-bridge.js +334 -0
  436. package/dist/services/wc-signing-bridge.js.map +1 -0
  437. package/dist/services/wc-storage.d.ts +32 -0
  438. package/dist/services/wc-storage.d.ts.map +1 -0
  439. package/dist/services/wc-storage.js +64 -0
  440. package/dist/services/wc-storage.js.map +1 -0
  441. package/dist/services/x402/payment-signer.d.ts +88 -0
  442. package/dist/services/x402/payment-signer.d.ts.map +1 -0
  443. package/dist/services/x402/payment-signer.js +311 -0
  444. package/dist/services/x402/payment-signer.js.map +1 -0
  445. package/dist/services/x402/ssrf-guard.d.ts +27 -0
  446. package/dist/services/x402/ssrf-guard.d.ts.map +1 -0
  447. package/dist/services/x402/ssrf-guard.js +236 -0
  448. package/dist/services/x402/ssrf-guard.js.map +1 -0
  449. package/dist/services/x402/x402-domain-policy.d.ts +50 -0
  450. package/dist/services/x402/x402-domain-policy.d.ts.map +1 -0
  451. package/dist/services/x402/x402-domain-policy.js +78 -0
  452. package/dist/services/x402/x402-domain-policy.js.map +1 -0
  453. package/dist/services/x402/x402-handler.d.ts +71 -0
  454. package/dist/services/x402/x402-handler.d.ts.map +1 -0
  455. package/dist/services/x402/x402-handler.js +195 -0
  456. package/dist/services/x402/x402-handler.js.map +1 -0
  457. package/dist/services/x402/x402-usd-resolver.d.ts +26 -0
  458. package/dist/services/x402/x402-usd-resolver.d.ts.map +1 -0
  459. package/dist/services/x402/x402-usd-resolver.js +79 -0
  460. package/dist/services/x402/x402-usd-resolver.js.map +1 -0
  461. package/dist/workflow/approval-workflow.d.ts +103 -0
  462. package/dist/workflow/approval-workflow.d.ts.map +1 -0
  463. package/dist/workflow/approval-workflow.js +202 -0
  464. package/dist/workflow/approval-workflow.js.map +1 -0
  465. package/dist/workflow/delay-queue.d.ts +78 -0
  466. package/dist/workflow/delay-queue.d.ts.map +1 -0
  467. package/dist/workflow/delay-queue.js +174 -0
  468. package/dist/workflow/delay-queue.js.map +1 -0
  469. package/dist/workflow/index.d.ts +11 -0
  470. package/dist/workflow/index.d.ts.map +1 -0
  471. package/dist/workflow/index.js +9 -0
  472. package/dist/workflow/index.js.map +1 -0
  473. package/dist/workflow/owner-state.d.ts +97 -0
  474. package/dist/workflow/owner-state.d.ts.map +1 -0
  475. package/dist/workflow/owner-state.js +168 -0
  476. package/dist/workflow/owner-state.js.map +1 -0
  477. package/package.json +71 -0
  478. package/public/admin/assets/index-BPoUSH8W.css +1 -0
  479. package/public/admin/assets/index-CDi1qoXB.js +1 -0
  480. package/public/admin/index.html +13 -0
@@ -0,0 +1,149 @@
1
+ import { buildCacheKey } from './price-cache.js';
2
+ import { getFeedId } from './pyth-feed-ids.js';
3
+ import { PriceNotAvailableError } from './oracle-errors.js';
4
+ // Re-export for backwards compatibility
5
+ export { PriceNotAvailableError } from './oracle-errors.js';
6
+ // ---------------------------------------------------------------------------
7
+ // PythOracle
8
+ // ---------------------------------------------------------------------------
9
+ /**
10
+ * Price oracle backed by the Pyth Hermes REST API.
11
+ *
12
+ * Implements IPriceOracle with pure API-call semantics (no caching).
13
+ * Supports single and batch price queries via the `/v2/updates/price/latest`
14
+ * endpoint.
15
+ */
16
+ export class PythOracle {
17
+ static HERMES_BASE_URL = 'https://hermes.pyth.network';
18
+ static TIMEOUT_MS = 5000;
19
+ static PRICE_TTL_MS = 300_000; // 5 minutes
20
+ /**
21
+ * Get price for a single token.
22
+ *
23
+ * @param token - Token reference with address, decimals, and chain.
24
+ * @returns PriceInfo with USD price, confidence, and metadata.
25
+ * @throws PriceNotAvailableError if token has no registered Pyth feed ID.
26
+ * @throws Error if Pyth API returns HTTP error or invalid response.
27
+ */
28
+ async getPrice(token) {
29
+ const cacheKey = buildCacheKey(token.chain, token.address);
30
+ const feedId = getFeedId(cacheKey);
31
+ if (!feedId) {
32
+ throw new PriceNotAvailableError(cacheKey);
33
+ }
34
+ const url = `${PythOracle.HERMES_BASE_URL}/v2/updates/price/latest` +
35
+ `?ids[]=0x${feedId}` +
36
+ `&parsed=true`;
37
+ const res = await fetch(url, {
38
+ signal: AbortSignal.timeout(PythOracle.TIMEOUT_MS),
39
+ });
40
+ if (!res.ok) {
41
+ throw new Error(`Pyth API error: ${res.status} ${res.statusText ?? ''}`);
42
+ }
43
+ const data = (await res.json());
44
+ const feed = data.parsed?.[0];
45
+ if (!feed?.price) {
46
+ throw new Error(`Pyth API returned no price data for feed ${feedId}`);
47
+ }
48
+ return PythOracle.convertFeedToPrice(feed);
49
+ }
50
+ /**
51
+ * Get prices for multiple tokens in a single batch API call.
52
+ *
53
+ * Tokens without a registered feed ID are silently skipped (they will be
54
+ * handled by OracleChain's fallback).
55
+ *
56
+ * @param tokens - Array of token references.
57
+ * @returns Map from cache key to PriceInfo for tokens that have feed IDs.
58
+ */
59
+ async getPrices(tokens) {
60
+ const result = new Map();
61
+ // Build feed ID -> cacheKey reverse mapping
62
+ const feedToCacheKey = new Map();
63
+ const feedIds = [];
64
+ for (const token of tokens) {
65
+ const cacheKey = buildCacheKey(token.chain, token.address);
66
+ const feedId = getFeedId(cacheKey);
67
+ if (feedId) {
68
+ feedToCacheKey.set(feedId, cacheKey);
69
+ feedIds.push(feedId);
70
+ }
71
+ }
72
+ if (feedIds.length === 0) {
73
+ return result;
74
+ }
75
+ // Build batch URL with multiple ids[] parameters
76
+ const params = feedIds.map((id) => `ids[]=0x${id}`).join('&');
77
+ const url = `${PythOracle.HERMES_BASE_URL}/v2/updates/price/latest?${params}&parsed=true`;
78
+ const res = await fetch(url, {
79
+ signal: AbortSignal.timeout(PythOracle.TIMEOUT_MS),
80
+ });
81
+ if (!res.ok) {
82
+ throw new Error(`Pyth API error: ${res.status} ${res.statusText ?? ''}`);
83
+ }
84
+ const data = (await res.json());
85
+ for (const feed of data.parsed ?? []) {
86
+ if (!feed?.price)
87
+ continue;
88
+ // Reverse-map feed.id to cache key
89
+ const cacheKey = feedToCacheKey.get(feed.id);
90
+ if (!cacheKey)
91
+ continue;
92
+ result.set(cacheKey, PythOracle.convertFeedToPrice(feed));
93
+ }
94
+ return result;
95
+ }
96
+ /**
97
+ * Get native token price (SOL or ETH).
98
+ *
99
+ * @param chain - Chain type ('solana' or 'ethereum').
100
+ * @returns PriceInfo for the chain's native token.
101
+ * @throws PriceNotAvailableError if chain has no native feed mapping.
102
+ */
103
+ async getNativePrice(chain) {
104
+ const decimals = chain === 'solana' ? 9 : 18;
105
+ return this.getPrice({ address: 'native', decimals, chain });
106
+ }
107
+ /**
108
+ * Get cache statistics.
109
+ *
110
+ * PythOracle does not manage its own cache (OracleChain handles caching),
111
+ * so all counters are zero.
112
+ */
113
+ getCacheStats() {
114
+ return {
115
+ hits: 0,
116
+ misses: 0,
117
+ staleHits: 0,
118
+ size: 0,
119
+ evictions: 0,
120
+ };
121
+ }
122
+ // ---------------------------------------------------------------------------
123
+ // Private helpers
124
+ // ---------------------------------------------------------------------------
125
+ /**
126
+ * Convert a Pyth price feed to PriceInfo.
127
+ *
128
+ * Price formula: usdPrice = Number(price) * 10^expo
129
+ * Confidence: 1 - (confUsd / usdPrice) clamped to [0, 1]
130
+ */
131
+ static convertFeedToPrice(feed) {
132
+ const rawPrice = Number(feed.price.price);
133
+ const expo = feed.price.expo;
134
+ const usdPrice = rawPrice * Math.pow(10, expo);
135
+ const rawConf = Number(feed.price.conf);
136
+ const confUsd = rawConf * Math.pow(10, expo);
137
+ const confidence = usdPrice > 0 ? Math.max(0, 1 - confUsd / usdPrice) : undefined;
138
+ const now = Date.now();
139
+ return {
140
+ usdPrice,
141
+ confidence,
142
+ source: 'pyth',
143
+ fetchedAt: now,
144
+ expiresAt: now + PythOracle.PRICE_TTL_MS,
145
+ isStale: false,
146
+ };
147
+ }
148
+ }
149
+ //# sourceMappingURL=pyth-oracle.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"pyth-oracle.js","sourceRoot":"","sources":["../../../src/infrastructure/oracle/pyth-oracle.ts"],"names":[],"mappings":"AAcA,OAAO,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAC;AACjD,OAAO,EAAE,SAAS,EAAE,MAAM,oBAAoB,CAAC;AAC/C,OAAO,EAAE,sBAAsB,EAAE,MAAM,oBAAoB,CAAC;AAE5D,wCAAwC;AACxC,OAAO,EAAE,sBAAsB,EAAE,MAAM,oBAAoB,CAAC;AA0B5D,8EAA8E;AAC9E,aAAa;AACb,8EAA8E;AAE9E;;;;;;GAMG;AACH,MAAM,OAAO,UAAU;IACb,MAAM,CAAU,eAAe,GAAG,6BAA6B,CAAC;IAChE,MAAM,CAAU,UAAU,GAAG,IAAI,CAAC;IAClC,MAAM,CAAU,YAAY,GAAG,OAAO,CAAC,CAAC,YAAY;IAE5D;;;;;;;OAOG;IACH,KAAK,CAAC,QAAQ,CAAC,KAAe;QAC5B,MAAM,QAAQ,GAAG,aAAa,CAAC,KAAK,CAAC,KAAK,EAAE,KAAK,CAAC,OAAO,CAAC,CAAC;QAC3D,MAAM,MAAM,GAAG,SAAS,CAAC,QAAQ,C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AC;QACvB,OAAO;YACL,QAAQ;YACR,UAAU;YACV,MAAM,EAAE,MAAe;YACvB,SAAS,EAAE,GAAG;YACd,SAAS,EAAE,GAAG,GAAG,UAAU,CAAC,YAAY;YACxC,OAAO,EAAE,KAAK;SACf,CAAC;IACJ,CAAC"}
@@ -0,0 +1,71 @@
1
+ /**
2
+ * HotReloadOrchestrator: dispatches settings changes to subsystem reloaders.
3
+ *
4
+ * When PUT /admin/settings modifies keys, this orchestrator determines which
5
+ * subsystems need reloading and triggers the appropriate reload functions.
6
+ *
7
+ * Subsystem reload is fire-and-forget: errors are caught and logged,
8
+ * never propagated to the API response (settings are already saved to DB).
9
+ */
10
+ import type { Database } from 'better-sqlite3';
11
+ import type { NotificationService } from '../../notifications/notification-service.js';
12
+ import type { AdapterPool } from '../adapter-pool.js';
13
+ import type { SettingsService } from './settings-service.js';
14
+ import type { AutoStopService } from '../../services/autostop-service.js';
15
+ import type { BalanceMonitorService } from '../../services/monitoring/balance-monitor-service.js';
16
+ import type { WcServiceRef } from '../../services/wc-session-service.js';
17
+ import type { TelegramBotService } from '../telegram/telegram-bot-service.js';
18
+ import type { KillSwitchService } from '../../services/kill-switch-service.js';
19
+ export interface HotReloadDeps {
20
+ settingsService: SettingsService;
21
+ notificationService?: NotificationService | null;
22
+ adapterPool?: AdapterPool | null;
23
+ autoStopService?: AutoStopService | null;
24
+ balanceMonitorService?: BalanceMonitorService | null;
25
+ wcServiceRef?: WcServiceRef | null;
26
+ sqlite?: Database | null;
27
+ /** Mutable ref for Telegram Bot hot-reload */
28
+ telegramBotRef?: {
29
+ current: TelegramBotService | null;
30
+ };
31
+ killSwitchService?: KillSwitchService | null;
32
+ }
33
+ export declare class HotReloadOrchestrator {
34
+ private deps;
35
+ constructor(deps: HotReloadDeps);
36
+ /**
37
+ * Handle changed settings keys. Determines affected subsystems and triggers reload.
38
+ * Fire-and-forget: errors logged but never thrown.
39
+ */
40
+ handleChangedKeys(changedKeys: string[]): Promise<void>;
41
+ /**
42
+ * Reload notification channels with current settings from SettingsService.
43
+ */
44
+ private reloadNotifications;
45
+ /**
46
+ * Reload AutoStop engine with current settings from SettingsService.
47
+ * Synchronous: reads new values and calls autoStopService.updateConfig().
48
+ */
49
+ private reloadAutoStop;
50
+ /**
51
+ * Reload Balance Monitor with current settings from SettingsService.
52
+ * Synchronous: reads new values and calls balanceMonitorService.updateConfig().
53
+ */
54
+ private reloadBalanceMonitor;
55
+ /**
56
+ * Reload WalletConnect by shutting down old SignClient and re-initializing.
57
+ * Uses the mutable WcServiceRef so route handlers pick up the new instance.
58
+ */
59
+ private reloadWalletConnect;
60
+ /**
61
+ * Reload Telegram Bot by stopping the old instance and creating a new one.
62
+ * Uses the mutable telegramBotRef so daemon keeps a live reference.
63
+ */
64
+ private reloadTelegramBot;
65
+ /**
66
+ * Reload RPC adapters by evicting changed network adapters from the pool.
67
+ * Next request for that chain:network will lazy-create a new adapter with the new URL.
68
+ */
69
+ private reloadRpc;
70
+ }
71
+ //# sourceMappingURL=hot-reload.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"hot-reload.d.ts","sourceRoot":"","sources":["../../../src/infrastructure/settings/hot-reload.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAEH,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,gBAAgB,CAAC;AAE/C,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,6CAA6C,CAAC;AACvF,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,oBAAoB,CAAC;AACtD,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,uBAAuB,CAAC;AAC7D,OAAO,KAAK,EAAE,eAAe,EAAkB,MAAM,oCAAoC,CAAC;AAC1F,OAAO,KAAK,EAAE,qBAAqB,EAAwB,MAAM,sDAAsD,CAAC;AACxH,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,sCAAsC,CAAC;AACzE,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,qCAAqC,CAAC;AAC9E,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,uCAAuC,CAAC;AAM/E,MAAM,WAAW,aAAa;IAC5B,eAAe,EAAE,eAAe,CAAC;IACjC,mBAAmB,CAAC,EAAE,mBAAmB,GAAG,IAAI,CAAC;IACjD,WAAW,CAAC,EAAE,WAAW,GAAG,IAAI,CAAC;IACjC,eAAe,CAAC,EAAE,eAAe,GAAG,IAAI,CAAC;IACzC,qBAAqB,CAAC,EAAE,qBAAqB,GAAG,IAAI,CAAC;IACrD,YAAY,CAAC,EAAE,YAAY,GAAG,IAAI,CAAC;IACnC,MAAM,CAAC,EAAE,QAAQ,GAAG,IAAI,CAAC;IACzB,8CAA8C;IAC9C,cAAc,CAAC,EAAE;QAAE,OAAO,EAAE,kBAAkB,GAAG,IAAI,CAAA;KAAE,CAAC;IACxD,iBAAiB,CAAC,EAAE,iBAAiB,GAAG,IAAI,CAAC;CAC9C;AAqDD,qBAAa,qBAAqB;IAChC,OAAO,CAAC,IAAI,CAAgB;gBAEhB,IAAI,EAAE,aAAa;IAI/B;;;OAGG;IACG,iBAAiB,CAAC,WAAW,EAAE,MAAM,EAAE,GAAG,OAAO,CAAC,IAAI,CAAC;IA6E7D;;OAEG;YACW,mBAAmB;IAkEjC;;;OAGG;IACH,OAAO,CAAC,cAAc;IAkBtB;;;OAGG;IACH,OAAO,CAAC,oBAAoB;IAiB5B;;;OAGG;YACW,mBAAmB;IAmCjC;;;OAGG;YACW,iBAAiB;IA0C/B;;;OAGG;YACW,SAAS;CAsBxB"}
@@ -0,0 +1,315 @@
1
+ /**
2
+ * HotReloadOrchestrator: dispatches settings changes to subsystem reloaders.
3
+ *
4
+ * When PUT /admin/settings modifies keys, this orchestrator determines which
5
+ * subsystems need reloading and triggers the appropriate reload functions.
6
+ *
7
+ * Subsystem reload is fire-and-forget: errors are caught and logged,
8
+ * never propagated to the API response (settings are already saved to DB).
9
+ */
10
+ // ---------------------------------------------------------------------------
11
+ // Category to key mapping for change detection
12
+ // ---------------------------------------------------------------------------
13
+ const NOTIFICATION_KEYS = new Set([
14
+ 'notifications.enabled',
15
+ 'notifications.telegram_bot_token',
16
+ 'notifications.telegram_chat_id',
17
+ 'notifications.discord_webhook_url',
18
+ 'notifications.ntfy_server',
19
+ 'notifications.ntfy_topic',
20
+ 'notifications.slack_webhook_url',
21
+ 'notifications.locale',
22
+ 'notifications.rate_limit_rpm',
23
+ ]);
24
+ const RPC_KEYS_PREFIX = 'rpc.';
25
+ const DISPLAY_KEYS = new Set(['display.currency']);
26
+ const SECURITY_KEYS = new Set([
27
+ 'security.session_ttl',
28
+ 'security.max_sessions_per_wallet',
29
+ 'security.max_pending_tx',
30
+ 'security.rate_limit_global_ip_rpm',
31
+ 'security.rate_limit_session_rpm',
32
+ 'security.rate_limit_tx_rpm',
33
+ 'security.policy_defaults_delay_seconds',
34
+ 'security.policy_defaults_approval_timeout',
35
+ 'policy.default_deny_tokens',
36
+ 'policy.default_deny_contracts',
37
+ 'policy.default_deny_spenders',
38
+ ]);
39
+ const AUTOSTOP_KEYS_PREFIX = 'autostop.';
40
+ const MONITORING_KEYS_PREFIX = 'monitoring.';
41
+ const WALLETCONNECT_KEYS_PREFIX = 'walletconnect.';
42
+ const TELEGRAM_BOT_KEYS = new Set([
43
+ 'telegram.enabled',
44
+ 'telegram.bot_token',
45
+ 'telegram.locale',
46
+ 'notifications.telegram_bot_token', // shared token triggers bot reload too
47
+ ]);
48
+ // ---------------------------------------------------------------------------
49
+ // HotReloadOrchestrator
50
+ // ---------------------------------------------------------------------------
51
+ export class HotReloadOrchestrator {
52
+ deps;
53
+ constructor(deps) {
54
+ this.deps = deps;
55
+ }
56
+ /**
57
+ * Handle changed settings keys. Determines affected subsystems and triggers reload.
58
+ * Fire-and-forget: errors logged but never thrown.
59
+ */
60
+ async handleChangedKeys(changedKeys) {
61
+ if (changedKeys.length === 0)
62
+ return;
63
+ const hasNotificationChanges = changedKeys.some((k) => NOTIFICATION_KEYS.has(k));
64
+ const hasRpcChanges = changedKeys.some((k) => k.startsWith(RPC_KEYS_PREFIX));
65
+ const hasSecurityChanges = changedKeys.some((k) => SECURITY_KEYS.has(k));
66
+ const hasDisplayChanges = changedKeys.some((k) => DISPLAY_KEYS.has(k));
67
+ const hasAutostopChanges = changedKeys.some((k) => k.startsWith(AUTOSTOP_KEYS_PREFIX));
68
+ const hasMonitoringChanges = changedKeys.some((k) => k.startsWith(MONITORING_KEYS_PREFIX));
69
+ const hasWalletConnectChanges = changedKeys.some((k) => k.startsWith(WALLETCONNECT_KEYS_PREFIX));
70
+ const hasTelegramBotChanges = changedKeys.some((k) => TELEGRAM_BOT_KEYS.has(k));
71
+ const reloads = [];
72
+ if (hasNotificationChanges) {
73
+ reloads.push(this.reloadNotifications().catch((err) => {
74
+ console.warn('Hot-reload notifications failed:', err);
75
+ }));
76
+ }
77
+ if (hasRpcChanges) {
78
+ reloads.push(this.reloadRpc(changedKeys.filter((k) => k.startsWith(RPC_KEYS_PREFIX))).catch((err) => {
79
+ console.warn('Hot-reload RPC failed:', err);
80
+ }));
81
+ }
82
+ if (hasSecurityChanges) {
83
+ // Security reload is synchronous (just read new values on next request)
84
+ // No action needed -- SettingsService.get() already reads from DB first
85
+ console.log('Hot-reload: Security parameters updated (effective on next request)');
86
+ }
87
+ if (hasDisplayChanges) {
88
+ // Display currency reload is synchronous -- SettingsService.get() reads from DB directly
89
+ // No subsystem restart needed; next read picks up the new value immediately
90
+ console.log('Hot-reload: Display currency updated (effective immediately)');
91
+ }
92
+ if (hasAutostopChanges) {
93
+ try {
94
+ this.reloadAutoStop();
95
+ }
96
+ catch (err) {
97
+ console.warn('Hot-reload autostop failed:', err);
98
+ }
99
+ }
100
+ if (hasMonitoringChanges) {
101
+ try {
102
+ this.reloadBalanceMonitor();
103
+ }
104
+ catch (err) {
105
+ console.warn('Hot-reload balance monitor failed:', err);
106
+ }
107
+ }
108
+ if (hasWalletConnectChanges) {
109
+ reloads.push(this.reloadWalletConnect().catch((err) => {
110
+ console.warn('Hot-reload WalletConnect failed:', err);
111
+ }));
112
+ }
113
+ if (hasTelegramBotChanges) {
114
+ reloads.push(this.reloadTelegramBot().catch((err) => {
115
+ console.warn('Hot-reload Telegram Bot failed:', err);
116
+ }));
117
+ }
118
+ await Promise.all(reloads);
119
+ }
120
+ /**
121
+ * Reload notification channels with current settings from SettingsService.
122
+ */
123
+ async reloadNotifications() {
124
+ const svc = this.deps.notificationService;
125
+ if (!svc)
126
+ return;
127
+ const ss = this.deps.settingsService;
128
+ const enabled = ss.get('notifications.enabled') === 'true';
129
+ if (!enabled) {
130
+ svc.replaceChannels([]);
131
+ console.log('Hot-reload: Notifications disabled, channels cleared');
132
+ return;
133
+ }
134
+ // Dynamically import channel constructors (same pattern as daemon.ts Step 4d)
135
+ const { TelegramChannel, DiscordChannel, NtfyChannel, SlackChannel } = await import('../../notifications/index.js');
136
+ const newChannels = [];
137
+ // Telegram
138
+ const tgToken = ss.get('notifications.telegram_bot_token');
139
+ const tgChatId = ss.get('notifications.telegram_chat_id');
140
+ if (tgToken && tgChatId) {
141
+ const telegram = new TelegramChannel();
142
+ await telegram.initialize({ telegram_bot_token: tgToken, telegram_chat_id: tgChatId });
143
+ newChannels.push(telegram);
144
+ }
145
+ // Discord
146
+ const discordUrl = ss.get('notifications.discord_webhook_url');
147
+ if (discordUrl) {
148
+ const discord = new DiscordChannel();
149
+ await discord.initialize({ discord_webhook_url: discordUrl });
150
+ newChannels.push(discord);
151
+ }
152
+ // Ntfy
153
+ const ntfyTopic = ss.get('notifications.ntfy_topic');
154
+ if (ntfyTopic) {
155
+ const ntfyServer = ss.get('notifications.ntfy_server');
156
+ const ntfy = new NtfyChannel();
157
+ await ntfy.initialize({ ntfy_server: ntfyServer, ntfy_topic: ntfyTopic });
158
+ newChannels.push(ntfy);
159
+ }
160
+ // Slack
161
+ const slackUrl = ss.get('notifications.slack_webhook_url');
162
+ if (slackUrl) {
163
+ const slack = new SlackChannel();
164
+ await slack.initialize({ slack_webhook_url: slackUrl });
165
+ newChannels.push(slack);
166
+ }
167
+ svc.replaceChannels(newChannels);
168
+ // Update config (locale, rate limit)
169
+ const locale = ss.get('notifications.locale');
170
+ const rateLimitRpm = parseInt(ss.get('notifications.rate_limit_rpm'), 10) || 20;
171
+ svc.updateConfig({ locale, rateLimitRpm });
172
+ console.log(`Hot-reload: Notifications reloaded (${newChannels.length} channels: ${newChannels.map((c) => c.name).join(', ') || 'none'})`);
173
+ }
174
+ /**
175
+ * Reload AutoStop engine with current settings from SettingsService.
176
+ * Synchronous: reads new values and calls autoStopService.updateConfig().
177
+ */
178
+ reloadAutoStop() {
179
+ const svc = this.deps.autoStopService;
180
+ if (!svc)
181
+ return;
182
+ const ss = this.deps.settingsService;
183
+ const newConfig = {
184
+ consecutiveFailuresThreshold: parseInt(ss.get('autostop.consecutive_failures_threshold'), 10),
185
+ unusualActivityThreshold: parseInt(ss.get('autostop.unusual_activity_threshold'), 10),
186
+ unusualActivityWindowSec: parseInt(ss.get('autostop.unusual_activity_window_sec'), 10),
187
+ idleTimeoutSec: parseInt(ss.get('autostop.idle_timeout_sec'), 10),
188
+ idleCheckIntervalSec: parseInt(ss.get('autostop.idle_check_interval_sec'), 10),
189
+ enabled: ss.get('autostop.enabled') === 'true',
190
+ };
191
+ svc.updateConfig(newConfig);
192
+ console.log('Hot-reload: AutoStop engine config updated (effective immediately)');
193
+ }
194
+ /**
195
+ * Reload Balance Monitor with current settings from SettingsService.
196
+ * Synchronous: reads new values and calls balanceMonitorService.updateConfig().
197
+ */
198
+ reloadBalanceMonitor() {
199
+ const svc = this.deps.balanceMonitorService;
200
+ if (!svc)
201
+ return;
202
+ const ss = this.deps.settingsService;
203
+ const newConfig = {
204
+ checkIntervalSec: parseInt(ss.get('monitoring.check_interval_sec'), 10),
205
+ lowBalanceThresholdSol: parseFloat(ss.get('monitoring.low_balance_threshold_sol')),
206
+ lowBalanceThresholdEth: parseFloat(ss.get('monitoring.low_balance_threshold_eth')),
207
+ cooldownHours: parseInt(ss.get('monitoring.cooldown_hours'), 10),
208
+ enabled: ss.get('monitoring.enabled') === 'true',
209
+ };
210
+ svc.updateConfig(newConfig);
211
+ console.log('Hot-reload: Balance monitor config updated (effective immediately)');
212
+ }
213
+ /**
214
+ * Reload WalletConnect by shutting down old SignClient and re-initializing.
215
+ * Uses the mutable WcServiceRef so route handlers pick up the new instance.
216
+ */
217
+ async reloadWalletConnect() {
218
+ const ref = this.deps.wcServiceRef;
219
+ if (!ref)
220
+ return;
221
+ const sqlite = this.deps.sqlite;
222
+ if (!sqlite)
223
+ return;
224
+ // 1. Shutdown existing service
225
+ if (ref.current) {
226
+ try {
227
+ await ref.current.shutdown();
228
+ }
229
+ catch {
230
+ // Best-effort shutdown
231
+ }
232
+ ref.current = null;
233
+ }
234
+ // 2. Check if new project_id exists
235
+ const ss = this.deps.settingsService;
236
+ const projectId = ss.get('walletconnect.project_id');
237
+ if (!projectId) {
238
+ console.log('Hot-reload: WalletConnect disabled (project_id cleared)');
239
+ return;
240
+ }
241
+ // 3. Create and initialize new WcSessionService
242
+ const { WcSessionService } = await import('../../services/wc-session-service.js');
243
+ const newService = new WcSessionService({ sqlite, settingsService: ss });
244
+ await newService.initialize();
245
+ ref.current = newService;
246
+ console.log('Hot-reload: WalletConnect service re-initialized with new settings');
247
+ }
248
+ /**
249
+ * Reload Telegram Bot by stopping the old instance and creating a new one.
250
+ * Uses the mutable telegramBotRef so daemon keeps a live reference.
251
+ */
252
+ async reloadTelegramBot() {
253
+ const ref = this.deps.telegramBotRef;
254
+ if (!ref)
255
+ return;
256
+ const sqlite = this.deps.sqlite;
257
+ if (!sqlite)
258
+ return;
259
+ // 1. Stop existing bot
260
+ if (ref.current) {
261
+ ref.current.stop();
262
+ ref.current = null;
263
+ }
264
+ // 2. Check if bot should be enabled
265
+ const ss = this.deps.settingsService;
266
+ const enabled = ss.get('telegram.enabled') === 'true';
267
+ // Token priority: telegram.bot_token > notifications.telegram_bot_token
268
+ const botToken = ss.get('telegram.bot_token') || ss.get('notifications.telegram_bot_token');
269
+ if (!enabled || !botToken) {
270
+ console.log(`Hot-reload: Telegram Bot ${!enabled ? 'disabled' : 'stopped (no token)'}`);
271
+ return;
272
+ }
273
+ // 3. Create and start new bot
274
+ const { TelegramBotService, TelegramApi } = await import('../telegram/index.js');
275
+ const locale = (ss.get('telegram.locale') || ss.get('notifications.locale') || 'en');
276
+ const api = new TelegramApi(botToken);
277
+ ref.current = new TelegramBotService({
278
+ sqlite,
279
+ api,
280
+ locale,
281
+ killSwitchService: this.deps.killSwitchService ?? undefined,
282
+ notificationService: this.deps.notificationService ?? undefined,
283
+ settingsService: ss,
284
+ });
285
+ ref.current.start();
286
+ console.log('Hot-reload: Telegram Bot re-started with new settings');
287
+ }
288
+ /**
289
+ * Reload RPC adapters by evicting changed network adapters from the pool.
290
+ * Next request for that chain:network will lazy-create a new adapter with the new URL.
291
+ */
292
+ async reloadRpc(changedRpcKeys) {
293
+ const pool = this.deps.adapterPool;
294
+ if (!pool)
295
+ return;
296
+ for (const key of changedRpcKeys) {
297
+ // key format: 'rpc.solana_mainnet' or 'rpc.evm_ethereum_sepolia' or 'rpc.evm_default_network'
298
+ const field = key.replace('rpc.', '');
299
+ if (field === 'evm_default_network')
300
+ continue; // No adapter to evict for this key
301
+ if (field.startsWith('solana_')) {
302
+ const network = field.replace('solana_', '');
303
+ await pool.evict('solana', network);
304
+ console.log(`Hot-reload: Evicted solana:${network} adapter`);
305
+ }
306
+ else if (field.startsWith('evm_')) {
307
+ // Convert evm_ethereum_sepolia -> ethereum-sepolia
308
+ const network = field.replace('evm_', '').replace(/_/g, '-');
309
+ await pool.evict('ethereum', network);
310
+ console.log(`Hot-reload: Evicted ethereum:${network} adapter`);
311
+ }
312
+ }
313
+ }
314
+ }
315
+ //# sourceMappingURL=hot-reload.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"hot-reload.js","sourceRoot":"","sources":["../../../src/infrastructure/settings/hot-reload.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;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KAAK,CAAC,UAAU,CAAC,SAAS,CAAC,EAAE,CAAC;gBAChC,MAAM,OAAO,GAAG,KAAK,CAAC,OAAO,CAAC,SAAS,EAAE,EAAE,CAAC,CAAC;gBAC7C,MAAM,IAAI,CAAC,KAAK,CAAC,QAAe,EAAE,OAAc,CAAC,CAAC;gBAClD,OAAO,CAAC,GAAG,CAAC,8BAA8B,OAAO,UAAU,CAAC,CAAC;YAC/D,CAAC;iBAAM,IAAI,KAAK,CAAC,UAAU,CAAC,MAAM,CAAC,EAAE,CAAC;gBACpC,mDAAmD;gBACnD,MAAM,OAAO,GAAG,KAAK,CAAC,OAAO,CAAC,MAAM,EAAE,EAAE,CAAC,CAAC,OAAO,CAAC,IAAI,EAAE,GAAG,CAAC,CAAC;gBAC7D,MAAM,IAAI,CAAC,KAAK,CAAC,UAAiB,EAAE,OAAc,CAAC,CAAC;gBACpD,OAAO,CAAC,GAAG,CAAC,gCAAgC,OAAO,UAAU,CAAC,CAAC;YACjE,CAAC;QACH,CAAC;IACH,CAAC;CACF"}
@@ -0,0 +1,13 @@
1
+ /**
2
+ * Settings module barrel export.
3
+ *
4
+ * Re-exports SettingsService, setting key definitions, and crypto utilities.
5
+ */
6
+ export { SettingsService } from './settings-service.js';
7
+ export type { SettingsServiceOptions } from './settings-service.js';
8
+ export { SETTING_DEFINITIONS, SETTING_CATEGORIES, getSettingDefinition } from './setting-keys.js';
9
+ export type { SettingDefinition, SettingCategory } from './setting-keys.js';
10
+ export { encryptSettingValue, decryptSettingValue, CREDENTIAL_KEYS } from './settings-crypto.js';
11
+ export { HotReloadOrchestrator } from './hot-reload.js';
12
+ export type { HotReloadDeps } from './hot-reload.js';
13
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/infrastructure/settings/index.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,EAAE,eAAe,EAAE,MAAM,uBAAuB,CAAC;AACxD,YAAY,EAAE,sBAAsB,EAAE,MAAM,uBAAuB,CAAC;AACpE,OAAO,EAAE,mBAAmB,EAAE,kBAAkB,EAAE,oBAAoB,EAAE,MAAM,mBAAmB,CAAC;AAClG,YAAY,EAAE,iBAAiB,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC;AAC5E,OAAO,EAAE,mBAAmB,EAAE,mBAAmB,EAAE,eAAe,EAAE,MAAM,sBAAsB,CAAC;AACjG,OAAO,EAAE,qBAAqB,EAAE,MAAM,iBAAiB,CAAC;AACxD,YAAY,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC"}
@@ -0,0 +1,10 @@
1
+ /**
2
+ * Settings module barrel export.
3
+ *
4
+ * Re-exports SettingsService, setting key definitions, and crypto utilities.
5
+ */
6
+ export { SettingsService } from './settings-service.js';
7
+ export { SETTING_DEFINITIONS, SETTING_CATEGORIES, getSettingDefinition } from './setting-keys.js';
8
+ export { encryptSettingValue, decryptSettingValue, CREDENTIAL_KEYS } from './settings-crypto.js';
9
+ export { HotReloadOrchestrator } from './hot-reload.js';
10
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/infrastructure/settings/index.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,EAAE,eAAe,EAAE,MAAM,uBAAuB,CAAC;AAExD,OAAO,EAAE,mBAAmB,EAAE,kBAAkB,EAAE,oBAAoB,EAAE,MAAM,mBAAmB,CAAC;AAElG,OAAO,EAAE,mBAAmB,EAAE,mBAAmB,EAAE,eAAe,EAAE,MAAM,sBAAsB,CAAC;AACjG,OAAO,EAAE,qBAAqB,EAAE,MAAM,iBAAiB,CAAC"}
@@ -0,0 +1,28 @@
1
+ /**
2
+ * Setting key definitions (SSoT) for daemon operational settings.
3
+ *
4
+ * Each setting has a key (DB storage), category, configPath (for config.toml lookup),
5
+ * defaultValue (matching DaemonConfigSchema .default()), and isCredential flag.
6
+ *
7
+ * Categories: notifications, rpc, security, daemon, walletconnect, oracle, display, autostop, monitoring, telegram
8
+ *
9
+ * @see packages/daemon/src/infrastructure/config/loader.ts for DaemonConfigSchema defaults
10
+ */
11
+ export interface SettingDefinition {
12
+ /** DB storage key, e.g. 'notifications.telegram_bot_token' */
13
+ key: string;
14
+ /** Category for grouping, e.g. 'notifications' */
15
+ category: string;
16
+ /** Path in config.toml, e.g. 'notifications.telegram_bot_token' */
17
+ configPath: string;
18
+ /** Default value (string, matching DaemonConfigSchema .default()) */
19
+ defaultValue: string;
20
+ /** If true, value is AES-GCM encrypted before DB storage */
21
+ isCredential: boolean;
22
+ }
23
+ export declare const SETTING_CATEGORIES: readonly ["notifications", "rpc", "security", "daemon", "walletconnect", "oracle", "display", "autostop", "monitoring", "telegram"];
24
+ export type SettingCategory = (typeof SETTING_CATEGORIES)[number];
25
+ export declare const SETTING_DEFINITIONS: readonly SettingDefinition[];
26
+ /** Get a setting definition by key, or undefined if not found */
27
+ export declare function getSettingDefinition(key: string): SettingDefinition | undefined;
28
+ //# sourceMappingURL=setting-keys.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"setting-keys.d.ts","sourceRoot":"","sources":["../../../src/infrastructure/settings/setting-keys.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAMH,MAAM,WAAW,iBAAiB;IAChC,8DAA8D;IAC9D,GAAG,EAAE,MAAM,CAAC;IACZ,kDAAkD;IAClD,QAAQ,EAAE,MAAM,CAAC;IACjB,mEAAmE;IACnE,UAAU,EAAE,MAAM,CAAC;IACnB,qEAAqE;IACrE,YAAY,EAAE,MAAM,CAAC;IACrB,4DAA4D;IAC5D,YAAY,EAAE,OAAO,CAAC;CACvB;AAMD,eAAO,MAAM,kBAAkB,qIAWrB,CAAC;AAEX,MAAM,MAAM,eAAe,GAAG,CAAC,OAAO,kBAAkB,CAAC,CAAC,MAAM,CAAC,CAAC;AAMlE,eAAO,MAAM,mBAAmB,EAAE,SAAS,iBAAiB,EA4ElD,CAAC;AAWX,iEAAiE;AACjE,wBAAgB,oBAAoB,CAAC,GAAG,EAAE,MAAM,GAAG,iBAAiB,GAAG,SAAS,CAE/E"}