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

Multi Network Identifier - spec and reference implementation

example/main.dart

import 'dart:convert';
import 'dart:io';

import 'package:mnid_dart/mnid_dart.dart';

void main() {
  print('enter mnid hash and press ENTER');
  String? mnidAddress =
      stdin.readLineSync(encoding: Encoding.getByName('utf-8')!);
  if (mnidAddress == null) {
    print('enter mnid hash and press ENTER');
    mnidAddress = stdin.readLineSync(encoding: Encoding.getByName('utf-8')!);
  }
  print('isMNID ${MNID.isMNID(mnidAddress!)}');

  final en = MNID.encode(
    network: '0x1',
    address: '0x00521965e7bd230323c423d96c657db5b79d099f',
  );
  print('encode $en');

  print('encode toEqual:  ${en == '2nQtiQG6Cgm1GYTBaaKAgr76uY7iSexUkqX'}');

  final decoderrrr = MNID.decode('34ukSmiK1oA1C5Du8aWpkjFGALoH7nsHeDX');
  print('decoderrrr ${decoderrrr.toString()}');
}
2
likes
0
pub points
57%
popularity

Publisher

verified publisherfuse.io

Multi Network Identifier - spec and reference implementation

Repository (GitHub)
View/report issues

License

unknown (license)

Dependencies

base_x, collection, hex, sha3

More

Packages that depend on mnid_dart