This is the client implementation for Aurora RPC.
The client uses the ws library for Node.js / native WebSocket for the browser.
The server implementation is available in AuroraRPC-Server.
npm i aurora-rpc-client
import { Client } from 'aurora-rpc-client';
// --- Connect ---
const client = new Client("ws://localhost:8080")
client.connect()
// or
const client = new Client()
client.connect("ws://localhost:8080")
// ---
const result = await client.send('hello')
console.log(result) // "Hello Aurora RPC!"