UNPKG

@pump-fun/pump-swap-sdk

Version:

Official SDK for interacting with Pump Swap AMM protocol on Solana

3,654 lines (3,653 loc) 87.2 kB
export { CANONICAL_POOL_INDEX, GLOBAL_CONFIG_PDA, GLOBAL_VOLUME_ACCUMULATOR_PDA, PUMP_AMM_EVENT_AUTHORITY_PDA, PUMP_AMM_FEE_CONFIG_PDA, PUMP_AMM_PROGRAM_ID, PUMP_FEE_PROGRAM_ID, PUMP_MINT, PUMP_PROGRAM_ID, canonicalPumpPoolPda, coinCreatorVaultAtaPda, coinCreatorVaultAuthorityPda, lpMintAta, lpMintPda, poolPda, poolV2Pda, pumpAmmPda, pumpFeePda, pumpPda, pumpPoolAuthorityPda, userVolumeAccumulatorPda } from './sdk/pda.mjs'; export { PumpAmmAdminSdk } from './sdk/pumpAmmAdmin.mjs'; export { OnlinePumpAmmSdk } from './sdk/onlinePumpAmm.mjs'; export { OFFLINE_PUMP_AMM_PROGRAM, POOL_ACCOUNT_NEW_SIZE, PUMP_AMM_SDK, PumpAmmSdk } from './sdk/offlinePumpAmm.mjs'; export { buyBaseInput, buyQuoteInput } from './sdk/buy.mjs'; export { sellBaseInput, sellQuoteInput } from './sdk/sell.mjs'; export { depositLpToken } from './sdk/deposit.mjs'; export { withdraw } from './sdk/withdraw.mjs'; export { getPumpAmmProgram } from './sdk/util.mjs'; export { currentDayTokens, totalUnclaimedTokens } from './sdk/tokenIncentives.mjs'; export { B as BuyBaseInputResult, g as BuyQuoteInputResult, n as CollectCoinCreatorFeeSolanaState, C as CommonSolanaState, k as CreatePoolSolanaState, c as DepositBaseAndLpTokenFromQuoteResult, D as DepositBaseResult, e as DepositLpTokenResult, a as DepositQuoteAndLpTokenFromBaseResult, b as DepositQuoteResult, d as DepositResult, F as FeeConfig, o as FeeTier, p as Fees, G as GlobalConfig, i as GlobalVolumeAccumulator, L as LiquidityAccounts, m as LiquiditySolanaState, P as Pool, S as SellBaseInputResult, h as SellQuoteInputResult, j as SwapAccounts, l as SwapSolanaState, U as UserVolumeAccumulator, f as WithdrawAutocompleteResult, W as WithdrawResult } from './sdk-CZdu75Sm.mjs'; export { P as PumpAmm } from './pump_amm-BwLUUQgy.mjs'; import '@solana/web3.js'; import 'buffer'; import 'bn.js'; import '@coral-xyz/anchor'; import '@solana/spl-token'; var address = "pAMMBay6oceH9fJKBRHGP5D4bD4sWpmSwMn52FMfXEA"; var metadata = { name: "pump_amm", version: "0.1.0", spec: "0.1.0", description: "Created with Anchor" }; var instructions = [ { name: "admin_set_coin_creator", docs: [ "Overrides the coin creator for a canonical pump pool" ], discriminator: [ 242, 40, 117, 145, 73, 96, 105, 104 ], accounts: [ { name: "admin_set_coin_creator_authority", signer: true, relations: [ "global_config" ] }, { name: "global_config" }, { name: "pool", writable: true }, { name: "event_authority", pda: { seeds: [ { kind: "const", value: [ 95, 95, 101, 118, 101, 110, 116, 95, 97, 117, 116, 104, 111, 114, 105, 116, 121 ] } ] } }, { name: "program" } ], args: [ { name: "coin_creator", type: "pubkey" } ] }, { name: "admin_update_token_incentives", discriminator: [ 209, 11, 115, 87, 213, 23, 124, 204 ], accounts: [ { name: "admin", writable: true, signer: true, relations: [ "global_config" ] }, { name: "global_config", pda: { seeds: [ { kind: "const", value: [ 103, 108, 111, 98, 97, 108, 95, 99, 111, 110, 102, 105, 103 ] } ] } }, { name: "global_volume_accumulator", writable: true, pda: { seeds: [ { kind: "const", value: [ 103, 108, 111, 98, 97, 108, 95, 118, 111, 108, 117, 109, 101, 95, 97, 99, 99, 117, 109, 117, 108, 97, 116, 111, 114 ] } ] } }, { name: "mint" }, { name: "global_incentive_token_account", writable: true, pda: { seeds: [ { kind: "account", path: "global_volume_accumulator" }, { kind: "account", path: "token_program" }, { kind: "account", path: "mint" } ], program: { kind: "const", value: [ 140, 151, 37, 143, 78, 36, 137, 241, 187, 61, 16, 41, 20, 142, 13, 131, 11, 90, 19, 153, 218, 255, 16, 132, 4, 142, 123, 216, 219, 233, 248, 89 ] } } }, { name: "associated_token_program", address: "ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL" }, { name: "system_program", address: "11111111111111111111111111111111" }, { name: "token_program" }, { name: "event_authority", pda: { seeds: [ { kind: "const", value: [ 95, 95, 101, 118, 101, 110, 116, 95, 97, 117, 116, 104, 111, 114, 105, 116, 121 ] } ] } }, { name: "program" } ], args: [ { name: "start_time", type: "i64" }, { name: "end_time", type: "i64" }, { name: "seconds_in_a_day", type: "i64" }, { name: "day_number", type: "u64" }, { name: "token_supply_per_day", type: "u64" } ] }, { name: "buy", docs: [ "For cashback coins, optionally pass user_volume_accumulator_wsol_ata as remaining_accounts[0].", "If provided and valid, the ATA will be initialized if needed." ], discriminator: [ 102, 6, 61, 18, 1, 218, 235, 234 ], accounts: [ { name: "pool", writable: true }, { name: "user", writable: true, signer: true }, { name: "global_config" }, { name: "base_mint", relations: [ "pool" ] }, { name: "quote_mint", relations: [ "pool" ] }, { name: "user_base_token_account", writable: true }, { name: "user_quote_token_account", writable: true }, { name: "pool_base_token_account", writable: true, relations: [ "pool" ] }, { name: "pool_quote_token_account", writable: true, relations: [ "pool" ] }, { name: "protocol_fee_recipient" }, { name: "protocol_fee_recipient_token_account", writable: true, pda: { seeds: [ { kind: "account", path: "protocol_fee_recipient" }, { kind: "account", path: "quote_token_program" }, { kind: "account", path: "quote_mint" } ], program: { kind: "const", value: [ 140, 151, 37, 143, 78, 36, 137, 241, 187, 61, 16, 41, 20, 142, 13, 131, 11, 90, 19, 153, 218, 255, 16, 132, 4, 142, 123, 216, 219, 233, 248, 89 ] } } }, { name: "base_token_program" }, { name: "quote_token_program" }, { name: "system_program", address: "11111111111111111111111111111111" }, { name: "associated_token_program", address: "ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL" }, { name: "event_authority", pda: { seeds: [ { kind: "const", value: [ 95, 95, 101, 118, 101, 110, 116, 95, 97, 117, 116, 104, 111, 114, 105, 116, 121 ] } ] } }, { name: "program", address: "pAMMBay6oceH9fJKBRHGP5D4bD4sWpmSwMn52FMfXEA" }, { name: "coin_creator_vault_ata", writable: true, pda: { seeds: [ { kind: "account", path: "coin_creator_vault_authority" }, { kind: "account", path: "quote_token_program" }, { kind: "account", path: "quote_mint" } ], program: { kind: "const", value: [ 140, 151, 37, 143, 78, 36, 137, 241, 187, 61, 16, 41, 20, 142, 13, 131, 11, 90, 19, 153, 218, 255, 16, 132, 4, 142, 123, 216, 219, 233, 248, 89 ] } } }, { name: "coin_creator_vault_authority", pda: { seeds: [ { kind: "const", value: [ 99, 114, 101, 97, 116, 111, 114, 95, 118, 97, 117, 108, 116 ] }, { kind: "account", path: "pool.coin_creator", account: "Pool" } ] } }, { name: "global_volume_accumulator", pda: { seeds: [ { kind: "const", value: [ 103, 108, 111, 98, 97, 108, 95, 118, 111, 108, 117, 109, 101, 95, 97, 99, 99, 117, 109, 117, 108, 97, 116, 111, 114 ] } ] } }, { name: "user_volume_accumulator", writable: true, pda: { seeds: [ { kind: "const", value: [ 117, 115, 101, 114, 95, 118, 111, 108, 117, 109, 101, 95, 97, 99, 99, 117, 109, 117, 108, 97, 116, 111, 114 ] }, { kind: "account", path: "user" } ] } }, { name: "fee_config", pda: { seeds: [ { kind: "const", value: [ 102, 101, 101, 95, 99, 111, 110, 102, 105, 103 ] }, { kind: "const", value: [ 12, 20, 222, 252, 130, 94, 198, 118, 148, 37, 8, 24, 187, 101, 64, 101, 244, 41, 141, 49, 86, 213, 113, 180, 212, 248, 9, 12, 24, 233, 168, 99 ] } ], program: { kind: "account", path: "fee_program" } } }, { name: "fee_program", address: "pfeeUxB6jkeY1Hxd7CsFCAjcbHA9rWtchMGdZ6VojVZ" } ], args: [ { name: "base_amount_out", type: "u64" }, { name: "max_quote_amount_in", type: "u64" }, { name: "track_volume", type: { defined: { name: "OptionBool" } } } ] }, { name: "buy_exact_quote_in", docs: [ "Given a budget of spendable_quote_in, buy at least min_base_amount_out", "Fees will be deducted from spendable_quote_in", "", "f(quote) = tokens, where tokens >= min_base_amount_out", "", "Make sure the payer has enough SOL to cover creation of the following accounts (unless already created):", "- protocol_fee_recipient_token_account: rent.minimum_balance(TokenAccount::LEN)", "- coin_creator_vault_ata: rent.minimum_balance(TokenAccount::LEN)", "- user_volume_accumulator: rent.minimum_balance(UserVolumeAccumulator::LEN)", "", "For cashback coins, optionally pass user_volume_accumulator_wsol_ata as remaining_accounts[0].", "If provided and valid, the ATA will be initialized if needed." ], discriminator: [ 198, 46, 21, 82, 180, 217, 232, 112 ], accounts: [ { name: "pool", writable: true }, { name: "user", writable: true, signer: true }, { name: "global_config" }, { name: "base_mint", relations: [ "pool" ] }, { name: "quote_mint", relations: [ "pool" ] }, { name: "user_base_token_account", writable: true }, { name: "user_quote_token_account", writable: true }, { name: "pool_base_token_account", writable: true, relations: [ "pool" ] }, { name: "pool_quote_token_account", writable: true, relations: [ "pool" ] }, { name: "protocol_fee_recipient" }, { name: "protocol_fee_recipient_token_account", writable: true, pda: { seeds: [ { kind: "account", path: "protocol_fee_recipient" }, { kind: "account", path: "quote_token_program" }, { kind: "account", path: "quote_mint" } ], program: { kind: "const", value: [ 140, 151, 37, 143, 78, 36, 137, 241, 187, 61, 16, 41, 20, 142, 13, 131, 11, 90, 19, 153, 218, 255, 16, 132, 4, 142, 123, 216, 219, 233, 248, 89 ] } } }, { name: "base_token_program" }, { name: "quote_token_program" }, { name: "system_program", address: "11111111111111111111111111111111" }, { name: "associated_token_program", address: "ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL" }, { name: "event_authority", pda: { seeds: [ { kind: "const", value: [ 95, 95, 101, 118, 101, 110, 116, 95, 97, 117, 116, 104, 111, 114, 105, 116, 121 ] } ] } }, { name: "program", address: "pAMMBay6oceH9fJKBRHGP5D4bD4sWpmSwMn52FMfXEA" }, { name: "coin_creator_vault_ata", writable: true, pda: { seeds: [ { kind: "account", path: "coin_creator_vault_authority" }, { kind: "account", path: "quote_token_program" }, { kind: "account", path: "quote_mint" } ], program: { kind: "const", value: [ 140, 151, 37, 143, 78, 36, 137, 241, 187, 61, 16, 41, 20, 142, 13, 131, 11, 90, 19, 153, 218, 255, 16, 132, 4, 142, 123, 216, 219, 233, 248, 89 ] } } }, { name: "coin_creator_vault_authority", pda: { seeds: [ { kind: "const", value: [ 99, 114, 101, 97, 116, 111, 114, 95, 118, 97, 117, 108, 116 ] }, { kind: "account", path: "pool.coin_creator", account: "Pool" } ] } }, { name: "global_volume_accumulator", pda: { seeds: [ { kind: "const", value: [ 103, 108, 111, 98, 97, 108, 95, 118, 111, 108, 117, 109, 101, 95, 97, 99, 99, 117, 109, 117, 108, 97, 116, 111, 114 ] } ] } }, { name: "user_volume_accumulator", writable: true, pda: { seeds: [ { kind: "const", value: [ 117, 115, 101, 114, 95, 118, 111, 108, 117, 109, 101, 95, 97, 99, 99, 117, 109, 117, 108, 97, 116, 111, 114 ] }, { kind: "account", path: "user" } ] } }, { name: "fee_config", pda: { seeds: [ { kind: "const", value: [ 102, 101, 101, 95, 99, 111, 110, 102, 105, 103 ] }, { kind: "const", value: [ 12, 20, 222, 252, 130, 94, 198, 118, 148, 37, 8, 24, 187, 101, 64, 101, 244, 41, 141, 49, 86, 213, 113, 180, 212, 248, 9, 12, 24, 233, 168, 99 ] } ], program: { kind: "account", path: "fee_program" } } }, { name: "fee_program", address: "pfeeUxB6jkeY1Hxd7CsFCAjcbHA9rWtchMGdZ6VojVZ" } ], args: [ { name: "spendable_quote_in", type: "u64" }, { name: "min_base_amount_out", type: "u64" }, { name: "track_volume", type: { defined: { name: "OptionBool" } } } ] }, { name: "claim_cashback", discriminator: [ 37, 58, 35, 126, 190, 53, 228, 197 ], accounts: [ { name: "user", writable: true }, { name: "user_volume_accumulator", writable: true, pda: { seeds: [ { kind: "const", value: [ 117, 115, 101, 114, 95, 118, 111, 108, 117, 109, 101, 95, 97, 99, 99, 117, 109, 117, 108, 97, 116, 111, 114 ] }, { kind: "account", path: "user" } ] } }, { name: "quote_mint" }, { name: "quote_token_program" }, { name: "user_volume_accumulator_wsol_token_account", writable: true, pda: { seeds: [ { kind: "account", path: "user_volume_accumulator" }, { kind: "account", path: "quote_token_program" }, { kind: "account", path: "quote_mint" } ], program: { kind: "const", value: [ 140, 151, 37, 143, 78, 36, 137, 241, 187, 61, 16, 41, 20, 142, 13, 131, 11, 90, 19, 153, 218, 255, 16, 132, 4, 142, 123, 216, 219, 233, 248, 89 ] } } }, { name: "user_wsol_token_account", writable: true, pda: { seeds: [ { kind: "account", path: "user" }, { kind: "account", path: "quote_token_program" }, { kind: "account", path: "quote_mint" } ], program: { kind: "const", value: [ 140, 151, 37, 143, 78, 36, 137, 241, 187, 61, 16, 41, 20, 142, 13, 131, 11, 90, 19, 153, 218, 255, 16, 132, 4, 142, 123, 216, 219, 233, 248, 89 ] } } }, { name: "system_program", address: "11111111111111111111111111111111" }, { name: "event_authority", pda: { seeds: [ { kind: "const", value: [ 95, 95, 101, 118, 101, 110, 116, 95, 97, 117, 116, 104, 111, 114, 105, 116, 121 ] } ] } }, { name: "program", address: "pAMMBay6oceH9fJKBRHGP5D4bD4sWpmSwMn52FMfXEA" } ], args: [ ] }, { name: "claim_token_incentives", discriminator: [ 16, 4, 71, 28, 204, 1, 40, 27 ], accounts: [ { name: "user" }, { name: "user_ata", writable: true, pda: { seeds: [ { kind: "account", path: "user" }, { kind: "account", path: "token_program" }, { kind: "account", path: "mint" } ], program: { kind: "const", value: [ 140, 151, 37, 143, 78, 36, 137, 241, 187, 61, 16, 41, 20, 142, 13, 131, 11, 90, 19, 153, 218, 255, 16, 132, 4, 142, 123, 216, 219, 233, 248, 89 ] } } }, { name: "global_volume_accumulator", pda: { seeds: [ { kind: "const", value: [ 103, 108, 111, 98, 97, 108, 95, 118, 111, 108, 117, 109, 101, 95, 97, 99, 99, 117, 109, 117, 108, 97, 116, 111, 114 ] } ] } }, { name: "global_incentive_token_account", writable: true, pda: { seeds: [ { kind: "account", path: "global_volume_accumulator" }, { kind: "account", path: "token_program" }, { kind: "account", path: "mint" } ], program: { kind: "const", value: [ 140, 151, 37, 143, 78, 36, 137, 241, 187, 61, 16, 41, 20, 142, 13, 131, 11, 90, 19, 153, 218, 255, 16, 132, 4, 142, 123, 216, 219, 233, 248, 89 ] } } }, { name: "user_volume_accumulator", writable: true, pda: { seeds: [ { kind: "const", value: [ 117, 115, 101, 114, 95, 118, 111, 108, 117, 109, 101, 95, 97, 99, 99, 117, 109, 117, 108, 97, 116, 111, 114 ] }, { kind: "account", path: "user" } ] } }, { name: "mint", relations: [ "global_volume_accumulator" ] }, { name: "token_program" }, { name: "system_program", address: "11111111111111111111111111111111" }, { name: "associated_token_program", address: "ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL" }, { name: "event_authority", pda: { seeds: [ { kind: "const", value: [ 95, 95, 101, 118, 101, 110, 116, 95, 97, 117, 116, 104, 111, 114, 105, 116, 121 ] } ] } }, { name: "program", address: "pAMMBay6oceH9fJKBRHGP5D4bD4sWpmSwMn52FMfXEA" }, { name: "payer", writable: true, signer: true } ], args: [ ] }, { name: "close_user_volume_accumulator", discriminator: [ 249, 69, 164, 218, 150, 103, 84, 138 ], accounts: [ { name: "user", writable: true, signer: true }, { name: "user_volume_accumulator", writable: true, pda: { seeds: [ { kind: "const", value: [ 117, 115, 101, 114, 95, 118, 111, 108, 117, 109, 101, 95, 97, 99, 99, 117, 109, 117, 108, 97, 116, 111, 114 ] }, { kind: "account", path: "user" } ] } }, { name: "event_authority", pda: { seeds: [ { kind: "const", value: [ 95, 95, 101, 118, 101, 110, 116, 95, 97, 117, 116, 104, 111, 114, 105, 116, 121 ] } ] } }, { name: "program" } ], args: [ ] }, { name: "collect_coin_creator_fee", discriminator: [ 160, 57, 89, 42, 181, 139, 43, 66 ], accounts: [ { name: "quote_mint" }, { name: "quote_token_program" }, { name: "coin_creator" }, { name: "coin_creator_vault_authority", pda: { seeds: [ { kind: "const", value: [ 99, 114, 101, 97, 116, 111, 114, 95, 118, 97, 117, 108, 116 ] }, { kind: "account", path: "coin_creator" } ] } }, { name: "coin_creator_vault_ata", writable: true, pda: { seeds: [ { kind: "account", path: "coin_creator_vault_authority" }, { kind: "account", path: "quote_token_program" }, { kind: "account", path: "quote_mint" } ], program: { kind: "const", value: [ 140, 151, 37, 143, 78, 36, 137, 241, 187, 61, 16, 41, 20, 142, 13, 131, 11, 90, 19, 153, 218, 255, 16, 132, 4, 142, 123, 216, 219, 233, 248, 89 ] } } }, { name: "coin_creator_token_account", writable: true }, { name: "event_authority", pda: { seeds: [ { kind: "const", value: [ 95, 95, 101, 118, 101, 110, 116, 95, 97, 117, 116, 104, 111, 114, 105, 116, 121 ] } ] } }, { name: "program" } ], args: [ ] }, { name: "create_config", discriminator: [ 201, 207, 243, 114, 75, 111, 47, 189 ], accounts: [ { name: "admin", writable: true, signer: true, address: "8LWu7QM2dGR1G8nKDHthckea57bkCzXyBTAKPJUBDHo8" }, { name: "global_config", writable: true, pda: { seeds: [ { kind: "const", value: [ 103, 108, 111, 98, 97, 108, 95, 99, 111, 110, 102, 105, 103 ] } ] } }, { name: "system_program", address: "11111111111111111111111111111111" }, { name: "event_authority", pda: { seeds: [ { kind: "const", value: [ 95, 95, 101, 118, 101, 110, 116, 95, 97, 117, 116, 104, 111, 114, 105, 116, 121 ] } ] } }, { name: "program" } ], args: [ { name: "lp_fee_basis_points", type: "u64" }, { name: "protocol_fee_basis_points", type: "u64" }, { name: "protocol_fee_recipients", type: { array: [ "pubkey", 8 ] } }, { name: "coin_creator_fee_basis_points", type: "u64" }, { name: "admin_set_coin_creator_authority", type: "pubkey" } ] }, { name: "create_pool", discriminator: [ 233, 146, 209, 142, 207, 104, 64, 188 ], accounts: [ { name: "pool", writable: true, pda: { seeds: [ { kind: "const", value: [ 112, 111, 111, 108 ] }, { kind: "arg", path: "index" }, { kind: "account", path: "creator" }, { kind: "account", path: "base_mint" }, { kind: "account", path: "quote_mint" } ] } }, { name: "global_config" }, { name: "creator", writable: true, signer: true }, { name: "base_mint" }, { name: "quote_mint" }, { name: "lp_mint", writable: true, pda: { seeds: [ { kind: "const", value: [ 112, 111, 111, 108, 95, 108, 112, 95, 109, 105, 110, 116 ] }, { kind: "account", path: "pool" } ] } }, { name: "user_base_token_account", writable: true }, { name: "user_quote_token_account", writable: true }, { name: "user_pool_token_account", writable: true, pda: { seeds: [ { kind: "account", path: "creator" }, { kind: "account", path: "token_2022_program" }, { kind: "account", path: "lp_mint" } ], program: { kind: "const", value: [ 140, 151, 37, 143, 78, 36, 137, 241, 187, 61, 16, 41, 20, 142, 13, 131, 11, 90, 19, 153, 218, 255, 16, 132, 4, 142, 123, 216, 219, 233, 248, 89 ] } } }, { name: "pool_base_token_account", writable: true, pda: { seeds: [ { kind: "account", path: "pool" }, { kind: "account", path: "base_token_program" }, { kind: "account", path: "base_mint" } ], program: { kind: "const", value: [ 140, 151, 37, 143, 78, 36, 137, 241, 187, 61, 16, 41, 20, 142, 13, 131, 11, 90, 19, 153, 218, 255, 16, 132, 4, 142, 123, 216, 219, 233, 248, 89 ] } } }, { name: "pool_quote_token_account", writable: true, pda: { seeds: [ { kind: "account", path: "pool" }, { kind: "account", path: "quote_token_program" }, { kind: "account", path: "quote_mint" } ], program: { kind: "const", value: [ 140, 151, 37, 143, 78, 36, 137, 241, 187, 61, 16, 41, 20, 142, 13, 131, 11, 90, 19, 153, 218, 255, 16, 132, 4, 142, 123, 216, 219, 233, 248, 89 ] } } }, { name: "system_program", address: "11111111111111111111111111111111" }, { name: "token_2022_program", address: "TokenzQdBNbLqP5VEhdkAS6EPFLC1PHnBqCXEpPxuEb" }, { name: "base_token_program" }, { name: "quote_token_program" }, { name: "associated_token_program", address: "ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL" }, { name: "event_authority", pda: { seeds: [ { kind: "const", value: [ 95, 95, 101, 118, 101, 110, 116, 95, 97, 117, 116, 104, 111, 114, 105, 116, 121 ] } ] } }, { name: "program" } ], args: [ { name: "index", type: "u16" }, { name: "base_amount_in", type: "u64" }, { name: "quote_amount_in", type: "u64" }, { name: "coin_creator", type: "pubkey" }, { name: "is_mayhem_mode", type: "bool" }, { name: "is_cashback_coin", type: { defined: { name: "OptionBool" } } } ] }, { name: "deposit", discriminator: [ 242, 35, 198, 137, 82, 225, 242, 182 ], accounts: [ { name: "pool", writable: true }, { name: "global_config" }, { name: "user", signer: true }, { name: "base_mint", relations: [ "pool" ] }, { name: "quote_mint", relations: [ "pool" ] }, { name: "lp_mint", writable: true, relations: [ "pool" ] }, { name: "user_base_token_account", writable: true }, { name: "user_quote_token_account", writable: true }, { name: "user_pool_token_account", writable: true }, { name: "pool_base_token_account", writable: true, relations: [ "pool" ] }, { name: "pool_quote_token_account", writable: true, relations: [ "pool" ] }, { name: "token_program", address: "TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA" }, { name: "token_2022_program", address: "TokenzQdBNbLqP5VEhdkAS6EPFLC1PHnBqCXEpPxuEb" }, { name: "event_authority", pda: { seeds: [ { kind: "const", value: [ 95, 95, 101, 118, 101, 110, 116, 95, 97, 117, 116, 104, 111, 114, 105, 116, 121 ] } ] } }, { name: "program" } ], args: [ { name: "lp_token_amount_out", type: "u64" }, { name: "max_base_amount_in", type: "u64" }, { name: "max_quote_amount_in", type: "u64" } ] }, { name: "disable", discriminator: [ 185, 173, 187, 90, 216, 15, 238, 233 ], accounts: [ { name: "admin", signer: true, relations: [ "global_config" ] }, { name: "global_config", writable: true }, { name: "event_authority", pda: { seeds: [ { kind: "const", value: [ 95, 95, 101, 118, 101, 110, 116, 95, 97, 117, 116, 104, 111, 114, 105, 116, 121 ] } ] } }, { name: "program" } ], args: [ { name: "disable_create_pool", type: "bool" }, { name: "disable_deposit", type: "bool" }, { name: "disable_withdraw", type: "bool" }, { name: "disable_buy", type: "bool" }, { name: "disable_sell", type: "bool" } ] }, { name: "extend_account", discriminator: [ 234, 102, 194, 203, 150, 72, 62, 229 ], accounts: [ { name: "account", writable: true }, { name: "user", signer: true }, { name: "system_program", address: "11111111111111111111111111111111" }, { name: "event_authority", pda: { seeds: [ { kind: "const", value: [ 95, 95, 101, 118, 101, 110, 116, 95, 97, 117, 116, 104, 111, 114, 105, 116, 121 ] } ] } }, { name: "program" } ], args: [ ] }, { name: "init_user_volume_accumulator", discriminator: [ 94, 6, 202, 115, 255, 96, 232, 183 ], accounts: [ { name: "payer", writable: true, signer: true }, { name: "user" }, { name: "user_volume_accumulator", writable: true, pda: { seeds: [ { kind: "const", value: [ 117, 115, 101, 114, 95, 118, 111, 108, 117, 109, 101, 95, 97, 99, 99, 117, 109, 117, 108, 97, 116, 111, 114 ] }, { kind: "account", path: "user" } ] } }, { name: "system_program", address: "11111111111111111111111111111111" }, { name: "event_authority", pda: { seeds: [ { kind: "const", value: [ 95, 95, 101, 118, 101, 110, 116, 95, 97, 117, 116, 104, 111, 114, 105, 116, 121 ] } ] } }, { name: "program" } ], args: [ ] }, { name: "migrate_pool_coin_creator", docs: [ "Migrate Pool Coin Creator to Sharing Config" ], discriminator: [ 208, 8, 159, 4, 74, 175, 16, 58 ], accounts: [ { name: "pool", writable: true, pda: { seeds: [ { kind: "const", value: [ 112, 111, 111, 108 ] }, { kind: "account", path: "pool.index", account: "Pool" }, { kind: "account", path: "pool.creator", account: "Pool" }, { kind: "account", path: "pool.base_mint", account: "Pool" }, { kind: "account", path: "pool.quote_mint", account: "Pool" } ] } }, { name: "sharing_config", pda: { seeds: [ { kind: "const", value: [ 115, 104, 97, 114, 105, 110, 103, 45, 99, 111, 110, 102, 105, 103 ] }, { kind: "account", path: "pool.base_mint", account: "Pool" } ], program: { kind: "const", value: [ 12, 53, 255, 169, 5, 90, 142, 86, 141, 168, 247, 188, 7, 86, 21, 39, 76, 241, 201, 44, 164, 31, 64, 0, 156, 81, 106, 164, 20, 194, 124, 112 ] } } }, { name: "event_authority", pda: { seeds: [ { kind: "const", value: [ 95, 95, 101, 118, 101, 110, 116, 95, 97, 117, 116, 104, 111, 114, 105, 116, 121 ] } ] } }, { name: "program" } ], args: [ ] }, { name: "sell", discriminator: [ 51, 230, 133, 164, 1, 127, 131, 173 ], accounts: [ { name: "pool", writable: true }, { name: "user", writable: true, signer: true }, { name: "global_config" }, { name: "base_mint", relations: [ "pool" ] }, { name: "quote_mint", relations: [ "pool" ] }, { name: "user_base_token_account", writable: true }, { name: "user_quote_token_account", writable: true }, { name: "pool_base_token_account", writable: true, relations: [ "pool" ] }, { name: "pool_quote_token_account", writable: true, relations: [ "pool" ] }, { name: "protocol_fee_recipient" }, { name: "protocol_fee_recipient_token_account", writable: true, pda: { seeds: [ { kind: "account", path: "protocol_fee_recipient" }, { kind: "account", path: "quote_token_program" }, { kind: "account", path: "quote_mint" } ], program: { kind: "const", value: [ 140, 151, 37, 143, 78, 36, 137, 241, 187, 61, 16, 41, 20, 142, 13, 131, 11, 90, 19, 153, 218, 255, 16, 132, 4, 142, 123, 216, 219, 233, 248, 89 ] } } }, { name: "base_token_program" }, { name: "quote_token_program" }, { name: "system_program", address: "11111111111111111111111111111111" }, { name: "associated_token_program", address: "ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL" }, { name: "event_authority", pda: { seeds: [ { kind: "const", value: [ 95, 95, 101, 118, 101, 110, 116, 95, 97, 117, 116, 104, 111, 114, 105, 116, 121 ] } ] } }, { name: "program", address: "pAMMBay6oceH9fJKBRHGP5D4bD4sWpmSwMn52FMfXEA" }, { name: "coin_creator_vault_ata", writable: true, pda: { seeds: [ { kind: "account", path: "coin_creator_vault_authority" }, { kind: "account", path: "quote_token_program" }, { kind: "account", path: "quote_mint" } ], program: { kind: "const", value: [ 140, 151, 37, 143, 78, 36, 137, 241, 187, 61, 16, 41, 20, 142, 13, 131, 11, 90, 19, 153, 218, 255, 16, 132, 4, 142, 123, 216, 219, 233, 248, 89 ] } } }, { name: "coin_creator_vault_authority", pda: { seeds: [ { kind: "const", value: [ 99, 114, 101, 97, 116, 111, 114, 95, 118, 97, 117, 108, 116 ] }, { kind: "account", path: "pool.coin_creator", account: "Pool" } ] } }, { name: "fee_config", pda: { seeds: [ { kind: "const", value: [ 102, 101, 101, 95, 99, 111, 110, 102, 105, 103 ] }, { kind: "const", value: [ 12, 20, 222, 252, 130, 94, 198, 118, 148, 37, 8, 24, 187, 101, 64, 101, 244, 41, 141, 49, 86, 213, 113, 180, 212, 248, 9, 12, 24, 233, 168, 99 ] } ], program: { kind: "account", path: "fee_program" } } }, { name: "fee_program", address: "pfeeUxB6jkeY1Hxd7CsFCAjcbHA9rWtchMGdZ6VojVZ" } ], args: [ { name: "base_amount_in", type: "u64" }, { name: "min_quote_amount_out", type: "u64" } ] }, { name: "set_coin_creator", docs: [ "Sets Pool::coin_creator from Metaplex metadata creator or BondingCurve::creator" ], discriminator: [ 210, 149, 128, 45, 188, 58, 78, 175 ], accounts: [ { name: "pool", writable: true }, { name: "metadata", pda: { seeds: [ { kind: "const", value: [ 109, 101, 116, 97, 100, 97, 116, 97 ] }, { kind: "const", value: [ 11, 112, 101, 177, 227, 209, 124, 69, 56, 157, 82, 127, 107, 4, 195, 205, 88, 184, 108, 115, 26, 160, 253, 181, 73, 182, 209, 188, 3, 248, 41, 70 ] }, { kind: "account", path: "pool.base_mint", account: "Pool" } ], program: { kind: "const", value: [ 11, 112, 101, 177, 227, 209, 124, 69, 56, 157, 82, 127, 107, 4, 195, 205, 88, 184, 108, 115, 26, 160, 253, 181, 73, 182, 209, 188, 3, 248, 41, 70 ] } } }, { name: "bonding_curve", pda: { seeds: [ { kind: "const", value: [ 98, 111, 110, 100, 105, 110, 103, 45, 99, 117, 114, 118, 101 ] }, { kind: "account", path: "pool.base_mint", account: "Pool" } ], program: { kind: "const", value: [ 1, 86, 224, 246, 147, 102, 90, 207, 68, 219, 21, 104, 191, 23, 91, 170, 81, 137, 203, 151, 245, 210, 255, 59, 101, 93, 43, 182, 253, 109, 24, 176 ] } } }, { name: "event_authority", pda: { seeds: [ { kind: "const", value: [ 95, 95, 101, 118, 101, 110, 116, 95, 97, 117, 116, 104, 111, 114, 105, 116, 121 ] } ] } }, { name: "program" } ], args: [ ] }, { name: "set_reserved_fee_recipients", discriminator: [ 111, 172, 162, 232, 114, 89, 213, 142 ], accounts: [ { name: "global_config", writable: true, pda: { seeds: [ { kind: "const", value: [ 103, 108, 111, 98, 97, 108, 95, 99, 111, 110, 102, 105, 103 ] } ] } }, { name: "admin", signer: true, relations: [ "global_config" ] }, { name: "event_authority", pda: { seeds: [ { kind: "const", value: [ 95, 95, 101, 118, 101, 110, 116, 95, 97, 117, 116, 104, 111, 114, 105, 116, 121 ] } ] } }, { name: "program" } ], args: [ { name: "whitelist_pda", type: "pubkey" } ] }, { name: "sync_user_volume_accumulator", discriminator: [ 86, 31, 192, 87, 163, 87, 79, 238 ], accounts: [ { name: "user" }, { name: "global_volume_accumulator", pda: { seeds: [ { kind: "const", value: [ 103, 108, 111, 98, 97, 108, 95, 118, 111, 108, 117, 109, 101, 95, 97, 99, 99, 117, 109, 117, 108, 97, 116, 111, 114 ] } ] } }, { name: "user_volume_accumulator", writable: true, pda: { seeds: [ { kind: "const", value: [ 117, 115, 101, 114, 95, 118, 111, 108, 117, 109, 101, 95, 97, 99, 99, 117, 109, 117, 108, 97, 116, 111, 114 ] }, { kind: "account", path: "user" } ] } }, { name: "event_authority", pda: { seeds: [ { kind: "const", value: [ 95, 95, 101, 118, 101, 110, 116, 95, 97, 117, 116, 104, 111, 114, 105, 116, 121 ] } ] } }, { name: "program" } ], args: [ ] }, { name: "toggle_cashback_enabled", discriminator: [ 115, 103, 224, 255, 189, 89, 86, 195 ], accounts: [ { name: "admin", sig