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.
51 lines
1.5 KiB
Swift
51 lines
1.5 KiB
Swift
//
|
|
// ChainStatus.swift
|
|
//
|
|
// Generated by openapi-generator
|
|
// https://openapi-generator.tech
|
|
//
|
|
|
|
import Foundation
|
|
|
|
public struct ChainStatus: Sendable, Codable, ParameterConvertible, Hashable {
|
|
|
|
public var chainId: Int64?
|
|
/** Height is the latest block, omitted when the chain did not answer rather than reported as zero — a zero height is a real value on a fresh chain. */
|
|
public var height: Int64?
|
|
public var id: String?
|
|
/** Live is whether the upstream answered eth_blockNumber. */
|
|
public var live: Bool?
|
|
public var name: String?
|
|
|
|
public init(chainId: Int64? = nil, height: Int64? = nil, id: String? = nil, live: Bool? = nil, name: String? = nil) {
|
|
self.chainId = chainId
|
|
self.height = height
|
|
self.id = id
|
|
self.live = live
|
|
self.name = name
|
|
}
|
|
|
|
public enum CodingKeys: String, CodingKey, CaseIterable {
|
|
case chainId
|
|
case height
|
|
case id
|
|
case live
|
|
case name
|
|
}
|
|
|
|
// Encodable protocol methods
|
|
|
|
public func encode(to encoder: Encoder) throws {
|
|
var container = encoder.container(keyedBy: CodingKeys.self)
|
|
try container.encodeIfPresent(chainId, forKey: .chainId)
|
|
try container.encodeIfPresent(height, forKey: .height)
|
|
try container.encodeIfPresent(id, forKey: .id)
|
|
try container.encodeIfPresent(live, forKey: .live)
|
|
try container.encodeIfPresent(name, forKey: .name)
|
|
}
|
|
}
|
|
|
|
|
|
@available(iOS 13, tvOS 13, watchOS 6, macOS 10.15, *)
|
|
extension ChainStatus: Identifiable {}
|