casper_dart_sdk 0.1.0 copy "casper_dart_sdk: ^0.1.0" to clipboard
casper_dart_sdk: ^0.1.0 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 #

Since the SDK is under development, it is not available at pub.dev as of yet. But you can still use it by including the URL of the git repository in your application.

dependencies:
  casper_dart_sdk:
    git: 
      url: https://github.com/cdolaz/casper_dart_sdk.git
      ref: main

Usage #

After importing via:

import 'package:casper_dart_sdk/casper_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
98
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