isSupportedChainId
このコンテンツはまだ日本語訳がありません。
isSupportedChainId(
chainId): chainId is 137 | 80002
Defined in: src/chains/index.ts:86
Type guard that narrows an arbitrary chain ID to a SupportedChainId.
Parameters
chainId
number
The numeric chain ID to test.
Returns
chainId is 137 | 80002
true if kawasekit supports this chain ID.
Example
import { isSupportedChainId } from "kawasekit";
const id = 80002;if (isSupportedChainId(id)) { // `id` is now narrowed to SupportedChainId}