Pool - p2p-org/solana-swift GitHub Wiki
Pool
public struct Pool: Hashable, Codable
Inheritance
Codable
, Hashable
Properties
feeCompensationPoolDefaultSlippage
public static var feeCompensationPoolDefaultSlippage: Double = 0.01
address
public let address: PublicKey
tokenAInfo
public var tokenAInfo: Mint
tokenBInfo
public var tokenBInfo: Mint
poolTokenMint
public let poolTokenMint: Mint
swapData
public var swapData: TokenSwapInfo
tokenABalance
public var tokenABalance: TokenAccountBalance?
tokenBBalance
public var tokenBBalance: TokenAccountBalance?
authority
public var authority: PublicKey?
isValid
public var isValid: Bool
Methods
estimatedAmount(forInputAmount:includeFees:)
public func estimatedAmount(
forInputAmount inputAmount: Lamports,
includeFees: Bool
) -> Lamports?
inputAmount(forEstimatedAmount:includeFees:)
public func inputAmount(
forEstimatedAmount estimatedAmount: Lamports,
includeFees: Bool
) -> Lamports?
inputAmount(forMinimumReceiveAmount:slippage:roundRules:includeFees:replaceZeroWithMinimum:)
public func inputAmount(
forMinimumReceiveAmount minimumReceiveAmount: Lamports,
slippage: Double,
roundRules: FloatingPointRoundingRule? = nil,
includeFees: Bool,
replaceZeroWithMinimum: Bool = false
) -> Lamports?
minimumReceiveAmount(fromInputAmount:slippage:includesFees:)
public func minimumReceiveAmount(
fromInputAmount inputAmount: Lamports,
slippage: Double,
includesFees: Bool
) -> Lamports?
fee(forInputAmount:)
public func fee(forInputAmount inputAmount: Double) -> Double?