Skip to content

[Bug]: NFT metadata not fully parsed #56

@eddex

Description

@eddex

Contact Details

Discord: eddex#6808

What happened?

Blockfrost dotnet version: 0.0.4

Problem

When I get the Onchain_metadata of an NFT, blockfrost dotnet only returns the Image and the Name. I would like to be able to get the rest of the metadata too.

Details

The endpoint I use is /assets/<addet_id>. This endpoint returns all metadata:

"mint_or_burn_count": 1,
  "onchain_metadata": {
    "name": "NFT name",
    "image": "ipfs://QmRMETbpqSXqWd2bim6EhZ89uLaJsB3SZGW3zNWqNarDd8",
    "custom_prop1": "xyz",
    "custom_prop2": "abc",
    "mediaType": "image/png"
  },

Since C# is a statically typed language, the current solution of having a Onchain_metadata class in the library is not optimal. This calss only contains Image and Name. The rest of the data can't be retrieved.

Solution proposal

Make an overload of the IAssetService.AssetsAsync() method that allows to pass a generic type to the method. This type should be used to parse the Onchain_metadata.

Version

v0.0.1-alpha (default)

In what OS are you experiencing the problem?

Windows, Linux, MacOS, Docker

What version of dotnet are you using?

5.0.x

Relevant log output

No response

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions