commerciosdk 0.1.3

  • Readme
  • Changelog
  • Installing
  • 71

Travis

This repository contains the code of the official Commercio.network Dart SDK, entirely based on Sacco.dart.

The main features are:

  • Entirely made in Dart
  • Completely stateless

Thanks to these characteristics, you can use this SDK inside any pure Dart project or even any Flutter application.

You can find the official documentation here.

Helper methods #

Inside the SDK you will find the following helper methods that will help you with almost any operation that you might want to perform on the Commercio.network blockchain.

Please note that you can find usage examples of the following methods inside the example folder file. We highly suggest you checking it out to have a complete reference of the SDK.

Crypto #

  • Create HD wallet
  • Generate AES key
  • Generate RSA key

CommercioDOCS #

  • Share document
  • Send receipt
  • List documents
  • List receipts

CommercioID #

  • Create Did Document
  • Request deposit
  • Request power up
  • Create connection invitation
  • Verify connection invitation

CommercioMINT #

  • Open CDP
  • Close CDP

CommercioMEMBERSHIP #

  • Invite user
  • Buy membership

Version 0.1.3 - 2019-12-16 #

Version 0.1.2 - 2019-12-09 #

  • updated sdk with hints provided by pub.dev

Version 0.1.1 - 2019-12-09 #

  • updated the code with the hints provided by pub.dev

Version 0.1.0 - 2019-12-04 #

  • updated the code with the hints provided by pub.dev
  • updated all dependencies
  • fixed errors due to dependencies upgrade
  • fixed docs

Version 0.0.2 - 2019-12-03 #

  • added to project generated g files

Version 0.0.1 - 2019-10-23 #

  • Initial release

Use this package as a library

1. Depend on it

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


dependencies:
  commerciosdk: ^0.1.3

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:commerciosdk/crypto/encryption_helper.dart';
import 'package:commerciosdk/crypto/export.dart';
import 'package:commerciosdk/crypto/keys_helper.dart';
import 'package:commerciosdk/crypto/rsa_key_parser.dart';
import 'package:commerciosdk/crypto/sign_helper.dart';
import 'package:commerciosdk/docs/docs_helper.dart';
import 'package:commerciosdk/docs/docs_utils.dart';
import 'package:commerciosdk/docs/export.dart';
import 'package:commerciosdk/entities/docs/commercio_doc.dart';
import 'package:commerciosdk/entities/docs/commercio_doc.g.dart';
import 'package:commerciosdk/entities/docs/commercio_doc_receipt.dart';
import 'package:commerciosdk/entities/docs/commercio_doc_receipt.g.dart';
import 'package:commerciosdk/entities/docs/export.dart';
import 'package:commerciosdk/entities/docs/msg_send_document_receipt.dart';
import 'package:commerciosdk/entities/docs/msg_share_document.dart';
import 'package:commerciosdk/entities/export.dart';
import 'package:commerciosdk/entities/id/did_document.dart';
import 'package:commerciosdk/entities/id/did_document.g.dart';
import 'package:commerciosdk/entities/id/did_document_proof.dart';
import 'package:commerciosdk/entities/id/did_document_proof.g.dart';
import 'package:commerciosdk/entities/id/did_document_public_key.dart';
import 'package:commerciosdk/entities/id/did_document_public_key.g.dart';
import 'package:commerciosdk/entities/id/did_document_service.dart';
import 'package:commerciosdk/entities/id/did_document_service.g.dart';
import 'package:commerciosdk/entities/id/export.dart';
import 'package:commerciosdk/entities/id/msg_request_did_deposit.dart';
import 'package:commerciosdk/entities/id/msg_request_did_power_up.dart';
import 'package:commerciosdk/entities/id/msg_set_did_document.dart';
import 'package:commerciosdk/entities/keys/asymmetric_keys.dart';
import 'package:commerciosdk/entities/keys/ec_keys.dart';
import 'package:commerciosdk/entities/keys/ed_25519_keys.dart';
import 'package:commerciosdk/entities/keys/export.dart';
import 'package:commerciosdk/entities/keys/key_pair.dart';
import 'package:commerciosdk/entities/keys/rsa_keys.dart';
import 'package:commerciosdk/entities/membership/membership_type.dart';
import 'package:commerciosdk/entities/membership/msg_buy_membership.dart';
import 'package:commerciosdk/entities/membership/msg_invite_user.dart';
import 'package:commerciosdk/entities/mint/msg_close_cdp.dart';
import 'package:commerciosdk/entities/mint/msg_open_cdp.dart';
import 'package:commerciosdk/export.dart';
import 'package:commerciosdk/id/did_deposit_request_payload.dart';
import 'package:commerciosdk/id/did_deposit_request_payload.g.dart';
import 'package:commerciosdk/id/did_deposit_request_signature_json.dart';
import 'package:commerciosdk/id/did_deposit_request_signature_json.g.dart';
import 'package:commerciosdk/id/did_document_helper.dart';
import 'package:commerciosdk/id/did_document_proof_signature_content.dart';
import 'package:commerciosdk/id/did_document_proof_signature_content.g.dart';
import 'package:commerciosdk/id/did_power_up_request_payload.dart';
import 'package:commerciosdk/id/did_power_up_request_payload.g.dart';
import 'package:commerciosdk/id/did_power_up_request_signature_json.dart';
import 'package:commerciosdk/id/did_power_up_request_signature_json.g.dart';
import 'package:commerciosdk/id/export.dart';
import 'package:commerciosdk/id/id_helper.dart';
import 'package:commerciosdk/id/id_utils.dart';
import 'package:commerciosdk/membership/export.dart';
import 'package:commerciosdk/membership/membership_helper.dart';
import 'package:commerciosdk/mint/export.dart';
import 'package:commerciosdk/mint/mint_helper.dart';
import 'package:commerciosdk/networking/network.dart';
import 'package:commerciosdk/tx/tx_helper.dart';
import 'package:commerciosdk/utils/utils.dart';
  
Popularity:
Describes how popular the package is relative to other packages. [more]
50
Health:
Code health derived from static analysis. [more]
99
Maintenance:
Reflects how tidy and up-to-date the package is. [more]
80
Overall:
Weighted score of the above. [more]
71
Learn more about scoring.

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

  • Dart: 2.7.1
  • pana: 0.13.6

Health suggestions

Fix lib/crypto/rsa_key_parser.dart. (-0.50 points)

Analysis of lib/crypto/rsa_key_parser.dart reported 1 hint:

line 37 col 22: Equality operator == invocation with references of unrelated types.

Fix lib/tx/tx_helper.dart. (-0.50 points)

Analysis of lib/tx/tx_helper.dart reported 1 hint:

line 12 col 18: Avoid const keyword.

Maintenance issues and suggestions

Support latest dependencies. (-20 points)

The version constraint in pubspec.yaml does not support the latest published versions for 2 dependencies (asn1lib, encrypt).

Maintain an example.

None of the files in the package's example/ directory matches known example patterns.

Common filename patterns include main.dart, example.dart, and commerciosdk.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.1.0 <3.0.0
asn1lib ^0.5.13 0.5.15 0.6.4
ed25519_hd_key ^1.0.1 1.0.1
encrypt ^3.3.1 3.3.1 4.0.0
equatable ^1.0.1 1.1.1
hex ^0.1.2 0.1.2
http ^0.12.0 0.12.0+4
json_annotation ^3.0.0 3.0.1
meta ^1.1.7 1.1.8
pointycastle ^1.0.1 1.0.2
sacco ^0.1.0 0.1.1
uuid ^2.0.2 2.0.4
Transitive dependencies
args 1.6.0
async 2.4.1
bech32 0.1.2
bip32 1.0.5
bip39 1.0.3
bip_bech32 0.1.3
bitcoin_flutter 1.1.0 2.0.0
bs58check 1.0.1
charcode 1.1.3
clock 1.0.1
collection 1.14.12
convert 2.1.1
crypto 2.1.4
fixnum 0.10.11
http_parser 3.1.4
path 1.6.4
pedantic 1.9.0
source_span 1.7.0
string_scanner 1.0.5
term_glyph 1.1.0
tweetnacl 0.3.2
typed_data 1.1.6
Dev dependencies
build_runner ^1.0.0
build_test ^0.10.9+1
json_serializable ^3.2.0
test ^1.9.3