abidock_mvx 1.0.1
abidock_mvx: ^1.0.1 copied to clipboard
Full-Featured MultiversX blockchain SDK for Dart/Flutter.
Changelog #
All notable changes to abidock_mvx are documented here. We follow Semantic Versioning and the structure recommended by Keep a Changelog.
1.0.1 – 2026-04-12 #
Fixed #
SmartContractResult.fromJsonno longer throwsFormatExceptionwhen a network response returns a numericvaluefield (Gateway and some API shapes emitvalue: 0asint).- Generator
models_generator.dartnow emits the enum-discriminant guard as a braced block so regenerated code stays analyzer-clean undercurly_braces_in_flow_control_structures. - Applied the same block-style fix to the committed generated output under
example/cookbook/generated/.
Changed #
- Codebase-wide
dart formatsweep to satisfy thedart format --set-exit-if-changedCI gate.
1.0.0 – 2026-04-12 #
Fixed #
- Hardened
Address._extractHrpagainst malformed Bech32 strings where'1'appears at index 0. TransactionVersionvalues parsed from network responses (Transaction.fromPlainObject,TransactionOnNetwork.fromApiResponse) now go through a runtime-validated factory that rejectsvalue <= 0even in release builds.CircuitBreakernow resets_halfOpenSuccessCountwhen transitioning half-open → open on failure, preventing state leakage across rapid open/half-open cycles.- Fixed two's complement encoding for negative values in
NumericalValue.toTopBytes()— was missing +1 carry propagation. - Fixed
BigIntValue.toBytes()sign extension — positive values with high bit set now get 0x00 prefix. - Fixed
ProtoSerializerzero-value encoding from[0x00, 0x00]to[0x00], correcting transaction hash computation. - Fixed
ManagedDecimalBinaryCodecnested decode/encode for fixed-scale types — payload offset was off by 4 bytes and length prefix was missing. - Fixed
ManagedDecimalSignedValue.fromDouble/.fromString— was always throwing CastError due to parent-to-subclass cast. - Fixed
ManagedDecimalValue.toDecimalString()sign loss for values between -1 and 0. - Corrected Option top-level encoding to omit marker byte (None = empty, Some = raw inner value).
- Fixed
NativeSerializervariadic argument handling — cardinality check and index-based access both failed for variadic endpoints. - Fixed
TransactionStatus.isFinalfrom!isPendingtoisExecuted || isFailed || isInvalid || isRecalled— previously incorrectly classifiednot-executable-in-blockas final (causing watchers to stop early), and classifiedrecalledas non-final (causing infinite polling). - Fixed
TransactionWatcherto use injectedNetworkProviderinstead of raw Dio with hardcoded URL. - Fixed
UserPublicKey.toAddress(hrp:)— was silently ignoring thehrpparameter. - Fixed
ArgSerializer.stringToBuffersreturning[Uint8List(0)]for empty input instead of[]. - Fixed
SmartContractCallFactoryhardcodedTransactionVersion(1)— now version 2 when guardian is set. - Fixed
SmartContractQueryRunnersharing a singleEndpointResolverbetween query building and response parsing. - Fixed
Address.fromBech32HRP extraction to uselastIndexOffor Bech32/BIP-0173 compliance. - Fixed
Address.fromBech32static encoder with hardcoded 'erd' — now creates encoder with extracted HRP. - Fixed
SmartContractOutcomeParserto pick lastwriteLogevent instead of throwing on multiples. - Fixed
NativeSerializerto respect endpoint mutability and skip return-type decoding for write endpoints. - Fixed
NativeSerializer._toBytesfrom UTF-16codeUnitsto properutf8.encode(). - Fixed
NativeSerializer._convertNativeToAddressto accept any HRP, not just 'erd'. - Fixed
GatewayNetworkProviderresponse parsing to use correct field names and safe null handling. - Fixed
ResponseParser._stringToBytesto try base64 before hex, matching API response format. - Fixed
ResponseParser._isOptionalTypefrom string comparison to proper type check. - Fixed
TransactionOnNetwork.fromApiResponseto handle non-base64 data fields gracefully. - Fixed
EndpointResolver._isVariadicParameterfrom fragile string matching toparam.type is VariadicType. - Fixed
TypeFormulaLexerto accept hyphens in type identifiers (e.g.counted-variadic). - Fixed token identifier validation to enforce 6-character hex ticker suffix.
- Fixed
AccountAwaiterdefault timeout from 30s to 60s and added retry with exponential backoff. - Fixed
AddressValue.getShardId()from simple modulo to proper bit-masking algorithm. - Fixed
BigInttype name casing to match SDK convention. - Fixed
EndpointResolverto throw on duplicate endpoint names. - Fixed
ManagedDecimalscale validation (must be non-negative). - Fixed
SmartContractEventRunnerto use boundedEventDeduplicatorinstead of unboundedSet. - Fixed
Paginator._fetch()race condition with proper request deduplication. - Input validation across infrastructure layer (circuit breaker, cache, batch, pagination).
Changed #
TransactionStatusnow includesexecuted,notExecutable, andrecalledstatuses.SmartContractEventRunnersubscriptions now returnStreamSubscriptionfor proper lifecycle management.WebSocketEventStreamreconnection uses exponential backoff with jitter.AccountOnNetworkfields (nonce,balance,address) are now required.TransactionOnNetworkadds null-safe access for optional API fields.EnumValue/ExplicitEnumValuediscriminant encoding standardized to u8.VariadicValuesvalidates matching lengths between values and types.ArgumentEncoder.encodeTypedValuesnow expands variadic and composite types into separate arguments.- Codegen:
CallsGeneratorno longer imports unused output types; fixes unused import warnings. - Codegen: generated files now include
GENERATED CODE - DO NOT MODIFYheader. - Codegen: enum
fromAbiuses discriminant lookup instead of array index. - Codegen:
toJson()properly serializes nested structs, enums, BigInt, and Address fields.
Added #
not-executable-in-blockandrecalledtransaction status support.CompositeValue.isEmpty/isNotEmptyconvenience getters.TokenTransferTypesupport in code generator type mapper.Address.isZerogetter for zero-address checks without allocating a newAddress.zero().TransactionAwaitingOptions.maxConsecutiveErrors— aborts polling after repeated fetch failures with exponential backoff.TransactionAwaitingOptions.patience— waits for block finalization after status reaches final state.AbiEndpoint.mutability/isPure/isReadonly— preserves raw mutability ('pure' vs 'readonly' vs 'mutable').NetworkProvider.getDefinitionOfFungibleToken,getDefinitionOfTokenCollection, andgetNonFungibleToken— rich token metadata queries on the API provider (Gateway surfaces these viaUnsupportedError, matching the other metadata endpoints).NetworkProvider.getBlock,getLatestBlock(shard:), andgetHyperblock(nonce)— block and cross-shard hyperblock queries. GatewaygetLatestBlocktwo-hops throughnetwork/status/<shard>to resolve the current nonce.BlockOnNetworkandHyperblockOnNetworktypes with schema-tolerantfromJsonfactories that accept both API and Gateway field aliases.- Typed
SmartContractResultparsed eagerly from the@<returnCode>@<returnData>...payload.TransactionOnNetwork.smartContractResultsis nowList<SmartContractResult>?(wasList<Map<String, dynamic>>?). NonceManager— stateful forward-only nonce allocator with mutex-serializednext(), release/reuse queue,applyNonce(Nonce)floor, andresync()that never goes backwards. Use it for bulk sends without round-trippinggetAccountbetween each transaction.TransactionDecoder— pure, never-throwing parser that turns aTransactioninto a sealedDecodedTransactionhierarchy:NativeEgldTransfer,EsdtTransfer,NftTransfer,MultiTransfer,ContractCall,UnknownTransaction. Supports inner contract calls nested after ESDT/NFT/MultiESDT transfer prefixes.
Changed #
TransactionAwaitingOptionsdefaults: polling 400ms, patience 800ms, timeout 60s — tuned for Supernova block times.SmartContractEventRunner.streamEvents/streamAllEventsdefault polling lowered from 2s to 500ms for Supernova 600ms blocks.CacheManagercaps the number of cache instances to prevent unbounded growth from high-cardinality endpoints._encodeSignedTopLevelallocates directly intoUint8Listinstead of spreading through a temporary list.base_controllerguardian/relayer checks useisZerogetter instead of allocatingAddress.zero()per call.- Codegen
CallsGenerator._collectCustomTypesnow includes output types to avoid missing imports for custom return types. - Codegen
NameSanitizerkeyword lookup is now case-insensitive and includesfunctionconsistently withKeywordSanitizer.
Security #
PubkeyDecryptorzeros secret key bytes in afinallyblock after decryption.ScryptKeyDerivationParamsnow validates KDF parameters per RFC 7914:nmust be power of 2 and ≥ 16384,r≥ 8,p≥ 1,dklen= 32. Prevents weak-parameter keystores from decrypting silently.EncryptedData.fromJsonsurfaces invalid KDF parameters from untrusted keystore input asFormatExceptionrather than passing through silently.
1.0.0-beta.2 – 2025-12-20 #
Fixed #
- Fixed dangling library doc comments in codegen files.
- Updated package description to meet pub.dev length requirements.
- Replaced
flutter_lintswithlintsfor pure Dart compatibility.
1.0.0-beta.1 – 2025-12-08 #
Added #
- First public release of the MultiversX Dart/Flutter SDK and CLI.
- Wallet tooling covering mnemonic, PEM, and keystore workflows.
- Transaction builders for EGLD, ESDT, NFT, SFT, and MetaESDT transfers.
- High-level smart-contract controller with ABI-driven calls, queries and events.
- Gateway and REST network providers plus WebSocket event streams.
- ABI codecs for primitives, collections, composites, and protocol-specific special types.
- Code generator capable of scaffolding controllers, DTOs, and tests from ABI files.
- Cookbook examples and wallet walkthroughs demonstrating real integrations.
- 900+ automated tests spanning core types, infrastructure, serializers, and integration scenarios.