# Functions
No description provided by the author
InstructionIDToName returns the name of the instruction given its ID.
NewCollectFundFeeInstruction declares a new CollectFundFee instruction with the provided parameters and accounts.
NewCollectFundFeeInstructionBuilder creates a new `CollectFundFee` instruction builder.
NewCollectProtocolFeeInstruction declares a new CollectProtocolFee instruction with the provided parameters and accounts.
NewCollectProtocolFeeInstructionBuilder creates a new `CollectProtocolFee` instruction builder.
NewCreateAmmConfigInstruction declares a new CreateAmmConfig instruction with the provided parameters and accounts.
NewCreateAmmConfigInstructionBuilder creates a new `CreateAmmConfig` instruction builder.
NewDepositInstruction declares a new Deposit instruction with the provided parameters and accounts.
NewDepositInstructionBuilder creates a new `Deposit` instruction builder.
NewInitializeInstruction declares a new Initialize instruction with the provided parameters and accounts.
NewInitializeInstructionBuilder creates a new `Initialize` instruction builder.
NewSwapBaseInputInstruction declares a new SwapBaseInput instruction with the provided parameters and accounts.
NewSwapBaseInputInstructionBuilder creates a new `SwapBaseInput` instruction builder.
NewSwapBaseOutputInstruction declares a new SwapBaseOutput instruction with the provided parameters and accounts.
NewSwapBaseOutputInstructionBuilder creates a new `SwapBaseOutput` instruction builder.
NewUpdateAmmConfigInstruction declares a new UpdateAmmConfig instruction with the provided parameters and accounts.
NewUpdateAmmConfigInstructionBuilder creates a new `UpdateAmmConfig` instruction builder.
NewUpdatePoolStatusInstruction declares a new UpdatePoolStatus instruction with the provided parameters and accounts.
NewUpdatePoolStatusInstructionBuilder creates a new `UpdatePoolStatus` instruction builder.
NewWithdrawInstruction declares a new Withdraw instruction with the provided parameters and accounts.
NewWithdrawInstructionBuilder creates a new `Withdraw` instruction builder.
No description provided by the author
# Constants
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
# Variables
No description provided by the author
Collect the fund fee accrued to the pool
# Arguments
* `ctx` - The context of accounts * `amount_0_requested` - The maximum amount of token_0 to send, can be 0 to collect fees in only token_1 * `amount_1_requested` - The maximum amount of token_1 to send, can be 0 to collect fees in only token_0
.
Collect the protocol fee accrued to the pool
# Arguments
* `ctx` - The context of accounts * `amount_0_requested` - The maximum amount of token_0 to send, can be 0 to collect fees in only token_1 * `amount_1_requested` - The maximum amount of token_1 to send, can be 0 to collect fees in only token_0
.
# Arguments
* `ctx`- The accounts needed by instruction.
Creates a pool for the given token pair and the initial price
# Arguments
* `ctx`- The context of accounts * `lp_token_amount` - Pool token amount to transfer.
Creates a pool for the given token pair and the initial price
# Arguments
* `ctx`- The context of accounts * `init_amount_0` - the initial amount_0 to deposit * `init_amount_1` - the initial amount_1 to deposit * `open_time` - the timestamp allowed for swap
.
Swap the tokens in the pool base input amount
# Arguments
* `ctx`- The context of accounts * `amount_in` - input amount to transfer, output to DESTINATION is based on the exchange rate * `minimum_amount_out` - Minimum amount of output token, prevents excessive slippage
.
Swap the tokens in the pool base output amount
# Arguments
* `ctx`- The context of accounts * `max_amount_in` - input amount prevents excessive slippage * `amount_out` - amount of output token
.
Updates the owner of the amm config Must be called by the current owner or admin
# Arguments
* `ctx`- The context of accounts * `trade_fee_rate`- The new trade fee rate of amm config, be set when `param` is 0 * `protocol_fee_rate`- The new protocol fee rate of amm config, be set when `param` is 1 * `fund_fee_rate`- The new fund fee rate of amm config, be set when `param` is 2 * `new_owner`- The config's new owner, be set when `param` is 3 * `new_fund_owner`- The config's new fund owner, be set when `param` is 4 * `param`- The vaule can be 0 | 1 | 2 | 3 | 4, otherwise will report a error
.
Update pool status for given vaule
# Arguments
* `ctx`- The context of accounts * `status` - The vaule of status
.
Withdraw lp for token0 ande token1
# Arguments
* `ctx`- The context of accounts * `lp_token_amount` - Amount of pool tokens to burn.
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
# Structs
No description provided by the author
Collect the fund fee accrued to the pool
# Arguments
* `ctx` - The context of accounts * `amount_0_requested` - The maximum amount of token_0 to send, can be 0 to collect fees in only token_1 * `amount_1_requested` - The maximum amount of token_1 to send, can be 0 to collect fees in only token_0
.
Collect the protocol fee accrued to the pool
# Arguments
* `ctx` - The context of accounts * `amount_0_requested` - The maximum amount of token_0 to send, can be 0 to collect fees in only token_1 * `amount_1_requested` - The maximum amount of token_1 to send, can be 0 to collect fees in only token_0
.
# Arguments
* `ctx`- The accounts needed by instruction.
Creates a pool for the given token pair and the initial price
# Arguments
* `ctx`- The context of accounts * `lp_token_amount` - Pool token amount to transfer.
Creates a pool for the given token pair and the initial price
# Arguments
* `ctx`- The context of accounts * `init_amount_0` - the initial amount_0 to deposit * `init_amount_1` - the initial amount_1 to deposit * `open_time` - the timestamp allowed for swap
.
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
Swap the tokens in the pool base input amount
# Arguments
* `ctx`- The context of accounts * `amount_in` - input amount to transfer, output to DESTINATION is based on the exchange rate * `minimum_amount_out` - Minimum amount of output token, prevents excessive slippage
.
Swap the tokens in the pool base output amount
# Arguments
* `ctx`- The context of accounts * `max_amount_in` - input amount prevents excessive slippage * `amount_out` - amount of output token
.
Updates the owner of the amm config Must be called by the current owner or admin
# Arguments
* `ctx`- The context of accounts * `trade_fee_rate`- The new trade fee rate of amm config, be set when `param` is 0 * `protocol_fee_rate`- The new protocol fee rate of amm config, be set when `param` is 1 * `fund_fee_rate`- The new fund fee rate of amm config, be set when `param` is 2 * `new_owner`- The config's new owner, be set when `param` is 3 * `new_fund_owner`- The config's new fund owner, be set when `param` is 4 * `param`- The vaule can be 0 | 1 | 2 | 3 | 4, otherwise will report a error
.
Update pool status for given vaule
# Arguments
* `ctx`- The context of accounts * `status` - The vaule of status
.
Withdraw lp for token0 ande token1
# Arguments
* `ctx`- The context of accounts * `lp_token_amount` - Amount of pool tokens to burn.
# Type aliases
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author