Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
33 commits
Select commit Hold shift + click to select a range
6105c80
feat(sdk): typed error handling, trading streams, and activation refa…
CharlVS Mar 12, 2026
6cb1711
fix(web): complete wasm-safe sdk interop cleanup (#313)
CharlVS Mar 12, 2026
54e1420
feat(sdk): add high-level balance/transaction manager interfaces (#314)
CharlVS Mar 12, 2026
9388a40
fix(web): improve wasm JS interop bindings (#315)
CharlVS Mar 16, 2026
ab4e7f1
chore: upgrade KDF to 3.0.0-beta preview (#317)
CharlVS Mar 18, 2026
cd5b45d
feat(coins): Add TRON and TRC20 support (#316)
CharlVS Mar 18, 2026
ce60e66
fix(startup): handle 6133 seed fallback and invalid configs (#318)
CharlVS Mar 18, 2026
b563bdf
feat(sdk): add token safety and fee support helpers (#319)
CharlVS Mar 18, 2026
3d1b231
fix(sdk): expose custom token cleanup (#321)
CharlVS Mar 18, 2026
7a3f409
feat(sdk): add SIA activation and withdrawal support (#320)
CharlVS Mar 18, 2026
482ca5f
fix(withdrawals): remove duplicate executeWithdrawal method (#322)
CharlVS Mar 18, 2026
3b4f492
fix(ui): detect asset icon precache failures (#326)
CharlVS Mar 21, 2026
67193af
chore(build): format config updates consistently (#325)
CharlVS Mar 21, 2026
9532870
fix(auth): add mutex-protected atomic metadata updates (#328)
CharlVS Mar 21, 2026
317719d
fix(types): use reified generics in JSON traversal for wasm/minified …
CharlVS Mar 23, 2026
c70beed
fix(test): add missing updateActiveUserMetadataKey to fake auth servi…
CharlVS Mar 23, 2026
869dd00
chore(framework): bump bundled coins repo commit (#331)
CharlVS Mar 23, 2026
b4ad5c0
fix(streaming): gate enable_* calls on real SSE first-byte event (#332)
CharlVS Mar 23, 2026
0f5b76d
chore(release): publish packages
CharlVS Mar 23, 2026
4edb1c6
chore: update v0.9.4 changelog (#333)
CharlVS Mar 23, 2026
b5626fd
chore(build): update coins build config (#334)
CharlVS Mar 23, 2026
bee3cc6
fix(komodo_defi_sdk): keep last-known spot prices across cache rotati…
CharlVS Mar 23, 2026
ead35b0
fix: harden numeric JSON parsing for num/int compatibility (#336)
CharlVS Mar 23, 2026
ec8e714
fix(komodo_defi_types): support TRON explorer URLs (#338)
CharlVS Mar 24, 2026
39dd1fc
feat(komodo_defi_sdk): add Tronscan transaction history strategy (#339)
CharlVS Mar 24, 2026
877bb57
fix(sdk): restore TRX market data and coordinate activation (#340)
CharlVS Mar 25, 2026
1912489
feat(sdk): balance recovery mode and fee info improvements (#341)
CharlVS Mar 27, 2026
b8555f1
fix(rpc_methods): pass RPC method hint for ambiguous KDF error parsin…
CharlVS Mar 27, 2026
3cb147b
feat(sia)!: harden activation and withdrawal handling (#343)
CharlVS Mar 30, 2026
6dddeee
fix(ui): correct TRC20 badge icon mapping (#344)
CharlVS Mar 30, 2026
682a0b9
fix(ui): avoid duplicate icon precache requests (#345)
CharlVS Mar 30, 2026
ed300b1
fix(market-data): add CoinGecko failure cooldown and harden icon prec…
CharlVS Mar 30, 2026
dbc1472
chore(build): update KDF to v3.0.0-beta (d56a7bc) and coins to master
DeckerSU Apr 1, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
162 changes: 162 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,168 @@
All notable changes to this project will be documented in this file.
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.

## 2026-03-23

### Changes

---

Packages with breaking changes:

- [`komodo_cex_market_data` - `v0.1.0`](#komodo_cex_market_data---v010)
- [`komodo_coin_updates` - `v2.0.0`](#komodo_coin_updates---v200)
- [`komodo_defi_framework` - `v0.4.0`](#komodo_defi_framework---v040)
- [`komodo_defi_local_auth` - `v0.4.0`](#komodo_defi_local_auth---v040)
- [`komodo_defi_rpc_methods` - `v0.4.0`](#komodo_defi_rpc_methods---v040)
- [`komodo_defi_sdk` - `v0.5.0`](#komodo_defi_sdk---v050)
- [`komodo_defi_types` - `v0.4.0`](#komodo_defi_types---v040)
- [`komodo_wallet_cli` - `v0.5.0`](#komodo_wallet_cli---v050)

Packages with other changes:

- [`dragon_charts_flutter` - `v0.1.1-dev.4`](#dragon_charts_flutter---v011-dev4)
- [`dragon_logs` - `v2.0.1`](#dragon_logs---v201)
- [`komodo_coins` - `v0.3.2`](#komodo_coins---v032)
- [`komodo_ui` - `v0.3.1`](#komodo_ui---v031)
- [`komodo_wallet_build_transformer` - `v0.4.1`](#komodo_wallet_build_transformer---v041)

---

#### `komodo_cex_market_data` - `v0.1.0`

- **PERF**(logs): reduce market metrics log verbosity and duplication (#223).
- **FIX**(sdk): close balance and pubkey subscriptions on auth state changes (#232).
- **FIX**(binance): use the per-coin supported quote currency list instead of the global cache (#224).
- **FEAT**(cex-market-data): add CoinPaprika API provider as a fallback option (#215).
- **BREAKING** **FIX**(rpc): minimise RPC usage with comprehensive caching and streaming support (#262).

#### `komodo_coin_updates` - `v2.0.0`

- **PERF**(logs): reduce market metrics log verbosity and duplication (#223).
- **FIX**(startup): handle 6133 seed fallback and invalid configs (#318).
- **FIX**(config): loosen types for `needsTransform` checks and fix `lightwalletservers` typing.
- **FIX**(config): add SSL-only transforms for native platforms.
- **FIX**(sdk): close balance and pubkey subscriptions on auth state changes (#232).
- **FIX**(zhltc): zhltc activation fixes (#227).
- **FEAT**(coins): add TRON/TRC20-aware config and storage handling (#316).
- **FEAT**(sdk): add token safety and fee support helpers for custom-token flows (#319).
- **FEAT**(message-signing): add `AddressPath` support and refactor Asset/PubkeyInfo usage (#231).
- **FEAT**(coin-config): add custom token support to coin config manager (#225).
- **BREAKING** **FIX**(rpc): minimise RPC usage with comprehensive caching and streaming support (#262).

#### `komodo_defi_framework` - `v0.4.0`

- **REFACTOR**(macos): streamline KDF binary placement and update the signing flow (#247).
- **CHORE**(framework): upgrade bundled KDF and coins references for the 3.0.0-beta preview and latest coins roll (#317, #331).
- **FIX**(streaming): gate enable_* calls on a real SSE first-byte event (#332).
- **FIX**(auth): add mutex-protected atomic metadata updates (#328).
- **FIX**(startup): handle 6133 seed fallback and invalid configs (#318).
- **FIX**(web): improve WASM JS interop bindings (#315).
- **FIX**(web): complete WASM-safe SDK interop cleanup (#313).
- **FIX**(build): reformat build config and normalize API source URLs (#301).
- **FIX**(zhltc): zhltc activation fixes (#227).
- **FIX**(auth): store bip39 compatibility regardless of wallet type (#216).
- **FIX**(build): rename the transformer marker to `assets/transformer_invoker.txt`, update pubspec/README references, and remove the old dotfile exception.
- **FEAT**(sdk): add token safety and fee support helpers (#319).
- **FEAT**(sdk): add typed error plumbing, trading-stream foundations, and activation refactoring (#312).
- **FEAT**: add support for ETH-BASE and derived assets (#254).
- **BREAKING** **FIX**(rpc): minimise RPC usage with comprehensive caching and streaming support (#262).

#### `komodo_defi_local_auth` - `v0.4.0`

- **FIX**(test): add missing `updateActiveUserMetadataKey` coverage to the fake auth service (#330).
- **FIX**(auth): add mutex-protected atomic metadata updates (#328).
- **FIX**(auth): store bip39 compatibility regardless of wallet type (#216).
- **FEAT**(sdk): add typed error handling, trading streams, and activation refactoring foundations (#312).
- **BREAKING** **FIX**(rpc): minimise RPC usage with comprehensive caching and streaming support (#262).

#### `komodo_defi_rpc_methods` - `v0.4.0`

- **FIX**(sdk): close balance and pubkey subscriptions on auth state changes (#232).
- **FIX**(zhltc): zhltc activation fixes (#227).
- **FEAT**(errors): add generated MM2 exception models and richer task error details (#312).
- **FEAT**(wallet): extend HD wallet, password change, delete-wallet, and Trezor RPC shapes (#312).
- **FEAT**(coins): add TRON/TRC20 activation parameters and withdrawal request support (#316).
- **FEAT**(message-signing): add `AddressPath` type and refactor to use Asset/PubkeyInfo (#231).
- **BREAKING** **FIX**(rpc): minimise RPC usage with comprehensive caching and streaming support (#262).

#### `komodo_defi_sdk` - `v0.5.0`

- **FIX**(streaming): gate enable_* calls on a real SSE first-byte event (#332).
- **FIX**(withdrawals): remove the duplicate `executeWithdrawal` path (#322).
- **FIX**(sdk): expose custom token cleanup hooks (#321).
- **FIX**(build): keep zcash params pointed at official z.cash and align API source inputs (#301).
- **FIX**(sdk): close balance and pubkey subscriptions on auth state changes (#232).
- **FIX**(zhltc): zhltc activation fixes (#227).
- **FIX**(custom-token-import): refresh asset lists on import and use lowercase identifiers for custom token import (#220).
- **PERF**(streaming): expose managed `orderbook`, `swap_status`, and `order_status` subscriptions for stream-first trading refresh flows (#312, #262).
- **PERF**(rpc): add in-flight and short-lived result caches for `trade_preimage`, `max_taker_vol`, `max_maker_vol`, and `min_trading_vol` (#262).
- **PERF**(bridge): dedupe bridge orderbook depth requests, add taker preimage cache parity, and reduce validation retry fan-out (#262).
- **PERF**(polling): reduce recurring `my_recent_swaps` payload size, slow swaps and orders polling away from active DEX routes, and keep minute-level balance sweeping as fallback only when live watchers are unavailable (#262).
- **FEAT**(sdk): add SIA activation and withdrawal support (#320).
- **FEAT**(sdk): add token safety checks, fee helpers, and custom-token cleanup hooks (#319, #321).
- **FEAT**(coins): add TRON/TRC20 activation support, protocol wiring, and withdrawal coverage (#316).
- **FEAT**(sdk): add asset, balance, and transaction-history manager interfaces (#314).
- **FEAT**(sdk): add typed error mapping, trading-manager support, and activation/withdrawal refactoring foundations (#312).
- **FEAT**(activation): integrate `ActivatedAssetsCache` to optimize asset activation checks.
- **FEAT**(activation): add subclass token activation strategies and GRC routing for derived assets.
- **FEAT**: add support for ETH-BASE and derived assets (#254).
- **FEAT**(message-signing): add `AddressPath` type and refactor to use Asset/PubkeyInfo (#231).
- **FEAT**(coin-config): add custom token support to coin config manager (#225).
- **FEAT**(cex-market-data): add CoinPaprika API provider as a fallback option (#215).
- **BREAKING** **FIX**(rpc): minimise RPC usage with comprehensive caching and streaming support (#262).

#### `komodo_defi_types` - `v0.4.0`

- **FIX**(types): use reified generics in JSON traversal for WASM and minified builds (#329).
- **FIX**(startup): handle 6133 seed fallback and invalid configs (#318).
- **FIX**(asset-tagging): correct UTXO coins incorrectly tagged as Smart Chain (#244).
- **FIX**(sdk): close balance and pubkey subscriptions on auth state changes (#232).
- **FIX**(zhltc): zhltc activation fixes (#227).
- **FIX**(custom-token-import): refresh asset lists on import and use lowercase identifiers for custom token import (#220).
- **FEAT**(sdk): add token safety helpers and custom token exceptions (#319).
- **FEAT**(coins): add TRON/TRC20 protocols, protocol-type utilities, and derived-asset routing (#316).
- **FEAT**(sdk): add typed error support, updated activation progress, and refreshed withdrawal/fee types (#312).
- **FEAT**: add support for ETH-BASE and derived assets (#254).
- **FEAT**(coin-config): add custom token support to coin config manager (#225).
- **FEAT**(types): add parent display-name suffixes via subclasses (#213).
- **BREAKING** **FIX**(rpc): minimise RPC usage with comprehensive caching and streaming support (#262).

#### `komodo_wallet_cli` - `v0.5.0`

- **BREAKING** **FIX**(rpc): minimise RPC usage with comprehensive caching and streaming support (#262).

#### `dragon_charts_flutter` - `v0.1.1-dev.4`

- **FIX**(zhltc): zhltc activation fixes (#227).
- **FEAT**: add configurable sparkline baseline (#248).

#### `dragon_logs` - `v2.0.1`

- **FIX**(web): improve WASM JS interop bindings (#315).
- **FIX**(zhltc): zhltc activation fixes (#227).

#### `komodo_coins` - `v0.3.2`

- **PERF**(logs): reduce market metrics log verbosity and duplication (#223).
- **FIX**(zhltc): zhltc activation fixes (#227).
- **FEAT**(coin-config): add custom token support to coin config manager (#225).

#### `komodo_ui` - `v0.3.1`

- **FIX**(ui): detect asset icon precache failures (#326).
- **FIX**(zhltc): zhltc activation fixes (#227).
- **FIX**(custom-token-import): refresh asset lists on import and use lowercase identifiers for custom token import (#220).
- **FEAT**(coins): add TRON and TRC20 support (#316).
- **FEAT**(sdk): add typed error handling, trading streams, and activation refactoring foundations (#312).

#### `komodo_wallet_build_transformer` - `v0.4.1`

- **FIX**(build): keep zcash params pointed at official z.cash and align API source inputs (#301).
- **FIX**(build): rename the transformer marker to `assets/transformer_invoker.txt`, update pubspec/README references, and remove the old dotfile exception.
- **FEAT**(build): refresh GitHub asset downloading and typed build-transform plumbing for the new SDK generation flow (#312).


## 2025-08-25

### Changes
Expand Down
60 changes: 60 additions & 0 deletions docs/tech_debt/Market_Data_Price_Streaming_Tech_Debt.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
## Tech Debt Report: Market Data Price Streaming

### Context

- Current `MarketDataManager` APIs are request/response based.
- `priceIfKnown` is used as a read-only cache accessor by wallet totals.
- A recent stability fix keeps a last-known current-price cache to prevent
transient null windows when live cache rotates.
- Native streaming is still missing in `MarketDataManager` (explicit TODO in
`market_data_manager.dart`).

### Problem

- The app has no first-class SDK stream for fiat price updates.
- Existing app-level polling helpers are not SDK-owned contracts and are not
consistently used across features.
- Consumers must combine periodic fetches with cache reads, which duplicates
refresh logic in the app layer.

### Target Design

- Add native streaming support to `MarketDataManager`:
- `Stream<Decimal?> watchFiatPrice(AssetId assetId, {QuoteCurrency quoteCurrency = Stablecoin.usdt, Duration refreshInterval = const Duration(minutes: 1)})`
- Optional multi-asset API for aggregate screens:
- `Stream<Map<AssetId, Decimal?>> watchFiatPrices(Iterable<AssetId> assetIds, {QuoteCurrency quoteCurrency = Stablecoin.usdt, Duration refreshInterval = const Duration(minutes: 1)})`
- Stream contract:
- Emit immediately with last-known value (or null if none).
- Refresh on interval using existing repository fallback logic.
- Keep last successful value on transient provider failures.
- Avoid duplicate requests for identical active watch keys.

### Migration Plan

1. SDK phase:
- Implement stream APIs in `MarketDataManager` and `CexMarketDataManager`.
- Reuse existing cache keys and fallback selection strategy.
- Add cancellation-safe watcher bookkeeping and deduplication.
2. App phase:
- Migrate wallet total displays to stream-driven updates.
- Remove app-side price polling helpers once no longer used.
3. Cleanup phase:
- Re-evaluate cache timer responsibilities when stream lifecycle is in place.
- Keep `priceIfKnown` as synchronous access for non-reactive callers.

### Testing Requirements

- SDK unit tests:
- initial stream emission from cache,
- periodic refresh emission,
- fallback behavior on repository failures,
- watcher deduplication and resource cleanup.
- App integration tests:
- wallet total remains stable during provider failures,
- totals update when stream delivers new prices.

### Suggested Conventional Commits

- `feat(market-data): add native fiat price watch streams to MarketDataManager`
- `refactor(wallet): consume sdk price streams for wallet totals`
- `chore(wallet): remove legacy app-side fiat polling helper`
5 changes: 5 additions & 0 deletions packages/dragon_charts_flutter/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
## 0.1.1-dev.4

- **FIX**(zhltc): zhltc activation fixes (#227).
- **FEAT**: add configurable sparkline baseline (#248).

## 0.1.1-dev.3

> Note: This release has breaking changes.
Expand Down
2 changes: 1 addition & 1 deletion packages/dragon_charts_flutter/pubspec.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
name: dragon_charts_flutter
description: A lightweight and highly customizable charting library for Flutter.
version: 0.1.1-dev.3
version: 0.1.1-dev.4
homepage: https://komodoplatform.com
repository: https://github.com/GLEECBTC/komodo-defi-sdk-flutter

Expand Down
5 changes: 5 additions & 0 deletions packages/dragon_logs/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
## 2.0.1

- **FIX**(web): improve wasm JS interop bindings (#315).
- **FIX**(zhltc): zhltc activation fixes (#227).

## 2.0.0

> Note: This release has breaking changes.
Expand Down
62 changes: 37 additions & 25 deletions packages/dragon_logs/lib/src/storage/opfs_interop.dart
Original file line number Diff line number Diff line change
@@ -1,20 +1,21 @@
import 'dart:js_interop';
import 'dart:js_interop_unsafe';
import 'package:web/web.dart';

/// JavaScript async iterator result type
@JS()
@anonymous
extension type JSIteratorResult._(JSObject _) implements JSObject {
extension type JSIteratorResult<T extends JSAny?>._(JSObject _)
implements JSObject {
external bool get done;
external JSAny? get value;
external T? get value;
}

/// JavaScript async iterator type
@JS()
@anonymous
extension type JSAsyncIterator._(JSObject _) implements JSObject {
external JSPromise<JSIteratorResult> next();
extension type JSAsyncIterator<T extends JSAny?>._(JSObject _)
implements JSObject {
external JSPromise<JSIteratorResult<T>> next();
}

/// Extensions for FileSystemDirectoryHandle to provide missing async iterator methods
Expand All @@ -23,21 +24,21 @@ extension type JSAsyncIterator._(JSObject _) implements JSObject {
extension FileSystemDirectoryHandleExtension on FileSystemDirectoryHandle {
/// Returns an async iterator for the values (handles) in this directory.
/// Equivalent to calling `directoryHandle.values()` in JavaScript.
external JSAsyncIterator values();
external JSAsyncIterator<FileSystemHandle> values();

/// Returns an async iterator for the keys (names) in this directory.
/// Equivalent to calling `directoryHandle.keys()` in JavaScript.
external JSAsyncIterator keys();
external JSAsyncIterator<JSString> keys();

/// Returns an async iterator for the entries (name-handle pairs) in this directory.
/// Equivalent to calling `directoryHandle.entries()` in JavaScript.
external JSAsyncIterator entries();
external JSAsyncIterator<JSArray<JSAny?>> entries();
}

/// Helper extensions to convert JavaScript async iterators to Dart async iterables
extension JSAsyncIteratorExtension on JSAsyncIterator {
extension JSAsyncIteratorExtension<T extends JSAny?> on JSAsyncIterator<T> {
/// Converts a JavaScript async iterator to a Dart Stream
Stream<JSAny?> asStream() async* {
Stream<T?> asStream() async* {
while (true) {
final result = await next().toDart;
if (result.done) break;
Expand All @@ -49,26 +50,37 @@ extension JSAsyncIteratorExtension on JSAsyncIterator {
/// Extension to provide async iteration capabilities for FileSystemDirectoryHandle values
extension FileSystemDirectoryHandleValuesIterable on FileSystemDirectoryHandle {
/// Returns a Stream of FileSystemHandle objects for async iteration over directory contents
Stream<FileSystemHandle> valuesStream() {
return values().asStream().map((jsValue) => jsValue as FileSystemHandle);
Stream<FileSystemHandle> valuesStream() async* {
await for (final handle in values().asStream()) {
if (handle != null) {
yield handle;
}
}
}

/// Returns a Stream of file/directory names for async iteration over directory contents
Stream<String> keysStream() {
return keys().asStream().map((jsValue) => (jsValue as JSString).toDart);
Stream<String> keysStream() async* {
await for (final key in keys().asStream()) {
if (key != null) {
yield key.toDart;
}
}
}

/// Returns a Stream of [name, handle] pairs for async iteration over directory contents
static const int nameIndex = 0;
static const int handleIndex = 1;
Stream<(String, FileSystemHandle)> entriesStream() {
return entries().asStream().map((jsValue) {
// The entries() iterator returns [name, handle] arrays
// Use js_interop_unsafe to access array elements by numeric index
final jsObject = jsValue as JSObject;
final name = jsObject.getProperty<JSString>(nameIndex.toJS).toDart;
final handle = jsObject.getProperty<FileSystemHandle>(handleIndex.toJS);
return (name, handle);
});
Stream<(String, FileSystemHandle)> entriesStream() async* {
await for (final entry in entries().asStream()) {
if (entry == null || entry.length < 2) {
continue;
}

final nameValue = entry[0];
final handleValue = entry[1];
if (!nameValue.isA<JSString>() || !handleValue.isA<FileSystemHandle>()) {
continue;
}

yield (nameValue.dartify()! as String, handleValue as FileSystemHandle);
}
}
}
2 changes: 1 addition & 1 deletion packages/dragon_logs/pubspec.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
name: dragon_logs
description: An efficient cross-platform Flutter log storage framework with minimal dependencies.
version: 2.0.0
version: 2.0.1

repository: https://github.com/GLEECBTC/komodo-defi-sdk-flutter/tree/main/packages/dragon_logs
homepage: https://komodoplatform.com
Expand Down
10 changes: 10 additions & 0 deletions packages/komodo_cex_market_data/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,13 @@
## 0.1.0

> Note: This release has breaking changes.

- **PERF**(logs): reduce market metrics log verbosity and duplication (#223).
- **FIX**(sdk): close balance and pubkeysubscriptions on auth state changes (#232).
- **FIX**(binance): use the per-coin supported quote currency list instead of the global cache (#224).
- **FEAT**(cex-market-data): add CoinPaprika API provider as a fallback option (#215).
- **BREAKING** **FIX**(rpc): minimise RPC usage with comprehensive caching and streaming support (#262).

## 0.0.3+1

- Update a dependency to the latest release.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ class BinanceExchangeInfoResponse {
factory BinanceExchangeInfoResponse.fromJson(Map<String, dynamic> json) {
return BinanceExchangeInfoResponse(
timezone: json['timezone'] as String,
serverTime: json['serverTime'] as int,
serverTime: (json['serverTime'] as num).toInt(),
rateLimits: (json['rateLimits'] as List<dynamic>)
.map((dynamic v) => RateLimit.fromJson(v as Map<String, dynamic>))
.toList(),
Expand Down
Loading
Loading