btc_address_validate_swan 1.2.1 copy "btc_address_validate_swan: ^1.2.1" to clipboard
btc_address_validate_swan: ^1.2.1 copied to clipboard

A minimal library to validate Bitcoin mainnet and testnet addresses

BTCAddressValidate #

pub package CircleCI

A small library to validate Bitcoin addresses.

Thanks #

To the excellent base58check and bech32 packages.

Partly inspired by the npm package bitcoin-address-validation.

Examples #

  Address address = validate("1BvBMSEYstWetqTFn5Au4m4GFg7xJaNVN2");
  print(address.type);
  // => Type.p2pkh
  print(address.network);
  // => Network.mainnet
  print(address.segwit);
  // => false

Alternatives #

bitcoin_flutter also allows address validation. However, it lacks P2SH support.

2
likes
110
pub points
72%
popularity

Publisher

unverified uploader

A minimal library to validate Bitcoin mainnet and testnet addresses

Repository (GitHub)
View/report issues

Documentation

API reference

License

MIT (LICENSE)

Dependencies

base58check, bech32, dart_bech32, equatable

More

Packages that depend on btc_address_validate_swan