Skip to content

AuroraTeam/AuroraRPC-Client

Repository files navigation

AuroraRPC-Client

Description

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.

Installation

npm i aurora-rpc-client

Usage

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!"