Skip to main content
Version: 1.13.1

Type Alias: VerifierTransport

VerifierTransport = (call: VerifierCall) => Promise<Uint8Array>

Defined in: verifiers/transport.ts:43

Performs one unary gRPC call and resolves to the protobuf-encoded response message (without framing). Implementations add their protocol's framing, and throw on a transport failure or a non-OK gRPC status; they must not interpret the payload.

Parameters

ParameterType
callVerifierCall

Returns

Promise<Uint8Array>

Example

Delegate to the default for URLs a custom transport doesn't handle

TypeScript
const web = grpcWebTransport()
const transport: VerifierTransport = (call) =>
call.url.startsWith('grpc://') ? myGrpcClient.unary(call) : web(call)
const chain = await EVMChain.fromUrl(rpc, { verifierTransport: transport })