TzKTBaker
public struct TzKTBaker : Codable, Hashable
Data representing a baker from TzKT or Baking-Bad
-
Declaration
Swift
public let address: String
-
Declaration
Swift
public let name: String?
-
Declaration
Swift
public let logo: String?
-
Declaration
Swift
public let balance: Decimal
-
Declaration
Swift
public let stakingBalance: Decimal
-
Declaration
Swift
public let stakingCapacity: Decimal
-
Declaration
Swift
public let maxStakingBalance: Decimal
-
Declaration
Swift
public let freeSpace: Decimal
-
Declaration
Swift
public let fee: Double
-
Declaration
Swift
public let minDelegation: Decimal
-
Declaration
Swift
public let payoutDelay: Int
-
Declaration
Swift
public let payoutPeriod: Int
-
Declaration
Swift
public let openForDelegation: Bool
-
Declaration
Swift
public let estimatedRoi: Decimal
-
Declaration
Swift
public let serviceHealth: TzKTBakerHealth
-
Declaration
Swift
public let payoutTiming: TzKTBakerTiming
-
Declaration
Swift
public let payoutAccuracy: TzKTBakerAccuracy
-
Declaration
Swift
public let config: TzKTBakerConfig?
-
Helper to create a TzKTBaker from the data available from the
Account
objectDeclaration
Swift
public init(address: String, name: String?, logo: String?)
-
init(address:
name: logo: balance: stakingBalance: stakingCapacity: maxStakingBalance: freeSpace: fee: minDelegation: payoutDelay: payoutPeriod: openForDelegation: estimatedRoi: serviceHealth: payoutTiming: payoutAccuracy: config: ) Declaration
Swift
public init(address: String, name: String?, logo: String?, balance: Decimal, stakingBalance: Decimal, stakingCapacity: Decimal, maxStakingBalance: Decimal, freeSpace: Decimal, fee: Double, minDelegation: Decimal, payoutDelay: Int, payoutPeriod: Int, openForDelegation: Bool, estimatedRoi: Decimal, serviceHealth: TzKTBakerHealth, payoutTiming: TzKTBakerTiming, payoutAccuracy: TzKTBakerAccuracy, config: TzKTBakerConfig?)
-
Ghostnet has a different setup for bakers, but we need to display and interact with them the same way. So this helper extract what it can from the API and creates semi-real baker objects to help users deal with Ghostnet
Declaration
Swift
public static func fromTestnetArray(_ data: [Any]) -> TzKTBaker?
-
Convert con-chain data into a meaningful, readable object
Declaration
Swift
public func rewardStruct() -> TzKTBakerConfigRewardStruct?
-
Declaration
Swift
public func hash(into hasher: inout Hasher)
-
Declaration
Swift
public static func == (lhs: TzKTBaker, rhs: TzKTBaker) -> Bool