# node

URL: https://www.caprid.com/docs/reference/typescript/caprid/relay/node/readme/

`@caprid/relay/node`: the SDK for Node. It exports everything `@caprid/relay` does, and its connect functions default
`createTransport` to `@caprid/relay-quic`, the native QUIC transport adapter, an optional peer dependency installed next
to this package. It uses that adapter even when a global `WebTransport` exists, and warns once when the global
could replace it.

```ts
import { connectRelayPublisher } from '@caprid/relay/node';

const publisher = await connectRelayPublisher({ url, namespace, getToken });
```

## Interfaces

- [RelayCertificateHash](https://www.caprid.com/docs/reference/typescript/caprid/relay/node/interfaces/relaycertificatehash/)
- [RelayNodeTrustOptions](https://www.caprid.com/docs/reference/typescript/caprid/relay/node/interfaces/relaynodetrustoptions/)

## Type Aliases

- [RelayNodeOptions](https://www.caprid.com/docs/reference/typescript/caprid/relay/node/type-aliases/relaynodeoptions/)

## Functions

- [connectRelayPublisher](https://www.caprid.com/docs/reference/typescript/caprid/relay/node/functions/connectrelaypublisher/)
- [connectRelaySubscriber](https://www.caprid.com/docs/reference/typescript/caprid/relay/node/functions/connectrelaysubscriber/)
- [connectSupervisedPublisher](https://www.caprid.com/docs/reference/typescript/caprid/relay/node/functions/connectsupervisedpublisher/)
- [connectSupervisedSubscriber](https://www.caprid.com/docs/reference/typescript/caprid/relay/node/functions/connectsupervisedsubscriber/)

## References

### ConnectRelayOptions

Re-exports [ConnectRelayOptions](https://www.caprid.com/docs/reference/typescript/caprid/relay/index/interfaces/connectrelayoptions/)

***

### ConnectRelayPublisherOptions

Re-exports [ConnectRelayPublisherOptions](https://www.caprid.com/docs/reference/typescript/caprid/relay/index/interfaces/connectrelaypublisheroptions/)

***

### ConnectRelaySubscriberOptions

Re-exports [ConnectRelaySubscriberOptions](https://www.caprid.com/docs/reference/typescript/caprid/relay/index/interfaces/connectrelaysubscriberoptions/)

***

### ConnectSupervisedPublisherOptions

Re-exports [ConnectSupervisedPublisherOptions](https://www.caprid.com/docs/reference/typescript/caprid/relay/index/interfaces/connectsupervisedpublisheroptions/)

***

### ConnectSupervisedSubscriberOptions

Re-exports [ConnectSupervisedSubscriberOptions](https://www.caprid.com/docs/reference/typescript/caprid/relay/index/interfaces/connectsupervisedsubscriberoptions/)

***

### DEFAULT\_ENDPOINT

Re-exports [DEFAULT_ENDPOINT](https://www.caprid.com/docs/reference/typescript/caprid/relay/index/variables/default_endpoint/)

***

### Goaway

Re-exports [Goaway](https://www.caprid.com/docs/reference/typescript/caprid/relay/index/interfaces/goaway/)

***

### KeyValuePair

Re-exports [KeyValuePair](https://www.caprid.com/docs/reference/typescript/caprid/relay/index/interfaces/keyvaluepair/)

***

### LocationFilter

Re-exports [LocationFilter](https://www.caprid.com/docs/reference/typescript/caprid/relay/index/type-aliases/locationfilter/)

***

### MessageParameters

Re-exports [MessageParameters](https://www.caprid.com/docs/reference/typescript/caprid/relay/index/interfaces/messageparameters/)

***

### MoqtObject

Re-exports [MoqtObject](https://www.caprid.com/docs/reference/typescript/caprid/relay/index/interfaces/moqtobject/)

***

### MoqTrackSource

Re-exports [MoqTrackSource](https://www.caprid.com/docs/reference/typescript/caprid/relay/index/interfaces/moqtracksource/)

***

### MoqtTransport

Re-exports [MoqtTransport](https://www.caprid.com/docs/reference/typescript/caprid/relay/index/interfaces/moqttransport/)

***

### NamespaceEvent

Re-exports [NamespaceEvent](https://www.caprid.com/docs/reference/typescript/caprid/relay/index/interfaces/namespaceevent/)

***

### NamespaceEventOptions

Re-exports [NamespaceEventOptions](https://www.caprid.com/docs/reference/typescript/caprid/relay/index/interfaces/namespaceeventoptions/)

***

### NamespaceEvents

Re-exports [NamespaceEvents](https://www.caprid.com/docs/reference/typescript/caprid/relay/index/interfaces/namespaceevents/)

***

### PublishDone

Re-exports [PublishDone](https://www.caprid.com/docs/reference/typescript/caprid/relay/index/interfaces/publishdone/)

***

### PublisherGeneration

Re-exports [PublisherGeneration](https://www.caprid.com/docs/reference/typescript/caprid/relay/index/interfaces/publishergeneration/)

***

### PublishProperty

Re-exports [PublishProperty](https://www.caprid.com/docs/reference/typescript/caprid/relay/index/interfaces/publishproperty/)

***

### readJSON

Re-exports [readJSON](https://www.caprid.com/docs/reference/typescript/caprid/relay/index/functions/readjson/)

***

### readText

Re-exports [readText](https://www.caprid.com/docs/reference/typescript/caprid/relay/index/functions/readtext/)

***

### RegisterTrackOptions

Re-exports [RegisterTrackOptions](https://www.caprid.com/docs/reference/typescript/caprid/relay/index/interfaces/registertrackoptions/)

***

### RelayCredential

Re-exports [RelayCredential](https://www.caprid.com/docs/reference/typescript/caprid/relay/index/interfaces/relaycredential/)

***

### RelayError

Re-exports [RelayError](https://www.caprid.com/docs/reference/typescript/caprid/relay/index/classes/relayerror/)

***

### RelayErrorCode

Re-exports [RelayErrorCode](https://www.caprid.com/docs/reference/typescript/caprid/relay/index/type-aliases/relayerrorcode/)

***

### RelayErrorPhase

Re-exports [RelayErrorPhase](https://www.caprid.com/docs/reference/typescript/caprid/relay/index/type-aliases/relayerrorphase/)

***

### RelayGroupWriter

Re-exports [RelayGroupWriter](https://www.caprid.com/docs/reference/typescript/caprid/relay/index/interfaces/relaygroupwriter/)

***

### RelayPublisher

Re-exports [RelayPublisher](https://www.caprid.com/docs/reference/typescript/caprid/relay/index/interfaces/relaypublisher/)

***

### RelaySubscriber

Re-exports [RelaySubscriber](https://www.caprid.com/docs/reference/typescript/caprid/relay/index/interfaces/relaysubscriber/)

***

### RelaySubscription

Re-exports [RelaySubscription](https://www.caprid.com/docs/reference/typescript/caprid/relay/index/interfaces/relaysubscription/)

***

### RelaySubscriptionHandlers

Re-exports [RelaySubscriptionHandlers](https://www.caprid.com/docs/reference/typescript/caprid/relay/index/interfaces/relaysubscriptionhandlers/)

***

### RelayTrackOptions

Re-exports [RelayTrackOptions](https://www.caprid.com/docs/reference/typescript/caprid/relay/index/interfaces/relaytrackoptions/)

***

### RelayTrackWriter

Re-exports [RelayTrackWriter](https://www.caprid.com/docs/reference/typescript/caprid/relay/index/interfaces/relaytrackwriter/)

***

### RelayTransportFactory

Re-exports [RelayTransportFactory](https://www.caprid.com/docs/reference/typescript/caprid/relay/index/type-aliases/relaytransportfactory/)

***

### RequestError

Re-exports [RequestError](https://www.caprid.com/docs/reference/typescript/caprid/relay/index/interfaces/requesterror/)

***

### RestartReason

Re-exports [RestartReason](https://www.caprid.com/docs/reference/typescript/caprid/relay/index/type-aliases/restartreason/)

***

### roomEndpoint

Re-exports [roomEndpoint](https://www.caprid.com/docs/reference/typescript/caprid/relay/index/functions/roomendpoint/)

***

### SubscribeOk

Re-exports [SubscribeOk](https://www.caprid.com/docs/reference/typescript/caprid/relay/index/interfaces/subscribeok/)

***

### Subscription

Re-exports [Subscription](https://www.caprid.com/docs/reference/typescript/caprid/relay/index/interfaces/subscription/)

***

### SubscriptionConnectionClosedError

Re-exports [SubscriptionConnectionClosedError](https://www.caprid.com/docs/reference/typescript/caprid/relay/index/classes/subscriptionconnectionclosederror/)

***

### SubscriptionEnd

Re-exports [SubscriptionEnd](https://www.caprid.com/docs/reference/typescript/caprid/relay/index/type-aliases/subscriptionend/)

***

### SubscriptionEndKind

Re-exports [SubscriptionEndKind](https://www.caprid.com/docs/reference/typescript/caprid/relay/index/type-aliases/subscriptionendkind/)

***

### SubscriptionEvent

Re-exports [SubscriptionEvent](https://www.caprid.com/docs/reference/typescript/caprid/relay/index/type-aliases/subscriptionevent/)

***

### SubscriptionEventOptions

Re-exports [SubscriptionEventOptions](https://www.caprid.com/docs/reference/typescript/caprid/relay/index/interfaces/subscriptioneventoptions/)

***

### SubscriptionEvents

Re-exports [SubscriptionEvents](https://www.caprid.com/docs/reference/typescript/caprid/relay/index/interfaces/subscriptionevents/)

***

### SubscriptionHandlers

Re-exports [SubscriptionHandlers](https://www.caprid.com/docs/reference/typescript/caprid/relay/index/interfaces/subscriptionhandlers/)

***

### SubscriptionOverflowError

Re-exports [SubscriptionOverflowError](https://www.caprid.com/docs/reference/typescript/caprid/relay/index/classes/subscriptionoverflowerror/)

***

### SubscriptionRequestError

Re-exports [SubscriptionRequestError](https://www.caprid.com/docs/reference/typescript/caprid/relay/index/classes/subscriptionrequesterror/)

***

### SupervisedPublisher

Re-exports [SupervisedPublisher](https://www.caprid.com/docs/reference/typescript/caprid/relay/index/interfaces/supervisedpublisher/)

***

### SupervisedStatus

Re-exports [SupervisedStatus](https://www.caprid.com/docs/reference/typescript/caprid/relay/index/type-aliases/supervisedstatus/)

***

### SupervisedSubscriber

Re-exports [SupervisedSubscriber](https://www.caprid.com/docs/reference/typescript/caprid/relay/index/interfaces/supervisedsubscriber/)

***

### SupervisionBackoff

Re-exports [SupervisionBackoff](https://www.caprid.com/docs/reference/typescript/caprid/relay/index/interfaces/supervisionbackoff/)

***

### SwitchableHandlers

Re-exports [SwitchableHandlers](https://www.caprid.com/docs/reference/typescript/caprid/relay/index/interfaces/switchablehandlers/)

***

### SwitchableSubscription

Re-exports [SwitchableSubscription](https://www.caprid.com/docs/reference/typescript/caprid/relay/index/interfaces/switchablesubscription/)

***

### SwitchedInfo

Re-exports [SwitchedInfo](https://www.caprid.com/docs/reference/typescript/caprid/relay/index/interfaces/switchedinfo/)

***

### SwitchOptions

Re-exports [SwitchOptions](https://www.caprid.com/docs/reference/typescript/caprid/relay/index/interfaces/switchoptions/)

***

### WantHandlers

Re-exports [WantHandlers](https://www.caprid.com/docs/reference/typescript/caprid/relay/index/interfaces/wanthandlers/)

***

### WantOptions

Re-exports [WantOptions](https://www.caprid.com/docs/reference/typescript/caprid/relay/index/interfaces/wantoptions/)

***

### WantSwitchedInfo

Re-exports [WantSwitchedInfo](https://www.caprid.com/docs/reference/typescript/caprid/relay/index/interfaces/wantswitchedinfo/)

***

### WantTarget

Re-exports [WantTarget](https://www.caprid.com/docs/reference/typescript/caprid/relay/index/interfaces/wanttarget/)
