avalanche_flutter_sdk 0.0.2-dev
avalanche_flutter_sdk: ^0.0.2-dev copied to clipboard
The first native Flutter/Dart SDK for the Avalanche network. Pure Dart, no platform channels. Covers C-Chain EVM, Data API (Glacier), P-Chain staking, and X-Chain native assets.
Changelog #
All notable changes to avalanche_flutter_sdk will be documented here.
The format is based on Keep a Changelog, and this project adheres to Semantic Versioning.
0.0.2-dev #
Phase 1 in progress: secp256k1 cryptography implemented and verified.
Added #
PrivateKey: secp256k1 private key generation, import, and exportPrivateKey.generate()usingFortunaRandom(cryptographically secure pseudo-random number generator)PrivateKey.fromHex()with strict range validation against the curve ordern(rejectsd <= 0andd >= n)toHex(),toBytes(): 32-byte big-endian exportpublicKeygetter: derivesQ = d * Gper secp256k1toString()returnsPrivateKey[REDACTED]- key material is never exposed via logs, error messages, or debug output
PublicKey: secp256k1 public key derivation, import, and encodingPublicKey.fromEcPoint(),PublicKey.fromHex()(accepts both compressed and uncompressed SEC1 encodings)toCompressed(): 33-byte SEC1 encoding - required input for X-Chain/P-Chain address derivation (sha256 + ripemd160)toUncompressed()/toRawUncompressed(): 65-byte and 64-byte encodings - required input for C-Chain/EVM address derivation (keccak256)- Value equality (
==,hashCode) based on the underlying elliptic curve point
pointycastle: ^4.0.0andmeta: ^1.15.0added as dependencies- 60 new unit tests (18/18 -> 78/78 total passing)
Verified #
- secp256k1 curve order
nconfirmed directly frompointycastle'sECDomainParameters('secp256k1')at runtime:fffffffffffffffffffffffffffffffebaaedce6af48a03bbfd25e8cd0364141 - Private key range validation tested at all boundaries:
d=0(rejected),d=1(accepted),d=n-1(accepted),d=n(rejected),d=n+1(rejected) - Compressed/uncompressed public key encodings verified to decode to the same elliptic curve point (round-trip equality)
Status #
Phase 1 in progress: secp256k1 PrivateKey/PublicKey complete and
tested.
Not ready for production use.
Next: CB58 encoding, then EVM and X/P-Chain address derivation.
0.0.1-dev #
Phase 1 in progress: SDK skeleton and project architecture.
Added #
AvalancheClient: main entry point for the SDK- accepts
NetworkConfigfor Mainnet or Fuji Testnet
- accepts
NetworkConfig: official Avalanche RPC endpoint configurationsNetworkConfig.mainnet: Avalanche Mainnet (C-Chain, P-Chain, X-Chain, Glacier API)NetworkConfig.fuji: Avalanche Fuji Testnet (C-Chain, P-Chain, X-Chain, Glacier API)- endpoint URLs sourced from
docs.avax.network
NetworkId: enum for Mainnet (1) and Fuji Testnet (5)AvalancheException: base exception class for all SDK errorsanalysis_options.yamlwithvery_good_analysislinter (zero warnings enforced)scripts/pre_commit.ps1: local quality gate (format + analyze + test).github/workflows/ci.yml: GitHub Actions CI pipeline- format check, static analysis, test suite, coverage threshold (85%), pub publish dry-run
- daily integration test job against Fuji Testnet (on
developpush)
.github/pull_request_template.md: PR checklistCONTRIBUTING.md: branch strategy, commit conventions, code and testing standardsSECURITY.md: vulnerability reporting policy and key handling rules- 6 initial unit tests (6/6 passing)
Status #
Phase 1 in progress: SDK skeleton, project architecture, and CI infrastructure complete.
Not ready for production use.
Next: secp256k1 key generation, BIP-39 mnemonics (EN + ES), HD key derivation (BIP-44).