new ContractMetadataService(Initializes a new instance of the ContractMetadataService.chain
):ContractMetadataService
Parameter | Type | Description |
---|---|---|
chain | VCChain | The blockchain to be used. |
ContractMetadataService
Property | Type | Description | Defined in |
---|---|---|---|
chain | VCChain | The blockchain on which the contract is deployed. | verifiableCredentialsSDK/presentation/contractMetadata.ts:14 |
getContractMetadata(Retrieves metadata for a given contract.contractAddress
):Promise
<any
>
Parameter | Type | Description |
---|---|---|
contractAddress | string | The address of the contract. |
Promise
<any
>
The metadata object or null
if the contractURI call returns null.
getContractsWithCredentialMetadata(Retrieves metadata for multiple contracts and filters those that are verifiable credentials collections.collections
):Promise
<CredentialsCollection
[]>
Parameter | Type | Description |
---|---|---|
collections | Collection [] | An array of collections containing contract addresses. |
Promise
<CredentialsCollection
[]>
A promise that resolves to an array of collections with valid verifiable credential metadata.