chainId method
Implementation
Future<String> chainId({Duration? timeout}) async {
final block = await getLatestBlock(timeout: timeout);
final chainId = block.block?.header?.chainId;
if (chainId == null) {
throw const RPCError(
message: "Unexpected service response. missing chaind id.",
);
}
return chainId;
}