@baseline-protocol/messaging
TypeScript icon, indicating that this package has built-in type declarations

0.1.0 • Public • Published

@baseline-protocol/messaging

Baseline core messaging package.

NATS is currently the default example of a point-to-point messaging provider for organizations to exchange secure protocol messages. Other messaging protocols may be implemented.

Installation

npm install @baseline-protocol/messaging

Building

You can build the package locally with npm run build.

Interfaces

IMessagingService

connect(): Promise<any>;
disconnect(): Promise<void>;
getSubscribedSubjects(): string[];
isConnected(): boolean;
publish(subject: string, payload: any, reply?: string, recipientId?: string, senderId?: string): Promise<void>;
request(subject: string, timeout: number, data?: any): Promise<any | void>;
subscribe(subject: string, callback?: (msg: any, err?: any) => void, myId?: string): Promise<any>;
unsubscribe(subject: string);
flush(): Promise<void>;

Supported Providers & Protocols

The following messaging providers are available:

  • NATS
  • Whisper

Readme

Keywords

none

Package Sidebar

Install

npm i @baseline-protocol/messaging

Weekly Downloads

2

Version

0.1.0

License

CC0 1.0 Universal

Unpacked Size

214 kB

Total Files

37

Last publish

Collaborators

  • firetron
  • prvd