polkadart 0.1.0 copy "polkadart: ^0.1.0" to clipboard
polkadart: ^0.1.0 copied to clipboard

Interfaces for interacting with Polkadot JsonRPC interface

example/polkadart_example.dart

import 'package:polkadart/polkadart.dart' show Provider, StateApi;

void main() async {
  final polkadart = Provider(Uri.parse('wss://kusama-rpc.polkadot.io'));
  final api = StateApi(polkadart);
  final runtimeVersion = await api.getRuntimeVersion();
  print(runtimeVersion.toJson());
  await polkadart.disconnect();
}