snaxdart_ecc 1.0.0

  • Readme
  • Changelog
  • Installing
  • 53

Elliptic curve cryptography (ECC) in Dart #

Elliptic curve cryptography lib for EOS based blockchain in Dart lang.

Build Status

Usage #

A simple usage example:

import 'package:snaxdart_ecc/snaxdart_ecc.dart';

main() {
  // Construct the SNAX private key from string
  SNAXPrivateKey privateKey = SNAXPrivateKey.fromString(
      '5KQwrPbwdL6PhXujxW37FSSQZ1JiwsST4cqQzDeyXtP79zkvFD3');

  // Get the related SNAX public key
  SNAXPublicKey publicKey = privateKey.toSNAXPublicKey();
  // Print the SNAX public key
  print(publicKey.toString());

  // Going to sign the data
  String data = 'data';

  // Sign
  SNAXSignature signature = privateKey.signString(data);
  // Print the SNAX signature
  print(signature.toString());

  // Verify the data using the signature
  signature.verify(data, publicKey);
}

Features and bugs #

Please file feature requests and bugs at the issue tracker.

References #

eosjs-ecc: https://github.com/EOSIO/eosjs-ecc

1.0.0 #

  • migrate to Snax

0.3.2 #

  • fix signature bug

0.3.1 #

  • sign method will sign Uint8List
  • add signString method which signs String

0.3.0 #

  • Support canonical signature

0.2.2 #

  • Healthy change

0.2.1 #

  • Add CHANGELOG.md

0.2.0 #

  • SNAXPublicKey, SNAXPrivateKey, SNAXSignature
  • Sign the data
  • Verify the signature

0.1.0 #

  • Initial version, created by Stagehand

Use this package as a library

1. Depend on it

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


dependencies:
  snaxdart_ecc: ^1.0.0

2. Install it

You can install packages from the command line:

with pub:


$ pub get

with Flutter:


$ flutter pub get

Alternatively, your editor might support pub get or 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:snaxdart_ecc/snaxdart_ecc.dart';
  
Popularity:
Describes how popular the package is relative to other packages. [more]
10
Health:
Code health derived from static analysis. [more]
100
Maintenance:
Reflects how tidy and up-to-date the package is. [more]
90
Overall:
Weighted score of the above. [more]
53
Learn more about scoring.

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

  • Dart: 2.5.1
  • pana: 0.12.21

Platforms

Detected platforms: Flutter, web, other

No platform restriction found in primary library package:snaxdart_ecc/snaxdart_ecc.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 snaxdart_ecc.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 <3.0.0
bs58check ^1.0.1 1.0.1
pointycastle ^1.0.1 1.0.1
Transitive dependencies
charcode 1.1.2
collection 1.14.12
convert 2.1.1
crypto 2.1.3
hex 0.1.2
typed_data 1.1.6
Dev dependencies
test ^1.0.0