Skip to main content

getChainId() function

This API is provided as a beta preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.

Extracts the chain ID from a supporting legacy representations as well.

Signature:

export declare function getChainId(verificationMethod: _NormalizedVerificationMethod): number

Parameters

ParameterTypeDescription
verificationMethod_NormalizedVerificationMethodthe VerificationMethod object (from a DID document)

Returns:

number

a chain ID number or undefined if none could be extracted.

This API may change without a BREAKING CHANGE notice.