This helper function takes a node URL and returns the appropriate client, whether it's a websocket or https client
Resolves when the client is ready to use
Parameters
nodeUrl: string
the url of the node, http/https/ws/wss format
Default value validated: boolean = false
pass true if the client should validate responses coming from the RPC
This helper function takes a node URL and returns the appropriate client, whether it's a websocket or https client Resolves when the client is ready to use