How to getAllNFTs (for TopShot)?

I am learning about flow blockchain and in particular cadence (which I find very appealing) since a couple of days now. My first playground is the TopShot contract (and the imported NonFungibleToken.cdc).
My goal is to fetch all TopShot NFTs (eventually in Go, using flow-go-sdk).
My simple idea was to get totalSupply in the TopShot contract and then iterate through all IDs. However, I cannot seem to find any function that can be called on a UInt64 ID returning information on the associated NFT from TopShot. Did I overlook something or is that a misconception on my part, coming from solidity?

Yes, this is something that isn’t possible in Flow unless the smart contract developer explicitly builds it into the smart contract. Because the resources live in the accounts of the users who own them, you can’t query all of them unless you know every single address. Does that make sense?

Thanks for the reply! That’s bad news, but good to know. :slight_smile:
In fact, I think I found a workaround in the case of Topshot today. You can go through the blocks and look for MomentMinted events. These emit id, setID, playID and serialNumber. If I get this correctly, the pair (id, Topshot contract address) is a unique identifier for an individual Topshot NFT on the blockchain. The setID and playID on the other hand allow you to assign the corresponding metadata to the underlying NFT.