casper_dart_sdk 0.1.1 copy "casper_dart_sdk: ^0.1.1" to clipboard
casper_dart_sdk: ^0.1.1 copied to clipboard

outdated

Dart SDK for interacting with the Casper Blockchain

Casper Dart SDK #

The Dart package casper_dart_sdk is an SDK for interacting with the Casper Blockchain.

Requirements #

To use the SDK, you will need to have the following tools installed:

  • Dart SDK version 2.16.1 or higher (haven't been tested before 2.16.1)

Installation #

Available at pub.dev.

dependencies:
  casper_dart_sdk: ^0.1.0

Usage #

After importing via:

import 'package:casper_dart_sdk/casper_dart_sdk.dart';

Use the CasperClient class to interact with the Casper Blockchain.

For example:

// Pass the node's RPC endpoint
final client = CasperClient(Uri.parse("http://127.0.0.1:7777/rpc"));

client.getPeers().then((result) {
  for (final peer in result.peers) {
    print(peer.address);
  }
});

Building #

Get dependencies:

dart pub get

To auto-generate serialization-deserialization classes, run build runner:

dart run build_runner build

Testing #

Run all tests:

dart test

Run specific test file:

dart test test/utils_test.dart
0
likes
0
points
104
downloads

Publisher

unverified uploader

Weekly Downloads

Dart SDK for interacting with the Casper Blockchain

Homepage

License

unknown (license)

Dependencies

basic_utils, buffer, convert, cryptography, equatable, http, json_annotation, jsonrpc2, pointycastle, rpc_exceptions, secp256k1, tuple

More

Packages that depend on casper_dart_sdk