# Heaven decoder (Carbon 2.0)

> Decode Heaven instructions, accounts and events in Rust with carbon-heaven-decoder 2.0.0. Program ID HEAVENoP2qxoeuF8Dj2oT1GHEnu49U5mJYkdeC8BAX2o.

`carbon-heaven-decoder` decodes the instructions, accounts and events of the Heaven program (`HEAVENoP2qxoeuF8Dj2oT1GHEnu49U5mJYkdeC8BAX2o`): 54 instructions, 6 account types, 7 events. It is generated with Codama from the program's IDL; see [decoders](https://carbon.sevenlabs.org/concepts/decoders.md) for how decoders plug into a pipeline.

|                  |                                                                                                       |
| ---------------- | ----------------------------------------------------------------------------------------------------- |
| Crate            | [`carbon-heaven-decoder`](https://crates.io/crates/carbon-heaven-decoder/2.0.0) 2.0.0                 |
| Install          | `cargo add carbon-heaven-decoder@2.0.0`                                                               |
| Program ID       | `HEAVENoP2qxoeuF8Dj2oT1GHEnu49U5mJYkdeC8BAX2o` (`carbon_heaven_decoder::PROGRAM_ID`)                  |
| Category         | [DEX & AMM](https://carbon.sevenlabs.org/decoders/dex-and-amm.md)                                     |
| Decoder          | `carbon_heaven_decoder::HeavenDecoder`                                                                |
| Instruction enum | `instructions::HeavenInstruction`                                                                     |
| Account enum     | `accounts::HeavenAccount`                                                                             |
| Event enum       | `instructions::CpiEvent`                                                                              |
| Features         | `serde`, `postgres`, `graphql` (none enabled by default)                                              |
| API docs         | [docs.rs/carbon-heaven-decoder/2.0.0](https://docs.rs/carbon-heaven-decoder/2.0.0)                    |
| Source           | [decoders/heaven-decoder](https://github.com/sevenlabs-hq/carbon/tree/v2.0.0/decoders/heaven-decoder) |

Other DEX and AMM decoders: [BonkSwap](https://carbon.sevenlabs.org/decoders/bonkswap.md), [FluxBeam](https://carbon.sevenlabs.org/decoders/fluxbeam.md), [Gavel](https://carbon.sevenlabs.org/decoders/gavel.md), [Jupiter Limit Order](https://carbon.sevenlabs.org/decoders/jupiter-limit-order.md), [Jupiter Limit Order v2](https://carbon.sevenlabs.org/decoders/jupiter-limit-order-2.md), [Kamino Limit Order](https://carbon.sevenlabs.org/decoders/kamino-limit-order.md), [Lifinity AMM v2](https://carbon.sevenlabs.org/decoders/lifinity-amm-v2.md), [Meteora DAMM v2](https://carbon.sevenlabs.org/decoders/meteora-damm-v2.md), [Meteora DLMM](https://carbon.sevenlabs.org/decoders/meteora-dlmm.md), [Meteora Pools](https://carbon.sevenlabs.org/decoders/meteora-pools.md), [OpenBook v2](https://carbon.sevenlabs.org/decoders/openbook-v2.md), [Orca Whirlpools](https://carbon.sevenlabs.org/decoders/orca-whirlpool.md), [PancakeSwap](https://carbon.sevenlabs.org/decoders/pancake-swap.md), [Phoenix v1](https://carbon.sevenlabs.org/decoders/phoenix-v1.md), [PumpSwap](https://carbon.sevenlabs.org/decoders/pump-swap.md), [Raydium AMM v4](https://carbon.sevenlabs.org/decoders/raydium-amm-v4.md), [Raydium CLMM](https://carbon.sevenlabs.org/decoders/raydium-clmm.md), [Raydium CPMM](https://carbon.sevenlabs.org/decoders/raydium-cpmm.md), [Raydium Stable Swap](https://carbon.sevenlabs.org/decoders/raydium-stable-swap.md), [Stabble Stable Swap](https://carbon.sevenlabs.org/decoders/stabble-stable-swap.md), [Stabble Weighted Swap](https://carbon.sevenlabs.org/decoders/stabble-weighted-swap.md). To decode several in one pipeline, see [dEX and AMM decoders](https://carbon.sevenlabs.org/decoders/dex-and-amm.md).

The `serde` feature derives `Serialize`/`Deserialize` on every type, `postgres` adds tables and processors for [Postgres](https://carbon.sevenlabs.org/guides/postgres.md), and `graphql` adds a schema for the [GraphQL server](https://carbon.sevenlabs.org/guides/graphql.md).

## Usage

This program crawls recent Heaven transactions from the public RPC and prints every decoded `Buy` instruction. Add the dependencies:

```sh
cargo add carbon-core@2.0.0 carbon-heaven-decoder@2.0.0 carbon-rpc-transaction-crawler-datasource@2.0.0 carbon-log-metrics@2.0.0 env_logger tokio --features tokio/full
```

`src/main.rs`:

```rust
use {
    carbon_core::{
        error::CarbonResult, instruction::InstructionProcessorInputType, pipeline::Pipeline,
        processor::Processor,
    },
    carbon_log_metrics::LogMetrics,
    carbon_heaven_decoder::{instructions::HeavenInstruction, HeavenDecoder, PROGRAM_ID},
    carbon_rpc_transaction_crawler_datasource::{ConnectionConfig, Filters, RpcTransactionCrawler},
    std::sync::Arc,
};

#[tokio::main]
async fn main() -> CarbonResult<()> {
    env_logger::init();

    // Fetches the program's recent transactions over JSON-RPC, newest first.
    let datasource = RpcTransactionCrawler::new(
        "https://api.mainnet-beta.solana.com".to_string(),
        PROGRAM_ID,
        ConnectionConfig::default(),
        Filters::new(None, None, None),
        None,
    );

    Pipeline::builder()
        .datasource(datasource)
        .metrics(Arc::new(LogMetrics::new()))
        .instruction(HeavenDecoder, InstructionLogger)
        .build()?
        .run()
        .await
}

struct InstructionLogger;

impl Processor<InstructionProcessorInputType<'_, HeavenInstruction>> for InstructionLogger {
    async fn process(
        &mut self,
        input: &InstructionProcessorInputType<'_, HeavenInstruction>,
    ) -> CarbonResult<()> {
        let signature = input.metadata.transaction_metadata.signature;
        if let HeavenInstruction::Buy { data, accounts, .. } = input.decoded_instruction {
            println!("buy {signature}: {data:?} token_a_program={}", accounts.token_a_program);
        }
        Ok(())
    }
}
```

```sh
RUST_LOG=info cargo run
```

Each `Buy` instruction prints one line with the transaction signature and the decoded `Buy` data. The public endpoint rate-limits requests, so the first lines can take a while; use your own RPC URL for anything beyond a test. See [stream with RPC](https://carbon.sevenlabs.org/guides/stream-with-rpc.md) for the crawler options.

Events published with Anchor's `emit_cpi!` arrive as the `CpiEvent` instruction. Match them with `HeavenInstruction::CpiEvent { data: CpiEvent::CreateLiquidityPoolEvent(event), .. }` (import `instructions::CpiEvent`); see [Events](#events). If `CpiEvent` never arrives, the program logs its events with `emit!` instead: decode them with [`decode_log_events`](https://carbon.sevenlabs.org/concepts/instructions.md#log-events).

### Decode accounts

The transaction crawler emits transactions only. To decode accounts, use a datasource that emits account updates. This program subscribes to the program's accounts with `programSubscribe` on the public WebSocket endpoint and prints every decoded `LiquidityPoolState` account as it changes. Add the datasource and the Solana RPC types it takes:

```sh
cargo add carbon-rpc-program-subscribe-datasource@2.0.0 solana-client@4.2.2
```

`src/main.rs`:

```rust
use {
    carbon_core::{
        account::AccountProcessorInputType, error::CarbonResult, pipeline::Pipeline,
        processor::Processor,
    },
    carbon_log_metrics::LogMetrics,
    carbon_heaven_decoder::{accounts::HeavenAccount, HeavenDecoder, PROGRAM_ID},
    carbon_rpc_program_subscribe_datasource::{Filters, RpcProgramSubscribe},
    solana_client::rpc_config::{RpcAccountInfoConfig, RpcProgramAccountsConfig, UiAccountEncoding},
    std::sync::Arc,
};

#[tokio::main]
async fn main() -> CarbonResult<()> {
    env_logger::init();

    // Streams every change to an account owned by the program (programSubscribe).
    let config = RpcProgramAccountsConfig {
        account_config: RpcAccountInfoConfig {
            encoding: Some(UiAccountEncoding::Base64),
            ..Default::default()
        },
        ..Default::default()
    };
    let datasource = RpcProgramSubscribe::new(
        "wss://api.mainnet-beta.solana.com".to_string(),
        Filters::new(PROGRAM_ID, Some(config)),
    );

    Pipeline::builder()
        .datasource(datasource)
        .metrics(Arc::new(LogMetrics::new()))
        .account(HeavenDecoder, AccountLogger)
        .build()?
        .run()
        .await
}

struct AccountLogger;

impl Processor<AccountProcessorInputType<'_, HeavenAccount>> for AccountLogger {
    async fn process(
        &mut self,
        input: &AccountProcessorInputType<'_, HeavenAccount>,
    ) -> CarbonResult<()> {
        if let HeavenAccount::LiquidityPoolState(liquidity_pool_state) = &input.decoded_account.data {
            println!("liquidity_pool_state {}: {liquidity_pool_state:?}", input.metadata.pubkey);
        }
        Ok(())
    }
}
```

```sh
RUST_LOG=info cargo run
```

Each update to a `LiquidityPoolState` account prints its address and decoded fields; the program runs until you stop it. Cargo resolves `solana-client` to 4.2.2, the exact version the datasource pins, so both use the same `RpcProgramAccountsConfig` type. To load every existing account once instead of streaming changes, see [load account state](https://carbon.sevenlabs.org/guides/load-account-state.md).

## Instructions

Variants of `HeavenInstruction`. Each is `HeavenInstruction::<Variant> { program_id, data, accounts }`, where `data` and `accounts` are the types listed under the variant, exported from `carbon_heaven_decoder::instructions`. Discriminators are the leading bytes of the instruction data, in hex.

**How an instruction decodes.** The decoder returns a variant only when all of these hold; otherwise the instruction is skipped and no processor is called:

1. The instruction's program ID is `HEAVENoP2qxoeuF8Dj2oT1GHEnu49U5mJYkdeC8BAX2o`.
2. The data starts with the variant's discriminator, and the rest deserializes into its data type.
3. The instruction has at least as many accounts as the variant requires (the "Required accounts" count under each variant).

**Accounts.** They are matched by position, in the order listed. An account marked _optional_ is `None` only when the instruction ends before it; Anchor programs pass the program ID as a placeholder for an omitted optional account, so check for `Some(PROGRAM_ID)` too. Accounts after the listed ones are in `accounts.remaining` as `AccountMeta`s. The decoder doesn't record whether an account signed or was writable: read that from `input.raw_instruction.accounts[i].is_signer` and `.is_writable`, which follow the same order. It doesn't check signer, writable, owner or PDA constraints either; the program enforced those when the transaction executed, so a decoded instruction from a successful transaction already satisfied them.

### `AddLiquidityProPool`

Discriminator `7d3b6c2a121c2207` · data `AddLiquidityProPool` · accounts `AddLiquidityProPoolInstructionAccounts`.

| Field    | Type                                        |
| -------- | ------------------------------------------- |
| `params` | [`AddLiquidityParams`](#addliquidityparams) |

Required accounts: 15; extras go to `remaining`.

Fields of `AddLiquidityProPoolInstructionAccounts`, in account order:

| #   | Field                      | Type               |
| --- | -------------------------- | ------------------ |
| 0   | `token_a_program`          | `Pubkey`           |
| 1   | `token_b_program`          | `Pubkey`           |
| 2   | `associated_token_program` | `Pubkey`           |
| 3   | `system_program`           | `Pubkey`           |
| 4   | `liquidity_pool_state`     | `Pubkey`           |
| 5   | `user`                     | `Pubkey`           |
| 6   | `payer`                    | `Pubkey`           |
| 7   | `token_a_mint`             | `Pubkey`           |
| 8   | `token_b_mint`             | `Pubkey`           |
| 9   | `user_token_a_vault`       | `Pubkey`           |
| 10  | `user_token_b_vault`       | `Pubkey`           |
| 11  | `token_a_vault`            | `Pubkey`           |
| 12  | `token_b_vault`            | `Pubkey`           |
| 13  | `protocol_config`          | `Pubkey`           |
| 14  | `user_lp_position`         | `Pubkey`           |
| 15… | `remaining`                | `Vec<AccountMeta>` |

### `AdminBorrowSol`

Discriminator `cc485fd7acc089fc` · data `AdminBorrowSol` · accounts `AdminBorrowSolInstructionAccounts`.

| Field     | Type  |
| --------- | ----- |
| `version` | `u16` |
| `amount`  | `u64` |

Required accounts: 10; extras go to `remaining`.

Fields of `AdminBorrowSolInstructionAccounts`, in account order:

| #   | Field                             | Type               |
| --- | --------------------------------- | ------------------ |
| 0   | `token_program`                   | `Pubkey`           |
| 1   | `associated_token_program`        | `Pubkey`           |
| 2   | `payer`                           | `Pubkey`           |
| 3   | `admin`                           | `Pubkey`           |
| 4   | `protocol_config_state`           | `Pubkey`           |
| 5   | `system_program`                  | `Pubkey`           |
| 6   | `protocol_staking_admin_state`    | `Pubkey`           |
| 7   | `address_lookup_program`          | `Pubkey`           |
| 8   | `instruction_sysvar_account_info` | `Pubkey`           |
| 9   | `temp_sol_holder`                 | `Pubkey`           |
| 10… | `remaining`                       | `Vec<AccountMeta>` |

### `AdminClaimMsol`

Discriminator `7c303cc7cb312429` · data `AdminClaimMsol` · accounts `AdminClaimMsolInstructionAccounts`.

| Field           | Type  |
| --------------- | ----- |
| `version`       | `u16` |
| `ticket_number` | `u32` |

Required accounts: 10; extras go to `remaining`.

Fields of `AdminClaimMsolInstructionAccounts`, in account order:

| #   | Field                          | Type               |
| --- | ------------------------------ | ------------------ |
| 0   | `token_program`                | `Pubkey`           |
| 1   | `associated_token_program`     | `Pubkey`           |
| 2   | `payer`                        | `Pubkey`           |
| 3   | `admin`                        | `Pubkey`           |
| 4   | `protocol_config_state`        | `Pubkey`           |
| 5   | `system_program`               | `Pubkey`           |
| 6   | `protocol_staking_admin_state` | `Pubkey`           |
| 7   | `msol_ticket`                  | `Pubkey`           |
| 8   | `msol_mint`                    | `Pubkey`           |
| 9   | `msol_ticket_sol_spent`        | `Pubkey`           |
| 10… | `remaining`                    | `Vec<AccountMeta>` |

### `AdminClaimProCreatorTradingFees`

Discriminator `4482fa483c5e1f16` · data `AdminClaimProCreatorTradingFees` · accounts `AdminClaimProCreatorTradingFeesInstructionAccounts`.

| Field    | Type  |
| -------- | ----- |
| `amount` | `u64` |

Required accounts: 16; extras go to `remaining`.

Fields of `AdminClaimProCreatorTradingFeesInstructionAccounts`, in account order:

| #   | Field                             | Type               |
| --- | --------------------------------- | ------------------ |
| 0   | `token_a_program`                 | `Pubkey`           |
| 1   | `token_b_program`                 | `Pubkey`           |
| 2   | `associated_token_program`        | `Pubkey`           |
| 3   | `system_program`                  | `Pubkey`           |
| 4   | `liquidity_pool_state`            | `Pubkey`           |
| 5   | `user`                            | `Pubkey`           |
| 6   | `token_a_mint`                    | `Pubkey`           |
| 7   | `token_b_mint`                    | `Pubkey`           |
| 8   | `user_token_a_vault`              | `Pubkey`           |
| 9   | `user_token_b_vault`              | `Pubkey`           |
| 10  | `token_a_vault`                   | `Pubkey`           |
| 11  | `token_b_vault`                   | `Pubkey`           |
| 12  | `protocol_config`                 | `Pubkey`           |
| 13  | `instruction_sysvar_account_info` | `Pubkey`           |
| 14  | `protocol_admin`                  | `Pubkey`           |
| 15  | `protocol_admin_state`            | `Pubkey`           |
| 16… | `remaining`                       | `Vec<AccountMeta>` |

### `AdminClaimStakingRewards`

Discriminator `18a3dcabe1dea6f8` · data `AdminClaimStakingRewards` · accounts `AdminClaimStakingRewardsInstructionAccounts`.

| Field     | Type  |
| --------- | ----- |
| `version` | `u16` |
| `amount`  | `u64` |

Required accounts: 10; extras go to `remaining`.

Fields of `AdminClaimStakingRewardsInstructionAccounts`, in account order:

| #   | Field                          | Type               |
| --- | ------------------------------ | ------------------ |
| 0   | `token_program`                | `Pubkey`           |
| 1   | `associated_token_program`     | `Pubkey`           |
| 2   | `payer`                        | `Pubkey`           |
| 3   | `admin`                        | `Pubkey`           |
| 4   | `protocol_config_state`        | `Pubkey`           |
| 5   | `protocol_config_wsol_vault`   | `Pubkey`           |
| 6   | `system_program`               | `Pubkey`           |
| 7   | `protocol_staking_admin_state` | `Pubkey`           |
| 8   | `wsol_token_vault`             | `Pubkey`           |
| 9   | `wsol_mint`                    | `Pubkey`           |
| 10… | `remaining`                    | `Vec<AccountMeta>` |

### `AdminClaimStandardCreatorTradingFees`

Discriminator `b627a819603f4c11` · data `AdminClaimStandardCreatorTradingFees` · accounts `AdminClaimStandardCreatorTradingFeesInstructionAccounts`.

| Field    | Type  |
| -------- | ----- |
| `amount` | `u64` |

Required accounts: 16; extras go to `remaining`.

Fields of `AdminClaimStandardCreatorTradingFeesInstructionAccounts`, in account order:

| #   | Field                             | Type               |
| --- | --------------------------------- | ------------------ |
| 0   | `token_a_program`                 | `Pubkey`           |
| 1   | `token_b_program`                 | `Pubkey`           |
| 2   | `associated_token_program`        | `Pubkey`           |
| 3   | `system_program`                  | `Pubkey`           |
| 4   | `liquidity_pool_state`            | `Pubkey`           |
| 5   | `user`                            | `Pubkey`           |
| 6   | `token_a_mint`                    | `Pubkey`           |
| 7   | `token_b_mint`                    | `Pubkey`           |
| 8   | `user_token_a_vault`              | `Pubkey`           |
| 9   | `user_token_b_vault`              | `Pubkey`           |
| 10  | `token_a_vault`                   | `Pubkey`           |
| 11  | `token_b_vault`                   | `Pubkey`           |
| 12  | `protocol_config`                 | `Pubkey`           |
| 13  | `instruction_sysvar_account_info` | `Pubkey`           |
| 14  | `protocol_admin`                  | `Pubkey`           |
| 15  | `protocol_admin_state`            | `Pubkey`           |
| 16… | `remaining`                       | `Vec<AccountMeta>` |

### `AdminDepositMsol`

Discriminator `cebdd0a61351ca30` · data `AdminDepositMsol` · accounts `AdminDepositMsolInstructionAccounts`.

| Field     | Type  |
| --------- | ----- |
| `version` | `u16` |
| `amount`  | `u64` |

Required accounts: 10; extras go to `remaining`.

Fields of `AdminDepositMsolInstructionAccounts`, in account order:

| #   | Field                             | Type               |
| --- | --------------------------------- | ------------------ |
| 0   | `token_program`                   | `Pubkey`           |
| 1   | `associated_token_program`        | `Pubkey`           |
| 2   | `payer`                           | `Pubkey`           |
| 3   | `admin`                           | `Pubkey`           |
| 4   | `protocol_config_state`           | `Pubkey`           |
| 5   | `system_program`                  | `Pubkey`           |
| 6   | `protocol_staking_admin_state`    | `Pubkey`           |
| 7   | `address_lookup_program`          | `Pubkey`           |
| 8   | `instruction_sysvar_account_info` | `Pubkey`           |
| 9   | `temp_sol_holder`                 | `Pubkey`           |
| 10… | `remaining`                       | `Vec<AccountMeta>` |

### `AdminMintMsol`

Discriminator `8cca39c361d5a813` · data `AdminMintMsol` · accounts `AdminMintMsolInstructionAccounts`.

| Field     | Type  |
| --------- | ----- |
| `version` | `u16` |
| `amount`  | `u64` |

Required accounts: 10; extras go to `remaining`.

Fields of `AdminMintMsolInstructionAccounts`, in account order:

| #   | Field                             | Type               |
| --- | --------------------------------- | ------------------ |
| 0   | `token_program`                   | `Pubkey`           |
| 1   | `associated_token_program`        | `Pubkey`           |
| 2   | `payer`                           | `Pubkey`           |
| 3   | `admin`                           | `Pubkey`           |
| 4   | `protocol_config_state`           | `Pubkey`           |
| 5   | `system_program`                  | `Pubkey`           |
| 6   | `protocol_staking_admin_state`    | `Pubkey`           |
| 7   | `address_lookup_program`          | `Pubkey`           |
| 8   | `instruction_sysvar_account_info` | `Pubkey`           |
| 9   | `temp_sol_holder`                 | `Pubkey`           |
| 10… | `remaining`                       | `Vec<AccountMeta>` |

### `AdminRepaySol`

Discriminator `883d30e8a61acf2e` · data `AdminRepaySol` · accounts `AdminRepaySolInstructionAccounts`.

| Field     | Type  |
| --------- | ----- |
| `version` | `u16` |
| `amount`  | `u64` |

Required accounts: 10; extras go to `remaining`.

Fields of `AdminRepaySolInstructionAccounts`, in account order:

| #   | Field                             | Type               |
| --- | --------------------------------- | ------------------ |
| 0   | `token_program`                   | `Pubkey`           |
| 1   | `associated_token_program`        | `Pubkey`           |
| 2   | `payer`                           | `Pubkey`           |
| 3   | `admin`                           | `Pubkey`           |
| 4   | `protocol_config_state`           | `Pubkey`           |
| 5   | `system_program`                  | `Pubkey`           |
| 6   | `protocol_staking_admin_state`    | `Pubkey`           |
| 7   | `address_lookup_program`          | `Pubkey`           |
| 8   | `instruction_sysvar_account_info` | `Pubkey`           |
| 9   | `temp_sol_holder`                 | `Pubkey`           |
| 10… | `remaining`                       | `Vec<AccountMeta>` |

### `AdminSetTransferFee`

Discriminator `e8c1a803505cd7b0` · data `AdminSetTransferFee` · accounts `AdminSetTransferFeeInstructionAccounts`.

| Field                     | Type  |
| ------------------------- | ----- |
| `protocol_config_version` | `u16` |
| `transfer_fee_bps`        | `u16` |
| `maximum_fee`             | `u64` |

Required accounts: 5; extras go to `remaining`.

Fields of `AdminSetTransferFeeInstructionAccounts`, in account order:

| #  | Field                  | Type               |
| -- | ---------------------- | ------------------ |
| 0  | `token_a_program`      | `Pubkey`           |
| 1  | `token_a_mint`         | `Pubkey`           |
| 2  | `current_owner`        | `Pubkey`           |
| 3  | `protocol_owner_state` | `Pubkey`           |
| 4  | `protocol_config`      | `Pubkey`           |
| 5… | `remaining`            | `Vec<AccountMeta>` |

### `AdminUnstakeMsol`

Discriminator `fdda8dfc2809079a` · data `AdminUnstakeMsol` · accounts `AdminUnstakeMsolInstructionAccounts`.

| Field           | Type  |
| --------------- | ----- |
| `version`       | `u16` |
| `ticket_number` | `u32` |
| `amount`        | `u64` |

Required accounts: 10; extras go to `remaining`.

Fields of `AdminUnstakeMsolInstructionAccounts`, in account order:

| #   | Field                          | Type               |
| --- | ------------------------------ | ------------------ |
| 0   | `token_program`                | `Pubkey`           |
| 1   | `associated_token_program`     | `Pubkey`           |
| 2   | `payer`                        | `Pubkey`           |
| 3   | `admin`                        | `Pubkey`           |
| 4   | `protocol_config_state`        | `Pubkey`           |
| 5   | `system_program`               | `Pubkey`           |
| 6   | `protocol_staking_admin_state` | `Pubkey`           |
| 7   | `msol_ticket`                  | `Pubkey`           |
| 8   | `msol_mint`                    | `Pubkey`           |
| 9   | `msol_ticket_sol_spent`        | `Pubkey`           |
| 10… | `remaining`                    | `Vec<AccountMeta>` |

### `AdminUpdateProLiquidityPoolState`

Discriminator `c845f14091928070` · data `AdminUpdateProLiquidityPoolState` · accounts `AdminUpdateProLiquidityPoolStateInstructionAccounts`.

| Field    | Type                                                              |
| -------- | ----------------------------------------------------------------- |
| `update` | [`AdminUpdateLiquidityPoolState`](#adminupdateliquiditypoolstate) |

Required accounts: 4; extras go to `remaining`.

Fields of `AdminUpdateProLiquidityPoolStateInstructionAccounts`, in account order:

| #  | Field                  | Type               |
| -- | ---------------------- | ------------------ |
| 0  | `liquidity_pool_state` | `Pubkey`           |
| 1  | `protocol_config`      | `Pubkey`           |
| 2  | `protocol_admin`       | `Pubkey`           |
| 3  | `protocol_admin_state` | `Pubkey`           |
| 4… | `remaining`            | `Vec<AccountMeta>` |

### `AdminUpdateStandardLiquidityPoolState`

Discriminator `63e4293fddf4c8c7` · data `AdminUpdateStandardLiquidityPoolState` · accounts `AdminUpdateStandardLiquidityPoolStateInstructionAccounts`.

| Field    | Type                                                              |
| -------- | ----------------------------------------------------------------- |
| `update` | [`AdminUpdateLiquidityPoolState`](#adminupdateliquiditypoolstate) |

Required accounts: 4; extras go to `remaining`.

Fields of `AdminUpdateStandardLiquidityPoolStateInstructionAccounts`, in account order:

| #  | Field                  | Type               |
| -- | ---------------------- | ------------------ |
| 0  | `liquidity_pool_state` | `Pubkey`           |
| 1  | `protocol_config`      | `Pubkey`           |
| 2  | `protocol_admin`       | `Pubkey`           |
| 3  | `protocol_admin_state` | `Pubkey`           |
| 4… | `remaining`            | `Vec<AccountMeta>` |

### `AdminWithdrawMsol`

Discriminator `f9db8d48d26ed863` · data `AdminWithdrawMsol` · accounts `AdminWithdrawMsolInstructionAccounts`.

| Field     | Type  |
| --------- | ----- |
| `version` | `u16` |
| `amount`  | `u64` |

Required accounts: 10; extras go to `remaining`.

Fields of `AdminWithdrawMsolInstructionAccounts`, in account order:

| #   | Field                             | Type               |
| --- | --------------------------------- | ------------------ |
| 0   | `token_program`                   | `Pubkey`           |
| 1   | `associated_token_program`        | `Pubkey`           |
| 2   | `payer`                           | `Pubkey`           |
| 3   | `admin`                           | `Pubkey`           |
| 4   | `protocol_config_state`           | `Pubkey`           |
| 5   | `system_program`                  | `Pubkey`           |
| 6   | `protocol_staking_admin_state`    | `Pubkey`           |
| 7   | `address_lookup_program`          | `Pubkey`           |
| 8   | `instruction_sysvar_account_info` | `Pubkey`           |
| 9   | `temp_sol_holder`                 | `Pubkey`           |
| 10… | `remaining`                       | `Vec<AccountMeta>` |

### `AdminWithdrawTransferFee`

Discriminator `754fa4cb7e4816f6` · data `AdminWithdrawTransferFee` · accounts `AdminWithdrawTransferFeeInstructionAccounts`.

| Field                     | Type  |
| ------------------------- | ----- |
| `protocol_config_version` | `u16` |

Required accounts: 6; extras go to `remaining`.

Fields of `AdminWithdrawTransferFeeInstructionAccounts`, in account order:

| #  | Field                      | Type               |
| -- | -------------------------- | ------------------ |
| 0  | `token_program`            | `Pubkey`           |
| 1  | `mint`                     | `Pubkey`           |
| 2  | `receiver`                 | `Pubkey`           |
| 3  | `protocol_fee_admin_state` | `Pubkey`           |
| 4  | `admin`                    | `Pubkey`           |
| 5  | `protocol_config`          | `Pubkey`           |
| 6… | `remaining`                | `Vec<AccountMeta>` |

### `Buy`

Discriminator `66063d1201daebea` · data `Buy` · accounts `BuyInstructionAccounts`.

| Field    | Type                      |
| -------- | ------------------------- |
| `params` | [`BuyParams`](#buyparams) |

Required accounts: 14; extras go to `remaining`.

Fields of `BuyInstructionAccounts`, in account order:

| #   | Field                             | Type               |
| --- | --------------------------------- | ------------------ |
| 0   | `token_a_program`                 | `Pubkey`           |
| 1   | `token_b_program`                 | `Pubkey`           |
| 2   | `associated_token_program`        | `Pubkey`           |
| 3   | `system_program`                  | `Pubkey`           |
| 4   | `liquidity_pool_state`            | `Pubkey`           |
| 5   | `user`                            | `Pubkey`           |
| 6   | `token_a_mint`                    | `Pubkey`           |
| 7   | `token_b_mint`                    | `Pubkey`           |
| 8   | `user_token_a_vault`              | `Pubkey`           |
| 9   | `user_token_b_vault`              | `Pubkey`           |
| 10  | `token_a_vault`                   | `Pubkey`           |
| 11  | `token_b_vault`                   | `Pubkey`           |
| 12  | `protocol_config`                 | `Pubkey`           |
| 13  | `instruction_sysvar_account_info` | `Pubkey`           |
| 14… | `remaining`                       | `Vec<AccountMeta>` |

### `ClaimProCreatorTradingFeeProtocolFees`

Discriminator `ea23ed0f8a31ec99` · data `ClaimProCreatorTradingFeeProtocolFees` · accounts `ClaimProCreatorTradingFeeProtocolFeesInstructionAccounts`.

| Field    | Type  |
| -------- | ----- |
| `amount` | `u64` |

Required accounts: 16; extras go to `remaining`.

Fields of `ClaimProCreatorTradingFeeProtocolFeesInstructionAccounts`, in account order:

| #   | Field                             | Type               |
| --- | --------------------------------- | ------------------ |
| 0   | `token_a_program`                 | `Pubkey`           |
| 1   | `token_b_program`                 | `Pubkey`           |
| 2   | `associated_token_program`        | `Pubkey`           |
| 3   | `system_program`                  | `Pubkey`           |
| 4   | `liquidity_pool_state`            | `Pubkey`           |
| 5   | `user`                            | `Pubkey`           |
| 6   | `token_a_mint`                    | `Pubkey`           |
| 7   | `token_b_mint`                    | `Pubkey`           |
| 8   | `user_token_a_vault`              | `Pubkey`           |
| 9   | `user_token_b_vault`              | `Pubkey`           |
| 10  | `token_a_vault`                   | `Pubkey`           |
| 11  | `token_b_vault`                   | `Pubkey`           |
| 12  | `protocol_config`                 | `Pubkey`           |
| 13  | `instruction_sysvar_account_info` | `Pubkey`           |
| 14  | `protocol_admin`                  | `Pubkey`           |
| 15  | `protocol_admin_state`            | `Pubkey`           |
| 16… | `remaining`                       | `Vec<AccountMeta>` |

### `ClaimProCreatorTradingFees`

Discriminator `517b67716d968a5d` · data `ClaimProCreatorTradingFees` · accounts `ClaimProCreatorTradingFeesInstructionAccounts`.

| Field    | Type  |
| -------- | ----- |
| `amount` | `u64` |

Required accounts: 14; extras go to `remaining`.

Fields of `ClaimProCreatorTradingFeesInstructionAccounts`, in account order:

| #   | Field                             | Type               |
| --- | --------------------------------- | ------------------ |
| 0   | `token_a_program`                 | `Pubkey`           |
| 1   | `token_b_program`                 | `Pubkey`           |
| 2   | `associated_token_program`        | `Pubkey`           |
| 3   | `system_program`                  | `Pubkey`           |
| 4   | `liquidity_pool_state`            | `Pubkey`           |
| 5   | `user`                            | `Pubkey`           |
| 6   | `token_a_mint`                    | `Pubkey`           |
| 7   | `token_b_mint`                    | `Pubkey`           |
| 8   | `user_token_a_vault`              | `Pubkey`           |
| 9   | `user_token_b_vault`              | `Pubkey`           |
| 10  | `token_a_vault`                   | `Pubkey`           |
| 11  | `token_b_vault`                   | `Pubkey`           |
| 12  | `protocol_config`                 | `Pubkey`           |
| 13  | `instruction_sysvar_account_info` | `Pubkey`           |
| 14… | `remaining`                       | `Vec<AccountMeta>` |

### `ClaimProLiquidityProviderTradingFees`

Discriminator `f274e4342074ac94` · data `ClaimProLiquidityProviderTradingFees` · accounts `ClaimProLiquidityProviderTradingFeesInstructionAccounts`.

No data fields.

Required accounts: 13; extras go to `remaining`.

Fields of `ClaimProLiquidityProviderTradingFeesInstructionAccounts`, in account order:

| #   | Field                  | Type               |
| --- | ---------------------- | ------------------ |
| 0   | `token_a_program`      | `Pubkey`           |
| 1   | `token_b_program`      | `Pubkey`           |
| 2   | `system_program`       | `Pubkey`           |
| 3   | `liquidity_pool_state` | `Pubkey`           |
| 4   | `user`                 | `Pubkey`           |
| 5   | `token_a_mint`         | `Pubkey`           |
| 6   | `token_b_mint`         | `Pubkey`           |
| 7   | `user_token_a_vault`   | `Pubkey`           |
| 8   | `user_token_b_vault`   | `Pubkey`           |
| 9   | `token_a_vault`        | `Pubkey`           |
| 10  | `token_b_vault`        | `Pubkey`           |
| 11  | `protocol_config`      | `Pubkey`           |
| 12  | `user_lp_position`     | `Pubkey`           |
| 13… | `remaining`            | `Vec<AccountMeta>` |

### `ClaimProProtocolTradingFees`

Discriminator `ddc065bdff4fc239` · data `ClaimProProtocolTradingFees` · accounts `ClaimProProtocolTradingFeesInstructionAccounts`.

| Field    | Type  |
| -------- | ----- |
| `amount` | `u64` |

Required accounts: 16; extras go to `remaining`.

Fields of `ClaimProProtocolTradingFeesInstructionAccounts`, in account order:

| #   | Field                             | Type               |
| --- | --------------------------------- | ------------------ |
| 0   | `token_a_program`                 | `Pubkey`           |
| 1   | `token_b_program`                 | `Pubkey`           |
| 2   | `associated_token_program`        | `Pubkey`           |
| 3   | `system_program`                  | `Pubkey`           |
| 4   | `liquidity_pool_state`            | `Pubkey`           |
| 5   | `user`                            | `Pubkey`           |
| 6   | `token_a_mint`                    | `Pubkey`           |
| 7   | `token_b_mint`                    | `Pubkey`           |
| 8   | `user_token_a_vault`              | `Pubkey`           |
| 9   | `user_token_b_vault`              | `Pubkey`           |
| 10  | `token_a_vault`                   | `Pubkey`           |
| 11  | `token_b_vault`                   | `Pubkey`           |
| 12  | `protocol_config`                 | `Pubkey`           |
| 13  | `instruction_sysvar_account_info` | `Pubkey`           |
| 14  | `protocol_admin`                  | `Pubkey`           |
| 15  | `protocol_admin_state`            | `Pubkey`           |
| 16… | `remaining`                       | `Vec<AccountMeta>` |

### `ClaimProReflectionTradingFees`

Discriminator `ea9030fc6f06503a` · data `ClaimProReflectionTradingFees` · accounts `ClaimProReflectionTradingFeesInstructionAccounts`.

| Field    | Type  |
| -------- | ----- |
| `amount` | `u64` |

Required accounts: 16; extras go to `remaining`.

Fields of `ClaimProReflectionTradingFeesInstructionAccounts`, in account order:

| #   | Field                             | Type               |
| --- | --------------------------------- | ------------------ |
| 0   | `token_a_program`                 | `Pubkey`           |
| 1   | `token_b_program`                 | `Pubkey`           |
| 2   | `associated_token_program`        | `Pubkey`           |
| 3   | `system_program`                  | `Pubkey`           |
| 4   | `liquidity_pool_state`            | `Pubkey`           |
| 5   | `user`                            | `Pubkey`           |
| 6   | `token_a_mint`                    | `Pubkey`           |
| 7   | `token_b_mint`                    | `Pubkey`           |
| 8   | `user_token_a_vault`              | `Pubkey`           |
| 9   | `user_token_b_vault`              | `Pubkey`           |
| 10  | `token_a_vault`                   | `Pubkey`           |
| 11  | `token_b_vault`                   | `Pubkey`           |
| 12  | `protocol_config`                 | `Pubkey`           |
| 13  | `instruction_sysvar_account_info` | `Pubkey`           |
| 14  | `protocol_admin`                  | `Pubkey`           |
| 15  | `protocol_admin_state`            | `Pubkey`           |
| 16… | `remaining`                       | `Vec<AccountMeta>` |

### `ClaimStandardCreatorTradingFeeProtocolFees`

Discriminator `00c9e2e47f2d456e` · data `ClaimStandardCreatorTradingFeeProtocolFees` · accounts `ClaimStandardCreatorTradingFeeProtocolFeesInstructionAccounts`.

| Field    | Type  |
| -------- | ----- |
| `amount` | `u64` |

Required accounts: 16; extras go to `remaining`.

Fields of `ClaimStandardCreatorTradingFeeProtocolFeesInstructionAccounts`, in account order:

| #   | Field                             | Type               |
| --- | --------------------------------- | ------------------ |
| 0   | `token_a_program`                 | `Pubkey`           |
| 1   | `token_b_program`                 | `Pubkey`           |
| 2   | `associated_token_program`        | `Pubkey`           |
| 3   | `system_program`                  | `Pubkey`           |
| 4   | `liquidity_pool_state`            | `Pubkey`           |
| 5   | `user`                            | `Pubkey`           |
| 6   | `token_a_mint`                    | `Pubkey`           |
| 7   | `token_b_mint`                    | `Pubkey`           |
| 8   | `user_token_a_vault`              | `Pubkey`           |
| 9   | `user_token_b_vault`              | `Pubkey`           |
| 10  | `token_a_vault`                   | `Pubkey`           |
| 11  | `token_b_vault`                   | `Pubkey`           |
| 12  | `protocol_config`                 | `Pubkey`           |
| 13  | `instruction_sysvar_account_info` | `Pubkey`           |
| 14  | `protocol_admin`                  | `Pubkey`           |
| 15  | `protocol_admin_state`            | `Pubkey`           |
| 16… | `remaining`                       | `Vec<AccountMeta>` |

### `ClaimStandardCreatorTradingFees`

Discriminator `a559dd34aaf9226f` · data `ClaimStandardCreatorTradingFees` · accounts `ClaimStandardCreatorTradingFeesInstructionAccounts`.

| Field    | Type  |
| -------- | ----- |
| `amount` | `u64` |

Required accounts: 14; extras go to `remaining`.

Fields of `ClaimStandardCreatorTradingFeesInstructionAccounts`, in account order:

| #   | Field                             | Type               |
| --- | --------------------------------- | ------------------ |
| 0   | `token_a_program`                 | `Pubkey`           |
| 1   | `token_b_program`                 | `Pubkey`           |
| 2   | `associated_token_program`        | `Pubkey`           |
| 3   | `system_program`                  | `Pubkey`           |
| 4   | `liquidity_pool_state`            | `Pubkey`           |
| 5   | `user`                            | `Pubkey`           |
| 6   | `token_a_mint`                    | `Pubkey`           |
| 7   | `token_b_mint`                    | `Pubkey`           |
| 8   | `user_token_a_vault`              | `Pubkey`           |
| 9   | `user_token_b_vault`              | `Pubkey`           |
| 10  | `token_a_vault`                   | `Pubkey`           |
| 11  | `token_b_vault`                   | `Pubkey`           |
| 12  | `protocol_config`                 | `Pubkey`           |
| 13  | `instruction_sysvar_account_info` | `Pubkey`           |
| 14… | `remaining`                       | `Vec<AccountMeta>` |

### `ClaimStandardProtocolTradingFees`

Discriminator `54ce8cf53fd440ed` · data `ClaimStandardProtocolTradingFees` · accounts `ClaimStandardProtocolTradingFeesInstructionAccounts`.

| Field    | Type  |
| -------- | ----- |
| `amount` | `u64` |

Required accounts: 16; extras go to `remaining`.

Fields of `ClaimStandardProtocolTradingFeesInstructionAccounts`, in account order:

| #   | Field                             | Type               |
| --- | --------------------------------- | ------------------ |
| 0   | `token_a_program`                 | `Pubkey`           |
| 1   | `token_b_program`                 | `Pubkey`           |
| 2   | `associated_token_program`        | `Pubkey`           |
| 3   | `system_program`                  | `Pubkey`           |
| 4   | `liquidity_pool_state`            | `Pubkey`           |
| 5   | `user`                            | `Pubkey`           |
| 6   | `token_a_mint`                    | `Pubkey`           |
| 7   | `token_b_mint`                    | `Pubkey`           |
| 8   | `user_token_a_vault`              | `Pubkey`           |
| 9   | `user_token_b_vault`              | `Pubkey`           |
| 10  | `token_a_vault`                   | `Pubkey`           |
| 11  | `token_b_vault`                   | `Pubkey`           |
| 12  | `protocol_config`                 | `Pubkey`           |
| 13  | `instruction_sysvar_account_info` | `Pubkey`           |
| 14  | `protocol_admin`                  | `Pubkey`           |
| 15  | `protocol_admin_state`            | `Pubkey`           |
| 16… | `remaining`                       | `Vec<AccountMeta>` |

### `ClaimStandardReflectionTradingFees`

Discriminator `4694259366141e17` · data `ClaimStandardReflectionTradingFees` · accounts `ClaimStandardReflectionTradingFeesInstructionAccounts`.

| Field    | Type  |
| -------- | ----- |
| `amount` | `u64` |

Required accounts: 16; extras go to `remaining`.

Fields of `ClaimStandardReflectionTradingFeesInstructionAccounts`, in account order:

| #   | Field                             | Type               |
| --- | --------------------------------- | ------------------ |
| 0   | `token_a_program`                 | `Pubkey`           |
| 1   | `token_b_program`                 | `Pubkey`           |
| 2   | `associated_token_program`        | `Pubkey`           |
| 3   | `system_program`                  | `Pubkey`           |
| 4   | `liquidity_pool_state`            | `Pubkey`           |
| 5   | `user`                            | `Pubkey`           |
| 6   | `token_a_mint`                    | `Pubkey`           |
| 7   | `token_b_mint`                    | `Pubkey`           |
| 8   | `user_token_a_vault`              | `Pubkey`           |
| 9   | `user_token_b_vault`              | `Pubkey`           |
| 10  | `token_a_vault`                   | `Pubkey`           |
| 11  | `token_b_vault`                   | `Pubkey`           |
| 12  | `protocol_config`                 | `Pubkey`           |
| 13  | `instruction_sysvar_account_info` | `Pubkey`           |
| 14  | `protocol_admin`                  | `Pubkey`           |
| 15  | `protocol_admin_state`            | `Pubkey`           |
| 16… | `remaining`                       | `Vec<AccountMeta>` |

### `CloseProtocolLookupTable`

Discriminator `4f48302777032a74` · data `CloseProtocolLookupTable` · accounts `CloseProtocolLookupTableInstructionAccounts`.

| Field     | Type  |
| --------- | ----- |
| `version` | `u64` |

Required accounts: 7; extras go to `remaining`.

Fields of `CloseProtocolLookupTableInstructionAccounts`, in account order:

| #  | Field                    | Type               |
| -- | ------------------------ | ------------------ |
| 0  | `payer`                  | `Pubkey`           |
| 1  | `system_program`         | `Pubkey`           |
| 2  | `address_lookup_program` | `Pubkey`           |
| 3  | `authority`              | `Pubkey`           |
| 4  | `lookup_table`           | `Pubkey`           |
| 5  | `protocol_owner_state`   | `Pubkey`           |
| 6  | `current_owner`          | `Pubkey`           |
| 7… | `remaining`              | `Vec<AccountMeta>` |

### `CreateOrUpdateProtocolFeeAdmin`

Discriminator `157eb014556f351f` · data `CreateOrUpdateProtocolFeeAdmin` · accounts `CreateOrUpdateProtocolFeeAdminInstructionAccounts`.

No data fields.

Required accounts: 6; extras go to `remaining`.

Fields of `CreateOrUpdateProtocolFeeAdminInstructionAccounts`, in account order:

| #  | Field                      | Type               |
| -- | -------------------------- | ------------------ |
| 0  | `system_program`           | `Pubkey`           |
| 1  | `payer`                    | `Pubkey`           |
| 2  | `current_owner`            | `Pubkey`           |
| 3  | `protocol_owner_state`     | `Pubkey`           |
| 4  | `new_admin`                | `Pubkey`           |
| 5  | `protocol_fee_admin_state` | `Pubkey`           |
| 6… | `remaining`                | `Vec<AccountMeta>` |

### `CreateOrUpdateProtocolOwner`

Discriminator `aa7c802830698b94` · data `CreateOrUpdateProtocolOwner` · accounts `CreateOrUpdateProtocolOwnerInstructionAccounts`.

No data fields.

Required accounts: 5; extras go to `remaining`.

Fields of `CreateOrUpdateProtocolOwnerInstructionAccounts`, in account order:

| #  | Field                  | Type               |
| -- | ---------------------- | ------------------ |
| 0  | `system_program`       | `Pubkey`           |
| 1  | `payer`                | `Pubkey`           |
| 2  | `current_owner`        | `Pubkey`           |
| 3  | `new_owner`            | `Pubkey`           |
| 4  | `protocol_owner_state` | `Pubkey`           |
| 5… | `remaining`            | `Vec<AccountMeta>` |

### `CreateOrUpdateProtocolStakingAdmin`

Discriminator `04acc4d578321e89` · data `CreateOrUpdateProtocolStakingAdmin` · accounts `CreateOrUpdateProtocolStakingAdminInstructionAccounts`.

No data fields.

Required accounts: 6; extras go to `remaining`.

Fields of `CreateOrUpdateProtocolStakingAdminInstructionAccounts`, in account order:

| #  | Field                          | Type               |
| -- | ------------------------------ | ------------------ |
| 0  | `system_program`               | `Pubkey`           |
| 1  | `payer`                        | `Pubkey`           |
| 2  | `current_owner`                | `Pubkey`           |
| 3  | `protocol_owner_state`         | `Pubkey`           |
| 4  | `new_admin`                    | `Pubkey`           |
| 5  | `protocol_staking_admin_state` | `Pubkey`           |
| 6… | `remaining`                    | `Vec<AccountMeta>` |

### `CreateProLiquidityPool`

Discriminator `d16155bfbb1dc455` · data `CreateProLiquidityPool` · accounts `CreateProLiquidityPoolInstructionAccounts`.

| Field                     | Type                                                            |
| ------------------------- | --------------------------------------------------------------- |
| `protocol_config_version` | `u16`                                                           |
| `params`                  | [`CreateProLiquidityPoolParams`](#createproliquiditypoolparams) |

Required accounts: 14; extras go to `remaining`.

Fields of `CreateProLiquidityPoolInstructionAccounts`, in account order:

| #   | Field                      | Type               |
| --- | -------------------------- | ------------------ |
| 0   | `token_program`            | `Pubkey`           |
| 1   | `associated_token_program` | `Pubkey`           |
| 2   | `system_program`           | `Pubkey`           |
| 3   | `user`                     | `Pubkey`           |
| 4   | `payer`                    | `Pubkey`           |
| 5   | `token_a_mint`             | `Pubkey`           |
| 6   | `token_b_mint`             | `Pubkey`           |
| 7   | `user_token_a_vault`       | `Pubkey`           |
| 8   | `token_a_vault`            | `Pubkey`           |
| 9   | `token_b_vault`            | `Pubkey`           |
| 10  | `liquidity_pool_state`     | `Pubkey`           |
| 11  | `protocol_config`          | `Pubkey`           |
| 12  | `token_a_program`          | `Pubkey`           |
| 13  | `user_lp_position`         | `Pubkey`           |
| 14… | `remaining`                | `Vec<AccountMeta>` |

### `CreateProtocolConfig`

Discriminator `7372186f0e3571fe` · data `CreateProtocolConfig` · accounts `CreateProtocolConfigInstructionAccounts`.

| Field     | Type                                            |
| --------- | ----------------------------------------------- |
| `version` | `u16`                                           |
| `params`  | [`ProtocolConfigParams`](#protocolconfigparams) |

Required accounts: 9; extras go to `remaining`.

Fields of `CreateProtocolConfigInstructionAccounts`, in account order:

| #  | Field                      | Type               |
| -- | -------------------------- | ------------------ |
| 0  | `token_program`            | `Pubkey`           |
| 1  | `associated_token_program` | `Pubkey`           |
| 2  | `payer`                    | `Pubkey`           |
| 3  | `owner`                    | `Pubkey`           |
| 4  | `protocol_config_state`    | `Pubkey`           |
| 5  | `system_program`           | `Pubkey`           |
| 6  | `protocol_owner_state`     | `Pubkey`           |
| 7  | `msol_token_vault`         | `Pubkey`           |
| 8  | `msol_mint`                | `Pubkey`           |
| 9… | `remaining`                | `Vec<AccountMeta>` |

### `CreateProtocolLookupTable`

Discriminator `f9036399a8f1f3e4` · data `CreateProtocolLookupTable` · accounts `CreateProtocolLookupTableInstructionAccounts`.

| Field     | Type  |
| --------- | ----- |
| `version` | `u64` |

Required accounts: 7; extras go to `remaining`.

Fields of `CreateProtocolLookupTableInstructionAccounts`, in account order:

| #  | Field                    | Type               |
| -- | ------------------------ | ------------------ |
| 0  | `payer`                  | `Pubkey`           |
| 1  | `system_program`         | `Pubkey`           |
| 2  | `address_lookup_program` | `Pubkey`           |
| 3  | `authority`              | `Pubkey`           |
| 4  | `lookup_table`           | `Pubkey`           |
| 5  | `protocol_owner_state`   | `Pubkey`           |
| 6  | `current_owner`          | `Pubkey`           |
| 7… | `remaining`              | `Vec<AccountMeta>` |

### `CreateStandardLiquidityPool`

Discriminator `2a2b7e38e70ad035` · data `CreateStandardLiquidityPool` · accounts `CreateStandardLiquidityPoolInstructionAccounts`.

| Field                     | Type                                                                      |
| ------------------------- | ------------------------------------------------------------------------- |
| `protocol_config_version` | `u16`                                                                     |
| `params`                  | [`CreateStandardLiquidityPoolParams`](#createstandardliquiditypoolparams) |

Required accounts: 13; extras go to `remaining`.

Fields of `CreateStandardLiquidityPoolInstructionAccounts`, in account order:

| #   | Field                      | Type               |
| --- | -------------------------- | ------------------ |
| 0   | `token_program`            | `Pubkey`           |
| 1   | `associated_token_program` | `Pubkey`           |
| 2   | `system_program`           | `Pubkey`           |
| 3   | `user`                     | `Pubkey`           |
| 4   | `payer`                    | `Pubkey`           |
| 5   | `token_a_mint`             | `Pubkey`           |
| 6   | `token_b_mint`             | `Pubkey`           |
| 7   | `user_token_a_vault`       | `Pubkey`           |
| 8   | `token_a_vault`            | `Pubkey`           |
| 9   | `token_b_vault`            | `Pubkey`           |
| 10  | `liquidity_pool_state`     | `Pubkey`           |
| 11  | `protocol_config`          | `Pubkey`           |
| 12  | `token_a_program`          | `Pubkey`           |
| 13… | `remaining`                | `Vec<AccountMeta>` |

### `CreatorSetProMarketCapCreatorFee`

Discriminator `75ce38021c25eceb` · data `CreatorSetProMarketCapCreatorFee` · accounts `CreatorSetProMarketCapCreatorFeeInstructionAccounts`.

| Field  | Type                          |
| ------ | ----------------------------- |
| `fees` | [`FeeBrackets`](#feebrackets) |

Required accounts: 2; extras go to `remaining`.

Fields of `CreatorSetProMarketCapCreatorFeeInstructionAccounts`, in account order:

| #  | Field                  | Type               |
| -- | ---------------------- | ------------------ |
| 0  | `liquidity_pool_state` | `Pubkey`           |
| 1  | `creator`              | `Pubkey`           |
| 2… | `remaining`            | `Vec<AccountMeta>` |

### `CreatorSetProMarketCapLpFee`

Discriminator `06c12209eb55fff6` · data `CreatorSetProMarketCapLpFee` · accounts `CreatorSetProMarketCapLpFeeInstructionAccounts`.

| Field  | Type                          |
| ------ | ----------------------------- |
| `fees` | [`FeeBrackets`](#feebrackets) |

Required accounts: 2; extras go to `remaining`.

Fields of `CreatorSetProMarketCapLpFeeInstructionAccounts`, in account order:

| #  | Field                  | Type               |
| -- | ---------------------- | ------------------ |
| 0  | `liquidity_pool_state` | `Pubkey`           |
| 1  | `creator`              | `Pubkey`           |
| 2… | `remaining`            | `Vec<AccountMeta>` |

### `CreatorSetProMarketCapReflectionFee`

Discriminator `e3ad60792de2a489` · data `CreatorSetProMarketCapReflectionFee` · accounts `CreatorSetProMarketCapReflectionFeeInstructionAccounts`.

| Field  | Type                          |
| ------ | ----------------------------- |
| `fees` | [`FeeBrackets`](#feebrackets) |

Required accounts: 2; extras go to `remaining`.

Fields of `CreatorSetProMarketCapReflectionFeeInstructionAccounts`, in account order:

| #  | Field                  | Type               |
| -- | ---------------------- | ------------------ |
| 0  | `liquidity_pool_state` | `Pubkey`           |
| 1  | `creator`              | `Pubkey`           |
| 2… | `remaining`            | `Vec<AccountMeta>` |

### `CreatorSetProSlotCreatorFee`

Discriminator `15464de404e10353` · data `CreatorSetProSlotCreatorFee` · accounts `CreatorSetProSlotCreatorFeeInstructionAccounts`.

| Field  | Type                                  |
| ------ | ------------------------------------- |
| `fees` | [`SlotFeeBrackets`](#slotfeebrackets) |

Required accounts: 2; extras go to `remaining`.

Fields of `CreatorSetProSlotCreatorFeeInstructionAccounts`, in account order:

| #  | Field                  | Type               |
| -- | ---------------------- | ------------------ |
| 0  | `liquidity_pool_state` | `Pubkey`           |
| 1  | `creator`              | `Pubkey`           |
| 2… | `remaining`            | `Vec<AccountMeta>` |

### `CreatorToggleProDeposit`

Discriminator `a08980cc2ab366ca` · data `CreatorToggleProDeposit` · accounts `CreatorToggleProDepositInstructionAccounts`.

| Field     | Type   |
| --------- | ------ |
| `enabled` | `bool` |

Required accounts: 2; extras go to `remaining`.

Fields of `CreatorToggleProDepositInstructionAccounts`, in account order:

| #  | Field                  | Type               |
| -- | ---------------------- | ------------------ |
| 0  | `liquidity_pool_state` | `Pubkey`           |
| 1  | `creator`              | `Pubkey`           |
| 2… | `remaining`            | `Vec<AccountMeta>` |

### `CreatorToggleProSwap`

Discriminator `8fbe0581e63b1c59` · data `CreatorToggleProSwap` · accounts `CreatorToggleProSwapInstructionAccounts`.

| Field     | Type   |
| --------- | ------ |
| `enabled` | `bool` |

Required accounts: 2; extras go to `remaining`.

Fields of `CreatorToggleProSwapInstructionAccounts`, in account order:

| #  | Field                  | Type               |
| -- | ---------------------- | ------------------ |
| 0  | `liquidity_pool_state` | `Pubkey`           |
| 1  | `creator`              | `Pubkey`           |
| 2… | `remaining`            | `Vec<AccountMeta>` |

### `CreatorToggleProWithdraw`

Discriminator `202fea054d92f4b2` · data `CreatorToggleProWithdraw` · accounts `CreatorToggleProWithdrawInstructionAccounts`.

| Field     | Type   |
| --------- | ------ |
| `enabled` | `bool` |

Required accounts: 2; extras go to `remaining`.

Fields of `CreatorToggleProWithdrawInstructionAccounts`, in account order:

| #  | Field                  | Type               |
| -- | ---------------------- | ------------------ |
| 0  | `liquidity_pool_state` | `Pubkey`           |
| 1  | `creator`              | `Pubkey`           |
| 2… | `remaining`            | `Vec<AccountMeta>` |

### `DeactivateProtocolLookupTable`

Discriminator `da0c583a962c9848` · data `DeactivateProtocolLookupTable` · accounts `DeactivateProtocolLookupTableInstructionAccounts`.

| Field     | Type  |
| --------- | ----- |
| `version` | `u64` |

Required accounts: 7; extras go to `remaining`.

Fields of `DeactivateProtocolLookupTableInstructionAccounts`, in account order:

| #  | Field                    | Type               |
| -- | ------------------------ | ------------------ |
| 0  | `payer`                  | `Pubkey`           |
| 1  | `system_program`         | `Pubkey`           |
| 2  | `address_lookup_program` | `Pubkey`           |
| 3  | `authority`              | `Pubkey`           |
| 4  | `lookup_table`           | `Pubkey`           |
| 5  | `protocol_owner_state`   | `Pubkey`           |
| 6  | `current_owner`          | `Pubkey`           |
| 7… | `remaining`              | `Vec<AccountMeta>` |

### `ExtendProtocolLookupTable`

Discriminator `07e3c6016b711f58` · data `ExtendProtocolLookupTable` · accounts `ExtendProtocolLookupTableInstructionAccounts`.

| Field       | Type          |
| ----------- | ------------- |
| `version`   | `u64`         |
| `addresses` | `Vec<Pubkey>` |

Required accounts: 7; extras go to `remaining`.

Fields of `ExtendProtocolLookupTableInstructionAccounts`, in account order:

| #  | Field                    | Type               |
| -- | ------------------------ | ------------------ |
| 0  | `payer`                  | `Pubkey`           |
| 1  | `system_program`         | `Pubkey`           |
| 2  | `address_lookup_program` | `Pubkey`           |
| 3  | `authority`              | `Pubkey`           |
| 4  | `lookup_table`           | `Pubkey`           |
| 5  | `protocol_owner_state`   | `Pubkey`           |
| 6  | `current_owner`          | `Pubkey`           |
| 7… | `remaining`              | `Vec<AccountMeta>` |

### `InitializeProtocolLending`

Discriminator `00cdedf01b4f1b3b` · data `InitializeProtocolLending` · accounts `InitializeProtocolLendingInstructionAccounts`.

| Field         | Type  |
| ------------- | ----- |
| `version`     | `u16` |
| `recent_slot` | `u64` |

Required accounts: 10; extras go to `remaining`.

Fields of `InitializeProtocolLendingInstructionAccounts`, in account order:

| #   | Field                             | Type               |
| --- | --------------------------------- | ------------------ |
| 0   | `token_program`                   | `Pubkey`           |
| 1   | `associated_token_program`        | `Pubkey`           |
| 2   | `payer`                           | `Pubkey`           |
| 3   | `admin`                           | `Pubkey`           |
| 4   | `protocol_config_state`           | `Pubkey`           |
| 5   | `system_program`                  | `Pubkey`           |
| 6   | `protocol_staking_admin_state`    | `Pubkey`           |
| 7   | `address_lookup_program`          | `Pubkey`           |
| 8   | `instruction_sysvar_account_info` | `Pubkey`           |
| 9   | `temp_sol_holder`                 | `Pubkey`           |
| 10… | `remaining`                       | `Vec<AccountMeta>` |

### `ProBuy`

Discriminator `67abc4ee9f2dbbf6` · data `ProBuy` · accounts `ProBuyInstructionAccounts`.

| Field    | Type                      |
| -------- | ------------------------- |
| `params` | [`BuyParams`](#buyparams) |

Required accounts: 14; extras go to `remaining`.

Fields of `ProBuyInstructionAccounts`, in account order:

| #   | Field                             | Type               |
| --- | --------------------------------- | ------------------ |
| 0   | `token_a_program`                 | `Pubkey`           |
| 1   | `token_b_program`                 | `Pubkey`           |
| 2   | `associated_token_program`        | `Pubkey`           |
| 3   | `system_program`                  | `Pubkey`           |
| 4   | `liquidity_pool_state`            | `Pubkey`           |
| 5   | `user`                            | `Pubkey`           |
| 6   | `token_a_mint`                    | `Pubkey`           |
| 7   | `token_b_mint`                    | `Pubkey`           |
| 8   | `user_token_a_vault`              | `Pubkey`           |
| 9   | `user_token_b_vault`              | `Pubkey`           |
| 10  | `token_a_vault`                   | `Pubkey`           |
| 11  | `token_b_vault`                   | `Pubkey`           |
| 12  | `protocol_config`                 | `Pubkey`           |
| 13  | `instruction_sysvar_account_info` | `Pubkey`           |
| 14… | `remaining`                       | `Vec<AccountMeta>` |

### `ProSell`

Discriminator `8c4f7a601689ee7c` · data `ProSell` · accounts `ProSellInstructionAccounts`.

| Field    | Type                        |
| -------- | --------------------------- |
| `params` | [`SellParams`](#sellparams) |

Required accounts: 14; extras go to `remaining`.

Fields of `ProSellInstructionAccounts`, in account order:

| #   | Field                             | Type               |
| --- | --------------------------------- | ------------------ |
| 0   | `token_a_program`                 | `Pubkey`           |
| 1   | `token_b_program`                 | `Pubkey`           |
| 2   | `associated_token_program`        | `Pubkey`           |
| 3   | `system_program`                  | `Pubkey`           |
| 4   | `liquidity_pool_state`            | `Pubkey`           |
| 5   | `user`                            | `Pubkey`           |
| 6   | `token_a_mint`                    | `Pubkey`           |
| 7   | `token_b_mint`                    | `Pubkey`           |
| 8   | `user_token_a_vault`              | `Pubkey`           |
| 9   | `user_token_b_vault`              | `Pubkey`           |
| 10  | `token_a_vault`                   | `Pubkey`           |
| 11  | `token_b_vault`                   | `Pubkey`           |
| 12  | `protocol_config`                 | `Pubkey`           |
| 13  | `instruction_sysvar_account_info` | `Pubkey`           |
| 14… | `remaining`                       | `Vec<AccountMeta>` |

### `RemainingAccountsStub`

Discriminator `208f535e17223bef` · data `RemainingAccountsStub` · accounts `RemainingAccountsStubInstructionAccounts`.

No data fields.

Required accounts: 113; extras go to `remaining`.

Fields of `RemainingAccountsStubInstructionAccounts`, in account order:

| #    | Field                                                       | Type               |
| ---- | ----------------------------------------------------------- | ------------------ |
| 0    | `protocol_lending_lookup_table`                             | `Pubkey`           |
| 1    | `kamino_lending_user_metadata`                              | `Pubkey`           |
| 2    | `kamino_lending_referrer_user_metadata`                     | `Pubkey`           |
| 3    | `rent`                                                      | `Pubkey`           |
| 4    | `kamino_lending_program`                                    | `Pubkey`           |
| 5    | `kamino_lending_obligation`                                 | `Pubkey`           |
| 6    | `kamino_lending_main_market`                                | `Pubkey`           |
| 7    | `kamino_reserve_msol_state`                                 | `Pubkey`           |
| 8    | `kamino_reserve_sol_state`                                  | `Pubkey`           |
| 9    | `kamino_scope_prices`                                       | `Pubkey`           |
| 10   | `marinade_liquid_staking_state`                             | `Pubkey`           |
| 11   | `msol_mint`                                                 | `Pubkey`           |
| 12   | `marinade_sol_leg_account`                                  | `Pubkey`           |
| 13   | `marinade_msol_leg_account`                                 | `Pubkey`           |
| 14   | `marinade_msol_leg_authority`                               | `Pubkey`           |
| 15   | `marinade_reserve_sol_pda`                                  | `Pubkey`           |
| 16   | `transfer_from`                                             | `Pubkey`           |
| 17   | `mint_to`                                                   | `Pubkey`           |
| 18   | `marinade_msol_mint_authority`                              | `Pubkey`           |
| 19   | `system_program`                                            | `Pubkey`           |
| 20   | `token_program`                                             | `Pubkey`           |
| 21   | `marinade_finance_program`                                  | `Pubkey`           |
| 22   | `referral_state`                                            | `Pubkey`           |
| 23   | `msol_token_partner_account`                                | `Pubkey`           |
| 24   | `msol_staking_program`                                      | `Pubkey`           |
| 25   | `deposit_accounts_owner`                                    | `Pubkey`           |
| 26   | `deposit_accounts_obligation`                               | `Pubkey`           |
| 27   | `deposit_accounts_lending_market`                           | `Pubkey`           |
| 28   | `deposit_accounts_lending_market_authority`                 | `Pubkey`           |
| 29   | `deposit_accounts_reserve`                                  | `Pubkey`           |
| 30   | `deposit_accounts_reserve_liquidity_mint`                   | `Pubkey`           |
| 31   | `deposit_accounts_reserve_liquidity_supply`                 | `Pubkey`           |
| 32   | `deposit_accounts_reserve_collateral_mint`                  | `Pubkey`           |
| 33   | `deposit_accounts_reserve_destination_deposit_collateral`   | `Pubkey`           |
| 34   | `deposit_accounts_user_source_liquidity`                    | `Pubkey`           |
| 35   | `deposit_accounts_placeholder_user_destination_collateral`  | `Pubkey`           |
| 36   | `deposit_accounts_collateral_token_program`                 | `Pubkey`           |
| 37   | `deposit_accounts_liquidity_token_program`                  | `Pubkey`           |
| 38   | `deposit_accounts_instruction_sysvar_account`               | `Pubkey`           |
| 39   | `farms_accounts_obligation_farm_user_state`                 | `Pubkey`           |
| 40   | `farms_accounts_reserve_farm_state`                         | `Pubkey`           |
| 41   | `farms_program`                                             | `Pubkey`           |
| 42   | `borrow_accounts_owner`                                     | `Pubkey`           |
| 43   | `borrow_accounts_obligation`                                | `Pubkey`           |
| 44   | `borrow_accounts_lending_market`                            | `Pubkey`           |
| 45   | `borrow_accounts_lending_market_authority`                  | `Pubkey`           |
| 46   | `borrow_accounts_borrow_reserve`                            | `Pubkey`           |
| 47   | `borrow_accounts_borrow_reserve_liquidity_mint`             | `Pubkey`           |
| 48   | `borrow_accounts_reserve_source_liquidity`                  | `Pubkey`           |
| 49   | `borrow_accounts_borrow_reserve_liquidity_fee_receiver`     | `Pubkey`           |
| 50   | `borrow_accounts_user_destination_liquidity`                | `Pubkey`           |
| 51   | `borrow_accounts_referrer_token_state`                      | `Pubkey`           |
| 52   | `borrow_accounts_token_program`                             | `Pubkey`           |
| 53   | `borrow_accounts_instruction_sysvar_account`                | `Pubkey`           |
| 54   | `repay_accounts_owner`                                      | `Pubkey`           |
| 55   | `repay_accounts_obligation`                                 | `Pubkey`           |
| 56   | `repay_accounts_lending_market`                             | `Pubkey`           |
| 57   | `repay_accounts_repay_reserve`                              | `Pubkey`           |
| 58   | `repay_accounts_reserve_liquidity_mint`                     | `Pubkey`           |
| 59   | `repay_accounts_reserve_destination_liquidity`              | `Pubkey`           |
| 60   | `repay_accounts_user_source_liquidity`                      | `Pubkey`           |
| 61   | `repay_accounts_token_program`                              | `Pubkey`           |
| 62   | `repay_accounts_instruction_sysvar_account`                 | `Pubkey`           |
| 63   | `lending_market_authority`                                  | `Pubkey`           |
| 64   | `associated_token_program`                                  | `Pubkey`           |
| 65   | `temp_sol_holder`                                           | `Pubkey`           |
| 66   | `chainlink_program`                                         | `Pubkey`           |
| 67   | `chainlink_sol_usd_price_feed`                              | `Pubkey`           |
| 68   | `clock`                                                     | `Pubkey`           |
| 69   | `withdraw_accounts_owner`                                   | `Pubkey`           |
| 70   | `withdraw_accounts_obligation`                              | `Pubkey`           |
| 71   | `withdraw_accounts_lending_market`                          | `Pubkey`           |
| 72   | `withdraw_accounts_lending_market_authority`                | `Pubkey`           |
| 73   | `withdraw_accounts_withdraw_reserve`                        | `Pubkey`           |
| 74   | `withdraw_accounts_reserve_liquidity_mint`                  | `Pubkey`           |
| 75   | `withdraw_accounts_reserve_source_collateral`               | `Pubkey`           |
| 76   | `withdraw_accounts_reserve_collateral_mint`                 | `Pubkey`           |
| 77   | `withdraw_accounts_reserve_liquidity_supply`                | `Pubkey`           |
| 78   | `withdraw_accounts_user_destination_liquidity`              | `Pubkey`           |
| 79   | `withdraw_accounts_placeholder_user_destination_collateral` | `Pubkey`           |
| 80   | `withdraw_accounts_collateral_token_program`                | `Pubkey`           |
| 81   | `withdraw_accounts_liquidity_token_program`                 | `Pubkey`           |
| 82   | `withdraw_accounts_instruction_sysvar_account`              | `Pubkey`           |
| 83   | `temp_sol_holder_msol_vault`                                | `Pubkey`           |
| 84   | `owner`                                                     | `Pubkey`           |
| 85   | `fee_payer`                                                 | `Pubkey`           |
| 86   | `user_metadata`                                             | `Pubkey`           |
| 87   | `referrer_user_metadata`                                    | `Pubkey`           |
| 88   | `obligation_owner`                                          | `Pubkey`           |
| 89   | `obligation`                                                | `Pubkey`           |
| 90   | `lending_market`                                            | `Pubkey`           |
| 91   | `seed1_account`                                             | `Pubkey`           |
| 92   | `seed2_account`                                             | `Pubkey`           |
| 93   | `owner_user_metadata`                                       | `Pubkey`           |
| 94   | `reserve`                                                   | `Pubkey`           |
| 95   | `pyth_oracle`                                               | `Pubkey`           |
| 96   | `switchboard_price_oracle`                                  | `Pubkey`           |
| 97   | `switchboard_twap_oracle`                                   | `Pubkey`           |
| 98   | `scope_prices`                                              | `Pubkey`           |
| 99   | `oracle_prices`                                             | `Pubkey`           |
| 100  | `oracle_mappings`                                           | `Pubkey`           |
| 101  | `oracle_twaps`                                              | `Pubkey`           |
| 102  | `instruction_sysvar_account_info`                           | `Pubkey`           |
| 103  | `pythnet_custody_price_sol_account`                         | `Pubkey`           |
| 104  | `marinade_liquid_staking_state2`                            | `Pubkey`           |
| 105  | `pythnet_custody_price_sol_account2`                        | `Pubkey`           |
| 106  | `burn_msol_from`                                            | `Pubkey`           |
| 107  | `burn_msol_authority`                                       | `Pubkey`           |
| 108  | `new_ticket_account`                                        | `Pubkey`           |
| 109  | `state`                                                     | `Pubkey`           |
| 110  | `reserve_pda`                                               | `Pubkey`           |
| 111  | `ticket_account`                                            | `Pubkey`           |
| 112  | `transfer_sol_to`                                           | `Pubkey`           |
| 113… | `remaining`                                                 | `Vec<AccountMeta>` |

### `RemoveLiquidityProPool`

Discriminator `bf372a2ce262ac4f` · data `RemoveLiquidityProPool` · accounts `RemoveLiquidityProPoolInstructionAccounts`.

| Field    | Type                                              |
| -------- | ------------------------------------------------- |
| `params` | [`RemoveLiquidityParams`](#removeliquidityparams) |

Required accounts: 15; extras go to `remaining`.

Fields of `RemoveLiquidityProPoolInstructionAccounts`, in account order:

| #   | Field                      | Type               |
| --- | -------------------------- | ------------------ |
| 0   | `token_a_program`          | `Pubkey`           |
| 1   | `token_b_program`          | `Pubkey`           |
| 2   | `associated_token_program` | `Pubkey`           |
| 3   | `system_program`           | `Pubkey`           |
| 4   | `liquidity_pool_state`     | `Pubkey`           |
| 5   | `user`                     | `Pubkey`           |
| 6   | `payer`                    | `Pubkey`           |
| 7   | `token_a_mint`             | `Pubkey`           |
| 8   | `token_b_mint`             | `Pubkey`           |
| 9   | `user_token_a_vault`       | `Pubkey`           |
| 10  | `user_token_b_vault`       | `Pubkey`           |
| 11  | `token_a_vault`            | `Pubkey`           |
| 12  | `token_b_vault`            | `Pubkey`           |
| 13  | `protocol_config`          | `Pubkey`           |
| 14  | `user_lp_position`         | `Pubkey`           |
| 15… | `remaining`                | `Vec<AccountMeta>` |

### `Sell`

Discriminator `33e685a4017f83ad` · data `Sell` · accounts `SellInstructionAccounts`.

| Field    | Type                        |
| -------- | --------------------------- |
| `params` | [`SellParams`](#sellparams) |

Required accounts: 14; extras go to `remaining`.

Fields of `SellInstructionAccounts`, in account order:

| #   | Field                             | Type               |
| --- | --------------------------------- | ------------------ |
| 0   | `token_a_program`                 | `Pubkey`           |
| 1   | `token_b_program`                 | `Pubkey`           |
| 2   | `associated_token_program`        | `Pubkey`           |
| 3   | `system_program`                  | `Pubkey`           |
| 4   | `liquidity_pool_state`            | `Pubkey`           |
| 5   | `user`                            | `Pubkey`           |
| 6   | `token_a_mint`                    | `Pubkey`           |
| 7   | `token_b_mint`                    | `Pubkey`           |
| 8   | `user_token_a_vault`              | `Pubkey`           |
| 9   | `user_token_b_vault`              | `Pubkey`           |
| 10  | `token_a_vault`                   | `Pubkey`           |
| 11  | `token_b_vault`                   | `Pubkey`           |
| 12  | `protocol_config`                 | `Pubkey`           |
| 13  | `instruction_sysvar_account_info` | `Pubkey`           |
| 14… | `remaining`                       | `Vec<AccountMeta>` |

### `SetProtocolSlotFees`

Discriminator `b552130f7ecd98f2` · data `SetProtocolSlotFees` · accounts `SetProtocolSlotFeesInstructionAccounts`.

| Field       | Type                                              |
| ----------- | ------------------------------------------------- |
| `version`   | `u16`                                             |
| `fee_type`  | [`FeeType`](#feetype)                             |
| `slot_fees` | [`SlotFeeBracketsParams`](#slotfeebracketsparams) |

Required accounts: 3; extras go to `remaining`.

Fields of `SetProtocolSlotFeesInstructionAccounts`, in account order:

| #  | Field                   | Type               |
| -- | ----------------------- | ------------------ |
| 0  | `owner`                 | `Pubkey`           |
| 1  | `protocol_config_state` | `Pubkey`           |
| 2  | `protocol_owner_state`  | `Pubkey`           |
| 3… | `remaining`             | `Vec<AccountMeta>` |

### `TransferLpTokens`

Discriminator `ee790e52676d46b4` · data `TransferLpTokens` · accounts `TransferLpTokensInstructionAccounts`.

| Field    | Type  |
| -------- | ----- |
| `amount` | `u64` |

Required accounts: 7; extras go to `remaining`.

Fields of `TransferLpTokensInstructionAccounts`, in account order:

| #  | Field                  | Type               |
| -- | ---------------------- | ------------------ |
| 0  | `system_program`       | `Pubkey`           |
| 1  | `liquidity_pool_state` | `Pubkey`           |
| 2  | `sender`               | `Pubkey`           |
| 3  | `payer`                | `Pubkey`           |
| 4  | `receiver`             | `Pubkey`           |
| 5  | `sender_lp_position`   | `Pubkey`           |
| 6  | `receiver_lp_position` | `Pubkey`           |
| 7… | `remaining`            | `Vec<AccountMeta>` |

### `UpdateAllowCreatePool`

Discriminator `dffce73e60dbf1d6` · data `UpdateAllowCreatePool` · accounts `UpdateAllowCreatePoolInstructionAccounts`.

| Field               | Type   |
| ------------------- | ------ |
| `version`           | `u16`  |
| `allow_create_pool` | `bool` |

Required accounts: 3; extras go to `remaining`.

Fields of `UpdateAllowCreatePoolInstructionAccounts`, in account order:

| #  | Field                   | Type               |
| -- | ----------------------- | ------------------ |
| 0  | `admin`                 | `Pubkey`           |
| 1  | `protocol_config_state` | `Pubkey`           |
| 2  | `protocol_admin_state`  | `Pubkey`           |
| 3… | `remaining`             | `Vec<AccountMeta>` |

### `UpdateCreatorTradingFeeReceiver`

Discriminator `f6e5c84f1f157819` · data `UpdateCreatorTradingFeeReceiver` · accounts `UpdateCreatorTradingFeeReceiverInstructionAccounts`.

No data fields.

Required accounts: 15; extras go to `remaining`.

Fields of `UpdateCreatorTradingFeeReceiverInstructionAccounts`, in account order:

| #   | Field                             | Type               |
| --- | --------------------------------- | ------------------ |
| 0   | `token_a_program`                 | `Pubkey`           |
| 1   | `token_b_program`                 | `Pubkey`           |
| 2   | `associated_token_program`        | `Pubkey`           |
| 3   | `system_program`                  | `Pubkey`           |
| 4   | `liquidity_pool_state`            | `Pubkey`           |
| 5   | `user`                            | `Pubkey`           |
| 6   | `token_a_mint`                    | `Pubkey`           |
| 7   | `token_b_mint`                    | `Pubkey`           |
| 8   | `user_token_a_vault`              | `Pubkey`           |
| 9   | `user_token_b_vault`              | `Pubkey`           |
| 10  | `token_a_vault`                   | `Pubkey`           |
| 11  | `token_b_vault`                   | `Pubkey`           |
| 12  | `protocol_config`                 | `Pubkey`           |
| 13  | `instruction_sysvar_account_info` | `Pubkey`           |
| 14  | `new_receiver`                    | `Pubkey`           |
| 15… | `remaining`                       | `Vec<AccountMeta>` |

### `UpdateProCreatorTradingFeeReceiver`

Discriminator `9cf01bf32aa51f00` · data `UpdateProCreatorTradingFeeReceiver` · accounts `UpdateProCreatorTradingFeeReceiverInstructionAccounts`.

No data fields.

Required accounts: 15; extras go to `remaining`.

Fields of `UpdateProCreatorTradingFeeReceiverInstructionAccounts`, in account order:

| #   | Field                             | Type               |
| --- | --------------------------------- | ------------------ |
| 0   | `token_a_program`                 | `Pubkey`           |
| 1   | `token_b_program`                 | `Pubkey`           |
| 2   | `associated_token_program`        | `Pubkey`           |
| 3   | `system_program`                  | `Pubkey`           |
| 4   | `liquidity_pool_state`            | `Pubkey`           |
| 5   | `user`                            | `Pubkey`           |
| 6   | `token_a_mint`                    | `Pubkey`           |
| 7   | `token_b_mint`                    | `Pubkey`           |
| 8   | `user_token_a_vault`              | `Pubkey`           |
| 9   | `user_token_b_vault`              | `Pubkey`           |
| 10  | `token_a_vault`                   | `Pubkey`           |
| 11  | `token_b_vault`                   | `Pubkey`           |
| 12  | `protocol_config`                 | `Pubkey`           |
| 13  | `instruction_sysvar_account_info` | `Pubkey`           |
| 14  | `new_receiver`                    | `Pubkey`           |
| 15… | `remaining`                       | `Vec<AccountMeta>` |

### `UpdateProtocolConfig`

Discriminator `c5617b36dda80b87` · data `UpdateProtocolConfig` · accounts `UpdateProtocolConfigInstructionAccounts`.

| Field     | Type                                            |
| --------- | ----------------------------------------------- |
| `version` | `u16`                                           |
| `params`  | [`ProtocolConfigParams`](#protocolconfigparams) |

Required accounts: 3; extras go to `remaining`.

Fields of `UpdateProtocolConfigInstructionAccounts`, in account order:

| #  | Field                   | Type               |
| -- | ----------------------- | ------------------ |
| 0  | `owner`                 | `Pubkey`           |
| 1  | `protocol_config_state` | `Pubkey`           |
| 2  | `protocol_owner_state`  | `Pubkey`           |
| 3… | `remaining`             | `Vec<AccountMeta>` |

### `CpiEvent`

Anchor self-CPI that carries one of the program's [events](#events). `data` is the `CpiEvent` enum.

Discriminator `e445a52e51cb9a1d` · data `CpiEvent` · accounts `CpiEventInstructionAccounts`.

Required accounts: 2; extras go to `remaining`.

Fields of `CpiEventInstructionAccounts`, in account order:

| #  | Field             | Type               |
| -- | ----------------- | ------------------ |
| 0  | `program`         | `Pubkey`           |
| 1  | `event_authority` | `Pubkey`           |
| 2… | `remaining`       | `Vec<AccountMeta>` |

## Accounts

Variants of `HeavenAccount`. Each wraps a boxed struct from `carbon_heaven_decoder::accounts::<module>`. `decode_account` only considers accounts owned by `PROGRAM_ID` and returns the first variant that matches.

### `LiquidityPoolState`

Discriminator `be9edc820fa284fc` · `accounts::liquidity_pool_state::LiquidityPoolState`.

| Field                                                                 | Type                                                                    |
| --------------------------------------------------------------------- | ----------------------------------------------------------------------- |
| `info`                                                                | [`LiquidityPoolInfo`](#liquiditypoolinfo)                               |
| `market_cap_based_fees`                                               | [`LiquidityPoolMarketCapBasedFees`](#liquiditypoolmarketcapbasedfees)   |
| `reserve`                                                             | [`LiquidityPoolReserve`](#liquiditypoolreserve)                         |
| `lp_token`                                                            | [`LiquidityPoolLpTokenInfo`](#liquiditypoollptokeninfo)                 |
| `protocol_trading_fees`                                               | `u64`                                                                   |
| `creator_trading_fees`                                                | `u64`                                                                   |
| `creator_trading_fees_claimed_by_creator`                             | `u64`                                                                   |
| `creator_trading_fees_claimed_by_others`                              | `u64`                                                                   |
| `liquidity_provider_trading_fees`                                     | `u64`                                                                   |
| `creator_trading_fee_protocol_fees`                                   | `u64`                                                                   |
| `reflection_trading_fees`                                             | `u64`                                                                   |
| `created_at_slot`                                                     | `u64`                                                                   |
| `trading_volume_usd`                                                  | `f64`                                                                   |
| `creator_trading_fee_trading_volume_threshold`                        | `f64`                                                                   |
| `creator_trading_fee_trading_volume_threshold_reached_unix_timestamp` | `u64`                                                                   |
| `token_a_vault`                                                       | `Pubkey`                                                                |
| `token_b_vault`                                                       | `Pubkey`                                                                |
| `protocol_config`                                                     | `Pubkey`                                                                |
| `key`                                                                 | `Pubkey`                                                                |
| `token_a`                                                             | [`LiquidityPoolTokenInfo`](#liquiditypooltokeninfo)                     |
| `token_b`                                                             | [`LiquidityPoolTokenInfo`](#liquiditypooltokeninfo)                     |
| `allowlist`                                                           | [`LiquidityPoolAllowlist`](#liquiditypoolallowlist)                     |
| `feature_flags`                                                       | [`LiquidityPoolFeatureFlags`](#liquiditypoolfeatureflags)               |
| `taxable_side`                                                        | `u8`                                                                    |
| `taxable_side_type`                                                   | `u8`                                                                    |
| `creator_trading_fee_distribution`                                    | `u8`                                                                    |
| `creator_trading_fee_claim_status`                                    | `u8`                                                                    |
| `fee_configuration_mode`                                              | `u8`                                                                    |
| `is_migrated`                                                         | `u8`                                                                    |
| `pad`                                                                 | `[u8; 13]`                                                              |
| `slot_offset_based_fees`                                              | [`LiquidityPoolSlotOffsetBasedFees`](#liquiditypoolslotoffsetbasedfees) |
| `creator_trading_fee_receiver`                                        | `Pubkey`                                                                |

### `MsolTicketSolSpent`

Discriminator `42c43e867c95fa42` · `accounts::msol_ticket_sol_spent::MsolTicketSolSpent`.

| Field           | Type  |
| --------------- | ----- |
| `cost_basis`    | `u64` |
| `msol_unstaked` | `u64` |

### `ProtocolAdminState`

Discriminator `187caee1e81e73c0` · `accounts::protocol_admin_state::ProtocolAdminState`.

| Field                    | Type     |
| ------------------------ | -------- |
| `current_protocol_admin` | `Pubkey` |

### `ProtocolConfig`

Discriminator `cf5bfa1c98b3d7d1` · `accounts::protocol_config::ProtocolConfig`.

| Field                                          | Type                                                                    |
| ---------------------------------------------- | ----------------------------------------------------------------------- |
| `create_pool_fee`                              | `u64`                                                                   |
| `initial_token_b_amount`                       | `f64`                                                                   |
| `initial_token_a_amount`                       | `u64`                                                                   |
| `unstaked_wsol_reserve`                        | `u64`                                                                   |
| `total_sol_spent`                              | `u64`                                                                   |
| `total_msol_received`                          | `u64`                                                                   |
| `total_realized_profit`                        | `u64`                                                                   |
| `pool_count`                                   | `u64`                                                                   |
| `max_supply_per_wallet`                        | `u64`                                                                   |
| `creator_trading_fee_trading_volume_threshold` | `f64`                                                                   |
| `market_cap_based_fees`                        | [`LiquidityPoolMarketCapBasedFees`](#liquiditypoolmarketcapbasedfees)   |
| `buffer_bps`                                   | `u16`                                                                   |
| `auto_staking_threshold_bps`                   | `u16`                                                                   |
| `version`                                      | `u16`                                                                   |
| `protocol_config_state_bump`                   | `u8`                                                                    |
| `allow_create_pool`                            | `u8`                                                                    |
| `supported_pool_type`                          | `u8`                                                                    |
| `default_leader_slot_window`                   | `u8`                                                                    |
| `auto_staking_enabled`                         | `u8`                                                                    |
| `leader_slot_window`                           | `u8`                                                                    |
| `sandwich_resistence_enabled`                  | `u8`                                                                    |
| `token_a_decimals`                             | `u8`                                                                    |
| `migration_market_cap_threshold`               | `u16`                                                                   |
| `pad`                                          | `[u8; 8]`                                                               |
| `max_creator_trading_fee`                      | `u32`                                                                   |
| `slot_offset_based_fees`                       | [`LiquidityPoolSlotOffsetBasedFees`](#liquiditypoolslotoffsetbasedfees) |

### `ProtocolOwnerState`

Discriminator `d040d1cc71e21662` · `accounts::protocol_owner_state::ProtocolOwnerState`.

| Field                    | Type     |
| ------------------------ | -------- |
| `current_protocol_owner` | `Pubkey` |

### `UserLpPosition`

Discriminator `73cce5cc36b41dc3` · `accounts::user_lp_position::UserLpPosition`.

| Field              | Type     |
| ------------------ | -------- |
| `pool`             | `Pubkey` |
| `user`             | `Pubkey` |
| `lp_token_balance` | `u64`    |
| `reward_debt`      | `u64`    |
| `pending_fees`     | `u64`    |
| `bump`             | `u8`     |

## Events

Variants of `instructions::CpiEvent`, decoded from the `CpiEvent` instruction. Each wraps a struct from `carbon_heaven_decoder::events::<module>`. The discriminator is the 8-byte event discriminator that follows the `e445a52e51cb9a1d` CPI-event tag.

### `CreateLiquidityPoolEvent`

Discriminator `74d8ef8dcfd3b27f` · `events::create_liquidity_pool_event::CreateLiquidityPoolEventEvent`.

| Field                                   | Type     |
| --------------------------------------- | -------- |
| `liquidity_pool_id`                     | `Pubkey` |
| `user`                                  | `Pubkey` |
| `base_token_input_transfer_fee_amount`  | `u64`    |
| `quote_token_input_transfer_fee_amount` | `u64`    |
| `base_token_input_amount`               | `u64`    |
| `quote_token_input_amount`              | `u64`    |
| `lp_token_output_amount`                | `u64`    |
| `locked_lp`                             | `bool`   |

### `CreateStandardLiquidityPoolEvent`

Discriminator `bd3883904b3ff994` · `events::create_standard_liquidity_pool_event::CreateStandardLiquidityPoolEventEvent`.

| Field                          | Type     |
| ------------------------------ | -------- |
| `pool_id`                      | `Pubkey` |
| `payer`                        | `Pubkey` |
| `creator`                      | `Pubkey` |
| `mint`                         | `Pubkey` |
| `config_version`               | `u16`    |
| `initial_token_reserve`        | `u64`    |
| `initial_virtual_wsol_reserve` | `u64`    |

### `CreatingLiquidityPoolEvent`

Discriminator `348004a67ab054cf` · `events::creating_liquidity_pool_event::CreatingLiquidityPoolEventEvent`.

| Field          | Type     |
| -------------- | -------- |
| `id`           | `Pubkey` |
| `base`         | `Pubkey` |
| `quote`        | `Pubkey` |
| `base_amount`  | `u64`    |
| `quote_amount` | `u64`    |

### `HighReflectionFeeEvent`

Discriminator `c6d9e5cd5ed60eb1` · `events::high_reflection_fee_event::HighReflectionFeeEventEvent`.

| Field                   | Type     |
| ----------------------- | -------- |
| `liquidity_pool_id`     | `Pubkey` |
| `reflection_fee_amount` | `u64`    |
| `total_reflection_fees` | `u64`    |

### `MigrationEvent`

Discriminator `ffca4c935be74916` · `events::migration_event::MigrationEventEvent`.

| Field        | Type  |
| ------------ | ----- |
| `market_cap` | `f64` |

### `TradeEvent`

Discriminator `bddb7fd34ee661ee` · `events::trade_event::TradeEventEvent`.

| Field                        | Type  |
| ---------------------------- | ----- |
| `base_reserve`               | `u64` |
| `quote_reserve`              | `u64` |
| `total_creator_trading_fees` | `u64` |
| `total_fee_paid`             | `u64` |
| `price_sol_usd`              | `f64` |
| `base_in`                    | `u64` |
| `base_out`                   | `u64` |
| `quote_in`                   | `u64` |
| `quote_out`                  | `u64` |

### `UserDefinedEvent`

Discriminator `21156c14f1f4a783` · `events::user_defined_event::UserDefinedEventEvent`.

| Field               | Type     |
| ------------------- | -------- |
| `liquidity_pool_id` | `Pubkey` |
| `instruction_name`  | `String` |
| `base64_data`       | `String` |

## Types

Types used by the instructions, accounts and events above, exported from `carbon_heaven_decoder::types`.

### `AddLiquidityParams`

Struct `types::AddLiquidityParams`.

| Field           | Type  |
| --------------- | ----- |
| `max_token_a`   | `u64` |
| `max_token_b`   | `u64` |
| `min_lp_tokens` | `u64` |

### `AdminUpdateLiquidityPoolState`

Enum `types::AdminUpdateLiquidityPoolState`.

| Variant                                      | Fields                                                                           |
| -------------------------------------------- | -------------------------------------------------------------------------------- |
| `CreatorTradingFeeClaimStatus`               | [`CreatorTradingFeeClaimStatus`](#creatortradingfeeclaimstatus)                  |
| `CreatorTradingFeeDistribution`              | [`CreatorTradingFeeDistribution`](#creatortradingfeedistribution)                |
| `CreatorTradingFeeReceiver`                  | `Pubkey`                                                                         |
| `FeeConfigurationMode`                       | [`FeeConfigurationMode`](#feeconfigurationmode)                                  |
| `SlotOffsetBasedFees`                        | `fee_type`: [`FeeType`](#feetype), `fees`: [`SlotFeeBrackets`](#slotfeebrackets) |
| `MarketCapBasedFees`                         | `fee_type`: [`FeeType`](#feetype), `fees`: [`FeeBrackets`](#feebrackets)         |
| `ToggleSwapPermission`                       | `bool`                                                                           |
| `SetCreatorTradingFeeTradingVolumeThreshold` | `f64`                                                                            |

### `BuyParams`

Struct `types::BuyParams`.

| Field                             | Type     |
| --------------------------------- | -------- |
| `max_sol_spend`                   | `u64`    |
| `minimum_amount_out`              | `u64`    |
| `encoded_user_defined_event_data` | `String` |

### `CreateLiquidityPoolEvent`

Struct `types::CreateLiquidityPoolEvent`. Same fields as the [`CreateLiquidityPoolEvent`](#createliquiditypoolevent) event.

### `CreateProLiquidityPoolParams`

Struct `types::CreateProLiquidityPoolParams`.

| Field                               | Type                                                      |
| ----------------------------------- | --------------------------------------------------------- |
| `encoded_user_defined_event_data`   | `String`                                                  |
| `initial_token_a_amount`            | `u64`                                                     |
| `initial_token_b_amount`            | `u64`                                                     |
| `creator_trading_fee`               | [`FeeBracketsParams`](#feebracketsparams)                 |
| `reflection_trading_fee`            | [`Option<FeeBracketsParams>`](#feebracketsparams)         |
| `liquidity_provider_trading_fee`    | [`Option<FeeBracketsParams>`](#feebracketsparams)         |
| `creator_slot_trading_fee`          | [`Option<SlotFeeBracketsParams>`](#slotfeebracketsparams) |
| `enable_same_slot_trading`          | `bool`                                                    |
| `enable_sandwich_resistant_mode`    | `bool`                                                    |
| `enable_deposit_liquidity`          | `bool`                                                    |
| `enable_withdraw_liquidity`         | `bool`                                                    |
| `enable_swap`                       | `bool`                                                    |
| `enable_update_creator_trading_fee` | `bool`                                                    |

### `CreateStandardLiquidityPoolEvent`

Struct `types::CreateStandardLiquidityPoolEvent`. Same fields as the [`CreateStandardLiquidityPoolEvent`](#createstandardliquiditypoolevent) event.

### `CreateStandardLiquidityPoolParams`

Struct `types::CreateStandardLiquidityPoolParams`.

| Field                             | Type     |
| --------------------------------- | -------- |
| `encoded_user_defined_event_data` | `String` |
| `initial_purchase_amount`         | `u64`    |
| `max_sol_spend`                   | `u64`    |

### `CreatingLiquidityPoolEvent`

Struct `types::CreatingLiquidityPoolEvent`. Same fields as the [`CreatingLiquidityPoolEvent`](#creatingliquiditypoolevent) event.

### `CreatorTradingFeeClaimStatus`

Enum `types::CreatorTradingFeeClaimStatus`.

| Variant     |
| ----------- |
| `Unclaimed` |
| `Submitted` |
| `Processed` |

### `CreatorTradingFeeDistribution`

Enum `types::CreatorTradingFeeDistribution`.

| Variant     |
| ----------- |
| `Community` |
| `Creator`   |
| `Blocked`   |
| `Shared`    |

### `FeeBracket`

Struct `types::FeeBracket`.

| Field                    | Type  |
| ------------------------ | ----- |
| `market_cap_upper_bound` | `u64` |
| `buy_fee_bps`            | `u32` |
| `sell_fee_bps`           | `u32` |

### `FeeBrackets`

Struct `types::FeeBrackets`.

| Field      | Type                             |
| ---------- | -------------------------------- |
| `brackets` | [`[FeeBracket; 4]`](#feebracket) |
| `count`    | `u8`                             |
| `padding`  | `[u8; 7]`                        |

### `FeeBracketsParams`

Struct `types::FeeBracketsParams`.

| Field      | Type                             |
| ---------- | -------------------------------- |
| `brackets` | [`Vec<FeeBracket>`](#feebracket) |
| `count`    | `u8`                             |

### `FeeConfigurationMode`

Enum `types::FeeConfigurationMode`.

| Variant  |
| -------- |
| `Global` |
| `Local`  |

### `FeeType`

Enum `types::FeeType`.

| Variant                 |
| ----------------------- |
| `ProtocolFee`           |
| `LiquidityProviderFee`  |
| `CreatorFee`            |
| `CreatorFeeProtocolFee` |
| `ReflectionFee`         |

### `HighReflectionFeeEvent`

Struct `types::HighReflectionFeeEvent`. Same fields as the [`HighReflectionFeeEvent`](#highreflectionfeeevent) event.

### `LiquidityPoolAllowlist`

Struct `types::LiquidityPoolAllowlist`.

| Field                        | Type      |
| ---------------------------- | --------- |
| `swap`                       | `u8`      |
| `remove_liquidity`           | `u8`      |
| `deposit_liquidity`          | `u8`      |
| `same_slot_trading`          | `u8`      |
| `update_creator_trading_fee` | `u8`      |
| `padding1`                   | `[u8; 2]` |

### `LiquidityPoolFeatureFlags`

Struct `types::LiquidityPoolFeatureFlags`.

| Field                     | Type      |
| ------------------------- | --------- |
| `sandwich_resistant_mode` | `u8`      |
| `padding1`                | `[u8; 7]` |

### `LiquidityPoolInfo`

Struct `types::LiquidityPoolInfo`.

| Field                     | Type      |
| ------------------------- | --------- |
| `creator`                 | `Pubkey`  |
| `update_authority`        | `Pubkey`  |
| `open_at`                 | `u64`     |
| `created_at`              | `u64`     |
| `protocol_config_version` | `u16`     |
| `r_type`                  | `u8`      |
| `pool_authority_bump`     | `u8`      |
| `temp_sol_holder_bump`    | `u8`      |
| `pad`                     | `[u8; 3]` |

### `LiquidityPoolLpTokenInfo`

Struct `types::LiquidityPoolLpTokenInfo`.

| Field      | Type                                                        |
| ---------- | ----------------------------------------------------------- |
| `supply`   | [`LiquidityPoolLpTokenSupply`](#liquiditypoollptokensupply) |
| `decimals` | `u8`                                                        |
| `pad`      | `[u8; 7]`                                                   |

### `LiquidityPoolLpTokenSupply`

Struct `types::LiquidityPoolLpTokenSupply`.

| Field      | Type  |
| ---------- | ----- |
| `initial`  | `u64` |
| `total`    | `u64` |
| `unlocked` | `u64` |
| `locked`   | `u64` |
| `burnt`    | `u64` |

### `LiquidityPoolMarketCapBasedFees`

Struct `types::LiquidityPoolMarketCapBasedFees`.

| Field                              | Type                          |
| ---------------------------------- | ----------------------------- |
| `protocol_trading_fee`             | [`FeeBrackets`](#feebrackets) |
| `liquidity_provider_trading_fee`   | [`FeeBrackets`](#feebrackets) |
| `creator_trading_fee`              | [`FeeBrackets`](#feebrackets) |
| `creator_trading_fee_protocol_fee` | [`FeeBrackets`](#feebrackets) |
| `reflection_trading_fee`           | [`FeeBrackets`](#feebrackets) |

### `LiquidityPoolReserve`

Struct `types::LiquidityPoolReserve`.

| Field                          | Type      |
| ------------------------------ | --------- |
| `token_a`                      | `u64`     |
| `token_b`                      | `u64`     |
| `snapshot_slot`                | `u64`     |
| `snapshot_a`                   | `u64`     |
| `snapshot_b`                   | `u64`     |
| `accumulated_fee_per_lp_token` | `u64`     |
| `initial_a`                    | `u64`     |
| `initial_b`                    | `u64`     |
| `leader_slot_window`           | `u8`      |
| `pad`                          | `[u8; 7]` |

### `LiquidityPoolSlotOffsetBasedFees`

Struct `types::LiquidityPoolSlotOffsetBasedFees`.

| Field                              | Type                                  |
| ---------------------------------- | ------------------------------------- |
| `protocol_trading_fee`             | [`SlotFeeBrackets`](#slotfeebrackets) |
| `liquidity_provider_trading_fee`   | [`SlotFeeBrackets`](#slotfeebrackets) |
| `creator_trading_fee`              | [`SlotFeeBrackets`](#slotfeebrackets) |
| `creator_trading_fee_protocol_fee` | [`SlotFeeBrackets`](#slotfeebrackets) |
| `reflection_trading_fee`           | [`SlotFeeBrackets`](#slotfeebrackets) |
| `pad`                              | `[u8; 6]`                             |

### `LiquidityPoolTokenInfo`

Struct `types::LiquidityPoolTokenInfo`.

| Field      | Type     |
| ---------- | -------- |
| `mint`     | `Pubkey` |
| `decimals` | `u8`     |
| `owner`    | `Pubkey` |

### `LiquidityPoolType`

Enum `types::LiquidityPoolType`.

| Variant    |
| ---------- |
| `None`     |
| `Pro`      |
| `Standard` |

### `MigrationEvent`

Struct `types::MigrationEvent`. Same fields as the [`MigrationEvent`](#migrationevent) event.

### `ProtocolConfigParams`

Struct `types::ProtocolConfigParams`.

| Field                                          | Type                                                                  |
| ---------------------------------------------- | --------------------------------------------------------------------- |
| `create_pool_fee`                              | `u64`                                                                 |
| `allow_create_pool`                            | `bool`                                                                |
| `supported_pool_type`                          | [`LiquidityPoolType`](#liquiditypooltype)                             |
| `market_cap_based_fees`                        | [`LiquidityPoolMarketCapBasedFees`](#liquiditypoolmarketcapbasedfees) |
| `initial_token_b_amount`                       | `f64`                                                                 |
| `initial_token_a_amount`                       | `u64`                                                                 |
| `default_leader_slot_window`                   | `u8`                                                                  |
| `auto_staking_enabled`                         | `bool`                                                                |
| `sandwich_resistence_enabled`                  | `bool`                                                                |
| `buffer_bps`                                   | `u16`                                                                 |
| `auto_staking_threshold_bps`                   | `u16`                                                                 |
| `token_a_decimals`                             | `u8`                                                                  |
| `max_creator_trading_fee`                      | `u32`                                                                 |
| `max_supply_per_wallet`                        | `u64`                                                                 |
| `creator_trading_fee_trading_volume_threshold` | `f64`                                                                 |
| `migration_market_cap_threshold`               | `u16`                                                                 |

### `RemoveLiquidityParams`

Struct `types::RemoveLiquidityParams`.

| Field               | Type  |
| ------------------- | ----- |
| `lp_tokens_to_burn` | `u64` |
| `min_token_a`       | `u64` |
| `min_token_b`       | `u64` |

### `SellParams`

Struct `types::SellParams`.

| Field                             | Type     |
| --------------------------------- | -------- |
| `amount_in`                       | `u64`    |
| `minimum_amount_out`              | `u64`    |
| `encoded_user_defined_event_data` | `String` |

### `SlotFeeBracket`

Struct `types::SlotFeeBracket`.

| Field                    | Type  |
| ------------------------ | ----- |
| `buy_fee_bps`            | `u16` |
| `sell_fee_bps`           | `u16` |
| `slot_offset_upperbound` | `u16` |

### `SlotFeeBrackets`

Struct `types::SlotFeeBrackets`.

| Field             | Type                                      |
| ----------------- | ----------------------------------------- |
| `brackets`        | [`[SlotFeeBracket; 42]`](#slotfeebracket) |
| `max_slot_offset` | `u16`                                     |
| `max_fee_bps`     | `u16`                                     |
| `count`           | `u8`                                      |
| `enabled`         | `u8`                                      |
| `padding`         | `[u8; 4]`                                 |

### `SlotFeeBracketsParams`

Struct `types::SlotFeeBracketsParams`.

| Field             | Type                                     |
| ----------------- | ---------------------------------------- |
| `brackets`        | [`Vec<SlotFeeBracket>`](#slotfeebracket) |
| `max_slot_offset` | `u16`                                    |
| `max_fee_bps`     | `u16`                                    |
| `count`           | `u8`                                     |
| `enabled`         | `u8`                                     |

### `TradeEvent`

Struct `types::TradeEvent`. Same fields as the [`TradeEvent`](#tradeevent) event.

### `UserDefinedEvent`

Struct `types::UserDefinedEvent`. Same fields as the [`UserDefinedEvent`](#userdefinedevent) event.

---

Carbon 2.0.0 documentation · Web: https://carbon.sevenlabs.org/decoders/heaven · Last updated 2026-11-09 · Index of all pages: https://carbon.sevenlabs.org/llms.txt
