TokenContract
public struct TokenContract : Codable, Identifiable, Hashable, ChainProviderProtocol
The TokenContract object provides chain information about a token contract from the Proton chain
-
This is used as the primary key for storing the account
Declaration
Swift
public var id: String { get } -
The chainId associated with the TokenBalance
Declaration
Swift
public var chainId: String -
The Name of the contract. You can get the string value via contract.stringValue
Declaration
Swift
public var contract: Name -
The Name of the issuer. You can get the string value via issuer.stringValue
Declaration
Swift
public var issuer: Name -
Indicates whether or not this token is the resource token. ex: SYS
Declaration
Swift
public var resourceToken: Bool -
Indicates whether or not this token is the system token. ex: XPR
Declaration
Swift
public var systemToken: Bool -
The human readable name of the token registered by the token owner
Declaration
Swift
public var name: String -
The human readable description of the token registered by the token owner
Declaration
Swift
public var desc: String -
Icon url of the token registered by the token owner
Declaration
Swift
public var iconUrl: String -
The Asset supply of the token. See EOSIO type Asset for more info
Declaration
Swift
public var supply: Asset -
The Asset max supply of the token. See EOSIO type Asset for more info
Declaration
Swift
public var maxSupply: Asset -
The Symbol of the token. See EOSIO type Asset.Symbol for more info
Declaration
Swift
public var symbol: Asset.Symbol -
The url to the homepage of the token registered by the token owner
Declaration
Swift
public var url: String -
Is the token blacklisted. This is a value set by the blockproducers
Declaration
Swift
public var isBlacklisted: Bool -
When the tokebalance was updated. This will also be updated after tokenContract exchange rate was updated
Declaration
Swift
public var updatedAt: Date -
Exchange rates
Declaration
Swift
public var rates: [String : Double] { get set } -
24 price change percent
Declaration
Swift
public var priceChangePercent: Double? -
ChainProvider associated with the Account
Declaration
Swift
public var chainProvider: ChainProvider? { get } -
Undocumented
Declaration
Swift
public func getRate(forCurrencyCode currencyCode: String = "USD") -> Double -
Currency rate
Declaration
Swift
public func currencyRateFormatted(forLocale locale: Locale = Locale(identifier: "en_US"), maximumFractionDigits: Int = 2) -> String -
Undocumented
Declaration
Swift
public func priceChangePercentFormatted() -> String?
TokenContract Structure Reference