Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions src/caip-types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -142,6 +142,15 @@ export enum KnownCaipNamespace {
Wallet = 'wallet',
}

/**
* A CAIP-2 chain ID that is guaranteed to have a known CAIP namespace
* (@see {@link KnownCaipNamespace}).
*
* This is a narrower, more type-safe alternative to {@link CaipChainId} for use cases
* where the chain namespace must be one of the known standards.
*/
export type KnownCaipNamespacedChainId = `${KnownCaipNamespace}:${string}`;

/**
* Check if the given value is a {@link CaipChainId}.
*
Expand Down
Loading