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

85 lines
4.5 KiB
Swift

//
// Wallet.swift
//
// Generated by openapi-generator
// https://openapi-generator.tech
//
import Foundation
public struct Wallet: Sendable, Codable, ParameterConvertible, Hashable {
public var accountId: String?
/** Address is the on-chain address. For kms/mpc/treasury it is the EOA a signature from this wallet recovers to; for safe it is the CREATE2 address of the Safe CONTRACT, which holds no key — its approvals recover to the MPC owner instead. Rotating a kms wallet mints a new key and therefore a NEW address, and funds and approvals at the old one do not follow; mpc, treasury and safe addresses are invariant under rotation. */
public var address: String?
public var agent: String?
/** Chain is the EVM chain the wallet is bound to, CAIP-2 \"eip155:<n>\" or a bare decimal chain id. Empty is chain-agnostic: the ring signs an unbound digest, and a Safe falls back to the Hanzo L1 (36963) because a Safe and its EIP-712 domain must be chain-bound. */
public var chain: String?
/** CreatedAt is when the wallet was provisioned, Unix seconds. Listings order by it, newest first. */
public var createdAt: Int64?
/** Custody is the backend holding the signing material, fixed at creation: \"kms\" (a secp256k1 key sealed under KMS and opened in-process), \"mpc\" or \"treasury\" (an m-of-n threshold key on the deployed ring, which differ by governance and not by signing mechanics), or \"safe\" (a Safe contract owned by an MPC key). A kind the deployment has not wired refuses with 503 rather than fabricating a signature. */
public var custody: String?
/** FinanceAccount is the finance ledger account bound to this wallet — the lookup that turns a ledger account back into an on-chain signer. Absent is the normal state and means unbound; the column is NULL until something binds it. */
public var financeAccount: String?
/** ID is the wallet id, minted by the server as \"wal_\" + 24 hex. It is the last segment of the key ref, and it is the LEDGER SUBJECT an x402 payment into this wallet credits — so it names money as well as key material. */
public var id: String?
/** Name is the display label given at creation. It addresses nothing: the key ref is derived from the scope and the id, so renaming moves no material. */
public var name: String?
public var org: String?
public var project: String?
/** Tier is the wallet tier the ring keys its TierPolicy on: hot, warm, cold, gas, bridge, contract_admin, validator, quarantine or disaster_recovery. It defaults to hot and is refused at the boundary if it is none of the nine. */
public var tier: String?
public init(accountId: String? = nil, address: String? = nil, agent: String? = nil, chain: String? = nil, createdAt: Int64? = nil, custody: String? = nil, financeAccount: String? = nil, id: String? = nil, name: String? = nil, org: String? = nil, project: String? = nil, tier: String? = nil) {
self.accountId = accountId
self.address = address
self.agent = agent
self.chain = chain
self.createdAt = createdAt
self.custody = custody
self.financeAccount = financeAccount
self.id = id
self.name = name
self.org = org
self.project = project
self.tier = tier
}
public enum CodingKeys: String, CodingKey, CaseIterable {
case accountId
case address
case agent
case chain
case createdAt
case custody
case financeAccount
case id
case name
case org
case project
case tier
}
// Encodable protocol methods
public func encode(to encoder: Encoder) throws {
var container = encoder.container(keyedBy: CodingKeys.self)
try container.encodeIfPresent(accountId, forKey: .accountId)
try container.encodeIfPresent(address, forKey: .address)
try container.encodeIfPresent(agent, forKey: .agent)
try container.encodeIfPresent(chain, forKey: .chain)
try container.encodeIfPresent(createdAt, forKey: .createdAt)
try container.encodeIfPresent(custody, forKey: .custody)
try container.encodeIfPresent(financeAccount, forKey: .financeAccount)
try container.encodeIfPresent(id, forKey: .id)
try container.encodeIfPresent(name, forKey: .name)
try container.encodeIfPresent(org, forKey: .org)
try container.encodeIfPresent(project, forKey: .project)
try container.encodeIfPresent(tier, forKey: .tier)
}
}
@available(iOS 13, tvOS 13, watchOS 6, macOS 10.15, *)
extension Wallet: Identifiable {}