interface · Browser and Node

# RelayLike

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

`@toip-tools/mesh-transport` · [View source](https://github.com/yourbuddyconner/toip-tools/blob/main/packages/mesh-transport/src/gateway.ts#L31)

Import:

```ts
import { type RelayLike } from "@toip-tools/mesh-transport";
```

## Declaration

interface:

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

## Properties

- **`url` (optional · readonly)**: `string | undefined`

## Methods

### `post`

Signature:

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

#### Parameters

- **`from` (required)**: `string`
- **`to` (required)**: `string`
- **`wire` (required)**: `Uint8Array<ArrayBufferLike>`

#### Returns

`Promise<Delivery>`

[Usage guide](https://toip.tools/toolkit/mesh-transport/#usage) · [Error handling](https://toip.tools/toolkit/mesh-transport/#errors) · [All exports](https://toip.tools/toolkit/mesh-transport/api/)

---

This is the Markdown version of https://toip.tools/toolkit/mesh-transport/api/RelayLike/. An index of the documentation for AI assistants is at https://toip.tools/llms.txt.
