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.
49 lines
1.8 KiB
Swift
49 lines
1.8 KiB
Swift
//
|
|
// WalletAccount.swift
|
|
//
|
|
// Generated by openapi-generator
|
|
// https://openapi-generator.tech
|
|
//
|
|
|
|
import Foundation
|
|
|
|
public struct WalletAccount: Sendable, Codable, ParameterConvertible, Hashable {
|
|
|
|
/** CreatedAt is when the account was opened, Unix seconds. Listings order by it, newest first. */
|
|
public var createdAt: Int64?
|
|
/** ID is the account id, minted by the server as \"acct_\" + 24 hex. Wallets name it as their accountId, and it becomes a segment of each of their key refs — so it addresses key material and cannot be reassigned. */
|
|
public var id: String?
|
|
/** Name is the label given at creation, trimmed and required. It groups wallets: it is not a key, holds no balance, and is not unique in the org. */
|
|
public var name: String?
|
|
/** Org is the tenant that owns the account, stamped from the validated principal rather than taken from the request. Every read is physically scoped to it, so another tenant's accounts are not reachable at all. */
|
|
public var org: String?
|
|
|
|
public init(createdAt: Int64? = nil, id: String? = nil, name: String? = nil, org: String? = nil) {
|
|
self.createdAt = createdAt
|
|
self.id = id
|
|
self.name = name
|
|
self.org = org
|
|
}
|
|
|
|
public enum CodingKeys: String, CodingKey, CaseIterable {
|
|
case createdAt
|
|
case id
|
|
case name
|
|
case org
|
|
}
|
|
|
|
// Encodable protocol methods
|
|
|
|
public func encode(to encoder: Encoder) throws {
|
|
var container = encoder.container(keyedBy: CodingKeys.self)
|
|
try container.encodeIfPresent(createdAt, forKey: .createdAt)
|
|
try container.encodeIfPresent(id, forKey: .id)
|
|
try container.encodeIfPresent(name, forKey: .name)
|
|
try container.encodeIfPresent(org, forKey: .org)
|
|
}
|
|
}
|
|
|
|
|
|
@available(iOS 13, tvOS 13, watchOS 6, macOS 10.15, *)
|
|
extension WalletAccount: Identifiable {}
|