{
  "address": "xmm9LkUX7yWLoMNEpeGwxtVF8BZjJsNUih5bqx1in1Z",
  "metadata": {
    "name": "carbium-xmm",
    "version": "0.2.0",
    "spec": "0.1.0",
    "description": "Carbium xMM: oracle-anchored + CLMM Solana AMM (concentrated-liquidity and posted-price pools). 1-byte instruction + account discriminators (not Anchor's 8-byte hash); all body scalars little-endian; index-bearing PDA seeds big-endian."
  },
  "instructions": [
    {
      "name": "ping",
      "docs": [
        "disc 0: CU-floor probe. Validates nothing, returns Ok."
      ],
      "discriminator": [
        0
      ],
      "accounts": [],
      "args": []
    },
    {
      "name": "create_pool",
      "docs": [
        "disc 2: initialize a PoolStateClmm + both vaults + observation ring + bitmap-extension + per-pool Core collection.",
        "BODY: pool_nonce u32 | sqrt_price_x64 u128 | name (len u8 + bytes) | uri (len u8 + bytes).",
        "After these args: name_len u8 | name | uri_len u8 | uri.",
        "Optional tail after the uri (each field only with every one before it; tail length 0, 4, 18, 50, 58 or 68, else 6003): fee_rate u32 (whole 0.01 bp steps, 1,000 to 100,000,000) | automatic-fee constants [u8;14] (filter u16 | decay u16 | reduction u16 | control u32 | va_max u32; all zero = flat; else within Raydium's bounds against the fee and the tier's tick spacing, else 6011) | guardian pubkey (zero = none; never the creator, else 6003) | open_time u64 (unix seconds swaps wait for; 0 = now; at most 72 h ahead, else 6003). | launch_fee u32 (0 = none; else whole 0.01 bp steps above the pool's fee up to 500,000,000 = 50%, else 6011) | launch_half_life u32 (seconds, 60 to 86,400 with a launch fee, 0 without, else 6003) | creator_share u16 (of 10,000 of every swap fee, at most 5,000, else 6011). Absent fields keep the tier's fee and constants, no guardian, no start time, no launch fee and no creator share.",
        "A launch fee halves every launch_half_life seconds from the start time or the creation, whichever is later, in a straight line between halvings, down to the pool's fee; the automatic fee adds to it. The creator's share comes out of every fee before the LPs' fee growth and is paid by collect_creator_fees."
      ],
      "discriminator": [
        2
      ],
      "accounts": [
        {
          "name": "creator",
          "writable": true,
          "signer": true,
          "docs": [
            "funds rent; also Core collection signer"
          ]
        },
        {
          "name": "amm_config",
          "writable": false,
          "signer": false,
          "docs": [
            "decoded for tick_spacing/fee"
          ]
        },
        {
          "name": "pool",
          "writable": true,
          "signer": false,
          "docs": [
            "PDA [b\"pool\", amm_config, mint_0, mint_1, pool_nonce_le]"
          ]
        },
        {
          "name": "token_mint_0",
          "writable": false,
          "signer": false,
          "docs": [
            "addr(mint_0) < addr(mint_1)"
          ]
        },
        {
          "name": "token_mint_1",
          "writable": false,
          "signer": false
        },
        {
          "name": "token_vault_0",
          "writable": true,
          "signer": false,
          "docs": [
            "PDA [b\"pool_vault\", pool, mint_0]"
          ]
        },
        {
          "name": "token_vault_1",
          "writable": true,
          "signer": false,
          "docs": [
            "PDA [b\"pool_vault\", pool, mint_1]"
          ]
        },
        {
          "name": "observation",
          "writable": true,
          "signer": false,
          "docs": [
            "PDA [b\"observation\", pool]"
          ]
        },
        {
          "name": "bitmap_extension",
          "writable": true,
          "signer": false,
          "docs": [
            "PDA [b\"pool_tick_array_bitmap_extension\", pool]"
          ]
        },
        {
          "name": "collection",
          "writable": true,
          "signer": false,
          "docs": [
            "PDA [b\"collection\", pool]; self-signs via its seeds. Lamports sent to it first cannot stop the create"
          ]
        },
        {
          "name": "token_program_0",
          "writable": false,
          "signer": false,
          "docs": [
            "== owner(mint_0)"
          ]
        },
        {
          "name": "token_program_1",
          "writable": false,
          "signer": false,
          "docs": [
            "== owner(mint_1)"
          ]
        },
        {
          "name": "mpl_core",
          "writable": false,
          "signer": false,
          "address": "CoREENxT6tW1HoK8ypY1SxRMZTcVPm7R94rH4PZNhX7d"
        },
        {
          "name": "system_program",
          "writable": false,
          "signer": false,
          "address": "11111111111111111111111111111111"
        }
      ],
      "args": [
        {
          "name": "pool_nonce",
          "type": "u32"
        },
        {
          "name": "sqrt_price_x64",
          "type": "u128"
        }
      ]
    },
    {
      "name": "open_position",
      "docs": [
        "disc 3: init a PositionState PDA keyed to a Core asset, mint the position NFT, lazily init the two boundary tick arrays. Liquidity starts at 0.",
        "Refused while the pool is paused by bit 0 or bit 4 (6038). The client picks the nonce, so opens in flight cannot collide. Returns asset | position."
      ],
      "discriminator": [
        3
      ],
      "accounts": [
        {
          "name": "payer",
          "writable": true,
          "signer": true,
          "docs": [
            "funds rent; NFT owner; recorded as rent_receiver"
          ]
        },
        {
          "name": "pool",
          "writable": true,
          "signer": false,
          "docs": [
            "decoded for tick_spacing; collection update authority"
          ]
        },
        {
          "name": "position",
          "writable": true,
          "signer": false,
          "docs": [
            "PDA [b\"position\", asset]"
          ]
        },
        {
          "name": "asset",
          "writable": true,
          "signer": false,
          "docs": [
            "PDA [b\"asset\", pool, payer, nonce_le]; self-signs via its seeds. A used nonce refuses"
          ]
        },
        {
          "name": "collection",
          "writable": true,
          "signer": false,
          "docs": [
            "the pool's own PDA [b\"collection\", pool], else 6007"
          ]
        },
        {
          "name": "tick_array_lower",
          "writable": true,
          "signer": false,
          "docs": [
            "PDA [b\"tick_array\", pool, lower_start_be]"
          ]
        },
        {
          "name": "tick_array_upper",
          "writable": true,
          "signer": false,
          "docs": [
            "PDA [b\"tick_array\", pool, upper_start_be]"
          ]
        },
        {
          "name": "mpl_core",
          "writable": false,
          "signer": false,
          "address": "CoREENxT6tW1HoK8ypY1SxRMZTcVPm7R94rH4PZNhX7d"
        },
        {
          "name": "system_program",
          "writable": false,
          "signer": false,
          "address": "11111111111111111111111111111111"
        }
      ],
      "args": [
        {
          "name": "tick_lower_index",
          "type": "i32"
        },
        {
          "name": "tick_upper_index",
          "type": "i32"
        },
        {
          "name": "nonce",
          "type": "u32"
        }
      ]
    },
    {
      "name": "increase_liquidity",
      "docs": [
        "disc 4: add liquidity to a position (deposit amounts round UP). bitmap_extension (idx 12) is OPTIONAL: required only when a boundary tick-array start is outside the pool-internal window.",
        "A short deposit refuses 6004; refused while the pool is paused by bit 0 or bit 4. Returns liquidity_delta u128 | amount_0 | amount_1."
      ],
      "discriminator": [
        4
      ],
      "accounts": [
        {
          "name": "owner",
          "writable": false,
          "signer": true,
          "docs": [
            "gated by assert_asset_owner"
          ]
        },
        {
          "name": "pool",
          "writable": true,
          "signer": false
        },
        {
          "name": "position",
          "writable": true,
          "signer": false,
          "docs": [
            "PDA [b\"position\", asset]"
          ]
        },
        {
          "name": "asset",
          "writable": false,
          "signer": false,
          "docs": [
            "Core NFT; ownership gate target"
          ]
        },
        {
          "name": "tick_array_lower",
          "writable": true,
          "signer": false
        },
        {
          "name": "tick_array_upper",
          "writable": true,
          "signer": false
        },
        {
          "name": "token_owner_0",
          "writable": true,
          "signer": false,
          "docs": [
            "user src ATA (mint_0)"
          ]
        },
        {
          "name": "token_owner_1",
          "writable": true,
          "signer": false,
          "docs": [
            "user src ATA (mint_1)"
          ]
        },
        {
          "name": "token_vault_0",
          "writable": true,
          "signer": false,
          "docs": [
            "== pool.token_vault_0"
          ]
        },
        {
          "name": "token_vault_1",
          "writable": true,
          "signer": false,
          "docs": [
            "== pool.token_vault_1"
          ]
        },
        {
          "name": "token_program_0",
          "writable": false,
          "signer": false
        },
        {
          "name": "token_program_1",
          "writable": false,
          "signer": false
        },
        {
          "name": "bitmap_extension",
          "writable": true,
          "signer": false,
          "optional": true,
          "docs": [
            "OPTIONAL; PDA [b\"pool_tick_array_bitmap_extension\", pool]"
          ]
        }
      ],
      "args": [
        {
          "name": "amount_0_max",
          "type": "u64"
        },
        {
          "name": "amount_1_max",
          "type": "u64"
        },
        {
          "name": "amount_0_min",
          "type": "u64"
        },
        {
          "name": "amount_1_min",
          "type": "u64"
        }
      ]
    },
    {
      "name": "decrease_liquidity",
      "docs": [
        "disc 5: remove liquidity from a position (withdraw amounts round DOWN); pool PDA signs the vault-out transfers. bitmap_extension (idx 12) is OPTIONAL.",
        "No status bit stops it; a position its holder locked (lock_position) keeps any liquidity until lock_until (6067). Returns amount_0 | amount_1."
      ],
      "discriminator": [
        5
      ],
      "accounts": [
        {
          "name": "owner",
          "writable": false,
          "signer": true,
          "docs": [
            "gated by assert_asset_owner"
          ]
        },
        {
          "name": "pool",
          "writable": true,
          "signer": false,
          "docs": [
            "PDA signs vault-out"
          ]
        },
        {
          "name": "position",
          "writable": true,
          "signer": false,
          "docs": [
            "PDA [b\"position\", asset]"
          ]
        },
        {
          "name": "asset",
          "writable": false,
          "signer": false,
          "docs": [
            "Core NFT; ownership gate target"
          ]
        },
        {
          "name": "tick_array_lower",
          "writable": true,
          "signer": false
        },
        {
          "name": "tick_array_upper",
          "writable": true,
          "signer": false
        },
        {
          "name": "token_owner_0",
          "writable": true,
          "signer": false,
          "docs": [
            "user dst ATA (mint_0)"
          ]
        },
        {
          "name": "token_owner_1",
          "writable": true,
          "signer": false,
          "docs": [
            "user dst ATA (mint_1)"
          ]
        },
        {
          "name": "token_vault_0",
          "writable": true,
          "signer": false,
          "docs": [
            "== pool.token_vault_0"
          ]
        },
        {
          "name": "token_vault_1",
          "writable": true,
          "signer": false,
          "docs": [
            "== pool.token_vault_1"
          ]
        },
        {
          "name": "token_program_0",
          "writable": false,
          "signer": false
        },
        {
          "name": "token_program_1",
          "writable": false,
          "signer": false
        },
        {
          "name": "bitmap_extension",
          "writable": true,
          "signer": false,
          "optional": true,
          "docs": [
            "OPTIONAL; PDA [b\"pool_tick_array_bitmap_extension\", pool]"
          ]
        }
      ],
      "args": [
        {
          "name": "liquidity",
          "type": "u128"
        },
        {
          "name": "amount_0_min",
          "type": "u64"
        },
        {
          "name": "amount_1_min",
          "type": "u64"
        }
      ]
    },
    {
      "name": "swap",
      "docs": [
        "disc 6: exact-in/exact-out tick-array-window walk. zero_for_one is inferred from input_vault == pool.token_vault_0. TAIL after the 10-account head: bitmap_extension FIRST, then up to 12 tick-array PDAs (the swap window). sqrt_price_limit_x64 == 0 => direction-appropriate bound.",
        "Needs a tick array at the current tick, so a client prepends create_tick_array (24) when it is missing. With no price limit an exact-out swap must fill fully. Returns amount_in | amount_out."
      ],
      "discriminator": [
        6
      ],
      "accounts": [
        {
          "name": "payer",
          "writable": false,
          "signer": true,
          "docs": [
            "funds + authority for input transfer"
          ]
        },
        {
          "name": "amm_config",
          "writable": false,
          "signer": false
        },
        {
          "name": "pool",
          "writable": true,
          "signer": false,
          "docs": [
            "quote source + writeback; PDA signs output vault"
          ]
        },
        {
          "name": "input_token_account",
          "writable": true,
          "signer": false,
          "docs": [
            "user src ATA (input mint)"
          ]
        },
        {
          "name": "output_token_account",
          "writable": true,
          "signer": false,
          "docs": [
            "user dst ATA (output mint)"
          ]
        },
        {
          "name": "input_vault",
          "writable": true,
          "signer": false,
          "docs": [
            "== pool.token_vault_{0|1}"
          ]
        },
        {
          "name": "output_vault",
          "writable": true,
          "signer": false,
          "docs": [
            "== pool.token_vault_{1|0}"
          ]
        },
        {
          "name": "observation",
          "writable": true,
          "signer": false,
          "docs": [
            "TWAP ring (tick_cumulative)"
          ]
        },
        {
          "name": "input_token_program",
          "writable": false,
          "signer": false,
          "docs": [
            "routes input vault (== input vault owner)"
          ]
        },
        {
          "name": "output_token_program",
          "writable": false,
          "signer": false,
          "docs": [
            "routes output vault (== output vault owner)"
          ]
        }
      ],
      "args": [
        {
          "name": "amount",
          "type": "u64"
        },
        {
          "name": "other_amount_threshold",
          "type": "u64"
        },
        {
          "name": "sqrt_price_limit_x64",
          "type": "u128"
        },
        {
          "name": "is_base_input",
          "type": "bool"
        }
      ]
    },
    {
      "name": "collect_fees",
      "docs": [
        "disc 7: pay accrued fees to the position owner (pool PDA signs vault-out), zero owed + re-snapshot fee_growth_inside.",
        "No status bit stops it. A full-range or empty position reads no tick array. Returns fee_0 | fee_1."
      ],
      "discriminator": [
        7
      ],
      "accounts": [
        {
          "name": "owner",
          "writable": false,
          "signer": true,
          "docs": [
            "gated by assert_asset_owner"
          ]
        },
        {
          "name": "pool",
          "writable": false,
          "signer": false,
          "docs": [
            "fee_growth_global source; PDA signs vault-out"
          ]
        },
        {
          "name": "position",
          "writable": true,
          "signer": false,
          "docs": [
            "PDA [b\"position\", asset]"
          ]
        },
        {
          "name": "asset",
          "writable": false,
          "signer": false,
          "docs": [
            "Core NFT; ownership gate target"
          ]
        },
        {
          "name": "token_owner_0",
          "writable": true,
          "signer": false,
          "docs": [
            "user dst ATA (mint_0)"
          ]
        },
        {
          "name": "token_owner_1",
          "writable": true,
          "signer": false,
          "docs": [
            "user dst ATA (mint_1)"
          ]
        },
        {
          "name": "token_vault_0",
          "writable": true,
          "signer": false,
          "docs": [
            "== pool.token_vault_0"
          ]
        },
        {
          "name": "token_vault_1",
          "writable": true,
          "signer": false,
          "docs": [
            "== pool.token_vault_1"
          ]
        },
        {
          "name": "token_program_0",
          "writable": false,
          "signer": false
        },
        {
          "name": "token_program_1",
          "writable": false,
          "signer": false
        },
        {
          "name": "tick_array_lower",
          "writable": false,
          "signer": false,
          "docs": [
            "fee_growth_outside source"
          ]
        },
        {
          "name": "tick_array_upper",
          "writable": false,
          "signer": false,
          "docs": [
            "fee_growth_outside source"
          ]
        }
      ],
      "args": []
    },
    {
      "name": "close_position",
      "docs": [
        "disc 8: close an empty position (liquidity==0 AND owed==0), burn the Core NFT, reclaim PositionState rent to position.rent_receiver."
      ],
      "discriminator": [
        8
      ],
      "accounts": [
        {
          "name": "owner",
          "writable": true,
          "signer": true,
          "docs": [
            "assert_asset_owner; BurnV1 payer/authority"
          ]
        },
        {
          "name": "position",
          "writable": true,
          "signer": false,
          "docs": [
            "PDA [b\"position\", asset]"
          ]
        },
        {
          "name": "asset",
          "writable": true,
          "signer": false,
          "docs": [
            "Core NFT to burn; ownership gate target"
          ]
        },
        {
          "name": "collection",
          "writable": true,
          "signer": false,
          "docs": [
            "the pool's Core collection (counter)"
          ]
        },
        {
          "name": "rent_receiver",
          "writable": true,
          "signer": false,
          "docs": [
            "== position.rent_receiver"
          ]
        },
        {
          "name": "mpl_core",
          "writable": false,
          "signer": false,
          "address": "CoREENxT6tW1HoK8ypY1SxRMZTcVPm7R94rH4PZNhX7d"
        },
        {
          "name": "system_program",
          "writable": false,
          "signer": false,
          "address": "11111111111111111111111111111111"
        },
        {
          "name": "pool",
          "writable": true,
          "signer": false,
          "docs": [
            "== position.pool_id; its open position count falls by one"
          ]
        }
      ],
      "args": []
    },
    {
      "name": "swap_anchor",
      "docs": [
        "disc 18: linear posted-price maker swap (exact-in). Direction inferred from input_vault == pool.token_vault_0. Zero protocol fee; gates (paused/stale/capacity/slippage) revert.",
        "Returns amount_in | amount_out."
      ],
      "discriminator": [
        18
      ],
      "accounts": [
        {
          "name": "payer",
          "writable": false,
          "signer": true,
          "docs": [
            "input transfer authority"
          ]
        },
        {
          "name": "pool",
          "writable": true,
          "signer": false,
          "docs": [
            "quote source; PDA signs output"
          ]
        },
        {
          "name": "input_token_account",
          "writable": true,
          "signer": false,
          "docs": [
            "user src ATA (input mint)"
          ]
        },
        {
          "name": "output_token_account",
          "writable": true,
          "signer": false,
          "docs": [
            "user dst ATA (output mint)"
          ]
        },
        {
          "name": "input_vault",
          "writable": true,
          "signer": false,
          "docs": [
            "== pool.token_vault_{0|1}"
          ]
        },
        {
          "name": "output_vault",
          "writable": true,
          "signer": false,
          "docs": [
            "== pool.token_vault_{1|0}"
          ]
        },
        {
          "name": "input_token_program",
          "writable": false,
          "signer": false,
          "docs": [
            "routes input vault"
          ]
        },
        {
          "name": "output_token_program",
          "writable": false,
          "signer": false,
          "docs": [
            "routes output vault"
          ]
        }
      ],
      "args": [
        {
          "name": "amount",
          "type": "u64"
        },
        {
          "name": "other_amount_threshold",
          "type": "u64"
        }
      ]
    },
    {
      "name": "create_tick_array",
      "docs": [
        "disc 24: create + init an EMPTY TickArrayState PDA for a CLMM pool at a given array start index. Permissionless and idempotent (an array already owned by this program is a no-op success): it only allocates rent for a program-owned, all-zero array so an in-range/full-range pool is tradeable. Moves no funds, grants no authority, sets no bitmap bit.",
        "The payer is recorded and is the only account the rent returns to."
      ],
      "discriminator": [
        24
      ],
      "accounts": [
        {
          "name": "payer",
          "writable": true,
          "signer": true,
          "docs": [
            "funds the rent"
          ]
        },
        {
          "name": "pool",
          "writable": false,
          "signer": false,
          "docs": [
            "PoolStateClmm; gives tick_spacing, binds pool_id"
          ]
        },
        {
          "name": "tick_array",
          "writable": true,
          "signer": false,
          "docs": [
            "PDA [b\"tick_array\", pool, start_index_be]"
          ]
        },
        {
          "name": "system_program",
          "writable": false,
          "signer": false,
          "address": "11111111111111111111111111111111"
        }
      ],
      "args": [
        {
          "name": "start_index",
          "type": "i32"
        }
      ]
    },
    {
      "name": "close_tick_array",
      "discriminator": [
        29
      ],
      "docs": [
        "disc 29: close an empty tick array; its rent goes to who paid for it. On a live pool the authority is the pool owner, or the array's own payer when it is not the array holding the current tick, and the array must be empty (6049); on a closed pool anyone may ask."
      ],
      "accounts": [
        {
          "name": "payer",
          "writable": true,
          "signer": false,
          "docs": [
            "== tick_array.payer; gets the rent"
          ]
        },
        {
          "name": "tick_array",
          "writable": true,
          "signer": false
        },
        {
          "name": "pool",
          "writable": false,
          "signer": false,
          "docs": [
            "== tick_array.pool_id"
          ]
        },
        {
          "name": "authority",
          "writable": false,
          "signer": true,
          "optional": true,
          "docs": [
            "live pool only: == pool.owner"
          ]
        }
      ],
      "args": []
    },
    {
      "name": "swap_anchor_batch",
      "discriminator": [
        31
      ],
      "docs": [
        "disc 31: up to 31 posted-price fills in one instruction (32 refuses). After count: count legs of direction u8 (0 = base to quote, 1 = quote to base) | amount u64 | other_amount_threshold u64; the body is exactly 1 + 17 * count bytes. Returns one amount_in | amount_out per leg."
      ],
      "accounts": [
        {
          "name": "payer",
          "writable": false,
          "signer": true
        },
        {
          "name": "pool",
          "writable": true,
          "signer": false
        },
        {
          "name": "user_a",
          "writable": true,
          "signer": false,
          "docs": [
            "the user's ATA of mint_0"
          ]
        },
        {
          "name": "user_b",
          "writable": true,
          "signer": false,
          "docs": [
            "the user's ATA of mint_1"
          ]
        },
        {
          "name": "vault_0",
          "writable": true,
          "signer": false,
          "docs": [
            "== pool.token_vault_0"
          ]
        },
        {
          "name": "vault_1",
          "writable": true,
          "signer": false,
          "docs": [
            "== pool.token_vault_1"
          ]
        },
        {
          "name": "token_program_0",
          "writable": false,
          "signer": false
        },
        {
          "name": "token_program_1",
          "writable": false,
          "signer": false
        }
      ],
      "args": [
        {
          "name": "count",
          "type": "u8"
        }
      ]
    },
    {
      "name": "close_position_all",
      "discriminator": [
        34
      ],
      "docs": [
        "disc 34: withdraw everything, collect, burn the Core NFT and close, in one instruction. The minimums guard the principal and must be 0 on an empty position. Returns amount_0 | amount_1 | fee_0 | fee_1. Refused before a locked position's lock_until (6067)."
      ],
      "accounts": [
        {
          "name": "owner",
          "writable": true,
          "signer": true,
          "docs": [
            "gated by assert_asset_owner; pays the burn"
          ]
        },
        {
          "name": "pool",
          "writable": true,
          "signer": false,
          "docs": [
            "== position.pool_id; its PDA signs the vault transfers"
          ]
        },
        {
          "name": "position",
          "writable": true,
          "signer": false,
          "docs": [
            "PDA [b\"position\", asset]"
          ]
        },
        {
          "name": "asset",
          "writable": true,
          "signer": false,
          "docs": [
            "the Core NFT, burned"
          ]
        },
        {
          "name": "tick_array_lower",
          "writable": true,
          "signer": false
        },
        {
          "name": "tick_array_upper",
          "writable": true,
          "signer": false
        },
        {
          "name": "token_owner_0",
          "writable": true,
          "signer": false,
          "docs": [
            "user ATA (mint_0)"
          ]
        },
        {
          "name": "token_owner_1",
          "writable": true,
          "signer": false,
          "docs": [
            "user ATA (mint_1)"
          ]
        },
        {
          "name": "token_vault_0",
          "writable": true,
          "signer": false
        },
        {
          "name": "token_vault_1",
          "writable": true,
          "signer": false
        },
        {
          "name": "token_program_0",
          "writable": false,
          "signer": false
        },
        {
          "name": "token_program_1",
          "writable": false,
          "signer": false
        },
        {
          "name": "bitmap_extension",
          "writable": true,
          "signer": false
        },
        {
          "name": "collection",
          "writable": true,
          "signer": false,
          "docs": [
            "the pool's own PDA"
          ]
        },
        {
          "name": "rent_receiver",
          "writable": true,
          "signer": false,
          "docs": [
            "== position.rent_receiver"
          ]
        },
        {
          "name": "mpl_core",
          "writable": false,
          "signer": false,
          "address": "CoREENxT6tW1HoK8ypY1SxRMZTcVPm7R94rH4PZNhX7d"
        },
        {
          "name": "system_program",
          "writable": false,
          "signer": false,
          "address": "11111111111111111111111111111111"
        }
      ],
      "args": [
        {
          "name": "amount_0_min",
          "type": "u64"
        },
        {
          "name": "amount_1_min",
          "type": "u64"
        }
      ]
    },
    {
      "name": "swap_anchor_signed",
      "docs": [
        "disc 35: a maker fill at a price the pool's quote key co-signs (exact-in). Direction inferred from input_vault == pool.token_vault_0. Nothing is posted: the fill reads no price, band, haircut or round mode from the pool; it pays the pool's size price on the slot's quote above the pool's size_free (the area above it only; every other fill pays from 0), and adds its signed notional to cosign_volume (offset 776). Gates (paused, quote key, expiry, reference, capacity, slippage) revert.",
        "Returns amount_in | amount_out."
      ],
      "discriminator": [
        35
      ],
      "accounts": [
        {
          "name": "payer",
          "writable": false,
          "signer": true,
          "docs": [
            "input transfer authority"
          ]
        },
        {
          "name": "pool",
          "writable": true,
          "signer": false,
          "docs": [
            "quote_key, limits; PDA signs output"
          ]
        },
        {
          "name": "input_token_account",
          "writable": true,
          "signer": false,
          "docs": [
            "user src ATA (input mint)"
          ]
        },
        {
          "name": "output_token_account",
          "writable": true,
          "signer": false,
          "docs": [
            "user dst ATA (output mint)"
          ]
        },
        {
          "name": "input_vault",
          "writable": true,
          "signer": false,
          "docs": [
            "== pool.token_vault_{0|1}"
          ]
        },
        {
          "name": "output_vault",
          "writable": true,
          "signer": false,
          "docs": [
            "== pool.token_vault_{1|0}"
          ]
        },
        {
          "name": "input_token_program",
          "writable": false,
          "signer": false,
          "docs": [
            "routes input vault"
          ]
        },
        {
          "name": "output_token_program",
          "writable": false,
          "signer": false,
          "docs": [
            "routes output vault"
          ]
        },
        {
          "name": "quote_key",
          "writable": false,
          "signer": true,
          "docs": [
            "== pool.quote_key"
          ]
        },
        {
          "name": "ref_base",
          "writable": false,
          "signer": false,
          "docs": [
            "== pool.ref_base"
          ]
        },
        {
          "name": "ref_quote",
          "writable": false,
          "signer": false,
          "docs": [
            "== pool.ref_quote"
          ]
        }
      ],
      "args": [
        {
          "name": "amount",
          "type": "u64"
        },
        {
          "name": "other_amount_threshold",
          "type": "u64"
        },
        {
          "name": "price_x64",
          "type": "u128",
          "docs": [
            "the fill price, spread included: token_1 per token_0, times 2^64"
          ]
        },
        {
          "name": "expiry_slot",
          "type": "u64",
          "docs": [
            "refused past this slot, or if it sits more than pool.signed_max_slots ahead"
          ]
        }
      ]
    },
    {
      "name": "swap_anchor_attested",
      "docs": [
        "disc 36: a one-signer maker fill (exact-in) at a price the pool's quote key signed for this trader, read from the ed25519 instruction at sig_ix in the same transaction, so a router can call it by CPI. Direction from the vaults, bound to the signed side. Each price fills once, up to its max_quote, from its issue slot to 16 slots after it, flat at any slot of its life; the larger of its own size band and the pool's widens it with the slot's quote filled, and the pool's lean shifts it as it does a posted fill's. Gates (paused, quote key, attestation, age, cap, reference, replay, capacity, slippage) revert.",
        "The signed message, 153 bytes LE: \"xmm-att\" | version 1 | program_id | pool | trader | side u8 (0 = token_0 in) | price_x64 u128 | size_band u64 | max_quote u64 | issue_slot u64 | seq u64. The ed25519 instruction holds exactly one signature by pool.quote_key over it, inline (every instruction index 0xffff).",
        "Returns amount_in | amount_out."
      ],
      "discriminator": [
        36
      ],
      "accounts": [
        {
          "name": "trader",
          "writable": false,
          "signer": true,
          "docs": [
            "== the message's trader; input transfer authority"
          ]
        },
        {
          "name": "pool",
          "writable": true,
          "signer": false,
          "docs": [
            "== the message's pool; quote_key, limits; PDA signs output"
          ]
        },
        {
          "name": "input_token_account",
          "writable": true,
          "signer": false,
          "docs": [
            "user src ATA (input mint)"
          ]
        },
        {
          "name": "output_token_account",
          "writable": true,
          "signer": false,
          "docs": [
            "user dst ATA (output mint)"
          ]
        },
        {
          "name": "input_vault",
          "writable": true,
          "signer": false,
          "docs": [
            "== pool.token_vault_{0|1}, the message's side"
          ]
        },
        {
          "name": "output_vault",
          "writable": true,
          "signer": false,
          "docs": [
            "== pool.token_vault_{1|0}"
          ]
        },
        {
          "name": "input_token_program",
          "writable": false,
          "signer": false,
          "docs": [
            "routes input vault"
          ]
        },
        {
          "name": "output_token_program",
          "writable": false,
          "signer": false,
          "docs": [
            "routes output vault"
          ]
        },
        {
          "name": "instructions_sysvar",
          "writable": false,
          "signer": false,
          "docs": [
            "Sysvar1nstructions1111111111111111111111111"
          ],
          "address": "Sysvar1nstructions1111111111111111111111111"
        },
        {
          "name": "ref_base",
          "writable": false,
          "signer": false,
          "docs": [
            "== pool.ref_base"
          ]
        },
        {
          "name": "ref_quote",
          "writable": false,
          "signer": false,
          "docs": [
            "== pool.ref_quote"
          ]
        }
      ],
      "args": [
        {
          "name": "amount",
          "type": "u64"
        },
        {
          "name": "other_amount_threshold",
          "type": "u64"
        },
        {
          "name": "sig_ix",
          "type": "u8",
          "docs": [
            "the ed25519 instruction's index in the transaction (absolute: under CPI the current index is the caller's)"
          ]
        }
      ]
    },
    {
      "name": "open_pulse_position",
      "discriminator": [
        37
      ],
      "docs": [
        "disc 37: a Pulse LP deposit. Takes both tokens at the vaults' own ratio, rounded up, and mints a position NFT holding the shares they buy, rounded down. The first position on a pool is its owner's: it claims the inventory already in the vaults as isqrt(R0*R1) shares, moves no tokens and sets the hold; until then everyone else is refused. Refused while swaps, deposits or the guardian are off. Returns asset | position."
      ],
      "accounts": [
        {
          "name": "payer",
          "writable": true,
          "signer": true,
          "docs": [
            "pays the rent and both tokens; owns the NFT and gets the rent back on close"
          ]
        },
        {
          "name": "pool",
          "writable": true,
          "signer": false,
          "docs": [
            "the Pulse pool; its PDA co-signs the mint"
          ]
        },
        {
          "name": "position",
          "writable": true,
          "signer": false,
          "docs": [
            "PDA [b\"position\", asset]"
          ]
        },
        {
          "name": "asset",
          "writable": true,
          "signer": false,
          "docs": [
            "PDA [b\"asset\", pool, payer, nonce_le], the position NFT"
          ]
        },
        {
          "name": "collection",
          "writable": true,
          "signer": false,
          "docs": [
            "PDA [b\"collection\", pool]; made by the pool's first position"
          ]
        },
        {
          "name": "token_owner_0",
          "writable": true,
          "signer": false,
          "docs": [
            "payer's token account (mint_0)"
          ]
        },
        {
          "name": "token_owner_1",
          "writable": true,
          "signer": false,
          "docs": [
            "payer's token account (mint_1)"
          ]
        },
        {
          "name": "token_vault_0",
          "writable": true,
          "signer": false
        },
        {
          "name": "token_vault_1",
          "writable": true,
          "signer": false
        },
        {
          "name": "token_program_0",
          "writable": false,
          "signer": false
        },
        {
          "name": "token_program_1",
          "writable": false,
          "signer": false
        },
        {
          "name": "mpl_core",
          "writable": false,
          "signer": false,
          "address": "CoREENxT6tW1HoK8ypY1SxRMZTcVPm7R94rH4PZNhX7d"
        },
        {
          "name": "system_program",
          "writable": false,
          "signer": false,
          "address": "11111111111111111111111111111111"
        }
      ],
      "args": [
        {
          "name": "nonce",
          "type": "u32",
          "docs": [
            "picks the asset PDA; one the payer already used refuses"
          ]
        },
        {
          "name": "amount_0_max",
          "type": "u64"
        },
        {
          "name": "amount_1_max",
          "type": "u64"
        },
        {
          "name": "shares_min",
          "type": "u64"
        },
        {
          "name": "hold_secs",
          "type": "u32",
          "docs": [
            "counts only on the owner's first position, at most 2,592,000 (30 days)"
          ]
        }
      ]
    },
    {
      "name": "pulse_withdraw",
      "discriminator": [
        38
      ],
      "docs": [
        "disc 38: a Pulse LP holder takes shares out of a position as that share of both vaults, rounded down, once the pool's hold has passed since the deposit. No pool status stops it. Returns amount_0 | amount_1."
      ],
      "accounts": [
        {
          "name": "holder",
          "writable": false,
          "signer": true,
          "docs": [
            "owns the asset"
          ]
        },
        {
          "name": "pool",
          "writable": true,
          "signer": false,
          "docs": [
            "== position.pool; its PDA signs both transfers"
          ]
        },
        {
          "name": "position",
          "writable": true,
          "signer": false,
          "docs": [
            "PDA [b\"position\", asset]"
          ]
        },
        {
          "name": "asset",
          "writable": false,
          "signer": false,
          "docs": [
            "the position NFT"
          ]
        },
        {
          "name": "token_owner_0",
          "writable": true,
          "signer": false,
          "docs": [
            "receives mint_0"
          ]
        },
        {
          "name": "token_owner_1",
          "writable": true,
          "signer": false,
          "docs": [
            "receives mint_1"
          ]
        },
        {
          "name": "token_vault_0",
          "writable": true,
          "signer": false
        },
        {
          "name": "token_vault_1",
          "writable": true,
          "signer": false
        },
        {
          "name": "token_program_0",
          "writable": false,
          "signer": false
        },
        {
          "name": "token_program_1",
          "writable": false,
          "signer": false
        }
      ],
      "args": [
        {
          "name": "shares",
          "type": "u64"
        },
        {
          "name": "amount_0_min",
          "type": "u64"
        },
        {
          "name": "amount_1_min",
          "type": "u64"
        }
      ]
    },
    {
      "name": "close_pulse_position",
      "discriminator": [
        39
      ],
      "docs": [
        "disc 39: close a Pulse position holding 0 shares, burn its NFT and return the position's rent to its rent_receiver. A position whose NFT was burned outside the program may be closed by anyone: its shares are cancelled and their tokens stay in the vaults for the remaining holders."
      ],
      "accounts": [
        {
          "name": "signer",
          "writable": true,
          "signer": true,
          "docs": [
            "the holder of a live NFT, who pays the burn; anyone for a burned one"
          ]
        },
        {
          "name": "position",
          "writable": true,
          "signer": false,
          "docs": [
            "PDA [b\"position\", asset]"
          ]
        },
        {
          "name": "asset",
          "writable": true,
          "signer": false,
          "docs": [
            "the position NFT, burned"
          ]
        },
        {
          "name": "collection",
          "writable": true,
          "signer": false,
          "docs": [
            "PDA [b\"collection\", pool]"
          ]
        },
        {
          "name": "rent_receiver",
          "writable": true,
          "signer": false,
          "docs": [
            "== position.rent_receiver"
          ]
        },
        {
          "name": "mpl_core",
          "writable": false,
          "signer": false,
          "address": "CoREENxT6tW1HoK8ypY1SxRMZTcVPm7R94rH4PZNhX7d"
        },
        {
          "name": "system_program",
          "writable": false,
          "signer": false,
          "address": "11111111111111111111111111111111"
        },
        {
          "name": "pool",
          "writable": true,
          "signer": false,
          "docs": [
            "== position.pool"
          ]
        }
      ],
      "args": []
    },
    {
      "name": "swap_anchor_verified",
      "docs": [
        "disc 40: swap_anchor_attested's one-signer fill (exact-in) with the price's signature in the instruction data, checked by the program against pool.quote_key, so the transaction carries one signature, the trader's, and no ed25519 instruction. The same price fills once across discs 36 and 40, on the pool's one record. Direction from the vaults, bound to the signed side. Each price fills once, up to its max_quote, from its issue slot to 16 slots after it, flat at any slot of its life; the larger of its own size band and the pool's widens it with the slot's quote filled, and the pool's lean shifts it as it does a posted fill's. Gates (paused, quote key, age, cap, reference, signature, replay, capacity, slippage) revert.",
        "The program rebuilds the 153-byte message of disc 36 (\"xmm-att\" | version 1 | program_id | pool | trader | side u8 (0 = token_0 in) | price_x64 u128 | size_band u64 | max_quote u64 | issue_slot u64 | seq u64) from its own id, account 1, account 0, the vaults' side and args price_x64..seq, which are the message's bytes 105..153 as signed, and verifies signature over it as the ed25519 precompile does. data = 40 | amount | other_amount_threshold | price_x64 | size_band | max_quote | issue_slot | seq | signature, 129 bytes.",
        "Returns amount_in | amount_out."
      ],
      "discriminator": [
        40
      ],
      "accounts": [
        {
          "name": "trader",
          "writable": false,
          "signer": true,
          "docs": [
            "== the message's trader; input transfer authority"
          ]
        },
        {
          "name": "pool",
          "writable": true,
          "signer": false,
          "docs": [
            "== the message's pool; quote_key, limits; PDA signs output"
          ]
        },
        {
          "name": "input_token_account",
          "writable": true,
          "signer": false,
          "docs": [
            "user src ATA (input mint)"
          ]
        },
        {
          "name": "output_token_account",
          "writable": true,
          "signer": false,
          "docs": [
            "user dst ATA (output mint)"
          ]
        },
        {
          "name": "input_vault",
          "writable": true,
          "signer": false,
          "docs": [
            "== pool.token_vault_{0|1}, the message's side"
          ]
        },
        {
          "name": "output_vault",
          "writable": true,
          "signer": false,
          "docs": [
            "== pool.token_vault_{1|0}"
          ]
        },
        {
          "name": "input_token_program",
          "writable": false,
          "signer": false,
          "docs": [
            "routes input vault"
          ]
        },
        {
          "name": "output_token_program",
          "writable": false,
          "signer": false,
          "docs": [
            "routes output vault"
          ]
        },
        {
          "name": "ref_base",
          "writable": false,
          "signer": false,
          "docs": [
            "== pool.ref_base"
          ]
        },
        {
          "name": "ref_quote",
          "writable": false,
          "signer": false,
          "docs": [
            "== pool.ref_quote"
          ]
        }
      ],
      "args": [
        {
          "name": "amount",
          "type": "u64"
        },
        {
          "name": "other_amount_threshold",
          "type": "u64"
        },
        {
          "name": "price_x64",
          "type": "u128",
          "docs": [
            "the signed message's bytes 105..121"
          ]
        },
        {
          "name": "size_band",
          "type": "u64",
          "docs": [
            "the signed message's bytes 121..129"
          ]
        },
        {
          "name": "max_quote",
          "type": "u64",
          "docs": [
            "the signed message's bytes 129..137"
          ]
        },
        {
          "name": "issue_slot",
          "type": "u64",
          "docs": [
            "the signed message's bytes 137..145"
          ]
        },
        {
          "name": "seq",
          "type": "u64",
          "docs": [
            "the signed message's bytes 145..153"
          ]
        },
        {
          "name": "signature",
          "type": {
            "array": [
              "u8",
              64
            ]
          },
          "docs": [
            "pool.quote_key's Ed25519 signature over the 153-byte message, the same 64 bytes disc 36 carries in its ed25519 instruction"
          ]
        }
      ]
    }
  ],
  "accounts": [
    {
      "name": "AmmConfig",
      "discriminator": [
        1
      ]
    },
    {
      "name": "PoolStateClmm",
      "discriminator": [
        2
      ]
    },
    {
      "name": "TickArray",
      "discriminator": [
        3
      ]
    },
    {
      "name": "Position",
      "discriminator": [
        4
      ]
    },
    {
      "name": "Observation",
      "discriminator": [
        5
      ]
    },
    {
      "name": "BitmapExtension",
      "discriminator": [
        6
      ]
    },
    {
      "name": "PoolStateAnchor",
      "discriminator": [
        7
      ]
    },
    {
      "name": "PulsePosition",
      "discriminator": [
        8
      ]
    },
    {
      "name": "PendingChange",
      "discriminator": [
        9
      ]
    }
  ],
  "types": [
    {
      "name": "AmmConfig",
      "docs": [
        "disc 1. Protocol fee-tier menu. 1-byte disc at offset 0; LE scalars. SIZE 247 bytes."
      ],
      "type": {
        "kind": "struct",
        "fields": [
          {
            "name": "disc",
            "type": "u8",
            "docs": [
              "offset 0"
            ]
          },
          {
            "name": "index",
            "type": "u16",
            "docs": [
              "offset 1 (tier index; also PDA seed)"
            ]
          },
          {
            "name": "trade_fee_rate",
            "type": "u32",
            "docs": [
              "offset 3 (fraction of 1e9)"
            ]
          },
          {
            "name": "protocol_fee_rate",
            "type": "u32",
            "docs": [
              "offset 7"
            ]
          },
          {
            "name": "fund_fee_rate",
            "type": "u32",
            "docs": [
              "offset 11"
            ]
          },
          {
            "name": "tick_spacing",
            "type": "u16",
            "docs": [
              "offset 15"
            ]
          },
          {
            "name": "bump",
            "type": "u8",
            "docs": [
              "offset 17"
            ]
          },
          {
            "name": "_pad0",
            "type": "u8",
            "docs": [
              "offset 18"
            ]
          },
          {
            "name": "_pad1",
            "type": "u32",
            "docs": [
              "offset 19 (8-byte realign)"
            ]
          },
          {
            "name": "admin",
            "type": "pubkey",
            "docs": [
              "offset 23"
            ]
          },
          {
            "name": "filter_period",
            "type": "u16",
            "docs": [
              "offset 55: the automatic fee: seconds a swap's reference holds before it may move; all five constants 0 = a flat fee (create_pool copies them into the pool)"
            ]
          },
          {
            "name": "decay_period",
            "type": "u16",
            "docs": [
              "offset 57: past this many seconds the reference keeps none of the accumulator"
            ]
          },
          {
            "name": "reduction_factor",
            "type": "u16",
            "docs": [
              "offset 59: the share (of 10,000) of the accumulator the reference keeps inside the decay period"
            ]
          },
          {
            "name": "dynamic_fee_control",
            "type": "u32",
            "docs": [
              "offset 61: each step pays the base plus ceil(dynamic_fee_control x (volatility_accumulator x tick_spacing)^2 / 1e10) on the 1e9 fee scale, at most 10%"
            ]
          },
          {
            "name": "max_volatility_accumulator",
            "type": "u32",
            "docs": [
              "offset 65: the accumulator's cap; it grows 10,000 for each tick group the price stands from the reference"
            ]
          },
          {
            "name": "reserved",
            "type": {
              "array": [
                "u8",
                178
              ]
            },
            "docs": [
              "offset 69 (upgrade room)"
            ]
          }
        ]
      }
    },
    {
      "name": "PoolStateClmm",
      "docs": [
        "disc 2. CLMM pool. Field order verbatim Raydium PoolState; 1-byte disc means every offset is the Raydium offset minus 7. packed; u128 fields read_unaligned. SIZE 1545 bytes."
      ],
      "type": {
        "kind": "struct",
        "fields": [
          {
            "name": "disc",
            "type": "u8",
            "docs": [
              "offset 0"
            ]
          },
          {
            "name": "bump",
            "type": "u8",
            "docs": [
              "offset 1"
            ]
          },
          {
            "name": "amm_config",
            "type": "pubkey",
            "docs": [
              "offset 2"
            ]
          },
          {
            "name": "owner",
            "type": "pubkey",
            "docs": [
              "offset 34"
            ]
          },
          {
            "name": "token_mint_0",
            "type": "pubkey",
            "docs": [
              "offset 66 (mint_0 addr < mint_1 addr)"
            ]
          },
          {
            "name": "token_mint_1",
            "type": "pubkey",
            "docs": [
              "offset 98"
            ]
          },
          {
            "name": "token_vault_0",
            "type": "pubkey",
            "docs": [
              "offset 130"
            ]
          },
          {
            "name": "token_vault_1",
            "type": "pubkey",
            "docs": [
              "offset 162"
            ]
          },
          {
            "name": "observation_key",
            "type": "pubkey",
            "docs": [
              "offset 194"
            ]
          },
          {
            "name": "mint_decimals_0",
            "type": "u8",
            "docs": [
              "offset 226"
            ]
          },
          {
            "name": "mint_decimals_1",
            "type": "u8",
            "docs": [
              "offset 227"
            ]
          },
          {
            "name": "tick_spacing",
            "type": "u16",
            "docs": [
              "offset 228"
            ]
          },
          {
            "name": "liquidity",
            "type": "u128",
            "docs": [
              "offset 230 (active in-range liquidity, unaligned)"
            ]
          },
          {
            "name": "sqrt_price_x64",
            "type": "u128",
            "docs": [
              "offset 246 (Q64.64 sqrt(token1/token0), unaligned)"
            ]
          },
          {
            "name": "tick_current",
            "type": "i32",
            "docs": [
              "offset 262"
            ]
          },
          {
            "name": "padding3",
            "type": "u16",
            "docs": [
              "offset 266"
            ]
          },
          {
            "name": "padding4",
            "type": "u16",
            "docs": [
              "offset 268"
            ]
          },
          {
            "name": "fee_growth_global_0_x64",
            "type": "u128",
            "docs": [
              "offset 270"
            ]
          },
          {
            "name": "fee_growth_global_1_x64",
            "type": "u128",
            "docs": [
              "offset 286"
            ]
          },
          {
            "name": "protocol_fees_token_0",
            "type": "u64",
            "docs": [
              "offset 302"
            ]
          },
          {
            "name": "protocol_fees_token_1",
            "type": "u64",
            "docs": [
              "offset 310"
            ]
          },
          {
            "name": "swap_in_amount_token_0",
            "type": "u128",
            "docs": [
              "offset 318"
            ]
          },
          {
            "name": "swap_out_amount_token_1",
            "type": "u128",
            "docs": [
              "offset 334"
            ]
          },
          {
            "name": "swap_in_amount_token_1",
            "type": "u128",
            "docs": [
              "offset 350"
            ]
          },
          {
            "name": "swap_out_amount_token_0",
            "type": "u128",
            "docs": [
              "offset 366"
            ]
          },
          {
            "name": "status",
            "type": "u8",
            "docs": [
              "offset 382 (PoolStatusBit; bit 4 set = swap disabled)"
            ]
          },
          {
            "name": "status_padding",
            "type": {
              "array": [
                "u8",
                7
              ]
            },
            "docs": [
              "offset 383"
            ]
          },
          {
            "name": "reward_infos",
            "type": {
              "array": [
                {
                  "defined": {
                    "name": "RewardInfo"
                  }
                },
                3
              ]
            },
            "docs": [
              "offset 390 (3 x 169 bytes)"
            ]
          },
          {
            "name": "tick_array_bitmap",
            "type": {
              "array": [
                "u64",
                16
              ]
            },
            "docs": [
              "offset 897 (pool-internal bitmap)"
            ]
          },
          {
            "name": "total_fees_token_0",
            "type": "u64",
            "docs": [
              "offset 1025"
            ]
          },
          {
            "name": "total_fees_claimed_token_0",
            "type": "u64",
            "docs": [
              "offset 1033"
            ]
          },
          {
            "name": "total_fees_token_1",
            "type": "u64",
            "docs": [
              "offset 1041"
            ]
          },
          {
            "name": "total_fees_claimed_token_1",
            "type": "u64",
            "docs": [
              "offset 1049"
            ]
          },
          {
            "name": "creator_fees_token_0",
            "type": "u64",
            "docs": [
              "offset 1057: the creator's share of the fees not yet collected, in token 0"
            ]
          },
          {
            "name": "creator_fees_token_1",
            "type": "u64",
            "docs": [
              "offset 1065: the same in token 1"
            ]
          },
          {
            "name": "open_time",
            "type": "u64",
            "docs": [
              "offset 1073: unix seconds swaps wait for (0 = open)"
            ]
          },
          {
            "name": "recent_epoch",
            "type": "u64",
            "docs": [
              "offset 1081 (live epoch for token-2022 fee tier)"
            ]
          },
          {
            "name": "fee_rate",
            "type": "u32",
            "docs": [
              "offset 1089: the pool's fee (1e9 denom): the tier's or its creator's, then its owner's changes"
            ]
          },
          {
            "name": "pool_nonce",
            "type": "u32",
            "docs": [
              "offset 1093 (vanity-grind seed tail, in the pool PDA seed)"
            ]
          },
          {
            "name": "guardian",
            "type": "pubkey",
            "docs": [
              "offset 1097 (HALT-only guardian; all-zero = none)"
            ]
          },
          {
            "name": "_pad_counter",
            "type": "u32",
            "docs": [
              "offset 1129 (unused)"
            ]
          },
          {
            "name": "open_position_count",
            "type": "u32",
            "docs": [
              "offset 1133 (net open positions; close_pool gate)"
            ]
          },
          {
            "name": "filter_period",
            "type": "u16",
            "docs": [
              "offset 1137: the automatic fee: seconds a swap's reference holds before it may move; all five constants 0 = a flat fee, copied from the tier at creation and never changed"
            ]
          },
          {
            "name": "decay_period",
            "type": "u16",
            "docs": [
              "offset 1139: past this many seconds the reference keeps none of the accumulator"
            ]
          },
          {
            "name": "reduction_factor",
            "type": "u16",
            "docs": [
              "offset 1141: the share (of 10,000) of the accumulator the reference keeps inside the decay period"
            ]
          },
          {
            "name": "dynamic_fee_control",
            "type": "u32",
            "docs": [
              "offset 1143: each step pays the base plus ceil(dynamic_fee_control x (volatility_accumulator x tick_spacing)^2 / 1e10) on the 1e9 fee scale, at most 10%"
            ]
          },
          {
            "name": "max_volatility_accumulator",
            "type": "u32",
            "docs": [
              "offset 1147: the accumulator's cap; it grows 10,000 for each tick group the price stands from the reference"
            ]
          },
          {
            "name": "last_update_timestamp",
            "type": "u64",
            "docs": [
              "offset 1151: unix seconds the reference last moved"
            ]
          },
          {
            "name": "volatility_reference",
            "type": "u32",
            "docs": [
              "offset 1159: the accumulator the reference keeps"
            ]
          },
          {
            "name": "tick_group_reference",
            "type": "i32",
            "docs": [
              "offset 1163: the tick group (tick_spacing ticks, rounded down) the reference stands at"
            ]
          },
          {
            "name": "volatility_accumulator",
            "type": "u32",
            "docs": [
              "offset 1167: the last step's accumulator"
            ]
          },
          {
            "name": "last_fee_change",
            "type": "i64",
            "docs": [
              "offset 1171: unix seconds of the pool's creation or its owner's last fee change (set_pool_fee's cooldown)"
            ]
          },
          {
            "name": "launch_fee",
            "type": "u32",
            "docs": [
              "offset 1179: the launch fee (1e9 denom; 0 = none), halving every launch_half_life from launch_start down to fee_rate"
            ]
          },
          {
            "name": "launch_half_life",
            "type": "u32",
            "docs": [
              "offset 1183: seconds"
            ]
          },
          {
            "name": "launch_start",
            "type": "i64",
            "docs": [
              "offset 1187: unix seconds the launch fee counts from"
            ]
          },
          {
            "name": "creator_share",
            "type": "u16",
            "docs": [
              "offset 1195: the creator's share of every swap fee (of 10,000; 0 = none)"
            ]
          },
          {
            "name": "creator",
            "type": "pubkey",
            "docs": [
              "offset 1197: who collects it (the pool's creator)"
            ]
          },
          {
            "name": "padding1",
            "type": {
              "array": [
                "u8",
                60
              ]
            },
            "docs": [
              "offset 1229 (upgrade room)"
            ]
          },
          {
            "name": "padding2",
            "type": {
              "array": [
                "u64",
                32
              ]
            },
            "docs": [
              "offset 1289 (upgrade room)"
            ]
          }
        ]
      }
    },
    {
      "name": "RewardInfo",
      "docs": [
        "Nested in PoolStateClmm.reward_infos. Layout-faithful to Raydium RewardInfo; 169 bytes packed; zeroed in v1."
      ],
      "type": {
        "kind": "struct",
        "fields": [
          {
            "name": "reward_state",
            "type": "u8"
          },
          {
            "name": "open_time",
            "type": "u64"
          },
          {
            "name": "end_time",
            "type": "u64"
          },
          {
            "name": "last_update_time",
            "type": "u64"
          },
          {
            "name": "emissions_per_second_x64",
            "type": "u128"
          },
          {
            "name": "reward_total_emissioned",
            "type": "u64"
          },
          {
            "name": "reward_claimed",
            "type": "u64"
          },
          {
            "name": "token_mint",
            "type": "pubkey"
          },
          {
            "name": "token_vault",
            "type": "pubkey"
          },
          {
            "name": "authority",
            "type": "pubkey"
          },
          {
            "name": "reward_growth_global_x64",
            "type": "u128"
          }
        ]
      }
    },
    {
      "name": "TickArray",
      "docs": [
        "disc 3 (TickArrayState). One paged array of 60 ticks. PDA [b\"tick_array\", pool_id, start_tick_index_be (i32 BE)]. packed."
      ],
      "type": {
        "kind": "struct",
        "fields": [
          {
            "name": "disc",
            "type": "u8",
            "docs": [
              "offset 0"
            ]
          },
          {
            "name": "pool_id",
            "type": "pubkey",
            "docs": [
              "offset 1 (relational-binding target)"
            ]
          },
          {
            "name": "start_tick_index",
            "type": "i32",
            "docs": [
              "offset 33"
            ]
          },
          {
            "name": "ticks",
            "type": {
              "array": [
                {
                  "defined": {
                    "name": "TickState"
                  }
                },
                60
              ]
            },
            "docs": [
              "offset 37 (60 x 168 bytes)"
            ]
          },
          {
            "name": "initialized_tick_count",
            "type": "u8",
            "docs": [
              "offset 10117"
            ]
          },
          {
            "name": "recent_epoch",
            "type": "u64",
            "docs": [
              "offset 10118"
            ]
          },
          {
            "name": "payer",
            "type": "pubkey",
            "docs": [
              "offset 10126 (who paid; the only account the rent returns to)"
            ]
          },
          {
            "name": "padding",
            "type": {
              "array": [
                "u8",
                75
              ]
            },
            "docs": [
              "offset 10158"
            ]
          }
        ]
      }
    },
    {
      "name": "TickState",
      "docs": [
        "Nested in TickArray.ticks. 168 bytes packed (verbatim Raydium TickState order)."
      ],
      "type": {
        "kind": "struct",
        "fields": [
          {
            "name": "tick",
            "type": "i32"
          },
          {
            "name": "liquidity_net",
            "type": "i128",
            "docs": [
              "net liquidity delta crossing this tick left->right"
            ]
          },
          {
            "name": "liquidity_gross",
            "type": "u128"
          },
          {
            "name": "fee_growth_outside_0_x64",
            "type": "u128"
          },
          {
            "name": "fee_growth_outside_1_x64",
            "type": "u128"
          },
          {
            "name": "reward_growths_outside_x64",
            "type": {
              "array": [
                "u128",
                3
              ]
            }
          },
          {
            "name": "padding",
            "type": {
              "array": [
                "u32",
                13
              ]
            }
          }
        ]
      }
    },
    {
      "name": "Position",
      "docs": [
        "disc 4 (PositionState). Authoritative LP position keyed by its Core NFT asset. PDA [b\"position\", core_asset]. packed."
      ],
      "type": {
        "kind": "struct",
        "fields": [
          {
            "name": "disc",
            "type": "u8",
            "docs": [
              "offset 0"
            ]
          },
          {
            "name": "bump",
            "type": "u8",
            "docs": [
              "offset 1"
            ]
          },
          {
            "name": "pool_id",
            "type": "pubkey",
            "docs": [
              "offset 2 (relational-binding target)"
            ]
          },
          {
            "name": "core_asset",
            "type": "pubkey",
            "docs": [
              "offset 34 (ownership handle / gate target)"
            ]
          },
          {
            "name": "tick_lower_index",
            "type": "i32",
            "docs": [
              "offset 66"
            ]
          },
          {
            "name": "tick_upper_index",
            "type": "i32",
            "docs": [
              "offset 70"
            ]
          },
          {
            "name": "liquidity",
            "type": "u128",
            "docs": [
              "offset 74 (unaligned)"
            ]
          },
          {
            "name": "fee_growth_inside_0_last_x64",
            "type": "u128",
            "docs": [
              "offset 90"
            ]
          },
          {
            "name": "fee_growth_inside_1_last_x64",
            "type": "u128",
            "docs": [
              "offset 106"
            ]
          },
          {
            "name": "token_fees_owed_0",
            "type": "u64",
            "docs": [
              "offset 122"
            ]
          },
          {
            "name": "token_fees_owed_1",
            "type": "u64",
            "docs": [
              "offset 130"
            ]
          },
          {
            "name": "rent_receiver",
            "type": "pubkey",
            "docs": [
              "offset 138"
            ]
          },
          {
            "name": "lock_until",
            "type": "i64",
            "docs": [
              "offset 170: unix seconds until which the liquidity cannot leave (0 = unlocked, i64::MAX = for good)"
            ]
          },
          {
            "name": "padding",
            "type": {
              "array": [
                "u64",
                23
              ]
            },
            "docs": [
              "offset 178 (upgrade room)"
            ]
          }
        ]
      }
    },
    {
      "name": "Observation",
      "docs": [
        "disc 5 (ObservationState). 100-entry tick_cumulative ring (TWAP). PDA [b\"observation\", pool_id]. packed."
      ],
      "type": {
        "kind": "struct",
        "fields": [
          {
            "name": "disc",
            "type": "u8",
            "docs": [
              "offset 0"
            ]
          },
          {
            "name": "initialized",
            "type": "u8",
            "docs": [
              "offset 1"
            ]
          },
          {
            "name": "recent_epoch",
            "type": "u64",
            "docs": [
              "offset 2"
            ]
          },
          {
            "name": "observation_index",
            "type": "u16",
            "docs": [
              "offset 10"
            ]
          },
          {
            "name": "pool_id",
            "type": "pubkey",
            "docs": [
              "offset 12"
            ]
          },
          {
            "name": "observations",
            "type": {
              "array": [
                {
                  "defined": {
                    "name": "ObservationEntry"
                  }
                },
                100
              ]
            },
            "docs": [
              "offset 44 (100 x 44 bytes)"
            ]
          },
          {
            "name": "padding",
            "type": {
              "array": [
                "u64",
                4
              ]
            },
            "docs": [
              "offset 4444 (upgrade room)"
            ]
          }
        ]
      }
    },
    {
      "name": "ObservationEntry",
      "docs": [
        "Nested in Observation.observations (Rust struct Observation). 44 bytes packed (Raydium Observation order)."
      ],
      "type": {
        "kind": "struct",
        "fields": [
          {
            "name": "block_timestamp",
            "type": "u32"
          },
          {
            "name": "tick_cumulative",
            "type": "i64",
            "docs": [
              "cumulative tick over the duration (unaligned)"
            ]
          },
          {
            "name": "padding",
            "type": {
              "array": [
                "u64",
                4
              ]
            }
          }
        ]
      }
    },
    {
      "name": "BitmapExtension",
      "docs": [
        "disc 6 (TickArrayBitmapExtension). Covers tick arrays beyond the pool-internal bitmap. PDA [b\"pool_tick_array_bitmap_extension\", pool_id]. Swap tail places it FIRST. packed."
      ],
      "type": {
        "kind": "struct",
        "fields": [
          {
            "name": "disc",
            "type": "u8",
            "docs": [
              "offset 0"
            ]
          },
          {
            "name": "pool_id",
            "type": "pubkey",
            "docs": [
              "offset 1 (binding-check target)"
            ]
          },
          {
            "name": "positive_tick_array_bitmap",
            "type": {
              "array": [
                {
                  "array": [
                    "u64",
                    8
                  ]
                },
                14
              ]
            },
            "docs": [
              "offset 33 (14 x [u64;8] for positive start indices)"
            ]
          },
          {
            "name": "negative_tick_array_bitmap",
            "type": {
              "array": [
                {
                  "array": [
                    "u64",
                    8
                  ]
                },
                14
              ]
            },
            "docs": [
              "offset 929 (14 x [u64;8] for negative start indices)"
            ]
          }
        ]
      }
    },
    {
      "name": "PoolStateAnchor",
      "docs": [
        "disc 7. Oracle-anchored maker pool. own layout (NOT Raydium order); quote fields deliberately 8-aligned. packed; u128/u64 reads via read_unaligned. SIZE 808 bytes. PDA [b\"pool_anchor\", amm_config, mint_0, mint_1, pool_nonce_le]."
      ],
      "type": {
        "kind": "struct",
        "fields": [
          {
            "name": "disc",
            "type": "u8",
            "docs": [
              "offset 0"
            ]
          },
          {
            "name": "bump",
            "type": "u8",
            "docs": [
              "offset 1"
            ]
          },
          {
            "name": "_pad_align",
            "type": {
              "array": [
                "u8",
                6
              ]
            },
            "docs": [
              "offset 2 (8-byte align)"
            ]
          },
          {
            "name": "amm_config",
            "type": "pubkey",
            "docs": [
              "offset 8"
            ]
          },
          {
            "name": "owner",
            "type": "pubkey",
            "docs": [
              "offset 40 (pool authority)"
            ]
          },
          {
            "name": "token_mint_0",
            "type": "pubkey",
            "docs": [
              "offset 72"
            ]
          },
          {
            "name": "token_mint_1",
            "type": "pubkey",
            "docs": [
              "offset 104"
            ]
          },
          {
            "name": "token_vault_0",
            "type": "pubkey",
            "docs": [
              "offset 136"
            ]
          },
          {
            "name": "token_vault_1",
            "type": "pubkey",
            "docs": [
              "offset 168"
            ]
          },
          {
            "name": "pricer_hot_key",
            "type": "pubkey",
            "docs": [
              "offset 200 (bounded pricer authority)"
            ]
          },
          {
            "name": "mint_decimals_0",
            "type": "u8",
            "docs": [
              "offset 232"
            ]
          },
          {
            "name": "mint_decimals_1",
            "type": "u8",
            "docs": [
              "offset 233"
            ]
          },
          {
            "name": "status",
            "type": "u8",
            "docs": [
              "offset 234 (AnchorStatusBit; swap/deposit/withdraw + guardian-halt bit 3)"
            ]
          },
          {
            "name": "haircut_bps_p1",
            "type": "u8",
            "docs": [
              "offset 235 (pessimism haircut+1: 0 => default 5 bps; v>=1 => min(v-1, 5) bps)"
            ]
          },
          {
            "name": "round_mode",
            "type": "u8",
            "docs": [
              "offset 236 (quote rounding: 1 = precise folded single-floor divide; else legacy floor-then-rescale)"
            ]
          },
          {
            "name": "_pad0",
            "type": {
              "array": [
                "u8",
                3
              ]
            },
            "docs": [
              "offset 237"
            ]
          },
          {
            "name": "price_x64",
            "type": "u128",
            "docs": [
              "offset 240 (posted mid, Q64.64; THE oracle)"
            ]
          },
          {
            "name": "bid_factor",
            "type": "u64",
            "docs": [
              "offset 256 ((1-s) band; pool buys base; 0 = flat mid)"
            ]
          },
          {
            "name": "ask_factor",
            "type": "u64",
            "docs": [
              "offset 264 ((1+s) band; pool sells base; 0 = flat mid)"
            ]
          },
          {
            "name": "confidence",
            "type": "u64",
            "docs": [
              "offset 272 (conf-keyed spread)"
            ]
          },
          {
            "name": "price_updated_ms",
            "type": "u64",
            "docs": [
              "offset 280 (wall-clock liveness stamp)"
            ]
          },
          {
            "name": "data_slot",
            "type": "u64",
            "docs": [
              "offset 288 (on-chain write slot; slot-lag stale-gate)"
            ]
          },
          {
            "name": "params_hash",
            "type": "u64",
            "docs": [
              "offset 296 (content-change stamp, distinct from liveness)"
            ]
          },
          {
            "name": "capacity_cap",
            "type": "u64",
            "docs": [
              "offset 304 (per-slot fill budget in token_1 raw units; 0 = none, allowed only with size_band above 0, the size price then bounding each fill; what is left is the cap less slot_quote_filled when slot_budget_slot is the current slot)"
            ]
          },
          {
            "name": "delta_cap_bps",
            "type": "u64",
            "docs": [
              "offset 312 (max bps per slot from slot_open_price_x64)"
            ]
          },
          {
            "name": "lp_total_shares",
            "type": "u64",
            "docs": [
              "offset 320 (Pulse LP shares outstanding; read only while lp_marker holds PULSELP1)"
            ]
          },
          {
            "name": "lp_positions",
            "type": "u32",
            "docs": [
              "offset 328 (open Pulse positions, empty ones included)"
            ]
          },
          {
            "name": "lp_hold_secs",
            "type": "u32",
            "docs": [
              "offset 332 (seconds a deposit waits before its withdraw)"
            ]
          },
          {
            "name": "_lp_spare",
            "type": "u64",
            "docs": [
              "offset 336"
            ]
          },
          {
            "name": "lp_marker",
            "type": "u64",
            "docs": [
              "offset 344 (\"PULSELP1\" little-endian once the owner's first position is open; else the four fields above read as zero)"
            ]
          },
          {
            "name": "s_floor",
            "type": "u64",
            "docs": [
              "offset 352 (per-side spread floor)"
            ]
          },
          {
            "name": "max_slot_lag",
            "type": "u64",
            "docs": [
              "offset 360 (slot-lag staleness window)"
            ]
          },
          {
            "name": "max_age_ms",
            "type": "u64",
            "docs": [
              "offset 368 (wall-clock staleness window, ms)"
            ]
          },
          {
            "name": "cap_bps",
            "type": "u64",
            "docs": [
              "offset 376 (per-fill dst-reserve cap, bps)"
            ]
          },
          {
            "name": "conf_max",
            "type": "u64",
            "docs": [
              "offset 384 (confidence-blowout threshold; 0 disables)"
            ]
          },
          {
            "name": "guardian",
            "type": "pubkey",
            "docs": [
              "offset 392 (HALT-only guardian; all-zero = none)"
            ]
          },
          {
            "name": "max_band_bps",
            "type": "u64",
            "docs": [
              "offset 424 (max per-side band deviation cap, bps; 0 = the program default cap)"
            ]
          },
          {
            "name": "pool_nonce",
            "type": "u32",
            "docs": [
              "offset 432 (vanity-grind seed tail, in the pool PDA seed)"
            ]
          },
          {
            "name": "_pad_nonce",
            "type": "u32",
            "docs": [
              "offset 436"
            ]
          },
          {
            "name": "cumulative_quote_volume",
            "type": "u128",
            "docs": [
              "offset 440"
            ]
          },
          {
            "name": "slot_budget_slot",
            "type": "u64",
            "docs": [
              "offset 456"
            ]
          },
          {
            "name": "slot_quote_filled",
            "type": "u128",
            "docs": [
              "offset 464"
            ]
          },
          {
            "name": "post_seq",
            "type": "u64",
            "docs": [
              "offset 480 (last accepted post's sequence number)"
            ]
          },
          {
            "name": "slot_open_slot",
            "type": "u64",
            "docs": [
              "offset 488"
            ]
          },
          {
            "name": "slot_open_price_x64",
            "type": "u128",
            "docs": [
              "offset 496 (the price the delta cap measures from in that slot)"
            ]
          },
          {
            "name": "ref_base",
            "type": "pubkey",
            "docs": [
              "offset 512"
            ]
          },
          {
            "name": "ref_quote",
            "type": "pubkey",
            "docs": [
              "offset 544"
            ]
          },
          {
            "name": "ref_owner",
            "type": "pubkey",
            "docs": [
              "offset 576"
            ]
          },
          {
            "name": "ref_tol_bps",
            "type": "u64",
            "docs": [
              "offset 608 (0 = the check is off)"
            ]
          },
          {
            "name": "ref_max_age_s",
            "type": "u64",
            "docs": [
              "offset 616"
            ]
          },
          {
            "name": "quote_key",
            "type": "pubkey",
            "docs": [
              "offset 624: co-signs every signed fill and signs every attested price; all zero = neither"
            ]
          },
          {
            "name": "signed_max_slots",
            "type": "u64",
            "docs": [
              "offset 656"
            ]
          },
          {
            "name": "size_band",
            "type": "u64",
            "docs": [
              "offset 664: the spread's widening per 1 USDC (1e6 raw quote) filled in the slot, in band units (1e12 = 100%, 1e8 = 1 bp); every fill pays it, co-signed ones too; 0 = off (set_anchor_config bit 10)"
            ]
          },
          {
            "name": "attest_seq",
            "type": "u64",
            "docs": [
              "offset 672: the highest sequence of an attested price filled"
            ]
          },
          {
            "name": "attest_used",
            "type": "u128",
            "docs": [
              "offset 680: bit i set = sequence attest_seq - i was filled (128-wide window)"
            ]
          },
          {
            "name": "attest_acc",
            "type": {
              "array": [
                "u8",
                16
              ]
            },
            "docs": [
              "offset 696: XOR of sha256(message)[0..16] over every attested price filled"
            ]
          },
          {
            "name": "attest_volume",
            "type": "u128",
            "docs": [
              "offset 712: the quote legs of attested fills, token_1 raw; never zeroed"
            ]
          },
          {
            "name": "attest_key",
            "type": "pubkey",
            "docs": [
              "offset 728: the quote key 672..712 belong to; a fill under another key zeroes them first"
            ]
          },
          {
            "name": "attest_since",
            "type": "u64",
            "docs": [
              "offset 760: the slot the record for attest_key began"
            ]
          },
          {
            "name": "attest_cutoff",
            "type": "u64",
            "docs": [
              "offset 768: no attested price issued at or before this slot fills (the start of the record before this one)"
            ]
          },
          {
            "name": "cosign_volume",
            "type": "u128",
            "docs": [
              "offset 776: the signed notionals of co-signed fills (swap_anchor_signed), token_1 raw; never zeroed"
            ]
          },
          {
            "name": "lean_strength",
            "type": "u64",
            "docs": [
              "offset 792: Pulse's lean, band units both sides of a fill shift with one vault empty; 0 = off (set_anchor_config bit 11)"
            ]
          },
          {
            "name": "size_free",
            "type": "u64",
            "docs": [
              "offset 800: the slot's quote (token_1 raw) a co-signed fill pays no size price on, the area above it charged; 0 = charged from 0 (set_anchor_config bit 12)"
            ]
          }
        ]
      }
    },
    {
      "name": "PulsePosition",
      "docs": [
        "disc 8. One holder's share of a Pulse pool, keyed by its Core NFT asset. PDA [b\"position\", asset]. packed."
      ],
      "type": {
        "kind": "struct",
        "fields": [
          {
            "name": "disc",
            "type": "u8",
            "docs": [
              "offset 0"
            ]
          },
          {
            "name": "bump",
            "type": "u8",
            "docs": [
              "offset 1"
            ]
          },
          {
            "name": "_pad",
            "type": {
              "array": [
                "u8",
                6
              ]
            },
            "docs": [
              "offset 2"
            ]
          },
          {
            "name": "pool",
            "type": "pubkey",
            "docs": [
              "offset 8"
            ]
          },
          {
            "name": "asset",
            "type": "pubkey",
            "docs": [
              "offset 40 (ownership handle)"
            ]
          },
          {
            "name": "shares",
            "type": "u64",
            "docs": [
              "offset 72 (this position's part of the pool's lp_total_shares)"
            ]
          },
          {
            "name": "deposited_at",
            "type": "i64",
            "docs": [
              "offset 80 (unix seconds; a withdraw waits the pool's hold from it)"
            ]
          },
          {
            "name": "rent_receiver",
            "type": "pubkey",
            "docs": [
              "offset 88"
            ]
          },
          {
            "name": "padding",
            "type": {
              "array": [
                "u64",
                8
              ]
            },
            "docs": [
              "offset 120 (upgrade room)"
            ]
          }
        ]
      }
    },
    {
      "name": "PendingChange",
      "docs": [
        "disc 9. An owner change to a Pulse pool its depositors wait out. PDA [b\"pending\", pool]. packed."
      ],
      "type": {
        "kind": "struct",
        "fields": [
          {
            "name": "disc",
            "type": "u8",
            "docs": [
              "offset 0"
            ]
          },
          {
            "name": "bump",
            "type": "u8",
            "docs": [
              "offset 1"
            ]
          },
          {
            "name": "kind",
            "type": "u8",
            "docs": [
              "offset 2: 0 a set_anchor_config body, 1 a new price key"
            ]
          },
          {
            "name": "_pad",
            "type": {
              "array": [
                "u8",
                3
              ]
            },
            "docs": [
              "offset 3"
            ]
          },
          {
            "name": "body_len",
            "type": "u16",
            "docs": [
              "offset 6"
            ]
          },
          {
            "name": "pool",
            "type": "pubkey",
            "docs": [
              "offset 8"
            ]
          },
          {
            "name": "rent_receiver",
            "type": "pubkey",
            "docs": [
              "offset 40: who paid its rent and gets it back"
            ]
          },
          {
            "name": "queued_at",
            "type": "i64",
            "docs": [
              "offset 72"
            ]
          },
          {
            "name": "apply_at",
            "type": "i64",
            "docs": [
              "offset 80: unix seconds from which anyone may apply it"
            ]
          },
          {
            "name": "queued_by",
            "type": "pubkey",
            "docs": [
              "offset 88: the owner who queued it; it applies only while this key owns the pool"
            ]
          },
          {
            "name": "body",
            "type": {
              "array": [
                "u8",
                224
              ]
            },
            "docs": [
              "offset 120: the set_anchor_config body or the key, body_len bytes"
            ]
          }
        ]
      }
    }
  ],
  "errors": [
    {
      "code": 6001,
      "name": "InvalidAccountCount",
      "msg": "Invalid account count"
    },
    {
      "code": 6002,
      "name": "InvalidAccountOwner",
      "msg": "Invalid account owner"
    },
    {
      "code": 6003,
      "name": "InvalidAccountData",
      "msg": "Invalid account data"
    },
    {
      "code": 6004,
      "name": "SlippageExceeded",
      "msg": "Slippage exceeded: amount_out < minimum (or amount_in > maximum for exact-output)"
    },
    {
      "code": 6005,
      "name": "MissingSigner",
      "msg": "Missing required signer"
    },
    {
      "code": 6006,
      "name": "AccountNotWritable",
      "msg": "Account not writable"
    },
    {
      "code": 6007,
      "name": "InvalidPda",
      "msg": "Invalid PDA"
    },
    {
      "code": 6008,
      "name": "InvalidMint",
      "msg": "Invalid mint (bad mint order or bricking mint class)"
    },
    {
      "code": 6009,
      "name": "InvalidVault",
      "msg": "Invalid vault"
    },
    {
      "code": 6010,
      "name": "InvalidTokenProgram",
      "msg": "Invalid token program (does not match vault owner)"
    },
    {
      "code": 6011,
      "name": "InvalidFeeRate",
      "msg": "Invalid fee rate"
    },
    {
      "code": 6012,
      "name": "InvalidTickSpacing",
      "msg": "Invalid tick spacing"
    },
    {
      "code": 6013,
      "name": "UnauthorizedAdmin",
      "msg": "Unauthorized admin"
    },
    {
      "code": 6014,
      "name": "InvalidTickRange",
      "msg": "Invalid tick range (lower>=upper, off-spacing, or out of bounds)"
    },
    {
      "code": 6015,
      "name": "ZeroLiquidity",
      "msg": "Zero liquidity (or liquidity exceeds the position)"
    },
    {
      "code": 6016,
      "name": "PositionNotEmpty",
      "msg": "Position not empty (liquidity!=0 or fees owed!=0)"
    },
    {
      "code": 6017,
      "name": "InvalidPositionOwner",
      "msg": "Invalid position owner / position not keyed to this asset"
    },
    {
      "code": 6018,
      "name": "MathOverflow",
      "msg": "Math overflow"
    },
    {
      "code": 6019,
      "name": "PriceLimitOutOfBounds",
      "msg": "Price limit out of bounds"
    },
    {
      "code": 6020,
      "name": "ZeroSwapAmount",
      "msg": "Zero swap amount"
    },
    {
      "code": 6021,
      "name": "MaxSwapStepsExceeded",
      "msg": "Max swap steps exceeded (loop safety backstop)"
    },
    {
      "code": 6022,
      "name": "InvalidTickIndex",
      "msg": "Invalid tick index"
    },
    {
      "code": 6023,
      "name": "NotEnoughTickArrayAccount",
      "msg": "Swap walked past the supplied tick-array window"
    },
    {
      "code": 6036,
      "name": "MissingTickArrayBitmapExtension",
      "msg": "Bitmap-extension account is not provided for a pool past the internal range"
    },
    {
      "code": 6037,
      "name": "StalePrice",
      "msg": "Posted price stale (slot-lag, wall-clock, or confidence-blowout)"
    },
    {
      "code": 6038,
      "name": "PoolPaused",
      "msg": "Pool paused / action disabled / guardian halt"
    },
    {
      "code": 6039,
      "name": "PriceDeltaCapExceeded",
      "msg": "Per-update price delta cap exceeded"
    },
    {
      "code": 6040,
      "name": "CapacityExceeded",
      "msg": "Quote notional exceeds the pool capacity / dst-reserve cap"
    },
    {
      "code": 6041,
      "name": "BandTooWide",
      "msg": "Posted band wider than the configured maximum (reserved/inert)"
    },
    {
      "code": 6042,
      "name": "UnauthorizedPricer",
      "msg": "Pricer hot key did not sign the quote refresh"
    },
    {
      "code": 6044,
      "name": "InvalidPositionPool",
      "msg": "position.pool_id != the supplied pool"
    },
    {
      "code": 6045,
      "name": "InvalidTickArrayPool",
      "msg": "tick_array.pool_id != the supplied pool"
    },
    {
      "code": 6046,
      "name": "InvalidObservation",
      "msg": "observation address != pool.observation_key"
    },
    {
      "code": 6047,
      "name": "BandFactorOutOfRange",
      "msg": "Posted band factor outside the per-pool max-band cap"
    },
    {
      "code": 6048,
      "name": "PoolNotEmpty",
      "msg": "close_pool on a pool that still holds liquidity/inventory or is not paused"
    },
    {
      "code": 6049,
      "name": "TickArrayNotEmpty",
      "msg": "Tick array still holds an initialized tick"
    },
    {
      "code": 6050,
      "name": "PoolHasPositions",
      "msg": "Pool still has open positions"
    },
    {
      "code": 6054,
      "name": "PostSeqNotRising",
      "msg": "Sequence number at or below the pool's last one"
    },
    {
      "code": 6055,
      "name": "ReferencePriceDeviation",
      "msg": "Price outside the tolerance of the fresh reference"
    },
    {
      "code": 6056,
      "name": "UnauthorizedQuoteKey",
      "msg": "Not the pool's quote key, or the pool has none"
    },
    {
      "code": 6057,
      "name": "SignedQuoteExpired",
      "msg": "Past its expiry slot, or that slot sits past the pool's window"
    },
    {
      "code": 6058,
      "name": "ReferenceUnusable",
      "msg": "A reference feed is stale, unpriced or too unsure, or the tolerance is 0"
    },
    {
      "code": 6059,
      "name": "AttestationInvalid",
      "msg": "No ed25519 instruction at sig_ix in the one layout taken, or its message is for another program, pool, trader or side (disc 36); the signature does not verify against the quote key over the rebuilt message (disc 40)"
    },
    {
      "code": 6060,
      "name": "AttestationOverCap",
      "msg": "The fill's quote leg is above the price's max_quote"
    },
    {
      "code": 6061,
      "name": "AttestationReplayed",
      "msg": "The price's sequence is 0, already filled, or too far below the highest, or it was issued at or before its key's cutoff"
    },
    {
      "code": 6062,
      "name": "LpHoldNotMet",
      "msg": "The pool's hold has not passed since this position's deposit"
    },
    {
      "code": 6063,
      "name": "LpSharesOutstanding",
      "msg": "Pulse LP shares exist: the owner moves funds through a position like any holder"
    },
    {
      "code": 6064,
      "name": "LpSeedRefused",
      "msg": "The owner's first position: a vault is empty, the seed is under 1,000,000 shares, or the hold is over 30 days"
    },
    {
      "code": 6065,
      "name": "FeeChangeCooldown",
      "msg": "set_pool_fee inside the cooldown since the pool's creation or its owner's last fee change"
    },
    {
      "code": 6066,
      "name": "PoolNotOpen",
      "msg": "A swap before the pool's start time (open_time)"
    },
    {
      "code": 6067,
      "name": "PositionLocked",
      "msg": "A withdrawal before the position's lock_until"
    },
    {
      "code": 6068,
      "name": "LockNotExtended",
      "msg": "A lock must pass now and the position's current lock, on a position holding liquidity"
    },
    {
      "code": 6069,
      "name": "CreatorFeesOwed",
      "msg": "close_pool before the creator collects its share of the fees"
    },
    {
      "code": 6070,
      "name": "ChangeNotDue",
      "msg": "apply_change before the queued change's apply_at"
    },
    {
      "code": 6071,
      "name": "ChangeMustWait",
      "msg": "A change a Pulse pool's depositors wait out: queue it with queue_change"
    }
  ]
}
