Skip to main content
Version: 1.13.1

Function: grpcWebTransport()

grpcWebTransport(fetchImpl?: (input: string | URL | Request, init?: RequestInit) => Promise<Response>): VerifierTransport

Defined in: verifiers/transport.ts:101

Build the default, browser-safe VerifierTransport: grpc-web (application/grpc-web+proto) over fetch, for an http(s):// endpoint served by a grpc-web proxy (e.g. Envoy's grpc_web filter) in front of the verifier. The URL may carry a path prefix; the method path is appended.

Parameters

ParameterTypeDescription
fetchImpl?(input: string | URL | Request, init?: RequestInit) => Promise<Response>fetch to use (default: globalThis.fetch)

Returns

VerifierTransport

The transport

Throws

CCIPError from the transport, for a non-http(s) URL, an HTTP error or a non-OK gRPC status