Question for anyone at Toniq Labs

I’m creating a wallet that is meant to be packaged as an NFT and sold to users. The very first principal to log into the wallet will be assigned as the canister controller for both the front end canister and the backend canister of the wallet. I need a way to verify that the first principal logging into the wallet is indeed the owner of the NFT. To do that, I’d need the NFT token metadata (specifically, the owner).

My question is: how do i access token metadata for tokens minted via entrepot? Thank you.

I believe you can use bearer(token : TokenIdentifier)

That will return the AccountIdentifier of the owner if the token exists.

I believe Toniq is still working on their metadata approach so I don’t know much about that.

cc: @bob11

1 Like

whats the canister id for the canister where this method lives?

Each NFT canister deployed on Entrepot should have this method.

For example, here is the Candid UI for our PetBots canister

https://a4gq6-oaaaa-aaaab-qaa4q-cai.raw.ic0.app/?id=t2mog-myaaa-aaaal-aas7q-cai

Hey Jesse, feel free to DM me on Twitter @BobBodily and I can walk you through checking NFT ownership. Not too hard. For posterity, here is general approach right now.

  1. Have user login with wallet. This means they have signed that they own a particular principal.
  2. Grab subaccount 0 from the principal to get the main wallet address
  3. Use the tokens_ext (method name for EXT V1) method on that wallet address to get the owned tokens. This will return the tokens they own, and you know they own it because they signed to login with their wallet.
2 Likes

Thanks a bunch @bob11. Where can i find the canister id where the tokens_ext() method exists?

Also, what’s the best way to establish a line of communication with the team regarding releasing an NFT collection?

Edit: i had to think about it a bit more. Let me know if I’m understanding correctly. Here goes:

When i create the NFT collection, a canister will be created corresponding to that collection. That canister will feature a tokens_ext Function which I’ll use to get a list of the tokens owned by the account identifier that i input into the tokens_ext function as an argument. Then with that list, i can check to confirm that the user is the rightful owners of the NFT.

1 Like