• Preparing search index...
  • The search index is not available
API Documentation
  • API Documentation
  • asset-credentials/src
  • PublicCredentials
  • getIdForCredential

Function getIdForCredential

  • getIdForCredential(credential, attester): HexString
  • Calculates the ID of a IPublicCredentialInput, to be used to retrieve the full credential content from the blockchain.

    The ID is formed by first concatenating the SCALE-encoded IPublicCredentialInput with the SCALE-encoded DID and then Blake2b hashing the result.

    Parameters

    • credential: IPublicCredentialInput

      The input credential object.

    • attester: Did

      The DID of the credential attester.

    Returns HexString

    The credential ID.

    • Defined in packages/asset-credentials/src/credentials/PublicCredential.ts:39

Settings

Member Visibility

Theme

API Documentation
  • asset-credentials/src
    • AssetDids
    • PublicCredentials
      • EncodedPublicCredential
      • PublicCredentialEntry
      • PublicCredentialCreationOptions
      • fetchCredentialFromChain
      • fetchCredentialsFromChain
      • fromChain
      • fromClaim
      • getIdForCredential
      • toChain
      • verifyCredential
  • chain-helpers/src
  • config/src
  • credentials/src
  • did/src
  • jsonld-suites/src
  • legacy-credentials/src
  • sdk-js/src
  • types/src
  • utils/src