Skip to content
Alchemy Logo

isAlchemyTransport

function isAlchemyTransport(
  transport,
  chain,
): transport is AlchemyTransport<undefined>;

Defined in: packages/common/src/transport/alchemy.ts:62

A type guard for the transport to determine if it is an Alchemy transport. Used in cases where we would like to do switching depending on the transport.

ParameterTypeDescription

transport

Transport

The transport to check

chain

Chain

Chain for the transport to run its function to return the transport config

transport is AlchemyTransport<undefined>

true if the transport is an Alchemy transport, otherwise false

Was this page helpful?