Skip to content

Function: fetchRelayChallenge() ​

fetchRelayChallenge(relayHost, opts?): Promise<Challenge>

Defined in: @meddleware/walrus-storage-client/src/access.ts:61

Fetch a fresh challenge from the gateway's GET /v1/challenge endpoint. The relay host must be https: (loopback http: allowed); redirects are refused, the body is size-capped, and the request aborts after opts.timeoutMs (default 10 s) or on opts.signal.

Parameters ​

relayHost ​

string

opts? ​

signal? ​

AbortSignal

timeoutMs? ​

number

Returns ​

Promise<Challenge>

Throws ​

if the network request fails or the gateway returns a non-2xx status.

Throws ​

if the response lacks a valid nonce or a positive numeric expiresAt.

2026 Meddleware. All jams preserved.