SwapV2Params: SwapInput & {
    oracle: PublicKey;
    tokenAuthority: PublicKey;
    tokenMintA: PublicKey;
    tokenMintB: PublicKey;
    tokenOwnerAccountA: PublicKey;
    tokenOwnerAccountB: PublicKey;
    tokenProgramA: PublicKey;
    tokenProgramB: PublicKey;
    tokenTransferHookAccountsA?: AccountMeta[];
    tokenTransferHookAccountsB?: AccountMeta[];
    tokenVaultA: PublicKey;
    tokenVaultB: PublicKey;
    whirlpool: PublicKey;
}

Raw parameters and accounts to swap on a Whirlpool

Type declaration

  • oracle: PublicKey
  • tokenAuthority: PublicKey
  • tokenMintA: PublicKey
  • tokenMintB: PublicKey
  • tokenOwnerAccountA: PublicKey
  • tokenOwnerAccountB: PublicKey
  • tokenProgramA: PublicKey
  • tokenProgramB: PublicKey
  • Optional tokenTransferHookAccountsA?: AccountMeta[]
  • Optional tokenTransferHookAccountsB?: AccountMeta[]
  • tokenVaultA: PublicKey
  • tokenVaultB: PublicKey
  • whirlpool: PublicKey

Param: swapInput

Parameters in SwapInput

Param: whirlpool

PublicKey for the whirlpool that the swap will occur on

Param: tokenMintA

PublicKey for the token A mint.

Param: tokenMintB

PublicKey for the token B mint.

Param: tokenOwnerAccountA

PublicKey for the associated token account for tokenA in the collection wallet

Param: tokenOwnerAccountB

PublicKey for the associated token account for tokenB in the collection wallet

Param: tokenVaultA

PublicKey for the tokenA vault for this whirlpool.

Param: tokenVaultB

PublicKey for the tokenB vault for this whirlpool.

Param: tokenTransferHookAccountsA

Optional array of token transfer hook accounts for token A.

Param: tokenTransferHookAccountsB

Optional array of token transfer hook accounts for token B.

Param: tokenProgramA

PublicKey for the token program for token A.

Param: tokenProgramB

PublicKey for the token program for token B.

Param: oracle

PublicKey for the oracle account for this Whirlpool.

Param: tokenAuthority

authority to withdraw tokens from the input token account

Generated using TypeDoc