computeCompressedNFTHash static method

List<int> computeCompressedNFTHash({
  1. required SolAddress assetId,
  2. required SolAddress owner,
  3. required SolAddress delegate,
  4. required BigInt treeNonce,
  5. required MetaData metaData,
})

Implementation

static List<int> computeCompressedNFTHash(
    {required SolAddress assetId,
    required SolAddress owner,
    required SolAddress delegate,
    required BigInt treeNonce,
    required MetaData metaData}) {
  return QuickCrypto.keccack256Hash([
    0x1,
    ...assetId.toBytes(),
    ...owner.toBytes(),
    ...delegate.toBytes(),
    ...BigintUtils.toBytes(treeNonce, length: 8, order: Endian.little),
    ...computeDataHash(metaData),
    ...computeCreatorHash(metaData.creators)
  ]);
}