ontology_dart_sdk 1.0.3

Dart SDK For Ontology blockchain

This is a Dart SDK for the Ontology blockchain and could be used in the Flutter development.

It supports:

  • Wallet management
  • Digital identity management
  • Digital asset management
  • Smart Contract deployment and invocation
  • Ontology blockchain API

It's recommend to take a quick view of the Ontology Development Guide before your development. The test cases folder contains various examples they are also worth a glance.

Online API reference or view it on filesystem.

Install #

For using this package in your project you'd firstly update your pubspec.yaml file to contains blew lines:

  ontology_dart_sdk: ^1.0.0

and then run the package installation command:

flutter packages get

Run the tests #

Testing in flutter is interesting, our test code and business code run in two separate processes. The test code takes screen captures of the running business code to perform further predicate code. For more details under this mechanism please refer integration testing.

Here are the steps to start the tests:

  1. Downloading the executable binary file of Ontology from it's release page. The version used in the tests is ontology version v1.6.0-8-g754303c0
  2. Copying the test wallet located in file example/lib/test/common/wallet.dart and save it into file wallet.dat then put the saved wallet file and the Ontology binary from step 1 under the same directory.
  3. Starting Ontology node runs in test mode ./ontology --testmode --loglevel=1
  4. Starting the tests: cd example/ && flutter drive --target=test_driver/app.dart

Below is a screenshot from tests:

0.0.1 #

  • TODO: Describe initial release.


ontology_dart_sdk_example #

Demonstrates how to use the ontology_dart_sdk plugin.

Getting Started #

This project is a starting point for a Flutter application.

A few resources to get you started if this is your first Flutter project:

For help getting started with Flutter, view our online documentation, which offers tutorials, samples, guidance on mobile development, and a full API reference.

Use this package as a library

1. Depend on it

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

  ontology_dart_sdk: ^1.0.3

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:ontology_dart_sdk/common.dart';
import 'package:ontology_dart_sdk/crypto.dart';
import 'package:ontology_dart_sdk/neocore.dart';
import 'package:ontology_dart_sdk/network.dart';
import 'package:ontology_dart_sdk/settings.dart';
import 'package:ontology_dart_sdk/wallet.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 Feb 21, 2020, and provided a score, details, and suggestions below. Analysis was completed with status completed using:

  • Dart: 2.7.1
  • pana: 0.13.5
  • Flutter: 1.12.13+hotfix.7

Health issues and suggestions

Document public APIs. (-0.93 points)

801 out of 803 API elements have no dartdoc comment.Providing good documentation for libraries, classes, functions, and other API elements improves code readability and helps developers find and use your API.


Package Constraint Resolved Available
Direct dependencies
Dart SDK >=2.1.0-dev.9.4 <3.0.0
collection ^1.14.11 1.14.11 1.14.12
convert ^2.0.2 2.1.1
flutter 0.0.0
meta ^1.1.6 1.1.8
uuid ^2.0.0 2.0.4
web_socket_channel ^1.0.9 1.1.0
Transitive dependencies
async 2.4.0
charcode 1.1.3
crypto 2.1.4
sky_engine 0.0.99
stream_channel 2.0.0
typed_data 1.1.6
vector_math 2.0.8
Dev dependencies
test any