Wow, good catch. You can see fingerPrint function here. It's located in cardano-graphql
project.
export const assetFingerprint = (asset: Pick<Asset, 'assetName' | 'policyId'>) =>
new AssetFingerprint(
Buffer.from(asset.policyId, 'hex'),
asset.assetName !== '' ? Buffer.from(asset.assetName, 'hex') : undefined)
.fingerprint()
After running this code
const fingerPrint = ({ policyId, assetName }) => {
const af = new AssetFingerprint(
Buffer.from(policyId, 'hex'),
Buffer.from(assetName, 'hex'),
).fingerprint()
return af
}
const combinations = [
{policyId:'333427e94971f530653bb945f34f914252ad570c0b84dfd8c8e8c97b',
assetName:'457874726148617465303637'},
{policyId: "",
assetName:'457874726148617465303637'},
{policyId: '333427e94971f530653bb945f34f914252ad570c0b84dfd8c8e8c97b',
assetName: ""},
]
combinations.map(fingerPrint)
I got
[
'asset1yjj6l5ude4gf274ya0exk4vymaaj0464yxmnvm',
'asset1q7c0qhulpty4tcdp3cwt8eg5edws9c8lqyldlr',
'asset19nqnahcv54krdv8mcc0ne60wlkealw5qaztzvp'
]
Which means that policyId
is missing in the explorer but the fingerprint function is the same.
You can rerun my code in replit.
I also created an issue for cardano-explorer-app
.