Files
zeekay 1df3ddf6bd Regenerate against the document the deployment answers for
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.
2026-09-05 18:55:38 -07:00

51 lines
1.8 KiB
Swift

//
// ChallengeView.swift
//
// Generated by openapi-generator
// https://openapi-generator.tech
//
import Foundation
public struct ChallengeView: Sendable, Codable, ParameterConvertible, Hashable {
/** ExpiresAt is when the nonce stops being redeemable, as a Unix timestamp. */
public var expiresAt: Int64?
/** Message is the EXACT text to personal_sign. It is reconstructed server-side from the validated org, the slot and the nonce at redemption, so signing anything else cannot claim the slot. */
public var message: String?
/** Nonce is the single-use, org-bound challenge value to send back with the signature. */
public var nonce: String?
/** TokenID is the slot the challenge was issued for. */
public var tokenId: Int?
/** TTLSeconds is the challenge lifetime in seconds. */
public var ttlSeconds: Int64?
public init(expiresAt: Int64? = nil, message: String? = nil, nonce: String? = nil, tokenId: Int? = nil, ttlSeconds: Int64? = nil) {
self.expiresAt = expiresAt
self.message = message
self.nonce = nonce
self.tokenId = tokenId
self.ttlSeconds = ttlSeconds
}
public enum CodingKeys: String, CodingKey, CaseIterable {
case expiresAt
case message
case nonce
case tokenId
case ttlSeconds
}
// Encodable protocol methods
public func encode(to encoder: Encoder) throws {
var container = encoder.container(keyedBy: CodingKeys.self)
try container.encodeIfPresent(expiresAt, forKey: .expiresAt)
try container.encodeIfPresent(message, forKey: .message)
try container.encodeIfPresent(nonce, forKey: .nonce)
try container.encodeIfPresent(tokenId, forKey: .tokenId)
try container.encodeIfPresent(ttlSeconds, forKey: .ttlSeconds)
}
}