starknet 0.0.2 starknet: ^0.0.2 copied to clipboard
The Dart SDK for StarkNet. It implements all the JSON-RPC endpoints plus higher level abstractions to deal with smart contracts.
import 'dart:convert';
import 'package:starknet/starknet.dart';
void main() async {
final blockNumber = await JsonRpcProvider.devnet.blockNumber();
print(blockNumber);
}
prettyPrintJson(Map<String, dynamic> json) {
var encoder = JsonEncoder.withIndent(" ");
print(encoder.convert(json));
}