mirror of
https://github.com/hanzoai/swift-sdk.git
synced 2026-10-30 18:20:19 +00:00
The projection these were generated from predated the compute migration, so they described /v1/visor — which the API serves at zero paths now. No /v1/visor path survives here.
86 lines
3.6 KiB
Swift
86 lines
3.6 KiB
Swift
//
|
|
// SlotView.swift
|
|
//
|
|
// Generated by openapi-generator
|
|
// https://openapi-generator.tech
|
|
//
|
|
|
|
import Foundation
|
|
|
|
public struct SlotView: Sendable, Codable, ParameterConvertible, Hashable {
|
|
|
|
/** BLSPubkey is the node's BLS public key, hex. */
|
|
public var blsPubkey: String?
|
|
/** CRName is the LuxNetwork custom resource that materializes the node. */
|
|
public var crName: String?
|
|
/** CreatedAt is when the slot was first claimed, as a Unix timestamp. */
|
|
public var createdAt: Int64?
|
|
/** Namespace is the Kubernetes namespace the node's CR lives in. */
|
|
public var namespace: String?
|
|
/** Network is the luxd network slug the node joins. */
|
|
public var network: String?
|
|
/** NodeID is the luxd node id derived from the sealed staking identity. It is stable across re-claims of the same slot. */
|
|
public var nodeID: String?
|
|
/** NodeStatus is the provisioning state of the node: \"node_created\" once the CR is applied, \"node_pending\" when no cluster is reachable (the slot is still claimed and the keys are still sealed). */
|
|
public var nodeStatus: String?
|
|
/** Registration is the queued owner-gated registration, absent until one exists. */
|
|
public var registration: RegistrationView?
|
|
/** Slot is the validator slot number — the same value as tokenId, under the name the portal reads. */
|
|
public var slot: Int?
|
|
/** TokenID is the GenesisNFT token id that IS this slot. */
|
|
public var tokenId: Int?
|
|
/** UpdatedAt is when the slot last changed, as a Unix timestamp. */
|
|
public var updatedAt: Int64?
|
|
/** Wallet is the lowercase Ethereum address that proved ownership of the NFT. */
|
|
public var wallet: String?
|
|
|
|
public init(blsPubkey: String? = nil, crName: String? = nil, createdAt: Int64? = nil, namespace: String? = nil, network: String? = nil, nodeID: String? = nil, nodeStatus: String? = nil, registration: RegistrationView? = nil, slot: Int? = nil, tokenId: Int? = nil, updatedAt: Int64? = nil, wallet: String? = nil) {
|
|
self.blsPubkey = blsPubkey
|
|
self.crName = crName
|
|
self.createdAt = createdAt
|
|
self.namespace = namespace
|
|
self.network = network
|
|
self.nodeID = nodeID
|
|
self.nodeStatus = nodeStatus
|
|
self.registration = registration
|
|
self.slot = slot
|
|
self.tokenId = tokenId
|
|
self.updatedAt = updatedAt
|
|
self.wallet = wallet
|
|
}
|
|
|
|
public enum CodingKeys: String, CodingKey, CaseIterable {
|
|
case blsPubkey
|
|
case crName
|
|
case createdAt
|
|
case namespace
|
|
case network
|
|
case nodeID
|
|
case nodeStatus
|
|
case registration
|
|
case slot
|
|
case tokenId
|
|
case updatedAt
|
|
case wallet
|
|
}
|
|
|
|
// Encodable protocol methods
|
|
|
|
public func encode(to encoder: Encoder) throws {
|
|
var container = encoder.container(keyedBy: CodingKeys.self)
|
|
try container.encodeIfPresent(blsPubkey, forKey: .blsPubkey)
|
|
try container.encodeIfPresent(crName, forKey: .crName)
|
|
try container.encodeIfPresent(createdAt, forKey: .createdAt)
|
|
try container.encodeIfPresent(namespace, forKey: .namespace)
|
|
try container.encodeIfPresent(network, forKey: .network)
|
|
try container.encodeIfPresent(nodeID, forKey: .nodeID)
|
|
try container.encodeIfPresent(nodeStatus, forKey: .nodeStatus)
|
|
try container.encodeIfPresent(registration, forKey: .registration)
|
|
try container.encodeIfPresent(slot, forKey: .slot)
|
|
try container.encodeIfPresent(tokenId, forKey: .tokenId)
|
|
try container.encodeIfPresent(updatedAt, forKey: .updatedAt)
|
|
try container.encodeIfPresent(wallet, forKey: .wallet)
|
|
}
|
|
}
|
|
|