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

65 lines
2.3 KiB
Swift

//
// Pool.swift
//
// Generated by openapi-generator
// https://openapi-generator.tech
//
import Foundation
public struct Pool: Sendable, Codable, ParameterConvertible, Hashable {
/** At is the pool contract's address, lowercase. */
public var at: String?
public var count: Int64?
/** Fee is the pool's tier in hundredths of a basis point — 3000 is 0.3%. It is the integer the contract stores, unconverted, so nothing here rounds a rate. */
public var fee: Int64?
public var locked: String?
public var token0: Token?
/** Token0Price is token1 per token0, and Token1Price its reciprocal, both as the indexer computed them. Neither is a price ON anything: it is the ratio the pool's reserves stand at. */
public var token0Price: String?
public var token1: Token?
public var token1Price: String?
public var volume: String?
public init(at: String? = nil, count: Int64? = nil, fee: Int64? = nil, locked: String? = nil, token0: Token? = nil, token0Price: String? = nil, token1: Token? = nil, token1Price: String? = nil, volume: String? = nil) {
self.at = at
self.count = count
self.fee = fee
self.locked = locked
self.token0 = token0
self.token0Price = token0Price
self.token1 = token1
self.token1Price = token1Price
self.volume = volume
}
public enum CodingKeys: String, CodingKey, CaseIterable {
case at
case count
case fee
case locked
case token0
case token0Price
case token1
case token1Price
case volume
}
// Encodable protocol methods
public func encode(to encoder: Encoder) throws {
var container = encoder.container(keyedBy: CodingKeys.self)
try container.encodeIfPresent(at, forKey: .at)
try container.encodeIfPresent(count, forKey: .count)
try container.encodeIfPresent(fee, forKey: .fee)
try container.encodeIfPresent(locked, forKey: .locked)
try container.encodeIfPresent(token0, forKey: .token0)
try container.encodeIfPresent(token0Price, forKey: .token0Price)
try container.encodeIfPresent(token1, forKey: .token1)
try container.encodeIfPresent(token1Price, forKey: .token1Price)
try container.encodeIfPresent(volume, forKey: .volume)
}
}