Skip to main content
Deno 2 is finally here 🎉️
Learn more
Module

x/enzastdlib/rpc-protocol/mod.ts

enzastdlib is a set of TypeScript modules that follow a common design API philosophy aiming at sane defaults and ease-of-use targeting the Deno TypeScript runtime.
Latest
import * as enzastdlib from "https://deno.land/x/enzastdlib@v0.0.4/rpc-protocol/mod.ts";

Create fully typed and validated RPC clients and servers powered by JSON Schema 2019-09.

NOTE: This module is based on the JSON-RPC 2.0 standard but does not follow the specifications.

WARNING: This module only specifies the RPC standard. You must supply the code to make it communicate via network or IPC.

This module imports the following external libraries:

Variables

Associates a JSONSchema value as the parameters payload with the function.

Represents an enumeration of all the possible types of Payloads.

Represents the current version of the RPC protocol.

Associates a JSONSchema value as the result payload with the function.

Interfaces

Represents an optional object that can be set when making a call to a server.

Type Aliases

Represents a utility type that "depromisifies" a notifications by converting its second argument as its only argument. And converts its return type into void.

Represents a utility type that takes an NotificationRecord<false> record and returns a new record with DepromisifyNotification ran on all notifications.

Represents the typing of a notification callback that can be registered.

Represents a record containing all registered notifications.

Represents the typing of a payload callback that can be registered.

Represents a string union of PAYLOAD_TYPES.

Represents the typing of a procedure callback that can be registered.

Represents a record containing all registered procedures.

Represents a utility type that "promisifies" a procedures by converting its second argument as its only argument. And converts its return type into a Promise if not already.

Represents a utility type that takes an ProcedureRecord<false> record and returns a new record with PromisifyProcedure ran on all procedures.