Skip to content

v6.0.0

Choose a tag to compare

@rotilho rotilho released this 12 Nov 09:30
· 154 commits to main since this release
e236d2d

What's Changed

6.0.0 is a major release that focuses on API ergonomics, multiplatform parity (JVM/JS/Wasm), and first‑class integrations. It introduces async builders, streaming monitors, a Spring Boot starter, richer primitives (time, future, validation), and a consolidated testing/mocking module. There are several breaking changes; see Migration below.

Highlights

  • New commons-spring-boot-starter module: Spring conversions, R2DBC custom conversions, and SpringDoc/OpenAPI integration. Ideal for building Atto services with Spring Boot.
  • New streaming monitors in commons-node: account, account‑entry, and transaction monitors with acknowledgeable progress.
  • Async client/worker APIs: builders for gradual setup and platform‑specific implementations (JVM/JS/Web/Wasm).
  • Multiplatform improvements: JS/Wasm parity for key primitives, hashing, and crypto utilities.
  • New examples: minimal Java client and JS client to get started fast.
  • Mocks for development: commons-test can download and run an Atto node using Docker or Podman transparently — ideal for local development and quick integration tests.

Breaking changes

  • Node client refactor
    • The node client interface now lives in commons-node (AttoNodeClient : AttoNodeOperations).
    • The HTTP implementation moved to commons-node-remote and is obtained via AttoNodeClient.remote(baseUrl, headerProvider) or via AttoNodeClientAsyncBuilder(url).
    • Older direct platform‑specific AttoNodeOperations implementations were removed. Use the remote client or your own implementation of AttoNodeOperations.
  • Testing modules consolidated
    • commons-node-test and commons-worker-test were removed.
    • New commons-test module provides cross‑platform mocks: AttoNodeMock, AttoNodeMockAsync, AttoWorkerMock, and builders, with JS and Wasm bindings.
  • Serialization cleanup
    • Legacy serializers under cash.atto.commons.serialiazer.* were removed.
    • Models now carry their own kotlinx.serialization where applicable (for example time via AttoInstantAsStringSerializer). If you depended on those serializer classes directly, update usages to the new built‑in serializers or your own.
  • Worker API adjustments
    • JVM‑specific classes like AttoWorkerJava were removed; use the common AttoWorker and the remote/async builders.
    • Some Jvm/JS‑only files were removed or moved to common. Prefer AttoWorkerAsyncBuilder for configuration, caching, and retries.

New features

  • Core primitives
    • AttoInstant: platform abstraction over time with (de)serialization helpers.
    • AttoFuture: lightweight future/promise abstraction with platform implementations (JVM/JS/Wasm).
    • AttoValidation: helpers to validate domain objects.
    • AttoJob and AttoWorkTarget types for worker operations.
    • AttoKeyIndex: strongly‑typed key index for seed derivation; overloads for UInt and Int remain.
  • Node monitoring
    • AttoAccountMonitor, AttoAccountEntryMonitor, AttoTransactionMonitor and their async counterparts plus builders (*AsyncBuilder) with JVM and Web implementations.
    • Height search utilities: AccountHeightSearch, HeightSearch and convenient fromArray constructor.
  • Remote clients and builders
    • AttoNodeClient.remote(baseUrl, headerProvider) convenience factory; time sync via now() returns server‑adjusted AttoInstant.
    • AttoNodeClientAsyncBuilder to configure headers incrementally on JVM/JS/Web.
    • AttoSigner.remote(url, retryEvery, headerProvider) in commons-signer-remote.
    • AttoWorker.remote(url, headerProvider), plus AttoWorkerAsync, AttoWorkerAsyncBuilder, AttoWorkerRetry, and AttoWorkerCache in commons-worker(-remote).
  • Wallet
    • AttoWalletAsync and AttoWalletAsyncBuilder for non‑blocking flows and integration with monitors.
    • Auto‑receiver helper to receive/open based on receivable stream.
  • JS/Wasm
    • Expanded JS and Wasm implementations for hashing and crypto; JS exports and TypeScript declarations updated.
  • Examples
    • examples/java-client and examples/js-client added.

Improvements and fixes

  • Unified timeouts and content negotiation on remote clients; improved error handling for 404s and streaming flows.
  • Better docs and READMEs across modules with end‑to‑end examples.
  • Build config updates and multiplatform refinements.

Migration

  • Node client
    • Replace any direct AttoNodeOperations platform impl usage with AttoNodeClient.remote("<baseUrl>") or provide your own AttoNodeOperations.
    • For incremental setup or when targeting the browser, use AttoNodeClientAsyncBuilder.remote(url) then .header(name, value) and .build().
  • Tests and mocks
    • Replace commons-node-test / commons-worker-test imports with commons-test equivalents:
      • cash.atto.commons.node.AttoNodeMock, AttoNodeMockAsync, AttoWorkerMock, etc. (available for JVM/JS/Wasm).
  • Serialization
    • Remove usages of cash.atto.commons.serialiazer.* classes. Use the serializers embedded in models (e.g., AttoInstantAsStringSerializer) or define custom ones.
  • Worker
    • Migrate from JVM‑specific worker classes to AttoWorker with remote(...), retry(...), and cached() helpers via AttoWorkerAsyncBuilder.

Bumps

  • Bump kotlin to 2.2.20 by @rotilho in #140
  • Bump actions/upload-artifact from 4 to 5 by @dependabot[bot] in #145
  • Bump actions/setup-node from 5 to 6 by @dependabot[bot] in #144
  • Bump github/codeql-action from 3 to 4 by @dependabot[bot] in #143
  • Bump io.mockk:mockk from 1.14.5 to 1.14.6 by @dependabot[bot] in #142
  • Bump gradle/actions from 4 to 5 by @dependabot[bot] in #141
  • Bump org.bouncycastle:bcprov-jdk18on from 1.80 to 1.82 by @dependabot[bot] in #136
  • Bump org.gradle.toolchains.foojay-resolver-convention from 0.10.0 to 1.0.0 by @dependabot[bot] in #115
  • Bump ktorVersion from 3.2.0 to 3.2.2 by @dependabot[bot] in #130
  • Bump org.testcontainers:mysql from 1.20.4 to 1.21.3 by @dependabot[bot] in #146
  • Bump io.github.oshai:kotlin-logging from 7.0.7 to 7.0.13 by @dependabot[bot] in #147
  • Bump org.jetbrains.kotlinx:kotlinx-serialization-core from 1.8.1 to 1.9.0 by @dependabot[bot] in #148
  • Bump kotlinVersion from 2.2.20 to 2.2.21 by @dependabot[bot] in #149
  • Bump org.jetbrains.kotlinx:kotlinx-browser from 0.3 to 0.5.0 by @dependabot[bot] in #150
  • Bump org.springframework.boot:spring-boot-dependencies from 3.5.6 to 3.5.7 by @dependabot[bot] in #155
  • Bump com.mysql:mysql-connector-j from 8.4.0 to 9.5.0 by @dependabot[bot] in #154
  • Bump io.swagger.core.v3:swagger-annotations-jakarta from 2.2.37 to 2.2.40 by @dependabot[bot] in #153
  • Bump org.jetbrains.dokka from 2.0.0 to 2.1.0 by @dependabot[bot] in #152
  • Bump org.springdoc:springdoc-openapi-starter-webflux-ui from 2.8.13 to 2.8.14 by @dependabot[bot] in #156
  • Bump ktorVersion from 3.3.1 to 3.3.2 by @dependabot[bot] in #157

Full Changelog: v5.4.0...v6.0.0