avalanche_flutter_sdk 0.1.1-dev
avalanche_flutter_sdk: ^0.1.1-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.
example/avalanche_flutter_sdk_example.dart
import 'phase1/address_derivation_example.dart';
import 'phase1/network_config_example.dart';
import 'phase1/wallet_generation_example.dart';
import 'phase2/cchain_read_example.dart';
/// avalanche_flutter_sdk - Quick Start Examples
///
/// This file is the entry point for all SDK examples.
/// Each section corresponds to a phase of development.
///
/// Implementation details can be found in:
/// https://github.com/nemorixgroup/avalanche-flutter-sdk/tree/main/example/
///
/// Running this example:
/// ```sh
/// dart run example/avalanche_flutter_sdk_example.dart
/// ```
///
/// Planned phases:
/// Phase 1 - Architecture + Crypto/Wallet (secp256k1, BIP-39, HD derivation)
/// Phase 2 - C-Chain Core (EIP-1559 transfers, ERC-20, gas estimation)
/// Phase 3 - Data API / Glacier (balances, history, NFTs, WebSocket)
/// Phase 4 - P-Chain + X-Chain (staking, UTXO, cross-chain)
Future<void> main() async {
// ---- Phase 1: Architecture + Network Configuration ----
// Cryptography + Wallet (coming in M1)
// See: example/phase1/
// AvalancheClient setup, NetworkConfig (Mainnet / Fuji Testnet), NetworkId
await networkConfigExamples();
// Avalanche Address Derivation (C-Chain, X-Chain, P-Chain)
addressDerivationExample();
// BIP-39 Wallet Generation for Avalanche
walletGenerationExample();
// ---- Phase 2: C-Chain Core EVM (coming in M2) ----
// EIP-1559 AVAX transfer, ERC-20 transfers, gas estimation,
// eth_sendRawTransaction, eth_getTransactionReceipt
// See: example/phase2/
await cchainReadExample();
// ---- Phase 3: Data API / Glacier (coming in M3) ----
// GlacierClient REST, balance queries, transaction history,
// NFT metadata (ERC-721/1155), WebSocket real-time subscriptions
// ---- Phase 4: P-Chain + X-Chain (coming in M4) ----
// P-Chain staking, validator queries, AddDelegatorTransaction,
// X-Chain UTXO transfers, cross-chain export/import
}