toip.tools

interface · Browser and Node

RelayLike

Anything that posts to the internet relay: a RelayTransport signed in as the gateway.

@toip-tools/mesh-transportView source
TypeScriptImport
import { type RelayLike } from "@toip-tools/mesh-transport";

Declaration

TypeScriptinterface
interface RelayLike {
  post(from: string, to: string, wire: Uint8Array): Promise<Delivery>;
  readonly url?: string;
}

Properties

urloptional · readonly
string | undefined

Methods

post

TypeScriptSignature
post(from: string, to: string, wire: Uint8Array): Promise<Delivery>;

Parameters

fromrequired
string
torequired
string
wirerequired
Uint8Array<ArrayBufferLike>

Returns

Promise<Delivery>