@attocash/cli 0.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (400) hide show
  1. package/LICENSE +28 -0
  2. package/README.md +707 -0
  3. package/dist/application/app.d.ts +138 -0
  4. package/dist/application/app.js +654 -0
  5. package/dist/application/operations.d.ts +9 -0
  6. package/dist/application/operations.js +96 -0
  7. package/dist/cli/cli.d.ts +1 -0
  8. package/dist/cli/cli.js +460 -0
  9. package/dist/cli/help.d.ts +4 -0
  10. package/dist/cli/help.js +49 -0
  11. package/dist/cli/main.d.ts +2 -0
  12. package/dist/cli/main.js +13 -0
  13. package/dist/cli/onboarding.d.ts +14 -0
  14. package/dist/cli/onboarding.js +144 -0
  15. package/dist/cli/output.d.ts +2 -0
  16. package/dist/cli/output.js +231 -0
  17. package/dist/cli/terminal.d.ts +6 -0
  18. package/dist/cli/terminal.js +92 -0
  19. package/dist/cli/update-check.d.ts +1 -0
  20. package/dist/cli/update-check.js +12 -0
  21. package/dist/cli/updates.d.ts +2 -0
  22. package/dist/cli/updates.js +98 -0
  23. package/dist/core.d.ts +14 -0
  24. package/dist/core.js +14 -0
  25. package/dist/doctor/credential-probe.d.ts +7 -0
  26. package/dist/doctor/credential-probe.js +49 -0
  27. package/dist/doctor/doctor.d.ts +4 -0
  28. package/dist/doctor/doctor.js +213 -0
  29. package/dist/doctor/keyring.d.ts +7 -0
  30. package/dist/doctor/keyring.js +150 -0
  31. package/dist/doctor/profile.d.ts +19 -0
  32. package/dist/doctor/profile.js +73 -0
  33. package/dist/doctor/types.d.ts +40 -0
  34. package/dist/doctor/types.js +1 -0
  35. package/dist/domain/amount.d.ts +6 -0
  36. package/dist/domain/amount.js +27 -0
  37. package/dist/domain/errors.d.ts +10 -0
  38. package/dist/domain/errors.js +16 -0
  39. package/dist/labels/directory.d.ts +87 -0
  40. package/dist/labels/directory.js +140 -0
  41. package/dist/labels/personal.d.ts +17 -0
  42. package/dist/labels/personal.js +56 -0
  43. package/dist/labels/presentation.d.ts +154 -0
  44. package/dist/labels/presentation.js +90 -0
  45. package/dist/network/reader.d.ts +31 -0
  46. package/dist/network/reader.js +370 -0
  47. package/dist/network/retry.d.ts +7 -0
  48. package/dist/network/retry.js +53 -0
  49. package/dist/network/work.d.ts +3 -0
  50. package/dist/network/work.js +66 -0
  51. package/dist/pricing/market.d.ts +29 -0
  52. package/dist/pricing/market.js +150 -0
  53. package/dist/pricing/terms.d.ts +6 -0
  54. package/dist/pricing/terms.js +12 -0
  55. package/dist/spending/destination.d.ts +16 -0
  56. package/dist/spending/destination.js +42 -0
  57. package/dist/spending/journal.d.ts +28 -0
  58. package/dist/spending/journal.js +69 -0
  59. package/dist/spending/ledger.d.ts +118 -0
  60. package/dist/spending/ledger.js +444 -0
  61. package/dist/spending/payments.d.ts +67 -0
  62. package/dist/spending/payments.js +424 -0
  63. package/dist/spending/pool.d.ts +13 -0
  64. package/dist/spending/pool.js +38 -0
  65. package/dist/spending/reconcile.d.ts +18 -0
  66. package/dist/spending/reconcile.js +64 -0
  67. package/dist/storage/profiles.d.ts +13 -0
  68. package/dist/storage/profiles.js +86 -0
  69. package/dist/storage/secrets.d.ts +16 -0
  70. package/dist/storage/secrets.js +104 -0
  71. package/dist/storage/state.d.ts +32 -0
  72. package/dist/storage/state.js +255 -0
  73. package/dist/wallet/auto-receive.d.ts +57 -0
  74. package/dist/wallet/auto-receive.js +140 -0
  75. package/dist/wallet/defaults.d.ts +3 -0
  76. package/dist/wallet/defaults.js +26 -0
  77. package/dist/wallet/signing.d.ts +17 -0
  78. package/dist/wallet/signing.js +128 -0
  79. package/dist/wallet/types.d.ts +65 -0
  80. package/dist/wallet/types.js +1 -0
  81. package/dist/wallet/work.d.ts +29 -0
  82. package/dist/wallet/work.js +154 -0
  83. package/dist/watches/manager.d.ts +75 -0
  84. package/dist/watches/manager.js +197 -0
  85. package/node_modules/@attocash/commons-core/Kotlin-DateTime-library-kotlinx-datetime.mjs +6678 -0
  86. package/node_modules/@attocash/commons-core/Kotlin-DateTime-library-kotlinx-datetime.mjs.map +1 -0
  87. package/node_modules/@attocash/commons-core/LICENSE +28 -0
  88. package/node_modules/@attocash/commons-core/README.md +118 -0
  89. package/node_modules/@attocash/commons-core/commons-commons-core.d.mts +1036 -0
  90. package/node_modules/@attocash/commons-core/commons-commons-core.mjs +7701 -0
  91. package/node_modules/@attocash/commons-core/commons-commons-core.mjs.map +1 -0
  92. package/node_modules/@attocash/commons-core/kotlin-kotlin-stdlib.mjs +17681 -0
  93. package/node_modules/@attocash/commons-core/kotlin-kotlin-stdlib.mjs.map +1 -0
  94. package/node_modules/@attocash/commons-core/kotlin_org_jetbrains_kotlin_kotlin_dom_api_compat.mjs +4 -0
  95. package/node_modules/@attocash/commons-core/kotlin_org_jetbrains_kotlin_kotlin_dom_api_compat.mjs.map +1 -0
  96. package/node_modules/@attocash/commons-core/kotlinx-io-kotlinx-io-bytestring.mjs +209 -0
  97. package/node_modules/@attocash/commons-core/kotlinx-io-kotlinx-io-bytestring.mjs.map +1 -0
  98. package/node_modules/@attocash/commons-core/kotlinx-io-kotlinx-io-core.mjs +2284 -0
  99. package/node_modules/@attocash/commons-core/kotlinx-io-kotlinx-io-core.mjs.map +1 -0
  100. package/node_modules/@attocash/commons-core/kotlinx-serialization-kotlinx-serialization-core.mjs +6042 -0
  101. package/node_modules/@attocash/commons-core/kotlinx-serialization-kotlinx-serialization-core.mjs.map +1 -0
  102. package/node_modules/@attocash/commons-core/kotlinx-serialization-kotlinx-serialization-json.mjs +5294 -0
  103. package/node_modules/@attocash/commons-core/kotlinx-serialization-kotlinx-serialization-json.mjs.map +1 -0
  104. package/node_modules/@attocash/commons-core/package.json +27 -0
  105. package/node_modules/@attocash/commons-node/LICENSE +28 -0
  106. package/node_modules/@attocash/commons-node/README.md +92 -0
  107. package/node_modules/@attocash/commons-node/commons-commons-node.d.mts +255 -0
  108. package/node_modules/@attocash/commons-node/commons-commons-node.mjs +2977 -0
  109. package/node_modules/@attocash/commons-node/commons-commons-node.mjs.map +1 -0
  110. package/node_modules/@attocash/commons-node/kotlin-logging.mjs +432 -0
  111. package/node_modules/@attocash/commons-node/kotlin-logging.mjs.map +1 -0
  112. package/node_modules/@attocash/commons-node/kotlinx-serialization-kotlinx-serialization-json.mjs +5294 -0
  113. package/node_modules/@attocash/commons-node/kotlinx-serialization-kotlinx-serialization-json.mjs.map +1 -0
  114. package/node_modules/@attocash/commons-node/package.json +29 -0
  115. package/node_modules/@attocash/commons-node-remote/LICENSE +28 -0
  116. package/node_modules/@attocash/commons-node-remote/README.md +61 -0
  117. package/node_modules/@attocash/commons-node-remote/commons-commons-node-remote.d.mts +122 -0
  118. package/node_modules/@attocash/commons-node-remote/commons-commons-node-remote.mjs +1810 -0
  119. package/node_modules/@attocash/commons-node-remote/commons-commons-node-remote.mjs.map +1 -0
  120. package/node_modules/@attocash/commons-node-remote/kotlin-logging.mjs +432 -0
  121. package/node_modules/@attocash/commons-node-remote/kotlin-logging.mjs.map +1 -0
  122. package/node_modules/@attocash/commons-node-remote/kotlinx-browser.mjs +8 -0
  123. package/node_modules/@attocash/commons-node-remote/kotlinx-browser.mjs.map +1 -0
  124. package/node_modules/@attocash/commons-node-remote/kotlinx-serialization-kotlinx-serialization-json-io.mjs +4 -0
  125. package/node_modules/@attocash/commons-node-remote/kotlinx-serialization-kotlinx-serialization-json-io.mjs.map +1 -0
  126. package/node_modules/@attocash/commons-node-remote/kotlinx-serialization-kotlinx-serialization-json.mjs +5294 -0
  127. package/node_modules/@attocash/commons-node-remote/kotlinx-serialization-kotlinx-serialization-json.mjs.map +1 -0
  128. package/node_modules/@attocash/commons-node-remote/package.json +31 -0
  129. package/node_modules/@attocash/commons-transport/LICENSE +28 -0
  130. package/node_modules/@attocash/commons-transport/README.md +5 -0
  131. package/node_modules/@attocash/commons-transport/commons-commons-transport.d.mts +64 -0
  132. package/node_modules/@attocash/commons-transport/commons-commons-transport.mjs +249 -0
  133. package/node_modules/@attocash/commons-transport/commons-commons-transport.mjs.map +1 -0
  134. package/node_modules/@attocash/commons-transport/kotlinx-atomicfu.mjs +263 -0
  135. package/node_modules/@attocash/commons-transport/kotlinx-atomicfu.mjs.map +1 -0
  136. package/node_modules/@attocash/commons-transport/kotlinx-browser.mjs +8 -0
  137. package/node_modules/@attocash/commons-transport/kotlinx-browser.mjs.map +1 -0
  138. package/node_modules/@attocash/commons-transport/kotlinx-coroutines-core.mjs +11604 -0
  139. package/node_modules/@attocash/commons-transport/kotlinx-coroutines-core.mjs.map +1 -0
  140. package/node_modules/@attocash/commons-transport/kotlinx-serialization-kotlinx-serialization-json-io.mjs +4 -0
  141. package/node_modules/@attocash/commons-transport/kotlinx-serialization-kotlinx-serialization-json-io.mjs.map +1 -0
  142. package/node_modules/@attocash/commons-transport/kotlinx-serialization-kotlinx-serialization-json.mjs +5294 -0
  143. package/node_modules/@attocash/commons-transport/kotlinx-serialization-kotlinx-serialization-json.mjs.map +1 -0
  144. package/node_modules/@attocash/commons-transport/ktor-ktor-client-content-negotiation.mjs +499 -0
  145. package/node_modules/@attocash/commons-transport/ktor-ktor-client-content-negotiation.mjs.map +1 -0
  146. package/node_modules/@attocash/commons-transport/ktor-ktor-client-core.mjs +6456 -0
  147. package/node_modules/@attocash/commons-transport/ktor-ktor-client-core.mjs.map +1 -0
  148. package/node_modules/@attocash/commons-transport/ktor-ktor-events.mjs +83 -0
  149. package/node_modules/@attocash/commons-transport/ktor-ktor-events.mjs.map +1 -0
  150. package/node_modules/@attocash/commons-transport/ktor-ktor-http-cio.mjs +1714 -0
  151. package/node_modules/@attocash/commons-transport/ktor-ktor-http-cio.mjs.map +1 -0
  152. package/node_modules/@attocash/commons-transport/ktor-ktor-http.mjs +3197 -0
  153. package/node_modules/@attocash/commons-transport/ktor-ktor-http.mjs.map +1 -0
  154. package/node_modules/@attocash/commons-transport/ktor-ktor-io.mjs +2290 -0
  155. package/node_modules/@attocash/commons-transport/ktor-ktor-io.mjs.map +1 -0
  156. package/node_modules/@attocash/commons-transport/ktor-ktor-serialization-kotlinx-json.mjs +46 -0
  157. package/node_modules/@attocash/commons-transport/ktor-ktor-serialization-kotlinx-json.mjs.map +1 -0
  158. package/node_modules/@attocash/commons-transport/ktor-ktor-serialization-kotlinx.mjs +482 -0
  159. package/node_modules/@attocash/commons-transport/ktor-ktor-serialization-kotlinx.mjs.map +1 -0
  160. package/node_modules/@attocash/commons-transport/ktor-ktor-serialization.mjs +165 -0
  161. package/node_modules/@attocash/commons-transport/ktor-ktor-serialization.mjs.map +1 -0
  162. package/node_modules/@attocash/commons-transport/ktor-ktor-sse.mjs +4 -0
  163. package/node_modules/@attocash/commons-transport/ktor-ktor-sse.mjs.map +1 -0
  164. package/node_modules/@attocash/commons-transport/ktor-ktor-utils.mjs +3222 -0
  165. package/node_modules/@attocash/commons-transport/ktor-ktor-utils.mjs.map +1 -0
  166. package/node_modules/@attocash/commons-transport/ktor-ktor-websocket-serialization.mjs +4 -0
  167. package/node_modules/@attocash/commons-transport/ktor-ktor-websocket-serialization.mjs.map +1 -0
  168. package/node_modules/@attocash/commons-transport/ktor-ktor-websockets.mjs +1485 -0
  169. package/node_modules/@attocash/commons-transport/ktor-ktor-websockets.mjs.map +1 -0
  170. package/node_modules/@attocash/commons-transport/package.json +29 -0
  171. package/node_modules/@attocash/commons-worker/LICENSE +28 -0
  172. package/node_modules/@attocash/commons-worker/README.md +48 -0
  173. package/node_modules/@attocash/commons-worker/commons-commons-worker.d.mts +73 -0
  174. package/node_modules/@attocash/commons-worker/commons-commons-worker.mjs +702 -0
  175. package/node_modules/@attocash/commons-worker/commons-commons-worker.mjs.map +1 -0
  176. package/node_modules/@attocash/commons-worker/kotlin-logging.mjs +432 -0
  177. package/node_modules/@attocash/commons-worker/kotlin-logging.mjs.map +1 -0
  178. package/node_modules/@attocash/commons-worker/kotlinx-serialization-kotlinx-serialization-json.mjs +5294 -0
  179. package/node_modules/@attocash/commons-worker/kotlinx-serialization-kotlinx-serialization-json.mjs.map +1 -0
  180. package/node_modules/@attocash/commons-worker/package.json +29 -0
  181. package/node_modules/@attocash/commons-worker-remote/LICENSE +28 -0
  182. package/node_modules/@attocash/commons-worker-remote/README.md +60 -0
  183. package/node_modules/@attocash/commons-worker-remote/commons-commons-worker-remote.d.mts +93 -0
  184. package/node_modules/@attocash/commons-worker-remote/commons-commons-worker-remote.mjs +289 -0
  185. package/node_modules/@attocash/commons-worker-remote/commons-commons-worker-remote.mjs.map +1 -0
  186. package/node_modules/@attocash/commons-worker-remote/kotlin-logging.mjs +432 -0
  187. package/node_modules/@attocash/commons-worker-remote/kotlin-logging.mjs.map +1 -0
  188. package/node_modules/@attocash/commons-worker-remote/kotlinx-browser.mjs +8 -0
  189. package/node_modules/@attocash/commons-worker-remote/kotlinx-browser.mjs.map +1 -0
  190. package/node_modules/@attocash/commons-worker-remote/kotlinx-serialization-kotlinx-serialization-json-io.mjs +4 -0
  191. package/node_modules/@attocash/commons-worker-remote/kotlinx-serialization-kotlinx-serialization-json-io.mjs.map +1 -0
  192. package/node_modules/@attocash/commons-worker-remote/kotlinx-serialization-kotlinx-serialization-json.mjs +5294 -0
  193. package/node_modules/@attocash/commons-worker-remote/kotlinx-serialization-kotlinx-serialization-json.mjs.map +1 -0
  194. package/node_modules/@attocash/commons-worker-remote/package.json +31 -0
  195. package/node_modules/@js-joda/core/CHANGELOG.md +363 -0
  196. package/node_modules/@js-joda/core/CheatSheet.md +947 -0
  197. package/node_modules/@js-joda/core/LICENSE +34 -0
  198. package/node_modules/@js-joda/core/README.md +155 -0
  199. package/node_modules/@js-joda/core/bower.json +21 -0
  200. package/node_modules/@js-joda/core/dist/js-joda.d.ts +2452 -0
  201. package/node_modules/@js-joda/core/dist/js-joda.esm.js +13564 -0
  202. package/node_modules/@js-joda/core/dist/js-joda.flow.js +949 -0
  203. package/node_modules/@js-joda/core/dist/js-joda.js +13630 -0
  204. package/node_modules/@js-joda/core/dist/js-joda.js.map +1 -0
  205. package/node_modules/@js-joda/core/dist/js-joda.min.js +5 -0
  206. package/node_modules/@js-joda/core/package.json +76 -0
  207. package/node_modules/@js-joda/core/src/Clock.js +330 -0
  208. package/node_modules/@js-joda/core/src/DayOfWeek.js +451 -0
  209. package/node_modules/@js-joda/core/src/Duration.js +1205 -0
  210. package/node_modules/@js-joda/core/src/Enum.js +30 -0
  211. package/node_modules/@js-joda/core/src/Instant.js +1012 -0
  212. package/node_modules/@js-joda/core/src/LocalDate.js +1703 -0
  213. package/node_modules/@js-joda/core/src/LocalDateTime.js +1686 -0
  214. package/node_modules/@js-joda/core/src/LocalTime.js +1415 -0
  215. package/node_modules/@js-joda/core/src/MathUtil.js +236 -0
  216. package/node_modules/@js-joda/core/src/Month.js +600 -0
  217. package/node_modules/@js-joda/core/src/MonthDay.js +730 -0
  218. package/node_modules/@js-joda/core/src/OffsetDateTime.js +757 -0
  219. package/node_modules/@js-joda/core/src/OffsetTime.js +621 -0
  220. package/node_modules/@js-joda/core/src/Period.js +933 -0
  221. package/node_modules/@js-joda/core/src/StringUtil.js +43 -0
  222. package/node_modules/@js-joda/core/src/Year.js +1015 -0
  223. package/node_modules/@js-joda/core/src/YearConstants.js +21 -0
  224. package/node_modules/@js-joda/core/src/YearMonth.js +1096 -0
  225. package/node_modules/@js-joda/core/src/ZoneId.js +236 -0
  226. package/node_modules/@js-joda/core/src/ZoneIdFactory.js +201 -0
  227. package/node_modules/@js-joda/core/src/ZoneOffset.js +486 -0
  228. package/node_modules/@js-joda/core/src/ZoneRegion.js +72 -0
  229. package/node_modules/@js-joda/core/src/ZonedDateTime.js +2007 -0
  230. package/node_modules/@js-joda/core/src/_init.js +68 -0
  231. package/node_modules/@js-joda/core/src/assert.js +33 -0
  232. package/node_modules/@js-joda/core/src/chrono/ChronoLocalDate.js +230 -0
  233. package/node_modules/@js-joda/core/src/chrono/ChronoLocalDateTime.js +130 -0
  234. package/node_modules/@js-joda/core/src/chrono/ChronoZonedDateTime.js +194 -0
  235. package/node_modules/@js-joda/core/src/chrono/IsoChronology.js +235 -0
  236. package/node_modules/@js-joda/core/src/convert.js +83 -0
  237. package/node_modules/@js-joda/core/src/errors.js +54 -0
  238. package/node_modules/@js-joda/core/src/format/DateTimeBuilder.js +535 -0
  239. package/node_modules/@js-joda/core/src/format/DateTimeFormatter.js +728 -0
  240. package/node_modules/@js-joda/core/src/format/DateTimeFormatterBuilder.js +1545 -0
  241. package/node_modules/@js-joda/core/src/format/DateTimeParseContext.js +297 -0
  242. package/node_modules/@js-joda/core/src/format/DateTimePrintContext.js +138 -0
  243. package/node_modules/@js-joda/core/src/format/DecimalStyle.js +113 -0
  244. package/node_modules/@js-joda/core/src/format/EnumMap.js +70 -0
  245. package/node_modules/@js-joda/core/src/format/ParsePosition.js +31 -0
  246. package/node_modules/@js-joda/core/src/format/ResolverStyle.js +93 -0
  247. package/node_modules/@js-joda/core/src/format/SignStyle.js +38 -0
  248. package/node_modules/@js-joda/core/src/format/StringBuilder.js +47 -0
  249. package/node_modules/@js-joda/core/src/format/TextStyle.js +114 -0
  250. package/node_modules/@js-joda/core/src/format/parser/CharLiteralPrinterParser.js +46 -0
  251. package/node_modules/@js-joda/core/src/format/parser/CompositePrinterParser.js +89 -0
  252. package/node_modules/@js-joda/core/src/format/parser/FractionPrinterParser.js +162 -0
  253. package/node_modules/@js-joda/core/src/format/parser/NumberPrinterParser.js +367 -0
  254. package/node_modules/@js-joda/core/src/format/parser/OffsetIdPrinterParser.js +177 -0
  255. package/node_modules/@js-joda/core/src/format/parser/PadPrinterParserDecorator.js +81 -0
  256. package/node_modules/@js-joda/core/src/format/parser/SettingsParser.js +44 -0
  257. package/node_modules/@js-joda/core/src/format/parser/StringLiteralPrinterParser.js +39 -0
  258. package/node_modules/@js-joda/core/src/format/parser/ZoneIdPrinterParser.js +218 -0
  259. package/node_modules/@js-joda/core/src/js-joda.js +210 -0
  260. package/node_modules/@js-joda/core/src/license-preamble.js +3 -0
  261. package/node_modules/@js-joda/core/src/temporal/ChronoField.js +470 -0
  262. package/node_modules/@js-joda/core/src/temporal/ChronoUnit.js +310 -0
  263. package/node_modules/@js-joda/core/src/temporal/DefaultInterfaceTemporal.js +118 -0
  264. package/node_modules/@js-joda/core/src/temporal/IsoFields.js +859 -0
  265. package/node_modules/@js-joda/core/src/temporal/NativeJsTemporal.js +105 -0
  266. package/node_modules/@js-joda/core/src/temporal/Temporal.js +346 -0
  267. package/node_modules/@js-joda/core/src/temporal/TemporalAccessor.js +125 -0
  268. package/node_modules/@js-joda/core/src/temporal/TemporalAdjuster.js +92 -0
  269. package/node_modules/@js-joda/core/src/temporal/TemporalAdjusters.js +464 -0
  270. package/node_modules/@js-joda/core/src/temporal/TemporalAmount.js +166 -0
  271. package/node_modules/@js-joda/core/src/temporal/TemporalField.js +248 -0
  272. package/node_modules/@js-joda/core/src/temporal/TemporalQueries.js +223 -0
  273. package/node_modules/@js-joda/core/src/temporal/TemporalQueriesFactory.js +77 -0
  274. package/node_modules/@js-joda/core/src/temporal/TemporalQuery.js +107 -0
  275. package/node_modules/@js-joda/core/src/temporal/TemporalUnit.js +179 -0
  276. package/node_modules/@js-joda/core/src/temporal/ValueRange.js +257 -0
  277. package/node_modules/@js-joda/core/src/use.js +20 -0
  278. package/node_modules/@js-joda/core/src/zone/SystemDefaultZoneId.js +31 -0
  279. package/node_modules/@js-joda/core/src/zone/SystemDefaultZoneRules.js +162 -0
  280. package/node_modules/@js-joda/core/src/zone/ZoneOffsetTransition.js +289 -0
  281. package/node_modules/@js-joda/core/src/zone/ZoneRules.js +464 -0
  282. package/node_modules/@js-joda/core/src/zone/ZoneRulesProvider.js +36 -0
  283. package/node_modules/@noble/hashes/LICENSE +21 -0
  284. package/node_modules/@noble/hashes/README.md +563 -0
  285. package/node_modules/@noble/hashes/_blake.d.ts +21 -0
  286. package/node_modules/@noble/hashes/_blake.d.ts.map +1 -0
  287. package/node_modules/@noble/hashes/_blake.js +52 -0
  288. package/node_modules/@noble/hashes/_blake.js.map +1 -0
  289. package/node_modules/@noble/hashes/_md.d.ts +99 -0
  290. package/node_modules/@noble/hashes/_md.d.ts.map +1 -0
  291. package/node_modules/@noble/hashes/_md.js +202 -0
  292. package/node_modules/@noble/hashes/_md.js.map +1 -0
  293. package/node_modules/@noble/hashes/_u64.d.ts +63 -0
  294. package/node_modules/@noble/hashes/_u64.d.ts.map +1 -0
  295. package/node_modules/@noble/hashes/_u64.js +84 -0
  296. package/node_modules/@noble/hashes/_u64.js.map +1 -0
  297. package/node_modules/@noble/hashes/argon2.d.ts +112 -0
  298. package/node_modules/@noble/hashes/argon2.d.ts.map +1 -0
  299. package/node_modules/@noble/hashes/argon2.js +517 -0
  300. package/node_modules/@noble/hashes/argon2.js.map +1 -0
  301. package/node_modules/@noble/hashes/blake1.d.ts +156 -0
  302. package/node_modules/@noble/hashes/blake1.d.ts.map +1 -0
  303. package/node_modules/@noble/hashes/blake1.js +560 -0
  304. package/node_modules/@noble/hashes/blake1.js.map +1 -0
  305. package/node_modules/@noble/hashes/blake2.d.ts +184 -0
  306. package/node_modules/@noble/hashes/blake2.d.ts.map +1 -0
  307. package/node_modules/@noble/hashes/blake2.js +501 -0
  308. package/node_modules/@noble/hashes/blake2.js.map +1 -0
  309. package/node_modules/@noble/hashes/blake3.d.ts +68 -0
  310. package/node_modules/@noble/hashes/blake3.d.ts.map +1 -0
  311. package/node_modules/@noble/hashes/blake3.js +284 -0
  312. package/node_modules/@noble/hashes/blake3.js.map +1 -0
  313. package/node_modules/@noble/hashes/eskdf.d.ts +92 -0
  314. package/node_modules/@noble/hashes/eskdf.d.ts.map +1 -0
  315. package/node_modules/@noble/hashes/eskdf.js +218 -0
  316. package/node_modules/@noble/hashes/eskdf.js.map +1 -0
  317. package/node_modules/@noble/hashes/hkdf.d.ts +64 -0
  318. package/node_modules/@noble/hashes/hkdf.d.ts.map +1 -0
  319. package/node_modules/@noble/hashes/hkdf.js +120 -0
  320. package/node_modules/@noble/hashes/hkdf.js.map +1 -0
  321. package/node_modules/@noble/hashes/hmac.d.ts +47 -0
  322. package/node_modules/@noble/hashes/hmac.d.ts.map +1 -0
  323. package/node_modules/@noble/hashes/hmac.js +93 -0
  324. package/node_modules/@noble/hashes/hmac.js.map +1 -0
  325. package/node_modules/@noble/hashes/index.d.ts +2 -0
  326. package/node_modules/@noble/hashes/index.d.ts.map +1 -0
  327. package/node_modules/@noble/hashes/index.js +35 -0
  328. package/node_modules/@noble/hashes/index.js.map +1 -0
  329. package/node_modules/@noble/hashes/legacy.d.ts +102 -0
  330. package/node_modules/@noble/hashes/legacy.d.ts.map +1 -0
  331. package/node_modules/@noble/hashes/legacy.js +327 -0
  332. package/node_modules/@noble/hashes/legacy.js.map +1 -0
  333. package/node_modules/@noble/hashes/package.json +97 -0
  334. package/node_modules/@noble/hashes/pbkdf2.d.ts +56 -0
  335. package/node_modules/@noble/hashes/pbkdf2.d.ts.map +1 -0
  336. package/node_modules/@noble/hashes/pbkdf2.js +135 -0
  337. package/node_modules/@noble/hashes/pbkdf2.js.map +1 -0
  338. package/node_modules/@noble/hashes/scrypt.d.ts +65 -0
  339. package/node_modules/@noble/hashes/scrypt.d.ts.map +1 -0
  340. package/node_modules/@noble/hashes/scrypt.js +257 -0
  341. package/node_modules/@noble/hashes/scrypt.js.map +1 -0
  342. package/node_modules/@noble/hashes/sha2.d.ts +249 -0
  343. package/node_modules/@noble/hashes/sha2.d.ts.map +1 -0
  344. package/node_modules/@noble/hashes/sha2.js +458 -0
  345. package/node_modules/@noble/hashes/sha2.js.map +1 -0
  346. package/node_modules/@noble/hashes/sha3-addons.d.ts +461 -0
  347. package/node_modules/@noble/hashes/sha3-addons.d.ts.map +1 -0
  348. package/node_modules/@noble/hashes/sha3-addons.js +783 -0
  349. package/node_modules/@noble/hashes/sha3-addons.js.map +1 -0
  350. package/node_modules/@noble/hashes/sha3.d.ts +199 -0
  351. package/node_modules/@noble/hashes/sha3.d.ts.map +1 -0
  352. package/node_modules/@noble/hashes/sha3.js +431 -0
  353. package/node_modules/@noble/hashes/sha3.js.map +1 -0
  354. package/node_modules/@noble/hashes/src/_blake.ts +57 -0
  355. package/node_modules/@noble/hashes/src/_md.ts +222 -0
  356. package/node_modules/@noble/hashes/src/_u64.ts +117 -0
  357. package/node_modules/@noble/hashes/src/argon2.ts +667 -0
  358. package/node_modules/@noble/hashes/src/blake1.ts +614 -0
  359. package/node_modules/@noble/hashes/src/blake2.ts +582 -0
  360. package/node_modules/@noble/hashes/src/blake3.ts +317 -0
  361. package/node_modules/@noble/hashes/src/eskdf.ts +259 -0
  362. package/node_modules/@noble/hashes/src/hkdf.ts +133 -0
  363. package/node_modules/@noble/hashes/src/hmac.ts +126 -0
  364. package/node_modules/@noble/hashes/src/index.ts +33 -0
  365. package/node_modules/@noble/hashes/src/legacy.ts +339 -0
  366. package/node_modules/@noble/hashes/src/pbkdf2.ts +175 -0
  367. package/node_modules/@noble/hashes/src/scrypt.ts +315 -0
  368. package/node_modules/@noble/hashes/src/sha2.ts +530 -0
  369. package/node_modules/@noble/hashes/src/sha3-addons.ts +983 -0
  370. package/node_modules/@noble/hashes/src/sha3.ts +485 -0
  371. package/node_modules/@noble/hashes/src/utils.ts +848 -0
  372. package/node_modules/@noble/hashes/src/webcrypto.ts +239 -0
  373. package/node_modules/@noble/hashes/utils.d.ts +519 -0
  374. package/node_modules/@noble/hashes/utils.d.ts.map +1 -0
  375. package/node_modules/@noble/hashes/utils.js +578 -0
  376. package/node_modules/@noble/hashes/utils.js.map +1 -0
  377. package/node_modules/@noble/hashes/webcrypto.d.ts +120 -0
  378. package/node_modules/@noble/hashes/webcrypto.d.ts.map +1 -0
  379. package/node_modules/@noble/hashes/webcrypto.js +165 -0
  380. package/node_modules/@noble/hashes/webcrypto.js.map +1 -0
  381. package/node_modules/ws/LICENSE +20 -0
  382. package/node_modules/ws/README.md +548 -0
  383. package/node_modules/ws/browser.js +8 -0
  384. package/node_modules/ws/index.js +22 -0
  385. package/node_modules/ws/lib/buffer-util.js +131 -0
  386. package/node_modules/ws/lib/constants.js +19 -0
  387. package/node_modules/ws/lib/event-target.js +292 -0
  388. package/node_modules/ws/lib/extension.js +203 -0
  389. package/node_modules/ws/lib/limiter.js +55 -0
  390. package/node_modules/ws/lib/permessage-deflate.js +530 -0
  391. package/node_modules/ws/lib/receiver.js +743 -0
  392. package/node_modules/ws/lib/sender.js +607 -0
  393. package/node_modules/ws/lib/stream.js +161 -0
  394. package/node_modules/ws/lib/subprotocol.js +62 -0
  395. package/node_modules/ws/lib/validation.js +152 -0
  396. package/node_modules/ws/lib/websocket-server.js +562 -0
  397. package/node_modules/ws/lib/websocket.js +1407 -0
  398. package/node_modules/ws/package.json +74 -0
  399. package/node_modules/ws/wrapper.mjs +21 -0
  400. package/package.json +53 -0
package/README.md ADDED
@@ -0,0 +1,707 @@
1
+ # Atto CLI
2
+
3
+ `@attocash/cli` provides the `atto` terminal wallet and the shared wallet engine
4
+ used by [`@attocash/mcp`](https://github.com/attocash/integrations/tree/main/atto-mcp).
5
+ Protocol signing and publication use [Atto Commons](https://github.com/attocash/commons).
6
+ The CLI and MCP use the same password-store entry, public state, and spending
7
+ budgets when run with the same data directory.
8
+
9
+ ## Install
10
+
11
+ Requires **Node.js 24.15 or newer**. From the repository root:
12
+
13
+ ```sh
14
+ npm ci
15
+ npm run pack
16
+ npm install --global ./attocash-cli-0.1.0.tgz
17
+ atto --help
18
+ ```
19
+
20
+ The CLI can be installed on its own. To install MCP as well before these package
21
+ versions are published, install both local artifacts in one command:
22
+
23
+ ```sh
24
+ npm install --global ./attocash-cli-0.1.0.tgz ./attocash-mcp-0.1.0.tgz
25
+ ```
26
+
27
+ Use `npm run pack` from the repository root to create the supported artifacts.
28
+ See the [repository packaging notes](https://github.com/attocash/integrations#packaging)
29
+ for dependency locking and installed-package verification.
30
+
31
+ Linux also requires `secret-tool` (usually the `libsecret-tools` package), an
32
+ unlocked Secret Service provider such as GNOME Keyring or KWallet, and access to
33
+ your desktop D-Bus session. macOS uses Keychain; Windows uses Credential Manager.
34
+ An unavailable password store is an error; there is no plaintext file fallback.
35
+
36
+ ## Update notices
37
+
38
+ Interactive CLI commands can show a notice on stderr when a newer stable CLI
39
+ version is available. The notice includes the exact installation command;
40
+ updates are always manual. Version checks run in the background, with each
41
+ attempt cached for 24 hours, including failed attempts. Their results appear
42
+ on a later command. Network and cache failures are silent.
43
+
44
+ Use `--no-update-notifier` or set `NO_UPDATE_NOTIFIER` to disable notices and
45
+ checks. They are also disabled with `--json`, redirected stdout or stderr,
46
+ CI, or `NODE_ENV=test`. MCP and the `@attocash/cli/core` library do not check
47
+ for updates or display notices.
48
+
49
+ Checks request public package metadata from the npm registry and send no wallet
50
+ data. The cache contains only public version information and timestamps,
51
+ separately from wallet state:
52
+
53
+ | OS | Update cache |
54
+ | --- | --- |
55
+ | Linux | `$XDG_CACHE_HOME/atto-cli/update.json`, or `~/.cache/atto-cli/update.json` |
56
+ | macOS | `~/Library/Caches/atto-cli/update.json` |
57
+ | Windows | `%LOCALAPPDATA%/atto-cli/Cache/update.json`, or `~/AppData/Local/atto-cli/Cache/update.json` |
58
+
59
+ Once a version is published, replace `VERSION` below with that version to
60
+ update a global CLI installation:
61
+
62
+ ```sh
63
+ npm install --global @attocash/cli@VERSION
64
+ ```
65
+
66
+ If MCP is installed too, update the matching pair and restart the MCP process:
67
+
68
+ ```sh
69
+ npm install --global @attocash/cli@VERSION @attocash/mcp@VERSION
70
+ ```
71
+
72
+ ## Set up the wallet
73
+
74
+ Run either command in an interactive terminal:
75
+
76
+ ```sh
77
+ atto wallet create
78
+ # Or import an existing recovery phrase through a hidden prompt:
79
+ atto wallet import
80
+ ```
81
+
82
+ Creation stores the mnemonic successfully before displaying the recovery phrase.
83
+ Keep a private offline copy. `atto wallet backup` displays it again in the
84
+ terminal and adds a JSON confirmation only when `--json` is requested.
85
+ Wallet creation, import, and backup require terminal input and terminal
86
+ stderr; they are unavailable as MCP tools or through redirected pipes. Mnemonics
87
+ are never accepted in command arguments, JSON, configuration, or environment variables.
88
+
89
+ Import refuses an initialized wallet before asking for the recovery phrase. To
90
+ replace it, back up its phrase and public profile, stop any CLI or MCP sessions
91
+ using that profile, then run:
92
+
93
+ ```sh
94
+ atto wallet reset
95
+ atto wallet import
96
+ ```
97
+
98
+ For a custom profile, pass the same `--data-dir` to both commands. Reset requires
99
+ an interactive terminal and typing `reset` after reviewing the selected wallet.
100
+ It removes that profile's password-store credential and clears local addresses,
101
+ personal labels, pinned destinations, payment history, settings, spending limits, and access permissions. You need the saved
102
+ recovery phrase and account indexes to access its funds again. Profile metadata
103
+ and database lock files stay in place so the credential namespace and coordination
104
+ remain stable.
105
+ Other open sessions and unresolved payments prevent reset. If reset is interrupted,
106
+ run it again to finish before creating or importing a wallet. After upgrading from
107
+ a version without reset support, restart existing CLI/MCP processes before using
108
+ this command.
109
+
110
+ New standard CLI profiles use the **Atto CLI** password-store service. Existing
111
+ legacy and custom profiles retain **Atto MCP** and their existing credential
112
+ accounts; no keys are moved. Neither service reads or overwrites the desktop
113
+ Atto wallet. See [profiles and recovery](#profiles-and-recovery) for directories
114
+ and compatibility. Index `0` starts active. Deriving another
115
+ index saves its public address; activating it includes it in default balance
116
+ queries and automatic receiving. The network account opens on its first receive.
117
+ At most 100 addresses can be active at once; deactivate one before activating
118
+ another when that limit is reached.
119
+
120
+ ```sh
121
+ atto wallet status
122
+ atto address add
123
+ atto address list
124
+ atto balances
125
+ atto balances --all
126
+ ```
127
+
128
+ `address add` saves and activates the next index after the highest saved index.
129
+ Use `address derive N` to save a specific inactive address, or `address activate N`
130
+ to derive and activate one. Balances include active accounts by default;
131
+ `--all` includes every saved address and `--index N` selects one. Saved accounts
132
+ show their index and activation state alongside their balance.
133
+
134
+ Defaults use the Atto wallet's LIVE endpoints and twelve-representative pool.
135
+ Automatic receiving is enabled with a minimum of `1 RAW`. It runs while
136
+ `atto wallet receive` is running. MCP also runs it when that profile
137
+ has locally approved spending access; read-only MCP does not receive funds or
138
+ make other wallet changes. Finite CLI commands do their requested operation and
139
+ exit. Stop a persistent command with Ctrl+C.
140
+
141
+ `wallet receive` reports pending payments, processing, confirmed receives, and
142
+ retries as they happen, including the account index, amount, and transaction hashes.
143
+ Connection errors are shown with their retry delay. `--json` emits the initial
144
+ wallet status followed by one `result` object per progress event; its `event`
145
+ field is `pending`, `receiving`, `received`, `retry`, `skipped`, or `reconnecting`.
146
+ Subscriptions use Commons' streaming APIs. The CLI does not impose a deadline
147
+ for the first payment or response headers. Finite list commands still stop at
148
+ their requested collection deadline.
149
+
150
+ ```sh
151
+ atto wallet receive
152
+ atto wallet configure --no-auto-receive
153
+ atto wallet configure --auto-receive
154
+ atto wallet configure --representative <atto-address>
155
+ ```
156
+
157
+ Configuration updates preserve omitted settings. Supply at least one option.
158
+ `--representative` changes the default used to open accounts; use
159
+ `atto representative change <address>` to change an existing account's representative.
160
+ `wallet status` shows the profile directory and whether receiving runs in that
161
+ process; it does not report receiving sessions in other terminals.
162
+
163
+ To use another network, configure its node, work server, and representative
164
+ explicitly. A network name alone does not replace the other settings:
165
+
166
+ ```sh
167
+ atto wallet configure --network LOCAL \
168
+ --node-url http://127.0.0.1:8080 --worker-url http://127.0.0.1:8081 \
169
+ --representative <atto-address>
170
+ ```
171
+
172
+ Endpoint URLs accept HTTP(S) without embedded credentials, query strings, or
173
+ fragments. Pending uncertain sends must be resolved before changing the network
174
+ or node endpoint.
175
+
176
+ Settings are saved in `state.sqlite` inside the selected profile directory
177
+ (normally `~/.local/share/atto-cli` on Linux), in the `settings` table's
178
+ `settings` row. Its JSON contains `nodeUrl`, `workerUrl`, and the other wallet
179
+ settings. Use `atto wallet status` to view them and `atto wallet configure`
180
+ to change them.
181
+
182
+ ## Use the CLI
183
+
184
+ Run `atto` to see the available commands. Incomplete command groups such as
185
+ `atto wallet`, and invalid commands or options, show an error and the relevant
186
+ help on stderr. Explicit `--help` and bare `atto` print help on stdout and exit
187
+ successfully. With `--json`, parser errors remain structured JSON on stdout.
188
+
189
+ Amounts are exact decimal strings. The default unit is `ATTO`; use `--unit RAW`
190
+ for raw amounts. `atto send` generates a unique request ID and displays it before
191
+ starting. Use `--request-id` to supply your own or check a previous payment.
192
+ **Running the command again without its original ID creates a new payment.**
193
+
194
+ Temporary connection failures, timeouts, and HTTP 5xx responses retry automatically
195
+ with delays of 1, 2, 4, 8, 16, then 30 seconds until success or Ctrl+C. HTTP 4xx
196
+ responses (including 429), invalid responses, and local validation or policy errors
197
+ stop the command. Retrying publication checks for confirmation first and otherwise
198
+ resends the identical signed transaction; it never builds another debit.
199
+
200
+ Ctrl+C stops further attempts. An in-flight Commons node request finishes or times
201
+ out before shutdown; a payment may already have reached the node. Keep the request
202
+ ID and inspect `atto journal show <request-id>` before starting another payment.
203
+ Reusing an unresolved payment's ID checks its recorded transaction; it does not
204
+ construct a replacement payment.
205
+ With `--json`, stdout contains one result/error envelope; request ID and retry
206
+ progress are JSON lines on stderr. Error details include the request ID.
207
+ MCP and generic `atto call send` still require a caller-supplied ID and do not
208
+ automatically retry.
209
+
210
+ ```sh
211
+ atto account --index 0
212
+ atto account <atto-address>
213
+ atto balances --addresses <address-1>,<address-2>
214
+ atto send <destination> 1.25
215
+ atto send --to-index 1 --amount 1
216
+ atto send --to-label "Savings" --amount 1
217
+ atto send <destination> 1 --index 1 --request-id invoice-from-account-1
218
+ atto send <destination> 100 --unit RAW --request-id invoice-2026-002
219
+ atto send <destination> 1 --request-id order-42 --reason 'Invoice 42' --metadata '{"orderId":"42"}'
220
+ atto pool status
221
+ atto journal list --status unknown --limit 20
222
+ atto journal show order-42
223
+ atto quote --usd 1
224
+ atto metrics
225
+ atto receivables --limit 100
226
+ atto receive <send-hash> --index 0
227
+ atto receive-all --index 0
228
+ atto representative change <atto-address> --index 0
229
+ atto representative weight <atto-address>
230
+ atto transaction <hash>
231
+ atto entry <hash>
232
+ atto history transaction --addresses <atto-address> --from-height 1 --limit 50
233
+ atto history --index 0
234
+ atto history entry --addresses <atto-address> --cursor <returned-cursor>
235
+ atto watch account --addresses <atto-address>
236
+ atto watch receivable --addresses <atto-address> --min-amount-raw 1
237
+ atto watch transaction --network-wide
238
+ ```
239
+
240
+ To send 1 ATTO from account 0 to saved account 1, use
241
+ `atto send --to-index 1 --amount 1`. The destination must already be saved;
242
+ `--to-index` does not derive it. Choose a destination address, `--to-index`, or `--to-label`,
243
+ and use `--amount` or `--usd` with index/name targets. Each send generates its request ID
244
+ when omitted; retain the printed ID for retries.
245
+
246
+ `atto send` uses index `0` by default. Use `--index N` to select another derived
247
+ account, or `--pool` to select automatically from the approved account pool.
248
+ `--pool` and `--index` are mutually exclusive. Default and explicit source
249
+ accounts must hold the full payment amount. The initial pool contains index `0`,
250
+ with consolidation disabled. MCP selects from the approved pool when its `index`
251
+ is omitted; explicit MCP indexes must also belong to that pool.
252
+
253
+ Configure the pool in your own terminal:
254
+
255
+ ```sh
256
+ atto pool configure --indexes 0,1,2
257
+ # Allow sends using --pool to combine balances from these accounts:
258
+ atto pool configure --indexes 0,1,2 --consolidate
259
+ ```
260
+
261
+ This preserves the spending limits and MCP access mode, displays the exact pool
262
+ change, and requires local approval. Omitted pool settings are preserved; `--no-consolidate` disables consolidation. Pool
263
+ indexes must be unique, between `0` and `2147483647`, with at most 100 members.
264
+ Approval derives missing indexes without activating them for automatic receiving.
265
+ `pool status` reports balances, available totals, and account readiness.
266
+
267
+ Pool selection prefers an available account with enough funds and valid work for
268
+ its current account head. Public work is prepared when a spending session starts and
269
+ after confirmed account mutations, and cached in the shared profile. Account
270
+ locks allow independent accounts to send concurrently across CLI/MCP processes
271
+ using that same local profile; unfinished payments keep their accounts reserved.
272
+
273
+ When consolidation is approved, a payment using `--pool` may first move funds
274
+ among verified wallet-owned pool accounts, then make one payment to the destination.
275
+ Only the final payment consumes the spending allowance. Consolidation applies
276
+ only to automatic pool selection (`--pool` for `atto send`). Spending limits and
277
+ pool approval are checked again
278
+ before each planned signature; a partially completed payment can pause until its
279
+ remaining steps are authorized again. Retain `--pool` and the original request ID
280
+ to resume confirmed progress. An unresolved block remains reserved until canonical network
281
+ evidence establishes its outcome.
282
+
283
+ ```sh
284
+ atto send <destination> 2 --pool --request-id pooled-invoice-2026-001
285
+ # Retry that same payment after an interruption:
286
+ atto send <destination> 2 --pool --request-id pooled-invoice-2026-001
287
+ ```
288
+
289
+ `--metadata` accepts a JSON object of up to 4096 UTF-8 bytes with bounded nesting;
290
+ `--reason` adds `metadata.reason`. Supplying the reason twice is rejected.
291
+ Metadata stays in the local payment journal and is never published on the Atto
292
+ network. Treat it as caller-supplied text and keep secrets out of it. A retry
293
+ retains the original metadata when omitted; changed metadata for the same request
294
+ ID is rejected.
295
+
296
+ `journal list` returns newest records first, with an optional `--status` of
297
+ `reserved`, `signed`, `published`, `unknown`, or `failed`. Use the returned
298
+ `nextCursor` as `--cursor` with the same status filter; `--limit` accepts 1–100
299
+ and defaults to 50. `journal show` reads one request's metadata, source, network,
300
+ and recorded payment progress.
301
+
302
+ USD-priced sends use an indicative market conversion. Read the terms, record
303
+ your explicit acceptance of their current version, then send:
304
+
305
+ ```sh
306
+ atto terms show
307
+ atto terms accept --version <displayed-version> --accepted
308
+ atto send --destination <atto-address> --usd 1 --request-id invoice-2026-003
309
+ # Equivalent amount/unit form:
310
+ atto send <atto-address> 1 --unit USD --request-id invoice-2026-004
311
+ ```
312
+
313
+ USD sends are available on LIVE. Market data is dated daily, and conversions
314
+ reject observations older than 72 hours. Amounts round down to whole RAW.
315
+ The returned price and timestamp describe an indicative valuation;
316
+ they do not guarantee an executable exchange price. No exchange trade is made.
317
+ A USD send fixes its Atto amount for that request ID, so retries do not reprice
318
+ the payment. Budget consumption always uses the resulting Atto amount. Reading
319
+ metrics and previewing a quote do not require accepting terms.
320
+
321
+ `history` defaults to account entries; use `history transaction` for transactions.
322
+ History, receivables, balances, and watches default to active wallet addresses.
323
+ Use `--index N` or `--addresses <address,...>` to select saved or external accounts;
324
+ these selectors cannot be combined. Watches also accept `--network-wide` for
325
+ account, transaction, and entry events, or `--hash` for one transaction or entry.
326
+ These scopes are mutually exclusive. Watches only observe events and report
327
+ connection status even when no events arrive; they do not start receiving.
328
+
329
+ List commands return bounded results and explain when the scan window or record
330
+ limit was reached. `history` and `journal list` support continuation cursors with
331
+ the same filters; `receivables` does not support cursors. History also supports
332
+ inclusive height ranges. Watch output reports retention gaps; account and
333
+ receivable streams do not guarantee replay of every transition.
334
+
335
+ `receive <hash>` receives one payment. `receive-all` processes a bounded batch
336
+ for account 0 by default (`--index N` selects another account). Run it again if
337
+ more remain, or use `wallet receive` for continuous receiving across active
338
+ accounts. Continuous receiving requires an initialized wallet, enabled automatic
339
+ receiving, and at least one active account.
340
+
341
+ CLI commands print readable text by default, including when piped. Wallet import
342
+ and creation show a confirmation and address; balances, payments, history, and
343
+ watches show labeled values. Addresses, amounts, hashes, and cursors are never
344
+ rounded or shortened. Wallet status omits internal fingerprints and public keys.
345
+ Payment and network summaries show exact ATTO and RAW amounts, addresses, and
346
+ transaction hashes. Human output omits signatures, work, and serialized blocks;
347
+ `--json` includes the complete protocol data. Local payment metadata stays visible.
348
+
349
+ Use `--json` whenever you want the complete structured result, especially in
350
+ scripts. This applies to every command, including `call` and streaming watches:
351
+
352
+ ```sh
353
+ atto wallet status
354
+ atto --json wallet status
355
+ atto --json balances
356
+ atto --json journal list
357
+ ```
358
+
359
+ In JSON mode, success is
360
+ `{"result": ...}`; operational failure is
361
+ `{"error":{"code":"...","message":"..."}}` and a nonzero exit status.
362
+ Each response is one compact JSON line. Existing scripts that parsed the old
363
+ default pretty-printed JSON must now pass `--json`. MCP response formats are unchanged.
364
+ Without `--json`, failures and cancellations are readable messages on stderr.
365
+ Cancelling a prompt exits with status `1` and leaves the wallet unchanged.
366
+ Large protocol integers remain strings. Invalid CLI arguments return a sanitized
367
+ `INVALID_INPUT` error; use command-specific `--help` for accepted arguments.
368
+ Dependency diagnostics go to stderr.
369
+
370
+ Single operations are available through the CLI's generic adapter. Inspect an
371
+ operation's input schema before constructing its JSON:
372
+
373
+ ```sh
374
+ atto operations
375
+ atto operations send
376
+ atto --json call account_get --input '{"index":0}'
377
+ atto --json call history_list --input '{"event":"entry","limit":50}'
378
+ ```
379
+
380
+ Generic `atto call send` follows the shared operation schema: omitting `index`
381
+ selects from the approved pool. Include `"index": 0` to select account zero.
382
+
383
+ `atto watch` keeps its session open and streams events directly. Generic
384
+ `call watch_*` commands are rejected because their session would end immediately;
385
+ use MCP for persistent watch IDs and cursor-based polling.
386
+
387
+ ## Diagnostics
388
+
389
+ Run doctor in the environment where the failure happens:
390
+
391
+ ```sh
392
+ atto doctor
393
+ atto --json doctor
394
+ atto --data-dir /absolute/path/to/profile doctor
395
+ atto-mcp --data-dir /absolute/path/to/profile doctor
396
+ # After publication, no global installation is needed:
397
+ npx --yes @attocash/mcp@VERSION --data-dir /absolute/path/to/profile doctor
398
+ ```
399
+
400
+ Both commands run full checks by default. Allow up to 60 seconds. The OS password
401
+ store may ask you to unlock it or allow credential access, and the worker receives
402
+ one fresh proof-of-work request. Doctor verifies the recovery phrase against the
403
+ saved wallet identity inside a separate process; it never prints or returns the
404
+ phrase, seed, or private key. Nothing is signed, published, or added to the work
405
+ cache. Doctor does not start receiving or retry pending payments.
406
+
407
+ The report includes:
408
+
409
+ - Runtime and package versions, executable, selected profile, credential service
410
+ and account, configured node and worker URLs.
411
+ - Public-state readability, supported state version, and directory/file access
412
+ and permissions, without initialization, migrations, or permission changes.
413
+ - Password-store backend and credential access. On Linux, observations about
414
+ `secret-tool`, D-Bus, and the runtime directory help distinguish launch issues.
415
+ - Actual node time and account APIs, configured network, and a bounded Commons
416
+ account stream. An unopened wallet account can use the configured representative
417
+ for an observable snapshot. No snapshot is reported as unverified, not as proof
418
+ that an infinite idle stream is broken.
419
+ - Fresh worker output validated by Commons against a random public target.
420
+ - Initialization, receiving prerequisites, unfinished reset/payments, and MCP
421
+ access when diagnosing MCP. Read-only MCP access is a valid choice.
422
+ - LIVE USD-price freshness and terms acceptance. USD-only issues are warnings;
423
+ ordinary ATTO payments do not require market data or accepted USD terms.
424
+
425
+ Each check has a stable `id`, `status` (`pass`, `warn`, `fail`, or `skipped`),
426
+ `code`, and message, with safe evidence and remediation steps where useful.
427
+ The JSON report contains `context`, `checks`, overall `status`, and `durationMs`.
428
+ CLI output is readable text by default; `--json` wraps the full report in
429
+ `{"result": ...}` even when checks fail. Exit status is `1` if any check fails,
430
+ otherwise `0`. Missing prerequisites produce explicit skipped checks.
431
+
432
+ Node reads and streaming each have a 10-second budget; credential and work probes
433
+ have a 30-second budget, within the 60-second overall deadline. Ctrl+C cancels
434
+ outstanding checks, including native credential probes and their subprocesses.
435
+ Doctor does not check npm for updates.
436
+
437
+ An agent should call the MCP **`doctor` tool** to inspect the server's own process.
438
+ A terminal result cannot establish that an already-running MCP has the same
439
+ environment. When a user-owned Linux session socket is available, doctor may test
440
+ environment overrides in an isolated credential probe. It returns
441
+ `remediation.suggestedEnv` only if the stored credential becomes readable and
442
+ matches the wallet. The current check remains failed until the launcher is
443
+ corrected. Apply only authorized configuration changes, restart the MCP
444
+ connection, and rerun its tool. Doctor never changes environment variables,
445
+ client configuration, spending approvals, or terms acceptance; there is no
446
+ `--fix` option.
447
+
448
+ If MCP cannot start because its profile is invalid, run `atto-mcp doctor` with
449
+ that same `--data-dir` in a terminal. Its diagnostic entry point does not need to
450
+ open a wallet session. An absent profile uses explicitly labelled defaults and
451
+ is not created; an invalid profile is reported without substituting another one.
452
+ SQLite may maintain its normal WAL coordination files during inspection; wallet
453
+ data, settings, journal entries, approvals, and work caches are unchanged.
454
+
455
+ The library exports `runDoctor({ directory?, access?: 'mcp', signal? })` from
456
+ `@attocash/cli/core`, independently of `createApplication`. Applications with an
457
+ open wallet can also use `call('doctor')`.
458
+
459
+ ## Spending limits and MCP access
460
+
461
+ CLI spending starts without a cap; **MCP access defaults to read-only**. Set a
462
+ per-request cap, multiple rolling day windows, or both. All configured rules must pass.
463
+ Changing limits requires a human to review and confirm the change in an
464
+ interactive terminal; reading them does not:
465
+
466
+ ```sh
467
+ atto limits set --per-payment 10 --daily 25
468
+ atto limits set --input '{"perRequest":{"amount":"10","unit":"ATTO"},"rolling":[{"days":1,"amount":"25","unit":"ATTO"},{"days":7,"amount":"100","unit":"ATTO"}]}'
469
+ atto limits status
470
+ atto limits clear
471
+ ```
472
+
473
+ Amount flags default to ATTO; use `--unit RAW` for raw amounts. Omitted limits
474
+ are preserved, and `--daily` replaces only the rolling 24-hour rule. Advanced
475
+ `--input` replaces the entire policy and cannot be combined with amount flags.
476
+ Pool configuration also preserves omitted settings; use `--no-consolidate` to
477
+ disable consolidation explicitly.
478
+
479
+ `limits set` preserves the existing MCP access mode unless you supply
480
+ `--access read-only` or `--access spend`. `limits clear` also preserves that mode;
481
+ if MCP already has spending access, clearing its limits permits unlimited sends.
482
+ To enable MCP with a bounded policy explicitly:
483
+
484
+ ```sh
485
+ atto --data-dir /absolute/path/to/profile limits set --access spend \
486
+ --input '{"perRequest":{"amount":"10","unit":"ATTO"},"rolling":[{"days":1,"amount":"25","unit":"ATTO"}]}'
487
+ ```
488
+
489
+ MCP `limits_propose` and generic `atto call limits_propose` **only propose** a change.
490
+ They cannot apply it. `limits_propose` also accepts `pool` with `indexes` and
491
+ `consolidate`; omitting it preserves the current pool. `limits_get` returns the
492
+ active policy, usage, `mcpAccess`, pool, and current proposal. A human approves or rejects the proposal in their own
493
+ terminal, using the same directory as the MCP client's configuration:
494
+
495
+ ```sh
496
+ atto --data-dir /absolute/path/to/profile limits approve PROPOSAL_ID
497
+ atto --data-dir /absolute/path/to/profile limits reject PROPOSAL_ID
498
+ ```
499
+
500
+ There is no MCP approval tool or noninteractive approval flag. Each proposal is
501
+ bound to its profile directory, wallet identity, network, and policy revision.
502
+ It expires after 24 hours; a newer proposal replaces the previous ID. Approval
503
+ rechecks those details after you confirm.
504
+
505
+ Read-only MCP can read data, manage personal labels, watch events, and propose limits. It cannot send,
506
+ receive, derive or activate addresses, change representatives or wallet
507
+ configuration, or record terms acceptance. Approved spending access enables
508
+ these operations, with sends subject to the shared policy. This is an MCP tool
509
+ boundary, not a sandbox for programs or shells running as the same OS user.
510
+
511
+ Limits accept `ATTO` or `RAW` and aggregate sends through this CLI and MCP across
512
+ all derived addresses, including ordinary payments to owned addresses. Internal
513
+ transfers in an approved consolidation plan are excluded, so the final payment
514
+ counts once. They also exclude
515
+ payments made by other wallet applications. Receiving and representative changes do not consume an
516
+ allowance. USD sends count their converted RAW amount. Changing limits preserves
517
+ historical spending and pending reservations.
518
+
519
+ Simultaneous CLI/MCP mutations are coordinated. A send reserves allowance before
520
+ signing and records its block hash before publication. If publication is
521
+ uncertain, the reservation stays counted. Retry **the same request ID** to check
522
+ the existing outcome. A conflicting reuse is rejected; a timeout does not create
523
+ a second payment. `wallet status` lists pending sends, and `limits status`
524
+ reconciles them against the configured node.
525
+
526
+ ## Address labels and personal-name payments
527
+
528
+ Save names for existing wallet indexes or external addresses without importing
529
+ or activating an account:
530
+
531
+ ```sh
532
+ atto labels set 1 "Savings"
533
+ atto labels set <atto-address> "Family"
534
+ atto labels show 1
535
+ atto labels list
536
+ atto labels list --all --search treasury
537
+ atto labels list --all --refresh
538
+ atto labels remove 1
539
+ atto send --to-label "Family" --amount 1 --request-id family-payment-1
540
+ ```
541
+
542
+ Numeric label targets select **existing saved indexes**. Names are local to the
543
+ selected profile and network, unique after trimming and case-insensitive
544
+ matching, and contain 1–128 Unicode characters after trimming. Control characters
545
+ are rejected. Removing a label is idempotent. Profile backups include these labels
546
+ and destination bindings in `state.sqlite`; wallet reset clears them. All commands support `--json`;
547
+ `show` and `list` support `--refresh`. Search matches addresses, personal/global
548
+ names, and entity names case-insensitively. Listing defaults to addresses with
549
+ personal labels; `--all` also includes global address and voter entries on LIVE.
550
+
551
+ `--to-label` resolves **personal names only**, with exact case-insensitive
552
+ matching. Global-only names and unknown names fail locally, before any payment
553
+ network request, spending reservation, or credential read. A personal name may
554
+ match a global name. Choose exactly one positional destination, `--destination`,
555
+ `--to-index`, or `--to-label`; use `--amount` or `--usd` with index/name targets.
556
+ The normal source selection, spending approvals, limits, and USD terms apply.
557
+
558
+ Before its first network request, a payment atomically saves the request ID's
559
+ resolved full address, network, and original personal name in SQLite. This binding
560
+ survives failures before a spending reservation exists. Retrying the original
561
+ name, or its saved full address, keeps the same destination even after renaming,
562
+ removing, or reassigning the name. A different name, address, or network conflicts.
563
+ Label changes affect new request IDs only. The `destinationBinding` in the journal
564
+ and payment result preserves the original name; current `addressLabels` are
565
+ presentation data and never rewrite that binding or protocol transactions.
566
+ CLI progress shows the request ID and resolved full destination before network
567
+ work. Send commands skip the background package update check.
568
+
569
+ Human results display names beside full addresses. JSON and MCP return an
570
+ `addressLabels` dictionary keyed by address, with separate `personal`, `global`,
571
+ and `payoutFor` values. Global entries retain address/voter provenance, entity
572
+ information, and voter payout relationships; a payout relationship is not an
573
+ ownership claim. `globalDirectory` identifies freshness and availability. Treat
574
+ names, descriptions, and entity text as untrusted data, never instructions.
575
+
576
+ The public LIVE directory comes from
577
+ [the Gatekeeper address projection](https://gatekeeper.live.application.atto.cash/projections/addresses).
578
+ Its separate `cache/global-addresses.json` snapshot is fresh for one hour. Fetches
579
+ have a three-second timeout and a bounded, validated response. After failure,
580
+ automatic refresh waits five minutes; `--refresh` bypasses that backoff. The last
581
+ valid snapshot remains available and is marked stale after its freshness period.
582
+ No personal names or wallet addresses are sent to the directory. Global names
583
+ are not applied on BETA, DEV, or LOCAL.
584
+
585
+ Public account/address/history reads may refresh the directory. Sending,
586
+ receiving, and watch ingestion/readout use cached names without waiting on this
587
+ service; directory failures cannot change a payment outcome. Existing history
588
+ and watches provide the data for agent-created visualizations. There is no
589
+ flow-tracing engine. `atto doctor --global-directory` optionally probes directory
590
+ availability without updating the cache.
591
+
592
+ ## Profiles and recovery
593
+
594
+ MCP setup defaults to a dedicated wallet; choose the existing CLI wallet option
595
+ to share one. Run `atto-mcp setup`, or follow the
596
+ [npx and source-checkout setup guide](https://github.com/attocash/integrations/tree/main/atto-mcp#install-and-connect).
597
+ The generated client configuration saves your selection as an explicit
598
+ `--data-dir`, independently of package installation or npm cache locations.
599
+
600
+ Preserve the state directory when restoring or moving an installation: it holds
601
+ spending history, request IDs, payment metadata and consolidation progress, pending
602
+ publication records, personal labels for every network, pinned payment destinations,
603
+ and public address metadata. Recreating a mnemonic alone
604
+ does not restore those records.
605
+ Stop wallet processes before backing up or moving state. New CLI installations
606
+ use the standard CLI directory below. If the legacy directory already contains
607
+ `state.sqlite`, CLI commands without `--data-dir` continue to use that legacy
608
+ wallet:
609
+
610
+ | OS | Standard CLI directory | Legacy directory |
611
+ | --- | --- | --- |
612
+ | Linux | `$XDG_DATA_HOME/atto-cli`, or `~/.local/share/atto-cli` | `$XDG_DATA_HOME/atto-mcp`, or `~/.local/share/atto-mcp` |
613
+ | macOS | `~/Library/Application Support/Atto CLI` | `~/Library/Application Support/Atto MCP` |
614
+ | Windows | `%LOCALAPPDATA%/Atto CLI` | `%LOCALAPPDATA%/Atto MCP` |
615
+
616
+ Windows falls back to `~/AppData/Local` when `LOCALAPPDATA` is unset. The dedicated
617
+ MCP directory is `profiles/mcp` inside the legacy directory. MCP without an
618
+ explicit `--data-dir` selects that dedicated profile, not the CLI default.
619
+ Existing MCP clients that previously omitted the option should choose their
620
+ existing wallet during setup or specify its old directory explicitly.
621
+
622
+ Both executables accept `--data-dir <directory>`. The legacy default keeps its
623
+ `default` credential account; other accounts are derived from the absolute path.
624
+ New standard CLI profiles also contain public `profile.json` metadata selecting
625
+ the **Atto CLI** service. **Include this file in profile backups.** The marker
626
+ also pins a newly selected standard CLI default, so legacy state created later
627
+ does not silently switch wallets; creating an explicit standard profile alongside
628
+ an existing legacy wallet preserves the legacy default. An older wallet already
629
+ at that path without the marker retains **Atto MCP**. Custom and
630
+ dedicated MCP profiles retain **Atto MCP** as well. Selecting the same absolute
631
+ directory from either interface selects the same credential and spending state.
632
+
633
+ Keep the same absolute directory when restoring whenever possible. A different
634
+ path selects its own credential account and may select a different service;
635
+ recovery there requires restoring the corresponding password-store entry before
636
+ resuming payments. Preserve the original state and service metadata. No mnemonic
637
+ is stored in the profile directory.
638
+
639
+ If the password store is locked or unavailable, unlock it and retry. If the
640
+ mnemonic is lost from the password store, recover it from your private backup
641
+ using `atto wallet import` in an uninitialized profile. Preserve the old public
642
+ state and pending-send records for reconciliation before resuming payments.
643
+
644
+ ## Library API
645
+
646
+ Other local adapters can import the supported engine interface:
647
+
648
+ ```js
649
+ import { createApplication, operations } from '@attocash/cli/core';
650
+
651
+ const application = createApplication({ directory: '/absolute/path/to/profile' });
652
+ try {
653
+ const balances = await application.call('balances_get');
654
+ console.log(balances);
655
+ console.log(operations.map(operation => operation.name));
656
+ } finally {
657
+ await application.close();
658
+ }
659
+ ```
660
+
661
+ Omit `directory` to use the CLI default wallet. The exported `ApplicationSession`
662
+ interface provides `call(name, input?)`, `start()`, and `close()`. Call `start()`
663
+ for a persistent session that should run automatic receiving, and always call
664
+ `close()` when the session ends. Watches belong to that application session.
665
+ The library's `send` operation selects from the approved pool when `index` is
666
+ omitted, matching MCP. The `atto send` command supplies index `0` by default and
667
+ uses that automatic selection only with `--pool`.
668
+
669
+ Adapters requiring the MCP permission policy pass `access: 'mcp'`; that session
670
+ rechecks the profile's approved access before wallet mutations. Automatic
671
+ receiving follows that access mode too. Generic `limits_propose` only creates a
672
+ proposal in either mode.
673
+
674
+ The entry point also exports `operations`, `errorResult`, and the `Operation`,
675
+ `ApplicationOptions`, and `ApplicationSession` types. It does not expose recovery
676
+ methods. Wallet creation, import, backup, and reset remain terminal commands. The MCP
677
+ package calls this API directly and keeps one application session for its stdio
678
+ connection. `@attocash/cli/profiles` provides shared directory resolution;
679
+ `@attocash/cli/terminal` provides interactive setup and proposal review for the
680
+ terminal executables.
681
+
682
+ ## Development and verification
683
+
684
+ Run workspace commands from the repository root:
685
+
686
+ ```sh
687
+ npm ci
688
+ npm run check
689
+ npm test
690
+ npm run test:integration
691
+ ATTO_TEST_KEYCHAIN=1 npm run test:keychain
692
+ npm run pack
693
+ npm run test:package
694
+ ```
695
+
696
+ For CLI development alone, use `npm run build --workspace @attocash/cli`,
697
+ `npm run check --workspace @attocash/cli`, and
698
+ `npm test --workspace @attocash/cli` after building. Run the source checkout with
699
+ `node atto-cli/dist/cli/main.js --help`.
700
+
701
+ Tests use temporary state, synthetic recovery material, and mock nodes/workers.
702
+ Platform credential-store tests run when `ATTO_TEST_KEYCHAIN=1`, use isolated
703
+ entries, and remove them afterward. Linux native credential persistence has
704
+ been verified in an isolated Secret Service session. macOS Keychain and Windows
705
+ Credential Manager verification is configured in CI and requires those
706
+ platforms. Container integration tests run on Linux. Tests never place live-fund
707
+ transactions or publish the package.