flutter_nano_core 1.0.0

  • README.md
  • CHANGELOG.md
  • Installing
  • Versions
  • 62

flutter_nano_core #

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

Examples:

# 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);

[0.0.1] - TODO: Add release date.

  • TODO: Describe initial release.

Use this package as a library

1. Depend on it

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


dependencies:
  flutter_nano_core: ^1.0.0

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';
  
Version Uploaded Documentation Archive
1.1.3 May 23, 2019 Go to the documentation of flutter_nano_core 1.1.3 Download flutter_nano_core 1.1.3 archive
1.1.2 May 8, 2019 Go to the documentation of flutter_nano_core 1.1.2 Download flutter_nano_core 1.1.2 archive
1.1.1 May 7, 2019 Go to the documentation of flutter_nano_core 1.1.1 Download flutter_nano_core 1.1.1 archive
1.1.0 Apr 17, 2019 Go to the documentation of flutter_nano_core 1.1.0 Download flutter_nano_core 1.1.0 archive
1.0.4 Feb 20, 2019 Go to the documentation of flutter_nano_core 1.0.4 Download flutter_nano_core 1.0.4 archive
1.0.3 Feb 20, 2019 Go to the documentation of flutter_nano_core 1.0.3 Download flutter_nano_core 1.0.3 archive
1.0.2 Feb 1, 2019 Go to the documentation of flutter_nano_core 1.0.2 Download flutter_nano_core 1.0.2 archive
1.0.1 Jan 17, 2019 Go to the documentation of flutter_nano_core 1.0.1 Download flutter_nano_core 1.0.1 archive
1.0.0 Jan 3, 2019 Go to the documentation of flutter_nano_core 1.0.0 Download flutter_nano_core 1.0.0 archive
Popularity:
Describes how popular the package is relative to other packages. [more]
81
Health:
Code health derived from static analysis. [more]
72
Maintenance:
Reflects how tidy and up-to-date the package is. [more]
0
Overall:
Weighted score of the above. [more]
62
Learn more about scoring.

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

  • Dart: 2.3.0
  • pana: 0.12.15
  • Flutter: 1.5.8

Platforms

Detected platforms: Flutter

References Flutter, and has no conflicting libraries.

Health suggestions

Fix lib/src/tweetnacl_blake2b.dart. (-25.97 points)

Analysis of lib/src/tweetnacl_blake2b.dart reported 60 hints, including:

line 39 col 20: Name non-constant identifiers using lowerCamelCase.

line 65 col 15: Name non-constant identifiers using lowerCamelCase.

line 79 col 26: Name non-constant identifiers using lowerCamelCase.

line 80 col 26: Name non-constant identifiers using lowerCamelCase.

line 84 col 26: Name non-constant identifiers using lowerCamelCase.

Fix lib/src/NanoHelpers.dart. (-2.96 points)

Analysis of lib/src/NanoHelpers.dart reported 6 hints, including:

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

line 8 col 3: Prefer using /// for doc comments.

line 19 col 3: Prefer using /// for doc comments.

line 26 col 3: Prefer using /// for doc comments.

line 34 col 3: Prefer using /// for doc comments.

Format lib/flutter_nano_core.dart.

Run flutter format to format lib/flutter_nano_core.dart.

Fix additional 8 files with analysis or formatting issues.

Additional issues in the following files:

  • lib/src/Hashes.dart (Run flutter format to format lib/src/Hashes.dart.)
  • lib/src/NanoAccountEncodes.dart (Run flutter format to format lib/src/NanoAccountEncodes.dart.)
  • lib/src/NanoAccountType.dart (Run flutter format to format lib/src/NanoAccountType.dart.)
  • lib/src/NanoAccounts.dart (Run flutter format to format lib/src/NanoAccounts.dart.)
  • lib/src/NanoBlocks.dart (Run flutter format to format lib/src/NanoBlocks.dart.)
  • lib/src/NanoKeys.dart (Run flutter format to format lib/src/NanoKeys.dart.)
  • lib/src/NanoSeeds.dart (Run flutter format to format lib/src/NanoSeeds.dart.)
  • lib/src/NanoSignatures.dart (Run flutter format to format lib/src/NanoSignatures.dart.)

Maintenance issues and suggestions

Prefer published dependencies. (-100 points)

The source code in a git repository is mutable and could disappear.

Use constrained dependencies. (-20 points)

The pubspec.yaml contains 1 dependency without version constraints. Specify version ranges for the following dependencies: pointycastle.

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.

Dependencies

Package Constraint Resolved Available
Direct dependencies
Dart SDK >=2.0.0-dev.68.0 <3.0.0
convert ^2.1.1 2.1.1
fixnum ^0.10.9 0.10.9
flutter 0.0.0
hex ^0.1.2 0.1.2
pointycastle 1.0.0
Transitive dependencies
charcode 1.1.2
collection 1.14.11
meta 1.1.6 1.1.7
sky_engine 0.0.99
typed_data 1.1.6
vector_math 2.0.8
Dev dependencies
flutter_test