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

Type-safe NEAR Protocol JSON-RPC client for Dart, generated from the official nearcore OpenAPI spec. Runs identically on native (AOT) and web (JS).

example/near_jsonrpc_client_example.dart

import 'package:near_jsonrpc_client/near_jsonrpc_client.dart';

/// Minimal status query against public testnet RPC.
Future<void> main() async {
  final rpc = NearJsonRpcClient(endpoint: 'https://test.rpc.fastnear.com');
  try {
    final status = await rpc.status();
    print('chain: ${status.chain_id}');
    print('height: ${status.sync_info?.latest_block_height}');
  } finally {
    rpc.close();
  }
}
0
likes
130
points
187
downloads

Documentation

API reference

Publisher

verified publisher0xj.dev

Weekly Downloads

Type-safe NEAR Protocol JSON-RPC client for Dart, generated from the official nearcore OpenAPI spec. Runs identically on native (AOT) and web (JS).

Repository (GitHub)
View/report issues

Topics

#near #blockchain #rpc #openapi #web3

License

MIT (license)

Dependencies

http

More

Packages that depend on near_jsonrpc_client