Skip to content

RelayClientOptions

url: string

Relay base URL (http[s]://host:port). Off loopback only https:// (wss://).


token: string


solverId: string


key: SigningKey


optional relayPublicKey?: string

The relay's verifying key (hex, as welcome.relayPublicKey): the relay our quotes and ladders are bound to, and the key every job.dispatch is verified against. Required off loopback. On loopback (the devnet stack) it may be left out: the key of the first welcome is then pinned for this process (trust on first use), and a reconnect that presents another key is refused.


optional network?: string

The Midnight network we quote on (mainnet, preprod, undeployed…): quotes and ladders are bound to it. Left out, the relay's own word (welcome.network) is taken; given, a relay or a request on another network gets nothing signed.


optional maxQuoteTtlMs?: number

The longest a quote of ours binds (default 120 s), whatever the request's minDeadlineMs: a request that asks for longer gets no quote.


optional log?: (msg, extra?) => void

Parameter Type
msg string
extra? Record<string, unknown>

void