flutter_nano_core 1.1.5

  • Readme
  • Changelog
  • Installing
  • 83



You should use the new package, it has a new name nanodart

flutter_nano_core #

Low-level functions for NANO/BANANO written in DART. Similar structure to jnano-commons for Java


# Generate a random seed
String randomSeed = NanoSeeds.generateSeed();
# Validate a seed
bool seedIsValid = NanoSeeds.isValid(randomSeed);

# Create private key from seed at index 0
String privateKey = NanoKeys.seedToPrivate(seed, 0);
# Create public key from private key
String publicKey = NanoKeys.createPublicKey(privateKey);
# Create account from public get (nano_/ban_ address)
String address = NanoAccounts.createAccount(NanoAccountType.NANO, publicKey);

# Compute state block hash
computeStateHash(int accountType, String account, String previous, String representative, BigInt balance, String link);

# Sign a block
NanoSignatures.signBlock(hash, privateKey);

[1.1.5] - August 29th, 2019 #

  • Deprecation notice. This package has been renamed to nanodart. It is available here

[1.1.4] - May 29th, 2019 #

  • Add some validation methods to NanoMnemonics
  • Add NanoCrypt class which encrypts/decrypts a seed using a basic pbkdf2 derivator and AES

[1.1.3] - May 23rd, 2019 #

  • Added NanoMnemomics class for turning a seed/private key into a 24-word list and back. Check tests for usage.

[1.1.2] - May 8th, 2019 #


  • An important fix was added to public key derivation. Keys were being generated incorrectly on compiled code, on 32-bit platforms after the Dart 2.3/Flutter 1.5 update.

[1.1.1] - May 7th, 2019 #

  • Fix some Unit tests

[1.1.0] - April 17th, 2019 #

BREAKING Switch from xrb_ to nano_ prefix

[1.0.4] - February 20th, 2019 #

  • Add license

[1.0.3] - February 20th, 2019 #

  • Switch to official pointycastle releases

[1.0.2] - February 1st, 2019 #

  • Switch to xrb_ prefixes, some popular nano apps still don't support nano_ ones

[1.0.1] - January 17th, 2019 #

  • Format everything and fix all of the flutter package warnings and suggestions

[1.0.0] - January 3rd, 2019 #

  • Initial Release

Use this package as a library

1. Depend on it

Add this to your package's pubspec.yaml file:

  flutter_nano_core: ^1.1.5

2. Install it

You can install packages from the command line:

with Flutter:

$ flutter pub get

Alternatively, your editor might support flutter pub get. Check the docs for your editor to learn more.

3. Import it

Now in your Dart code, you can use:

import 'package:flutter_nano_core/flutter_nano_core.dart';
Describes how popular the package is relative to other packages. [more]
Code health derived from static analysis. [more]
Reflects how tidy and up-to-date the package is. [more]
Weighted score of the above. [more]
Learn more about scoring.

We analyzed this package on Apr 8, 2020, and provided a score, details, and suggestions below. Analysis was completed with status completed using:

  • Dart: 2.7.1
  • pana: 0.13.6
  • Flutter: 1.12.13+hotfix.8

Health suggestions

Fix lib/src/NanoMnemomics.dart. (-0.50 points)

Analysis of lib/src/NanoMnemomics.dart reported 1 hint:

line 2 col 8: Don't import implementation files from another package.

Format lib/flutter_nano_core.dart.

Run flutter format to format lib/flutter_nano_core.dart.

Format lib/src/NanoHelpers.dart.

Run flutter format to format lib/src/NanoHelpers.dart.

Fix additional 5 files with analysis or formatting issues.

Additional issues in the following files:

  • lib/src/encrypt/aes/aes_cbcpkcs7.dart (Run flutter format to format lib/src/encrypt/aes/aes_cbcpkcs7.dart.)
  • lib/src/encrypt/kdf.dart (Run flutter format to format lib/src/encrypt/kdf.dart.)
  • lib/src/encrypt/model/key_iv.dart (Run flutter format to format lib/src/encrypt/model/key_iv.dart.)
  • lib/src/encrypt/nano_crypt.dart (Run flutter format to format lib/src/encrypt/nano_crypt.dart.)
  • lib/src/tweetnacl_blake2b.dart (Run flutter format to format lib/src/tweetnacl_blake2b.dart.)

Maintenance suggestions

Maintain an example. (-10 points)

Create a short demo in the example/ directory to show how to use this package.

Common filename patterns include main.dart, example.dart, and flutter_nano_core.dart. Packages with multiple examples should provide example/README.md.

For more information see the pub package layout conventions.


Package Constraint Resolved Available
Direct dependencies
Dart SDK >=2.0.0-dev.68.0 <3.0.0
bip39 ^1.0.3 1.0.3
convert ^2.1.1 2.1.1
fixnum ^0.10.9 0.10.11
flutter 0.0.0
hex ^0.1.2 0.1.2
pointycastle ^1.0.1 1.0.2
Transitive dependencies
charcode 1.1.3
collection 1.14.11 1.14.12
crypto 2.1.4
meta 1.1.8
sky_engine 0.0.99
typed_data 1.1.6
vector_math 2.0.8
Dev dependencies