moac 0.1.0

  • Readme
  • Changelog
  • Installing
  • 30

moac #

ethereum #

[![Build Status] testing driver

An moac RPC 2 client for Dart.

This package provides a client to access the Moac JSON RPC API documented here It uses the JSON RPC2 interface and can be configured to use any of the endpoints described. The client runs on the server using HTTP, and in the browser using both HTTP and web sockets.

The package currently implements 44 of the API calls documented, the main omissions being ones documented but no longer implemented in the latest version of geth. This encompasses the Solidity interface and most of the SHH whisper interface. As this Ethereum API is updated the package will be updated to suit.

The mapping of Ethereum RPC data types to Dart types is as follows :-

  • boolean - bool
  • string - String
  • quantity - int
  • data - BigInt(see below)

Examples can be found in the examples directory, also the unit test suite contains examples of calling every API interface.

The package was tested against a geth client, version 1.7.2. The API provided should work on older geth clients but be aware some calls may return an error of not implemented.

The package currently depends on the BigNum package, this package is not currently Dart 2.0 ready and may be superceded by a new BigInt implementation in Dart. This package will be updated approprately as and when any changes are needed.

0.1.0 #

Initial release

Use this package as a library

1. Depend on it

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

  moac: ^0.1.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:moac/moac.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 Jul 7, 2020, and provided a score, details, and suggestions below. Analysis was completed with status completed using:

  • Dart: 2.8.4
  • pana: 0.13.13
  • Flutter: 1.17.5

Analysis suggestions

Package not compatible with SDK dart

because of import path [moac] that is in a package requiring null.

Health suggestions

Fix lib/src/moac_rpc_client.dart. (-1 points)

Analysis of lib/src/moac_rpc_client.dart reported 2 hints:

line 29 col 11: Avoid wrapping fields in getters and setters just to be "safe".

line 31 col 7: Avoid wrapping fields in getters and setters just to be "safe".

Maintenance suggestions

Package is getting outdated. (-84.11 points)

The package was last published 96 weeks ago.

The package description is too short. (-20 points)

Add more detail to the description field of pubspec.yaml. Use 60 to 180 characters to describe the package, what it does, and its target use case.

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 moac.dart. Packages with multiple examples should provide example/

For more information see the pub package layout conventions.


Package Constraint Resolved Available
Direct dependencies
Dart SDK >=2.0.0-dev.68.0 <3.0.0
flutter 0.0.0
Transitive dependencies
collection 1.14.12 1.14.13
meta 1.1.8 1.2.1
sky_engine 0.0.99
typed_data 1.1.6 1.2.0
vector_math 2.0.8
Dev dependencies