IOP SDK

This package contains all Dart tool you need to interact with IOP DAC and Fort APIs and create awesome apps. For more info please visit the IOP Developer Portal.

This SDK will improve over time to be able to use it more easily.

Table of Contents <!-- omit in toc -->

Prerequisites

  • Dart 2.8.4+
  • Linux / MacOS

Install

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

dependencies:
  iop_sdk: ^3.1.1

Modules

Crypto

IOP implemented its crypto codebase in Rust and uses Dart FFI to communicate with it from Dart.

Memory Management

As Dart finalizers are not ready yet, only manual memory management is available. Consequently, some classes of this package are extended from Disposable and you have to manually dispose their instances when not using those objects anymore. This is common for Android developers, but might not be that evident for others.

Dynamic Libraries and OS Support

As we use our Rust code through its C-based FFI, we have to use dynamic libraries included as binaries loaded dynamically on demand.

Currently we support only Linux and MacOS, but we are preparing Android, iOS and Windows support as well.

Entities

Authority

All interfaces and types that are needed to communicate with an Authority endpoint. Authorities have two types of APIs, a public and a private as described below.

See more about the Authorities API here

Public API

The Public API is available for anyone without authentication. Mostly used to provide an endpoint for users to use the given authority's services.

Private API

The Private API is available with authentication only and used mostly by internal entities of an authority.

Inspector

All interfaces and types needed to communicate with an Inspector endpoint. See more about the Inspector API here.

Verifier

All interfaces and types needed to communicate with a Verifier endpoint. See more about the Verifier API here.

Layer1

DAC's API consists of two main parts. Layer-1 and layer-2. On layer-1 you perform write operations that change the blockchain's state, while on layer-2 you execute read operations without touching the state.

This module contains all Dart classes and utils needed to interact with the DAC Layer-1 API.

For more detailed examples please visit our tutorial center.

Layer2

This module contains all Dart classes and utils needed to interact with the DAC Layer-2 API.

For more detailed examples please visit our tutorial center.

SSI

Contains all interfaces needed to use the DAC (Morpheus) protocol including all entities defined in the specification.

Development

# Build json converters
$ pub run build_runner build --delete-conflicting-outputs
# Run tests
$ pub run test --concurrency=1 # note: the test must run on a single thread becaus of nonce generation
# Run Analyzer
$ dartanalyzer .

Contributing

Feel free to open issues and pull requests in this repository. By contributing you agree to transfer all intellectual property from your changes to the Decentralized Society Foundation, Panama, copyright owner of this code. To avoid losing precious time you spend on coding, you could open an issue first and discuss what you are up to before forking and sending us a PR.

Small note: If editing the README, please conform to the standard-readme specification.

License

LGPL-3.0 or later © 2020 Decentralized Society Foundation, PA

Libraries

authority
crypto
entities
inspector
layer1
layer2
network
scalar_box
ssi
utils
verifier