20 lines
423 B
TypeScript
20 lines
423 B
TypeScript
// @ts-ignore
|
|
import ProtomuxRPC from "protomux-rpc"
|
|
// @ts-ignore
|
|
import c from "compact-encoding"
|
|
import b4a from "b4a"
|
|
|
|
const ID = b4a.from("lumeweb")
|
|
|
|
export default class RPC extends ProtomuxRPC {
|
|
constructor(stream: any, options = {}) {
|
|
options = {
|
|
...{
|
|
id: ID,
|
|
valueEncoding: c.json
|
|
}, ...options
|
|
};
|
|
super(stream, options);
|
|
}
|
|
}
|