# Applesauce transport

Relay requests, publications, and subscriptions.

[Read the native nostr events guide](/docs/native-events/). Signatures below come from the published SDK declarations. Access SDK services through `db`; use their constructors only when integrating at a lower level.

## ApplesauceTransport


```ts
/** Applesauce owns connection reuse, Nostr wire messages, and reconnect behavior. */
declare class ApplesauceTransport implements Transport {}
```

### Properties


```ts
readonly pool: RelayPool;
```

### constructor


```ts
constructor(pool: RelayPool);
```

### request


```ts
request(
  relays: string[],
  filters: Filter[],
  options: {
    timeout: number;
    signal: AbortSignal;
  },
): Promise<TransportRead>;
```

### publish


```ts
publish(
  relays: string[],
  event: NostrEvent,
  options: {
    timeout: number;
    signal: AbortSignal;
  },
): Promise<RelayResult[]>;
```

### subscribe


```ts
subscribe(relays: string[], filters: Filter[]): Observable<NostrEvent>;
```
