Skip to content

TokenSwapProgram

bigearsenal edited this page May 17, 2022 · 1 revision

TokenSwapProgram

public enum TokenSwapProgram 

Methods

swapInstruction(tokenSwap:authority:userTransferAuthority:userSource:poolSource:poolDestination:userDestination:poolMint:feeAccount:hostFeeAccount:swapProgramId:tokenProgramId:amountIn:minimumAmountOut:)

public static func swapInstruction(
        tokenSwap: PublicKey,
        authority: PublicKey,
        userTransferAuthority: PublicKey,
        userSource: PublicKey,
        poolSource: PublicKey,
        poolDestination: PublicKey,
        userDestination: PublicKey,
        poolMint: PublicKey,
        feeAccount: PublicKey,
        hostFeeAccount: PublicKey?,
        swapProgramId: PublicKey,
        tokenProgramId: PublicKey,
        amountIn: UInt64,
        minimumAmountOut: UInt64
    ) -> TransactionInstruction 

depositInstruction(tokenSwap:authority:sourceA:sourceB:intoA:intoB:poolToken:poolAccount:tokenProgramId:swapProgramId:poolTokenAmount:maximumTokenA:maximumTokenB:)

public static func depositInstruction(
        tokenSwap: PublicKey,
        authority: PublicKey,
        sourceA: PublicKey,
        sourceB: PublicKey,
        intoA: PublicKey,
        intoB: PublicKey,
        poolToken: PublicKey,
        poolAccount: PublicKey,
        tokenProgramId: PublicKey,
        swapProgramId: PublicKey,
        poolTokenAmount: UInt64,
        maximumTokenA: UInt64,
        maximumTokenB: UInt64
    ) -> TransactionInstruction 

withdrawInstruction(tokenSwap:authority:poolMint:feeAccount:sourcePoolAccount:fromA:fromB:userAccountA:userAccountB:swapProgramId:tokenProgramId:poolTokenAmount:minimumTokenA:minimumTokenB:)

public static func withdrawInstruction(
        tokenSwap: PublicKey,
        authority: PublicKey,
        poolMint: PublicKey,
        feeAccount: PublicKey,
        sourcePoolAccount: PublicKey,
        fromA: PublicKey,
        fromB: PublicKey,
        userAccountA: PublicKey,
        userAccountB: PublicKey,
        swapProgramId: PublicKey,
        tokenProgramId: PublicKey,
        poolTokenAmount: UInt64,
        minimumTokenA: UInt64,
        minimumTokenB: UInt64
    ) -> TransactionInstruction 
Types
Protocols
Global Typealiases
Global Variables
Global Functions
Operators
Extensions
Clone this wiki locally