Skip to content
This repository has been archived by the owner on Jan 26, 2025. It is now read-only.

AuroraTeam/AuroraRPC-Client

Repository files navigation

AuroraRPC-Client

Caution

This package is moved to AuroraRPC monorepo. Please use @aurora-rpc/client instead.

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

Releases

No releases published

Packages

No packages published