durt2 1.5.1 copy "durt2: ^1.5.1" to clipboard
durt2: ^1.5.1 copied to clipboard

Dart library for interacting with Duniter v2s blockchains. Provides wallet management, transaction signing, Squid GraphQL requests, and more

1.5.0 #

  • Refreshed the bundled g1 bootstrap endpoints. The assets shipped a SINGLE RPC seed (g1.p2p.legal) and a SINGLE Squid seed (g1-squid.axiom-team.fr); both are permanently decommissioned, so every fresh install or cold cache burned seconds in timeouts before falling back to the remote network config. The seeds now carry the canonical g1 lists minus those two dead hosts (11 RPC, 8 Squid), currently-healthy endpoints first, and the g1 polkadart codegen source moves to wss://rpc.duniter.org. Measured on the real g1 network the same day: time to a fully usable node + indexer went from 6.4s / 7.7-9.9s (legacy flow, old seeds) to 0.4-0.7s / 0.6-0.85s (new flow, new seeds). The measurement tool is committed as test/performance/startup_timing_real_test.dart.
  • Startup connection overhaul: the Duniter node and the Squid indexer now come up in about a second on a healthy network instead of many seconds, and a single dead or slow endpoint no longer delays (or sinks) the whole connection. Four structural fixes, each covered by deterministic tests that drive the real connection stack against fake local endpoints (test/services/connection/startup_latency_test.dart):
    • RaceToFirstSuccess.raceWithMinWait gains a real early exit: it returns at first success + minWait (or when every operation settled) instead of waiting for the slowest operation or the global timeout. A dead bootstrap endpoint used to hold the Duniter connection to its own 3s+ timeout. The Duniter race additionally requires a quorum of 2 successful results (minResults) before the window may close, so freshness selection stays comparative: a fast but stale node cannot win unopposed while healthier nodes are still answering. Deliberate trade-off versus the legacy exhaustive wait: the ranking rule is identical (not-syncing, then highest block, then peers, then latency) but the compared sample is the endpoints that answered within the window, no longer every endpoint that answered before the 8s timeout.
    • The winning RPC endpoint's test WebSocket is promoted to the real connection (TestResult.provider, kept alive on demand): the second handshake and its re-verification RPCs are gone from the critical path. Losing providers are always disconnected, including late finishers.
    • Squid endpoints are validated by ONE combined GraphQL request (EndpointTester.probeSquidEndpoint: reachability + indexer version + schema probe + 5 recent blocks with hashes) instead of up to five sequential queries, and SquidClientManager.init now trusts a single pre-validated endpoint (skipSyncValidation + one endpoint) instead of re-validating the entire endpoint list behind a 15s wait bounded by the slowest endpoint, which could throw away a connection already won.
    • SquidConnector is split into prepare() (probe race, needs nothing from Duniter) and finalize() (strict hash sync acceptance): the orchestrator runs the probes IN PARALLEL with the Duniter connection and accepts the best candidate against fresh Duniter blocks with zero extra requests in the nominal case. Strict sync validation, custom-endpoint precedence and the background peering discovery (the wide network view) are unchanged. Because prepare() can now run while the device is still offline, an unreachable user-configured endpoint is NOT cleared there: finalize(), which only runs once Duniter proved the network is up, re-tests it and either honors it or clears it (the decision the legacy flow made in the same network-proven context). Trusted endpoints (user-fixed, local dev) no longer overwrite the discovery fast cache with themselves, so returning to auto-discovery within the cache window cannot re-select the endpoint the user just removed.
    • Also fixed on the way: the post-connect storage subscriptions are now awaited inside their guard, so a subscription error is logged instead of surfacing as an unhandled zone error; the fast-endpoint cache stores only endpoints that passed the test (winner first) instead of every tested endpoint including dead ones; the dead legacy ConnectionManager (pre-orchestrator, 1900 lines, imported by nothing) is removed.

1.4.0 #

  • Toolchain and dependency refresh, no API change. Built and tested against Flutter 3.44.8 (Dart 3.12.2). The declared floors now match what the package resolves to: objectbox and objectbox_flutter_libs 5.3.2, flutter_secure_storage 10.3.1, multiformats 1.4.0, logger 2.7.0, graphql 5.2.4, collection 1.19.1, unorm_dart 0.3.2. Dev dependencies follow: test 1.31.0, build_runner 2.15.3, lints 6.1.0, graphql_codegen 3.0.2, meta 1.18.0.
  • The analyzer: ^9.0.0 override is kept and now states its reason: analyzer 13.1.0 and later require meta ^1.18.3, while flutter_test from the Flutter 3.44.8 SDK pins meta 1.18.0, so version solving fails without it.

1.3.0 #

  • Identity-name lookup over the on-chain IdentitiesNames map: DuniterStorageService.getIdentityIndexByName(name) for an exact match, and getIdentityIndexByNameMulti(names) for a batched one (single multiIdentitiesNames RPC, order preserved, result padded to the request length). Both return null for a free name and degrade to null on a WebSocket drop rather than throwing. Lets a client treat the on-chain identity name as authoritative over a self-declared profile name. MockDuniterStorageService gains setReservedName and a nameMultiLookupCount counter so batching can be asserted in tests.
  • DuniterStorageService.accountSurvivesAtZero(address): whether an account keeps existing once emptied. True when sufficients > 0, which on Duniter v2s means the account backs an identity (pallet_identity::create_identity calls inc_sufficients on the owner key). Such an account may go below the existential deposit without being reaped, so a client can offer the full balance instead of refusing the amount or burning the change.
  • DuniterService.pay takes a keepAlive flag (default true, unchanged behaviour for Ğ1 amounts). false selects the chain's Expendable preservation: transferAllowDeath instead of transferKeepAlive, and transferUd instead of transferUdKeepAlive. This also aligns the two units: UD amounts previously always used transferUd (Expendable) while Ğ1 amounts used transferKeepAlive (Preserve), so the existential-deposit rule silently depended on the display unit.

1.2.1 #

  • Fix macOS biometrics: BiometricService now stores the encrypted PIN in the platform-aware secure storage (file-based on macOS, where the Keychain is not reliably available via Flutter plugins) instead of the raw Keychain plugin. Readable legacy Keychain enrollments are migrated on first use; broken ones simply require re-enrolling. New public API: CryptoUtils.secureRead / secureWrite / secureDelete / secureContainsKey / secureReadAll.

1.2.0 #

  • Contacts sync foundation (Cesium+ pods): CRDT model ContactsSyncState / ContactSyncEntry (per-field last-write-wins, commutative merge, non- destructive removal via isContact, dead-entry GC, forward-compatible unknown fields) and encrypted-blob pod I/O getContacts / saveContacts (cross-preserves the co-hosted certification queue).

0.6.0 #

  • Bulk storage support
  • Improved network scan
  • Connection orchestrator improvements

0.3.0 #

  • Implement all Gecko v2s requirements

0.1.0 #

  • Migrate files from Ğazelle to split responsabilities
1
likes
155
points
730
downloads

Documentation

API reference

Publisher

verified publisheraxiom-team.fr

Weekly Downloads

Dart library for interacting with Duniter v2s blockchains. Provides wallet management, transaction signing, Squid GraphQL requests, and more

Homepage

License

GPL-3.0 (license)

Dependencies

base_codecs, bip39_mnemonic, collection, convert, cryptography, flat_buffers, flutter, flutter_secure_storage, gql, graphql, http, logger, multiformats, objectbox, objectbox_flutter_libs, pointycastle, polkadart, polkadart_keyring, polkadart_scale_codec, quiver, ss58, substrate_bip39, substrate_metadata, unorm_dart

More

Packages that depend on durt2