Skip to content

v3.0.0

Latest

Choose a tag to compare

@dev-adamant-im dev-adamant-im released this 21 Jun 15:22
023a4b1

adamant-api v3.0.0

Major SDK release, coordinated with ADAMANT Node v0.10.0. Updates the HTTP and WebSocket client for the current node API, introduces stable modular package boundaries, improves retry/failover behavior, adds deterministic generated metadata, and replaces the legacy Wiki-first documentation with a source-controlled VitePress + TypeDoc site.

Highlights

ADAMANT Node v0.10.0 support

  • Regenerates API DTOs from a pinned adamant-schema revision (ms timestamps, loader/status data, numeric counts, nullable unconfirmed-transaction fields).
  • Adds current transaction/chat query params: returnUnconfirmed, includeDirectTransfers, delegate lookup by address, multi-type transaction queries.
  • Combines transaction query filters with logical and by default; scopes amount filters to transfer transactions.
  • Adds optional timestampMs transaction construction and getEpochTimeMs; timestampMs is not in signed bytes, so hashes, IDs, and signatures are preserved.
  • Updates health checks for the consolidated node status response; supports inclusive minimum-node-version filtering.

Reliability and WebSocket behavior

  • Stops retrying explicit rejected POST responses; returns structured/non-retryable HTTP failures instead of looping.
  • Preserves retry and active-node failover for safe requests and network failures without an HTTP response.
  • Adds WebSocket subscriptions for multiple addresses, transaction types, and chat asset types.
  • Adds transaction/message convenience handlers, connection/reconnection callbacks, explicit connect/disconnect, typed connection errors, listener cleanup, and bounded reconnection handling.

Modular SDK and npm package

  • Keeps the package root ADM-focused; prevents loading coin-specific implementations.
  • Adds subpath exports for ADM, API DTOs, transactions, metadata, and BTC/ETH/DASH/DOGE helpers, retaining CommonJS and ESM support.
  • Adds deterministic wallet metadata synced from a pinned adamant-wallets revision.
  • Removes Lisk/Klayr code and dependencies; standardizes supported external-coin derivation and address validation.
  • Requires Node.js 22+, adopts pnpm workspace metadata, modernizes TypeScript/dependencies, adds consumer-level tarball tests.

API fixes retained since v2.4.0

  • Fixes delegate voting and health-check behavior.
  • Allows string payloads for signal messages; validates amounts only for message types that carry amounts.
  • Represents transaction IDs as strings; exports validator utilities.

Documentation, automation, and maintenance

  • VitePress documentation site with a TypeDoc-generated API reference and guides.
  • GitHub Pages docs workflow, CNAME, refreshed README/CONTRIBUTING.
  • Deterministic schema/metadata sync checks, custom Jest runner, package-consumer tests, expanded coverage, module-boundary tests.
  • Migrates linting and TypeScript config to the current toolchain; removes obsolete files.

⚠️ Breaking changes and migration notes

  • WebSocket subscriptions now default to allDirections. Previously the client delivered only incoming transactions (hard-coded recipientId === admAddress); it now emits both incoming and outgoing transactions by default. To restore the old behavior, pass direction: 'incoming' in the WebSocket client options.
  • Node.js 22+ required.
  • Import coin helpers from explicit paths such as adamant-api/coins/btc; they are no longer exported from the package root.
  • Lisk/Klayr support removed.
  • Transaction query filters now use logical and by default; amount filters apply only to transfer transactions.
  • Review deprecated withoutDirectTransfers usage and migrate to includeDirectTransfers.

Transaction byte layout, signing, IDs, and signature semantics are unchanged. CommonJS and ESM consumers are both covered by the packaged-tarball test.

Related

Full Changelog: v2.4.0...v3.0.0