rendezvous-client
TypeScript icon, indicating that this package has built-in type declarations

0.1.2 • Public • Published

rendezvous-client

Client library designed for use with rendezvous.

PrivateRoom

Connect to a room while hiding the messages from the rendezvous server.

Supply a key for encryption and decryption. hash(key) will be used for the room id.

Interface is similar to WebSocket, but also allows sending & receiving any plain object (implemented using a msgpack variant).

Key

Models an encryption key. Use Key.random() to generate one, or supply 32 bytes to the constructor.

Chat Example

Host: ./node_modules/tsx manualTests/host.ts

$ ./manualTests/host.ts
key: 2QG5MQjXszG3A2ow3bV5HGkAbbp4tp7soXzQFNAXesmr
id: WUnZR3puVjVnYL3SQAJtTqZqZsnrgtctcKX4XRygzgR
opened
received: hello

send: (type here and press enter)

Join: ./node_modules/tsx manualTests/join.ts

$ ./manualTests/join.ts
Enter key: 2QG5MQjXszG3A2ow3bV5HGkAbbp4tp7soXzQFNAXesmr

(screen clear)

key: 2QG5MQjXszG3A2ow3bV5HGkAbbp4tp7soXzQFNAXesmr
id: WUnZR3puVjVnYL3SQAJtTqZqZsnrgtctcKX4XRygzgR
opened
received: hello

send: (type here and press enter)

Readme

Keywords

none

Package Sidebar

Install

npm i rendezvous-client

Weekly Downloads

2

Version

0.1.2

License

MIT

Unpacked Size

44.3 kB

Total Files

55

Last publish

Collaborators

  • voltrevo