An object containing input parameters for retrieving verification methods.
The DID document from which verification methods are retrieved.
An array of DidVerificationMethod
. If no verification methods are found, an empty array is returned.
const didDocument = { ... }; // W3C DID document
const verificationMethods = getVerificationMethods({ didDocument });
Throws an TypeError
if the didDocument
parameter is missing.
Retrieves all verification methods from a given DID document, including embedded methods.
This function consolidates all verification methods into a single array for easy access and processing. It checks both the primary
verificationMethod
array and the individual verification relationship propertiesauthentication
,assertionMethod
,keyAgreement
,capabilityInvocation
, andcapabilityDelegation
for embedded methods.The given DID Document must adhere to the W3C DID Core Specification.