How to retrieve SRR metadata

The following is the method to retrieve the SRR metadata using the Subgraph.

For querying to subgraph, please check this docarrow-up-right.

Open the subgraph

Open the following page in your browser.

Subgraph startrail-polygonarrow-up-right

Query

Paste the following query into the left pane of the screen and press the execute button.

{
  srrs(where: { tokenId: "469529826613"}) {
    tokenId
    metadataDigest
  }
}

The result of execution is here.

Alt text

This metadataDigest is an IPFS CID. Please refer to this page for an explanation of IPFSarrow-up-right. You can request the IPFS CID using an IPFS gateway as follows.

For example. Using Cloudflare's gateway

For example. Storacha Networkarrow-up-right's gateway

You can find more IPFS gateways in herearrow-up-right.

Metadata in IPFSarrow-up-right

Important note

For SRRs issued before 2023, the metadataDigest may contain a string starting with 0x. This can be verified with a tokenId like the one below:

In this case, the metadata is not be uploaded to IPFS. To retrieve the metadata, use the Startrail API endpoint via Get Metadata by Token ID.

Last updated

Was this helpful?