NFT
public struct NFT : Codable, Hashable
extension NFT: Identifiable
An indiviual NFT (not the parent token/collection) holding a URI to an asset somewhere on the internet
-
Each NFT of a token has a unique ID
Declaration
Swift
public let tokenId: Decimal -
In order to display in a tablview, the element must be hashable. But in cases where you want to show duplciates (e.g. recents), the computed hash needs to be slightly different This property can be used as a quick hack a copy of the NFT struct slightly different, without affecting the data
Declaration
Swift
public var duplicateID: Int? -
The address of the FA2 contract that created this NFT
Declaration
Swift
public let parentContract: String -
The human readable alias of the parent contract (e.g. “Mooncakes”)
Declaration
Swift
public let parentAlias: String? -
The FaVersion of the token contrac
Declaration
Swift
public let faVersion: FaVersion -
Get the underlying number of decimal places that this token represents
Declaration
Swift
public var decimalPlaces: Int -
Number of duplicate items of this NFT
Declaration
Swift
public let balance: Decimal -
Human readbale name (e.g. “Tezos”)
Declaration
Swift
public let name: String -
Human readbale symbol (e.g. “XTZ”)
Declaration
Swift
public let symbol: String? -
Human readable description (e.g. “This NFT was created too…”)
Declaration
Swift
public let description: String -
A URI to the asset the NFT is controlling ownership of
Declaration
Swift
public let artifactURI: URL? -
A URI used to display media of the artifact
Declaration
Swift
public let displayURI: URL? -
A smaller thumbnail used to display meda of the artifact
Declaration
Swift
public let thumbnailURI: URL? -
Metadata object containing useful information about the nft and its contents
Declaration
Swift
public var metadata: TzKTBalanceMetadata? -
Recording if the user has marked the token as hidden
Declaration
Swift
public var isHidden: Bool -
Recording if the position the index the user chose for the favourite token to appear
Declaration
Swift
public var favouriteSortIndex: Int? -
Declaration
Swift
public var isFavourite: Bool { get } -
The block level where the token was first seen
Declaration
Swift
public var firstlevel: Decimal -
The block level where the token was last seen
Declaration
Swift
public var lastLevel: Decimal -
Create a more developer friednly
NFTfrom a genericTzKTBalanceobjectDeclaration
Swift
public init(fromTzKTBalance tzkt: TzKTBalance)Parameters
fromTzKTBalanceAn instance of
TzKTBalancecontaining data about an NFT -
Confomring to Equatable
Declaration
Swift
public static func == (lhs: NFT, rhs: NFT) -> Bool -
Conforming to
HashableDeclaration
Swift
public func hash(into hasher: inout Hasher) -
Declaration
Swift
public var id: String { get }
Install in Dash