@modulae.systems/rpc-server
Version:
An RPC server module
9 lines (8 loc) • 607 B
TypeScript
import { AuthorizationCallback, RequestCallback } from "./types";
/**
* This function initiates the RPC API, saving the publicCallback, protectedCallback (if defined) and authorizationCallback (if defined). All method from this RPC will go through these 3 methods.
*
* @param publicCallback A callback where you get the body and the header. Define your logic on what to do when a method is called.
* @param b The second number.
*/
export declare function initRpcWithApiCallback(publicCallback: RequestCallback, protectedCallback?: RequestCallback, authorizationCallback?: AuthorizationCallback): void;