4

If I have an asset with

policy id: 2697bec9e609932eaaaafb34c8e1ea706549d268166ef60285026b85

asset name: redomgrun

How do I calculate the fingerprint asset107k0vzcplp8rjc3d2y8cew6z2gdhvnqru2uluu?

5

As per CIP14: User-Facing Asset Fingerprint, we calculate it as:

assetFingerprint := encodeBech32
  ( datapart = hash
    ( algorithm = 'blake2b'
    , digest-length = 20
    , message = policyId | assetName
    )
  , humanReadablePart = 'asset'
  )

Or you can just use an existing library, such as cip14-js by Emurgo.

2
  • do you know of any java implementation of it?
    – wutzebaer
    May 29 '21 at 19:57
  • See Satya's answer to the question, he could not reply a comment as his user is too new. May 30 '21 at 7:20
2

A Java implementation will be available in cardano-client-lib next release. (0.2.0)

For now, you can refer to "calculateFingerPrint" method of this class (see here for tests).

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.