function · Browser and Node

# postBundle

Posts every message through a relay transport signed in as the courier. The relay sees the original senders' TSP bytes.

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

Import:

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

## Declaration

Signature:

```ts
postBundle(items: BundleItem[], relay: {
    post(from: string, to: string, wire: Uint8Array): Promise<Delivery>;
}): Promise<{
    posted: number;
    refused: number;
}>;
```

### Parameters

- **`items` (required)**: `BundleItem[]`
- **`relay` (required)**: `{ post(from: string, to: string, wire: Uint8Array): Promise<Delivery>; }`

### Returns

`Promise<{ posted: number; refused: number; }>`

[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/postBundle/. An index of the documentation for AI assistants is at https://toip.tools/llms.txt.
