Resource NFT
_14resource NFT {_14_14 id: UInt64_14_14 name: String_14_14 description: String_14_14 thumbnail: String_14_14 royalties: [MetadataViews.Royalty]_14_14 metadata: {String: AnyStruct}_14}
The core resource that represents a Non Fungible Token. New instances will be created using the NFTMinter resource and stored in the Collection resource
Implemented Interfaces:
NonFungibleToken.INFT
MetadataViews.Resolver
Initializer​
_10func init(id UInt64, name String, description String, thumbnail String, royalties [MetadataViews.Royalty], metadata {String: AnyStruct})
Functions​
fun getViews()
​
_10func getViews(): [Type]
Function that returns all the Metadata Views implemented by a Non Fungible Token
developers to know which parameter to pass to the resolveView() method.
Returns: An array of Types defining the implemented views. This value will be used by
fun resolveView()
​
_10func resolveView(_ Type): AnyStruct?
Function that resolves a metadata view for this token.
Parameters:
- view : The Type of the desired view.
Returns: A structure representing the requested view.