polkadart 0.1.0-pre.1 polkadart: ^0.1.0-pre.1 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();
}