Hello, what is the best way to retrieve NFT owned by a specific address and then retrieve the full metadata for each of them? I’ve been using the REST API to get address resources but I am now stuck. Thanks
I’m also stuck there. What I can do so far:
Get handle to token store:
const tokenStore: {data: any} = await aptosClient.getAccountResource(
address!,
"0x3::token::TokenStore"
);
and then get information about a single token:
const { handle } = tokenStore.data.tokens;
// https://aptos.dev/concepts/coin-and-token/aptos-token#token-data-model
const tokenData = await aptosClient.getTableItem(handle, {
key_type: "0x3::token::TokenId",
value_type: "0x3::token::Token",
key: {
token_data_id: {
creator: creatorHex,
collection: demoCollectionName,
name: demoTokenName,
},
property_version: "0"
},
})
But I didn’t found a native way to get a list of all tokens yet.
Is nobody able to answer this for us? This community is dead already or what?
I only see people asking for airdrop in this forum. And people knowing how to do it are keeping it a secret to make profit.
Maybe we have better luck on monday when they have office hours. Please keep me updated if you learn something new.
Will do, thanks.
I would hope that a new blockchain like this profits from the builders that choose to use it. Support is so bad though that I am seriously considering dropping out and glad that I haven’t spent a lot in here already.
You can check the network requests that the Martian Aptos Wallet sends when you select your NFTs view and then do some sort of “reverse engineering” on it.