[![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.
Use this package as a library
1. Depend on it
Add this to your package's pubspec.yaml file:
dependencies: moac: ^0.1.0
2. Install it
You can install packages from the command line:
$ 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:
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]
We analyzed this package on Sep 20, 2019, and provided a score, details, and suggestions below. Analysis was completed with status completed using:
- Dart: 2.5.0
- pana: 0.12.21
- Flutter: 1.9.1+hotfix.2
Detected platforms: Flutter
References Flutter, and has no conflicting libraries.
lib/src/moac_rpc_client.dart. (-1 points)
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".
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
moac.dart. Packages with multiple examples should provide
For more information see the pub package layout conventions.
Package is getting outdated. (-4.38 points)
The package was last published 54 weeks ago.