flutter_wallet_validator 0.1.3 copy "flutter_wallet_validator: ^0.1.3" to clipboard
flutter_wallet_validator: ^0.1.3 copied to clipboard

A blockchain wallet address validator for multiple networks (CORE, EVM, Bitcoin, Solana, Cardano). Validates formats and checksums.

Flutter Wallet Validator #

pub package License: CORE Flutter Platform Dart SDK Version

A comprehensive Flutter library for validating blockchain wallet addresses across multiple networks.

Features #

  • πŸš€ Lightweight: Minimal impact on app size
  • πŸ”’ Type-safe: Written in Dart with full type definitions
  • ⚑ Fast: No heavy dependencies
  • πŸ§ͺ Well-tested: Production-ready test coverage
  • 🌐 Multi-network support:
    • Algorand
    • Bitcoin (Legacy, SegWit, Native SegWit)
    • Bitcoin Cash
    • Cardano
    • Core (ICAN)
    • Cosmos ecosystem (Cosmos, Osmosis, Juno, etc.)
    • NS domains on ENS standard (including subdomains and emoji support)
    • EVM-compatible chains (Ethereum, Polygon, BSC, etc.)
    • Litecoin (Legacy, SegWit, Native SegWit)
    • Polkadot
    • Ripple (XRP)
    • Solana
    • Stellar
    • Tron
  • πŸ“¦ Modern package:
    • Null safety
    • Platform independent
    • Zero configuration
    • Works on all Flutter platforms

Installation #

dependencies:
  flutter_wallet_validator: ^0.1.2

Run:

flutter pub get

Usage #

Basic Example #

import 'package:flutter_wallet_validator/flutter_wallet_validator.dart';

void main() {
  // Validate an Ethereum address
  final result = validateWalletAddress(
    '0x4838B106FCe9647Bdf1E7877BF73cE8B0BAD5f97',
  );
  print(result);
  // NetworkInfo(
  //   network: 'evm',
  //   isValid: true,
  //   description: 'Ethereum Virtual Machine compatible address',
  //   metadata: {'isChecksumValid': true}
  // )
}

With Options #

// Validate with specific networks enabled
final result = validateWalletAddress(
  'vitalik.eth',
  options: ValidationOptions(
    network: ['ns'],
    nsDomains: ['eth'],
    testnet: false,
  ),
);

Flutter Widget Example #

class WalletAddressValidator extends StatelessWidget {
  final String address;

  const WalletAddressValidator({
    super.key,
    required this.address,
  });

  @override
  Widget build(BuildContext context) {
    final result = validateWalletAddress(address);

    return Card(
      child: Padding(
        padding: const EdgeInsets.all(16.0),
        child: Column(
          crossAxisAlignment: CrossAxisAlignment.start,
          children: [
            Text('Network: ${result.network ?? 'Unknown'}'),
            Text('Valid: ${result.isValid}'),
            Text('Description: ${result.description ?? 'N/A'}'),
            if (result.metadata != null)
              Text('Metadata: ${result.metadata}'),
          ],
        ),
      ),
    );
  }
}

Platform Support #

Android iOS Web macOS Windows Linux WASM
βœ… βœ… βœ… βœ… βœ… βœ… βœ…

Environment #

  • 🎯 Dart SDK: >=3.5.0 <4.0.0
  • πŸ’™ Flutter: >=3.29.1
  • πŸ“± Platforms: All Flutter supported platforms

Security #

This package helps validate the format of blockchain addresses but does not guarantee the security or ownership of the addresses. Always verify addresses through multiple sources before sending any transactions.

Contributing #

Contributions are welcome! Please feel free to submit a Pull Request.

License #

Licensed under the CORE License.

2
likes
150
points
42
downloads

Publisher

verified publisherblockchainhub.digital

Weekly Downloads

A blockchain wallet address validator for multiple networks (CORE, EVM, Bitcoin, Solana, Cardano). Validates formats and checksums.

Repository (GitHub)
View/report issues

Topics

#blockchain #wallet #address #validator #crypto

Documentation

Documentation
API reference

Funding

Consider supporting this project:

github.com
blockindex.net

License

unknown (license)

Dependencies

convert, crypto, flutter, pointycastle

More

Packages that depend on flutter_wallet_validator